@oardi/ts-utils 0.0.11 → 0.0.13
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/enums/browsertype.enum.d.ts +14 -0
- package/enums/browsertype.enum.d.ts.map +1 -0
- package/extensions/date-extension.d.ts.map +1 -1
- package/extensions/string-extensions.d.ts +1 -0
- package/extensions/string-extensions.d.ts.map +1 -1
- package/helpers/sort.helper.d.ts.map +1 -1
- package/index.cjs.js +6 -6
- package/index.es.js +306 -304
- package/index.umd.js +6 -6
- package/interfaces/browser.interface.d.ts +6 -0
- package/interfaces/browser.interface.d.ts.map +1 -0
- package/interfaces/index.d.ts +1 -0
- package/interfaces/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/services/browser.service.d.ts +5 -21
- package/services/browser.service.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/size.type.d.ts +2 -0
- package/types/size.type.d.ts.map +1 -0
package/index.umd.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
(function(U,he){typeof exports=="object"&&typeof module<"u"?he(exports):typeof define=="function"&&define.amd?define(["exports"],he):(U=typeof globalThis<"u"?globalThis:U||self,he(U["ts-utils"]={}))})(this,function(U){"use strict";async function he(i,r,s){const l=s?.mimeType??Te(r),$=Ae(i,l);if("showSaveFilePicker"in window&&s?.showSaveFilePicker)try{const K=await(await window.showSaveFilePicker({suggestedName:r,types:[{description:"Datei",accept:{[l]:[`.${Se(r)}`]}}]})).createWritable();await K.write($),await K.close();return}catch{}const M=URL.createObjectURL($),z=document.createElement("a");z.href=M,z.download=r,z.rel="noopener",z.style.display="none",document.body.appendChild(z),Ie(z),window.setTimeout(()=>{document.body.removeChild(z),URL.revokeObjectURL(M)},0),Fe()&&window.open(M,"_blank","noopener,noreferrer")}function Ae(i,r){if(i instanceof Blob)return i.type?i:new Blob([i],{type:r});if(i instanceof ArrayBuffer||i instanceof Uint8Array){const s=i instanceof Uint8Array?i:new Uint8Array(i);return new Blob([s],{type:r})}return new Blob([i],{type:r||"text/plain;charset=utf-8"})}function Te(i){switch(Se(i).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 Se(i){const r=i.lastIndexOf(".");return r>=0&&r<i.length-1?i.slice(r+1):""}function Ie(i){const r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),i.dispatchEvent(r)}function Fe(){const i=navigator.userAgent,r=/iPad|iPhone|iPod/.test(i),s=/^((?!chrome|android).)*safari/i.test(i);return r||s}class ze{static getEnumValue(r,s){if(s in r)return r[s];throw Error(`${s} not found in ${r}`)}static getKeyValues(r){return Object.keys(r).filter(s=>!isNaN(Number(s))).map(s=>({key:Number(s),value:r[s]}))}}const je=(i,r,s)=>i.localeCompare(r)*(s?1:-1),Be=(i,r)=>i<r?-1:i===r?0:1,We=(i,r,s)=>Be(i,r)*(s?1:-1),Pe=(i,r,s)=>{let l=0;return typeof i=="string"&&typeof r=="string"?l=je(i,r,s):l=We(i,r,s),l},Ee=(i,r,s,l)=>{const $=s(i),M=s(r);return Pe($,M,l)};Array.prototype.distinct=function(i){const r=this;return i?r.filter((l,$,M)=>M.findIndex(z=>i(z,l))===$):r.filter((l,$,M)=>M.indexOf(l)===$)},Array.prototype.filterBy=function(i){return this.filter(r=>{let s=!1;return i&&r[i]?s=r[i]===i:s=r===i,s})},Array.prototype.first=function(){return this?.length>0?this[0]:null},Array.prototype.groupBy=function(i){return this.reduce((r,s)=>{const l=i(s);return(r[l]=r[l]||[]).push(s),r},{})},Array.prototype.orderBy=function(i,r=!0){return this?.sort((s,l)=>Ee(s,l,i,r)),this},Array.prototype.removeBy=function(i,r){return this.filter(s=>i(s)!==r)};function Oe(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var me={exports:{}},Ue=me.exports,De;function Ye(){return De||(De=1,function(i,r){(function(s,l){i.exports=l()})(Ue,function(){var s=1e3,l=6e4,$=36e5,M="millisecond",z="second",q="minute",K="hour",v="day",Y="week",W="month",X="quarter",J="year",V="date",ee="Invalid Date",ie=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ce=/\[([^\]]+)]|Y{1,4}|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,le={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(m){var d=["th","st","nd","rd"],c=m%100;return"["+m+(d[(c-20)%10]||d[c]||d[0])+"]"}},oe=function(m,d,c){var a=String(m);return!a||a.length>=d?m:""+Array(d+1-a.length).join(c)+m},we={s:oe,z:function(m){var d=-m.utcOffset(),c=Math.abs(d),a=Math.floor(c/60),u=c%60;return(d<=0?"+":"-")+oe(a,2,"0")+":"+oe(u,2,"0")},m:function m(d,c){if(d.date()<c.date())return-m(c,d);var a=12*(c.year()-d.year())+(c.month()-d.month()),u=d.clone().add(a,W),h=c-u<0,y=d.clone().add(a+(h?-1:1),W);return+(-(a+(c-u)/(h?u-y:y-u))||0)},a:function(m){return m<0?Math.ceil(m)||0:Math.floor(m)},p:function(m){return{M:W,y:J,w:Y,d:v,D:V,h:K,m:q,s:z,ms:M,Q:X}[m]||String(m||"").toLowerCase().replace(/s$/,"")},u:function(m){return m===void 0}},se="en",H={};H[se]=le;var R="$isDayjsObject",e=function(m){return m instanceof g||!(!m||!m[R])},t=function m(d,c,a){var u;if(!d)return se;if(typeof d=="string"){var h=d.toLowerCase();H[h]&&(u=h),c&&(H[h]=c,u=h);var y=d.split("-");if(!u&&y.length>1)return m(y[0])}else{var p=d.name;H[p]=d,u=p}return!a&&u&&(se=u),u||!a&&se},n=function(m,d){if(e(m))return m.clone();var c=typeof d=="object"?d:{};return c.date=m,c.args=arguments,new g(c)},o=we;o.l=t,o.i=e,o.w=function(m,d){return n(m,{locale:d.$L,utc:d.$u,x:d.$x,$offset:d.$offset})};var g=function(){function m(c){this.$L=t(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[R]=!0}var d=m.prototype;return d.parse=function(c){this.$d=function(a){var u=a.date,h=a.utc;if(u===null)return new Date(NaN);if(o.u(u))return new Date;if(u instanceof Date)return new Date(u);if(typeof u=="string"&&!/Z$/i.test(u)){var y=u.match(ie);if(y){var p=y[2]-1||0,_=(y[7]||"0").substring(0,3);return h?new Date(Date.UTC(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)):new Date(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)}}return new Date(u)}(c),this.init()},d.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},d.$utils=function(){return o},d.isValid=function(){return this.$d.toString()!==ee},d.isSame=function(c,a){var u=n(c);return this.startOf(a)<=u&&u<=this.endOf(a)},d.isAfter=function(c,a){return n(c)<this.startOf(a)},d.isBefore=function(c,a){return this.endOf(a)<n(c)},d.$g=function(c,a,u){return o.u(c)?this[a]:this.set(u,c)},d.unix=function(){return Math.floor(this.valueOf()/1e3)},d.valueOf=function(){return this.$d.getTime()},d.startOf=function(c,a){var u=this,h=!!o.u(a)||a,y=o.p(c),p=function(E,O){var w=o.w(u.$u?Date.UTC(u.$y,O,E):new Date(u.$y,O,E),u);return h?w:w.endOf(v)},_=function(E,O){return o.w(u.toDate()[E].apply(u.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(O)),u)},f=this.$W,D=this.$M,x=this.$D,I="set"+(this.$u?"UTC":"");switch(y){case J:return h?p(1,0):p(31,11);case W:return h?p(1,D):p(0,D+1);case Y:var B=this.$locale().weekStart||0,k=(f<B?f+7:f)-B;return p(h?x-k:x+(6-k),D);case v:case V:return _(I+"Hours",0);case K:return _(I+"Minutes",1);case q:return _(I+"Seconds",2);case z:return _(I+"Milliseconds",3);default:return this.clone()}},d.endOf=function(c){return this.startOf(c,!1)},d.$set=function(c,a){var u,h=o.p(c),y="set"+(this.$u?"UTC":""),p=(u={},u[v]=y+"Date",u[V]=y+"Date",u[W]=y+"Month",u[J]=y+"FullYear",u[K]=y+"Hours",u[q]=y+"Minutes",u[z]=y+"Seconds",u[M]=y+"Milliseconds",u)[h],_=h===v?this.$D+(a-this.$W):a;if(h===W||h===J){var f=this.clone().set(V,1);f.$d[p](_),f.init(),this.$d=f.set(V,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](_);return this.init(),this},d.set=function(c,a){return this.clone().$set(c,a)},d.get=function(c){return this[o.p(c)]()},d.add=function(c,a){var u,h=this;c=Number(c);var y=o.p(a),p=function(D){var x=n(h);return o.w(x.date(x.date()+Math.round(D*c)),h)};if(y===W)return this.set(W,this.$M+c);if(y===J)return this.set(J,this.$y+c);if(y===v)return p(1);if(y===Y)return p(7);var _=(u={},u[q]=l,u[K]=$,u[z]=s,u)[y]||1,f=this.$d.getTime()+c*_;return o.w(f,this)},d.subtract=function(c,a){return this.add(-1*c,a)},d.format=function(c){var a=this,u=this.$locale();if(!this.isValid())return u.invalidDate||ee;var h=c||"YYYY-MM-DDTHH:mm:ssZ",y=o.z(this),p=this.$H,_=this.$m,f=this.$M,D=u.weekdays,x=u.months,I=u.meridiem,B=function(O,w,L,F){return O&&(O[w]||O(a,h))||L[w].slice(0,F)},k=function(O){return o.s(p%12||12,O,"0")},E=I||function(O,w,L){var F=O<12?"AM":"PM";return L?F.toLowerCase():F};return h.replace(ce,function(O,w){return w||function(L){switch(L){case"YY":return String(a.$y).slice(-2);case"YYYY":return o.s(a.$y,4,"0");case"M":return f+1;case"MM":return o.s(f+1,2,"0");case"MMM":return B(u.monthsShort,f,x,3);case"MMMM":return B(x,f);case"D":return a.$D;case"DD":return o.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return B(u.weekdaysMin,a.$W,D,2);case"ddd":return B(u.weekdaysShort,a.$W,D,3);case"dddd":return D[a.$W];case"H":return String(p);case"HH":return o.s(p,2,"0");case"h":return k(1);case"hh":return k(2);case"a":return E(p,_,!0);case"A":return E(p,_,!1);case"m":return String(_);case"mm":return o.s(_,2,"0");case"s":return String(a.$s);case"ss":return o.s(a.$s,2,"0");case"SSS":return o.s(a.$ms,3,"0");case"Z":return y}return null}(O)||y.replace(":","")})},d.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},d.diff=function(c,a,u){var h,y=this,p=o.p(a),_=n(c),f=(_.utcOffset()-this.utcOffset())*l,D=this-_,x=function(){return o.m(y,_)};switch(p){case J:h=x()/12;break;case W:h=x();break;case X:h=x()/3;break;case Y:h=(D-f)/6048e5;break;case v:h=(D-f)/864e5;break;case K:h=D/$;break;case q:h=D/l;break;case z:h=D/s;break;default:h=D}return u?h:o.a(h)},d.daysInMonth=function(){return this.endOf(W).$D},d.$locale=function(){return H[this.$L]},d.locale=function(c,a){if(!c)return this.$L;var u=this.clone(),h=t(c,a,!0);return h&&(u.$L=h),u},d.clone=function(){return o.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()},m}(),b=g.prototype;return n.prototype=b,[["$ms",M],["$s",z],["$m",q],["$H",K],["$W",v],["$M",W],["$y",J],["$D",V]].forEach(function(m){b[m[1]]=function(d){return this.$g(d,m[0],m[1])}}),n.extend=function(m,d){return m.$i||(m(d,g,n),m.$i=!0),n},n.locale=t,n.isDayjs=e,n.unix=function(m){return n(1e3*m)},n.en=H[se],n.Ls=H,n.p={},n})}(me)),me.exports}var He=Ye();const Z=Oe(He);var ye={exports:{}},Ne=ye.exports,Ce;function qe(){return Ce||(Ce=1,function(i,r){(function(s,l){i.exports=l()})(Ne,function(){var s={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(l,$,M){var z=$.prototype,q=z.format;M.en.formats=s,z.format=function(K){K===void 0&&(K="YYYY-MM-DDTHH:mm:ssZ");var v=this.$locale().formats,Y=function(W,X){return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(J,V,ee){var ie=ee&&ee.toUpperCase();return V||X[ee]||s[ee]||X[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(ce,le,oe){return le||oe.slice(1)})})}(K,v===void 0?{}:v);return q.call(this,Y)}}})}(ye)),ye.exports}var Ke=qe();const Je=Oe(Ke);Z.extend(Je),Date.prototype.isAfter=function(i,r){return Z(this).isAfter(i,r)},Date.prototype.isBefore=function(i,r){return Z(this).isBefore(i,r)},Date.prototype.format=function(i){return Z(this).format(i)},Date.prototype.isValid=function(){return Z(this).isValid()},Date.prototype.add=function(i,r){return Z(this).add(i,r).toDate()},Date.prototype.subtract=function(i,r){return Z(this).subtract(i,r).toDate()},Date.prototype.firstDayOfMonth=function(){return Z(this).startOf("month").toDate()},Date.prototype.lastDayOfMonth=function(){return Z(this).endOf("month").toDate()},Date.prototype.set=function(i,r){return Z(this).set(i,r).toDate()},Date.prototype.diff=function(i,r){return Z(this).diff(i,r)},String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},String.prototype.isNumber=function(){return!isNaN(Number(this))&&this.trim()!==""};var Me=(i=>(i.opera="opera",i.firefox="firefox",i.safari="safari",i.ie="ie",i.edge="edge",i.edg="edg",i.electron="electron",i.chrome="chrome",i.iOsSafari="iOsSafari",i.edgiOs="edgiOs",i.headlessChrome="headlessChrome",i))(Me||{});const _e=[{breakpoint:"xs",screenWidth:0},{breakpoint:"sm",screenWidth:576},{breakpoint:"md",screenWidth:768},{breakpoint:"lg",screenWidth:992},{breakpoint:"xl",screenWidth:1200},{breakpoint:"xxl",screenWidth:1400},{breakpoint:"xxxl",screenWidth:1600}];class Qe{screenWidth=0;lastBreakpoint;resizeListener;breakpointChangeCallbacks=new Set;onResizeCallbacks=new Set;rafId=null;emitTimeoutId=null;pendingWidth;pendingBreakpoint;duplicateThresholdMs=60;constructor(){typeof window<"u"&&(this.screenWidth=window.innerWidth,this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener,{passive:!0}),this.lastBreakpoint=this.getBreakpointBySize(this.screenWidth))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.breakpointChangeCallbacks.clear(),this.onResizeCallbacks.clear(),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}getCurrentBreakpoint(){return this.lastBreakpoint}getCurrentScreenWidth(){return this.screenWidth}onBreakpointChange(r){this.breakpointChangeCallbacks.add(r)}offBreakpointChange(r){this.breakpointChangeCallbacks.delete(r)}onResizeChange(r){this.onResizeCallbacks.add(r)}offResizeChange(r){this.onResizeCallbacks.delete(r)}getCurrentBrowser(){const r=navigator.userAgent.toLowerCase();if(this.isOpera())return"opera";if(this.isFirefox())return"firefox";if(this.isSafari())return"safari";if(this.isIE())return"ie";if(this.isEdge())return"edge";if(this.isEdg())return"edg";if(this.isElectron(r))return"electron";if(this.isChrome())return"chrome";if(this.isIOsSafari(r))return"iOsSafari";if(this.isEdgiOs(r))return"edgiOs";if(this.isHeadlessChrome(r))return"headlessChrome";throw new Error("Browser could not be detected: "+r)}getBreakpointBySize(r=this.screenWidth){let s=_e[0];for(const l of _e)l.screenWidth<=r&&(s=l);return s}isScreenGreaterThan(r){const s=this.getBreakpoint(r);return this.screenWidth>(s?.screenWidth??0)}isScreenSmallerThan(r){const s=this.getBreakpoint(r);return this.screenWidth<(s?.screenWidth??0)}getBreakpoint(r){return _e.find(s=>s.breakpoint===r)}isOpera(){return typeof window<"u"&&(!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.includes("OPR/"))}isFirefox(){return typeof globalThis.InstallTrigger<"u"}isSafari(){return typeof window>"u"?!1:/constructor/i.test(window.HTMLElement)||(r=>r.toString()==="[object SafariRemoteNotification]")(!window.safari||window.safari&&window.safari.pushNotification)}isIE(){return typeof document>"u"?!1:!!document.documentMode}isEdge(){return typeof window>"u"?!1:!this.isIE()&&!!window.StyleMedia}isEdg(){return typeof navigator>"u"?!1:navigator.userAgent.toLowerCase().includes("edg")}isElectron(r){return r.includes("electron")}isChrome(){return typeof window>"u"?!1:!!window.chrome&&!this.isOpera()&&!this.isEdge()&&!this.isEdg()&&!this.isFirefox()&&!this.isSafari()&&!this.isIE()}isIOsSafari(r){return r.includes("iphone")||r.includes("ipad")||r.includes("macintosh")&&typeof document<"u"&&"ontouchend"in document&&r.includes("safari")}isEdgiOs(r){return r.includes("edgios")}isHeadlessChrome(r){return r.includes("headlesschrome")}onResize=()=>{if(typeof window>"u")return;const r=window.innerWidth,s=this.getBreakpointBySize(r);this.lastBreakpoint?.breakpoint!==s?.breakpoint&&(this.lastBreakpoint=s,s&&this.breakpointChangeCallbacks.forEach(l=>l(s))),this.pendingWidth=r,this.pendingBreakpoint=s,this.emitTimeoutId&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.pendingBreakpoint&&this.onResizeCallbacks.forEach(l=>l(this.pendingWidth,this.pendingBreakpoint)),this.pendingWidth=void 0,this.pendingBreakpoint=void 0,this.emitTimeoutId=null},this.duplicateThresholdMs)}}class Ve{copy(r){return navigator.clipboard.writeText(r)}}var ve={exports:{}};/* @license
|
|
1
|
+
(function(N,ce){typeof exports=="object"&&typeof module<"u"?ce(exports):typeof define=="function"&&define.amd?define(["exports"],ce):(N=typeof globalThis<"u"?globalThis:N||self,ce(N["ts-utils"]={}))})(this,(function(N){"use strict";async function ce(i,r,s){const l=s?.mimeType??Te(r),$=Ae(i,l);if("showSaveFilePicker"in window&&s?.showSaveFilePicker)try{const K=await(await window.showSaveFilePicker({suggestedName:r,types:[{description:"Datei",accept:{[l]:[`.${Ee(r)}`]}}]})).createWritable();await K.write($),await K.close();return}catch{}const x=URL.createObjectURL($),j=document.createElement("a");j.href=x,j.download=r,j.rel="noopener",j.style.display="none",document.body.appendChild(j),Ie(j),window.setTimeout(()=>{document.body.removeChild(j),URL.revokeObjectURL(x)},0),Fe()&&window.open(x,"_blank","noopener,noreferrer")}function Ae(i,r){if(i instanceof Blob)return i.type?i:new Blob([i],{type:r});if(i instanceof ArrayBuffer||i instanceof Uint8Array){const s=i instanceof Uint8Array?i:new Uint8Array(i);return new Blob([s],{type:r})}return new Blob([i],{type:r||"text/plain;charset=utf-8"})}function Te(i){switch(Ee(i).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 Ee(i){const r=i.lastIndexOf(".");return r>=0&&r<i.length-1?i.slice(r+1):""}function Ie(i){const r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),i.dispatchEvent(r)}function Fe(){const i=navigator.userAgent,r=/iPad|iPhone|iPod/.test(i),s=/^((?!chrome|android).)*safari/i.test(i);return r||s}class je{static getEnumValue(r,s){if(s in r)return r[s];throw Error(`${s} not found in ${r}`)}static getKeyValues(r){return Object.keys(r).filter(s=>!isNaN(Number(s))).map(s=>({key:Number(s),value:r[s]}))}}const ze=(i,r,s)=>i.localeCompare(r)*(s?1:-1),Be=(i,r)=>i<r?-1:i===r?0:1,We=(i,r,s)=>Be(i,r)*(s?1:-1),Pe=(i,r,s)=>{let l=0;return typeof i=="string"&&typeof r=="string"?l=ze(i,r,s):l=We(i,r,s),l},Oe=(i,r,s,l)=>{const $=s(i),x=s(r);return Pe($,x,l)};Array.prototype.distinct=function(i){const r=this;return i?r.filter((l,$,x)=>x.findIndex(j=>i(j,l))===$):r.filter((l,$,x)=>x.indexOf(l)===$)},Array.prototype.filterBy=function(i){return this.filter(r=>{let s=!1;return i&&r[i]?s=r[i]===i:s=r===i,s})},Array.prototype.first=function(){return this?.length>0?this[0]:null},Array.prototype.groupBy=function(i){return this.reduce((r,s)=>{const l=i(s);return(r[l]=r[l]||[]).push(s),r},{})},Array.prototype.orderBy=function(i,r=!0){return this?.sort((s,l)=>Oe(s,l,i,r)),this},Array.prototype.removeBy=function(i,r){return this.filter(s=>i(s)!==r)};function De(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var _e={exports:{}},Ue=_e.exports,Ce;function Ye(){return Ce||(Ce=1,(function(i,r){(function(s,l){i.exports=l()})(Ue,(function(){var s=1e3,l=6e4,$=36e5,x="millisecond",j="second",q="minute",K="hour",v="day",U="week",W="month",ee="quarter",J="year",V="date",te="Invalid Date",se=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,de=/\[([^\]]+)]|Y{1,4}|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,ge={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(m){var f=["th","st","nd","rd"],c=m%100;return"["+m+(f[(c-20)%10]||f[c]||f[0])+"]"}},ue=function(m,f,c){var a=String(m);return!a||a.length>=f?m:""+Array(f+1-a.length).join(c)+m},ke={s:ue,z:function(m){var f=-m.utcOffset(),c=Math.abs(f),a=Math.floor(c/60),u=c%60;return(f<=0?"+":"-")+ue(a,2,"0")+":"+ue(u,2,"0")},m:function m(f,c){if(f.date()<c.date())return-m(c,f);var a=12*(c.year()-f.year())+(c.month()-f.month()),u=f.clone().add(a,W),h=c-u<0,y=f.clone().add(a+(h?-1:1),W);return+(-(a+(c-u)/(h?u-y:y-u))||0)},a:function(m){return m<0?Math.ceil(m)||0:Math.floor(m)},p:function(m){return{M:W,y:J,w:U,d:v,D:V,h:K,m:q,s:j,ms:x,Q:ee}[m]||String(m||"").toLowerCase().replace(/s$/,"")},u:function(m){return m===void 0}},ae="en",Y={};Y[ae]=ge;var R="$isDayjsObject",e=function(m){return m instanceof g||!(!m||!m[R])},t=function m(f,c,a){var u;if(!f)return ae;if(typeof f=="string"){var h=f.toLowerCase();Y[h]&&(u=h),c&&(Y[h]=c,u=h);var y=f.split("-");if(!u&&y.length>1)return m(y[0])}else{var p=f.name;Y[p]=f,u=p}return!a&&u&&(ae=u),u||!a&&ae},n=function(m,f){if(e(m))return m.clone();var c=typeof f=="object"?f:{};return c.date=m,c.args=arguments,new g(c)},o=ke;o.l=t,o.i=e,o.w=function(m,f){return n(m,{locale:f.$L,utc:f.$u,x:f.$x,$offset:f.$offset})};var g=(function(){function m(c){this.$L=t(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[R]=!0}var f=m.prototype;return f.parse=function(c){this.$d=(function(a){var u=a.date,h=a.utc;if(u===null)return new Date(NaN);if(o.u(u))return new Date;if(u instanceof Date)return new Date(u);if(typeof u=="string"&&!/Z$/i.test(u)){var y=u.match(se);if(y){var p=y[2]-1||0,_=(y[7]||"0").substring(0,3);return h?new Date(Date.UTC(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)):new Date(y[1],p,y[3]||1,y[4]||0,y[5]||0,y[6]||0,_)}}return new Date(u)})(c),this.init()},f.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},f.$utils=function(){return o},f.isValid=function(){return this.$d.toString()!==te},f.isSame=function(c,a){var u=n(c);return this.startOf(a)<=u&&u<=this.endOf(a)},f.isAfter=function(c,a){return n(c)<this.startOf(a)},f.isBefore=function(c,a){return this.endOf(a)<n(c)},f.$g=function(c,a,u){return o.u(c)?this[a]:this.set(u,c)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(c,a){var u=this,h=!!o.u(a)||a,y=o.p(c),p=function(E,O){var w=o.w(u.$u?Date.UTC(u.$y,O,E):new Date(u.$y,O,E),u);return h?w:w.endOf(v)},_=function(E,O){return o.w(u.toDate()[E].apply(u.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(O)),u)},d=this.$W,D=this.$M,M=this.$D,I="set"+(this.$u?"UTC":"");switch(y){case J:return h?p(1,0):p(31,11);case W:return h?p(1,D):p(0,D+1);case U:var B=this.$locale().weekStart||0,k=(d<B?d+7:d)-B;return p(h?M-k:M+(6-k),D);case v:case V:return _(I+"Hours",0);case K:return _(I+"Minutes",1);case q:return _(I+"Seconds",2);case j:return _(I+"Milliseconds",3);default:return this.clone()}},f.endOf=function(c){return this.startOf(c,!1)},f.$set=function(c,a){var u,h=o.p(c),y="set"+(this.$u?"UTC":""),p=(u={},u[v]=y+"Date",u[V]=y+"Date",u[W]=y+"Month",u[J]=y+"FullYear",u[K]=y+"Hours",u[q]=y+"Minutes",u[j]=y+"Seconds",u[x]=y+"Milliseconds",u)[h],_=h===v?this.$D+(a-this.$W):a;if(h===W||h===J){var d=this.clone().set(V,1);d.$d[p](_),d.init(),this.$d=d.set(V,Math.min(this.$D,d.daysInMonth())).$d}else p&&this.$d[p](_);return this.init(),this},f.set=function(c,a){return this.clone().$set(c,a)},f.get=function(c){return this[o.p(c)]()},f.add=function(c,a){var u,h=this;c=Number(c);var y=o.p(a),p=function(D){var M=n(h);return o.w(M.date(M.date()+Math.round(D*c)),h)};if(y===W)return this.set(W,this.$M+c);if(y===J)return this.set(J,this.$y+c);if(y===v)return p(1);if(y===U)return p(7);var _=(u={},u[q]=l,u[K]=$,u[j]=s,u)[y]||1,d=this.$d.getTime()+c*_;return o.w(d,this)},f.subtract=function(c,a){return this.add(-1*c,a)},f.format=function(c){var a=this,u=this.$locale();if(!this.isValid())return u.invalidDate||te;var h=c||"YYYY-MM-DDTHH:mm:ssZ",y=o.z(this),p=this.$H,_=this.$m,d=this.$M,D=u.weekdays,M=u.months,I=u.meridiem,B=function(O,w,L,F){return O&&(O[w]||O(a,h))||L[w].slice(0,F)},k=function(O){return o.s(p%12||12,O,"0")},E=I||function(O,w,L){var F=O<12?"AM":"PM";return L?F.toLowerCase():F};return h.replace(de,(function(O,w){return w||(function(L){switch(L){case"YY":return String(a.$y).slice(-2);case"YYYY":return o.s(a.$y,4,"0");case"M":return d+1;case"MM":return o.s(d+1,2,"0");case"MMM":return B(u.monthsShort,d,M,3);case"MMMM":return B(M,d);case"D":return a.$D;case"DD":return o.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return B(u.weekdaysMin,a.$W,D,2);case"ddd":return B(u.weekdaysShort,a.$W,D,3);case"dddd":return D[a.$W];case"H":return String(p);case"HH":return o.s(p,2,"0");case"h":return k(1);case"hh":return k(2);case"a":return E(p,_,!0);case"A":return E(p,_,!1);case"m":return String(_);case"mm":return o.s(_,2,"0");case"s":return String(a.$s);case"ss":return o.s(a.$s,2,"0");case"SSS":return o.s(a.$ms,3,"0");case"Z":return y}return null})(O)||y.replace(":","")}))},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(c,a,u){var h,y=this,p=o.p(a),_=n(c),d=(_.utcOffset()-this.utcOffset())*l,D=this-_,M=function(){return o.m(y,_)};switch(p){case J:h=M()/12;break;case W:h=M();break;case ee:h=M()/3;break;case U:h=(D-d)/6048e5;break;case v:h=(D-d)/864e5;break;case K:h=D/$;break;case q:h=D/l;break;case j:h=D/s;break;default:h=D}return u?h:o.a(h)},f.daysInMonth=function(){return this.endOf(W).$D},f.$locale=function(){return Y[this.$L]},f.locale=function(c,a){if(!c)return this.$L;var u=this.clone(),h=t(c,a,!0);return h&&(u.$L=h),u},f.clone=function(){return o.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()},m})(),b=g.prototype;return n.prototype=b,[["$ms",x],["$s",j],["$m",q],["$H",K],["$W",v],["$M",W],["$y",J],["$D",V]].forEach((function(m){b[m[1]]=function(f){return this.$g(f,m[0],m[1])}})),n.extend=function(m,f){return m.$i||(m(f,g,n),m.$i=!0),n},n.locale=t,n.isDayjs=e,n.unix=function(m){return n(1e3*m)},n.en=Y[ae],n.Ls=Y,n.p={},n}))})(_e)),_e.exports}var He=Ye();const G=De(He);var ve={exports:{}},Ne=ve.exports,xe;function qe(){return xe||(xe=1,(function(i,r){(function(s,l){i.exports=l()})(Ne,(function(){var s={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(l,$,x){var j=$.prototype,q=j.format;x.en.formats=s,j.format=function(K){K===void 0&&(K="YYYY-MM-DDTHH:mm:ssZ");var v=this.$locale().formats,U=(function(W,ee){return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(J,V,te){var se=te&&te.toUpperCase();return V||ee[te]||s[te]||ee[se].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(de,ge,ue){return ge||ue.slice(1)}))}))})(K,v===void 0?{}:v);return q.call(this,U)}}}))})(ve)),ve.exports}var Ke=qe();const Je=De(Ke);G.extend(Je),Date.prototype.isAfter=function(i,r){return G(this).isAfter(i,r)},Date.prototype.isBefore=function(i,r){return G(this).isBefore(i,r)},Date.prototype.format=function(i){return G(this).format(i)},Date.prototype.isValid=function(){return G(this).isValid()},Date.prototype.add=function(i,r){return G(this).add(i,r).toDate()},Date.prototype.subtract=function(i,r){return G(this).subtract(i,r).toDate()},Date.prototype.firstDayOfMonth=function(){return G(this).startOf("month").toDate()},Date.prototype.lastDayOfMonth=function(){return G(this).endOf("month").toDate()},Date.prototype.set=function(i,r){return G(this).set(i,r).toDate()},Date.prototype.diff=function(i,r){return G(this).diff(i,r)},String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},String.prototype.isNumber=function(){return!isNaN(Number(this))&&this.trim()!==""},String.prototype.isEmpty=function(){return this===void 0||!this||this.length===0};var Z=(i=>(i.opera="opera",i.firefox="firefox",i.safari="safari",i.ie="ie",i.edge="edge",i.edg="edg",i.electron="electron",i.chrome="chrome",i.iOsSafari="iOsSafari",i.edgiOs="edgiOs",i.headlessChrome="headlessChrome",i))(Z||{});const fe={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600};class Qe{screenWidth=0;lastBreakpoint;resizeListener;breakpointChangeCallbacks=new Set;onResizeCallbacks=new Set;rafId=null;emitTimeoutId=null;pendingWidth;pendingBreakpoint;duplicateThresholdMs=60;constructor(){typeof window<"u"&&(this.screenWidth=window.innerWidth,this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener,{passive:!0}),this.lastBreakpoint=this.getBreakpointByScreenWidth(this.screenWidth))}destroy(){typeof window<"u"&&window.removeEventListener("resize",this.resizeListener),this.breakpointChangeCallbacks.clear(),this.onResizeCallbacks.clear(),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}getCurrentBreakpoint(){return this.lastBreakpoint}getCurrentScreenWidth(){return this.screenWidth}onBreakpointChange(r){this.breakpointChangeCallbacks.add(r)}offBreakpointChange(r){this.breakpointChangeCallbacks.delete(r)}onResizeChange(r){this.onResizeCallbacks.add(r)}offResizeChange(r){this.onResizeCallbacks.delete(r)}getCurrentBrowser(){const r=navigator.userAgent.toLowerCase();if(this.isOpera())return Z.opera;if(this.isFirefox())return Z.firefox;if(this.isSafari())return Z.safari;if(this.isIE())return Z.ie;if(this.isEdge())return Z.edge;if(this.isEdg())return Z.edg;if(this.isElectron(r))return Z.electron;if(this.isChrome())return Z.chrome;if(this.isIOsSafari(r))return Z.iOsSafari;if(this.isEdgiOs(r))return Z.edgiOs;if(this.isHeadlessChrome(r))return Z.headlessChrome;throw new Error("Browser could not be detected: "+r)}getBreakpointByScreenWidth(r=this.screenWidth){let s="xs";for(const l of Object.keys(fe))fe[l]<=r&&(s=l);return{breakpoint:s,screenWidth:fe[s]}}isScreenGreaterThan(r){return this.screenWidth>fe[r]}isScreenSmallerThan(r){return this.screenWidth<fe[r]}getBreakpoint(r){return{breakpoint:r,screenWidth:fe[r]}}isOpera(){return typeof window<"u"&&(!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.includes("OPR/"))}isFirefox(){return typeof globalThis.InstallTrigger<"u"}isSafari(){return typeof window>"u"?!1:/constructor/i.test(window.HTMLElement)||(r=>r.toString()==="[object SafariRemoteNotification]")(!window.safari||window.safari&&window.safari.pushNotification)}isIE(){return typeof document>"u"?!1:!!document.documentMode}isEdge(){return typeof window>"u"?!1:!this.isIE()&&!!window.StyleMedia}isEdg(){return typeof navigator>"u"?!1:navigator.userAgent.toLowerCase().includes("edg")}isElectron(r){return r.includes("electron")}isChrome(){return typeof window>"u"?!1:!!window.chrome&&!this.isOpera()&&!this.isEdge()&&!this.isEdg()&&!this.isFirefox()&&!this.isSafari()&&!this.isIE()}isIOsSafari(r){return r.includes("iphone")||r.includes("ipad")||r.includes("macintosh")&&typeof document<"u"&&"ontouchend"in document&&r.includes("safari")}isEdgiOs(r){return r.includes("edgios")}isHeadlessChrome(r){return r.includes("headlesschrome")}onResize=()=>{if(typeof window>"u")return;const r=window.innerWidth,s=this.getBreakpointByScreenWidth(r);this.lastBreakpoint?.breakpoint!==s?.breakpoint&&(this.lastBreakpoint=s,s&&this.breakpointChangeCallbacks.forEach(l=>l(s))),this.pendingWidth=r,this.pendingBreakpoint=s,this.emitTimeoutId&&clearTimeout(this.emitTimeoutId),this.emitTimeoutId=window.setTimeout(()=>{this.pendingBreakpoint&&this.onResizeCallbacks.forEach(l=>l(this.pendingWidth,this.pendingBreakpoint)),this.pendingWidth=void 0,this.pendingBreakpoint=void 0,this.emitTimeoutId=null},this.duplicateThresholdMs)}}class Ve{copy(r){return navigator.clipboard.writeText(r)}}var we={exports:{}};/* @license
|
|
2
2
|
Papa Parse
|
|
3
3
|
v5.5.3
|
|
4
4
|
https://github.com/mholt/PapaParse
|
|
5
5
|
License: MIT
|
|
6
|
-
*/var Ze=
|
|
6
|
+
*/var Ze=we.exports,Me;function Ge(){return Me||(Me=1,(function(i,r){((s,l)=>{i.exports=l()})(Ze,function s(){var l=typeof self<"u"?self:typeof window<"u"?window:l!==void 0?l:{},$,x=!l.document&&!!l.postMessage,j=l.IS_PAPA_WORKER||!1,q={},K=0,v={};function U(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(t){var n=ae(t);n.chunkSize=parseInt(n.chunkSize),t.step||t.chunk||(n.chunkSize=null),this._handle=new te(n),(this._handle.streamer=this)._config=n}).call(this,e),this.parseChunk=function(t,n){var o=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<o){let b=this._config.newline;b||(g=this._config.quoteChar||'"',b=this._handle.guessLineEndings(t,g)),t=[...t.split(b).slice(o)].join(b)}this.isFirstChunk&&R(this._config.beforeFirstChunk)&&(g=this._config.beforeFirstChunk(t))!==void 0&&(t=g),this.isFirstChunk=!1,this._halted=!1;var o=this._partialLine+t,g=(this._partialLine="",this._handle.parse(o,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(t=g.meta.cursor,o=(this._finished||(this._partialLine=o.substring(t-this._baseIndex),this._baseIndex=t),g&&g.data&&(this._rowCount+=g.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),j)l.postMessage({results:g,workerId:v.WORKER_ID,finished:o});else if(R(this._config.chunk)&&!n){if(this._config.chunk(g,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=g=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(g.data),this._completeResults.errors=this._completeResults.errors.concat(g.errors),this._completeResults.meta=g.meta),this._completed||!o||!R(this._config.complete)||g&&g.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),o||g&&g.meta.paused||this._nextChunk(),g}this._halted=!0},this._sendError=function(t){R(this._config.error)?this._config.error(t):j&&this._config.error&&l.postMessage({workerId:v.WORKER_ID,error:t,finished:!1})}}function W(e){var t;(e=e||{}).chunkSize||(e.chunkSize=v.RemoteChunkSize),U.call(this,e),this._nextChunk=x?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(n){this._input=n,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),x||(t.onload=Y(this._chunkLoaded,this),t.onerror=Y(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!x),this._config.downloadRequestHeaders){var n,o=this._config.downloadRequestHeaders;for(n in o)t.setRequestHeader(n,o[n])}var g;this._config.chunkSize&&(g=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+g));try{t.send(this._config.downloadRequestBody)}catch(b){this._chunkError(b.message)}x&&t.status===0&&this._chunkError()}},this._chunkLoaded=function(){t.readyState===4&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(n=>(n=n.getResponseHeader("Content-Range"))!==null?parseInt(n.substring(n.lastIndexOf("/")+1)):-1)(t),this.parseChunk(t.responseText)))},this._chunkError=function(n){n=t.statusText||n,this._sendError(new Error(n))}}function ee(e){(e=e||{}).chunkSize||(e.chunkSize=v.LocalChunkSize),U.call(this,e);var t,n,o=typeof FileReader<"u";this.stream=function(g){this._input=g,n=g.slice||g.webkitSlice||g.mozSlice,o?((t=new FileReader).onload=Y(this._chunkLoaded,this),t.onerror=Y(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var g=this._input,b=(this._config.chunkSize&&(b=Math.min(this._start+this._config.chunkSize,this._input.size),g=n.call(g,this._start,b)),t.readAsText(g,this._config.encoding));o||this._chunkLoaded({target:{result:b}})},this._chunkLoaded=function(g){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(g.target.result)},this._chunkError=function(){this._sendError(t.error)}}function J(e){var t;U.call(this,e=e||{}),this.stream=function(n){return t=n,this._nextChunk()},this._nextChunk=function(){var n,o;if(!this._finished)return n=this._config.chunkSize,t=n?(o=t.substring(0,n),t.substring(n)):(o=t,""),this._finished=!t,this.parseChunk(o)}}function V(e){U.call(this,e=e||{});var t=[],n=!0,o=!1;this.pause=function(){U.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){U.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(g){this._input=g,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){o&&t.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=Y(function(g){try{t.push(typeof g=="string"?g:g.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(b){this._streamError(b)}},this),this._streamError=Y(function(g){this._streamCleanUp(),this._sendError(g)},this),this._streamEnd=Y(function(){this._streamCleanUp(),o=!0,this._streamData("")},this),this._streamCleanUp=Y(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function te(e){var t,n,o,g,b=Math.pow(2,53),m=-b,f=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,c=/^((\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)))$/,a=this,u=0,h=0,y=!1,p=!1,_=[],d={data:[],errors:[],meta:{}};function D(k){return e.skipEmptyLines==="greedy"?k.join("").trim()==="":k.length===1&&k[0].length===0}function M(){if(d&&o&&(B("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+v.DefaultDelimiter+"'"),o=!1),e.skipEmptyLines&&(d.data=d.data.filter(function(w){return!D(w)})),I()){let w=function(L,F){R(e.transformHeader)&&(L=e.transformHeader(L,F)),_.push(L)};if(d)if(Array.isArray(d.data[0])){for(var k=0;I()&&k<d.data.length;k++)d.data[k].forEach(w);d.data.splice(0,1)}else d.data.forEach(w)}function E(w,L){for(var F=e.header?{}:[],A=0;A<w.length;A++){var T=A,C=w[A],C=((X,S)=>(z=>(e.dynamicTypingFunction&&e.dynamicTyping[z]===void 0&&(e.dynamicTyping[z]=e.dynamicTypingFunction(z)),(e.dynamicTyping[z]||e.dynamicTyping)===!0))(X)?S==="true"||S==="TRUE"||S!=="false"&&S!=="FALSE"&&((z=>{if(f.test(z)&&(z=parseFloat(z),m<z&&z<b))return 1})(S)?parseFloat(S):c.test(S)?new Date(S):S===""?null:S):S)(T=e.header?A>=_.length?"__parsed_extra":_[A]:T,C=e.transform?e.transform(C,T):C);T==="__parsed_extra"?(F[T]=F[T]||[],F[T].push(C)):F[T]=C}return e.header&&(A>_.length?B("FieldMismatch","TooManyFields","Too many fields: expected "+_.length+" fields but parsed "+A,h+L):A<_.length&&B("FieldMismatch","TooFewFields","Too few fields: expected "+_.length+" fields but parsed "+A,h+L)),F}var O;d&&(e.header||e.dynamicTyping||e.transform)&&(O=1,!d.data.length||Array.isArray(d.data[0])?(d.data=d.data.map(E),O=d.data.length):d.data=E(d.data,0),e.header&&d.meta&&(d.meta.fields=_),h+=O)}function I(){return e.header&&_.length===0}function B(k,E,O,w){k={type:k,code:E,message:O},w!==void 0&&(k.row=w),d.errors.push(k)}R(e.step)&&(g=e.step,e.step=function(k){d=k,I()?M():(M(),d.data.length!==0&&(u+=k.data.length,e.preview&&u>e.preview?n.abort():(d.data=d.data[0],g(d,a))))}),this.parse=function(k,E,O){var w=e.quoteChar||'"',w=(e.newline||(e.newline=this.guessLineEndings(k,w)),o=!1,e.delimiter?R(e.delimiter)&&(e.delimiter=e.delimiter(k),d.meta.delimiter=e.delimiter):((w=((L,F,A,T,C)=>{var X,S,z,he;C=C||[","," ","|",";",v.RECORD_SEP,v.UNIT_SEP];for(var le=0;le<C.length;le++){for(var re,me=C[le],H=0,ne=0,P=0,Q=(z=void 0,new de({comments:T,delimiter:me,newline:F,preview:10}).parse(L)),oe=0;oe<Q.data.length;oe++)A&&D(Q.data[oe])?P++:(re=Q.data[oe].length,ne+=re,z===void 0?z=re:0<re&&(H+=Math.abs(re-z),z=re));0<Q.data.length&&(ne/=Q.data.length-P),(S===void 0||H<=S)&&(he===void 0||he<ne)&&1.99<ne&&(S=H,X=me,he=ne)}return{successful:!!(e.delimiter=X),bestDelimiter:X}})(k,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=w.bestDelimiter:(o=!0,e.delimiter=v.DefaultDelimiter),d.meta.delimiter=e.delimiter),ae(e));return e.preview&&e.header&&w.preview++,t=k,n=new de(w),d=n.parse(t,E,O),M(),y?{meta:{paused:!0}}:d||{meta:{paused:!1}}},this.paused=function(){return y},this.pause=function(){y=!0,n.abort(),t=R(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){a.streamer._halted?(y=!1,a.streamer.parseChunk(t,!0)):setTimeout(a.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,n.abort(),d.meta.aborted=!0,R(e.complete)&&e.complete(d),t=""},this.guessLineEndings=function(L,w){L=L.substring(0,1048576);var w=new RegExp(se(w)+"([^]*?)"+se(w),"gm"),O=(L=L.replace(w,"")).split("\r"),w=L.split(`
|
|
7
7
|
`),L=1<w.length&&w[0].length<O[0].length;if(O.length===1||L)return`
|
|
8
8
|
`;for(var F=0,A=0;A<O.length;A++)O[A][0]===`
|
|
9
9
|
`&&F++;return F>=O.length/2?`\r
|
|
10
|
-
`:"\r"}}function
|
|
10
|
+
`:"\r"}}function se(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function de(e){var t=(e=e||{}).delimiter,n=e.newline,o=e.comments,g=e.step,b=e.preview,m=e.fastMode,f=null,c=!1,a=e.quoteChar==null?'"':e.quoteChar,u=a;if(e.escapeChar!==void 0&&(u=e.escapeChar),(typeof t!="string"||-1<v.BAD_DELIMITERS.indexOf(t))&&(t=","),o===t)throw new Error("Comment character same as delimiter");o===!0?o="#":(typeof o!="string"||-1<v.BAD_DELIMITERS.indexOf(o))&&(o=!1),n!==`
|
|
11
11
|
`&&n!=="\r"&&n!==`\r
|
|
12
12
|
`&&(n=`
|
|
13
|
-
`);var h=0,y=!1;this.parse=function(p,_,
|
|
14
|
-
`,m='"',
|
|
15
|
-
`,'"',v.BYTE_ORDER_MARK],v.WORKERS_SUPPORTED=!
|
|
13
|
+
`);var h=0,y=!1;this.parse=function(p,_,d){if(typeof p!="string")throw new Error("Input must be a string");var D=p.length,M=t.length,I=n.length,B=o.length,k=R(g),E=[],O=[],w=[],L=h=0;if(!p)return H();if(m||m!==!1&&p.indexOf(a)===-1){for(var F=p.split(n),A=0;A<F.length;A++){if(w=F[A],h+=w.length,A!==F.length-1)h+=n.length;else if(d)return H();if(!o||w.substring(0,B)!==o){if(k){if(E=[],he(w.split(t)),ne(),y)return H()}else he(w.split(t));if(b&&b<=A)return E=E.slice(0,b),H(!0)}}return H()}for(var T=p.indexOf(t,h),C=p.indexOf(n,h),X=new RegExp(se(u)+se(a),"g"),S=p.indexOf(a,h);;)if(p[h]===a)for(S=h,h++;;){if((S=p.indexOf(a,S+1))===-1)return d||O.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:E.length,index:h}),re();if(S===D-1)return re(p.substring(h,S).replace(X,a));if(a===u&&p[S+1]===u)S++;else if(a===u||S===0||p[S-1]!==u){T!==-1&&T<S+1&&(T=p.indexOf(t,S+1));var z=le((C=C!==-1&&C<S+1?p.indexOf(n,S+1):C)===-1?T:Math.min(T,C));if(p.substr(S+1+z,M)===t){w.push(p.substring(h,S).replace(X,a)),p[h=S+1+z+M]!==a&&(S=p.indexOf(a,h)),T=p.indexOf(t,h),C=p.indexOf(n,h);break}if(z=le(C),p.substring(S+1+z,S+1+z+I)===n){if(w.push(p.substring(h,S).replace(X,a)),me(S+1+z+I),T=p.indexOf(t,h),S=p.indexOf(a,h),k&&(ne(),y))return H();if(b&&E.length>=b)return H(!0);break}O.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:E.length,index:h}),S++}}else if(o&&w.length===0&&p.substring(h,h+B)===o){if(C===-1)return H();h=C+I,C=p.indexOf(n,h),T=p.indexOf(t,h)}else if(T!==-1&&(T<C||C===-1))w.push(p.substring(h,T)),h=T+M,T=p.indexOf(t,h);else{if(C===-1)break;if(w.push(p.substring(h,C)),me(C+I),k&&(ne(),y))return H();if(b&&E.length>=b)return H(!0)}return re();function he(P){E.push(P),L=h}function le(P){var Q=0;return Q=P!==-1&&(P=p.substring(S+1,P))&&P.trim()===""?P.length:Q}function re(P){return d||(P===void 0&&(P=p.substring(h)),w.push(P),h=D,he(w),k&&ne()),H()}function me(P){h=P,he(w),w=[],C=p.indexOf(n,h)}function H(P){if(e.header&&!_&&E.length&&!c){var Q=E[0],oe=Object.create(null),Se=new Set(Q);let Re=!1;for(let pe=0;pe<Q.length;pe++){let ie=Q[pe];if(oe[ie=R(e.transformHeader)?e.transformHeader(ie,pe):ie]){let ye,Le=oe[ie];for(;ye=ie+"_"+Le,Le++,Se.has(ye););Se.add(ye),Q[pe]=ye,oe[ie]++,Re=!0,(f=f===null?{}:f)[ye]=ie}else oe[ie]=1,Q[pe]=ie;Se.add(ie)}Re&&console.warn("Duplicate headers found and renamed."),c=!0}return{data:E,errors:O,meta:{delimiter:t,linebreak:n,aborted:y,truncated:!!P,cursor:L+(_||0),renamedHeaders:f}}}function ne(){g(H()),E=[],O=[]}},this.abort=function(){y=!0},this.getCharIndex=function(){return h}}function ge(e){var t=e.data,n=q[t.workerId],o=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var g={abort:function(){o=!0,ue(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:ke,resume:ke};if(R(n.userStep)){for(var b=0;b<t.results.data.length&&(n.userStep({data:t.results.data[b],errors:t.results.errors,meta:t.results.meta},g),!o);b++);delete t.results}else R(n.userChunk)&&(n.userChunk(t.results,g,t.file),delete t.results)}t.finished&&!o&&ue(t.workerId,t.results)}function ue(e,t){var n=q[e];R(n.userComplete)&&n.userComplete(t),n.terminate(),delete q[e]}function ke(){throw new Error("Not implemented.")}function ae(e){if(typeof e!="object"||e===null)return e;var t,n=Array.isArray(e)?[]:{};for(t in e)n[t]=ae(e[t]);return n}function Y(e,t){return function(){e.apply(t,arguments)}}function R(e){return typeof e=="function"}return v.parse=function(e,t){var n=(t=t||{}).dynamicTyping||!1;if(R(n)&&(t.dynamicTypingFunction=n,n={}),t.dynamicTyping=n,t.transform=!!R(t.transform)&&t.transform,!t.worker||!v.WORKERS_SUPPORTED)return n=null,v.NODE_STREAM_INPUT,typeof e=="string"?(e=(o=>o.charCodeAt(0)!==65279?o:o.slice(1))(e),n=new(t.download?W:J)(t)):e.readable===!0&&R(e.read)&&R(e.on)?n=new V(t):(l.File&&e instanceof File||e instanceof Object)&&(n=new ee(t)),n.stream(e);(n=(()=>{var o;return!!v.WORKERS_SUPPORTED&&(o=(()=>{var g=l.URL||l.webkitURL||null,b=s.toString();return v.BLOB_URL||(v.BLOB_URL=g.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; ","(",b,")();"],{type:"text/javascript"})))})(),(o=new l.Worker(o)).onmessage=ge,o.id=K++,q[o.id]=o)})()).userStep=t.step,n.userChunk=t.chunk,n.userComplete=t.complete,n.userError=t.error,t.step=R(t.step),t.chunk=R(t.chunk),t.complete=R(t.complete),t.error=R(t.error),delete t.worker,n.postMessage({input:e,config:t,workerId:n.id})},v.unparse=function(e,t){var n=!1,o=!0,g=",",b=`\r
|
|
14
|
+
`,m='"',f=m+m,c=!1,a=null,u=!1,h=((()=>{if(typeof t=="object"){if(typeof t.delimiter!="string"||v.BAD_DELIMITERS.filter(function(_){return t.delimiter.indexOf(_)!==-1}).length||(g=t.delimiter),typeof t.quotes!="boolean"&&typeof t.quotes!="function"&&!Array.isArray(t.quotes)||(n=t.quotes),typeof t.skipEmptyLines!="boolean"&&typeof t.skipEmptyLines!="string"||(c=t.skipEmptyLines),typeof t.newline=="string"&&(b=t.newline),typeof t.quoteChar=="string"&&(m=t.quoteChar),typeof t.header=="boolean"&&(o=t.header),Array.isArray(t.columns)){if(t.columns.length===0)throw new Error("Option columns is empty");a=t.columns}t.escapeChar!==void 0&&(f=t.escapeChar+m),t.escapeFormulae instanceof RegExp?u=t.escapeFormulae:typeof t.escapeFormulae=="boolean"&&t.escapeFormulae&&(u=/^[=+\-@\t\r].*$/)}})(),new RegExp(se(m),"g"));if(typeof e=="string"&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return y(null,e,c);if(typeof e[0]=="object")return y(a||Object.keys(e[0]),e,c)}else if(typeof e=="object")return typeof e.data=="string"&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||a),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:typeof e.data[0]=="object"?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||typeof e.data[0]=="object"||(e.data=[e.data])),y(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function y(_,d,D){var M="",I=(typeof _=="string"&&(_=JSON.parse(_)),typeof d=="string"&&(d=JSON.parse(d)),Array.isArray(_)&&0<_.length),B=!Array.isArray(d[0]);if(I&&o){for(var k=0;k<_.length;k++)0<k&&(M+=g),M+=p(_[k],k);0<d.length&&(M+=b)}for(var E=0;E<d.length;E++){var O=(I?_:d[E]).length,w=!1,L=I?Object.keys(d[E]).length===0:d[E].length===0;if(D&&!I&&(w=D==="greedy"?d[E].join("").trim()==="":d[E].length===1&&d[E][0].length===0),D==="greedy"&&I){for(var F=[],A=0;A<O;A++){var T=B?_[A]:A;F.push(d[E][T])}w=F.join("").trim()===""}if(!w){for(var C=0;C<O;C++){0<C&&!L&&(M+=g);var X=I&&B?_[C]:C;M+=p(d[E][X],C)}E<d.length-1&&(!D||0<O&&!L)&&(M+=b)}}return M}function p(_,d){var D,M;return _==null?"":_.constructor===Date?JSON.stringify(_).slice(1,25):(M=!1,u&&typeof _=="string"&&u.test(_)&&(_="'"+_,M=!0),D=_.toString().replace(h,f),(M=M||n===!0||typeof n=="function"&&n(_,d)||Array.isArray(n)&&n[d]||((I,B)=>{for(var k=0;k<B.length;k++)if(-1<I.indexOf(B[k]))return!0;return!1})(D,v.BAD_DELIMITERS)||-1<D.indexOf(g)||D.charAt(0)===" "||D.charAt(D.length-1)===" ")?m+D+m:D)}},v.RECORD_SEP="",v.UNIT_SEP="",v.BYTE_ORDER_MARK="\uFEFF",v.BAD_DELIMITERS=["\r",`
|
|
15
|
+
`,'"',v.BYTE_ORDER_MARK],v.WORKERS_SUPPORTED=!x&&!!l.Worker,v.NODE_STREAM_INPUT=1,v.LocalChunkSize=10485760,v.RemoteChunkSize=5242880,v.DefaultDelimiter=",",v.Parser=de,v.ParserHandle=te,v.NetworkStreamer=W,v.FileStreamer=ee,v.StringStreamer=J,v.ReadableStreamStreamer=V,l.jQuery&&(($=l.jQuery).fn.parse=function(e){var t=e.config||{},n=[];return this.each(function(b){if(!($(this).prop("tagName").toUpperCase()==="INPUT"&&$(this).attr("type").toLowerCase()==="file"&&l.FileReader)||!this.files||this.files.length===0)return!0;for(var m=0;m<this.files.length;m++)n.push({file:this.files[m],inputElem:this,instanceConfig:$.extend({},t)})}),o(),this;function o(){if(n.length===0)R(e.complete)&&e.complete();else{var b,m,f,c,a=n[0];if(R(e.before)){var u=e.before(a.file,a.inputElem);if(typeof u=="object"){if(u.action==="abort")return b="AbortError",m=a.file,f=a.inputElem,c=u.reason,void(R(e.error)&&e.error({name:b},m,f,c));if(u.action==="skip")return void g();typeof u.config=="object"&&(a.instanceConfig=$.extend(a.instanceConfig,u.config))}else if(u==="skip")return void g()}var h=a.instanceConfig.complete;a.instanceConfig.complete=function(y){R(h)&&h(y,a.file,a.inputElem),g()},v.parse(a.file,a.instanceConfig)}}function g(){n.splice(0,1),o()}}),j&&(l.onmessage=function(e){e=e.data,v.WORKER_ID===void 0&&e&&(v.WORKER_ID=e.workerId),typeof e.input=="string"?l.postMessage({workerId:v.WORKER_ID,results:v.parse(e.input,e.config),finished:!0}):(l.File&&e.input instanceof File||e.input instanceof Object)&&(e=v.parse(e.input,e.config))&&l.postMessage({workerId:v.WORKER_ID,results:e,finished:!0})}),(W.prototype=Object.create(U.prototype)).constructor=W,(ee.prototype=Object.create(U.prototype)).constructor=ee,(J.prototype=Object.create(J.prototype)).constructor=J,(V.prototype=Object.create(U.prototype)).constructor=V,v})})(we)),we.exports}var $e=Ge();class Xe{readAsText(r){const s=new FileReader;return new Promise((l,$)=>{s.onload=x=>{l(x)},s.onerror=x=>{$(x)},s.readAsText(r)})}readAsBinaryString(r){const s=new FileReader;return new Promise((l,$)=>{s.onload=x=>{l(x)},s.onerror=x=>{$(x)},s.readAsBinaryString(r)})}readAsDataUrl(r){const s=new FileReader;return new Promise((l,$)=>{s.onload=x=>{l(x)},s.onerror=x=>$(x),s.readAsDataURL(r)})}unparse(r,s){return $e.unparse(r,s)}parse(r){return new Promise((s,l)=>{$e.parse(r,{header:!0,complete:$=>s($),error:$=>l($)})})}getFileExtension(r){let s="-";return/[.]/.exec(r)&&(s=`.${/[^.]+$/.exec(r)?.[0]}`),s}save(r,s,l){const $=new Blob([r],{type:l});ce($,s)}}class et{set(r,s){localStorage.setItem(r,JSON.stringify(s))}get(r){let s=null;const l=localStorage.getItem(r);return l&&(s=JSON.parse(l)),s}remove(r){let s=!!this.get(r);return s&&localStorage.removeItem(r),s}removeAll(){localStorage.clear()}getKeysBy(r){return Object.keys(localStorage).filter(s=>s.startsWith(r))}}var be=(i=>(i.log="log",i.info="info",i.warn="warn",i.debug="debug",i.error="error",i))(be||{});class tt{logType=be;log(...r){this._doLog(this.logType.log,r.join(" "))}info(...r){this._doLog(this.logType.info,r.join(" "))}warn(...r){this._doLog(this.logType.warn,r.join(" "))}debug(...r){this._doLog(this.logType.debug,r.join(" "))}error(...r){this._doLog(this.logType.error,r.join(" "))}_doLog(r,...s){console[r].apply(console,s)}}class rt{constructor(r){this.localService=r}get(r){return this.localService.get(r)}set(r,s){this.localService.set(r,s)}remove(r){this.localService.remove(r)}}N.BrowserService=Qe,N.ClipboardService=Ve,N.EnumHelper=je,N.FileService=Xe,N.LocalService=et,N.LogType=be,N.LoggerService=tt,N.TokenService=rt,N.saveAs=ce,N.sortHelper=Oe,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/browser.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,MAAM,WAAW,iBAAiB;IACjC,UAAU,EAAE,IAAI,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACpB"}
|
package/interfaces/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
firefox = "firefox",
|
|
5
|
-
safari = "safari",
|
|
6
|
-
ie = "ie",
|
|
7
|
-
edge = "edge",
|
|
8
|
-
edg = "edg",
|
|
9
|
-
electron = "electron",
|
|
10
|
-
chrome = "chrome",
|
|
11
|
-
iOsSafari = "iOsSafari",
|
|
12
|
-
edgiOs = "edgiOs",
|
|
13
|
-
headlessChrome = "headlessChrome"
|
|
14
|
-
}
|
|
15
|
-
export interface IScreenBreakpoint {
|
|
16
|
-
breakpoint: Size;
|
|
17
|
-
screenWidth: number;
|
|
18
|
-
}
|
|
19
|
-
export declare const ScreenBreakpoints: IScreenBreakpoint[];
|
|
1
|
+
import { BrowserType } from '../enums/browsertype.enum';
|
|
2
|
+
import { IScreenBreakpoint } from '../interfaces/browser.interface';
|
|
3
|
+
import { Size } from '../types/size.type';
|
|
20
4
|
export type ResizeCallback = (breakpoint: IScreenBreakpoint) => void;
|
|
21
5
|
export type OnResizeCallback = (width: number, breakpoint: IScreenBreakpoint) => void;
|
|
22
6
|
export declare class BrowserService {
|
|
@@ -39,10 +23,10 @@ export declare class BrowserService {
|
|
|
39
23
|
onResizeChange(callback: OnResizeCallback): void;
|
|
40
24
|
offResizeChange(callback: OnResizeCallback): void;
|
|
41
25
|
getCurrentBrowser(): BrowserType;
|
|
42
|
-
|
|
26
|
+
getBreakpointByScreenWidth(width?: number): IScreenBreakpoint;
|
|
43
27
|
isScreenGreaterThan(size: Size): boolean;
|
|
44
28
|
isScreenSmallerThan(size: Size): boolean;
|
|
45
|
-
getBreakpoint(size: Size): IScreenBreakpoint
|
|
29
|
+
getBreakpoint(size: Size): IScreenBreakpoint;
|
|
46
30
|
private isOpera;
|
|
47
31
|
private isFirefox;
|
|
48
32
|
private isSafari;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/browser.service.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"browser.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/browser.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAY1C,MAAM,MAAM,cAAc,GAAG,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;AACrE,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;AAEtF,qBAAa,cAAc;IAC1B,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,yBAAyB,CAAkC;IACnE,OAAO,CAAC,iBAAiB,CAAoC;IAC7D,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,iBAAiB,CAAC,CAAoB;IAC9C,OAAO,CAAC,oBAAoB,CAAM;;IAY3B,OAAO,IAAI,IAAI;IAYf,oBAAoB,IAAI,iBAAiB,GAAG,SAAS;IAIrD,qBAAqB,IAAI,MAAM;IAI/B,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAIlD,mBAAmB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAInD,cAAc,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAIhD,eAAe,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAIjD,iBAAiB,IAAI,WAAW;IAkBhC,0BAA0B,CAAC,KAAK,GAAE,MAAyB,GAAG,iBAAiB;IAU/E,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAIxC,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAIxC,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,iBAAiB;IAOnD,OAAO,CAAC,OAAO;IAOf,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,QAAQ;IAUhB,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,QAAQ;IAahB,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,QAAQ,CAwBd;CACF"}
|
package/types/index.d.ts
CHANGED
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAE5B,OAAO,CAAC,MAAM,CAAC;IAEd,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC;IAChC,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACnC,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;IACxC,MAAM,CAAC,MAAM,cAAc,EAAE,OAAO,CAAC;CACrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size.type.d.ts","sourceRoot":"","sources":["../../../src/lib/types/size.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC"}
|