@stlite/desktop 0.90.13 → 0.90.15

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 (71) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/assets/{ErrorOutline.esm-CJGMKtXr.js → ErrorOutline.esm-8R3U-65K.js} +1 -1
  3. package/build/assets/{FileDownload.esm-DVbGfwz7.js → FileDownload.esm-BFOXuaE0.js} +1 -1
  4. package/build/assets/{FileHelper-BAjDG49X.js → FileHelper-CX-ki3eU.js} +1 -1
  5. package/build/assets/{FormClearHelper-CaLJK07N.js → FormClearHelper-CXfZggoC.js} +1 -1
  6. package/build/assets/{Hooks-D54IehuR.js → Hooks-rH_bDoeH.js} +1 -1
  7. package/build/assets/{InputInstructions-BLplNLW9.js → InputInstructions-DBvcFAZU.js} +1 -1
  8. package/build/assets/{Particles-VYhfVp_p.js → Particles-CC5U4uC2.js} +1 -1
  9. package/build/assets/{ProgressBar-DX8k7XSZ.js → ProgressBar-CUUN2Jn1.js} +1 -1
  10. package/build/assets/{Toolbar-BbbydoLD.js → Toolbar-CAXs2ssX.js} +1 -1
  11. package/build/assets/{base-input-d4WKPeU6.js → base-input-CaoUSnQs.js} +1 -1
  12. package/build/assets/{checkbox-DUA9ewQT.js → checkbox-C6QD2M1R.js} +1 -1
  13. package/build/assets/{createSuper-CoIMxZYP.js → createSuper-C2tKBwhP.js} +1 -1
  14. package/build/assets/{data-grid-overlay-editor-cvHWuOOd.js → data-grid-overlay-editor-B6zYg3nK.js} +1 -1
  15. package/build/assets/{downloader-CR6bzPv-.js → downloader-Dkst_JYU.js} +1 -1
  16. package/build/assets/{es6-BCBcAdQS.js → es6-COIX_UTS.js} +2 -2
  17. package/build/assets/{iframeResizer.contentWindow-CEqjsNrn.js → iframeResizer.contentWindow-CLXvvjGK.js} +1 -1
  18. package/build/assets/{index-HqlJZ3Ag.js → index-B1mnHG1O.js} +1 -1
  19. package/build/assets/{index-C91sP-jG.js → index-BAuLAaYe.js} +1 -1
  20. package/build/assets/{index-BGUuVZft.js → index-BI0ZZeqT.js} +1 -1
  21. package/build/assets/{index-mHvUvPYI.js → index-BKmCVz-X.js} +1 -1
  22. package/build/assets/{index-Bwfh73dd.js → index-BS4li24f.js} +1 -1
  23. package/build/assets/{index-vLb3c1eZ.js → index-BeWWu5Gh.js} +1 -1
  24. package/build/assets/{index-CeNNLDtJ.js → index-Bot-HFGd.js} +1 -1
  25. package/build/assets/{index-Bhgfj5y5.js → index-Bt2KSUC2.js} +1 -1
  26. package/build/assets/{index-CdAXvPf5.js → index-Bvl3bY4R.js} +1 -1
  27. package/build/assets/{index-PHqcnj3c.js → index-C0Q8yE7v.js} +1 -1
  28. package/build/assets/{index-B3GOsGpL.js → index-C12OFcIh.js} +1 -1
  29. package/build/assets/{index-BdVfRySM.js → index-C7nKmor1.js} +1 -1
  30. package/build/assets/{index-DOiS7VE9.js → index-CADKCir8.js} +1 -1
  31. package/build/assets/{index-CTZrIDfL.js → index-CCXHPMUB.js} +1 -1
  32. package/build/assets/{index-j6pFDYKO.js → index-CJikVwcT.js} +1 -1
  33. package/build/assets/{index-NigQ67t-.js → index-CKIZeYUq.js} +1 -1
  34. package/build/assets/{index-XsxWL5x-.js → index-C_m1xqoG.js} +1 -1
  35. package/build/assets/{index-CD0SY35r.js → index-CcI6rcYL.js} +1 -1
  36. package/build/assets/{index-CJWk1YT9.js → index-CqPiUIzz.js} +1 -1
  37. package/build/assets/{index-BRiK5gVx.js → index-CzNOzdMD.js} +1 -1
  38. package/build/assets/{index-BMSSeqlt.js → index-D57JlMpf.js} +1 -1
  39. package/build/assets/{index-D_4iXBI5.js → index-DH8imcpD.js} +1 -1
  40. package/build/assets/{index-VVwti7cA.js → index-DKIJUmSp.js} +1 -1
  41. package/build/assets/{index-wUVGuFfU.js → index-DRv0ltn2.js} +1 -1
  42. package/build/assets/{index-B7yzG-4X.js → index-DZKUZQ4z.js} +5 -5
  43. package/build/assets/{index-CIRTE79j.js → index-DpusuKed.js} +1 -1
  44. package/build/assets/{index-DCv3Ovf7.js → index-P8waswk0.js} +1 -1
  45. package/build/assets/{index-CwPp5UqK.js → index-PiPju_F7.js} +1 -1
  46. package/build/assets/{index-B58bWjQH.js → index-R9kIgYTc.js} +1 -1
  47. package/build/assets/{index-CHBxMYoz.js → index-W7pMcdM5.js} +1 -1
  48. package/build/assets/{index-DoQHaClc.js → index-WXxfAlRg.js} +1 -1
  49. package/build/assets/{index-D9P3ZYiC.js → index-gnMTbBzT.js} +1 -1
  50. package/build/assets/{index-wnKDraWU.js → index-k4Zz_A0O.js} +217 -212
  51. package/build/assets/{index-BJK2Ym_S.js → index-k4zlsY75.js} +1 -1
  52. package/build/assets/{index-gb2ePejP.js → index-onhde1_u.js} +1 -1
  53. package/build/assets/{index-Dynm-1sH.js → index-qNX4xGHy.js} +1 -1
  54. package/build/assets/{index-BD2ZweM9.js → index-sKFQbsJX.js} +1 -1
  55. package/build/assets/{inherits-xHSaJdUZ.js → inherits-CEwp2qJ3.js} +1 -1
  56. package/build/assets/{input-PliHooUw.js → input-F2PGHPo-.js} +1 -1
  57. package/build/assets/{memory-BJMhKXeY.js → memory-DrewVBU3.js} +1 -1
  58. package/build/assets/{number-overlay-editor-DRf5xgI3.js → number-overlay-editor-b3bkPSy4.js} +1 -1
  59. package/build/assets/{sandbox-DBdCCxaG.js → sandbox-NITkBzy4.js} +1 -1
  60. package/build/assets/{slicedToArray-Cuk3tbTR.js → slicedToArray-CyBE-4ry.js} +1 -1
  61. package/build/assets/{timepicker-DjzHzJAt.js → timepicker-DRJ4YL4p.js} +1 -1
  62. package/build/assets/{uniqueId-ikSpJ9AP.js → uniqueId-CbEiG62v.js} +1 -1
  63. package/build/assets/{useBasicWidgetState-raTjAqZP.js → useBasicWidgetState-CMQ4ds3J.js} +1 -1
  64. package/build/assets/{useTextInputAutoExpand-Uac3U0I_.js → useTextInputAutoExpand-BfLYssNQ.js} +1 -1
  65. package/build/assets/{useUpdateUiValue-BbEmiOZQ.js → useUpdateUiValue-B81sk7L2.js} +1 -1
  66. package/build/assets/{withFullScreenWrapper-C7u7nPsK.js → withFullScreenWrapper-Bc57_5Q4.js} +1 -1
  67. package/build/assets/{worker-CiNU4sgs.js → worker-CO569BKa.js} +4 -4
  68. package/build/electron/worker.js +5 -5
  69. package/build/index.html +1 -1
  70. package/package.json +4 -4
  71. package/wheels/streamlit-1.50.0-cp313-none-any.whl +0 -0
@@ -1,4 +1,4 @@
1
- import{s as r,$ as c,r as m,j as n,aq as p}from"./index-wnKDraWU.js";import{R as g,P as x}from"./Particles-VYhfVp_p.js";const B="/assets/balloon-0.Czj7AKwE.png",d="/assets/balloon-1.CNvFFrND.png",f="/assets/balloon-2.DTvC6B1t.png",_="/assets/balloon-3.CgSk4tbL.png",A="/assets/balloon-4.mbtFrzxf.png",E="/assets/balloon-5.CSwkUfRA.png",t=300,a=121,l=20,I=80,M=1e3,b=c`
1
+ import{s as r,$ as c,r as m,j as n,aq as p}from"./index-k4Zz_A0O.js";import{R as g,P as x}from"./Particles-CC5U4uC2.js";const B="/assets/balloon-0.Czj7AKwE.png",d="/assets/balloon-1.CNvFFrND.png",f="/assets/balloon-2.DTvC6B1t.png",_="/assets/balloon-3.CgSk4tbL.png",A="/assets/balloon-4.mbtFrzxf.png",E="/assets/balloon-5.CSwkUfRA.png",t=300,a=121,l=20,I=80,M=1e3,b=c`
2
2
  from {
3
3
  transform: translateY(calc(100vh + ${t}px));
4
4
  }
