78 lines
380 KiB
JavaScript
78 lines
380 KiB
JavaScript
|
|
"use strict";var Web5Dids=(()=>{var Ox=Object.create;var Cc=Object.defineProperty;var Ux=Object.getOwnPropertyDescriptor;var Cx=Object.getOwnPropertyNames;var Px=Object.getPrototypeOf,kx=Object.prototype.hasOwnProperty;var z=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),us=(t,e)=>{for(var r in e)Cc(t,r,{get:e[r],enumerable:!0})},hp=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Cx(e))!kx.call(t,i)&&i!==r&&Cc(t,i,{get:()=>e[i],enumerable:!(n=Ux(e,i))||n.enumerable});return t};var f=(t,e,r)=>(r=t!=null?Ox(Px(t)):{},hp(e||!t||!t.__esModule?Cc(r,"default",{value:t,enumerable:!0}):r,t)),Kx=t=>hp(Cc({},"__esModule",{value:!0}),t);var mp=z(Pc=>{"use strict";var T6=f(h());Pc.byteLength=Mx;Pc.toByteArray=$x;Pc.fromByteArray=Vx;var xr=[],zt=[],Lx=typeof Uint8Array<"u"?Uint8Array:Array,Qu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ti=0,pp=Qu.length;ti<pp;++ti)xr[ti]=Qu[ti],zt[Qu.charCodeAt(ti)]=ti;var ti,pp;zt[45]=62;zt[95]=63;function yp(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function Mx(t){var e=yp(t),r=e[0],n=e[1];return(r+n)*3/4-n}function Nx(t,e,r){return(e+r)*3/4-r}function $x(t){var e,r=yp(t),n=r[0],i=r[1],o=new Lx(Nx(t,n,i)),s=0,c=i>0?n-4:n,a;for(a=0;a<c;a+=4)e=zt[t.charCodeAt(a)]<<18|zt[t.charCodeAt(a+1)]<<12|zt[t.charCodeAt(a+2)]<<6|zt[t.charCodeAt(a+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=zt[t.charCodeAt(a)]<<2|zt[t.charCodeAt(a+1)]>>4,o[s++]=e&255),i===1&&(e=zt[t.charCodeAt(a)]<<10|zt[t.charCodeAt(a+1)]<<4|zt[t.charCodeAt(a+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function qx(t){return xr[t>>18&63]+xr[t>>12&63]+xr[t>>6&63]+xr[t&63]}function Fx(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(qx(n));return i.join("")}function Vx(t){for(var e,r=t.length,n=r%3,i=[],o=16383,s=0,c=r-n;s<c;s+=o)i.push(Fx(t,s,s+o>c?c:s+o));return n===1?(e=t[r-1],i.push(xr[e>>2]+xr[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(xr[e>>10]+xr[e>>4&63]+xr[e<<2&63]+"=")),i.join("")}});var gp=z(ed=>{var I6=f(h());ed.read=function(t,e,r,n,i){var o,s,c=i*8-n-1,a=(1<<c)-1,d=a>>1,u=-7,l=r?i-1:0,y=r?-1:1,g=t[e+l];for(l+=y,o=g&(1<<-u)-1,g>>=-u,u+=c;u>0;o=o*256+t[e+l],l+=y,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=s*256+t[e+l],l+=y,u-=8);if(o===0)o=1-d;else{if(o===a)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-d}return(g?-1:1)*s*Math.pow(2,o-n)};ed.write=function(t,e,r,n,i,o){var s,c,a,d=o*8-i-1,u=(1<<d)-1,l=u>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:o-1,p=n?1:-1,w=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),s+l>=1?e+=y/a:e+=y*Math.pow(2,1-l),e*a>=2&&(s++,a/=2),s+l>=u?(c=0,s=u):s+l>=1?(c=(e*a-1)*Math.pow(2,i),s=s+l):(c=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+g]=c&255,g+=p,c/=256,i-=8);for(s=s<<i|c,d+=i;d>0;t[r+g]=s&255,g+=p,s/=256,d-=8);t[r+g-p]|=w*128}});var At=z(no=>{"use strict";var R6=f(h());var td=mp(),to=gp(),wp=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;no.Buffer=B;no.SlowBuffer=Jx;no.INSPECT_MAX_BYTES=50;var kc=2147483647;no.kMaxLength=kc;B.TYPED_ARRAY_SUPPORT=Hx();!B.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Hx(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(B.prototype,"parent",{enumerable:!0,get:function(){if(B.isBuffer(this))return this.buffer}});Object.defineProperty(B.prototype,"offset",{enumerable:!0,get:function(){if(B.isBuffer(this))return this.byteOffset}});function zr(t){if(t>kc)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new
|
||
|
|
`;super(r),this.name="AggregateError",this.errors=e}};ml.exports={AggregateError:yl,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((n,i)=>{t=n,e=i}),resolve:t,reject:e}},promisify(t){return new Promise((e,r)=>{t((n,...i)=>n?r(n):e(...i))})},debuglog(){return function(){}},format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,n]){let i=e.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}},types:{isAsyncFunction(t){return t instanceof rv},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:nv};ml.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")});var pa=z((mR,ha)=>{"use strict";var gR=f(h()),{AbortController:f0,AbortSignal:iv}=typeof self<"u"?self:typeof window<"u"?window:void 0;ha.exports=f0;ha.exports.AbortSignal=iv;ha.exports.default=f0});var wt=z((wR,y0)=>{"use strict";var bR=f(h()),{format:ov,inspect:ya,AggregateError:sv}=_r(),cv=globalThis.AggregateError||sv,av=Symbol("kIsNodeError"),uv=["string","function","number","object","Function","Object","boolean","bigint","symbol"],dv=/^([A-Z][a-z0-9]*)+$/,lv="__node_internal_",ma={};function vi(t,e){if(!t)throw new ma.ERR_INTERNAL_ASSERTION(e)}function h0(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function fv(t,e,r){if(typeof e=="function")return vi(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let n=(e.match(/%[dfijoOs]/g)||[]).length;return vi(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:ov(e,...r)}function ct(t,e,r){r||(r=Error);class n extends r{constructor(...o){super(fv(t,e,o))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[av]=!0,ma[t]=n}function p0(t){let e=lv+t.name;return Object.defineProperty(t,"name",{value:e}),t}function hv(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new cv([e,t],e.message);return r.code=e.code,r}return t||e}var gl=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new ma.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};ct("ERR_ASSERTION","%s",Error);ct("ERR_INVALID_ARG_TYPE",(t,e,r)=>{vi(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";let i=[],o=[],s=[];for(let a of e)vi(typeof a=="string","All expected entries have to be of type string"),uv.includes(a)?i.push(a.toLowerCase()):dv.test(a)?o.push(a):(vi(a!=="object",'The value "object" should be written as "Object"'),s.push(a));if(o.length>0){let a=i.indexOf("object");a!==-1&&(i.splice(i,a,1),o.push("Object"))}if(i.length>0){switch(i.length){case 1:n+=`of type ${i[0]}`;break;case 2:n+=`one of type ${i[0]} or ${i[1]}`;break;default:{let a=i.pop();n+=`one of type ${i.join(", ")}, or ${a}`}}(o.length>0||s.length>0)&&(n+=" or ")}if(o.length>0){switch(o.length){case 1:n+=`an instance of ${o[0]}`;break;case 2:n+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let a=o.pop();n+=`an instance of ${o.join(", ")}, or ${a}`}}s.length>0&&(n+=" or
|
||
|
|
/*! Bundled license information:
|
||
|
|
|
||
|
|
ieee754/index.js:
|
||
|
|
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
||
|
|
|
||
|
|
buffer/index.js:
|
||
|
|
(*!
|
||
|
|
* The buffer module from node.js, for the browser.
|
||
|
|
*
|
||
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
||
|
|
* @license MIT
|
||
|
|
*)
|
||
|
|
|
||
|
|
queue-microtask/index.js:
|
||
|
|
(*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
||
|
|
|
||
|
|
run-parallel-limit/index.js:
|
||
|
|
(*! run-parallel-limit. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
||
|
|
|
||
|
|
safe-buffer/index.js:
|
||
|
|
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
||
|
|
|
||
|
|
uri-js/dist/es5/uri.all.js:
|
||
|
|
(** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js *)
|
||
|
|
|
||
|
|
@noble/hashes/esm/utils.js:
|
||
|
|
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
||
|
|
|
||
|
|
@noble/curves/esm/abstract/utils.js:
|
||
|
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
||
|
|
|
||
|
|
@noble/curves/esm/abstract/modular.js:
|
||
|
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
||
|
|
|
||
|
|
@noble/curves/esm/abstract/curve.js:
|
||
|
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
||
|
|
|
||
|
|
@noble/curves/esm/abstract/weierstrass.js:
|
||
|
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
||
|
|
|
||
|
|
@noble/curves/esm/_shortw_utils.js:
|
||
|
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
||
|
|
|
||
|
|
@noble/curves/esm/secp256k1.js:
|
||
|
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
||
|
|
|
||
|
|
@noble/curves/esm/p256.js:
|
||
|
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
||
|
|
|
||
|
|
@noble/curves/esm/abstract/edwards.js:
|
||
|
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
||
|
|
|
||
|
|
@noble/curves/esm/abstract/montgomery.js:
|
||
|
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
||
|
|
|
||
|
|
@noble/curves/esm/ed25519.js:
|
||
|
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
||
|
|
|
||
|
|
@noble/ciphers/esm/utils.js:
|
||
|
|
(*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) *)
|
||
|
|
|
||
|
|
uint8-util/util.js:
|
||
|
|
(* Common package for dealing with hex/string/uint8 conversions (and sha1 hashing)
|
||
|
|
*
|
||
|
|
* @author Jimmy Wärting <jimmy@warting.se> (https://jimmy.warting.se/opensource)
|
||
|
|
* @license MIT
|
||
|
|
*)
|
||
|
|
|
||
|
|
@noble/ed25519/index.js:
|
||
|
|
(*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) *)
|
||
|
|
|
||
|
|
@noble/secp256k1/index.js:
|
||
|
|
(*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) *)
|
||
|
|
*/
|
||
|
|
//# sourceMappingURL=browser.js.map
|