Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-utl

Package Overview
Dependencies
Maintainers
1
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-utl - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

src/bitwise.js

2

dist/js-utl.min.js

@@ -1,1 +0,1 @@

!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("JSUtl",[],t):"object"==typeof exports?exports.JSUtl=t():n.JSUtl=t()}(this,(function(){return function(n){var t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var o in n)e.d(r,o,function(t){return n[t]}.bind(null,o));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s=0)}([function(n,t,e){"use strict";e.r(t);const r={uniqueIdPrefix:"",elementUniqueIdPrefix:"",checkNetworkURI:null};function o(n){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!1;return!0}const i=Object.prototype.toString.call({}),u=function(n){return i===Object.prototype.toString.call(n)};function c(n){return!n||0===n.length}function l(n){return!n||"0"===n||0===n.length}let f=0;function s(){return f++,r.uniqueIdPrefix+f}function d(n,t){if(n.length!=t.length)return!1;const e=Object.prototype.toString,r=e.call({}),o=e.call([]);for(let i=0;i<n.length;i++){if(!(i in t))return!1;if(r===e.call(n[i])){if(r!==e.call(t[i])||!a(n[i],t[i]))return!1}else if(o===e.call(n[i])){if(o!==e.call(t[i])||!d(n[i],t[i]))return!1}else if(n[i]!==t[i])return!1}return!0}function a(n,t){const e=Object.prototype.toString,r=e.call({}),o=e.call([]);for(const i in n){if(!(i in t))return!1;if(r===e.call(n[i])){if(r!==e.call(t[i])||!a(n[i],t[i]))return!1}else if(o===e.call(n[i])){if(o!==e.call(t[i])||!d(n[i],t[i]))return!1}else if(n[i]!==t[i])return!1}return!0}function p(n,t,e){let r=n=n||(e?[]:{});for(let n=0;n<t.length;n++){const e=t[n],o=Object.keys(e)[0],i=e[o];r[o]=r[o]||i,r=r[o]}return r}function h(n,t){let e=n.length;for(;e;)n[e]=n[e-1],e--;n[0]=t}function g(n){return JSON.parse(JSON.stringify(n))}function m(n){return new Object(n)===n}function y(n){return new Object(n)!==n}function b(n){const t=[];let e=!1;return function n(r){if(e)return;if("object"!=typeof r)return;const o=t.indexOf(r);if(-1===o){t.push(r);for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&n(r[t]);t.splice(o,1)}else e=!0}(n),e}function O(n){return Object.prototype.toString.call(n)}function w(n){const t=new n.constructor;for(const e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;const r=n[e];if(y(r))t[e]=r;else{if(!m(r))throw new Error("Oops! Unknown type for property '"+e+"' ("+O(r)+") in object ("+O(n)+")");if(b(r))throw new Error("Circular reference detected inside of property '"+e+"' ("+O(r)+") in object ("+O(n)+")");{const n=w(r);t[e]=n}}}return t}function A(n,t){const e=Object.prototype.toString,r=e.call({});for(const o in t)t[o]&&r===e.call(t[o])?(n[o]=n[o]||{},A(n[o],t[o])):n[o]=t[o]}function S(...n){const t=n[0];let e;const r=Object.prototype.toString,o=r.call({});for(let i=1;n[i];i++){e=n[i];for(const n in e)e[n]&&o===r.call(e[n])?(t[n]=t[n]||{},A(t[n],w(e[n]))):t[n]=e[n]}}function j(n){return n.slice(0)}function T(n,t,e){const r=[];let o=!1;for(const i of n)if(o||i!=t){if(o&&i==e){r.push(i);break}o&&r.push(i)}else r.push(i),o=!0;return r}function F(n,t){for(const e of n)if(e==t)return!0;return!1}function I(n){return Object.prototype.toString.call(n)===Object.prototype.toString.call([])}function P(n){return!n.some(isNaN)}function N(n,t){let e=n;for(let n=0;n<t.length;n++){e=e[t[n]]}return e}function C(n,t){if(!t.length)return!1;let e=n;for(let n=0;n<t.length;n++){const r=t[n];if(!e[r])return!1;e=e[r]}return!0}function M(n,t,e){if(!t.length)return;let r=n,o=null;for(let n=0;n<t.length;n++){const e=t[n];"object"!=typeof r[e]&&(r[e]={}),o=r,r=r[e]}o&&(o[t[t.length-1]]=e)}function v(n){return Array.prototype.slice.call(n)}function E(n){return void 0===n}function x(n){return n[n.length-1]}function k(n){return n[0]}function R(n){return Number.isInteger(n)}function H(n){return Boolean(n.match(/^[0-9]+$/))}function L(n){return Number.isInteger(n)||H(n)}function D(n,t){return n.findIndex(n=>n==t)}function B(n){let t;for(t in n)break;return n[t]}function U(n){return!0===n}function _(n,t){let e=n.length,r=void 0;for(;e;)if(e--,t(n[e])){r=n[e];break}return r}function J(n){return Boolean(n)}function W(n){try{JSON.parse(n)}catch(n){return!1}return!0}function q(){}const V=Object.prototype.hasOwnProperty;function X(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function $(n,t,e){return V.call(t,e)&&X(n[e],t[e])}function z(n,t){if(X(n,t))return!0;if("object"!=typeof n||null===n||"object"!=typeof t||null===t)return!1;const e=Object.keys(n),r=Object.keys(t);if(e.length!==r.length)return!1;for(let r=0;r<e.length;r++){if(!$(n,t,e[r]))return!1}return!0}function Y(n,t){return z(Object.keys(t).reduce((t,e)=>(t[e]=n[e],t),{}),t)}function Q(n,t){const e={objA:{},objB:{}};if(z(n,t))return e;const r=Object.keys(n),o=Object.keys(t);for(let o=0;o<r.length;o++){const i=r[o];$(n,t,i)||(e.objA[i]=n[i],V.call(t,i)&&(e.objB[i]=t[i]))}for(let r=0;r<o.length;r++){const i=o[r];$(t,n,i)||(e.objB[i]=t[i],V.call(n,i)&&(e.objA[i]=n[i]))}return e}const G=(n,t)=>{let e=n,r=0;for(;(e instanceof Map||e instanceof WeakMap)&&e.has(t[r]);)e=e.get(t[r]),r++;return r==t.length},Z=(n,t,e)=>{let r=0,o=n;for(;r<t.length-1;){const n=t[r],e=o.get(n);if(e instanceof Map||e instanceof WeakMap)o=e;else{const t=new Map;o.set(n,t),o=t}r++}o.set(t[r],e)};function*K(n,t,e){n.map();const r=t.bind(e);for(let t=0;t<n.length;t++)yield r(n[t],t,n)}function nn(n){return""+n}const tn={},en={},rn=(n,{arity:t,onEffectiveArgAdded:e,onPlaceholder:r,onFnCall:o,onCurriedFnFirstCall:i,onNewCurriedFn:u}={})=>{let c=!0;const l=void 0!==t?t:n.length,f=(t,o,u,...l)=>(function f(...d){let a=t,p=o,h=!1;c&&(i&&i({addedArgs:d,fn:n,curriedFn:f}),1)&&(c=!1);let g=u.length;for(const t of d){!h&&(l=[...l]),h=!0;const o=t===tn;if(g>0&&!o){e&&e({addedArg:t,args:l,fn:n,curriedFn:f});const[r,...o]=u;l[r]=t,u=o,g--,a--}else o?(u=u.concat(p),r&&r({args:l,fn:n,curriedFn:f})):(a--,e&&e({addedArg:t,args:l,fn:n,curriedFn:f})),l[p]=t,p++}return s.call(null,f,a,p,u,...l)}),s=(t,e,r,i,...c)=>{if(e<=0){if(o){const e=o({args:c,fn:n,curriedFn:t});return e===en?n(...c):e}return n(...c)}{const n=f(e,r,i,...c);return u&&u({curriedFn:t,newCurriedFn:n}),n}},d=f(l,0,[]);return u&&u({curriedFn:d,newCurriedFn:d}),d},on=(n,{plugPropertyName:t="plugCurried",plugPropertyMustBeTruthy:e=!1,onPOJOArgMerged:r,onFnCall:i,onCurriedFnFirstCall:u,onNewCurriedFn:c}={})=>{let l=!0;const f=s=>(function d(a){l&&(u&&u({POJOArg:a,fn:n,curriedFn:d}),1)&&(l=!1);let p=Object.assign({},s,a||{});if(!Object.prototype.hasOwnProperty.call(p,t)||e&&!p[t]){r&&r({POJOArg:a,POJO:p,fn:n,curriedFn:d});const t=f(p);return c&&c({curriedFn:d,newCurriedFn:t}),t}{const{[t]:e,...u}=a,{[t]:c,...l}=p;p=l,o(u)||r&&r({POJOArg:u,POJO:p,fn:n,curriedFn:d});let f=!0,s=void 0;return i&&(s=i({POJO:p,fn:n,curriedFn:d}),f=s===en),f?n(p):s}}),s=f({});return c&&c({curriedFn:s,newCurriedFn:s}),s},un=(...n)=>(...t)=>{let e=t,r=void 0;for(let t=n.length-1;t>=0;t--){r=(0,n[t])(...e),e=[r]}return r},cn=(...n)=>(...t)=>n.length?n.reduce((n,t)=>[t(...n)],t)[0]:void 0,ln=(...n)=>t=>n.reduce((n,e)=>({...n,[e]:t[e]}),{}),fn=n=>t=>e=>(...r)=>n(t(...r),e(...r)),sn=n=>(...t)=>n.map(n=>n(...t)),dn=(n,t)=>(...e)=>n(...t.map(n=>n(...e)));function an(n){let t=0;for(let e=0;e<n.length;e++){let r=0;for(let t=0;t<n[e].length;t++)r=251*r^n[e].charCodeAt(t);t^=r}return t}const pn=n=>{let t,e,r=0;if(0===n.length)return r;for(t=0;t<n.length;t++)e=n.charCodeAt(t),r=(r<<5)-r+e,r|=0;return r};function hn(n,t=0){let e=t,r=0;for(let t=0;t<n.length;t++)r=251*r^n.charCodeAt(t);return e^=r,e}function gn(n,t){return new Promise(e=>setTimeout(e,n,t))}function mn(n,t){return Promise.all([n,gn(t)]).then(([n])=>n).catch(n=>{throw n})}function yn({promise:n,maxDelayMs:t,onFallback:e=(()=>{}),fallbackMinDelayMs:r}={}){const o=s();return Promise.race([n,gn(t).then(()=>o)]).then(t=>t===o?(e(),mn(n,r)):t)}const bn=(n,t,e)=>void 0!==e?n.then(t,e):n.then(t),On=(...n)=>t=>n.reduce((n,t)=>{let e;return e=I(t)?bn(n,t[0],t[1]):bn(n,t),e},Promise.resolve(t));function wn(n,t,e,r){if(!t||"object"!=typeof t||t instanceof Date||t instanceof File){const o=null==t?"":e?encodeURIComponent(t):t;n instanceof FormData?n.append(r,o):n[r]=o}else Object.keys(t).forEach(o=>{wn(n,t[o],e,r?`${r}[${o}]`:e?encodeURIComponent(o):o)})}function An(n){const t={};wn(t,n,!0);const e=[];for(const n in t)e.push(n+"="+t[n]);return e.join("&")}function Sn(n){const t=new FormData;return wn(t,n),t}const jn=()=>window.ActiveXObject&&new window.ActiveXObject("Microsoft.XMLHTTP")||new XMLHttpRequest;function Tn(n=null){const t=jn();return new Promise(e=>{try{t.onreadystatechange=()=>{4==t.readyState&&e(t.status>=200&&(t.status<300||304===t.status))},t.open("HEAD",(n||r.checkNetworkURI||"//"+window.location.hostname+(80!=window.location.port?":"+window.location.port:""))+"?rand="+Math.floor(65536*(1+Math.random())),!0),t.send()}catch(n){e(!1)}})}function Fn(n=3e3){return new Promise(t=>{Tn().then(e=>{if(e)t();else{const e=setInterval(()=>{Tn().then(n=>{n&&(clearInterval(e),t())})},n)}})})}function In(n,t,e){let r="";if(e){const n=new Date;n.setTime(n.getTime()+24*e*60*60*1e3),r="expires="+n.toUTCString()+";"}document.cookie=n+"="+t+";"+r+"path=/"}function Pn(n){const t=n+"=",e=document.cookie.split(";");for(let n=0;n<e.length;n++){let r=e[n];for(;" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return r.substring(t.length,r.length)}}function Nn(n){In(n,"",-365)}function Cn(n){const t=n.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function Mn(n,t,e=1){const r=n.getBoundingClientRect(),o=t.getBoundingClientRect(),{top:i,bottom:u,height:c}=r,l=()=>"function"==typeof e?e(r,o):e;let f;return i<=o.top?o.top-i+l()<=c:(f=u-o.bottom)<0||(o.bottom>=i&&e?o.bottom-i>=l():f<=c)}function vn(n){return n.scrollHeight>n.clientHeight}function En(n){return n.scrollWidth>n.clientWidth}function xn(){const n=s();return r.elementUniqueIdPrefix+n}function kn(n){return window.getComputedStyle(n)}function Rn(n){const t=kn(n);let e=n.clientHeight,r=n.clientWidth;return e-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),r-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),{width:r,height:e}}let Hn;function Ln(n){null==Hn&&(Hn=document.createElement("textarea"),Hn.style.border="none",Hn.style.height="0",Hn.style.overflow="hidden",Hn.style.padding="0",Hn.style.position="absolute",Hn.style.left="0",Hn.style.top="0",Hn.style.zIndex="-1",document.body.appendChild(Hn));const t=window.getComputedStyle(n),e=parseInt(t.paddingLeft),r=parseInt(t.paddingRight);let o=parseInt(t.lineHeight);isNaN(o)&&(o=parseInt(t.fontSize)),Hn.style.width=n.clientWidth-e-r+"px",Hn.style.font=t.font,Hn.style.letterSpacing=t.letterSpacing,Hn.style.whiteSpace=t.whiteSpace,Hn.style.wordBreak=t.wordBreak,Hn.style.wordSpacing=t.wordSpacing,Hn.style.wordWrap=t.wordWrap,Hn.value=n.value;let i=Math.floor(Hn.scrollHeight/o);return 0==i&&(i=1),i}function Dn(n){return n.scrollTop+n.offsetHeight>=n.scrollHeight}function Bn(){const n=document.createElement("div");n.className="vertical-scrollbar-measure";const t=document.createElement("style");t.innerHTML="div.vertical-scrollbar-measure { width: 100px; height: 100px; overflow: scroll; position: absolute; top: -9999px; }",document.body.appendChild(t),document.body.appendChild(n);const e=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),t.parentNode.removeChild(t),e}function Un(n){return n.offsetWidth<n.scrollWidth}function _n(n,t,e){navigator.clipboard?navigator.clipboard.writeText(n).then((function(){t&&t()}),(function(n){e&&e(n)})):function(n,t,e){const r=document.documentElement.scrollTop||document.body.scrollTop,o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.focus(),o.select();try{document.execCommand("copy")?t&&t():e&&e()}catch(n){e&&e(n)}document.body.removeChild(o)&&document.documentElement.scrollTop&&(document.documentElement.scrollTop=r)||(document.body.scrollTop=r)}(n,t,e)}const Jn=(n,t)=>n&&window.requestAnimationFrame(()=>(t(),Jn(--n,t))),Wn=(n,t)=>{let e=n||1;const r=()=>{e--,e?window.requestAnimationFrame(r):t()};return window.requestAnimationFrame(r)};function qn(n){return(n||window.location.hash).replace(/^#/,"")}function Vn(n){return decodeURIComponent(qn(n))}function Xn(n,t){return n+"#"+encodeURIComponent(JSON.stringify(t))}function $n(n=null){const t=window.location.hash;if(!c(t)){const n=Vn(t);if(W(n))return JSON.parse(n)}return n}function zn(){const n={};return function(n,t){let e,r,o,i,c,l,f,s,d,a,p,h,g;n||(n=window.location.search.substr(1));const m=String(n).replace(/^&/,"").replace(/&$/,"").split("&"),y=m.length,b=function(n){return decodeURIComponent(n.replace(/\+/g,"%20"))};for(t||(t={}),e=0;e<y;e++){for(s=m[e].split("="),d=b(s[0]),a=s.length<2?"":b(s[1]);" "===d.charAt(0);)d=d.slice(1);if(d.indexOf("\0")>-1&&(d=d.slice(0,d.indexOf("\0"))),d&&"["!==d.charAt(0)){for(h=[],p=0,r=0;r<d.length;r++)if("["!==d.charAt(r)||p){if("]"===d.charAt(r)&&p&&(h.length||h.push(d.slice(0,p-1)),h.push(d.substr(p,r-p)),p=0,"["!==d.charAt(r+1)))break}else p=r+1;for(h.length||(h=[d]),r=0;r<h[0].length&&(f=h[0].charAt(r)," "!==f&&"."!==f&&"["!==f||(h[0]=h[0].substr(0,r)+"_"+h[0].substr(r+1)),"["!==f);r++);for(l=t,r=0,g=h.length;r<g;r++)if(d=h[r].replace(/^['"]/,"").replace(/['"]$/,""),c=l,""!==d&&" "!==d||0===r)void 0===l[d]&&(l[d]={}),l=l[d];else{for(i in o=-1,l)Object.prototype.hasOwnProperty.call(l,i)&&+i>o&&i.match(/^\d+$/g)&&(o=+i);d=o+1}c[d]=a}}const O=function(n){const t=Object.keys(n),e={};for(let n=0;n<t.length;n++)e[n]=!0;const r=[];for(let o=0;o<t.length;o++){const i=t[o]+"";if(!i.match(/^[0-9]+$/))return n;const u=Number(i);if(!e[u])return n;r[u]=n[i],delete e[u]}return 0===Object.keys(e).length?r:n};(function n(t){for(const e in t)u(t[e])&&(t[e]=O(t[e]),n(t[e]))})(t)}(location.search.substring(1),n),n}const Yn=function(n){let t,e;void 0!==window.pageXOffset?(t=window.pageXOffset,e=window.pageYOffset):void 0!==window.scrollX?(t=window.scrollX,e=window.scrollY):document.documentElement&&void 0!==document.documentElement.scrollLeft?(t=document.documentElement.scrollLeft,e=document.documentElement.scrollTop):(t=document.body.scrollLeft,e=document.body.scrollTop),n.focus(),void 0!==t&&window.scrollTo(t,e)};function Qn(n){let t="";const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=e.length;for(let o=0;o<n;o++)t+=e.charAt(Math.floor(Math.random()*r));return t}function Gn(n=0,t=Number.MAX_SAFE_INTEGER){return n=Math.ceil(n),t=Math.floor(t),Math.floor(Math.random()*(t-n+1))+n}function Zn(n){let t=Math.random();for(;n==t;)t=Math.random();return t}function Kn(){const n=new Date;return Math.round(n.getTime()/1e3)}function nt(n){const t=new Date(n||(new Date).getTime());return new Date(t.getTime()-6e4*t.getTimezoneOffset()).toISOString().slice(11,-1)}function tt(n){return.001*n}function et(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function rt(n,t,e={}){void 0===t&&(t=" ");const r=et(t),o=void 0===e.shouldTrimLeft||e.shouldTrimLeft,i=void 0===e.shouldTrimRight||e.shouldTrimRight,u=[];o&&(u[u.length]="^["+r+"]+"),i&&(u[u.length]="["+r+"]+$");const c=new RegExp(u.join("|"),"gm");return n.replace(c,"")}function ot(n,t,e){void 0===t&&(t=["\\s"]),e=e||"";const r=new RegExp("(^("+t.join("|")+")+)|(("+t.join("|")+")+$)","g"+e);return n.replace(r,"")}function it(n,t){return rt(n,t)}function ut(n,t){return rt(n,t,{shouldTrimLeft:!0,shouldTrimRight:!1})}function ct(n,t){return rt(n,t,{shouldTrimLeft:!1,shouldTrimRight:!0})}function lt(n,t,e){const r=[];for(const t of n)I(t)?r[r.length]=it(t.join(e),e):r[r.length]=t;return it(r.join(t),t)}function ft({arrayOfObjects:n,concatObjectProps:t,valueProp:e="id",outerSeparator:r=" ",innerSeparator:o=" "}){const i=[];for(const u of n){const n=[];for(const e of t)I(e)?n[n.length]=e.map(n=>u[n]):n[n.length]=u[e];i[i.length]={value:u[e],label:lt(n,r,o)}}return i}function st(n,t){const e=256,r=256;function o(n){const t=Math.sin(n*Math.PI/180),e=Math.log((1+t)/(1-t))/2;return Math.max(Math.min(e,Math.PI),-Math.PI)/2}function i(n,t,e){return Math.floor(Math.log(n/t/e)/Math.LN2)}const u=n.getNorthEast(),c=n.getSouthWest(),l=(o(u.lat())-o(c.lat()))/Math.PI,f=u.lng()-c.lng(),s=(f<0?f+360:f)/360,d=i(t.height,e,l),a=i(t.width,r,s);return Math.min(d,a,21)}const dt=function(){let n=0;return function(t,e){clearTimeout(n),n=setTimeout((function(){t()}),e)}}();function at(n,t){let e=void 0;return function(...r){!E(e)&&clearTimeout(e),e=setTimeout((function(){n(...r)}),t)}}function pt(n,t){let e=Date.now();return function(...r){e+t-Date.now()<0&&(n(...r),e=Date.now())}}function ht(n){return n.split(/[\\/]/).pop()}function gt(n,t){let e="",r="",o="",i=0;const u={};let c=0,l=0,f=!1,s=!1,d=!1;if(!n)return!1;t||(t="PATHINFO_ALL");const a={PATHINFO_DIRNAME:1,PATHINFO_BASENAME:2,PATHINFO_EXTENSION:4,PATHINFO_FILENAME:8,PATHINFO_ALL:0};for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(a.PATHINFO_ALL=a.PATHINFO_ALL|a[o]);if("number"!=typeof t){for(t=[].concat(t),l=0;l<t.length;l++)a[t[l]]&&(i|=a[t[l]]);t=i}const p=function(n){const t=n+"",e=t.lastIndexOf(".")+1;return!!e&&(e!==t.length?t.substr(e):"")};if(t&a.PATHINFO_DIRNAME){const t=n.replace(/\\/g,"/").replace(/\/[^/]*\/?$/,"");u.dirname=t===n?".":t}for(e in t&a.PATHINFO_BASENAME&&(!1===f&&(f=ht(n)),u.basename=f),t&a.PATHINFO_EXTENSION&&(!1===f&&(f=ht(n)),!1===s&&(s=p(f)),!1!==s&&(u.extension=s)),t&a.PATHINFO_FILENAME&&(!1===f&&(f=ht(n)),!1===s&&(s=p(f)),!1===d&&(d=f.slice(0,f.length-(s?s.length+1:!1===s?0:1))),u.filename=d),c=0,u)Object.prototype.hasOwnProperty.call(u,e)&&(c++,r=e);return 1===c?u[r]:u}function mt(n){const t=gt(n,"PATHINFO_EXTENSION");return"string"!=typeof t?"":t}function yt(n){return n.replace(/\\/g,"/").replace(/\/[^/]*\/?$/,"")}const bt=n=>parseInt(n,2),Ot=n=>n.toString(2),wt=(n,t)=>n&~(1<<t-1),At=(n,t)=>n|1<<t-1,St=(n,t)=>n^1<<t-1,jt=(n,t)=>n&1<<t-1;function Tt(n){const t=parseInt(n,16);return.299*((16711680&t)>>16)+.587*((65280&t)>>8)+.114*(255&t)}const Ft=function*(n,t,e=!0){const r=n.length;yield*function*n(t,r,o,i,u=0){if(o.length===i)yield e?v(o):o;else for(let e=u;e<r&&i-o.length<=r-e;e++)o.push(t[e]),yield*n(t,r,o,i,e+1),o.pop()}(n,r,[],t)},It=n=>{const t=n.length;if(0===t)return[];const e=v(n);if(1===t)return[e];const r=[];if(n.map(n=>r.push([n])),t>2)for(let e=2;e<t;e++)for(const t of Ft(n,e))r.push(t);return r.push(e),r},Pt=function*(n,t=!0){const e=n.length;if(0===e)return;const r=t?v(n):n;if(1!==e){if(yield*K(n,n=>[n]),e>2)for(let r=2;r<e;r++)for(const e of Ft(n,r,t))yield e;yield r}else yield r},Nt=function*(n){const t=n.length;for(let e=0;e<=t;e++)for(const t of Ft(n,e))yield t},Ct=function*(n){const t=new Map;yield[];for(const e of Nt(n))G(t,e)||(Z(t,e,!0),yield e)};e.d(t,"config",(function(){return r})),e.d(t,"isObjectEmpty",(function(){return o})),e.d(t,"isObject",(function(){return u})),e.d(t,"isEmpty",(function(){return c})),e.d(t,"isEmptyOr0",(function(){return l})),e.d(t,"uniqueId",(function(){return s})),e.d(t,"deepArrayCompare",(function(){return d})),e.d(t,"deepObjectCompare",(function(){return a})),e.d(t,"nestedObjectConstructValue",(function(){return p})),e.d(t,"unshiftArray",(function(){return h})),e.d(t,"cloneDeeplyJSON",(function(){return g})),e.d(t,"isReferenceType",(function(){return m})),e.d(t,"isPrimitiveType",(function(){return y})),e.d(t,"hasCyclicReference",(function(){return b})),e.d(t,"typeToStr",(function(){return O})),e.d(t,"cloneObjDeeply",(function(){return w})),e.d(t,"deepObjectExtend",(function(){return A})),e.d(t,"deepObjectCloningExtend",(function(){return S})),e.d(t,"cloneArray",(function(){return j})),e.d(t,"arraySliceFromValueToValue",(function(){return T})),e.d(t,"includesTypeCoercion",(function(){return F})),e.d(t,"isArray",(function(){return I})),e.d(t,"areArrayItemsAllCoercibleToNumber",(function(){return P})),e.d(t,"nestedPropertyValue",(function(){return N})),e.d(t,"hasNestedPropertyValue",(function(){return C})),e.d(t,"setNestedPropertyValue",(function(){return M})),e.d(t,"arrayOrArrayLike",(function(){return v})),e.d(t,"isUndefined",(function(){return E})),e.d(t,"lastOfArray",(function(){return x})),e.d(t,"firstOfArray",(function(){return k})),e.d(t,"isInt",(function(){return R})),e.d(t,"ctypeDigit",(function(){return H})),e.d(t,"isIntegerOrIntegerStr",(function(){return L})),e.d(t,"findIndex",(function(){return D})),e.d(t,"firstPropValue",(function(){return B})),e.d(t,"isStrictlyTrue",(function(){return U})),e.d(t,"arrayFindReverse",(function(){return _})),e.d(t,"isTruthy",(function(){return J})),e.d(t,"isJSONString",(function(){return W})),e.d(t,"noOpFn",(function(){return q})),e.d(t,"is",(function(){return X})),e.d(t,"shallowEqual",(function(){return z})),e.d(t,"partialShallowEqual",(function(){return Y})),e.d(t,"shallowObjectDiff",(function(){return Q})),e.d(t,"nestedMapHas",(function(){return G})),e.d(t,"nestedMapSet",(function(){return Z})),e.d(t,"mapYield",(function(){return K})),e.d(t,"str",(function(){return nn})),e.d(t,"_",(function(){return tn})),e.d(t,"proceedCallingFn",(function(){return en})),e.d(t,"curry",(function(){return rn})),e.d(t,"POJOCurry",(function(){return on})),e.d(t,"compose",(function(){return un})),e.d(t,"pipe",(function(){return cn})),e.d(t,"pick",(function(){return ln})),e.d(t,"liftBinaryFn",(function(){return fn})),e.d(t,"juxt",(function(){return sn})),e.d(t,"converge",(function(){return dn})),e.d(t,"stringHashArray",(function(){return an})),e.d(t,"hashString",(function(){return pn})),e.d(t,"onePassStringHash",(function(){return hn})),e.d(t,"timeout",(function(){return gn})),e.d(t,"minDelayPromise",(function(){return mn})),e.d(t,"maxDelayFallbackPromise",(function(){return yn})),e.d(t,"applyAsync",(function(){return bn})),e.d(t,"composeAsync",(function(){return On})),e.d(t,"buildQueryString",(function(){return An})),e.d(t,"formData",(function(){return Sn})),e.d(t,"xhr",(function(){return jn})),e.d(t,"checkNetwork",(function(){return Tn})),e.d(t,"waitNetwork",(function(){return Fn})),e.d(t,"setCookie",(function(){return In})),e.d(t,"getCookie",(function(){return Pn})),e.d(t,"unsetCookie",(function(){return Nn})),e.d(t,"isInViewport",(function(){return Cn})),e.d(t,"isScrolledIntoView",(function(){return Mn})),e.d(t,"hasVerticalScrollbar",(function(){return vn})),e.d(t,"hasHorizontalScrollbar",(function(){return En})),e.d(t,"elementUniqueId",(function(){return xn})),e.d(t,"getElementComputedStyle",(function(){return kn})),e.d(t,"elementInnerDimensions",(function(){return Rn})),e.d(t,"countTextareaLines",(function(){return Ln})),e.d(t,"isScrollOnBottom",(function(){return Dn})),e.d(t,"getVerticalScrollBarWidth",(function(){return Bn})),e.d(t,"isEllipsisActive",(function(){return Un})),e.d(t,"copyTextToClipboard",(function(){return _n})),e.d(t,"rAFLooper",(function(){return Jn})),e.d(t,"nestedRAF",(function(){return Wn})),e.d(t,"getRawURIFragment",(function(){return qn})),e.d(t,"getDecodedURIFragment",(function(){return Vn})),e.d(t,"appendEncodedJSONFragmentToURI",(function(){return Xn})),e.d(t,"getDecodedJSONFromFragmentURI",(function(){return $n})),e.d(t,"getQueryStringArgsMultiDim",(function(){return zn})),e.d(t,"cursorFocus",(function(){return Yn})),e.d(t,"randomInt",(function(){return Gn})),e.d(t,"randomStr",(function(){return Qn})),e.d(t,"randomDifferentFromValue",(function(){return Zn})),e.d(t,"time",(function(){return Kn})),e.d(t,"msToTime",(function(){return nt})),e.d(t,"millisecToSec",(function(){return tt})),e.d(t,"escapeRegExp",(function(){return et})),e.d(t,"trimCharacterMask",(function(){return rt})),e.d(t,"trimCharacterRegex",(function(){return ot})),e.d(t,"trim",(function(){return it})),e.d(t,"trimLeft",(function(){return ut})),e.d(t,"trimRight",(function(){return ct})),e.d(t,"concatWithInnerOuterSeparators",(function(){return lt})),e.d(t,"optionsValueLabel",(function(){return ft})),e.d(t,"googleMapBestZoomLevelFromBounds",(function(){return st})),e.d(t,"delay",(function(){return dt})),e.d(t,"debounce",(function(){return at})),e.d(t,"throttle",(function(){return pt})),e.d(t,"basename",(function(){return ht})),e.d(t,"pathinfo",(function(){return gt})),e.d(t,"filenameExtension",(function(){return mt})),e.d(t,"dirname",(function(){return yt})),e.d(t,"b2d",(function(){return bt})),e.d(t,"d2b",(function(){return Ot})),e.d(t,"turnNthBitOff",(function(){return wt})),e.d(t,"turnNthBitOn",(function(){return At})),e.d(t,"toggleNthBit",(function(){return St})),e.d(t,"checkNthBitOn",(function(){return jt})),e.d(t,"getLuminance",(function(){return Tt})),e.d(t,"yieldCombinationsWithoutRepetition",(function(){return Ft})),e.d(t,"uniqueProgressiveIncrementalCombinations",(function(){return It})),e.d(t,"yieldUniqueProgressiveIncrementalCombinations",(function(){return Pt})),e.d(t,"yieldAllSubsequences",(function(){return Nt})),e.d(t,"yieldUniqueSubsequences",(function(){return Ct}))}])}));
!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("JSUtl",[],t):"object"==typeof exports?exports.JSUtl=t():n.JSUtl=t()}("undefined"!=typeof self?self:this,(function(){return function(n){var t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var o in n)e.d(r,o,function(t){return n[t]}.bind(null,o));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s=0)}([function(n,t,e){"use strict";e.r(t);const r={uniqueIdPrefix:"",elementUniqueIdPrefix:"",checkNetworkURI:null};function o(n){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!1;return!0}const i=Object.prototype.toString.call({}),u=function(n){return i===Object.prototype.toString.call(n)};function c(n){return!n||0===n.length}function l(n){return!n||"0"===n||0===n.length}let f=0;function s(){return f++,r.uniqueIdPrefix+f}function d(n,t){if(n.length!=t.length)return!1;const e=Object.prototype.toString,r=e.call({}),o=e.call([]);for(let i=0;i<n.length;i++){if(!(i in t))return!1;if(r===e.call(n[i])){if(r!==e.call(t[i])||!a(n[i],t[i]))return!1}else if(o===e.call(n[i])){if(o!==e.call(t[i])||!d(n[i],t[i]))return!1}else if(n[i]!==t[i])return!1}return!0}function a(n,t){const e=Object.prototype.toString,r=e.call({}),o=e.call([]);for(const i in n){if(!(i in t))return!1;if(r===e.call(n[i])){if(r!==e.call(t[i])||!a(n[i],t[i]))return!1}else if(o===e.call(n[i])){if(o!==e.call(t[i])||!d(n[i],t[i]))return!1}else if(n[i]!==t[i])return!1}return!0}function p(n,t,e){let r=n=n||(e?[]:{});for(let n=0;n<t.length;n++){const e=t[n],o=Object.keys(e)[0],i=e[o];r[o]=r[o]||i,r=r[o]}return r}function h(n,t){let e=n.length;for(;e;)n[e]=n[e-1],e--;n[0]=t}function g(n){return JSON.parse(JSON.stringify(n))}function m(n){return new Object(n)===n}function y(n){return new Object(n)!==n}function b(n){const t=[];let e=!1;return function n(r){if(e)return;if("object"!=typeof r)return;const o=t.indexOf(r);if(-1===o){t.push(r);for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&n(r[t]);t.splice(o,1)}else e=!0}(n),e}function O(n){return Object.prototype.toString.call(n)}function w(n){const t=new n.constructor;for(const e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;const r=n[e];if(y(r))t[e]=r;else{if(!m(r))throw new Error("Oops! Unknown type for property '"+e+"' ("+O(r)+") in object ("+O(n)+")");if(b(r))throw new Error("Circular reference detected inside of property '"+e+"' ("+O(r)+") in object ("+O(n)+")");{const n=w(r);t[e]=n}}}return t}function A(n,t){const e=Object.prototype.toString,r=e.call({});for(const o in t)t[o]&&r===e.call(t[o])?(n[o]=n[o]||{},A(n[o],t[o])):n[o]=t[o]}function S(...n){const t=n[0];let e;const r=Object.prototype.toString,o=r.call({});for(let i=1;n[i];i++){e=n[i];for(const n in e)e[n]&&o===r.call(e[n])?(t[n]=t[n]||{},A(t[n],w(e[n]))):t[n]=e[n]}}function j(n){return n.slice(0)}function T(n,t,e){const r=[];let o=!1;for(const i of n)if(o||i!=t){if(o&&i==e){r.push(i);break}o&&r.push(i)}else r.push(i),o=!0;return r}function F(n,t){for(const e of n)if(e==t)return!0;return!1}function I(n){return Object.prototype.toString.call(n)===Object.prototype.toString.call([])}function P(n){return!n.some(isNaN)}function N(n,t){let e=n;for(let n=0;n<t.length;n++){e=e[t[n]]}return e}function C(n,t){if(!t.length)return!1;let e=n;for(let n=0;n<t.length;n++){const r=t[n];if(!e[r])return!1;e=e[r]}return!0}function M(n,t,e){if(!t.length)return;let r=n,o=null;for(let n=0;n<t.length;n++){const e=t[n];"object"!=typeof r[e]&&(r[e]={}),o=r,r=r[e]}o&&(o[t[t.length-1]]=e)}function v(n){return Array.prototype.slice.call(n)}function E(n){return void 0===n}function x(n){return n[n.length-1]}function k(n){return n[0]}function R(n){return Number.isInteger(n)}function H(n){return Boolean(n.match(/^[0-9]+$/))}function L(n){return Number.isInteger(n)||H(n)}function D(n,t){return n.findIndex(n=>n==t)}function B(n){let t;for(t in n)break;return n[t]}function U(n){return!0===n}function _(n,t){let e=n.length,r=void 0;for(;e;)if(e--,t(n[e])){r=n[e];break}return r}function J(n){return Boolean(n)}function W(n){try{JSON.parse(n)}catch(n){return!1}return!0}function q(){}const V=Object.prototype.hasOwnProperty;function X(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function $(n,t,e){return V.call(t,e)&&X(n[e],t[e])}function z(n,t){if(X(n,t))return!0;if("object"!=typeof n||null===n||"object"!=typeof t||null===t)return!1;const e=Object.keys(n),r=Object.keys(t);if(e.length!==r.length)return!1;for(let r=0;r<e.length;r++){if(!$(n,t,e[r]))return!1}return!0}function Y(n,t){return z(Object.keys(t).reduce((t,e)=>(t[e]=n[e],t),{}),t)}function Q(n,t){const e={objA:{},objB:{}};if(z(n,t))return e;const r=Object.keys(n),o=Object.keys(t);for(let o=0;o<r.length;o++){const i=r[o];$(n,t,i)||(e.objA[i]=n[i],V.call(t,i)&&(e.objB[i]=t[i]))}for(let r=0;r<o.length;r++){const i=o[r];$(t,n,i)||(e.objB[i]=t[i],V.call(n,i)&&(e.objA[i]=n[i]))}return e}const G=(n,t)=>{let e=n,r=0;for(;(e instanceof Map||e instanceof WeakMap)&&e.has(t[r]);)e=e.get(t[r]),r++;return r==t.length},Z=(n,t,e)=>{let r=0,o=n;for(;r<t.length-1;){const n=t[r],e=o.get(n);if(e instanceof Map||e instanceof WeakMap)o=e;else{const t=new Map;o.set(n,t),o=t}r++}o.set(t[r],e)};function*K(n,t,e){n.map();const r=t.bind(e);for(let t=0;t<n.length;t++)yield r(n[t],t,n)}function nn(n){return""+n}const tn={},en={},rn=(n,{arity:t,onEffectiveArgAdded:e,onPlaceholder:r,onFnCall:o,onCurriedFnFirstCall:i,onNewCurriedFn:u}={})=>{let c=!0;const l=void 0!==t?t:n.length,f=(t,o,u,...l)=>(function f(...d){let a=t,p=o,h=!1;c&&(i&&i({addedArgs:d,fn:n,curriedFn:f}),1)&&(c=!1);let g=u.length;for(const t of d){!h&&(l=[...l]),h=!0;const o=t===tn;if(g>0&&!o){e&&e({addedArg:t,args:l,fn:n,curriedFn:f});const[r,...o]=u;l[r]=t,u=o,g--,a--}else o?(u=u.concat(p),r&&r({args:l,fn:n,curriedFn:f})):(a--,e&&e({addedArg:t,args:l,fn:n,curriedFn:f})),l[p]=t,p++}return s.call(null,f,a,p,u,...l)}),s=(t,e,r,i,...c)=>{if(e<=0){if(o){const e=o({args:c,fn:n,curriedFn:t});return e===en?n(...c):e}return n(...c)}{const n=f(e,r,i,...c);return u&&u({curriedFn:t,newCurriedFn:n}),n}},d=f(l,0,[]);return u&&u({curriedFn:d,newCurriedFn:d}),d},on=(n,{plugPropertyName:t="plugCurried",plugPropertyMustBeTruthy:e=!1,onPOJOArgMerged:r,onFnCall:i,onCurriedFnFirstCall:u,onNewCurriedFn:c}={})=>{let l=!0;const f=s=>(function d(a){l&&(u&&u({POJOArg:a,fn:n,curriedFn:d}),1)&&(l=!1);let p=Object.assign({},s,a||{});if(!Object.prototype.hasOwnProperty.call(p,t)||e&&!p[t]){r&&r({POJOArg:a,POJO:p,fn:n,curriedFn:d});const t=f(p);return c&&c({curriedFn:d,newCurriedFn:t}),t}{const{[t]:e,...u}=a,{[t]:c,...l}=p;p=l,o(u)||r&&r({POJOArg:u,POJO:p,fn:n,curriedFn:d});let f=!0,s=void 0;return i&&(s=i({POJO:p,fn:n,curriedFn:d}),f=s===en),f?n(p):s}}),s=f({});return c&&c({curriedFn:s,newCurriedFn:s}),s},un=(...n)=>(...t)=>{let e=t,r=void 0;for(let t=n.length-1;t>=0;t--){r=(0,n[t])(...e),e=[r]}return r},cn=(...n)=>(...t)=>n.length?n.reduce((n,t)=>[t(...n)],t)[0]:void 0,ln=(...n)=>t=>n.reduce((n,e)=>({...n,[e]:t[e]}),{}),fn=n=>t=>e=>(...r)=>n(t(...r),e(...r)),sn=n=>(...t)=>n.map(n=>n(...t)),dn=(n,t)=>(...e)=>n(...t.map(n=>n(...e)));function an(n){let t=0;for(let e=0;e<n.length;e++){let r=0;for(let t=0;t<n[e].length;t++)r=251*r^n[e].charCodeAt(t);t^=r}return t}const pn=n=>{let t,e,r=0;if(0===n.length)return r;for(t=0;t<n.length;t++)e=n.charCodeAt(t),r=(r<<5)-r+e,r|=0;return r};function hn(n,t=0){let e=t,r=0;for(let t=0;t<n.length;t++)r=251*r^n.charCodeAt(t);return e^=r,e}function gn(n,t){return new Promise(e=>setTimeout(e,n,t))}function mn(n,t){return Promise.all([n,gn(t)]).then(([n])=>n).catch(n=>{throw n})}function yn({promise:n,maxDelayMs:t,onFallback:e=(()=>{}),fallbackMinDelayMs:r}={}){const o=s();return Promise.race([n,gn(t).then(()=>o)]).then(t=>t===o?(e(),mn(n,r)):t)}const bn=(n,t,e)=>void 0!==e?n.then(t,e):n.then(t),On=(...n)=>t=>n.reduce((n,t)=>{let e;return e=I(t)?bn(n,t[0],t[1]):bn(n,t),e},Promise.resolve(t));function wn(n,t,e,r){if(!t||"object"!=typeof t||t instanceof Date||t instanceof File){const o=null==t?"":e?encodeURIComponent(t):t;n instanceof FormData?n.append(r,o):n[r]=o}else Object.keys(t).forEach(o=>{wn(n,t[o],e,r?`${r}[${o}]`:e?encodeURIComponent(o):o)})}function An(n){const t={};wn(t,n,!0);const e=[];for(const n in t)e.push(n+"="+t[n]);return e.join("&")}function Sn(n){const t=new FormData;return wn(t,n),t}const jn=()=>window.ActiveXObject&&new window.ActiveXObject("Microsoft.XMLHTTP")||new XMLHttpRequest;function Tn(n=null){const t=jn();return new Promise(e=>{try{t.onreadystatechange=()=>{4==t.readyState&&e(t.status>=200&&(t.status<300||304===t.status))},t.open("HEAD",(n||r.checkNetworkURI||"//"+window.location.hostname+(80!=window.location.port?":"+window.location.port:""))+"?rand="+Math.floor(65536*(1+Math.random())),!0),t.send()}catch(n){e(!1)}})}function Fn(n=3e3){return new Promise(t=>{Tn().then(e=>{if(e)t();else{const e=setInterval(()=>{Tn().then(n=>{n&&(clearInterval(e),t())})},n)}})})}function In(n,t,e){let r="";if(e){const n=new Date;n.setTime(n.getTime()+24*e*60*60*1e3),r="expires="+n.toUTCString()+";"}document.cookie=n+"="+t+";"+r+"path=/"}function Pn(n){const t=n+"=",e=document.cookie.split(";");for(let n=0;n<e.length;n++){let r=e[n];for(;" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return r.substring(t.length,r.length)}}function Nn(n){In(n,"",-365)}function Cn(n){const t=n.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function Mn(n,t,e=1){const r=n.getBoundingClientRect(),o=t.getBoundingClientRect(),{top:i,bottom:u,height:c}=r,l=()=>"function"==typeof e?e(r,o):e;let f;return i<=o.top?o.top-i+l()<=c:(f=u-o.bottom)<0||(o.bottom>=i&&e?o.bottom-i>=l():f<=c)}function vn(n){return n.scrollHeight>n.clientHeight}function En(n){return n.scrollWidth>n.clientWidth}function xn(){const n=s();return r.elementUniqueIdPrefix+n}function kn(n){return window.getComputedStyle(n)}function Rn(n){const t=kn(n);let e=n.clientHeight,r=n.clientWidth;return e-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),r-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),{width:r,height:e}}let Hn;function Ln(n){null==Hn&&(Hn=document.createElement("textarea"),Hn.style.border="none",Hn.style.height="0",Hn.style.overflow="hidden",Hn.style.padding="0",Hn.style.position="absolute",Hn.style.left="0",Hn.style.top="0",Hn.style.zIndex="-1",document.body.appendChild(Hn));const t=window.getComputedStyle(n),e=parseInt(t.paddingLeft),r=parseInt(t.paddingRight);let o=parseInt(t.lineHeight);isNaN(o)&&(o=parseInt(t.fontSize)),Hn.style.width=n.clientWidth-e-r+"px",Hn.style.font=t.font,Hn.style.letterSpacing=t.letterSpacing,Hn.style.whiteSpace=t.whiteSpace,Hn.style.wordBreak=t.wordBreak,Hn.style.wordSpacing=t.wordSpacing,Hn.style.wordWrap=t.wordWrap,Hn.value=n.value;let i=Math.floor(Hn.scrollHeight/o);return 0==i&&(i=1),i}function Dn(n){return n.scrollTop+n.offsetHeight>=n.scrollHeight}function Bn(){const n=document.createElement("div");n.className="vertical-scrollbar-measure";const t=document.createElement("style");t.innerHTML="div.vertical-scrollbar-measure { width: 100px; height: 100px; overflow: scroll; position: absolute; top: -9999px; }",document.body.appendChild(t),document.body.appendChild(n);const e=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),t.parentNode.removeChild(t),e}function Un(n){return n.offsetWidth<n.scrollWidth}function _n(n,t,e){navigator.clipboard?navigator.clipboard.writeText(n).then((function(){t&&t()}),(function(n){e&&e(n)})):function(n,t,e){const r=document.documentElement.scrollTop||document.body.scrollTop,o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.focus(),o.select();try{document.execCommand("copy")?t&&t():e&&e()}catch(n){e&&e(n)}document.body.removeChild(o)&&document.documentElement.scrollTop&&(document.documentElement.scrollTop=r)||(document.body.scrollTop=r)}(n,t,e)}const Jn=(n,t)=>n&&window.requestAnimationFrame(()=>(t(),Jn(--n,t))),Wn=(n,t)=>{let e=n||1;const r=()=>{e--,e?window.requestAnimationFrame(r):t()};return window.requestAnimationFrame(r)};function qn(n){return(n||window.location.hash).replace(/^#/,"")}function Vn(n){return decodeURIComponent(qn(n))}function Xn(n,t){return n+"#"+encodeURIComponent(JSON.stringify(t))}function $n(n=null){const t=window.location.hash;if(!c(t)){const n=Vn(t);if(W(n))return JSON.parse(n)}return n}function zn(){const n={};return function(n,t){let e,r,o,i,c,l,f,s,d,a,p,h,g;n||(n=window.location.search.substr(1));const m=String(n).replace(/^&/,"").replace(/&$/,"").split("&"),y=m.length,b=function(n){return decodeURIComponent(n.replace(/\+/g,"%20"))};for(t||(t={}),e=0;e<y;e++){for(s=m[e].split("="),d=b(s[0]),a=s.length<2?"":b(s[1]);" "===d.charAt(0);)d=d.slice(1);if(d.indexOf("\0")>-1&&(d=d.slice(0,d.indexOf("\0"))),d&&"["!==d.charAt(0)){for(h=[],p=0,r=0;r<d.length;r++)if("["!==d.charAt(r)||p){if("]"===d.charAt(r)&&p&&(h.length||h.push(d.slice(0,p-1)),h.push(d.substr(p,r-p)),p=0,"["!==d.charAt(r+1)))break}else p=r+1;for(h.length||(h=[d]),r=0;r<h[0].length&&(f=h[0].charAt(r)," "!==f&&"."!==f&&"["!==f||(h[0]=h[0].substr(0,r)+"_"+h[0].substr(r+1)),"["!==f);r++);for(l=t,r=0,g=h.length;r<g;r++)if(d=h[r].replace(/^['"]/,"").replace(/['"]$/,""),c=l,""!==d&&" "!==d||0===r)void 0===l[d]&&(l[d]={}),l=l[d];else{for(i in o=-1,l)Object.prototype.hasOwnProperty.call(l,i)&&+i>o&&i.match(/^\d+$/g)&&(o=+i);d=o+1}c[d]=a}}const O=function(n){const t=Object.keys(n),e={};for(let n=0;n<t.length;n++)e[n]=!0;const r=[];for(let o=0;o<t.length;o++){const i=t[o]+"";if(!i.match(/^[0-9]+$/))return n;const u=Number(i);if(!e[u])return n;r[u]=n[i],delete e[u]}return 0===Object.keys(e).length?r:n};(function n(t){for(const e in t)u(t[e])&&(t[e]=O(t[e]),n(t[e]))})(t)}(location.search.substring(1),n),n}const Yn=function(n){let t,e;void 0!==window.pageXOffset?(t=window.pageXOffset,e=window.pageYOffset):void 0!==window.scrollX?(t=window.scrollX,e=window.scrollY):document.documentElement&&void 0!==document.documentElement.scrollLeft?(t=document.documentElement.scrollLeft,e=document.documentElement.scrollTop):(t=document.body.scrollLeft,e=document.body.scrollTop),n.focus(),void 0!==t&&window.scrollTo(t,e)};function Qn(n){let t="";const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=e.length;for(let o=0;o<n;o++)t+=e.charAt(Math.floor(Math.random()*r));return t}function Gn(n=0,t=Number.MAX_SAFE_INTEGER){return n=Math.ceil(n),t=Math.floor(t),Math.floor(Math.random()*(t-n+1))+n}function Zn(n){let t=Math.random();for(;n==t;)t=Math.random();return t}function Kn(){const n=new Date;return Math.round(n.getTime()/1e3)}function nt(n){const t=new Date(n||(new Date).getTime());return new Date(t.getTime()-6e4*t.getTimezoneOffset()).toISOString().slice(11,-1)}function tt(n){return.001*n}function et(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function rt(n,t,e={}){void 0===t&&(t=" ");const r=et(t),o=void 0===e.shouldTrimLeft||e.shouldTrimLeft,i=void 0===e.shouldTrimRight||e.shouldTrimRight,u=[];o&&(u[u.length]="^["+r+"]+"),i&&(u[u.length]="["+r+"]+$");const c=new RegExp(u.join("|"),"gm");return n.replace(c,"")}function ot(n,t,e){void 0===t&&(t=["\\s"]),e=e||"";const r=new RegExp("(^("+t.join("|")+")+)|(("+t.join("|")+")+$)","g"+e);return n.replace(r,"")}function it(n,t){return rt(n,t)}function ut(n,t){return rt(n,t,{shouldTrimLeft:!0,shouldTrimRight:!1})}function ct(n,t){return rt(n,t,{shouldTrimLeft:!1,shouldTrimRight:!0})}function lt(n,t,e){const r=[];for(const t of n)I(t)?r[r.length]=it(t.join(e),e):r[r.length]=t;return it(r.join(t),t)}function ft({arrayOfObjects:n,concatObjectProps:t,valueProp:e="id",outerSeparator:r=" ",innerSeparator:o=" "}){const i=[];for(const u of n){const n=[];for(const e of t)I(e)?n[n.length]=e.map(n=>u[n]):n[n.length]=u[e];i[i.length]={value:u[e],label:lt(n,r,o)}}return i}function st(n,t){const e=256,r=256;function o(n){const t=Math.sin(n*Math.PI/180),e=Math.log((1+t)/(1-t))/2;return Math.max(Math.min(e,Math.PI),-Math.PI)/2}function i(n,t,e){return Math.floor(Math.log(n/t/e)/Math.LN2)}const u=n.getNorthEast(),c=n.getSouthWest(),l=(o(u.lat())-o(c.lat()))/Math.PI,f=u.lng()-c.lng(),s=(f<0?f+360:f)/360,d=i(t.height,e,l),a=i(t.width,r,s);return Math.min(d,a,21)}const dt=function(){let n=0;return function(t,e){clearTimeout(n),n=setTimeout((function(){t()}),e)}}();function at(n,t){let e=void 0;return function(...r){!E(e)&&clearTimeout(e),e=setTimeout((function(){n(...r)}),t)}}function pt(n,t){let e=Date.now();return function(...r){e+t-Date.now()<0&&(n(...r),e=Date.now())}}function ht(n){return n.split(/[\\/]/).pop()}function gt(n,t){let e="",r="",o="",i=0;const u={};let c=0,l=0,f=!1,s=!1,d=!1;if(!n)return!1;t||(t="PATHINFO_ALL");const a={PATHINFO_DIRNAME:1,PATHINFO_BASENAME:2,PATHINFO_EXTENSION:4,PATHINFO_FILENAME:8,PATHINFO_ALL:0};for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(a.PATHINFO_ALL=a.PATHINFO_ALL|a[o]);if("number"!=typeof t){for(t=[].concat(t),l=0;l<t.length;l++)a[t[l]]&&(i|=a[t[l]]);t=i}const p=function(n){const t=n+"",e=t.lastIndexOf(".")+1;return!!e&&(e!==t.length?t.substr(e):"")};if(t&a.PATHINFO_DIRNAME){const t=n.replace(/\\/g,"/").replace(/\/[^/]*\/?$/,"");u.dirname=t===n?".":t}for(e in t&a.PATHINFO_BASENAME&&(!1===f&&(f=ht(n)),u.basename=f),t&a.PATHINFO_EXTENSION&&(!1===f&&(f=ht(n)),!1===s&&(s=p(f)),!1!==s&&(u.extension=s)),t&a.PATHINFO_FILENAME&&(!1===f&&(f=ht(n)),!1===s&&(s=p(f)),!1===d&&(d=f.slice(0,f.length-(s?s.length+1:!1===s?0:1))),u.filename=d),c=0,u)Object.prototype.hasOwnProperty.call(u,e)&&(c++,r=e);return 1===c?u[r]:u}function mt(n){const t=gt(n,"PATHINFO_EXTENSION");return"string"!=typeof t?"":t}function yt(n){return n.replace(/\\/g,"/").replace(/\/[^/]*\/?$/,"")}const bt=n=>parseInt(n,2),Ot=n=>n.toString(2),wt=(n,t)=>n&~(1<<t-1),At=(n,t)=>n|1<<t-1,St=(n,t)=>n^1<<t-1,jt=(n,t)=>n&1<<t-1;function Tt(n){const t=parseInt(n,16);return.299*((16711680&t)>>16)+.587*((65280&t)>>8)+.114*(255&t)}const Ft=function*(n,t,e=!0){const r=n.length;yield*function*n(t,r,o,i,u=0){if(o.length===i)yield e?v(o):o;else for(let e=u;e<r&&i-o.length<=r-e;e++)o.push(t[e]),yield*n(t,r,o,i,e+1),o.pop()}(n,r,[],t)},It=n=>{const t=n.length;if(0===t)return[];const e=v(n);if(1===t)return[e];const r=[];if(n.map(n=>r.push([n])),t>2)for(let e=2;e<t;e++)for(const t of Ft(n,e))r.push(t);return r.push(e),r},Pt=function*(n,t=!0){const e=n.length;if(0===e)return;const r=t?v(n):n;if(1!==e){if(yield*K(n,n=>[n]),e>2)for(let r=2;r<e;r++)for(const e of Ft(n,r,t))yield e;yield r}else yield r},Nt=function*(n){const t=n.length;for(let e=0;e<=t;e++)for(const t of Ft(n,e))yield t},Ct=function*(n){const t=new Map;yield[];for(const e of Nt(n))G(t,e)||(Z(t,e,!0),yield e)};e.d(t,"config",(function(){return r})),e.d(t,"isObjectEmpty",(function(){return o})),e.d(t,"isObject",(function(){return u})),e.d(t,"isEmpty",(function(){return c})),e.d(t,"isEmptyOr0",(function(){return l})),e.d(t,"uniqueId",(function(){return s})),e.d(t,"deepArrayCompare",(function(){return d})),e.d(t,"deepObjectCompare",(function(){return a})),e.d(t,"nestedObjectConstructValue",(function(){return p})),e.d(t,"unshiftArray",(function(){return h})),e.d(t,"cloneDeeplyJSON",(function(){return g})),e.d(t,"isReferenceType",(function(){return m})),e.d(t,"isPrimitiveType",(function(){return y})),e.d(t,"hasCyclicReference",(function(){return b})),e.d(t,"typeToStr",(function(){return O})),e.d(t,"cloneObjDeeply",(function(){return w})),e.d(t,"deepObjectExtend",(function(){return A})),e.d(t,"deepObjectCloningExtend",(function(){return S})),e.d(t,"cloneArray",(function(){return j})),e.d(t,"arraySliceFromValueToValue",(function(){return T})),e.d(t,"includesTypeCoercion",(function(){return F})),e.d(t,"isArray",(function(){return I})),e.d(t,"areArrayItemsAllCoercibleToNumber",(function(){return P})),e.d(t,"nestedPropertyValue",(function(){return N})),e.d(t,"hasNestedPropertyValue",(function(){return C})),e.d(t,"setNestedPropertyValue",(function(){return M})),e.d(t,"arrayOrArrayLike",(function(){return v})),e.d(t,"isUndefined",(function(){return E})),e.d(t,"lastOfArray",(function(){return x})),e.d(t,"firstOfArray",(function(){return k})),e.d(t,"isInt",(function(){return R})),e.d(t,"ctypeDigit",(function(){return H})),e.d(t,"isIntegerOrIntegerStr",(function(){return L})),e.d(t,"findIndex",(function(){return D})),e.d(t,"firstPropValue",(function(){return B})),e.d(t,"isStrictlyTrue",(function(){return U})),e.d(t,"arrayFindReverse",(function(){return _})),e.d(t,"isTruthy",(function(){return J})),e.d(t,"isJSONString",(function(){return W})),e.d(t,"noOpFn",(function(){return q})),e.d(t,"is",(function(){return X})),e.d(t,"shallowEqual",(function(){return z})),e.d(t,"partialShallowEqual",(function(){return Y})),e.d(t,"shallowObjectDiff",(function(){return Q})),e.d(t,"nestedMapHas",(function(){return G})),e.d(t,"nestedMapSet",(function(){return Z})),e.d(t,"mapYield",(function(){return K})),e.d(t,"str",(function(){return nn})),e.d(t,"_",(function(){return tn})),e.d(t,"proceedCallingFn",(function(){return en})),e.d(t,"curry",(function(){return rn})),e.d(t,"POJOCurry",(function(){return on})),e.d(t,"compose",(function(){return un})),e.d(t,"pipe",(function(){return cn})),e.d(t,"pick",(function(){return ln})),e.d(t,"liftBinaryFn",(function(){return fn})),e.d(t,"juxt",(function(){return sn})),e.d(t,"converge",(function(){return dn})),e.d(t,"stringHashArray",(function(){return an})),e.d(t,"hashString",(function(){return pn})),e.d(t,"onePassStringHash",(function(){return hn})),e.d(t,"timeout",(function(){return gn})),e.d(t,"minDelayPromise",(function(){return mn})),e.d(t,"maxDelayFallbackPromise",(function(){return yn})),e.d(t,"applyAsync",(function(){return bn})),e.d(t,"composeAsync",(function(){return On})),e.d(t,"buildQueryString",(function(){return An})),e.d(t,"formData",(function(){return Sn})),e.d(t,"xhr",(function(){return jn})),e.d(t,"checkNetwork",(function(){return Tn})),e.d(t,"waitNetwork",(function(){return Fn})),e.d(t,"setCookie",(function(){return In})),e.d(t,"getCookie",(function(){return Pn})),e.d(t,"unsetCookie",(function(){return Nn})),e.d(t,"isInViewport",(function(){return Cn})),e.d(t,"isScrolledIntoView",(function(){return Mn})),e.d(t,"hasVerticalScrollbar",(function(){return vn})),e.d(t,"hasHorizontalScrollbar",(function(){return En})),e.d(t,"elementUniqueId",(function(){return xn})),e.d(t,"getElementComputedStyle",(function(){return kn})),e.d(t,"elementInnerDimensions",(function(){return Rn})),e.d(t,"countTextareaLines",(function(){return Ln})),e.d(t,"isScrollOnBottom",(function(){return Dn})),e.d(t,"getVerticalScrollBarWidth",(function(){return Bn})),e.d(t,"isEllipsisActive",(function(){return Un})),e.d(t,"copyTextToClipboard",(function(){return _n})),e.d(t,"rAFLooper",(function(){return Jn})),e.d(t,"nestedRAF",(function(){return Wn})),e.d(t,"getRawURIFragment",(function(){return qn})),e.d(t,"getDecodedURIFragment",(function(){return Vn})),e.d(t,"appendEncodedJSONFragmentToURI",(function(){return Xn})),e.d(t,"getDecodedJSONFromFragmentURI",(function(){return $n})),e.d(t,"getQueryStringArgsMultiDim",(function(){return zn})),e.d(t,"cursorFocus",(function(){return Yn})),e.d(t,"randomInt",(function(){return Gn})),e.d(t,"randomStr",(function(){return Qn})),e.d(t,"randomDifferentFromValue",(function(){return Zn})),e.d(t,"time",(function(){return Kn})),e.d(t,"msToTime",(function(){return nt})),e.d(t,"millisecToSec",(function(){return tt})),e.d(t,"escapeRegExp",(function(){return et})),e.d(t,"trimCharacterMask",(function(){return rt})),e.d(t,"trimCharacterRegex",(function(){return ot})),e.d(t,"trim",(function(){return it})),e.d(t,"trimLeft",(function(){return ut})),e.d(t,"trimRight",(function(){return ct})),e.d(t,"concatWithInnerOuterSeparators",(function(){return lt})),e.d(t,"optionsValueLabel",(function(){return ft})),e.d(t,"googleMapBestZoomLevelFromBounds",(function(){return st})),e.d(t,"delay",(function(){return dt})),e.d(t,"debounce",(function(){return at})),e.d(t,"throttle",(function(){return pt})),e.d(t,"basename",(function(){return ht})),e.d(t,"pathinfo",(function(){return gt})),e.d(t,"filenameExtension",(function(){return mt})),e.d(t,"dirname",(function(){return yt})),e.d(t,"b2d",(function(){return bt})),e.d(t,"d2b",(function(){return Ot})),e.d(t,"turnNthBitOff",(function(){return wt})),e.d(t,"turnNthBitOn",(function(){return At})),e.d(t,"toggleNthBit",(function(){return St})),e.d(t,"checkNthBitOn",(function(){return jt})),e.d(t,"getLuminance",(function(){return Tt})),e.d(t,"yieldCombinationsWithoutRepetition",(function(){return Ft})),e.d(t,"uniqueProgressiveIncrementalCombinations",(function(){return It})),e.d(t,"yieldUniqueProgressiveIncrementalCombinations",(function(){return Pt})),e.d(t,"yieldAllSubsequences",(function(){return Nt})),e.d(t,"yieldUniqueSubsequences",(function(){return Ct}))}])}));
{
"name": "js-utl",
"version": "2.5.0",
"version": "2.6.0",
"description": "A collection of JS utility functions to be used across several applications or libraries.",

@@ -43,4 +43,5 @@ "keywords": [

"files": [
"dist"
"dist",
"src"
]
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc