@oardi/ts-utils 0.0.56 → 0.0.58
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/helpers/download.helper.d.ts +19 -12
- package/helpers/image.helper.d.ts +2 -0
- package/helpers/index.d.ts +2 -0
- package/index.cjs +8 -8
- package/index.mjs +672 -639
- package/index.umd.js +8 -8
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(z,yt){typeof exports=="object"&&typeof module<"u"?yt(exports):typeof define=="function"&&define.amd?define(["exports"],yt):(z=typeof globalThis<"u"?globalThis:z||self,yt(z["ts-utils"]={}))})(this,(function(z){"use strict";const yt={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600};class _t{static getScreenWidth(){return document.documentElement.clientWidth}static getScreenHeight(){return document.documentElement.clientHeight}}class ht{static breakPoints=yt;static getCurrentBreakpoint(){return ht.getBreakpointByScreenWidth(_t.getScreenWidth())}static getBreakpointByScreenWidth(t=_t.getScreenWidth()){let n="xs";for(const a of Object.keys(ht.breakPoints))ht.breakPoints[a]<=t&&(n=a);return{breakpoint:n,screenWidth:t}}static isScreenGreaterThan(t){return _t.getScreenWidth()>ht.breakPoints[t]}static isScreenSmallerThan(t){return _t.getScreenWidth()<ht.breakPoints[t]}}var H=(s=>(s.opera="opera",s.firefox="firefox",s.safari="safari",s.ie="ie",s.edgeLegacy="edgeLegacy",s.edg="edg",s.chrome="chrome",s.iOS="iOS",s.headlessChrome="headlessChrome",s.nodeRuntime="nodeRuntime",s.electron="electron",s))(H||{});const ct=(typeof navigator<"u"?navigator.userAgent:"").toLowerCase();class tt{static isBrowserEnv(){return typeof window<"u"&&typeof navigator<"u"}static isOpera(t=ct){return this.isBrowserEnv()?t.includes("opr/")||t.includes("opera"):!1}static isFirefox(t=ct){return this.isBrowserEnv()?t.includes("firefox")||typeof globalThis.InstallTrigger<"u":!1}static isSafari(t=ct){if(!this.isBrowserEnv())return!1;const n=navigator.vendor&&navigator.vendor.includes("Apple"),a=t.includes("safari"),_=!(t.includes("crios")||t.includes("chrome")||t.includes("android")||t.includes("opr/")||t.includes("edg"));return n&&a&&_}static isIOS(t=ct){if(!this.isBrowserEnv())return!1;const n=/iphone|ipad|ipod/.test(t),a=t.includes("macintosh")&&navigator.maxTouchPoints>1;return n||a}static isEdgeLegacy(){return this.isBrowserEnv()?!!window.StyleMedia&&!ct.includes("edg/"):!1}static isEdg(t=ct){return this.isBrowserEnv()?t.includes("edg/"):!1}static isIE(){return!this.isBrowserEnv()&&typeof document>"u"?!1:!!document.documentMode}static isChrome(t=ct){if(!this.isBrowserEnv())return!1;const n=navigator.vendor&&navigator.vendor.includes("Google"),a=t.includes("chrome")||t.includes("crios"),_=!this.isEdg(t)&&!this.isOpera(t);return n&&a&&_}static isElectron(t=ct){return typeof process<"u"&&process.versions?.electron?!0:t.includes("electron")}static isHeadlessChrome(t=ct){return t.includes("headlesschrome")}static isNodeRuntime(){return typeof process<"u"&&!!process.versions?.node&&!this.isBrowserEnv()}static getCurrentBrowser(){if(typeof navigator>"u"){if(tt.isElectron())return H.electron;if(tt.isNodeRuntime())return H.nodeRuntime;throw new Error("navigator not set")}const t=navigator.userAgent.toLowerCase();if(tt.isOpera())return H.opera;if(tt.isFirefox())return H.firefox;if(tt.isSafari())return H.safari;if(tt.isIE())return H.ie;if(tt.isEdgeLegacy())return H.edgeLegacy;if(tt.isEdg())return H.edg;if(tt.isChrome())return H.chrome;if(tt.isIOS(t))return H.iOS;if(tt.isElectron(t))return H.electron;if(tt.isHeadlessChrome(t))return H.headlessChrome;if(tt.isNodeRuntime())return H.nodeRuntime;throw new Error("Browser could not be detected: "+t)}}function Wt(s){return navigator.clipboard.writeText(s)}function Ot(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var xt={exports:{}};var Bt=xt.exports,At;function Nt(){return At||(At=1,(function(s,t){((n,a)=>{s.exports=a()})(Bt,function n(){var a=typeof self<"u"?self:typeof window<"u"?window:a!==void 0?a:{},_,D=!a.document&&!!a.postMessage,R=a.IS_PAPA_WORKER||!1,N={},J=0,p={};function W(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(r){var i=lt(r);i.chunkSize=parseInt(i.chunkSize),r.step||r.chunk||(i.chunkSize=null),this._handle=new it(i),(this._handle.streamer=this)._config=i}).call(this,e),this.parseChunk=function(r,i){var u=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<u){let S=this._config.newline;S||(m=this._config.quoteChar||'"',S=this._handle.guessLineEndings(r,m)),r=[...r.split(S).slice(u)].join(S)}this.isFirstChunk&&T(this._config.beforeFirstChunk)&&(m=this._config.beforeFirstChunk(r))!==void 0&&(r=m),this.isFirstChunk=!1,this._halted=!1;var u=this._partialLine+r,m=(this._partialLine="",this._handle.parse(u,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(r=m.meta.cursor,u=(this._finished||(this._partialLine=u.substring(r-this._baseIndex),this._baseIndex=r),m&&m.data&&(this._rowCount+=m.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),R)a.postMessage({results:m,workerId:p.WORKER_ID,finished:u});else if(T(this._config.chunk)&&!i){if(this._config.chunk(m,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=m=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(m.data),this._completeResults.errors=this._completeResults.errors.concat(m.errors),this._completeResults.meta=m.meta),this._completed||!u||!T(this._config.complete)||m&&m.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||m&&m.meta.paused||this._nextChunk(),m}this._halted=!0},this._sendError=function(r){T(this._config.error)?this._config.error(r):R&&this._config.error&&a.postMessage({workerId:p.WORKER_ID,error:r,finished:!1})}}function j(e){var r;(e=e||{}).chunkSize||(e.chunkSize=p.RemoteChunkSize),W.call(this,e),this._nextChunk=D?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(i){this._input=i,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),D||(r.onload=G(this._chunkLoaded,this),r.onerror=G(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!D),this._config.downloadRequestHeaders){var i,u=this._config.downloadRequestHeaders;for(i in u)r.setRequestHeader(i,u[i])}var m;this._config.chunkSize&&(m=this._start+this._config.chunkSize-1,r.setRequestHeader("Range","bytes="+this._start+"-"+m));try{r.send(this._config.downloadRequestBody)}catch(S){this._chunkError(S.message)}D&&r.status===0&&this._chunkError()}},this._chunkLoaded=function(){r.readyState===4&&(r.status<200||400<=r.status?this._chunkError():(this._start+=this._config.chunkSize||r.responseText.length,this._finished=!this._config.chunkSize||this._start>=(i=>(i=i.getResponseHeader("Content-Range"))!==null?parseInt(i.substring(i.lastIndexOf("/")+1)):-1)(r),this.parseChunk(r.responseText)))},this._chunkError=function(i){i=r.statusText||i,this._sendError(new Error(i))}}function V(e){(e=e||{}).chunkSize||(e.chunkSize=p.LocalChunkSize),W.call(this,e);var r,i,u=typeof FileReader<"u";this.stream=function(m){this._input=m,i=m.slice||m.webkitSlice||m.mozSlice,u?((r=new FileReader).onload=G(this._chunkLoaded,this),r.onerror=G(this._chunkError,this)):r=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var m=this._input,S=(this._config.chunkSize&&(S=Math.min(this._start+this._config.chunkSize,this._input.size),m=i.call(m,this._start,S)),r.readAsText(m,this._config.encoding));u||this._chunkLoaded({target:{result:S}})},this._chunkLoaded=function(m){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(m.target.result)},this._chunkError=function(){this._sendError(r.error)}}function K(e){var r;W.call(this,e=e||{}),this.stream=function(i){return r=i,this._nextChunk()},this._nextChunk=function(){var i,u;if(!this._finished)return i=this._config.chunkSize,r=i?(u=r.substring(0,i),r.substring(i)):(u=r,""),this._finished=!r,this.parseChunk(u)}}function rt(e){W.call(this,e=e||{});var r=[],i=!0,u=!1;this.pause=function(){W.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){W.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(m){this._input=m,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){u&&r.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),r.length?this.parseChunk(r.shift()):i=!0},this._streamData=G(function(m){try{r.push(typeof m=="string"?m:m.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(r.shift()))}catch(S){this._streamError(S)}},this),this._streamError=G(function(m){this._streamCleanUp(),this._sendError(m)},this),this._streamEnd=G(function(){this._streamCleanUp(),u=!0,this._streamData("")},this),this._streamCleanUp=G(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function it(e){var r,i,u,m,S=Math.pow(2,53),y=-S,d=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,o=this,c=0,f=0,v=!1,g=!1,w=[],h={data:[],errors:[],meta:{}};function M(b){return e.skipEmptyLines==="greedy"?b.join("").trim()==="":b.length===1&&b[0].length===0}function C(){if(h&&u&&(q("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+p.DefaultDelimiter+"'"),u=!1),e.skipEmptyLines&&(h.data=h.data.filter(function(k){return!M(k)})),P()){let k=function(A,Y){T(e.transformHeader)&&(A=e.transformHeader(A,Y)),w.push(A)};if(h)if(Array.isArray(h.data[0])){for(var b=0;P()&&b<h.data.length;b++)h.data[b].forEach(k);h.data.splice(0,1)}else h.data.forEach(k)}function O(k,A){for(var Y=e.header?{}:[],L=0;L<k.length;L++){var F=L,$=k[L],$=((st,E)=>(B=>(e.dynamicTypingFunction&&e.dynamicTyping[B]===void 0&&(e.dynamicTyping[B]=e.dynamicTypingFunction(B)),(e.dynamicTyping[B]||e.dynamicTyping)===!0))(st)?E==="true"||E==="TRUE"||E!=="false"&&E!=="FALSE"&&((B=>{if(d.test(B)&&(B=parseFloat(B),y<B&&B<S))return 1})(E)?parseFloat(E):l.test(E)?new Date(E):E===""?null:E):E)(F=e.header?L>=w.length?"__parsed_extra":w[L]:F,$=e.transform?e.transform($,F):$);F==="__parsed_extra"?(Y[F]=Y[F]||[],Y[F].push($)):Y[F]=$}return e.header&&(L>w.length?q("FieldMismatch","TooManyFields","Too many fields: expected "+w.length+" fields but parsed "+L,f+A):L<w.length&&q("FieldMismatch","TooFewFields","Too few fields: expected "+w.length+" fields but parsed "+L,f+A)),Y}var x;h&&(e.header||e.dynamicTyping||e.transform)&&(x=1,!h.data.length||Array.isArray(h.data[0])?(h.data=h.data.map(O),x=h.data.length):h.data=O(h.data,0),e.header&&h.meta&&(h.meta.fields=w),f+=x)}function P(){return e.header&&w.length===0}function q(b,O,x,k){b={type:b,code:O,message:x},k!==void 0&&(b.row=k),h.errors.push(b)}T(e.step)&&(m=e.step,e.step=function(b){h=b,P()?C():(C(),h.data.length!==0&&(c+=b.data.length,e.preview&&c>e.preview?i.abort():(h.data=h.data[0],m(h,o))))}),this.parse=function(b,O,x){var k=e.quoteChar||'"',k=(e.newline||(e.newline=this.guessLineEndings(b,k)),u=!1,e.delimiter?T(e.delimiter)&&(e.delimiter=e.delimiter(b),h.meta.delimiter=e.delimiter):((k=((A,Y,L,F,$)=>{var st,E,B,gt;$=$||[","," ","|",";",p.RECORD_SEP,p.UNIT_SEP];for(var wt=0;wt<$.length;wt++){for(var at,St=$[wt],X=0,ot=0,Q=0,nt=(B=void 0,new vt({comments:F,delimiter:St,newline:Y,preview:10}).parse(A)),dt=0;dt<nt.data.length;dt++)L&&M(nt.data[dt])?Q++:(at=nt.data[dt].length,ot+=at,B===void 0?B=at:0<at&&(X+=Math.abs(at-B),B=at));0<nt.data.length&&(ot/=nt.data.length-Q),(E===void 0||X<=E)&&(gt===void 0||gt<ot)&&1.99<ot&&(E=X,st=St,gt=ot)}return{successful:!!(e.delimiter=st),bestDelimiter:st}})(b,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=k.bestDelimiter:(u=!0,e.delimiter=p.DefaultDelimiter),h.meta.delimiter=e.delimiter),lt(e));return e.preview&&e.header&&k.preview++,r=b,i=new vt(k),h=i.parse(r,O,x),C(),v?{meta:{paused:!0}}:h||{meta:{paused:!1}}},this.paused=function(){return v},this.pause=function(){v=!0,i.abort(),r=T(e.chunk)?"":r.substring(i.getCharIndex())},this.resume=function(){o.streamer._halted?(v=!1,o.streamer.parseChunk(r,!0)):setTimeout(o.resume,3)},this.aborted=function(){return g},this.abort=function(){g=!0,i.abort(),h.meta.aborted=!0,T(e.complete)&&e.complete(h),r=""},this.guessLineEndings=function(A,k){A=A.substring(0,1048576);var k=new RegExp(ft(k)+"([^]*?)"+ft(k),"gm"),x=(A=A.replace(k,"")).split("\r"),k=A.split(`
|
|
2
|
-
`),
|
|
3
|
-
`;for(var
|
|
4
|
-
`&&
|
|
5
|
-
`:"\r"}}function
|
|
1
|
+
(function(L,ye){typeof exports=="object"&&typeof module<"u"?ye(exports):typeof define=="function"&&define.amd?define(["exports"],ye):(L=typeof globalThis<"u"?globalThis:L||self,ye(L["ts-utils"]={}))})(this,(function(L){"use strict";const ye={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600};class _e{static getScreenWidth(){return document.documentElement.clientWidth}static getScreenHeight(){return document.documentElement.clientHeight}}class he{static breakPoints=ye;static getCurrentBreakpoint(){return he.getBreakpointByScreenWidth(_e.getScreenWidth())}static getBreakpointByScreenWidth(e=_e.getScreenWidth()){let n="xs";for(const s of Object.keys(he.breakPoints))he.breakPoints[s]<=e&&(n=s);return{breakpoint:n,screenWidth:e}}static isScreenGreaterThan(e){return _e.getScreenWidth()>he.breakPoints[e]}static isScreenSmallerThan(e){return _e.getScreenWidth()<he.breakPoints[e]}}var ee=(a=>(a.opera="opera",a.firefox="firefox",a.safari="safari",a.ie="ie",a.edgeLegacy="edgeLegacy",a.edg="edg",a.chrome="chrome",a.iOS="iOS",a.headlessChrome="headlessChrome",a.nodeRuntime="nodeRuntime",a.electron="electron",a))(ee||{});const ce=(typeof navigator<"u"?navigator.userAgent:"").toLowerCase();class Z{static isBrowserEnv(){return typeof window<"u"&&typeof navigator<"u"}static isOpera(e=ce){return this.isBrowserEnv()?e.includes("opr/")||e.includes("opera"):!1}static isFirefox(e=ce){return this.isBrowserEnv()?e.includes("firefox")||typeof globalThis.InstallTrigger<"u":!1}static isSafari(e=ce){if(!this.isBrowserEnv())return!1;const n=navigator.vendor&&navigator.vendor.includes("Apple"),s=e.includes("safari"),m=!(e.includes("crios")||e.includes("chrome")||e.includes("android")||e.includes("opr/")||e.includes("edg"));return n&&s&&m}static isIOS(e=ce){if(!this.isBrowserEnv())return!1;const n=/iphone|ipad|ipod/.test(e),s=e.includes("macintosh")&&navigator.maxTouchPoints>1;return n||s}static isEdgeLegacy(){return this.isBrowserEnv()?!!window.StyleMedia&&!ce.includes("edg/"):!1}static isEdg(e=ce){return this.isBrowserEnv()?e.includes("edg/"):!1}static isIE(){return!this.isBrowserEnv()&&typeof document>"u"?!1:!!document.documentMode}static isChrome(e=ce){if(!this.isBrowserEnv())return!1;const n=navigator.vendor&&navigator.vendor.includes("Google"),s=e.includes("chrome")||e.includes("crios"),m=!this.isEdg(e)&&!this.isOpera(e);return n&&s&&m}static isElectron(e=ce){return typeof process<"u"&&process.versions?.electron?!0:e.includes("electron")}static isHeadlessChrome(e=ce){return e.includes("headlesschrome")}static isNodeRuntime(){return typeof process<"u"&&!!process.versions?.node&&!this.isBrowserEnv()}static getCurrentBrowser(){if(typeof navigator>"u"){if(Z.isElectron())return ee.electron;if(Z.isNodeRuntime())return ee.nodeRuntime;throw new Error("navigator not set")}const e=navigator.userAgent.toLowerCase();if(Z.isOpera())return ee.opera;if(Z.isFirefox())return ee.firefox;if(Z.isSafari())return ee.safari;if(Z.isIE())return ee.ie;if(Z.isEdgeLegacy())return ee.edgeLegacy;if(Z.isEdg())return ee.edg;if(Z.isChrome())return ee.chrome;if(Z.isIOS(e))return ee.iOS;if(Z.isElectron(e))return ee.electron;if(Z.isHeadlessChrome(e))return ee.headlessChrome;if(Z.isNodeRuntime())return ee.nodeRuntime;throw new Error("Browser could not be detected: "+e)}}class Ye{static toBlob(e,n,s=!1,m){return new Promise((_,j)=>{e.toBlob(F=>{F?_(F):j(new Error("canvas.toBlob returned null"))},n,s?m:void 0)})}}function Pe(a){return navigator.clipboard.writeText(a)}function De(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Oe={exports:{}};var Ne=Oe.exports,Le;function We(){return Le||(Le=1,(function(a,e){((n,s)=>{a.exports=s()})(Ne,function n(){var s=typeof self<"u"?self:typeof window<"u"?window:s!==void 0?s:{},m,_=!s.document&&!!s.postMessage,j=s.IS_PAPA_WORKER||!1,F={},J=0,h={};function z(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(r){var i=de(r);i.chunkSize=parseInt(i.chunkSize),r.step||r.chunk||(i.chunkSize=null),this._handle=new ie(i),(this._handle.streamer=this)._config=i}).call(this,t),this.parseChunk=function(r,i){var u=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<u){let E=this._config.newline;E||(y=this._config.quoteChar||'"',E=this._handle.guessLineEndings(r,y)),r=[...r.split(E).slice(u)].join(E)}this.isFirstChunk&&R(this._config.beforeFirstChunk)&&(y=this._config.beforeFirstChunk(r))!==void 0&&(r=y),this.isFirstChunk=!1,this._halted=!1;var u=this._partialLine+r,y=(this._partialLine="",this._handle.parse(u,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(r=y.meta.cursor,u=(this._finished||(this._partialLine=u.substring(r-this._baseIndex),this._baseIndex=r),y&&y.data&&(this._rowCount+=y.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),j)s.postMessage({results:y,workerId:h.WORKER_ID,finished:u});else if(R(this._config.chunk)&&!i){if(this._config.chunk(y,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=y=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(y.data),this._completeResults.errors=this._completeResults.errors.concat(y.errors),this._completeResults.meta=y.meta),this._completed||!u||!R(this._config.complete)||y&&y.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||y&&y.meta.paused||this._nextChunk(),y}this._halted=!0},this._sendError=function(r){R(this._config.error)?this._config.error(r):j&&this._config.error&&s.postMessage({workerId:h.WORKER_ID,error:r,finished:!1})}}function B(t){var r;(t=t||{}).chunkSize||(t.chunkSize=h.RemoteChunkSize),z.call(this,t),this._nextChunk=_?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(i){this._input=i,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),_||(r.onload=G(this._chunkLoaded,this),r.onerror=G(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!_),this._config.downloadRequestHeaders){var i,u=this._config.downloadRequestHeaders;for(i in u)r.setRequestHeader(i,u[i])}var y;this._config.chunkSize&&(y=this._start+this._config.chunkSize-1,r.setRequestHeader("Range","bytes="+this._start+"-"+y));try{r.send(this._config.downloadRequestBody)}catch(E){this._chunkError(E.message)}_&&r.status===0&&this._chunkError()}},this._chunkLoaded=function(){r.readyState===4&&(r.status<200||400<=r.status?this._chunkError():(this._start+=this._config.chunkSize||r.responseText.length,this._finished=!this._config.chunkSize||this._start>=(i=>(i=i.getResponseHeader("Content-Range"))!==null?parseInt(i.substring(i.lastIndexOf("/")+1)):-1)(r),this.parseChunk(r.responseText)))},this._chunkError=function(i){i=r.statusText||i,this._sendError(new Error(i))}}function V(t){(t=t||{}).chunkSize||(t.chunkSize=h.LocalChunkSize),z.call(this,t);var r,i,u=typeof FileReader<"u";this.stream=function(y){this._input=y,i=y.slice||y.webkitSlice||y.mozSlice,u?((r=new FileReader).onload=G(this._chunkLoaded,this),r.onerror=G(this._chunkError,this)):r=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var y=this._input,E=(this._config.chunkSize&&(E=Math.min(this._start+this._config.chunkSize,this._input.size),y=i.call(y,this._start,E)),r.readAsText(y,this._config.encoding));u||this._chunkLoaded({target:{result:E}})},this._chunkLoaded=function(y){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(y.target.result)},this._chunkError=function(){this._sendError(r.error)}}function K(t){var r;z.call(this,t=t||{}),this.stream=function(i){return r=i,this._nextChunk()},this._nextChunk=function(){var i,u;if(!this._finished)return i=this._config.chunkSize,r=i?(u=r.substring(0,i),r.substring(i)):(u=r,""),this._finished=!r,this.parseChunk(u)}}function re(t){z.call(this,t=t||{});var r=[],i=!0,u=!1;this.pause=function(){z.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){z.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(y){this._input=y,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){u&&r.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),r.length?this.parseChunk(r.shift()):i=!0},this._streamData=G(function(y){try{r.push(typeof y=="string"?y:y.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(r.shift()))}catch(E){this._streamError(E)}},this),this._streamError=G(function(y){this._streamCleanUp(),this._sendError(y)},this),this._streamEnd=G(function(){this._streamCleanUp(),u=!0,this._streamData("")},this),this._streamCleanUp=G(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function ie(t){var r,i,u,y,E=Math.pow(2,53),v=-E,f=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,d=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,o=this,c=0,l=0,w=!1,g=!1,k=[],p={data:[],errors:[],meta:{}};function M(S){return t.skipEmptyLines==="greedy"?S.join("").trim()==="":S.length===1&&S[0].length===0}function C(){if(p&&u&&(q("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+h.DefaultDelimiter+"'"),u=!1),t.skipEmptyLines&&(p.data=p.data.filter(function(b){return!M(b)})),Y()){let b=function(T,P){R(t.transformHeader)&&(T=t.transformHeader(T,P)),k.push(T)};if(p)if(Array.isArray(p.data[0])){for(var S=0;Y()&&S<p.data.length;S++)p.data[S].forEach(b);p.data.splice(0,1)}else p.data.forEach(b)}function O(b,T){for(var P=t.header?{}:[],A=0;A<b.length;A++){var U=A,$=b[A],$=((se,D)=>(W=>(t.dynamicTypingFunction&&t.dynamicTyping[W]===void 0&&(t.dynamicTyping[W]=t.dynamicTypingFunction(W)),(t.dynamicTyping[W]||t.dynamicTyping)===!0))(se)?D==="true"||D==="TRUE"||D!=="false"&&D!=="FALSE"&&((W=>{if(f.test(W)&&(W=parseFloat(W),v<W&&W<E))return 1})(D)?parseFloat(D):d.test(D)?new Date(D):D===""?null:D):D)(U=t.header?A>=k.length?"__parsed_extra":k[A]:U,$=t.transform?t.transform($,U):$);U==="__parsed_extra"?(P[U]=P[U]||[],P[U].push($)):P[U]=$}return t.header&&(A>k.length?q("FieldMismatch","TooManyFields","Too many fields: expected "+k.length+" fields but parsed "+A,l+T):A<k.length&&q("FieldMismatch","TooFewFields","Too few fields: expected "+k.length+" fields but parsed "+A,l+T)),P}var x;p&&(t.header||t.dynamicTyping||t.transform)&&(x=1,!p.data.length||Array.isArray(p.data[0])?(p.data=p.data.map(O),x=p.data.length):p.data=O(p.data,0),t.header&&p.meta&&(p.meta.fields=k),l+=x)}function Y(){return t.header&&k.length===0}function q(S,O,x,b){S={type:S,code:O,message:x},b!==void 0&&(S.row=b),p.errors.push(S)}R(t.step)&&(y=t.step,t.step=function(S){p=S,Y()?C():(C(),p.data.length!==0&&(c+=S.data.length,t.preview&&c>t.preview?i.abort():(p.data=p.data[0],y(p,o))))}),this.parse=function(S,O,x){var b=t.quoteChar||'"',b=(t.newline||(t.newline=this.guessLineEndings(S,b)),u=!1,t.delimiter?R(t.delimiter)&&(t.delimiter=t.delimiter(S),p.meta.delimiter=t.delimiter):((b=((T,P,A,U,$)=>{var se,D,W,me;$=$||[","," ","|",";",h.RECORD_SEP,h.UNIT_SEP];for(var we=0;we<$.length;we++){for(var ae,Se=$[we],X=0,oe=0,Q=0,ne=(W=void 0,new ve({comments:U,delimiter:Se,newline:P,preview:10}).parse(T)),fe=0;fe<ne.data.length;fe++)A&&M(ne.data[fe])?Q++:(ae=ne.data[fe].length,oe+=ae,W===void 0?W=ae:0<ae&&(X+=Math.abs(ae-W),W=ae));0<ne.data.length&&(oe/=ne.data.length-Q),(D===void 0||X<=D)&&(me===void 0||me<oe)&&1.99<oe&&(D=X,se=Se,me=oe)}return{successful:!!(t.delimiter=se),bestDelimiter:se}})(S,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=b.bestDelimiter:(u=!0,t.delimiter=h.DefaultDelimiter),p.meta.delimiter=t.delimiter),de(t));return t.preview&&t.header&&b.preview++,r=S,i=new ve(b),p=i.parse(r,O,x),C(),w?{meta:{paused:!0}}:p||{meta:{paused:!1}}},this.paused=function(){return w},this.pause=function(){w=!0,i.abort(),r=R(t.chunk)?"":r.substring(i.getCharIndex())},this.resume=function(){o.streamer._halted?(w=!1,o.streamer.parseChunk(r,!0)):setTimeout(o.resume,3)},this.aborted=function(){return g},this.abort=function(){g=!0,i.abort(),p.meta.aborted=!0,R(t.complete)&&t.complete(p),r=""},this.guessLineEndings=function(T,b){T=T.substring(0,1048576);var b=new RegExp(le(b)+"([^]*?)"+le(b),"gm"),x=(T=T.replace(b,"")).split("\r"),b=T.split(`
|
|
2
|
+
`),T=1<b.length&&b[0].length<x[0].length;if(x.length===1||T)return`
|
|
3
|
+
`;for(var P=0,A=0;A<x.length;A++)x[A][0]===`
|
|
4
|
+
`&&P++;return P>=x.length/2?`\r
|
|
5
|
+
`:"\r"}}function le(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ve(t){var r=(t=t||{}).delimiter,i=t.newline,u=t.comments,y=t.step,E=t.preview,v=t.fastMode,f=null,d=!1,o=t.quoteChar==null?'"':t.quoteChar,c=o;if(t.escapeChar!==void 0&&(c=t.escapeChar),(typeof r!="string"||-1<h.BAD_DELIMITERS.indexOf(r))&&(r=","),u===r)throw new Error("Comment character same as delimiter");u===!0?u="#":(typeof u!="string"||-1<h.BAD_DELIMITERS.indexOf(u))&&(u=!1),i!==`
|
|
6
6
|
`&&i!=="\r"&&i!==`\r
|
|
7
7
|
`&&(i=`
|
|
8
|
-
`);var
|
|
9
|
-
`,
|
|
10
|
-
`,'"',p.BYTE_ORDER_MARK],p.WORKERS_SUPPORTED=!D&&!!a.Worker,p.NODE_STREAM_INPUT=1,p.LocalChunkSize=10485760,p.RemoteChunkSize=5242880,p.DefaultDelimiter=",",p.Parser=vt,p.ParserHandle=it,p.NetworkStreamer=j,p.FileStreamer=V,p.StringStreamer=K,p.ReadableStreamStreamer=rt,a.jQuery&&((_=a.jQuery).fn.parse=function(e){var r=e.config||{},i=[];return this.each(function(S){if(!(_(this).prop("tagName").toUpperCase()==="INPUT"&&_(this).attr("type").toLowerCase()==="file"&&a.FileReader)||!this.files||this.files.length===0)return!0;for(var y=0;y<this.files.length;y++)i.push({file:this.files[y],inputElem:this,instanceConfig:_.extend({},r)})}),u(),this;function u(){if(i.length===0)T(e.complete)&&e.complete();else{var S,y,d,l,o=i[0];if(T(e.before)){var c=e.before(o.file,o.inputElem);if(typeof c=="object"){if(c.action==="abort")return S="AbortError",y=o.file,d=o.inputElem,l=c.reason,void(T(e.error)&&e.error({name:S},y,d,l));if(c.action==="skip")return void m();typeof c.config=="object"&&(o.instanceConfig=_.extend(o.instanceConfig,c.config))}else if(c==="skip")return void m()}var f=o.instanceConfig.complete;o.instanceConfig.complete=function(v){T(f)&&f(v,o.file,o.inputElem),m()},p.parse(o.file,o.instanceConfig)}}function m(){i.splice(0,1),u()}}),R&&(a.onmessage=function(e){e=e.data,p.WORKER_ID===void 0&&e&&(p.WORKER_ID=e.workerId),typeof e.input=="string"?a.postMessage({workerId:p.WORKER_ID,results:p.parse(e.input,e.config),finished:!0}):(a.File&&e.input instanceof File||e.input instanceof Object)&&(e=p.parse(e.input,e.config))&&a.postMessage({workerId:p.WORKER_ID,results:e,finished:!0})}),(j.prototype=Object.create(W.prototype)).constructor=j,(V.prototype=Object.create(W.prototype)).constructor=V,(K.prototype=Object.create(K.prototype)).constructor=K,(rt.prototype=Object.create(W.prototype)).constructor=rt,p})})(xt)),xt.exports}var qt=Nt();const Kt=Ot(qt),{parse:Jt,unparse:Qt}=Kt;class Vt{static unparse(t,n){return Qt(t,n)}static parse(t){return new Promise((n,a)=>{Jt(t,{header:!0,complete:_=>n(_),error:_=>a(_)})})}}async function It(s,t,n){const a=n?.mimeType??Gt(t),_=Zt(s,a);if("showSaveFilePicker"in window&&n?.showSaveFilePicker)try{const J=await(await window.showSaveFilePicker({suggestedName:t,types:[{description:"Datei",accept:{[a]:[`.${Lt(t)}`]}}]})).createWritable();await J.write(_),await J.close();return}catch{}const D=URL.createObjectURL(_),R=document.createElement("a");R.href=D,R.download=t,R.rel="noopener",R.style.display="none",document.body.appendChild(R),R.click(),window.setTimeout(()=>{document.body.removeChild(R),URL.revokeObjectURL(D)},0),Xt()&&window.open(D,"_blank","noopener,noreferrer")}function Zt(s,t){if(s instanceof Blob)return s.type?s:new Blob([s],{type:t});if(s instanceof ArrayBuffer||s instanceof Uint8Array){const n=s instanceof Uint8Array?s:new Uint8Array(s);return new Blob([n],{type:t})}return new Blob([s],{type:t||"text/plain;charset=utf-8"})}function Gt(s){switch(Lt(s).toLowerCase()){case"txt":return"text/plain;charset=utf-8";case"csv":return"text/csv;charset=utf-8";case"json":return"application/json;charset=utf-8";case"pdf":return"application/pdf";case"png":return"image/png";case"jpg":case"jpeg":return"image/jpeg";case"svg":return"image/svg+xml";case"zip":return"application/zip";default:return"application/octet-stream"}}function Lt(s){const t=s.lastIndexOf(".");return t>=0&&t<s.length-1?s.slice(t+1):""}function Xt(){const s=navigator.userAgent,t=/iPad|iPhone|iPod/.test(s),n=/^((?!chrome|android).)*safari/i.test(s);return t||n}class Ht{static getEnumValue(t,n){if(n in t)return t[n];throw Error(`${n} not found in ${t}`)}static getKeyValues(t){return Object.keys(t).filter(n=>!isNaN(Number(n))).map(n=>({key:Number(n),value:t[n]}))}}class te{static getFileExtension(t){let n="";const a=t.lastIndexOf(".");return a>0&&a<t.length-1&&(n=`.${t.substring(a+1).toLowerCase()}`),n}static readAsText(t){const n=new FileReader;return new Promise((a,_)=>{n.onload=()=>{n.onload=null,n.onerror=null,typeof n.result=="string"?a(n.result):_(new Error("Unexpected result type"))},n.onerror=()=>{const D=n.error??new Error("FileReader error");n.onload=null,n.onerror=null,_(D)},n.readAsText(t)})}static readAsArrayBuffer(t){const n=new FileReader;return new Promise((a,_)=>{n.onload=()=>{n.onload=null,n.onerror=null,n.result instanceof ArrayBuffer?a(n.result):_(new Error("Unexpected result type"))},n.onerror=()=>{const D=n.error??new Error("FileReader error");n.onload=null,n.onerror=null,_(D)},n.readAsArrayBuffer(t)})}static readAsDataUrl(t){const n=new FileReader;return new Promise((a,_)=>{n.onload=D=>{a(D)},n.onerror=D=>_(D),n.readAsDataURL(t)})}static formatFileSize(t,n=2,a){if(t===0)return"0 Bytes";const _=1024,D=["Bytes","KB","MB","GB","TB"];let R=Math.floor(Math.log(t)/Math.log(_));a&&D.includes(a)&&(R=D.indexOf(a));const N=t/Math.pow(_,R);return`${parseFloat(N.toFixed(n))} ${D[R]}`}static save(t,n,a){const _=new Blob([t],{type:a});It(_,n)}}class Dt{static set(t,n){localStorage.setItem(t,JSON.stringify(n))}static get(t){let n=null;const a=localStorage.getItem(t);return a&&(n=JSON.parse(a)),n}static remove(t){const n=localStorage.getItem(t)!==null;return n&&localStorage.removeItem(t),n}static removeAll(){localStorage.clear()}static getKeysBy(t){return Object.keys(localStorage).filter(n=>n.startsWith(t))}}var mt=(s=>(s.log="log",s.info="info",s.warn="warn",s.debug="debug",s.error="error",s))(mt||{});class Z{static listeners=new Set;static enabled=!0;static log(...t){Z.doLog(mt.log,t)}static info(...t){Z.doLog(mt.info,t)}static warn(...t){Z.doLog(mt.warn,t)}static debug(...t){Z.doLog(mt.debug,t)}static error(...t){Z.doLog(mt.error,t)}static clearListeners(){Z.listeners.clear()}static setEnabled(t){Z.enabled=t}static doLog(t,n){if(!Z.enabled)return;const a={type:t,args:n,timestamp:new Date().toISOString()};for(const _ of Z.listeners)try{if(_(a)===!1)return}catch{}console[t].apply(console,n)}static onLog(t,n=!1){if(n){const a=_=>{try{return t(_)}finally{Z.listeners.delete(a)}};return Z.listeners.add(a),()=>Z.listeners.delete(a)}return Z.listeners.add(t),()=>Z.listeners.delete(t)}}const ee=(s,t,n)=>s.localeCompare(t)*(n?1:-1),re=(s,t)=>s<t?-1:s===t?0:1,ne=(s,t,n)=>re(s,t)*(n?1:-1),ie=(s,t,n)=>{let a=0;return typeof s=="string"&&typeof t=="string"?a=ee(s,t,n):a=ne(s,t,n),a},Ft=(s,t,n,a)=>{const _=n(s),D=n(t);return ie(_,D,a)};class se{static get(t){return Dt.get(t)}static set(t,n){Dt.set(t,n)}static remove(t){Dt.remove(t)}}class I{static listeners=new Set;static initialized=!1;static resizeTimeout=null;static lastWidth=null;static onResize(t){return I.initialized||I.init(),I.listeners.add(t),()=>I.off(t)}static handleResize=()=>{I.resizeTimeout!==null&&(window.clearTimeout(I.resizeTimeout),I.resizeTimeout=null),I.resizeTimeout=window.setTimeout(()=>{const t=window.innerWidth;if(I.resizeTimeout=null,t!==I.lastWidth){I.lastWidth=t;for(const n of I.listeners)n(t)}},150)};static init(){if(!I.initialized){if(typeof window>"u")throw new Error("WindowResizeHelper is only available in browser environments");I.lastWidth=window.innerWidth,window.addEventListener("resize",I.handleResize,{passive:!0}),I.initialized=!0}}static off(t){I.initialized&&(I.listeners.delete(t),I.listeners.size===0&&(I.resizeTimeout!==null&&(window.clearTimeout(I.resizeTimeout),I.resizeTimeout=null),window.removeEventListener("resize",I.handleResize),I.initialized=!1,I.lastWidth=null))}}function U(s,t,n){Object.defineProperty(s,t,{configurable:!0,enumerable:!1,value:n,writable:!0})}function ae(){U(Array.prototype,"distinct",function(s){return s?this.filter((n,a,_)=>_.findIndex(D=>s(D,n))===a):this.filter((n,a,_)=>_.indexOf(n)===a)}),U(Array.prototype,"filterBy",function(s){return this.filter(t=>s(t))}),U(Array.prototype,"first",function(){return this.length>0?this[0]:null}),U(Array.prototype,"groupBy",function(s){return this.reduce((t,n)=>{const a=s(n);return t[a]||(t[a]=[]),t[a].push(n),t},{})}),U(Array.prototype,"orderBy",function(s,t=!0){return this?.sort((n,a)=>Ft(n,a,s,t)),this}),U(Array.prototype,"removeBy",function(s,t){return this.filter(n=>s(n)!==t)})}var Mt={exports:{}},oe=Mt.exports,zt;function ue(){return zt||(zt=1,(function(s,t){(function(n,a){s.exports=a()})(oe,(function(){var n=1e3,a=6e4,_=36e5,D="millisecond",R="second",N="minute",J="hour",p="day",W="week",j="month",V="quarter",K="year",rt="date",it="Invalid Date",ft=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,vt=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,bt={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(y){var d=["th","st","nd","rd"],l=y%100;return"["+y+(d[(l-20)%10]||d[l]||d[0])+"]"}},pt=function(y,d,l){var o=String(y);return!o||o.length>=d?y:""+Array(d+1-o.length).join(l)+y},Tt={s:pt,z:function(y){var d=-y.utcOffset(),l=Math.abs(d),o=Math.floor(l/60),c=l%60;return(d<=0?"+":"-")+pt(o,2,"0")+":"+pt(c,2,"0")},m:function y(d,l){if(d.date()<l.date())return-y(l,d);var o=12*(l.year()-d.year())+(l.month()-d.month()),c=d.clone().add(o,j),f=l-c<0,v=d.clone().add(o+(f?-1:1),j);return+(-(o+(l-c)/(f?c-v:v-c))||0)},a:function(y){return y<0?Math.ceil(y)||0:Math.floor(y)},p:function(y){return{M:j,y:K,w:W,d:p,D:rt,h:J,m:N,s:R,ms:D,Q:V}[y]||String(y||"").toLowerCase().replace(/s$/,"")},u:function(y){return y===void 0}},lt="en",G={};G[lt]=bt;var T="$isDayjsObject",e=function(y){return y instanceof m||!(!y||!y[T])},r=function y(d,l,o){var c;if(!d)return lt;if(typeof d=="string"){var f=d.toLowerCase();G[f]&&(c=f),l&&(G[f]=l,c=f);var v=d.split("-");if(!c&&v.length>1)return y(v[0])}else{var g=d.name;G[g]=d,c=g}return!o&&c&&(lt=c),c||!o&<},i=function(y,d){if(e(y))return y.clone();var l=typeof d=="object"?d:{};return l.date=y,l.args=arguments,new m(l)},u=Tt;u.l=r,u.i=e,u.w=function(y,d){return i(y,{locale:d.$L,utc:d.$u,x:d.$x,$offset:d.$offset})};var m=(function(){function y(l){this.$L=r(l.locale,null,!0),this.parse(l),this.$x=this.$x||l.x||{},this[T]=!0}var d=y.prototype;return d.parse=function(l){this.$d=(function(o){var c=o.date,f=o.utc;if(c===null)return new Date(NaN);if(u.u(c))return new Date;if(c instanceof Date)return new Date(c);if(typeof c=="string"&&!/Z$/i.test(c)){var v=c.match(ft);if(v){var g=v[2]-1||0,w=(v[7]||"0").substring(0,3);return f?new Date(Date.UTC(v[1],g,v[3]||1,v[4]||0,v[5]||0,v[6]||0,w)):new Date(v[1],g,v[3]||1,v[4]||0,v[5]||0,v[6]||0,w)}}return new Date(c)})(l),this.init()},d.init=function(){var l=this.$d;this.$y=l.getFullYear(),this.$M=l.getMonth(),this.$D=l.getDate(),this.$W=l.getDay(),this.$H=l.getHours(),this.$m=l.getMinutes(),this.$s=l.getSeconds(),this.$ms=l.getMilliseconds()},d.$utils=function(){return u},d.isValid=function(){return this.$d.toString()!==it},d.isSame=function(l,o){var c=i(l);return this.startOf(o)<=c&&c<=this.endOf(o)},d.isAfter=function(l,o){return i(l)<this.startOf(o)},d.isBefore=function(l,o){return this.endOf(o)<i(l)},d.$g=function(l,o,c){return u.u(l)?this[o]:this.set(c,l)},d.unix=function(){return Math.floor(this.valueOf()/1e3)},d.valueOf=function(){return this.$d.getTime()},d.startOf=function(l,o){var c=this,f=!!u.u(o)||o,v=u.p(l),g=function(O,x){var k=u.w(c.$u?Date.UTC(c.$y,x,O):new Date(c.$y,x,O),c);return f?k:k.endOf(p)},w=function(O,x){return u.w(c.toDate()[O].apply(c.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(x)),c)},h=this.$W,M=this.$M,C=this.$D,P="set"+(this.$u?"UTC":"");switch(v){case K:return f?g(1,0):g(31,11);case j:return f?g(1,M):g(0,M+1);case W:var q=this.$locale().weekStart||0,b=(h<q?h+7:h)-q;return g(f?C-b:C+(6-b),M);case p:case rt:return w(P+"Hours",0);case J:return w(P+"Minutes",1);case N:return w(P+"Seconds",2);case R:return w(P+"Milliseconds",3);default:return this.clone()}},d.endOf=function(l){return this.startOf(l,!1)},d.$set=function(l,o){var c,f=u.p(l),v="set"+(this.$u?"UTC":""),g=(c={},c[p]=v+"Date",c[rt]=v+"Date",c[j]=v+"Month",c[K]=v+"FullYear",c[J]=v+"Hours",c[N]=v+"Minutes",c[R]=v+"Seconds",c[D]=v+"Milliseconds",c)[f],w=f===p?this.$D+(o-this.$W):o;if(f===j||f===K){var h=this.clone().set(rt,1);h.$d[g](w),h.init(),this.$d=h.set(rt,Math.min(this.$D,h.daysInMonth())).$d}else g&&this.$d[g](w);return this.init(),this},d.set=function(l,o){return this.clone().$set(l,o)},d.get=function(l){return this[u.p(l)]()},d.add=function(l,o){var c,f=this;l=Number(l);var v=u.p(o),g=function(M){var C=i(f);return u.w(C.date(C.date()+Math.round(M*l)),f)};if(v===j)return this.set(j,this.$M+l);if(v===K)return this.set(K,this.$y+l);if(v===p)return g(1);if(v===W)return g(7);var w=(c={},c[N]=a,c[J]=_,c[R]=n,c)[v]||1,h=this.$d.getTime()+l*w;return u.w(h,this)},d.subtract=function(l,o){return this.add(-1*l,o)},d.format=function(l){var o=this,c=this.$locale();if(!this.isValid())return c.invalidDate||it;var f=l||"YYYY-MM-DDTHH:mm:ssZ",v=u.z(this),g=this.$H,w=this.$m,h=this.$M,M=c.weekdays,C=c.months,P=c.meridiem,q=function(x,k,A,Y){return x&&(x[k]||x(o,f))||A[k].slice(0,Y)},b=function(x){return u.s(g%12||12,x,"0")},O=P||function(x,k,A){var Y=x<12?"AM":"PM";return A?Y.toLowerCase():Y};return f.replace(vt,(function(x,k){return k||(function(A){switch(A){case"YY":return String(o.$y).slice(-2);case"YYYY":return u.s(o.$y,4,"0");case"M":return h+1;case"MM":return u.s(h+1,2,"0");case"MMM":return q(c.monthsShort,h,C,3);case"MMMM":return q(C,h);case"D":return o.$D;case"DD":return u.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return q(c.weekdaysMin,o.$W,M,2);case"ddd":return q(c.weekdaysShort,o.$W,M,3);case"dddd":return M[o.$W];case"H":return String(g);case"HH":return u.s(g,2,"0");case"h":return b(1);case"hh":return b(2);case"a":return O(g,w,!0);case"A":return O(g,w,!1);case"m":return String(w);case"mm":return u.s(w,2,"0");case"s":return String(o.$s);case"ss":return u.s(o.$s,2,"0");case"SSS":return u.s(o.$ms,3,"0");case"Z":return v}return null})(x)||v.replace(":","")}))},d.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},d.diff=function(l,o,c){var f,v=this,g=u.p(o),w=i(l),h=(w.utcOffset()-this.utcOffset())*a,M=this-w,C=function(){return u.m(v,w)};switch(g){case K:f=C()/12;break;case j:f=C();break;case V:f=C()/3;break;case W:f=(M-h)/6048e5;break;case p:f=(M-h)/864e5;break;case J:f=M/_;break;case N:f=M/a;break;case R:f=M/n;break;default:f=M}return c?f:u.a(f)},d.daysInMonth=function(){return this.endOf(j).$D},d.$locale=function(){return G[this.$L]},d.locale=function(l,o){if(!l)return this.$L;var c=this.clone(),f=r(l,o,!0);return f&&(c.$L=f),c},d.clone=function(){return u.w(this.$d,this)},d.toDate=function(){return new Date(this.valueOf())},d.toJSON=function(){return this.isValid()?this.toISOString():null},d.toISOString=function(){return this.$d.toISOString()},d.toString=function(){return this.$d.toUTCString()},y})(),S=m.prototype;return i.prototype=S,[["$ms",D],["$s",R],["$m",N],["$H",J],["$W",p],["$M",j],["$y",K],["$D",rt]].forEach((function(y){S[y[1]]=function(d){return this.$g(d,y[0],y[1])}})),i.extend=function(y,d){return y.$i||(y(d,m,i),y.$i=!0),i},i.locale=r,i.isDayjs=e,i.unix=function(y){return i(1e3*y)},i.en=G[lt],i.Ls=G,i.p={},i}))})(Mt)),Mt.exports}var ce=ue();const et=Ot(ce);var $t={exports:{}},fe=$t.exports,jt;function le(){return jt||(jt=1,(function(s,t){(function(n,a){s.exports=a()})(fe,(function(){var n="day";return function(a,_,D){var R=function(p){return p.add(4-p.isoWeekday(),n)},N=_.prototype;N.isoWeekYear=function(){return R(this).year()},N.isoWeek=function(p){if(!this.$utils().u(p))return this.add(7*(p-this.isoWeek()),n);var W,j,V,K,rt=R(this),it=(W=this.isoWeekYear(),j=this.$u,V=(j?D.utc:D)().year(W).startOf("year"),K=4-V.isoWeekday(),V.isoWeekday()>4&&(K+=7),V.add(K,n));return rt.diff(it,"week")+1},N.isoWeekday=function(p){return this.$utils().u(p)?this.day()||7:this.day(this.day()%7?p:p-7)};var J=N.startOf;N.startOf=function(p,W){var j=this.$utils(),V=!!j.u(W)||W;return j.p(p)==="isoweek"?V?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):J.bind(this)(p,W)}}}))})($t)),$t.exports}var de=le();const he=Ot(de);var Ct={exports:{}},pe=Ct.exports,Pt;function ge(){return Pt||(Pt=1,(function(s,t){(function(n,a){s.exports=a()})(pe,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(a,_,D){var R=_.prototype,N=R.format;D.en.formats=n,R.format=function(J){J===void 0&&(J="YYYY-MM-DDTHH:mm:ssZ");var p=this.$locale().formats,W=(function(j,V){return j.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(K,rt,it){var ft=it&&it.toUpperCase();return rt||V[it]||n[it]||V[ft].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(vt,bt,pt){return bt||pt.slice(1)}))}))})(J,p===void 0?{}:p);return N.call(this,W)}}}))})(Ct)),Ct.exports}var me=ge();const ye=Ot(me);et.extend(ye),et.extend(he);function ve(){U(Date.prototype,"add",function(s,t){return et(this).add(s,t).toDate()}),U(Date.prototype,"diff",function(s,t){return et(this).diff(s,t)}),U(Date.prototype,"endOf",function(s){return et(this).endOf(s).toDate()}),U(Date.prototype,"firstDayOfMonth",function(){return et(this).startOf("month").toDate()}),U(Date.prototype,"format",function(s){return et(this).format(s)}),U(Date.prototype,"isAfter",function(s,t){return et(this).isAfter(s,t)}),U(Date.prototype,"isBefore",function(s,t){return et(this).isBefore(s,t)}),U(Date.prototype,"isValid",function(){return et(this).isValid()}),U(Date.prototype,"isoWeek",function(){return et(this).isoWeek()}),U(Date.prototype,"subtract",function(s,t){return et(this).subtract(s,t).toDate()}),U(Date.prototype,"lastDayOfMonth",function(){return et(this).endOf("month").toDate()}),U(Date.prototype,"set",function(s,t){return et(this).set(s,t).toDate()}),U(Date.prototype,"startOf",function(s){return et(this).startOf(s).toDate()})}function we(){U(String.prototype,"capitalize",function(){return this.charAt(0).toUpperCase()+this.slice(1)}),U(String.prototype,"isNumber",function(){return!isNaN(Number(this))&&this.trim()!==""}),U(String.prototype,"isEmpty",function(){return this===void 0||!this||this.length===0}),U(String.prototype,"stripTags",function(){return new DOMParser().parseFromString(this.toString(),"text/html").body.textContent||""})}class ke{resizeListener=null;onResizeCallbacks=new Set;emitTimeoutId=null;duplicateThresholdMs=60;constructor(){typeof window<"u"&&(this.resizeListener=this.onResize,window.addEventListener("resize",this.resizeListener,{passive:!0}))}destroy(){typeof window<"u"&&this.resizeListener!==null&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null),this.emitTimeoutId!==null&&(clearTimeout(this.emitTimeoutId),this.emitTimeoutId=null),this.onResizeCallbacks.clear()}onResizeChange(t){this.onResizeCallbacks.add(t)}offResizeChange(t){this.onResizeCallbacks.delete(t)}onResize=()=>{if(typeof window>"u")return;const t=window.innerWidth;this.emitTimeoutId!==null&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.emitTimeoutId=null;const n=ht.getBreakpointByScreenWidth(t);for(const a of this.onResizeCallbacks)a(t,n)},this.duplicateThresholdMs)}}z.BreakPointHelper=ht,z.BreakPoints=yt,z.BrowserHelper=tt,z.BrowserService=ke,z.BrowserType=H,z.CsvHelper=Vt,z.EnumHelper=Ht,z.FileHelper=te,z.LocalStorageHelper=Dt,z.LoggerHelper=Z,z.LoggerType=mt,z.ScreenHelper=_t,z.TokenHelper=se,z.WindowResizeHelper=I,z.copyToClipboard=Wt,z.initArrayExtensions=ae,z.initDateExtensions=ve,z.initStringExtensions=we,z.saveAs=It,z.sortHelper=Ft,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})}));
|
|
8
|
+
`);var l=0,w=!1;this.parse=function(g,k,p){if(typeof g!="string")throw new Error("Input must be a string");var M=g.length,C=r.length,Y=i.length,q=u.length,S=R(y),O=[],x=[],b=[],T=l=0;if(!g)return X();if(v||v!==!1&&g.indexOf(o)===-1){for(var P=g.split(i),A=0;A<P.length;A++){if(b=P[A],l+=b.length,A!==P.length-1)l+=i.length;else if(p)return X();if(!u||b.substring(0,q)!==u){if(S){if(O=[],me(b.split(r)),oe(),w)return X()}else me(b.split(r));if(E&&E<=A)return O=O.slice(0,E),X(!0)}}return X()}for(var U=g.indexOf(r,l),$=g.indexOf(i,l),se=new RegExp(le(c)+le(o),"g"),D=g.indexOf(o,l);;)if(g[l]===o)for(D=l,l++;;){if((D=g.indexOf(o,D+1))===-1)return p||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:O.length,index:l}),ae();if(D===M-1)return ae(g.substring(l,D).replace(se,o));if(o===c&&g[D+1]===c)D++;else if(o===c||D===0||g[D-1]!==c){U!==-1&&U<D+1&&(U=g.indexOf(r,D+1));var W=we(($=$!==-1&&$<D+1?g.indexOf(i,D+1):$)===-1?U:Math.min(U,$));if(g.substr(D+1+W,C)===r){b.push(g.substring(l,D).replace(se,o)),g[l=D+1+W+C]!==o&&(D=g.indexOf(o,l)),U=g.indexOf(r,l),$=g.indexOf(i,l);break}if(W=we($),g.substring(D+1+W,D+1+W+Y)===i){if(b.push(g.substring(l,D).replace(se,o)),Se(D+1+W+Y),U=g.indexOf(r,l),D=g.indexOf(o,l),S&&(oe(),w))return X();if(E&&O.length>=E)return X(!0);break}x.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:O.length,index:l}),D++}}else if(u&&b.length===0&&g.substring(l,l+q)===u){if($===-1)return X();l=$+Y,$=g.indexOf(i,l),U=g.indexOf(r,l)}else if(U!==-1&&(U<$||$===-1))b.push(g.substring(l,U)),l=U+C,U=g.indexOf(r,l);else{if($===-1)break;if(b.push(g.substring(l,$)),Se($+Y),S&&(oe(),w))return X();if(E&&O.length>=E)return X(!0)}return ae();function me(Q){O.push(Q),T=l}function we(Q){var ne=0;return ne=Q!==-1&&(Q=g.substring(D+1,Q))&&Q.trim()===""?Q.length:ne}function ae(Q){return p||(Q===void 0&&(Q=g.substring(l)),b.push(Q),l=M,me(b),S&&oe()),X()}function Se(Q){l=Q,me(b),b=[],$=g.indexOf(i,l)}function X(Q){if(t.header&&!k&&O.length&&!d){var ne=O[0],fe=Object.create(null),Te=new Set(ne);let je=!1;for(let ke=0;ke<ne.length;ke++){let ue=ne[ke];if(fe[ue=R(t.transformHeader)?t.transformHeader(ue,ke):ue]){let Ee,Be=fe[ue];for(;Ee=ue+"_"+Be,Be++,Te.has(Ee););Te.add(Ee),ne[ke]=Ee,fe[ue]++,je=!0,(f=f===null?{}:f)[Ee]=ue}else fe[ue]=1,ne[ke]=ue;Te.add(ue)}je&&console.warn("Duplicate headers found and renamed."),d=!0}return{data:O,errors:x,meta:{delimiter:r,linebreak:i,aborted:w,truncated:!!Q,cursor:T+(k||0),renamedHeaders:f}}}function oe(){y(X()),O=[],x=[]}},this.abort=function(){w=!0},this.getCharIndex=function(){return l}}function be(t){var r=t.data,i=F[r.workerId],u=!1;if(r.error)i.userError(r.error,r.file);else if(r.results&&r.results.data){var y={abort:function(){u=!0,pe(r.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:Re,resume:Re};if(R(i.userStep)){for(var E=0;E<r.results.data.length&&(i.userStep({data:r.results.data[E],errors:r.results.errors,meta:r.results.meta},y),!u);E++);delete r.results}else R(i.userChunk)&&(i.userChunk(r.results,y,r.file),delete r.results)}r.finished&&!u&&pe(r.workerId,r.results)}function pe(t,r){var i=F[t];R(i.userComplete)&&i.userComplete(r),i.terminate(),delete F[t]}function Re(){throw new Error("Not implemented.")}function de(t){if(typeof t!="object"||t===null)return t;var r,i=Array.isArray(t)?[]:{};for(r in t)i[r]=de(t[r]);return i}function G(t,r){return function(){t.apply(r,arguments)}}function R(t){return typeof t=="function"}return h.parse=function(t,r){var i=(r=r||{}).dynamicTyping||!1;if(R(i)&&(r.dynamicTypingFunction=i,i={}),r.dynamicTyping=i,r.transform=!!R(r.transform)&&r.transform,!r.worker||!h.WORKERS_SUPPORTED)return i=null,h.NODE_STREAM_INPUT,typeof t=="string"?(t=(u=>u.charCodeAt(0)!==65279?u:u.slice(1))(t),i=new(r.download?B:K)(r)):t.readable===!0&&R(t.read)&&R(t.on)?i=new re(r):(s.File&&t instanceof File||t instanceof Object)&&(i=new V(r)),i.stream(t);(i=(()=>{var u;return!!h.WORKERS_SUPPORTED&&(u=(()=>{var y=s.URL||s.webkitURL||null,E=n.toString();return h.BLOB_URL||(h.BLOB_URL=y.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",E,")();"],{type:"text/javascript"})))})(),(u=new s.Worker(u)).onmessage=be,u.id=J++,F[u.id]=u)})()).userStep=r.step,i.userChunk=r.chunk,i.userComplete=r.complete,i.userError=r.error,r.step=R(r.step),r.chunk=R(r.chunk),r.complete=R(r.complete),r.error=R(r.error),delete r.worker,i.postMessage({input:t,config:r,workerId:i.id})},h.unparse=function(t,r){var i=!1,u=!0,y=",",E=`\r
|
|
9
|
+
`,v='"',f=v+v,d=!1,o=null,c=!1,l=((()=>{if(typeof r=="object"){if(typeof r.delimiter!="string"||h.BAD_DELIMITERS.filter(function(k){return r.delimiter.indexOf(k)!==-1}).length||(y=r.delimiter),typeof r.quotes!="boolean"&&typeof r.quotes!="function"&&!Array.isArray(r.quotes)||(i=r.quotes),typeof r.skipEmptyLines!="boolean"&&typeof r.skipEmptyLines!="string"||(d=r.skipEmptyLines),typeof r.newline=="string"&&(E=r.newline),typeof r.quoteChar=="string"&&(v=r.quoteChar),typeof r.header=="boolean"&&(u=r.header),Array.isArray(r.columns)){if(r.columns.length===0)throw new Error("Option columns is empty");o=r.columns}r.escapeChar!==void 0&&(f=r.escapeChar+v),r.escapeFormulae instanceof RegExp?c=r.escapeFormulae:typeof r.escapeFormulae=="boolean"&&r.escapeFormulae&&(c=/^[=+\-@\t\r].*$/)}})(),new RegExp(le(v),"g"));if(typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return w(null,t,d);if(typeof t[0]=="object")return w(o||Object.keys(t[0]),t,d)}else if(typeof t=="object")return typeof t.data=="string"&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||o),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:typeof t.data[0]=="object"?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||typeof t.data[0]=="object"||(t.data=[t.data])),w(t.fields||[],t.data||[],d);throw new Error("Unable to serialize unrecognized input");function w(k,p,M){var C="",Y=(typeof k=="string"&&(k=JSON.parse(k)),typeof p=="string"&&(p=JSON.parse(p)),Array.isArray(k)&&0<k.length),q=!Array.isArray(p[0]);if(Y&&u){for(var S=0;S<k.length;S++)0<S&&(C+=y),C+=g(k[S],S);0<p.length&&(C+=E)}for(var O=0;O<p.length;O++){var x=(Y?k:p[O]).length,b=!1,T=Y?Object.keys(p[O]).length===0:p[O].length===0;if(M&&!Y&&(b=M==="greedy"?p[O].join("").trim()==="":p[O].length===1&&p[O][0].length===0),M==="greedy"&&Y){for(var P=[],A=0;A<x;A++){var U=q?k[A]:A;P.push(p[O][U])}b=P.join("").trim()===""}if(!b){for(var $=0;$<x;$++){0<$&&!T&&(C+=y);var se=Y&&q?k[$]:$;C+=g(p[O][se],$)}O<p.length-1&&(!M||0<x&&!T)&&(C+=E)}}return C}function g(k,p){var M,C;return k==null?"":k.constructor===Date?JSON.stringify(k).slice(1,25):(C=!1,c&&typeof k=="string"&&c.test(k)&&(k="'"+k,C=!0),M=k.toString().replace(l,f),(C=C||i===!0||typeof i=="function"&&i(k,p)||Array.isArray(i)&&i[p]||((Y,q)=>{for(var S=0;S<q.length;S++)if(-1<Y.indexOf(q[S]))return!0;return!1})(M,h.BAD_DELIMITERS)||-1<M.indexOf(y)||M.charAt(0)===" "||M.charAt(M.length-1)===" ")?v+M+v:M)}},h.RECORD_SEP="",h.UNIT_SEP="",h.BYTE_ORDER_MARK="\uFEFF",h.BAD_DELIMITERS=["\r",`
|
|
10
|
+
`,'"',h.BYTE_ORDER_MARK],h.WORKERS_SUPPORTED=!_&&!!s.Worker,h.NODE_STREAM_INPUT=1,h.LocalChunkSize=10485760,h.RemoteChunkSize=5242880,h.DefaultDelimiter=",",h.Parser=ve,h.ParserHandle=ie,h.NetworkStreamer=B,h.FileStreamer=V,h.StringStreamer=K,h.ReadableStreamStreamer=re,s.jQuery&&((m=s.jQuery).fn.parse=function(t){var r=t.config||{},i=[];return this.each(function(E){if(!(m(this).prop("tagName").toUpperCase()==="INPUT"&&m(this).attr("type").toLowerCase()==="file"&&s.FileReader)||!this.files||this.files.length===0)return!0;for(var v=0;v<this.files.length;v++)i.push({file:this.files[v],inputElem:this,instanceConfig:m.extend({},r)})}),u(),this;function u(){if(i.length===0)R(t.complete)&&t.complete();else{var E,v,f,d,o=i[0];if(R(t.before)){var c=t.before(o.file,o.inputElem);if(typeof c=="object"){if(c.action==="abort")return E="AbortError",v=o.file,f=o.inputElem,d=c.reason,void(R(t.error)&&t.error({name:E},v,f,d));if(c.action==="skip")return void y();typeof c.config=="object"&&(o.instanceConfig=m.extend(o.instanceConfig,c.config))}else if(c==="skip")return void y()}var l=o.instanceConfig.complete;o.instanceConfig.complete=function(w){R(l)&&l(w,o.file,o.inputElem),y()},h.parse(o.file,o.instanceConfig)}}function y(){i.splice(0,1),u()}}),j&&(s.onmessage=function(t){t=t.data,h.WORKER_ID===void 0&&t&&(h.WORKER_ID=t.workerId),typeof t.input=="string"?s.postMessage({workerId:h.WORKER_ID,results:h.parse(t.input,t.config),finished:!0}):(s.File&&t.input instanceof File||t.input instanceof Object)&&(t=h.parse(t.input,t.config))&&s.postMessage({workerId:h.WORKER_ID,results:t,finished:!0})}),(B.prototype=Object.create(z.prototype)).constructor=B,(V.prototype=Object.create(z.prototype)).constructor=V,(K.prototype=Object.create(K.prototype)).constructor=K,(re.prototype=Object.create(z.prototype)).constructor=re,h})})(Oe)),Oe.exports}var qe=We();const Ke=De(qe),{parse:Je,unparse:Qe}=Ke;class Ve{static unparse(e,n){return Qe(e,n)}static parse(e){return new Promise((n,s)=>{Je(e,{header:!0,complete:m=>n(m),error:m=>s(m)})})}}class Ie{static revokeObjectUrlDelay=4e4;static utf8BomMimeType=/^\s*(?:text\/\S*|application\/xml|\S+\/\S+\+xml)\s*;\s*charset\s*=\s*utf-8/i;static saveAs(e,n,s={}){this.assertBrowserEnvironment();const m=s.autoBom?this.addUtf8Bom(e):e;this.downloadBlob(m,n)}static addUtf8Bom(e){return this.utf8BomMimeType.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}static assertBrowserEnvironment(){if(typeof window>"u"||typeof document>"u"||typeof URL>"u"||typeof URL.createObjectURL!="function"||typeof URL.revokeObjectURL!="function")throw new Error("DownloadHelper is only available in a browser environment with object URL support.")}static downloadBlob(e,n){const s=URL.createObjectURL(e);try{Z.isIOS()?this.openBlobInNewTab(s)||this.clickDownloadLink(s,n,!1):this.clickDownloadLink(s,n)}finally{window.setTimeout(()=>URL.revokeObjectURL(s),this.revokeObjectUrlDelay)}}static openBlobInNewTab(e){const n=window.open("about:blank","_blank");if(!n)return!1;try{return n.opener=null,n.location.replace(e),!0}catch{return n.close(),!1}}static clickDownloadLink(e,n,s=!0){const m=document.body??document.documentElement;if(!m)throw new Error("DownloadHelper.saveAs requires an initialized document.");const _=document.createElement("a");try{_.download=n,_.href=e,s&&(_.target="_blank",_.rel="noopener noreferrer"),_.style.display="none",m.appendChild(_),_.click()}finally{_.remove()}}}class Ze{static getEnumValue(e,n){if(n in e)return e[n];throw Error(`${n} not found in ${e}`)}static getKeyValues(e){return Object.keys(e).filter(n=>!isNaN(Number(n))).map(n=>({key:Number(n),value:e[n]}))}}class He{static getFileExtension(e){let n="";const s=e.lastIndexOf(".");return s>0&&s<e.length-1&&(n=`.${e.substring(s+1).toLowerCase()}`),n}static readAsText(e){const n=new FileReader;return new Promise((s,m)=>{n.onload=()=>{n.onload=null,n.onerror=null,typeof n.result=="string"?s(n.result):m(new Error("Unexpected result type"))},n.onerror=()=>{const _=n.error??new Error("FileReader error");n.onload=null,n.onerror=null,m(_)},n.readAsText(e)})}static readAsArrayBuffer(e){const n=new FileReader;return new Promise((s,m)=>{n.onload=()=>{n.onload=null,n.onerror=null,n.result instanceof ArrayBuffer?s(n.result):m(new Error("Unexpected result type"))},n.onerror=()=>{const _=n.error??new Error("FileReader error");n.onload=null,n.onerror=null,m(_)},n.readAsArrayBuffer(e)})}static readAsDataUrl(e){const n=new FileReader;return new Promise((s,m)=>{n.onload=_=>{s(_)},n.onerror=_=>m(_),n.readAsDataURL(e)})}static formatFileSize(e,n=2,s){if(e===0)return"0 Bytes";const m=1024,_=["Bytes","KB","MB","GB","TB"];let j=Math.floor(Math.log(e)/Math.log(m));s&&_.includes(s)&&(j=_.indexOf(s));const F=e/Math.pow(m,j);return`${parseFloat(F.toFixed(n))} ${_[j]}`}static save(e,n,s){const m=new Blob([e],{type:s});Ie.saveAs(m,n)}}class Ge{static load(e){const n=URL.createObjectURL(e);return this.loadSource(n).finally(()=>URL.revokeObjectURL(n))}static async compress(e,n=.8,s="image/jpeg"){const m=await this.loadSource(e),{canvas:_}=this.resize(m,m.width,m.height);return _.toDataURL(s,n)}static resize(e,n,s){let{width:m,height:_}=e;const j=n/m,F=s/_,J=Math.min(j,F,1);m=Math.floor(m*J),_=Math.floor(_*J);const h=document.createElement("canvas");h.width=m,h.height=_;const z=h.getContext("2d");return z.clearRect(0,0,m,_),z.drawImage(e,0,0,m,_),{canvas:h,width:m,height:_}}static loadSource(e){return new Promise((n,s)=>{const m=new Image;m.onload=()=>n(m),m.onerror=s,m.src=e})}}class xe{static set(e,n){localStorage.setItem(e,JSON.stringify(n))}static get(e){let n=null;const s=localStorage.getItem(e);return s&&(n=JSON.parse(s)),n}static remove(e){const n=localStorage.getItem(e)!==null;return n&&localStorage.removeItem(e),n}static removeAll(){localStorage.clear()}static getKeysBy(e){return Object.keys(localStorage).filter(n=>n.startsWith(e))}}var ge=(a=>(a.log="log",a.info="info",a.warn="warn",a.debug="debug",a.error="error",a))(ge||{});class H{static listeners=new Set;static enabled=!0;static log(...e){H.doLog(ge.log,e)}static info(...e){H.doLog(ge.info,e)}static warn(...e){H.doLog(ge.warn,e)}static debug(...e){H.doLog(ge.debug,e)}static error(...e){H.doLog(ge.error,e)}static clearListeners(){H.listeners.clear()}static setEnabled(e){H.enabled=e}static doLog(e,n){if(!H.enabled)return;const s={type:e,args:n,timestamp:new Date().toISOString()};for(const m of H.listeners)try{if(m(s)===!1)return}catch{}console[e].apply(console,n)}static onLog(e,n=!1){if(n){const s=m=>{try{return e(m)}finally{H.listeners.delete(s)}};return H.listeners.add(s),()=>H.listeners.delete(s)}return H.listeners.add(e),()=>H.listeners.delete(e)}}const Xe=(a,e,n)=>a.localeCompare(e)*(n?1:-1),et=(a,e)=>a<e?-1:a===e?0:1,tt=(a,e,n)=>et(a,e)*(n?1:-1),rt=(a,e,n)=>typeof a=="string"&&typeof e=="string"?Xe(a,e,n):tt(a,e,n),Ae=(a,e,n,s)=>{const m=n(a),_=n(e);return rt(m,_,s)};class nt{static get(e){return xe.get(e)}static set(e,n){xe.set(e,n)}static remove(e){xe.remove(e)}}class I{static listeners=new Set;static initialized=!1;static resizeTimeout=null;static lastWidth=null;static onResize(e){return I.initialized||I.init(),I.listeners.add(e),()=>I.off(e)}static handleResize=()=>{I.resizeTimeout!==null&&(window.clearTimeout(I.resizeTimeout),I.resizeTimeout=null),I.resizeTimeout=window.setTimeout(()=>{const e=window.innerWidth;if(I.resizeTimeout=null,e!==I.lastWidth){I.lastWidth=e;for(const n of I.listeners)n(e)}},150)};static init(){if(!I.initialized){if(typeof window>"u")throw new Error("WindowResizeHelper is only available in browser environments");I.lastWidth=window.innerWidth,window.addEventListener("resize",I.handleResize,{passive:!0}),I.initialized=!0}}static off(e){I.initialized&&(I.listeners.delete(e),I.listeners.size===0&&(I.resizeTimeout!==null&&(window.clearTimeout(I.resizeTimeout),I.resizeTimeout=null),window.removeEventListener("resize",I.handleResize),I.initialized=!1,I.lastWidth=null))}}function N(a,e,n){Object.defineProperty(a,e,{configurable:!0,enumerable:!1,value:n,writable:!0})}function it(){N(Array.prototype,"distinct",function(a){return a?this.filter((n,s,m)=>m.findIndex(_=>a(_,n))===s):this.filter((n,s,m)=>m.indexOf(n)===s)}),N(Array.prototype,"filterBy",function(a){return this.filter(e=>a(e))}),N(Array.prototype,"first",function(){return this.length>0?this[0]:null}),N(Array.prototype,"groupBy",function(a){return this.reduce((e,n)=>{const s=a(n);return e[s]||(e[s]=[]),e[s].push(n),e},{})}),N(Array.prototype,"orderBy",function(a,e=!0){return this?.sort((n,s)=>Ae(n,s,a,e)),this}),N(Array.prototype,"removeBy",function(a,e){return this.filter(n=>a(n)!==e)})}var Me={exports:{}},st=Me.exports,Fe;function at(){return Fe||(Fe=1,(function(a,e){(function(n,s){a.exports=s()})(st,(function(){var n=1e3,s=6e4,m=36e5,_="millisecond",j="second",F="minute",J="hour",h="day",z="week",B="month",V="quarter",K="year",re="date",ie="Invalid Date",le=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ve=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,be={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(v){var f=["th","st","nd","rd"],d=v%100;return"["+v+(f[(d-20)%10]||f[d]||f[0])+"]"}},pe=function(v,f,d){var o=String(v);return!o||o.length>=f?v:""+Array(f+1-o.length).join(d)+v},Re={s:pe,z:function(v){var f=-v.utcOffset(),d=Math.abs(f),o=Math.floor(d/60),c=d%60;return(f<=0?"+":"-")+pe(o,2,"0")+":"+pe(c,2,"0")},m:function v(f,d){if(f.date()<d.date())return-v(d,f);var o=12*(d.year()-f.year())+(d.month()-f.month()),c=f.clone().add(o,B),l=d-c<0,w=f.clone().add(o+(l?-1:1),B);return+(-(o+(d-c)/(l?c-w:w-c))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:B,y:K,w:z,d:h,D:re,h:J,m:F,s:j,ms:_,Q:V}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},de="en",G={};G[de]=be;var R="$isDayjsObject",t=function(v){return v instanceof y||!(!v||!v[R])},r=function v(f,d,o){var c;if(!f)return de;if(typeof f=="string"){var l=f.toLowerCase();G[l]&&(c=l),d&&(G[l]=d,c=l);var w=f.split("-");if(!c&&w.length>1)return v(w[0])}else{var g=f.name;G[g]=f,c=g}return!o&&c&&(de=c),c||!o&&de},i=function(v,f){if(t(v))return v.clone();var d=typeof f=="object"?f:{};return d.date=v,d.args=arguments,new y(d)},u=Re;u.l=r,u.i=t,u.w=function(v,f){return i(v,{locale:f.$L,utc:f.$u,x:f.$x,$offset:f.$offset})};var y=(function(){function v(d){this.$L=r(d.locale,null,!0),this.parse(d),this.$x=this.$x||d.x||{},this[R]=!0}var f=v.prototype;return f.parse=function(d){this.$d=(function(o){var c=o.date,l=o.utc;if(c===null)return new Date(NaN);if(u.u(c))return new Date;if(c instanceof Date)return new Date(c);if(typeof c=="string"&&!/Z$/i.test(c)){var w=c.match(le);if(w){var g=w[2]-1||0,k=(w[7]||"0").substring(0,3);return l?new Date(Date.UTC(w[1],g,w[3]||1,w[4]||0,w[5]||0,w[6]||0,k)):new Date(w[1],g,w[3]||1,w[4]||0,w[5]||0,w[6]||0,k)}}return new Date(c)})(d),this.init()},f.init=function(){var d=this.$d;this.$y=d.getFullYear(),this.$M=d.getMonth(),this.$D=d.getDate(),this.$W=d.getDay(),this.$H=d.getHours(),this.$m=d.getMinutes(),this.$s=d.getSeconds(),this.$ms=d.getMilliseconds()},f.$utils=function(){return u},f.isValid=function(){return this.$d.toString()!==ie},f.isSame=function(d,o){var c=i(d);return this.startOf(o)<=c&&c<=this.endOf(o)},f.isAfter=function(d,o){return i(d)<this.startOf(o)},f.isBefore=function(d,o){return this.endOf(o)<i(d)},f.$g=function(d,o,c){return u.u(d)?this[o]:this.set(c,d)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(d,o){var c=this,l=!!u.u(o)||o,w=u.p(d),g=function(O,x){var b=u.w(c.$u?Date.UTC(c.$y,x,O):new Date(c.$y,x,O),c);return l?b:b.endOf(h)},k=function(O,x){return u.w(c.toDate()[O].apply(c.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(x)),c)},p=this.$W,M=this.$M,C=this.$D,Y="set"+(this.$u?"UTC":"");switch(w){case K:return l?g(1,0):g(31,11);case B:return l?g(1,M):g(0,M+1);case z:var q=this.$locale().weekStart||0,S=(p<q?p+7:p)-q;return g(l?C-S:C+(6-S),M);case h:case re:return k(Y+"Hours",0);case J:return k(Y+"Minutes",1);case F:return k(Y+"Seconds",2);case j:return k(Y+"Milliseconds",3);default:return this.clone()}},f.endOf=function(d){return this.startOf(d,!1)},f.$set=function(d,o){var c,l=u.p(d),w="set"+(this.$u?"UTC":""),g=(c={},c[h]=w+"Date",c[re]=w+"Date",c[B]=w+"Month",c[K]=w+"FullYear",c[J]=w+"Hours",c[F]=w+"Minutes",c[j]=w+"Seconds",c[_]=w+"Milliseconds",c)[l],k=l===h?this.$D+(o-this.$W):o;if(l===B||l===K){var p=this.clone().set(re,1);p.$d[g](k),p.init(),this.$d=p.set(re,Math.min(this.$D,p.daysInMonth())).$d}else g&&this.$d[g](k);return this.init(),this},f.set=function(d,o){return this.clone().$set(d,o)},f.get=function(d){return this[u.p(d)]()},f.add=function(d,o){var c,l=this;d=Number(d);var w=u.p(o),g=function(M){var C=i(l);return u.w(C.date(C.date()+Math.round(M*d)),l)};if(w===B)return this.set(B,this.$M+d);if(w===K)return this.set(K,this.$y+d);if(w===h)return g(1);if(w===z)return g(7);var k=(c={},c[F]=s,c[J]=m,c[j]=n,c)[w]||1,p=this.$d.getTime()+d*k;return u.w(p,this)},f.subtract=function(d,o){return this.add(-1*d,o)},f.format=function(d){var o=this,c=this.$locale();if(!this.isValid())return c.invalidDate||ie;var l=d||"YYYY-MM-DDTHH:mm:ssZ",w=u.z(this),g=this.$H,k=this.$m,p=this.$M,M=c.weekdays,C=c.months,Y=c.meridiem,q=function(x,b,T,P){return x&&(x[b]||x(o,l))||T[b].slice(0,P)},S=function(x){return u.s(g%12||12,x,"0")},O=Y||function(x,b,T){var P=x<12?"AM":"PM";return T?P.toLowerCase():P};return l.replace(ve,(function(x,b){return b||(function(T){switch(T){case"YY":return String(o.$y).slice(-2);case"YYYY":return u.s(o.$y,4,"0");case"M":return p+1;case"MM":return u.s(p+1,2,"0");case"MMM":return q(c.monthsShort,p,C,3);case"MMMM":return q(C,p);case"D":return o.$D;case"DD":return u.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return q(c.weekdaysMin,o.$W,M,2);case"ddd":return q(c.weekdaysShort,o.$W,M,3);case"dddd":return M[o.$W];case"H":return String(g);case"HH":return u.s(g,2,"0");case"h":return S(1);case"hh":return S(2);case"a":return O(g,k,!0);case"A":return O(g,k,!1);case"m":return String(k);case"mm":return u.s(k,2,"0");case"s":return String(o.$s);case"ss":return u.s(o.$s,2,"0");case"SSS":return u.s(o.$ms,3,"0");case"Z":return w}return null})(x)||w.replace(":","")}))},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(d,o,c){var l,w=this,g=u.p(o),k=i(d),p=(k.utcOffset()-this.utcOffset())*s,M=this-k,C=function(){return u.m(w,k)};switch(g){case K:l=C()/12;break;case B:l=C();break;case V:l=C()/3;break;case z:l=(M-p)/6048e5;break;case h:l=(M-p)/864e5;break;case J:l=M/m;break;case F:l=M/s;break;case j:l=M/n;break;default:l=M}return c?l:u.a(l)},f.daysInMonth=function(){return this.endOf(B).$D},f.$locale=function(){return G[this.$L]},f.locale=function(d,o){if(!d)return this.$L;var c=this.clone(),l=r(d,o,!0);return l&&(c.$L=l),c},f.clone=function(){return u.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},v})(),E=y.prototype;return i.prototype=E,[["$ms",_],["$s",j],["$m",F],["$H",J],["$W",h],["$M",B],["$y",K],["$D",re]].forEach((function(v){E[v[1]]=function(f){return this.$g(f,v[0],v[1])}})),i.extend=function(v,f){return v.$i||(v(f,y,i),v.$i=!0),i},i.locale=r,i.isDayjs=t,i.unix=function(v){return i(1e3*v)},i.en=G[de],i.Ls=G,i.p={},i}))})(Me)),Me.exports}var ot=at();const te=De(ot);var $e={exports:{}},ut=$e.exports,ze;function ct(){return ze||(ze=1,(function(a,e){(function(n,s){a.exports=s()})(ut,(function(){var n="day";return function(s,m,_){var j=function(h){return h.add(4-h.isoWeekday(),n)},F=m.prototype;F.isoWeekYear=function(){return j(this).year()},F.isoWeek=function(h){if(!this.$utils().u(h))return this.add(7*(h-this.isoWeek()),n);var z,B,V,K,re=j(this),ie=(z=this.isoWeekYear(),B=this.$u,V=(B?_.utc:_)().year(z).startOf("year"),K=4-V.isoWeekday(),V.isoWeekday()>4&&(K+=7),V.add(K,n));return re.diff(ie,"week")+1},F.isoWeekday=function(h){return this.$utils().u(h)?this.day()||7:this.day(this.day()%7?h:h-7)};var J=F.startOf;F.startOf=function(h,z){var B=this.$utils(),V=!!B.u(z)||z;return B.p(h)==="isoweek"?V?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):J.bind(this)(h,z)}}}))})($e)),$e.exports}var lt=ct();const dt=De(lt);var Ce={exports:{}},ft=Ce.exports,Ue;function ht(){return Ue||(Ue=1,(function(a,e){(function(n,s){a.exports=s()})(ft,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(s,m,_){var j=m.prototype,F=j.format;_.en.formats=n,j.format=function(J){J===void 0&&(J="YYYY-MM-DDTHH:mm:ssZ");var h=this.$locale().formats,z=(function(B,V){return B.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(K,re,ie){var le=ie&&ie.toUpperCase();return re||V[ie]||n[ie]||V[le].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(ve,be,pe){return be||pe.slice(1)}))}))})(J,h===void 0?{}:h);return F.call(this,z)}}}))})(Ce)),Ce.exports}var pt=ht();const mt=De(pt);te.extend(mt),te.extend(dt);function gt(){N(Date.prototype,"add",function(a,e){return te(this).add(a,e).toDate()}),N(Date.prototype,"diff",function(a,e){return te(this).diff(a,e)}),N(Date.prototype,"endOf",function(a){return te(this).endOf(a).toDate()}),N(Date.prototype,"firstDayOfMonth",function(){return te(this).startOf("month").toDate()}),N(Date.prototype,"format",function(a){return te(this).format(a)}),N(Date.prototype,"isAfter",function(a,e){return te(this).isAfter(a,e)}),N(Date.prototype,"isBefore",function(a,e){return te(this).isBefore(a,e)}),N(Date.prototype,"isValid",function(){return te(this).isValid()}),N(Date.prototype,"isoWeek",function(){return te(this).isoWeek()}),N(Date.prototype,"subtract",function(a,e){return te(this).subtract(a,e).toDate()}),N(Date.prototype,"lastDayOfMonth",function(){return te(this).endOf("month").toDate()}),N(Date.prototype,"set",function(a,e){return te(this).set(a,e).toDate()}),N(Date.prototype,"startOf",function(a){return te(this).startOf(a).toDate()})}function yt(){N(String.prototype,"capitalize",function(){return this.charAt(0).toUpperCase()+this.slice(1)}),N(String.prototype,"isNumber",function(){return!isNaN(Number(this))&&this.trim()!==""}),N(String.prototype,"isEmpty",function(){return this===void 0||!this||this.length===0}),N(String.prototype,"stripTags",function(){return new DOMParser().parseFromString(this.toString(),"text/html").body.textContent||""})}class vt{resizeListener=null;onResizeCallbacks=new Set;emitTimeoutId=null;duplicateThresholdMs=60;constructor(){typeof window<"u"&&(this.resizeListener=this.onResize,window.addEventListener("resize",this.resizeListener,{passive:!0}))}destroy(){typeof window<"u"&&this.resizeListener!==null&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null),this.emitTimeoutId!==null&&(clearTimeout(this.emitTimeoutId),this.emitTimeoutId=null),this.onResizeCallbacks.clear()}onResizeChange(e){this.onResizeCallbacks.add(e)}offResizeChange(e){this.onResizeCallbacks.delete(e)}onResize=()=>{if(typeof window>"u")return;const e=window.innerWidth;this.emitTimeoutId!==null&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.emitTimeoutId=null;const n=he.getBreakpointByScreenWidth(e);for(const s of this.onResizeCallbacks)s(e,n)},this.duplicateThresholdMs)}}L.BreakPointHelper=he,L.BreakPoints=ye,L.BrowserHelper=Z,L.BrowserService=vt,L.BrowserType=ee,L.CanvasHelper=Ye,L.CsvHelper=Ve,L.DownloadHelper=Ie,L.EnumHelper=Ze,L.FileHelper=He,L.ImageHelper=Ge,L.LocalStorageHelper=xe,L.LoggerHelper=H,L.LoggerType=ge,L.ScreenHelper=_e,L.TokenHelper=nt,L.WindowResizeHelper=I,L.copyToClipboard=Pe,L.initArrayExtensions=it,L.initDateExtensions=gt,L.initStringExtensions=yt,L.sortHelper=Ae,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
|