diff --git a/cjs/base-ex.cjs b/cjs/base-ex.cjs index a537a05..2f22678 100644 --- a/cjs/base-ex.cjs +++ b/cjs/base-ex.cjs @@ -1453,7 +1453,7 @@ class BaseTemplate { /** * [BaseEx|Base1 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-1.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -1609,7 +1609,7 @@ class Base1 extends BaseTemplate { /** * [BaseEx|Base16 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-16.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -1697,7 +1697,7 @@ class Base16 extends BaseTemplate { /** * [BaseEx|Base32 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-32.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -1802,7 +1802,7 @@ class Base32 extends BaseTemplate { /** * [BaseEx|Base58 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-58.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -1952,7 +1952,7 @@ class Base58 extends BaseTemplate{ /** * [BaseEx|Base64 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-64.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -2040,7 +2040,7 @@ class Base64 extends BaseTemplate { /** * [BaseEx|UUencode Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/uuencode.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -2244,7 +2244,7 @@ const ees = () => { /** * [BaseEx|Base85 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-85.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -2367,7 +2367,7 @@ class Base85 extends BaseTemplate { /** * [BaseEx|Base91 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-91.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND BSD-3-Clause (Base91, Copyright (c) 2000-2006 Joachim Henke) */ @@ -2600,7 +2600,7 @@ class Base91 extends BaseTemplate { /** * [BaseEx|LEB128 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/leb-128.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -2765,7 +2765,7 @@ class LEB128 extends BaseTemplate { /** * [BaseEx|Ecoji Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/ecoji.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 OR Apache-2.0 * @see https://github.com/keith-turner/ecoji @@ -3107,7 +3107,7 @@ class Ecoji extends BaseTemplate { /** * [BaseEx|Base2048 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-2048.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND MIT (Base2048, Copyright (c) 2017 qntm) */ @@ -3285,7 +3285,7 @@ class Base2048 extends BaseTemplate { /** * [BaseEx|SimpleBase Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/simple-base.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -3385,7 +3385,7 @@ let DP=20,RM=1,MAX_DP=1e6,NE=-7,PE=21,STRICT=!1,NAME="[big.js] ",INVALID=NAME+"I /** * [BaseEx|BasePhi Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-phi.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -3722,7 +3722,7 @@ class BasePhi extends BaseTemplate { /** * [BaseEx|Byte Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/byte-converter.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -3840,7 +3840,7 @@ class ByteConverter { /** * [BaseEx]{@link https://github.com/UmamiAppearance/BaseExJS} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND BSD-3-Clause (only regarding Base91, Copyright (c) 2000-2006 Joachim Henke) */ diff --git a/dist/base-ex.esm.js b/dist/base-ex.esm.js index 73924a7..c2495e9 100644 --- a/dist/base-ex.esm.js +++ b/dist/base-ex.esm.js @@ -1451,7 +1451,7 @@ class BaseTemplate { /** * [BaseEx|Base1 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-1.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -1607,7 +1607,7 @@ class Base1 extends BaseTemplate { /** * [BaseEx|Base16 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-16.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -1695,7 +1695,7 @@ class Base16 extends BaseTemplate { /** * [BaseEx|Base32 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-32.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -1800,7 +1800,7 @@ class Base32 extends BaseTemplate { /** * [BaseEx|Base58 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-58.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -1950,7 +1950,7 @@ class Base58 extends BaseTemplate{ /** * [BaseEx|Base64 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-64.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -2038,7 +2038,7 @@ class Base64 extends BaseTemplate { /** * [BaseEx|UUencode Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/uuencode.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -2242,7 +2242,7 @@ const ees = () => { /** * [BaseEx|Base85 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-85.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -2365,7 +2365,7 @@ class Base85 extends BaseTemplate { /** * [BaseEx|Base91 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-91.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND BSD-3-Clause (Base91, Copyright (c) 2000-2006 Joachim Henke) */ @@ -2598,7 +2598,7 @@ class Base91 extends BaseTemplate { /** * [BaseEx|LEB128 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/leb-128.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -2763,7 +2763,7 @@ class LEB128 extends BaseTemplate { /** * [BaseEx|Ecoji Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/ecoji.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 OR Apache-2.0 * @see https://github.com/keith-turner/ecoji @@ -3105,7 +3105,7 @@ class Ecoji extends BaseTemplate { /** * [BaseEx|Base2048 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-2048.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND MIT (Base2048, Copyright (c) 2017 qntm) */ @@ -3283,7 +3283,7 @@ class Base2048 extends BaseTemplate { /** * [BaseEx|SimpleBase Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/simple-base.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -3383,7 +3383,7 @@ let DP=20,RM=1,MAX_DP=1e6,NE=-7,PE=21,STRICT=!1,NAME="[big.js] ",INVALID=NAME+"I /** * [BaseEx|BasePhi Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-phi.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -3720,7 +3720,7 @@ class BasePhi extends BaseTemplate { /** * [BaseEx|Byte Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/byte-converter.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -3838,7 +3838,7 @@ class ByteConverter { /** * [BaseEx]{@link https://github.com/UmamiAppearance/BaseExJS} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND BSD-3-Clause (only regarding Base91, Copyright (c) 2000-2006 Joachim Henke) */ diff --git a/dist/base-ex.esm.min.js b/dist/base-ex.esm.min.js index 2583edc..e104754 100644 --- a/dist/base-ex.esm.min.js +++ b/dist/base-ex.esm.min.js @@ -2,7 +2,7 @@ class t{static toBytes(t){return ArrayBuffer.isView(t)&&(t=t.buffer),[new Uint8A /** * [BaseEx]{@link https://github.com/UmamiAppearance/BaseExJS} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND BSD-3-Clause (only regarding Base91, Copyright (c) 2000-2006 Joachim Henke) */class O{constructor(t="buffer"){if(!n.typeList.includes(t)){let e=`Invalid argument '${t}' for output type. Allowed types are:\n`;throw e=e.concat(n.typeList.join(", ")),new TypeError(e)}this.base1=new u("default",t),this.base16=new d("default",t),this.base32_crockford=new f("rfc4648",t),this.base32_rfc3548=new f("rfc3548",t),this.base32_rfc4648=new f("rfc4648",t),this.base32_zbase32=new f("zbase32",t),this.base58=new p("default",t),this.base58_bitcoin=new p("bitcoin",t),this.base58_flickr=new p("flickr",t),this.base64=new g("default",t),this.base64_urlsafe=new g("urlsafe",t),this.uuencode=new b("default",t),this.xxencode=new b("xx",t),this.base85_adobe=new m("adobe",t),this.base85_ascii=new m("ascii85",t),this.base85_z85=new m("z85",t),this.base91=new v("default",t),this.leb128=new E("default",t),this.ecoji_v1=new A("emojis_v1",t),this.ecoji_v2=new A("emojis_v2",t),this.base2048=new x("default",t),this.basePhi=new U("default",t),this.byteConverter=new P(t),this.simpleBase={};for(let e=2;e<=62;e++)this.simpleBase[`base${e}`]=new T(e,t)}}export{u as Base1,d as Base16,x as Base2048,f as Base32,p as Base58,g as Base64,m as Base85,v as Base91,O as BaseEx,U as BasePhi,P as ByteConverter,A as Ecoji,E as LEB128,T as SimpleBase,b as UUencode}; diff --git a/dist/base-ex.iife.js b/dist/base-ex.iife.js index 01fd51d..5334d15 100644 --- a/dist/base-ex.iife.js +++ b/dist/base-ex.iife.js @@ -1454,7 +1454,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|Base1 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-1.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -1610,7 +1610,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|Base16 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-16.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -1698,7 +1698,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|Base32 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-32.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -1803,7 +1803,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|Base58 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-58.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -1953,7 +1953,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|Base64 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-64.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -2041,7 +2041,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|UUencode Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/uuencode.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -2245,7 +2245,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|Base85 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-85.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -2368,7 +2368,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|Base91 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-91.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND BSD-3-Clause (Base91, Copyright (c) 2000-2006 Joachim Henke) */ @@ -2601,7 +2601,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|LEB128 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/leb-128.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -2766,7 +2766,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|Ecoji Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/ecoji.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 OR Apache-2.0 * @see https://github.com/keith-turner/ecoji @@ -3108,7 +3108,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|Base2048 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-2048.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND MIT (Base2048, Copyright (c) 2017 qntm) */ @@ -3286,7 +3286,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|SimpleBase Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/simple-base.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -3386,7 +3386,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|BasePhi Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-phi.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -3723,7 +3723,7 @@ var BaseEx = (function (exports) { /** * [BaseEx|Byte Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/byte-converter.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ @@ -3841,7 +3841,7 @@ var BaseEx = (function (exports) { /** * [BaseEx]{@link https://github.com/UmamiAppearance/BaseExJS} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND BSD-3-Clause (only regarding Base91, Copyright (c) 2000-2006 Joachim Henke) */ diff --git a/dist/base-ex.iife.min.js b/dist/base-ex.iife.min.js index 07ddc44..b9474ed 100644 --- a/dist/base-ex.iife.min.js +++ b/dist/base-ex.iife.min.js @@ -2,7 +2,7 @@ var BaseEx=function(t){"use strict";class e{static toBytes(t){return ArrayBuffer /** * [BaseEx]{@link https://github.com/UmamiAppearance/BaseExJS} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND BSD-3-Clause (only regarding Base91, Copyright (c) 2000-2006 Joachim Henke) */return t.Base1=d,t.Base16=f,t.Base2048=T,t.Base32=p,t.Base58=g,t.Base64=b,t.Base85=v,t.Base91=E,t.BaseEx=class{constructor(t="buffer"){if(!o.typeList.includes(t)){let e=`Invalid argument '${t}' for output type. Allowed types are:\n`;throw e=e.concat(o.typeList.join(", ")),new TypeError(e)}this.base1=new d("default",t),this.base16=new f("default",t),this.base32_crockford=new p("rfc4648",t),this.base32_rfc3548=new p("rfc3548",t),this.base32_rfc4648=new p("rfc4648",t),this.base32_zbase32=new p("zbase32",t),this.base58=new g("default",t),this.base58_bitcoin=new g("bitcoin",t),this.base58_flickr=new g("flickr",t),this.base64=new b("default",t),this.base64_urlsafe=new b("urlsafe",t),this.uuencode=new y("default",t),this.xxencode=new y("xx",t),this.base85_adobe=new v("adobe",t),this.base85_ascii=new v("ascii85",t),this.base85_z85=new v("z85",t),this.base91=new E("default",t),this.leb128=new A("default",t),this.ecoji_v1=new x("emojis_v1",t),this.ecoji_v2=new x("emojis_v2",t),this.base2048=new T("default",t),this.basePhi=new D("default",t),this.byteConverter=new O(t),this.simpleBase={};for(let e=2;e<=62;e++)this.simpleBase[`base${e}`]=new M(e,t)}},t.BasePhi=D,t.ByteConverter=O,t.Ecoji=x,t.LEB128=A,t.SimpleBase=M,t.UUencode=y,t}({}); diff --git a/dist/converters/Base1/base-1.esm.js b/dist/converters/Base1/base-1.esm.js index c057873..63f751d 100644 --- a/dist/converters/Base1/base-1.esm.js +++ b/dist/converters/Base1/base-1.esm.js @@ -1451,7 +1451,7 @@ class BaseTemplate { /** * [BaseEx|Base1 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-1.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/Base1/base-1.esm.min.js b/dist/converters/Base1/base-1.esm.min.js index 380db81..1840193 100644 --- a/dist/converters/Base1/base-1.esm.min.js +++ b/dist/converters/Base1/base-1.esm.min.js @@ -2,7 +2,7 @@ class t{static toBytes(t){return ArrayBuffer.isView(t)&&(t=t.buffer),[new Uint8A /** * [BaseEx|Base1 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-1.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */class u extends h{constructor(...t){super(),this.charsets.all=[..." !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"],this.charsets.sequence=[..."Hello World!"],this.charsets.default=["1"],this.charsets.tmark=["|","#"],this.converter=new l(10,0,0),this.hasSignedMode=!0,this.littleEndian=!0,this.signed=!0,this.isMutable.charsets=!1,this.isMutable.signed=!0,this.isMutable.upper=!0,this.utils.validateArgs(t,!0)}encode(t,...e){const i=this.utils.validateArgs(e);let n,r;[n,r]=this.utils.inputHandler.toBytes(t,i);let s=this.converter.encode(n,null,i.littleEndian)[0],o=BigInt(s);if(o>Number.MAX_SAFE_INTEGER)throw new RangeError("Invalid string length.");o>16777216&&console.warn("The string length is really long. The JavaScript engine may have memory issues generating the output string."),o=Number(o);const a=this.charsets[i.version],l=a.length;let h="";if(1===l)h=a.at(0).repeat(o);else if("all"===i.version)for(let t=0;t4&&(h=a.at(1).repeat((o-t)/5)),h+=a.at(0).repeat(t)}else for(let t=0;t?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"],this.charsets.sequence=[..."Hello World!"],this.charsets.default=["1"],this.charsets.tmark=["|","#"],this.converter=new l(10,0,0),this.hasSignedMode=!0,this.littleEndian=!0,this.signed=!0,this.isMutable.charsets=!1,this.isMutable.signed=!0,this.isMutable.upper=!0,this.utils.validateArgs(t,!0)}encode(t,...e){const i=this.utils.validateArgs(e);let n,r;[n,r]=this.utils.inputHandler.toBytes(t,i);let s=this.converter.encode(n,null,i.littleEndian)[0],o=BigInt(s);if(o>Number.MAX_SAFE_INTEGER)throw new RangeError("Invalid string length.");o>16777216&&console.warn("The string length is really long. The JavaScript engine may have memory issues generating the output string."),o=Number(o);const a=this.charsets[i.version],l=a.length;let h="";if(1===l)h=a.at(0).repeat(o);else if("all"===i.version)for(let t=0;t4&&(h=a.at(1).repeat((o-t)/5)),h+=a.at(0).repeat(t)}else for(let t=0;t(t=t.replace(/^0x/,""),e.integrity||(t=t.toLowerCase().replace(/[^0-9a-f]/g,"")),t.length%2&&(t="0".concat(t)),t)),null,!1,...e)}}export{u as default}; diff --git a/dist/converters/Base16/base-16.iife.js b/dist/converters/Base16/base-16.iife.js index 8dccd03..334165c 100644 --- a/dist/converters/Base16/base-16.iife.js +++ b/dist/converters/Base16/base-16.iife.js @@ -1454,7 +1454,7 @@ var Base16 = (function () { /** * [BaseEx|Base16 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-16.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/Base16/base-16.iife.min.js b/dist/converters/Base16/base-16.iife.min.js index aeddf99..a6214f6 100644 --- a/dist/converters/Base16/base-16.iife.min.js +++ b/dist/converters/Base16/base-16.iife.min.js @@ -2,7 +2,7 @@ var Base16=function(){"use strict";class t{static toBytes(t){return ArrayBuffer. /** * [BaseEx|Base16 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-16.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */return class extends h{constructor(...t){super(),this.converter=new l(16,1,2),this.charsets.default=[..."0123456789abcdef"],this.padChars.default=[],this.hasSignedMode=!0,this.isMutable.signed=!0,this.isMutable.upper=!0,this.utils.validateArgs(t,!0)}encode(t,...e){return super.encode(t,null,null,...e)}decode(t,...e){return super.decode(t,(({input:t,settings:e})=>(t=t.replace(/^0x/,""),e.integrity||(t=t.toLowerCase().replace(/[^0-9a-f]/g,"")),t.length%2&&(t="0".concat(t)),t)),null,!1,...e)}}}(); diff --git a/dist/converters/Base2048/base-2048.esm.js b/dist/converters/Base2048/base-2048.esm.js index df52f40..d5f9adb 100644 --- a/dist/converters/Base2048/base-2048.esm.js +++ b/dist/converters/Base2048/base-2048.esm.js @@ -1101,7 +1101,7 @@ class BaseTemplate { /** * [BaseEx|Base2048 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-2048.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND MIT (Base2048, Copyright (c) 2017 qntm) */ diff --git a/dist/converters/Base2048/base-2048.esm.min.js b/dist/converters/Base2048/base-2048.esm.min.js index 0cf6dcf..6554730 100644 --- a/dist/converters/Base2048/base-2048.esm.min.js +++ b/dist/converters/Base2048/base-2048.esm.min.js @@ -2,7 +2,7 @@ class t{static toBytes(t){return ArrayBuffer.isView(t)&&(t=t.buffer),[new Uint8A /** * [BaseEx|Base2048 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-2048.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND MIT (Base2048, Copyright (c) 2017 qntm) */class h extends l{constructor(...t){super(),this.converter={radix:2048,bsEnc:11,bsEncPad:3,bsDec:8},this.charsets.default=[..."89ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÆÐØÞßæðøþĐđĦħıĸŁłŊŋŒœŦŧƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƢƣƤƥƦƧƨƩƪƫƬƭƮƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃǝǤǥǶǷȜȝȠȡȢȣȤȥȴȵȶȷȸȹȺȻȼȽȾȿɀɁɂɃɄɅɆɇɈɉɊɋɌɍɎɏɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯͰͱͲͳͶͷͻͼͽͿΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϏϗϘϙϚϛϜϝϞϟϠϡϢϣϤϥϦϧϨϩϪϫϬϭϮϯϳϷϸϺϻϼϽϾϿЂЄЅІЈЉЊЋЏАБВГДЕЖЗИКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзиклмнопрстуфхцчшщъыьэюяђєѕіјљњћџѠѡѢѣѤѥѦѧѨѩѪѫѬѭѮѯѰѱѲѳѴѵѸѹѺѻѼѽѾѿҀҁҊҋҌҍҎҏҐґҒғҔҕҖҗҘҙҚқҜҝҞҟҠҡҢңҤҥҦҧҨҩҪҫҬҭҮүҰұҲҳҴҵҶҷҸҹҺһҼҽҾҿӀӃӄӅӆӇӈӉӊӋӌӍӎӏӔӕӘәӠӡӨөӶӷӺӻӼӽӾӿԀԁԂԃԄԅԆԇԈԉԊԋԌԍԎԏԐԑԒԓԔԕԖԗԘԙԚԛԜԝԞԟԠԡԢԣԤԥԦԧԨԩԪԫԬԭԮԯԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖաբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆאבגדהוזחטיךכלםמןנסעףפץצקרשתװױײؠءابةتثجحخدذرزسشصضطظعغػؼؽؾؿفقكلمنهوىي٠١٢٣٤٥٦٧٨٩ٮٯٱٲٳٴٹٺٻټٽپٿڀځڂڃڄڅچڇڈډڊڋڌڍڎڏڐڑڒړڔڕږڗژڙښڛڜڝڞڟڠڡڢڣڤڥڦڧڨکڪګڬڭڮگڰڱڲڳڴڵڶڷڸڹںڻڼڽھڿہۃۄۅۆۇۈۉۊۋیۍێۏېۑےەۮۯ۰۱۲۳۴۵۶۷۸۹ۺۻۼۿܐܒܓܔܕܖܗܘܙܚܛܜܝܞܟܠܡܢܣܤܥܦܧܨܩܪܫܬܭܮܯݍݎݏݐݑݒݓݔݕݖݗݘݙݚݛݜݝݞݟݠݡݢݣݤݥݦݧݨݩݪݫݬݭݮݯݰݱݲݳݴݵݶݷݸݹݺݻݼݽݾݿހށނރބޅކއވމފދތލގޏސޑޒޓޔޕޖޗޘޙޚޛޜޝޞޟޠޡޢޣޤޥޱ߀߁߂߃߄߅߆߇߈߉ߊߋߌߍߎߏߐߑߒߓߔߕߖߗߘߙߚߛߜߝߞߟߠߡߢߣߤߥߦߧߨߩߪࠀࠁࠂࠃࠄࠅࠆࠇࠈࠉࠊࠋࠌࠍࠎࠏࠐࠑࠒࠓࠔࠕࡀࡁࡂࡃࡄࡅࡆࡇࡈࡉࡊࡋࡌࡍࡎࡏࡐࡑࡒࡓࡔࡕࡖࡗࡘࡠࡡࡢࡣࡤࡥࡦࡧࡨࡩࡪࢠࢡࢢࢣࢤࢥࢦࢧࢨࢩࢪࢫࢬࢭࢮࢯࢰࢱࢲࢳࢴࢶࢷࢸࢹࢺࢻࢼࢽऄअआइईउऊऋऌऍऎएऐऑऒओऔकखगघङचछजझञटठडढणतथदधनपफबभमयरलळवशषसहऽॐॠॡ०१२३४५६७८९ॲॳॴॵॶॷॸॹॺॻॼॽॾॿঀঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহঽৎৠৡ০১২৩৪৫৬৭৮৯ৰৱ৴৵৶৷৸৹ৼਅਆਇਈਉਊਏਐਓਔਕਖਗਘਙਚਛਜਝਞਟਠਡਢਣਤਥਦਧਨਪਫਬਭਮਯਰਲਵਸਹੜ੦੧੨੩੪੫੬੭੮੯ੲੳੴઅઆઇઈઉઊઋઌઍએઐઑઓઔકખગઘઙચછજઝઞટઠડઢણતથદધનપફબભમયરલળવશષસહઽૐૠૡ૦૧૨૩૪૫૬૭૮૯ૹଅଆଇଈଉଊଋଌଏଐଓଔକଖଗଘଙଚଛଜଝଞଟଠଡଢଣତଥଦଧନପଫବଭମଯରଲଳଵଶଷସହଽୟୠୡ୦୧୨୩୪୫୬୭୮୯ୱ୲୳୴୵୶୷ஃஅஆஇஈஉஊஎஏஐஒஓகஙசஜஞடணதநனபமயரறலளழவஶஷஸஹௐ௦௧௨௩௪௫௬௭௮௯௰௱௲అఆఇఈఉఊఋఌఎఏఐఒఓఔకఖగఘఙచఛజఝఞటఠడఢణతథదధనపఫబభమయరఱలళఴవశషసహఽౘౙౚౠౡ౦౧౨౩౪౫౬౭౮౯౸౹౺౻౼౽౾ಀಅಆಇಈಉಊಋಌಎಏಐಒಓಔಕಖಗಘಙಚಛಜಝಞಟಠಡಢಣತಥದಧನಪಫಬಭಮಯರಱಲಳವಶಷಸಹಽೞೠೡ೦೧೨೩೪೫೬೭೮೯ೱೲഅആഇഈഉഊഋഌഎഏഐഒഓഔകഖഗഘങചഛജഝഞടഠഡഢണതഥദധനഩപഫബഭമയരറലളഴവശഷസഹഺഽൎൔൕൖ൘൙൚൛൜൝൞ൟൠൡ൦൧൨൩൪൫൬൭൮൯൰൱൲൳൴൵൶൷൸ൺൻർൽൾൿඅආඇඈඉඊඋඌඍඎඏඐඑඒඓඔඕඖකඛගඝඞඟචඡජඣඤඥඦටඨඩඪණඬතථදධනඳපඵබභමඹයරලවශෂසහළෆ෦෧෨෩෪෫෬෭෮෯กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะาเแโใไๅ๐๑๒๓๔๕๖๗๘๙ກຂຄງຈຊຍດຕຖທນບປຜຝພຟມຢຣລວສຫອຮຯະາຽເແໂໃໄ໐໑໒໓໔໕໖໗໘໙ໞໟༀ༠༡༢༣༤༥༦༧༨༩༪༫༬༭༮༯༰༱༲༳ཀཁགངཅཆཇཉཊཋཌཎཏཐདནཔཕབམཙཚཛཝཞཟའཡརལཤཥསཧཨཪཫཬྈྉྊྋྌကခဂဃငစဆဇဈဉညဋဌဍဎဏတထဒဓနပဖဗဘမယရလဝသဟဠအဢဣဤဥဧဨဩဪဿ၀၁၂၃၄၅၆၇၈၉ၐၑၒၓၔၕ"],this.padChars.default=[..."01234567"],this.padCharAmount=8,this.hasSignedMode=!0,this.littleEndian=!1,this.utils.validateArgs(t,!0)}encode(t,...e){const r=this.utils.validateArgs(e);let i=this.utils.inputHandler.toBytes(t,r).at(0);const n=this.charsets[r.version],s=this.padChars[r.version];let o="",a=0,l=0;if(i.forEach((t=>{for(let e=this.converter.bsDec-1;e>=0;e--)a=(a<<1)+(t>>e&1),l++,l===this.converter.bsEnc&&(o+=n.at(a),a=0,l=0)})),0!==l){let t,e;for(l<=this.converter.bsEncPad?(t=this.converter.bsEncPad,e=!0):(t=this.converter.bsEnc,e=!1);l!==t;)if(a=1+(a<<1),l++,l>this.converter.bsEnc)throw new Error("Cannot process input. This is a bug!");o+=e?s.at(a):n.at(a)}return this.utils.wrapOutput(o,r.options.lineWrap)}decode(t,...e){const r=this.utils.validateArgs(e);t=this.utils.normalizeInput(t);const i=[...t],n=this.charsets[r.version],s=this.padChars[r.version],a=new Array;let l=0,h=0;return i.forEach(((t,e)=>{let u,c=n.indexOf(t);if(c>-1)u=this.converter.bsEnc;else if(c=s.indexOf(t),c>-1){if(e+1!==i.length)throw new o(null,`Secondary character found before end of input, index: ${e}`);u=this.converter.bsEncPad}else if(r.integrity)throw new o(t);for(let t=u-1;t>=0;t--)l=(l<<1)+(c>>t&1),h++,h===this.converter.bsDec&&(a.push(l),l=0,h=0)})),this.utils.outputHandler.compile(Uint8Array.from(a),r.outputType)}}export{h as default}; diff --git a/dist/converters/Base2048/base-2048.iife.js b/dist/converters/Base2048/base-2048.iife.js index 3ba6f26..527f1fe 100644 --- a/dist/converters/Base2048/base-2048.iife.js +++ b/dist/converters/Base2048/base-2048.iife.js @@ -1104,7 +1104,7 @@ var Base2048 = (function () { /** * [BaseEx|Base2048 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-2048.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND MIT (Base2048, Copyright (c) 2017 qntm) */ diff --git a/dist/converters/Base2048/base-2048.iife.min.js b/dist/converters/Base2048/base-2048.iife.min.js index 1c43e37..893b587 100644 --- a/dist/converters/Base2048/base-2048.iife.min.js +++ b/dist/converters/Base2048/base-2048.iife.min.js @@ -2,7 +2,7 @@ var Base2048=function(){"use strict";class t{static toBytes(t){return ArrayBuffe /** * [BaseEx|Base2048 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-2048.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND MIT (Base2048, Copyright (c) 2017 qntm) */return class extends h{constructor(...t){super(),this.converter={radix:2048,bsEnc:11,bsEncPad:3,bsDec:8},this.charsets.default=[..."89ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÆÐØÞßæðøþĐđĦħıĸŁłŊŋŒœŦŧƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƢƣƤƥƦƧƨƩƪƫƬƭƮƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃǝǤǥǶǷȜȝȠȡȢȣȤȥȴȵȶȷȸȹȺȻȼȽȾȿɀɁɂɃɄɅɆɇɈɉɊɋɌɍɎɏɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯͰͱͲͳͶͷͻͼͽͿΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϏϗϘϙϚϛϜϝϞϟϠϡϢϣϤϥϦϧϨϩϪϫϬϭϮϯϳϷϸϺϻϼϽϾϿЂЄЅІЈЉЊЋЏАБВГДЕЖЗИКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзиклмнопрстуфхцчшщъыьэюяђєѕіјљњћџѠѡѢѣѤѥѦѧѨѩѪѫѬѭѮѯѰѱѲѳѴѵѸѹѺѻѼѽѾѿҀҁҊҋҌҍҎҏҐґҒғҔҕҖҗҘҙҚқҜҝҞҟҠҡҢңҤҥҦҧҨҩҪҫҬҭҮүҰұҲҳҴҵҶҷҸҹҺһҼҽҾҿӀӃӄӅӆӇӈӉӊӋӌӍӎӏӔӕӘәӠӡӨөӶӷӺӻӼӽӾӿԀԁԂԃԄԅԆԇԈԉԊԋԌԍԎԏԐԑԒԓԔԕԖԗԘԙԚԛԜԝԞԟԠԡԢԣԤԥԦԧԨԩԪԫԬԭԮԯԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖաբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆאבגדהוזחטיךכלםמןנסעףפץצקרשתװױײؠءابةتثجحخدذرزسشصضطظعغػؼؽؾؿفقكلمنهوىي٠١٢٣٤٥٦٧٨٩ٮٯٱٲٳٴٹٺٻټٽپٿڀځڂڃڄڅچڇڈډڊڋڌڍڎڏڐڑڒړڔڕږڗژڙښڛڜڝڞڟڠڡڢڣڤڥڦڧڨکڪګڬڭڮگڰڱڲڳڴڵڶڷڸڹںڻڼڽھڿہۃۄۅۆۇۈۉۊۋیۍێۏېۑےەۮۯ۰۱۲۳۴۵۶۷۸۹ۺۻۼۿܐܒܓܔܕܖܗܘܙܚܛܜܝܞܟܠܡܢܣܤܥܦܧܨܩܪܫܬܭܮܯݍݎݏݐݑݒݓݔݕݖݗݘݙݚݛݜݝݞݟݠݡݢݣݤݥݦݧݨݩݪݫݬݭݮݯݰݱݲݳݴݵݶݷݸݹݺݻݼݽݾݿހށނރބޅކއވމފދތލގޏސޑޒޓޔޕޖޗޘޙޚޛޜޝޞޟޠޡޢޣޤޥޱ߀߁߂߃߄߅߆߇߈߉ߊߋߌߍߎߏߐߑߒߓߔߕߖߗߘߙߚߛߜߝߞߟߠߡߢߣߤߥߦߧߨߩߪࠀࠁࠂࠃࠄࠅࠆࠇࠈࠉࠊࠋࠌࠍࠎࠏࠐࠑࠒࠓࠔࠕࡀࡁࡂࡃࡄࡅࡆࡇࡈࡉࡊࡋࡌࡍࡎࡏࡐࡑࡒࡓࡔࡕࡖࡗࡘࡠࡡࡢࡣࡤࡥࡦࡧࡨࡩࡪࢠࢡࢢࢣࢤࢥࢦࢧࢨࢩࢪࢫࢬࢭࢮࢯࢰࢱࢲࢳࢴࢶࢷࢸࢹࢺࢻࢼࢽऄअआइईउऊऋऌऍऎएऐऑऒओऔकखगघङचछजझञटठडढणतथदधनपफबभमयरलळवशषसहऽॐॠॡ०१२३४५६७८९ॲॳॴॵॶॷॸॹॺॻॼॽॾॿঀঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহঽৎৠৡ০১২৩৪৫৬৭৮৯ৰৱ৴৵৶৷৸৹ৼਅਆਇਈਉਊਏਐਓਔਕਖਗਘਙਚਛਜਝਞਟਠਡਢਣਤਥਦਧਨਪਫਬਭਮਯਰਲਵਸਹੜ੦੧੨੩੪੫੬੭੮੯ੲੳੴઅઆઇઈઉઊઋઌઍએઐઑઓઔકખગઘઙચછજઝઞટઠડઢણતથદધનપફબભમયરલળવશષસહઽૐૠૡ૦૧૨૩૪૫૬૭૮૯ૹଅଆଇଈଉଊଋଌଏଐଓଔକଖଗଘଙଚଛଜଝଞଟଠଡଢଣତଥଦଧନପଫବଭମଯରଲଳଵଶଷସହଽୟୠୡ୦୧୨୩୪୫୬୭୮୯ୱ୲୳୴୵୶୷ஃஅஆஇஈஉஊஎஏஐஒஓகஙசஜஞடணதநனபமயரறலளழவஶஷஸஹௐ௦௧௨௩௪௫௬௭௮௯௰௱௲అఆఇఈఉఊఋఌఎఏఐఒఓఔకఖగఘఙచఛజఝఞటఠడఢణతథదధనపఫబభమయరఱలళఴవశషసహఽౘౙౚౠౡ౦౧౨౩౪౫౬౭౮౯౸౹౺౻౼౽౾ಀಅಆಇಈಉಊಋಌಎಏಐಒಓಔಕಖಗಘಙಚಛಜಝಞಟಠಡಢಣತಥದಧನಪಫಬಭಮಯರಱಲಳವಶಷಸಹಽೞೠೡ೦೧೨೩೪೫೬೭೮೯ೱೲഅആഇഈഉഊഋഌഎഏഐഒഓഔകഖഗഘങചഛജഝഞടഠഡഢണതഥദധനഩപഫബഭമയരറലളഴവശഷസഹഺഽൎൔൕൖ൘൙൚൛൜൝൞ൟൠൡ൦൧൨൩൪൫൬൭൮൯൰൱൲൳൴൵൶൷൸ൺൻർൽൾൿඅආඇඈඉඊඋඌඍඎඏඐඑඒඓඔඕඖකඛගඝඞඟචඡජඣඤඥඦටඨඩඪණඬතථදධනඳපඵබභමඹයරලවශෂසහළෆ෦෧෨෩෪෫෬෭෮෯กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะาเแโใไๅ๐๑๒๓๔๕๖๗๘๙ກຂຄງຈຊຍດຕຖທນບປຜຝພຟມຢຣລວສຫອຮຯະາຽເແໂໃໄ໐໑໒໓໔໕໖໗໘໙ໞໟༀ༠༡༢༣༤༥༦༧༨༩༪༫༬༭༮༯༰༱༲༳ཀཁགངཅཆཇཉཊཋཌཎཏཐདནཔཕབམཙཚཛཝཞཟའཡརལཤཥསཧཨཪཫཬྈྉྊྋྌကခဂဃငစဆဇဈဉညဋဌဍဎဏတထဒဓနပဖဗဘမယရလဝသဟဠအဢဣဤဥဧဨဩဪဿ၀၁၂၃၄၅၆၇၈၉ၐၑၒၓၔၕ"],this.padChars.default=[..."01234567"],this.padCharAmount=8,this.hasSignedMode=!0,this.littleEndian=!1,this.utils.validateArgs(t,!0)}encode(t,...e){const r=this.utils.validateArgs(e);let i=this.utils.inputHandler.toBytes(t,r).at(0);const n=this.charsets[r.version],s=this.padChars[r.version];let o="",a=0,h=0;if(i.forEach((t=>{for(let e=this.converter.bsDec-1;e>=0;e--)a=(a<<1)+(t>>e&1),h++,h===this.converter.bsEnc&&(o+=n.at(a),a=0,h=0)})),0!==h){let t,e;for(h<=this.converter.bsEncPad?(t=this.converter.bsEncPad,e=!0):(t=this.converter.bsEnc,e=!1);h!==t;)if(a=1+(a<<1),h++,h>this.converter.bsEnc)throw new Error("Cannot process input. This is a bug!");o+=e?s.at(a):n.at(a)}return this.utils.wrapOutput(o,r.options.lineWrap)}decode(t,...e){const r=this.utils.validateArgs(e);t=this.utils.normalizeInput(t);const i=[...t],n=this.charsets[r.version],s=this.padChars[r.version],a=new Array;let h=0,l=0;return i.forEach(((t,e)=>{let u,c=n.indexOf(t);if(c>-1)u=this.converter.bsEnc;else if(c=s.indexOf(t),c>-1){if(e+1!==i.length)throw new o(null,`Secondary character found before end of input, index: ${e}`);u=this.converter.bsEncPad}else if(r.integrity)throw new o(t);for(let t=u-1;t>=0;t--)h=(h<<1)+(c>>t&1),l++,l===this.converter.bsDec&&(a.push(h),h=0,l=0)})),this.utils.outputHandler.compile(Uint8Array.from(a),r.outputType)}}}(); diff --git a/dist/converters/Base32/base-32.esm.js b/dist/converters/Base32/base-32.esm.js index 1687950..4de694c 100644 --- a/dist/converters/Base32/base-32.esm.js +++ b/dist/converters/Base32/base-32.esm.js @@ -1451,7 +1451,7 @@ class BaseTemplate { /** * [BaseEx|Base32 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-32.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/Base32/base-32.esm.min.js b/dist/converters/Base32/base-32.esm.min.js index f87897c..8051db2 100644 --- a/dist/converters/Base32/base-32.esm.min.js +++ b/dist/converters/Base32/base-32.esm.min.js @@ -2,7 +2,7 @@ class t{static toBytes(t){return ArrayBuffer.isView(t)&&(t=t.buffer),[new Uint8A /** * [BaseEx|Base32 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-32.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */class u extends l{constructor(...t){super(),this.converter=new h(32,5,8),this.charsets.crockford=[..."0123456789abcdefghjkmnpqrstvwxyz"],this.padChars.crockford=["="],this.charsets.rfc3548=[..."abcdefghijklmnopqrstuvwxyz234567"],this.padChars.rfc3548=["="],this.charsets.rfc4648=[..."0123456789abcdefghijklmnopqrstuv"],this.padChars.rfc4648=["="],this.charsets.zbase32=[..."ybndrfg8ejkmcpqxot1uwisza345h769"],this.padChars.zbase32=["="],this.padCharAmount=1,this.hasSignedMode=!0,this.version="rfc4648",this.isMutable.littleEndian=!0,this.isMutable.padding=!0,this.isMutable.signed=!0,this.isMutable.upper=!0,this.utils.validateArgs(t,!0),this.padding=/rfc3548|rfc4648/.test(this.version),this.upper="crockford"===this.version}encode(t,...e){return super.encode(t,null,(({output:t,settings:e,zeroPadding:r})=>{if(!e.littleEndian&&r){const i=this.converter.padBytes(r),n=this.padChars[e.version].at(0);t=t.slice(0,-i),e.padding&&(t=t.concat(n.repeat(i)))}return t}),...e)}decode(t,...e){return super.decode(t,null,null,!1,...e)}}export{u as default}; diff --git a/dist/converters/Base32/base-32.iife.js b/dist/converters/Base32/base-32.iife.js index 9a6c63b..77d3e08 100644 --- a/dist/converters/Base32/base-32.iife.js +++ b/dist/converters/Base32/base-32.iife.js @@ -1454,7 +1454,7 @@ var Base32 = (function () { /** * [BaseEx|Base32 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-32.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/Base32/base-32.iife.min.js b/dist/converters/Base32/base-32.iife.min.js index 644fdb2..7c1d6cd 100644 --- a/dist/converters/Base32/base-32.iife.min.js +++ b/dist/converters/Base32/base-32.iife.min.js @@ -2,7 +2,7 @@ var Base32=function(){"use strict";class t{static toBytes(t){return ArrayBuffer. /** * [BaseEx|Base32 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-32.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */return class extends l{constructor(...t){super(),this.converter=new h(32,5,8),this.charsets.crockford=[..."0123456789abcdefghjkmnpqrstvwxyz"],this.padChars.crockford=["="],this.charsets.rfc3548=[..."abcdefghijklmnopqrstuvwxyz234567"],this.padChars.rfc3548=["="],this.charsets.rfc4648=[..."0123456789abcdefghijklmnopqrstuv"],this.padChars.rfc4648=["="],this.charsets.zbase32=[..."ybndrfg8ejkmcpqxot1uwisza345h769"],this.padChars.zbase32=["="],this.padCharAmount=1,this.hasSignedMode=!0,this.version="rfc4648",this.isMutable.littleEndian=!0,this.isMutable.padding=!0,this.isMutable.signed=!0,this.isMutable.upper=!0,this.utils.validateArgs(t,!0),this.padding=/rfc3548|rfc4648/.test(this.version),this.upper="crockford"===this.version}encode(t,...e){return super.encode(t,null,(({output:t,settings:e,zeroPadding:r})=>{if(!e.littleEndian&&r){const i=this.converter.padBytes(r),n=this.padChars[e.version].at(0);t=t.slice(0,-i),e.padding&&(t=t.concat(n.repeat(i)))}return t}),...e)}decode(t,...e){return super.decode(t,null,null,!1,...e)}}}(); diff --git a/dist/converters/Base58/base-58.esm.js b/dist/converters/Base58/base-58.esm.js index 5923761..22428b2 100644 --- a/dist/converters/Base58/base-58.esm.js +++ b/dist/converters/Base58/base-58.esm.js @@ -1451,7 +1451,7 @@ class BaseTemplate { /** * [BaseEx|Base58 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-58.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/Base58/base-58.esm.min.js b/dist/converters/Base58/base-58.esm.min.js index 462ebf2..8b35301 100644 --- a/dist/converters/Base58/base-58.esm.min.js +++ b/dist/converters/Base58/base-58.esm.min.js @@ -2,7 +2,7 @@ class t{static toBytes(t){return ArrayBuffer.isView(t)&&(t=t.buffer),[new Uint8A /** * [BaseEx|Base58 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-58.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */class u extends l{constructor(...t){super(),this.converter=new h(58,0,0),this.charsets.default=[..."123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],Object.defineProperty(this.padChars,"default",{get:()=>[this.charsets.default.at(0)]}),this.charsets.bitcoin=[..."123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],Object.defineProperty(this.padChars,"bitcoin",{get:()=>[this.charsets.bitcoin.at(0)]}),this.charsets.flickr=[..."123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],Object.defineProperty(this.padChars,"flickr",{get:()=>[this.charsets.flickr.at(0)]}),this.padding=!0,this.version="bitcoin",this.isMutable.padding=!0,this.isMutable.signed=!0,this.utils.validateArgs(t,!0)}encode(t,...e){return super.encode(t,null,(({inputBytes:t,output:e,settings:i,type:n})=>{if(i.padding&&"int"!==n){let n=0;const r=t.length,s=this.charsets[i.version].at(0);if(r){for(;!t[n];)if(n++,n===r){n=0;break}const i=n;i&&(e=s.repeat(i).concat(e))}}return e}),...e)}decode(t,...e){return super.decode(t,null,(({input:t,output:e,settings:i})=>{const n=this.charsets[i.version].at(0);if(i.padding&&t.length>1){let i=0;for(;t[i]===n;)i++;const r=i;r&&(e=Uint8Array.from([...new Array(r).fill(0),...e]))}return e}),!1,...e)}}export{u as default}; diff --git a/dist/converters/Base58/base-58.iife.js b/dist/converters/Base58/base-58.iife.js index d483558..dc7785f 100644 --- a/dist/converters/Base58/base-58.iife.js +++ b/dist/converters/Base58/base-58.iife.js @@ -1454,7 +1454,7 @@ var Base58 = (function () { /** * [BaseEx|Base58 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-58.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/Base58/base-58.iife.min.js b/dist/converters/Base58/base-58.iife.min.js index d44abf8..f175dc4 100644 --- a/dist/converters/Base58/base-58.iife.min.js +++ b/dist/converters/Base58/base-58.iife.min.js @@ -2,7 +2,7 @@ var Base58=function(){"use strict";class t{static toBytes(t){return ArrayBuffer. /** * [BaseEx|Base58 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-58.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */return class extends l{constructor(...t){super(),this.converter=new h(58,0,0),this.charsets.default=[..."123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],Object.defineProperty(this.padChars,"default",{get:()=>[this.charsets.default.at(0)]}),this.charsets.bitcoin=[..."123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],Object.defineProperty(this.padChars,"bitcoin",{get:()=>[this.charsets.bitcoin.at(0)]}),this.charsets.flickr=[..."123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],Object.defineProperty(this.padChars,"flickr",{get:()=>[this.charsets.flickr.at(0)]}),this.padding=!0,this.version="bitcoin",this.isMutable.padding=!0,this.isMutable.signed=!0,this.utils.validateArgs(t,!0)}encode(t,...e){return super.encode(t,null,(({inputBytes:t,output:e,settings:i,type:n})=>{if(i.padding&&"int"!==n){let n=0;const r=t.length,s=this.charsets[i.version].at(0);if(r){for(;!t[n];)if(n++,n===r){n=0;break}const i=n;i&&(e=s.repeat(i).concat(e))}}return e}),...e)}decode(t,...e){return super.decode(t,null,(({input:t,output:e,settings:i})=>{const n=this.charsets[i.version].at(0);if(i.padding&&t.length>1){let i=0;for(;t[i]===n;)i++;const r=i;r&&(e=Uint8Array.from([...new Array(r).fill(0),...e]))}return e}),!1,...e)}}}(); diff --git a/dist/converters/Base64/base-64.esm.js b/dist/converters/Base64/base-64.esm.js index 8f3ee87..0983aa1 100644 --- a/dist/converters/Base64/base-64.esm.js +++ b/dist/converters/Base64/base-64.esm.js @@ -1451,7 +1451,7 @@ class BaseTemplate { /** * [BaseEx|Base64 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-64.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/Base64/base-64.esm.min.js b/dist/converters/Base64/base-64.esm.min.js index 5fa9ca2..ba3a033 100644 --- a/dist/converters/Base64/base-64.esm.min.js +++ b/dist/converters/Base64/base-64.esm.min.js @@ -2,7 +2,7 @@ class t{static toBytes(t){return ArrayBuffer.isView(t)&&(t=t.buffer),[new Uint8A /** * [BaseEx|Base64 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-64.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */class u extends h{constructor(...t){super(),this.converter=new l(64,3,4),this.charsets.default=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],this.padChars.default=["="],this.charsets.urlsafe=this.charsets.default.slice(0,-2).concat(["-","_"]),this.padChars.urlsafe=["="],this.padCharAmount=1,this.padding=!0,this.isMutable.padding=!0,this.utils.validateArgs(t,!0)}encode(t,...e){return super.encode(t,null,(({output:t,settings:e,zeroPadding:n})=>{if(n){const r=this.converter.padBytes(n),i=this.padChars[e.version].at(0);t=t.slice(0,-r),e.padding&&(t=t.concat(i.repeat(r)))}return t}),...e)}decode(t,...e){return super.decode(t,null,null,!1,...e)}}export{u as default}; diff --git a/dist/converters/Base64/base-64.iife.js b/dist/converters/Base64/base-64.iife.js index 2b3bab1..fe9884c 100644 --- a/dist/converters/Base64/base-64.iife.js +++ b/dist/converters/Base64/base-64.iife.js @@ -1454,7 +1454,7 @@ var Base64 = (function () { /** * [BaseEx|Base64 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-64.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/Base64/base-64.iife.min.js b/dist/converters/Base64/base-64.iife.min.js index 04e8b3e..1a11284 100644 --- a/dist/converters/Base64/base-64.iife.min.js +++ b/dist/converters/Base64/base-64.iife.min.js @@ -2,7 +2,7 @@ var Base64=function(){"use strict";class t{static toBytes(t){return ArrayBuffer. /** * [BaseEx|Base64 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-64.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */return class extends h{constructor(...t){super(),this.converter=new l(64,3,4),this.charsets.default=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],this.padChars.default=["="],this.charsets.urlsafe=this.charsets.default.slice(0,-2).concat(["-","_"]),this.padChars.urlsafe=["="],this.padCharAmount=1,this.padding=!0,this.isMutable.padding=!0,this.utils.validateArgs(t,!0)}encode(t,...e){return super.encode(t,null,(({output:t,settings:e,zeroPadding:n})=>{if(n){const r=this.converter.padBytes(n),i=this.padChars[e.version].at(0);t=t.slice(0,-r),e.padding&&(t=t.concat(i.repeat(r)))}return t}),...e)}decode(t,...e){return super.decode(t,null,null,!1,...e)}}}(); diff --git a/dist/converters/Base85/base-85.esm.js b/dist/converters/Base85/base-85.esm.js index 28f1192..1d9633d 100644 --- a/dist/converters/Base85/base-85.esm.js +++ b/dist/converters/Base85/base-85.esm.js @@ -1451,7 +1451,7 @@ class BaseTemplate { /** * [BaseEx|Base85 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-85.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/Base85/base-85.esm.min.js b/dist/converters/Base85/base-85.esm.min.js index 58ab20f..fe61bb4 100644 --- a/dist/converters/Base85/base-85.esm.min.js +++ b/dist/converters/Base85/base-85.esm.min.js @@ -2,7 +2,7 @@ class t{static toBytes(t){return ArrayBuffer.isView(t)&&(t=t.buffer),[new Uint8A /** * [BaseEx|Base85 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-85.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */class u extends h{constructor(...t){super(),this.converter=new l(85,4,5,84),this.charsets.adobe=[..."!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstu"],this.charsets.ascii85=this.charsets.adobe.slice(),this.charsets.rfc1924=[..."0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~"],this.charsets.z85=[..."0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#"],this.version="ascii85",this.utils.validateArgs(t,!0)}encode(t,...e){return super.encode(t,(t=>{let e;return t.version.match(/adobe|ascii85/)&&(e=(t,e)=>e||"!!!!!"!==t?t:"z"),e}),(({output:t,settings:e,zeroPadding:n})=>{if(n){const e=this.converter.padBytes(n);t=t.slice(0,-e)}return"adobe"===e.version&&(t=`<~${t}~>`),t}),...e)}decode(t,...e){return super.decode(t,(({input:t,settings:e})=>(e.version.match(/adobe|ascii85/)&&(t=t.replace(/z/g,"!!!!!"),"adobe"===e.version&&(t=t.replace(/^<~|~>$/g,""))),t)),null,!1,...e)}}export{u as default}; diff --git a/dist/converters/Base85/base-85.iife.js b/dist/converters/Base85/base-85.iife.js index 0b1cb37..3b5b8cf 100644 --- a/dist/converters/Base85/base-85.iife.js +++ b/dist/converters/Base85/base-85.iife.js @@ -1454,7 +1454,7 @@ var Base85 = (function () { /** * [BaseEx|Base85 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-85.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/Base85/base-85.iife.min.js b/dist/converters/Base85/base-85.iife.min.js index 422b1ea..339afc5 100644 --- a/dist/converters/Base85/base-85.iife.min.js +++ b/dist/converters/Base85/base-85.iife.min.js @@ -2,7 +2,7 @@ var Base85=function(){"use strict";class t{static toBytes(t){return ArrayBuffer. /** * [BaseEx|Base85 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-85.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */return class extends h{constructor(...t){super(),this.converter=new l(85,4,5,84),this.charsets.adobe=[..."!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstu"],this.charsets.ascii85=this.charsets.adobe.slice(),this.charsets.rfc1924=[..."0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~"],this.charsets.z85=[..."0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#"],this.version="ascii85",this.utils.validateArgs(t,!0)}encode(t,...e){return super.encode(t,(t=>{let e;return t.version.match(/adobe|ascii85/)&&(e=(t,e)=>e||"!!!!!"!==t?t:"z"),e}),(({output:t,settings:e,zeroPadding:n})=>{if(n){const e=this.converter.padBytes(n);t=t.slice(0,-e)}return"adobe"===e.version&&(t=`<~${t}~>`),t}),...e)}decode(t,...e){return super.decode(t,(({input:t,settings:e})=>(e.version.match(/adobe|ascii85/)&&(t=t.replace(/z/g,"!!!!!"),"adobe"===e.version&&(t=t.replace(/^<~|~>$/g,""))),t)),null,!1,...e)}}}(); diff --git a/dist/converters/Base91/base-91.esm.js b/dist/converters/Base91/base-91.esm.js index 73ad405..2ff1ea4 100644 --- a/dist/converters/Base91/base-91.esm.js +++ b/dist/converters/Base91/base-91.esm.js @@ -1101,7 +1101,7 @@ class BaseTemplate { /** * [BaseEx|Base91 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-91.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND BSD-3-Clause (Base91, Copyright (c) 2000-2006 Joachim Henke) */ diff --git a/dist/converters/Base91/base-91.esm.min.js b/dist/converters/Base91/base-91.esm.min.js index 48635ce..3414eaa 100644 --- a/dist/converters/Base91/base-91.esm.min.js +++ b/dist/converters/Base91/base-91.esm.min.js @@ -2,7 +2,7 @@ class t{static toBytes(t){return ArrayBuffer.isView(t)&&(t=t.buffer),[new Uint8A /** * [BaseEx|Base91 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-91.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND BSD-3-Clause (Base91, Copyright (c) 2000-2006 Joachim Henke) */class h extends l{constructor(...t){super(),this.converter={radix:91,bsEnc:0,bsDec:0},this.charsets.default=[...'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,./:;<=>?@[]^_`{|}~"'],this.version="default",this.utils.validateArgs(t,!0)}encode(t,...e){const i=this.utils.validateArgs(e),n=this.utils.inputHandler.toBytes(t,i)[0];let r=0,s=0,o="";const a=this.charsets[i.version];if(n.forEach((t=>{if(s+=t<13){let t,e,i=13,n=s%8192;n<89&&(i=14,n=s%16384),s>>=i,r-=i,[t,e]=this.#n(n,91),o=`${o}${a[e]}${a[t]}`}})),r){let t,e;[t,e]=this.#n(s,91),o=o.concat(a[e]),(r>7||s>90)&&(o=o.concat(a[t]))}return this.utils.wrapOutput(o,i.options.lineWrap)}decode(t,...e){const i=this.utils.validateArgs(e),n=this.charsets[i.version];t=this.utils.normalizeInput(t);let r=[...t];i.integrity||(r=r.filter((t=>n.includes(t))));let s=r.length,a=!1;s%2&&(a=!0,s--);let l=0,h=0;const u=new Array;for(let t=0;t88?13:14;do{u.push(l%256),l>>=8,h-=8}while(h>7)}if(a){const t=r.at(s),e=n.indexOf(t);u.push(((e<?@[]^_`{|}~"'],this.version="default",this.utils.validateArgs(t,!0)}encode(t,...e){const i=this.utils.validateArgs(e),n=this.utils.inputHandler.toBytes(t,i)[0];let r=0,s=0,o="";const a=this.charsets[i.version];if(n.forEach((t=>{if(s+=t<13){let t,e,i=13,n=s%8192;n<89&&(i=14,n=s%16384),s>>=i,r-=i,[t,e]=this.#n(n,91),o=`${o}${a[e]}${a[t]}`}})),r){let t,e;[t,e]=this.#n(s,91),o=o.concat(a[e]),(r>7||s>90)&&(o=o.concat(a[t]))}return this.utils.wrapOutput(o,i.options.lineWrap)}decode(t,...e){const i=this.utils.validateArgs(e),n=this.charsets[i.version];t=this.utils.normalizeInput(t);let r=[...t];i.integrity||(r=r.filter((t=>n.includes(t))));let s=r.length,a=!1;s%2&&(a=!0,s--);let l=0,u=0;const h=new Array;for(let t=0;t88?13:14;do{h.push(l%256),l>>=8,u-=8}while(u>7)}if(a){const t=r.at(s),e=n.indexOf(t);h.push(((e<{if(!this.#s(o)){for(;t.gt(o);){if([t,e]=this.#o(t,e),t.lte(0))return void console.warn("Could not find an exact base-phi representation. Value is approximated.");r--}r>-1?l.unshift(r):h.push(r),o=o.minus(t),d(t,e,r)}};return d(u,c,f),f=0,l.forEach((t=>{for(;f{for(;f>t;)a+=i[0],f--;a+=i[1],f--})),s&&(a=`-${a}`),a}decode(t,...e){const r=this.utils.validateArgs(e),i=this.charsets[r.version];let n;if([t,n]=this.utils.extractSign(this.utils.normalizeInput(t)),!r.integrity){const e=[...i,"."];t=[...t].filter((t=>e.includes(t))).join("")}const s=t.split(".");if(r.integrity&&s.length>2)throw new o(null,"There are multiple decimal points in the input.");const[a,l]=s;let h=m(0),u=this.#i.minus(1),c=m(1);if([...a].reverse().forEach((t=>{const e=i.indexOf(t);if(1===e)h=h.plus(c);else if(0!==e)throw new o(t);[u,c]=this.#n(u,c)})),l){let t=m(1);c=this.#i.minus(t),[...l].forEach((e=>{const r=i.indexOf(e);if(1===r)h=h.plus(c);else if(0!==r)throw new o(e);[c,t]=this.#o(c,t)}))}if(r.decimalMode)return h.toNumber();h=h.round().toFixed();const f=this.b10.decode(h,[..."0123456789"],[],r.integrity,r.littleEndian);return this.utils.outputHandler.compile(f,r.outputType,r.littleEndian,n)}#s(t){return!t.round(50).abs().toNumber()}#n(t,e){return[e,t.plus(e)]}#o(t,e){return[e.minus(t),t]}}export{E as default}; diff --git a/dist/converters/BasePhi/base-phi.iife.js b/dist/converters/BasePhi/base-phi.iife.js index f4320e5..dd43436 100644 --- a/dist/converters/BasePhi/base-phi.iife.js +++ b/dist/converters/BasePhi/base-phi.iife.js @@ -1459,7 +1459,7 @@ var BasePhi = (function () { /** * [BaseEx|BasePhi Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-phi.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/BasePhi/base-phi.iife.min.js b/dist/converters/BasePhi/base-phi.iife.min.js index a816a24..2085cf4 100644 --- a/dist/converters/BasePhi/base-phi.iife.min.js +++ b/dist/converters/BasePhi/base-phi.iife.min.js @@ -2,7 +2,7 @@ var BasePhi=function(){"use strict";class t{static toBytes(t){return ArrayBuffer /** * [BaseEx|BasePhi Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-phi.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */return class extends h{#i=m("1.618033988749894848204586834365638117720309179805762862135448622705260462818902449707207204189391137484754088075386891752");constructor(...t){super(),this.converter={radix:2,bsEnc:0,bsDec:0},this.b10=new l(10,0,0),this.charsets.default=["0","1"],this.version="default",this.signed=!0,this.hasDecimalMode=!0,this.utils.validateArgs(t,!0)}encode(t,...e){const r=this.utils.validateArgs(e),i=this.charsets[r.version];let n,s,o,a="";if(r.decimalMode){if(!Number.isFinite(t))throw new TypeError("When running the converter in decimal-mode, only input of type 'Number' is allowed.");t<0?(s=!0,o=m(-t)):(s=!1,o=m(t))}else[n,s]=this.utils.inputHandler.toBytes(t,r),o=m(this.b10.encode(n,null,r.littleEndian)[0]);if(o.eq(0)||o.eq(1))return a=i[o.toNumber()],s&&(a=`-${a}`),a;const l=[],h=[];let u=m(1),c=this.#i,f=0;for(;c.lt(o);)[u,c]=this.#n(u,c),f++;const d=(t,e,r)=>{if(!this.#s(o)){for(;t.gt(o);){if([t,e]=this.#o(t,e),t.lte(0))return void console.warn("Could not find an exact base-phi representation. Value is approximated.");r--}r>-1?l.unshift(r):h.push(r),o=o.minus(t),d(t,e,r)}};return d(u,c,f),f=0,l.forEach((t=>{for(;f{for(;f>t;)a+=i[0],f--;a+=i[1],f--})),s&&(a=`-${a}`),a}decode(t,...e){const r=this.utils.validateArgs(e),i=this.charsets[r.version];let n;if([t,n]=this.utils.extractSign(this.utils.normalizeInput(t)),!r.integrity){const e=[...i,"."];t=[...t].filter((t=>e.includes(t))).join("")}const s=t.split(".");if(r.integrity&&s.length>2)throw new o(null,"There are multiple decimal points in the input.");const[a,l]=s;let h=m(0),u=this.#i.minus(1),c=m(1);if([...a].reverse().forEach((t=>{const e=i.indexOf(t);if(1===e)h=h.plus(c);else if(0!==e)throw new o(t);[u,c]=this.#n(u,c)})),l){let t=m(1);c=this.#i.minus(t),[...l].forEach((e=>{const r=i.indexOf(e);if(1===r)h=h.plus(c);else if(0!==r)throw new o(e);[c,t]=this.#o(c,t)}))}if(r.decimalMode)return h.toNumber();h=h.round().toFixed();const f=this.b10.decode(h,[..."0123456789"],[],r.integrity,r.littleEndian);return this.utils.outputHandler.compile(f,r.outputType,r.littleEndian,n)}#s(t){return!t.round(50).abs().toNumber()}#n(t,e){return[e,t.plus(e)]}#o(t,e){return[e.minus(t),t]}}}(); diff --git a/dist/converters/ByteConverter/byte-converter.esm.js b/dist/converters/ByteConverter/byte-converter.esm.js index c234073..7a80761 100644 --- a/dist/converters/ByteConverter/byte-converter.esm.js +++ b/dist/converters/ByteConverter/byte-converter.esm.js @@ -460,7 +460,7 @@ class SmartOutput { /** * [BaseEx|Byte Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/byte-converter.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/ByteConverter/byte-converter.esm.min.js b/dist/converters/ByteConverter/byte-converter.esm.min.js index fe97f6b..a4bff38 100644 --- a/dist/converters/ByteConverter/byte-converter.esm.min.js +++ b/dist/converters/ByteConverter/byte-converter.esm.min.js @@ -2,7 +2,7 @@ class t{static makeDataView(t){const e=new ArrayBuffer(t);return new DataView(e) /** * [BaseEx|Byte Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/byte-converter.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */const n=(()=>{const t=new Uint16Array([1]),e=new Uint8Array(t.buffer);return Boolean(e.at(0))})();class i{constructor(...t){this.littleEndian=n,this.numberMode=!1,this.outputType="buffer",this.utils={validateArgs:(t,n=!1)=>{const i={littleEndian:this.littleEndian,numberMode:this.numberMode,outputType:this.outputType,signed:!1};if(!t.length)return i;t.includes("number")&&(t.splice(t.indexOf("number"),1),i.numberMode=!0,i.outputType="float_n");const r=e.typeList.map((t=>`'${t}'`)).join(", ");if(t.forEach((t=>{if("le"===(t=String(t).toLowerCase()))i.littleEndian=!0;else if("be"===t)i.littleEndian=!1;else{if(!e.typeList.includes(t))throw new TypeError(`Invalid argument: '${t}.\nValid arguments are:\n'le', 'be', ${r}`);i.outputType=t}})),n)for(const t in i)this[t]=i[t];return i}},this.utils.validateArgs(t,!0)}encode(e,...n){const i=this.utils.validateArgs(n);return t.toBytes(e,i)[0]}decode(t,...n){const i=this.utils.validateArgs(n);return e.compile(t,i.outputType,i.littleEndian)}}export{i as default}; diff --git a/dist/converters/ByteConverter/byte-converter.iife.js b/dist/converters/ByteConverter/byte-converter.iife.js index dfbe735..05f97f8 100644 --- a/dist/converters/ByteConverter/byte-converter.iife.js +++ b/dist/converters/ByteConverter/byte-converter.iife.js @@ -463,7 +463,7 @@ var ByteConverter = (function () { /** * [BaseEx|Byte Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/byte-converter.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/ByteConverter/byte-converter.iife.min.js b/dist/converters/ByteConverter/byte-converter.iife.min.js index 42e4a2f..c6cfa24 100644 --- a/dist/converters/ByteConverter/byte-converter.iife.min.js +++ b/dist/converters/ByteConverter/byte-converter.iife.min.js @@ -2,7 +2,7 @@ var ByteConverter=function(){"use strict";class t{static makeDataView(t){const e /** * [BaseEx|Byte Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/byte-converter.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */const n=(()=>{const t=new Uint16Array([1]),e=new Uint8Array(t.buffer);return Boolean(e.at(0))})();return class{constructor(...t){this.littleEndian=n,this.numberMode=!1,this.outputType="buffer",this.utils={validateArgs:(t,n=!1)=>{const i={littleEndian:this.littleEndian,numberMode:this.numberMode,outputType:this.outputType,signed:!1};if(!t.length)return i;t.includes("number")&&(t.splice(t.indexOf("number"),1),i.numberMode=!0,i.outputType="float_n");const r=e.typeList.map((t=>`'${t}'`)).join(", ");if(t.forEach((t=>{if("le"===(t=String(t).toLowerCase()))i.littleEndian=!0;else if("be"===t)i.littleEndian=!1;else{if(!e.typeList.includes(t))throw new TypeError(`Invalid argument: '${t}.\nValid arguments are:\n'le', 'be', ${r}`);i.outputType=t}})),n)for(const t in i)this[t]=i[t];return i}},this.utils.validateArgs(t,!0)}encode(e,...n){const i=this.utils.validateArgs(n);return t.toBytes(e,i)[0]}decode(t,...n){const i=this.utils.validateArgs(n);return e.compile(t,i.outputType,i.littleEndian)}}}(); diff --git a/dist/converters/Ecoji/ecoji.esm.js b/dist/converters/Ecoji/ecoji.esm.js index 3e4026a..912e1d4 100644 --- a/dist/converters/Ecoji/ecoji.esm.js +++ b/dist/converters/Ecoji/ecoji.esm.js @@ -1451,7 +1451,7 @@ class BaseTemplate { /** * [BaseEx|Ecoji Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/ecoji.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 OR Apache-2.0 * @see https://github.com/keith-turner/ecoji diff --git a/dist/converters/Ecoji/ecoji.esm.min.js b/dist/converters/Ecoji/ecoji.esm.min.js index 9526303..9a96e9a 100644 --- a/dist/converters/Ecoji/ecoji.esm.min.js +++ b/dist/converters/Ecoji/ecoji.esm.min.js @@ -2,7 +2,7 @@ class t{static toBytes(t){return ArrayBuffer.isView(t)&&(t=t.buffer),[new Uint8A /** * [BaseEx|Ecoji Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/ecoji.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 OR Apache-2.0 * @see https://github.com/keith-turner/ecoji diff --git a/dist/converters/Ecoji/ecoji.iife.js b/dist/converters/Ecoji/ecoji.iife.js index f5465ca..87bb653 100644 --- a/dist/converters/Ecoji/ecoji.iife.js +++ b/dist/converters/Ecoji/ecoji.iife.js @@ -1454,7 +1454,7 @@ var Ecoji = (function () { /** * [BaseEx|Ecoji Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/ecoji.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 OR Apache-2.0 * @see https://github.com/keith-turner/ecoji diff --git a/dist/converters/Ecoji/ecoji.iife.min.js b/dist/converters/Ecoji/ecoji.iife.min.js index 215bff6..a7fc994 100644 --- a/dist/converters/Ecoji/ecoji.iife.min.js +++ b/dist/converters/Ecoji/ecoji.iife.min.js @@ -2,7 +2,7 @@ var Ecoji=function(){"use strict";class t{static toBytes(t){return ArrayBuffer.i /** * [BaseEx|Ecoji Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/ecoji.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 OR Apache-2.0 * @see https://github.com/keith-turner/ecoji diff --git a/dist/converters/LEB128/leb-128.esm.js b/dist/converters/LEB128/leb-128.esm.js index d40eaf2..ae4b1b2 100644 --- a/dist/converters/LEB128/leb-128.esm.js +++ b/dist/converters/LEB128/leb-128.esm.js @@ -1451,7 +1451,7 @@ class BaseTemplate { /** * [BaseEx|LEB128 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/leb-128.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/LEB128/leb-128.esm.min.js b/dist/converters/LEB128/leb-128.esm.min.js index fc9de8e..1a9e1ae 100644 --- a/dist/converters/LEB128/leb-128.esm.min.js +++ b/dist/converters/LEB128/leb-128.esm.min.js @@ -2,7 +2,7 @@ class t{static toBytes(t){return ArrayBuffer.isView(t)&&(t=t.buffer),[new Uint8A /** * [BaseEx|LEB128 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/leb-128.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */class u extends h{constructor(...t){super(),this.converter=new l(10,0,0),this.hexlify=new l(16,1,2),this.charsets.default="",this.charsets.hex="",this.version="default",this.frozenCharsets=!0,this.littleEndian=!0,this.hasSignedMode=!0,this.isMutable.signed=!0,this.utils.validateArgs(t,!0)}encode(t,...e){const n=this.utils.validateArgs(e),i=n.signed;n.signed=!0;const[r,s]=this.utils.inputHandler.toBytes(t,n);let o=this.converter.encode(r,null,n.littleEndian)[0],a=BigInt(o),l=new Array;if(s){if(!i)throw new TypeError("Negative values in unsigned mode are invalid.");a=-a}if(i)for(;;){const t=Number(127n&a);if(a>>=7n,0==a&&0==(64&t)||-1==a&&0!=(64&t)){l.push(t);break}l.push(128|t)}else for(;;){const t=Number(127n&a);if(a>>=7n,0==a){l.push(t);break}l.push(128|t)}const h=Uint8Array.from(l);return"hex"===n.version?this.hexlify.encode(h,[..."0123456789abcdef"],!1)[0]:h}decode(e,...n){const i=this.utils.validateArgs(n);if("hex"===i.version)e=this.hexlify.decode(this.utils.normalizeInput(e).toLowerCase(),[..."0123456789abcdef"],[],i.integrity,!1);else{if(void 0===e.byteLength)throw new TypeError("Input must be a bytes like object.");e=t.toBytes(e)[0]}if(1===e.length&&!e[0])return this.utils.outputHandler.compile(new Uint8Array(1),i.outputType,!0);e=Array.from(e);let r,s,o,a=0n,l=-7n;for(r of e)l+=7n,a+=BigInt(127&r)<>=7n,0==a&&0==(64&t)||-1==a&&0!=(64&t)){l.push(t);break}l.push(128|t)}else for(;;){const t=Number(127n&a);if(a>>=7n,0==a){l.push(t);break}l.push(128|t)}const h=Uint8Array.from(l);return"hex"===n.version?this.hexlify.encode(h,[..."0123456789abcdef"],!1)[0]:h}decode(e,...n){const i=this.utils.validateArgs(n);if("hex"===i.version)e=this.hexlify.decode(this.utils.normalizeInput(e).toLowerCase(),[..."0123456789abcdef"],[],i.integrity,!1);else{if(void 0===e.byteLength)throw new TypeError("Input must be a bytes like object.");e=t.toBytes(e)[0]}if(1===e.length&&!e[0])return this.utils.outputHandler.compile(new Uint8Array(1),i.outputType,!0);e=Array.from(e);let r,s,o,a=0n,l=-7n;for(r of e)l+=7n,a+=BigInt(127&r)<62)throw new RangeError("Radix argument must be provided and has to be an integer between 2 and 62.");this.converter=new l(t,0,0),this.charsets.default=[..."0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"].slice(0,t),this.frozenCharsets=!0,this.hasSignedMode=!0,this.littleEndian=!(2===t||16===t),this.signed=!0,this.version="default",this.isMutable.littleEndian=!0,this.isMutable.upper=t<=36,this.utils.validateArgs(e,!0)}encode(t,...e){return super.encode(t,null,null,...e)}decode(t,...e){return super.decode(t,(({input:t})=>{if(2===this.converter.radix){const e=(8-t.length%8)%8;t=`${"0".repeat(e)}${t}`}else if(16===this.converter.radix){const e=t.length%2;t=`${"0".repeat(e)}${t}`}return t}),null,!1,...e)}}export{u as default}; diff --git a/dist/converters/SimpleBase/simple-base.iife.js b/dist/converters/SimpleBase/simple-base.iife.js index b66615c..50fba2e 100644 --- a/dist/converters/SimpleBase/simple-base.iife.js +++ b/dist/converters/SimpleBase/simple-base.iife.js @@ -1454,7 +1454,7 @@ var SimpleBase = (function () { /** * [BaseEx|SimpleBase Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/simple-base.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/SimpleBase/simple-base.iife.min.js b/dist/converters/SimpleBase/simple-base.iife.min.js index f14ac33..ddc2b92 100644 --- a/dist/converters/SimpleBase/simple-base.iife.min.js +++ b/dist/converters/SimpleBase/simple-base.iife.min.js @@ -2,7 +2,7 @@ var SimpleBase=function(){"use strict";class t{static toBytes(t){return ArrayBuf /** * [BaseEx|SimpleBase Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/simple-base.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */return class extends h{constructor(t,...e){if(super(),!t||!Number.isInteger(t)||t<2||t>62)throw new RangeError("Radix argument must be provided and has to be an integer between 2 and 62.");this.converter=new l(t,0,0),this.charsets.default=[..."0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"].slice(0,t),this.frozenCharsets=!0,this.hasSignedMode=!0,this.littleEndian=!(2===t||16===t),this.signed=!0,this.version="default",this.isMutable.littleEndian=!0,this.isMutable.upper=t<=36,this.utils.validateArgs(e,!0)}encode(t,...e){return super.encode(t,null,null,...e)}decode(t,...e){return super.decode(t,(({input:t})=>{if(2===this.converter.radix){const e=(8-t.length%8)%8;t=`${"0".repeat(e)}${t}`}else if(16===this.converter.radix){const e=t.length%2;t=`${"0".repeat(e)}${t}`}return t}),null,!1,...e)}}}(); diff --git a/dist/converters/UUencode/uuencode.esm.js b/dist/converters/UUencode/uuencode.esm.js index 6c138de..92dd079 100644 --- a/dist/converters/UUencode/uuencode.esm.js +++ b/dist/converters/UUencode/uuencode.esm.js @@ -1451,7 +1451,7 @@ class BaseTemplate { /** * [BaseEx|UUencode Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/uuencode.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/UUencode/uuencode.esm.min.js b/dist/converters/UUencode/uuencode.esm.min.js index 3363bbb..1530e1f 100644 --- a/dist/converters/UUencode/uuencode.esm.min.js +++ b/dist/converters/UUencode/uuencode.esm.min.js @@ -2,7 +2,7 @@ class t{static toBytes(t){return ArrayBuffer.isView(t)&&(t=t.buffer),[new Uint8A /** * [BaseEx|UUencode Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/uuencode.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */class u extends l{constructor(...t){super(),this.converter=new h(64,3,4),this.charsets.default=[..."`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"],Object.defineProperty(this.padChars,"default",{get:()=>[this.charsets.default.at(0)]}),this.charsets.original=[" ",...this.charsets.default.slice(1)],Object.defineProperty(this.padChars,"original",{get:()=>[this.charsets.original.at(0)]}),this.charsets.xx=[..."+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"],Object.defineProperty(this.padChars,"xx",{get:()=>[this.charsets.xx.at(0)]}),this.padding=!0,this.header=!1,this.utils.converterArgs.header=["noheader","header"],this.isMutable.header=!0,this.isMutable.integrity=!1,this.utils.validateArgs(t,!0)}encode(t,...e){return super.encode(t,null,(({output:t,settings:e,zeroPadding:n})=>{const i=this.charsets[e.version],r=[...t];if(e.header){t=`begin ${e.options.permissions||c()} ${e.options.file||d()}\n`}else t="";for(;;){const e=r.splice(0,60);if(!r.length){const r=this.converter.padChars(e.length)-n;t+=`${i.at(r)}${e.join("")}\n`;break}t+=`${i.at(45)}${e.join("")}\n`}return t+=`${i.at(0)}\n`,e.header&&(t+="\nend"),t}),...e)}decode(t,...e){let n=0;return super.decode(t,(({input:t,settings:e})=>{const i=this.charsets[e.version],r=t.trim().split("\n"),s=[];/^begin/i.test(r.at(0))&&r.shift();for(const t of r){const e=[...t],r=i.indexOf(e.shift());if(!(r>0))break;if(s.push(...e),45!==r){n=this.converter.padChars(e.length)-r;break}}return s.join("")}),(({output:t})=>(n&&(t=new Uint8Array(t.slice(0,-n))),t)),!0,...e)}}const c=()=>{const t=()=>Math.floor(8*Math.random());return`${t()}${t()}${t()}`},d=()=>{const t=t=>t.at(Math.floor(Math.random()*t.length));return`${t(["unchronological","unconditionally","underemphasized","underprivileged","undistinguished","unsophisticated","untitled","untitled-1","untitled-3","uuencode"])}.${t(["applescript","bat","beam","bin","exe","js","mam","py","sh","vdo","wiz"])}`};export{u as default}; diff --git a/dist/converters/UUencode/uuencode.iife.js b/dist/converters/UUencode/uuencode.iife.js index f38bceb..fff2387 100644 --- a/dist/converters/UUencode/uuencode.iife.js +++ b/dist/converters/UUencode/uuencode.iife.js @@ -1454,7 +1454,7 @@ var UUencode = (function () { /** * [BaseEx|UUencode Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/uuencode.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/dist/converters/UUencode/uuencode.iife.min.js b/dist/converters/UUencode/uuencode.iife.min.js index d602e7d..bcd9f14 100644 --- a/dist/converters/UUencode/uuencode.iife.min.js +++ b/dist/converters/UUencode/uuencode.iife.min.js @@ -2,7 +2,7 @@ var UUencode=function(){"use strict";class t{static toBytes(t){return ArrayBuffe /** * [BaseEx|UUencode Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/uuencode.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */const u=()=>{const t=()=>Math.floor(8*Math.random());return`${t()}${t()}${t()}`},c=()=>{const t=t=>t.at(Math.floor(Math.random()*t.length));return`${t(["unchronological","unconditionally","underemphasized","underprivileged","undistinguished","unsophisticated","untitled","untitled-1","untitled-3","uuencode"])}.${t(["applescript","bat","beam","bin","exe","js","mam","py","sh","vdo","wiz"])}`};return class extends l{constructor(...t){super(),this.converter=new h(64,3,4),this.charsets.default=[..."`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"],Object.defineProperty(this.padChars,"default",{get:()=>[this.charsets.default.at(0)]}),this.charsets.original=[" ",...this.charsets.default.slice(1)],Object.defineProperty(this.padChars,"original",{get:()=>[this.charsets.original.at(0)]}),this.charsets.xx=[..."+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"],Object.defineProperty(this.padChars,"xx",{get:()=>[this.charsets.xx.at(0)]}),this.padding=!0,this.header=!1,this.utils.converterArgs.header=["noheader","header"],this.isMutable.header=!0,this.isMutable.integrity=!1,this.utils.validateArgs(t,!0)}encode(t,...e){return super.encode(t,null,(({output:t,settings:e,zeroPadding:n})=>{const i=this.charsets[e.version],r=[...t];if(e.header){t=`begin ${e.options.permissions||u()} ${e.options.file||c()}\n`}else t="";for(;;){const e=r.splice(0,60);if(!r.length){const r=this.converter.padChars(e.length)-n;t+=`${i.at(r)}${e.join("")}\n`;break}t+=`${i.at(45)}${e.join("")}\n`}return t+=`${i.at(0)}\n`,e.header&&(t+="\nend"),t}),...e)}decode(t,...e){let n=0;return super.decode(t,(({input:t,settings:e})=>{const i=this.charsets[e.version],r=t.trim().split("\n"),s=[];/^begin/i.test(r.at(0))&&r.shift();for(const t of r){const e=[...t],r=i.indexOf(e.shift());if(!(r>0))break;if(s.push(...e),45!==r){n=this.converter.padChars(e.length)-r;break}}return s.join("")}),(({output:t})=>(n&&(t=new Uint8Array(t.slice(0,-n))),t)),!0,...e)}}}(); diff --git a/package-lock.json b/package-lock.json index 81d382b..985b339 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "base-ex", - "version": "0.6.0", + "version": "0.6.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "base-ex", - "version": "0.6.0", + "version": "0.6.1", "license": "GPL-3.0", "devDependencies": { "@rollup/plugin-terser": "^0.1.0", diff --git a/package.json b/package.json index 118be76..f7e1981 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "base-ex", - "version": "0.6.0", + "version": "0.6.1", "description": "A collection of classes for data representation written in JavaScript.", "main": "./cjs/base-ex.cjs", "module": "./src/base-ex.js", diff --git a/src/base-ex.js b/src/base-ex.js index 0146e4a..3c51438 100644 --- a/src/base-ex.js +++ b/src/base-ex.js @@ -1,7 +1,7 @@ /** * [BaseEx]{@link https://github.com/UmamiAppearance/BaseExJS} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND BSD-3-Clause (only regarding Base91, Copyright (c) 2000-2006 Joachim Henke) */ diff --git a/src/converters/base-1.js b/src/converters/base-1.js index 7c2f139..fa519e2 100644 --- a/src/converters/base-1.js +++ b/src/converters/base-1.js @@ -1,7 +1,7 @@ /** * [BaseEx|Base1 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-1.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/src/converters/base-16.js b/src/converters/base-16.js index f85d546..1cc53cf 100644 --- a/src/converters/base-16.js +++ b/src/converters/base-16.js @@ -1,7 +1,7 @@ /** * [BaseEx|Base16 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-16.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/src/converters/base-2048.js b/src/converters/base-2048.js index 40f3e68..0e7a6f6 100644 --- a/src/converters/base-2048.js +++ b/src/converters/base-2048.js @@ -1,7 +1,7 @@ /** * [BaseEx|Base2048 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-2048.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND MIT (Base2048, Copyright (c) 2017 qntm) */ diff --git a/src/converters/base-32.js b/src/converters/base-32.js index 4e5ef64..3c85bb2 100644 --- a/src/converters/base-32.js +++ b/src/converters/base-32.js @@ -1,7 +1,7 @@ /** * [BaseEx|Base32 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-32.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/src/converters/base-58.js b/src/converters/base-58.js index 741b16d..2f44fad 100644 --- a/src/converters/base-58.js +++ b/src/converters/base-58.js @@ -1,7 +1,7 @@ /** * [BaseEx|Base58 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-58.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/src/converters/base-64.js b/src/converters/base-64.js index 255480f..cff16ac 100644 --- a/src/converters/base-64.js +++ b/src/converters/base-64.js @@ -1,7 +1,7 @@ /** * [BaseEx|Base64 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-64.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/src/converters/base-85.js b/src/converters/base-85.js index 526475e..76c634a 100644 --- a/src/converters/base-85.js +++ b/src/converters/base-85.js @@ -1,7 +1,7 @@ /** * [BaseEx|Base85 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-85.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/src/converters/base-91.js b/src/converters/base-91.js index de72410..e5a474a 100644 --- a/src/converters/base-91.js +++ b/src/converters/base-91.js @@ -1,7 +1,7 @@ /** * [BaseEx|Base91 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-91.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 AND BSD-3-Clause (Base91, Copyright (c) 2000-2006 Joachim Henke) */ diff --git a/src/converters/base-phi.js b/src/converters/base-phi.js index 500a324..bb899ad 100644 --- a/src/converters/base-phi.js +++ b/src/converters/base-phi.js @@ -1,7 +1,7 @@ /** * [BaseEx|BasePhi Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/base-phi.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/src/converters/byte-converter.js b/src/converters/byte-converter.js index 5344a39..fd9270d 100644 --- a/src/converters/byte-converter.js +++ b/src/converters/byte-converter.js @@ -1,7 +1,7 @@ /** * [BaseEx|Byte Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/byte-converter.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/src/converters/ecoji.js b/src/converters/ecoji.js index 44aa361..a1f5afc 100644 --- a/src/converters/ecoji.js +++ b/src/converters/ecoji.js @@ -1,7 +1,7 @@ /** * [BaseEx|Ecoji Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/ecoji.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 OR Apache-2.0 * @see https://github.com/keith-turner/ecoji diff --git a/src/converters/leb-128.js b/src/converters/leb-128.js index 9a769d5..44f5122 100644 --- a/src/converters/leb-128.js +++ b/src/converters/leb-128.js @@ -1,7 +1,7 @@ /** * [BaseEx|LEB128 Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/leb-128.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/src/converters/simple-base.js b/src/converters/simple-base.js index 39daf43..16d7b26 100644 --- a/src/converters/simple-base.js +++ b/src/converters/simple-base.js @@ -1,7 +1,7 @@ /** * [BaseEx|SimpleBase Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/simple-base.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/src/converters/uuencode.js b/src/converters/uuencode.js index 8f14b68..63bc658 100644 --- a/src/converters/uuencode.js +++ b/src/converters/uuencode.js @@ -1,7 +1,7 @@ /** * [BaseEx|UUencode Converter]{@link https://github.com/UmamiAppearance/BaseExJS/blob/main/src/converters/uuencode.js} * - * @version 0.6.0 + * @version 0.6.1 * @author UmamiAppearance [mail@umamiappearance.eu] * @license GPL-3.0 */ diff --git a/test/ecoji-orig.test.js b/test/ecoji-orig.test.js index 29c87f7..a40994b 100644 --- a/test/ecoji-orig.test.js +++ b/test/ecoji-orig.test.js @@ -1,6 +1,6 @@ /** * JavaScript/AVA implementation - * @see https://github.com/keith-turner/ecoji/blob/ecojiv2/test_scripts/ecoji_test.sh + * @see https://github.com/keith-turner/ecoji/blob/main/test_scripts/ecoji_test.sh */