@@ -1 +1 @@
1
- import{r as p,u as T,h as k,j as c,S as C,e as y,l as S,f as L,g as W,T as B,P as R,t as w,C as E}from"./index-wnKDraWU.js";import{u as P}from"./useBasicWidgetState-raTjAqZP.js";import{S as j,L as $,a as m}from"./checkbox-DUA9ewQT.js";import"./FormClearHelper-CaLJK07N.js";function v({element:t,disabled:a,widgetMgr:n,fragmentId:d}){const[f,g]=P({getStateFromWidgetMgr:X,getDefaultStateFromProto:H,getCurrStateFromProto:M,updateWidgetMgrState:V,element:t,widgetMgr:n,fragmentId:d}),x=p.useCallback(i=>{g({value:i.target.checked,fromUi:!0})},[g]),e=T(),{colors:o,spacing:h,sizes:r}=e,u=k(e),b=a?o.fadedText40:o.bodyText;return c.jsx(C,{className:"row-widget stCheckbox","data-testid":"stCheckbox",children:c.jsx(j,{checked:f,disabled:a,onChange:x,"aria-label":t.label,checkmarkType:t.type===E.StyleType.TOGGLE?m.toggle:m.default,labelPlacement:$.right,overrides:{Root:{style:({$isFocusVisible:i})=>({marginBottom:h.none,marginTop:h.none,backgroundColor:i?o.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:i})=>{let s=u?o.bgColor:o.bodyText;return a&&(s=u?o.gray70:o.gray90),{width:`calc(${r.checkbox} - ${e.spacing.twoXS})`,height:`calc(${r.checkbox} - ${e.spacing.twoXS})`,transform:i?`translateX(${r.checkbox})`:"",backgroundColor:s,boxShadow:""}}},ToggleTrack:{style:({$checked:i,$isHovered:s})=>{let l=o.fadedText40;return s&&!a&&(l=o.fadedText20),i&&!a&&(l=o.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:e.spacing.twoXS,paddingLeft:e.spacing.threeXS,paddingRight:e.spacing.threeXS,width:`calc(2 * ${r.checkbox})`,minWidth:`calc(2 * ${r.checkbox})`,height:r.checkbox,minHeight:r.checkbox,borderBottomLeftRadius:e.radii.full,borderTopLeftRadius:e.radii.full,borderBottomRightRadius:e.radii.full,borderTopRightRadius:e.radii.full,backgroundColor:l}}},Checkmark:{style:({$isFocusVisible:i,$checked:s})=>{const l=s&&!a?o.primary:o.fadedText40;return{outline:0,width:r.checkbox,height:r.checkbox,marginTop:e.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:i&&s?`0 0 0 0.2rem ${w(o.primary,.5)}`:"",borderLeftWidth:r.borderWidth,borderRightWidth:r.borderWidth,borderTopWidth:r.borderWidth,borderBottomWidth:r.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:e.lineHeights.small,paddingLeft:e.spacing.sm,position:"relative",color:b}}},children:c.jsxs(y,{visibility:S(t.labelVisibility?.value),"data-testid":"stWidgetLabel",children:[c.jsx(L,{source:t.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),t.help&&c.jsx(W,{color:b,children:c.jsx(B,{content:t.help,placement:R.TOP_RIGHT})})]})})})}function X(t,a){return t.getBoolValue(a)}function H(t){return t.default??null}function M(t){return t.value??null}function V(t,a,n,d){a.setBoolValue(t,n.value,{fromUi:n.fromUi},d)}const U=p.memo(v);export{U as default};
1
+ import{r as p,u as T,h as k,j as c,S as C,e as y,l as S,f as L,g as W,T as B,P as R,t as w,C as E}from"./index-k4Zz_A0O.js";import{u as P}from"./useBasicWidgetState-CMQ4ds3J.js";import{S as j,L as $,a as m}from"./checkbox-C6QD2M1R.js";import"./FormClearHelper-CXfZggoC.js";function v({element:t,disabled:a,widgetMgr:n,fragmentId:d}){const[f,g]=P({getStateFromWidgetMgr:X,getDefaultStateFromProto:H,getCurrStateFromProto:M,updateWidgetMgrState:V,element:t,widgetMgr:n,fragmentId:d}),x=p.useCallback(i=>{g({value:i.target.checked,fromUi:!0})},[g]),e=T(),{colors:o,spacing:h,sizes:r}=e,u=k(e),b=a?o.fadedText40:o.bodyText;return c.jsx(C,{className:"row-widget stCheckbox","data-testid":"stCheckbox",children:c.jsx(j,{checked:f,disabled:a,onChange:x,"aria-label":t.label,checkmarkType:t.type===E.StyleType.TOGGLE?m.toggle:m.default,labelPlacement:$.right,overrides:{Root:{style:({$isFocusVisible:i})=>({marginBottom:h.none,marginTop:h.none,backgroundColor:i?o.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:i})=>{let s=u?o.bgColor:o.bodyText;return a&&(s=u?o.gray70:o.gray90),{width:`calc(${r.checkbox} - ${e.spacing.twoXS})`,height:`calc(${r.checkbox} - ${e.spacing.twoXS})`,transform:i?`translateX(${r.checkbox})`:"",backgroundColor:s,boxShadow:""}}},ToggleTrack:{style:({$checked:i,$isHovered:s})=>{let l=o.fadedText40;return s&&!a&&(l=o.fadedText20),i&&!a&&(l=o.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:e.spacing.twoXS,paddingLeft:e.spacing.threeXS,paddingRight:e.spacing.threeXS,width:`calc(2 * ${r.checkbox})`,minWidth:`calc(2 * ${r.checkbox})`,height:r.checkbox,minHeight:r.checkbox,borderBottomLeftRadius:e.radii.full,borderTopLeftRadius:e.radii.full,borderBottomRightRadius:e.radii.full,borderTopRightRadius:e.radii.full,backgroundColor:l}}},Checkmark:{style:({$isFocusVisible:i,$checked:s})=>{const l=s&&!a?o.primary:o.fadedText40;return{outline:0,width:r.checkbox,height:r.checkbox,marginTop:e.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:i&&s?`0 0 0 0.2rem ${w(o.primary,.5)}`:"",borderLeftWidth:r.borderWidth,borderRightWidth:r.borderWidth,borderTopWidth:r.borderWidth,borderBottomWidth:r.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:e.lineHeights.small,paddingLeft:e.spacing.sm,position:"relative",color:b}}},children:c.jsxs(y,{visibility:S(t.labelVisibility?.value),"data-testid":"stWidgetLabel",children:[c.jsx(L,{source:t.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),t.help&&c.jsx(W,{color:b,children:c.jsx(B,{content:t.help,placement:R.TOP_RIGHT})})]})})})}function X(t,a){return t.getBoolValue(a)}function H(t){return t.default??null}function M(t){return t.value??null}function V(t,a,n,d){a.setBoolValue(t,n.value,{fromUi:n.fromUi},d)}const U=p.memo(v);export{U as default};
@@ -1 +1 @@
1
- import{r as c,E as O,_ as X,bo as y,bp as _,s as g,j as o,T as ct,P as Y,c as q,B as G,an as E,u as k,am as pt,ah as ut,bq as gt,h as ht,a4 as ft,as as xt,br as mt,k as R,bj as yt,bk as Ct}from"./index-wnKDraWU.js";import{g as bt,C as It,I as wt,F as V,E as J,a as vt,s as jt,u as zt,b as St}from"./FileHelper-BAjDG49X.js";import{I as Ft}from"./InputInstructions-BLplNLW9.js";import{u as Ut,T as Et}from"./useTextInputAutoExpand-Uac3U0I_.js";import{i as Dt}from"./inputUtils-CptNuJwn.js";import{E as Tt}from"./ErrorOutline.esm-CJGMKtXr.js";import{U as Q}from"./UploadFileInfo-C-jY39rj.js";import"./base-input-d4WKPeU6.js";var Z=c.forwardRef(function(t,e){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(O,X({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});Z.displayName="AttachFile";var tt=c.forwardRef(function(t,e){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(O,X({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),c.createElement("rect",{width:24,height:24,fill:"none"}),c.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"}))});tt.displayName="Send";const et=(t,e)=>e===y.Directory?{...t,webkitdirectory:"",multiple:!0}:t,Bt=(t,e)=>{if(!e||e.length===0)return!0;const n=t.name.toLowerCase(),a=n.lastIndexOf(".");if(a===-1||a===n.length-1)return e.some(x=>x===""||x===".");const p=n.substring(a),i=n.substring(a+1);return e.some(x=>{const C=x.toLowerCase();return C.startsWith(".")?p===C:i===C})},Rt=(t,e)=>Bt(t,e)?{isValid:!0}:{isValid:!1,errorMessage:`${t.type||"This type of"} files are not allowed.`},ot=t=>{switch(t){case y.None:return"a file";case y.Single:return"a file";case y.Multiple:return"files";case y.Directory:return"a directory";default:return _(t),"a file"}},Lt=g("div",{target:"e3id6jz12"})(({theme:t,height:e})=>({backgroundColor:t.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${t.sizes.emptyDropdownHeight}, ${e})`,width:"100%",zIndex:t.zIndices.priority}),""),Ht=g("div",{target:"e3id6jz11"})(({theme:t,height:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.primary,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,color:t.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:e,width:"100%",fontWeight:t.fontWeights.bold}),""),Vt=g("div",{target:"e3id6jz10"})(({theme:t,disabled:e})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${t.sizes.borderWidth}`,cursor:e?"not-allowed":"auto"}),""),kt=g("div",{target:"e3id6jz9"})(({disabled:t})=>({pointerEvents:t?"none":"auto"}),""),Mt=g("div",{target:"e3id6jz8"})(({theme:t})=>({marginTop:"0.625em",marginLeft:t.spacing.sm,height:t.spacing.xl,width:t.sizes.borderWidth,backgroundColor:t.colors.fadedText20}),""),Wt=g("div",{target:"e3id6jz7"})(({theme:t})=>({left:0,right:0,lineHeight:t.lineHeights.tight,paddingLeft:t.spacing.sm,paddingRight:t.spacing.sm,overflowX:"auto"}),""),$t=g("div",{target:"e3id6jz6"})({name:"zjik7",styles:"display:flex"}),Nt=g("div",{target:"e3id6jz5"})({name:"ou8xsw",styles:"flex:0 0 auto"}),At=g("div",{target:"e3id6jz4"})(({theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.sm,gap:t.spacing.twoXS}),""),Pt=g("div",{target:"e3id6jz3"})(({theme:t})=>({color:t.colors.fadedText60}),""),Kt=g("div",{target:"e3id6jz2"})(({theme:t,fileStatus:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.type==="uploaded"?t.colors.bodyText:t.colors.fadedText60}),""),Ot=g("div",{target:"e3id6jz1"})(({theme:t})=>({marginRight:t.spacing.md,color:t.colors.fadedText60}),""),Xt=g("small",{target:"e3id6jz0"})(({theme:t})=>({display:"flex",alignItems:"center",maxHeight:t.sizes.smallElementHeight,color:t.colors.fadedText60,"& :hover":{color:t.colors.bodyText}}),""),_t=({getRootProps:t,getInputProps:e,acceptFile:n,disabled:a,theme:p})=>{const i=et(e(),n);return o.jsxs(Vt,{disabled:a,children:[o.jsxs(kt,{"data-testid":"stChatInputFileUploadButton",disabled:a,...t(),children:[o.jsx("input",{...i}),o.jsx(ct,{content:`Upload or drag and drop ${ot(n)}`,placement:Y.TOP,onMouseEnterDelay:500,children:o.jsx(q,{kind:G.MINIMAL,disabled:a,children:o.jsx(E,{content:Z,size:"lg",color:a?p.colors.fadedText40:p.colors.fadedText60})})})]}),o.jsx(Mt,{})]})},Yt=c.memo(_t),qt=({getRootProps:t,getInputProps:e,acceptFile:n,inputHeight:a})=>{const p=et(e(),n);return o.jsxs(o.Fragment,{children:[o.jsx(Lt,{height:a,...t(),children:o.jsx("input",{...p})}),o.jsx(Ht,{height:a,children:`Drag and drop ${ot(n)} here`})]})},Gt=c.memo(qt);function Jt({children:t,content:e}){const n=k();return o.jsx(pt,{content:e,placement:Y.TOP,overrides:{Body:{style:{top:`-${n.sizes.minElementHeight}`}}},children:t})}const Qt=({fileInfo:t})=>{const e=k(),{type:n}=t.status;switch(n){case"uploading":return o.jsx(ut,{"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return o.jsx(Jt,{content:t.status.errorMessage,children:o.jsx(E,{color:e.colors.redTextColor,content:Tt,size:"lg"})});case"uploaded":return o.jsx(E,{content:wt,size:"lg"});default:return _(n),null}},Zt=({fileInfo:t,onDelete:e})=>o.jsxs(At,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[o.jsx(Pt,{children:o.jsx(Qt,{fileInfo:t})}),o.jsx(Kt,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:t.name,fileStatus:t.status,children:t.name}),o.jsx(Ot,{children:bt(t.size,V.Byte)}),o.jsx(Xt,{"data-testid":"stChatInputDeleteBtn",children:o.jsx(q,{onClick:()=>e(t.id),kind:G.MINIMAL,children:o.jsx(E,{content:It,size:"lg"})})})]}),te=c.memo(Zt),ee=({items:t,onDelete:e})=>o.jsx(Wt,{"data-testid":"stChatUploadedFiles",children:o.jsx($t,{children:t.map(n=>o.jsx(Nt,{children:o.jsx(te,{fileInfo:n,onDelete:e})},n.id))})}),oe=c.memo(ee),ne=(t,e)=>{const n=[],a=[];return t.forEach(p=>{const i=Rt(p,e.fileType);i.isValid?n.push(p):a.push({file:p,errors:[{code:J.FileInvalidType,message:i.errorMessage||"File type not allowed."}]})}),{accepted:n,rejected:a}},re=({acceptMultipleFiles:t,acceptDirectoryFiles:e,maxFileSize:n,uploadClient:a,uploadFile:p,addFiles:i,getNextLocalFileId:x,deleteExistingFiles:C,onUploadComplete:w,element:b})=>(f,h)=>{if(e&&f.length>0){const{accepted:u,rejected:m}=ne(f,b);f=u,h=[...h,...m]}if(!t&&f.length===0&&h.length>1){const u=h.findIndex(m=>m.errors?.[0].code===J.TooManyFiles);u>=0&&(f.push(h[u].file),h.splice(u,1))}if(!t&&f.length>0&&C(),a.fetchFileURLs(f).then(u=>{gt(u,f).forEach(([m,v])=>{p(m,v)})}).catch(u=>{i(f.map(m=>new Q(m.name,m.size,x(),{type:"error",errorMessage:u})))}),h.length>0){const u=h.map(m=>vt(m,x(),n));i(u)}w()},se=({getNextLocalFileId:t,addFiles:e,updateFile:n,uploadClient:a,element:p,onUploadProgress:i,onUploadComplete:x})=>(C,w)=>{const b=w.webkitRelativePath||w.name,f=new AbortController,h=new Q(b,w.size,t(),{type:"uploading",abortController:f,progress:1});e([h]),a.uploadFile({formId:"",...p},C.uploadUrl,w,u=>i(u,h.id),f.signal).then(()=>x(h.id,C)).catch(u=>{u instanceof DOMException&&u.name==="AbortError"||n(h.id,h.setStatus({type:"error",errorMessage:u?u.toString():"Unknown error"}))})},ae=g("div",{target:"e1d2x3se4"})({name:"1nibcdy",styles:"border:none;position:relative;display:flex"}),ie=g("div",{target:"e1d2x3se3"})(({theme:t,extended:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.widgetBorderColor??t.colors.transparent,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:t.spacing.lg,maxHeight:e?"none":t.sizes.minElementHeight,gap:t.spacing.sm,overflow:"hidden",":focus-within":{borderColor:t.colors.primary}}),""),le=g("button",{target:"e1d2x3se2"})(({theme:t,disabled:e,extended:n})=>{const a=ht(t),[p,i]=a?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:n?"0":t.radii.chatInput,borderTopLeftRadius:n?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:e?p:i,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:a?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.gray60,cursor:"not-allowed"}}},""),de=g("div",{target:"e1d2x3se1"})(({theme:t})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${t.sizes.borderWidth}`,pointerEvents:"none"}),""),ce=g("div",{target:"e1d2x3se0"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`}),""),L=(t,e,n)=>n.map(a=>a.id===t?e:a),H=(t,e)=>e.find(n=>n.id===t);function pe({disabled:t,element:e,widgetMgr:n,fragmentId:a,uploadClient:p}){const i=k(),{placeholder:x,maxChars:C}=e,w=c.useRef(0),b=c.useRef(null),{width:f,elementRef:h}=ft(),{innerWidth:u,innerHeight:m}=xt(),[v,D]=c.useState(e.default),[z,S]=c.useState([]),[F,T]=c.useState(!1),j=Ut({textareaRef:b,dependencies:[x]}),B=c.useMemo(()=>z.some(r=>r.status.type==="uploading")?!1:v!==""||z.length>0,[z,v]),I=mt(e.acceptFile),M=jt(e.maxUploadSizeMb,V.Megabyte,V.Byte),W=c.useCallback(r=>S(l=>[...l,...r]),[]),$=c.useCallback(r=>{S(l=>{const d=H(r,l);return R(d)?l:(d.status.type==="uploading"&&d.status.abortController.abort(),d.status.type==="uploaded"&&d.status.fileUrls.deleteUrl&&p.deleteFile(d.status.fileUrls.deleteUrl),l.filter(s=>s.id!==r))})},[p]),nt=()=>{const r=z.filter(l=>l.status.type==="uploaded").map(l=>{const{name:d,size:s,status:U}=l,{fileId:lt,fileUrls:dt}=U;return new yt({fileId:lt,fileUrls:dt,name:d,size:s})});return new Ct({uploadedFileInfo:r})},N=()=>w.current++,rt=re({acceptMultipleFiles:I===y.Multiple||I===y.Directory,acceptDirectoryFiles:I===y.Directory,maxFileSize:M,uploadClient:p,uploadFile:se({getNextLocalFileId:N,addFiles:W,updateFile:(r,l)=>{S(d=>L(r,l,d))},uploadClient:p,element:e,onUploadProgress:(r,l)=>{S(d=>{const s=H(l,d);if(R(s)||s.status.type!=="uploading")return d;const U=Math.round(r.loaded*100/r.total);return s.status.progress===U?d:L(l,s.setStatus({type:"uploading",abortController:s.status.abortController,progress:U}),d)})},onUploadComplete:(r,l)=>{S(d=>{const s=H(r,d);return R(s)||s.status.type!=="uploading"?d:L(s.id,s.setStatus({type:"uploaded",fileId:l.fileId,fileUrls:l}),d)})}}),addFiles:W,getNextLocalFileId:N,deleteExistingFiles:()=>z.forEach(r=>$(r.id)),onUploadComplete:()=>{b.current&&b.current.focus()},element:e}),{getRootProps:A,getInputProps:P}=zt({onDrop:rt,multiple:I===y.Multiple||I===y.Directory,accept:St(e.fileType),maxSize:M}),K=()=>{if(b.current&&b.current.focus(),!B||t)return;const r={data:v,fileUploaderState:nt()};n.setChatInputValue(e,r,{fromUi:!0},a),S([]),D(""),j.clearScrollHeight()},st=r=>{const{metaKey:l,ctrlKey:d,shiftKey:s}=r;Dt(r)&&!s&&!d&&!l&&(r.preventDefault(),K())},at=r=>{const{value:l}=r.target;C!==0&&l.length>C||(D(l),j.updateScrollHeight())};c.useEffect(()=>{if(e.setValue){e.setValue=!1;const r=e.value||"";D(r)}},[e]),c.useEffect(()=>{const r=s=>{s.preventDefault(),s.stopPropagation(),!F&&s.dataTransfer?.types.includes("Files")&&T(!0)},l=s=>{s.preventDefault(),s.stopPropagation(),F&&(s.clientX<=0&&s.clientY<=0||s.clientX>=u&&s.clientY>=m)&&T(!1)},d=s=>{s.preventDefault(),s.stopPropagation(),F&&T(!1)};return window.addEventListener("dragover",r),window.addEventListener("drop",d),window.addEventListener("dragleave",l),()=>{window.removeEventListener("dragover",r),window.removeEventListener("drop",d),window.removeEventListener("dragleave",l)}},[F,u,m]);const it=I!==y.None&&F;return o.jsxs(o.Fragment,{children:[I===y.None?null:o.jsx(oe,{items:[...z],onDelete:$}),o.jsx(ae,{className:"stChatInput","data-testid":"stChatInput",ref:h,children:it?o.jsx(Gt,{getRootProps:A,getInputProps:P,acceptFile:I,inputHeight:j.height}):o.jsxs(ie,{extended:j.isExtended,children:[I===y.None?null:o.jsx(Yt,{getRootProps:A,getInputProps:P,acceptFile:I,disabled:t,theme:i}),o.jsx(Et,{inputRef:b,value:v,placeholder:x,onChange:at,onKeyDown:st,"aria-label":x,disabled:t,rows:1,overrides:{Root:{style:{minHeight:i.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0",borderTopLeftRadius:"0",borderTopRightRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{fontWeight:i.fontWeights.normal,lineHeight:i.lineHeights.inputWidget,"::placeholder":{color:i.colors.fadedText60},height:j.height,maxHeight:j.maxHeight,paddingLeft:i.spacing.none,paddingBottom:i.spacing.sm,paddingTop:i.spacing.sm,paddingRight:`calc(${i.iconSizes.xl} + 2 * ${i.spacing.sm} + ${i.spacing.sm})`}}}}),f>i.breakpoints.hideWidgetDetails&&o.jsx(ce,{children:o.jsx(Ft,{dirty:B,value:v,maxLength:C,type:"chat",inForm:!1})}),o.jsx(de,{children:o.jsx(le,{onClick:K,disabled:!B||t,extended:j.isExtended,"data-testid":"stChatInputSubmitButton",children:o.jsx(E,{content:tt,size:"xl",color:"inherit"})})})]})})]})}const be=c.memo(pe);export{be as default};
1
+ import{r as c,E as O,_ as X,bo as y,bp as _,s as g,j as o,T as ct,P as Y,c as q,B as G,an as E,u as k,am as pt,ah as ut,bq as gt,h as ht,a4 as ft,as as xt,br as mt,k as R,bj as yt,bk as Ct}from"./index-k4Zz_A0O.js";import{g as bt,C as It,I as wt,F as V,E as J,a as vt,s as jt,u as zt,b as St}from"./FileHelper-CX-ki3eU.js";import{I as Ft}from"./InputInstructions-DBvcFAZU.js";import{u as Ut,T as Et}from"./useTextInputAutoExpand-BfLYssNQ.js";import{i as Dt}from"./inputUtils-CptNuJwn.js";import{E as Tt}from"./ErrorOutline.esm-8R3U-65K.js";import{U as Q}from"./UploadFileInfo-C-jY39rj.js";import"./base-input-CaoUSnQs.js";var Z=c.forwardRef(function(t,e){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(O,X({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),c.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});Z.displayName="AttachFile";var tt=c.forwardRef(function(t,e){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return c.createElement(O,X({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),c.createElement("rect",{width:24,height:24,fill:"none"}),c.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"}))});tt.displayName="Send";const et=(t,e)=>e===y.Directory?{...t,webkitdirectory:"",multiple:!0}:t,Bt=(t,e)=>{if(!e||e.length===0)return!0;const n=t.name.toLowerCase(),a=n.lastIndexOf(".");if(a===-1||a===n.length-1)return e.some(x=>x===""||x===".");const p=n.substring(a),i=n.substring(a+1);return e.some(x=>{const C=x.toLowerCase();return C.startsWith(".")?p===C:i===C})},Rt=(t,e)=>Bt(t,e)?{isValid:!0}:{isValid:!1,errorMessage:`${t.type||"This type of"} files are not allowed.`},ot=t=>{switch(t){case y.None:return"a file";case y.Single:return"a file";case y.Multiple:return"files";case y.Directory:return"a directory";default:return _(t),"a file"}},Lt=g("div",{target:"e3id6jz12"})(({theme:t,height:e})=>({backgroundColor:t.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${t.sizes.emptyDropdownHeight}, ${e})`,width:"100%",zIndex:t.zIndices.priority}),""),Ht=g("div",{target:"e3id6jz11"})(({theme:t,height:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.primary,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,color:t.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:e,width:"100%",fontWeight:t.fontWeights.bold}),""),Vt=g("div",{target:"e3id6jz10"})(({theme:t,disabled:e})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${t.sizes.borderWidth}`,cursor:e?"not-allowed":"auto"}),""),kt=g("div",{target:"e3id6jz9"})(({disabled:t})=>({pointerEvents:t?"none":"auto"}),""),Mt=g("div",{target:"e3id6jz8"})(({theme:t})=>({marginTop:"0.625em",marginLeft:t.spacing.sm,height:t.spacing.xl,width:t.sizes.borderWidth,backgroundColor:t.colors.fadedText20}),""),Wt=g("div",{target:"e3id6jz7"})(({theme:t})=>({left:0,right:0,lineHeight:t.lineHeights.tight,paddingLeft:t.spacing.sm,paddingRight:t.spacing.sm,overflowX:"auto"}),""),$t=g("div",{target:"e3id6jz6"})({name:"zjik7",styles:"display:flex"}),Nt=g("div",{target:"e3id6jz5"})({name:"ou8xsw",styles:"flex:0 0 auto"}),At=g("div",{target:"e3id6jz4"})(({theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.sm,gap:t.spacing.twoXS}),""),Pt=g("div",{target:"e3id6jz3"})(({theme:t})=>({color:t.colors.fadedText60}),""),Kt=g("div",{target:"e3id6jz2"})(({theme:t,fileStatus:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.type==="uploaded"?t.colors.bodyText:t.colors.fadedText60}),""),Ot=g("div",{target:"e3id6jz1"})(({theme:t})=>({marginRight:t.spacing.md,color:t.colors.fadedText60}),""),Xt=g("small",{target:"e3id6jz0"})(({theme:t})=>({display:"flex",alignItems:"center",maxHeight:t.sizes.smallElementHeight,color:t.colors.fadedText60,"& :hover":{color:t.colors.bodyText}}),""),_t=({getRootProps:t,getInputProps:e,acceptFile:n,disabled:a,theme:p})=>{const i=et(e(),n);return o.jsxs(Vt,{disabled:a,children:[o.jsxs(kt,{"data-testid":"stChatInputFileUploadButton",disabled:a,...t(),children:[o.jsx("input",{...i}),o.jsx(ct,{content:`Upload or drag and drop ${ot(n)}`,placement:Y.TOP,onMouseEnterDelay:500,children:o.jsx(q,{kind:G.MINIMAL,disabled:a,children:o.jsx(E,{content:Z,size:"lg",color:a?p.colors.fadedText40:p.colors.fadedText60})})})]}),o.jsx(Mt,{})]})},Yt=c.memo(_t),qt=({getRootProps:t,getInputProps:e,acceptFile:n,inputHeight:a})=>{const p=et(e(),n);return o.jsxs(o.Fragment,{children:[o.jsx(Lt,{height:a,...t(),children:o.jsx("input",{...p})}),o.jsx(Ht,{height:a,children:`Drag and drop ${ot(n)} here`})]})},Gt=c.memo(qt);function Jt({children:t,content:e}){const n=k();return o.jsx(pt,{content:e,placement:Y.TOP,overrides:{Body:{style:{top:`-${n.sizes.minElementHeight}`}}},children:t})}const Qt=({fileInfo:t})=>{const e=k(),{type:n}=t.status;switch(n){case"uploading":return o.jsx(ut,{"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return o.jsx(Jt,{content:t.status.errorMessage,children:o.jsx(E,{color:e.colors.redTextColor,content:Tt,size:"lg"})});case"uploaded":return o.jsx(E,{content:wt,size:"lg"});default:return _(n),null}},Zt=({fileInfo:t,onDelete:e})=>o.jsxs(At,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[o.jsx(Pt,{children:o.jsx(Qt,{fileInfo:t})}),o.jsx(Kt,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:t.name,fileStatus:t.status,children:t.name}),o.jsx(Ot,{children:bt(t.size,V.Byte)}),o.jsx(Xt,{"data-testid":"stChatInputDeleteBtn",children:o.jsx(q,{onClick:()=>e(t.id),kind:G.MINIMAL,children:o.jsx(E,{content:It,size:"lg"})})})]}),te=c.memo(Zt),ee=({items:t,onDelete:e})=>o.jsx(Wt,{"data-testid":"stChatUploadedFiles",children:o.jsx($t,{children:t.map(n=>o.jsx(Nt,{children:o.jsx(te,{fileInfo:n,onDelete:e})},n.id))})}),oe=c.memo(ee),ne=(t,e)=>{const n=[],a=[];return t.forEach(p=>{const i=Rt(p,e.fileType);i.isValid?n.push(p):a.push({file:p,errors:[{code:J.FileInvalidType,message:i.errorMessage||"File type not allowed."}]})}),{accepted:n,rejected:a}},re=({acceptMultipleFiles:t,acceptDirectoryFiles:e,maxFileSize:n,uploadClient:a,uploadFile:p,addFiles:i,getNextLocalFileId:x,deleteExistingFiles:C,onUploadComplete:w,element:b})=>(f,h)=>{if(e&&f.length>0){const{accepted:u,rejected:m}=ne(f,b);f=u,h=[...h,...m]}if(!t&&f.length===0&&h.length>1){const u=h.findIndex(m=>m.errors?.[0].code===J.TooManyFiles);u>=0&&(f.push(h[u].file),h.splice(u,1))}if(!t&&f.length>0&&C(),a.fetchFileURLs(f).then(u=>{gt(u,f).forEach(([m,v])=>{p(m,v)})}).catch(u=>{i(f.map(m=>new Q(m.name,m.size,x(),{type:"error",errorMessage:u})))}),h.length>0){const u=h.map(m=>vt(m,x(),n));i(u)}w()},se=({getNextLocalFileId:t,addFiles:e,updateFile:n,uploadClient:a,element:p,onUploadProgress:i,onUploadComplete:x})=>(C,w)=>{const b=w.webkitRelativePath||w.name,f=new AbortController,h=new Q(b,w.size,t(),{type:"uploading",abortController:f,progress:1});e([h]),a.uploadFile({formId:"",...p},C.uploadUrl,w,u=>i(u,h.id),f.signal).then(()=>x(h.id,C)).catch(u=>{u instanceof DOMException&&u.name==="AbortError"||n(h.id,h.setStatus({type:"error",errorMessage:u?u.toString():"Unknown error"}))})},ae=g("div",{target:"e1d2x3se4"})({name:"1nibcdy",styles:"border:none;position:relative;display:flex"}),ie=g("div",{target:"e1d2x3se3"})(({theme:t,extended:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.widgetBorderColor??t.colors.transparent,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:t.spacing.lg,maxHeight:e?"none":t.sizes.minElementHeight,gap:t.spacing.sm,overflow:"hidden",":focus-within":{borderColor:t.colors.primary}}),""),le=g("button",{target:"e1d2x3se2"})(({theme:t,disabled:e,extended:n})=>{const a=ht(t),[p,i]=a?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:n?"0":t.radii.chatInput,borderTopLeftRadius:n?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:e?p:i,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:a?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.gray60,cursor:"not-allowed"}}},""),de=g("div",{target:"e1d2x3se1"})(({theme:t})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${t.sizes.borderWidth}`,pointerEvents:"none"}),""),ce=g("div",{target:"e1d2x3se0"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`}),""),L=(t,e,n)=>n.map(a=>a.id===t?e:a),H=(t,e)=>e.find(n=>n.id===t);function pe({disabled:t,element:e,widgetMgr:n,fragmentId:a,uploadClient:p}){const i=k(),{placeholder:x,maxChars:C}=e,w=c.useRef(0),b=c.useRef(null),{width:f,elementRef:h}=ft(),{innerWidth:u,innerHeight:m}=xt(),[v,D]=c.useState(e.default),[z,S]=c.useState([]),[F,T]=c.useState(!1),j=Ut({textareaRef:b,dependencies:[x]}),B=c.useMemo(()=>z.some(r=>r.status.type==="uploading")?!1:v!==""||z.length>0,[z,v]),I=mt(e.acceptFile),M=jt(e.maxUploadSizeMb,V.Megabyte,V.Byte),W=c.useCallback(r=>S(l=>[...l,...r]),[]),$=c.useCallback(r=>{S(l=>{const d=H(r,l);return R(d)?l:(d.status.type==="uploading"&&d.status.abortController.abort(),d.status.type==="uploaded"&&d.status.fileUrls.deleteUrl&&p.deleteFile(d.status.fileUrls.deleteUrl),l.filter(s=>s.id!==r))})},[p]),nt=()=>{const r=z.filter(l=>l.status.type==="uploaded").map(l=>{const{name:d,size:s,status:U}=l,{fileId:lt,fileUrls:dt}=U;return new yt({fileId:lt,fileUrls:dt,name:d,size:s})});return new Ct({uploadedFileInfo:r})},N=()=>w.current++,rt=re({acceptMultipleFiles:I===y.Multiple||I===y.Directory,acceptDirectoryFiles:I===y.Directory,maxFileSize:M,uploadClient:p,uploadFile:se({getNextLocalFileId:N,addFiles:W,updateFile:(r,l)=>{S(d=>L(r,l,d))},uploadClient:p,element:e,onUploadProgress:(r,l)=>{S(d=>{const s=H(l,d);if(R(s)||s.status.type!=="uploading")return d;const U=Math.round(r.loaded*100/r.total);return s.status.progress===U?d:L(l,s.setStatus({type:"uploading",abortController:s.status.abortController,progress:U}),d)})},onUploadComplete:(r,l)=>{S(d=>{const s=H(r,d);return R(s)||s.status.type!=="uploading"?d:L(s.id,s.setStatus({type:"uploaded",fileId:l.fileId,fileUrls:l}),d)})}}),addFiles:W,getNextLocalFileId:N,deleteExistingFiles:()=>z.forEach(r=>$(r.id)),onUploadComplete:()=>{b.current&&b.current.focus()},element:e}),{getRootProps:A,getInputProps:P}=zt({onDrop:rt,multiple:I===y.Multiple||I===y.Directory,accept:St(e.fileType),maxSize:M}),K=()=>{if(b.current&&b.current.focus(),!B||t)return;const r={data:v,fileUploaderState:nt()};n.setChatInputValue(e,r,{fromUi:!0},a),S([]),D(""),j.clearScrollHeight()},st=r=>{const{metaKey:l,ctrlKey:d,shiftKey:s}=r;Dt(r)&&!s&&!d&&!l&&(r.preventDefault(),K())},at=r=>{const{value:l}=r.target;C!==0&&l.length>C||(D(l),j.updateScrollHeight())};c.useEffect(()=>{if(e.setValue){e.setValue=!1;const r=e.value||"";D(r)}},[e]),c.useEffect(()=>{const r=s=>{s.preventDefault(),s.stopPropagation(),!F&&s.dataTransfer?.types.includes("Files")&&T(!0)},l=s=>{s.preventDefault(),s.stopPropagation(),F&&(s.clientX<=0&&s.clientY<=0||s.clientX>=u&&s.clientY>=m)&&T(!1)},d=s=>{s.preventDefault(),s.stopPropagation(),F&&T(!1)};return window.addEventListener("dragover",r),window.addEventListener("drop",d),window.addEventListener("dragleave",l),()=>{window.removeEventListener("dragover",r),window.removeEventListener("drop",d),window.removeEventListener("dragleave",l)}},[F,u,m]);const it=I!==y.None&&F;return o.jsxs(o.Fragment,{children:[I===y.None?null:o.jsx(oe,{items:[...z],onDelete:$}),o.jsx(ae,{className:"stChatInput","data-testid":"stChatInput",ref:h,children:it?o.jsx(Gt,{getRootProps:A,getInputProps:P,acceptFile:I,inputHeight:j.height}):o.jsxs(ie,{extended:j.isExtended,children:[I===y.None?null:o.jsx(Yt,{getRootProps:A,getInputProps:P,acceptFile:I,disabled:t,theme:i}),o.jsx(Et,{inputRef:b,value:v,placeholder:x,onChange:at,onKeyDown:st,"aria-label":x,disabled:t,rows:1,overrides:{Root:{style:{minHeight:i.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0",borderTopLeftRadius:"0",borderTopRightRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{fontWeight:i.fontWeights.normal,lineHeight:i.lineHeights.inputWidget,"::placeholder":{color:i.colors.fadedText60},height:j.height,maxHeight:j.maxHeight,paddingLeft:i.spacing.none,paddingBottom:i.spacing.sm,paddingTop:i.spacing.sm,paddingRight:`calc(${i.iconSizes.xl} + 2 * ${i.spacing.sm} + ${i.spacing.sm})`}}}}),f>i.breakpoints.hideWidgetDetails&&o.jsx(ce,{children:o.jsx(Ft,{dirty:B,value:v,maxLength:C,type:"chat",inForm:!1})}),o.jsx(de,{children:o.jsx(le,{onClick:K,disabled:!B||t,extended:j.isExtended,"data-testid":"stChatInputSubmitButton",children:o.jsx(E,{content:tt,size:"xl",color:"inherit"})})})]})})]})}const be=c.memo(pe);export{be as default};
@@ -1 +1 @@
1
- import{r as l,B as s,j as e,a as u,b as d,c,d as B,D as m}from"./index-wnKDraWU.js";function p(n){const{disabled:i,element:t,widgetMgr:o,fragmentId:r}=n;let a=s.SECONDARY;return t.type==="primary"?a=s.PRIMARY:t.type==="tertiary"&&(a=s.TERTIARY),e.jsx(u,{className:"stButton","data-testid":"stButton",children:e.jsx(d,{help:t.help,containerWidth:!0,children:e.jsx(c,{kind:a,size:B.SMALL,disabled:i,containerWidth:!0,onClick:()=>o.setTriggerValue(t,{fromUi:!0},r),children:e.jsx(m,{icon:t.icon,label:t.label})})})})}const f=l.memo(p);export{f as default};
1
+ import{r as l,B as s,j as e,a as u,b as d,c,d as B,D as m}from"./index-k4Zz_A0O.js";function p(n){const{disabled:i,element:t,widgetMgr:o,fragmentId:r}=n;let a=s.SECONDARY;return t.type==="primary"?a=s.PRIMARY:t.type==="tertiary"&&(a=s.TERTIARY),e.jsx(u,{className:"stButton","data-testid":"stButton",children:e.jsx(d,{help:t.help,containerWidth:!0,children:e.jsx(c,{kind:a,size:B.SMALL,disabled:i,containerWidth:!0,onClick:()=>o.setTriggerValue(t,{fromUi:!0},r),children:e.jsx(m,{icon:t.icon,label:t.label})})})})}const f=l.memo(p);export{f as default};
@@ -1 +1 @@
1
- import{s as l,aa as t,t as x,d as s,r as b,B as n,j as i,a as v,b as B,D as k}from"./index-wnKDraWU.js";function C(o,r){switch(o){case s.XSMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.sm}`,fontSize:r.fontSizes.sm};case s.SMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.md}`};case s.LARGE:return{padding:`${r.spacing.md} ${r.spacing.md}`};default:return{padding:`${r.spacing.xs} ${r.spacing.md}`}}}const u=l("a",{target:"e16zdaao3"})(({containerWidth:o,size:r,theme:a})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:a.fontWeights.normal,padding:`${a.spacing.xs} ${a.spacing.md}`,borderRadius:a.radii.button,minHeight:a.sizes.minElementHeight,margin:0,lineHeight:a.lineHeights.base,color:a.colors.primary,textDecoration:"none",width:o?"100%":"auto",userSelect:"none","&:visited":{color:a.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${x(a.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...C(r,a)}),""),S=l(u,{target:"e16zdaao2"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover, &:focus-visible":{backgroundColor:t(o.colors.primary,.15),borderColor:t(o.colors.primary,.15)},"&:active":{backgroundColor:o.colors.primary,borderColor:t(o.colors.primary,.15)},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),""),L=l(u,{target:"e16zdaao1"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover, &:focus-visible":{backgroundColor:o.colors.darkenedBgMix15},"&:active":{backgroundColor:o.colors.darkenedBgMix25},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),""),$=l(u,{target:"e16zdaao0"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover, &:focus-visible":{color:o.colors.primary},"&:hover:not([disabled]), &:focus-visible:not([disabled])":{"span.stMarkdownColoredText":{color:"inherit !important"}},"&:active":{color:t(o.colors.primary,.25)},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),"");function T({kind:o,size:r,disabled:a,children:d,autoFocus:e,href:p,rel:g,target:f,onClick:y}){let c=S;return o===n.SECONDARY?c=L:o===n.TERTIARY&&(c=$),i.jsx(c,{kind:o,size:r||s.MEDIUM,containerWidth:!0,disabled:a||!1,autoFocus:e||!1,href:p,target:f,rel:g,onClick:y,tabIndex:a?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:d})}const z=b.memo(T);function w(o){const{element:r}=o;let a=n.SECONDARY;r.type==="primary"?a=n.PRIMARY:r.type==="tertiary"&&(a=n.TERTIARY);const d=e=>{r.disabled&&e.preventDefault()};return i.jsx(v,{className:"stLinkButton","data-testid":"stLinkButton",children:i.jsx(B,{help:r.help,containerWidth:!0,children:i.jsx(z,{kind:a,size:s.SMALL,disabled:r.disabled,onClick:d,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":r.disabled,children:i.jsx(k,{icon:r.icon,label:r.label})})})})}const A=b.memo(w);export{A as default};
1
+ import{s as l,aa as t,t as x,d as s,r as b,B as n,j as i,a as v,b as B,D as k}from"./index-k4Zz_A0O.js";function C(o,r){switch(o){case s.XSMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.sm}`,fontSize:r.fontSizes.sm};case s.SMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.md}`};case s.LARGE:return{padding:`${r.spacing.md} ${r.spacing.md}`};default:return{padding:`${r.spacing.xs} ${r.spacing.md}`}}}const u=l("a",{target:"e16zdaao3"})(({containerWidth:o,size:r,theme:a})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:a.fontWeights.normal,padding:`${a.spacing.xs} ${a.spacing.md}`,borderRadius:a.radii.button,minHeight:a.sizes.minElementHeight,margin:0,lineHeight:a.lineHeights.base,color:a.colors.primary,textDecoration:"none",width:o?"100%":"auto",userSelect:"none","&:visited":{color:a.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${x(a.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...C(r,a)}),""),S=l(u,{target:"e16zdaao2"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover, &:focus-visible":{backgroundColor:t(o.colors.primary,.15),borderColor:t(o.colors.primary,.15)},"&:active":{backgroundColor:o.colors.primary,borderColor:t(o.colors.primary,.15)},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),""),L=l(u,{target:"e16zdaao1"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover, &:focus-visible":{backgroundColor:o.colors.darkenedBgMix15},"&:active":{backgroundColor:o.colors.darkenedBgMix25},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),""),$=l(u,{target:"e16zdaao0"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover, &:focus-visible":{color:o.colors.primary},"&:hover:not([disabled]), &:focus-visible:not([disabled])":{"span.stMarkdownColoredText":{color:"inherit !important"}},"&:active":{color:t(o.colors.primary,.25)},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),"");function T({kind:o,size:r,disabled:a,children:d,autoFocus:e,href:p,rel:g,target:f,onClick:y}){let c=S;return o===n.SECONDARY?c=L:o===n.TERTIARY&&(c=$),i.jsx(c,{kind:o,size:r||s.MEDIUM,containerWidth:!0,disabled:a||!1,autoFocus:e||!1,href:p,target:f,rel:g,onClick:y,tabIndex:a?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:d})}const z=b.memo(T);function w(o){const{element:r}=o;let a=n.SECONDARY;r.type==="primary"?a=n.PRIMARY:r.type==="tertiary"&&(a=n.TERTIARY);const d=e=>{r.disabled&&e.preventDefault()};return i.jsx(v,{className:"stLinkButton","data-testid":"stLinkButton",children:i.jsx(B,{help:r.help,containerWidth:!0,children:i.jsx(z,{kind:a,size:s.SMALL,disabled:r.disabled,onClick:d,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":r.disabled,children:i.jsx(k,{icon:r.icon,label:r.label})})})})}const A=b.memo(w);export{A as default};
@@ -1 +1 @@
1
- import{s as p,r as i,v as y,w as T,j as f,x}from"./index-wnKDraWU.js";const h=p("div",{target:"exyuj7n1"})(()=>({lineHeight:0}),""),L=p("audio",{target:"exyuj7n0"})(({theme:r})=>({width:"100%",height:r.sizes.minElementHeight,margin:0,padding:0}),""),S=x.getLogger("Audio");function j({element:r,endpoints:a,elementMgr:d}){const o=i.useRef(null),{startTime:n,endTime:s,loop:u,autoplay:E}=r,m=i.useMemo(()=>{if(!r.id)return!0;const e=d.getElementState(r.id,"preventAutoplay");return e||d.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,d]);i.useEffect(()=>{o.current&&(o.current.currentTime=n)},[n]),i.useEffect(()=>{const e=o.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),i.useEffect(()=>{const e=o.current;if(!e)return;let t=!1;const l=()=>{s>0&&e.currentTime>=s&&(u?(e.currentTime=n||0,e.play()):t||(t=!0,e.pause()))};return s>0&&e.addEventListener("timeupdate",l),()=>{e&&s>0&&e.removeEventListener("timeupdate",l)}},[s,u,n]),i.useEffect(()=>{const e=o.current;if(!e)return;const t=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[u,n]);const c=y(r.url),A=T(c),v=a.buildMediaURL(c),g=e=>{const t=e.currentTarget.src;S.error(`Client Error: Audio source error - ${t}`),a.sendClientErrorToHost("Audio","Audio source failed to load","onerror triggered",t)};return f.jsx(h,{children:f.jsx(L,{className:"stAudio","data-testid":"stAudio",ref:o,controls:!0,autoPlay:E&&!m,src:v,onError:g,crossOrigin:A})})}const C=i.memo(j);export{C as default};
1
+ import{s as p,r as i,v as y,w as T,j as f,x}from"./index-k4Zz_A0O.js";const h=p("div",{target:"exyuj7n1"})(()=>({lineHeight:0}),""),L=p("audio",{target:"exyuj7n0"})(({theme:r})=>({width:"100%",height:r.sizes.minElementHeight,margin:0,padding:0}),""),S=x.getLogger("Audio");function j({element:r,endpoints:a,elementMgr:d}){const o=i.useRef(null),{startTime:n,endTime:s,loop:u,autoplay:E}=r,m=i.useMemo(()=>{if(!r.id)return!0;const e=d.getElementState(r.id,"preventAutoplay");return e||d.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,d]);i.useEffect(()=>{o.current&&(o.current.currentTime=n)},[n]),i.useEffect(()=>{const e=o.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),i.useEffect(()=>{const e=o.current;if(!e)return;let t=!1;const l=()=>{s>0&&e.currentTime>=s&&(u?(e.currentTime=n||0,e.play()):t||(t=!0,e.pause()))};return s>0&&e.addEventListener("timeupdate",l),()=>{e&&s>0&&e.removeEventListener("timeupdate",l)}},[s,u,n]),i.useEffect(()=>{const e=o.current;if(!e)return;const t=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[u,n]);const c=y(r.url),A=T(c),v=a.buildMediaURL(c),g=e=>{const t=e.currentTarget.src;S.error(`Client Error: Audio source error - ${t}`),a.sendClientErrorToHost("Audio","Audio source failed to load","onerror triggered",t)};return f.jsx(h,{children:f.jsx(L,{className:"stAudio","data-testid":"stAudio",ref:o,controls:!0,autoPlay:E&&!m,src:v,onError:g,crossOrigin:A})})}const C=i.memo(j);export{C as default};
@@ -1 +1 @@
1
- import{s as e,r as t,j as r,f as a}from"./index-wnKDraWU.js";import{P as o}from"./ProgressBar-DX8k7XSZ.js";const i=e("div",{target:"e18r7x300"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal"}),"");function l({element:s}){return r.jsxs("div",{className:"stProgress","data-testid":"stProgress",children:[r.jsx(i,{children:r.jsx(a,{source:s.text,allowHTML:!1,isLabel:!0})}),r.jsx(o,{value:s.value})]})}const m=t.memo(l);export{m as default};
1
+ import{s as e,r as t,j as r,f as a}from"./index-k4Zz_A0O.js";import{P as o}from"./ProgressBar-CUUN2Jn1.js";const i=e("div",{target:"e18r7x300"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal"}),"");function l({element:s}){return r.jsxs("div",{className:"stProgress","data-testid":"stProgress",children:[r.jsx(i,{children:r.jsx(a,{source:s.text,allowHTML:!1,isLabel:!0})}),r.jsx(o,{value:s.value})]})}const m=t.memo(l);export{m as default};
@@ -1 +1 @@
1
- import{s as c,r as a,j as r,ag as p,ah as x,f as g}from"./index-wnKDraWU.js";const f=c("div",{target:"e1se5lgy3"})(({theme:e,cache:n})=>({...n?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null}),""),S=c("div",{target:"e1se5lgy2"})({name:"1x17g94",styles:"display:flex;align-items:center;width:100%"}),T=c("div",{target:"e1se5lgy1"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"baseline"}),""),$=c("div",{target:"e1se5lgy0"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm}),""),y=e=>{const n=Math.floor(e/3600),t=Math.floor(e%3600/60),s=e%60;if(n===0&&t===0)return`(${s.toFixed(1)} seconds)`;if(n===0){const d=`${t} minute${t===1?"":"s"}`,m=s===0?"":`, ${s.toFixed(1)} seconds`;return`(${d}${m})`}const l=`${n} hour${n===1?"":"s"}`,i=t===0?"":`, ${t} minute${t===1?"":"s"}`,o=s===0?"":`, ${s.toFixed(1)} seconds`;return`(${l}${i}${o})`};function h({element:e}){const{cache:n,showTime:t}=e,[s,l]=a.useState(0),i=a.useRef(null);return a.useEffect(()=>{if(!t)return;i.current=Date.now();const o=()=>{if(i.current!==null){const u=(Date.now()-i.current)/1e3;l(u)}};o();const d=setInterval(o,100);return()=>clearInterval(d)},[t]),r.jsx(f,{className:p({stSpinner:!0,stCacheSpinner:n}),"data-testid":"stSpinner",cache:n,children:r.jsxs(S,{children:[r.jsx(x,{size:"base",margin:"0 md 0 0",padding:"0"}),r.jsxs(T,{children:[r.jsx(g,{source:e.text,allowHTML:!1}),t&&r.jsx($,{children:y(s)})]})]})})}const b=a.memo(h);export{b as default};
1
+ import{s as c,r as a,j as r,ag as p,ah as x,f as g}from"./index-k4Zz_A0O.js";const f=c("div",{target:"e1se5lgy3"})(({theme:e,cache:n})=>({...n?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null}),""),S=c("div",{target:"e1se5lgy2"})({name:"1x17g94",styles:"display:flex;align-items:center;width:100%"}),T=c("div",{target:"e1se5lgy1"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"baseline"}),""),$=c("div",{target:"e1se5lgy0"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm}),""),y=e=>{const n=Math.floor(e/3600),t=Math.floor(e%3600/60),s=e%60;if(n===0&&t===0)return`(${s.toFixed(1)} seconds)`;if(n===0){const d=`${t} minute${t===1?"":"s"}`,m=s===0?"":`, ${s.toFixed(1)} seconds`;return`(${d}${m})`}const l=`${n} hour${n===1?"":"s"}`,i=t===0?"":`, ${t} minute${t===1?"":"s"}`,o=s===0?"":`, ${s.toFixed(1)} seconds`;return`(${l}${i}${o})`};function h({element:e}){const{cache:n,showTime:t}=e,[s,l]=a.useState(0),i=a.useRef(null);return a.useEffect(()=>{if(!t)return;i.current=Date.now();const o=()=>{if(i.current!==null){const u=(Date.now()-i.current)/1e3;l(u)}};o();const d=setInterval(o,100);return()=>clearInterval(d)},[t]),r.jsx(f,{className:p({stSpinner:!0,stCacheSpinner:n}),"data-testid":"stSpinner",cache:n,children:r.jsxs(S,{children:[r.jsx(x,{size:"base",margin:"0 md 0 0",padding:"0"}),r.jsxs(T,{children:[r.jsx(g,{source:e.text,allowHTML:!1}),t&&r.jsx($,{children:y(s)})]})]})})}const b=a.memo(h);export{b as default};
@@ -1 +1 @@
1
- import{r as u,L as A,B as x,ab as R,j as d,b as y,c as C,d as _,D as T}from"./index-wnKDraWU.js";import{c as D}from"./createDownloadLinkElement-ZaXNnPK4.js";const B=/%([0-9A-Fa-f]{2})/g,L=/[^\x20-\x7e\xa0-\xff]/g,k=/\\([\u0000-\u007f])/g,E=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,v=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,I=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/,P=o=>String(o).replace(L,"?");class S{constructor(e,t){this.type=e,this.parameters=t}}const U=(o,e)=>String.fromCharCode(Number.parseInt(e,16));function z(o){const e=v.exec(o);if(!e)throw new TypeError("invalid extended field value");const t=e[1].toLowerCase(),a=e[2];let n;switch(t){case"iso-8859-1":n=P(a.replace(B,U));break;case"utf-8":try{n=decodeURIComponent(a)}catch{throw new TypeError("invalid encoded utf-8")}break;default:throw new TypeError("unsupported charset in extended field")}return n}function $(o){let e=I.exec(o);if(!e)throw new TypeError("invalid type format");let t=e[0].length;const a=e[1].toLowerCase();let n;const l=[],i={};let r;for(t=E.lastIndex=e[0].slice(-1)===";"?t-1:t;e=E.exec(o);){if(e.index!==t)throw new TypeError("invalid parameter format");if(t+=e[0].length,n=e[1].toLowerCase(),r=e[2],l.indexOf(n)!==-1)throw new TypeError("invalid duplicate parameter");if(l.push(n),n.indexOf("*")+1===n.length){n=n.slice(0,-1),r=z(r),i[n]=r;continue}typeof i[n]!="string"&&(r[0]==='"'&&(r=r.slice(1,r.length-1).replace(k,"$1")),i[n]=r)}if(t!==-1&&t!==o.length)throw new TypeError("invalid parameter format");return new S(a,i)}function j(o){const e=$(o);if(e.type!=="attachment")return;const t=e.parameters.filename;if(typeof t=="string")return t}function N(o,e){o.sendHttpRequest({method:"GET",path:`${e}?title=${encodeURIComponent(document.title)}`,headers:{},body:""}).then(({statusCode:t,headers:a,body:n})=>{if(t!==200)return;const l=a.get("Content-Disposition"),i=(l&&j(l))??"",r=a.get("Content-Type"),f=new Blob([n],r?{type:r}:void 0),c=URL.createObjectURL(f),s=document.createElement("a");s.setAttribute("href",c),s.setAttribute("target","_blank"),s.setAttribute("download",i),s.click(),URL.revokeObjectURL(c),s.remove()})}function O(o){const{disabled:e,element:t,widgetMgr:a,endpoints:n,fragmentId:l}=o,{help:i,label:r,icon:f,ignoreRerun:c,type:s,url:w}=t,{libConfig:{enforceDownloadInNewTab:h=!1}}=u.useContext(A);let p=x.SECONDARY;s==="primary"?p=x.PRIMARY:s==="tertiary"&&(p=x.TERTIARY);const m=u.useMemo(()=>n.buildDownloadUrl(w),[n,w]);u.useEffect(()=>{n.checkSourceUrlResponse(m,"Download Button")},[m,n]);const g=R(),b=()=>{if(c||a.setTriggerValue(t,{fromUi:!0},l),t.url.startsWith("/media")){N(g,t.url);return}D({filename:"",url:m,enforceDownloadInNewTab:h}).click()};return d.jsx("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:d.jsx(y,{help:i,containerWidth:!0,children:d.jsx(C,{kind:p,size:_.SMALL,disabled:e,onClick:b,containerWidth:!0,children:d.jsx(T,{icon:f,label:r})})})})}const G=u.memo(O);export{G as default};
1
+ import{r as u,L as A,B as x,ab as R,j as d,b as y,c as C,d as _,D as T}from"./index-k4Zz_A0O.js";import{c as D}from"./createDownloadLinkElement-ZaXNnPK4.js";const B=/%([0-9A-Fa-f]{2})/g,L=/[^\x20-\x7e\xa0-\xff]/g,k=/\\([\u0000-\u007f])/g,E=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,v=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,I=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/,P=o=>String(o).replace(L,"?");class S{constructor(e,t){this.type=e,this.parameters=t}}const U=(o,e)=>String.fromCharCode(Number.parseInt(e,16));function z(o){const e=v.exec(o);if(!e)throw new TypeError("invalid extended field value");const t=e[1].toLowerCase(),a=e[2];let n;switch(t){case"iso-8859-1":n=P(a.replace(B,U));break;case"utf-8":try{n=decodeURIComponent(a)}catch{throw new TypeError("invalid encoded utf-8")}break;default:throw new TypeError("unsupported charset in extended field")}return n}function $(o){let e=I.exec(o);if(!e)throw new TypeError("invalid type format");let t=e[0].length;const a=e[1].toLowerCase();let n;const l=[],i={};let r;for(t=E.lastIndex=e[0].slice(-1)===";"?t-1:t;e=E.exec(o);){if(e.index!==t)throw new TypeError("invalid parameter format");if(t+=e[0].length,n=e[1].toLowerCase(),r=e[2],l.indexOf(n)!==-1)throw new TypeError("invalid duplicate parameter");if(l.push(n),n.indexOf("*")+1===n.length){n=n.slice(0,-1),r=z(r),i[n]=r;continue}typeof i[n]!="string"&&(r[0]==='"'&&(r=r.slice(1,r.length-1).replace(k,"$1")),i[n]=r)}if(t!==-1&&t!==o.length)throw new TypeError("invalid parameter format");return new S(a,i)}function j(o){const e=$(o);if(e.type!=="attachment")return;const t=e.parameters.filename;if(typeof t=="string")return t}function N(o,e){o.sendHttpRequest({method:"GET",path:`${e}?title=${encodeURIComponent(document.title)}`,headers:{},body:""}).then(({statusCode:t,headers:a,body:n})=>{if(t!==200)return;const l=a.get("Content-Disposition"),i=(l&&j(l))??"",r=a.get("Content-Type"),f=new Blob([n],r?{type:r}:void 0),c=URL.createObjectURL(f),s=document.createElement("a");s.setAttribute("href",c),s.setAttribute("target","_blank"),s.setAttribute("download",i),s.click(),URL.revokeObjectURL(c),s.remove()})}function O(o){const{disabled:e,element:t,widgetMgr:a,endpoints:n,fragmentId:l}=o,{help:i,label:r,icon:f,ignoreRerun:c,type:s,url:w}=t,{libConfig:{enforceDownloadInNewTab:h=!1}}=u.useContext(A);let p=x.SECONDARY;s==="primary"?p=x.PRIMARY:s==="tertiary"&&(p=x.TERTIARY);const m=u.useMemo(()=>n.buildDownloadUrl(w),[n,w]);u.useEffect(()=>{n.checkSourceUrlResponse(m,"Download Button")},[m,n]);const g=R(),b=()=>{if(c||a.setTriggerValue(t,{fromUi:!0},l),t.url.startsWith("/media")){N(g,t.url);return}D({filename:"",url:m,enforceDownloadInNewTab:h}).click()};return d.jsx("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:d.jsx(y,{help:i,containerWidth:!0,children:d.jsx(C,{kind:p,size:_.SMALL,disabled:e,onClick:b,containerWidth:!0,children:d.jsx(T,{icon:f,label:r})})})})}const G=u.memo(O);export{G as default};
@@ -1 +1 @@
1
- import{s as a,r as t,n as i,j as d,G as e,H as c,k as l}from"./index-wnKDraWU.js";const g=a("iframe",{target:"e1u6k47s0"})(({theme:o,disableScrolling:r})=>({width:"100%",height:"100%",colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:r?"hidden":void 0}),"");function s(o){return l(o)||o===""?void 0:o}function m({element:o}){const r=s(o.src),n=i(r)?void 0:s(o.srcdoc);return d.jsx(g,{className:"stIFrame","data-testid":"stIFrame",allow:c,disableScrolling:!o.scrolling,src:r,srcDoc:n,scrolling:o.scrolling?"auto":"no",sandbox:e,title:"st.iframe",tabIndex:o.tabIndex??void 0})}const I=t.memo(m);export{I as default};
1
+ import{s as a,r as t,n as i,j as d,G as e,H as c,k as l}from"./index-k4Zz_A0O.js";const g=a("iframe",{target:"e1u6k47s0"})(({theme:o,disableScrolling:r})=>({width:"100%",height:"100%",colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:r?"hidden":void 0}),"");function s(o){return l(o)||o===""?void 0:o}function m({element:o}){const r=s(o.src),n=i(r)?void 0:s(o.srcdoc);return d.jsx(g,{className:"stIFrame","data-testid":"stIFrame",allow:c,disableScrolling:!o.scrolling,src:r,srcDoc:n,scrolling:o.scrolling?"auto":"no",sandbox:e,title:"st.iframe",tabIndex:o.tabIndex??void 0})}const I=t.memo(m);export{I as default};
@@ -1,2 +1,2 @@
1
- import{s as $t,r as ht,j as Ne}from"./index-wnKDraWU.js";const{entries:St,setPrototypeOf:mt,isFrozen:qt,getPrototypeOf:Kt,getOwnPropertyDescriptor:Zt}=Object;let{freeze:S,seal:L,create:ke}=Object,{apply:ve,construct:Ue}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});L||(L=function(n){return n});ve||(ve=function(n,s){for(var r=arguments.length,c=new Array(r>2?r-2:0),b=2;b<r;b++)c[b-2]=arguments[b];return n.apply(s,c)});Ue||(Ue=function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),c=1;c<s;c++)r[c-1]=arguments[c];return new n(...r)});const ce=R(Array.prototype.forEach),Jt=R(Array.prototype.lastIndexOf),pt=R(Array.prototype.pop),q=R(Array.prototype.push),Qt=R(Array.prototype.splice),ue=R(String.prototype.toLowerCase),Ie=R(String.prototype.toString),Me=R(String.prototype.match),K=R(String.prototype.replace),en=R(String.prototype.indexOf),tn=R(String.prototype.trim),y=R(Object.prototype.hasOwnProperty),h=R(RegExp.prototype.test),Z=nn(TypeError);function R(a){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var s=arguments.length,r=new Array(s>1?s-1:0),c=1;c<s;c++)r[c-1]=arguments[c];return ve(a,n,r)}}function nn(a){return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return Ue(a,s)}}function l(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ue;mt&&mt(a,null);let r=n.length;for(;r--;){let c=n[r];if(typeof c=="string"){const b=s(c);b!==c&&(qt(n)||(n[r]=b),c=b)}a[c]=!0}return a}function on(a){for(let n=0;n<a.length;n++)y(a,n)||(a[n]=null);return a}function C(a){const n=ke(null);for(const[s,r]of St(a))y(a,s)&&(Array.isArray(r)?n[s]=on(r):r&&typeof r=="object"&&r.constructor===Object?n[s]=C(r):n[s]=r);return n}function J(a,n){for(;a!==null;){const r=Zt(a,n);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}a=Kt(a)}function s(){return null}return s}const dt=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ce=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),we=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),an=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),xe=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),rn=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tt=S(["#text"]),Et=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Pe=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),_t=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),fe=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sn=L(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=L(/<%[\w\W]*|[\w\W]*%>/gm),cn=L(/\$\{[\w\W]*/gm),fn=L(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=L(/^aria-[\-\w]+$/),Rt=L(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=L(/^(?:\w+script|data):/i),pn=L(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bt=L(/^html$/i),dn=L(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:pn,CUSTOM_ELEMENT:dn,DATA_ATTR:fn,DOCTYPE_NAME:bt,ERB_EXPR:ln,IS_ALLOWED_URI:Rt,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:sn,TMPLIT_EXPR:cn});const Q={element:1,text:3,progressingInstruction:7,comment:8,document:9},Tn=function(){return typeof window>"u"?null:window},En=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const c="data-tt-policy-suffix";s&&s.hasAttribute(c)&&(r=s.getAttribute(c));const b="dompurify"+(r?"#"+r:"");try{return n.createPolicy(b,{createHTML(P){return P},createScriptURL(P){return P}})}catch{return console.warn("TrustedTypes policy "+b+" could not be created."),null}},At=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ot(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tn();const n=i=>Ot(i);if(n.version="3.3.0",n.removed=[],!a||!a.document||a.document.nodeType!==Q.document||!a.Element)return n.isSupported=!1,n;let{document:s}=a;const r=s,c=r.currentScript,{DocumentFragment:b,HTMLTemplateElement:P,Node:me,Element:ze,NodeFilter:B,NamedNodeMap:Lt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:yt,DOMParser:Dt,trustedTypes:ee}=a,Y=ze.prototype,Nt=J(Y,"cloneNode"),It=J(Y,"remove"),Mt=J(Y,"nextSibling"),Ct=J(Y,"childNodes"),te=J(Y,"parentNode");if(typeof P=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let g,j="";const{implementation:pe,createNodeIterator:wt,createDocumentFragment:xt,getElementsByTagName:Pt}=s,{importNode:kt}=r;let A=At();n.isSupported=typeof St=="function"&&typeof te=="function"&&pe&&pe.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:de,ERB_EXPR:Te,TMPLIT_EXPR:Ee,DATA_ATTR:vt,ARIA_ATTR:Ut,IS_SCRIPT_OR_DATA:Ft,ATTR_WHITESPACE:Ge,CUSTOM_ELEMENT:Ht}=gt;let{IS_ALLOWED_URI:We}=gt,p=null;const Be=l({},[...dt,...Ce,...we,...xe,...Tt]);let T=null;const Ye=l({},[...Et,...Pe,..._t,...fe]);let u=Object.seal(ke(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,_e=null;const k=Object.seal(ke(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let je=!0,ge=!0,Xe=!1,Ve=!0,v=!1,ne=!0,w=!1,Ae=!1,he=!1,U=!1,oe=!1,ie=!1,$e=!0,qe=!1;const zt="user-content-";let Se=!0,V=!1,F={},H=null;const Ke=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ze=null;const Je=l({},["audio","video","img","source","image","track"]);let Re=null;const Qe=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ae="http://www.w3.org/1998/Math/MathML",re="http://www.w3.org/2000/svg",N="http://www.w3.org/1999/xhtml";let z=N,be=!1,Oe=null;const Gt=l({},[ae,re,N],Ie);let se=l({},["mi","mo","mn","ms","mtext"]),le=l({},["annotation-xml"]);const Wt=l({},["title","style","font","a","script"]);let $=null;const Bt=["application/xhtml+xml","text/html"],Yt="text/html";let d=null,G=null;const jt=s.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},Le=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(G&&G===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),$=Bt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Yt:e.PARSER_MEDIA_TYPE,d=$==="application/xhtml+xml"?Ie:ue,p=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,d):Be,T=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,d):Ye,Oe=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Ie):Gt,Re=y(e,"ADD_URI_SAFE_ATTR")?l(C(Qe),e.ADD_URI_SAFE_ATTR,d):Qe,Ze=y(e,"ADD_DATA_URI_TAGS")?l(C(Je),e.ADD_DATA_URI_TAGS,d):Je,H=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,d):Ke,X=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,d):C({}),_e=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,d):C({}),F=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,je=e.ALLOW_ARIA_ATTR!==!1,ge=e.ALLOW_DATA_ATTR!==!1,Xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ve=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,v=e.SAFE_FOR_TEMPLATES||!1,ne=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,U=e.RETURN_DOM||!1,oe=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,$e=e.SANITIZE_DOM!==!1,qe=e.SANITIZE_NAMED_PROPS||!1,Se=e.KEEP_CONTENT!==!1,V=e.IN_PLACE||!1,We=e.ALLOWED_URI_REGEXP||Rt,z=e.NAMESPACE||N,se=e.MATHML_TEXT_INTEGRATION_POINTS||se,le=e.HTML_INTEGRATION_POINTS||le,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),v&&(ge=!1),oe&&(U=!0),F&&(p=l({},Tt),T=[],F.html===!0&&(l(p,dt),l(T,Et)),F.svg===!0&&(l(p,Ce),l(T,Pe),l(T,fe)),F.svgFilters===!0&&(l(p,we),l(T,Pe),l(T,fe)),F.mathMl===!0&&(l(p,xe),l(T,_t),l(T,fe))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?k.tagCheck=e.ADD_TAGS:(p===Be&&(p=C(p)),l(p,e.ADD_TAGS,d))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?k.attributeCheck=e.ADD_ATTR:(T===Ye&&(T=C(T)),l(T,e.ADD_ATTR,d))),e.ADD_URI_SAFE_ATTR&&l(Re,e.ADD_URI_SAFE_ATTR,d),e.FORBID_CONTENTS&&(H===Ke&&(H=C(H)),l(H,e.FORBID_CONTENTS,d)),Se&&(p["#text"]=!0),w&&l(p,["html","head","body"]),p.table&&(l(p,["tbody"]),delete X.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,j=g.createHTML("")}else g===void 0&&(g=En(ee,c)),g!==null&&typeof j=="string"&&(j=g.createHTML(""));S&&S(e),G=e}},tt=l({},[...Ce,...we,...an]),nt=l({},[...xe,...rn]),Xt=function(e){let t=te(e);(!t||!t.tagName)&&(t={namespaceURI:z,tagName:"template"});const o=ue(e.tagName),f=ue(t.tagName);return Oe[e.namespaceURI]?e.namespaceURI===re?t.namespaceURI===N?o==="svg":t.namespaceURI===ae?o==="svg"&&(f==="annotation-xml"||se[f]):!!tt[o]:e.namespaceURI===ae?t.namespaceURI===N?o==="math":t.namespaceURI===re?o==="math"&&le[f]:!!nt[o]:e.namespaceURI===N?t.namespaceURI===re&&!le[f]||t.namespaceURI===ae&&!se[f]?!1:!nt[o]&&(Wt[o]||!tt[o]):!!($==="application/xhtml+xml"&&Oe[e.namespaceURI]):!1},D=function(e){q(n.removed,{element:e});try{te(e).removeChild(e)}catch{It(e)}},x=function(e,t){try{q(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{q(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(U||oe)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},ot=function(e){let t=null,o=null;if(he)e="<remove></remove>"+e;else{const m=Me(e,/^[\r\n\t ]+/);o=m&&m[0]}$==="application/xhtml+xml"&&z===N&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const f=g?g.createHTML(e):e;if(z===N)try{t=new Dt().parseFromString(f,$)}catch{}if(!t||!t.documentElement){t=pe.createDocument(z,"template",null);try{t.documentElement.innerHTML=be?j:f}catch{}}const _=t.body||t.documentElement;return e&&o&&_.insertBefore(s.createTextNode(o),_.childNodes[0]||null),z===N?Pt.call(t,w?"html":"body")[0]:w?t.documentElement:_},it=function(e){return wt.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},ye=function(e){return e instanceof yt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Lt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},at=function(e){return typeof me=="function"&&e instanceof me};function I(i,e,t){ce(i,o=>{o.call(n,e,t,G)})}const rt=function(e){let t=null;if(I(A.beforeSanitizeElements,e,null),ye(e))return D(e),!0;const o=d(e.nodeName);if(I(A.uponSanitizeElement,e,{tagName:o,allowedTags:p}),ne&&e.hasChildNodes()&&!at(e.firstElementChild)&&h(/<[/\w!]/g,e.innerHTML)&&h(/<[/\w!]/g,e.textContent)||e.nodeType===Q.progressingInstruction||ne&&e.nodeType===Q.comment&&h(/<[/\w]/g,e.data))return D(e),!0;if(!(k.tagCheck instanceof Function&&k.tagCheck(o))&&(!p[o]||X[o])){if(!X[o]&&lt(o)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o)))return!1;if(Se&&!H[o]){const f=te(e)||e.parentNode,_=Ct(e)||e.childNodes;if(_&&f){const m=_.length;for(let O=m-1;O>=0;--O){const M=Nt(_[O],!0);M.__removalCount=(e.__removalCount||0)+1,f.insertBefore(M,Mt(e))}}}return D(e),!0}return e instanceof ze&&!Xt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(D(e),!0):(v&&e.nodeType===Q.text&&(t=e.textContent,ce([de,Te,Ee],f=>{t=K(t,f," ")}),e.textContent!==t&&(q(n.removed,{element:e.cloneNode()}),e.textContent=t)),I(A.afterSanitizeElements,e,null),!1)},st=function(e,t,o){if($e&&(t==="id"||t==="name")&&(o in s||o in jt))return!1;if(!(ge&&!_e[t]&&h(vt,t))){if(!(je&&h(Ut,t))){if(!(k.attributeCheck instanceof Function&&k.attributeCheck(t,e))){if(!T[t]||_e[t]){if(!(lt(e)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&h(u.attributeNameCheck,t)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(t,e))||t==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o))))return!1}else if(!Re[t]){if(!h(We,K(o,Ge,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&en(o,"data:")===0&&Ze[e])){if(!(Xe&&!h(Ft,K(o,Ge,"")))){if(o)return!1}}}}}}}return!0},lt=function(e){return e!=="annotation-xml"&&Me(e,Ht)},ct=function(e){I(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||ye(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:T,forceKeepAttr:void 0};let f=t.length;for(;f--;){const _=t[f],{name:m,namespaceURI:O,value:M}=_,W=d(m),De=M;let E=m==="value"?De:tn(De);if(o.attrName=W,o.attrValue=E,o.keepAttr=!0,o.forceKeepAttr=void 0,I(A.uponSanitizeAttribute,e,o),E=o.attrValue,qe&&(W==="id"||W==="name")&&(x(m,e),E=zt+E),ne&&h(/((--!?|])>)|<\/(style|title|textarea)/i,E)){x(m,e);continue}if(W==="attributename"&&Me(E,"href")){x(m,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){x(m,e);continue}if(!Ve&&h(/\/>/i,E)){x(m,e);continue}v&&ce([de,Te,Ee],ut=>{E=K(E,ut," ")});const ft=d(e.nodeName);if(!st(ft,W,E)){x(m,e);continue}if(g&&typeof ee=="object"&&typeof ee.getAttributeType=="function"&&!O)switch(ee.getAttributeType(ft,W)){case"TrustedHTML":{E=g.createHTML(E);break}case"TrustedScriptURL":{E=g.createScriptURL(E);break}}if(E!==De)try{O?e.setAttributeNS(O,m,E):e.setAttribute(m,E),ye(e)?D(e):pt(n.removed)}catch{x(m,e)}}I(A.afterSanitizeAttributes,e,null)},Vt=function i(e){let t=null;const o=it(e);for(I(A.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)I(A.uponSanitizeShadowNode,t,null),rt(t),ct(t),t.content instanceof b&&i(t.content);I(A.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,f=null,_=null;if(be=!i,be&&(i="<!-->"),typeof i!="string"&&!at(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw Z("dirty is not a string, aborting")}else throw Z("toString is not a function");if(!n.isSupported)return i;if(Ae||Le(e),n.removed=[],typeof i=="string"&&(V=!1),V){if(i.nodeName){const M=d(i.nodeName);if(!p[M]||X[M])throw Z("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof me)t=ot("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===Q.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!U&&!v&&!w&&i.indexOf("<")===-1)return g&&ie?g.createHTML(i):i;if(t=ot(i),!t)return U?null:ie?j:""}t&&he&&D(t.firstChild);const m=it(V?i:t);for(;f=m.nextNode();)rt(f),ct(f),f.content instanceof b&&Vt(f.content);if(V)return i;if(U){if(oe)for(_=xt.call(t.ownerDocument);t.firstChild;)_.appendChild(t.firstChild);else _=t;return(T.shadowroot||T.shadowrootmode)&&(_=kt.call(r,_,!0)),_}let O=w?t.outerHTML:t.innerHTML;return w&&p["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(bt,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
1
+ import{s as $t,r as ht,j as Ne}from"./index-k4Zz_A0O.js";const{entries:St,setPrototypeOf:mt,isFrozen:qt,getPrototypeOf:Kt,getOwnPropertyDescriptor:Zt}=Object;let{freeze:S,seal:L,create:ke}=Object,{apply:ve,construct:Ue}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});L||(L=function(n){return n});ve||(ve=function(n,s){for(var r=arguments.length,c=new Array(r>2?r-2:0),b=2;b<r;b++)c[b-2]=arguments[b];return n.apply(s,c)});Ue||(Ue=function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),c=1;c<s;c++)r[c-1]=arguments[c];return new n(...r)});const ce=R(Array.prototype.forEach),Jt=R(Array.prototype.lastIndexOf),pt=R(Array.prototype.pop),q=R(Array.prototype.push),Qt=R(Array.prototype.splice),ue=R(String.prototype.toLowerCase),Ie=R(String.prototype.toString),Me=R(String.prototype.match),K=R(String.prototype.replace),en=R(String.prototype.indexOf),tn=R(String.prototype.trim),y=R(Object.prototype.hasOwnProperty),h=R(RegExp.prototype.test),Z=nn(TypeError);function R(a){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var s=arguments.length,r=new Array(s>1?s-1:0),c=1;c<s;c++)r[c-1]=arguments[c];return ve(a,n,r)}}function nn(a){return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return Ue(a,s)}}function l(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ue;mt&&mt(a,null);let r=n.length;for(;r--;){let c=n[r];if(typeof c=="string"){const b=s(c);b!==c&&(qt(n)||(n[r]=b),c=b)}a[c]=!0}return a}function on(a){for(let n=0;n<a.length;n++)y(a,n)||(a[n]=null);return a}function C(a){const n=ke(null);for(const[s,r]of St(a))y(a,s)&&(Array.isArray(r)?n[s]=on(r):r&&typeof r=="object"&&r.constructor===Object?n[s]=C(r):n[s]=r);return n}function J(a,n){for(;a!==null;){const r=Zt(a,n);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}a=Kt(a)}function s(){return null}return s}const dt=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ce=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),we=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),an=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),xe=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),rn=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tt=S(["#text"]),Et=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Pe=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),_t=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),fe=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sn=L(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=L(/<%[\w\W]*|[\w\W]*%>/gm),cn=L(/\$\{[\w\W]*/gm),fn=L(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=L(/^aria-[\-\w]+$/),Rt=L(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=L(/^(?:\w+script|data):/i),pn=L(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bt=L(/^html$/i),dn=L(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:pn,CUSTOM_ELEMENT:dn,DATA_ATTR:fn,DOCTYPE_NAME:bt,ERB_EXPR:ln,IS_ALLOWED_URI:Rt,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:sn,TMPLIT_EXPR:cn});const Q={element:1,text:3,progressingInstruction:7,comment:8,document:9},Tn=function(){return typeof window>"u"?null:window},En=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const c="data-tt-policy-suffix";s&&s.hasAttribute(c)&&(r=s.getAttribute(c));const b="dompurify"+(r?"#"+r:"");try{return n.createPolicy(b,{createHTML(P){return P},createScriptURL(P){return P}})}catch{return console.warn("TrustedTypes policy "+b+" could not be created."),null}},At=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ot(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tn();const n=i=>Ot(i);if(n.version="3.3.0",n.removed=[],!a||!a.document||a.document.nodeType!==Q.document||!a.Element)return n.isSupported=!1,n;let{document:s}=a;const r=s,c=r.currentScript,{DocumentFragment:b,HTMLTemplateElement:P,Node:me,Element:ze,NodeFilter:B,NamedNodeMap:Lt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:yt,DOMParser:Dt,trustedTypes:ee}=a,Y=ze.prototype,Nt=J(Y,"cloneNode"),It=J(Y,"remove"),Mt=J(Y,"nextSibling"),Ct=J(Y,"childNodes"),te=J(Y,"parentNode");if(typeof P=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let g,j="";const{implementation:pe,createNodeIterator:wt,createDocumentFragment:xt,getElementsByTagName:Pt}=s,{importNode:kt}=r;let A=At();n.isSupported=typeof St=="function"&&typeof te=="function"&&pe&&pe.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:de,ERB_EXPR:Te,TMPLIT_EXPR:Ee,DATA_ATTR:vt,ARIA_ATTR:Ut,IS_SCRIPT_OR_DATA:Ft,ATTR_WHITESPACE:Ge,CUSTOM_ELEMENT:Ht}=gt;let{IS_ALLOWED_URI:We}=gt,p=null;const Be=l({},[...dt,...Ce,...we,...xe,...Tt]);let T=null;const Ye=l({},[...Et,...Pe,..._t,...fe]);let u=Object.seal(ke(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,_e=null;const k=Object.seal(ke(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let je=!0,ge=!0,Xe=!1,Ve=!0,v=!1,ne=!0,w=!1,Ae=!1,he=!1,U=!1,oe=!1,ie=!1,$e=!0,qe=!1;const zt="user-content-";let Se=!0,V=!1,F={},H=null;const Ke=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ze=null;const Je=l({},["audio","video","img","source","image","track"]);let Re=null;const Qe=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ae="http://www.w3.org/1998/Math/MathML",re="http://www.w3.org/2000/svg",N="http://www.w3.org/1999/xhtml";let z=N,be=!1,Oe=null;const Gt=l({},[ae,re,N],Ie);let se=l({},["mi","mo","mn","ms","mtext"]),le=l({},["annotation-xml"]);const Wt=l({},["title","style","font","a","script"]);let $=null;const Bt=["application/xhtml+xml","text/html"],Yt="text/html";let d=null,G=null;const jt=s.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},Le=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(G&&G===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),$=Bt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Yt:e.PARSER_MEDIA_TYPE,d=$==="application/xhtml+xml"?Ie:ue,p=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,d):Be,T=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,d):Ye,Oe=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Ie):Gt,Re=y(e,"ADD_URI_SAFE_ATTR")?l(C(Qe),e.ADD_URI_SAFE_ATTR,d):Qe,Ze=y(e,"ADD_DATA_URI_TAGS")?l(C(Je),e.ADD_DATA_URI_TAGS,d):Je,H=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,d):Ke,X=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,d):C({}),_e=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,d):C({}),F=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,je=e.ALLOW_ARIA_ATTR!==!1,ge=e.ALLOW_DATA_ATTR!==!1,Xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ve=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,v=e.SAFE_FOR_TEMPLATES||!1,ne=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,U=e.RETURN_DOM||!1,oe=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,$e=e.SANITIZE_DOM!==!1,qe=e.SANITIZE_NAMED_PROPS||!1,Se=e.KEEP_CONTENT!==!1,V=e.IN_PLACE||!1,We=e.ALLOWED_URI_REGEXP||Rt,z=e.NAMESPACE||N,se=e.MATHML_TEXT_INTEGRATION_POINTS||se,le=e.HTML_INTEGRATION_POINTS||le,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),v&&(ge=!1),oe&&(U=!0),F&&(p=l({},Tt),T=[],F.html===!0&&(l(p,dt),l(T,Et)),F.svg===!0&&(l(p,Ce),l(T,Pe),l(T,fe)),F.svgFilters===!0&&(l(p,we),l(T,Pe),l(T,fe)),F.mathMl===!0&&(l(p,xe),l(T,_t),l(T,fe))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?k.tagCheck=e.ADD_TAGS:(p===Be&&(p=C(p)),l(p,e.ADD_TAGS,d))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?k.attributeCheck=e.ADD_ATTR:(T===Ye&&(T=C(T)),l(T,e.ADD_ATTR,d))),e.ADD_URI_SAFE_ATTR&&l(Re,e.ADD_URI_SAFE_ATTR,d),e.FORBID_CONTENTS&&(H===Ke&&(H=C(H)),l(H,e.FORBID_CONTENTS,d)),Se&&(p["#text"]=!0),w&&l(p,["html","head","body"]),p.table&&(l(p,["tbody"]),delete X.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,j=g.createHTML("")}else g===void 0&&(g=En(ee,c)),g!==null&&typeof j=="string"&&(j=g.createHTML(""));S&&S(e),G=e}},tt=l({},[...Ce,...we,...an]),nt=l({},[...xe,...rn]),Xt=function(e){let t=te(e);(!t||!t.tagName)&&(t={namespaceURI:z,tagName:"template"});const o=ue(e.tagName),f=ue(t.tagName);return Oe[e.namespaceURI]?e.namespaceURI===re?t.namespaceURI===N?o==="svg":t.namespaceURI===ae?o==="svg"&&(f==="annotation-xml"||se[f]):!!tt[o]:e.namespaceURI===ae?t.namespaceURI===N?o==="math":t.namespaceURI===re?o==="math"&&le[f]:!!nt[o]:e.namespaceURI===N?t.namespaceURI===re&&!le[f]||t.namespaceURI===ae&&!se[f]?!1:!nt[o]&&(Wt[o]||!tt[o]):!!($==="application/xhtml+xml"&&Oe[e.namespaceURI]):!1},D=function(e){q(n.removed,{element:e});try{te(e).removeChild(e)}catch{It(e)}},x=function(e,t){try{q(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{q(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(U||oe)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},ot=function(e){let t=null,o=null;if(he)e="<remove></remove>"+e;else{const m=Me(e,/^[\r\n\t ]+/);o=m&&m[0]}$==="application/xhtml+xml"&&z===N&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const f=g?g.createHTML(e):e;if(z===N)try{t=new Dt().parseFromString(f,$)}catch{}if(!t||!t.documentElement){t=pe.createDocument(z,"template",null);try{t.documentElement.innerHTML=be?j:f}catch{}}const _=t.body||t.documentElement;return e&&o&&_.insertBefore(s.createTextNode(o),_.childNodes[0]||null),z===N?Pt.call(t,w?"html":"body")[0]:w?t.documentElement:_},it=function(e){return wt.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},ye=function(e){return e instanceof yt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Lt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},at=function(e){return typeof me=="function"&&e instanceof me};function I(i,e,t){ce(i,o=>{o.call(n,e,t,G)})}const rt=function(e){let t=null;if(I(A.beforeSanitizeElements,e,null),ye(e))return D(e),!0;const o=d(e.nodeName);if(I(A.uponSanitizeElement,e,{tagName:o,allowedTags:p}),ne&&e.hasChildNodes()&&!at(e.firstElementChild)&&h(/<[/\w!]/g,e.innerHTML)&&h(/<[/\w!]/g,e.textContent)||e.nodeType===Q.progressingInstruction||ne&&e.nodeType===Q.comment&&h(/<[/\w]/g,e.data))return D(e),!0;if(!(k.tagCheck instanceof Function&&k.tagCheck(o))&&(!p[o]||X[o])){if(!X[o]&&lt(o)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o)))return!1;if(Se&&!H[o]){const f=te(e)||e.parentNode,_=Ct(e)||e.childNodes;if(_&&f){const m=_.length;for(let O=m-1;O>=0;--O){const M=Nt(_[O],!0);M.__removalCount=(e.__removalCount||0)+1,f.insertBefore(M,Mt(e))}}}return D(e),!0}return e instanceof ze&&!Xt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(D(e),!0):(v&&e.nodeType===Q.text&&(t=e.textContent,ce([de,Te,Ee],f=>{t=K(t,f," ")}),e.textContent!==t&&(q(n.removed,{element:e.cloneNode()}),e.textContent=t)),I(A.afterSanitizeElements,e,null),!1)},st=function(e,t,o){if($e&&(t==="id"||t==="name")&&(o in s||o in jt))return!1;if(!(ge&&!_e[t]&&h(vt,t))){if(!(je&&h(Ut,t))){if(!(k.attributeCheck instanceof Function&&k.attributeCheck(t,e))){if(!T[t]||_e[t]){if(!(lt(e)&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&h(u.attributeNameCheck,t)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(t,e))||t==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&h(u.tagNameCheck,o)||u.tagNameCheck instanceof Function&&u.tagNameCheck(o))))return!1}else if(!Re[t]){if(!h(We,K(o,Ge,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&en(o,"data:")===0&&Ze[e])){if(!(Xe&&!h(Ft,K(o,Ge,"")))){if(o)return!1}}}}}}}return!0},lt=function(e){return e!=="annotation-xml"&&Me(e,Ht)},ct=function(e){I(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||ye(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:T,forceKeepAttr:void 0};let f=t.length;for(;f--;){const _=t[f],{name:m,namespaceURI:O,value:M}=_,W=d(m),De=M;let E=m==="value"?De:tn(De);if(o.attrName=W,o.attrValue=E,o.keepAttr=!0,o.forceKeepAttr=void 0,I(A.uponSanitizeAttribute,e,o),E=o.attrValue,qe&&(W==="id"||W==="name")&&(x(m,e),E=zt+E),ne&&h(/((--!?|])>)|<\/(style|title|textarea)/i,E)){x(m,e);continue}if(W==="attributename"&&Me(E,"href")){x(m,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){x(m,e);continue}if(!Ve&&h(/\/>/i,E)){x(m,e);continue}v&&ce([de,Te,Ee],ut=>{E=K(E,ut," ")});const ft=d(e.nodeName);if(!st(ft,W,E)){x(m,e);continue}if(g&&typeof ee=="object"&&typeof ee.getAttributeType=="function"&&!O)switch(ee.getAttributeType(ft,W)){case"TrustedHTML":{E=g.createHTML(E);break}case"TrustedScriptURL":{E=g.createScriptURL(E);break}}if(E!==De)try{O?e.setAttributeNS(O,m,E):e.setAttribute(m,E),ye(e)?D(e):pt(n.removed)}catch{x(m,e)}}I(A.afterSanitizeAttributes,e,null)},Vt=function i(e){let t=null;const o=it(e);for(I(A.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)I(A.uponSanitizeShadowNode,t,null),rt(t),ct(t),t.content instanceof b&&i(t.content);I(A.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,f=null,_=null;if(be=!i,be&&(i="<!-->"),typeof i!="string"&&!at(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw Z("dirty is not a string, aborting")}else throw Z("toString is not a function");if(!n.isSupported)return i;if(Ae||Le(e),n.removed=[],typeof i=="string"&&(V=!1),V){if(i.nodeName){const M=d(i.nodeName);if(!p[M]||X[M])throw Z("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof me)t=ot("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===Q.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!U&&!v&&!w&&i.indexOf("<")===-1)return g&&ie?g.createHTML(i):i;if(t=ot(i),!t)return U?null:ie?j:""}t&&he&&D(t.firstChild);const m=it(V?i:t);for(;f=m.nextNode();)rt(f),ct(f),f.content instanceof b&&Vt(f.content);if(V)return i;if(U){if(oe)for(_=xt.call(t.ownerDocument);t.firstChild;)_.appendChild(t.firstChild);else _=t;return(T.shadowroot||T.shadowrootmode)&&(_=kt.call(r,_,!0)),_}let O=w?t.outerHTML:t.innerHTML;return w&&p["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(bt,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
2
2
  `+O),v&&ce([de,Te,Ee],M=>{O=K(O,M," ")}),g&&ie?g.createHTML(O):O},n.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Le(i),Ae=!0},n.clearConfig=function(){G=null,Ae=!1},n.isValidAttribute=function(i,e,t){G||Le({});const o=d(i),f=d(e);return st(o,f,t)},n.addHook=function(i,e){typeof e=="function"&&q(A[i],e)},n.removeHook=function(i,e){if(e!==void 0){const t=Jt(A[i],e);return t===-1?void 0:Qt(A[i],t,1)[0]}return pt(A[i])},n.removeHooks=function(i){A[i]=[]},n.removeAllHooks=function(){A=At()},n}var He=Ot();const _n=$t("div",{target:"e18540fl0"})({name:"1d3w5wq",styles:"width:100%"}),Fe="data-temp-href-target";He.addHook("beforeSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute("target")&&a.getAttribute("target")==="_blank"&&a.setAttribute(Fe,"_blank")});He.addHook("afterSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute(Fe)&&(a.setAttribute("target","_blank"),a.setAttribute("rel","noopener noreferrer"),a.removeAttribute(Fe))});const gn=a=>{const n={USE_PROFILES:{html:!0},FORCE_BODY:!0};return He.sanitize(a,n)};function An({element:a}){const{body:n}=a,s=ht.useMemo(()=>gn(n),[n]);return Ne.jsx(Ne.Fragment,{children:s&&Ne.jsx(_n,{className:"stHtml","data-testid":"stHtml",dangerouslySetInnerHTML:{__html:s}})})}const Sn=ht.memo(An);export{Sn as default};
@@ -1,2 +1,2 @@
1
- import{b1 as Ye,ac as J,r as x,bs as pt,ad as vt,o as Q,aL as mt,aM as bt,s as me,t as Ve,bi as yt,u as Tt,bt as kt,j as Z,W as Ot,l as wt,Q as Rt,T as St,P as Mt,bu as _t,bv as Ee}from"./index-wnKDraWU.js";import{s as ze}from"./sprintf-DpPCfzXw.js";import{u as Et}from"./useBasicWidgetState-raTjAqZP.js";import"./FormClearHelper-CaLJK07N.js";var se={},H={},ue={},ce={},Ne;function Ie(){if(Ne)return ce;Ne=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.Direction=void 0;var e;return(function(r){r.Right="to right",r.Left="to left",r.Down="to bottom",r.Up="to top"})(e||(ce.Direction=e={})),ce}var Ue;function Ze(){return Ue||(Ue=1,(function(e){var r=ue&&ue.__spreadArray||function(i,s,u){if(u||arguments.length===2)for(var h=0,m=s.length,v;h<m;h++)(v||!(h in s))&&(v||(v=Array.prototype.slice.call(s,0,h)),v[h]=s[h]);return i.concat(v||Array.prototype.slice.call(s))};Object.defineProperty(e,"__esModule",{value:!0}),e.isIOS=e.useThumbOverlap=e.assertUnreachable=e.voidFn=e.getTrackBackground=e.replaceAt=e.schd=e.translate=e.getClosestThumbIndex=e.translateThumbs=e.getPaddingAndBorder=e.getMargin=e.checkInitialOverlap=e.checkValuesAgainstBoundaries=e.checkBoundaries=e.isVertical=e.relativeValue=e.normalizeValue=e.isStepDivisible=e.isTouchEvent=e.getStepDecimals=void 0;var n=Ye(),o=Ie(),p=function(i){var s=i.toString().split(".")[1];return s?s.length:0};e.getStepDecimals=p;function S(i){return i.touches&&i.touches.length||i.changedTouches&&i.changedTouches.length}e.isTouchEvent=S;function l(i,s,u){var h=(s-i)/u,m=8,v=Number(h.toFixed(m));return parseInt(v.toString(),10)===v}e.isStepDivisible=l;function g(i,s,u,h,m,v,T){var _=1e11;if(i=Math.round(i*_)/_,!v){var P=T[s-1],C=T[s+1];if(P&&P>i)return P;if(C&&C<i)return C}if(i>h)return h;if(i<u)return u;var U=Math.floor(i*_-u*_)%Math.floor(m*_),z=Math.floor(i*_-Math.abs(U)),W=U===0?i:z/_,A=Math.abs(U/_)<m/2?W:W+m,L=(0,e.getStepDecimals)(m);return parseFloat(A.toFixed(L))}e.normalizeValue=g;function F(i,s,u){return(i-s)/(u-s)}e.relativeValue=F;function $(i){return i===o.Direction.Up||i===o.Direction.Down}e.isVertical=$;function V(i,s,u){if(s>=u)throw new RangeError("min (".concat(s,") is equal/bigger than max (").concat(u,")"));if(i<s)throw new RangeError("value (".concat(i,") is smaller than min (").concat(s,")"));if(i>u)throw new RangeError("value (".concat(i,") is bigger than max (").concat(u,")"))}e.checkBoundaries=V;function E(i,s,u){return i<s?s:i>u?u:i}e.checkValuesAgainstBoundaries=E;function y(i){if(!(i.length<2)&&!i.slice(1).every(function(s,u){return i[u]<=s}))throw new RangeError("values={[".concat(i,"]} needs to be sorted when allowOverlap={false}"))}e.checkInitialOverlap=y;function d(i){var s=window.getComputedStyle(i);return{top:parseInt(s["margin-top"],10),bottom:parseInt(s["margin-bottom"],10),left:parseInt(s["margin-left"],10),right:parseInt(s["margin-right"],10)}}e.getMargin=d;function t(i){var s=window.getComputedStyle(i);return{top:parseInt(s["padding-top"],10)+parseInt(s["border-top-width"],10),bottom:parseInt(s["padding-bottom"],10)+parseInt(s["border-bottom-width"],10),left:parseInt(s["padding-left"],10)+parseInt(s["border-left-width"],10),right:parseInt(s["padding-right"],10)+parseInt(s["border-right-width"],10)}}e.getPaddingAndBorder=t;function a(i,s,u){var h=u?-1:1;i.forEach(function(m,v){return f(m,h*s[v].x,s[v].y)})}e.translateThumbs=a;function c(i,s,u,h){for(var m=0,v=D(i[0],s,u,h),T=1;T<i.length;T++){var _=D(i[T],s,u,h);_<v&&(v=_,m=T)}return m}e.getClosestThumbIndex=c;function f(i,s,u){i.style.transform="translate(".concat(s,"px, ").concat(u,"px)")}e.translate=f;var b=function(i){var s=[],u=null,h=function(){for(var m=[],v=0;v<arguments.length;v++)m[v]=arguments[v];s=m,!u&&(u=requestAnimationFrame(function(){u=null,i.apply(void 0,s)}))};return h};e.schd=b;function k(i,s,u){var h=i.slice(0);return h[s]=u,h}e.replaceAt=k;function I(i){var s=i.values,u=i.colors,h=i.min,m=i.max,v=i.direction,T=v===void 0?o.Direction.Right:v,_=i.rtl,P=_===void 0?!1:_;P&&T===o.Direction.Right?T=o.Direction.Left:P&&o.Direction.Left&&(T=o.Direction.Right);var C=s.slice(0).sort(function(z,W){return z-W}).map(function(z){return(z-h)/(m-h)*100}),U=C.reduce(function(z,W,A){return"".concat(z,", ").concat(u[A]," ").concat(W,"%, ").concat(u[A+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(T,", ").concat(u[0]," 0%").concat(U,", ").concat(u[u.length-1]," 100%)")}e.getTrackBackground=I;function O(){}e.voidFn=O;function w(i){throw new Error("Didn't expect to get here")}e.assertUnreachable=w;var M=function(i,s,u,h,m){m===void 0&&(m=function(T){return T});var v=Math.ceil(r([i],Array.from(i.children),!0).reduce(function(T,_){var P=Math.ceil(_.getBoundingClientRect().width);if(_.innerText&&_.innerText.includes(u)&&_.childElementCount===0){var C=_.cloneNode(!0);C.innerHTML=m(s.toFixed(h)),C.style.visibility="hidden",document.body.appendChild(C),P=Math.ceil(C.getBoundingClientRect().width),document.body.removeChild(C)}return P>T?P:T},i.getBoundingClientRect().width));return v},B=function(i,s,u,h,m,v,T){T===void 0&&(T=function(C){return C});var _=[],P=function(C){var U=M(u[C],h[C],m,v,T),z=s[C].x;s.forEach(function(W,A){var L=W.x,G=M(u[A],h[A],m,v,T);C!==A&&(z>=L&&z<=L+G||z+U>=L&&z+U<=L+G)&&(_.includes(A)||(_.push(C),_.push(A),_=r(r([],_,!0),[C,A],!1),P(A)))})};return P(i),Array.from(new Set(_.sort()))},R=function(i,s,u,h,m,v){h===void 0&&(h=.1),m===void 0&&(m=" - "),v===void 0&&(v=function(A){return A});var T=(0,e.getStepDecimals)(h),_=(0,n.useState)({}),P=_[0],C=_[1],U=(0,n.useState)(v(s[u].toFixed(T))),z=U[0],W=U[1];return(0,n.useEffect)(function(){if(i){var A=i.getThumbs();if(A.length<1)return;var L={},G=i.getOffsets(),ne=B(u,G,A,s,m,T,v),le=v(s[u].toFixed(T));if(ne.length){var ee=ne.reduce(function(te,oe,ge,pe){return te.length?r(r([],te,!0),[G[pe[ge]].x],!1):[G[pe[ge]].x]},[]);if(Math.min.apply(Math,ee)===G[u].x){var de=[];ne.forEach(function(te){de.push(s[te].toFixed(T))}),le=Array.from(new Set(de.sort(function(te,oe){return parseFloat(te)-parseFloat(oe)}))).map(v).join(m);var fe=Math.min.apply(Math,ee),he=Math.max.apply(Math,ee),_e=A[ne[ee.indexOf(he)]].getBoundingClientRect().width;L.left="".concat(Math.abs(fe-(he+_e))/2,"px"),L.transform="translate(-50%, 0)"}else L.visibility="hidden"}W(le),C(L)}},[i,s]),[z,P]};e.useThumbOverlap=R;function D(i,s,u,h){var m=i.getBoundingClientRect(),v=m.left,T=m.top,_=m.width,P=m.height;return $(h)?Math.abs(u-(T+P/2)):Math.abs(s-(v+_/2))}var j=function(){var i,s=((i=navigator.userAgentData)===null||i===void 0?void 0:i.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(s)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};e.isIOS=j})(ue)),ue}var He;function xt(){if(He)return H;He=1;var e=H&&H.__extends||(function(){var E=function(y,d){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(t[c]=a[c])},E(y,d)};return function(y,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");E(y,d);function t(){this.constructor=y}y.prototype=d===null?Object.create(d):(t.prototype=d.prototype,new t)}})(),r=H&&H.__createBinding||(Object.create?(function(E,y,d,t){t===void 0&&(t=d);var a=Object.getOwnPropertyDescriptor(y,d);(!a||("get"in a?!y.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return y[d]}}),Object.defineProperty(E,t,a)}):(function(E,y,d,t){t===void 0&&(t=d),E[t]=y[d]})),n=H&&H.__setModuleDefault||(Object.create?(function(E,y){Object.defineProperty(E,"default",{enumerable:!0,value:y})}):function(E,y){E.default=y}),o=H&&H.__importStar||function(E){if(E&&E.__esModule)return E;var y={};if(E!=null)for(var d in E)d!=="default"&&Object.prototype.hasOwnProperty.call(E,d)&&r(y,E,d);return n(y,E),y},p=H&&H.__spreadArray||function(E,y,d){if(d||arguments.length===2)for(var t=0,a=y.length,c;t<a;t++)(c||!(t in y))&&(c||(c=Array.prototype.slice.call(y,0,t)),c[t]=y[t]);return E.concat(c||Array.prototype.slice.call(y))};Object.defineProperty(H,"__esModule",{value:!0});var S=o(Ye()),l=Ze(),g=Ie(),F=["ArrowRight","ArrowUp","k","PageUp"],$=["ArrowLeft","ArrowDown","j","PageDown"],V=(function(E){e(y,E);function y(d){var t=E.call(this,d)||this;if(t.trackRef=S.createRef(),t.thumbRefs=[],t.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(t.props.values.length).fill(0).map(function(a,c){return c}),isChanged:!1,markOffsets:[]},t.getOffsets=function(){var a=t.props,c=a.direction,f=a.values,b=a.min,k=a.max,I=t.trackRef.current;if(!I)return console.warn("No track element found."),[];var O=I.getBoundingClientRect(),w=(0,l.getPaddingAndBorder)(I);return t.getThumbs().map(function(M,B){var R={x:0,y:0},D=M.getBoundingClientRect(),j=(0,l.getMargin)(M);switch(c){case g.Direction.Right:return R.x=(j.left+w.left)*-1,R.y=((D.height-O.height)/2+w.top)*-1,R.x+=O.width*(0,l.relativeValue)(f[B],b,k)-D.width/2,R;case g.Direction.Left:return R.x=(j.right+w.right)*-1,R.y=((D.height-O.height)/2+w.top)*-1,R.x+=O.width-O.width*(0,l.relativeValue)(f[B],b,k)-D.width/2,R;case g.Direction.Up:return R.x=((D.width-O.width)/2+j.left+w.left)*-1,R.y=-w.left,R.y+=O.height-O.height*(0,l.relativeValue)(f[B],b,k)-D.height/2,R;case g.Direction.Down:return R.x=((D.width-O.width)/2+j.left+w.left)*-1,R.y=-w.left,R.y+=O.height*(0,l.relativeValue)(f[B],b,k)-D.height/2,R;default:return(0,l.assertUnreachable)(c)}})},t.getThumbs=function(){return t.trackRef&&t.trackRef.current?Array.from(t.trackRef.current.children).filter(function(a){return a.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},t.getTargetIndex=function(a){return t.getThumbs().findIndex(function(c){return c===a.target||c.contains(a.target)})},t.addTouchEvents=function(a){document.addEventListener("touchmove",t.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",t.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",t.schdOnEnd,{passive:!1})},t.addMouseEvents=function(a){document.addEventListener("mousemove",t.schdOnMouseMove),document.addEventListener("mouseup",t.schdOnEnd)},t.onMouseDownTrack=function(a){var c;if(!(a.button!==0||(0,l.isIOS)()))if(a.persist(),a.preventDefault(),t.addMouseEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(b){var k;return(k=b.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return t.onMove(a.clientX,a.clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(b){return b.current}),a.clientX,a.clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.clientX,a.clientY)})}},t.onResize=function(){(0,l.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(a){var c;if(a.persist(),t.addTouchEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(b){var k;return(k=b.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(b){return b.current}),a.touches[0].clientX,a.touches[0].clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},t.onMouseOrTouchStart=function(a){if(!t.props.disabled){var c=(0,l.isTouchEvent)(a);if(!(!c&&a.button!==0)){var f=t.getTargetIndex(a);f!==-1&&(c?t.addTouchEvents(a):t.addMouseEvents(a),t.setState({draggedThumbIndex:f,thumbZIndexes:t.state.thumbZIndexes.map(function(b,k){return k===f?Math.max.apply(Math,t.state.thumbZIndexes):b<=t.state.thumbZIndexes[f]?b:b-1})}))}}},t.onMouseMove=function(a){a.preventDefault(),t.onMove(a.clientX,a.clientY)},t.onTouchMove=function(a){a.preventDefault(),t.onMove(a.touches[0].clientX,a.touches[0].clientY)},t.onKeyDown=function(a){var c=t.props,f=c.values,b=c.onChange,k=c.step,I=c.rtl,O=c.direction,w=t.state.isChanged,M=t.getTargetIndex(a.nativeEvent),B=I||O===g.Direction.Left||O===g.Direction.Down?-1:1;M!==-1&&(F.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),b((0,l.replaceAt)(f,M,t.normalizeValue(f[M]+B*(a.key==="PageUp"?k*10:k),M)))):$.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),b((0,l.replaceAt)(f,M,t.normalizeValue(f[M]-B*(a.key==="PageDown"?k*10:k),M)))):a.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){w&&t.fireOnFinalChange()}):w&&t.fireOnFinalChange())},t.onKeyUp=function(a){var c=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){c&&t.fireOnFinalChange()})},t.onMove=function(a,c){var f=t.state,b=f.draggedThumbIndex,k=f.draggedTrackPos,I=t.props,O=I.direction,w=I.min,M=I.max,B=I.onChange,R=I.values,D=I.step,j=I.rtl;if(b===-1&&k[0]===-1&&k[1]===-1)return null;var i=t.trackRef.current;if(!i)return null;var s=i.getBoundingClientRect(),u=(0,l.isVertical)(O)?s.height:s.width;if(k[0]!==-1&&k[1]!==-1){var h=a-k[0],m=c-k[1],v=0;switch(O){case g.Direction.Right:case g.Direction.Left:v=h/u*(M-w);break;case g.Direction.Down:case g.Direction.Up:v=m/u*(M-w);break;default:(0,l.assertUnreachable)(O)}if(j&&(v*=-1),Math.abs(v)>=D/2){for(var T=0;T<t.thumbRefs.length;T++){if(R[T]===M&&Math.sign(v)===1||R[T]===w&&Math.sign(v)===-1)return;var _=R[T]+v;_>M?v=M-R[T]:_<w&&(v=w-R[T])}for(var P=R.slice(0),T=0;T<t.thumbRefs.length;T++)P=(0,l.replaceAt)(P,T,t.normalizeValue(R[T]+v,T));t.setState({draggedTrackPos:[a,c]}),B(P)}}else{var C=0;switch(O){case g.Direction.Right:C=(a-s.left)/u*(M-w)+w;break;case g.Direction.Left:C=(u-(a-s.left))/u*(M-w)+w;break;case g.Direction.Down:C=(c-s.top)/u*(M-w)+w;break;case g.Direction.Up:C=(u-(c-s.top))/u*(M-w)+w;break;default:(0,l.assertUnreachable)(O)}j&&(C=M+w-C),Math.abs(R[b]-C)>=D/2&&B((0,l.replaceAt)(R,b,t.normalizeValue(C,b)))}},t.normalizeValue=function(a,c){var f=t.props,b=f.min,k=f.max,I=f.step,O=f.allowOverlap,w=f.values;return(0,l.normalizeValue)(a,c,b,k,I,O,w)},t.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var a=t.props,c=a.onFinalChange,f=a.values;c&&c(f)},t.updateMarkRefs=function(a){if(!a.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(a.max-a.min)/t.props.step,t.markRefs=[];for(var c=0;c<t.numOfMarks+1;c++)t.markRefs[c]=S.createRef()},t.calculateMarkOffsets=function(){if(!(!t.props.renderMark||!t.trackRef||!t.numOfMarks||!t.markRefs||t.trackRef.current===null)){for(var a=window.getComputedStyle(t.trackRef.current),c=parseInt(a.width,10),f=parseInt(a.height,10),b=parseInt(a.paddingLeft,10),k=parseInt(a.paddingTop,10),I=[],O=0;O<t.numOfMarks+1;O++){var w=9999,M=9999;if(t.markRefs[O].current){var B=t.markRefs[O].current.getBoundingClientRect();w=B.height,M=B.width}t.props.direction===g.Direction.Left||t.props.direction===g.Direction.Right?I.push([Math.round(c/t.numOfMarks*O+b-M/2),-Math.round((w-f)/2)]):I.push([Math.round(f/t.numOfMarks*O+k-w/2),-Math.round((M-c)/2)])}t.setState({markOffsets:I})}},d.step===0)throw new Error('"step" property should be a positive number');return t.schdOnMouseMove=(0,l.schd)(t.onMouseMove),t.schdOnTouchMove=(0,l.schd)(t.onTouchMove),t.schdOnEnd=(0,l.schd)(t.onEnd),t.thumbRefs=d.values.map(function(){return S.createRef()}),t.updateMarkRefs(d),t}return y.prototype.componentDidMount=function(){var d=this,t=this.props,a=t.values,c=t.min,f=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",d.onResize)},unobserve:function(){return window.removeEventListener("resize",d.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,l.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(b){return(0,l.checkBoundaries)(b,d.props.min,d.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(b){(0,l.isStepDivisible)(c,b,f)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},y.prototype.componentDidUpdate=function(d,t){var a=this.props,c=a.max,f=a.min,b=a.step,k=a.values,I=a.rtl;(d.max!==c||d.min!==f||d.step!==b)&&this.updateMarkRefs(this.props),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),I),(d.max!==c||d.min!==f||d.step!==b||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),k.forEach(function(O){(0,l.isStepDivisible)(f,O,b)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},y.prototype.componentWillUnmount=function(){var d={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,d),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},y.prototype.render=function(){var d=this,t=this.props,a=t.label,c=t.labelledBy,f=t.renderTrack,b=t.renderThumb,k=t.renderMark,I=k===void 0?function(){return null}:k,O=t.values,w=t.min,M=t.max,B=t.allowOverlap,R=t.disabled,D=this.state,j=D.draggedThumbIndex,i=D.thumbZIndexes,s=D.markOffsets;return f({props:{style:{transform:"scale(1)",cursor:j>-1?"grabbing":this.props.draggableTrack?(0,l.isVertical)(this.props.direction)?"ns-resize":"ew-resize":O.length===1&&!R?"pointer":"inherit"},onMouseDown:R?l.voidFn:this.onMouseDownTrack,onTouchStart:R?l.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:R,children:p(p([],s.map(function(u,h,m){return I({props:{style:d.props.direction===g.Direction.Left||d.props.direction===g.Direction.Right?{position:"absolute",left:"".concat(u[0],"px"),marginTop:"".concat(u[1],"px")}:{position:"absolute",top:"".concat(u[0],"px"),marginLeft:"".concat(u[1],"px")},key:"mark".concat(h),ref:d.markRefs[h]},index:h})}),!0),O.map(function(u,h){var m=d.state.draggedThumbIndex===h;return b({index:h,value:u,isDragged:m,props:{style:{position:"absolute",zIndex:i[h],cursor:R?"inherit":m?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:h,tabIndex:R?void 0:0,"aria-valuemax":B?M:O[h+1]||M,"aria-valuemin":B?w:O[h-1]||w,"aria-valuenow":u,draggable:!1,ref:d.thumbRefs[h],"aria-label":a,"aria-labelledby":c,role:"slider",onKeyDown:R?l.voidFn:d.onKeyDown,onKeyUp:R?l.voidFn:d.onKeyUp}})}),!0)})},y.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:g.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},y})(S.Component);return H.default=V,H}var We;function It(){return We||(We=1,(function(e){var r=se&&se.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0;var n=r(xt());e.Range=n.default;var o=Ze();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return o.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return o.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return o.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return o.checkValuesAgainstBoundaries}});var p=Ie();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return p.Direction}})})(se)),se}var Ge=It();function qe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(p){return Object.getOwnPropertyDescriptor(e,p).enumerable})),n.push.apply(n,o)}return n}function ve(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(n),!0).forEach(function(o){Ct(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Ct(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var be=J("div",{position:"relative",width:"100%"});be.displayName="Root";be.displayName="Root";be.displayName="StyledRoot";var ye=J("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,p=e.$disabled,S=e.$isDragged,l=r.sizing,g="inherit";return p?g="not-allowed":S?g="grabbing":o.length===1&&(g="pointer"),{paddingTop:l.scale600,paddingBottom:l.scale600,paddingRight:l.scale600,paddingLeft:l.scale600,display:"flex",cursor:g,backgroundColor:r.colors.sliderTrackFill}});ye.displayName="Track";ye.displayName="Track";ye.displayName="StyledTrack";var Te=J("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,p=e.$min,S=e.$max,l=e.$disabled,g=r.colors,F=r.borders,$=r.direction,V=r.borders.useRoundedCorners?F.radius100:0;return{borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,background:Ge.getTrackBackground({values:o,colors:o.length===1?[l?g.borderOpaque:g.primary,l?g.backgroundSecondary:g.borderOpaque]:[l?g.backgroundSecondary:g.borderOpaque,l?g.borderOpaque:g.primary,l?g.backgroundSecondary:g.borderOpaque],min:p||0,max:S||0,rtl:$==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:l?"not-allowed":"inherit"}});Te.displayName="InnerTrack";Te.displayName="InnerTrack";Te.displayName="StyledInnerTrack";var ke=J("div",function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}});ke.displayName="Mark";ke.displayName="Mark";ke.displayName="StyledMark";var Oe=J("div",function(e){return ve(ve({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});Oe.displayName="Tick";Oe.displayName="Tick";Oe.displayName="StyledTick";var we=J("div",function(e){var r=e.$theme,n=r.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:n.scale600,paddingLeft:n.scale600,paddingBottom:n.scale400}});we.displayName="TickBar";we.displayName="TickBar";we.displayName="StyledTickBar";var Re=J("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,p=e.$thumbIndex,S=e.$disabled,l=o.length===2&&p===0,g=o.length===2&&p===1;return r.direction==="rtl"&&(g||l)&&(l=!l,g=!g),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:S?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleFill,outline:"none",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(r.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:S?"not-allowed":"inherit"}});Re.displayName="Thumb";Re.displayName="Thumb";Re.displayName="StyledThumb";var Se=J("div",function(e){var r=e.$disabled,n=e.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});Se.displayName="InnerThumb";Se.displayName="InnerThumb";Se.displayName="StyledInnerThumb";var Me=J("div",function(e){var r=e.$disabled,n=e.$theme;return ve(ve({position:"absolute",top:"-".concat(n.sizing.scale1400)},n.typography.font200),{},{backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill,color:n.colors.contentInversePrimary,paddingLeft:n.sizing.scale600,paddingRight:n.sizing.scale600,paddingTop:n.sizing.scale500,paddingBottom:n.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});Me.displayName="ThumbValue";Me.displayName="ThumbValue";Me.displayName="StyledThumbValue";function Ke(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(p){return Object.getOwnPropertyDescriptor(e,p).enumerable})),n.push.apply(n,o)}return n}function Dt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ke(Object(n),!0).forEach(function(o){Pt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Pt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function X(){return X=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},X.apply(this,arguments)}function K(e,r){return jt(e)||Lt(e,r)||At(e,r)||Bt()}function Bt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{b1 as Ye,ac as J,r as x,bs as pt,ad as vt,o as Q,aL as mt,aM as bt,s as me,t as Ve,bi as yt,u as Tt,bt as kt,j as Z,W as Ot,l as wt,Q as Rt,T as St,P as Mt,bu as _t,bv as Ee}from"./index-k4Zz_A0O.js";import{s as ze}from"./sprintf-DpPCfzXw.js";import{u as Et}from"./useBasicWidgetState-CMQ4ds3J.js";import"./FormClearHelper-CXfZggoC.js";var se={},H={},ue={},ce={},Ne;function Ie(){if(Ne)return ce;Ne=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.Direction=void 0;var e;return(function(r){r.Right="to right",r.Left="to left",r.Down="to bottom",r.Up="to top"})(e||(ce.Direction=e={})),ce}var Ue;function Ze(){return Ue||(Ue=1,(function(e){var r=ue&&ue.__spreadArray||function(i,s,u){if(u||arguments.length===2)for(var h=0,m=s.length,v;h<m;h++)(v||!(h in s))&&(v||(v=Array.prototype.slice.call(s,0,h)),v[h]=s[h]);return i.concat(v||Array.prototype.slice.call(s))};Object.defineProperty(e,"__esModule",{value:!0}),e.isIOS=e.useThumbOverlap=e.assertUnreachable=e.voidFn=e.getTrackBackground=e.replaceAt=e.schd=e.translate=e.getClosestThumbIndex=e.translateThumbs=e.getPaddingAndBorder=e.getMargin=e.checkInitialOverlap=e.checkValuesAgainstBoundaries=e.checkBoundaries=e.isVertical=e.relativeValue=e.normalizeValue=e.isStepDivisible=e.isTouchEvent=e.getStepDecimals=void 0;var n=Ye(),o=Ie(),p=function(i){var s=i.toString().split(".")[1];return s?s.length:0};e.getStepDecimals=p;function S(i){return i.touches&&i.touches.length||i.changedTouches&&i.changedTouches.length}e.isTouchEvent=S;function l(i,s,u){var h=(s-i)/u,m=8,v=Number(h.toFixed(m));return parseInt(v.toString(),10)===v}e.isStepDivisible=l;function g(i,s,u,h,m,v,T){var _=1e11;if(i=Math.round(i*_)/_,!v){var P=T[s-1],C=T[s+1];if(P&&P>i)return P;if(C&&C<i)return C}if(i>h)return h;if(i<u)return u;var U=Math.floor(i*_-u*_)%Math.floor(m*_),z=Math.floor(i*_-Math.abs(U)),W=U===0?i:z/_,A=Math.abs(U/_)<m/2?W:W+m,L=(0,e.getStepDecimals)(m);return parseFloat(A.toFixed(L))}e.normalizeValue=g;function F(i,s,u){return(i-s)/(u-s)}e.relativeValue=F;function $(i){return i===o.Direction.Up||i===o.Direction.Down}e.isVertical=$;function V(i,s,u){if(s>=u)throw new RangeError("min (".concat(s,") is equal/bigger than max (").concat(u,")"));if(i<s)throw new RangeError("value (".concat(i,") is smaller than min (").concat(s,")"));if(i>u)throw new RangeError("value (".concat(i,") is bigger than max (").concat(u,")"))}e.checkBoundaries=V;function E(i,s,u){return i<s?s:i>u?u:i}e.checkValuesAgainstBoundaries=E;function y(i){if(!(i.length<2)&&!i.slice(1).every(function(s,u){return i[u]<=s}))throw new RangeError("values={[".concat(i,"]} needs to be sorted when allowOverlap={false}"))}e.checkInitialOverlap=y;function d(i){var s=window.getComputedStyle(i);return{top:parseInt(s["margin-top"],10),bottom:parseInt(s["margin-bottom"],10),left:parseInt(s["margin-left"],10),right:parseInt(s["margin-right"],10)}}e.getMargin=d;function t(i){var s=window.getComputedStyle(i);return{top:parseInt(s["padding-top"],10)+parseInt(s["border-top-width"],10),bottom:parseInt(s["padding-bottom"],10)+parseInt(s["border-bottom-width"],10),left:parseInt(s["padding-left"],10)+parseInt(s["border-left-width"],10),right:parseInt(s["padding-right"],10)+parseInt(s["border-right-width"],10)}}e.getPaddingAndBorder=t;function a(i,s,u){var h=u?-1:1;i.forEach(function(m,v){return f(m,h*s[v].x,s[v].y)})}e.translateThumbs=a;function c(i,s,u,h){for(var m=0,v=D(i[0],s,u,h),T=1;T<i.length;T++){var _=D(i[T],s,u,h);_<v&&(v=_,m=T)}return m}e.getClosestThumbIndex=c;function f(i,s,u){i.style.transform="translate(".concat(s,"px, ").concat(u,"px)")}e.translate=f;var b=function(i){var s=[],u=null,h=function(){for(var m=[],v=0;v<arguments.length;v++)m[v]=arguments[v];s=m,!u&&(u=requestAnimationFrame(function(){u=null,i.apply(void 0,s)}))};return h};e.schd=b;function k(i,s,u){var h=i.slice(0);return h[s]=u,h}e.replaceAt=k;function I(i){var s=i.values,u=i.colors,h=i.min,m=i.max,v=i.direction,T=v===void 0?o.Direction.Right:v,_=i.rtl,P=_===void 0?!1:_;P&&T===o.Direction.Right?T=o.Direction.Left:P&&o.Direction.Left&&(T=o.Direction.Right);var C=s.slice(0).sort(function(z,W){return z-W}).map(function(z){return(z-h)/(m-h)*100}),U=C.reduce(function(z,W,A){return"".concat(z,", ").concat(u[A]," ").concat(W,"%, ").concat(u[A+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(T,", ").concat(u[0]," 0%").concat(U,", ").concat(u[u.length-1]," 100%)")}e.getTrackBackground=I;function O(){}e.voidFn=O;function w(i){throw new Error("Didn't expect to get here")}e.assertUnreachable=w;var M=function(i,s,u,h,m){m===void 0&&(m=function(T){return T});var v=Math.ceil(r([i],Array.from(i.children),!0).reduce(function(T,_){var P=Math.ceil(_.getBoundingClientRect().width);if(_.innerText&&_.innerText.includes(u)&&_.childElementCount===0){var C=_.cloneNode(!0);C.innerHTML=m(s.toFixed(h)),C.style.visibility="hidden",document.body.appendChild(C),P=Math.ceil(C.getBoundingClientRect().width),document.body.removeChild(C)}return P>T?P:T},i.getBoundingClientRect().width));return v},B=function(i,s,u,h,m,v,T){T===void 0&&(T=function(C){return C});var _=[],P=function(C){var U=M(u[C],h[C],m,v,T),z=s[C].x;s.forEach(function(W,A){var L=W.x,G=M(u[A],h[A],m,v,T);C!==A&&(z>=L&&z<=L+G||z+U>=L&&z+U<=L+G)&&(_.includes(A)||(_.push(C),_.push(A),_=r(r([],_,!0),[C,A],!1),P(A)))})};return P(i),Array.from(new Set(_.sort()))},R=function(i,s,u,h,m,v){h===void 0&&(h=.1),m===void 0&&(m=" - "),v===void 0&&(v=function(A){return A});var T=(0,e.getStepDecimals)(h),_=(0,n.useState)({}),P=_[0],C=_[1],U=(0,n.useState)(v(s[u].toFixed(T))),z=U[0],W=U[1];return(0,n.useEffect)(function(){if(i){var A=i.getThumbs();if(A.length<1)return;var L={},G=i.getOffsets(),ne=B(u,G,A,s,m,T,v),le=v(s[u].toFixed(T));if(ne.length){var ee=ne.reduce(function(te,oe,ge,pe){return te.length?r(r([],te,!0),[G[pe[ge]].x],!1):[G[pe[ge]].x]},[]);if(Math.min.apply(Math,ee)===G[u].x){var de=[];ne.forEach(function(te){de.push(s[te].toFixed(T))}),le=Array.from(new Set(de.sort(function(te,oe){return parseFloat(te)-parseFloat(oe)}))).map(v).join(m);var fe=Math.min.apply(Math,ee),he=Math.max.apply(Math,ee),_e=A[ne[ee.indexOf(he)]].getBoundingClientRect().width;L.left="".concat(Math.abs(fe-(he+_e))/2,"px"),L.transform="translate(-50%, 0)"}else L.visibility="hidden"}W(le),C(L)}},[i,s]),[z,P]};e.useThumbOverlap=R;function D(i,s,u,h){var m=i.getBoundingClientRect(),v=m.left,T=m.top,_=m.width,P=m.height;return $(h)?Math.abs(u-(T+P/2)):Math.abs(s-(v+_/2))}var j=function(){var i,s=((i=navigator.userAgentData)===null||i===void 0?void 0:i.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(s)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};e.isIOS=j})(ue)),ue}var He;function xt(){if(He)return H;He=1;var e=H&&H.__extends||(function(){var E=function(y,d){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(t[c]=a[c])},E(y,d)};return function(y,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");E(y,d);function t(){this.constructor=y}y.prototype=d===null?Object.create(d):(t.prototype=d.prototype,new t)}})(),r=H&&H.__createBinding||(Object.create?(function(E,y,d,t){t===void 0&&(t=d);var a=Object.getOwnPropertyDescriptor(y,d);(!a||("get"in a?!y.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return y[d]}}),Object.defineProperty(E,t,a)}):(function(E,y,d,t){t===void 0&&(t=d),E[t]=y[d]})),n=H&&H.__setModuleDefault||(Object.create?(function(E,y){Object.defineProperty(E,"default",{enumerable:!0,value:y})}):function(E,y){E.default=y}),o=H&&H.__importStar||function(E){if(E&&E.__esModule)return E;var y={};if(E!=null)for(var d in E)d!=="default"&&Object.prototype.hasOwnProperty.call(E,d)&&r(y,E,d);return n(y,E),y},p=H&&H.__spreadArray||function(E,y,d){if(d||arguments.length===2)for(var t=0,a=y.length,c;t<a;t++)(c||!(t in y))&&(c||(c=Array.prototype.slice.call(y,0,t)),c[t]=y[t]);return E.concat(c||Array.prototype.slice.call(y))};Object.defineProperty(H,"__esModule",{value:!0});var S=o(Ye()),l=Ze(),g=Ie(),F=["ArrowRight","ArrowUp","k","PageUp"],$=["ArrowLeft","ArrowDown","j","PageDown"],V=(function(E){e(y,E);function y(d){var t=E.call(this,d)||this;if(t.trackRef=S.createRef(),t.thumbRefs=[],t.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(t.props.values.length).fill(0).map(function(a,c){return c}),isChanged:!1,markOffsets:[]},t.getOffsets=function(){var a=t.props,c=a.direction,f=a.values,b=a.min,k=a.max,I=t.trackRef.current;if(!I)return console.warn("No track element found."),[];var O=I.getBoundingClientRect(),w=(0,l.getPaddingAndBorder)(I);return t.getThumbs().map(function(M,B){var R={x:0,y:0},D=M.getBoundingClientRect(),j=(0,l.getMargin)(M);switch(c){case g.Direction.Right:return R.x=(j.left+w.left)*-1,R.y=((D.height-O.height)/2+w.top)*-1,R.x+=O.width*(0,l.relativeValue)(f[B],b,k)-D.width/2,R;case g.Direction.Left:return R.x=(j.right+w.right)*-1,R.y=((D.height-O.height)/2+w.top)*-1,R.x+=O.width-O.width*(0,l.relativeValue)(f[B],b,k)-D.width/2,R;case g.Direction.Up:return R.x=((D.width-O.width)/2+j.left+w.left)*-1,R.y=-w.left,R.y+=O.height-O.height*(0,l.relativeValue)(f[B],b,k)-D.height/2,R;case g.Direction.Down:return R.x=((D.width-O.width)/2+j.left+w.left)*-1,R.y=-w.left,R.y+=O.height*(0,l.relativeValue)(f[B],b,k)-D.height/2,R;default:return(0,l.assertUnreachable)(c)}})},t.getThumbs=function(){return t.trackRef&&t.trackRef.current?Array.from(t.trackRef.current.children).filter(function(a){return a.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},t.getTargetIndex=function(a){return t.getThumbs().findIndex(function(c){return c===a.target||c.contains(a.target)})},t.addTouchEvents=function(a){document.addEventListener("touchmove",t.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",t.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",t.schdOnEnd,{passive:!1})},t.addMouseEvents=function(a){document.addEventListener("mousemove",t.schdOnMouseMove),document.addEventListener("mouseup",t.schdOnEnd)},t.onMouseDownTrack=function(a){var c;if(!(a.button!==0||(0,l.isIOS)()))if(a.persist(),a.preventDefault(),t.addMouseEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(b){var k;return(k=b.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return t.onMove(a.clientX,a.clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(b){return b.current}),a.clientX,a.clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.clientX,a.clientY)})}},t.onResize=function(){(0,l.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(a){var c;if(a.persist(),t.addTouchEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(b){var k;return(k=b.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(b){return b.current}),a.touches[0].clientX,a.touches[0].clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},t.onMouseOrTouchStart=function(a){if(!t.props.disabled){var c=(0,l.isTouchEvent)(a);if(!(!c&&a.button!==0)){var f=t.getTargetIndex(a);f!==-1&&(c?t.addTouchEvents(a):t.addMouseEvents(a),t.setState({draggedThumbIndex:f,thumbZIndexes:t.state.thumbZIndexes.map(function(b,k){return k===f?Math.max.apply(Math,t.state.thumbZIndexes):b<=t.state.thumbZIndexes[f]?b:b-1})}))}}},t.onMouseMove=function(a){a.preventDefault(),t.onMove(a.clientX,a.clientY)},t.onTouchMove=function(a){a.preventDefault(),t.onMove(a.touches[0].clientX,a.touches[0].clientY)},t.onKeyDown=function(a){var c=t.props,f=c.values,b=c.onChange,k=c.step,I=c.rtl,O=c.direction,w=t.state.isChanged,M=t.getTargetIndex(a.nativeEvent),B=I||O===g.Direction.Left||O===g.Direction.Down?-1:1;M!==-1&&(F.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),b((0,l.replaceAt)(f,M,t.normalizeValue(f[M]+B*(a.key==="PageUp"?k*10:k),M)))):$.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),b((0,l.replaceAt)(f,M,t.normalizeValue(f[M]-B*(a.key==="PageDown"?k*10:k),M)))):a.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){w&&t.fireOnFinalChange()}):w&&t.fireOnFinalChange())},t.onKeyUp=function(a){var c=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){c&&t.fireOnFinalChange()})},t.onMove=function(a,c){var f=t.state,b=f.draggedThumbIndex,k=f.draggedTrackPos,I=t.props,O=I.direction,w=I.min,M=I.max,B=I.onChange,R=I.values,D=I.step,j=I.rtl;if(b===-1&&k[0]===-1&&k[1]===-1)return null;var i=t.trackRef.current;if(!i)return null;var s=i.getBoundingClientRect(),u=(0,l.isVertical)(O)?s.height:s.width;if(k[0]!==-1&&k[1]!==-1){var h=a-k[0],m=c-k[1],v=0;switch(O){case g.Direction.Right:case g.Direction.Left:v=h/u*(M-w);break;case g.Direction.Down:case g.Direction.Up:v=m/u*(M-w);break;default:(0,l.assertUnreachable)(O)}if(j&&(v*=-1),Math.abs(v)>=D/2){for(var T=0;T<t.thumbRefs.length;T++){if(R[T]===M&&Math.sign(v)===1||R[T]===w&&Math.sign(v)===-1)return;var _=R[T]+v;_>M?v=M-R[T]:_<w&&(v=w-R[T])}for(var P=R.slice(0),T=0;T<t.thumbRefs.length;T++)P=(0,l.replaceAt)(P,T,t.normalizeValue(R[T]+v,T));t.setState({draggedTrackPos:[a,c]}),B(P)}}else{var C=0;switch(O){case g.Direction.Right:C=(a-s.left)/u*(M-w)+w;break;case g.Direction.Left:C=(u-(a-s.left))/u*(M-w)+w;break;case g.Direction.Down:C=(c-s.top)/u*(M-w)+w;break;case g.Direction.Up:C=(u-(c-s.top))/u*(M-w)+w;break;default:(0,l.assertUnreachable)(O)}j&&(C=M+w-C),Math.abs(R[b]-C)>=D/2&&B((0,l.replaceAt)(R,b,t.normalizeValue(C,b)))}},t.normalizeValue=function(a,c){var f=t.props,b=f.min,k=f.max,I=f.step,O=f.allowOverlap,w=f.values;return(0,l.normalizeValue)(a,c,b,k,I,O,w)},t.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var a=t.props,c=a.onFinalChange,f=a.values;c&&c(f)},t.updateMarkRefs=function(a){if(!a.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(a.max-a.min)/t.props.step,t.markRefs=[];for(var c=0;c<t.numOfMarks+1;c++)t.markRefs[c]=S.createRef()},t.calculateMarkOffsets=function(){if(!(!t.props.renderMark||!t.trackRef||!t.numOfMarks||!t.markRefs||t.trackRef.current===null)){for(var a=window.getComputedStyle(t.trackRef.current),c=parseInt(a.width,10),f=parseInt(a.height,10),b=parseInt(a.paddingLeft,10),k=parseInt(a.paddingTop,10),I=[],O=0;O<t.numOfMarks+1;O++){var w=9999,M=9999;if(t.markRefs[O].current){var B=t.markRefs[O].current.getBoundingClientRect();w=B.height,M=B.width}t.props.direction===g.Direction.Left||t.props.direction===g.Direction.Right?I.push([Math.round(c/t.numOfMarks*O+b-M/2),-Math.round((w-f)/2)]):I.push([Math.round(f/t.numOfMarks*O+k-w/2),-Math.round((M-c)/2)])}t.setState({markOffsets:I})}},d.step===0)throw new Error('"step" property should be a positive number');return t.schdOnMouseMove=(0,l.schd)(t.onMouseMove),t.schdOnTouchMove=(0,l.schd)(t.onTouchMove),t.schdOnEnd=(0,l.schd)(t.onEnd),t.thumbRefs=d.values.map(function(){return S.createRef()}),t.updateMarkRefs(d),t}return y.prototype.componentDidMount=function(){var d=this,t=this.props,a=t.values,c=t.min,f=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",d.onResize)},unobserve:function(){return window.removeEventListener("resize",d.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,l.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(b){return(0,l.checkBoundaries)(b,d.props.min,d.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(b){(0,l.isStepDivisible)(c,b,f)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},y.prototype.componentDidUpdate=function(d,t){var a=this.props,c=a.max,f=a.min,b=a.step,k=a.values,I=a.rtl;(d.max!==c||d.min!==f||d.step!==b)&&this.updateMarkRefs(this.props),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),I),(d.max!==c||d.min!==f||d.step!==b||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),k.forEach(function(O){(0,l.isStepDivisible)(f,O,b)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},y.prototype.componentWillUnmount=function(){var d={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,d),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},y.prototype.render=function(){var d=this,t=this.props,a=t.label,c=t.labelledBy,f=t.renderTrack,b=t.renderThumb,k=t.renderMark,I=k===void 0?function(){return null}:k,O=t.values,w=t.min,M=t.max,B=t.allowOverlap,R=t.disabled,D=this.state,j=D.draggedThumbIndex,i=D.thumbZIndexes,s=D.markOffsets;return f({props:{style:{transform:"scale(1)",cursor:j>-1?"grabbing":this.props.draggableTrack?(0,l.isVertical)(this.props.direction)?"ns-resize":"ew-resize":O.length===1&&!R?"pointer":"inherit"},onMouseDown:R?l.voidFn:this.onMouseDownTrack,onTouchStart:R?l.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:R,children:p(p([],s.map(function(u,h,m){return I({props:{style:d.props.direction===g.Direction.Left||d.props.direction===g.Direction.Right?{position:"absolute",left:"".concat(u[0],"px"),marginTop:"".concat(u[1],"px")}:{position:"absolute",top:"".concat(u[0],"px"),marginLeft:"".concat(u[1],"px")},key:"mark".concat(h),ref:d.markRefs[h]},index:h})}),!0),O.map(function(u,h){var m=d.state.draggedThumbIndex===h;return b({index:h,value:u,isDragged:m,props:{style:{position:"absolute",zIndex:i[h],cursor:R?"inherit":m?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:h,tabIndex:R?void 0:0,"aria-valuemax":B?M:O[h+1]||M,"aria-valuemin":B?w:O[h-1]||w,"aria-valuenow":u,draggable:!1,ref:d.thumbRefs[h],"aria-label":a,"aria-labelledby":c,role:"slider",onKeyDown:R?l.voidFn:d.onKeyDown,onKeyUp:R?l.voidFn:d.onKeyUp}})}),!0)})},y.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:g.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},y})(S.Component);return H.default=V,H}var We;function It(){return We||(We=1,(function(e){var r=se&&se.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0;var n=r(xt());e.Range=n.default;var o=Ze();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return o.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return o.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return o.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return o.checkValuesAgainstBoundaries}});var p=Ie();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return p.Direction}})})(se)),se}var Ge=It();function qe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(p){return Object.getOwnPropertyDescriptor(e,p).enumerable})),n.push.apply(n,o)}return n}function ve(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(n),!0).forEach(function(o){Ct(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Ct(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var be=J("div",{position:"relative",width:"100%"});be.displayName="Root";be.displayName="Root";be.displayName="StyledRoot";var ye=J("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,p=e.$disabled,S=e.$isDragged,l=r.sizing,g="inherit";return p?g="not-allowed":S?g="grabbing":o.length===1&&(g="pointer"),{paddingTop:l.scale600,paddingBottom:l.scale600,paddingRight:l.scale600,paddingLeft:l.scale600,display:"flex",cursor:g,backgroundColor:r.colors.sliderTrackFill}});ye.displayName="Track";ye.displayName="Track";ye.displayName="StyledTrack";var Te=J("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,p=e.$min,S=e.$max,l=e.$disabled,g=r.colors,F=r.borders,$=r.direction,V=r.borders.useRoundedCorners?F.radius100:0;return{borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,background:Ge.getTrackBackground({values:o,colors:o.length===1?[l?g.borderOpaque:g.primary,l?g.backgroundSecondary:g.borderOpaque]:[l?g.backgroundSecondary:g.borderOpaque,l?g.borderOpaque:g.primary,l?g.backgroundSecondary:g.borderOpaque],min:p||0,max:S||0,rtl:$==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:l?"not-allowed":"inherit"}});Te.displayName="InnerTrack";Te.displayName="InnerTrack";Te.displayName="StyledInnerTrack";var ke=J("div",function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}});ke.displayName="Mark";ke.displayName="Mark";ke.displayName="StyledMark";var Oe=J("div",function(e){return ve(ve({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});Oe.displayName="Tick";Oe.displayName="Tick";Oe.displayName="StyledTick";var we=J("div",function(e){var r=e.$theme,n=r.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:n.scale600,paddingLeft:n.scale600,paddingBottom:n.scale400}});we.displayName="TickBar";we.displayName="TickBar";we.displayName="StyledTickBar";var Re=J("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,p=e.$thumbIndex,S=e.$disabled,l=o.length===2&&p===0,g=o.length===2&&p===1;return r.direction==="rtl"&&(g||l)&&(l=!l,g=!g),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:S?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleFill,outline:"none",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(r.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:S?"not-allowed":"inherit"}});Re.displayName="Thumb";Re.displayName="Thumb";Re.displayName="StyledThumb";var Se=J("div",function(e){var r=e.$disabled,n=e.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});Se.displayName="InnerThumb";Se.displayName="InnerThumb";Se.displayName="StyledInnerThumb";var Me=J("div",function(e){var r=e.$disabled,n=e.$theme;return ve(ve({position:"absolute",top:"-".concat(n.sizing.scale1400)},n.typography.font200),{},{backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill,color:n.colors.contentInversePrimary,paddingLeft:n.sizing.scale600,paddingRight:n.sizing.scale600,paddingTop:n.sizing.scale500,paddingBottom:n.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});Me.displayName="ThumbValue";Me.displayName="ThumbValue";Me.displayName="StyledThumbValue";function Ke(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(p){return Object.getOwnPropertyDescriptor(e,p).enumerable})),n.push.apply(n,o)}return n}function Dt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ke(Object(n),!0).forEach(function(o){Pt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Pt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function X(){return X=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},X.apply(this,arguments)}function K(e,r){return jt(e)||Lt(e,r)||At(e,r)||Bt()}function Bt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function At(e,r){if(e){if(typeof e=="string")return Xe(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xe(e,r)}}function Xe(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,o=new Array(r);n<r;n++)o[n]=e[n];return o}function Lt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o=[],p=!0,S=!1,l,g;try{for(n=n.call(e);!(p=(l=n.next()).done)&&(o.push(l.value),!(r&&o.length===r));p=!0);}catch(F){S=!0,g=F}finally{try{!p&&n.return!=null&&n.return()}finally{if(S)throw g}}return o}}function jt(e){if(Array.isArray(e))return e}var Ft=function(r){if(r.length>2||r.length===0)throw new Error("the value prop represents positions of thumbs, so its length can be only one or two");return r};function $t(e){var r=e.overrides,n=r===void 0?{}:r,o=e.disabled,p=o===void 0?!1:o,S=e.marks,l=S===void 0?!1:S,g=e.onChange,F=g===void 0?function(){}:g,$=e.onFinalChange,V=$===void 0?function(){}:$,E=e.min,y=E===void 0?0:E,d=e.max,t=d===void 0?100:d,a=e.step,c=a===void 0?1:a,f=e.persistentThumb,b=f===void 0?!1:f,k=e.valueToLabel,I=k===void 0?function(Y){return Y}:k,O=e.value,w=x.useContext(pt),M=x.useState(!1),B=K(M,2),R=B[0],D=B[1],j=x.useState(!1),i=K(j,2),s=i[0],u=i[1],h=x.useState(!1),m=K(h,2),v=m[0],T=m[1],_=x.useState(-1),P=K(_,2),C=P[0],U=P[1],z=x.useCallback(function(Y){vt(Y)&&T(!0);var N=Y.target.parentNode.firstChild===Y.target?0:1;U(N)},[]),W=x.useCallback(function(Y){v!==!1&&T(!1),U(-1)},[]),A=Ft(O),L={$disabled:p,$step:c,$min:y,$max:t,$marks:l,$value:A,$isFocusVisible:v},G=Q(n.Root,be),ne=K(G,2),le=ne[0],ee=ne[1],de=Q(n.Track,ye),fe=K(de,2),he=fe[0],_e=fe[1],te=Q(n.InnerTrack,Te),oe=K(te,2),ge=oe[0],pe=oe[1],Qe=Q(n.Thumb,Re),Ce=K(Qe,2),Je=Ce[0],et=Ce[1],tt=Q(n.InnerThumb,Se),De=K(tt,2),rt=De[0],nt=De[1],at=Q(n.ThumbValue,Me),Pe=K(at,2),it=Pe[0],ot=Pe[1],st=Q(n.Tick,Oe),Be=K(st,2),Ae=Be[0],Le=Be[1],ut=Q(n.TickBar,we),je=K(ut,2),ct=je[0],lt=je[1],dt=Q(n.Mark,ke),Fe=K(dt,2),ft=Fe[0],ht=Fe[1];return x.createElement(le,X({"data-baseweb":"slider"},L,ee,{onFocus:bt(ee,z),onBlur:mt(ee,W)}),x.createElement(Ge.Range,X({step:c,min:y,max:t,values:A,disabled:p,onChange:function(N){return F({value:N})},onFinalChange:function(N){return V({value:N})},rtl:w.direction==="rtl",renderTrack:function(N){var re=N.props,q=N.children,ae=N.isDragged;return x.createElement(he,X({onMouseDown:re.onMouseDown,onTouchStart:re.onTouchStart,$isDragged:ae},L,_e),x.createElement(ge,X({$isDragged:ae,ref:re.ref},L,pe),q))},renderThumb:function(N){var re=N.props,q=N.index,ae=N.isDragged,$e=b||(!!q&&s||!q&&R||ae)&&!p;return x.createElement(Je,X({},re,{onMouseEnter:function(){q===0?D(!0):u(!0)},onMouseLeave:function(){q===0?D(!1):u(!1)},$thumbIndex:q,$isDragged:ae,style:Dt({},re.style)},L,et,{$isFocusVisible:v&&C===q}),$e&&x.createElement(it,X({$thumbIndex:q,$isDragged:ae},L,ot),I(A[q])),$e&&x.createElement(rt,X({$thumbIndex:q,$isDragged:ae},L,nt)))}},l?{renderMark:function(N){var re=N.props,q=N.index;return x.createElement(ft,X({$markIndex:q},re,L,ht))}}:{})),x.createElement(ct,X({},L,lt),x.createElement(Ae,X({},L,Le),I(y)),x.createElement(Ae,X({},L,Le),I(t))))}const Vt=me("div",{target:"ew7r33m3"})({name:"bjn8wh",styles:"position:relative"}),zt=me("div",{target:"ew7r33m2"})(({disabled:e,theme:r,isDragged:n})=>({alignItems:"center",backgroundColor:e?r.colors.gray60:r.colors.primary,borderTopLeftRadius:"100%",borderTopRightRadius:"100%",borderBottomLeftRadius:"100%",borderBottomRightRadius:"100%",borderTopStyle:"none",borderBottomStyle:"none",borderRightStyle:"none",borderLeftStyle:"none",display:"flex",justifyContent:"center",height:r.sizes.sliderThumb,width:r.sizes.sliderThumb,boxShadow:n?`0 0 0 0.2rem ${Ve(r.colors.primary,.5)}`:"none",":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 0.2rem ${Ve(r.colors.primary,.5)}`}}),""),Nt=me("div",{target:"ew7r33m1"})(({disabled:e,theme:r})=>({fontFamily:r.genericFonts.bodyFont,fontSize:r.fontSizes.sm,color:e?r.colors.gray60:r.colors.primary,top:"-1.6em",position:"absolute",whiteSpace:"nowrap",backgroundColor:r.colors.transparent,lineHeight:r.lineHeights.base,fontWeight:r.fontWeights.normal,pointerEvents:"none"}),""),Ut=me("div",{target:"ew7r33m0"})(({theme:e,isHovered:r,isDisabled:n})=>({position:"absolute",left:0,right:0,top:"100%",display:"flex",justifyContent:"space-between",pointerEvents:"none",marginTop:`-${e.spacing.md}`,fontSize:e.fontSizes.sm,lineHeight:e.lineHeights.base,fontWeight:e.fontWeights.normal,color:n?e.colors.fadedText40:e.colors.fadedText60,opacity:r?1:0,transition:"opacity 70ms ease-in-out"}),"");function Ht({minLabel:e,maxLabel:r,isHovered:n,isDisabled:o}){return Z.jsxs(Ut,{"data-testid":"stSliderTickBar",isHovered:n,isDisabled:o,children:[Z.jsx("span",{children:e}),Z.jsx("span",{children:r})]})}function Wt({disabled:e,element:r,widgetMgr:n,fragmentId:o}){const[p,S]=Et({getStateFromWidgetMgr:qt,getDefaultStateFromProto:Kt,getCurrStateFromProto:Xt,updateWidgetMgrState:Yt,element:r,widgetMgr:n,fragmentId:o}),[l,g]=x.useState(p),[F,$]=x.useState(!1),[V,E]=x.useState(!1),y=x.useCallback(()=>$(!0),[]),d=x.useCallback(()=>$(!1),[]),t=x.useRef(null),[a]=x.useState([]),[c]=x.useState([]),f=Tt(),b=l.map(D=>xe(D,r)),k=xe(r.min,r),I=xe(r.max,r),O=r.label;x.useEffect(()=>{g(p)},[p]);const w=x.useCallback(({value:D})=>{S({value:D,fromUi:!0}),E(!1)},[S]),M=x.useCallback(({value:D})=>{g(D),E(!0)},[]),B=x.useCallback(x.forwardRef(function(j,i){const{$thumbIndex:s}=j,u=s||0;a[u]=i,c[u]||=x.createRef();const h=kt(j,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),m=b[u];return Z.jsx(zt,{...h,disabled:j.$disabled===!0,isDragged:j.$isDragged===!0,ref:a[u],"aria-valuetext":m,"aria-label":O,children:Z.jsx(Nt,{"data-testid":"stSliderThumbValue",disabled:j.$disabled===!0,ref:c[u],children:m})})}),[]);x.useEffect(()=>{c.map((h,m)=>{h.current&&(h.current.innerText=b[m])}),a.map((h,m)=>{h.current&&h.current.setAttribute("aria-valuetext",b[m])});const D=t.current??null,j=a[0].current,i=a[1]?.current,s=c[0].current,u=c[1]?.current;Qt(D,j,i,s,u)});const R=x.useCallback(({$disabled:D})=>({height:f.spacing.twoXS,...D?{background:f.colors.darkenedBgMix25}:{}}),[f.colors.darkenedBgMix25,f.spacing.twoXS]);return Z.jsxs(Vt,{ref:t,className:"stSlider","data-testid":"stSlider",onMouseEnter:y,onMouseLeave:d,children:[Z.jsx(Ot,{label:r.label,disabled:e,labelVisibility:wt(r.labelVisibility?.value),children:r.help&&Z.jsx(Rt,{children:Z.jsx(St,{content:r.help,placement:Mt.TOP_RIGHT})})}),Z.jsx($t,{min:r.min,max:r.max,step:r.step,value:Gt(l,r),onChange:M,onFinalChange:w,disabled:e,overrides:{Thumb:B,Track:{style:{backgroundColor:"none !important",paddingLeft:f.spacing.none,paddingRight:f.spacing.none,paddingTop:`calc((${f.sizes.minElementHeight} - ${f.spacing.twoXS}) / 2)`,paddingBottom:`calc((${f.sizes.minElementHeight} - ${f.spacing.twoXS}) / 2)`}},InnerTrack:{style:R},TickBar:{component:Ht,props:{minLabel:k,maxLabel:I,isHovered:F||V,isDisabled:e}}}})]})}function qt(e,r){return e.getDoubleArrayValue(r)}function Kt(e){return e.default}function Xt(e){return e.value}function Yt(e,r,n,o){r.setDoubleArrayValue(e,n.value,{fromUi:n.fromUi},o)}function Zt(e){const{dataType:r}=e;return r===Ee.DataType.DATETIME||r===Ee.DataType.DATE||r===Ee.DataType.TIME}function xe(e,r){const{format:n,options:o}=r;return Zt(r)?_t.utc(e/1e3).format(n):o.length>0?ze.sprintf(n,o[e]):ze.sprintf(n,e)}function Gt(e,r){const{min:n,max:o}=r;let p=e[0],S=e.length>1?e[1]:e[0];return p>S&&(p=S),p<n&&(p=n),p>o&&(p=o),S<n&&(S=n),S>o&&(S=o),e.length>1?[p,S]:[p]}function Qt(e,r,n,o,p){!e||!r||!o||(ie(e,r,o),n&&p&&(ie(e,n,p),Jt(e,r,n,o,p)))}function ie(e,r,n){const o=e.getBoundingClientRect(),p=r.getBoundingClientRect(),S=n.getBoundingClientRect(),l=p.left+p.width/2,g=l-S.width/2<o.left,F=l+S.width/2>o.right;n.style.left=g?"0":"",n.style.right=F?"0":""}function Jt(e,r,n,o,p){const l=e.getBoundingClientRect(),g=r.getBoundingClientRect(),F=n.getBoundingClientRect(),$=o.getBoundingClientRect(),V=p.getBoundingClientRect(),E=l.left+l.width/2,y=g.left+g.width/2,d=F.left+F.width/2,t=y-$.width/2>=l.left,a=d+V.width/2<=l.right,c=g.left-$.width>=l.left,f=F.right+V.width<=l.right,b=t?$.width/2:$.width,k=a?V.width/2:V.width,I=y+b;if(d-k-I>24){ie(e,r,o),ie(e,n,p);return}if(c&&f){o.style.left="",o.style.right=`${Math.round(g.width)}px`,p.style.left=`${Math.round(F.width)}px`,p.style.right="";return}y<E?(ie(e,r,o),p.style.left=`${Math.round(y+b+24-d)}px`,p.style.right=""):(ie(e,n,p),o.style.left="",o.style.right=`${-Math.round(d-k-24-y)}px`)}const ar=yt(x.memo(Wt));export{ar as default};
@@ -1 +1 @@
1
- import{s as C,r as n,u as W,M as I,N as O,O as V,j as r,W as j,l as H,Q as L,T as N,P,R as E,X as B,Y as F,Z as $}from"./index-wnKDraWU.js";import{u as k}from"./useBasicWidgetState-raTjAqZP.js";import"./FormClearHelper-CaLJK07N.js";const A=C("div",{target:"e6zijwc0"})(({theme:o})=>({"span[aria-disabled='true']":{background:o.colors.fadedText05}}),""),D=(o,t)=>o.getStringArrayValue(t),U=o=>o.default.map(t=>o.options[t])??null,Y=o=>o.rawValues??null,K=(o,t,a,l)=>{t.setStringArrayValue(o,a.value,{fromUi:a.fromUi},l)},X=o=>{const{element:t,widgetMgr:a,fragmentId:l}=o,e=W(),S=n.useContext(I),[i,d]=k({getStateFromWidgetMgr:D,getDefaultStateFromProto:U,getCurrStateFromProto:Y,updateWidgetMgrState:K,element:t,widgetMgr:a,fragmentId:l}),p=t.maxSelections>0&&i.length>=t.maxSelections,f=n.useMemo(()=>{if(t.maxSelections===0)return"No results";if(i.length===t.maxSelections){const s=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${s}. Remove an option first.`}return"No results"},[t.maxSelections,i.length]),u=n.useCallback(s=>{switch(s.type){case"remove":return O(i,s.option?.value);case"clear":return[];case"select":return i.concat([s.option?.value]);default:throw new Error(`State transition is unknown: ${s.type}`)}},[i]),b=n.useCallback(s=>{t.maxSelections&&s.type==="select"&&i.length>=t.maxSelections||d({value:u(s),fromUi:!0})},[t.maxSelections,u,d,i.length]),{options:x}=t,{placeholder:y,disabled:v,selectOptions:z,inputReadOnly:w,valuesToUiMulti:g,createFilterOptions:m}=V({options:x,isMulti:!0,acceptNewOptions:t.acceptNewOptions??!1,placeholderInput:t.placeholder}),M=n.useCallback((s,h)=>p?[]:m(i)(s,h),[m,p,i]),c=o.disabled||v,T=n.useMemo(()=>g(i),[g,i]),R=n.useMemo(()=>{const s=e.fontSizes.baseFontSize*1.6+14;return`${Math.round(s*4.25)}px`},[e.fontSizes.baseFontSize]);return r.jsxs("div",{className:"stMultiSelect","data-testid":"stMultiSelect",children:[r.jsx(j,{label:t.label,disabled:c,labelVisibility:H(t.labelVisibility?.value),children:t.help&&r.jsx(L,{children:r.jsx(N,{content:t.help,placement:P.TOP_RIGHT})})}),r.jsx(A,{children:r.jsx(E,{creatable:t.acceptNewOptions??!1,options:z,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:y,type:$.select,multi:!0,onChange:b,value:T,disabled:c,size:"compact",noResultsMsg:f,filterOptions:M,closeOnSelect:!1,ignoreCase:!1,overrides:{Popover:{props:{ignoreBoundary:S,overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:F,props:{style:{cursor:"pointer"},overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:{maxHeight:R,minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}},Placeholder:{style:()=>({flex:"inherit",color:c?e.colors.fadedText40:e.colors.fadedText60})},ValueContainer:{style:()=>({overflowY:"auto",paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.grayTextColor,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,cursor:"pointer",":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.grayTextColor}},Tag:{props:{overrides:{Root:{style:{fontWeight:e.fontWeights.normal,borderTopLeftRadius:e.radii.md,borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md,borderBottomLeftRadius:e.radii.md,fontSize:e.fontSizes.md,paddingLeft:e.spacing.sm,marginLeft:e.spacing.none,marginRight:e.spacing.sm,height:`calc(${e.sizes.minElementHeight} - 2 * ${e.spacing.xs})`,maxWidth:`calc(100% - ${e.spacing.lg})`,cursor:"default !important"}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"0.625em",height:"0.625em"}}}}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:e.fontSizes.sm}}}}},Input:{props:{readOnly:w}},Dropdown:{component:B}}})})]})},Z=n.memo(X);export{Z as default};
1
+ import{s as C,r as n,u as W,M as I,N as O,O as V,j as r,W as j,l as H,Q as L,T as N,P,R as E,X as B,Y as F,Z as $}from"./index-k4Zz_A0O.js";import{u as k}from"./useBasicWidgetState-CMQ4ds3J.js";import"./FormClearHelper-CXfZggoC.js";const A=C("div",{target:"e6zijwc0"})(({theme:o})=>({"span[aria-disabled='true']":{background:o.colors.fadedText05}}),""),D=(o,t)=>o.getStringArrayValue(t),U=o=>o.default.map(t=>o.options[t])??null,Y=o=>o.rawValues??null,K=(o,t,a,l)=>{t.setStringArrayValue(o,a.value,{fromUi:a.fromUi},l)},X=o=>{const{element:t,widgetMgr:a,fragmentId:l}=o,e=W(),S=n.useContext(I),[i,d]=k({getStateFromWidgetMgr:D,getDefaultStateFromProto:U,getCurrStateFromProto:Y,updateWidgetMgrState:K,element:t,widgetMgr:a,fragmentId:l}),p=t.maxSelections>0&&i.length>=t.maxSelections,f=n.useMemo(()=>{if(t.maxSelections===0)return"No results";if(i.length===t.maxSelections){const s=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${s}. Remove an option first.`}return"No results"},[t.maxSelections,i.length]),u=n.useCallback(s=>{switch(s.type){case"remove":return O(i,s.option?.value);case"clear":return[];case"select":return i.concat([s.option?.value]);default:throw new Error(`State transition is unknown: ${s.type}`)}},[i]),b=n.useCallback(s=>{t.maxSelections&&s.type==="select"&&i.length>=t.maxSelections||d({value:u(s),fromUi:!0})},[t.maxSelections,u,d,i.length]),{options:x}=t,{placeholder:y,disabled:v,selectOptions:z,inputReadOnly:w,valuesToUiMulti:g,createFilterOptions:m}=V({options:x,isMulti:!0,acceptNewOptions:t.acceptNewOptions??!1,placeholderInput:t.placeholder}),M=n.useCallback((s,h)=>p?[]:m(i)(s,h),[m,p,i]),c=o.disabled||v,T=n.useMemo(()=>g(i),[g,i]),R=n.useMemo(()=>{const s=e.fontSizes.baseFontSize*1.6+14;return`${Math.round(s*4.25)}px`},[e.fontSizes.baseFontSize]);return r.jsxs("div",{className:"stMultiSelect","data-testid":"stMultiSelect",children:[r.jsx(j,{label:t.label,disabled:c,labelVisibility:H(t.labelVisibility?.value),children:t.help&&r.jsx(L,{children:r.jsx(N,{content:t.help,placement:P.TOP_RIGHT})})}),r.jsx(A,{children:r.jsx(E,{creatable:t.acceptNewOptions??!1,options:z,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:y,type:$.select,multi:!0,onChange:b,value:T,disabled:c,size:"compact",noResultsMsg:f,filterOptions:M,closeOnSelect:!1,ignoreCase:!1,overrides:{Popover:{props:{ignoreBoundary:S,overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:F,props:{style:{cursor:"pointer"},overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:{maxHeight:R,minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}},Placeholder:{style:()=>({flex:"inherit",color:c?e.colors.fadedText40:e.colors.fadedText60})},ValueContainer:{style:()=>({overflowY:"auto",paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.grayTextColor,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,cursor:"pointer",":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.grayTextColor}},Tag:{props:{overrides:{Root:{style:{fontWeight:e.fontWeights.normal,borderTopLeftRadius:e.radii.md,borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md,borderBottomLeftRadius:e.radii.md,fontSize:e.fontSizes.md,paddingLeft:e.spacing.sm,marginLeft:e.spacing.none,marginRight:e.spacing.sm,height:`calc(${e.sizes.minElementHeight} - 2 * ${e.spacing.xs})`,maxWidth:`calc(100% - ${e.spacing.lg})`,cursor:"default !important"}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"0.625em",height:"0.625em"}}}}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:e.fontSizes.sm}}}}},Input:{props:{readOnly:w}},Dropdown:{component:B}}})})]})},Z=n.memo(X);export{Z as default};