@stlite/desktop 0.79.5 → 0.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/build/assets/{FileDownload.esm-DJAez7Gm.js → FileDownload.esm-CGGZqf24.js} +1 -1
- package/build/assets/{FormClearHelper-BtlF8Otx.js → FormClearHelper-CgY1PHFo.js} +1 -1
- package/build/assets/{Hooks-DirHIiAM.js → Hooks-DSz3TreG.js} +1 -1
- package/build/assets/{InputInstructions-DJSzEvIq.js → InputInstructions-Da_XbwOd.js} +1 -1
- package/build/assets/{ProgressBar-BnrWSmyb.js → ProgressBar-Dtx4om_-.js} +1 -1
- package/build/assets/{RenderInPortalIfExists-Ca4-_0pe.js → RenderInPortalIfExists-CGcG4XZP.js} +1 -1
- package/build/assets/{Toolbar-BsqjDjhG.js → Toolbar-FcJw8P3i.js} +1 -1
- package/build/assets/{base-input-CgYn_7GU.js → base-input-CmONXDO4.js} +1 -1
- package/build/assets/{createSuper-0pNNY1_M.js → createSuper-DFd_7HWg.js} +1 -1
- package/build/assets/{data-grid-overlay-editor-CNFkKj8T.js → data-grid-overlay-editor-QBvhT7Gv.js} +1 -1
- package/build/assets/{downloader-DGmYJOpb.js → downloader-CMM-05VD.js} +1 -1
- package/build/assets/{es6-irkMYhr9.js → es6-DhhL9D4J.js} +2 -2
- package/build/assets/{getPrototypeOf-D0_3wfU4.js → getPrototypeOf-BuqC2LfE.js} +1 -1
- package/build/assets/{iframeResizer.contentWindow-D4yL-VeT.js → iframeResizer.contentWindow-YHmj42JB.js} +1 -1
- package/build/assets/{index-I5lK7nyO.js → index-8APIqgoz.js} +1 -1
- package/build/assets/{index-Dx6YQ-Hb.js → index-B-eWDw1Y.js} +1 -1
- package/build/assets/{index-DrFZgW3n.js → index-B234xKIE.js} +1 -1
- package/build/assets/{index-D2eWP7lT.js → index-B4n5HlkF.js} +1 -1
- package/build/assets/{index-DlLUjT1S.js → index-B525bGzJ.js} +1 -1
- package/build/assets/{index-ZUNcqgeq.js → index-BVUe3D3r.js} +5 -5
- package/build/assets/{index-Hu3FoAZP.js → index-BZSCrRo-.js} +1 -1
- package/build/assets/{index-CcWWS1JT.js → index-B_Id9-1s.js} +1 -1
- package/build/assets/{index-Pb86pUMm.js → index-Bdf8V5aG.js} +1 -1
- package/build/assets/{index-BFCLs_X3.js → index-BjWJFoG-.js} +1 -1
- package/build/assets/{index-C1elUt1E.js → index-BwjoUCNo.js} +4 -4
- package/build/assets/{index-DEXFHxro.js → index-C2H2QMCy.js} +1 -1
- package/build/assets/{index-YUTOpyBs.js → index-C4T9lB1B.js} +1 -1
- package/build/assets/{index-DBLWtqmb.js → index-CF-qa2K-.js} +1 -1
- package/build/assets/{index-ce2FoF0m.js → index-CU_ErDon.js} +1 -1
- package/build/assets/{index-BcpEGcBW.js → index-CVDdljau.js} +1 -1
- package/build/assets/{index-ChM6SngL.js → index-CVlJl5rr.js} +1 -1
- package/build/assets/{index-BFkh2EDe.js → index-CclTmpN7.js} +1 -1
- package/build/assets/{index-gVtKu3MD.js → index-Cx5RDj1j.js} +1 -1
- package/build/assets/{index-DE-qBTEd.js → index-D26NtueC.js} +1 -1
- package/build/assets/{index-Bo6fA87g.js → index-D4RoBA_O.js} +1 -1
- package/build/assets/{index-xxcWnwsb.js → index-DDdbfcty.js} +1 -1
- package/build/assets/{index-BQ4RtD02.js → index-DJR_P__y.js} +1 -1
- package/build/assets/{index-BByqVhYh.js → index-DVwGEZVS.js} +1 -1
- package/build/assets/{index-DVxRcwZL.js → index-DWYLSf3l.js} +1 -1
- package/build/assets/{index-DUZJI1KN.js → index-DYYkHfIj.js} +1 -1
- package/build/assets/{index-w3QLWMIe.js → index-D_v8mdkx.js} +1 -1
- package/build/assets/{index-ItgUgpY7.js → index-DdyJvCFp.js} +1 -1
- package/build/assets/{index-DmCANcEY.js → index-Ez6wOCxn.js} +1 -1
- package/build/assets/{index-BM4uLW3s.js → index-RsmuLiMj.js} +1 -1
- package/build/assets/{index-BXRfu-ak.js → index-Z97zCVlB.js} +1 -1
- package/build/assets/{index-CbfNI9jm.js → index-hYugbL4y.js} +1 -1
- package/build/assets/{index-zflrmcBt.js → index-owAG4lAc.js} +1 -1
- package/build/assets/{index-BKdmDn79.js → index-tPM7YhKy.js} +1 -1
- package/build/assets/{index-DWA8E9x2.js → index-vzzDJjGk.js} +1 -1
- package/build/assets/{index-m1mIjWp5.js → index-xwpN0M9S.js} +1 -1
- package/build/assets/{index-BVyxD_B8.js → index-zxdZLnOx.js} +1 -1
- package/build/assets/{input-i4Ci2N7G.js → input-uWrlyNdh.js} +1 -1
- package/build/assets/{memory-BfVZ1OlY.js → memory-C3YA36Ob.js} +1 -1
- package/build/assets/{number-overlay-editor-DZNxupwD.js → number-overlay-editor-cdMzdt98.js} +1 -1
- package/build/assets/{sandbox-C-kTFbag.js → sandbox-nkebs-Xk.js} +1 -1
- package/build/assets/{slicedToArray--nOyZAEU.js → slicedToArray-bge8IXL1.js} +1 -1
- package/build/assets/{textarea-CpIIPJux.js → textarea-BRC6-IPU.js} +1 -1
- package/build/assets/{timepicker-BNPmfeK3.js → timepicker-clKKYW7X.js} +1 -1
- package/build/assets/{uniqueId-BfZwKZCM.js → uniqueId-CyfnMhlx.js} +1 -1
- package/build/assets/{useBasicWidgetState-D4lxC36U.js → useBasicWidgetState-DYDJWF1h.js} +1 -1
- package/build/assets/{useOnInputChange-BtQcqF3z.js → useOnInputChange-Bri4Ggii.js} +1 -1
- package/build/assets/{withFullScreenWrapper-Cn2wnMdj.js → withFullScreenWrapper-CkF8UtaI.js} +1 -1
- package/build/assets/{worker-CzOlZWlF.js → worker-DYZLk67q.js} +1 -1
- package/build/index.html +1 -1
- package/build/pyodide/pyodide-lock.json +1 -1
- package/build/pyodide/pyodide.asm.js +1 -1
- package/build/pyodide/pyodide.asm.wasm +0 -0
- package/build/pyodide/pyodide.mjs +2 -2
- package/build/pyodide/python_stdlib.zip +0 -0
- package/package.json +7 -7
- package/wheels/streamlit-1.41.0-cp312-none-any.whl +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,ak as y,r as s,j as i,al as w,a2 as S,am as t,an as T,ao as v,a5 as z}from"./index-
|
|
1
|
+
import{c as p,ak as y,r as s,j as i,al as w,a2 as S,am as t,an as T,ao as v,a5 as z}from"./index-BwjoUCNo.js";const R=p("button",{target:"elibz2u3"})(({theme:e})=>({fontSize:e.fontSizes.sm,lineHeight:e.lineHeights.base,color:e.colors.fadedText60,backgroundColor:e.colors.transparent,fontFamily:"inherit",margin:e.spacing.none,border:"none",boxShadow:"none",padding:e.spacing.none,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:e.colors.primary}}),""),j=p("div",{target:"elibz2u2"})(({theme:e})=>({display:"flex",flexDirection:"row",gap:e.spacing.lg,"> span":{marginTop:e.spacing.twoXS}}),""),k=p("div",{target:"elibz2u0"})(({theme:e})=>({display:"flex",flexDirection:"column",gap:e.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:e.fontSizes.sm,lineHeight:e.lineHeights.base,div:{display:"inline-flex"}}),"");function B(e){const o=z(e);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:e.spacing.md,width:e.sizes.toastWidth,marginTop:e.spacing.sm,borderTopLeftRadius:e.radii.default,borderTopRightRadius:e.radii.default,borderBottomLeftRadius:e.radii.default,borderBottomRightRadius:e.radii.default,paddingTop:e.spacing.lg,paddingBottom:e.spacing.lg,paddingLeft:e.spacing.twoXL,paddingRight:e.spacing.twoXL,backgroundColor:o?e.colors.gray10:e.colors.gray90,color:e.colors.bodyText,boxShadow:o?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:e.colors.fadedText40,width:e.fontSizes.lg,height:e.fontSizes.lg,marginRight:`calc(-1 * ${e.spacing.lg} / 2)`,":hover":{color:e.colors.bodyText}}}}}function C(e){if(e.length>104){let o=e.replace(/^(.{104}[^\s]*).*/,"$1");return o.length>104&&(o=o.substring(0,104).split(" ").slice(0,-1).join(" ")),o.trim()}return e}function L({theme:e,body:o,icon:n,width:h}){const r=C(o),d=o!==r,[a,m]=s.useState(!d),[u,b]=s.useState(0),f=s.useCallback(()=>{m(!a)},[a]),l=s.useMemo(()=>B(e),[e]),c=s.useMemo(()=>i.jsxs(j,{expanded:a,children:[n&&i.jsx(w,{iconValue:n,size:"xl",testid:"stToastDynamicIcon"}),i.jsxs(k,{children:[i.jsx(S,{source:a?o:r,allowHTML:!1,isToast:!0}),d&&i.jsx(R,{"data-testid":"stToastViewButton",onClick:f,children:a?"view less":"view more"})]})]}),[d,a,o,n,r,f]);s.useEffect(()=>{if(e.inSidebar)return;const g=t.info(c,{overrides:{...l}});return b(g),()=>{t.update(g,{overrides:{Body:{style:{transitionDuration:0}}}}),t.clear(g)}},[]),s.useEffect(()=>{t.update(u,{children:c,overrides:{...l}})},[u,c,l]);const x=i.jsx(T,{kind:v.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`.\n See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information.",width:h});return i.jsx(i.Fragment,{children:e.inSidebar&&x})}const D=y(L);export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as W,r,M as C,bw as T,bx as j,j as l,a_ as k,a$ as L,bc as $,b0 as V,aK as A,bv as N,by as B,br as H,ba as O,bz as P}from"./index-
|
|
1
|
+
import{c as W,r,M as C,bw as T,bx as j,j as l,a_ as k,a$ as L,bc as $,b0 as V,aK as A,bv as N,by as B,br as H,ba as O,bz as P}from"./index-BwjoUCNo.js";import{a as E}from"./useBasicWidgetState-DYDJWF1h.js";import"./FormClearHelper-CgY1PHFo.js";const F=W("div",{target:"e6zijwc0"})(({theme:o})=>({"span[aria-disabled='true']":{background:o.colors.fadedText05}}),""),G=(o,t)=>o.getIntArrayValue(t),K=o=>o.default??null,U=o=>o.value??null,D=(o,t,n,p)=>{t.setIntArrayValue(o,n.value,{fromUi:n.fromUi},p)},_=o=>{var S;const{element:t,widgetMgr:n,width:p,fragmentId:f}=o,e=C(),[s,m]=E({getStateFromWidgetMgr:G,getDefaultStateFromProto:K,getCurrStateFromProto:U,updateWidgetMgrState:D,element:t,widgetMgr:n,fragmentId:f}),u=t.maxSelections>0&&s.length>=t.maxSelections,y=r.useMemo(()=>{if(t.maxSelections===0)return"No results";if(s.length===t.maxSelections){const i=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${i}. Remove an option first.`}return"No results"},[t.maxSelections,s.length]),v=r.useMemo(()=>s.map(i=>{const a=t.options[i];return{value:i.toString(),label:a}}),[t.options,s]),h=r.useCallback(i=>{const a=()=>{var c;const g=(c=i.option)==null?void 0:c.value;return parseInt(g,10)};switch(i.type){case"remove":return T(s,a());case"clear":return[];case"select":return s.concat([a()]);default:throw new Error(`State transition is unknown: ${i.type}`)}},[s]),x=r.useCallback(i=>{t.maxSelections&&i.type==="select"&&s.length>=t.maxSelections||m({value:h(i),fromUi:!0})},[t.maxSelections,h,m,s.length]),z=r.useCallback((i,a)=>{if(u)return[];const g=i.filter(c=>!s.includes(Number(c.value)));return j(g,a)},[u,s]),w={width:p},{options:d}=t,b=d.length===0?!0:o.disabled,R=d.length===0?"No options to select.":t.placeholder,I=d.map((i,a)=>({label:i,value:a.toString()})),M=d.length>10;return l.jsxs("div",{className:"stMultiSelect","data-testid":"stMultiSelect",style:w,children:[l.jsx(k,{label:t.label,disabled:b,labelVisibility:L((S=t.labelVisibility)==null?void 0:S.value),children:t.help&&l.jsx($,{children:l.jsx(V,{content:t.help,placement:A.TOP_RIGHT})})}),l.jsx(F,{children:l.jsx(N,{options:I,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:R,type:B.select,multi:!0,onChange:x,value:v,disabled:b,size:"compact",noResultsMsg:y,filterOptions:z,closeOnSelect:!1,overrides:{SelectArrow:{component:H,props:{overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:{minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}},Placeholder:{style:()=>({flex:"inherit",opacity:"0.7"})},ValueContainer:{style:()=>({paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.darkGray,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.darkGray}},Tag:{props:{overrides:{Root:{style:{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})`}},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:O&&M===!1?"readonly":null}},Dropdown:{component:P}}})})]})},q=r.memo(_);export{q as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var eO=Object.defineProperty;var iO=(e,t,i)=>t in e?eO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var z=(e,t,i)=>iO(e,typeof t!="symbol"?t+"":t,i);var y5,mw;import{g as jf,r as re,U as Ge,p as Ht,e as JE,ap as fu,_ as YE,Z as rO,j as wr,aq as zy,ar as Uy,as as nO,at as oO,au as $E,a6 as sO,av as aO,aj as lO,c as tC,a5 as eC,aw as Gy,ax as iC,$ as cO,M as uO,ay as rC}from"./index-C1elUt1E.js";import{_ as Gn,C as hO}from"./slicedToArray--nOyZAEU.js";import{b as du,a as pu,_ as jy,c as Vf,d as Vy}from"./getPrototypeOf-D0_3wfU4.js";import{T as fO,a as dO}from"./Toolbar-BsqjDjhG.js";import{u as nC,E as oC,w as pO}from"./withFullScreenWrapper-Cn2wnMdj.js";import{u as AO}from"./useBasicWidgetState-D4lxC36U.js";import{c as gO}from"./_commonjs-dynamic-modules-TDtrdbi3.js";import{D as mO,C as _O}from"./threshold-C19zgWBv.js";import"./FormClearHelper-BtlF8Otx.js";import"./string-Bl9OLDCw.js";function yO(e,t){for(var i=0;i<t.length;i++){const r=t[i];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in e)){const s=Object.getOwnPropertyDescriptor(r,n);s&&Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}async function Hf(e,t,i,r){return r._parse(e,t,i,r)}function Gr(e,t){if(!e)throw new Error(t||"loader assertion failed.")}const K0=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),sC=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);sC&&parseFloat(sC[1]);const Q0=globalThis,Wf=globalThis.process||{},vO=globalThis.navigator||{};function aC(e){var i,r;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((r=process.versions)!=null&&r.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function Au(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||aC()}function bO(e){return Au()?aC()?"Electron":(vO.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const lC="4.0.7";function xO(e){try{const t=window[e],i="__storage_test__";return t.setItem(i,i),t.removeItem(i),t}catch{return null}}class wO{constructor(t,i,r="sessionStorage"){this.storage=xO(r),this.id=t,this.config=i,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){const i=JSON.stringify(this.config);this.storage.setItem(this.id,i)}}_loadConfiguration(){let t={};if(this.storage){const i=this.storage.getItem(this.id);t=i?JSON.parse(i):{}}return Object.assign(this.config,t),this}}function EO(e){let t;return e<10?t=`${e.toFixed(2)}ms`:e<100?t=`${e.toFixed(1)}ms`:e<1e3?t=`${e.toFixed(0)}ms`:t=`${(e/1e3).toFixed(2)}s`,t}function CO(e,t=8){const i=Math.max(t-e.length,0);return`${" ".repeat(i)}${e}`}var J0;(function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(J0||(J0={}));const SO=10;function cC(e){return typeof e!="string"?e:(e=e.toUpperCase(),J0[e]||J0.WHITE)}function TO(e,t,i){return!Au&&typeof e=="string"&&(t&&(e=`\x1B[${cC(t)}m${e}\x1B[39m`),i&&(e=`\x1B[${cC(i)+SO}m${e}\x1B[49m`)),e}function IO(e,t=["constructor"]){const i=Object.getPrototypeOf(e),r=Object.getOwnPropertyNames(i),n=e;for(const s of r){const o=n[s];typeof o=="function"&&(t.find(f=>s===f)||(n[s]=o.bind(e)))}}function Hy(e,t){if(!e)throw new Error("Assertion failed")}function qf(){var t,i,r;let e;if(Au()&&Q0.performance)e=(i=(t=Q0==null?void 0:Q0.performance)==null?void 0:t.now)==null?void 0:i.call(t);else if("hrtime"in Wf){const n=(r=Wf==null?void 0:Wf.hrtime)==null?void 0:r.call(Wf);e=n[0]*1e3+n[1]/1e6}else e=Date.now();return e}const Zf={debug:Au()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},PO={enabled:!0,level:0};function Xf(){}const uC={},hC={once:!0};class Kf{constructor({id:t}={id:""}){this.VERSION=lC,this._startTs=qf(),this._deltaTs=qf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new wO(`__probe-${this.id}__`,PO),this.timeStamp(`${this.id} started`),IO(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((qf()-this._startTs).toPrecision(10))}getDelta(){return Number((qf()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,i){this._storage.setConfiguration({[t]:i})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,i){if(!t)throw new Error(i||"Assertion failed")}warn(t){return this._getLogFunction(0,t,Zf.warn,arguments,hC)}error(t){return this._getLogFunction(0,t,Zf.error,arguments)}deprecated(t,i){return this.warn(`\`${t}\` is deprecated and will be removed in a later version. Use \`${i}\` instead`)}removed(t,i){return this.error(`\`${t}\` has been removed. Use \`${i}\` instead`)}probe(t,i){return this._getLogFunction(t,i,Zf.log,arguments,{time:!0,once:!0})}log(t,i){return this._getLogFunction(t,i,Zf.debug,arguments)}info(t,i){return this._getLogFunction(t,i,console.info,arguments)}once(t,i){return this._getLogFunction(t,i,Zf.debug||Zf.info,arguments,hC)}table(t,i,r){return i?this._getLogFunction(t,i,console.table||Xf,r&&[r],{tag:BO(i)}):Xf}time(t,i){return this._getLogFunction(t,i,console.time?console.time:console.info)}timeEnd(t,i){return this._getLogFunction(t,i,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,i){return this._getLogFunction(t,i,console.timeStamp||Xf)}group(t,i,r={collapsed:!1}){const n=dC({logLevel:t,message:i,opts:r}),{collapsed:s}=r;return n.method=(s?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(t,i,r={}){return this.group(t,i,Object.assign({},r,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||Xf)}withGroup(t,i,r){this.group(t,i)();try{r()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=fC(t)}_getLogFunction(t,i,r,n,s){if(this._shouldLog(t)){s=dC({logLevel:t,message:i,args:n,opts:s}),r=r||s.method,Hy(r),s.total=this.getTotal(),s.delta=this.getDelta(),this._deltaTs=qf();const o=s.tag||s.message;if(s.once&&o)if(!uC[o])uC[o]=qf();else return Xf;return i=MO(this.id,s.message,s),r.bind(console,i,...s.args)}return Xf}}Kf.VERSION=lC;function fC(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return Hy(Number.isFinite(t)&&t>=0),t}function dC(e){const{logLevel:t,message:i}=e;e.logLevel=fC(t);const r=e.args?Array.from(e.args):[];for(;r.length&&r.shift()!==i;);switch(typeof t){case"string":case"function":i!==void 0&&r.unshift(i),e.message=t;break;case"object":Object.assign(e,t);break}typeof e.message=="function"&&(e.message=e.message());const n=typeof e.message;return Hy(n==="string"||n==="object"),Object.assign(e,{args:r},e.opts)}function MO(e,t,i){if(typeof t=="string"){const r=i.time?CO(EO(i.total)):"";t=i.time?`${e}: ${r} ${t}`:`${e}: ${t}`,t=TO(t,i.color,i.background)}return t}function BO(e){for(const t in e)for(const i in e[t])return i||"untitled";return"empty"}globalThis.probe={};const pC=new Kf({id:"@probe.gl/log"}),Wy="4.3.1",RO=Wy[0]>="0"&&Wy[0]<="9"?`v${Wy}`:"";function LO(){const e=new Kf({id:"loaders.gl"});return globalThis.loaders=globalThis.loaders||{},globalThis.loaders.log=e,globalThis.loaders.version=RO,globalThis.probe=globalThis.probe||{},globalThis.probe.loaders=e,e}const AC=LO();function gC(e,t){return mC(e||{},t)}function mC(e,t,i=0){if(i>3)return t;const r={...e};for(const[n,s]of Object.entries(t))s&&typeof s=="object"&&!Array.isArray(s)?r[n]=mC(r[n]||{},t[n],i+1):r[n]=t[n];return r}function DO(e){var t;globalThis.loaders||(globalThis.loaders={}),(t=globalThis.loaders).modules||(t.modules={}),Object.assign(globalThis.loaders.modules,e)}function OO(e){var t,i;return((i=(t=globalThis.loaders)==null?void 0:t.modules)==null?void 0:i[e])||null}const kO="latest";function FO(){var e;return(e=globalThis._loadersgl_)!=null&&e.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.3.1"),globalThis._loadersgl_.version}const _C=FO();function Ac(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}const va=typeof process!="object"||String(process)!=="[object process]"||process.browser,qy=typeof importScripts=="function",NO=typeof window<"u"&&typeof window.orientation<"u",yC=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);yC&&parseFloat(yC[1]);class zO{constructor(t,i){z(this,"name");z(this,"workerThread");z(this,"isRunning",!0);z(this,"result");z(this,"_resolve",()=>{});z(this,"_reject",()=>{});this.name=t,this.workerThread=i,this.result=new Promise((r,n)=>{this._resolve=r,this._reject=n})}postMessage(t,i){this.workerThread.postMessage({source:"loaders.gl",type:t,payload:i})}done(t){Ac(this.isRunning),this.isRunning=!1,this._resolve(t)}error(t){Ac(this.isRunning),this.isRunning=!1,this._reject(t)}}class Zy{terminate(){}}const Xy=new Map;function UO(e){Ac(e.source&&!e.url||!e.source&&e.url);let t=Xy.get(e.source||e.url);return t||(e.url&&(t=GO(e.url),Xy.set(e.url,t)),e.source&&(t=vC(e.source),Xy.set(e.source,t))),Ac(t),t}function GO(e){if(!e.startsWith("http"))return e;const t=jO(e);return vC(t)}function vC(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function jO(e){return`try {
|
|
1
|
+
var eO=Object.defineProperty;var iO=(e,t,i)=>t in e?eO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var z=(e,t,i)=>iO(e,typeof t!="symbol"?t+"":t,i);var y5,mw;import{g as jf,r as re,U as Ge,p as Ht,e as JE,ap as fu,_ as YE,Z as rO,j as wr,aq as zy,ar as Uy,as as nO,at as oO,au as $E,a6 as sO,av as aO,aj as lO,c as tC,a5 as eC,aw as Gy,ax as iC,$ as cO,M as uO,ay as rC}from"./index-BwjoUCNo.js";import{_ as Gn,C as hO}from"./slicedToArray-bge8IXL1.js";import{b as du,a as pu,_ as jy,c as Vf,d as Vy}from"./getPrototypeOf-BuqC2LfE.js";import{T as fO,a as dO}from"./Toolbar-FcJw8P3i.js";import{u as nC,E as oC,w as pO}from"./withFullScreenWrapper-CkF8UtaI.js";import{u as AO}from"./useBasicWidgetState-DYDJWF1h.js";import{c as gO}from"./_commonjs-dynamic-modules-TDtrdbi3.js";import{D as mO,C as _O}from"./threshold-C19zgWBv.js";import"./FormClearHelper-CgY1PHFo.js";import"./string-Bl9OLDCw.js";function yO(e,t){for(var i=0;i<t.length;i++){const r=t[i];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in e)){const s=Object.getOwnPropertyDescriptor(r,n);s&&Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}async function Hf(e,t,i,r){return r._parse(e,t,i,r)}function Gr(e,t){if(!e)throw new Error(t||"loader assertion failed.")}const K0=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),sC=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);sC&&parseFloat(sC[1]);const Q0=globalThis,Wf=globalThis.process||{},vO=globalThis.navigator||{};function aC(e){var i,r;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((r=process.versions)!=null&&r.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function Au(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||aC()}function bO(e){return Au()?aC()?"Electron":(vO.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const lC="4.0.7";function xO(e){try{const t=window[e],i="__storage_test__";return t.setItem(i,i),t.removeItem(i),t}catch{return null}}class wO{constructor(t,i,r="sessionStorage"){this.storage=xO(r),this.id=t,this.config=i,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){const i=JSON.stringify(this.config);this.storage.setItem(this.id,i)}}_loadConfiguration(){let t={};if(this.storage){const i=this.storage.getItem(this.id);t=i?JSON.parse(i):{}}return Object.assign(this.config,t),this}}function EO(e){let t;return e<10?t=`${e.toFixed(2)}ms`:e<100?t=`${e.toFixed(1)}ms`:e<1e3?t=`${e.toFixed(0)}ms`:t=`${(e/1e3).toFixed(2)}s`,t}function CO(e,t=8){const i=Math.max(t-e.length,0);return`${" ".repeat(i)}${e}`}var J0;(function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(J0||(J0={}));const SO=10;function cC(e){return typeof e!="string"?e:(e=e.toUpperCase(),J0[e]||J0.WHITE)}function TO(e,t,i){return!Au&&typeof e=="string"&&(t&&(e=`\x1B[${cC(t)}m${e}\x1B[39m`),i&&(e=`\x1B[${cC(i)+SO}m${e}\x1B[49m`)),e}function IO(e,t=["constructor"]){const i=Object.getPrototypeOf(e),r=Object.getOwnPropertyNames(i),n=e;for(const s of r){const o=n[s];typeof o=="function"&&(t.find(f=>s===f)||(n[s]=o.bind(e)))}}function Hy(e,t){if(!e)throw new Error("Assertion failed")}function qf(){var t,i,r;let e;if(Au()&&Q0.performance)e=(i=(t=Q0==null?void 0:Q0.performance)==null?void 0:t.now)==null?void 0:i.call(t);else if("hrtime"in Wf){const n=(r=Wf==null?void 0:Wf.hrtime)==null?void 0:r.call(Wf);e=n[0]*1e3+n[1]/1e6}else e=Date.now();return e}const Zf={debug:Au()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},PO={enabled:!0,level:0};function Xf(){}const uC={},hC={once:!0};class Kf{constructor({id:t}={id:""}){this.VERSION=lC,this._startTs=qf(),this._deltaTs=qf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new wO(`__probe-${this.id}__`,PO),this.timeStamp(`${this.id} started`),IO(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((qf()-this._startTs).toPrecision(10))}getDelta(){return Number((qf()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,i){this._storage.setConfiguration({[t]:i})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,i){if(!t)throw new Error(i||"Assertion failed")}warn(t){return this._getLogFunction(0,t,Zf.warn,arguments,hC)}error(t){return this._getLogFunction(0,t,Zf.error,arguments)}deprecated(t,i){return this.warn(`\`${t}\` is deprecated and will be removed in a later version. Use \`${i}\` instead`)}removed(t,i){return this.error(`\`${t}\` has been removed. Use \`${i}\` instead`)}probe(t,i){return this._getLogFunction(t,i,Zf.log,arguments,{time:!0,once:!0})}log(t,i){return this._getLogFunction(t,i,Zf.debug,arguments)}info(t,i){return this._getLogFunction(t,i,console.info,arguments)}once(t,i){return this._getLogFunction(t,i,Zf.debug||Zf.info,arguments,hC)}table(t,i,r){return i?this._getLogFunction(t,i,console.table||Xf,r&&[r],{tag:BO(i)}):Xf}time(t,i){return this._getLogFunction(t,i,console.time?console.time:console.info)}timeEnd(t,i){return this._getLogFunction(t,i,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,i){return this._getLogFunction(t,i,console.timeStamp||Xf)}group(t,i,r={collapsed:!1}){const n=dC({logLevel:t,message:i,opts:r}),{collapsed:s}=r;return n.method=(s?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(t,i,r={}){return this.group(t,i,Object.assign({},r,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||Xf)}withGroup(t,i,r){this.group(t,i)();try{r()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=fC(t)}_getLogFunction(t,i,r,n,s){if(this._shouldLog(t)){s=dC({logLevel:t,message:i,args:n,opts:s}),r=r||s.method,Hy(r),s.total=this.getTotal(),s.delta=this.getDelta(),this._deltaTs=qf();const o=s.tag||s.message;if(s.once&&o)if(!uC[o])uC[o]=qf();else return Xf;return i=MO(this.id,s.message,s),r.bind(console,i,...s.args)}return Xf}}Kf.VERSION=lC;function fC(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return Hy(Number.isFinite(t)&&t>=0),t}function dC(e){const{logLevel:t,message:i}=e;e.logLevel=fC(t);const r=e.args?Array.from(e.args):[];for(;r.length&&r.shift()!==i;);switch(typeof t){case"string":case"function":i!==void 0&&r.unshift(i),e.message=t;break;case"object":Object.assign(e,t);break}typeof e.message=="function"&&(e.message=e.message());const n=typeof e.message;return Hy(n==="string"||n==="object"),Object.assign(e,{args:r},e.opts)}function MO(e,t,i){if(typeof t=="string"){const r=i.time?CO(EO(i.total)):"";t=i.time?`${e}: ${r} ${t}`:`${e}: ${t}`,t=TO(t,i.color,i.background)}return t}function BO(e){for(const t in e)for(const i in e[t])return i||"untitled";return"empty"}globalThis.probe={};const pC=new Kf({id:"@probe.gl/log"}),Wy="4.3.1",RO=Wy[0]>="0"&&Wy[0]<="9"?`v${Wy}`:"";function LO(){const e=new Kf({id:"loaders.gl"});return globalThis.loaders=globalThis.loaders||{},globalThis.loaders.log=e,globalThis.loaders.version=RO,globalThis.probe=globalThis.probe||{},globalThis.probe.loaders=e,e}const AC=LO();function gC(e,t){return mC(e||{},t)}function mC(e,t,i=0){if(i>3)return t;const r={...e};for(const[n,s]of Object.entries(t))s&&typeof s=="object"&&!Array.isArray(s)?r[n]=mC(r[n]||{},t[n],i+1):r[n]=t[n];return r}function DO(e){var t;globalThis.loaders||(globalThis.loaders={}),(t=globalThis.loaders).modules||(t.modules={}),Object.assign(globalThis.loaders.modules,e)}function OO(e){var t,i;return((i=(t=globalThis.loaders)==null?void 0:t.modules)==null?void 0:i[e])||null}const kO="latest";function FO(){var e;return(e=globalThis._loadersgl_)!=null&&e.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.3.1"),globalThis._loadersgl_.version}const _C=FO();function Ac(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}const va=typeof process!="object"||String(process)!=="[object process]"||process.browser,qy=typeof importScripts=="function",NO=typeof window<"u"&&typeof window.orientation<"u",yC=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);yC&&parseFloat(yC[1]);class zO{constructor(t,i){z(this,"name");z(this,"workerThread");z(this,"isRunning",!0);z(this,"result");z(this,"_resolve",()=>{});z(this,"_reject",()=>{});this.name=t,this.workerThread=i,this.result=new Promise((r,n)=>{this._resolve=r,this._reject=n})}postMessage(t,i){this.workerThread.postMessage({source:"loaders.gl",type:t,payload:i})}done(t){Ac(this.isRunning),this.isRunning=!1,this._resolve(t)}error(t){Ac(this.isRunning),this.isRunning=!1,this._reject(t)}}class Zy{terminate(){}}const Xy=new Map;function UO(e){Ac(e.source&&!e.url||!e.source&&e.url);let t=Xy.get(e.source||e.url);return t||(e.url&&(t=GO(e.url),Xy.set(e.url,t)),e.source&&(t=vC(e.source),Xy.set(e.source,t))),Ac(t),t}function GO(e){if(!e.startsWith("http"))return e;const t=jO(e);return vC(t)}function vC(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function jO(e){return`try {
|
|
2
2
|
importScripts('${e}');
|
|
3
3
|
} catch (error) {
|
|
4
4
|
console.error(error);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,E as _,_ as q,bS as Mt,bT as k,bU as U,bV as Rt,R as We,bW as d,c as m,j as c,aY as P,aX as J,aG as Q,aF as Bt,bX as Lt,bY as Tt,av as Vt,$ as Ht,aS as Nt,as as Ge,B as M,aU as $t,aT as Kt,a_ as Xt,a$ as Wt,bc as Gt,b0 as Yt,aK as _t}from"./index-
|
|
1
|
+
import{r as u,E as _,_ as q,bS as Mt,bT as k,bU as U,bV as Rt,R as We,bW as d,c as m,j as c,aY as P,aX as J,aG as Q,aF as Bt,bX as Lt,bY as Tt,av as Vt,$ as Ht,aS as Nt,as as Ge,B as M,aU as $t,aT as Kt,a_ as Xt,a$ as Wt,bc as Gt,b0 as Yt,aK as _t}from"./index-BwjoUCNo.js";import{F as qt}from"./FormClearHelper-CgY1PHFo.js";import{P as Jt,S as Qt}from"./ProgressBar-Dtx4om_-.js";import{u as Zt}from"./Hooks-DSz3TreG.js";import{U as Z}from"./UploadFileInfo-C-jY39rj.js";var Ye=u.forwardRef(function(e,n){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(_,q({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:n}),u.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),u.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});Ye.displayName="Clear";var _e=u.forwardRef(function(e,n){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(_,q({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:n}),u.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),u.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});_e.displayName="CloudUpload";var qe=u.forwardRef(function(e,n){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(_,q({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:n}),u.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});qe.displayName="Error";var Je=u.forwardRef(function(e,n){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(_,q({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:n}),u.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),u.createElement("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))});Je.displayName="InsertDriveFile";var R=(e=>(e.Gigabyte="gb",e.Megabyte="mb",e.Kilobyte="kb",e.Byte="b",e))(R||{});const Fe=Mt()?1024:1e3,ee=["gb","mb","kb","b"],te=(e,n,t=1)=>{if(n||(n="b"),t<0&&(t=0),e<0)throw new Error("Size must be greater than or equal to 0");const r=ee.indexOf(n),i=e/Fe;return r&&e>Fe/2?te(i,ee[r-1],t):`${e.toFixed(t)}${n.toUpperCase()}`},en=(e,n,t)=>{if(e<0)throw Error("Size must be 0 or greater");const r=ee.findIndex(s=>s===n),i=ee.findIndex(s=>s===t);if(r===-1||i===-1)throw Error("Unexpected byte unit provided");if(r===i)return e;const o=Math.abs(r-i),l=Fe**o;return r>i?e/l:e*l};var tn=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function T(e,n){var t=nn(e);if(typeof t.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(t,"path",{value:typeof n=="string"?n:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return t}function nn(e){var n=e.name,t=n&&n.lastIndexOf(".")!==-1;if(t&&!e.type){var r=n.split(".").pop().toLowerCase(),i=tn.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var rn=[".DS_Store","Thumbs.db"];function on(e){return k(this,void 0,void 0,function(){return U(this,function(n){return ne(e)&&an(e)?[2,un(e.dataTransfer,e.type)]:sn(e)?[2,ln(e)]:Array.isArray(e)&&e.every(function(t){return"getFile"in t&&typeof t.getFile=="function"})?[2,cn(e)]:[2,[]]})})}function an(e){return ne(e.dataTransfer)}function sn(e){return ne(e)&&ne(e.target)}function ne(e){return typeof e=="object"&&e!==null}function ln(e){return je(e.target.files).map(function(n){return T(n)})}function cn(e){return k(this,void 0,void 0,function(){var n;return U(this,function(t){switch(t.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return n=t.sent(),[2,n.map(function(r){return T(r)})]}})})}function un(e,n){return k(this,void 0,void 0,function(){var t,r;return U(this,function(i){switch(i.label){case 0:return e===null?[2,[]]:e.items?(t=je(e.items).filter(function(o){return o.kind==="file"}),n!=="drop"?[2,t]:[4,Promise.all(t.map(pn))]):[3,2];case 1:return r=i.sent(),[2,Qe(Ze(r))];case 2:return[2,Qe(je(e.files).map(function(o){return T(o)}))]}})})}function Qe(e){return e.filter(function(n){return rn.indexOf(n.name)===-1})}function je(e){if(e===null)return[];for(var n=[],t=0;t<e.length;t++){var r=e[t];n.push(r)}return n}function pn(e){if(typeof e.webkitGetAsEntry!="function")return et(e);var n=e.webkitGetAsEntry();return n&&n.isDirectory?tt(n):et(e)}function Ze(e){return e.reduce(function(n,t){return Rt(n,Array.isArray(t)?Ze(t):[t])},[])}function et(e){var n=e.getAsFile();if(!n)return Promise.reject(e+" is not a File");var t=T(n);return Promise.resolve(t)}function dn(e){return k(this,void 0,void 0,function(){return U(this,function(n){return[2,e.isDirectory?tt(e):fn(e)]})})}function tt(e){var n=e.createReader();return new Promise(function(t,r){var i=[];function o(){var l=this;n.readEntries(function(s){return k(l,void 0,void 0,function(){var f,h,w;return U(this,function(y){switch(y.label){case 0:if(s.length)return[3,5];y.label=1;case 1:return y.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return f=y.sent(),t(f),[3,4];case 3:return h=y.sent(),r(h),[3,4];case 4:return[3,6];case 5:w=Promise.all(s.map(dn)),i.push(w),o(),y.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function fn(e){return k(this,void 0,void 0,function(){return U(this,function(n){return[2,new Promise(function(t,r){e.file(function(i){var o=T(i,e.fullPath);t(o)},function(i){r(i)})})]})})}var gn=function(e,n){if(e&&n){var t=Array.isArray(n)?n:n.split(","),r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return t.some(function(l){var s=l.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function nt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,r)}return t}function rt(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?nt(Object(t),!0).forEach(function(r){it(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nt(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function it(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ot(e,n){return yn(e)||vn(e,n)||hn(e,n)||mn()}function mn(){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 hn(e,n){if(e){if(typeof e=="string")return at(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return at(e,n)}}function at(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function vn(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r=[],i=!0,o=!1,l,s;try{for(t=t.call(e);!(i=(l=t.next()).done)&&(r.push(l.value),!(n&&r.length===n));i=!0);}catch(f){o=!0,s=f}finally{try{!i&&t.return!=null&&t.return()}finally{if(o)throw s}}return r}}function yn(e){if(Array.isArray(e))return e}var bn="file-invalid-type",xn="file-too-large",wn="file-too-small",Fn="too-many-files",jn=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var n=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:bn,message:"File type must be ".concat(n)}},st=function(e){return{code:xn,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},lt=function(e){return{code:wn,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},Dn={code:Fn,message:"Too many files"};function ct(e,n){var t=e.type==="application/x-moz-file"||gn(e,n);return[t,t?null:jn(n)]}function ut(e,n,t){if(V(e.size))if(V(n)&&V(t)){if(e.size>t)return[!1,st(t)];if(e.size<n)return[!1,lt(n)]}else{if(V(n)&&e.size<n)return[!1,lt(n)];if(V(t)&&e.size>t)return[!1,st(t)]}return[!0,null]}function V(e){return e!=null}function Sn(e){var n=e.files,t=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,l=e.maxFiles;return!o&&n.length>1||o&&l>=1&&n.length>l?!1:n.every(function(s){var f=ct(s,t),h=ot(f,1),w=h[0],y=ut(s,r,i),z=ot(y,1),B=z[0];return w&&B})}function re(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ie(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(n){return n==="Files"||n==="application/x-moz-file"}):!!e.target&&!!e.target.files}function pt(e){e.preventDefault()}function zn(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function An(e){return e.indexOf("Edge/")!==-1}function On(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return zn(e)||An(e)}function S(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),l=1;l<i;l++)o[l-1]=arguments[l];return n.some(function(s){return!re(r)&&s&&s.apply(void 0,[r].concat(o)),re(r)})}}function En(){return"showOpenFilePicker"in window}function Cn(e){return e=typeof e=="string"?e.split(","):e,[{description:"everything",accept:Array.isArray(e)?e.filter(function(n){return n==="audio/*"||n==="video/*"||n==="image/*"||n==="text/*"||/\w+\/[-+.\w]+/g.test(n)}).reduce(function(n,t){return rt(rt({},n),{},it({},t,[]))},{}):{}}]}function In(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function kn(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}var Un=["children"],Pn=["open"],Mn=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Rn=["refKey","onChange","onClick"];function Bn(e){return Vn(e)||Tn(e)||dt(e)||Ln()}function Ln(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tn(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vn(e){if(Array.isArray(e))return Se(e)}function De(e,n){return $n(e)||Nn(e,n)||dt(e,n)||Hn()}function Hn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dt(e,n){if(e){if(typeof e=="string")return Se(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Se(e,n)}}function Se(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Nn(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r=[],i=!0,o=!1,l,s;try{for(t=t.call(e);!(i=(l=t.next()).done)&&(r.push(l.value),!(n&&r.length===n));i=!0);}catch(f){o=!0,s=f}finally{try{!i&&t.return!=null&&t.return()}finally{if(o)throw s}}return r}}function $n(e){if(Array.isArray(e))return e}function ft(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,r)}return t}function g(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?ft(Object(t),!0).forEach(function(r){ze(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ft(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function ze(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function oe(e,n){if(e==null)return{};var t=Kn(e,n),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}function Kn(e,n){if(e==null)return{};var t={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(n.indexOf(i)>=0)&&(t[i]=e[i]);return t}var ae=u.forwardRef(function(e,n){var t=e.children,r=oe(e,Un),i=Xn(r),o=i.open,l=oe(i,Pn);return u.useImperativeHandle(n,function(){return{open:o}},[o]),We.createElement(u.Fragment,null,t(g(g({},l),{},{open:o})))});ae.displayName="Dropzone";var gt={disabled:!1,getFilesFromEvent:on,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};ae.defaultProps=gt,ae.propTypes={children:d.func,accept:d.oneOfType([d.string,d.arrayOf(d.string)]),multiple:d.bool,preventDropOnDocument:d.bool,noClick:d.bool,noKeyboard:d.bool,noDrag:d.bool,noDragEventsBubbling:d.bool,minSize:d.number,maxSize:d.number,maxFiles:d.number,disabled:d.bool,getFilesFromEvent:d.func,onFileDialogCancel:d.func,onFileDialogOpen:d.func,useFsAccessApi:d.bool,onDragEnter:d.func,onDragLeave:d.func,onDragOver:d.func,onDrop:d.func,onDropAccepted:d.func,onDropRejected:d.func,validator:d.func};var Ae={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Xn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=g(g({},gt),e),t=n.accept,r=n.disabled,i=n.getFilesFromEvent,o=n.maxSize,l=n.minSize,s=n.multiple,f=n.maxFiles,h=n.onDragEnter,w=n.onDragLeave,y=n.onDragOver,z=n.onDrop,B=n.onDropAccepted,se=n.onDropRejected,le=n.onFileDialogCancel,ce=n.onFileDialogOpen,Ee=n.useFsAccessApi,ue=n.preventDropOnDocument,Ce=n.noClick,pe=n.noKeyboard,Ie=n.noDrag,A=n.noDragEventsBubbling,de=n.validator,fe=u.useMemo(function(){return typeof ce=="function"?ce:mt},[ce]),H=u.useMemo(function(){return typeof le=="function"?le:mt},[le]),F=u.useRef(null),j=u.useRef(null),Ot=u.useReducer(Wn,Ae),ke=De(Ot,2),N=ke[0],x=ke[1],Et=N.isFocused,Ue=N.isFileDialogActive,Pe=N.draggedFiles,$=u.useRef(typeof window<"u"&&window.isSecureContext&&Ee&&En()),Me=function(){!$.current&&Ue&&setTimeout(function(){if(j.current){var a=j.current.files;a.length||(x({type:"closeDialog"}),H())}},300)};u.useEffect(function(){return window.addEventListener("focus",Me,!1),function(){window.removeEventListener("focus",Me,!1)}},[j,Ue,H,$]);var O=u.useRef([]),Re=function(a){F.current&&F.current.contains(a.target)||(a.preventDefault(),O.current=[])};u.useEffect(function(){return ue&&(document.addEventListener("dragover",pt,!1),document.addEventListener("drop",Re,!1)),function(){ue&&(document.removeEventListener("dragover",pt),document.removeEventListener("drop",Re))}},[F,ue]);var Be=u.useCallback(function(a){a.preventDefault(),a.persist(),G(a),O.current=[].concat(Bn(O.current),[a.target]),ie(a)&&Promise.resolve(i(a)).then(function(p){re(a)&&!A||(x({draggedFiles:p,isDragActive:!0,type:"setDraggedFiles"}),h&&h(a))})},[i,h,A]),Le=u.useCallback(function(a){a.preventDefault(),a.persist(),G(a);var p=ie(a);if(p&&a.dataTransfer)try{a.dataTransfer.dropEffect="copy"}catch{}return p&&y&&y(a),!1},[y,A]),Te=u.useCallback(function(a){a.preventDefault(),a.persist(),G(a);var p=O.current.filter(function(b){return F.current&&F.current.contains(b)}),v=p.indexOf(a.target);v!==-1&&p.splice(v,1),O.current=p,!(p.length>0)&&(x({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),ie(a)&&w&&w(a))},[F,w,A]),K=u.useCallback(function(a,p){var v=[],b=[];a.forEach(function(D){var L=ct(D,t),I=De(L,2),me=I[0],he=I[1],ve=ut(D,l,o),Y=De(ve,2),ye=Y[0],be=Y[1],xe=de?de(D):null;if(me&&ye&&!xe)v.push(D);else{var we=[he,be];xe&&(we=we.concat(xe)),b.push({file:D,errors:we.filter(function(Pt){return Pt})})}}),(!s&&v.length>1||s&&f>=1&&v.length>f)&&(v.forEach(function(D){b.push({file:D,errors:[Dn]})}),v.splice(0)),x({acceptedFiles:v,fileRejections:b,type:"setFiles"}),z&&z(v,b,p),b.length>0&&se&&se(b,p),v.length>0&&B&&B(v,p)},[x,s,t,l,o,f,z,B,se,de]),X=u.useCallback(function(a){a.preventDefault(),a.persist(),G(a),O.current=[],ie(a)&&Promise.resolve(i(a)).then(function(p){re(a)&&!A||K(p,a)}),x({type:"reset"})},[i,K,A]),E=u.useCallback(function(){if($.current){x({type:"openDialog"}),fe();var a={multiple:s,types:Cn(t)};window.showOpenFilePicker(a).then(function(p){return i(p)}).then(function(p){K(p,null),x({type:"closeDialog"})}).catch(function(p){In(p)?(H(p),x({type:"closeDialog"})):kn(p)&&($.current=!1,j.current&&(j.current.value=null,j.current.click()))});return}j.current&&(x({type:"openDialog"}),fe(),j.current.value=null,j.current.click())},[x,fe,H,Ee,K,t,s]),Ve=u.useCallback(function(a){!F.current||!F.current.isEqualNode(a.target)||(a.key===" "||a.key==="Enter"||a.keyCode===32||a.keyCode===13)&&(a.preventDefault(),E())},[F,E]),He=u.useCallback(function(){x({type:"focus"})},[]),Ne=u.useCallback(function(){x({type:"blur"})},[]),$e=u.useCallback(function(){Ce||(On()?setTimeout(E,0):E())},[Ce,E]),C=function(a){return r?null:a},ge=function(a){return pe?null:C(a)},W=function(a){return Ie?null:C(a)},G=function(a){A&&a.stopPropagation()},Ct=u.useMemo(function(){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=a.refKey,v=p===void 0?"ref":p,b=a.role,D=a.onKeyDown,L=a.onFocus,I=a.onBlur,me=a.onClick,he=a.onDragEnter,ve=a.onDragOver,Y=a.onDragLeave,ye=a.onDrop,be=oe(a,Mn);return g(g(ze({onKeyDown:ge(S(D,Ve)),onFocus:ge(S(L,He)),onBlur:ge(S(I,Ne)),onClick:C(S(me,$e)),onDragEnter:W(S(he,Be)),onDragOver:W(S(ve,Le)),onDragLeave:W(S(Y,Te)),onDrop:W(S(ye,X)),role:typeof b=="string"&&b!==""?b:"button"},v,F),!r&&!pe?{tabIndex:0}:{}),be)}},[F,Ve,He,Ne,$e,Be,Le,Te,X,pe,Ie,r]),It=u.useCallback(function(a){a.stopPropagation()},[]),kt=u.useMemo(function(){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=a.refKey,v=p===void 0?"ref":p,b=a.onChange,D=a.onClick,L=oe(a,Rn),I=ze({accept:t,multiple:s,type:"file",style:{display:"none"},onChange:C(S(b,X)),onClick:C(S(D,It)),tabIndex:-1},v,j);return g(g({},I),L)}},[j,t,s,X,r]),Ke=Pe.length,Xe=Ke>0&&Sn({files:Pe,accept:t,minSize:l,maxSize:o,multiple:s,maxFiles:f}),Ut=Ke>0&&!Xe;return g(g({},N),{},{isDragAccept:Xe,isDragReject:Ut,isFocused:Et&&!r,getRootProps:Ct,getInputProps:kt,rootRef:F,inputRef:j,open:C(E)})}function Wn(e,n){switch(n.type){case"focus":return g(g({},e),{},{isFocused:!0});case"blur":return g(g({},e),{},{isFocused:!1});case"openDialog":return g(g({},Ae),{},{isFileDialogActive:!0});case"closeDialog":return g(g({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var t=n.isDragActive,r=n.draggedFiles;return g(g({},e),{},{draggedFiles:r,isDragActive:t});case"setFiles":return g(g({},e),{},{acceptedFiles:n.acceptedFiles,fileRejections:n.fileRejections});case"reset":return g({},Ae);default:return e}}function mt(){}const ht=m("section",{target:"e1b2p2ww15"})(({isDisabled:e,theme:n})=>({display:"flex",alignItems:"center",padding:n.spacing.lg,backgroundColor:n.colors.secondaryBg,borderRadius:n.radii.default,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${n.colors.primary}`},color:e?n.colors.gray:n.colors.bodyText}),""),vt=m("div",{target:"e1b2p2ww14"})({name:"9xni5b",styles:"margin-right:auto;align-items:center;display:flex"}),yt=m("span",{target:"e1b2p2ww13"})(({theme:e})=>({color:e.colors.darkenedBgMix100,marginRight:e.spacing.lg}),""),Gn=m("span",{target:"e1b2p2ww12"})(({theme:e})=>({marginBottom:e.spacing.twoXS}),""),Yn=m("div",{target:"e1b2p2ww11"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"}),bt=m("div",{target:"e1b2p2ww10"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg}),""),_n=m("ul",{target:"e1b2p2ww9"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none}),""),xt=m("li",{target:"e1b2p2ww8"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none}),""),wt=m("div",{target:"e1b2p2ww7"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"}),""),Ft=m("div",{target:"e1b2p2ww6"})(({theme:e})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),""),jt=m("div",{target:"e1b2p2ww5"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS}),""),qn=m("span",{target:"e1b2p2ww4"})(({theme:e})=>({marginRight:e.spacing.twoXS}),""),Jn=m("div",{target:"e1b2p2ww3"})(({theme:e})=>({display:"flex",padding:e.spacing.twoXS,color:e.colors.darkenedBgMix100}),""),Dt=m("small",{target:"e1b2p2ww2"})(({theme:e})=>({color:e.colors.danger,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"}),""),St=m("span",{target:"e1b2p2ww1"})({name:"0",styles:""}),zt=e=>({[ht]:{display:"flex",flexDirection:"column",alignItems:"flex-start"},[vt]:{marginBottom:e.spacing.lg},[yt]:{display:"none"},[bt]:{paddingRight:e.spacing.lg},[jt]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[Ft]:{width:e.sizes.full},[wt]:{flexDirection:"column"},[Dt]:{height:"auto",whiteSpace:"initial"},[St]:{display:"none"},[xt]:{margin:e.spacing.none,padding:e.spacing.none}}),Qn=m("div",{target:"e1b2p2ww0"})(({theme:e})=>e.inSidebar?zt(e):{[`@media (max-width: ${e.breakpoints.sm})`]:zt(e)},""),Oe=m("small",{target:"e1bju1570"})(({kind:e,theme:n})=>{const{danger:t,fadedText60:r}=n.colors;return{color:e==="danger"?t:r,fontSize:n.fontSizes.sm,lineHeight:n.lineHeights.tight}},""),Zn=({multiple:e,acceptedExtensions:n,maxSizeBytes:t})=>c.jsxs(vt,{"data-testid":"stFileUploaderDropzoneInstructions",children:[c.jsx(yt,{children:c.jsx(P,{content:_e,size:"threeXL"})}),c.jsxs(Yn,{children:[c.jsxs(Gn,{children:["Drag and drop file",e?"s":""," here"]}),c.jsxs(Oe,{children:[`Limit ${te(t,R.Byte,0)} per file`,n.length?` \u2022 ${n.map(r=>r.replace(/^\./,"").toUpperCase()).join(", ")}`:null]})]})]}),er=({onDrop:e,multiple:n,acceptedExtensions:t,maxSizeBytes:r,disabled:i,label:o})=>c.jsx(ae,{onDrop:e,multiple:n,accept:t.length?t:void 0,maxSize:r,disabled:i,useFsAccessApi:!1,children:({getRootProps:l,getInputProps:s})=>c.jsxs(ht,{...l(),"data-testid":"stFileUploaderDropzone",isDisabled:i,"aria-label":o,children:[c.jsx("input",{"data-testid":"stFileUploaderDropzoneInput",...s()}),c.jsx(Zn,{multiple:n,acceptedExtensions:t,maxSizeBytes:r}),c.jsx(J,{kind:Q.SECONDARY,disabled:i,size:Bt.SMALL,children:"Browse files"})]})}),tr=m("div",{target:"e1nlpozb1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS}),""),nr=m("div",{target:"e1nlpozb0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40}),""),rr=({currentPage:e,totalPages:n,onNext:t,onPrevious:r})=>c.jsxs(tr,{"data-testid":"stFileUploaderPagination",children:[c.jsx(Oe,{children:`Showing page ${e} of ${n}`}),c.jsxs(nr,{children:[c.jsx(J,{onClick:r,kind:Q.MINIMAL,children:c.jsx(P,{content:Lt,size:"xl"})}),c.jsx(J,{onClick:t,kind:Q.MINIMAL,children:c.jsx(P,{content:Tt,size:"xl"})})]})]}),At=(e,n)=>Math.ceil(e.length/n),ir=e=>Vt(({pageSize:n,items:t,resetOnAdd:r,...i})=>{const[o,l]=u.useState(0),[s,f]=u.useState(At(t,n)),h=Zt(t);u.useEffect(()=>{h&&h.length!==t.length&&f(At(t,n)),h&&h.length<t.length?r&&l(0):o+1>=s&&l(s-1)},[t,o,n,h,r,s]);const w=()=>{l(Math.min(o+1,s-1))},y=()=>{l(Math.max(0,o-1))},z=t.slice(o*n,o*n+n);return c.jsxs(c.Fragment,{children:[c.jsx(e,{items:z,...i}),t.length>n?c.jsx(rr,{pageSize:n,totalPages:s,currentPage:o+1,onNext:w,onPrevious:y}):null]})},e),or=({fileInfo:e})=>e.status.type==="uploading"?c.jsx(Jt,{value:e.status.progress,size:Qt.SMALL}):e.status.type==="error"?c.jsxs(Dt,{children:[c.jsx(qn,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),c.jsx(St,{children:c.jsx(P,{content:qe,size:"lg"})})]}):e.status.type==="uploaded"?c.jsx(Oe,{children:te(e.size,R.Byte)}):null,ar=({fileInfo:e,onDelete:n})=>c.jsxs(jt,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[c.jsx(Jn,{children:c.jsx(P,{content:Je,size:"twoXL"})}),c.jsxs(wt,{className:"stFileUploaderFileData",children:[c.jsx(Ft,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,children:e.name}),c.jsx(or,{fileInfo:e})]}),c.jsx("div",{"data-testid":"stFileUploaderDeleteBtn",children:c.jsx(J,{onClick:()=>n(e.id),kind:Q.MINIMAL,children:c.jsx(P,{content:Ye,size:"lg"})})})]}),sr=({items:e,onDelete:n})=>c.jsx(_n,{children:e.map(t=>c.jsx(xt,{children:c.jsx(ar,{fileInfo:t,onDelete:n})},t.id))}),lr=ir(sr),cr=e=>c.jsx(bt,{children:c.jsx(lr,{...e})});class ur extends We.PureComponent{constructor(n){super(n),this.formClearHelper=new qt,this.localFileIdCounter=1,this.forceUpdatingStatus=!1,this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:r,widgetMgr:i,fragmentId:o}=this.props,l=i.getFileUploaderStateValue(r);Ht(t,l)||i.setFileUploaderStateValue(r,t,{fromUi:!0},o)},this.reset=()=>{this.setState({files:[]})},this.dropHandler=(t,r)=>{const{element:i}=this.props,{multipleFiles:o}=i;if(!o&&t.length===0&&r.length>1){const l=r.findIndex(s=>s.errors.length===1&&s.errors[0].code==="too-many-files");l>=0&&(t.push(r[l].file),r.splice(l,1))}if(this.props.uploadClient.fetchFileURLs(t).then(l=>{if(!o&&t.length>0){const s=this.state.files.find(f=>f.status.type!=="error");s&&(this.forceUpdatingStatus=!0,this.deleteFile(s.id),this.forceUpdatingStatus=!1)}Nt(l,t).forEach(([s,f])=>{this.uploadFile(s,f)})}).catch(l=>{this.addFiles(t.map(s=>new Z(s.name,s.size,this.nextLocalFileId(),{type:"error",errorMessage:l})))}),r.length>0){const l=r.map(s=>{const{file:f}=s;return new Z(f.name,f.size,this.nextLocalFileId(),{type:"error",errorMessage:this.getErrorMessage(s.errors[0].code,s.file)})});this.addFiles(l)}},this.uploadFile=(t,r)=>{const i=Ge.CancelToken.source(),o=new Z(r.name,r.size,this.nextLocalFileId(),{type:"uploading",cancelToken:i,progress:1});this.addFile(o),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,r,l=>this.onUploadProgress(l,o.id),i.token).then(()=>this.onUploadComplete(o.id,t)).catch(l=>{Ge.isCancel(l)||this.updateFile(o.id,o.setStatus({type:"error",errorMessage:l?l.toString():"Unknown error"}))})},this.onUploadComplete=(t,r)=>{const i=this.getFile(t);M(i)||i.status.type!=="uploading"||this.updateFile(i.id,i.setStatus({type:"uploaded",fileId:r.fileId,fileUrls:r}))},this.getErrorMessage=(t,r)=>{switch(t){case"file-too-large":return`File must be ${te(this.maxUploadSizeInBytes,R.Byte)} or smaller.`;case"file-invalid-type":return`${r.type} files are not allowed.`;case"file-too-small":return"File size is too small.";case"too-many-files":return"Only one file is allowed.";default:return"Unexpected error. Please try again."}},this.deleteFile=t=>{const r=this.getFile(t);M(r)||(r.status.type==="uploading"&&r.status.cancelToken.cancel(),r.status.type==="uploaded"&&r.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(r.status.fileUrls.deleteUrl),this.removeFile(t))},this.addFile=t=>{this.setState(r=>({files:[...r.files,t]}))},this.addFiles=t=>{this.setState(r=>({files:[...r.files,...t]}))},this.removeFile=t=>{this.setState(r=>({files:r.files.filter(i=>i.id!==t)}))},this.getFile=t=>this.state.files.find(r=>r.id===t),this.updateFile=(t,r)=>{this.setState(i=>({files:i.files.map(o=>o.id===t?r:o)}))},this.onUploadProgress=(t,r)=>{const i=this.getFile(r);if(M(i)||i.status.type!=="uploading")return;const o=Math.round(t.loaded*100/t.total);i.status.progress!==o&&this.updateFile(r,i.setStatus({type:"uploading",cancelToken:i.status.cancelToken,progress:o}))},this.onFormCleared=()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(M(t))return;const{widgetMgr:r,element:i,fragmentId:o}=this.props;r.setFileUploaderStateValue(i,t,{fromUi:!0},o)})},this.state=this.initialValue}get initialValue(){const n={files:[],newestServerFileId:0},{widgetMgr:t,element:r}=this.props,i=t.getFileUploaderStateValue(r);if(M(i))return n;const{uploadedFileInfo:o}=i;return M(o)||o.length===0?n:{files:o.map(l=>{const s=l.name,f=l.size,h=l.fileId,w=l.fileUrls;return new Z(s,f,this.nextLocalFileId(),{type:"uploaded",fileId:h,fileUrls:w})})}}componentWillUnmount(){this.formClearHelper.disconnect()}get maxUploadSizeInBytes(){const n=this.props.element.maxUploadSizeMb;return en(n,R.Megabyte,R.Byte)}get status(){const n=t=>t.status.type==="uploading";return this.state.files.some(n)||this.forceUpdatingStatus?"updating":"ready"}componentDidMount(){const n=this.createWidgetValue(),{element:t,widgetMgr:r,fragmentId:i}=this.props;r.getFileUploaderStateValue(t)===void 0&&r.setFileUploaderStateValue(t,n,{fromUi:!1},i)}createWidgetValue(){const n=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:r,size:i,status:o}=t,{fileId:l,fileUrls:s}=o;return new $t({fileId:l,fileUrls:s,name:r,size:i})});return new Kt({uploadedFileInfo:n})}render(){var s;const{files:n}=this.state,{element:t,disabled:r,widgetMgr:i}=this.props,o=t.type;this.formClearHelper.manageFormClearListener(i,t.formId,this.onFormCleared);const l=n.slice().reverse();return c.jsxs(Qn,{className:"stFileUploader","data-testid":"stFileUploader",children:[c.jsx(Xt,{label:t.label,disabled:r,labelVisibility:Wt((s=t.labelVisibility)==null?void 0:s.value),children:t.help&&c.jsx(Gt,{children:c.jsx(Yt,{content:t.help,placement:_t.TOP_RIGHT})})}),c.jsx(er,{onDrop:this.dropHandler,multiple:t.multipleFiles,acceptedExtensions:o,maxSizeBytes:this.maxUploadSizeInBytes,label:t.label,disabled:r}),l.length>0&&c.jsx(cr,{items:l,pageSize:3,onDelete:this.deleteFile,resetOnAdd:!0})]})}nextLocalFileId(){return this.localFileIdCounter++}}export{ur as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as N,r as k,b2 as Q,bs as dt,bd as ht,b3 as J,bt as ft,bu as pt,c as he,Q as gt,M as mt,a7 as vt,j as Y,R as Ne,bQ as bt,a_ as yt,a$ as wt,bc as Tt,b0 as xt,aK as kt,G as Ot,bR as Se}from"./index-C1elUt1E.js";import{s as _e}from"./sprintf-C-r3gIuM.js";import{a as Rt}from"./useBasicWidgetState-D4lxC36U.js";import"./FormClearHelper-BtlF8Otx.js";var De={},Ee={},Ie={},fe={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Direction=void 0,function(n){n.Right="to right",n.Left="to left",n.Down="to bottom",n.Up="to top"}(t.Direction||(t.Direction={}))})(fe),function(t){var n=N&&N.__spreadArray||function(o,c,l){if(l||arguments.length===2)for(var g=0,v=c.length,m;g<v;g++)(m||!(g in c))&&(m||(m=Array.prototype.slice.call(c,0,g)),m[g]=c[g]);return o.concat(m||Array.prototype.slice.call(c))};Object.defineProperty(t,"__esModule",{value:!0}),t.useThumbOverlap=t.assertUnreachable=t.voidFn=t.getTrackBackground=t.replaceAt=t.schd=t.translate=t.getClosestThumbIndex=t.translateThumbs=t.getPaddingAndBorder=t.getMargin=t.checkInitialOverlap=t.checkValuesAgainstBoundaries=t.checkBoundaries=t.isVertical=t.relativeValue=t.normalizeValue=t.isStepDivisible=t.isTouchEvent=t.getStepDecimals=void 0;var r=k,e=fe,a=function(o){var c=o.toString().split(".")[1];return c?c.length:0};t.getStepDecimals=a;function i(o){return o.touches&&o.touches.length||o.changedTouches&&o.changedTouches.length}t.isTouchEvent=i;function s(o,c,l){var g=(c-o)/l,v=8,m=Number(g.toFixed(v));return parseInt(m.toString(),10)===m}t.isStepDivisible=s;function u(o,c,l,g,v,m,T){var b=1e11;if(o=Math.round(o*b)/b,!m){var E=T[c-1],S=T[c+1];if(E&&E>o)return E;if(S&&S<o)return S}if(o>g)return g;if(o<l)return l;var _=Math.floor(o*b-l*b)%Math.floor(v*b),F=Math.floor(o*b-Math.abs(_)),U=_===0?o:F/b,j=Math.abs(_/b)<v/2?U:U+v,V=(0,t.getStepDecimals)(v);return parseFloat(j.toFixed(V))}t.normalizeValue=u;function d(o,c,l){return(o-c)/(l-c)}t.relativeValue=d;function y(o){return o===e.Direction.Up||o===e.Direction.Down}t.isVertical=y;function f(o,c,l){if(c>=l)throw new RangeError("min (".concat(c,") is equal/bigger than max (").concat(l,")"));if(o<c)throw new RangeError("value (".concat(o,") is smaller than min (").concat(c,")"));if(o>l)throw new RangeError("value (".concat(o,") is bigger than max (").concat(l,")"))}t.checkBoundaries=f;function h(o,c,l){return o<c?c:o>l?l:o}t.checkValuesAgainstBoundaries=h;function p(o){if(!(o.length<2)&&!o.slice(1).every(function(c,l){return o[l]<=c}))throw new RangeError("values={[".concat(o,"]} needs to be sorted when allowOverlap={false}"))}t.checkInitialOverlap=p;function R(o){var c=window.getComputedStyle(o);return{top:parseInt(c["margin-top"],10),bottom:parseInt(c["margin-bottom"],10),left:parseInt(c["margin-left"],10),right:parseInt(c["margin-right"],10)}}t.getMargin=R;function w(o){var c=window.getComputedStyle(o);return{top:parseInt(c["padding-top"],10)+parseInt(c["border-top-width"],10),bottom:parseInt(c["padding-bottom"],10)+parseInt(c["border-bottom-width"],10),left:parseInt(c["padding-left"],10)+parseInt(c["border-left-width"],10),right:parseInt(c["padding-right"],10)+parseInt(c["border-right-width"],10)}}t.getPaddingAndBorder=w;function M(o,c,l){var g=l?-1:1;o.forEach(function(v,m){return D(v,g*c[m].x,c[m].y)})}t.translateThumbs=M;function L(o,c,l,g){for(var v=0,m=$(o[0],c,l,g),T=1;T<o.length;T++){var b=$(o[T],c,l,g);b<m&&(m=b,v=T)}return v}t.getClosestThumbIndex=L;function D(o,c,l){o.style.transform="translate(".concat(c,"px, ").concat(l,"px)")}t.translate=D;var O=function(o){var c=[],l=null,g=function(){for(var v=[],m=0;m<arguments.length;m++)v[m]=arguments[m];c=v,!l&&(l=requestAnimationFrame(function(){l=null,o.apply(void 0,c)}))};return g};t.schd=O;function I(o,c,l){var g=o.slice(0);return g[c]=l,g}t.replaceAt=I;function q(o){var c=o.values,l=o.colors,g=o.min,v=o.max,m=o.direction,T=m===void 0?e.Direction.Right:m,b=o.rtl,E=b===void 0?!1:b;E&&T===e.Direction.Right?T=e.Direction.Left:E&&e.Direction.Left&&(T=e.Direction.Right);var S=c.slice(0).sort(function(F,U){return F-U}).map(function(F){return(F-g)/(v-g)*100}),_=S.reduce(function(F,U,j){return"".concat(F,", ").concat(l[j]," ").concat(U,"%, ").concat(l[j+1]," ").concat(U,"%")},"");return"linear-gradient(".concat(T,", ").concat(l[0]," 0%").concat(_,", ").concat(l[l.length-1]," 100%)")}t.getTrackBackground=q;function ee(){}t.voidFn=ee;function z(o){throw new Error("Didn't expect to get here")}t.assertUnreachable=z;var P=function(o,c,l,g,v){v===void 0&&(v=function(T){return T});var m=Math.ceil(n([o],Array.from(o.children),!0).reduce(function(T,b){var E=Math.ceil(b.getBoundingClientRect().width);if(b.innerText&&b.innerText.includes(l)&&b.childElementCount===0){var S=b.cloneNode(!0);S.innerHTML=v(c.toFixed(g)),S.style.visibility="hidden",document.body.appendChild(S),E=Math.ceil(S.getBoundingClientRect().width),document.body.removeChild(S)}return E>T?E:T},o.getBoundingClientRect().width));return m},Z=function(o,c,l,g,v,m,T){T===void 0&&(T=function(S){return S});var b=[],E=function(S){var _=P(l[S],g[S],v,m,T),F=c[S].x;c.forEach(function(U,j){var V=U.x,A=P(l[j],g[j],v,m,T);S!==j&&(F>=V&&F<=V+A||F+_>=V&&F+_<=V+A)&&(b.includes(j)||(b.push(S),b.push(j),b=n(n([],b,!0),[S,j],!1),E(j)))})};return E(o),Array.from(new Set(b.sort()))},G=function(o,c,l,g,v,m){g===void 0&&(g=.1),v===void 0&&(v=" - "),m===void 0&&(m=function(j){return j});var T=(0,t.getStepDecimals)(g),b=(0,r.useState)({}),E=b[0],S=b[1],_=(0,r.useState)(m(c[l].toFixed(T))),F=_[0],U=_[1];return(0,r.useEffect)(function(){if(o){var j=o.getThumbs();if(j.length<1)return;var V={},A=o.getOffsets(),re=Z(l,A,j,c,v,T,m),se=m(c[l].toFixed(T));if(re.length){var ae=re.reduce(function(te,le,ce,de){return te.length?n(n([],te,!0),[A[de[ce]].x],!1):[A[de[ce]].x]},[]);if(Math.min.apply(Math,ae)===A[l].x){var ie=[];re.forEach(function(te){ie.push(c[te].toFixed(T))}),se=Array.from(new Set(ie.sort(function(te,le){return parseFloat(te)-parseFloat(le)}))).map(m).join(v);var Re=Math.min.apply(Math,ae),ue=Math.max.apply(Math,ae),Me=j[re[ae.indexOf(ue)]].getBoundingClientRect().width;V.left="".concat(Math.abs(Re-(ue+Me))/2,"px"),V.transform="translate(-50%, 0)"}else V.visibility="hidden"}U(se),S(V)}},[o,c]),[F,E]};t.useThumbOverlap=G;function $(o,c,l,g){var v=o.getBoundingClientRect(),m=v.left,T=v.top,b=v.width,E=v.height;return y(g)?Math.abs(l-(T+E/2)):Math.abs(c-(m+b/2))}}(Ie);var Mt=N&&N.__extends||function(){var t=function(n,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])},t(n,r)};return function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}}(),St=N&&N.__createBinding||(Object.create?function(t,n,r,e){e===void 0&&(e=r);var a=Object.getOwnPropertyDescriptor(n,r);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(t,e,a)}:function(t,n,r,e){e===void 0&&(e=r),t[e]=n[r]}),Dt=N&&N.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),Et=N&&N.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&St(n,t,r);return Dt(n,t),n},Ue=N&&N.__spreadArray||function(t,n,r){if(r||arguments.length===2)for(var e=0,a=n.length,i;e<a;e++)(i||!(e in n))&&(i||(i=Array.prototype.slice.call(n,0,e)),i[e]=n[e]);return t.concat(i||Array.prototype.slice.call(n))};Object.defineProperty(Ee,"__esModule",{value:!0});var pe=Et(k),x=Ie,B=fe,It=["ArrowRight","ArrowUp","k","PageUp"],Ct=["ArrowLeft","ArrowDown","j","PageDown"],Pt=function(t){Mt(n,t);function n(r){var e=t.call(this,r)||this;if(e.trackRef=pe.createRef(),e.thumbRefs=[],e.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(e.props.values.length).fill(0).map(function(a,i){return i}),isChanged:!1,markOffsets:[]},e.getOffsets=function(){var a=e.props,i=a.direction,s=a.values,u=a.min,d=a.max,y=e.trackRef.current,f=y.getBoundingClientRect(),h=(0,x.getPaddingAndBorder)(y);return e.getThumbs().map(function(p,R){var w={x:0,y:0},M=p.getBoundingClientRect(),L=(0,x.getMargin)(p);switch(i){case B.Direction.Right:return w.x=(L.left+h.left)*-1,w.y=((M.height-f.height)/2+h.top)*-1,w.x+=f.width*(0,x.relativeValue)(s[R],u,d)-M.width/2,w;case B.Direction.Left:return w.x=(L.right+h.right)*-1,w.y=((M.height-f.height)/2+h.top)*-1,w.x+=f.width-f.width*(0,x.relativeValue)(s[R],u,d)-M.width/2,w;case B.Direction.Up:return w.x=((M.width-f.width)/2+L.left+h.left)*-1,w.y=-h.left,w.y+=f.height-f.height*(0,x.relativeValue)(s[R],u,d)-M.height/2,w;case B.Direction.Down:return w.x=((M.width-f.width)/2+L.left+h.left)*-1,w.y=-h.left,w.y+=f.height*(0,x.relativeValue)(s[R],u,d)-M.height/2,w;default:return(0,x.assertUnreachable)(i)}})},e.getThumbs=function(){return e.trackRef&&e.trackRef.current?Array.from(e.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?"),[])},e.getTargetIndex=function(a){return e.getThumbs().findIndex(function(i){return i===a.target||i.contains(a.target)})},e.addTouchEvents=function(a){document.addEventListener("touchmove",e.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",e.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",e.schdOnEnd,{passive:!1})},e.addMouseEvents=function(a){document.addEventListener("mousemove",e.schdOnMouseMove),document.addEventListener("mouseup",e.schdOnEnd)},e.onMouseDownTrack=function(a){var i;if(a.button===0)if(a.persist(),a.preventDefault(),e.addMouseEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(u){var d;return(d=u.current)===null||d===void 0?void 0:d.contains(a.target)}))return;e.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return e.onMove(a.clientX,a.clientY)})}else{var s=(0,x.getClosestThumbIndex)(e.thumbRefs.map(function(u){return u.current}),a.clientX,a.clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.clientX,a.clientY)})}},e.onResize=function(){(0,x.translateThumbs)(e.getThumbs(),e.getOffsets(),e.props.rtl),e.calculateMarkOffsets()},e.onTouchStartTrack=function(a){var i;if(a.persist(),e.addTouchEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(u){var d;return(d=u.current)===null||d===void 0?void 0:d.contains(a.target)}))return;e.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var s=(0,x.getClosestThumbIndex)(e.thumbRefs.map(function(u){return u.current}),a.touches[0].clientX,a.touches[0].clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},e.onMouseOrTouchStart=function(a){if(!e.props.disabled){var i=(0,x.isTouchEvent)(a);if(!(!i&&a.button!==0)){var s=e.getTargetIndex(a);s!==-1&&(i?e.addTouchEvents(a):e.addMouseEvents(a),e.setState({draggedThumbIndex:s,thumbZIndexes:e.state.thumbZIndexes.map(function(u,d){return d===s?Math.max.apply(Math,e.state.thumbZIndexes):u<=e.state.thumbZIndexes[s]?u:u-1})}))}}},e.onMouseMove=function(a){a.preventDefault(),e.onMove(a.clientX,a.clientY)},e.onTouchMove=function(a){a.preventDefault(),e.onMove(a.touches[0].clientX,a.touches[0].clientY)},e.onKeyDown=function(a){var i=e.props,s=i.values,u=i.onChange,d=i.step,y=i.rtl,f=i.direction,h=e.state.isChanged,p=e.getTargetIndex(a.nativeEvent),R=y||f===B.Direction.Left||f===B.Direction.Down?-1:1;p!==-1&&(It.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:p,isChanged:!0}),u((0,x.replaceAt)(s,p,e.normalizeValue(s[p]+R*(a.key==="PageUp"?d*10:d),p)))):Ct.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:p,isChanged:!0}),u((0,x.replaceAt)(s,p,e.normalizeValue(s[p]-R*(a.key==="PageDown"?d*10:d),p)))):a.key==="Tab"?e.setState({draggedThumbIndex:-1},function(){h&&e.fireOnFinalChange()}):h&&e.fireOnFinalChange())},e.onKeyUp=function(a){var i=e.state.isChanged;e.setState({draggedThumbIndex:-1},function(){i&&e.fireOnFinalChange()})},e.onMove=function(a,i){var s=e.state,u=s.draggedThumbIndex,d=s.draggedTrackPos,y=e.props,f=y.direction,h=y.min,p=y.max,R=y.onChange,w=y.values,M=y.step,L=y.rtl;if(u===-1&&d[0]===-1&&d[1]===-1)return null;var D=e.trackRef.current;if(!D)return null;var O=D.getBoundingClientRect(),I=(0,x.isVertical)(f)?O.height:O.width;if(d[0]!==-1&&d[1]!==-1){var q=a-d[0],ee=i-d[1],z=0;switch(f){case B.Direction.Right:case B.Direction.Left:z=q/I*(p-h);break;case B.Direction.Down:case B.Direction.Up:z=ee/I*(p-h);break;default:(0,x.assertUnreachable)(f)}if(L&&(z*=-1),Math.abs(z)>=M/2){for(var P=0;P<e.thumbRefs.length;P++){if(w[P]===p&&Math.sign(z)===1||w[P]===h&&Math.sign(z)===-1)return;var Z=w[P]+z;Z>p?z=p-w[P]:Z<h&&(z=h-w[P])}for(var G=w.slice(0),P=0;P<e.thumbRefs.length;P++)G=(0,x.replaceAt)(G,P,e.normalizeValue(w[P]+z,P));e.setState({draggedTrackPos:[a,i]}),R(G)}}else{var $=0;switch(f){case B.Direction.Right:$=(a-O.left)/I*(p-h)+h;break;case B.Direction.Left:$=(I-(a-O.left))/I*(p-h)+h;break;case B.Direction.Down:$=(i-O.top)/I*(p-h)+h;break;case B.Direction.Up:$=(I-(i-O.top))/I*(p-h)+h;break;default:(0,x.assertUnreachable)(f)}L&&($=p+h-$),Math.abs(w[u]-$)>=M/2&&R((0,x.replaceAt)(w,u,e.normalizeValue($,u)))}},e.normalizeValue=function(a,i){var s=e.props,u=s.min,d=s.max,y=s.step,f=s.allowOverlap,h=s.values;return(0,x.normalizeValue)(a,i,u,d,y,f,h)},e.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",e.schdOnMouseMove),document.removeEventListener("touchmove",e.schdOnTouchMove),document.removeEventListener("mouseup",e.schdOnEnd),document.removeEventListener("touchend",e.schdOnEnd),document.removeEventListener("touchcancel",e.schdOnEnd),e.state.draggedThumbIndex===-1&&e.state.draggedTrackPos[0]===-1&&e.state.draggedTrackPos[1]===-1)return null;e.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){e.fireOnFinalChange()})},e.fireOnFinalChange=function(){e.setState({isChanged:!1});var a=e.props,i=a.onFinalChange,s=a.values;i&&i(s)},e.updateMarkRefs=function(a){if(!a.renderMark){e.numOfMarks=void 0,e.markRefs=void 0;return}e.numOfMarks=(a.max-a.min)/e.props.step,e.markRefs=[];for(var i=0;i<e.numOfMarks+1;i++)e.markRefs[i]=pe.createRef()},e.calculateMarkOffsets=function(){if(!(!e.props.renderMark||!e.trackRef||!e.numOfMarks||!e.markRefs||e.trackRef.current===null)){for(var a=window.getComputedStyle(e.trackRef.current),i=parseInt(a.width,10),s=parseInt(a.height,10),u=parseInt(a.paddingLeft,10),d=parseInt(a.paddingTop,10),y=[],f=0;f<e.numOfMarks+1;f++){var h=9999,p=9999;if(e.markRefs[f].current){var R=e.markRefs[f].current.getBoundingClientRect();h=R.height,p=R.width}e.props.direction===B.Direction.Left||e.props.direction===B.Direction.Right?y.push([Math.round(i/e.numOfMarks*f+u-p/2),-Math.round((h-s)/2)]):y.push([Math.round(s/e.numOfMarks*f+d-h/2),-Math.round((p-i)/2)])}e.setState({markOffsets:y})}},r.step===0)throw new Error('"step" property should be a positive number');return e.schdOnMouseMove=(0,x.schd)(e.onMouseMove),e.schdOnTouchMove=(0,x.schd)(e.onTouchMove),e.schdOnEnd=(0,x.schd)(e.onEnd),e.thumbRefs=r.values.map(function(){return pe.createRef()}),e.updateMarkRefs(r),e}return n.prototype.componentDidMount=function(){var r=this,e=this.props,a=e.values,i=e.min,s=e.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",r.onResize)},unobserve:function(){return window.removeEventListener("resize",r.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,x.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(u){return(0,x.checkBoundaries)(u,r.props.min,r.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,x.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(u){(0,x.isStepDivisible)(i,u,s)||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.")})},n.prototype.componentDidUpdate=function(r,e){var a=this.props,i=a.max,s=a.min,u=a.step,d=a.values,y=a.rtl;(r.max!==i||r.min!==s||r.step!==u)&&this.updateMarkRefs(this.props),(0,x.translateThumbs)(this.getThumbs(),this.getOffsets(),y),(r.max!==i||r.min!==s||r.step!==u||e.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),d.forEach(function(f){(0,x.isStepDivisible)(s,f,u)||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.")}))},n.prototype.componentWillUnmount=function(){var r={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,r),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)},n.prototype.render=function(){var r=this,e=this.props,a=e.renderTrack,i=e.renderThumb,s=e.renderMark,u=s===void 0?function(){return null}:s,d=e.values,y=e.min,f=e.max,h=e.allowOverlap,p=e.disabled,R=this.state,w=R.draggedThumbIndex,M=R.thumbZIndexes,L=R.markOffsets;return a({props:{style:{transform:"scale(1)",cursor:w>-1?"grabbing":this.props.draggableTrack?(0,x.isVertical)(this.props.direction)?"ns-resize":"ew-resize":d.length===1&&!p?"pointer":"inherit"},onMouseDown:p?x.voidFn:this.onMouseDownTrack,onTouchStart:p?x.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:p,children:Ue(Ue([],L.map(function(D,O,I){return u({props:{style:r.props.direction===B.Direction.Left||r.props.direction===B.Direction.Right?{position:"absolute",left:"".concat(D[0],"px"),marginTop:"".concat(D[1],"px")}:{position:"absolute",top:"".concat(D[0],"px"),marginLeft:"".concat(D[1],"px")},key:"mark".concat(O),ref:r.markRefs[O]},index:O})}),!0),d.map(function(D,O){var I=r.state.draggedThumbIndex===O;return i({index:O,value:D,isDragged:I,props:{style:{position:"absolute",zIndex:M[O],cursor:p?"inherit":I?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:O,tabIndex:p?void 0:0,"aria-valuemax":h?f:d[O+1]||f,"aria-valuemin":h?y:d[O-1]||y,"aria-valuenow":D,draggable:!1,ref:r.thumbRefs[O],role:"slider",onKeyDown:p?x.voidFn:r.onKeyDown,onKeyUp:p?x.voidFn:r.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:B.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n}(pe.Component);Ee.default=Pt,function(t){var n=N&&N.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkValuesAgainstBoundaries=t.relativeValue=t.useThumbOverlap=t.Direction=t.getTrackBackground=t.Range=void 0;var r=n(Ee);t.Range=r.default;var e=Ie;Object.defineProperty(t,"getTrackBackground",{enumerable:!0,get:function(){return e.getTrackBackground}}),Object.defineProperty(t,"useThumbOverlap",{enumerable:!0,get:function(){return e.useThumbOverlap}}),Object.defineProperty(t,"relativeValue",{enumerable:!0,get:function(){return e.relativeValue}}),Object.defineProperty(t,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return e.checkValuesAgainstBoundaries}});var a=fe;Object.defineProperty(t,"Direction",{enumerable:!0,get:function(){return a.Direction}})}(De);function He(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,e)}return r}function ge(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?He(Object(r),!0).forEach(function(e){jt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):He(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function jt(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var me=Q("div",{position:"relative",width:"100%"});me.displayName="Root",me.displayName="Root",me.displayName="StyledRoot";var ve=Q("div",function(t){var n=t.$theme,r=t.$value,e=r===void 0?[]:r,a=t.$disabled,i=t.$isDragged,s=n.sizing,u="inherit";return a?u="not-allowed":i?u="grabbing":e.length===1&&(u="pointer"),{paddingTop:s.scale600,paddingBottom:s.scale600,paddingRight:s.scale600,paddingLeft:s.scale600,display:"flex",cursor:u,backgroundColor:n.colors.sliderTrackFill}});ve.displayName="Track",ve.displayName="Track",ve.displayName="StyledTrack";var be=Q("div",function(t){var n=t.$theme,r=t.$value,e=r===void 0?[]:r,a=t.$min,i=t.$max,s=t.$disabled,u=n.colors,d=n.borders,y=n.direction,f=n.borders.useRoundedCorners?d.radius100:0;return{borderTopLeftRadius:f,borderTopRightRadius:f,borderBottomRightRadius:f,borderBottomLeftRadius:f,background:De.getTrackBackground({values:e,colors:e.length===1?[s?u.borderOpaque:u.primary,s?u.backgroundSecondary:u.borderOpaque]:[s?u.backgroundSecondary:u.borderOpaque,s?u.borderOpaque:u.primary,s?u.backgroundSecondary:u.borderOpaque],min:a||0,max:i||0,rtl:y==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:s?"not-allowed":"inherit"}});be.displayName="InnerTrack",be.displayName="InnerTrack",be.displayName="StyledInnerTrack";var ye=Q("div",function(t){return{width:"4px",height:"2px",backgroundColor:t.$theme.colors.backgroundPrimary,marginLeft:"16px"}});ye.displayName="Mark",ye.displayName="Mark",ye.displayName="StyledMark";var we=Q("div",function(t){return ge(ge({},t.$theme.typography.font200),{},{color:t.$theme.colors.contentPrimary})});we.displayName="Tick",we.displayName="Tick",we.displayName="StyledTick";var Te=Q("div",function(t){var n=t.$theme,r=n.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:r.scale600,paddingLeft:r.scale600,paddingBottom:r.scale400}});Te.displayName="TickBar",Te.displayName="TickBar",Te.displayName="StyledTickBar";var xe=Q("div",function(t){var n=t.$theme,r=t.$value,e=r===void 0?[]:r,a=t.$thumbIndex,i=t.$disabled,s=e.length===2&&a===0,u=e.length===2&&a===1;return n.direction==="rtl"&&(u||s)&&(s=!s,u=!u),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:i?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleFill,outline:"none",boxShadow:t.$isFocusVisible?"0 0 0 3px ".concat(n.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:i?"not-allowed":"inherit"}});xe.displayName="Thumb",xe.displayName="Thumb",xe.displayName="StyledThumb";var ke=Q("div",function(t){var n=t.$disabled,r=t.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:n?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleInnerFill}});ke.displayName="InnerThumb",ke.displayName="InnerThumb",ke.displayName="StyledInnerThumb";var Oe=Q("div",function(t){var n=t.$disabled,r=t.$theme;return ge(ge({position:"absolute",top:"-".concat(r.sizing.scale1400)},r.typography.font200),{},{backgroundColor:n?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleInnerFill,color:r.colors.contentInversePrimary,paddingLeft:r.sizing.scale600,paddingRight:r.sizing.scale600,paddingTop:r.sizing.scale500,paddingBottom:r.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});Oe.displayName="ThumbValue",Oe.displayName="ThumbValue",Oe.displayName="StyledThumbValue";function Xe(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,e)}return r}function Bt(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Xe(Object(r),!0).forEach(function(e){Lt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Lt(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function X(){return X=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},X.apply(this,arguments)}function K(t,n){return zt(t)||Ft(t,n)||$t(t,n)||At()}function At(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1
|
+
import{e as N,r as k,b2 as Q,bs as dt,bd as ht,b3 as J,bt as ft,bu as pt,c as he,Q as gt,M as mt,a7 as vt,j as Y,R as Ne,bQ as bt,a_ as yt,a$ as wt,bc as Tt,b0 as xt,aK as kt,G as Ot,bR as Se}from"./index-BwjoUCNo.js";import{s as _e}from"./sprintf-C-r3gIuM.js";import{a as Rt}from"./useBasicWidgetState-DYDJWF1h.js";import"./FormClearHelper-CgY1PHFo.js";var De={},Ee={},Ie={},fe={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Direction=void 0,function(n){n.Right="to right",n.Left="to left",n.Down="to bottom",n.Up="to top"}(t.Direction||(t.Direction={}))})(fe),function(t){var n=N&&N.__spreadArray||function(o,c,l){if(l||arguments.length===2)for(var g=0,v=c.length,m;g<v;g++)(m||!(g in c))&&(m||(m=Array.prototype.slice.call(c,0,g)),m[g]=c[g]);return o.concat(m||Array.prototype.slice.call(c))};Object.defineProperty(t,"__esModule",{value:!0}),t.useThumbOverlap=t.assertUnreachable=t.voidFn=t.getTrackBackground=t.replaceAt=t.schd=t.translate=t.getClosestThumbIndex=t.translateThumbs=t.getPaddingAndBorder=t.getMargin=t.checkInitialOverlap=t.checkValuesAgainstBoundaries=t.checkBoundaries=t.isVertical=t.relativeValue=t.normalizeValue=t.isStepDivisible=t.isTouchEvent=t.getStepDecimals=void 0;var r=k,e=fe,a=function(o){var c=o.toString().split(".")[1];return c?c.length:0};t.getStepDecimals=a;function i(o){return o.touches&&o.touches.length||o.changedTouches&&o.changedTouches.length}t.isTouchEvent=i;function s(o,c,l){var g=(c-o)/l,v=8,m=Number(g.toFixed(v));return parseInt(m.toString(),10)===m}t.isStepDivisible=s;function u(o,c,l,g,v,m,T){var b=1e11;if(o=Math.round(o*b)/b,!m){var E=T[c-1],S=T[c+1];if(E&&E>o)return E;if(S&&S<o)return S}if(o>g)return g;if(o<l)return l;var _=Math.floor(o*b-l*b)%Math.floor(v*b),F=Math.floor(o*b-Math.abs(_)),U=_===0?o:F/b,j=Math.abs(_/b)<v/2?U:U+v,V=(0,t.getStepDecimals)(v);return parseFloat(j.toFixed(V))}t.normalizeValue=u;function d(o,c,l){return(o-c)/(l-c)}t.relativeValue=d;function y(o){return o===e.Direction.Up||o===e.Direction.Down}t.isVertical=y;function f(o,c,l){if(c>=l)throw new RangeError("min (".concat(c,") is equal/bigger than max (").concat(l,")"));if(o<c)throw new RangeError("value (".concat(o,") is smaller than min (").concat(c,")"));if(o>l)throw new RangeError("value (".concat(o,") is bigger than max (").concat(l,")"))}t.checkBoundaries=f;function h(o,c,l){return o<c?c:o>l?l:o}t.checkValuesAgainstBoundaries=h;function p(o){if(!(o.length<2)&&!o.slice(1).every(function(c,l){return o[l]<=c}))throw new RangeError("values={[".concat(o,"]} needs to be sorted when allowOverlap={false}"))}t.checkInitialOverlap=p;function R(o){var c=window.getComputedStyle(o);return{top:parseInt(c["margin-top"],10),bottom:parseInt(c["margin-bottom"],10),left:parseInt(c["margin-left"],10),right:parseInt(c["margin-right"],10)}}t.getMargin=R;function w(o){var c=window.getComputedStyle(o);return{top:parseInt(c["padding-top"],10)+parseInt(c["border-top-width"],10),bottom:parseInt(c["padding-bottom"],10)+parseInt(c["border-bottom-width"],10),left:parseInt(c["padding-left"],10)+parseInt(c["border-left-width"],10),right:parseInt(c["padding-right"],10)+parseInt(c["border-right-width"],10)}}t.getPaddingAndBorder=w;function M(o,c,l){var g=l?-1:1;o.forEach(function(v,m){return D(v,g*c[m].x,c[m].y)})}t.translateThumbs=M;function L(o,c,l,g){for(var v=0,m=$(o[0],c,l,g),T=1;T<o.length;T++){var b=$(o[T],c,l,g);b<m&&(m=b,v=T)}return v}t.getClosestThumbIndex=L;function D(o,c,l){o.style.transform="translate(".concat(c,"px, ").concat(l,"px)")}t.translate=D;var O=function(o){var c=[],l=null,g=function(){for(var v=[],m=0;m<arguments.length;m++)v[m]=arguments[m];c=v,!l&&(l=requestAnimationFrame(function(){l=null,o.apply(void 0,c)}))};return g};t.schd=O;function I(o,c,l){var g=o.slice(0);return g[c]=l,g}t.replaceAt=I;function q(o){var c=o.values,l=o.colors,g=o.min,v=o.max,m=o.direction,T=m===void 0?e.Direction.Right:m,b=o.rtl,E=b===void 0?!1:b;E&&T===e.Direction.Right?T=e.Direction.Left:E&&e.Direction.Left&&(T=e.Direction.Right);var S=c.slice(0).sort(function(F,U){return F-U}).map(function(F){return(F-g)/(v-g)*100}),_=S.reduce(function(F,U,j){return"".concat(F,", ").concat(l[j]," ").concat(U,"%, ").concat(l[j+1]," ").concat(U,"%")},"");return"linear-gradient(".concat(T,", ").concat(l[0]," 0%").concat(_,", ").concat(l[l.length-1]," 100%)")}t.getTrackBackground=q;function ee(){}t.voidFn=ee;function z(o){throw new Error("Didn't expect to get here")}t.assertUnreachable=z;var P=function(o,c,l,g,v){v===void 0&&(v=function(T){return T});var m=Math.ceil(n([o],Array.from(o.children),!0).reduce(function(T,b){var E=Math.ceil(b.getBoundingClientRect().width);if(b.innerText&&b.innerText.includes(l)&&b.childElementCount===0){var S=b.cloneNode(!0);S.innerHTML=v(c.toFixed(g)),S.style.visibility="hidden",document.body.appendChild(S),E=Math.ceil(S.getBoundingClientRect().width),document.body.removeChild(S)}return E>T?E:T},o.getBoundingClientRect().width));return m},Z=function(o,c,l,g,v,m,T){T===void 0&&(T=function(S){return S});var b=[],E=function(S){var _=P(l[S],g[S],v,m,T),F=c[S].x;c.forEach(function(U,j){var V=U.x,A=P(l[j],g[j],v,m,T);S!==j&&(F>=V&&F<=V+A||F+_>=V&&F+_<=V+A)&&(b.includes(j)||(b.push(S),b.push(j),b=n(n([],b,!0),[S,j],!1),E(j)))})};return E(o),Array.from(new Set(b.sort()))},G=function(o,c,l,g,v,m){g===void 0&&(g=.1),v===void 0&&(v=" - "),m===void 0&&(m=function(j){return j});var T=(0,t.getStepDecimals)(g),b=(0,r.useState)({}),E=b[0],S=b[1],_=(0,r.useState)(m(c[l].toFixed(T))),F=_[0],U=_[1];return(0,r.useEffect)(function(){if(o){var j=o.getThumbs();if(j.length<1)return;var V={},A=o.getOffsets(),re=Z(l,A,j,c,v,T,m),se=m(c[l].toFixed(T));if(re.length){var ae=re.reduce(function(te,le,ce,de){return te.length?n(n([],te,!0),[A[de[ce]].x],!1):[A[de[ce]].x]},[]);if(Math.min.apply(Math,ae)===A[l].x){var ie=[];re.forEach(function(te){ie.push(c[te].toFixed(T))}),se=Array.from(new Set(ie.sort(function(te,le){return parseFloat(te)-parseFloat(le)}))).map(m).join(v);var Re=Math.min.apply(Math,ae),ue=Math.max.apply(Math,ae),Me=j[re[ae.indexOf(ue)]].getBoundingClientRect().width;V.left="".concat(Math.abs(Re-(ue+Me))/2,"px"),V.transform="translate(-50%, 0)"}else V.visibility="hidden"}U(se),S(V)}},[o,c]),[F,E]};t.useThumbOverlap=G;function $(o,c,l,g){var v=o.getBoundingClientRect(),m=v.left,T=v.top,b=v.width,E=v.height;return y(g)?Math.abs(l-(T+E/2)):Math.abs(c-(m+b/2))}}(Ie);var Mt=N&&N.__extends||function(){var t=function(n,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])},t(n,r)};return function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}}(),St=N&&N.__createBinding||(Object.create?function(t,n,r,e){e===void 0&&(e=r);var a=Object.getOwnPropertyDescriptor(n,r);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(t,e,a)}:function(t,n,r,e){e===void 0&&(e=r),t[e]=n[r]}),Dt=N&&N.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),Et=N&&N.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&St(n,t,r);return Dt(n,t),n},Ue=N&&N.__spreadArray||function(t,n,r){if(r||arguments.length===2)for(var e=0,a=n.length,i;e<a;e++)(i||!(e in n))&&(i||(i=Array.prototype.slice.call(n,0,e)),i[e]=n[e]);return t.concat(i||Array.prototype.slice.call(n))};Object.defineProperty(Ee,"__esModule",{value:!0});var pe=Et(k),x=Ie,B=fe,It=["ArrowRight","ArrowUp","k","PageUp"],Ct=["ArrowLeft","ArrowDown","j","PageDown"],Pt=function(t){Mt(n,t);function n(r){var e=t.call(this,r)||this;if(e.trackRef=pe.createRef(),e.thumbRefs=[],e.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(e.props.values.length).fill(0).map(function(a,i){return i}),isChanged:!1,markOffsets:[]},e.getOffsets=function(){var a=e.props,i=a.direction,s=a.values,u=a.min,d=a.max,y=e.trackRef.current,f=y.getBoundingClientRect(),h=(0,x.getPaddingAndBorder)(y);return e.getThumbs().map(function(p,R){var w={x:0,y:0},M=p.getBoundingClientRect(),L=(0,x.getMargin)(p);switch(i){case B.Direction.Right:return w.x=(L.left+h.left)*-1,w.y=((M.height-f.height)/2+h.top)*-1,w.x+=f.width*(0,x.relativeValue)(s[R],u,d)-M.width/2,w;case B.Direction.Left:return w.x=(L.right+h.right)*-1,w.y=((M.height-f.height)/2+h.top)*-1,w.x+=f.width-f.width*(0,x.relativeValue)(s[R],u,d)-M.width/2,w;case B.Direction.Up:return w.x=((M.width-f.width)/2+L.left+h.left)*-1,w.y=-h.left,w.y+=f.height-f.height*(0,x.relativeValue)(s[R],u,d)-M.height/2,w;case B.Direction.Down:return w.x=((M.width-f.width)/2+L.left+h.left)*-1,w.y=-h.left,w.y+=f.height*(0,x.relativeValue)(s[R],u,d)-M.height/2,w;default:return(0,x.assertUnreachable)(i)}})},e.getThumbs=function(){return e.trackRef&&e.trackRef.current?Array.from(e.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?"),[])},e.getTargetIndex=function(a){return e.getThumbs().findIndex(function(i){return i===a.target||i.contains(a.target)})},e.addTouchEvents=function(a){document.addEventListener("touchmove",e.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",e.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",e.schdOnEnd,{passive:!1})},e.addMouseEvents=function(a){document.addEventListener("mousemove",e.schdOnMouseMove),document.addEventListener("mouseup",e.schdOnEnd)},e.onMouseDownTrack=function(a){var i;if(a.button===0)if(a.persist(),a.preventDefault(),e.addMouseEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(u){var d;return(d=u.current)===null||d===void 0?void 0:d.contains(a.target)}))return;e.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return e.onMove(a.clientX,a.clientY)})}else{var s=(0,x.getClosestThumbIndex)(e.thumbRefs.map(function(u){return u.current}),a.clientX,a.clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.clientX,a.clientY)})}},e.onResize=function(){(0,x.translateThumbs)(e.getThumbs(),e.getOffsets(),e.props.rtl),e.calculateMarkOffsets()},e.onTouchStartTrack=function(a){var i;if(a.persist(),e.addTouchEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(u){var d;return(d=u.current)===null||d===void 0?void 0:d.contains(a.target)}))return;e.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var s=(0,x.getClosestThumbIndex)(e.thumbRefs.map(function(u){return u.current}),a.touches[0].clientX,a.touches[0].clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},e.onMouseOrTouchStart=function(a){if(!e.props.disabled){var i=(0,x.isTouchEvent)(a);if(!(!i&&a.button!==0)){var s=e.getTargetIndex(a);s!==-1&&(i?e.addTouchEvents(a):e.addMouseEvents(a),e.setState({draggedThumbIndex:s,thumbZIndexes:e.state.thumbZIndexes.map(function(u,d){return d===s?Math.max.apply(Math,e.state.thumbZIndexes):u<=e.state.thumbZIndexes[s]?u:u-1})}))}}},e.onMouseMove=function(a){a.preventDefault(),e.onMove(a.clientX,a.clientY)},e.onTouchMove=function(a){a.preventDefault(),e.onMove(a.touches[0].clientX,a.touches[0].clientY)},e.onKeyDown=function(a){var i=e.props,s=i.values,u=i.onChange,d=i.step,y=i.rtl,f=i.direction,h=e.state.isChanged,p=e.getTargetIndex(a.nativeEvent),R=y||f===B.Direction.Left||f===B.Direction.Down?-1:1;p!==-1&&(It.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:p,isChanged:!0}),u((0,x.replaceAt)(s,p,e.normalizeValue(s[p]+R*(a.key==="PageUp"?d*10:d),p)))):Ct.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:p,isChanged:!0}),u((0,x.replaceAt)(s,p,e.normalizeValue(s[p]-R*(a.key==="PageDown"?d*10:d),p)))):a.key==="Tab"?e.setState({draggedThumbIndex:-1},function(){h&&e.fireOnFinalChange()}):h&&e.fireOnFinalChange())},e.onKeyUp=function(a){var i=e.state.isChanged;e.setState({draggedThumbIndex:-1},function(){i&&e.fireOnFinalChange()})},e.onMove=function(a,i){var s=e.state,u=s.draggedThumbIndex,d=s.draggedTrackPos,y=e.props,f=y.direction,h=y.min,p=y.max,R=y.onChange,w=y.values,M=y.step,L=y.rtl;if(u===-1&&d[0]===-1&&d[1]===-1)return null;var D=e.trackRef.current;if(!D)return null;var O=D.getBoundingClientRect(),I=(0,x.isVertical)(f)?O.height:O.width;if(d[0]!==-1&&d[1]!==-1){var q=a-d[0],ee=i-d[1],z=0;switch(f){case B.Direction.Right:case B.Direction.Left:z=q/I*(p-h);break;case B.Direction.Down:case B.Direction.Up:z=ee/I*(p-h);break;default:(0,x.assertUnreachable)(f)}if(L&&(z*=-1),Math.abs(z)>=M/2){for(var P=0;P<e.thumbRefs.length;P++){if(w[P]===p&&Math.sign(z)===1||w[P]===h&&Math.sign(z)===-1)return;var Z=w[P]+z;Z>p?z=p-w[P]:Z<h&&(z=h-w[P])}for(var G=w.slice(0),P=0;P<e.thumbRefs.length;P++)G=(0,x.replaceAt)(G,P,e.normalizeValue(w[P]+z,P));e.setState({draggedTrackPos:[a,i]}),R(G)}}else{var $=0;switch(f){case B.Direction.Right:$=(a-O.left)/I*(p-h)+h;break;case B.Direction.Left:$=(I-(a-O.left))/I*(p-h)+h;break;case B.Direction.Down:$=(i-O.top)/I*(p-h)+h;break;case B.Direction.Up:$=(I-(i-O.top))/I*(p-h)+h;break;default:(0,x.assertUnreachable)(f)}L&&($=p+h-$),Math.abs(w[u]-$)>=M/2&&R((0,x.replaceAt)(w,u,e.normalizeValue($,u)))}},e.normalizeValue=function(a,i){var s=e.props,u=s.min,d=s.max,y=s.step,f=s.allowOverlap,h=s.values;return(0,x.normalizeValue)(a,i,u,d,y,f,h)},e.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",e.schdOnMouseMove),document.removeEventListener("touchmove",e.schdOnTouchMove),document.removeEventListener("mouseup",e.schdOnEnd),document.removeEventListener("touchend",e.schdOnEnd),document.removeEventListener("touchcancel",e.schdOnEnd),e.state.draggedThumbIndex===-1&&e.state.draggedTrackPos[0]===-1&&e.state.draggedTrackPos[1]===-1)return null;e.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){e.fireOnFinalChange()})},e.fireOnFinalChange=function(){e.setState({isChanged:!1});var a=e.props,i=a.onFinalChange,s=a.values;i&&i(s)},e.updateMarkRefs=function(a){if(!a.renderMark){e.numOfMarks=void 0,e.markRefs=void 0;return}e.numOfMarks=(a.max-a.min)/e.props.step,e.markRefs=[];for(var i=0;i<e.numOfMarks+1;i++)e.markRefs[i]=pe.createRef()},e.calculateMarkOffsets=function(){if(!(!e.props.renderMark||!e.trackRef||!e.numOfMarks||!e.markRefs||e.trackRef.current===null)){for(var a=window.getComputedStyle(e.trackRef.current),i=parseInt(a.width,10),s=parseInt(a.height,10),u=parseInt(a.paddingLeft,10),d=parseInt(a.paddingTop,10),y=[],f=0;f<e.numOfMarks+1;f++){var h=9999,p=9999;if(e.markRefs[f].current){var R=e.markRefs[f].current.getBoundingClientRect();h=R.height,p=R.width}e.props.direction===B.Direction.Left||e.props.direction===B.Direction.Right?y.push([Math.round(i/e.numOfMarks*f+u-p/2),-Math.round((h-s)/2)]):y.push([Math.round(s/e.numOfMarks*f+d-h/2),-Math.round((p-i)/2)])}e.setState({markOffsets:y})}},r.step===0)throw new Error('"step" property should be a positive number');return e.schdOnMouseMove=(0,x.schd)(e.onMouseMove),e.schdOnTouchMove=(0,x.schd)(e.onTouchMove),e.schdOnEnd=(0,x.schd)(e.onEnd),e.thumbRefs=r.values.map(function(){return pe.createRef()}),e.updateMarkRefs(r),e}return n.prototype.componentDidMount=function(){var r=this,e=this.props,a=e.values,i=e.min,s=e.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",r.onResize)},unobserve:function(){return window.removeEventListener("resize",r.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,x.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(u){return(0,x.checkBoundaries)(u,r.props.min,r.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,x.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(u){(0,x.isStepDivisible)(i,u,s)||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.")})},n.prototype.componentDidUpdate=function(r,e){var a=this.props,i=a.max,s=a.min,u=a.step,d=a.values,y=a.rtl;(r.max!==i||r.min!==s||r.step!==u)&&this.updateMarkRefs(this.props),(0,x.translateThumbs)(this.getThumbs(),this.getOffsets(),y),(r.max!==i||r.min!==s||r.step!==u||e.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),d.forEach(function(f){(0,x.isStepDivisible)(s,f,u)||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.")}))},n.prototype.componentWillUnmount=function(){var r={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,r),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)},n.prototype.render=function(){var r=this,e=this.props,a=e.renderTrack,i=e.renderThumb,s=e.renderMark,u=s===void 0?function(){return null}:s,d=e.values,y=e.min,f=e.max,h=e.allowOverlap,p=e.disabled,R=this.state,w=R.draggedThumbIndex,M=R.thumbZIndexes,L=R.markOffsets;return a({props:{style:{transform:"scale(1)",cursor:w>-1?"grabbing":this.props.draggableTrack?(0,x.isVertical)(this.props.direction)?"ns-resize":"ew-resize":d.length===1&&!p?"pointer":"inherit"},onMouseDown:p?x.voidFn:this.onMouseDownTrack,onTouchStart:p?x.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:p,children:Ue(Ue([],L.map(function(D,O,I){return u({props:{style:r.props.direction===B.Direction.Left||r.props.direction===B.Direction.Right?{position:"absolute",left:"".concat(D[0],"px"),marginTop:"".concat(D[1],"px")}:{position:"absolute",top:"".concat(D[0],"px"),marginLeft:"".concat(D[1],"px")},key:"mark".concat(O),ref:r.markRefs[O]},index:O})}),!0),d.map(function(D,O){var I=r.state.draggedThumbIndex===O;return i({index:O,value:D,isDragged:I,props:{style:{position:"absolute",zIndex:M[O],cursor:p?"inherit":I?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:O,tabIndex:p?void 0:0,"aria-valuemax":h?f:d[O+1]||f,"aria-valuemin":h?y:d[O-1]||y,"aria-valuenow":D,draggable:!1,ref:r.thumbRefs[O],role:"slider",onKeyDown:p?x.voidFn:r.onKeyDown,onKeyUp:p?x.voidFn:r.onKeyUp}})}),!0)})},n.defaultProps={step:1,direction:B.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},n}(pe.Component);Ee.default=Pt,function(t){var n=N&&N.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkValuesAgainstBoundaries=t.relativeValue=t.useThumbOverlap=t.Direction=t.getTrackBackground=t.Range=void 0;var r=n(Ee);t.Range=r.default;var e=Ie;Object.defineProperty(t,"getTrackBackground",{enumerable:!0,get:function(){return e.getTrackBackground}}),Object.defineProperty(t,"useThumbOverlap",{enumerable:!0,get:function(){return e.useThumbOverlap}}),Object.defineProperty(t,"relativeValue",{enumerable:!0,get:function(){return e.relativeValue}}),Object.defineProperty(t,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return e.checkValuesAgainstBoundaries}});var a=fe;Object.defineProperty(t,"Direction",{enumerable:!0,get:function(){return a.Direction}})}(De);function He(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,e)}return r}function ge(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?He(Object(r),!0).forEach(function(e){jt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):He(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function jt(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var me=Q("div",{position:"relative",width:"100%"});me.displayName="Root",me.displayName="Root",me.displayName="StyledRoot";var ve=Q("div",function(t){var n=t.$theme,r=t.$value,e=r===void 0?[]:r,a=t.$disabled,i=t.$isDragged,s=n.sizing,u="inherit";return a?u="not-allowed":i?u="grabbing":e.length===1&&(u="pointer"),{paddingTop:s.scale600,paddingBottom:s.scale600,paddingRight:s.scale600,paddingLeft:s.scale600,display:"flex",cursor:u,backgroundColor:n.colors.sliderTrackFill}});ve.displayName="Track",ve.displayName="Track",ve.displayName="StyledTrack";var be=Q("div",function(t){var n=t.$theme,r=t.$value,e=r===void 0?[]:r,a=t.$min,i=t.$max,s=t.$disabled,u=n.colors,d=n.borders,y=n.direction,f=n.borders.useRoundedCorners?d.radius100:0;return{borderTopLeftRadius:f,borderTopRightRadius:f,borderBottomRightRadius:f,borderBottomLeftRadius:f,background:De.getTrackBackground({values:e,colors:e.length===1?[s?u.borderOpaque:u.primary,s?u.backgroundSecondary:u.borderOpaque]:[s?u.backgroundSecondary:u.borderOpaque,s?u.borderOpaque:u.primary,s?u.backgroundSecondary:u.borderOpaque],min:a||0,max:i||0,rtl:y==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:s?"not-allowed":"inherit"}});be.displayName="InnerTrack",be.displayName="InnerTrack",be.displayName="StyledInnerTrack";var ye=Q("div",function(t){return{width:"4px",height:"2px",backgroundColor:t.$theme.colors.backgroundPrimary,marginLeft:"16px"}});ye.displayName="Mark",ye.displayName="Mark",ye.displayName="StyledMark";var we=Q("div",function(t){return ge(ge({},t.$theme.typography.font200),{},{color:t.$theme.colors.contentPrimary})});we.displayName="Tick",we.displayName="Tick",we.displayName="StyledTick";var Te=Q("div",function(t){var n=t.$theme,r=n.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:r.scale600,paddingLeft:r.scale600,paddingBottom:r.scale400}});Te.displayName="TickBar",Te.displayName="TickBar",Te.displayName="StyledTickBar";var xe=Q("div",function(t){var n=t.$theme,r=t.$value,e=r===void 0?[]:r,a=t.$thumbIndex,i=t.$disabled,s=e.length===2&&a===0,u=e.length===2&&a===1;return n.direction==="rtl"&&(u||s)&&(s=!s,u=!u),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:i?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleFill,outline:"none",boxShadow:t.$isFocusVisible?"0 0 0 3px ".concat(n.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:i?"not-allowed":"inherit"}});xe.displayName="Thumb",xe.displayName="Thumb",xe.displayName="StyledThumb";var ke=Q("div",function(t){var n=t.$disabled,r=t.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:n?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleInnerFill}});ke.displayName="InnerThumb",ke.displayName="InnerThumb",ke.displayName="StyledInnerThumb";var Oe=Q("div",function(t){var n=t.$disabled,r=t.$theme;return ge(ge({position:"absolute",top:"-".concat(r.sizing.scale1400)},r.typography.font200),{},{backgroundColor:n?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleInnerFill,color:r.colors.contentInversePrimary,paddingLeft:r.sizing.scale600,paddingRight:r.sizing.scale600,paddingTop:r.sizing.scale500,paddingBottom:r.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});Oe.displayName="ThumbValue",Oe.displayName="ThumbValue",Oe.displayName="StyledThumbValue";function Xe(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,e)}return r}function Bt(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Xe(Object(r),!0).forEach(function(e){Lt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Lt(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function X(){return X=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},X.apply(this,arguments)}function K(t,n){return zt(t)||Ft(t,n)||$t(t,n)||At()}function At(){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 $t(t,n){if(t){if(typeof t=="string")return Ke(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ke(t,n)}}function Ke(t,n){(n==null||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}function Ft(t,n){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var e=[],a=!0,i=!1,s,u;try{for(r=r.call(t);!(a=(s=r.next()).done)&&(e.push(s.value),!(n&&e.length===n));a=!0);}catch(d){i=!0,u=d}finally{try{!a&&r.return!=null&&r.return()}finally{if(i)throw u}}return e}}function zt(t){if(Array.isArray(t))return t}var Vt=function(t){if(t.length>2||t.length===0)throw new Error("the value prop represents positions of thumbs, so its length can be only one or two");return t};function Nt(t){var n=t.overrides,r=n===void 0?{}:n,e=t.disabled,a=e===void 0?!1:e,i=t.marks,s=i===void 0?!1:i,u=t.onChange,d=u===void 0?function(){}:u,y=t.onFinalChange,f=y===void 0?function(){}:y,h=t.min,p=h===void 0?0:h,R=t.max,w=R===void 0?100:R,M=t.step,L=M===void 0?1:M,D=t.persistentThumb,O=D===void 0?!1:D,I=t.valueToLabel,q=I===void 0?function(C){return C}:I,ee=t.value,z=k.useContext(dt),P=k.useState(!1),Z=K(P,2),G=Z[0],$=Z[1],o=k.useState(!1),c=K(o,2),l=c[0],g=c[1],v=k.useState(!1),m=K(v,2),T=m[0],b=m[1],E=k.useState(-1),S=K(E,2),_=S[0],F=S[1],U=k.useCallback(function(C){ht(C)&&b(!0);var W=C.target.parentNode.firstChild===C.target?0:1;F(W)},[]),j=k.useCallback(function(C){T!==!1&&b(!1),F(-1)},[]),V=Vt(ee),A={$disabled:a,$step:L,$min:p,$max:w,$marks:s,$value:V,$isFocusVisible:T},re=J(r.Root,me),se=K(re,2),ae=se[0],ie=se[1],Re=J(r.Track,ve),ue=K(Re,2),Me=ue[0],te=ue[1],le=J(r.InnerTrack,be),ce=K(le,2),de=ce[0],Ye=ce[1],qe=J(r.Thumb,xe),Pe=K(qe,2),Ze=Pe[0],Ge=Pe[1],Qe=J(r.InnerThumb,ke),je=K(Qe,2),Je=je[0],et=je[1],tt=J(r.ThumbValue,Oe),Be=K(tt,2),nt=Be[0],rt=Be[1],at=J(r.Tick,we),Le=K(at,2),Ae=Le[0],$e=Le[1],it=J(r.TickBar,Te),Fe=K(it,2),ot=Fe[0],st=Fe[1],ut=J(r.Mark,ye),ze=K(ut,2),ct=ze[0],lt=ze[1];return k.createElement(ae,X({"data-baseweb":"slider"},A,ie,{onFocus:ft(ie,U),onBlur:pt(ie,j)}),k.createElement(De.Range,X({step:L,min:p,max:w,values:V,disabled:a,onChange:function(C){return d({value:C})},onFinalChange:function(C){return f({value:C})},rtl:z.direction==="rtl",renderTrack:function(C){var W=C.props,H=C.children,ne=C.isDragged;return k.createElement(Me,X({onMouseDown:W.onMouseDown,onTouchStart:W.onTouchStart,$isDragged:ne},A,te),k.createElement(de,X({$isDragged:ne,ref:W.ref},A,Ye),H))},renderThumb:function(C){var W=C.props,H=C.index,ne=C.isDragged,Ve=O||(!!H&&l||!H&&G||ne)&&!a;return k.createElement(Ze,X({},W,{onMouseEnter:function(){H===0?$(!0):g(!0)},onMouseLeave:function(){H===0?$(!1):g(!1)},$thumbIndex:H,$isDragged:ne,style:Bt({},W.style)},A,Ge,{$isFocusVisible:T&&_===H}),Ve&&k.createElement(nt,X({$thumbIndex:H,$isDragged:ne},A,rt),q(V[H])),Ve&&k.createElement(Je,X({$thumbIndex:H,$isDragged:ne},A,et)))}},s?{renderMark:function(C){var W=C.props,H=C.index;return k.createElement(ct,X({$markIndex:H},W,A,lt))}}:{})),k.createElement(ot,X({},A,st),k.createElement(Ae,X({},A,$e),q(p)),k.createElement(Ae,X({},A,$e),q(w))))}const _t=he("div",{target:"ew7r33m3"})(({disabled:t,theme:n})=>({alignItems:"center",backgroundColor:t?n.colors.gray:n.colors.primary,borderTopLeftRadius:"100%",borderTopRightRadius:"100%",borderBottomLeftRadius:"100%",borderBottomRightRadius:"100%",borderTopStyle:"none",borderBottomStyle:"none",borderRightStyle:"none",borderLeftStyle:"none",boxShadow:"none",display:"flex",justifyContent:"center",height:n.sizes.sliderThumb,width:n.sizes.sliderThumb,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 0.2rem ${gt(n.colors.primary,.5)}`}}),""),Ut=he("div",{target:"ew7r33m2"})(({disabled:t,theme:n})=>({fontFamily:n.genericFonts.codeFont,fontSize:n.fontSizes.sm,color:t?n.colors.gray:n.colors.primary,top:"-1.6em",position:"absolute",whiteSpace:"nowrap",backgroundColor:n.colors.transparent,lineHeight:n.lineHeights.base,fontWeight:n.fontWeights.normal,pointerEvents:"none"}),""),Ht=he("div",{target:"ew7r33m1"})(({theme:t})=>({fontSize:t.fontSizes.sm,paddingBottom:t.spacing.none,paddingLeft:t.spacing.none,paddingRight:t.spacing.none,paddingTop:"0.65em",justifyContent:"space-between",alignItems:"center",display:"flex"}),""),We=he("div",{target:"ew7r33m0"})(({disabled:t,theme:n})=>({lineHeight:n.lineHeights.base,fontWeight:n.fontWeights.normal,fontFamily:n.genericFonts.codeFont,color:t?n.colors.fadedText40:"inherit"}),""),Xt=200;function Kt({disabled:t,element:n,widgetMgr:r,width:e,fragmentId:a}){var $;const[i,s]=Rt({getStateFromWidgetMgr:Wt,getDefaultStateFromProto:Yt,getCurrStateFromProto:qt,updateWidgetMgrState:Zt,element:n,widgetMgr:r,fragmentId:a}),[u,d]=k.useState(i),y=k.useRef(null),[f]=k.useState([]),[h]=k.useState([]),{colors:p,fonts:R,fontSizes:w,spacing:M}=mt(),L={width:e},D=u.map(o=>Ce(o,n)),O=Ce(n.min,n),I=Ce(n.max,n),q=n.label;k.useEffect(()=>{d(i)},[i]);const ee=k.useCallback(vt(Xt,o=>{s({value:o,fromUi:!0})}),[]),z=k.useCallback(({value:o})=>{d(o),ee(o)},[ee]),P=k.useCallback(()=>Y.jsxs(Ht,{"data-testid":"stSliderTickBar",children:[Y.jsx(We,{disabled:t,"data-testid":"stSliderTickBarMin",children:O}),Y.jsx(We,{disabled:t,"data-testid":"stSliderTickBarMax",children:I})]}),[O,I,t]),Z=k.useCallback(Ne.forwardRef(function(o,c){const{$thumbIndex:l}=o,g=l||0;f[g]=c,h[g]||(h[g]=Ne.createRef());const v=bt(o,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),m=D[g];return Y.jsx(_t,{...v,disabled:o.$disabled===!0,ref:f[g],"aria-valuetext":m,"aria-label":q,children:Y.jsx(Ut,{"data-testid":"stSliderThumbValue",disabled:o.$disabled===!0,ref:h[g],children:m})})}),[]);k.useEffect(()=>{var m,T;h.map((b,E)=>{b.current&&(b.current.innerText=D[E])}),f.map((b,E)=>{b.current&&b.current.setAttribute("aria-valuetext",D[E])});const o=y.current??null,c=f[0].current,l=(m=f[1])==null?void 0:m.current,g=h[0].current,v=(T=h[1])==null?void 0:T.current;Jt(o,c,l,g,v)});const G=k.useCallback(({$disabled:o})=>({height:M.twoXS,...o?{background:p.darkenedBgMix25}:{}}),[p,M]);return Y.jsxs("div",{ref:y,className:"stSlider","data-testid":"stSlider",style:L,children:[Y.jsx(yt,{label:n.label,disabled:t,labelVisibility:wt(($=n.labelVisibility)==null?void 0:$.value),children:n.help&&Y.jsx(Tt,{children:Y.jsx(xt,{content:n.help,placement:kt.TOP_RIGHT})})}),Y.jsx(Nt,{min:n.min,max:n.max,step:n.step,value:Qt(u,n),onChange:z,disabled:t,overrides:{Thumb:Z,Tick:{style:{fontFamily:R.monospace}},Track:{style:{backgroundColor:"none !important",paddingBottom:M.none,paddingLeft:M.none,paddingRight:M.none,paddingTop:`calc(${w.sm} * 1.35)`}},InnerTrack:{style:G},TickBar:P}})]})}function Wt(t,n){return t.getDoubleArrayValue(n)}function Yt(t){return t.default}function qt(t){return t.value}function Zt(t,n,r,e){n.setDoubleArrayValue(t,r.value,{fromUi:r.fromUi},e)}function Gt(t){const{dataType:n}=t;return n===Se.DataType.DATETIME||n===Se.DataType.DATE||n===Se.DataType.TIME}function Ce(t,n){const{format:r,options:e}=n;return Gt(n)?Ot.utc(t/1e3).format(r):e.length>0?_e.sprintf(r,e[t]):_e.sprintf(r,t)}function Qt(t,n){const{min:r,max:e}=n;let a=t[0],i=t.length>1?t[1]:t[0];return a>i&&(a=i),a<r&&(a=r),a>e&&(a=e),i<r&&(i=r),i>e&&(i=e),t.length>1?[a,i]:[a]}function Jt(t,n,r,e,a){!t||!n||!e||(oe(t,n,e),r&&a&&(oe(t,r,a),en(t,n,r,e,a)))}function oe(t,n,r){const e=t.getBoundingClientRect(),a=n.getBoundingClientRect(),i=r.getBoundingClientRect(),s=a.left+a.width/2,u=s-i.width/2<e.left,d=s+i.width/2>e.right;r.style.left=u?"0":"",r.style.right=d?"0":""}function en(t,n,r,e,a){const i=t.getBoundingClientRect(),s=n.getBoundingClientRect(),u=r.getBoundingClientRect(),d=e.getBoundingClientRect(),y=a.getBoundingClientRect(),f=i.left+i.width/2,h=s.left+s.width/2,p=u.left+u.width/2,R=h-d.width/2>=i.left,w=p+y.width/2<=i.right,M=s.left-d.width>=i.left,L=u.right+y.width<=i.right,D=R?d.width/2:d.width,O=w?y.width/2:y.width,I=h+D;if(p-O-I>24){oe(t,n,e),oe(t,r,a);return}if(M&&L){e.style.left="",e.style.right=`${Math.round(s.width)}px`,a.style.left=`${Math.round(u.width)}px`,a.style.right="";return}h<f?(oe(t,n,e),a.style.left=`${Math.round(h+D+24-p)}px`,a.style.right=""):(oe(t,r,a),e.style.left="",e.style.right=`${-Math.round(p-O-24-h)}px`)}const tn=k.memo(Kt);export{tn as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,E as z,_ as B,aj as ht,aS as Vt,aT as _t,aU as $t,B as $,F as H,R as ut,a6 as Ht,c as R,aV as Xt,j as f,aW as Gt,aX as qt,aG as Yt,aY as Zt,O as Kt,M as Jt,aZ as J,S as Qt,$ as te,a_ as ee,a$ as ie,b0 as se,aK as re}from"./index-C1elUt1E.js";import{u as ne,F as oe}from"./FormClearHelper-BtlF8Otx.js";import{T as ae,a as pt}from"./Toolbar-BsqjDjhG.js";import{u as le}from"./Hooks-DirHIiAM.js";import{c as de}from"./createDownloadLinkElement-DZMwyjvU.js";import{F as ce,D as he}from"./FileDownload.esm-DJAez7Gm.js";var mt=u.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(z,B({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),u.createElement("g",{fill:"none"},u.createElement("rect",{width:24,height:24}),u.createElement("rect",{width:24,height:24}),u.createElement("rect",{width:24,height:24})),u.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),u.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});mt.displayName="Mic";var gt=u.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(z,B({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),u.createElement("rect",{width:24,height:24,fill:"none"}),u.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});gt.displayName="Pause";var ft=u.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(z,B({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),u.createElement("rect",{width:24,height:24,fill:"none"}),u.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});ft.displayName="PlayArrow";var vt=u.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(z,B({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),u.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),u.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});vt.displayName="Refresh";var bt=u.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(z,B({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),u.createElement("g",{fill:"none"},u.createElement("rect",{width:24,height:24}),u.createElement("rect",{width:24,height:24})),u.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});bt.displayName="StopCircle";function E(s,t,e,i){return new(e||(e=Promise))(function(n,r){function a(d){try{c(i.next(d))}catch(l){r(l)}}function o(d){try{c(i.throw(d))}catch(l){r(l)}}function c(d){var l;d.done?n(d.value):(l=d.value,l instanceof e?l:new e(function(p){p(l)})).then(a,o)}c((i=i.apply(s,t||[])).next())})}let F=class{constructor(){this.listeners={}}on(s,t,e){if(this.listeners[s]||(this.listeners[s]=new Set),this.listeners[s].add(t),e==null?void 0:e.once){const i=()=>{this.un(s,i),this.un(s,t)};return this.on(s,i),i}return()=>this.un(s,t)}un(s,t){var e;(e=this.listeners[s])===null||e===void 0||e.delete(t)}once(s,t){return this.on(s,t,{once:!0})}unAll(){this.listeners={}}emit(s,...t){this.listeners[s]&&this.listeners[s].forEach(e=>e(...t))}};const yt={decode:function(s,t){return E(this,void 0,void 0,function*(){const e=new AudioContext({sampleRate:t});return e.decodeAudioData(s).finally(()=>e.close())})},createBuffer:function(s,t){return typeof s[0]=="number"&&(s=[s]),function(e){const i=e[0];if(i.some(n=>n>1||n<-1)){const n=i.length;let r=0;for(let a=0;a<n;a++){const o=Math.abs(i[a]);o>r&&(r=o)}for(const a of e)for(let o=0;o<n;o++)a[o]/=r}}(s),{duration:t,length:s[0].length,sampleRate:s[0].length/t,numberOfChannels:s.length,getChannelData:e=>s==null?void 0:s[e],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function wt(s,t){const e=t.xmlns?document.createElementNS(t.xmlns,s):document.createElement(s);for(const[i,n]of Object.entries(t))if(i==="children")for(const[r,a]of Object.entries(t))typeof a=="string"?e.appendChild(document.createTextNode(a)):e.appendChild(wt(r,a));else i==="style"?Object.assign(e.style,n):i==="textContent"?e.textContent=n:e.setAttribute(i,n.toString());return e}function Ct(s,t,e){const i=wt(s,t||{});return e==null||e.appendChild(i),i}var ue=Object.freeze({__proto__:null,createElement:Ct,default:Ct});const pe={fetchBlob:function(s,t,e){return E(this,void 0,void 0,function*(){const i=yield fetch(s,e);if(i.status>=400)throw new Error(`Failed to fetch ${s}: ${i.status} (${i.statusText})`);return function(n,r){E(this,void 0,void 0,function*(){if(!n.body||!n.headers)return;const a=n.body.getReader(),o=Number(n.headers.get("Content-Length"))||0;let c=0;const d=p=>E(this,void 0,void 0,function*(){c+=(p==null?void 0:p.length)||0;const h=Math.round(c/o*100);r(h)}),l=()=>E(this,void 0,void 0,function*(){let p;try{p=yield a.read()}catch{return}p.done||(d(p.value),yield l())});l()})}(i.clone(),t),i.blob()})}};class me extends F{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const n=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;try{this.media.src=n}catch{this.media.src=t}}destroy(){this.media.pause(),this.isExternalMedia||(this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return E(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=t}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){e!=null&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class N extends F{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[n,r]=this.initHtml();i.appendChild(n),this.container=n,this.scrollContainer=r.querySelector(".scroll"),this.wrapper=r.querySelector(".wrapper"),this.canvasWrapper=r.querySelector(".canvases"),this.progressWrapper=r.querySelector(".progress"),this.cursor=r.querySelector(".cursor"),e&&r.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if(typeof t=="string"?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){const t=e=>{const i=this.wrapper.getBoundingClientRect(),n=e.clientX-i.left,r=e.clientY-i.top;return[n/i.width,r/i.height]};if(this.wrapper.addEventListener("click",e=>{const[i,n]=t(e);this.emit("click",i,n)}),this.wrapper.addEventListener("dblclick",e=>{const[i,n]=t(e);this.emit("dblclick",i,n)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:e,scrollWidth:i,clientWidth:n}=this.scrollContainer,r=e/i,a=(e+n)/i;this.emit("scroll",r,a,e,e+n)}),typeof ResizeObserver=="function"){const e=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{e().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,e,i,n,r=3,a=0,o=100){if(!t)return()=>{};const c=matchMedia("(pointer: coarse)").matches;let d=()=>{};const l=p=>{if(p.button!==a)return;p.preventDefault(),p.stopPropagation();let h=p.clientX,m=p.clientY,g=!1;const b=Date.now(),v=C=>{if(C.preventDefault(),C.stopPropagation(),c&&Date.now()-b<o)return;const P=C.clientX,W=C.clientY,j=P-h,T=W-m;if(g||Math.abs(j)>r||Math.abs(T)>r){const A=t.getBoundingClientRect(),{left:U,top:L}=A;g||(i==null||i(h-U,m-L),g=!0),e(j,T,P-U,W-L),h=P,m=W}},w=C=>{if(g){const P=C.clientX,W=C.clientY,j=t.getBoundingClientRect(),{left:T,top:A}=j;n==null||n(P-T,W-A)}d()},y=C=>{C.relatedTarget&&C.relatedTarget!==document.documentElement||w(C)},M=C=>{g&&(C.stopPropagation(),C.preventDefault())},k=C=>{g&&C.preventDefault()};document.addEventListener("pointermove",v),document.addEventListener("pointerup",w),document.addEventListener("pointerout",y),document.addEventListener("pointercancel",y),document.addEventListener("touchmove",k,{passive:!1}),document.addEventListener("click",M,{capture:!0}),d=()=>{document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",w),document.removeEventListener("pointerout",y),document.removeEventListener("pointercancel",y),document.removeEventListener("touchmove",k),setTimeout(()=>{document.removeEventListener("click",M,{capture:!0})},10)}};return t.addEventListener("pointerdown",l),()=>{d(),t.removeEventListener("pointerdown",l)}}(this.wrapper,(t,e,i)=>{this.emit("drag",Math.max(0,Math.min(1,i/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,e){var i;const n=((i=this.audioData)===null||i===void 0?void 0:i.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const r=this.parent.clientHeight||128;return e!=null&&e.every(a=>!a.overlay)?r/n:r}return 128}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`
|
|
1
|
+
import{r as u,E as z,_ as B,aj as ht,aS as Vt,aT as _t,aU as $t,B as $,F as H,R as ut,a6 as Ht,c as R,aV as Xt,j as f,aW as Gt,aX as qt,aG as Yt,aY as Zt,O as Kt,M as Jt,aZ as J,S as Qt,$ as te,a_ as ee,a$ as ie,b0 as se,aK as re}from"./index-BwjoUCNo.js";import{u as ne,F as oe}from"./FormClearHelper-CgY1PHFo.js";import{T as ae,a as pt}from"./Toolbar-FcJw8P3i.js";import{u as le}from"./Hooks-DSz3TreG.js";import{c as de}from"./createDownloadLinkElement-DZMwyjvU.js";import{F as ce,D as he}from"./FileDownload.esm-CGGZqf24.js";var mt=u.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(z,B({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),u.createElement("g",{fill:"none"},u.createElement("rect",{width:24,height:24}),u.createElement("rect",{width:24,height:24}),u.createElement("rect",{width:24,height:24})),u.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),u.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});mt.displayName="Mic";var gt=u.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(z,B({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),u.createElement("rect",{width:24,height:24,fill:"none"}),u.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});gt.displayName="Pause";var ft=u.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(z,B({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),u.createElement("rect",{width:24,height:24,fill:"none"}),u.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});ft.displayName="PlayArrow";var vt=u.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(z,B({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),u.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),u.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});vt.displayName="Refresh";var bt=u.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return u.createElement(z,B({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),u.createElement("g",{fill:"none"},u.createElement("rect",{width:24,height:24}),u.createElement("rect",{width:24,height:24})),u.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});bt.displayName="StopCircle";function E(s,t,e,i){return new(e||(e=Promise))(function(n,r){function a(d){try{c(i.next(d))}catch(l){r(l)}}function o(d){try{c(i.throw(d))}catch(l){r(l)}}function c(d){var l;d.done?n(d.value):(l=d.value,l instanceof e?l:new e(function(p){p(l)})).then(a,o)}c((i=i.apply(s,t||[])).next())})}let F=class{constructor(){this.listeners={}}on(s,t,e){if(this.listeners[s]||(this.listeners[s]=new Set),this.listeners[s].add(t),e==null?void 0:e.once){const i=()=>{this.un(s,i),this.un(s,t)};return this.on(s,i),i}return()=>this.un(s,t)}un(s,t){var e;(e=this.listeners[s])===null||e===void 0||e.delete(t)}once(s,t){return this.on(s,t,{once:!0})}unAll(){this.listeners={}}emit(s,...t){this.listeners[s]&&this.listeners[s].forEach(e=>e(...t))}};const yt={decode:function(s,t){return E(this,void 0,void 0,function*(){const e=new AudioContext({sampleRate:t});return e.decodeAudioData(s).finally(()=>e.close())})},createBuffer:function(s,t){return typeof s[0]=="number"&&(s=[s]),function(e){const i=e[0];if(i.some(n=>n>1||n<-1)){const n=i.length;let r=0;for(let a=0;a<n;a++){const o=Math.abs(i[a]);o>r&&(r=o)}for(const a of e)for(let o=0;o<n;o++)a[o]/=r}}(s),{duration:t,length:s[0].length,sampleRate:s[0].length/t,numberOfChannels:s.length,getChannelData:e=>s==null?void 0:s[e],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function wt(s,t){const e=t.xmlns?document.createElementNS(t.xmlns,s):document.createElement(s);for(const[i,n]of Object.entries(t))if(i==="children")for(const[r,a]of Object.entries(t))typeof a=="string"?e.appendChild(document.createTextNode(a)):e.appendChild(wt(r,a));else i==="style"?Object.assign(e.style,n):i==="textContent"?e.textContent=n:e.setAttribute(i,n.toString());return e}function Ct(s,t,e){const i=wt(s,t||{});return e==null||e.appendChild(i),i}var ue=Object.freeze({__proto__:null,createElement:Ct,default:Ct});const pe={fetchBlob:function(s,t,e){return E(this,void 0,void 0,function*(){const i=yield fetch(s,e);if(i.status>=400)throw new Error(`Failed to fetch ${s}: ${i.status} (${i.statusText})`);return function(n,r){E(this,void 0,void 0,function*(){if(!n.body||!n.headers)return;const a=n.body.getReader(),o=Number(n.headers.get("Content-Length"))||0;let c=0;const d=p=>E(this,void 0,void 0,function*(){c+=(p==null?void 0:p.length)||0;const h=Math.round(c/o*100);r(h)}),l=()=>E(this,void 0,void 0,function*(){let p;try{p=yield a.read()}catch{return}p.done||(d(p.value),yield l())});l()})}(i.clone(),t),i.blob()})}};class me extends F{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const n=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;try{this.media.src=n}catch{this.media.src=t}}destroy(){this.media.pause(),this.isExternalMedia||(this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return E(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=t}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){e!=null&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class N extends F{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[n,r]=this.initHtml();i.appendChild(n),this.container=n,this.scrollContainer=r.querySelector(".scroll"),this.wrapper=r.querySelector(".wrapper"),this.canvasWrapper=r.querySelector(".canvases"),this.progressWrapper=r.querySelector(".progress"),this.cursor=r.querySelector(".cursor"),e&&r.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if(typeof t=="string"?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){const t=e=>{const i=this.wrapper.getBoundingClientRect(),n=e.clientX-i.left,r=e.clientY-i.top;return[n/i.width,r/i.height]};if(this.wrapper.addEventListener("click",e=>{const[i,n]=t(e);this.emit("click",i,n)}),this.wrapper.addEventListener("dblclick",e=>{const[i,n]=t(e);this.emit("dblclick",i,n)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:e,scrollWidth:i,clientWidth:n}=this.scrollContainer,r=e/i,a=(e+n)/i;this.emit("scroll",r,a,e,e+n)}),typeof ResizeObserver=="function"){const e=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{e().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,e,i,n,r=3,a=0,o=100){if(!t)return()=>{};const c=matchMedia("(pointer: coarse)").matches;let d=()=>{};const l=p=>{if(p.button!==a)return;p.preventDefault(),p.stopPropagation();let h=p.clientX,m=p.clientY,g=!1;const b=Date.now(),v=C=>{if(C.preventDefault(),C.stopPropagation(),c&&Date.now()-b<o)return;const P=C.clientX,W=C.clientY,j=P-h,T=W-m;if(g||Math.abs(j)>r||Math.abs(T)>r){const A=t.getBoundingClientRect(),{left:U,top:L}=A;g||(i==null||i(h-U,m-L),g=!0),e(j,T,P-U,W-L),h=P,m=W}},w=C=>{if(g){const P=C.clientX,W=C.clientY,j=t.getBoundingClientRect(),{left:T,top:A}=j;n==null||n(P-T,W-A)}d()},y=C=>{C.relatedTarget&&C.relatedTarget!==document.documentElement||w(C)},M=C=>{g&&(C.stopPropagation(),C.preventDefault())},k=C=>{g&&C.preventDefault()};document.addEventListener("pointermove",v),document.addEventListener("pointerup",w),document.addEventListener("pointerout",y),document.addEventListener("pointercancel",y),document.addEventListener("touchmove",k,{passive:!1}),document.addEventListener("click",M,{capture:!0}),d=()=>{document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",w),document.removeEventListener("pointerout",y),document.removeEventListener("pointercancel",y),document.removeEventListener("touchmove",k),setTimeout(()=>{document.removeEventListener("click",M,{capture:!0})},10)}};return t.addEventListener("pointerdown",l),()=>{d(),t.removeEventListener("pointerdown",l)}}(this.wrapper,(t,e,i)=>{this.emit("drag",Math.max(0,Math.min(1,i/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,e){var i;const n=((i=this.audioData)===null||i===void 0?void 0:i.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const r=this.parent.clientHeight||128;return e!=null&&e.every(a=>!a.overlay)?r/n:r}return 128}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`
|
|
2
2
|
<style${i?` nonce="${i}"`:""}>
|
|
3
3
|
:host {
|
|
4
4
|
user-select: none;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,i as a,aV as l,R as d,a6 as c,bA as g,j as o,bB as h,a2 as p}from"./index-
|
|
1
|
+
import{c as r,i as a,aV as l,R as d,a6 as c,bA as g,j as o,bB as h,a2 as p}from"./index-BwjoUCNo.js";const m=r(l,{shouldForwardProp:a,target:"e1se5lgy2"})(({theme:e,usingCustomTheme:t})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,radius:e.radii.md,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:t?e.colors.primary:e.colors.blue70,flexGrow:0,flexShrink:0}),""),u=r("div",{target:"e1se5lgy1"})(({theme:e,width:t,cache:i})=>({width:t,...i?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null}),""),b=r("div",{target:"e1se5lgy0"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"}),"");function x({width:e,element:t}){const{activeTheme:i}=d.useContext(c),n=!g(i),{cache:s}=t;return o.jsx(u,{className:h({stSpinner:!0,stCacheSpinner:s}),"data-testid":"stSpinner",width:e,cache:s,children:o.jsxs(b,{children:[o.jsx(m,{usingCustomTheme:n}),o.jsx(p,{source:t.text,allowHTML:!1})]})})}export{x as default};
|