@blockcerts/blockcerts-verifier 1.72.1 → 1.72.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle-stats.html +33 -32
- package/coverage/lcov.info +154 -158
- package/dist/{DataIntegrityProof-CsicZNrL-BkSRjzkI.js → DataIntegrityProof-BhL7Kkhm-affsdujn.js} +2 -2
- package/dist/EcdsaSd2023-CUjrjGzC-Cx7ejHu-.js +30 -0
- package/dist/EcdsaSecp256k1Signature2019-D90cAynb-Bf5kILPF.js +1 -0
- package/dist/{Ed25519Signature2020-CglkQLKN-CQ6lMzyG.js → Ed25519Signature2020-fJGvlbIp-B6XhFwr4.js} +4 -4
- package/dist/EddsaRdfc2022-XufziFi3-D5IoKiRE.js +14 -0
- package/dist/HashlinkVerifier-udsj5z09-BTqOkVoD.js +8 -0
- package/dist/MerkleProof2017-C0RhRNNx-zjQMRSQY.js +1 -0
- package/dist/MerkleProof2017-C499XBV8-l50m9izr.js +74 -0
- package/dist/MerkleProof2019-B7f1hhem-CjLDyx6Q.js +5 -0
- package/dist/Suite-Bu3gszvt-Dmvbh142.js +33 -0
- package/dist/_polyfill-node.crypto-DGISCHrB-C5-OOGc0.js +1 -0
- package/dist/checkCredentialSchemaConformity-CgpOS3eC-AjSPoJub.js +1 -0
- package/dist/{checkRevocationStatusList2021-BDBFhnz6-BEBD8TO8.js → checkRevocationStatusList2021-D4VNDRlW-DgNfOAoI.js} +2 -2
- package/dist/controlVerificationMethod-CSwPoUL8-CvUADmjg.js +1 -0
- package/dist/downloadPDF-UAsY-nU_.js +297 -0
- package/dist/ed25519-key-pair.esm-DxoBwwVJ-D8j8wFfG.js +1 -0
- package/dist/ensureNotRevoked-ByWaYoog-BheL-ZKZ.js +1 -0
- package/dist/ensureNotRevoked-C1kT3A6R-oFUZltl3.js +1 -0
- package/dist/{ensureValidIssuingKey-wTUvNuDH-BdV46XBb.js → ensureValidIssuingKey-DEV9E0Ph-DY8BTObG.js} +1 -1
- package/dist/index-DZ7aUhT_-D0G2DVsh.js +29 -0
- package/dist/index-DjD0A6uJ-BdFUkPCF.js +33 -0
- package/dist/index-RfFwckcH.js +1 -0
- package/dist/index-tlZQQ_rg-CYTlxhyY.js +1 -0
- package/dist/index.es-CnYWLNZV.js +56 -0
- package/dist/jsonld-signatures-D4X_Irzi-D_wBqxSl.js +56 -0
- package/dist/main.js +142 -133
- package/dist/pako.esm-BGRKTPxS-Bodm4Eha.js +2 -0
- package/dist/purify.es-Om653OSQ.js +2 -0
- package/dist/retrieveVerificationMethodPublicKey-D_autuwE-DGbK-RPm.js +1 -0
- package/dist/sha2-JcCWfgvE-By1_saxP.js +2 -0
- package/dist/verifyIssuerProfile-2PhdMtQZ-CfqcAkBL.js +1 -0
- package/dist/webcrypto.es-BOyMRPOj-CAxP3jJR.js +40 -0
- package/package.json +10 -10
- package/dist/EcdsaSd2023-DN9HBdgh-Bc0hVwTd.js +0 -30
- package/dist/EcdsaSecp256k1Signature2019-C3F03t_M-DAJeMTpu.js +0 -1
- package/dist/EddsaRdfc2022-CfoLi-PP-l7ITLQQT.js +0 -14
- package/dist/HashlinkVerifier-CTG-OS14-B4Niv2-b.js +0 -8
- package/dist/MerkleProof2017-B_EJmYja-CYd4dJc1.js +0 -1
- package/dist/MerkleProof2017-k2qjvxCH-DrRpsLHG.js +0 -75
- package/dist/MerkleProof2019-B7t13hOo-D8n9YrUw.js +0 -13
- package/dist/Suite-BmP2Qu19-D1ucdMDB.js +0 -1
- package/dist/_commonjs-dynamic-modules-COweQ1RR-BHR_E30J.js +0 -1
- package/dist/base64url-Cy03LJLt-vkTPfQOh.js +0 -4
- package/dist/checkCredentialSchemaConformity-BiggGGMP-Dx992E4t.js +0 -1
- package/dist/controlVerificationMethod-Bh_-e0Fd-BUCC8ctY.js +0 -1
- package/dist/did-key-common.esm-BELyYVSE-Cqrpf7cy.js +0 -9
- package/dist/did-key-ed25519.esm-C3GUddDp-BJdBgNDg.js +0 -1
- package/dist/did-key-secp256k1.esm-D-R266jM-BTxlD5VW.js +0 -1
- package/dist/downloadPDF-D2qwT_DJ.js +0 -297
- package/dist/ed25519-key-pair.esm-DQF2kkXh-XX5BXBcl.js +0 -25
- package/dist/elliptic-6I21PEnR-CsYseRX1.js +0 -1
- package/dist/elliptic-mDX7fQQx-BpaNaVm0.js +0 -1
- package/dist/ensureNotRevoked-DGZuNktg-B4uNuqLX.js +0 -1
- package/dist/ensureNotRevoked-Dc6VA2bO-DvMIgM4L.js +0 -1
- package/dist/index-BrurC4Vt-C0eXpZGn.js +0 -1
- package/dist/index-CK9Z4pAC.js +0 -2
- package/dist/index-DXh-XAic-B2gT500V.js +0 -22
- package/dist/index-DZLKRa_V-D_IQzjvG.js +0 -5
- package/dist/index-fQcSLZgh-DpptYyN8.js +0 -1
- package/dist/index.es-BIiEi3w5.js +0 -56
- package/dist/jsonld-BAMY2WqE-BJ5uVeOU.js +0 -36
- package/dist/jsonld-signatures-BbHr1fSN-BSospRuX.js +0 -74
- package/dist/keyUtils-ue8EY3Op-DoHdKWgN.js +0 -1
- package/dist/pako.esm-BGRKTPxS-UdHShO7y.js +0 -2
- package/dist/purify.es-CkKsfeyH.js +0 -2
- package/dist/retrieveVerificationMethodPublicKey-CLBY4G8P-CagFGnNt.js +0 -1
- package/dist/sha256-Bwge_vjI-C1PUWFZm.js +0 -1
- package/dist/verifyIssuerProfile-BaiZaU2c-Zcu1X0PY.js +0 -1
- package/dist/webcrypto.es-DptGOl2T-BnVhHKeM.js +0 -40
- package/dist/x25519-hG3WOzPe-Dh8L0KYb.js +0 -1
- /package/dist/{index-Gr4i_Ned-Dgus2xdV.js → index-CyNtT_1q-Dgus2xdV.js} +0 -0
package/dist/index-CK9Z4pAC.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function e(e){return"string"==typeof e}var t;!function(e){e.blockcypher="blockcypher",e.blockstream="blockstream",e.etherscan="etherscan"}(t||(t={}));const i="{transaction_id}";var r;!function(e){e.V1_1="1.1",e.V1_2="1.2",e.V2_0="2.0",e.V3_0_alpha="3.0-alpha",e.V3_0_beta="3.0-beta",e.V3_0="3.0"}(r||(r={}));var n,o=r;!function(e){e.blockcypher="blockcypher",e.blockstream="blockstream",e.etherscan="etherscan"}(n||(n={}));const s="{transaction_id}";var a,c;!function(e){e.Bitcoin="bitcoin",e.Ethmain="ethmain",e.Ethropst="ethropst",e.Ethrinkeby="ethrinkeby",e.Ethgoerli="ethgoerli",e.Ethsepolia="ethsepolia",e.Mocknet="mocknet",e.Regtest="regtest",e.Testnet="testnet"}(a||(a={})),function(e){e.btc="btc",e.eth="eth",e.mocknet="mocknet"}(c||(c={}));const d={[a.Bitcoin]:{code:a.Bitcoin,blinkCode:c.btc,name:"Bitcoin",prefixes:["6a20","OP_RETURN "],signatureValue:"bitcoinMainnet",transactionTemplates:{full:`https://blockchain.info/tx/${s}`,raw:`https://blockchain.info/rawtx/${s}`}},[a.Ethmain]:{code:a.Ethmain,blinkCode:c.eth,name:"Ethereum",prefixes:["0x"],signatureValue:"ethereumMainnet",transactionTemplates:{full:`https://etherscan.io/tx/${s}`,raw:`https://etherscan.io/tx/${s}`}},[a.Ethropst]:{code:a.Ethropst,blinkCode:c.eth,name:"Ethereum Testnet",signatureValue:"ethereumRopsten",transactionTemplates:{full:`https://ropsten.etherscan.io/tx/${s}`,raw:`https://ropsten.etherscan.io/getRawTx?tx=${s}`}},[a.Ethrinkeby]:{code:a.Ethrinkeby,blinkCode:c.eth,name:"Ethereum Testnet",signatureValue:"ethereumRinkeby",transactionTemplates:{full:`https://rinkeby.etherscan.io/tx/${s}`,raw:`https://rinkeby.etherscan.io/getRawTx?tx=${s}`}},[a.Ethgoerli]:{code:a.Ethgoerli,blinkCode:c.eth,name:"Ethereum Testnet",signatureValue:"ethereumGoerli",transactionTemplates:{full:`https://goerli.etherscan.io/tx/${s}`,raw:`https://goerli.etherscan.io/getRawTx?tx=${s}`}},[a.Ethsepolia]:{code:a.Ethsepolia,blinkCode:c.eth,name:"Ethereum Testnet",signatureValue:"ethereumSepolia",transactionTemplates:{full:`https://sepolia.etherscan.io/tx/${s}`,raw:`https://sepolia.etherscan.io/getRawTx?tx=${s}`}},[a.Mocknet]:{code:a.Mocknet,blinkCode:c.mocknet,name:"Mocknet",test:!0,signatureValue:"mockchain",transactionTemplates:{full:"",raw:""}},[a.Regtest]:{code:a.Regtest,blinkCode:c.mocknet,name:"Mocknet",test:!0,signatureValue:"bitcoinRegtest",transactionTemplates:{full:"",raw:""}},[a.Testnet]:{code:a.Testnet,blinkCode:c.btc,name:"Bitcoin Testnet",signatureValue:"bitcoinTestnet",transactionTemplates:{full:`https://testnet.blockchain.info/tx/${s}`,raw:`https://testnet.blockchain.info/rawtx/${s}`}}};const u=1,l=1;var h=function(e,t,i,r){return new(i||(i=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};function p(e,t){return h(this,arguments,void 0,(function*(e,t,i=[]){if((e=Array.from(e)).length<t)throw new Error("Could not retrieve tx data");const r=e.map(((e,t)=>e.then((()=>t)).catch((e=>{throw t}))));return Promise.race(r).then((r=>(e.splice(r,1)[0].then((e=>i.push(e))),1===t?i:p(e,t-1,i)))).catch((r=>(e.splice(r,1),p(e,t,i))))}))}function f({explorerAPI:e,transactionIdPlaceholder:t=s,transactionId:i="",chain:r}){const{serviceURL:n}=e;let o;if("string"==typeof n)o=n;else if("object"==typeof n){const e=!!r&&function(e){return e!==d.bitcoin.code&&e!==d.ethmain.code}(r);o=e?n.test:n.main}else{if("function"!=typeof n)throw new Error(`serviceURL is an unexpected type for explorerAPI ${e.serviceName}`);o=n(r)}return o=o.replace(t,i),o=function(e,t){if(!t.key)return e;if(t.key&&!t.keyPropertyName)throw new Error(`No keyPropertyName defined for explorerAPI ${t.serviceName}`);return function(e,t,i){const r=e.includes("?")?"&":"?";return`${e}${r}${t}=${i}`}(e,t.keyPropertyName,t.key)}(o,e),o}var g="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m=[],y=[],b="undefined"!=typeof Uint8Array?Uint8Array:Array,v=!1;function w(){v=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)m[t]=e[t],y[e.charCodeAt(t)]=t;y["-".charCodeAt(0)]=62,y["_".charCodeAt(0)]=63}function k(e,t,i){for(var r,n,o=[],s=t;s<i;s+=3)r=(e[s]<<16)+(e[s+1]<<8)+e[s+2],o.push(m[(n=r)>>18&63]+m[n>>12&63]+m[n>>6&63]+m[63&n]);return o.join("")}function L(e){var t;v||w();for(var i=e.length,r=i%3,n="",o=[],s=16383,a=0,c=i-r;a<c;a+=s)o.push(k(e,a,a+s>c?c:a+s));return 1===r?(t=e[i-1],n+=m[t>>2],n+=m[t<<4&63],n+="=="):2===r&&(t=(e[i-2]<<8)+e[i-1],n+=m[t>>10],n+=m[t>>4&63],n+=m[t<<2&63],n+="="),o.push(n),o.join("")}function S(e,t,i,r,n){var o,s,a=8*n-r-1,c=(1<<a)-1,d=c>>1,u=-7,l=i?n-1:0,h=i?-1:1,p=e[t+l];for(l+=h,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+e[t+l],l+=h,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=r;u>0;s=256*s+e[t+l],l+=h,u-=8);if(0===o)o=1-d;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=d}return(p?-1:1)*s*Math.pow(2,o-r)}function P(e,t,i,r,n,o){var s,a,c,d=8*o-n-1,u=(1<<d)-1,l=u>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+l>=1?h/c:h*Math.pow(2,1-l))*c>=2&&(s++,c/=2),s+l>=u?(a=0,s=u):s+l>=1?(a=(t*c-1)*Math.pow(2,n),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,n),s=0));n>=8;e[i+p]=255&a,p+=f,a/=256,n-=8);for(s=s<<n|a,d+=n;d>0;e[i+p]=255&s,p+=f,s/=256,d-=8);e[i+p-f]|=128*g}var I={}.toString,x=Array.isArray||function(e){return"[object Array]"==I.call(e)};function E(){return T.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _(e,t){if(E()<t)throw new RangeError("Invalid typed array length");return T.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=T.prototype:(null===e&&(e=new T(t)),e.length=t),e}function T(e,t,i){if(!(T.TYPED_ARRAY_SUPPORT||this instanceof T))return new T(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return A(this,e)}return R(this,e,t,i)}function R(e,t,i,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,r){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===i&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,i):new Uint8Array(t,i,r);T.TYPED_ARRAY_SUPPORT?(e=t).__proto__=T.prototype:e=M(e,t);return e}(e,t,i,r):"string"==typeof t?function(e,t,i){"string"==typeof i&&""!==i||(i="utf8");if(!T.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|O(t,i);e=_(e,r);var n=e.write(t,i);n!==r&&(e=e.slice(0,n));return e}(e,t,i):function(e,t){if(j(t)){var i=0|V(t.length);return 0===(e=_(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?_(e,0):M(e,t);if("Buffer"===t.type&&x(t.data))return M(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function C(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function A(e,t){if(C(t),e=_(e,t<0?0:0|V(t)),!T.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function M(e,t){var i=t.length<0?0:0|V(t.length);e=_(e,i);for(var r=0;r<i;r+=1)e[r]=255&t[r];return e}function V(e){if(e>=E())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E().toString(16)+" bytes");return 0|e}function j(e){return!(null==e||!e._isBuffer)}function O(e,t){if(j(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return de(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return ue(e).length;default:if(r)return de(e).length;t=(""+t).toLowerCase(),r=!0}}function D(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Q(this,t,i);case"utf8":case"utf-8":return Y(this,t,i);case"ascii":return X(this,t,i);case"latin1":case"binary":return W(this,t,i);case"base64":return J(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function N(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function U(e,t,i,r,n){if(0===e.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=n?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof t&&(t=T.from(t,r)),j(t))return 0===t.length?-1:B(e,t,i,r,n);if("number"==typeof t)return t&=255,T.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):B(e,[t],i,r,n);throw new TypeError("val must be string, number or Buffer")}function B(e,t,i,r,n){var o,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,i/=2}function d(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){var u=-1;for(o=i;o<a;o++)if(d(e,o)===d(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===c)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(i+c>a&&(i=a-c),o=i;o>=0;o--){for(var l=!0,h=0;h<c;h++)if(d(e,o+h)!==d(t,h)){l=!1;break}if(l)return o}return-1}function H(e,t,i,r){i=Number(i)||0;var n=e.length-i;r?(r=Number(r))>n&&(r=n):r=n;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[i+s]=a}return s}function z(e,t,i,r){return le(de(t,e.length-i),e,i,r)}function K(e,t,i,r){return le(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,r)}function q(e,t,i,r){return K(e,t,i,r)}function F(e,t,i,r){return le(ue(t),e,i,r)}function $(e,t,i,r){return le(function(e,t){for(var i,r,n,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(i=e.charCodeAt(s))>>8,n=i%256,o.push(n),o.push(r);return o}(t,e.length-i),e,i,r)}function J(e,t,i){return 0===t&&i===e.length?L(e):L(e.slice(t,i))}function Y(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n<i;){var o,s,a,c,d=e[n],u=null,l=d>239?4:d>223?3:d>191?2:1;if(n+l<=i)switch(l){case 1:d<128&&(u=d);break;case 2:128==(192&(o=e[n+1]))&&(c=(31&d)<<6|63&o)>127&&(u=c);break;case 3:o=e[n+1],s=e[n+2],128==(192&o)&&128==(192&s)&&(c=(15&d)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:o=e[n+1],s=e[n+2],a=e[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&d)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(u=c)}null===u?(u=65533,l=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=l}return function(e){var t=e.length;if(t<=G)return String.fromCharCode.apply(String,e);var i="",r=0;for(;r<t;)i+=String.fromCharCode.apply(String,e.slice(r,r+=G));return i}(r)}T.TYPED_ARRAY_SUPPORT=void 0===g.TYPED_ARRAY_SUPPORT||g.TYPED_ARRAY_SUPPORT,E(),T.poolSize=8192,T._augment=function(e){return e.__proto__=T.prototype,e},T.from=function(e,t,i){return R(null,e,t,i)},T.TYPED_ARRAY_SUPPORT&&(T.prototype.__proto__=Uint8Array.prototype,T.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&T[Symbol.species]),T.alloc=function(e,t,i){return function(e,t,i,r){return C(t),t<=0?_(e,t):void 0!==i?"string"==typeof r?_(e,t).fill(i,r):_(e,t).fill(i):_(e,t)}(null,e,t,i)},T.allocUnsafe=function(e){return A(null,e)},T.allocUnsafeSlow=function(e){return A(null,e)},T.isBuffer=he,T.compare=function(e,t){if(!j(e)||!j(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,r=t.length,n=0,o=Math.min(i,r);n<o;++n)if(e[n]!==t[n]){i=e[n],r=t[n];break}return i<r?-1:r<i?1:0},T.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},T.concat=function(e,t){if(!x(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return T.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var r=T.allocUnsafe(t),n=0;for(i=0;i<e.length;++i){var o=e[i];if(!j(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,n),n+=o.length}return r},T.byteLength=O,T.prototype._isBuffer=!0,T.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)N(this,t,t+1);return this},T.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)N(this,t,t+3),N(this,t+1,t+2);return this},T.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)N(this,t,t+7),N(this,t+1,t+6),N(this,t+2,t+5),N(this,t+3,t+4);return this},T.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Y(this,0,e):D.apply(this,arguments)},T.prototype.equals=function(e){if(!j(e))throw new TypeError("Argument must be a Buffer");return this===e||0===T.compare(this,e)},T.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},T.prototype.compare=function(e,t,i,r,n){if(!j(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),t<0||i>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&t>=i)return 0;if(r>=n)return-1;if(t>=i)return 1;if(this===e)return 0;for(var o=(n>>>=0)-(r>>>=0),s=(i>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(r,n),d=e.slice(t,i),u=0;u<a;++u)if(c[u]!==d[u]){o=c[u],s=d[u];break}return o<s?-1:s<o?1:0},T.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},T.prototype.indexOf=function(e,t,i){return U(this,e,t,i,!0)},T.prototype.lastIndexOf=function(e,t,i){return U(this,e,t,i,!1)},T.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)r=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return H(this,e,t,i);case"utf8":case"utf-8":return z(this,e,t,i);case"ascii":return K(this,e,t,i);case"latin1":case"binary":return q(this,e,t,i);case"base64":return F(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var G=4096;function X(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(127&e[n]);return r}function W(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(e[n]);return r}function Q(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var n="",o=t;o<i;++o)n+=ce(e[o]);return n}function Z(e,t,i){for(var r=e.slice(t,i),n="",o=0;o<r.length;o+=2)n+=String.fromCharCode(r[o]+256*r[o+1]);return n}function ee(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function te(e,t,i,r,n,o){if(!j(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(i+r>e.length)throw new RangeError("Index out of range")}function ie(e,t,i,r){t<0&&(t=65535+t+1);for(var n=0,o=Math.min(e.length-i,2);n<o;++n)e[i+n]=(t&255<<8*(r?n:1-n))>>>8*(r?n:1-n)}function re(e,t,i,r){t<0&&(t=4294967295+t+1);for(var n=0,o=Math.min(e.length-i,4);n<o;++n)e[i+n]=t>>>8*(r?n:3-n)&255}function ne(e,t,i,r,n,o){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function oe(e,t,i,r,n){return n||ne(e,0,i,4),P(e,t,i,r,23,4),i+4}function se(e,t,i,r,n){return n||ne(e,0,i,8),P(e,t,i,r,52,8),i+8}T.prototype.slice=function(e,t){var i,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),T.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=T.prototype;else{var n=t-e;i=new T(n,void 0);for(var o=0;o<n;++o)i[o]=this[o+e]}return i},T.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||ee(e,t,this.length);for(var r=this[e],n=1,o=0;++o<t&&(n*=256);)r+=this[e+o]*n;return r},T.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||ee(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},T.prototype.readUInt8=function(e,t){return t||ee(e,1,this.length),this[e]},T.prototype.readUInt16LE=function(e,t){return t||ee(e,2,this.length),this[e]|this[e+1]<<8},T.prototype.readUInt16BE=function(e,t){return t||ee(e,2,this.length),this[e]<<8|this[e+1]},T.prototype.readUInt32LE=function(e,t){return t||ee(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},T.prototype.readUInt32BE=function(e,t){return t||ee(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},T.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||ee(e,t,this.length);for(var r=this[e],n=1,o=0;++o<t&&(n*=256);)r+=this[e+o]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*t)),r},T.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||ee(e,t,this.length);for(var r=t,n=1,o=this[e+--r];r>0&&(n*=256);)o+=this[e+--r]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*t)),o},T.prototype.readInt8=function(e,t){return t||ee(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},T.prototype.readInt16LE=function(e,t){t||ee(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},T.prototype.readInt16BE=function(e,t){t||ee(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},T.prototype.readInt32LE=function(e,t){return t||ee(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},T.prototype.readInt32BE=function(e,t){return t||ee(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},T.prototype.readFloatLE=function(e,t){return t||ee(e,4,this.length),S(this,e,!0,23,4)},T.prototype.readFloatBE=function(e,t){return t||ee(e,4,this.length),S(this,e,!1,23,4)},T.prototype.readDoubleLE=function(e,t){return t||ee(e,8,this.length),S(this,e,!0,52,8)},T.prototype.readDoubleBE=function(e,t){return t||ee(e,8,this.length),S(this,e,!1,52,8)},T.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||te(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,o=0;for(this[t]=255&e;++o<i&&(n*=256);)this[t+o]=e/n&255;return t+i},T.prototype.writeUIntBE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||te(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,o=1;for(this[t+n]=255&e;--n>=0&&(o*=256);)this[t+n]=e/o&255;return t+i},T.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||te(this,e,t,1,255,0),T.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},T.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||te(this,e,t,2,65535,0),T.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ie(this,e,t,!0),t+2},T.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||te(this,e,t,2,65535,0),T.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ie(this,e,t,!1),t+2},T.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||te(this,e,t,4,4294967295,0),T.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):re(this,e,t,!0),t+4},T.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||te(this,e,t,4,4294967295,0),T.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):re(this,e,t,!1),t+4},T.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);te(this,e,t,i,n-1,-n)}var o=0,s=1,a=0;for(this[t]=255&e;++o<i&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+i},T.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);te(this,e,t,i,n-1,-n)}var o=i-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+i},T.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||te(this,e,t,1,127,-128),T.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},T.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||te(this,e,t,2,32767,-32768),T.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ie(this,e,t,!0),t+2},T.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||te(this,e,t,2,32767,-32768),T.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ie(this,e,t,!1),t+2},T.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||te(this,e,t,4,2147483647,-2147483648),T.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):re(this,e,t,!0),t+4},T.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||te(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),T.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):re(this,e,t,!1),t+4},T.prototype.writeFloatLE=function(e,t,i){return oe(this,e,t,!0,i)},T.prototype.writeFloatBE=function(e,t,i){return oe(this,e,t,!1,i)},T.prototype.writeDoubleLE=function(e,t,i){return se(this,e,t,!0,i)},T.prototype.writeDoubleBE=function(e,t,i){return se(this,e,t,!1,i)},T.prototype.copy=function(e,t,i,r){if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-i&&(r=e.length-t+i);var n,o=r-i;if(this===e&&i<t&&t<r)for(n=o-1;n>=0;--n)e[n+t]=this[n+i];else if(o<1e3||!T.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)e[n+t]=this[n+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+o),t);return o},T.prototype.fill=function(e,t,i,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!T.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var o;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o<i;++o)this[o]=e;else{var s=j(e)?e:de(new T(e,r).toString()),a=s.length;for(o=0;o<i-t;++o)this[o+t]=s[o%a]}return this};var ae=/[^+\/0-9A-Za-z-_]/g;function ce(e){return e<16?"0"+e.toString(16):e.toString(16)}function de(e,t){var i;t=t||1/0;for(var r=e.length,n=null,o=[],s=0;s<r;++s){if((i=e.charCodeAt(s))>55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&o.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;o.push(i)}else if(i<2048){if((t-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function ue(e){return function(e){var t,i,r,n,o,s;v||w();var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[a-2]?2:"="===e[a-1]?1:0,s=new b(3*a/4-o),r=o>0?a-4:a;var c=0;for(t=0,i=0;t<r;t+=4,i+=3)n=y[e.charCodeAt(t)]<<18|y[e.charCodeAt(t+1)]<<12|y[e.charCodeAt(t+2)]<<6|y[e.charCodeAt(t+3)],s[c++]=n>>16&255,s[c++]=n>>8&255,s[c++]=255&n;return 2===o?(n=y[e.charCodeAt(t)]<<2|y[e.charCodeAt(t+1)]>>4,s[c++]=255&n):1===o&&(n=y[e.charCodeAt(t)]<<10|y[e.charCodeAt(t+1)]<<4|y[e.charCodeAt(t+2)]>>2,s[c++]=n>>8&255,s[c++]=255&n),s}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(ae,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function le(e,t,i,r){for(var n=0;n<r&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function he(e){return null!=e&&(!!e._isBuffer||pe(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&pe(e.slice(0,0))}(e))}function pe(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function fe(){throw new Error("setTimeout has not been defined")}function ge(){throw new Error("clearTimeout has not been defined")}var me=fe,ye=ge;function be(e){if(me===setTimeout)return setTimeout(e,0);if((me===fe||!me)&&setTimeout)return me=setTimeout,setTimeout(e,0);try{return me(e,0)}catch(t){try{return me.call(null,e,0)}catch(t){return me.call(this,e,0)}}}"function"==typeof g.setTimeout&&(me=setTimeout),"function"==typeof g.clearTimeout&&(ye=clearTimeout);var ve,we=[],ke=!1,Le=-1;function Se(){ke&&ve&&(ke=!1,ve.length?we=ve.concat(we):Le=-1,we.length&&Pe())}function Pe(){if(!ke){var e=be(Se);ke=!0;for(var t=we.length;t;){for(ve=we,we=[];++Le<t;)ve&&ve[Le].run();Le=-1,t=we.length}ve=null,ke=!1,function(e){if(ye===clearTimeout)return clearTimeout(e);if((ye===ge||!ye)&&clearTimeout)return ye=clearTimeout,clearTimeout(e);try{return ye(e)}catch(t){try{return ye.call(null,e)}catch(t){return ye.call(this,e)}}}(e)}}function Ie(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];we.push(new xe(e,t)),1!==we.length||ke||be(Pe)}function xe(e,t){this.fun=e,this.array=t}xe.prototype.run=function(){this.fun.apply(null,this.array)};var Ee=g.performance||{};Ee.now||Ee.mozNow||Ee.msNow||Ee.oNow||Ee.webkitNow;var _e={env:{},argv:[]},Te="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ce(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),i}
|
|
2
|
-
/*! https://mths.be/punycode v1.4.1 by @mathias */var Ae=2147483647,Me=/[^\x20-\x7E]/,Ve=/[\x2E\u3002\uFF0E\uFF61]/g,je={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Oe=Math.floor,De=String.fromCharCode;function Ne(e){throw new RangeError(je[e])}function Ue(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function Be(e,t,i){var r=0;for(e=i?Oe(e/700):e>>1,e+=Oe(e/t);e>455;r+=36)e=Oe(e/35);return Oe(r+36*e/(e+38))}function He(e){return function(e,t){var i=e.split("@"),r="";i.length>1&&(r=i[0]+"@",e=i[1]);var n=function(e,t){for(var i=e.length,r=[];i--;)r[i]=t(e[i]);return r}((e=e.replace(Ve,".")).split("."),t).join(".");return r+n}(e,(function(e){return Me.test(e)?"xn--"+function(e){var t,i,r,n,o,s,a,c,d,u,l,h,p,f,g,m=[];for(e=function(e){for(var t,i,r=[],n=0,o=e.length;n<o;)(t=e.charCodeAt(n++))>=55296&&t<=56319&&n<o?56320==(64512&(i=e.charCodeAt(n++)))?r.push(((1023&t)<<10)+(1023&i)+65536):(r.push(t),n--):r.push(t);return r}(e),h=e.length,t=128,i=0,o=72,s=0;s<h;++s)(l=e[s])<128&&m.push(De(l));for(r=n=m.length,n&&m.push("-");r<h;){for(a=Ae,s=0;s<h;++s)(l=e[s])>=t&&l<a&&(a=l);for(a-t>Oe((Ae-i)/(p=r+1))&&Ne("overflow"),i+=(a-t)*p,t=a,s=0;s<h;++s)if((l=e[s])<t&&++i>Ae&&Ne("overflow"),l==t){for(c=i,d=36;!(c<(u=d<=o?1:d>=o+26?26:d-o));d+=36)g=c-u,f=36-u,m.push(De(Ue(u+g%f,0))),c=Oe(g/f);m.push(De(Ue(c,0))),o=Be(i,p,r==n),i=0,++r}++i,++t}return m.join("")}(e):e}))}var ze="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e},Ke=/%[sdj%]/g;function qe(e){if(!it(e)){for(var t=[],i=0;i<arguments.length;i++)t.push(Ye(arguments[i]));return t.join(" ")}i=1;for(var r=arguments,n=r.length,o=String(e).replace(Ke,(function(e){if("%%"===e)return"%";if(i>=n)return e;switch(e){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch(e){return"[Circular]"}default:return e}})),s=r[i];i<n;s=r[++i])tt(s)||!ot(s)?o+=" "+s:o+=" "+Ye(s);return o}function Fe(e,t){if(rt(g.process))return function(){return Fe(e,t).apply(this,arguments)};if(!0===_e.noDeprecation)return e;var i=!1;return function(){if(!i){if(_e.throwDeprecation)throw new Error(t);_e.traceDeprecation?console.trace(t):console.error(t),i=!0}return e.apply(this,arguments)}}var $e,Je={};function Ye(e,t){var i={seen:[],stylize:Xe};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),et(t)?i.showHidden=t:t&&function(e,t){if(!t||!ot(t))return e;var i=Object.keys(t),r=i.length;for(;r--;)e[i[r]]=t[i[r]]}(i,t),rt(i.showHidden)&&(i.showHidden=!1),rt(i.depth)&&(i.depth=2),rt(i.colors)&&(i.colors=!1),rt(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=Ge),We(i,e,i.depth)}function Ge(e,t){var i=Ye.styles[t];return i?"["+Ye.colors[i][0]+"m"+e+"["+Ye.colors[i][1]+"m":e}function Xe(e,t){return e}function We(e,t,i){if(e.customInspect&&t&&ct(t.inspect)&&t.inspect!==Ye&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(i,e);return it(r)||(r=We(e,r,i)),r}var n=function(e,t){if(rt(t))return e.stylize("undefined","undefined");if(it(t)){var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(i,"string")}if(r=t,"number"==typeof r)return e.stylize(""+t,"number");var r;if(et(t))return e.stylize(""+t,"boolean");if(tt(t))return e.stylize("null","null")}(e,t);if(n)return n;var o=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,i){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),at(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Qe(t);if(0===o.length){if(ct(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(nt(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(st(t))return e.stylize(Date.prototype.toString.call(t),"date");if(at(t))return Qe(t)}var c,d,u="",l=!1,h=["{","}"];(c=t,Array.isArray(c)&&(l=!0,h=["[","]"]),ct(t))&&(u=" [Function"+(t.name?": "+t.name:"")+"]");return nt(t)&&(u=" "+RegExp.prototype.toString.call(t)),st(t)&&(u=" "+Date.prototype.toUTCString.call(t)),at(t)&&(u=" "+Qe(t)),0!==o.length||l&&0!=t.length?i<0?nt(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),d=l?function(e,t,i,r,n){for(var o=[],s=0,a=t.length;s<a;++s)ut(t,String(s))?o.push(Ze(e,t,i,r,String(s),!0)):o.push("");return n.forEach((function(n){n.match(/^\d+$/)||o.push(Ze(e,t,i,r,n,!0))})),o}(e,t,i,s,o):o.map((function(r){return Ze(e,t,i,s,r,l)})),e.seen.pop(),function(e,t,i){var r=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return i[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+i[1];return i[0]+t+" "+e.join(", ")+" "+i[1]}(d,u,h)):h[0]+u+h[1]}function Qe(e){return"["+Error.prototype.toString.call(e)+"]"}function Ze(e,t,i,r,n,o){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),ut(r,n)||(s="["+n+"]"),a||(e.seen.indexOf(c.value)<0?(a=tt(i)?We(e,c.value,null):We(e,c.value,i-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),rt(s)){if(o&&n.match(/^\d+$/))return a;(s=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function et(e){return"boolean"==typeof e}function tt(e){return null===e}function it(e){return"string"==typeof e}function rt(e){return void 0===e}function nt(e){return ot(e)&&"[object RegExp]"===dt(e)}function ot(e){return"object"==typeof e&&null!==e}function st(e){return ot(e)&&"[object Date]"===dt(e)}function at(e){return ot(e)&&("[object Error]"===dt(e)||e instanceof Error)}function ct(e){return"function"==typeof e}function dt(e){return Object.prototype.toString.call(e)}function ut(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function lt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}Ye.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Ye.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var ht=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function pt(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function ft(e,t){if(e.map)return e.map(t);for(var i=[],r=0;r<e.length;r++)i.push(t(e[r],r));return i}var gt=Object.keys||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return t};function mt(e,t,i,r){t=t||"&",i=i||"=";var n={};if("string"!=typeof e||0===e.length)return n;var o=/\+/g,s=(e=e.split(t)).length;s>1e3&&(s=1e3);for(var a=0;a<s;++a){var c,d,u,l,h=e[a].replace(o,"%20"),p=h.indexOf(i);p>=0?(c=h.substr(0,p),d=h.substr(p+1)):(c=h,d=""),u=decodeURIComponent(c),l=decodeURIComponent(d),lt(n,u)?ht(n[u])?n[u].push(l):n[u]=[n[u],l]:n[u]=l}return n}var yt={parse:At,resolve:Ot,resolveObject:Dt,format:Vt,Url:bt};function bt(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var vt=/^([a-z0-9.+-]+:)/i,wt=/:[0-9]*$/,kt=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Lt=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),St=["'"].concat(Lt),Pt=["%","/","?",";","#"].concat(St),It=["/","?","#"],xt=255,Et=/^[+a-z0-9A-Z_-]{0,63}$/,_t=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Tt={javascript:!0,"javascript:":!0},Rt={javascript:!0,"javascript:":!0},Ct={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function At(e,t,i){if(e&&ot(e)&&e instanceof bt)return e;var r=new bt;return r.parse(e,t,i),r}function Mt(e,t,i,r){if(!it(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),o=-1!==n&&n<t.indexOf("#")?"?":"#",s=t.split(o);s[0]=s[0].replace(/\\/g,"/");var a=t=s.join(o);if(a=a.trim(),!r&&1===t.split("#").length){var c=kt.exec(a);if(c)return e.path=a,e.href=a,e.pathname=c[1],c[2]?(e.search=c[2],e.query=i?mt(e.search.substr(1)):e.search.substr(1)):i&&(e.search="",e.query={}),e}var d,u,l,h,p=vt.exec(a);if(p){var f=(p=p[0]).toLowerCase();e.protocol=f,a=a.substr(p.length)}if(r||p||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===a.substr(0,2);!g||p&&Rt[p]||(a=a.substr(2),e.slashes=!0)}if(!Rt[p]&&(g||p&&!Ct[p])){var m,y,b=-1;for(d=0;d<It.length;d++)-1!==(u=a.indexOf(It[d]))&&(-1===b||u<b)&&(b=u);for(-1!==(y=-1===b?a.lastIndexOf("@"):a.lastIndexOf("@",b))&&(m=a.slice(0,y),a=a.slice(y+1),e.auth=decodeURIComponent(m)),b=-1,d=0;d<Pt.length;d++)-1!==(u=a.indexOf(Pt[d]))&&(-1===b||u<b)&&(b=u);-1===b&&(b=a.length),e.host=a.slice(0,b),a=a.slice(b),Nt(e),e.hostname=e.hostname||"";var v="["===e.hostname[0]&&"]"===e.hostname[e.hostname.length-1];if(!v){var w=e.hostname.split(/\./);for(d=0,l=w.length;d<l;d++){var k=w[d];if(k&&!k.match(Et)){for(var L="",S=0,P=k.length;S<P;S++)k.charCodeAt(S)>127?L+="x":L+=k[S];if(!L.match(Et)){var I=w.slice(0,d),x=w.slice(d+1),E=k.match(_t);E&&(I.push(E[1]),x.unshift(E[2])),x.length&&(a="/"+x.join(".")+a),e.hostname=I.join(".");break}}}}e.hostname.length>xt?e.hostname="":e.hostname=e.hostname.toLowerCase(),v||(e.hostname=He(e.hostname)),h=e.port?":"+e.port:"";var _=e.hostname||"";e.host=_+h,e.href+=e.host,v&&(e.hostname=e.hostname.substr(1,e.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!Tt[f])for(d=0,l=St.length;d<l;d++){var T=St[d];if(-1!==a.indexOf(T)){var R=encodeURIComponent(T);R===T&&(R=escape(T)),a=a.split(T).join(R)}}var C=a.indexOf("#");-1!==C&&(e.hash=a.substr(C),a=a.slice(0,C));var A=a.indexOf("?");if(-1!==A?(e.search=a.substr(A),e.query=a.substr(A+1),i&&(e.query=mt(e.query)),a=a.slice(0,A)):i&&(e.search="",e.query={}),a&&(e.pathname=a),Ct[f]&&e.hostname&&!e.pathname&&(e.pathname="/"),e.pathname||e.search){h=e.pathname||"";var M=e.search||"";e.path=h+M}return e.href=jt(e),e}function Vt(e){return it(e)&&(e=Mt({},e)),jt(e)}function jt(e){var t=e.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var i,r,n,o=e.protocol||"",s=e.pathname||"",a=e.hash||"",c=!1,d="";e.host?c=t+e.host:e.hostname&&(c=t+(-1===e.hostname.indexOf(":")?e.hostname:"["+this.hostname+"]"),e.port&&(c+=":"+e.port)),e.query&&ot(e.query)&&Object.keys(e.query).length&&(i=e.query,r=r||"&",n=n||"=",null===i&&(i=void 0),d="object"==typeof i?ft(gt(i),(function(e){var t=encodeURIComponent(pt(e))+n;return ht(i[e])?ft(i[e],(function(e){return t+encodeURIComponent(pt(e))})).join(r):t+encodeURIComponent(pt(i[e]))})).join(r):"");var u=e.search||d&&"?"+d||"";return o&&":"!==o.substr(-1)&&(o+=":"),e.slashes||(!o||Ct[o])&&!1!==c?(c="//"+(c||""),s&&"/"!==s.charAt(0)&&(s="/"+s)):c||(c=""),a&&"#"!==a.charAt(0)&&(a="#"+a),u&&"?"!==u.charAt(0)&&(u="?"+u),o+c+(s=s.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(u=u.replace("#","%23"))+a}function Ot(e,t){return At(e,!1,!0).resolve(t)}function Dt(e,t){return e?At(e,!1,!0).resolveObject(t):t}function Nt(e){var t=e.host,i=wt.exec(t);i&&(":"!==(i=i[0])&&(e.port=i.substr(1)),t=t.substr(0,t.length-i.length)),t&&(e.hostname=t)}bt.prototype.parse=function(e,t,i){return Mt(this,e,t,i)},bt.prototype.format=function(){return jt(this)},bt.prototype.resolve=function(e){return this.resolveObject(At(e,!1,!0)).format()},bt.prototype.resolveObject=function(e){if(it(e)){var t=new bt;t.parse(e,!1,!0),e=t}for(var i,r=new bt,n=Object.keys(this),o=0;o<n.length;o++){var s=n[o];r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),c=0;c<a.length;c++){var d=a[c];"protocol"!==d&&(r[d]=e[d])}return Ct[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!Ct[e.protocol]){for(var u=Object.keys(e),l=0;l<u.length;l++){var h=u[l];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||Rt[e.protocol])r.pathname=e.pathname;else{for(i=(e.pathname||"").split("/");i.length&&!(e.host=i.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),r.pathname=i.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var p=r.pathname||"",f=r.search||"";r.path=p+f}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var g,m=r.pathname&&"/"===r.pathname.charAt(0),y=e.host||e.pathname&&"/"===e.pathname.charAt(0),b=y||m||r.host&&e.pathname,v=b,w=r.pathname&&r.pathname.split("/")||[],k=r.protocol&&!Ct[r.protocol];if(i=e.pathname&&e.pathname.split("/")||[],k&&(r.hostname="",r.port=null,r.host&&(""===w[0]?w[0]=r.host:w.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===i[0]?i[0]=e.host:i.unshift(e.host)),e.host=null),b=b&&(""===i[0]||""===w[0])),y)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,w=i;else if(i.length)w||(w=[]),w.pop(),w=w.concat(i),r.search=e.search,r.query=e.query;else if(null!=e.search)return k&&(r.hostname=r.host=w.shift(),(g=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=g.shift(),r.host=r.hostname=g.shift())),r.search=e.search,r.query=e.query,tt(r.pathname)&&tt(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var L=w.slice(-1)[0],S=(r.host||e.host||w.length>1)&&("."===L||".."===L)||""===L,P=0,I=w.length;I>=0;I--)"."===(L=w[I])?w.splice(I,1):".."===L?(w.splice(I,1),P++):P&&(w.splice(I,1),P--);if(!b&&!v)for(;P--;P)w.unshift("..");!b||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),S&&"/"!==w.join("/").substr(-1)&&w.push("");var x=""===w[0]||w[0]&&"/"===w[0].charAt(0);return k&&(r.hostname=r.host=x?"":w.length?w.shift():"",(g=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=g.shift(),r.host=r.hostname=g.shift())),(b=b||r.host&&w.length)&&!x&&w.unshift(""),w.length?r.pathname=w.join("/"):(r.pathname=null,r.path=null),tt(r.pathname)&&tt(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},bt.prototype.parseHost=function(){return Nt(this)};var Ut,Bt,Ht=Ce(Object.freeze({__proto__:null,Url:bt,default:yt,format:Vt,parse:At,resolve:Ot,resolveObject:Dt})),zt=Ce(Object.freeze({__proto__:null,default:{}})),Kt=Zt(g.fetch)&&Zt(g.ReadableStream);function qt(e){Bt||(Bt=new g.XMLHttpRequest).open("GET",g.location.host?"/":"https://example.com");try{return Bt.responseType=e,Bt.responseType===e}catch(e){return!1}}var Ft,$t=void 0!==g.ArrayBuffer,Jt=$t&&Zt(g.ArrayBuffer.prototype.slice),Yt=$t&&qt("arraybuffer"),Gt=!Kt&&Jt&&qt("ms-stream"),Xt=!Kt&&$t&&qt("moz-chunked-arraybuffer"),Wt=Zt(Bt.overrideMimeType),Qt=Zt(g.VBArray);function Zt(e){return"function"==typeof e}function ei(){}function ti(){ti.init.call(this)}function ii(e){return void 0===e._maxListeners?ti.defaultMaxListeners:e._maxListeners}function ri(e,t,i,r){var n,o,s,a;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e._events),s=o[t]):(o=e._events=new ei,e._eventsCount=0),s){if("function"==typeof s?s=o[t]=r?[i,s]:[s,i]:r?s.unshift(i):s.push(i),!s.warned&&(n=ii(e))&&n>0&&s.length>n){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,"function"==typeof console.warn?console.warn(a):console.log(a)}}else s=o[t]=i,++e._eventsCount;return e}function ni(e,t,i){var r=!1;function n(){e.removeListener(t,n),r||(r=!0,i.apply(e,arguments))}return n.listener=i,n}function oi(e){var t=this._events;if(t){var i=t[e];if("function"==typeof i)return 1;if(i)return i.length}return 0}function si(e,t){for(var i=new Array(t);t--;)i[t]=e[t];return i}function ai(){this.head=null,this.tail=null,this.length=0}Bt=null,ei.prototype=Object.create(null),ti.EventEmitter=ti,ti.usingDomains=!1,ti.prototype.domain=void 0,ti.prototype._events=void 0,ti.prototype._maxListeners=void 0,ti.defaultMaxListeners=10,ti.init=function(){this.domain=null,ti.usingDomains&&(!Ft.active||this instanceof Ft.Domain||(this.domain=Ft.active)),this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new ei,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ti.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},ti.prototype.getMaxListeners=function(){return ii(this)},ti.prototype.emit=function(e){var t,i,r,n,o,s,a,c="error"===e;if(s=this._events)c=c&&null==s.error;else if(!c)return!1;if(a=this.domain,c){if(t=arguments[1],!a){if(t instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=a,t.domainThrown=!1,a.emit("error",t),!1}if(!(i=s[e]))return!1;var u="function"==typeof i;switch(r=arguments.length){case 1:!function(e,t,i){if(t)e.call(i);else for(var r=e.length,n=si(e,r),o=0;o<r;++o)n[o].call(i)}(i,u,this);break;case 2:!function(e,t,i,r){if(t)e.call(i,r);else for(var n=e.length,o=si(e,n),s=0;s<n;++s)o[s].call(i,r)}(i,u,this,arguments[1]);break;case 3:!function(e,t,i,r,n){if(t)e.call(i,r,n);else for(var o=e.length,s=si(e,o),a=0;a<o;++a)s[a].call(i,r,n)}(i,u,this,arguments[1],arguments[2]);break;case 4:!function(e,t,i,r,n,o){if(t)e.call(i,r,n,o);else for(var s=e.length,a=si(e,s),c=0;c<s;++c)a[c].call(i,r,n,o)}(i,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(r-1),o=1;o<r;o++)n[o-1]=arguments[o];!function(e,t,i,r){if(t)e.apply(i,r);else for(var n=e.length,o=si(e,n),s=0;s<n;++s)o[s].apply(i,r)}(i,u,this,n)}return!0},ti.prototype.addListener=function(e,t){return ri(this,e,t,!1)},ti.prototype.on=ti.prototype.addListener,ti.prototype.prependListener=function(e,t){return ri(this,e,t,!0)},ti.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,ni(this,e,t)),this},ti.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,ni(this,e,t)),this},ti.prototype.removeListener=function(e,t){var i,r,n,o,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(i=r[e]))return this;if(i===t||i.listener&&i.listener===t)0==--this._eventsCount?this._events=new ei:(delete r[e],r.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(n=-1,o=i.length;o-- >0;)if(i[o]===t||i[o].listener&&i[o].listener===t){s=i[o].listener,n=o;break}if(n<0)return this;if(1===i.length){if(i[0]=void 0,0==--this._eventsCount)return this._events=new ei,this;delete r[e]}else!function(e,t){for(var i=t,r=i+1,n=e.length;r<n;i+=1,r+=1)e[i]=e[r];e.pop()}(i,n);r.removeListener&&this.emit("removeListener",e,s||t)}return this},ti.prototype.removeAllListeners=function(e){var t,i;if(!(i=this._events))return this;if(!i.removeListener)return 0===arguments.length?(this._events=new ei,this._eventsCount=0):i[e]&&(0==--this._eventsCount?this._events=new ei:delete i[e]),this;if(0===arguments.length){for(var r,n=Object.keys(i),o=0;o<n.length;++o)"removeListener"!==(r=n[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new ei,this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},ti.prototype.listeners=function(e){var t,i=this._events;return i&&(t=i[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(t):[]},ti.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):oi.call(e,t)},ti.prototype.listenerCount=oi,ti.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]},ai.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},ai.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},ai.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},ai.prototype.clear=function(){this.head=this.tail=null,this.length=0},ai.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i},ai.prototype.concat=function(e){if(0===this.length)return T.alloc(0);if(1===this.length)return this.head.data;for(var t=T.allocUnsafe(e>>>0),i=this.head,r=0;i;)i.data.copy(t,r),r+=i.data.length,i=i.next;return t};var ci=T.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function di(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!ci(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=li;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=hi;break;default:return void(this.write=ui)}this.charBuffer=new T(6),this.charReceived=0,this.charLength=0}function ui(e){return e.toString(this.encoding)}function li(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function hi(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}di.prototype.write=function(e){for(var t="";this.charLength;){var i=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,i),this.charReceived+=i,this.charReceived<this.charLength)return"";if(e=e.slice(i,e.length),!((n=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived);var n;r=(t+=e.toString(this.encoding,0,r)).length-1;if((n=t.charCodeAt(r))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,r)}return t},di.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var i=e[e.length-t];if(1==t&&i>>5==6){this.charLength=2;break}if(t<=2&&i>>4==14){this.charLength=3;break}if(t<=3&&i>>3==30){this.charLength=4;break}}this.charReceived=t},di.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var i=this.charReceived,r=this.charBuffer,n=this.encoding;t+=r.slice(0,i).toString(n)}return t},gi.ReadableState=fi;var pi=function(e){if(rt($e)&&($e=_e.env.NODE_DEBUG||""),e=e.toUpperCase(),!Je[e])if(new RegExp("\\b"+e+"\\b","i").test($e)){Je[e]=function(){var t=qe.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else Je[e]=function(){};return Je[e]}("stream");function fi(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Ki&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new ai,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new di(e.encoding),this.encoding=e.encoding)}function gi(e){if(!(this instanceof gi))return new gi(e);this._readableState=new fi(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),ti.call(this)}function mi(e,t,i,r,n){var o=function(e,t){var i=null;he(t)||"string"==typeof t||null==t||e.objectMode||(i=new TypeError("Invalid non-string/buffer chunk"));return i}(t,i);if(o)e.emit("error",o);else if(null===i)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length)}t.ended=!0,vi(e)}(e,t);else if(t.objectMode||i&&i.length>0)if(t.ended&&!n){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&n){var a=new Error("stream.unshift() after end event");e.emit("error",a)}else{var c;!t.decoder||n||r||(i=t.decoder.write(i),c=!t.objectMode&&0===i.length),n||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",i),e.read(0)):(t.length+=t.objectMode?1:i.length,n?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&vi(e))),function(e,t){t.readingMore||(t.readingMore=!0,Ie(ki,e,t))}(e,t)}else n||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}ze(gi,ti),gi.prototype.push=function(e,t){var i=this._readableState;return i.objectMode||"string"!=typeof e||(t=t||i.defaultEncoding)!==i.encoding&&(e=T.from(e,t),t=""),mi(this,i,e,t,!1)},gi.prototype.unshift=function(e){return mi(this,this._readableState,e,"",!0)},gi.prototype.isPaused=function(){return!1===this._readableState.flowing},gi.prototype.setEncoding=function(e){return this._readableState.decoder=new di(e),this._readableState.encoding=e,this};var yi=8388608;function bi(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=yi?e=yi:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function vi(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(pi("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Ie(wi,e):wi(e))}function wi(e){pi("emit readable"),e.emit("readable"),Pi(e)}function ki(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(pi("maybeReadMore read 0"),e.read(0),i!==t.length);)i=t.length;t.readingMore=!1}function Li(e){pi("readable nexttick read 0"),e.read(0)}function Si(e,t){t.reading||(pi("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Pi(e),t.flowing&&!t.reading&&e.read(0)}function Pi(e){var t=e._readableState;for(pi("flow",t.flowing);t.flowing&&null!==e.read(););}function Ii(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():i?function(e,t){var i=t.head,r=1,n=i.data;e-=n.length;for(;i=i.next;){var o=i.data,s=e>o.length?o.length:e;if(s===o.length?n+=o:n+=o.slice(0,e),0===(e-=s)){s===o.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=o.slice(s));break}++r}return t.length-=r,n}(e,t):function(e,t){var i=T.allocUnsafe(e),r=t.head,n=1;r.data.copy(i),e-=r.data.length;for(;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(i,i.length-e,0,s),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t);return r}(e,t.buffer,t.decoder),i);var i}function xi(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Ie(Ei,t,e))}function Ei(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function _i(e,t){for(var i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1}function Ti(){}function Ri(e,t,i){this.chunk=e,this.encoding=t,this.callback=i,this.next=null}function Ci(e,t){Object.defineProperty(this,"buffer",{get:Fe((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof Ki&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var n=!1===e.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,r,n){--t.pendingcb,i?Ie(n,r):n(r);e._writableState.errorEmitted=!0,e.emit("error",r)}(e,i,r,t,n);else{var o=Oi(i);o||i.corked||i.bufferProcessing||!i.bufferedRequest||ji(e,i),r?Ie(Vi,e,i,o,n):Vi(e,i,o,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ui(this)}function Ai(e){if(!(this instanceof Ai||this instanceof Ki))return new Ai(e);this._writableState=new Ci(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),ti.call(this)}function Mi(e,t,i,r,n,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,i?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function Vi(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),Ni(e,t)}function ji(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,n=new Array(r),o=t.corkedRequestsFree;o.entry=i;for(var s=0;i;)n[s]=i,i=i.next,s+=1;Mi(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Ui(t)}else{for(;i;){var a=i.chunk,c=i.encoding,d=i.callback;if(Mi(e,t,!1,t.objectMode?1:a.length,a,c,d),i=i.next,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=i,t.bufferProcessing=!1}function Oi(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Di(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Ni(e,t){var i=Oi(t);return i&&(0===t.pendingcb?(Di(e,t),t.finished=!0,e.emit("finish")):Di(e,t)),i}function Ui(e){var t=this;this.next=null,this.entry=null,this.finish=function(i){var r=t.entry;for(t.entry=null;r;){var n=r.callback;e.pendingcb--,n(i),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}gi.prototype.read=function(e){pi("read",e),e=parseInt(e,10);var t=this._readableState,i=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return pi("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?xi(this):vi(this),null;if(0===(e=bi(e,t))&&t.ended)return 0===t.length&&xi(this),null;var r,n=t.needReadable;return pi("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&pi("length less than watermark",n=!0),t.ended||t.reading?pi("reading or ended",n=!1):n&&(pi("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=bi(i,t))),null===(r=e>0?Ii(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&xi(this)),null!==r&&this.emit("data",r),r},gi.prototype._read=function(e){this.emit("error",new Error("not implemented"))},gi.prototype.pipe=function(e,t){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,pi("pipe count=%d opts=%j",r.pipesCount,t);var n=!t||!1!==t.end?s:d;function o(e){pi("onunpipe"),e===i&&d()}function s(){pi("onend"),e.end()}r.endEmitted?Ie(n):i.once("end",n),e.on("unpipe",o);var a=function(e){return function(){var t=e._readableState;pi("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,Pi(e))}}(i);e.on("drain",a);var c=!1;function d(){pi("cleanup"),e.removeListener("close",p),e.removeListener("finish",f),e.removeListener("drain",a),e.removeListener("error",h),e.removeListener("unpipe",o),i.removeListener("end",s),i.removeListener("end",d),i.removeListener("data",l),c=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||a()}var u=!1;function l(t){pi("ondata"),u=!1,!1!==e.write(t)||u||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==_i(r.pipes,e))&&!c&&(pi("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,u=!0),i.pause())}function h(t){var i;pi("onerror",t),g(),e.removeListener("error",h),0===(i="error",e.listeners(i).length)&&e.emit("error",t)}function p(){e.removeListener("finish",f),g()}function f(){pi("onfinish"),e.removeListener("close",p),g()}function g(){pi("unpipe"),i.unpipe(e)}return i.on("data",l),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",h),e.once("close",p),e.once("finish",f),e.emit("pipe",i),r.flowing||(pi("pipe resume"),i.resume()),e},gi.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var i=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var n=0;n<r;n++)i[n].emit("unpipe",this);return this}var o=_i(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},gi.prototype.on=function(e,t){var i=ti.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&vi(this):Ie(Li,this))}return i},gi.prototype.addListener=gi.prototype.on,gi.prototype.resume=function(){var e=this._readableState;return e.flowing||(pi("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Ie(Si,e,t))}(this,e)),this},gi.prototype.pause=function(){return pi("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(pi("pause"),this._readableState.flowing=!1,this.emit("pause")),this},gi.prototype.wrap=function(e){var t=this._readableState,i=!1,r=this;for(var n in e.on("end",(function(){if(pi("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(n){(pi("wrapped data"),t.decoder&&(n=t.decoder.write(n)),t.objectMode&&null==n)||(t.objectMode||n&&n.length)&&(r.push(n)||(i=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));return function(e,t){for(var i=0,r=e.length;i<r;i++)t(e[i],i)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){pi("wrapped _read",t),i&&(i=!1,e.resume())},r},gi._fromList=Ii,Ai.WritableState=Ci,ze(Ai,ti),Ci.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},Ai.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Ai.prototype.write=function(e,t,i){var r=this._writableState,n=!1;return"function"==typeof t&&(i=t,t=null),T.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof i&&(i=Ti),r.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),Ie(t,i)}(this,i):function(e,t,i,r){var n=!0,o=!1;return null===i?o=new TypeError("May not write null values to stream"):T.isBuffer(i)||"string"==typeof i||void 0===i||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),Ie(r,o),n=!1),n}(this,r,e,i)&&(r.pendingcb++,n=function(e,t,i,r,n){i=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=T.from(t,i));return t}(t,i,r),T.isBuffer(i)&&(r="buffer");var o=t.objectMode?1:i.length;t.length+=o;var s=t.length<t.highWaterMark;s||(t.needDrain=!0);if(t.writing||t.corked){var a=t.lastBufferedRequest;t.lastBufferedRequest=new Ri(i,r,n),a?a.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Mi(e,t,!1,o,i,r,n);return s}(this,r,e,t,i)),n},Ai.prototype.cork=function(){this._writableState.corked++},Ai.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||ji(this,e))},Ai.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Ai.prototype._write=function(e,t,i){i(new Error("not implemented"))},Ai.prototype._writev=null,Ai.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,i){t.ending=!0,Ni(e,t),i&&(t.finished?Ie(i):e.once("finish",i));t.ended=!0,e.writable=!1}(this,r,i)},ze(Ki,gi);for(var Bi=Object.keys(Ai.prototype),Hi=0;Hi<Bi.length;Hi++){var zi=Bi[Hi];Ki.prototype[zi]||(Ki.prototype[zi]=Ai.prototype[zi])}function Ki(e){if(!(this instanceof Ki))return new Ki(e);gi.call(this,e),Ai.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",qi)}function qi(){this.allowHalfOpen||this._writableState.ended||Ie(Fi,this)}function Fi(e){e.end()}function $i(e){this.afterTransform=function(t,i){return function(e,t,i){var r=e._transformState;r.transforming=!1;var n=r.writecb;if(!n)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=i&&e.push(i);n(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,i)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function Ji(e){if(!(this instanceof Ji))return new Ji(e);Ki.call(this,e),this._transformState=new $i(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){Yi(t,e)})):Yi(t)}))}function Yi(e,t){if(t)return e.emit("error",t);var i=e._writableState,r=e._transformState;if(i.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function Gi(e){if(!(this instanceof Gi))return new Gi(e);Ji.call(this,e)}function Xi(){ti.call(this)}ze(Ji,Ki),Ji.prototype.push=function(e,t){return this._transformState.needTransform=!1,Ki.prototype.push.call(this,e,t)},Ji.prototype._transform=function(e,t,i){throw new Error("Not implemented")},Ji.prototype._write=function(e,t,i){var r=this._transformState;if(r.writecb=i,r.writechunk=e,r.writeencoding=t,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},Ji.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},ze(Gi,Ji),Gi.prototype._transform=function(e,t,i){i(null,e)},ze(Xi,ti),Xi.Readable=gi,Xi.Writable=Ai,Xi.Duplex=Ki,Xi.Transform=Ji,Xi.PassThrough=Gi,Xi.Stream=Xi,Xi.prototype.pipe=function(e,t){var i=this;function r(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function n(){i.readable&&i.resume&&i.resume()}i.on("data",r),e.on("drain",n),e._isStdio||t&&!1===t.end||(i.on("end",s),i.on("close",a));var o=!1;function s(){o||(o=!0,e.end())}function a(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(d(),0===ti.listenerCount(this,"error"))throw e}function d(){i.removeListener("data",r),e.removeListener("drain",n),i.removeListener("end",s),i.removeListener("close",a),i.removeListener("error",c),e.removeListener("error",c),i.removeListener("end",d),i.removeListener("close",d),e.removeListener("close",d)}return i.on("error",c),e.on("error",c),i.on("end",d),i.on("close",d),e.on("close",d),e.emit("pipe",i),e};var Wi=3,Qi=4;function Zi(e,t,i){var r,n=this;if(gi.call(n),n._mode=i,n.headers={},n.rawHeaders=[],n.trailers={},n.rawTrailers=[],n.on("end",(function(){Ie((function(){n.emit("close")}))})),"fetch"===i){n._fetchResponse=t,n.url=t.url,n.statusCode=t.status,n.statusMessage=t.statusText;for(var o,s,a=t.headers[Symbol.iterator]();o=(s=a.next()).value,!s.done;)n.headers[o[0].toLowerCase()]=o[1],n.rawHeaders.push(o[0],o[1]);var c=t.body.getReader();(r=function(){c.read().then((function(e){n._destroyed||(e.done?n.push(null):(n.push(new T(e.value)),r()))}))})()}else{if(n._xhr=e,n._pos=0,n.url=e.responseURL,n.statusCode=e.status,n.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var i=t[1].toLowerCase();"set-cookie"===i?(void 0===n.headers[i]&&(n.headers[i]=[]),n.headers[i].push(t[2])):void 0!==n.headers[i]?n.headers[i]+=", "+t[2]:n.headers[i]=t[2],n.rawHeaders.push(t[1],t[2])}})),n._charset="x-user-defined",!Wt){var d=n.rawHeaders["mime-type"];if(d){var u=d.match(/;\s*charset=([^;])(;|$)/);u&&(n._charset=u[1].toLowerCase())}n._charset||(n._charset="utf-8")}}}function er(e){var t,i=this;Ai.call(i),i._opts=e,i._body=[],i._headers={},e.auth&&i.setHeader("Authorization","Basic "+new T(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){i.setHeader(t,e.headers[t])}));var r=!0;if("disable-fetch"===e.mode)r=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!Wt;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}i._mode=function(e,t){return Kt&&t?"fetch":Xt?"moz-chunked-arraybuffer":Gt?"ms-stream":Yt&&e?"arraybuffer":Qt&&e?"text:vbarray":"text"}(t,r),i.on("finish",(function(){i._onFinish()}))}ze(Zi,gi),Zi.prototype._read=function(){},Zi.prototype._onXHRProgress=function(){var e=this,t=e._xhr,i=null;switch(e._mode){case"text:vbarray":if(t.readyState!==Qi)break;try{i=new g.VBArray(t.responseBody).toArray()}catch(e){}if(null!==i){e.push(new T(i));break}case"text":try{i=t.responseText}catch(t){e._mode="text:vbarray";break}if(i.length>e._pos){var r=i.substr(e._pos);if("x-user-defined"===e._charset){for(var n=new T(r.length),o=0;o<r.length;o++)n[o]=255&r.charCodeAt(o);e.push(n)}else e.push(r,e._charset);e._pos=i.length}break;case"arraybuffer":if(t.readyState!==Qi||!t.response)break;i=t.response,e.push(new T(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=t.response,t.readyState!==Wi||!i)break;e.push(new T(new Uint8Array(i)));break;case"ms-stream":if(i=t.response,t.readyState!==Wi)break;var s=new g.MSStreamReader;s.onprogress=function(){s.result.byteLength>e._pos&&(e.push(new T(new Uint8Array(s.result.slice(e._pos)))),e._pos=s.result.byteLength)},s.onload=function(){e.push(null)},s.readAsArrayBuffer(i)}e._xhr.readyState===Qi&&"ms-stream"!==e._mode&&e.push(null)},ze(er,Ai);var tr=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];function ir(e,t){"string"==typeof e&&(e=At(e));var i=-1===g.location.protocol.search(/^https?:$/)?"http:":"",r=e.protocol||i,n=e.hostname||e.host,o=e.port,s=e.path||"/";n&&-1!==n.indexOf(":")&&(n="["+n+"]"),e.url=(n?r+"//"+n:"")+(o?":"+o:"")+s,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var a=new er(e);return t&&a.on("response",t),a}function rr(e,t){var i=ir(e,t);return i.end(),i}function nr(){}er.prototype.setHeader=function(e,t){var i=e.toLowerCase();-1===tr.indexOf(i)&&(this._headers[i]={name:e,value:t})},er.prototype.getHeader=function(e){return this._headers[e.toLowerCase()].value},er.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},er.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t,i=e._opts,r=e._headers;if("POST"!==i.method&&"PUT"!==i.method&&"PATCH"!==i.method||(t=function(){if(void 0!==Ut)return Ut;try{new g.Blob([new ArrayBuffer(1)]),Ut=!0}catch(e){Ut=!1}return Ut}()?new g.Blob(e._body.map((function(e){return function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(he(e)){for(var t=new Uint8Array(e.length),i=e.length,r=0;r<i;r++)t[r]=e[r];return t.buffer}throw new Error("Argument must be a Buffer")}(e)})),{type:(r["content-type"]||{}).value||""}):T.concat(e._body).toString()),"fetch"===e._mode){var n=Object.keys(r).map((function(e){return[r[e].name,r[e].value]}));g.fetch(e._opts.url,{method:e._opts.method,headers:n,body:t,mode:"cors",credentials:i.withCredentials?"include":"same-origin"}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){e.emit("error",t)}))}else{var o=e._xhr=new g.XMLHttpRequest;try{o.open(e._opts.method,e._opts.url,!0)}catch(t){return void Ie((function(){e.emit("error",t)}))}"responseType"in o&&(o.responseType=e._mode.split(":")[0]),"withCredentials"in o&&(o.withCredentials=!!i.withCredentials),"text"===e._mode&&"overrideMimeType"in o&&o.overrideMimeType("text/plain; charset=x-user-defined"),Object.keys(r).forEach((function(e){o.setRequestHeader(r[e].name,r[e].value)})),e._response=null,o.onreadystatechange=function(){switch(o.readyState){case Wi:case Qi:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(o.onprogress=function(){e._onXHRProgress()}),o.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{o.send(t)}catch(t){return void Ie((function(){e.emit("error",t)}))}}}},er.prototype._onXHRProgress=function(){var e=this;(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},er.prototype._connect=function(){var e=this;e._destroyed||(e._response=new Zi(e._xhr,e._fetchResponse,e._mode),e.emit("response",e._response))},er.prototype._write=function(e,t,i){this._body.push(e),i()},er.prototype.abort=er.prototype.destroy=function(){var e=this;e._destroyed=!0,e._response&&(e._response._destroyed=!0),e._xhr&&e._xhr.abort()},er.prototype.end=function(e,t,i){"function"==typeof e&&(i=e,e=void 0),Ai.prototype.end.call(this,e,t,i)},er.prototype.flushHeaders=function(){},er.prototype.setTimeout=function(){},er.prototype.setNoDelay=function(){},er.prototype.setSocketKeepAlive=function(){},nr.defaultMaxSockets=4;var or=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"],sr={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},ar={request:ir,get:rr,Agent:nr,METHODS:or,STATUS_CODES:sr},cr=Ce(Object.freeze({__proto__:null,Agent:nr,METHODS:or,STATUS_CODES:sr,default:ar,get:rr,request:ir})),dr=Ht,ur=zt.spawn,lr=zt,hr=function(){var e,t,i=this,r=cr,n=cr,o={},s=!1,a={"User-Agent":"node-XMLHttpRequest",Accept:"*/*"},c={},d={},u=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","content-transfer-encoding","cookie","cookie2","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],l=["TRACE","TRACK","CONNECT"],h=!1,p=!1,f={};this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.readyState=this.UNSENT,this.onreadystatechange=null,this.responseText="",this.responseXML="",this.status=null,this.statusText=null,this.withCredentials=!1;this.open=function(e,t,i,r,n){if(this.abort(),p=!1,!function(e){return e&&-1===l.indexOf(e)}(e))throw new Error("SecurityError: Request method not allowed");o={method:e,url:t.toString(),async:"boolean"!=typeof i||i,user:r||null,password:n||null},g(this.OPENED)},this.setDisableHeaderCheck=function(e){s=e},this.setRequestHeader=function(e,t){if(this.readyState!==this.OPENED)throw new Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN");if(function(e){return s||e&&-1===u.indexOf(e.toLowerCase())}(e)){if(h)throw new Error("INVALID_STATE_ERR: send flag is true");e=d[e.toLowerCase()]||e,d[e.toLowerCase()]=e,c[e]=c[e]?c[e]+", "+t:t}else console.warn('Refused to set unsafe header "'+e+'"')},this.getResponseHeader=function(e){return"string"==typeof e&&this.readyState>this.OPENED&&t&&t.headers&&t.headers[e.toLowerCase()]&&!p?t.headers[e.toLowerCase()]:null},this.getAllResponseHeaders=function(){if(this.readyState<this.HEADERS_RECEIVED||p)return"";var e="";for(var i in t.headers)"set-cookie"!==i&&"set-cookie2"!==i&&(e+=i+": "+t.headers[i]+"\r\n");return e.substr(0,e.length-2)},this.getRequestHeader=function(e){return"string"==typeof e&&d[e.toLowerCase()]?c[d[e.toLowerCase()]]:""},this.send=function(s){if(this.readyState!==this.OPENED)throw new Error("INVALID_STATE_ERR: connection must be opened before send() is called");if(h)throw new Error("INVALID_STATE_ERR: send has already been called");var u,l=!1,f=!1,m=dr.parse(o.url);switch(m.protocol){case"https:":l=!0;case"http:":u=m.hostname;break;case"file:":f=!0;break;case void 0:case null:case"":u="localhost";break;default:throw new Error("Protocol not supported.")}if(f){if("GET"!==o.method)throw new Error("XMLHttpRequest: Only GET method is supported");if(o.async)lr.readFile(m.pathname,"utf8",(function(e,t){e?i.handleError(e):(i.status=200,i.responseText=t,g(i.DONE))}));else try{this.responseText=lr.readFileSync(m.pathname,"utf8"),this.status=200,g(i.DONE)}catch(e){this.handleError(e)}}else{var y=m.port||(l?443:80),b=m.pathname+(m.search?m.search:"");for(var v in a)d[v.toLowerCase()]||(c[v]=a[v]);if(c.Host=u,l&&443===y||80===y||(c.Host+=":"+m.port),o.user){void 0===o.password&&(o.password="");var w=new T(o.user+":"+o.password);c.Authorization="Basic "+w.toString("base64")}"GET"===o.method||"HEAD"===o.method?s=null:s?(c["Content-Length"]=he(s)?s.length:T.byteLength(s),c["Content-Type"]||(c["Content-Type"]="text/plain;charset=UTF-8")):"POST"===o.method&&(c["Content-Length"]=0);var k={host:u,port:y,path:b,method:o.method,headers:c,agent:!1,withCredentials:i.withCredentials};if(p=!1,o.async){var L=l?n.request:r.request;h=!0,i.dispatchEvent("readystatechange");var S=function(e){i.handleError(e)};e=L(k,(function r(n){if(301!==(t=n).statusCode&&302!==t.statusCode&&303!==t.statusCode&&307!==t.statusCode)t.setEncoding("utf8"),g(i.HEADERS_RECEIVED),i.status=t.statusCode,t.on("data",(function(e){e&&(i.responseText+=e),h&&g(i.LOADING)})),t.on("end",(function(){h&&(g(i.DONE),h=!1)})),t.on("error",(function(e){i.handleError(e)}));else{o.url=t.headers.location;var s=dr.parse(o.url);u=s.hostname;var a={hostname:s.hostname,port:s.port,path:s.path,method:303===t.statusCode?"GET":o.method,headers:c,withCredentials:i.withCredentials};(e=L(a,r).on("error",S)).end()}})).on("error",S),s&&e.write(s),e.end(),i.dispatchEvent("loadstart")}else{var P=".node-xmlhttprequest-content-"+_e.pid,I=".node-xmlhttprequest-sync-"+_e.pid;lr.writeFileSync(I,"","utf8");for(var x="var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http"+(l?"s":"")+".request;var options = "+JSON.stringify(k)+";var responseText = '';var req = doRequest(options, function(response) {response.setEncoding('utf8');response.on('data', function(chunk) { responseText += chunk;});response.on('end', function() {fs.writeFileSync('"+P+"', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText}}), 'utf8');fs.unlinkSync('"+I+"');});response.on('error', function(error) {fs.writeFileSync('"+P+"', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('"+I+"');});}).on('error', function(error) {fs.writeFileSync('"+P+"', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('"+I+"');});"+(s?"req.write('"+JSON.stringify(s).slice(1,-1).replace(/'/g,"\\'")+"');":"")+"req.end();",E=ur(_e.argv[0],["-e",x]);lr.existsSync(I););var _=JSON.parse(lr.readFileSync(P,"utf8"));E.stdin.end(),lr.unlinkSync(P),_.err?i.handleError(_.err):(t=_.data,i.status=_.data.statusCode,i.responseText=_.data.text,g(i.DONE))}}},this.handleError=function(e){this.status=0,this.statusText=e,this.responseText=e.stack,p=!0,g(this.DONE),this.dispatchEvent("error")},this.abort=function(){e&&(e.abort(),e=null),c=a,this.status=0,this.responseText="",this.responseXML="",p=!0,this.readyState===this.UNSENT||this.readyState===this.OPENED&&!h||this.readyState===this.DONE||(h=!1,g(this.DONE)),this.readyState=this.UNSENT,this.dispatchEvent("abort")},this.addEventListener=function(e,t){e in f||(f[e]=[]),f[e].push(t)},this.removeEventListener=function(e,t){e in f&&(f[e]=f[e].filter((function(e){return e!==t})))},this.dispatchEvent=function(e){if("function"==typeof i["on"+e]&&i["on"+e](),e in f)for(var t=0,r=f[e].length;t<r;t++)f[e][t].call(i)};var g=function(e){e!=i.LOADING&&i.readyState===e||(i.readyState=e,(o.async||i.readyState<i.OPENED||i.readyState===i.DONE)&&i.dispatchEvent("readystatechange"),i.readyState!==i.DONE||p||(i.dispatchEvent("load"),i.dispatchEvent("loadend")))}},pr=function(e,t,i,r){return new(i||(i=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};function fr(e){return pr(this,void 0,void 0,(function*(){return yield new Promise(((t,i)=>{var r;let{url:n}=e;n||i(new Error("URL is missing")),"http://"!==n.substr(0,7)||e.forceHttp||(console.warn(`Upgrading requested url ${n} to https protocol.`),n=n.replace("http://","https://"));const o=new("undefined"==typeof XMLHttpRequest?hr:XMLHttpRequest);e["bearer-token"]&&o.setRequestHeader("Authorization",`Bearer ${e["bearer-token"]}`),o.onload=()=>{if(o.status>=200&&o.status<300)t(o.responseText);else{console.log(o.responseText);const e=`Error fetching url:${n}; status code:${o.status}`;i(new Error(e))}},o.ontimeout=e=>{console.log("ontimeout",e)},o.onreadystatechange=()=>{404===o.status&&i(new Error(`Error fetching url:${n}; status code:${o.status}`))},o.onerror=()=>{console.error(`Request failed with error ${o.responseText}`),i(new Error(o.responseText))},o.open(null!==(r=e.method)&&void 0!==r?r:"GET",n),e.body?o.send(JSON.stringify(e.body)):o.send()}))}))}function gr(e,t){return"string"!=typeof e?(console.warn("Trying to test a non string variable"),!1):0===e.indexOf(t)}function mr(e,t){for(let i=0;i<t.length;i++){const r=t[i];if(gr(e,r))return e.slice(r.length)}return e}var yr=function(e,t,i,r){return new(i||(i=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};const br={[a.Ethmain]:1,[a.Ethgoerli]:5,[a.Ethsepolia]:11155111};function vr(e=a.Ethmain){const t=br[e];if(!t)throw new Error(`Unsupported chain: ${e}`);return`https://api.etherscan.io/v2/api?chainid=${t}&module=proxy`}const wr={serviceURL:function(e){return`${vr(e)}&action=eth_getTransactionByHash&txhash=${s}`},serviceName:n.etherscan,parsingFunction:function(e){return yr(this,arguments,void 0,(function*({jsonResponse:e,chain:t,key:i,keyPropertyName:r}){const n=vr(t),o={serviceURL:{main:`${n}&action=eth_getBlockByNumber&boolean=true&tag=${s}`,test:`${n}&action=eth_getBlockByNumber&boolean=true&tag=${s}`}},a={serviceURL:{main:`${n}&action=eth_blockNumber`,test:`${n}&action=eth_blockNumber`}};const c=yield function(e,t){return yr(this,void 0,void 0,(function*(){const n=e.result.blockNumber,s=f({explorerAPI:Object.assign(Object.assign({},o),{key:i,keyPropertyName:r}),transactionId:n,chain:t});try{const e=yield fr({url:s}),o=JSON.parse(e).result;return yield function(e,t){return yr(this,void 0,void 0,(function*(){const n=f({explorerAPI:Object.assign(Object.assign({},a),{key:i,keyPropertyName:r}),chain:e});let o;try{o=yield fr({url:n})}catch(e){throw new Error("Unable to get remote hash")}const s=JSON.parse(o).result;if(s-t<u)throw new Error("Not enough");return s}))}(t,n),o}catch(e){throw new Error("Unable to get remote hash")}}))}(e,t);return function(e,t){const i=e.result,r=new Date(1e3*parseInt(t.timestamp,16)),n=i.from;return{remoteHash:mr(i.input,d.ethmain.prefixes),issuingAddress:n,time:r,revokedAddresses:[]}}(e,c)}))},priority:-1};function kr(e){const t=Date.parse(e);if(t)return new Date(t);const i=function(e){let t=e.slice(0,-5).split(/\D/).map((function(e){return parseInt(e,10)||0}));t[1]-=1,t=new Date(Date.UTC.apply(Date,t));const i=e.slice(-5);let r=parseInt(i,10)/100;return"+"===i.slice(0,1)&&(r*=-1),t.setHours(t.getHours()+r),t.getTime()}(e);return i||function(e){var t;let i,r;const n=null!==(t=/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*)?)([zZ]|([+\-])(\d\d):?(\d\d))?$/.exec(e))&&void 0!==t?t:[];return n[1]?(i=n[1].split(/\D/).map((function(e){return parseInt(e,10)||0})),i[1]-=1,i=new Date(Date.UTC.apply(Date,i)),i.getDate()?(n[5]&&(r=parseInt(n[5],10)/100*60,n[6]&&(r+=parseInt(n[6],10)),"+"===n[4]&&(r*=-1),r&&i.setUTCMinutes(i.getUTCMinutes()+r)),i):null):null}(e)}function Lr(e){return""===e?"":kr(`${e}`)}function Sr(e){return new Date(1e3*e)}const Pr={serviceURL:{main:`https://api.blockcypher.com/v1/eth/main/txs/${s}?limit=500`,test:`https://api.blockcypher.com/v1/beth/test/txs/${s}?limit=500`},serviceName:n.blockcypher,parsingFunction:function({jsonResponse:e}){if(e.confirmations<u)throw new Error("Not enough");const t=Lr(e.received),i=e.outputs,r=i[i.length-1];let n=e.inputs[0].addresses[0];const o=mr(r.script,d.ethmain.prefixes);return n=function(e,t){for(let i=0;i<t.length;i++){const r=t[i];if(!gr(e,r))return`${r}${e}`}return e}(n,d.ethmain.prefixes),{remoteHash:o,issuingAddress:n,time:t,revokedAddresses:i.filter((e=>!!e.spent_by)).map((e=>e.addresses[0]))}},priority:-1};const Ir={serviceURL:{main:`https://blockstream.info/api/tx/${s}`,test:`https://blockstream.info/testnet/api/tx/${s}`},serviceName:n.blockstream,parsingFunction:function({jsonResponse:e}){if(!e.status.confirmed)throw new Error("Number of transaction confirmations were less than the minimum required, according to Blockstream API");const t=Sr(e.status.block_time),i=e.vout,r=i[i.length-1],n=e.vin[0].prevout.scriptpubkey_address;return{remoteHash:mr(r.scriptpubkey,d.bitcoin.prefixes),issuingAddress:n,time:t,revokedAddresses:i.filter((e=>!!e.scriptpubkey_address)).map((e=>e.scriptpubkey_address))}},priority:-1};const xr={serviceURL:{main:`https://api.blockcypher.com/v1/btc/main/txs/${s}?limit=500`,test:`https://api.blockcypher.com/v1/btc/test3/txs/${s}?limit=500`},serviceName:n.blockcypher,parsingFunction:function({jsonResponse:e}){if(e.confirmations<u)throw new Error("Number of transaction confirmations were less than the minimum required, according to Blockcypher API");const t=Lr(e.received),i=e.outputs,r=i[i.length-1],n=e.inputs[0].addresses[0];return{remoteHash:mr(r.script,d.bitcoin.prefixes),issuingAddress:n,time:t,revokedAddresses:i.filter((e=>!!e.spent_by)).map((e=>e.addresses[0]))}},priority:-1};var Er=function(e,t,i,r){return new(i||(i=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};function _r(e){return e.map((e=>({getTxData:(t,i)=>Er(this,void 0,void 0,(function*(){return yield function(e,t,i){return Er(this,void 0,void 0,(function*(){const r=f({explorerAPI:e,transactionId:t,chain:i});try{const t=yield fr({url:r});return yield e.parsingFunction(Object.assign({jsonResponse:JSON.parse(t),chain:i},e))}catch(e){throw new Error("Unable to get remote hash")}}))}(e,t,i)})),priority:e.priority})))}const Tr=[xr,Ir],Rr=[wr,Pr];var Cr=function(e,t,i,r){return new(i||(i=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};function Ar(e){return Cr(this,arguments,void 0,(function*({serviceUrl:e,transactionId:t}){const i={method:"eth_getTransactionByHash",jsonrpc:"2.0",id:"getbyhash",params:["0x"+t]},r=yield fr({url:e,body:i,method:"POST"}),n=JSON.parse(r),o={method:"eth_getBlockByNumber",jsonrpc:"2.0",id:"blockbynumber",params:[n.result.blockNumber,!0]},s=yield fr({url:e,body:o,method:"POST"}),a=JSON.parse(s),c=n.result,d=a.result,u=new Date(1e3*parseInt(d.timestamp,16)),l=c.from;return{remoteHash:mr(c.input,["0x"]),issuingAddress:l,time:u,revokedAddresses:[]}}))}var Mr=function(e,t,i,r){return new(i||(i=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};function Vr(e){return Mr(this,arguments,void 0,(function*({serviceUrl:e,transactionId:t}){const i={method:"getrawtransaction",jsonrpc:"2.0",id:"rpctest",params:[t,!0]},r=yield fr({url:e,body:i,method:"POST"}),n=JSON.parse(r).result;return{issuingAddress:n.vout[0].scriptPubKey.addresses[0],remoteHash:mr(n.vout[1].scriptPubKey.asm,["6a20","OP_RETURN "]),time:Sr(n.blocktime),revokedAddresses:n.vout.filter((e=>!!e.scriptPubKey.addresses)).map((e=>e.scriptPubKey.addresses)).flat()}}))}var jr=function(e,t,i,r){return new(i||(i=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};const Or=[];function Dr(e=[],t=[],i=!1){const r=e.map((e=>e.serviceName)).filter((e=>!!e)).filter((e=>!!n[e]));return r.length?t.reduce(((t,n)=>{if(r.includes(n.serviceName)){const i=Object.assign({},n),r=e.find((e=>e.serviceName===n.serviceName));if(function(e){if(e.key&&!e.keyPropertyName)throw new Error(`Property keyPropertyName is not set for ${e.serviceName}. Cannot pass the key property to the service.`);return!0}(r)){const n=Object.assign(i,r);t.push(n);const o=e.findIndex((e=>e.serviceName===n.serviceName));Or.includes(o)||Or.push(o)}}else t.push(n);return i&&function(e,t){t.forEach((t=>e.splice(t,1)))}(e,Or),t}),[]):t}function Nr(e){return e.map((e=>(e.parsingFunction||(e.parsingFunction="btc"===e.chainType?Vr:Ar),e))).map((e=>({getTxData:t=>jr(this,void 0,void 0,(function*(){return yield e.parsingFunction(Object.assign(Object.assign({},e),{transactionId:t}))})),priority:e.priority})))}function Ur(e){const{bitcoin:t,ethereum:i}={bitcoin:_r(Dr(r=e,Tr)),ethereum:_r(Dr(r,Rr))};var r;const{custom:n}=function(e){return{custom:Nr(e)}}(e.filter((e=>"rpc"===e.apiType)));return{bitcoin:t,ethereum:i,custom:[...n,..._r(e.filter((e=>"rpc"!==e.apiType)))]}}var Br,Hr=function(e,t,i,r){return new(i||(i=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};function zr(e,t){var i;switch(e){case d[a.Bitcoin].code:case d[a.Regtest].code:case d[a.Testnet].code:case d[a.Mocknet].code:return t.bitcoin;case d[a.Ethmain].code:case d[a.Ethropst].code:case d[a.Ethrinkeby].code:case d[a.Ethgoerli].code:case d[a.Ethsepolia].code:return t.ethereum;default:if(!(null===(i=t.custom)||void 0===i?void 0:i.length))throw new Error("Chain is not natively supported. Use custom explorers to retrieve tx data.");return t.custom}}function Kr(e){return Hr(this,void 0,void 0,(function*(){let t;try{t=yield p(e,l)}catch(e){throw new Error(`Transaction lookup error: ${e.message}`)}if(!t||0===t.length)throw new Error("Could not confirm transaction data.");const i=t[0];for(let e=1;e<t.length;e++){const r=t[e];if(i.issuingAddress!==r.issuingAddress)throw new Error("Issuing addresses do not match consistently");if(i.remoteHash!==r.remoteHash)throw new Error("Remote hashes do not match consistently")}return i}))}function qr(e,t,i,r){return Hr(this,void 0,void 0,(function*(){try{const n=function(e,t,i){if(l>e.length)throw new Error("Invalid application configuration; check the CONFIG.MinimumBlockchainExplorers configuration value");const r=[],n=e.length;for(let o=0;o<n;o++)r.push(e[o].getTxData(t,i));return r}(e[t],i,r);return yield Kr(n)}catch(n){if(t<e.length-1)return t++,yield qr(e,t,i,r);throw n}}))}!function(e){e.mainnet="mainnet",e.testnet="testnet"}(Br||(Br={}));var Fr="https://openbadgespec.org/v2/context.json",$r="https://www.w3.org/2018/credentials/v1",Jr="https://www.w3.org/ns/credentials/v2",Yr="https://w3id.org/blockcerts/schema/2.0/context.json",Gr="https://w3id.org/blockcerts/v2",Xr="https://www.blockcerts.org/schema/2.0/context.json",Wr="https://w3id.org/blockcerts/schema/2.1/context.json",Qr="https://w3id.org/blockcerts/v2.1",Zr="https://www.blockcerts.org/schema/2.1/context.json",en="https://w3id.org/blockcerts/schema/3.0/context.json",tn="https://w3id.org/blockcerts/v3",rn="https://www.blockcerts.org/schema/3.0/context.json",nn="https://w3id.org/blockcerts/schema/3.1/context.json",on="https://w3id.org/blockcerts/v3.1",sn="https://www.blockcerts.org/schema/3.1/context.json",an="https://w3id.org/blockcerts/schema/3.2/context.json",cn="https://w3id.org/blockcerts/v3.2",dn="https://www.blockcerts.org/schema/3.2/context.json",un="https://w3id.org/security/suites/merkle-2019/v1",ln="https://w3id.org/security/suites/chained-2021/v1",hn="https://w3id.org/vc/status-list/2021/v1",pn="https://w3id.org/security/data-integrity/v2",fn={"@context":{id:"@id",type:"@type",extensions:"https://w3id.org/openbadges/extensions#",obi:"https://w3id.org/openbadges#",validation:"obi:validation",cred:"https://w3id.org/credentials#",dc:"http://purl.org/dc/terms/",schema:"http://schema.org/",sec:"https://w3id.org/security#",xsd:"http://www.w3.org/2001/XMLSchema#",AlignmentObject:"schema:AlignmentObject",CryptographicKey:"sec:Key",Endorsement:"cred:Credential",Assertion:"obi:Assertion",BadgeClass:"obi:BadgeClass",Criteria:"obi:Criteria",Evidence:"obi:Evidence",Extension:"obi:Extension",FrameValidation:"obi:FrameValidation",IdentityObject:"obi:IdentityObject",Image:"obi:Image",HostedBadge:"obi:HostedBadge",hosted:"obi:HostedBadge",Issuer:"obi:Issuer",Profile:"obi:Profile",RevocationList:"obi:RevocationList",SignedBadge:"obi:SignedBadge",signed:"obi:SignedBadge",TypeValidation:"obi:TypeValidation",VerificationObject:"obi:VerificationObject",author:{"@id":"schema:author","@type":"@id"},caption:{"@id":"schema:caption"},claim:{"@id":"cred:claim","@type":"@id"},created:{"@id":"dc:created","@type":"xsd:dateTime"},creator:{"@id":"dc:creator","@type":"@id"},description:{"@id":"schema:description"},email:{"@id":"schema:email"},endorsement:{"@id":"cred:credential","@type":"@id"},expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},genre:{"@id":"schema:genre"},image:{"@id":"schema:image","@type":"@id"},name:{"@id":"schema:name"},owner:{"@id":"sec:owner","@type":"@id"},publicKey:{"@id":"sec:publicKey","@type":"@id"},publicKeyPem:{"@id":"sec:publicKeyPem"},related:{"@id":"dc:relation","@type":"@id"},startsWith:{"@id":"http://purl.org/dqm-vocabulary/v1/dqm#startsWith"},tags:{"@id":"schema:keywords"},targetDescription:{"@id":"schema:targetDescription"},targetFramework:{"@id":"schema:targetFramework"},targetName:{"@id":"schema:targetName"},targetUrl:{"@id":"schema:targetUrl"},telephone:{"@id":"schema:telephone"},url:{"@id":"schema:url","@type":"@id"},version:{"@id":"schema:version"},alignment:{"@id":"obi:alignment","@type":"@id"},allowedOrigins:{"@id":"obi:allowedOrigins"},audience:{"@id":"obi:audience"},badge:{"@id":"obi:badge","@type":"@id"},criteria:{"@id":"obi:criteria","@type":"@id"},endorsementComment:{"@id":"obi:endorsementComment"},evidence:{"@id":"obi:evidence","@type":"@id"},hashed:{"@id":"obi:hashed","@type":"xsd:boolean"},identity:{"@id":"obi:identityHash"},issuedOn:{"@id":"obi:issueDate","@type":"xsd:dateTime"},issuer:{"@id":"obi:issuer","@type":"@id"},narrative:{"@id":"obi:narrative"},recipient:{"@id":"obi:recipient","@type":"@id"},revocationList:{"@id":"obi:revocationList","@type":"@id"},revocationReason:{"@id":"obi:revocationReason"},revoked:{"@id":"obi:revoked","@type":"xsd:boolean"},revokedAssertions:{"@id":"obi:revoked"},salt:{"@id":"obi:salt"},targetCode:{"@id":"obi:targetCode"},uid:{"@id":"obi:uid"},validatesType:"obi:validatesType",validationFrame:"obi:validationFrame",validationSchema:"obi:validationSchema",verification:{"@id":"obi:verify","@type":"@id"},verificationProperty:{"@id":"obi:verificationProperty"},verify:"verification"}},gn={"@context":{id:"@id",type:"@type",bc:"https://w3id.org/blockcerts#",obi:"https://w3id.org/openbadges#",cp:"https://w3id.org/chainpoint#",schema:"http://schema.org/",sec:"https://w3id.org/security#",xsd:"http://www.w3.org/2001/XMLSchema#",MerkleProof2017:"sec:MerkleProof2017",RecipientProfile:"bc:RecipientProfile",SignatureLine:"bc:SignatureLine",MerkleProofVerification2017:"bc:MerkleProofVerification2017",recipientProfile:"bc:recipientProfile",signatureLines:"bc:signatureLines",introductionUrl:{"@id":"bc:introductionUrl","@type":"@id"},subtitle:"bc:subtitle",jobTitle:"schema:jobTitle",expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},revoked:{"@id":"obi:revoked","@type":"xsd:boolean"},CryptographicKey:"sec:Key",signature:"sec:signature",verification:{"@id":"obi:verify","@type":"@id"},publicKey:{"@id":"sec:publicKey","@type":"@id"},BTCOpReturn:"cp:BTCOpReturn",targetHash:"cp:targetHash",merkleRoot:"cp:merkleRoot",proof:"cp:proof",anchors:"cp:anchors",sourceId:"cp:sourceId",right:"cp:right",left:"cp:left"},"obi:validation":[{"obi:validatesType":"RecipientProfile","obi:validationSchema":"https://w3id.org/blockcerts/schema/2.0/recipientSchema.json"},{"obi:validatesType":"SignatureLine","obi:validationSchema":"https://w3id.org/blockcerts/schema/2.0/signatureLineSchema.json"},{"obi:validatesType":"MerkleProof2017","obi:validationSchema":"https://w3id.org/blockcerts/schema/2.0/merkleProof2017Schema.json"}]},mn={"@context":{id:"@id",type:"@type",bc:"https://w3id.org/blockcerts#",obi:"https://w3id.org/openbadges#",cp:"https://w3id.org/chainpoint#",schema:"http://schema.org/",sec:"https://w3id.org/security#",xsd:"http://www.w3.org/2001/XMLSchema#",MerkleProof2017:"sec:MerkleProof2017",RecipientProfile:"bc:RecipientProfile",SignatureLine:"bc:SignatureLine",MerkleProofVerification2017:"bc:MerkleProofVerification2017",recipientProfile:"bc:recipientProfile",signatureLines:"bc:signatureLines",introductionUrl:{"@id":"bc:introductionUrl","@type":"@id"},subtitle:"bc:subtitle",jobTitle:"schema:jobTitle",expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},revoked:{"@id":"obi:revoked","@type":"xsd:boolean"},CryptographicKey:"sec:Key",signature:"sec:signature",verification:{"@id":"obi:verify","@type":"@id"},publicKey:{"@id":"sec:publicKey","@type":"@id"},BTCOpReturn:"cp:BTCOpReturn",targetHash:"cp:targetHash",merkleRoot:"cp:merkleRoot",proof:"cp:proof",anchors:"cp:anchors",sourceId:"cp:sourceId",right:"cp:right",left:"cp:left"},"obi:validation":[{"obi:validatesType":"RecipientProfile","obi:validationSchema":"https://w3id.org/blockcerts/schema/2.1/recipientSchema.json"},{"obi:validatesType":"SignatureLine","obi:validationSchema":"https://w3id.org/blockcerts/schema/2.1/signatureLineSchema.json"},{"obi:validatesType":"MerkleProof2017","obi:validationSchema":"https://w3id.org/blockcerts/schema/2.1/merkleProof2017Schema.json"}]},yn={"@context":{id:"@id",type:"@type",bc:"https://w3id.org/blockcerts#",cp:"https://w3id.org/chainpoint#",vc:"https://www.w3.org/2018/credentials/v1",schema:"https://schema.org/",sec:"https://w3id.org/security#",xsd:"http://www.w3.org/2001/XMLSchema#",MerkleProof2019:"sec:MerkleProof2019",BlockcertsCredential:"bc:BlockcertsCredential",introductionUrl:{"@id":"bc:introductionUrl","@type":"@id"},metadata:"bc:metadata",display:{"@id":"bc:display","@context":{id:"@id",type:"@type",contentMediaType:{"@id":"bc:contentMediaType"},contentEncoding:{"@id":"bc:contentEncoding"},content:{"@id":"bc:content"}}},CryptographicKey:"sec:Key",domain:"sec:domain",nonce:"sec:nonce",proofValue:"sec:proofValue",assertionMethod:{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"sec:authenticationMethod","@type":"@id","@container":"@set"},proofPurpose:{"@id":"sec:proofPurpose","@type":"@vocab"},verificationMethod:{"@id":"sec:verificationMethod","@type":"@id"},created:{"@id":"https://purl.org/dc/terms/created","@type":"xsd:dateTime"},challenge:"sec:challenge",expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},name:{"@id":"schema:name"},description:{"@id":"schema:description"},email:{"@id":"schema:email"},publicKey:{"@id":"sec:publicKey"},url:{"@id":"schema:url"},image:{"@id":"schema:image"},criteria:{"@id":"schema:criteria"},claim:{"@id":"schema:claim"}}},bn={"@context":{id:"@id",type:"@type",bc:"https://w3id.org/blockcerts#",cp:"https://w3id.org/chainpoint#",vc:"https://www.w3.org/2018/credentials/v1",schema:"https://schema.org/",sec:"https://w3id.org/security#",xsd:"http://www.w3.org/2001/XMLSchema#",BlockcertsCredential:"bc:BlockcertsCredential",introductionUrl:{"@id":"bc:introductionUrl","@type":"@id"},metadata:"bc:metadata",display:{"@id":"bc:display","@context":{id:"@id",type:"@type",contentMediaType:{"@id":"bc:contentMediaType"},contentEncoding:{"@id":"bc:contentEncoding"},content:{"@id":"bc:content"}}},CryptographicKey:"sec:Key",domain:"sec:domain",nonce:"sec:nonce",proofValue:"sec:proofValue",assertionMethod:{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"sec:authenticationMethod","@type":"@id","@container":"@set"},proofPurpose:{"@id":"sec:proofPurpose","@type":"@vocab"},verificationMethod:{"@id":"sec:verificationMethod","@type":"@id"},created:{"@id":"https://purl.org/dc/terms/created","@type":"xsd:dateTime"},challenge:"sec:challenge",expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},name:{"@id":"schema:name"},description:{"@id":"schema:description"},email:{"@id":"schema:email"},publicKey:{"@id":"sec:publicKey"},url:{"@id":"schema:url"},image:{"@id":"schema:image"},criteria:{"@id":"schema:criteria"},claim:{"@id":"schema:claim"}}},vn={"@context":{id:"@id",type:"@type",bc:"https://w3id.org/blockcerts#",schema:"https://schema.org/",sec:"https://w3id.org/security#",BlockcertsCredential:"bc:BlockcertsCredential",BlockcertsIssuerProfile:"bc:BlockcertsIssuerProfile",introductionUrl:{"@id":"bc:introductionUrl","@type":"@id"},metadata:"bc:metadata",display:{"@id":"bc:display","@context":{id:"@id",type:"@type",contentMediaType:{"@id":"bc:contentMediaType"},contentEncoding:{"@id":"bc:contentEncoding"},content:{"@id":"bc:content"}}},email:{"@id":"schema:email"},publicKey:{"@context":{created:{"@id":"bc:created"}},"@id":"sec:publicKey"},url:{"@id":"schema:url"},image:{"@id":"schema:image"},criteria:{"@id":"schema:criteria"},claim:{"@id":"schema:claim"},revocationList:{"@id":"bc:revocationList"}}};const wn={};wn["https://w3id.org/openbadges/v2"]=fn,wn[Fr]=fn,wn[$r]={"@context":{"@version":1.1,id:"@id",type:"@type",VerifiableCredential:{"@id":"https://www.w3.org/2018/credentials#VerifiableCredential","@context":{"@version":1.1,id:"@id",type:"@type",cred:"https://www.w3.org/2018/credentials#",sec:"https://w3id.org/security#",xsd:"http://www.w3.org/2001/XMLSchema#",credentialSchema:{"@id":"cred:credentialSchema","@type":"@id","@context":{"@version":1.1,id:"@id",type:"@type",cred:"https://www.w3.org/2018/credentials#",JsonSchemaValidator2018:"cred:JsonSchemaValidator2018"}},credentialStatus:{"@id":"cred:credentialStatus","@type":"@id"},credentialSubject:{"@id":"cred:credentialSubject","@type":"@id"},evidence:{"@id":"cred:evidence","@type":"@id"},expirationDate:{"@id":"cred:expirationDate","@type":"xsd:dateTime"},holder:{"@id":"cred:holder","@type":"@id"},issued:{"@id":"cred:issued","@type":"xsd:dateTime"},issuer:{"@id":"cred:issuer","@type":"@id"},issuanceDate:{"@id":"cred:issuanceDate","@type":"xsd:dateTime"},proof:{"@id":"sec:proof","@type":"@id","@container":"@graph"},refreshService:{"@id":"cred:refreshService","@type":"@id","@context":{"@version":1.1,id:"@id",type:"@type",cred:"https://www.w3.org/2018/credentials#",ManualRefreshService2018:"cred:ManualRefreshService2018"}},termsOfUse:{"@id":"cred:termsOfUse","@type":"@id"},validFrom:{"@id":"cred:validFrom","@type":"xsd:dateTime"},validUntil:{"@id":"cred:validUntil","@type":"xsd:dateTime"}}},VerifiablePresentation:{"@id":"https://www.w3.org/2018/credentials#VerifiablePresentation","@context":{"@version":1.1,id:"@id",type:"@type",cred:"https://www.w3.org/2018/credentials#",sec:"https://w3id.org/security#",holder:{"@id":"cred:holder","@type":"@id"},proof:{"@id":"sec:proof","@type":"@id","@container":"@graph"},verifiableCredential:{"@id":"cred:verifiableCredential","@type":"@id","@container":"@graph"}}},EcdsaSecp256k1Signature2019:{"@id":"https://w3id.org/security#EcdsaSecp256k1Signature2019","@context":{"@version":1.1,id:"@id",type:"@type",sec:"https://w3id.org/security#",xsd:"http://www.w3.org/2001/XMLSchema#",challenge:"sec:challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"xsd:dateTime"},domain:"sec:domain",expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},jws:"sec:jws",nonce:"sec:nonce",proofPurpose:{"@id":"sec:proofPurpose","@type":"@vocab","@context":{"@version":1.1,id:"@id",type:"@type",sec:"https://w3id.org/security#",assertionMethod:{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"sec:authenticationMethod","@type":"@id","@container":"@set"}}},proofValue:"sec:proofValue",verificationMethod:{"@id":"sec:verificationMethod","@type":"@id"}}},EcdsaSecp256r1Signature2019:{"@id":"https://w3id.org/security#EcdsaSecp256r1Signature2019","@context":{"@version":1.1,id:"@id",type:"@type",sec:"https://w3id.org/security#",xsd:"http://www.w3.org/2001/XMLSchema#",challenge:"sec:challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"xsd:dateTime"},domain:"sec:domain",expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},jws:"sec:jws",nonce:"sec:nonce",proofPurpose:{"@id":"sec:proofPurpose","@type":"@vocab","@context":{"@version":1.1,id:"@id",type:"@type",sec:"https://w3id.org/security#",assertionMethod:{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"sec:authenticationMethod","@type":"@id","@container":"@set"}}},proofValue:"sec:proofValue",verificationMethod:{"@id":"sec:verificationMethod","@type":"@id"}}},Ed25519Signature2018:{"@id":"https://w3id.org/security#Ed25519Signature2018","@context":{"@version":1.1,id:"@id",type:"@type",sec:"https://w3id.org/security#",xsd:"http://www.w3.org/2001/XMLSchema#",challenge:"sec:challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"xsd:dateTime"},domain:"sec:domain",expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},jws:"sec:jws",nonce:"sec:nonce",proofPurpose:{"@id":"sec:proofPurpose","@type":"@vocab","@context":{"@version":1.1,id:"@id",type:"@type",sec:"https://w3id.org/security#",assertionMethod:{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"sec:authenticationMethod","@type":"@id","@container":"@set"}}},proofValue:"sec:proofValue",verificationMethod:{"@id":"sec:verificationMethod","@type":"@id"}}},RsaSignature2018:{"@id":"https://w3id.org/security#RsaSignature2018","@context":{"@version":1.1,challenge:"sec:challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"xsd:dateTime"},domain:"sec:domain",expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},jws:"sec:jws",nonce:"sec:nonce",proofPurpose:{"@id":"sec:proofPurpose","@type":"@vocab","@context":{"@version":1.1,id:"@id",type:"@type",sec:"https://w3id.org/security#",assertionMethod:{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"sec:authenticationMethod","@type":"@id","@container":"@set"}}},proofValue:"sec:proofValue",verificationMethod:{"@id":"sec:verificationMethod","@type":"@id"}}},proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"}}},wn[Jr]={"@context":{"@protected":!0,id:"@id",type:"@type",description:"https://schema.org/description",digestMultibase:{"@id":"https://w3id.org/security#digestMultibase","@type":"https://w3id.org/security#multibase"},digestSRI:{"@id":"https://www.w3.org/2018/credentials#digestSRI","@type":"https://www.w3.org/2018/credentials#sriString"},mediaType:{"@id":"https://schema.org/encodingFormat"},name:"https://schema.org/name",VerifiableCredential:{"@id":"https://www.w3.org/2018/credentials#VerifiableCredential","@context":{"@protected":!0,id:"@id",type:"@type",confidenceMethod:{"@id":"https://www.w3.org/2018/credentials#confidenceMethod","@type":"@id"},credentialSchema:{"@id":"https://www.w3.org/2018/credentials#credentialSchema","@type":"@id"},credentialStatus:{"@id":"https://www.w3.org/2018/credentials#credentialStatus","@type":"@id"},credentialSubject:{"@id":"https://www.w3.org/2018/credentials#credentialSubject","@type":"@id"},description:"https://schema.org/description",evidence:{"@id":"https://www.w3.org/2018/credentials#evidence","@type":"@id"},issuer:{"@id":"https://www.w3.org/2018/credentials#issuer","@type":"@id"},name:"https://schema.org/name",proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},refreshService:{"@id":"https://www.w3.org/2018/credentials#refreshService","@type":"@id"},relatedResource:{"@id":"https://www.w3.org/2018/credentials#relatedResource","@type":"@id"},renderMethod:{"@id":"https://www.w3.org/2018/credentials#renderMethod","@type":"@id"},termsOfUse:{"@id":"https://www.w3.org/2018/credentials#termsOfUse","@type":"@id"},validFrom:{"@id":"https://www.w3.org/2018/credentials#validFrom","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},validUntil:{"@id":"https://www.w3.org/2018/credentials#validUntil","@type":"http://www.w3.org/2001/XMLSchema#dateTime"}}},EnvelopedVerifiableCredential:"https://www.w3.org/2018/credentials#EnvelopedVerifiableCredential",VerifiablePresentation:{"@id":"https://www.w3.org/2018/credentials#VerifiablePresentation","@context":{"@protected":!0,id:"@id",type:"@type",holder:{"@id":"https://www.w3.org/2018/credentials#holder","@type":"@id"},proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},termsOfUse:{"@id":"https://www.w3.org/2018/credentials#termsOfUse","@type":"@id"},verifiableCredential:{"@id":"https://www.w3.org/2018/credentials#verifiableCredential","@type":"@id","@container":"@graph","@context":null}}},EnvelopedVerifiablePresentation:"https://www.w3.org/2018/credentials#EnvelopedVerifiablePresentation",JsonSchemaCredential:"https://www.w3.org/2018/credentials#JsonSchemaCredential",JsonSchema:{"@id":"https://www.w3.org/2018/credentials#JsonSchema","@context":{"@protected":!0,id:"@id",type:"@type",jsonSchema:{"@id":"https://www.w3.org/2018/credentials#jsonSchema","@type":"@json"}}},BitstringStatusListCredential:"https://www.w3.org/ns/credentials/status#BitstringStatusListCredential",BitstringStatusList:{"@id":"https://www.w3.org/ns/credentials/status#BitstringStatusList","@context":{"@protected":!0,id:"@id",type:"@type",encodedList:{"@id":"https://www.w3.org/ns/credentials/status#encodedList","@type":"https://w3id.org/security#multibase"},statusPurpose:"https://www.w3.org/ns/credentials/status#statusPurpose",ttl:"https://www.w3.org/ns/credentials/status#ttl"}},BitstringStatusListEntry:{"@id":"https://www.w3.org/ns/credentials/status#BitstringStatusListEntry","@context":{"@protected":!0,id:"@id",type:"@type",statusListCredential:{"@id":"https://www.w3.org/ns/credentials/status#statusListCredential","@type":"@id"},statusListIndex:"https://www.w3.org/ns/credentials/status#statusListIndex",statusPurpose:"https://www.w3.org/ns/credentials/status#statusPurpose",statusMessage:{"@id":"https://www.w3.org/ns/credentials/status#statusMessage","@context":{"@protected":!0,id:"@id",type:"@type",message:"https://www.w3.org/ns/credentials/status#message",status:"https://www.w3.org/ns/credentials/status#status"}},statusReference:{"@id":"https://www.w3.org/ns/credentials/status#statusReference","@type":"@id"},statusSize:{"@id":"https://www.w3.org/ns/credentials/status#statusSize","@type":"https://www.w3.org/2001/XMLSchema#integer"}}},DataIntegrityProof:{"@id":"https://w3id.org/security#DataIntegrityProof","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},cryptosuite:{"@id":"https://w3id.org/security#cryptosuite","@type":"https://w3id.org/security#cryptosuiteString"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",previousProof:{"@id":"https://w3id.org/security#previousProof","@type":"@id"},proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},"...":{"@id":"https://www.iana.org/assignments/jwt#..."},_sd:{"@id":"https://www.iana.org/assignments/jwt#_sd","@type":"@json"},_sd_alg:{"@id":"https://www.iana.org/assignments/jwt#_sd_alg"},aud:{"@id":"https://www.iana.org/assignments/jwt#aud","@type":"@id"},cnf:{"@id":"https://www.iana.org/assignments/jwt#cnf","@context":{"@protected":!0,kid:{"@id":"https://www.iana.org/assignments/jwt#kid","@type":"@id"},jwk:{"@id":"https://www.iana.org/assignments/jwt#jwk","@type":"@json"}}},exp:{"@id":"https://www.iana.org/assignments/jwt#exp","@type":"https://www.w3.org/2001/XMLSchema#nonNegativeInteger"},iat:{"@id":"https://www.iana.org/assignments/jwt#iat","@type":"https://www.w3.org/2001/XMLSchema#nonNegativeInteger"},iss:{"@id":"https://www.iana.org/assignments/jose#iss","@type":"@id"},jku:{"@id":"https://www.iana.org/assignments/jose#jku","@type":"@id"},kid:{"@id":"https://www.iana.org/assignments/jose#kid","@type":"@id"},nbf:{"@id":"https://www.iana.org/assignments/jwt#nbf","@type":"https://www.w3.org/2001/XMLSchema#nonNegativeInteger"},sub:{"@id":"https://www.iana.org/assignments/jose#sub","@type":"@id"},x5u:{"@id":"https://www.iana.org/assignments/jose#x5u","@type":"@id"}}},wn[Yr]=gn,wn[Xr]=gn,wn[Gr]=gn,wn[Wr]=mn,wn[Zr]=mn,wn[Qr]=mn,wn[en]=yn,wn[rn]=yn,wn[tn]=yn,wn[nn]=bn,wn[sn]=bn,wn[on]=bn,wn[an]=vn,wn[dn]=vn,wn[cn]=vn,wn[un]={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},MerkleProof2019:{"@id":"https://w3id.org/security#MerkleProof2019","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}},wn[ln]={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},ChainedProof2021:{"@id":"https://w3id.org/security#ChainedProof2021","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"},chainedProofType:{"@id":"https://w3id.org/security#chainedProofType","@type":"@id"},previousProof:{"@id":"https://w3id.org/security#previousProof","@type":"@id"}}}}},wn[hn]={"@context":{"@protected":!0,StatusList2021Credential:{"@id":"https://w3id.org/vc/status-list#StatusList2021Credential","@context":{"@protected":!0,id:"@id",type:"@type",description:"http://schema.org/description",name:"http://schema.org/name"}},StatusList2021:{"@id":"https://w3id.org/vc/status-list#StatusList2021","@context":{"@protected":!0,id:"@id",type:"@type",statusPurpose:"https://w3id.org/vc/status-list#statusPurpose",encodedList:"https://w3id.org/vc/status-list#encodedList"}},StatusList2021Entry:{"@id":"https://w3id.org/vc/status-list#StatusList2021Entry","@context":{"@protected":!0,id:"@id",type:"@type",statusPurpose:"https://w3id.org/vc/status-list#statusPurpose",statusListIndex:"https://w3id.org/vc/status-list#statusListIndex",statusListCredential:{"@id":"https://w3id.org/vc/status-list#statusListCredential","@type":"@id"}}}}},wn[pn]={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},DataIntegrityProof:{"@id":"https://w3id.org/security#DataIntegrityProof","@context":{"@protected":!0,id:"@id",type:"@type",challenge:"https://w3id.org/security#challenge",created:{"@id":"http://purl.org/dc/terms/created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},domain:"https://w3id.org/security#domain",expires:{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},nonce:"https://w3id.org/security#nonce",previousProof:{"@id":"https://w3id.org/security#previousProof","@type":"@id"},proofPurpose:{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":!0,id:"@id",type:"@type",assertionMethod:{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},capabilityDelegation:{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},cryptosuite:{"@id":"https://w3id.org/security#cryptosuite","@type":"https://w3id.org/security#cryptosuiteString"},proofValue:{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}};var kn={BLOCKCERTSV1_2:{"@context":[{id:"@id",type:"@type",bc:"https://w3id.org/blockcerts#",obi:"https://w3id.org/openbadges#",cp:"https://w3id.org/chainpoint#",extensions:"https://w3id.org/openbadges/extensions#",validation:"obi:validation",xsd:"http://www.w3.org/2001/XMLSchema#",schema:"http://schema.org/",sec:"https://w3id.org/security#",Assertion:"bc:Assertion",Certificate:"bc:Certificate",Issuer:"bc:Issuer",BlockchainCertificate:"bc:BlockchainCertificate",CertificateDocument:"bc:CertificateDocument",issuer:{"@id":"bc:issuer","@type":"@id"},recipient:{"@id":"bc:recipient","@type":"@id"},blockchaincertificate:{"@id":"bc:blockchaincertificate","@type":"@id"},certificate:{"@id":"bc:certificate","@type":"@id"},document:{"@id":"bc:document","@type":"@id"},assertion:{"@id":"bc:assertion","@type":"@id"},verify:{"@id":"bc:verify","@type":"@id"},receipt:{"@id":"bc:receipt","@type":"@id"},publicKey:{"@id":"bc:publicKey"},revocationKey:{"@id":"bc:revocationKey"},"image:signature":{"@id":"bc:image:signature"},signature:{"@id":"bc:signature"},familyName:{"@id":"schema:familyName"},givenName:{"@id":"schema:givenName"},jobTitle:{"@id":"schema:jobTitle"},signer:{"@id":"bc:signer","@type":"@id"},"attribute-signed":{"@id":"bc:attribute-signed"},"ECDSA(secp256k1)":"bc:SignedBadge",subtitle:{"@id":"bc:subtitle"},email:"schema:email",hashed:{"@id":"obi:hashed","@type":"xsd:boolean"},image:{"@id":"schema:image","@type":"@id"},salt:{"@id":"obi:salt"},identity:{"@id":"obi:identityHash"},issuedOn:{"@id":"obi:issueDate","@type":"xsd:dateTime"},expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},evidence:{"@id":"obi:evidence","@type":"@id"},criteria:{"@id":"obi:criteria","@type":"@id"},tags:{"@id":"schema:keywords"},alignment:{"@id":"obi:alignment","@type":"@id"},revocationList:"obi:revocationList",name:{"@id":"schema:name"},description:{"@id":"schema:description"},url:{"@id":"schema:url","@type":"@id"},uid:{"@id":"obi:uid"},TypeValidation:"obi:TypeValidation",FrameValidation:"obi:FrameValidation",validatesType:"obi:validatesType",validationSchema:"obi:validationSchema",validationFrame:"obi:validationFrame",ChainpointSHA224v2:"cp:ChainpointSHA224v2",ChainpointSHA256v2:"cp:ChainpointSHA256v2",ChainpointSHA384v2:"cp:ChainpointSHA384v2",ChainpointSHA512v2:"cp:ChainpointSHA512v2","ChainpointSHA3-224v2":"cp:ChainpointSHA3-224v2","ChainpointSHA3-256v2":"cp:ChainpointSHA3-256v2","ChainpointSHA3-384v2":"cp:ChainpointSHA3-384v2","ChainpointSHA3-512v2":"cp:ChainpointSHA3-512v2",BTCOpReturn:"cp:BTCOpReturn",targetHash:"cp:targetHash",merkleRoot:"cp:merkleRoot",proof:"cp:proof",anchors:"cp:anchors",sourceId:"cp:sourceId",right:"cp:right",left:"cp:left"}],validation:[{type:"TypeValidation",validatesType:"Assertion",validationSchema:"https://w3id.org/blockcerts/schema/1.2/assertion-1.2.json"},{type:"TypeValidation",validatesType:"Certificate",validationSchema:"https://w3id.org/blockcerts/schema/1.2/certificate-1.2.json"},{type:"TypeValidation",validatesType:"Issuer",validationSchema:"https://w3id.org/blockcerts/schema/1.2/issuer-1.2.json"},{type:"TypeValidation",validatesType:"CertificateDocument",validationSchema:"https://w3id.org/blockcerts/schema/1.2/certificate-document-1.2.json"},{type:"TypeValidation",validatesType:"BlockchainCertificate",validationSchema:"https://w3id.org/blockcerts/schema/1.2/blockchain-certificate-1.2.json"},{type:"TypeValidation",validatesType:"BlockchainReceipt",validationSchema:"https://w3id.org/blockcerts/schema/1.2/blockchain-receipt-1.2.json"}]},CHAINPOINT_V2:{"@context":{id:"@id",type:"@type",cp:"https://w3id.org/chainpoint#",ChainpointSHA224v2:"cp:ChainpointSHA224v2",ChainpointSHA256v2:"cp:ChainpointSHA256v2",ChainpointSHA384v2:"cp:ChainpointSHA384v2",ChainpointSHA512v2:"cp:ChainpointSHA512v2","ChainpointSHA3-224v2":"cp:ChainpointSHA3-224v2","ChainpointSHA3-256v2":"cp:ChainpointSHA3-256v2","ChainpointSHA3-384v2":"cp:ChainpointSHA3-384v2","ChainpointSHA3-512v2":"cp:ChainpointSHA3-512v2",BTCOpReturn:"cp:BTCOpReturn",ETHData:"cp:ETHData",targetHash:"cp:targetHash",merkleRoot:"cp:merkleRoot",proof:{"@id":"cp:proof","@container":"@list"},anchors:{"@id":"cp:anchors","@container":"@list"},sourceId:"cp:sourceId",right:"cp:right",left:"cp:left"}}};wn["https://w3id.org/blockcerts/v1"]=kn.BLOCKCERTSV1_2,wn["https://w3id.org/chainpoint/v2"]=kn.CHAINPOINT_V2;const Ln={locale:"en-US"};var Sn={locale:"en-US"},Pn={"en-US":{steps:{formatValidationLabel:"Format validation",formatValidationLabelPending:"Validating format",signatureVerificationLabel:"Proof Verification",signatureVerificationLabelPending:"Verifying Proof",identityVerificationLabel:"Identity verification",identityVerificationLabelPending:"Verifying identity",statusCheckLabel:"Status check",statusCheckLabelPending:"Checking record status"},subSteps:{getTransactionIdLabel:"Get transaction ID",getTransactionIdLabelPending:"Getting transaction ID",computeLocalHashLabel:"Compute local hash",computeLocalHashLabelPending:"Computing local hash",fetchRemoteHashLabel:"Fetch remote hash",fetchRemoteHashLabelPending:"Fetching remote hash",getIssuerProfileLabel:"Get issuer profile",getIssuerProfileLabelPending:"Getting issuer profile",parseIssuerKeysLabel:"Parse issuer keys",parseIssuerKeysLabelPending:"Parsing issuer keys",compareHashesLabel:"Compare hashes",compareHashesLabelPending:"Comparing hashes",checkDocumentSignatureLabel:"Check document signature",checkDocumentSignatureLabelPending:"Checking document signature",checkMerkleRootLabel:"Check Merkle Root",checkMerkleRootLabelPending:"Checking Merkle Root",checkReceiptLabel:"Check Receipt",checkReceiptLabelPending:"Checking Receipt",checkAuthenticityLabel:"Check Authenticity",checkAuthenticityLabelPending:"Checking Authenticity",checkRevokedStatusLabel:"Check Revoked Status",checkRevokedStatusLabelPending:"Checking Revoked Status",checkExpiresDateLabel:"Check Expiration Date",checkExpiresDateLabelPending:"Checking Expiration Date",controlVerificationMethodLabel:"Control Verification Method",controlVerificationMethodLabelPending:"Controlling Verification Method",retrieveVerificationMethodPublicKeyLabel:"Extract Public Key from DID Document",retrieveVerificationMethodPublicKeyLabelPending:"Extracting Public Key from DID Document",deriveIssuingAddressFromPublicKeyLabel:"Derive Issuing Address from Public Key",deriveIssuingAddressFromPublicKeyLabelPending:"Deriving Issuing Address from Public Key",compareIssuingAddressLabel:"Compare addresses",compareIssuingAddressLabelPending:"Comparing addresses",checkImagesIntegrityLabel:"Verify Images Integrity",checkImagesIntegrityLabelPending:"Verifying Images Integrity"},revocation:{preReason:"Reason given:",reason:"This certificate has been revoked by the issuer."},success:{mocknet:{label:"This Mocknet credential passed all checks",description:"Mocknet credentials are used for test purposes only. They are not recorded on a blockchain, and they should not be considered verified Blockcerts."},blockchain:{label:"Verified",description:"This is a valid ${chain} certificate.",linkText:"View transaction link"},generic:{label:"Verified",description:"The ${SIGNATURE_TYPE} signature of this document has been successfully verified."},multisign:{label:"Verified",description:"All the signatures of this certificate have successfully verified."}},errors:{certificateNotValid:"This is not a valid certificate",couldNotConfirmTx:"Could not confirm the transaction",ensureHashesEqual:"Computed hash does not match remote hash",ensureMerkleRootEqual:"Merkle root does not match remote hash.",ensureNotExpired:"This certificate has expired.",ensureValidReceipt:"The receipt is malformed. There was a problem navigating the merkle tree in the receipt.",failedJsonLdNormalization:"Failed JSON-LD normalization",foundUnmappedFields:"Found unmapped fields during JSON-LD normalization",identityErrorBaseMessage:"Issuer identity mismatch",deriveIssuingAddressFromPublicKey:"Unsupported blockchain for DID verification",controlVerificationMethod:"The identity document provided by the issuer does not match the verification method",retrieveVerificationMethodPublicKey:"The identity document provided by the issuer does not reference the verification method",compareIssuingAddress:"The provided verification method does not match the issuer identity",invalidIssuingAddressCreationTime:"The specified issuing address was created after the transaction occurred.",invalidIssuingAddressRevoked:"The specified issuing address was revoked by the issuer before the transaction occurred.",invalidIssuingAddressExpired:"The specified issuing address expired before the transaction occurred.",invalidIssuingAddressUnknown:"The address used to issue this Blockcerts does not belong to the claimed issuer.",getChain:"Didn't recognize chain value",getIssuerProfile:"Unable to get issuer profile",getRevokedAssertions:"Unable to get revocation assertions",getTransactionId:"Cannot verify this certificate without a transaction ID to compare against.",invalidMerkleReceipt:"Invalid Merkle Receipt. Proof hash did not match Merkle root",invalidMerkleVersion:"Merkle version used for signature is incompatible with Blockcerts version.",isTransactionIdValid:"Cannot verify this certificate without a transaction ID to compare against.",issuerProfileNotSet:"no issuer address given",issuerProfileInvalid:"retrieved file does not seem to be a valid profile",parseIssuerKeys:"Unable to parse JSON out of issuer identification data.",checkImagesIntegrity:"Image integrity verification proved that the content was modified after issuance."}},fr:{steps:{formatValidationLabel:"Validation du format",formatValidationLabelPending:"Validation du format",signatureVerificationLabel:"Vérification de la preuve",signatureVerificationLabelPending:"Vérification de la preuve",identityVerificationLabel:"Vérification de l'identité",identityVerificationLabelPending:"Vérification de l'identité",statusCheckLabel:"Vérification du status",statusCheckLabelPending:"Vérification du status"},subSteps:{getTransactionIdLabel:"Obtention de l'identifiant de transaction",getTransactionIdLabelPending:"Obtention de l'identifiant de transaction",computeLocalHashLabel:"Calcul du hash local",computeLocalHashLabelPending:"Calcul du hash local",fetchRemoteHashLabel:"Récupération du hash distant",fetchRemoteHashLabelPending:"Récupération du hash distant",getIssuerProfileLabel:"Obtention du profil de l'émetteur",getIssuerProfileLabelPending:"Obtention du profil de l'émetteur",parseIssuerKeysLabel:"Traitement des clés de l'émetteur",parseIssuerKeysLabelPending:"Traitement des clés de l'émetteur",compareHashesLabel:"Comparaison des hash",compareHashesLabelPending:"Comparaison des hashs",checkDocumentSignatureLabel:"Vérification de la signature du document",checkDocumentSignatureLabelPending:"Vérification de la signature du document",checkMerkleRootLabel:"Vérification du Merkle Root",checkMerkleRootLabelPending:"Vérification du Merkle Root",checkReceiptLabel:"Vérification du reçu",checkReceiptLabelPending:"Vérification du reçu",checkAuthenticityLabel:"Vérification de l'authenticité",checkAuthenticityLabelPending:"Vérification de l'authenticité",checkRevokedStatusLabel:"Vérification du status de révocation",checkRevokedStatusLabelPending:"Vérification du status de révocation",checkExpiresDateLabel:"Vérification de la date d'expiration",checkExpiresDateLabelPending:"Vérification de la date d'expiration",controlVerificationMethodLabel:"Contrôle de la Méthode de Vérification",controlVerificationMethodLabelPending:"Contrôle de la Méthode de Vérification",retrieveVerificationMethodPublicKeyLabel:"Extraction de la clé publique depuis le document DID",retrieveVerificationMethodPublicKeyLabelPending:"Extraction de la clé publique depuis le document DID",deriveIssuingAddressFromPublicKeyLabel:"Dérivation de l'adresse d'émission depuis la clé publique",deriveIssuingAddressFromPublicKeyLabelPending:"Dérivation de l'adresse d'émission depuis la clé publique",compareIssuingAddressLabel:"Comparaison des adresses",compareIssuingAddressLabelPending:"Comparaison des adresses",checkImagesIntegrityLabel:"Vérification de l'Intégrité des Images",checkImagesIntegrityLabelPending:"Vérification de l'Intégrité des Images"},revocation:{preReason:"Raison :",reason:"Ce certificat a été révoqué par l'émetteur."},success:{mocknet:{label:"Cet enregistrement Mocknet a été vérifié",description:"Le mode Mocknet est utilisé à des fins de tests uniquement. Ce Blockcert n'a pas été enregistré sur une blockchain, et en tant que tel ne peut pas être considéré un Blockcert valide."},blockchain:{label:"Vérifié",description:"Ceci est un certificat ${chain} valide.",linkText:"Voir la transaction"},generic:{label:"Verified",description:"La signature ${SIGNATURE_TYPE} de ce certificat a été vérifiée avec succès."},multisign:{label:"Vérifié",description:"Toutes les signatures numériques de ce certificat ont été vérifiées avec succès."}},errors:{certificateNotValid:"Certificat invalide",couldNotConfirmTx:"Impossible de confirmer la transaction",ensureHashesEqual:"Calcul du hash local différent du hash distant",ensureMerkleRootEqual:"Le Merkle root ne correspond pas au hash distant",ensureNotExpired:"Certificat expiré",ensureValidReceipt:"Erreur d'écriture du reçu. Un problème est survenu lors de la navigation de l'arbre Merkle du reçu.",failedJsonLdNormalization:"Erreur de normalisation JSON-LD",foundUnmappedFields:"Champs non liés découverts durant la normalisation JSON-LD",identityErrorBaseMessage:"Identité de l'émetteur invalide",deriveIssuingAddressFromPublicKey:"Cette blockchain n'est pas supportée pour la vérification de l'identité décentralisée.",controlVerificationMethod:"Le document d'identité de l'émetteur ne correspond pas à la méthode de vérification.",retrieveVerificationMethodPublicKey:"Le document d'identité de l'émetteur ne fait pas mention de la méthode de vérification.",compareIssuingAddress:"La méthode de vérification n'a pas permis d'établir l'identité de l'émetteur.",invalidIssuingAddressCreationTime:"L'adresse d'émission utilisée a été créée après la transaction d'enregistrement.",invalidIssuingAddressRevoked:"L'adresse d'émission utilisée a été décommissionnée par l'émetteur avant la transaction d'enregistrement.",invalidIssuingAddressExpired:"L'adresse d'émission utilisée a expiré avant la transaction.",invalidIssuingAddressUnknown:"L'adresse utilisée pour émettre ce Blockcerts n'appartient à l'émetteur déclaré.",getChain:"Valeur de chaine non reconnue",getIssuerProfile:"Profil de l'émetteur indisponible",getRevokedAssertions:"Impossible d'obtenir les raisons de revocation",getTransactionId:"Impossible de vérifier ce certificat sans un identifiant de transaction valide",invalidMerkleReceipt:"Reçu Merkle invalide. Hash de preuve différent du Merkle root",invalidMerkleVersion:"La version du Merkle utilisé est incompatible avec la version Blockcerts.",isTransactionIdValid:"Impossible de vérifier ce certificat sans un identifiant de transaction valide",issuerProfileNotSet:"l'URL de l'émetteur n'est pas définie",issuerProfileInvalid:"le document distant ne semble pas être un profil d'émetteur valide",parseIssuerKeys:"Impossible de lire le JSON d'identification de l'émetteur",checkImagesIntegrity:"La vérification des images a prouvé que le contenu a été modifié après l'émission."}},es:{steps:{formatValidationLabel:"Validación de formato",formatValidationLabelPending:"Validando el formato",signatureVerificationLabel:"Verificar prueba",signatureVerificationLabelPending:"Verificando prueba",identityVerificationLabel:"Verificar identitad",identityVerificationLabelPending:"Verificando identitad",statusCheckLabel:"Estado de Verificación",statusCheckLabelPending:"Verificando Estado de Grabación"},subSteps:{getTransactionIdLabel:"Obtener Identificación de Transacción",getTransactionIdLabelPending:"Obteniendo Identificación de Transacción",computeLocalHashLabel:"Calcular cadena binaria local",computeLocalHashLabelPending:"Calculando cadena binaria local",fetchRemoteHashLabel:"Obtener cadena binaria remota",fetchRemoteHashLabelPending:"Obeniendo cadena binaria remota",getIssuerProfileLabel:"Obtener perfil de emisor",getIssuerProfileLabelPending:"Obteniendo perfil de emisor",parseIssuerKeysLabel:"Analizar claves del emisor",parseIssuerKeysLabelPending:"Analizando claves del emisor",compareHashesLabel:"Comparar cadenas binarias",compareHashesLabelPending:"Comparando cadenas binarias",checkDocumentSignatureLabel:"Controlar firma del documento",checkDocumentSignatureLabelPending:"Controlando firma del documento",checkMerkleRootLabel:"Verificar Merkle Root",checkMerkleRootLabelPending:"Verificando Merkle Root",checkReceiptLabel:"Verificar Recibo",checkReceiptLabelPending:"Verificando Recibo",checkAuthenticityLabel:"Verificar Autenticidad",checkAuthenticityLabelPending:"Verificando Autenticidad",checkRevokedStatusLabel:"Verificar Estado de Revocación",checkRevokedStatusLabelPending:"Verificando Estado de Revocación",checkExpiresDateLabel:"Verificar Fechas de Expiración",checkExpiresDateLabelPending:"Verificando Fechas de Expiración",controlVerificationMethodLabel:"Controlar Metodo de Verificación",controlVerificationMethodLabelPending:"Controlando Metodo de Verificación",retrieveVerificationMethodPublicKeyLabel:"Extraer la llave pública desde el documento DID",retrieveVerificationMethodPublicKeyLabelPending:"Extraendo la llave pública desde el documento DID",deriveIssuingAddressFromPublicKeyLabel:"Derivar la dirección del emisor desde la llave pública",deriveIssuingAddressFromPublicKeyLabelPending:"Derivando la dirección del emisor desde la llave pública",compareIssuingAddressLabel:"Comparar direcciones",compareIssuingAddressLabelPending:"Comparando direcciones",checkImagesIntegrityLabel:"Comprobar Integridad de las Imagens",checkImagesIntegrityLabelPending:"Comprobando Integridad de las Imagens"},revocation:{preReason:"Razón dada:",reason:"Este certificado ha sido revocado por el emisor"},success:{mocknet:{label:"Esta credencial de Mocknet pasó todas las comprobaciones",description:"Las credenciales de Mocknet se usan solo con fines de prueba. No se graban en una cadena de bloques, y no se deben considerar Blockcerts Verificados."},blockchain:{label:"Verificado",description:"Este es un certificado válido de ${chain}.",linkText:"Ver enlace de transacción"},generic:{label:"Verified",description:"La firma ${SIGNATURE_TYPE} de este certificado ha verificado con éxito."},multisign:{label:"Verificado",description:"Todas las firmas digitales de este certificado han verificado con éxito."}},errors:{certificateNotValid:"Este no es un certificado válido",couldNotConfirmTx:"No se ha podido confirmar la transacción",ensureHashesEqual:"La cadena binaria calculada no corresponde con la cadena binaria remota",ensureMerkleRootEqual:"La raíz Merkle no corresponde con la cadena binaria remota",ensureNotExpired:"Este certificado ha expirado",ensureValidReceipt:"El recibo está malformado. Hubo un problema navegando el árbol Merkle en el recibo",failedJsonLdNormalization:"La normalización del JSON-LD ha fallado",foundUnmappedFields:"Se han encontrado campos no mapeados durante la normalización de JSON-LD",identityErrorBaseMessage:"Identitad del emisor inválida",deriveIssuingAddressFromPublicKey:"No se puede validar la identitad decentalisada con esta cadena binaria.",controlVerificationMethod:"El documento de identitad del emisor no corresponde al metodo de verificación.",retrieveVerificationMethodPublicKey:"El documento de identitad del emisor no hace constar al metodo de verificación.",compareIssuingAddress:"El metodo de verificación no corresponde a la identitad del emisor.",invalidIssuingAddressCreationTime:"El emisor creó el metodo de verificación después de la emisión del certificado.",invalidIssuingAddressRevoked:"El emisor revocó el metodo de verificación antes de la emisión del certificado.",invalidIssuingAddressExpired:"El metodo de verificación expiró antes de la emisión del certificado.",invalidIssuingAddressUnknown:"El metodo de verificación no pertenece a la identitad del emisor.",getChain:"Valor de cadena no reconocido",getIssuerProfile:"No se ha podido obtener el perfil del emisor",getRevokedAssertions:"No se ha podido obtener aseveraciones de revocación",getTransactionId:"No se puede verificar este certificado sin una identificación de transacción que sirva como comparación",invalidMerkleReceipt:"Recibo Merkle inválido. La cadena binaria de prueba no corresponde con la raíz Merkle",invalidMerkleVersion:"Merkle version used for signature is incompatible with Blockcerts version.",isTransactionIdValid:"No se puede verificar este certificado sin una identificación de transacción que sirva como comparación",issuerProfileNotSet:"URL del emisor no definido",issuerProfileInvalid:"el documento recogido no parece ser un perfil de emisor valido",parseIssuerKeys:"No se ha podido analizar el JSON de la información de identificación del emisor",checkImagesIntegrity:"La verificación de la integridad de los imagens provó alteración del contenido después de la emisión."}},mt:{steps:{formatValidationLabel:"Validazzjoni tal-format",formatValidationLabelPending:"Il-format qed jiġi vvalidat",signatureVerificationLabel:"Proof Verification",signatureVerificationLabelPending:"Verifying Proof",identityVerificationLabel:"Identity verification",identityVerificationLabelPending:"Verifying identity",statusCheckLabel:"Status check",statusCheckLabelPending:"Ir-record status qed jiġi ċċekkjat"},subSteps:{getTransactionIdLabel:"Ikseb l-ID ta' tranżazzjoni",getTransactionIdLabelPending:"L-ID ta' tranżazzjoni qed tiġi mniżżla",computeLocalHashLabel:"Ikkalkula l-hash lokali",computeLocalHashLabelPending:"Il-hash lokali qed jiġi kkalkulat",fetchRemoteHashLabel:"Fittex ir-remote hash",fetchRemoteHashLabelPending:"Ir-remote hash qed jiġi mfittex",getIssuerProfileLabel:"Ikseb il-profil tal-emittent",getIssuerProfileLabelPending:"Il-profil tal-emittent qed jiġi mniżżel",parseIssuerKeysLabel:"Estratta ċ-ċwievet tal-emittent",parseIssuerKeysLabelPending:"Iċ-ċwievet tal-emittent qed jiġu estratti",compareHashesLabel:"Ikkumpara l-hashes",compareHashesLabelPending:"Il-hashes qed jiġu kkomparati",checkDocumentSignatureLabel:"Check document signature",checkDocumentSignatureLabelPending:"Checking document signature",checkMerkleRootLabel:"Iċċekkja l-Merkle Root",checkMerkleRootLabelPending:"Il-Merkle Root Qed Tiġi Ċċekkjata",checkReceiptLabel:"Iċċekkja l-Irċevuta",checkReceiptLabelPending:"L-Irċevuta Qed Tiġi Ċċekkjata",checkAuthenticityLabel:"Iċċekkja l-Awtentiċità",checkAuthenticityLabelPending:"L-Awtentiċità Qed Tiġi Ċċekkjata",checkRevokedStatusLabel:"Iċċekkja l-Istatus Revokat",checkRevokedStatusLabelPending:"L-Istatus Revokat Qed Jiġi Ċċekkjat",checkExpiresDateLabel:"Iċċekkja d-Data ta' Skadenza",checkExpiresDateLabelPending:"Id-Data ta' Skadenza Qed Tiġi Ċċekkjata",controlVerificationMethodLabel:"Control Verification Method",controlVerificationMethodLabelPending:"Controlling Verification Method",retrieveVerificationMethodPublicKeyLabel:"Extract Public Key from DID Document",retrieveVerificationMethodPublicKeyLabelPending:"Extracting Public Key from DID Document",deriveIssuingAddressFromPublicKeyLabel:"Derive Issuing Address from Public Key",deriveIssuingAddressFromPublicKeyLabelPending:"Deriving Issuing Address from Public Key",compareIssuingAddressLabel:"Compare addresses",compareIssuingAddressLabelPending:"Comparing addresses",checkImagesIntegrityLabel:"Verify Images Integrity",checkImagesIntegrityLabelPending:"Verifying Images Integrity"},revocation:{preReason:"Raġuni mogħtija:",reason:"Dan iċ-ċertifikat ġie revokat mill-emittent."},success:{mocknet:{label:"Din il-kredenzjali tal-Mocknet għaddiet il-kontrolli kollha",description:"Il-kredenzjali tal-Mocknet jintużaw biss għal skopijiet ta 'ttestjar. Dawn mhumiex irreġistrati fuq blockchain, u ma għandhomx jiġu kkunsidrati bħala blockcerts verifikati."},blockchain:{label:"Ivverifikat",description:"Dan huwa ċertifikat ${chain} huwa validu.",linkText:"Ara l-link tat-transazzjoni"},generic:{label:"Ivverifikat",description:"The ${SIGNATURE_TYPE} signature of this document has been successfully verified."},multisign:{label:"Ivverifikat",description:"All the signatures of this certificate have successfully verified."}},errors:{certificateNotValid:"Dan mhux ċertifikat validu",couldNotConfirmTx:"Ma setgħetx tiġi kkonfermata t-tranżazzjoni",ensureHashesEqual:"Il-hash ikkalkulat ma jikkorrispondix mar-remote hash",ensureMerkleRootEqual:"Merkle root ma taqbilx mar-remote hash",ensureNotExpired:"Dan iċ-ċertifikat skada",ensureValidReceipt:"L-irċevuta hija malformata. Kien hemm problema fin-navigazzjoni tal-merkle tree fl-irċevuta",failedJsonLdNormalization:"In-normalizzazzjoni ta' JSON-LD ma rnexxietx",foundUnmappedFields:"Instabu unmapped fields matul in-normalizzazzjoni JSON-LD",identityErrorBaseMessage:"Issuer identity mismatch",deriveIssuingAddressFromPublicKey:"Unsupported blockchain for DID verification",controlVerificationMethod:"The identity document provided by the issuer does not match the verification method",retrieveVerificationMethodPublicKey:"The identity document provided by the issuer does not reference the verification method",compareIssuingAddress:"The provided verification method does not match the issuer identity",invalidIssuingAddressCreationTime:"L-indirizz elettroniku tal-ħruġ speċifikat inħoloq wara li seħħet it-tranżazzjoni.",invalidIssuingAddressRevoked:"L-indirizz elettroniku tal-ħruġ speċifikat ġie revokat mill-emittent qabel ma seħħet it-tranżazzjoni.",invalidIssuingAddressExpired:"L-indirizz elettroniku tal-ħruġ speċifikat skada qabel ma seħħet it-tranżazzjoni.",invalidIssuingAddressUnknown:"L-indirizz elettroniku użat biex jinħarġu dawn il-Blockcerts ma jappartjenix għall-emittent mitlub.",getChain:"Iċ-chain value ma ntgħarafx",getIssuerProfile:"Mhux possibbli jinkiseb il-profil tal-emittent",getRevokedAssertions:"Mhux possibbli jinkisbu dikjarazzjonijiet revokati",getTransactionId:"Dan iċ-ċertifikat ma jistax jiġi vverifikat mingħajr ID ta' tranżazzjoni mqabbla miegħu",invalidMerkleReceipt:"Irċevuta Merkle invalida. Il-proof hash ma kienx jaqbel mal-Merkle root",invalidMerkleVersion:"Merkle version used for signature is incompatible with Blockcerts version.",isTransactionIdValid:"Dan iċ-ċertifikat ma jistax jiġi vverifikat mingħajr ID ta' tranżazzjoni mqabbla miegħu",issuerProfileNotSet:"no issuer address given",issuerProfileInvalid:"retrieved file does not seem to be a valid profile",parseIssuerKeys:"Ma jistax jiġi estratt JSON mid-data tal-identifikazzjoni tal-emittent",checkImagesIntegrity:"Image integrity verification proved that the content was modified after issuance."}},"it-IT":{steps:{formatValidationLabel:"Convalidare formato",formatValidationLabelPending:"Convalida formato",signatureVerificationLabel:"Proof Verification",signatureVerificationLabelPending:"Verifying Proof",identityVerificationLabel:"Identity verification",identityVerificationLabelPending:"Verifying identity",statusCheckLabel:"Verificare stato",statusCheckLabelPending:"Verifica stato del record"},subSteps:{getTransactionIdLabel:"Ottenere ID transazione",getTransactionIdLabelPending:"Ottieni ID transazione",computeLocalHashLabel:"Calcolare hash locale",computeLocalHashLabelPending:"Calcola hash locale",fetchRemoteHashLabel:"Recuperare hash remoto",fetchRemoteHashLabelPending:"Recupera hash remoto",getIssuerProfileLabel:"Ottenere profilo issuer",getIssuerProfileLabelPending:"Ottieni profilo issuer",parseIssuerKeysLabel:"Analizzare chiavi issuer",parseIssuerKeysLabelPending:"Analizza chiavi issuer",compareHashesLabel:"Confrontare gli hash",compareHashesLabelPending:"Confronto hash",checkDocumentSignatureLabel:"Check document signature",checkDocumentSignatureLabelPending:"Checking document signature",checkMerkleRootLabel:"Controllare radice di Merkle",checkMerkleRootLabelPending:"Controllo radice di Merkle",checkReceiptLabel:"Verificare ricevuta",checkReceiptLabelPending:"Verifica ricevuta",checkAuthenticityLabel:"Verificare autenticità",checkAuthenticityLabelPending:"Verifica autenticità",checkRevokedStatusLabel:"Verificare stato revocato",checkRevokedStatusLabelPending:"Verifica stato revocato",checkExpiresDateLabel:"Verificare data di scadenza",checkExpiresDateLabelPending:"Verifica data di scadenza",controlVerificationMethodLabel:"Control Verification Method",controlVerificationMethodLabelPending:"Controlling Verification Method",retrieveVerificationMethodPublicKeyLabel:"Extract Public Key from DID Document",retrieveVerificationMethodPublicKeyLabelPending:"Extracting Public Key from DID Document",deriveIssuingAddressFromPublicKeyLabel:"Derive Issuing Address from Public Key",deriveIssuingAddressFromPublicKeyLabelPending:"Deriving Issuing Address from Public Key",compareIssuingAddressLabel:"Compare addresses",compareIssuingAddressLabelPending:"Comparing addresses",checkImagesIntegrityLabel:"Verify Images Integrity",checkImagesIntegrityLabelPending:"Verifying Images Integrity"},revocation:{preReason:"Motivo indicato:",reason:"Questo certificato è stato revocato dall'emittente."},success:{mocknet:{label:"Questo Blockcert simulato ha superato tutti i controlli.",description:"La modalità Mocknet è utilizzata solo dagli emittenti per testare il loro flusso di lavoro localmente. Questo Blockcert non è stato registrato su una blockchain e non dovrebbe essere considerato un Blockcert verificato."},blockchain:{label:"Verificato",description:"Questo è un certificato ${chain} valido.",linkText:"Vedi la transazione"},generic:{label:"Verificato",description:"The ${SIGNATURE_TYPE} signature of this document has been successfully verified."},multisign:{label:"Verificato",description:"All the signatures of this certificate have successfully verified."}},errors:{certificateNotValid:"Questo non è un certificato valido",couldNotConfirmTx:"Impossibile confermare la transazione",ensureHashesEqual:"L'hash calcolato non corrisponde all'hash remoto",ensureMerkleRootEqual:"La radice di Merkle non corrisponde all'hash remoto.",ensureNotExpired:"Questo certificato è scaduto.",ensureValidReceipt:"La ricevuta è malformata. C'è stato un problema nella navigazione dell'albero di Merkle nella ricevuta.",failedJsonLdNormalization:"Normalizzazione JSON-LD fallita",foundUnmappedFields:"Campi non mappati trovati durante la normalizzazione JSON-LD",identityErrorBaseMessage:"Issuer identity mismatch",deriveIssuingAddressFromPublicKey:"Unsupported blockchain for DID verification",controlVerificationMethod:"The identity document provided by the issuer does not match the verification method",retrieveVerificationMethodPublicKey:"The identity document provided by the issuer does not reference the verification method",compareIssuingAddress:"The provided verification method does not match the issuer identity",invalidIssuingAddressCreationTime:"The specified issuing address was created after the transaction occurred.",invalidIssuingAddressRevoked:"The specified issuing address was revoked by the issuer before the transaction occurred.",invalidIssuingAddressExpired:"The specified issuing address expired before the transaction occurred.",invalidIssuingAddressUnknown:"The address used to issue this Blockcerts does not belong to the claimed issuer.",getChain:"Il valore della catena non è stato riconosciuto",getIssuerProfile:"Impossibile ottenere il profilo dell'emittente",getRevokedAssertions:"Impossibile ottenere le asserzioni di revoca",getTransactionId:"Impossibile verificare questo certificato senza un ID transazione da confrontare.",invalidMerkleReceipt:"Ricevuta Merkle non valida. L'hash di prova non corrisponde alla radice di Merkle",invalidMerkleVersion:"Merkle version used for signature is incompatible with Blockcerts version.",isTransactionIdValid:"Impossibile verificare questo certificato senza un ID transazione da confrontare.",issuerProfileNotSet:"no issuer address given",issuerProfileInvalid:"retrieved file does not seem to be a valid profile",parseIssuerKeys:"Impossibile analizzare JSON dai dati di identificazione dell'emittente.",checkImagesIntegrity:"Image integrity verification proved that the content was modified after issuance."}},ja:{steps:{formatValidationLabel:"フォーマットの検証",formatValidationLabelPending:"フォーマットを検証しています",signatureVerificationLabel:"Proof Verification",signatureVerificationLabelPending:"Verifying Proof",identityVerificationLabel:"Identity verification",identityVerificationLabelPending:"Verifying identity",statusCheckLabel:"ステータスの確認",statusCheckLabelPending:"ステータスを確認しています"},subSteps:{getTransactionIdLabel:"取引IDの取得",getTransactionIdLabelPending:"取引IDを取得しています",computeLocalHashLabel:"ローカルハッシュの算出",computeLocalHashLabelPending:"ローカルハッシュを算出しています",fetchRemoteHashLabel:"リモートハッシュのフェッチ",fetchRemoteHashLabelPending:"リモートハッシュをフェッチしています",getIssuerProfileLabel:"発行者プロフィールの取得",getIssuerProfileLabelPending:"発行者プロフィールを取得しています",parseIssuerKeysLabel:"発行者の鍵のパース",parseIssuerKeysLabelPending:"発行者の鍵をパースしています",compareHashesLabel:"ハッシュの照合",compareHashesLabelPending:"ハッシュを照合しています",checkDocumentSignatureLabel:"Check document signature",checkDocumentSignatureLabelPending:"Checking document signature",checkMerkleRootLabel:"Merkle Rootの確認",checkMerkleRootLabelPending:"Merkle Rootを確認しています",checkReceiptLabel:"レシートの確認",checkReceiptLabelPending:"レシートを確認しています",checkAuthenticityLabel:"真正性の確認",checkAuthenticityLabelPending:"真正性を確認しています",checkRevokedStatusLabel:"取消ステータスの確認",checkRevokedStatusLabelPending:"取消ステータスを確認しています",checkExpiresDateLabel:"有効期限の確認",checkExpiresDateLabelPending:"有効期限を確認しています",controlVerificationMethodLabel:"Control Verification Method",controlVerificationMethodLabelPending:"Controlling Verification Method",retrieveVerificationMethodPublicKeyLabel:"Extract Public Key from DID Document",retrieveVerificationMethodPublicKeyLabelPending:"Extracting Public Key from DID Document",deriveIssuingAddressFromPublicKeyLabel:"Derive Issuing Address from Public Key",deriveIssuingAddressFromPublicKeyLabelPending:"Deriving Issuing Address from Public Key",compareIssuingAddressLabel:"Compare addresses",compareIssuingAddressLabelPending:"Comparing addresses",checkImagesIntegrityLabel:"Verify Images Integrity",checkImagesIntegrityLabelPending:"Verifying Images Integrity"},revocation:{preReason:"理由:",reason:"この証明書は発行者によって取り消されました。"},success:{mocknet:{label:"このMocknetの証明書は全てのチェックを通過しました。",description:"Mocknetの証明書はテスト用のものです。ブロックチェーンに記録されませんし、認証済みのBlockcertとして扱われません。"},blockchain:{label:"認証されました",description:"この証明書は有効な${chain}証明書です。",linkText:"取引を確認する"},generic:{label:"認証されました",description:"The ${SIGNATURE_TYPE} signature of this document has been successfully verified."},multisign:{label:"認証されました",description:"All the signatures of this certificate have successfully verified."}},errors:{certificateNotValid:"この証明書は有効ではありません",couldNotConfirmTx:"取引を確認できませんでした",ensureHashesEqual:"算出されたハッシュがリモートハッシュと一致しませんでした",ensureMerkleRootEqual:"Merkle rootがリモートハッシュと一致しませんでした",ensureNotExpired:"この証明書の有効期限が切れています",ensureValidReceipt:"レシートが異常です。レシート内のMerkle treeを辿る際に問題が発生しました。",failedJsonLdNormalization:"JSON-LDの正規化に失敗しました",foundUnmappedFields:"JSON-LDの正規化時にマップされていないフィールドを検出しました",identityErrorBaseMessage:"Issuer identity mismatch",deriveIssuingAddressFromPublicKey:"Unsupported blockchain for DID verification",controlVerificationMethod:"The identity document provided by the issuer does not match the verification method",retrieveVerificationMethodPublicKey:"The identity document provided by the issuer does not reference the verification method",compareIssuingAddress:"The provided verification method does not match the issuer identity",invalidIssuingAddressCreationTime:"The specified issuing address was created after the transaction occurred.",invalidIssuingAddressRevoked:"The specified issuing address was revoked by the issuer before the transaction occurred.",invalidIssuingAddressExpired:"The specified issuing address expired before the transaction occurred.",invalidIssuingAddressUnknown:"The address used to issue this Blockcerts does not belong to the claimed issuer.",getChain:"チェーンの値を認識できませんでした",getIssuerProfile:"発行者プロフィールを取得できません",getRevokedAssertions:"取消assertionsを取得できません",getTransactionId:"照合のための取引IDがないため、この証明書を認証できません。",invalidMerkleReceipt:"Merkleレシートが無効です。証明ハッシュがMerkle rootと一致しませんでした。",invalidMerkleVersion:"Merkle version used for signature is incompatible with Blockcerts version.",isTransactionIdValid:"照合するための取引IDがないため、この証明書を認証できません。",issuerProfileNotSet:"no issuer address given",issuerProfileInvalid:"retrieved file does not seem to be a valid profile",parseIssuerKeys:"発行者識別データからJSONをパースできません",checkImagesIntegrity:"Image integrity verification proved that the content was modified after issuance."}}};function In(e,t){return e&&t?Pn[Sn.locale]?Pn[Sn.locale][e]?Pn[Sn.locale][e][t]?Pn[Sn.locale][e][t]||"":"[missing locale item data]":"[missing locale group data]":"[missing locale data]":""}function xn(){return Object.keys(Pn)}var En=Object.freeze({__proto__:null,detectLocale:function(){return navigator.language||Ln.locale},ensureIsSupported:function(e){let t;const i=Gn.i18n.getSupportedLanguages().map((e=>e.toLowerCase()));if(t=i.includes(e.toLowerCase()),!t){const r=e.substr(0,2).toLowerCase(),n=i.map((e=>e.split("-")[0])).indexOf(r);t=n>-1,t&&(e=i[n])}return t||(e=Ln.locale),function(e){const t=e.split("-");return t.length>1?`${t[0].toLowerCase()}-${t[1].toUpperCase()}`:t[0].toLowerCase()}(e)},getComposedText:function(e,t){return In(e,t)},getSupportedLanguages:xn,getText:In});class _n{publicKey;created;revoked;expires;constructor(e,t,i,r){this.publicKey=e,this.created=t,this.revoked=i,this.expires=r}}class Tn{image;jobTitle;name;constructor(e,t,i){this.image=e,this.jobTitle=t,this.name=i}}class Rn extends Error{stepCode;constructor(e,t){super(t),this.stepCode=e}}const Cn=Pn[Sn.locale];var An,Mn;function Vn(){return{[An.formatValidation]:{code:An.formatValidation,label:Cn.steps.formatValidationLabel,labelPending:Cn.steps.formatValidationLabelPending,subSteps:[]},[An.proofVerification]:{code:An.proofVerification,label:Cn.steps.signatureVerificationLabel,labelPending:Cn.steps.signatureVerificationLabelPending,subSteps:[]},[An.identityVerification]:{code:An.identityVerification,label:Cn.steps.identityVerificationLabel,labelPending:Cn.steps.identityVerificationLabelPending,subSteps:[]},[An.statusCheck]:{code:An.statusCheck,label:Cn.steps.statusCheckLabel,labelPending:Cn.steps.statusCheckLabelPending,subSteps:[]}}}!function(e){e.formatValidation="formatValidation",e.proofVerification="proofVerification",e.identityVerification="identityVerification",e.statusCheck="statusCheck",e.final="final"}(An||(An={})),function(e){e.checkImagesIntegrity="checkImagesIntegrity",e.checkRevokedStatus="checkRevokedStatus",e.checkExpiresDate="checkExpiresDate",e.controlVerificationMethod="controlVerificationMethod"}(Mn||(Mn={}));var jn=Object.freeze({__proto__:null,get SUB_STEPS(){return Mn},get VerificationSteps(){return An},default:Vn,final:"final"});function On(e=[],t=[]){return e.filter((e=>t.includes(e))).filter(((e,t,i)=>i.indexOf(e)===t))}function Dn(e,t){const i=e.findIndex((e=>e===t));i>-1&&e.splice(i,1)}const Nn={[An.formatValidation]:[Mn.checkImagesIntegrity],[An.proofVerification]:[],[An.identityVerification]:[Mn.controlVerificationMethod],[An.statusCheck]:[Mn.checkRevokedStatus,Mn.checkExpiresDate]};function Un(e,t){return Nn[e].filter((e=>t.includes(e))).map((t=>Gn.verifier.convertToVerificationSubsteps(e,t)))}function Bn(e){const t=Vn();return Object.keys(t).map((i=>({...t[i],subSteps:Un(i,e)})))}var Hn=Object.freeze({__proto__:null,generateRevocationReason:function(e){return e=(e=e.trim()).length>0?` ${In("revocation","preReason")} ${e}${"."!==e.slice(-1)?".":""}`:"",`${In("revocation","reason")}${e}`},getChain:function(e,t){const i=t||null;if(i?.anchors){const e=i.anchors[0];if(e.chain){return function(e){const t=Object.keys(d).map((e=>d[e])).find((t=>t.signatureValue===e));if(void 0===t)throw new Error(In("errors","getChain"));return t}(e.chain)}}return d.bitcoin},getTransactionId:function(e={}){try{const{anchors:t}=e,i=t[0];if(i.sourceId)return i.sourceId;if("string"==typeof i){return i.split(":").pop()}}catch(e){throw new Rn("",In("errors","getTransactionId"))}},getTransactionLink:function(e,t){return e&&t?{rawTransactionLink:t.transactionTemplates.raw.replace(i,e),transactionLink:t.transactionTemplates.full.replace(i,e)}:null},getVerificationMap:function(e=!1,t=!1){const i=function(e,t){const i=Object.values(Mn);return e||Dn(i,Mn.controlVerificationMethod),t||Dn(i,Mn.checkImagesIntegrity),i}(e,t);return{verificationProcess:i,verificationMap:Bn(i)}}});var zn,Kn=Object.freeze({__proto__:null,isMockChain:function(e){if(e){const t="string"==typeof e?e:e.code;return!!Object.keys(d).some((e=>e===t))&&!!d[t].test}return!1}});!function(e){e.DEFAULT="standby",e.FAILURE="failure",e.STARTING="starting",e.SUCCESS="success"}(zn||(zn={}));class qn{code;label;labelPending;parentStep;status;constructor(e,t){this.code=t,this.label=In("subSteps",`${t}Label`),this.labelPending=In("subSteps",`${t}LabelPending`),this.parentStep=e,this.status=zn.DEFAULT}}function Fn(e){const t=Date.parse(e);if(t)return new Date(t);const i=function(e){let t=e.slice(0,-5).split(/\D/).map((function(e){return parseInt(e,10)||0}));t[1]-=1,t=new Date(Date.UTC.apply(Date,t));const i=e.slice(-5);let r=parseInt(i,10)/100;return"+"===i.slice(0,1)&&(r*=-1),t.setHours(t.getHours()+r),t}(e);return i||function(e){let t,i;const r=/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*)?)([zZ]|([+\-])(\d\d):?(\d\d))?$/.exec(e)??[];return r[1]?(t=r[1].split(/\D/).map((function(e){return parseInt(e,10)||0})),t[1]-=1,t=new Date(Date.UTC.apply(Date,t)),t.getDate()?(r[5]&&(i=parseInt(r[5],10)/100*60,r[6]&&(i+=parseInt(r[6],10)),"+"===r[4]&&(i*=-1),i&&t.setUTCMinutes(t.getUTCMinutes()+i)),t):null):null}(e)}function $n(e){return""===e?0:Fn(`${e}`).getTime()}function Jn(e,t=null){const i=e.created?$n(e.created):null,r=e.revoked?$n(e.revoked):null,n=e.expires?$n(e.expires):null;let o=t;if(!t){o=(e.id||e.publicKey).replace("ecdsa-koblitz-pubkey:","")}return new _n(o,i,r,n)}var Yn=Object.freeze({__proto__:null,convertToVerificationSubsteps:function(e,t){return new qn(e,t)},findVerificationSubstep:function(e,t,i=""){for(let r=0;r<t.length;r++){let n=t[r].subSteps.find((t=>t.code===e));if(n&&""===i)return n;if(t[r].suites?.length)for(let o=0;o<t[r].suites.length;o++){const s=t[r].suites[o];if(n=s.subSteps.find((t=>t.code===e)),n&&s.proofType===i)return n}}},getIssuerProfile:async function(e){const t=In("errors","getIssuerProfile");if(!e)throw new Rn("getIssuerProfile",`${t} - ${In("errors","issuerProfileNotSet")}`);if("object"==typeof e&&(e=e.id),console.log(e),!function(e){return/^(ftp|http|https):\/\/[^ "]+$/.test(e)}(e))throw new Rn("getIssuerProfile",`${t} - ${In("errors","issuerProfileNotSet")}`);const i=JSON.parse(await fr({url:e}).catch((()=>{throw new Rn("getIssuerProfile",t)})));if(!function(e){const t=["issuer","profile"],{type:i}=e;return!!i&&(Array.isArray(i)?i.some((e=>t.includes(e.toLowerCase()))):t.includes(i.toLowerCase()))}(i)&&!function(e){const{issuer_key:t,revocation_key:i,issuerKeys:r,revocationKeys:n}=e;return!(!t||!i)||!(!r||!n)}(i))throw new Rn("getIssuerProfile",`${t} - ${In("errors","issuerProfileInvalid")}`);return i},getRevokedAssertions:async function(e,t){if(!e)return[];const i=In("errors","getRevokedAssertions");t&&(e=function(e,t,i){const r=e.includes("?")?"&":"?";return`${e}${r}${t}=${i}`}(e,"assertionId",encodeURIComponent(t)));try{const t=await fr({url:e});return JSON.parse(t).revokedAssertions??[]}catch(e){throw console.error(e),new Rn(Mn.checkRevokedStatus,i)}},lookForTx:function(e){return Hr(this,arguments,void 0,(function*({transactionId:e,chain:t,explorerAPIs:i=[]}){const r=Ur(i),n=function({defaultAPIs:e,customAPIs:t}){const i=[e];if(null==t?void 0:t.length){const e=t[0].priority;i.splice(e,0,t)}const r=e.concat(t).length;if(l>r)throw new Error("Invalid application configuration; check the CONFIG.MinimumBlockchainExplorers configuration value");return i}({defaultAPIs:zr(t,r),customAPIs:r.custom});return yield qr(n,0,e,t)}))},parseIssuerKeys:function(e){try{const t={};if("@context"in e){const i=e.publicKey??e.publicKeys;for(let e=0;e<i.length;e++){const r=Jn(i[e]);t[r.publicKey]=r}}else{const i=Jn({},(e.issuerKeys??[])[0].key);t[i.publicKey]=i}return t}catch(e){throw console.error(e),new Rn("parseIssuerKeys",In("errors","parseIssuerKeys"))}},parseRevocationKey:function(e){return e&&Object.prototype.hasOwnProperty.call(e,"revocationKeys")&&e.revocationKeys.length>0?e.revocationKeys[0].key:""}}),Gn={certificates:Hn,chains:Kn,i18n:En,verifier:Yn};function Xn(t){"string"==typeof t&&(t=[t]);const i=(r=function(t){return t.filter(e)}(t),r.find((e=>e.toLowerCase().indexOf("blockcerts")>0)));var r;if(!i)return{version:o.V3_0,versionNumber:3};const n=i.split("/").filter((e=>""!==e)),s=Object.keys(Qn),a=parseInt(s.filter((e=>function(e,t){return e.some((e=>e.includes(`v${t}`)||e.includes(`${t}.`)))}(n,e.toString())))[0],10);let c;switch(a){case 1:c=o.V1_2;break;case 2:c=o.V2_0;break;case 3:if(i.includes("-alpha")){c=o.V3_0_alpha;break}if(i.includes("-beta")){c=o.V3_0_beta;break}c=o.V3_0}return{versionNumber:a,version:c}}function Wn(){throw new Error("The verification of a Blockcerts v2 or v3 is not supported by this library which is only a legacy support for Blockcerts v1. Please use @blockcerts/cert-verifier-js for modern versions.")}const Qn={1:async function(e){const t=e.certificate||e.document.certificate,i=e.recipient||e.document.recipient,r=e.document.assertion,n=e.receipt,s=void 0===n?o.V1_1:o.V1_2;let{image:a,description:c,issuer:d,subtitle:u}=t;const l=i.publicKey,h=r.expires,p=r.uid,f=r.issuedOn,g=r.metadataJson,m=`${i.givenName} ${i.familyName}`,y=r.id,b=i.revocationKey??null,v=d.image,w=e.document.signature,k=e.document?.assertion?.["image:signature"],L=function(e,t){const i=[];if(t===o.V1_1||t===o.V1_2)if(Array.isArray(e))for(const t in e){const r=e[t],n="jobTitle"in r?r.jobTitle:null,o="name"in r?r.name:null,s=new Tn(r.image,n,o);i.push(s)}else{const t=new Tn(e,null,null);i.push(t)}else for(const t in e){const r=e[t],n=new Tn(r.image,r.jobTitle,r.name);i.push(n)}return i}(k,s),S=await Gn.verifier.getIssuerProfile(d.id);return"object"==typeof u&&(u=u.display?u.content:""),{certificateImage:a,description:c,expires:h,id:p,issuedOn:f,issuer:S,metadataJson:g,name:t.title||t.name,publicKey:l,receipt:n,recipientFullName:m,recordLink:y,revocationKey:b,sealImage:v,signature:w,signatureImage:L,subtitle:u,version:s}},2:Wn,3:Wn};var Zn;!function(e){e.MerkleProof2017="MerkleProof2017",e.ChainpointSHA256v2="ChainpointSHA256v2"}(Zn||(Zn={}));class eo{expires;id;issuer;revocationKey;documentToVerify;explorerAPIs;txData;_stepsStatuses=[];verificationSteps;supportedVerificationSuites={[Zn.MerkleProof2017]:null,[Zn.ChainpointSHA256v2]:null};proofVerifiers=[];verificationProcess;proofMap;constructor({certificateJson:e,expires:t,id:i,issuer:r,revocationKey:n,explorerAPIs:o}){this.expires=t,this.id=i,this.issuer=r,this.revocationKey=n,this.explorerAPIs=o,this.documentToVerify=Object.assign({},e)}getVerificationSteps(){return this.verificationSteps}getSignersData(){return this.proofVerifiers.map((e=>({signingDate:e.getSigningDate(),signatureSuiteType:e.type,issuerPublicKey:e.getIssuerPublicKey(),issuerName:e.getIssuerName(),issuerProfileDomain:e.getIssuerProfileDomain(),issuerProfileUrl:e.getIssuerProfileUrl(),chain:e.getChain?.(),transactionId:e.getTransactionIdString?.(),transactionLink:e.getTransactionLink?.(),rawTransactionLink:e.getRawTransactionLink?.()})))}async init(){await this.instantiateProofVerifiers(),this.prepareVerificationProcess()}async verifyProof(){for(let e=0;e<this.proofVerifiers.length;e++)await this.proofVerifiers[e].verifyProof()}async verify(e=()=>{}){this._stepCallback=e,this._stepsStatuses=[],await this.verifyProof();for(const e of this.verificationProcess){if(!this[e])return void console.error("verification logic for",e,"not implemented");await this[e]()}const t=this._stepsStatuses.find((e=>e.status===zn.FAILURE));return t?this._failed(t):this._succeed()}getRevocationListUrl(){return this.issuer.revocationList}getProofTypes(){const e=[];return this.proofMap.forEach((t=>{let{type:i}=t;"ChainedProof2021"===i&&(i=t.chainedProofType),Array.isArray(i)&&(i=i[0]),e.push(i)})),e}getProofMap(e){const t=new Map;return"proof"in e?Array.isArray(e.proof)?e.proof.forEach(((e,i)=>t.set(i,e))):t.set(0,e.proof):"signature"in e?t.set(0,e.signature):"receipt"in e&&t.set(0,e.receipt),t}async instantiateProofVerifiers(){this.proofMap=this.getProofMap(this.documentToVerify);const e=this.getProofTypes(),t=function(e=[],t=[]){return t.filter((t=>!e.includes(t)))}(Object.keys(this.supportedVerificationSuites),e);if(t.length)throw new Error(`No support for proof verification of type: ${t.join(", ")}`);await this.loadRequiredVerificationSuites(e),this.proofMap.forEach(((t,i)=>{const r={executeStep:this.executeStep.bind(this),document:this.documentToVerify,proof:t,explorerAPIs:this.explorerAPIs,issuer:this.issuer};this.proofVerifiers.push(new this.supportedVerificationSuites[e[i]](r))}));for(const e of this.proofVerifiers)await e.init()}async loadRequiredVerificationSuites(e){if(e.includes(Zn.MerkleProof2017)||e.includes(Zn.ChainpointSHA256v2)){const{default:e}=await import("./MerkleProof2017-k2qjvxCH-DrRpsLHG.js");this.supportedVerificationSuites.MerkleProof2017=e,this.supportedVerificationSuites.ChainpointSHA256v2=e}}prepareVerificationProcess(){const e=Gn.certificates.getVerificationMap();this.verificationSteps=e.verificationMap,this.verificationProcess=e.verificationProcess,this.registerSignatureVerificationSteps(),this.verificationSteps=this.verificationSteps.filter((e=>e.subSteps?.length>0||e.suites?.some((e=>e.subSteps.length>0))))}registerSignatureVerificationSteps(){const e=An.proofVerification;this.verificationSteps.find((t=>t.code===e)).suites=this.getSuiteSubsteps(e)}getSuiteSubsteps(e){const t={[An.proofVerification]:"getProofVerificationSteps"};return this.proofVerifiers.map((i=>({proofType:i.type,subSteps:i[t[e]](e)})))}async executeStep(e,t,i){if(!this._isFailing()){e&&this._updateStatusCallback(e,zn.STARTING,i);try{const r=await t();return e&&(this._updateStatusCallback(e,zn.SUCCESS,i),this._stepsStatuses.push({code:e,status:zn.SUCCESS})),r}catch(t){console.error(t),e&&(this._updateStatusCallback(e,zn.FAILURE,i,t.message),this._stepsStatuses.push({code:e,message:t.message,status:zn.FAILURE}))}}}_stepCallback(e){}async checkRevokedStatus(){const e=this.getRevocationListUrl();if(!e)return console.warn("No revocation list url was set on the issuer."),void await this.executeStep(Mn.checkRevokedStatus,(()=>!0));const t=await this.executeStep(null,(async()=>await Gn.verifier.getRevokedAssertions(e,this.id))),{default:i}=await import("./ensureNotRevoked-DGZuNktg-B4uNuqLX.js");await this.executeStep(Mn.checkRevokedStatus,(()=>{i(t,this.id)}))}async checkExpiresDate(){await this.executeStep(Mn.checkExpiresDate,(()=>{!function(e=null){if(!e)return;const t=$n(e);if((new Date).getTime()>=t)throw new Rn(Mn.checkExpiresDate,In("errors","ensureNotExpired"))}(this.expires)}))}findStepFromVerificationProcess(e,t){return Gn.verifier.findVerificationSubstep(e,this.verificationSteps,t)}_failed(e){const{message:t}=e;return this._setFinalStep({status:zn.FAILURE,message:t})}_isFailing(){return this._stepsStatuses.some((e=>e.status===zn.FAILURE))}_succeed(){let e;return 1===this.proofVerifiers.length&&(e=this.proofVerifiers[0].type.includes("MerkleProof")?Gn.chains.isMockChain(this.proofVerifiers[0].getChain())?Gn.i18n.getComposedText("success","mocknet"):Gn.i18n.getComposedText("success","blockchain"):{...Gn.i18n.getComposedText("success","generic"),description:Gn.i18n.getComposedText("success","generic").description.replace("${SIGNATURE_TYPE}",this.proofVerifiers[0].type)}),this.proofVerifiers.length>1&&(e=Gn.i18n.getComposedText("success","multisign")),this._setFinalStep({status:zn.SUCCESS,message:e})}_setFinalStep({status:e,message:t}){return{code:An.final,status:e,message:t}}_updateStatusCallback(e,t,i="",r=""){if(null!=e){const n=this.findStepFromVerificationProcess(e,i);if(void 0===n)return void console.warn("step with code",e,"was not found for suite",i,"ignoring but you should not.");const o={code:e,status:t,parentStep:n.parentStep,label:n.labelPending};r&&(o.errorMessage=r),this._stepCallback(o)}}}var to={exports:{}};!function(e,t){var i="__lodash_hash_undefined__",r=9007199254740991,n="[object Arguments]",o="[object Boolean]",s="[object Date]",a="[object Function]",c="[object GeneratorFunction]",d="[object Map]",u="[object Number]",l="[object Object]",h="[object Promise]",p="[object RegExp]",f="[object Set]",g="[object String]",m="[object Symbol]",y="[object WeakMap]",b="[object ArrayBuffer]",v="[object DataView]",w="[object Float32Array]",k="[object Float64Array]",L="[object Int8Array]",S="[object Int16Array]",P="[object Int32Array]",I="[object Uint8Array]",x="[object Uint8ClampedArray]",E="[object Uint16Array]",_="[object Uint32Array]",T=/\w*$/,R=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,A={};A[n]=A["[object Array]"]=A[b]=A[v]=A[o]=A[s]=A[w]=A[k]=A[L]=A[S]=A[P]=A[d]=A[u]=A[l]=A[p]=A[f]=A[g]=A[m]=A[I]=A[x]=A[E]=A[_]=!0,A["[object Error]"]=A[a]=A[y]=!1;var M="object"==typeof Te&&Te&&Te.Object===Object&&Te,V="object"==typeof self&&self&&self.Object===Object&&self,j=M||V||Function("return this")(),O=t&&!t.nodeType&&t,D=O&&e&&!e.nodeType&&e,N=D&&D.exports===O;function U(e,t){return e.set(t[0],t[1]),e}function B(e,t){return e.add(t),e}function H(e,t,i,r){for(var n=-1,o=e?e.length:0;++n<o;)i=t(i,e[n],n,e);return i}function z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function K(e){var t=-1,i=Array(e.size);return e.forEach((function(e,r){i[++t]=[r,e]})),i}function q(e,t){return function(i){return e(t(i))}}function F(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i}var $,J=Array.prototype,Y=Function.prototype,G=Object.prototype,X=j["__core-js_shared__"],W=($=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",Q=Y.toString,Z=G.hasOwnProperty,ee=G.toString,te=RegExp("^"+Q.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ie=N?j.Buffer:void 0,re=j.Symbol,ne=j.Uint8Array,oe=q(Object.getPrototypeOf,Object),se=Object.create,ae=G.propertyIsEnumerable,ce=J.splice,de=Object.getOwnPropertySymbols,ue=ie?ie.isBuffer:void 0,le=q(Object.keys,Object),he=Ne(j,"DataView"),pe=Ne(j,"Map"),fe=Ne(j,"Promise"),ge=Ne(j,"Set"),me=Ne(j,"WeakMap"),ye=Ne(Object,"create"),be=Ke(he),ve=Ke(pe),we=Ke(fe),ke=Ke(ge),Le=Ke(me),Se=re?re.prototype:void 0,Pe=Se?Se.valueOf:void 0;function Ie(e){var t=-1,i=e?e.length:0;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,i=e?e.length:0;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Ee(e){var t=-1,i=e?e.length:0;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function _e(e){this.__data__=new xe(e)}function Re(e,t){var i=Fe(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&$e(e)}(e)&&Z.call(e,"callee")&&(!ae.call(e,"callee")||ee.call(e)==n)}(e)?function(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r}(e.length,String):[],r=i.length,o=!!r;for(var s in e)!Z.call(e,s)||o&&("length"==s||He(s,r))||i.push(s);return i}function Ce(e,t,i){var r=e[t];Z.call(e,t)&&qe(r,i)&&(void 0!==i||t in e)||(e[t]=i)}function Ae(e,t){for(var i=e.length;i--;)if(qe(e[i][0],t))return i;return-1}function Me(e,t,i,r,h,y,R){var C;if(r&&(C=y?r(e,h,y,R):r(e)),void 0!==C)return C;if(!Ge(e))return e;var M=Fe(e);if(M){if(C=function(e){var t=e.length,i=e.constructor(t);t&&"string"==typeof e[0]&&Z.call(e,"index")&&(i.index=e.index,i.input=e.input);return i}(e),!t)return function(e,t){var i=-1,r=e.length;t||(t=Array(r));for(;++i<r;)t[i]=e[i];return t}(e,C)}else{var V=Be(e),j=V==a||V==c;if(Je(e))return function(e,t){if(t)return e.slice();var i=new e.constructor(e.length);return e.copy(i),i}(e,t);if(V==l||V==n||j&&!y){if(z(e))return y?e:{};if(C=function(e){return"function"!=typeof e.constructor||ze(e)?{}:(t=oe(e),Ge(t)?se(t):{});var t}(j?{}:e),!t)return function(e,t){return Oe(e,Ue(e),t)}(e,function(e,t){return e&&Oe(t,Xe(t),e)}(C,e))}else{if(!A[V])return y?e:{};C=function(e,t,i,r){var n=e.constructor;switch(t){case b:return je(e);case o:case s:return new n(+e);case v:return function(e,t){var i=t?je(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,r);case w:case k:case L:case S:case P:case I:case x:case E:case _:return function(e,t){var i=t?je(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}(e,r);case d:return function(e,t,i){var r=t?i(K(e),!0):K(e);return H(r,U,new e.constructor)}(e,r,i);case u:case g:return new n(e);case p:return function(e){var t=new e.constructor(e.source,T.exec(e));return t.lastIndex=e.lastIndex,t}(e);case f:return function(e,t,i){var r=t?i(F(e),!0):F(e);return H(r,B,new e.constructor)}(e,r,i);case m:return a=e,Pe?Object(Pe.call(a)):{}}var a}(e,V,Me,t)}}R||(R=new _e);var O=R.get(e);if(O)return O;if(R.set(e,C),!M)var D=i?function(e){return function(e,t,i){var r=t(e);return Fe(e)?r:function(e,t){for(var i=-1,r=t.length,n=e.length;++i<r;)e[n+i]=t[i];return e}(r,i(e))}(e,Xe,Ue)}(e):Xe(e);return function(e,t){for(var i=-1,r=e?e.length:0;++i<r&&!1!==t(e[i],i,e););}(D||e,(function(n,o){D&&(n=e[o=n]),Ce(C,o,Me(n,t,i,r,o,e,R))})),C}function Ve(e){return!(!Ge(e)||(t=e,W&&W in t))&&(Ye(e)||z(e)?te:R).test(Ke(e));var t}function je(e){var t=new e.constructor(e.byteLength);return new ne(t).set(new ne(e)),t}function Oe(e,t,i,r){i||(i={});for(var n=-1,o=t.length;++n<o;){var s=t[n];Ce(i,s,e[s])}return i}function De(e,t){var i,r,n=e.__data__;return("string"==(r=typeof(i=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?n["string"==typeof t?"string":"hash"]:n.map}function Ne(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return Ve(i)?i:void 0}Ie.prototype.clear=function(){this.__data__=ye?ye(null):{}},Ie.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ie.prototype.get=function(e){var t=this.__data__;if(ye){var r=t[e];return r===i?void 0:r}return Z.call(t,e)?t[e]:void 0},Ie.prototype.has=function(e){var t=this.__data__;return ye?void 0!==t[e]:Z.call(t,e)},Ie.prototype.set=function(e,t){return this.__data__[e]=ye&&void 0===t?i:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,i=Ae(t,e);return!(i<0)&&(i==t.length-1?t.pop():ce.call(t,i,1),!0)},xe.prototype.get=function(e){var t=this.__data__,i=Ae(t,e);return i<0?void 0:t[i][1]},xe.prototype.has=function(e){return Ae(this.__data__,e)>-1},xe.prototype.set=function(e,t){var i=this.__data__,r=Ae(i,e);return r<0?i.push([e,t]):i[r][1]=t,this},Ee.prototype.clear=function(){this.__data__={hash:new Ie,map:new(pe||xe),string:new Ie}},Ee.prototype.delete=function(e){return De(this,e).delete(e)},Ee.prototype.get=function(e){return De(this,e).get(e)},Ee.prototype.has=function(e){return De(this,e).has(e)},Ee.prototype.set=function(e,t){return De(this,e).set(e,t),this},_e.prototype.clear=function(){this.__data__=new xe},_e.prototype.delete=function(e){return this.__data__.delete(e)},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var i=this.__data__;if(i instanceof xe){var r=i.__data__;if(!pe||r.length<199)return r.push([e,t]),this;i=this.__data__=new Ee(r)}return i.set(e,t),this};var Ue=de?q(de,Object):function(){return[]},Be=function(e){return ee.call(e)};function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||C.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||G)}function Ke(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qe(e,t){return e===t||e!=e&&t!=t}(he&&Be(new he(new ArrayBuffer(1)))!=v||pe&&Be(new pe)!=d||fe&&Be(fe.resolve())!=h||ge&&Be(new ge)!=f||me&&Be(new me)!=y)&&(Be=function(e){var t=ee.call(e),i=t==l?e.constructor:void 0,r=i?Ke(i):void 0;if(r)switch(r){case be:return v;case ve:return d;case we:return h;case ke:return f;case Le:return y}return t});var Fe=Array.isArray;function $e(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Ye(e)}var Je=ue||function(){return!1};function Ye(e){var t=Ge(e)?ee.call(e):"";return t==a||t==c}function Ge(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Xe(e){return $e(e)?Re(e):function(e){if(!ze(e))return le(e);var t=[];for(var i in Object(e))Z.call(e,i)&&"constructor"!=i&&t.push(i);return t}(e)}e.exports=function(e){return Me(e,!0,!0)}}(to,to.exports);var io=Re(to.exports);function ro(e){return io(e)}function no(e){return e===Object(e)}var oo=Object.freeze({__proto__:null,BLOCKCHAINS:d,CERTIFICATE_VERSIONS:o,Certificate:class{certificateImage;certificateJson;description;display;expires;explorerAPIs=[];id;isFormatValid;issuedOn;issuer;locale;metadataJson;name;options;recipientFullName;recordLink;revocationKey;sealImage;signature;signatureImage;signers=[];subtitle;verificationSteps;verifier;constructor(e,t={}){if(this._setOptions(t),"object"!=typeof e)try{e=JSON.parse(e)}catch(e){throw new Error(Gn.i18n.getText("errors","certificateNotValid"))}this.certificateJson=ro(e)}async init(){await this.parseJson(this.certificateJson),this.verifier=new eo({certificateJson:this.certificateJson,expires:this.expires,id:this.id,issuer:this.issuer,revocationKey:this.revocationKey,explorerAPIs:ro(this.explorerAPIs)}),await this.verifier.init(),this.verificationSteps=this.verifier.getVerificationSteps()}async verify(e){const t=await this.verifier.verify(e);return this.setSigners(),t}async parseJson(e){const t=await async function(e){try{const t=Xn(e["@context"]),i=await Qn[t.versionNumber](e);return i.isFormatValid=!0,i}catch(e){return console.error(e),{isFormatValid:!1,error:e.message}}}(e);if(!t.isFormatValid)throw new Error(t.error);await this._setProperties(t)}setSigners(){this.signers=this.verifier.getSignersData()}_setOptions(e){this.options=Object.assign({},Ln,e),this.locale=Gn.i18n.ensureIsSupported("auto"===this.options.locale?Gn.i18n.detectLocale():this.options.locale),this.explorerAPIs=this.options.explorerAPIs??[],Sn.locale=this.locale}async _setProperties({certificateImage:e,description:t,display:i,expires:r,id:n,isFormatValid:o,issuedOn:s,issuer:a,metadataJson:c,name:d,recipientFullName:u,recordLink:l,revocationKey:h,sealImage:p,signature:f,signatureImage:g,subtitle:m}){this.isFormatValid=o,this.certificateImage=e,this.description=t,this.expires=r,this.id=n,this.issuedOn=s,this.issuer=a,this.metadataJson=c,this.name=d,this.recipientFullName=u,this.recordLink=l,this.revocationKey=h,this.sealImage=p,this.signature=f,this.signatureImage=g,this.subtitle=m,this.display=i}},STEPS:jn,SignatureImage:Tn,get VERIFICATION_STATUSES(){return zn},VerificationSubstep:qn,getSupportedLanguages:xn,retrieveBlockcertsVersion:Xn});export{Mn as S,Rn as V,Re as a,$n as b,Te as c,Gn as d,Ce as e,On as f,In as g,oo as h,no as i,Ie as n,wn as p,Dn as r};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{d as e,e as t}from"./index-DZLKRa_V-D_IQzjvG.js";import{d as r}from"./base64url-Cy03LJLt-vkTPfQOh.js";import{g as i}from"./main.js";import{r as n}from"./elliptic-mDX7fQQx-BpaNaVm0.js";
|
|
2
|
-
/*!
|
|
3
|
-
* Copyright (c) 2023 Digital Bazaar, Inc. All rights reserved.
|
|
4
|
-
*/
|
|
5
|
-
const c="ECDSA",u=!0,y="https://w3id.org/security/suites/ecdsa-2019/v1",o="https://w3id.org/security/multikey/v1",s="z",a=new Uint8Array([231,1]),l=new Uint8Array([128,36]),p=new Uint8Array([129,36]),w=new Uint8Array([130,36]),b=new Uint8Array([129,38]),f=new Uint8Array([134,38]),k=new Uint8Array([135,38]),K=new Uint8Array([136,38]),m="P-256",d="P-384",h="P-521",g="K-256",v="SHA-256",A="SHA-384",M="SHA-512",E=globalThis.crypto,U=globalThis.CryptoKey??E.CryptoKey;function C({curve:e}){if(e===m||e===g)return v;if(e===d)return A;if(e===h)return M;throw new TypeError(`Unsupported curve "${e}".`)}
|
|
6
|
-
/*!
|
|
7
|
-
* Copyright (c) 2022-2023 Digital Bazaar, Inc. All rights reserved.
|
|
8
|
-
*/function j({publicMultikey:e}){if(e[0]===l[0]&&e[1]===l[1])return m;if(e[0]===p[0]&&e[1]===p[1])return d;if(e[0]===w[0]&&e[1]===w[1])return h;if(e[0]===a[0]&&e[1]===a[1])return g;throw new TypeError("Unsupported public multikey header.")}function x({secretMultikey:e}){if(e[0]===f[0]&&e[1]===f[1])return m;if(e[0]===k[0]&&e[1]===k[1])return d;if(e[0]===K[0]&&e[1]===K[1])return h;if(e[0]===b[0]&&e[1]===b[1])return g;throw new TypeError("Unsupported secret multikey header.")}function T({curve:e}){if(e===m||e===g)return 32;if(e===d)return 48;if(e===h)return 66;throw new TypeError(`Unsupported curve "${e}".`)}var P=i(n());
|
|
9
|
-
/*!
|
|
10
|
-
* Copyright (c) 2022-2023 Digital Bazaar, Inc. All rights reserved.
|
|
11
|
-
*/
|
|
12
|
-
const D=new Map([[m,{secret:new Uint8Array([48,103,2,1,0,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,4,77,48,75,2,1,1,4,32]),public:new Uint8Array([161,36,3,34,0])}],[d,{secret:new Uint8Array([48,129,132,2,1,0,48,16,6,7,42,134,72,206,61,2,1,6,5,43,129,4,0,34,4,109,48,107,2,1,1,4,48]),public:new Uint8Array([161,52,3,50,0])}],[h,{secret:new Uint8Array([48,129,170,2,1,0,48,16,6,7,42,134,72,206,61,2,1,6,5,43,129,4,0,35,4,129,146,48,129,143,2,1,1,4,66]),public:new Uint8Array([161,70,3,68,0])}],[g,{secret:new Uint8Array([48,129,132,2,1,0,48,16,6,7,42,134,72,206,61,2,1,6,5,43,129,4,0,10,4,109,48,107,2,1,1,4,32]),public:new Uint8Array([161,68,3,66,0])}]]),S=new Map([[m,new Uint8Array([48,57,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,3,34,0])],[d,new Uint8Array([48,70,48,16,6,7,42,134,72,206,61,2,1,6,5,43,129,4,0,34,3,50,0])],[h,new Uint8Array([48,88,48,16,6,7,42,134,72,206,61,2,1,6,5,43,129,4,0,35,3,68,0])],[g,new Uint8Array([48,86,48,16,6,7,42,134,72,206,61,2,1,6,5,43,129,4,0,10,3,66,0])]]);function $(e){const t=new P.ec("secp256k1");return Uint8Array.from(t.keyFromPublic(e).getPublic(!1,"array"))}async function O({id:t,controller:r,secretKeyMultibase:i,publicKeyMultibase:n,keyAgreement:y=!1}){if(!n)throw new TypeError('The "publicKeyMultibase" property is required.');const o={id:t,controller:r};if(!n||"string"!=typeof n||n[0]!==s)throw new TypeError('"publicKeyMultibase" must be a multibase, base58-encoded string.');const a=e(n.slice(1)),l={name:y?"ECDH":c,namedCurve:j({publicMultikey:a})},p=function({publicMultikey:e}){const t=j({publicMultikey:e});let r=e.subarray(2);t===g&&(r=$(r));return function({curve:e,publicKey:t}){const r=S.get(e),i=new Uint8Array(r.length+t.length);let n=0;return i.set(r,n),n+=r.length,i.set(t,n),i}
|
|
13
|
-
/*!
|
|
14
|
-
* Copyright (c) 2023 Digital Bazaar, Inc. All rights reserved.
|
|
15
|
-
*/({curve:t,publicKey:r})}({publicMultikey:a}),w=y?[]:["verify"];if(l.namedCurve===g){const{Crypto:e}=await import("./webcrypto.es-DptGOl2T-BnVhHKeM.js"),t=new e;o.publicKey=await t.subtle.importKey("spki",p,l,u,w)}else o.publicKey=await E.subtle.importKey("spki",p,l,u,w);if(i){if("string"!=typeof i||i[0]!==s)throw new TypeError('"secretKeyMultibase" must be a multibase, base58-encoded string.');const t=e(i.slice(1));!function({secretMultikey:e,publicMultikey:t}){const r=j({publicMultikey:t}),i=x({secretMultikey:e});if(r!==i)throw new Error(`Public key curve ('${r}') does not match secret key curve ('${i}').`)}({secretMultikey:t,publicMultikey:a});const r=function({secretMultikey:e,publicMultikey:t}){const r=x({secretMultikey:e}),i=e.subarray(2),n=t.subarray(2);return function({curve:e,secretKey:t,publicKey:r}){const i=D.get(e);if(!i)throw new Error(`Unsupported curve "${e}".`);e===g&&(r=$(r));const n=new Uint8Array(i.secret.length+t.length+i.public.length+r.length);let c=0;return n.set(i.secret,c),c+=i.secret.length,n.set(t,c),c+=t.length,n.set(i.public,c),c+=i.public.length,n.set(r,c),n}({curve:r,secretKey:i,publicKey:n})}({secretMultikey:t,publicMultikey:a}),n=y?["deriveBits"]:["sign"];if(l.namedCurve===g){const{Crypto:e}=await import("./webcrypto.es-DptGOl2T-BnVhHKeM.js"),t=new e;o.secretKey=await t.subtle.importKey("pkcs8",r,l,u,n)}else o.secretKey=await E.subtle.importKey("pkcs8",r,l,u,n)}return o}function G({jwk:e}={}){if("EC"!==e?.kty)throw new TypeError('"jwk.kty" must be "EC".');const{crv:i}=e,n=T({curve:i}),c=r(e.x),u=r(e.y),y=new Uint8Array(2+(n+1));!function({curve:e,buffer:t}){if(e===m)t[0]=l[0],t[1]=l[1];else if(e===d)t[0]=p[0],t[1]=p[1];else if(e===h)t[0]=w[0],t[1]=w[1];else{if(e!==g)throw new TypeError(`Unsupported curve "${e}".`);t[0]=a[0],t[1]=a[1]}}({curve:i,buffer:y});const o=u[u.length-1]%2==0;y[2]=o?2:3,y.set(c,y.length-c.length);return s+t(y)}function H({jwk:e}={}){if("EC"!==e?.kty)throw new TypeError('"jwk.kty" must be "EC".');const{crv:i}=e,n=T({curve:i}),c=r(e.d),u=new Uint8Array(2+n);!function({curve:e,buffer:t}){if(e===m)t[0]=f[0],t[1]=f[1];else if(e===d)t[0]=k[0],t[1]=k[1];else if(e===h)t[0]=K[0],t[1]=K[1];else{if(e!==g)throw new TypeError(`Unsupported curve "${e}".`);t[0]=b[0],t[1]=b[1]}}({curve:e.crv,buffer:u}),u.set(c,u.length-c.length);return s+t(u)}const q=new Set(["EcdsaSecp256r1VerificationKey2019","EcdsaSecp384r1VerificationKey2019","EcdsaSecp521r1VerificationKey2019","EcdsaSecp256k1VerificationKey2019"]);async function V({keyPair:e}){if(!q.has(e.type))throw new TypeError(`Unsupported key type "${e.type}".`);if(e["@context"]||(e["@context"]=y),!function({document:e,contextUrl:t}){const r=e["@context"];return r===t||Array.isArray(r)&&r.includes(t)}
|
|
16
|
-
/*!
|
|
17
|
-
* Copyright (c) 2022-2023 Digital Bazaar, Inc. All rights reserved.
|
|
18
|
-
*/({document:e,contextUrl:y}))throw new TypeError(`Context not supported "${e["@context"]}".`);return{"@context":o,id:e.id,type:"Multikey",controller:e.controller,publicKeyMultibase:e.publicKeyMultibase,secretKeyMultibase:e.secretKeyMultibase}}async function B(e,t={}){"boolean"==typeof t&&(t={keyAgreement:t});const{keyAgreement:r}=t;let i={...e};if("Multikey"!==i.type){if(i.publicKeyJwk)return async function({jwk:e,secretKey:t=!1}={}){const r={"@context":o,type:"Multikey",publicKeyMultibase:G({jwk:e})};t&&e.d&&(r.secretKeyMultibase=H({jwk:e}));const i=!e.key_ops||e.key_ops.includes("deriveBits");return B(r,i)}({jwk:i.publicKeyJwk,secretKey:!1});if(i.type)return i=await V({keyPair:i}),L({keyPair:i,keyAgreement:r})}return i.type||(i.type="Multikey"),i["@context"]||(i["@context"]=o),i.controller&&!i.id&&(i.id=`${e.controller}#${e.publicKeyMultibase}`),function(e){if(!e||"object"!=typeof e)throw new TypeError('"key" must be an object.');if("Multikey"!==e.type)throw new TypeError('"key" must be a Multikey with type "Multikey".');if(!(e["@context"]===o||Array.isArray(e["@context"])&&e["@context"].includes(o)))throw new TypeError(`"key" must be a Multikey with context "${o}".`)}(i),L({keyPair:i,keyAgreement:r})}async function J({keyPair:e,secretKey:t=!1}={}){e?.publicKey instanceof U||(e=await O(e));const r=t&&!!e.secretKey?e.secretKey:e.publicKey;let i;if(e.publicKey.algorithm.namedCurve===g){const{Crypto:e}=await import("./webcrypto.es-DptGOl2T-BnVhHKeM.js"),t=new e;i=await t.subtle.exportKey("jwk",r)}else i=await E.subtle.exportKey("jwk",r);return i}async function L({keyPair:e,keyAgreement:t=!1}){e?.publicKey instanceof U||e.publicKey?.algorithm.namedCurve===g||(e=await O(e));const i=async({publicKey:t=!0,secretKey:i=!1,includeContext:n=!0,raw:c=!1}={})=>{if(c){const n=await J({keyPair:e,secretKey:i}),c={};return t&&(c.publicKey=function({jwk:e}={}){if("EC"!==e?.kty)throw new TypeError('"jwk.kty" must be "EC".');const{crv:t}=e,i=T({curve:t}),n=r(e.x),c=r(e.y),u=new Uint8Array(i+1),y=c[c.length-1]%2==0;return u[0]=y?2:3,u.set(n,u.length-n.length),u}({jwk:n})),i&&(c.secretKey=function({jwk:e}={}){if("EC"!==e?.kty)throw new TypeError('"jwk.kty" must be "EC".');const{crv:t}=e,i=T({curve:t}),n=r(e.d),c=new Uint8Array(i);return c.set(n,c.length-n.length),c}({jwk:n})),c}return async function({keyPair:e,secretKey:t,publicKey:r,includeContext:i}={}){if(!r&&!t)throw new TypeError('Export requires specifying either "publicKey" or "secretKey".');const n=t&&!!e.secretKey,c=n?e.secretKey:e.publicKey;let u;if(c.algorithm.namedCurve===g){const{Crypto:e}=await import("./webcrypto.es-DptGOl2T-BnVhHKeM.js"),t=new e;u=await t.subtle.exportKey("jwk",c)}else u=await E.subtle.exportKey("jwk",c);const y={};return i&&(y["@context"]=o),y.id=e.id,y.type="Multikey",y.controller=e.controller,r&&(y.publicKeyMultibase=G({jwk:u})),n&&(y.secretKeyMultibase=H({jwk:u})),y}({keyPair:e,publicKey:t,secretKey:i,includeContext:n})},{publicKeyMultibase:n,secretKeyMultibase:u}=await i({publicKey:!0,secretKey:!0,includeContext:!0});return e={...e,publicKeyMultibase:n,secretKeyMultibase:u,keyAgreement:t,export:i,signer(){const{id:t,secretKey:r}=e;
|
|
19
|
-
/*!
|
|
20
|
-
* Copyright (c) 2022-2023 Digital Bazaar, Inc. All rights reserved.
|
|
21
|
-
*/
|
|
22
|
-
return function({id:e,secretKey:t}){if(!t)throw new Error('"secretKey" is required for signing.');const{namedCurve:r}=t.algorithm,i={name:c,hash:{name:C({curve:r})}};return{algorithm:r,id:e,async sign({data:e}={}){if(r===g){const{Crypto:r}=await import("./webcrypto.es-DptGOl2T-BnVhHKeM.js"),n=new r;return new Uint8Array(await n.subtle.sign(i,t,e))}return new Uint8Array(await E.subtle.sign(i,t,e))}}}({id:t,secretKey:r})},verifier(){const{id:t,publicKey:r}=e;return function({id:e,publicKey:t}){if(!t)throw new Error('"publicKey" is required for verifying.');const{namedCurve:r}=t.algorithm,i={name:c,hash:{name:C({curve:r})}};return{algorithm:r,id:e,async verify({data:e,signature:n}={}){if(r===g){const{Crypto:r}=await import("./webcrypto.es-DptGOl2T-BnVhHKeM.js");return(new r).subtle.verify(i,t,n,e)}return E.subtle.verify(i,t,n,e)}}}({id:t,publicKey:r})},async deriveSecret({publicKey:t,remotePublicKey:r}={}){if(r&&t)throw new Error('Only one of "remotePublicKey" and "publicKey" must be given.');if(!e.keyAgreement){const e=Error('"keyAgreement" is not supported by this keypair.');throw e.name="NotSupportedError",e}return async function({localKeyPair:e,remoteKeyPair:t}){if(!e.secretKey){const e=Error('"secretKey" required to derive secret.');throw e.name="NotSupportedError",e}e=await O({...e,keyAgreement:!0}),t=await O({...t,keyAgreement:!0});const{namedCurve:r}=e.secretKey.algorithm,i=T({curve:r});if(r===g){const{Crypto:n}=await import("./webcrypto.es-DptGOl2T-BnVhHKeM.js"),c=new n,u=await c.subtle.deriveBits({name:"ECDH",namedCurve:r,public:t.publicKey},e.secretKey,8*i);return new Uint8Array(u,0,i)}const n=await E.subtle.deriveBits({name:"ECDH",namedCurve:r,public:t.publicKey},e.secretKey,8*i);return new Uint8Array(n,0,i)}({localKeyPair:this,remoteKeyPair:r||t})}}}export{B as f,J as t};
|