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

extes

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extes - npm Package Compare versions

Comparing version 2.2.25 to 2.2.26

13

dist/extes.js

@@ -687,5 +687,11 @@ (()=>{"use strict";

configurable, writable, enumerable,
value: function(event) {
value: function(event, inits={}) {
const {bubbles, cancelable, composed, ...event_args} = inits;
if ( typeof event === "string" ) {
event = new Event(event);
event = new Event(event, {
bubbles:!!bubbles,
cancelable:!!cancelable,
composed:!!composed
});
}

@@ -697,2 +703,5 @@

Object.assign(event, event_args);
this.dispatchEvent(event);

@@ -699,0 +708,0 @@ }

2

dist/extes.min.js

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

(()=>{"use strict";const e="undefined"!=typeof Buffer,t=(e?global:window).ExtES=Object.create(null);function r(e,t=2,r="0"){let n=t-(e=""+e).length;for(;n-- >0;)e=r+e;return e}function n(t){return e&&Buffer.isBuffer(t)?new Uint8Array(t).buffer:ArrayBuffer.isView(t)?t.buffer:t instanceof ArrayBuffer?t:null}(()=>{const e=/^(0x)?([0-9a-fA-F]+)$/,t=/^(0b|0B)?([01]+)$/,r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15};Object.defineProperty(ArrayBuffer.prototype,"bytes",{configurable:!0,enumerable:!1,get:function(){return new Uint8Array(this)}}),Object.defineProperty(ArrayBuffer.prototype,"toString",{configurable:!0,writable:!0,enumerable:!1,value:function(e=16,t=!1){const r=new Uint8Array(this);let n="";switch(e){case 16:for(let e=0;e<r.length;e++){const t=r[e];n+="0123456789abcdef"[(240&t)>>>4]+"0123456789abcdef"[15&t]}break;case 2:for(let e=0;e<r.length;e++){const t=r[e];for(let e=7;e>=0;e--)n+=t>>>e&1?"1":"0"}break;default:throw new RangeError("Unsupported numeric representation!")}return t?n:n.replace(/^0+/,"")}}),Object.defineProperty(ArrayBuffer.prototype,"compare",{configurable:!0,writable:!0,enumerable:!1,value:function(e){if(!(e instanceof ArrayBuffer))throw new TypeError("An ArrayBuffer can only be compared with another ArrayBuffer");const t=new Uint8Array(this),r=new Uint8Array(e),n=Math.max(t.length,r.length);for(let e=0;e<n;e++){const n=t[e]||0,i=r[e]||0;if(n>i)return 1;if(n<i)return-1}return 0}}),Object.defineProperty(ArrayBuffer,"extract",{configurable:!0,writable:!0,enumerable:!1,value:function(e){if("undefined"!=typeof Buffer&&e instanceof Buffer){let t=Buffer.alloc(e.length);return e.copy(t,0),t.buffer}if(ArrayBuffer.isView(e))return e.buffer;if(e instanceof ArrayBuffer)return e;throw new TypeError("Cannot convert given input data into array buffer")}}),Object.defineProperty(ArrayBuffer,"from",{configurable:!0,writable:!0,enumerable:!1,value:function(n,i=null){if("undefined"!=typeof Buffer&&n instanceof Buffer){let e=Buffer.alloc(n.length);return n.copy(e,0),e.buffer}if(ArrayBuffer.isView(n))return n.buffer.slice(0);if(n instanceof ArrayBuffer)return n.slice(0);if(Array.isArray(n)){return new Uint8Array(n).buffer}if("number"==typeof n){let e=null;switch(i){case"int8":e=new Int8Array([n]);break;case"uint8":e=new Uint8Array([n]);break;case"int16":e=new Int16Array([n]);break;case"uint16":e=new Uint16Array([n]);break;case"int32":e=new Int32Array([n]);break;case"int64":{const t=n<0;t&&(n=-n);let r=Math.floor(n/4294967295),i=4294967295&n;t&&(i=1+(~i>>>0),r=~r+Math.floor(i/4294967295)),e=new Uint32Array([i,r]);break}case"uint64":{const t=Math.floor(n/4294967295);e=new Uint32Array([4294967295&n,t]);break}case"float32":e=new Float32Array([n]);break;case"float64":e=new Float64Array([n]);break;case"uint32":default:e=new Uint32Array([n])}return e.buffer}if("string"==typeof n){if("hex"===i){const t=n.match(e);if(!t)throw new RangeError("Input argument is not a valid hex string!");let[,,i]=t;i=i.length%2==0?i.toLowerCase():"0"+i.toLowerCase();const o=new Uint8Array(i.length/2|0);for(let e=0;e<o.length;e++){const t=2*e;o[e]=r[i[t]]<<4|15&r[i[t+1]]}return o.buffer}if("bits"===i){const e=n.match(t);if(!e)throw new RangeError("Input argument is not a valid bit string!");let[,,r]=e;r.length%8!=0&&(r="0".repeat(r.length%8)+r);const i=new Uint8Array(r.length/8|0);for(let e=0;e<i.length;e++){const t=8*e;let n="1"===r[t]?1:0;for(let e=1;e<8;e++)n=n<<1|("1"===r[t+e]?1:0);i[e]=n}return i.buffer}return function(e){if("string"!=typeof e)throw new TypeError("Given input argument must be a js string!");let t=[],r=0;for(;r<e.length;){let n=e.codePointAt(r);0==(4294967168&n)?t.push(n):0==(4294965248&n)?t.push(192|31&n>>6,128|63&n):0==(4294901760&n)?t.push(224|15&n>>12,128|63&n>>6,128|63&n):0==(4292870144&n)&&t.push(240|7&n>>18,128|63&n>>12,128|63&n>>6,128|63&n),r+=n>65535?2:1}return new Uint8Array(t)}(n).buffer}throw new TypeError("Cannot convert given input data into array buffer!")}}),Object.defineProperty(ArrayBuffer,"compare",{configurable:!0,writable:!0,enumerable:!1,value:function(e,t){if(!(e instanceof ArrayBuffer&&t instanceof ArrayBuffer))throw new TypeError("ArrayBuffer.compare only accepts two array buffers!");return e.compare(t)}}),Object.defineProperty(ArrayBuffer,"concat",{configurable:!0,writable:!0,enumerable:!1,value:function(...e){Array.isArray(e[0])&&(e=e[0]);let t=0;for(let r=0;r<e.length;r++){let i=n(e[r]);if(!(i instanceof ArrayBuffer))throw new TypeError("ArrayBuffer.combine accept only ArrayBuffer, TypeArray and DataView.");e[r]=new Uint8Array(i),t+=i.byteLength}const r=new Uint8Array(t);t=0;for(const n of e)r.set(n,t),t+=n.length;return r.buffer}})})(),Object.defineProperty(Array.prototype,"unique",{writable:!0,configurable:!0,enumerable:!1,value:function(){const e=new Set;for(const t of this)e.add(t);return Array.from(e)}}),Object.defineProperty(Array.prototype,"exclude",{writable:!0,configurable:!0,enumerable:!1,value:function(e){Array.isArray(e)||(e=[e]);const t=[];for(const r of this){let n=!1;for(const t of e)if(r===t){n=n||!0;break}n||t.push(r)}return t}}),"undefined"!=typeof Blob&&Object.defineProperty(Blob.prototype,"arrayBuffer",{configurable:!0,writable:!0,enumerable:!1,value:function(){return new Promise((e,t)=>{const r=new FileReader;r.onerror=t,r.onload=()=>e(r.result),r.readAsArrayBuffer(this)})}}),Object.defineProperty(Date,"unix",{writable:!0,configurable:!0,enumerable:!1,value:function(){return Math.floor(Date.now()/1e3)}}),Object.defineProperty(Date.prototype,"getUnixTime",{writable:!0,configurable:!0,enumerable:!1,value:function(){return Math.floor(this.getTime()/1e3)}}),Object.defineProperty(Date.prototype,"unix",{configurable:!0,enumerable:!1,get:function(){return Math.floor(this.getTime()/1e3)}}),Object.defineProperty(Date.prototype,"time",{configurable:!0,enumerable:!1,get:function(){return this.getTime()}}),Object.defineProperty(Date.prototype,"toLocaleISOString",{writable:!0,configurable:!0,enumerable:!1,value:function(){let e,t=this.getTimezoneOffset();if(0===t)e="Z";else{const n=t>0?"-":"+";t=Math.abs(t);const i=t%60;e=n+r(Math.floor(t/60))+r(i)}return this.getFullYear()+"-"+r(this.getMonth()+1)+"-"+r(this.getDate())+"T"+r(this.getHours())+":"+r(this.getMinutes())+":"+r(this.getSeconds())+"."+this.getMilliseconds()%1e3+e}}),"undefined"!=typeof Document&&Object.defineProperties(Document.prototype,{parseHTML:{configurable:!0,writable:!0,enumerable:!1,value:function(e){const t=this.implementation.createHTMLDocument().body;if(t.innerHTML=e,0===t.children.length)return null;if(1===t.children.length){const e=t.children[0];return e.remove(),e}const r=Array.prototype.slice.call(t.children,0);for(const e of r)e.remove();return r}}}),(()=>{if("undefined"!=typeof Element){const e=Element.prototype.setAttribute,t=Element.prototype.removeAttribute,r=Element.prototype.setAttributeNS,n=Element.prototype.removeAttributeNS;Object.defineProperties(Element.prototype,{addClass:{configurable:!0,enumerable:!1,writable:!0,value:function(...e){const t=[];for(const r of e)null!=r&&""!==r&&t.push(r);return this.classList.add(...t),this}},removeClass:{configurable:!0,enumerable:!1,writable:!0,value:function(...e){const t=[];for(const r of e)null!=r&&""!==r&&t.push(r);return this.classList.remove(...t),this}},setAttribute:{configurable:!0,enumerable:!1,writable:!0,value:function(t,r){return arguments.length<2&&(r=""),e.call(this,t,r),this}},removeAttribute:{configurable:!0,enumerable:!1,writable:!0,value:function(...e){return t.apply(this,e),this}},setAttributeNS:{configurable:!0,enumerable:!1,writable:!0,value:function(...e){return r.apply(this,e),this}},removeAttributeNS:{configurable:!0,enumerable:!1,writable:!0,value:function(...e){return n.apply(this,e),this}}})}})(),"undefined"!=typeof Error&&Object.defineProperty(Error.prototype,"stack_trace",{get:function(){return this.stack?this.stack.split(/\r\n|\n/g).map(e=>e.trim()):null},enumerable:!1,configurable:!0}),"undefined"!=typeof EventTarget&&(Object.defineProperty(EventTarget.prototype,"on",{configurable:!0,writable:!0,enumerable:!1,value:function(e,t){const r=[],n=e.split(",");for(let e of n)e=e.trim(),r.indexOf(e)>=0||(r.push(e),this.addEventListener(e,t));return this}}),Object.defineProperty(EventTarget.prototype,"off",{configurable:!0,writable:!0,enumerable:!1,value:function(e,t){const r=e.split(",");for(let e of r)e=e.trim(),this.removeEventListener(e,t);return this}}),Object.defineProperty(EventTarget.prototype,"emit",{configurable:!0,writable:!0,enumerable:!1,value:function(e){if("string"==typeof e&&(e=new Event(e)),!(e instanceof Event))throw new TypeError("Argument 1 accepts only string or Event instance!");this.dispatchEvent(e)}})),(()=>{if("undefined"!=typeof Error){class e extends Error{constructor(e,...t){super(e,...t),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor);const r=Date.now();Object.defineProperties(this,{name:{configurable:!1,writable:!1,enumerable:!1,value:this.constructor.name},time:{configurable:!1,writable:!1,enumerable:!1,value:Math.floor(r/1e3)},time_milli:{configurable:!1,writable:!1,enumerable:!1,value:r}})}}class r extends e{constructor(e,t=null,...r){if(Object(e)!==e)throw new TypeError("IndexedError constructor accepts only objects!");const{code:n,key:i,message:o=null,msg:a=null}=e;if("number"!=typeof n||"string"!=typeof i)throw new TypeError("IndexedError error info object must contains a numeric `code` field and a string `key` field");null!==o?r.unshift(""+o):null!==a?r.unshift(""+a):r.unshift(""),super(...r),Object.defineProperties(this,{code:{configurable:!1,writable:!1,enumerable:!1,value:n},key:{configurable:!1,writable:!1,enumerable:!1,value:i},detail:{configurable:!1,writable:!1,enumerable:!1,value:t}})}toJSON(){const e={code:this.code,key:this.key,msg:this.message,detail:void 0,time:this.time,time_milli:this.time_milli};return null!==this.detail&&void 0!==this.detail&&(Array.isArray(this.detail)?e.detail=this.detail.slice(0):Object(this.detail)===this.detail?e.detail=Object.assign({},this.detail):e.detail=this.detail),e}}Object.defineProperties(t,{EError:{configurable:!0,writable:!0,enumerable:!1,value:e},IndexedError:{configurable:!0,writable:!0,enumerable:!1,value:r}})}})(),(()=>{if("undefined"!=typeof HTMLElement){const e=new WeakMap;class r{constructor(t=null){console.warn("HTMLElementAccessor is marked as deprecated and will no longer updated! Please use WhelmJS (https://github.com/JCloudYu/whelm-js) instead!");const n=Object.assign(Object.create(null),{element:null,exported:Object.create(null),func_bind:r.prototype.bind.bind(this),func_relink:r.prototype.relink.bind(this)});e.set(this,n),0!==arguments.length&&this.bind(t)}bind(t){if(!(t instanceof Element))throw new TypeError("HTMLElementAccessor constructor only accept Element instances!");const r=e.get(this);r.element=t,r.exported=Object.create(null),this.relink()}relink(){const t=e.get(this);t.exported=Object.create(null);const{element:r,exported:n}=t;!function e(t,r){const n=[];for(const e of r.children){if(!e.hasAttribute("elm-export")){n.push(e);continue}const r=e.getAttribute("elm-export");e.hasAttribute("elm-export-tmpl")?t[r]=new o(e):e.hasAttribute("elm-export-accessor")?t[r]=new i(e):(n.push(e),t[r]=e)}for(const r of n)e(t,r)}(n,r)}}const n={getPrototypeOf:function(e){return Object.getPrototypeOf(e)},get:function(t,r){const{element:n,exported:i,func_bind:o,func_relink:a}=e.get(t);return"element"===r?n:"is_accessor"===r||("bind"===r?o:"relink"===r?a:i[r]||t[r])},set:function(t,r,n){if("element"===r)return!1;if("bind"===r)return!1;if("relink"===r)return!1;const{exported:i}=e.get(t);return i[r]||(t[r]=n),!0}},i=new Proxy(r,{construct(e,t){const r=new e(...t);return new Proxy(r,n)},apply(){throw new TypeError("Class constructor a cannot be invoked without 'new'")}});class o{constructor(e){if(console.warn("HTMLElementTemplate is marked as deprecated and will no longer updated! Please use WhelmJS (https://github.com/JCloudYu/whelm-js) instead!"),"string"==typeof e){var t=document.implementation.createHTMLDocument();if(t.body.innerHTML=e,1!==t.body.children.length)throw new TypeError("HTMLTemplate constructor only html string that is resolved as single Element instance!");e=t.body.children[0]}else{if(!(e instanceof Element))throw new TypeError("HTMLTemplate constructor only accepts an Element instance!");e=e.cloneNode(!0)}Object.defineProperties(this,{_tmpl_elm:{configurable:!1,writable:!1,enumerable:!1,value:e}}),e.removeAttribute("elm-export-tmpl"),e.removeAttribute("elm-export")}get is_template(){return!0}produce(){return console.warn("HTMLElementTemplate::produce is deprecated! Please use HTMLElementTemplate::duplicate instead!"),this.duplicate()}duplicate(){return new i(this._tmpl_elm.cloneNode(!0))}}Object.defineProperties(t,{HTMLElementTemplate:{configurable:!0,writable:!0,enumerable:!1,value:o},HTMLElementAccessor:{configurable:!0,writable:!0,enumerable:!1,value:i}})}})(),(()=>{const e=i.bind(null,!1,!1),t=i.bind(null,!1,!0),r=i.bind(null,!0,!1),n=i.bind(null,!0,!0);function i(e,t,r,...n){Array.isArray(r)||(n.unshift(r),r=n,n=[]);const i=[];let o=e;for(const e of r)"function"==typeof e?(o=o||"AsyncFunction"===e.constructor.name,i.push(e)):i.push(()=>e);const a={};return function(...e){let r=!1;const l=[...n,...e],u={};if(Object.defineProperties(u,{singleton:{value:a,configurable:!1,writable:!1,enumerable:!1},stop:{value:()=>{r=!0},configurable:!1,writable:!1,enumerable:!1}}),o)return Promise.resolve().then(async()=>{let o=void 0;for(const a of i){if(o=await a.call(u,...l),r)break;l.splice(0,l.length),l.push(...n),t&&l.push(...e),void 0!==o&&l.push(o)}return o});let c=void 0;for(const o of i){if(c=o.call(u,...l),r)break;l.splice(0,l.length),l.push(...n),t&&l.push(...e),void 0!==c&&l.push(c)}return c}}Object.defineProperty(Function,"sequentialExecutor",{configurable:!0,writable:!0,enumerable:!1,value:e}),Object.defineProperty(e,"spread",{configurable:!1,writable:!1,enumerable:!0,value:t}),Object.defineProperty(e,"async",{configurable:!1,writable:!1,enumerable:!0,value:r}),Object.defineProperty(e.async,"spread",{configurable:!1,writable:!1,enumerable:!0,value:n})})(),"undefined"!=typeof HTMLElement&&Object.defineProperties(HTMLElement.prototype,{setData:{configurable:!0,writable:!0,enumerable:!1,value:function(e,t){if(Object(e)===e)for(const t in e)this.dataset[t]=e[t];else this.dataset[e]=t;return this}},getData:{configurable:!0,writable:!0,enumerable:!1,value:function(e){return this.dataset[e]}},removeData:{configurable:!0,writable:!0,enumerable:!1,value:function(...e){for(const t of e)delete this.dataset[t];return this}},setContentHtml:{configurable:!0,writable:!0,enumerable:!1,value:function(e){return this.innerHTML=e,this}}}),"undefined"!=typeof HTMLInputElement&&Object.defineProperty(HTMLInputElement.prototype,"setValue",{configurable:!0,writable:!0,enumerable:!1,value:function(e){return this.value=e,this}}),"undefined"!=typeof Node&&(Object.defineProperty(Node.prototype,"prependChild",{configurable:!0,writable:!0,enumerable:!1,value:function(e){return this.insertBefore(e,this.children[0]||null),this instanceof DocumentFragment?new DocumentFragment:e}}),Object.defineProperty(Node.prototype,"insertNeighborBefore",{configurable:!0,writable:!0,enumerable:!1,value:function(e){if(!this.parentNode)throw new RangeError("Reference element is currently in detached mode! No way to add neighbors!");return this.parentNode.insertBefore(e,this),this instanceof DocumentFragment?new DocumentFragment:e}}),Object.defineProperty(Node.prototype,"insertNeighborAfter",{configurable:!0,writable:!0,enumerable:!1,value:function(e){if(!this.parentNode)throw new RangeError("Reference element is currently in detached mode! No way to add neighbors!");return this.parentNode.insertBefore(e,this.nextSibling),this instanceof DocumentFragment?new DocumentFragment:e}}),Object.defineProperty(Node.prototype,"setContentText",{configurable:!0,writable:!0,enumerable:!1,value:function(e){return this.textContent=e,this}}),Object.defineProperty(Node.prototype,"process",{configurable:!0,writable:!0,enumerable:!1,value:function(e,...t){return"function"==typeof e&&e.call(this,...t),this}})),(()=>{const e=Object.defineProperty,t=Object.defineProperties;function r(t,r,n={configurable:!0,enumerable:!1,writable:!0}){const i=!!n.configurable,o=!!n.enumerable,a=!!n.writable;for(const n in r){const l=r[n];void 0!==r[n]&&e(t,n,{value:l,configurable:i,enumerable:o,writable:a})}return t}function n(e,t=!1){const r=typeof e;switch(r){case"number":case"string":case"function":case"boolean":case"undefined":case"symbol":return r}return null===e?"null":e instanceof String?"string":e instanceof Number?"number":e instanceof Boolean?"boolean":Array.isArray(e)?"array":t?e instanceof ArrayBuffer?"array-buffer":e instanceof DataView?"data-view":e instanceof Uint8Array?"uint8-array":e instanceof Uint8ClampedArray?"uint8-clamped-array":e instanceof Int8Array?"int8-array":e instanceof Uint16Array?"uint16-array":e instanceof Int16Array?"int16-array":e instanceof Uint32Array?"uint32-array":e instanceof Int32Array?"int32-array":e instanceof Float32Array?"float32-array":e instanceof Float64Array?"float64-array":e instanceof Map?"map":e instanceof WeakMap?"weak-map":e instanceof Set?"set":e instanceof WeakSet?"weak-set":e instanceof RegExp?"regexp":e instanceof Promise?"promise":"object":"object"}e(Object,"defineProperty",{writable:!0,configurable:!0,enumerable:!1,value:function(t,r,n){return e(t,r,n),t}}),e(Object,"defineProperties",{writable:!0,configurable:!0,enumerable:!1,value:function(e,r){return t(e,r),e}}),Object.defineProperty(Object,"assignProperties",{writable:!0,configurable:!0,enumerable:!1,value:function(t,r,n={configurable:!0,enumerable:!1,writable:!0}){const i=!!n.configurable,o=!!n.enumerable,a=!!n.writable;for(const n in r){const l=r[n];if(Object(l)!==l)continue;const u=l.get||l.set,c=l.value||l.writable;if(u&&c)throw new SyntaxError("A property descriptor can be either an accessor descriptor or a data descriptor");e(t,n,u?{get:l.get,set:l.set,configurable:void 0===l.configurable?i:!!l.configurable,enumerable:void 0===l.enumerable?o:!!l.enumerable}:{value:l.value,configurable:void 0===l.configurable?i:!!l.configurable,enumerable:void 0===l.enumerable?o:!!l.enumerable,writable:void 0===l.writable?a:!!l.writable})}return t}}),Object.defineProperty(Object,"assignValues",{writable:!0,configurable:!0,enumerable:!1,value:r}),Object.defineProperty(Object,"assignConstants",{writable:!0,configurable:!0,enumerable:!1,value:(e,t,n=!1)=>r(e,t,{configurable:!1,writable:!1,enumerable:n})}),Object.defineProperty(Object,"merge",{writable:!0,configurable:!0,enumerable:!1,value:function e(t,r){if(Object(t)!==t)throw new Error("Given target is not an object");if(Object(r)!==r)throw new Error("Given source is not an object");for(const i in r){if(r.hasOwnProperty&&!r.hasOwnProperty(i)||void 0===r[i])continue;const o=t[i],a=r[i],l=n(o),u=n(a);"object"===l&&"object"===u?e(o,a):t instanceof Map?t.set(i,a):t[i]=a}return t}}),Object.defineProperty(Object,"generate",{writable:!0,configurable:!0,enumerable:!1,value:function(e,t=null){const r=Object.create(t);Object(e)===e&&Object.assign(r,e);return r}}),Object.defineProperty(Object,"typeOf",{writable:!0,configurable:!0,enumerable:!1,value:n}),Object.defineProperty(Object.prototype,"_decorate",{writable:!0,configurable:!0,enumerable:!1,value:function(e,...t){return"function"==typeof e&&e.call(this,...t),this}})})(),(()=>{const t=Promise.prototype.then,r=Promise.prototype.catch,n=Promise.prototype.finally;function i(e,t){for(const r of Object.keys(t))"_prev"!==r&&(e[r]=t[r]);return Object.defineProperty(e,"_prev",{value:t,configurable:!0,enumerable:!1,writable:!0}),e}Object.defineProperties(Promise.prototype,{then:{writable:!0,configurable:!0,enumerable:!1,value:function(...e){return i(t.call(this,...e),this)}},catch:{writable:!0,configurable:!0,enumerable:!1,value:function(...e){return i(r.call(this,...e),this)}},finally:{writable:!0,configurable:!0,enumerable:!1,value:function(...e){return i(n.call(this,...e),this)}},guard:{writable:!0,configurable:!0,enumerable:!1,value:function(){return i(r.call(this,t=>(setTimeout(()=>{if(e)throw t;{const e=new Event("unhandledRejection");e.error=t,window.dispatchEvent(e)}},0),t)),this)}}}),Object.defineProperties(Promise,{wait:{writable:!0,configurable:!0,enumerable:!1,value:function(e=[]){Array.isArray(e)||(e=[e]);if(0===e.length)return Promise.resolve([]);return new Promise((t,r)=>{let n=[],i=0,o=!0;for(let a=0;a<e.length;a++){let l={resolved:!0,seq:a,result:null};n.push(l),Promise.resolve(e[a]).then(e=>{o=(l.resolved=!0)&&o,l.result=e},e=>{o=(l.resolved=!1)&&o,l.result=e}).then(()=>{i++,e.length===i&&(o?t:r)(n)})}})}},create:{writable:!0,configurable:!0,enumerable:!1,value:function(){let e=null,t=null;const r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r.promise=r,r}}})})(),(()=>{const e=/(\w)(\w*)(\W*)/g,t=(e,t,r,n,i,o)=>`${t.toUpperCase()}${r.toLowerCase()}${n}`;function r(e,...t){return this instanceof r?(this.strings=e,void(this.fields=t)):new r(e,...t)}r.prototype={[Symbol.iterator](){const e=this.strings.slice(0).reverse(),t=this.fields.slice(0).reverse();let r=0;return{next:()=>{if(0===e.length)return{done:!0};let n;return n=r%2==0?e.pop():t.pop(),r+=1,{value:n}}}},toString(){let e="";for(const t of this)e+=""+t;return e}},Object.defineProperties(String.prototype,{upperCase:{configurable:!0,enumerable:!1,get:function(){return this.toUpperCase()}},localeUpperCase:{configurable:!0,enumerable:!1,get:function(){return this.toLocaleUpperCase()}},lowerCase:{configurable:!0,enumerable:!1,get:function(){return this.toLowerCase()}},localeLowerCase:{configurable:!0,enumerable:!1,get:function(){return this.toLocaleLowerCase()}},toCamelCase:{configurable:!0,enumerable:!1,value:function(){return this.replace(e,t)}},camelCase:{configurable:!0,enumerable:!1,get:function(){return this.replace(e,t)}},pull:{configurable:!0,enumerable:!1,writable:!0,value:function(e="",t=!0){if("string"!=typeof e)throw new TypeError("Given token must be a string");const r=this.length;if(0===r)return["",""];if(""===e)return t?[this[0],this.substring(1)]:[this.substring(0,r-1),this[r-1]];if(t){const t=this.indexOf(e,e.length);return t<0?[this.substring(0),""]:[this.substring(0,t),this.substring(t)]}{const t=this.lastIndexOf(e);return t<0?["",this.substring(0)]:[this.substring(0,t),this.substring(t)]}}},pop:{configurable:!0,enumerable:!1,writable:!0,value:function(e=""){return this.pull(e,!0)}},shift:{configurable:!0,enumerable:!1,writable:!0,value:function(e=""){return this.pull(e,!1)}}}),Object.defineProperties(String,{encodeRegExpString:{writable:!0,configurable:!0,enumerable:!1,value:function(e=""){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},stringTemplate:{writable:!0,configurable:!0,enumerable:!1,value:r},from:{writable:!0,configurable:!0,enumerable:!1,value:e=>{if("string"==typeof e)return e;const t=n(e);return null!==t?function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),!(e instanceof Uint8Array))throw new TypeError("Given input must be an Uint8Array contains UTF8 encoded value!");let t=e,r=[],n=0;for(;n<t.length;){let e=255&t[n];0==(128&e)?(r.push(e),n+=1):192==(224&e)?(e=(31&t[n])<<6|63&t[n+1],r.push(e),n+=2):224==(240&e)?(e=(15&t[n])<<12|(63&t[n+1])<<6|63&t[n+2],r.push(e),n+=3):240==(248&e)?(e=(7&t[n])<<18|(63&t[n+1])<<12|(63&t[n+2])<<6|63&t[n+3],r.push(e),n+=4):n+=1}let i="";for(;r.length>0;){const e=r.splice(0,100);i+=String.fromCodePoint(...e)}return i}(new Uint8Array(t)):""+e}}})})(),(()=>{function e(){let e=null,t=!1,r=null;const n=(n,i=0,...o)=>{e={cb:n,delay:i,args:o},t||(r&&(clearTimeout(r),r=null),function n(){if(!e)return;let{cb:i,delay:o,args:a}=e;r=setTimeout(()=>{t=!0,Promise.resolve(i(...a)).then(()=>{t=!1,r=null,n()},n=>{throw t=!1,r=null,e=null,n})},o),e=null}())};return n.clear=()=>{e=null,r&&(clearTimeout(r),r=null)},n}Object.defineProperty(setTimeout,"create",{writable:!0,configurable:!0,enumerable:!1,value:e}),Object.defineProperty(setTimeout,"idle",{writable:!0,configurable:!0,enumerable:!1,value:function(e=0){return new Promise(t=>{setTimeout(t,e)})}}),Object.defineProperty(setInterval,"create",{writable:!0,configurable:!0,enumerable:!1,value:function(){const t=e(),r=(e,r=0,...n)=>{const i=async()=>{t(i,r);try{await e(...n)}catch(e){throw t.clear(),e}};t(i,r,...n)};return r.clear=()=>{t.clear()},r}})})()})();
(()=>{"use strict";const e="undefined"!=typeof Buffer,t=(e?global:window).ExtES=Object.create(null);function r(e,t=2,r="0"){let n=t-(e=""+e).length;for(;n-- >0;)e=r+e;return e}function n(t){return e&&Buffer.isBuffer(t)?new Uint8Array(t).buffer:ArrayBuffer.isView(t)?t.buffer:t instanceof ArrayBuffer?t:null}(()=>{const e=/^(0x)?([0-9a-fA-F]+)$/,t=/^(0b|0B)?([01]+)$/,r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15};Object.defineProperty(ArrayBuffer.prototype,"bytes",{configurable:!0,enumerable:!1,get:function(){return new Uint8Array(this)}}),Object.defineProperty(ArrayBuffer.prototype,"toString",{configurable:!0,writable:!0,enumerable:!1,value:function(e=16,t=!1){const r=new Uint8Array(this);let n="";switch(e){case 16:for(let e=0;e<r.length;e++){const t=r[e];n+="0123456789abcdef"[(240&t)>>>4]+"0123456789abcdef"[15&t]}break;case 2:for(let e=0;e<r.length;e++){const t=r[e];for(let e=7;e>=0;e--)n+=t>>>e&1?"1":"0"}break;default:throw new RangeError("Unsupported numeric representation!")}return t?n:n.replace(/^0+/,"")}}),Object.defineProperty(ArrayBuffer.prototype,"compare",{configurable:!0,writable:!0,enumerable:!1,value:function(e){if(!(e instanceof ArrayBuffer))throw new TypeError("An ArrayBuffer can only be compared with another ArrayBuffer");const t=new Uint8Array(this),r=new Uint8Array(e),n=Math.max(t.length,r.length);for(let e=0;e<n;e++){const n=t[e]||0,i=r[e]||0;if(n>i)return 1;if(n<i)return-1}return 0}}),Object.defineProperty(ArrayBuffer,"extract",{configurable:!0,writable:!0,enumerable:!1,value:function(e){if("undefined"!=typeof Buffer&&e instanceof Buffer){let t=Buffer.alloc(e.length);return e.copy(t,0),t.buffer}if(ArrayBuffer.isView(e))return e.buffer;if(e instanceof ArrayBuffer)return e;throw new TypeError("Cannot convert given input data into array buffer")}}),Object.defineProperty(ArrayBuffer,"from",{configurable:!0,writable:!0,enumerable:!1,value:function(n,i=null){if("undefined"!=typeof Buffer&&n instanceof Buffer){let e=Buffer.alloc(n.length);return n.copy(e,0),e.buffer}if(ArrayBuffer.isView(n))return n.buffer.slice(0);if(n instanceof ArrayBuffer)return n.slice(0);if(Array.isArray(n)){return new Uint8Array(n).buffer}if("number"==typeof n){let e=null;switch(i){case"int8":e=new Int8Array([n]);break;case"uint8":e=new Uint8Array([n]);break;case"int16":e=new Int16Array([n]);break;case"uint16":e=new Uint16Array([n]);break;case"int32":e=new Int32Array([n]);break;case"int64":{const t=n<0;t&&(n=-n);let r=Math.floor(n/4294967295),i=4294967295&n;t&&(i=1+(~i>>>0),r=~r+Math.floor(i/4294967295)),e=new Uint32Array([i,r]);break}case"uint64":{const t=Math.floor(n/4294967295);e=new Uint32Array([4294967295&n,t]);break}case"float32":e=new Float32Array([n]);break;case"float64":e=new Float64Array([n]);break;case"uint32":default:e=new Uint32Array([n])}return e.buffer}if("string"==typeof n){if("hex"===i){const t=n.match(e);if(!t)throw new RangeError("Input argument is not a valid hex string!");let[,,i]=t;i=i.length%2==0?i.toLowerCase():"0"+i.toLowerCase();const o=new Uint8Array(i.length/2|0);for(let e=0;e<o.length;e++){const t=2*e;o[e]=r[i[t]]<<4|15&r[i[t+1]]}return o.buffer}if("bits"===i){const e=n.match(t);if(!e)throw new RangeError("Input argument is not a valid bit string!");let[,,r]=e;r.length%8!=0&&(r="0".repeat(r.length%8)+r);const i=new Uint8Array(r.length/8|0);for(let e=0;e<i.length;e++){const t=8*e;let n="1"===r[t]?1:0;for(let e=1;e<8;e++)n=n<<1|("1"===r[t+e]?1:0);i[e]=n}return i.buffer}return function(e){if("string"!=typeof e)throw new TypeError("Given input argument must be a js string!");let t=[],r=0;for(;r<e.length;){let n=e.codePointAt(r);0==(4294967168&n)?t.push(n):0==(4294965248&n)?t.push(192|31&n>>6,128|63&n):0==(4294901760&n)?t.push(224|15&n>>12,128|63&n>>6,128|63&n):0==(4292870144&n)&&t.push(240|7&n>>18,128|63&n>>12,128|63&n>>6,128|63&n),r+=n>65535?2:1}return new Uint8Array(t)}(n).buffer}throw new TypeError("Cannot convert given input data into array buffer!")}}),Object.defineProperty(ArrayBuffer,"compare",{configurable:!0,writable:!0,enumerable:!1,value:function(e,t){if(!(e instanceof ArrayBuffer&&t instanceof ArrayBuffer))throw new TypeError("ArrayBuffer.compare only accepts two array buffers!");return e.compare(t)}}),Object.defineProperty(ArrayBuffer,"concat",{configurable:!0,writable:!0,enumerable:!1,value:function(...e){Array.isArray(e[0])&&(e=e[0]);let t=0;for(let r=0;r<e.length;r++){let i=n(e[r]);if(!(i instanceof ArrayBuffer))throw new TypeError("ArrayBuffer.combine accept only ArrayBuffer, TypeArray and DataView.");e[r]=new Uint8Array(i),t+=i.byteLength}const r=new Uint8Array(t);t=0;for(const n of e)r.set(n,t),t+=n.length;return r.buffer}})})(),Object.defineProperty(Array.prototype,"unique",{writable:!0,configurable:!0,enumerable:!1,value:function(){const e=new Set;for(const t of this)e.add(t);return Array.from(e)}}),Object.defineProperty(Array.prototype,"exclude",{writable:!0,configurable:!0,enumerable:!1,value:function(e){Array.isArray(e)||(e=[e]);const t=[];for(const r of this){let n=!1;for(const t of e)if(r===t){n=n||!0;break}n||t.push(r)}return t}}),"undefined"!=typeof Blob&&Object.defineProperty(Blob.prototype,"arrayBuffer",{configurable:!0,writable:!0,enumerable:!1,value:function(){return new Promise((e,t)=>{const r=new FileReader;r.onerror=t,r.onload=()=>e(r.result),r.readAsArrayBuffer(this)})}}),Object.defineProperty(Date,"unix",{writable:!0,configurable:!0,enumerable:!1,value:function(){return Math.floor(Date.now()/1e3)}}),Object.defineProperty(Date.prototype,"getUnixTime",{writable:!0,configurable:!0,enumerable:!1,value:function(){return Math.floor(this.getTime()/1e3)}}),Object.defineProperty(Date.prototype,"unix",{configurable:!0,enumerable:!1,get:function(){return Math.floor(this.getTime()/1e3)}}),Object.defineProperty(Date.prototype,"time",{configurable:!0,enumerable:!1,get:function(){return this.getTime()}}),Object.defineProperty(Date.prototype,"toLocaleISOString",{writable:!0,configurable:!0,enumerable:!1,value:function(){let e,t=this.getTimezoneOffset();if(0===t)e="Z";else{const n=t>0?"-":"+";t=Math.abs(t);const i=t%60;e=n+r(Math.floor(t/60))+r(i)}return this.getFullYear()+"-"+r(this.getMonth()+1)+"-"+r(this.getDate())+"T"+r(this.getHours())+":"+r(this.getMinutes())+":"+r(this.getSeconds())+"."+this.getMilliseconds()%1e3+e}}),"undefined"!=typeof Document&&Object.defineProperties(Document.prototype,{parseHTML:{configurable:!0,writable:!0,enumerable:!1,value:function(e){const t=this.implementation.createHTMLDocument().body;if(t.innerHTML=e,0===t.children.length)return null;if(1===t.children.length){const e=t.children[0];return e.remove(),e}const r=Array.prototype.slice.call(t.children,0);for(const e of r)e.remove();return r}}}),(()=>{if("undefined"!=typeof Element){const e=Element.prototype.setAttribute,t=Element.prototype.removeAttribute,r=Element.prototype.setAttributeNS,n=Element.prototype.removeAttributeNS;Object.defineProperties(Element.prototype,{addClass:{configurable:!0,enumerable:!1,writable:!0,value:function(...e){const t=[];for(const r of e)null!=r&&""!==r&&t.push(r);return this.classList.add(...t),this}},removeClass:{configurable:!0,enumerable:!1,writable:!0,value:function(...e){const t=[];for(const r of e)null!=r&&""!==r&&t.push(r);return this.classList.remove(...t),this}},setAttribute:{configurable:!0,enumerable:!1,writable:!0,value:function(t,r){return arguments.length<2&&(r=""),e.call(this,t,r),this}},removeAttribute:{configurable:!0,enumerable:!1,writable:!0,value:function(...e){return t.apply(this,e),this}},setAttributeNS:{configurable:!0,enumerable:!1,writable:!0,value:function(...e){return r.apply(this,e),this}},removeAttributeNS:{configurable:!0,enumerable:!1,writable:!0,value:function(...e){return n.apply(this,e),this}}})}})(),"undefined"!=typeof Error&&Object.defineProperty(Error.prototype,"stack_trace",{get:function(){return this.stack?this.stack.split(/\r\n|\n/g).map(e=>e.trim()):null},enumerable:!1,configurable:!0}),"undefined"!=typeof EventTarget&&(Object.defineProperty(EventTarget.prototype,"on",{configurable:!0,writable:!0,enumerable:!1,value:function(e,t){const r=[],n=e.split(",");for(let e of n)e=e.trim(),r.indexOf(e)>=0||(r.push(e),this.addEventListener(e,t));return this}}),Object.defineProperty(EventTarget.prototype,"off",{configurable:!0,writable:!0,enumerable:!1,value:function(e,t){const r=e.split(",");for(let e of r)e=e.trim(),this.removeEventListener(e,t);return this}}),Object.defineProperty(EventTarget.prototype,"emit",{configurable:!0,writable:!0,enumerable:!1,value:function(e,t={}){const{bubbles:r,cancelable:n,composed:i,...o}=t;if("string"==typeof e&&(e=new Event(e,{bubbles:!!r,cancelable:!!n,composed:!!i})),!(e instanceof Event))throw new TypeError("Argument 1 accepts only string or Event instance!");Object.assign(e,o),this.dispatchEvent(e)}})),(()=>{if("undefined"!=typeof Error){class e extends Error{constructor(e,...t){super(e,...t),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor);const r=Date.now();Object.defineProperties(this,{name:{configurable:!1,writable:!1,enumerable:!1,value:this.constructor.name},time:{configurable:!1,writable:!1,enumerable:!1,value:Math.floor(r/1e3)},time_milli:{configurable:!1,writable:!1,enumerable:!1,value:r}})}}class r extends e{constructor(e,t=null,...r){if(Object(e)!==e)throw new TypeError("IndexedError constructor accepts only objects!");const{code:n,key:i,message:o=null,msg:a=null}=e;if("number"!=typeof n||"string"!=typeof i)throw new TypeError("IndexedError error info object must contains a numeric `code` field and a string `key` field");null!==o?r.unshift(""+o):null!==a?r.unshift(""+a):r.unshift(""),super(...r),Object.defineProperties(this,{code:{configurable:!1,writable:!1,enumerable:!1,value:n},key:{configurable:!1,writable:!1,enumerable:!1,value:i},detail:{configurable:!1,writable:!1,enumerable:!1,value:t}})}toJSON(){const e={code:this.code,key:this.key,msg:this.message,detail:void 0,time:this.time,time_milli:this.time_milli};return null!==this.detail&&void 0!==this.detail&&(Array.isArray(this.detail)?e.detail=this.detail.slice(0):Object(this.detail)===this.detail?e.detail=Object.assign({},this.detail):e.detail=this.detail),e}}Object.defineProperties(t,{EError:{configurable:!0,writable:!0,enumerable:!1,value:e},IndexedError:{configurable:!0,writable:!0,enumerable:!1,value:r}})}})(),(()=>{if("undefined"!=typeof HTMLElement){const e=new WeakMap;class r{constructor(t=null){console.warn("HTMLElementAccessor is marked as deprecated and will no longer updated! Please use WhelmJS (https://github.com/JCloudYu/whelm-js) instead!");const n=Object.assign(Object.create(null),{element:null,exported:Object.create(null),func_bind:r.prototype.bind.bind(this),func_relink:r.prototype.relink.bind(this)});e.set(this,n),0!==arguments.length&&this.bind(t)}bind(t){if(!(t instanceof Element))throw new TypeError("HTMLElementAccessor constructor only accept Element instances!");const r=e.get(this);r.element=t,r.exported=Object.create(null),this.relink()}relink(){const t=e.get(this);t.exported=Object.create(null);const{element:r,exported:n}=t;!function e(t,r){const n=[];for(const e of r.children){if(!e.hasAttribute("elm-export")){n.push(e);continue}const r=e.getAttribute("elm-export");e.hasAttribute("elm-export-tmpl")?t[r]=new o(e):e.hasAttribute("elm-export-accessor")?t[r]=new i(e):(n.push(e),t[r]=e)}for(const r of n)e(t,r)}(n,r)}}const n={getPrototypeOf:function(e){return Object.getPrototypeOf(e)},get:function(t,r){const{element:n,exported:i,func_bind:o,func_relink:a}=e.get(t);return"element"===r?n:"is_accessor"===r||("bind"===r?o:"relink"===r?a:i[r]||t[r])},set:function(t,r,n){if("element"===r)return!1;if("bind"===r)return!1;if("relink"===r)return!1;const{exported:i}=e.get(t);return i[r]||(t[r]=n),!0}},i=new Proxy(r,{construct(e,t){const r=new e(...t);return new Proxy(r,n)},apply(){throw new TypeError("Class constructor a cannot be invoked without 'new'")}});class o{constructor(e){if(console.warn("HTMLElementTemplate is marked as deprecated and will no longer updated! Please use WhelmJS (https://github.com/JCloudYu/whelm-js) instead!"),"string"==typeof e){var t=document.implementation.createHTMLDocument();if(t.body.innerHTML=e,1!==t.body.children.length)throw new TypeError("HTMLTemplate constructor only html string that is resolved as single Element instance!");e=t.body.children[0]}else{if(!(e instanceof Element))throw new TypeError("HTMLTemplate constructor only accepts an Element instance!");e=e.cloneNode(!0)}Object.defineProperties(this,{_tmpl_elm:{configurable:!1,writable:!1,enumerable:!1,value:e}}),e.removeAttribute("elm-export-tmpl"),e.removeAttribute("elm-export")}get is_template(){return!0}produce(){return console.warn("HTMLElementTemplate::produce is deprecated! Please use HTMLElementTemplate::duplicate instead!"),this.duplicate()}duplicate(){return new i(this._tmpl_elm.cloneNode(!0))}}Object.defineProperties(t,{HTMLElementTemplate:{configurable:!0,writable:!0,enumerable:!1,value:o},HTMLElementAccessor:{configurable:!0,writable:!0,enumerable:!1,value:i}})}})(),(()=>{const e=i.bind(null,!1,!1),t=i.bind(null,!1,!0),r=i.bind(null,!0,!1),n=i.bind(null,!0,!0);function i(e,t,r,...n){Array.isArray(r)||(n.unshift(r),r=n,n=[]);const i=[];let o=e;for(const e of r)"function"==typeof e?(o=o||"AsyncFunction"===e.constructor.name,i.push(e)):i.push(()=>e);const a={};return function(...e){let r=!1;const l=[...n,...e],u={};if(Object.defineProperties(u,{singleton:{value:a,configurable:!1,writable:!1,enumerable:!1},stop:{value:()=>{r=!0},configurable:!1,writable:!1,enumerable:!1}}),o)return Promise.resolve().then(async()=>{let o=void 0;for(const a of i){if(o=await a.call(u,...l),r)break;l.splice(0,l.length),l.push(...n),t&&l.push(...e),void 0!==o&&l.push(o)}return o});let c=void 0;for(const o of i){if(c=o.call(u,...l),r)break;l.splice(0,l.length),l.push(...n),t&&l.push(...e),void 0!==c&&l.push(c)}return c}}Object.defineProperty(Function,"sequentialExecutor",{configurable:!0,writable:!0,enumerable:!1,value:e}),Object.defineProperty(e,"spread",{configurable:!1,writable:!1,enumerable:!0,value:t}),Object.defineProperty(e,"async",{configurable:!1,writable:!1,enumerable:!0,value:r}),Object.defineProperty(e.async,"spread",{configurable:!1,writable:!1,enumerable:!0,value:n})})(),"undefined"!=typeof HTMLElement&&Object.defineProperties(HTMLElement.prototype,{setData:{configurable:!0,writable:!0,enumerable:!1,value:function(e,t){if(Object(e)===e)for(const t in e)this.dataset[t]=e[t];else this.dataset[e]=t;return this}},getData:{configurable:!0,writable:!0,enumerable:!1,value:function(e){return this.dataset[e]}},removeData:{configurable:!0,writable:!0,enumerable:!1,value:function(...e){for(const t of e)delete this.dataset[t];return this}},setContentHtml:{configurable:!0,writable:!0,enumerable:!1,value:function(e){return this.innerHTML=e,this}}}),"undefined"!=typeof HTMLInputElement&&Object.defineProperty(HTMLInputElement.prototype,"setValue",{configurable:!0,writable:!0,enumerable:!1,value:function(e){return this.value=e,this}}),"undefined"!=typeof Node&&(Object.defineProperty(Node.prototype,"prependChild",{configurable:!0,writable:!0,enumerable:!1,value:function(e){return this.insertBefore(e,this.children[0]||null),this instanceof DocumentFragment?new DocumentFragment:e}}),Object.defineProperty(Node.prototype,"insertNeighborBefore",{configurable:!0,writable:!0,enumerable:!1,value:function(e){if(!this.parentNode)throw new RangeError("Reference element is currently in detached mode! No way to add neighbors!");return this.parentNode.insertBefore(e,this),this instanceof DocumentFragment?new DocumentFragment:e}}),Object.defineProperty(Node.prototype,"insertNeighborAfter",{configurable:!0,writable:!0,enumerable:!1,value:function(e){if(!this.parentNode)throw new RangeError("Reference element is currently in detached mode! No way to add neighbors!");return this.parentNode.insertBefore(e,this.nextSibling),this instanceof DocumentFragment?new DocumentFragment:e}}),Object.defineProperty(Node.prototype,"setContentText",{configurable:!0,writable:!0,enumerable:!1,value:function(e){return this.textContent=e,this}}),Object.defineProperty(Node.prototype,"process",{configurable:!0,writable:!0,enumerable:!1,value:function(e,...t){return"function"==typeof e&&e.call(this,...t),this}})),(()=>{const e=Object.defineProperty,t=Object.defineProperties;function r(t,r,n={configurable:!0,enumerable:!1,writable:!0}){const i=!!n.configurable,o=!!n.enumerable,a=!!n.writable;for(const n in r){const l=r[n];void 0!==r[n]&&e(t,n,{value:l,configurable:i,enumerable:o,writable:a})}return t}function n(e,t=!1){const r=typeof e;switch(r){case"number":case"string":case"function":case"boolean":case"undefined":case"symbol":return r}return null===e?"null":e instanceof String?"string":e instanceof Number?"number":e instanceof Boolean?"boolean":Array.isArray(e)?"array":t?e instanceof ArrayBuffer?"array-buffer":e instanceof DataView?"data-view":e instanceof Uint8Array?"uint8-array":e instanceof Uint8ClampedArray?"uint8-clamped-array":e instanceof Int8Array?"int8-array":e instanceof Uint16Array?"uint16-array":e instanceof Int16Array?"int16-array":e instanceof Uint32Array?"uint32-array":e instanceof Int32Array?"int32-array":e instanceof Float32Array?"float32-array":e instanceof Float64Array?"float64-array":e instanceof Map?"map":e instanceof WeakMap?"weak-map":e instanceof Set?"set":e instanceof WeakSet?"weak-set":e instanceof RegExp?"regexp":e instanceof Promise?"promise":"object":"object"}e(Object,"defineProperty",{writable:!0,configurable:!0,enumerable:!1,value:function(t,r,n){return e(t,r,n),t}}),e(Object,"defineProperties",{writable:!0,configurable:!0,enumerable:!1,value:function(e,r){return t(e,r),e}}),Object.defineProperty(Object,"assignProperties",{writable:!0,configurable:!0,enumerable:!1,value:function(t,r,n={configurable:!0,enumerable:!1,writable:!0}){const i=!!n.configurable,o=!!n.enumerable,a=!!n.writable;for(const n in r){const l=r[n];if(Object(l)!==l)continue;const u=l.get||l.set,c=l.value||l.writable;if(u&&c)throw new SyntaxError("A property descriptor can be either an accessor descriptor or a data descriptor");e(t,n,u?{get:l.get,set:l.set,configurable:void 0===l.configurable?i:!!l.configurable,enumerable:void 0===l.enumerable?o:!!l.enumerable}:{value:l.value,configurable:void 0===l.configurable?i:!!l.configurable,enumerable:void 0===l.enumerable?o:!!l.enumerable,writable:void 0===l.writable?a:!!l.writable})}return t}}),Object.defineProperty(Object,"assignValues",{writable:!0,configurable:!0,enumerable:!1,value:r}),Object.defineProperty(Object,"assignConstants",{writable:!0,configurable:!0,enumerable:!1,value:(e,t,n=!1)=>r(e,t,{configurable:!1,writable:!1,enumerable:n})}),Object.defineProperty(Object,"merge",{writable:!0,configurable:!0,enumerable:!1,value:function e(t,r){if(Object(t)!==t)throw new Error("Given target is not an object");if(Object(r)!==r)throw new Error("Given source is not an object");for(const i in r){if(r.hasOwnProperty&&!r.hasOwnProperty(i)||void 0===r[i])continue;const o=t[i],a=r[i],l=n(o),u=n(a);"object"===l&&"object"===u?e(o,a):t instanceof Map?t.set(i,a):t[i]=a}return t}}),Object.defineProperty(Object,"generate",{writable:!0,configurable:!0,enumerable:!1,value:function(e,t=null){const r=Object.create(t);Object(e)===e&&Object.assign(r,e);return r}}),Object.defineProperty(Object,"typeOf",{writable:!0,configurable:!0,enumerable:!1,value:n}),Object.defineProperty(Object.prototype,"_decorate",{writable:!0,configurable:!0,enumerable:!1,value:function(e,...t){return"function"==typeof e&&e.call(this,...t),this}})})(),(()=>{const t=Promise.prototype.then,r=Promise.prototype.catch,n=Promise.prototype.finally;function i(e,t){for(const r of Object.keys(t))"_prev"!==r&&(e[r]=t[r]);return Object.defineProperty(e,"_prev",{value:t,configurable:!0,enumerable:!1,writable:!0}),e}Object.defineProperties(Promise.prototype,{then:{writable:!0,configurable:!0,enumerable:!1,value:function(...e){return i(t.call(this,...e),this)}},catch:{writable:!0,configurable:!0,enumerable:!1,value:function(...e){return i(r.call(this,...e),this)}},finally:{writable:!0,configurable:!0,enumerable:!1,value:function(...e){return i(n.call(this,...e),this)}},guard:{writable:!0,configurable:!0,enumerable:!1,value:function(){return i(r.call(this,t=>(setTimeout(()=>{if(e)throw t;{const e=new Event("unhandledRejection");e.error=t,window.dispatchEvent(e)}},0),t)),this)}}}),Object.defineProperties(Promise,{wait:{writable:!0,configurable:!0,enumerable:!1,value:function(e=[]){Array.isArray(e)||(e=[e]);if(0===e.length)return Promise.resolve([]);return new Promise((t,r)=>{let n=[],i=0,o=!0;for(let a=0;a<e.length;a++){let l={resolved:!0,seq:a,result:null};n.push(l),Promise.resolve(e[a]).then(e=>{o=(l.resolved=!0)&&o,l.result=e},e=>{o=(l.resolved=!1)&&o,l.result=e}).then(()=>{i++,e.length===i&&(o?t:r)(n)})}})}},create:{writable:!0,configurable:!0,enumerable:!1,value:function(){let e=null,t=null;const r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r.promise=r,r}}})})(),(()=>{const e=/(\w)(\w*)(\W*)/g,t=(e,t,r,n,i,o)=>`${t.toUpperCase()}${r.toLowerCase()}${n}`;function r(e,...t){return this instanceof r?(this.strings=e,void(this.fields=t)):new r(e,...t)}r.prototype={[Symbol.iterator](){const e=this.strings.slice(0).reverse(),t=this.fields.slice(0).reverse();let r=0;return{next:()=>{if(0===e.length)return{done:!0};let n;return n=r%2==0?e.pop():t.pop(),r+=1,{value:n}}}},toString(){let e="";for(const t of this)e+=""+t;return e}},Object.defineProperties(String.prototype,{upperCase:{configurable:!0,enumerable:!1,get:function(){return this.toUpperCase()}},localeUpperCase:{configurable:!0,enumerable:!1,get:function(){return this.toLocaleUpperCase()}},lowerCase:{configurable:!0,enumerable:!1,get:function(){return this.toLowerCase()}},localeLowerCase:{configurable:!0,enumerable:!1,get:function(){return this.toLocaleLowerCase()}},toCamelCase:{configurable:!0,enumerable:!1,value:function(){return this.replace(e,t)}},camelCase:{configurable:!0,enumerable:!1,get:function(){return this.replace(e,t)}},pull:{configurable:!0,enumerable:!1,writable:!0,value:function(e="",t=!0){if("string"!=typeof e)throw new TypeError("Given token must be a string");const r=this.length;if(0===r)return["",""];if(""===e)return t?[this[0],this.substring(1)]:[this.substring(0,r-1),this[r-1]];if(t){const t=this.indexOf(e,e.length);return t<0?[this.substring(0),""]:[this.substring(0,t),this.substring(t)]}{const t=this.lastIndexOf(e);return t<0?["",this.substring(0)]:[this.substring(0,t),this.substring(t)]}}},pop:{configurable:!0,enumerable:!1,writable:!0,value:function(e=""){return this.pull(e,!0)}},shift:{configurable:!0,enumerable:!1,writable:!0,value:function(e=""){return this.pull(e,!1)}}}),Object.defineProperties(String,{encodeRegExpString:{writable:!0,configurable:!0,enumerable:!1,value:function(e=""){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},stringTemplate:{writable:!0,configurable:!0,enumerable:!1,value:r},from:{writable:!0,configurable:!0,enumerable:!1,value:e=>{if("string"==typeof e)return e;const t=n(e);return null!==t?function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),!(e instanceof Uint8Array))throw new TypeError("Given input must be an Uint8Array contains UTF8 encoded value!");let t=e,r=[],n=0;for(;n<t.length;){let e=255&t[n];0==(128&e)?(r.push(e),n+=1):192==(224&e)?(e=(31&t[n])<<6|63&t[n+1],r.push(e),n+=2):224==(240&e)?(e=(15&t[n])<<12|(63&t[n+1])<<6|63&t[n+2],r.push(e),n+=3):240==(248&e)?(e=(7&t[n])<<18|(63&t[n+1])<<12|(63&t[n+2])<<6|63&t[n+3],r.push(e),n+=4):n+=1}let i="";for(;r.length>0;){const e=r.splice(0,100);i+=String.fromCodePoint(...e)}return i}(new Uint8Array(t)):""+e}}})})(),(()=>{function e(){let e=null,t=!1,r=null;const n=(n,i=0,...o)=>{e={cb:n,delay:i,args:o},t||(r&&(clearTimeout(r),r=null),function n(){if(!e)return;let{cb:i,delay:o,args:a}=e;r=setTimeout(()=>{t=!0,Promise.resolve(i(...a)).then(()=>{t=!1,r=null,n()},n=>{throw t=!1,r=null,e=null,n})},o),e=null}())};return n.clear=()=>{e=null,r&&(clearTimeout(r),r=null)},n}Object.defineProperty(setTimeout,"create",{writable:!0,configurable:!0,enumerable:!1,value:e}),Object.defineProperty(setTimeout,"idle",{writable:!0,configurable:!0,enumerable:!1,value:function(e=0){return new Promise(t=>{setTimeout(t,e)})}}),Object.defineProperty(setInterval,"create",{writable:!0,configurable:!0,enumerable:!1,value:function(){const t=e(),r=(e,r=0,...n)=>{const i=async()=>{t(i,r);try{await e(...n)}catch(e){throw t.clear(),e}};t(i,r,...n)};return r.clear=()=>{t.clear()},r}})})()})();

@@ -41,5 +41,11 @@ /**

configurable, writable, enumerable,
value: function(event) {
value: function(event, inits={}) {
const {bubbles, cancelable, composed, ...event_args} = inits;
if ( typeof event === "string" ) {
event = new Event(event);
event = new Event(event, {
bubbles:!!bubbles,
cancelable:!!cancelable,
composed:!!composed
});
}

@@ -51,2 +57,5 @@

Object.assign(event, event_args);
this.dispatchEvent(event);

@@ -53,0 +62,0 @@ }

{
"name": "extes",
"version": "2.2.25",
"version": "2.2.26",
"description": "A tiny library that extends native js with some handy tools",

@@ -5,0 +5,0 @@ "main": "index.mjs",

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