@stlite/desktop 0.78.2 → 0.79.4
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/build/assets/{FileDownload.esm-D2QqHv2c.js → FileDownload.esm-DJAez7Gm.js} +1 -1
- package/build/assets/{FormClearHelper-DliGOSkq.js → FormClearHelper-BtlF8Otx.js} +1 -1
- package/build/assets/{Hooks-Daeq69Zu.js → Hooks-DirHIiAM.js} +1 -1
- package/build/assets/{InputInstructions-BQD8A2_u.js → InputInstructions-DJSzEvIq.js} +1 -1
- package/build/assets/{ProgressBar-DuGylkeS.js → ProgressBar-BnrWSmyb.js} +1 -1
- package/build/assets/{RenderInPortalIfExists-HKy5CC9C.js → RenderInPortalIfExists-Ca4-_0pe.js} +1 -1
- package/build/assets/{Toolbar-B9grKd8p.js → Toolbar-BsqjDjhG.js} +1 -1
- package/build/assets/{base-input-DJ1o9wy-.js → base-input-CgYn_7GU.js} +1 -1
- package/build/assets/{createSuper-BCtrEkDw.js → createSuper-0pNNY1_M.js} +1 -1
- package/build/assets/{data-grid-overlay-editor-SiNLnLoA.js → data-grid-overlay-editor-CNFkKj8T.js} +1 -1
- package/build/assets/{downloader-y7WtJrbZ.js → downloader-DGmYJOpb.js} +1 -1
- package/build/assets/{es6-ChzZtMws.js → es6-irkMYhr9.js} +2 -2
- package/build/assets/{getPrototypeOf-jxUzvEiF.js → getPrototypeOf-D0_3wfU4.js} +1 -1
- package/build/assets/{iframeResizer.contentWindow-VeTSZzxi.js → iframeResizer.contentWindow-D4yL-VeT.js} +1 -1
- package/build/assets/{index-JLaGWCy4.js → index-BByqVhYh.js} +1 -1
- package/build/assets/{index-BYdd9282.js → index-BFCLs_X3.js} +1 -1
- package/build/assets/{index-C5VxAqHf.js → index-BFkh2EDe.js} +1 -1
- package/build/assets/{index-UrV00MOE.js → index-BKdmDn79.js} +1 -1
- package/build/assets/{index-CxF9whAo.js → index-BM4uLW3s.js} +1 -1
- package/build/assets/{index-C9Os1Tio.js → index-BQ4RtD02.js} +1 -1
- package/build/assets/{index-Dkd6yjmr.js → index-BVyxD_B8.js} +1 -1
- package/build/assets/{index-CS3mWYPw.js → index-BXRfu-ak.js} +1 -1
- package/build/assets/{index-DXHAdPWu.js → index-BcpEGcBW.js} +1 -1
- package/build/assets/{index-ByZKQf5p.js → index-Bo6fA87g.js} +1 -1
- package/build/assets/{index-z2lXC7XI.js → index-C1elUt1E.js} +4 -4
- package/build/assets/{index-CvKkwQxq.js → index-CbfNI9jm.js} +1 -1
- package/build/assets/{index-GTNwQsph.js → index-CcWWS1JT.js} +1 -1
- package/build/assets/{index-Dh5Ef2Om.js → index-ChM6SngL.js} +1 -1
- package/build/assets/{index-B7GLWddS.js → index-D2eWP7lT.js} +1 -1
- package/build/assets/{index-CFVMKjCp.js → index-DBLWtqmb.js} +1 -1
- package/build/assets/{index-CQ8B9Pyu.js → index-DE-qBTEd.js} +1 -1
- package/build/assets/{index-DYrQR0Ux.js → index-DEXFHxro.js} +1 -1
- package/build/assets/{index-j3NobT-r.js → index-DUZJI1KN.js} +1 -1
- package/build/assets/{index-Do74AQgb.js → index-DVxRcwZL.js} +1 -1
- package/build/assets/{index-C_q5O89K.js → index-DWA8E9x2.js} +1 -1
- package/build/assets/{index-CSRB3KZi.js → index-DlLUjT1S.js} +1 -1
- package/build/assets/{index-Bsw1C-zM.js → index-DmCANcEY.js} +1 -1
- package/build/assets/{index-BCDKFsnk.js → index-DrFZgW3n.js} +1 -1
- package/build/assets/{index-NW5mgelH.js → index-Dx6YQ-Hb.js} +1 -1
- package/build/assets/{index-CpzAXWaZ.js → index-Hu3FoAZP.js} +1 -1
- package/build/assets/{index-CnPYErGb.js → index-I5lK7nyO.js} +1 -1
- package/build/assets/{index-lR3NBV82.js → index-ItgUgpY7.js} +1 -1
- package/build/assets/{index-Bia2Aiul.js → index-Pb86pUMm.js} +1 -1
- package/build/assets/{index-Di0b5deS.js → index-YUTOpyBs.js} +1 -1
- package/build/assets/{index-DMBd-bc-.js → index-ZUNcqgeq.js} +5 -5
- package/build/assets/{index-B2k4Ofkz.js → index-ce2FoF0m.js} +1 -1
- package/build/assets/{index-C-G07XIn.js → index-gVtKu3MD.js} +1 -1
- package/build/assets/{index-CGRaMNW7.js → index-m1mIjWp5.js} +1 -1
- package/build/assets/{index-Bh9EjD0o.js → index-w3QLWMIe.js} +1 -1
- package/build/assets/{index-Cxp-1GAt.js → index-xxcWnwsb.js} +1 -1
- package/build/assets/{index-BqYxHJ94.js → index-zflrmcBt.js} +1 -1
- package/build/assets/{input-Dhep7xP0.js → input-i4Ci2N7G.js} +1 -1
- package/build/assets/{memory-BqTZFgXm.js → memory-BfVZ1OlY.js} +1 -1
- package/build/assets/{number-overlay-editor-BywJqzaW.js → number-overlay-editor-DZNxupwD.js} +1 -1
- package/build/assets/{sandbox-DmnKum9A.js → sandbox-C-kTFbag.js} +1 -1
- package/build/assets/{slicedToArray-DkF8JK54.js → slicedToArray--nOyZAEU.js} +1 -1
- package/build/assets/{textarea-CCmBHfjM.js → textarea-CpIIPJux.js} +1 -1
- package/build/assets/{timepicker-DWOLsPBU.js → timepicker-BNPmfeK3.js} +1 -1
- package/build/assets/{uniqueId-C3qA3EXY.js → uniqueId-BfZwKZCM.js} +1 -1
- package/build/assets/{useBasicWidgetState-CDQNZkN8.js → useBasicWidgetState-D4lxC36U.js} +1 -1
- package/build/assets/{useOnInputChange-FEZNS9DP.js → useOnInputChange-BtQcqF3z.js} +1 -1
- package/build/assets/{withFullScreenWrapper-dTVQmtO5.js → withFullScreenWrapper-Cn2wnMdj.js} +1 -1
- package/build/assets/worker-CzOlZWlF.js +219 -0
- package/build/electron/worker.js +112 -10
- package/build/index.html +1 -1
- package/package.json +4 -4
- package/wheels/streamlit-1.41.0-cp312-none-any.whl +0 -0
- package/build/assets/worker-CLbVOjel.js +0 -117
|
@@ -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-z2lXC7XI.js";import{_ as Gn,C as hO}from"./slicedToArray-DkF8JK54.js";import{b as du,a as pu,_ as jy,c as Vf,d as Vy}from"./getPrototypeOf-jxUzvEiF.js";import{T as fO,a as dO}from"./Toolbar-B9grKd8p.js";import{u as nC,E as oC,w as pO}from"./withFullScreenWrapper-dTVQmtO5.js";import{u as AO}from"./useBasicWidgetState-CDQNZkN8.js";import{c as gO}from"./_commonjs-dynamic-modules-TDtrdbi3.js";import{D as mO,C as _O}from"./threshold-C19zgWBv.js";import"./FormClearHelper-DliGOSkq.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-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 {
|
|
2
2
|
importScripts('${e}');
|
|
3
3
|
} catch (error) {
|
|
4
4
|
console.error(error);
|
|
@@ -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-z2lXC7XI.js";import{u as ne,F as oe}from"./FormClearHelper-DliGOSkq.js";import{T as ae,a as pt}from"./Toolbar-B9grKd8p.js";import{u as le}from"./Hooks-Daeq69Zu.js";import{c as de}from"./createDownloadLinkElement-DZMwyjvU.js";import{F as ce,D as he}from"./FileDownload.esm-D2QqHv2c.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-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=`
|
|
2
2
|
<style${i?` nonce="${i}"`:""}>
|
|
3
3
|
:host {
|
|
4
4
|
user-select: none;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,F as c,j as l,aB as d,aC as n,B as g}from"./index-
|
|
1
|
+
import{c as r,F as c,j as l,aB as d,aC as n,B as g}from"./index-C1elUt1E.js";const h=r("iframe",{target:"e1u6k47s0"})(({theme:a,disableScrolling:e})=>({colorScheme:"normal",border:"none",padding:a.spacing.none,margin:a.spacing.none,overflow:e?"hidden":void 0}),"");function m({element:a,width:e}){const i=a.hasWidth?a.width:e,o=s(a.src),t=c(o)?void 0:s(a.srcdoc);return l.jsx(h,{className:"stIFrame","data-testid":"stIFrame",allow:d,disableScrolling:!a.scrolling,src:o,srcDoc:t,width:i,height:a.height,scrolling:a.scrolling?"auto":"no",sandbox:n,title:"st.iframe"})}function s(a){return g(a)||a===""?void 0:a}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,aD as y,j as i}from"./index-
|
|
1
|
+
import{c as l,aD as y,j as i}from"./index-C1elUt1E.js";import{S as m,T as F}from"./Toolbar-BsqjDjhG.js";import{w as b,u as C,E as I}from"./withFullScreenWrapper-Cn2wnMdj.js";const S=l("div",{target:"e115fcil2"})(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:"fit-content"}),""),W=l("div",{target:"e115fcil1"})({name:"1xf0csu",styles:"display:flex;flex-direction:column;align-items:stretch;width:auto;flex-grow:0"}),v=l("div",{target:"e115fcil0"})(({theme:e})=>({fontFamily:e.genericFonts.bodyFont,fontSize:e.fontSizes.sm,color:e.colors.fadedText60,textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS}),"");function E({element:e,width:g,endpoints:h,disableFullscreenMode:p}){const x=y(e.imgs),{expanded:s,width:f,height:o,expand:u,collapse:w}=C(I),r=s?f:g;let n;const a=e.width;if([-1,-3,-4].includes(a))n=void 0;else if([-2,-5].includes(a))n=r;else if(a>0)n=a;else throw Error(`Invalid image width: ${a}`);const t={};return o&&s?(t.maxHeight=o,t.objectFit="contain"):(t.width=n,t.maxWidth="100%"),i.jsxs(m,{width:r,height:o,useContainerWidth:s,topCentered:!0,children:[i.jsx(F,{target:m,isFullScreen:s,onExpand:u,onCollapse:w,disableFullscreenMode:p}),i.jsx(S,{className:"stImage","data-testid":"stImage",children:x.map((j,c)=>{const d=j;return i.jsxs(W,{"data-testid":"stImageContainer",children:[i.jsx("img",{style:t,src:h.buildMediaURL(d.url),alt:c.toString()}),d.caption&&i.jsx(v,{"data-testid":"stImageCaption",style:t,children:` ${d.caption} `})]},c)})})]})}const T=b(E);export{T as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{b2 as R,bd as be,r as c,b3 as O,M as me,j as g,a_ as ge,b7 as ye,b0 as ve,aK as we,a2 as ne,a$ as Re}from"./index-
|
|
1
|
+
import{b2 as R,bd as be,r as c,b3 as O,M as me,j as g,a_ as ge,b7 as ye,b0 as ve,aK as we,a2 as ne,a$ as Re}from"./index-C1elUt1E.js";import{a as Oe}from"./useBasicWidgetState-D4lxC36U.js";import"./FormClearHelper-BtlF8Otx.js";var ie={vertical:"vertical",horizontal:"horizontal"};function ae(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),o.push.apply(o,r)}return o}function C(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?ae(Object(o),!0).forEach(function(r){k(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ae(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function k(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var L=0,I=1,T=2;function B(e){return e.$isActive?T:e.$isHovered?I:L}function ke(e){var t=e.$theme.colors,o=e.$disabled,r=e.$checked,n=e.$isFocusVisible,s=e.$error;if(o)return t.tickFillDisabled;if(r)if(s)switch(B(e)){case L:return t.tickFillErrorSelected;case I:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(B(e)){case L:return t.tickFillSelected;case I:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return n?t.borderSelected:s?t.tickBorderError:t.tickBorder;return null}function je(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(B(e)){case L:return t.tickFillError;case I:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(B(e)){case L:return t.tickFill;case I:return t.tickFillHover;case T:return t.tickFillActive}}function $e(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n=r.direction==="rtl"?"Left":"Right";break;default:case"right":n=r.direction==="rtl"?"Right":"Left";break}var s=r.sizing,i=s.scale300;return k({},"padding".concat(n),i)}function Se(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var U=R("div",function(e){var t=e.$disabled,o=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:o==="horizontal"?"row":"column",alignItems:o==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});U.displayName="RadioGroupRoot",U.displayName="RadioGroupRoot";var q=R("label",function(e){var t,o=e.$disabled,r=e.$hasDescription,n=e.$labelPlacement,s=e.$theme,i=e.$align,a=s.sizing,u=i==="horizontal",f=s.direction==="rtl"?"Left":"Right";return t={flexDirection:n==="top"||n==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:o?"not-allowed":"pointer",marginTop:a.scale200},k(t,"margin".concat(f),u?a.scale200:null),k(t,"marginBottom",r&&!u?null:a.scale200),t});q.displayName="Root",q.displayName="Root";var G=R("div",function(e){var t=e.$theme,o=t.animation,r=t.sizing;return{backgroundColor:je(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:o.timing200,transitionTimingFunction:o.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});G.displayName="RadioMarkInner",G.displayName="RadioMarkInner";var W=R("div",function(e){var t=e.$theme,o=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:o.timing200,transitionTimingFunction:o.easeOutCurve}});W.displayName="RadioMarkOuter",W.displayName="RadioMarkOuter";var X=R("div",function(e){var t=e.$theme.typography;return C(C({verticalAlign:"middle"},$e(e)),{},{color:Se(e)},t.LabelMedium)});X.displayName="Label",X.displayName="Label";var K=R("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});K.displayName="Input",K.displayName="Input";var J=R("div",function(e){var t,o=e.$theme,r=e.$align,n=r==="horizontal",s=o.direction==="rtl"?"Right":"Left",i=o.direction==="rtl"?"Left":"Right";return C(C({},o.typography.ParagraphSmall),{},(t={color:o.colors.contentSecondary,cursor:"auto"},k(t,"margin".concat(s),r==="horizontal"?null:o.sizing.scale900),k(t,"margin".concat(i),n?o.sizing.scale200:null),k(t,"maxWidth","240px"),t))});J.displayName="Description",J.displayName="Description";function Q(e){"@babel/helpers - typeof";return Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(e)}function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},Y.apply(this,arguments)}function Me(e,t){return Ee(e)||xe(e,t)||Pe(e,t)||Fe()}function Fe(){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 Pe(e,t){if(e){if(typeof e=="string")return se(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return se(e,t)}}function se(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function xe(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var r=[],n=!0,s=!1,i,a;try{for(o=o.call(e);!(n=(i=o.next()).done)&&(r.push(i.value),!(t&&r.length===t));n=!0);}catch(u){s=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(s)throw a}}return r}}function Ee(e){if(Array.isArray(e))return e}function Le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Te(e,t,o){return Ie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},Z(e,t)}function Be(e){var t=De();return function(){var o=D(e),r;if(t){var n=D(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return Ae(this,r)}}function Ae(e,t){if(t&&(Q(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function De(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D(e)}function z(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var le=function(e){Ce(o,e);var t=Be(o);function o(){var r;Le(this,o);for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return r=t.call.apply(t,[this].concat(s)),z(A(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),z(A(r),"handleFocus",function(a,u){be(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:u}),r.props.onFocus&&r.props.onFocus(a)}),z(A(r),"handleBlur",function(a,u){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return Te(o,[{key:"render",value:function(){var r=this,n=this.props.overrides,s=n===void 0?{}:n,i=O(s.RadioGroupRoot,U),a=Me(i,2),u=a[0],f=a[1];return c.createElement(u,Y({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},f),c.Children.map(this.props.children,function(p,d){if(!c.isValidElement(p))return null;var h=r.props.value===p.props.value;return c.cloneElement(p,{align:r.props.align,autoFocus:r.props.autoFocus,checked:h,disabled:r.props.disabled||p.props.disabled,error:r.props.error,isFocused:r.state.focusedRadioIndex===d,isFocusVisible:r.state.isFocusVisible,tabIndex:d===0&&!r.props.value||h?"0":"-1",labelPlacement:r.props.labelPlacement,name:r.props.name,onBlur:function(l){return r.handleBlur(l,d)},onFocus:function(l){return r.handleFocus(l,d)},onChange:r.props.onChange,onMouseEnter:r.props.onMouseEnter,onMouseLeave:r.props.onMouseLeave})}))}}]),o}(c.Component);z(le,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function ee(e){"@babel/helpers - typeof";return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ee(e)}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},w.apply(this,arguments)}function F(e,t){return _e(e)||He(e,t)||Ve(e,t)||ze()}function ze(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ve(e,t){if(e){if(typeof e=="string")return ce(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return ce(e,t)}}function ce(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function He(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var r=[],n=!0,s=!1,i,a;try{for(o=o.call(e);!(n=(i=o.next()).done)&&(r.push(i.value),!(t&&r.length===t));n=!0);}catch(u){s=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(s)throw a}}return r}}function _e(e){if(Array.isArray(e))return e}function Ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ue(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qe(e,t,o){return Ue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&te(e,t)}function te(e,t){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},te(e,t)}function We(e){var t=Ke();return function(){var o=V(e),r;if(t){var n=V(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return Xe(this,r)}}function Xe(e,t){if(t&&(ee(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P(e)}function P(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ke(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},V(e)}function x(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Je(e){return e==="top"||e==="left"}function Qe(e){return e==="bottom"||e==="right"}var Ye=function(e){return e.stopPropagation()},ue=function(e){Ge(o,e);var t=We(o);function o(){var r;Ne(this,o);for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return r=t.call.apply(t,[this].concat(s)),x(P(r),"state",{isActive:!1,isHovered:!1}),x(P(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),x(P(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),x(P(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),x(P(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return qe(o,[{key:"componentDidMount",value:function(){var r;this.props.autoFocus&&(r=this.props.inputRef)!==null&&r!==void 0&&r.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var r=this.props.overrides,n=r===void 0?{}:r,s=O(n.Root,q),i=F(s,2),a=i[0],u=i[1],f=O(n.Label,X),p=F(f,2),d=p[0],h=p[1],l=O(n.Input,K),b=F(l,2),j=b[0],H=b[1],$=O(n.Description,J),E=F($,2),_=E[0],S=E[1],N=O(n.RadioMarkInner,G),m=F(N,2),y=m[0],v=m[1],pe=O(n.RadioMarkOuter,W),re=F(pe,2),de=re[0],fe=re[1],M={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},oe=c.createElement(d,w({},M,h),this.props.containsInteractiveElement?c.createElement("div",{onClick:function(he){return he.preventDefault()}},this.props.children):this.props.children);return c.createElement(c.Fragment,null,c.createElement(a,w({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},M,u),Je(this.props.labelPlacement)&&oe,c.createElement(de,w({},M,fe),c.createElement(y,w({},M,v))),c.createElement(j,w({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:Ye,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},M,H)),Qe(this.props.labelPlacement)&&oe),!!this.props.description&&c.createElement(_,w({},M,S),this.props.description))}}]),o}(c.Component);x(ue,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:c.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function Ze({disabled:e,horizontal:t,width:o,value:r,onChange:n,options:s,captions:i,label:a,labelVisibility:u,help:f}){const[p,d]=c.useState(r??null);c.useEffect(()=>{r!==p&&d(r??null)},[r]);const h=c.useCallback(m=>{const y=parseInt(m.target.value,10);d(y),n(y)},[n]),l=me(),{colors:b,radii:j}=l,H={width:o},$=i.length>0,E=s.length>0,_=E?s:["No options to select."],S=e||!E,N=m=>m==""&&t&&$?" ":m;return g.jsxs("div",{className:"stRadio","data-testid":"stRadio",style:H,children:[g.jsx(ge,{label:a,disabled:S,labelVisibility:u,children:f&&g.jsx(ye,{children:g.jsx(ve,{content:f,placement:we.TOP_RIGHT})})}),g.jsx(le,{onChange:h,value:p!==null?p.toString():void 0,disabled:S,align:t?ie.horizontal:ie.vertical,"aria-label":a,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:$?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:_.map((m,y)=>g.jsxs(ue,{value:y.toString(),overrides:{Root:{style:({$isFocusVisible:v})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:$?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:v?b.darkenedBgMix25:"",borderTopLeftRadius:j.md,borderTopRightRadius:j.md,borderBottomLeftRadius:j.md,borderBottomRightRadius:j.md})},RadioMarkOuter:{style:({$checked:v})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:v&&!S?b.primary:b.fadedText40})},RadioMarkInner:{style:({$checked:v})=>({height:v?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`,width:v?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`})},Label:{style:{color:S?b.fadedText40:b.bodyText,position:"relative",top:l.spacing.px}}},children:[g.jsx(ne,{source:m,allowHTML:!1,isLabel:!0,largerLabel:!0}),$&&g.jsx(ne,{source:N(i[y]),allowHTML:!1,isCaption:!0,isLabel:!0})]},y))})]})}const et=c.memo(Ze);function tt({disabled:e,element:t,widgetMgr:o,width:r,fragmentId:n}){const[s,i]=Oe({getStateFromWidgetMgr:rt,getDefaultStateFromProto:ot,getCurrStateFromProto:nt,updateWidgetMgrState:it,element:t,widgetMgr:o,fragmentId:n}),a=c.useCallback(b=>{i({value:b,fromUi:!0})},[i]),{horizontal:u,options:f,captions:p,label:d,labelVisibility:h,help:l}=t;return g.jsx(et,{label:d,onChange:a,options:f,captions:p,width:r,disabled:e,horizontal:u,labelVisibility:Re(h==null?void 0:h.value),value:s??null,help:l})}function rt(e,t){return e.getIntValue(t)}function ot(e){return e.default??null}function nt(e){return e.value??null}function it(e,t,o,r){t.setIntValue(e,o.value??null,{fromUi:o.fromUi},r)}const at=c.memo(tt);export{at as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as r,k as m,r as p,j as n}from"./index-
|
|
1
|
+
import{c as r,k as m,r as p,j as n}from"./index-C1elUt1E.js";import{R as l,P as c}from"./RenderInPortalIfExists-Ca4-_0pe.js";const d="/assets/flake-0.DgWaVvm5.png",f="/assets/flake-1.B2r5AHMK.png",g="/assets/flake-2.BnWSExPC.png",o=150,x=150,u=10,$=90,h=4e3,a=(t,e=0)=>Math.random()*(t-e)+e,k=()=>m`
|
|
2
2
|
from {
|
|
3
3
|
transform:
|
|
4
4
|
translateY(0)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as f,bJ as U,b3 as m,bM as p,bO as S}from"./index-
|
|
1
|
+
import{r as f,bJ as U,b3 as m,bM as p,bO as S}from"./index-C1elUt1E.js";import{R as G,c as P,d as H,B as K}from"./base-input-CgYn_7GU.js";function v(t){"@babel/helpers - typeof";return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},v(t)}var L=["Root","StartEnhancer","EndEnhancer"],N=["startEnhancer","endEnhancer","overrides"];function i(){return i=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])}return t},i.apply(this,arguments)}function O(t,r){return X(t)||W(t,r)||V(t,r)||Q()}function Q(){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 V(t,r){if(t){if(typeof t=="string")return F(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(t,r)}}function F(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}function W(t,r){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var e=[],o=!0,u=!1,a,c;try{for(n=n.call(t);!(o=(a=n.next()).done)&&(e.push(a.value),!(r&&e.length===r));o=!0);}catch(d){u=!0,c=d}finally{try{!o&&n.return!=null&&n.return()}finally{if(u)throw c}}return e}}function X(t){if(Array.isArray(t))return t}function R(t,r){if(t==null)return{};var n=Y(t,r),e,o;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(o=0;o<u.length;o++)e=u[o],!(r.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(n[e]=t[e])}return n}function Y(t,r){if(t==null)return{};var n={},e=Object.keys(t),o,u;for(u=0;u<e.length;u++)o=e[u],!(r.indexOf(o)>=0)&&(n[o]=t[o]);return n}function Z(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function tt(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function rt(t,r,n){return tt(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function et(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&g(t,r)}function g(t,r){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,e){return n.__proto__=e,n},g(t,r)}function nt(t){var r=ut();return function(){var n=b(t),e;if(r){var o=b(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return ot(this,e)}}function ot(t,r){if(r&&(v(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(t)}function y(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ut(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},b(t)}function h(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var B=function(t){et(n,t);var r=nt(n);function n(){var e;Z(this,n);for(var o=arguments.length,u=new Array(o),a=0;a<o;a++)u[a]=arguments[a];return e=r.call.apply(r,[this].concat(u)),h(y(e),"state",{isFocused:e.props.autoFocus||!1}),h(y(e),"onFocus",function(c){e.setState({isFocused:!0}),e.props.onFocus(c)}),h(y(e),"onBlur",function(c){e.setState({isFocused:!1}),e.props.onBlur(c)}),e}return rt(n,[{key:"render",value:function(){var e=this.props,o=e.startEnhancer,u=e.endEnhancer,a=e.overrides,c=a.Root,d=a.StartEnhancer,x=a.EndEnhancer,A=R(a,L),I=R(e,N),T=m(c,G),j=O(T,2),$=j[0],C=j[1],k=m(d,P),w=O(k,2),M=w[0],q=w[1],z=m(x,P),E=O(z,2),D=E[0],J=E[1],s=H(this.props,this.state);return f.createElement($,i({"data-baseweb":"input"},s,C,{$adjoined:_(o,u),$hasIconTrailing:this.props.clearable||this.props.type=="password"}),l(o)&&f.createElement(M,i({},s,q,{$position:S.start}),typeof o=="function"?o(s):o),f.createElement(K,i({},I,{overrides:A,adjoined:_(o,u),onFocus:this.onFocus,onBlur:this.onBlur})),l(u)&&f.createElement(D,i({},s,J,{$position:S.end}),typeof u=="function"?u(s):u))}}]),n}(f.Component);h(B,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:U.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});function _(t,r){return l(t)&&l(r)?p.both:l(t)?p.left:l(r)?p.right:p.none}function l(t){return!!(t||t===0)}export{B as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,e as y}from"./es6-
|
|
1
|
+
import{c as p,e as y}from"./es6-irkMYhr9.js";import"./index-C1elUt1E.js";const{File:r,Blob:_,DOMException:s}=p,{INVALID:z,GONE:n,MISMATCH:f,MOD_ERR:m,SYNTAX:w,SECURITY:A,DISALLOWED:b}=y;class c{constructor(i,e){this.fileHandle=i,this.file=e,this.size=e.size,this.position=0}write(i){let e=this.file;if(typeof i=="object"){if(i.type==="write"){if(Number.isInteger(i.position)&&i.position>=0&&(this.position=i.position,this.size<i.position&&(this.file=new r([this.file,new ArrayBuffer(i.position-this.size)],this.file.name,this.file))),!("data"in i))throw new s(...w("write requires a data argument"));i=i.data}else if(i.type==="seek")if(Number.isInteger(i.position)&&i.position>=0){if(this.size<i.position)throw new s(...z);this.position=i.position;return}else throw new s(...w("seek requires a position argument"));else if(i.type==="truncate")if(Number.isInteger(i.size)&&i.size>=0){e=i.size<this.size?new r([e.slice(0,i.size)],e.name,e):new r([e,new Uint8Array(i.size-this.size)],e.name),this.size=e.size,this.position>e.size&&(this.position=e.size),this.file=e;return}else throw new s(...w("truncate requires a size argument"))}i=new _([i]);let t=this.file;const o=t.slice(0,this.position),u=t.slice(this.position+i.size);let a=this.position-o.size;a<0&&(a=0),t=new r([o,new Uint8Array(a),i,u],t.name),this.size=t.size,this.position+=i.size,this.file=t}close(){if(this.fileHandle._deleted)throw new s(...n);this.fileHandle._file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class h{constructor(i="",e=new r([],i),t=!0){this._file=e,this.name=i,this.kind="file",this._deleted=!1,this.writable=t,this.readable=!0}async getFile(){if(this._deleted)throw new s(...n);return this._file}async createWritable(i){if(!this.writable)throw new s(...b);if(this._deleted)throw new s(...n);const e=i.keepExistingData?await this.getFile():new r([],this.name);return new c(this,e)}async isSameEntry(i){return this===i}async _destroy(){this._deleted=!0,this._file=null}}class l{constructor(i,e=!0){this.name=i,this.kind="directory",this._deleted=!1,this._entries={},this.writable=e,this.readable=!0}async*entries(){if(this._deleted)throw new s(...n);yield*Object.entries(this._entries)}async isSameEntry(i){return this===i}async getDirectoryHandle(i,e){if(this._deleted)throw new s(...n);const t=this._entries[i];if(t){if(t instanceof h)throw new s(...f);return t}else{if(e.create)return this._entries[i]=new l(i);throw new s(...n)}}async getFileHandle(i,e){const t=this._entries[i],o=t instanceof h;if(t&&o)return t;if(t&&!o)throw new s(...f);if(!t&&!e.create)throw new s(...n);if(!t&&e.create)return this._entries[i]=new h(i)}async removeEntry(i,e){const t=this._entries[i];if(!t)throw new s(...n);await t._destroy(e.recursive),delete this._entries[i]}async _destroy(i){for(let e of Object.values(this._entries)){if(!i)throw new s(...m);await e._destroy(i)}this._entries={},this._deleted=!0}}const g=new l(""),H=()=>g;export{h as FileHandle,l as FolderHandle,c as Sink,H as default};
|
package/build/assets/{number-overlay-editor-BywJqzaW.js → number-overlay-editor-DZNxupwD.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as Q,r as T}from"./index-z2lXC7XI.js";import{s as Ie}from"./index-DMBd-bc-.js";import"./FormClearHelper-DliGOSkq.js";import"./withFullScreenWrapper-dTVQmtO5.js";import"./Toolbar-B9grKd8p.js";import"./sprintf-C-r3gIuM.js";import"./createDownloadLinkElement-DZMwyjvU.js";import"./slicedToArray-DkF8JK54.js";import"./getPrototypeOf-jxUzvEiF.js";import"./createSuper-BCtrEkDw.js";import"./FileDownload.esm-D2QqHv2c.js";const Re=Ie("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var X;(function(e){e.event="event",e.props="prop"})(X||(X={}));function G(){}function Ae(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(o,l){return o===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ee(e){return!!(e||"").match(/\d/)}function Z(e){return e==null}function je(e){return typeof e=="number"&&isNaN(e)}function ce(e){return Z(e)||je(e)||typeof e=="number"&&!isFinite(e)}function fe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Te(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Fe(e,t,r){var n=Te(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Be(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function ue(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),o=a[0],l=a[1]||"";return{beforeDecimal:o,afterDecimal:l,hasNegation:r,addNegation:n}}function Me(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ve(e,t,r){for(var n="",a=r?"0":"",o=0;o<=t-1;o++)n+=e[o]||a;return n}function de(e,t){return Array(t+1).join(e)}function me(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],o=n[1];if(o=Number(o),!o)return r+a;a=a.replace(".","");var l=1+o,g=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=g?a=a+de("0",l-g):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=ue(e),o=a.beforeDecimal,l=a.afterDecimal,g=a.hasNegation,S=parseFloat("0."+(l||"0")),y=l.length<=t?"0."+l:S.toFixed(t),p=y.split("."),d=o.split("").reverse().reduce(function(w,N,m){return w.length>m?(Number(w[0])+Number(N)).toString()+w.substring(1,w.length):N+w},p[0]),h=ve(p[1]||"",t,r),b=g?"-":"",v=n?".":"";return""+b+d+v+h}function z(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var pe=Ae(function(e,t){for(var r=0,n=0,a=e.length,o=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[o-1-n]&&o-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:o-n}}});function Pe(e,t,r){return Math.min(Math.max(e,t),r)}function ie(e){return Math.max(e.selectionStart,e.selectionEnd)}function ke(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Le(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function We(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ke(e,t,r,n,a,o,l){l===void 0&&(l=We);var g=a.findIndex(function(W){return W}),S=e.slice(0,g);!t&&!r.startsWith(S)&&(t=S,r=S+r,n=n+S.length);for(var y=r.length,p=e.length,d={},h=new Array(y),b=0;b<y;b++){h[b]=-1;for(var v=0,w=p;v<w;v++){var N=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:b,formattedValueIndex:v});if(N&&d[v]!==!0){h[b]=v,d[v]=!0;break}}}for(var m=n;m<y&&(h[m]===-1||!o(r[m]));)m++;var F=m===y||h[m]===-1?p:h[m];for(m=n-1;m>0&&h[m]===-1;)m--;var M=m===-1||h[m]===-1?0:h[m]+1;return M>F?F:n-M<F-n?M:F}function he(e,t,r,n){var a=e.length;if(t=Pe(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ue(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ee(e[r])||ee(e[r-1]));return t}function Se(e,t,r,n,a,o){o===void 0&&(o=G);var l=Be(function(v,w){var N,m;return ce(v)?(m="",N=""):typeof v=="number"||w?(m=typeof v=="number"?me(v):v,N=n(m)):(m=a(v,void 0),N=n(m)),{formattedValue:N,numAsString:m}}),g=T.useState(function(){return l(Z(e)?t:e,r)}),S=g[0],y=g[1],p=function(v,w){v.formattedValue!==S.formattedValue&&y({formattedValue:v.formattedValue,numAsString:v.value}),o(v,w)},d=e,h=r;Z(e)&&(d=S.numAsString,h=!0);var b=l(d,h);return T.useMemo(function(){y(b)},[b.formattedValue]),[S,p]}function Ge(e){return e.replace(/[^0-9]/g,"")}function _e(e){return e}function $e(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,o=e.getInputRef,l=e.format;l===void 0&&(l=_e);var g=e.removeFormatting;g===void 0&&(g=Ge);var S=e.defaultValue,y=e.valueIsNumericString,p=e.onValueChange,d=e.isAllowed,h=e.onChange;h===void 0&&(h=G);var b=e.onKeyDown;b===void 0&&(b=G);var v=e.onMouseUp;v===void 0&&(v=G);var w=e.onFocus;w===void 0&&(w=G);var N=e.onBlur;N===void 0&&(N=G);var m=e.value,F=e.getCaretBoundary;F===void 0&&(F=Ue);var M=e.isValidInputCharacter;M===void 0&&(M=ee);var W=e.isCharacterSame,P=se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),_=Se(m,S,!!y,l,g,p),K=_[0],V=K.formattedValue,k=K.numAsString,$=_[1],L=T.useRef({formattedValue:V,numAsString:k}),J=function(u,i){L.current={formattedValue:u.formattedValue,numAsString:u.value},$(u,i)},U=T.useState(!1),q=U[0],H=U[1],s=T.useRef(null),c=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return H(!0),function(){clearTimeout(c.current.setCaretTimeout),clearTimeout(c.current.focusTimeout)}},[]);var A=l,D=function(u,i){var f=parseFloat(i);return{formattedValue:u,value:i,floatValue:isNaN(f)?void 0:f}},C=function(u,i,f){u.selectionStart===0&&u.selectionEnd===u.value.length||(z(u,i),c.current.setCaretTimeout=setTimeout(function(){u.value===f&&u.selectionStart!==u.selectionEnd&&z(u,i)},0))},I=function(u,i,f){return he(u,i,F(u),f)},B=function(u,i,f){var E=F(i),O=Ke(i,V,u,f,E,M,W);return O=he(i,O,E),O},te=function(u){var i=u.formattedValue;i===void 0&&(i="");var f=u.input,E=u.setCaretPosition;E===void 0&&(E=!0);var O=u.source,x=u.event,R=u.numAsString,j=u.caretPos;if(f){if(j===void 0&&E){var Y=u.inputValue||f.value,oe=ie(f);f.value=i,j=B(Y,i,oe)}f.value=i,E&&j!==void 0&&C(f,j,i)}i!==V&&J(D(i,R),{event:x,source:O})};T.useEffect(function(){var u=L.current,i=u.formattedValue,f=u.numAsString;V!==i&&(V!==k||i!==f)&&J(D(V,k),{event:void 0,source:X.props})},[V,k]);var ne=s.current?ie(s.current):void 0,re=typeof window<"u"?T.useLayoutEffect:T.useEffect;re(function(){var u=s.current;if(V!==L.current.formattedValue&&u){var i=B(L.current.formattedValue,V,ne);u.value=V,C(u,i,V)}},[V]);var Ve=function(u,i,f){var E=pe(V,u),O=Object.assign(Object.assign({},E),{lastValue:V}),x=g(u,O),R=A(x);if(x=g(R,void 0),d&&!d(D(R,x))){var j=i.target,Y=ie(j),oe=B(u,V,Y);return j.value=V,C(j,oe,V),!1}return te({formattedValue:R,numAsString:x,inputValue:u,event:i,source:f,setCaretPosition:!0,input:i.target}),!0},xe=function(u){var i=u.target,f=i.value,E=Ve(f,u,X.event);E&&h(u)},we=function(u){var i=u.target,f=u.key,E=i.selectionStart,O=i.selectionEnd,x=i.value;x===void 0&&(x="");var R;if(f==="ArrowLeft"||f==="Backspace"?R=Math.max(E-1,0):f==="ArrowRight"?R=Math.min(E+1,x.length):f==="Delete"&&(R=E),R===void 0||E!==O){b(u);return}var j=R;if(f==="ArrowLeft"||f==="ArrowRight"){var Y=f==="ArrowLeft"?"left":"right";j=I(x,R,Y),j!==R&&u.preventDefault()}else f==="Delete"&&!M(x[R])?j=I(x,R,"right"):f==="Backspace"&&!M(x[R])&&(j=I(x,R,"left"));j!==R&&C(i,j,x),u.isUnitTestRun&&C(i,j,x),b(u)},Ne=function(u){var i=u.target,f=i.selectionStart,E=i.selectionEnd,O=i.value;if(O===void 0&&(O=""),f===E){var x=I(O,f);x!==f&&C(i,x,O)}v(u)},De=function(u){u.persist&&u.persist();var i=u.target;s.current=i,c.current.focusTimeout=setTimeout(function(){var f=i.selectionStart,E=i.selectionEnd,O=i.value;O===void 0&&(O="");var x=I(O,f);x!==f&&!(f===0&&E===O.length)&&C(i,x,O),w(u)},0)},Ce=function(u){s.current=null,clearTimeout(c.current.focusTimeout),clearTimeout(c.current.setCaretTimeout),N(u)},Ee=q&&ke()?"numeric":void 0,le=Object.assign({inputMode:Ee},P,{type:t,value:V,onChange:xe,onKeyDown:we,onMouseUp:Ne,onFocus:De,onBlur:Ce});if(r==="text")return a?Q.createElement(Q.Fragment,null,a(V,P)||null):Q.createElement("span",Object.assign({},P,{ref:o}),V);if(n){var Oe=n;return Q.createElement(Oe,Object.assign({},le,{ref:o}))}return Q.createElement("input",Object.assign({},le,{ref:o}))}function be(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var o=t.suffix;o===void 0&&(o="");var l=t.allowNegative,g=t.thousandsGroupStyle;if(g===void 0&&(g="thousand"),e===""||e==="-")return e;var S=ae(t),y=S.thousandSeparator,p=S.decimalSeparator,d=r!==0&&e.indexOf(".")!==-1||r&&n,h=ue(e,l),b=h.beforeDecimal,v=h.afterDecimal,w=h.addNegation;return r!==void 0&&(v=ve(v,r,!!n)),y&&(b=Fe(b,y,g)),a&&(b=a+b),o&&(v=v+o),w&&(b="-"+b),e=b+(d&&p||"")+v,e}function ae(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function ze(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),o=n.test(e);return e=e.replace(/-/g,""),a&&!o&&t&&(e="-"+e),e}function Je(e,t){return new RegExp("(^-)|[0-9]|"+fe(e),"g")}function Qe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ze(e,t,r){var n;t===void 0&&(t=Le(e));var a=r.allowNegative,o=r.prefix;o===void 0&&(o="");var l=r.suffix;l===void 0&&(l="");var g=r.decimalScale,S=t.from,y=t.to,p=y.start,d=y.end,h=ae(r),b=h.allowedDecimalSeparators,v=h.decimalSeparator,w=e[d]===v;if(ee(e)&&(e===o||e===l)&&t.lastValue==="")return e;if(d-p===1&&b.indexOf(e[p])!==-1){var N=g===0?"":v;e=e.substring(0,p)+N+e.substring(p+1,e.length)}var m=function(c,A,D){var C=!1,I=!1;o.startsWith("-")?C=!1:c.startsWith("--")?(C=!1,I=!0):l.startsWith("-")&&c.length===l.length?C=!1:c[0]==="-"&&(C=!0);var B=C?1:0;return I&&(B=2),B&&(c=c.substring(B),A-=B,D-=B),{value:c,start:A,end:D,hasNegation:C}},F=m(e,p,d),M=F.hasNegation;n=F,e=n.value,p=n.start,d=n.end;var W=m(t.lastValue,S.start,S.end),P=W.start,_=W.end,K=W.value,V=e.substring(p,d);e.length&&K.length&&(P>K.length-l.length||_<o.length)&&!(V&&l.startsWith(V))&&(e=K);var k=0;e.startsWith(o)?k+=o.length:p<o.length&&(k=p),e=e.substring(k),d-=k;var $=e.length,L=e.length-l.length;e.endsWith(l)?$=L:(d>L||d>e.length-l.length)&&($=d),e=e.substring(0,$),e=ze(M?"-"+e:e,a),e=(e.match(Je(v))||[]).join("");var J=e.indexOf(v);e=e.replace(new RegExp(fe(v),"g"),function(c,A){return A===J?".":""});var U=ue(e,a),q=U.beforeDecimal,H=U.afterDecimal,s=U.addNegation;return y.end-y.start<S.end-S.start&&q===""&&w&&!parseFloat(H)&&(e=s?"-":""),e}function qe(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),o=e[0]==="-";a.fill(!1,0,r.length+(o?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function He(e){var t=ae(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var o=e.allowNegative;if(o===void 0&&(o=!0),r===n)throw new Error(`
|
|
1
|
+
import{R as Q,r as T}from"./index-C1elUt1E.js";import{s as Ie}from"./index-ZUNcqgeq.js";import"./FormClearHelper-BtlF8Otx.js";import"./withFullScreenWrapper-Cn2wnMdj.js";import"./Toolbar-BsqjDjhG.js";import"./sprintf-C-r3gIuM.js";import"./createDownloadLinkElement-DZMwyjvU.js";import"./slicedToArray--nOyZAEU.js";import"./getPrototypeOf-D0_3wfU4.js";import"./createSuper-0pNNY1_M.js";import"./FileDownload.esm-DJAez7Gm.js";const Re=Ie("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var X;(function(e){e.event="event",e.props="prop"})(X||(X={}));function G(){}function Ae(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(o,l){return o===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ee(e){return!!(e||"").match(/\d/)}function Z(e){return e==null}function je(e){return typeof e=="number"&&isNaN(e)}function ce(e){return Z(e)||je(e)||typeof e=="number"&&!isFinite(e)}function fe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Te(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Fe(e,t,r){var n=Te(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Be(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function ue(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),o=a[0],l=a[1]||"";return{beforeDecimal:o,afterDecimal:l,hasNegation:r,addNegation:n}}function Me(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ve(e,t,r){for(var n="",a=r?"0":"",o=0;o<=t-1;o++)n+=e[o]||a;return n}function de(e,t){return Array(t+1).join(e)}function me(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],o=n[1];if(o=Number(o),!o)return r+a;a=a.replace(".","");var l=1+o,g=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=g?a=a+de("0",l-g):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=ue(e),o=a.beforeDecimal,l=a.afterDecimal,g=a.hasNegation,S=parseFloat("0."+(l||"0")),y=l.length<=t?"0."+l:S.toFixed(t),p=y.split("."),d=o.split("").reverse().reduce(function(w,N,m){return w.length>m?(Number(w[0])+Number(N)).toString()+w.substring(1,w.length):N+w},p[0]),h=ve(p[1]||"",t,r),b=g?"-":"",v=n?".":"";return""+b+d+v+h}function z(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var pe=Ae(function(e,t){for(var r=0,n=0,a=e.length,o=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[o-1-n]&&o-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:o-n}}});function Pe(e,t,r){return Math.min(Math.max(e,t),r)}function ie(e){return Math.max(e.selectionStart,e.selectionEnd)}function ke(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Le(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function We(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ke(e,t,r,n,a,o,l){l===void 0&&(l=We);var g=a.findIndex(function(W){return W}),S=e.slice(0,g);!t&&!r.startsWith(S)&&(t=S,r=S+r,n=n+S.length);for(var y=r.length,p=e.length,d={},h=new Array(y),b=0;b<y;b++){h[b]=-1;for(var v=0,w=p;v<w;v++){var N=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:b,formattedValueIndex:v});if(N&&d[v]!==!0){h[b]=v,d[v]=!0;break}}}for(var m=n;m<y&&(h[m]===-1||!o(r[m]));)m++;var F=m===y||h[m]===-1?p:h[m];for(m=n-1;m>0&&h[m]===-1;)m--;var M=m===-1||h[m]===-1?0:h[m]+1;return M>F?F:n-M<F-n?M:F}function he(e,t,r,n){var a=e.length;if(t=Pe(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ue(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ee(e[r])||ee(e[r-1]));return t}function Se(e,t,r,n,a,o){o===void 0&&(o=G);var l=Be(function(v,w){var N,m;return ce(v)?(m="",N=""):typeof v=="number"||w?(m=typeof v=="number"?me(v):v,N=n(m)):(m=a(v,void 0),N=n(m)),{formattedValue:N,numAsString:m}}),g=T.useState(function(){return l(Z(e)?t:e,r)}),S=g[0],y=g[1],p=function(v,w){v.formattedValue!==S.formattedValue&&y({formattedValue:v.formattedValue,numAsString:v.value}),o(v,w)},d=e,h=r;Z(e)&&(d=S.numAsString,h=!0);var b=l(d,h);return T.useMemo(function(){y(b)},[b.formattedValue]),[S,p]}function Ge(e){return e.replace(/[^0-9]/g,"")}function _e(e){return e}function $e(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,o=e.getInputRef,l=e.format;l===void 0&&(l=_e);var g=e.removeFormatting;g===void 0&&(g=Ge);var S=e.defaultValue,y=e.valueIsNumericString,p=e.onValueChange,d=e.isAllowed,h=e.onChange;h===void 0&&(h=G);var b=e.onKeyDown;b===void 0&&(b=G);var v=e.onMouseUp;v===void 0&&(v=G);var w=e.onFocus;w===void 0&&(w=G);var N=e.onBlur;N===void 0&&(N=G);var m=e.value,F=e.getCaretBoundary;F===void 0&&(F=Ue);var M=e.isValidInputCharacter;M===void 0&&(M=ee);var W=e.isCharacterSame,P=se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),_=Se(m,S,!!y,l,g,p),K=_[0],V=K.formattedValue,k=K.numAsString,$=_[1],L=T.useRef({formattedValue:V,numAsString:k}),J=function(u,i){L.current={formattedValue:u.formattedValue,numAsString:u.value},$(u,i)},U=T.useState(!1),q=U[0],H=U[1],s=T.useRef(null),c=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return H(!0),function(){clearTimeout(c.current.setCaretTimeout),clearTimeout(c.current.focusTimeout)}},[]);var A=l,D=function(u,i){var f=parseFloat(i);return{formattedValue:u,value:i,floatValue:isNaN(f)?void 0:f}},C=function(u,i,f){u.selectionStart===0&&u.selectionEnd===u.value.length||(z(u,i),c.current.setCaretTimeout=setTimeout(function(){u.value===f&&u.selectionStart!==u.selectionEnd&&z(u,i)},0))},I=function(u,i,f){return he(u,i,F(u),f)},B=function(u,i,f){var E=F(i),O=Ke(i,V,u,f,E,M,W);return O=he(i,O,E),O},te=function(u){var i=u.formattedValue;i===void 0&&(i="");var f=u.input,E=u.setCaretPosition;E===void 0&&(E=!0);var O=u.source,x=u.event,R=u.numAsString,j=u.caretPos;if(f){if(j===void 0&&E){var Y=u.inputValue||f.value,oe=ie(f);f.value=i,j=B(Y,i,oe)}f.value=i,E&&j!==void 0&&C(f,j,i)}i!==V&&J(D(i,R),{event:x,source:O})};T.useEffect(function(){var u=L.current,i=u.formattedValue,f=u.numAsString;V!==i&&(V!==k||i!==f)&&J(D(V,k),{event:void 0,source:X.props})},[V,k]);var ne=s.current?ie(s.current):void 0,re=typeof window<"u"?T.useLayoutEffect:T.useEffect;re(function(){var u=s.current;if(V!==L.current.formattedValue&&u){var i=B(L.current.formattedValue,V,ne);u.value=V,C(u,i,V)}},[V]);var Ve=function(u,i,f){var E=pe(V,u),O=Object.assign(Object.assign({},E),{lastValue:V}),x=g(u,O),R=A(x);if(x=g(R,void 0),d&&!d(D(R,x))){var j=i.target,Y=ie(j),oe=B(u,V,Y);return j.value=V,C(j,oe,V),!1}return te({formattedValue:R,numAsString:x,inputValue:u,event:i,source:f,setCaretPosition:!0,input:i.target}),!0},xe=function(u){var i=u.target,f=i.value,E=Ve(f,u,X.event);E&&h(u)},we=function(u){var i=u.target,f=u.key,E=i.selectionStart,O=i.selectionEnd,x=i.value;x===void 0&&(x="");var R;if(f==="ArrowLeft"||f==="Backspace"?R=Math.max(E-1,0):f==="ArrowRight"?R=Math.min(E+1,x.length):f==="Delete"&&(R=E),R===void 0||E!==O){b(u);return}var j=R;if(f==="ArrowLeft"||f==="ArrowRight"){var Y=f==="ArrowLeft"?"left":"right";j=I(x,R,Y),j!==R&&u.preventDefault()}else f==="Delete"&&!M(x[R])?j=I(x,R,"right"):f==="Backspace"&&!M(x[R])&&(j=I(x,R,"left"));j!==R&&C(i,j,x),u.isUnitTestRun&&C(i,j,x),b(u)},Ne=function(u){var i=u.target,f=i.selectionStart,E=i.selectionEnd,O=i.value;if(O===void 0&&(O=""),f===E){var x=I(O,f);x!==f&&C(i,x,O)}v(u)},De=function(u){u.persist&&u.persist();var i=u.target;s.current=i,c.current.focusTimeout=setTimeout(function(){var f=i.selectionStart,E=i.selectionEnd,O=i.value;O===void 0&&(O="");var x=I(O,f);x!==f&&!(f===0&&E===O.length)&&C(i,x,O),w(u)},0)},Ce=function(u){s.current=null,clearTimeout(c.current.focusTimeout),clearTimeout(c.current.setCaretTimeout),N(u)},Ee=q&&ke()?"numeric":void 0,le=Object.assign({inputMode:Ee},P,{type:t,value:V,onChange:xe,onKeyDown:we,onMouseUp:Ne,onFocus:De,onBlur:Ce});if(r==="text")return a?Q.createElement(Q.Fragment,null,a(V,P)||null):Q.createElement("span",Object.assign({},P,{ref:o}),V);if(n){var Oe=n;return Q.createElement(Oe,Object.assign({},le,{ref:o}))}return Q.createElement("input",Object.assign({},le,{ref:o}))}function be(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var o=t.suffix;o===void 0&&(o="");var l=t.allowNegative,g=t.thousandsGroupStyle;if(g===void 0&&(g="thousand"),e===""||e==="-")return e;var S=ae(t),y=S.thousandSeparator,p=S.decimalSeparator,d=r!==0&&e.indexOf(".")!==-1||r&&n,h=ue(e,l),b=h.beforeDecimal,v=h.afterDecimal,w=h.addNegation;return r!==void 0&&(v=ve(v,r,!!n)),y&&(b=Fe(b,y,g)),a&&(b=a+b),o&&(v=v+o),w&&(b="-"+b),e=b+(d&&p||"")+v,e}function ae(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function ze(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),o=n.test(e);return e=e.replace(/-/g,""),a&&!o&&t&&(e="-"+e),e}function Je(e,t){return new RegExp("(^-)|[0-9]|"+fe(e),"g")}function Qe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ze(e,t,r){var n;t===void 0&&(t=Le(e));var a=r.allowNegative,o=r.prefix;o===void 0&&(o="");var l=r.suffix;l===void 0&&(l="");var g=r.decimalScale,S=t.from,y=t.to,p=y.start,d=y.end,h=ae(r),b=h.allowedDecimalSeparators,v=h.decimalSeparator,w=e[d]===v;if(ee(e)&&(e===o||e===l)&&t.lastValue==="")return e;if(d-p===1&&b.indexOf(e[p])!==-1){var N=g===0?"":v;e=e.substring(0,p)+N+e.substring(p+1,e.length)}var m=function(c,A,D){var C=!1,I=!1;o.startsWith("-")?C=!1:c.startsWith("--")?(C=!1,I=!0):l.startsWith("-")&&c.length===l.length?C=!1:c[0]==="-"&&(C=!0);var B=C?1:0;return I&&(B=2),B&&(c=c.substring(B),A-=B,D-=B),{value:c,start:A,end:D,hasNegation:C}},F=m(e,p,d),M=F.hasNegation;n=F,e=n.value,p=n.start,d=n.end;var W=m(t.lastValue,S.start,S.end),P=W.start,_=W.end,K=W.value,V=e.substring(p,d);e.length&&K.length&&(P>K.length-l.length||_<o.length)&&!(V&&l.startsWith(V))&&(e=K);var k=0;e.startsWith(o)?k+=o.length:p<o.length&&(k=p),e=e.substring(k),d-=k;var $=e.length,L=e.length-l.length;e.endsWith(l)?$=L:(d>L||d>e.length-l.length)&&($=d),e=e.substring(0,$),e=ze(M?"-"+e:e,a),e=(e.match(Je(v))||[]).join("");var J=e.indexOf(v);e=e.replace(new RegExp(fe(v),"g"),function(c,A){return A===J?".":""});var U=ue(e,a),q=U.beforeDecimal,H=U.afterDecimal,s=U.addNegation;return y.end-y.start<S.end-S.start&&q===""&&w&&!parseFloat(H)&&(e=s?"-":""),e}function qe(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),o=e[0]==="-";a.fill(!1,0,r.length+(o?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function He(e){var t=ae(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var o=e.allowNegative;if(o===void 0&&(o=!0),r===n)throw new Error(`
|
|
2
2
|
Decimal separator can't be same as thousand separator.
|
|
3
3
|
thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
4
4
|
decimalSeparator: `+n+` (default value for decimalSeparator is .)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as l}from"./es6-
|
|
1
|
+
import{e as l}from"./es6-irkMYhr9.js";import"./index-C1elUt1E.js";const{DISALLOWED:h}=l;class w{constructor(e,t){this.writer=e,this.fileEntry=t}async write(e){if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.writer.seek(e.position),this.writer.position!==e.position&&(await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.truncate(e.position)}),this.writer.seek(e.position))),!("data"in e))throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. write requires a data argument","SyntaxError");e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.writer.seek(e.position),this.writer.position!==e.position)throw new DOMException("seeking position failed","InvalidStateError");return}else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. seek requires a position argument","SyntaxError");else if(e.type==="truncate")return new Promise(t=>{if(Number.isInteger(e.size)&&e.size>=0)this.writer.onwriteend=i=>t(),this.writer.truncate(e.size);else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. truncate requires a size argument","SyntaxError")})}await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.write(new Blob([e]))})}close(){return new Promise(this.fileEntry.file.bind(this.fileEntry))}}class a{constructor(e,t=!0){this.file=e,this.kind="file",this.writable=t,this.readable=!0}get name(){return this.file.name}isSameEntry(e){return this.file.toURL()===e.file.toURL()}getFile(){return new Promise(this.file.file.bind(this.file))}createWritable(e){if(!this.writable)throw new DOMException(...h);return new Promise((t,i)=>this.file.createWriter(r=>{e.keepExistingData===!1?(r.onwriteend=n=>t(new w(r,this.file)),r.truncate(0)):t(new w(r,this.file))},i))}}class s{constructor(e,t=!0){this.dir=e,this.writable=t,this.readable=!0,this.kind="directory",this.name=e.name}isSameEntry(e){return this.dir.fullPath===e.dir.fullPath}async*entries(){const e=this.dir.createReader(),t=await new Promise(e.readEntries.bind(e));for(const i of t)yield[i.name,i.isFile?new a(i,this.writable):new s(i,this.writable)]}getDirectoryHandle(e,t){return new Promise((i,r)=>{this.dir.getDirectory(e,t,n=>{i(new s(n))},r)})}getFileHandle(e,t){return new Promise((i,r)=>this.dir.getFile(e,t,n=>i(new a(n)),r))}async removeEntry(e,t){const i=await this.getDirectoryHandle(e,{create:!1}).catch(r=>r.name==="TypeMismatchError"?this.getFileHandle(e,{create:!1}):r);if(i instanceof Error)throw i;return new Promise((r,n)=>{i instanceof s?t.recursive?i.dir.removeRecursively(()=>r(),n):i.dir.remove(()=>r(),n):i.file&&i.file.remove(()=>r(),n)})}}const d=(o={})=>new Promise((e,t)=>window.webkitRequestFileSystem(o._persistent,0,i=>e(new s(i.root)),t));export{a as FileHandle,s as FolderHandle,d as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as a,E as y,_ as d,az as h}from"./index-
|
|
1
|
+
import{r as a,E as y,_ as d,az as h}from"./index-C1elUt1E.js";var s=a.forwardRef(function(r,e){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(y,d({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:e}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});s.displayName="Close";function p(r){if(Array.isArray(r))return r}function b(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var i,u,f,l,o=[],n=!0,c=!1;try{if(f=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;n=!1}else for(;!(n=(i=f.call(t)).done)&&(o.push(i.value),o.length!==e);n=!0);}catch(m){c=!0,u=m}finally{try{if(!n&&t.return!=null&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw u}}return o}}function v(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w(r,e){return p(r)||b(r,e)||h(r,e)||v()}export{s as C,w as _};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b2 as b,r as d,bJ as x,b3 as $,bq as F,bK as T}from"./index-
|
|
1
|
+
import{b2 as b,r as d,bJ as x,b3 as $,bq as F,bK as T}from"./index-C1elUt1E.js";import{g as R,a as A,b as E,B as z}from"./base-input-CgYn_7GU.js";function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j(Object(r),!0).forEach(function(n){B(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m=b("div",function(e){return s(s({},R(s(s({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})});m.displayName="StyledTextAreaRoot",m.displayName="StyledTextAreaRoot";var h=b("div",function(e){return A(s({$positive:!1},e))});h.displayName="StyledTextareaContainer",h.displayName="StyledTextareaContainer";var v=b("textarea",function(e){return s(s({},E(e)),{},{resize:e.$resize||"none"})});v.displayName="StyledTextarea",v.displayName="StyledTextarea";function O(e){"@babel/helpers - typeof";return O=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}function _(e,t){return N(e)||I(e,t)||D(e,t)||C()}function C(){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 D(e,t){if(e){if(typeof e=="string")return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w(e,t)}}function w(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function I(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,u=!1,i,a;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(y){u=!0,a=y}finally{try{!o&&r.return!=null&&r.return()}finally{if(u)throw a}}return n}}function N(e){if(Array.isArray(e))return e}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k(e,t,r){return K(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function U(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},g(e,t)}function J(e){var t=H();return function(){var r=f(e),n;if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return M(this,n)}}function M(e,t){if(t&&(O(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(e)}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var P=function(e){U(r,e);var t=J(r);function r(){var n;q(this,r);for(var o=arguments.length,u=new Array(o),i=0;i<o;i++)u[i]=arguments[i];return n=t.call.apply(t,[this].concat(u)),p(l(n),"state",{isFocused:n.props.autoFocus||!1}),p(l(n),"onFocus",function(a){n.setState({isFocused:!0}),n.props.onFocus(a)}),p(l(n),"onBlur",function(a){n.setState({isFocused:!1}),n.props.onBlur(a)}),n}return k(r,[{key:"render",value:function(){var n=this.props.overrides,o=n===void 0?{}:n,u=$(o.Root,m),i=_(u,2),a=i[0],y=i[1],S=F({Input:{component:v},InputContainer:{component:h}},o);return d.createElement(a,c({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},y),d.createElement(z,c({},this.props,{type:T.textarea,overrides:S,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}]),r}(d.Component);p(P,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:x.default});export{P as T};
|