@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.
Files changed (73) hide show
  1. package/bundle-stats.html +33 -32
  2. package/coverage/lcov.info +154 -158
  3. package/dist/{DataIntegrityProof-CsicZNrL-BkSRjzkI.js → DataIntegrityProof-BhL7Kkhm-affsdujn.js} +2 -2
  4. package/dist/EcdsaSd2023-CUjrjGzC-Cx7ejHu-.js +30 -0
  5. package/dist/EcdsaSecp256k1Signature2019-D90cAynb-Bf5kILPF.js +1 -0
  6. package/dist/{Ed25519Signature2020-CglkQLKN-CQ6lMzyG.js → Ed25519Signature2020-fJGvlbIp-B6XhFwr4.js} +4 -4
  7. package/dist/EddsaRdfc2022-XufziFi3-D5IoKiRE.js +14 -0
  8. package/dist/HashlinkVerifier-udsj5z09-BTqOkVoD.js +8 -0
  9. package/dist/MerkleProof2017-C0RhRNNx-zjQMRSQY.js +1 -0
  10. package/dist/MerkleProof2017-C499XBV8-l50m9izr.js +74 -0
  11. package/dist/MerkleProof2019-B7f1hhem-CjLDyx6Q.js +5 -0
  12. package/dist/Suite-Bu3gszvt-Dmvbh142.js +33 -0
  13. package/dist/_polyfill-node.crypto-DGISCHrB-C5-OOGc0.js +1 -0
  14. package/dist/checkCredentialSchemaConformity-CgpOS3eC-AjSPoJub.js +1 -0
  15. package/dist/{checkRevocationStatusList2021-BDBFhnz6-BEBD8TO8.js → checkRevocationStatusList2021-D4VNDRlW-DgNfOAoI.js} +2 -2
  16. package/dist/controlVerificationMethod-CSwPoUL8-CvUADmjg.js +1 -0
  17. package/dist/downloadPDF-UAsY-nU_.js +297 -0
  18. package/dist/ed25519-key-pair.esm-DxoBwwVJ-D8j8wFfG.js +1 -0
  19. package/dist/ensureNotRevoked-ByWaYoog-BheL-ZKZ.js +1 -0
  20. package/dist/ensureNotRevoked-C1kT3A6R-oFUZltl3.js +1 -0
  21. package/dist/{ensureValidIssuingKey-wTUvNuDH-BdV46XBb.js → ensureValidIssuingKey-DEV9E0Ph-DY8BTObG.js} +1 -1
  22. package/dist/index-DZ7aUhT_-D0G2DVsh.js +29 -0
  23. package/dist/index-DjD0A6uJ-BdFUkPCF.js +33 -0
  24. package/dist/index-RfFwckcH.js +1 -0
  25. package/dist/index-tlZQQ_rg-CYTlxhyY.js +1 -0
  26. package/dist/index.es-CnYWLNZV.js +56 -0
  27. package/dist/jsonld-signatures-D4X_Irzi-D_wBqxSl.js +56 -0
  28. package/dist/main.js +142 -133
  29. package/dist/pako.esm-BGRKTPxS-Bodm4Eha.js +2 -0
  30. package/dist/purify.es-Om653OSQ.js +2 -0
  31. package/dist/retrieveVerificationMethodPublicKey-D_autuwE-DGbK-RPm.js +1 -0
  32. package/dist/sha2-JcCWfgvE-By1_saxP.js +2 -0
  33. package/dist/verifyIssuerProfile-2PhdMtQZ-CfqcAkBL.js +1 -0
  34. package/dist/webcrypto.es-BOyMRPOj-CAxP3jJR.js +40 -0
  35. package/package.json +10 -10
  36. package/dist/EcdsaSd2023-DN9HBdgh-Bc0hVwTd.js +0 -30
  37. package/dist/EcdsaSecp256k1Signature2019-C3F03t_M-DAJeMTpu.js +0 -1
  38. package/dist/EddsaRdfc2022-CfoLi-PP-l7ITLQQT.js +0 -14
  39. package/dist/HashlinkVerifier-CTG-OS14-B4Niv2-b.js +0 -8
  40. package/dist/MerkleProof2017-B_EJmYja-CYd4dJc1.js +0 -1
  41. package/dist/MerkleProof2017-k2qjvxCH-DrRpsLHG.js +0 -75
  42. package/dist/MerkleProof2019-B7t13hOo-D8n9YrUw.js +0 -13
  43. package/dist/Suite-BmP2Qu19-D1ucdMDB.js +0 -1
  44. package/dist/_commonjs-dynamic-modules-COweQ1RR-BHR_E30J.js +0 -1
  45. package/dist/base64url-Cy03LJLt-vkTPfQOh.js +0 -4
  46. package/dist/checkCredentialSchemaConformity-BiggGGMP-Dx992E4t.js +0 -1
  47. package/dist/controlVerificationMethod-Bh_-e0Fd-BUCC8ctY.js +0 -1
  48. package/dist/did-key-common.esm-BELyYVSE-Cqrpf7cy.js +0 -9
  49. package/dist/did-key-ed25519.esm-C3GUddDp-BJdBgNDg.js +0 -1
  50. package/dist/did-key-secp256k1.esm-D-R266jM-BTxlD5VW.js +0 -1
  51. package/dist/downloadPDF-D2qwT_DJ.js +0 -297
  52. package/dist/ed25519-key-pair.esm-DQF2kkXh-XX5BXBcl.js +0 -25
  53. package/dist/elliptic-6I21PEnR-CsYseRX1.js +0 -1
  54. package/dist/elliptic-mDX7fQQx-BpaNaVm0.js +0 -1
  55. package/dist/ensureNotRevoked-DGZuNktg-B4uNuqLX.js +0 -1
  56. package/dist/ensureNotRevoked-Dc6VA2bO-DvMIgM4L.js +0 -1
  57. package/dist/index-BrurC4Vt-C0eXpZGn.js +0 -1
  58. package/dist/index-CK9Z4pAC.js +0 -2
  59. package/dist/index-DXh-XAic-B2gT500V.js +0 -22
  60. package/dist/index-DZLKRa_V-D_IQzjvG.js +0 -5
  61. package/dist/index-fQcSLZgh-DpptYyN8.js +0 -1
  62. package/dist/index.es-BIiEi3w5.js +0 -56
  63. package/dist/jsonld-BAMY2WqE-BJ5uVeOU.js +0 -36
  64. package/dist/jsonld-signatures-BbHr1fSN-BSospRuX.js +0 -74
  65. package/dist/keyUtils-ue8EY3Op-DoHdKWgN.js +0 -1
  66. package/dist/pako.esm-BGRKTPxS-UdHShO7y.js +0 -2
  67. package/dist/purify.es-CkKsfeyH.js +0 -2
  68. package/dist/retrieveVerificationMethodPublicKey-CLBY4G8P-CagFGnNt.js +0 -1
  69. package/dist/sha256-Bwge_vjI-C1PUWFZm.js +0 -1
  70. package/dist/verifyIssuerProfile-BaiZaU2c-Zcu1X0PY.js +0 -1
  71. package/dist/webcrypto.es-DptGOl2T-BnVhHKeM.js +0 -40
  72. package/dist/x25519-hG3WOzPe-Dh8L0KYb.js +0 -1
  73. /package/dist/{index-Gr4i_Ned-Dgus2xdV.js → index-CyNtT_1q-Dgus2xdV.js} +0 -0
@@ -0,0 +1 @@
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 a="{transaction_id}";var s,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"}(s||(s={})),function(e){e.btc="btc",e.eth="eth",e.mocknet="mocknet"}(c||(c={}));const d={[s.Bitcoin]:{code:s.Bitcoin,blinkCode:c.btc,name:"Bitcoin",prefixes:["6a20","OP_RETURN "],signatureValue:"bitcoinMainnet",transactionTemplates:{full:`https://blockchain.info/tx/${a}`,raw:`https://blockchain.info/rawtx/${a}`}},[s.Ethmain]:{code:s.Ethmain,blinkCode:c.eth,name:"Ethereum",prefixes:["0x"],signatureValue:"ethereumMainnet",transactionTemplates:{full:`https://etherscan.io/tx/${a}`,raw:`https://etherscan.io/tx/${a}`}},[s.Ethropst]:{code:s.Ethropst,blinkCode:c.eth,name:"Ethereum Testnet",signatureValue:"ethereumRopsten",transactionTemplates:{full:`https://ropsten.etherscan.io/tx/${a}`,raw:`https://ropsten.etherscan.io/getRawTx?tx=${a}`}},[s.Ethrinkeby]:{code:s.Ethrinkeby,blinkCode:c.eth,name:"Ethereum Testnet",signatureValue:"ethereumRinkeby",transactionTemplates:{full:`https://rinkeby.etherscan.io/tx/${a}`,raw:`https://rinkeby.etherscan.io/getRawTx?tx=${a}`}},[s.Ethgoerli]:{code:s.Ethgoerli,blinkCode:c.eth,name:"Ethereum Testnet",signatureValue:"ethereumGoerli",transactionTemplates:{full:`https://goerli.etherscan.io/tx/${a}`,raw:`https://goerli.etherscan.io/getRawTx?tx=${a}`}},[s.Ethsepolia]:{code:s.Ethsepolia,blinkCode:c.eth,name:"Ethereum Testnet",signatureValue:"ethereumSepolia",transactionTemplates:{full:`https://sepolia.etherscan.io/tx/${a}`,raw:`https://sepolia.etherscan.io/getRawTx?tx=${a}`}},[s.Mocknet]:{code:s.Mocknet,blinkCode:c.mocknet,name:"Mocknet",test:!0,signatureValue:"mockchain",transactionTemplates:{full:"",raw:""}},[s.Regtest]:{code:s.Regtest,blinkCode:c.mocknet,name:"Mocknet",test:!0,signatureValue:"bitcoinRegtest",transactionTemplates:{full:"",raw:""}},[s.Testnet]:{code:s.Testnet,blinkCode:c.btc,name:"Bitcoin Testnet",signatureValue:"bitcoinTestnet",transactionTemplates:{full:`https://testnet.blockchain.info/tx/${a}`,raw:`https://testnet.blockchain.info/rawtx/${a}`}}};const l=1,u=1;function p({explorerAPI:e,transactionIdPlaceholder:t=a,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 h=function(e,t,i,r){return new(i||(i=Promise))(function(n,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(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(a,s)}c((r=r.apply(e,t||[])).next())})};function f(e){return h(this,void 0,void 0,function*(){var t;let{url:i}=e;if(!i)throw new Error("URL is missing");i.startsWith("http://")&&!e.forceHttp&&(console.warn(`Upgrading requested url ${i} to https protocol.`),i=i.replace("http://","https://"));const r={};let n,o;e["bearer-token"]&&(r.Authorization=`Bearer ${e["bearer-token"]}`),e.body&&(n=JSON.stringify(e.body),r["Content-Type"]="application/json");try{o=yield fetch(i,{method:null!==(t=e.method)&&void 0!==t?t:"GET",headers:r,body:n})}catch(e){const t=e instanceof Error?e.message:"Unknown network error";throw console.error(`Request failed with error ${t}`),new Error(t)}const a=yield o.text();if(!o.ok){console.log(a);const e=`Error fetching url:${i}; status code:${o.status}`;throw new Error(e)}return a})}function g(e,t){return"string"!=typeof e?(console.warn("Trying to test a non string variable"),!1):0===e.indexOf(t)}function m(e,t){for(let i=0;i<t.length;i++){const r=t[i];if(g(e,r))return e.slice(r.length)}return e}var b=function(e,t,i,r){return new(i||(i=Promise))(function(n,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(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(a,s)}c((r=r.apply(e,t||[])).next())})};const y={[s.Ethmain]:1,[s.Ethgoerli]:5,[s.Ethsepolia]:11155111};function v(e=s.Ethmain){const t=y[e];if(!t)throw new Error(`Unsupported chain: ${e}`);return`https://api.etherscan.io/v2/api?chainid=${t}&module=proxy`}const w={serviceURL:function(e){return`${v(e)}&action=eth_getTransactionByHash&txhash=${a}`},serviceName:n.etherscan,parsingFunction:function(e){return b(this,arguments,void 0,function*({jsonResponse:e,chain:t,key:i,keyPropertyName:r}){const n=v(t),o={serviceURL:{main:`${n}&action=eth_getBlockByNumber&boolean=true&tag=${a}`,test:`${n}&action=eth_getBlockByNumber&boolean=true&tag=${a}`}},s={serviceURL:{main:`${n}&action=eth_blockNumber`,test:`${n}&action=eth_blockNumber`}};const c=yield function(e,t){return b(this,void 0,void 0,function*(){const n=e.result.blockNumber,a=p({explorerAPI:Object.assign(Object.assign({},o),{key:i,keyPropertyName:r}),transactionId:n,chain:t});try{const e=yield f({url:a}),o=JSON.parse(e).result;return yield function(e,t){return b(this,void 0,void 0,function*(){const n=p({explorerAPI:Object.assign(Object.assign({},s),{key:i,keyPropertyName:r}),chain:e});let o;try{o=yield f({url:n})}catch(e){throw console.log("checkEtherScanConfirmations error",e),new Error("Unable to get remote hash")}const a=JSON.parse(o).result;if(a-t<l)throw new Error("Not enough");return a})}(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:m(i.input,d.ethmain.prefixes),issuingAddress:n,time:r,revokedAddresses:[]}}(e,c)})},priority:-1};function k(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 I(e){return""===e?"":k(`${e}`)}function L(e){return new Date(1e3*e)}const P={serviceURL:{main:`https://api.blockcypher.com/v1/eth/main/txs/${a}?limit=500`,test:`https://api.blockcypher.com/v1/beth/test/txs/${a}?limit=500`},serviceName:n.blockcypher,parsingFunction:function({jsonResponse:e}){if(e.confirmations<l)throw new Error("Not enough");const t=I(e.received),i=e.outputs,r=i[i.length-1];let n=e.inputs[0].addresses[0];const o=m(r.script,d.ethmain.prefixes);return n=function(e,t){for(let i=0;i<t.length;i++){const r=t[i];if(!g(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 x={serviceURL:{main:`https://blockstream.info/api/tx/${a}`,test:`https://blockstream.info/testnet/api/tx/${a}`},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=L(e.status.block_time),i=e.vout,r=i[i.length-1],n=e.vin[0].prevout.scriptpubkey_address;return{remoteHash:m(r.scriptpubkey,d.bitcoin.prefixes),issuingAddress:n,time:t,revokedAddresses:i.filter(e=>!!e.scriptpubkey_address).map(e=>e.scriptpubkey_address)}},priority:-1};const S={serviceURL:{main:`https://api.blockcypher.com/v1/btc/main/txs/${a}?limit=500`,test:`https://api.blockcypher.com/v1/btc/test3/txs/${a}?limit=500`},serviceName:n.blockcypher,parsingFunction:function({jsonResponse:e}){if(e.confirmations<l)throw new Error("Number of transaction confirmations were less than the minimum required, according to Blockcypher API");const t=I(e.received),i=e.outputs,r=i[i.length-1],n=e.inputs[0].addresses[0];return{remoteHash:m(r.script,d.bitcoin.prefixes),issuingAddress:n,time:t,revokedAddresses:i.filter(e=>!!e.spent_by).map(e=>e.addresses[0])}},priority:-1};var V=function(e,t,i,r){return new(i||(i=Promise))(function(n,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(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(a,s)}c((r=r.apply(e,t||[])).next())})};function T(e){return e.map(e=>({getTxData:(t,i)=>V(this,void 0,void 0,function*(){return yield function(e,t,i){return V(this,void 0,void 0,function*(){const r=p({explorerAPI:e,transactionId:t,chain:i});try{console.log("calling getTransactionFromApi url:",r);const t=yield f({url:r});return yield e.parsingFunction(Object.assign({jsonResponse:JSON.parse(t),chain:i},e))}catch(e){throw console.log("getTransactionFromApi error",e),new Error("Unable to get remote hash")}})}(e,t,i)}),priority:e.priority}))}const M=[S,x],C=[w,P];var A=function(e,t,i,r){return new(i||(i=Promise))(function(n,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(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(a,s)}c((r=r.apply(e,t||[])).next())})};function R(e){return A(this,arguments,void 0,function*({serviceUrl:e,transactionId:t}){const i={method:"eth_getTransactionByHash",jsonrpc:"2.0",id:"getbyhash",params:["0x"+t]},r=yield f({url:e,body:i,method:"POST"}),n=JSON.parse(r),o={method:"eth_getBlockByNumber",jsonrpc:"2.0",id:"blockbynumber",params:[n.result.blockNumber,!0]},a=yield f({url:e,body:o,method:"POST"}),s=JSON.parse(a),c=n.result,d=s.result,l=new Date(1e3*parseInt(d.timestamp,16)),u=c.from;return{remoteHash:m(c.input,["0x"]),issuingAddress:u,time:l,revokedAddresses:[]}})}var j=function(e,t,i,r){return new(i||(i=Promise))(function(n,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(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(a,s)}c((r=r.apply(e,t||[])).next())})};function E(e){return j(this,arguments,void 0,function*({serviceUrl:e,transactionId:t}){const i={method:"getrawtransaction",jsonrpc:"2.0",id:"rpctest",params:[t,!0]},r=yield f({url:e,body:i,method:"POST"}),n=JSON.parse(r).result;return{issuingAddress:n.vout[0].scriptPubKey.addresses[0],remoteHash:m(n.vout[1].scriptPubKey.asm,["6a20","OP_RETURN "]),time:L(n.blocktime),revokedAddresses:n.vout.filter(e=>!!e.scriptPubKey.addresses).map(e=>e.scriptPubKey.addresses).flat()}})}var _=function(e,t,i,r){return new(i||(i=Promise))(function(n,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(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(a,s)}c((r=r.apply(e,t||[])).next())})};function D(e=[],t=[]){const i=e.filter(e=>e&&e.serviceName&&n[e.serviceName]);return i.length?t.map(t=>{const r=i.findIndex(e=>e.serviceName===t.serviceName);if(-1===r)return t;const n=i[r];!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.`)}(n);const o=e.findIndex(e=>e&&e.serviceName===n.serviceName);return o>-1&&e.splice(o,1),i.splice(r,1),Object.assign({},t,n)}):t}function N(e){return e.map(e=>(e.parsingFunction||(e.parsingFunction="btc"===e.chainType?E:R),e)).map(e=>({getTxData:t=>_(this,void 0,void 0,function*(){return yield e.parsingFunction(Object.assign(Object.assign({},e),{transactionId:t}))}),priority:e.priority}))}function O(e){const{bitcoin:t,ethereum:i}={bitcoin:T(D(r=e,M)),ethereum:T(D(r,C))};var r;const{custom:n}=function(e){return{custom:N(e)}}(e.filter(e=>"rpc"===e.apiType));return{bitcoin:t,ethereum:i,custom:[...n,...T(e.filter(e=>"rpc"!==e.apiType))]}}var K,H=function(e,t,i,r){return new(i||(i=Promise))(function(n,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(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(a,s)}c((r=r.apply(e,t||[])).next())})};function U(e,t){var i;switch(e){case d[s.Bitcoin].code:case d[s.Regtest].code:case d[s.Testnet].code:case d[s.Mocknet].code:return t.bitcoin;case d[s.Ethmain].code:case d[s.Ethropst].code:case d[s.Ethrinkeby].code:case d[s.Ethgoerli].code:case d[s.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 z(e,t,i,r){return H(this,void 0,void 0,function*(){try{const n=function(e,t,i){if(u>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 function(e){return H(this,void 0,void 0,function*(){return new Promise((t,i)=>{if(!e.length)return void i(new Error("No explorers configured"));let r=e.length,n=!1;const o=()=>{r-=1,n||0!==r||i(new Error("Could not confirm transaction data."))},a=e=>!!e&&!!e.issuingAddress&&!!e.remoteHash;for(const i of e)i.then(e=>{n||(a(e)?(n=!0,t(e)):o())}).catch(()=>{n||o()})})})}(n)}catch(n){if(t<e.length-1)return t++,yield z(e,t,i,r);throw n}})}!function(e){e.mainnet="mainnet",e.testnet="testnet"}(K||(K={}));var $="https://openbadgespec.org/v2/context.json",F="https://www.w3.org/2018/credentials/v1",B="https://www.w3.org/ns/credentials/v2",J="https://w3id.org/blockcerts/schema/2.0/context.json",q="https://w3id.org/blockcerts/v2",X="https://www.blockcerts.org/schema/2.0/context.json",G="https://w3id.org/blockcerts/schema/2.1/context.json",Q="https://w3id.org/blockcerts/v2.1",Y="https://www.blockcerts.org/schema/2.1/context.json",W="https://w3id.org/blockcerts/schema/3.0/context.json",Z="https://w3id.org/blockcerts/v3",ee="https://www.blockcerts.org/schema/3.0/context.json",te="https://w3id.org/blockcerts/schema/3.1/context.json",ie="https://w3id.org/blockcerts/v3.1",re="https://www.blockcerts.org/schema/3.1/context.json",ne="https://w3id.org/blockcerts/schema/3.2/context.json",oe="https://w3id.org/blockcerts/v3.2",ae="https://www.blockcerts.org/schema/3.2/context.json",se="https://w3id.org/security/suites/merkle-2019/v1",ce="https://w3id.org/security/suites/chained-2021/v1",de="https://w3id.org/vc/status-list/2021/v1",le="https://w3id.org/security/data-integrity/v2",ue={"@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"}},pe={"@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"}]},he={"@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"}]},fe={"@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"}}},ge={"@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"}}},me={"@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 be={};be["https://w3id.org/openbadges/v2"]=ue,be[$]=ue,be[F]={"@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"}}},be[B]={"@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"}}},be[J]=pe,be[X]=pe,be[q]=pe,be[G]=he,be[Y]=he,be[Q]=he,be[W]=fe,be[ee]=fe,be[Z]=fe,be[te]=ge,be[re]=ge,be[ie]=ge,be[ne]=me,be[ae]=me,be[oe]=me,be[se]={"@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"}}}}},be[ce]={"@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"}}}}},be[de]={"@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"}}}}},be[le]={"@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 ye={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"}}};be["https://w3id.org/blockcerts/v1"]=ye.BLOCKCERTSV1_2,be["https://w3id.org/chainpoint/v2"]=ye.CHAINPOINT_V2;const ve={locale:"en-US"};var we={locale:"en-US"},ke={"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 Ie(e,t){return e&&t?ke[we.locale]?ke[we.locale][e]?ke[we.locale][e][t]?ke[we.locale][e][t]||"":"[missing locale item data]":"[missing locale group data]":"[missing locale data]":""}function Le(){return Object.keys(ke)}var Pe=Object.freeze({__proto__:null,detectLocale:function(){return navigator.language||ve.locale},ensureIsSupported:function(e){let t;const i=Je.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=ve.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 Ie(e,t)},getSupportedLanguages:Le,getText:Ie});class xe{publicKey;created;revoked;expires;constructor(e,t,i,r){this.publicKey=e,this.created=t,this.revoked=i,this.expires=r}}class Se{image;jobTitle;name;constructor(e,t,i){this.image=e,this.jobTitle=t,this.name=i}}class Ve extends Error{stepCode;constructor(e,t){super(t),this.stepCode=e}}const Te=ke[we.locale];var Me,Ce;function Ae(){return{[Me.formatValidation]:{code:Me.formatValidation,label:Te.steps.formatValidationLabel,labelPending:Te.steps.formatValidationLabelPending,subSteps:[]},[Me.proofVerification]:{code:Me.proofVerification,label:Te.steps.signatureVerificationLabel,labelPending:Te.steps.signatureVerificationLabelPending,subSteps:[]},[Me.identityVerification]:{code:Me.identityVerification,label:Te.steps.identityVerificationLabel,labelPending:Te.steps.identityVerificationLabelPending,subSteps:[]},[Me.statusCheck]:{code:Me.statusCheck,label:Te.steps.statusCheckLabel,labelPending:Te.steps.statusCheckLabelPending,subSteps:[]}}}!function(e){e.formatValidation="formatValidation",e.proofVerification="proofVerification",e.identityVerification="identityVerification",e.statusCheck="statusCheck",e.final="final"}(Me||(Me={})),function(e){e.checkImagesIntegrity="checkImagesIntegrity",e.checkRevokedStatus="checkRevokedStatus",e.checkExpiresDate="checkExpiresDate",e.controlVerificationMethod="controlVerificationMethod"}(Ce||(Ce={}));var Re=Object.freeze({__proto__:null,get SUB_STEPS(){return Ce},get VerificationSteps(){return Me},default:Ae,final:"final"});function je(e=[],t=[]){return e.filter(e=>t.includes(e)).filter((e,t,i)=>i.indexOf(e)===t)}function Ee(e,t){const i=e.findIndex(e=>e===t);i>-1&&e.splice(i,1)}const _e={[Me.formatValidation]:[Ce.checkImagesIntegrity],[Me.proofVerification]:[],[Me.identityVerification]:[Ce.controlVerificationMethod],[Me.statusCheck]:[Ce.checkRevokedStatus,Ce.checkExpiresDate]};function De(e,t){return _e[e].filter(e=>t.includes(e)).map(t=>Je.verifier.convertToVerificationSubsteps(e,t))}function Ne(e){const t=Ae();return Object.keys(t).map(i=>({...t[i],subSteps:De(i,e)}))}var Oe=Object.freeze({__proto__:null,generateRevocationReason:function(e){return e=(e=e.trim()).length>0?` ${Ie("revocation","preReason")} ${e}${"."!==e.slice(-1)?".":""}`:"",`${Ie("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(Ie("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 Ve("",Ie("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(Ce);return e||Ee(i,Ce.controlVerificationMethod),t||Ee(i,Ce.checkImagesIntegrity),i}(e,t);return{verificationProcess:i,verificationMap:Ne(i)}}});var Ke,He=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"}(Ke||(Ke={}));class Ue{code;label;labelPending;parentStep;status;constructor(e,t){this.code=t,this.label=Ie("subSteps",`${t}Label`),this.labelPending=Ie("subSteps",`${t}LabelPending`),this.parentStep=e,this.status=Ke.DEFAULT}}function ze(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 $e(e){return""===e?0:ze(`${e}`).getTime()}function Fe(e,t=null){const i=e.created?$e(e.created):null,r=e.revoked?$e(e.revoked):null,n=e.expires?$e(e.expires):null;let o=t;if(!t){o=(e.id||e.publicKey).replace("ecdsa-koblitz-pubkey:","")}return new xe(o,i,r,n)}var Be=Object.freeze({__proto__:null,convertToVerificationSubsteps:function(e,t){return new Ue(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 a=t[r].suites[o];if(n=a.subSteps.find(t=>t.code===e),n&&a.proofType===i)return n}}},getIssuerProfile:async function(e){const t=Ie("errors","getIssuerProfile");if(!e)throw new Ve("getIssuerProfile",`${t} - ${Ie("errors","issuerProfileNotSet")}`);if("object"==typeof e&&(e=e.id),console.log(e),!/^(ftp|http|https):\/\/[^ "]+$/.test(e))throw new Ve("getIssuerProfile",`${t} - ${Ie("errors","issuerProfileNotSet")}`);const i=JSON.parse(await f({url:e}).catch(()=>{throw new Ve("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 Ve("getIssuerProfile",`${t} - ${Ie("errors","issuerProfileInvalid")}`);return i},getRevokedAssertions:async function(e,t){if(!e)return[];const i=Ie("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 f({url:e});return JSON.parse(t).revokedAssertions??[]}catch(e){throw console.error(e),new Ve(Ce.checkRevokedStatus,i)}},lookForTx:function(e){return H(this,arguments,void 0,function*({transactionId:e,chain:t,explorerAPIs:i=[]}){const r=O(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(u>r)throw new Error("Invalid application configuration; check the CONFIG.MinimumBlockchainExplorers configuration value");return i}({defaultAPIs:U(t,r),customAPIs:r.custom});return yield z(n,0,e,t)})},parseIssuerKeys:function(e){try{const t={};if("@context"in e){const i=e.publicKey;for(let e=0;e<i.length;e++){const r=Fe(i[e]);t[r.publicKey]=r}}else{const i=Fe({},(e.issuerKeys??[])[0].key);t[i.publicKey]=i}return t}catch(e){throw console.error(e),new Ve("parseIssuerKeys",Ie("errors","parseIssuerKeys"))}},parseRevocationKey:function(e){return e&&Object.prototype.hasOwnProperty.call(e,"revocationKeys")&&e.revocationKeys.length>0?e.revocationKeys[0].key:""}}),Je={certificates:Oe,chains:He,i18n:Pe,verifier:Be};function qe(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),a=Object.keys(Ge),s=parseInt(a.filter(e=>{return t=n,i=e.toString(),t.some(e=>e.includes(`v${i}`)||e.includes(`${i}.`));var t,i})[0],10);let c;switch(s){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:s,version:c}}function Xe(){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 Ge={1:async function(e){const t=e.certificate||e.document.certificate,i=e.recipient||e.document.recipient,r=e.document.assertion,n=e.receipt,a=void 0===n?o.V1_1:o.V1_2;let{image:s,description:c,issuer:d,subtitle:l}=t;const u=i.publicKey,p=r.expires,h=r.uid,f=r.issuedOn,g=r.metadataJson,m=`${i.givenName} ${i.familyName}`,b=r.id,y=i.revocationKey??null,v=d.image,w=e.document.signature,k=e.document?.assertion?.["image:signature"],I=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,a=new Se(r.image,n,o);i.push(a)}else{const t=new Se(e,null,null);i.push(t)}else for(const t in e){const r=e[t],n=new Se(r.image,r.jobTitle,r.name);i.push(n)}return i}(k,a),L=await Je.verifier.getIssuerProfile(d.id);return"object"==typeof l&&(l=l.display?l.content:""),{certificateImage:s,description:c,expires:p,id:h,issuedOn:f,issuer:L,metadataJson:g,name:t.title||t.name,publicKey:u,receipt:n,recipientFullName:m,recordLink:b,revocationKey:y,sealImage:v,signature:w,signatureImage:I,subtitle:l,version:a}},2:Xe,3:Xe};var Qe;!function(e){e.MerkleProof2017="MerkleProof2017",e.ChainpointSHA256v2="ChainpointSHA256v2"}(Qe||(Qe={}));class Ye{expires;id;issuer;revocationKey;documentToVerify;explorerAPIs;txData;_stepsStatuses=[];verificationSteps;supportedVerificationSuites={[Qe.MerkleProof2017]:null,[Qe.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===Ke.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(Qe.MerkleProof2017)||e.includes(Qe.ChainpointSHA256v2)){const{default:e}=await import("./MerkleProof2017-C499XBV8-l50m9izr.js");this.supportedVerificationSuites.MerkleProof2017=e,this.supportedVerificationSuites.ChainpointSHA256v2=e}}prepareVerificationProcess(){const e=Je.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=Me.proofVerification;this.verificationSteps.find(t=>t.code===e).suites=this.getSuiteSubsteps(e)}getSuiteSubsteps(e){const t={[Me.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,Ke.STARTING,i);try{const r=await t();return e&&(this._updateStatusCallback(e,Ke.SUCCESS,i),this._stepsStatuses.push({code:e,status:Ke.SUCCESS})),r}catch(t){console.error(t),e&&(this._updateStatusCallback(e,Ke.FAILURE,i,t.message),this._stepsStatuses.push({code:e,message:t.message,status:Ke.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(Ce.checkRevokedStatus,()=>!0);const t=await this.executeStep(null,async()=>await Je.verifier.getRevokedAssertions(e,this.id)),{default:i}=await import("./ensureNotRevoked-C1kT3A6R-oFUZltl3.js");await this.executeStep(Ce.checkRevokedStatus,()=>{i(t,this.id)})}async checkExpiresDate(){await this.executeStep(Ce.checkExpiresDate,()=>{!function(e=null){if(!e)return;const t=$e(e);if((new Date).getTime()>=t)throw new Ve(Ce.checkExpiresDate,Ie("errors","ensureNotExpired"))}(this.expires)})}findStepFromVerificationProcess(e,t){return Je.verifier.findVerificationSubstep(e,this.verificationSteps,t)}_failed(e){const{message:t}=e;return this._setFinalStep({status:Ke.FAILURE,message:t})}_isFailing(){return this._stepsStatuses.some(e=>e.status===Ke.FAILURE)}_succeed(){let e;return 1===this.proofVerifiers.length&&(e=this.proofVerifiers[0].type.includes("MerkleProof")?Je.chains.isMockChain(this.proofVerifiers[0].getChain())?Je.i18n.getComposedText("success","mocknet"):Je.i18n.getComposedText("success","blockchain"):{...Je.i18n.getComposedText("success","generic"),description:Je.i18n.getComposedText("success","generic").description.replace("${SIGNATURE_TYPE}",this.proofVerifiers[0].type)}),this.proofVerifiers.length>1&&(e=Je.i18n.getComposedText("success","multisign")),this._setFinalStep({status:Ke.SUCCESS,message:e})}_setFinalStep({status:e,message:t}){return{code:Me.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 We="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var et={exports:{}};!function(e,t){var i="__lodash_hash_undefined__",r=9007199254740991,n="[object Arguments]",o="[object Boolean]",a="[object Date]",s="[object Function]",c="[object GeneratorFunction]",d="[object Map]",l="[object Number]",u="[object Object]",p="[object Promise]",h="[object RegExp]",f="[object Set]",g="[object String]",m="[object Symbol]",b="[object WeakMap]",y="[object ArrayBuffer]",v="[object DataView]",w="[object Float32Array]",k="[object Float64Array]",I="[object Int8Array]",L="[object Int16Array]",P="[object Int32Array]",x="[object Uint8Array]",S="[object Uint8ClampedArray]",V="[object Uint16Array]",T="[object Uint32Array]",M=/\w*$/,C=/^\[object .+?Constructor\]$/,A=/^(?:0|[1-9]\d*)$/,R={};R[n]=R["[object Array]"]=R[y]=R[v]=R[o]=R[a]=R[w]=R[k]=R[I]=R[L]=R[P]=R[d]=R[l]=R[u]=R[h]=R[f]=R[g]=R[m]=R[x]=R[S]=R[V]=R[T]=!0,R["[object Error]"]=R[s]=R[b]=!1;var j="object"==typeof We&&We&&We.Object===Object&&We,E="object"==typeof self&&self&&self.Object===Object&&self,_=j||E||Function("return this")(),D=t&&!t.nodeType&&t,N=D&&e&&!e.nodeType&&e,O=N&&N.exports===D;function K(e,t){return e.set(t[0],t[1]),e}function H(e,t){return e.add(t),e}function U(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 $(e){var t=-1,i=Array(e.size);return e.forEach(function(e,r){i[++t]=[r,e]}),i}function F(e,t){return function(i){return e(t(i))}}function B(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var J,q=Array.prototype,X=Function.prototype,G=Object.prototype,Q=_["__core-js_shared__"],Y=(J=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+J:"",W=X.toString,Z=G.hasOwnProperty,ee=G.toString,te=RegExp("^"+W.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ie=O?_.Buffer:void 0,re=_.Symbol,ne=_.Uint8Array,oe=F(Object.getPrototypeOf,Object),ae=Object.create,se=G.propertyIsEnumerable,ce=q.splice,de=Object.getOwnPropertySymbols,le=ie?ie.isBuffer:void 0,ue=F(Object.keys,Object),pe=Ne(_,"DataView"),he=Ne(_,"Map"),fe=Ne(_,"Promise"),ge=Ne(_,"Set"),me=Ne(_,"WeakMap"),be=Ne(Object,"create"),ye=ze(pe),ve=ze(he),we=ze(fe),ke=ze(ge),Ie=ze(me),Le=re?re.prototype:void 0,Pe=Le?Le.valueOf:void 0;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 Se(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 Ve(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 Te(e){this.__data__=new Se(e)}function Me(e,t){var i=Fe(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Be(e)}(e)&&Z.call(e,"callee")&&(!se.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 a in e)!Z.call(e,a)||o&&("length"==a||He(a,r))||i.push(a);return i}function Ce(e,t,i){var r=e[t];Z.call(e,t)&&$e(r,i)&&(void 0!==i||t in e)||(e[t]=i)}function Ae(e,t){for(var i=e.length;i--;)if($e(e[i][0],t))return i;return-1}function Re(e,t,i,r,p,b,C){var A;if(r&&(A=b?r(e,p,b,C):r(e)),void 0!==A)return A;if(!Xe(e))return e;var j=Fe(e);if(j){if(A=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,A)}else{var E=Ke(e),_=E==s||E==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(E==u||E==n||_&&!b){if(z(e))return b?e:{};if(A=function(e){return"function"!=typeof e.constructor||Ue(e)?{}:(t=oe(e),Xe(t)?ae(t):{});var t}(_?{}:e),!t)return function(e,t){return _e(e,Oe(e),t)}(e,function(e,t){return e&&_e(t,Ge(t),e)}(A,e))}else{if(!R[E])return b?e:{};A=function(e,t,i,r){var n=e.constructor;switch(t){case y:return Ee(e);case o:case a:return new n(+e);case v:return function(e,t){var i=t?Ee(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,r);case w:case k:case I:case L:case P:case x:case S:case V:case T:return function(e,t){var i=t?Ee(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($(e),!0):$(e);return U(r,K,new e.constructor)}(e,r,i);case l:case g:return new n(e);case h:return function(e){var t=new e.constructor(e.source,M.exec(e));return t.lastIndex=e.lastIndex,t}(e);case f:return function(e,t,i){var r=t?i(B(e),!0):B(e);return U(r,H,new e.constructor)}(e,r,i);case m:return s=e,Pe?Object(Pe.call(s)):{}}var s}(e,E,Re,t)}}C||(C=new Te);var D=C.get(e);if(D)return D;if(C.set(e,A),!j)var N=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,Ge,Oe)}(e):Ge(e);return function(e,t){for(var i=-1,r=e?e.length:0;++i<r&&!1!==t(e[i],i,e););}(N||e,function(n,o){N&&(n=e[o=n]),Ce(A,o,Re(n,t,i,r,o,e,C))}),A}function je(e){return!(!Xe(e)||(t=e,Y&&Y in t))&&(qe(e)||z(e)?te:C).test(ze(e));var t}function Ee(e){var t=new e.constructor(e.byteLength);return new ne(t).set(new ne(e)),t}function _e(e,t,i,r){i||(i={});for(var n=-1,o=t.length;++n<o;){var a=t[n];Ce(i,a,e[a])}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 je(i)?i:void 0}xe.prototype.clear=function(){this.__data__=be?be(null):{}},xe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},xe.prototype.get=function(e){var t=this.__data__;if(be){var r=t[e];return r===i?void 0:r}return Z.call(t,e)?t[e]:void 0},xe.prototype.has=function(e){var t=this.__data__;return be?void 0!==t[e]:Z.call(t,e)},xe.prototype.set=function(e,t){return this.__data__[e]=be&&void 0===t?i:t,this},Se.prototype.clear=function(){this.__data__=[]},Se.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)},Se.prototype.get=function(e){var t=this.__data__,i=Ae(t,e);return i<0?void 0:t[i][1]},Se.prototype.has=function(e){return Ae(this.__data__,e)>-1},Se.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},Ve.prototype.clear=function(){this.__data__={hash:new xe,map:new(he||Se),string:new xe}},Ve.prototype.delete=function(e){return De(this,e).delete(e)},Ve.prototype.get=function(e){return De(this,e).get(e)},Ve.prototype.has=function(e){return De(this,e).has(e)},Ve.prototype.set=function(e,t){return De(this,e).set(e,t),this},Te.prototype.clear=function(){this.__data__=new Se},Te.prototype.delete=function(e){return this.__data__.delete(e)},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Se){var r=i.__data__;if(!he||r.length<199)return r.push([e,t]),this;i=this.__data__=new Ve(r)}return i.set(e,t),this};var Oe=de?F(de,Object):function(){return[]},Ke=function(e){return ee.call(e)};function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||A.test(e))&&e>-1&&e%1==0&&e<t}function Ue(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||G)}function ze(e){if(null!=e){try{return W.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function $e(e,t){return e===t||e!=e&&t!=t}(pe&&Ke(new pe(new ArrayBuffer(1)))!=v||he&&Ke(new he)!=d||fe&&Ke(fe.resolve())!=p||ge&&Ke(new ge)!=f||me&&Ke(new me)!=b)&&(Ke=function(e){var t=ee.call(e),i=t==u?e.constructor:void 0,r=i?ze(i):void 0;if(r)switch(r){case ye:return v;case ve:return d;case we:return p;case ke:return f;case Ie:return b}return t});var Fe=Array.isArray;function Be(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!qe(e)}var Je=le||function(){return!1};function qe(e){var t=Xe(e)?ee.call(e):"";return t==s||t==c}function Xe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ge(e){return Be(e)?Me(e):function(e){if(!Ue(e))return ue(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 Re(e,!0,!0)}}(et,et.exports);var tt=Ze(et.exports);function it(e){return tt(e)}function rt(e){return e===Object(e)}void 0===globalThis.setImmediate&&(globalThis.setImmediate=(e,...t)=>setTimeout(e,0,...t));var nt=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(Je.i18n.getText("errors","certificateNotValid"),{cause:e})}this.certificateJson=it(e)}async init(){await this.parseJson(this.certificateJson),this.verifier=new Ye({certificateJson:this.certificateJson,expires:this.expires,id:this.id,issuer:this.issuer,revocationKey:this.revocationKey,explorerAPIs:it(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=qe(e["@context"]),i=await Ge[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({},ve,e),this.locale=Je.i18n.ensureIsSupported("auto"===this.options.locale?Je.i18n.detectLocale():this.options.locale),this.explorerAPIs=this.options.explorerAPIs??[],we.locale=this.locale}async _setProperties({certificateImage:e,description:t,display:i,expires:r,id:n,isFormatValid:o,issuedOn:a,issuer:s,metadataJson:c,name:d,recipientFullName:l,recordLink:u,revocationKey:p,sealImage:h,signature:f,signatureImage:g,subtitle:m}){this.isFormatValid=o,this.certificateImage=e,this.description=t,this.expires=r,this.id=n,this.issuedOn=a,this.issuer=s,this.metadataJson=c,this.name=d,this.recipientFullName=l,this.recordLink=u,this.revocationKey=p,this.sealImage=h,this.signature=f,this.signatureImage=g,this.subtitle=m,this.display=i}},STEPS:Re,SignatureImage:Se,get VERIFICATION_STATUSES(){return Ke},VerificationSubstep:Ue,getSupportedLanguages:Le,retrieveBlockcertsVersion:qe});export{Ce as S,Ve as V,$e as a,Ze as b,We as c,Je as d,je as e,nt as f,Ie as g,rt as i,be as p,Ee as r};
@@ -0,0 +1 @@
1
+ import{B as e}from"./main.js";var t,r,n,s,o,i,a,c,l,u,p,d,f,m,y,h,g,w,b,$,v,j;function O(){if(r)return t;r=1;class e extends String{}const n=new Set(["<",">","<=",">="]),s=(t,...r)=>{const o=t.replace(/%[%drscjw]/g,t=>{if("%%"===t)return"%";if(0===r.length)throw new Error("Unexpected arguments count");const o=r.shift();switch(t){case"%d":if("number"==typeof o)return o;throw new Error("Expected a number");case"%r":if(o instanceof RegExp)return s("new RegExp(%j, %j)",o.source,o.flags);throw new Error("Expected a RegExp instance");case"%s":if(o instanceof e)return o;throw new Error("Expected a safe string");case"%c":if(n.has(o))return o;throw new Error("Expected a compare op");case"%j":return(e=>{if([1/0,-1/0,NaN,void 0,null].includes(e))return`${e}`;if(!["string","boolean","number"].includes(typeof e)){if("object"!=typeof e)throw new Error("Unexpected value type");const t=Object.getPrototypeOf(e);if(!(t===Array.prototype&&Array.isArray(e)||t===Object.prototype))throw new Error("Unexpected object given as value")}return JSON.stringify(e).replace(/([{,])"__proto__":/g,'$1["__proto__"]:').replace(/[^\\]"__proto__":/g,()=>{throw new Error("Unreachable")}).replace(/[\u2028\u2029]/g,e=>`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`)})(o);case"%w":if(Number.isInteger(o)&&o>=0)return" ".repeat(o);throw new Error("Expected a non-negative integer for indentation")}throw new Error("Unreachable")});if(0!==r.length)throw new Error("Unexpected arguments count");return new e(o)},o=t=>{if(!/^[a-z][a-z0-9_]*$/i.test(t))throw new Error("Does not look like a safe id");return new e(t)},i=t=>(...r)=>{if(!r.every(t=>t instanceof e))throw new Error("Unsafe arguments");return new e(t(...r))},a=i((...e)=>e.some(e=>"true"==`${e}`)?"true":e.join(" || ")||"false"),c=i((...e)=>e.some(e=>"false"==`${e}`)?"false":e.join(" && ")||"true"),l=e=>"true"==`${e}`?o("false"):"false"==`${e}`?o("true"):s("!%s",(e=>/^[a-z][a-z0-9_().]*$/i.test(e)||/^\([^()]+\)$/i.test(e)?e:s("(%s)",e))(e));return t={format:s,safe:o,safeand:c,safenot:l,safenotor:(...e)=>l(a(...e))}}function x(){if(s)return n;s=1;const{safe:e}=O(),t=new WeakMap;return n={scopeMethods:r=>{t.has(r)||t.set(r,{sym:new Map,ref:new Map,format:new Map,pattern:new Map});const n=t.get(r),s=t=>{n.sym.get(t)||n.sym.set(t,0);const r=n.sym.get(t);return n.sym.set(t,r+1),e(`${t}${r}`)};n.loop||(n.loop="ijklmnopqrstuvxyz".split(""));return{gensym:s,genpattern:e=>{if(n.pattern.has(e))return n.pattern.get(e);const t=s("pattern");return r[t]=new RegExp(e,"u"),n.pattern.set(e,t),t},genloop:()=>{const t=n.loop.shift();return n.loop.push(`${t}${t[0]}`),e(t)},getref:e=>n.ref.get(e),genref:e=>{const t=s("ref");return n.ref.set(e,t),t},genformat:e=>{let t=n.format.get(e);return t||(t=s("format"),r[t]=e,n.format.set(e,t)),t}}}}}function E(){if(i)return o;i=1;const t=(e,r)=>{if(e===r)return!0;if(!e||!r||typeof e!=typeof r)return!1;if(e!==r&&"object"!=typeof e)return!1;const n=Object.getPrototypeOf(e);if(n!==Object.getPrototypeOf(r))return!1;if(n===Array.prototype)return!(!Array.isArray(e)||!Array.isArray(r))&&(e.length===r.length&&e.every((e,n)=>t(e,r[n])));if(n===Object.prototype){const[n,s]=[Object.keys(e),Object.keys(r)];if(n.length!==s.length)return!1;return new Set([...n,...s]).size===n.length&&n.every(n=>t(e[n],r[n]))}return!1},r=Function.prototype.call.bind(Object.prototype.hasOwnProperty);r[Symbol.for("toJayString")]="Function.prototype.call.bind(Object.prototype.hasOwnProperty)";const n=e=>/~\//.test(e)?`${e}`.replace(/~/g,"~0").replace(/\//g,"~1"):e;return o={stringLength:e=>/[\uD800-\uDFFF]/.test(e)?[...e].length:e.length,isMultipleOf:(e,t,r,n)=>{if(e%t===0)return!0;let s=e*r;if(s!==1/0&&s!==-1/0||(s=e),s%n===0)return!0;const o=Math.floor(s+.5);return o/r===e&&o%n===0},deepEqual:t,unique:e=>{if(e.length<2)return!0;if(2===e.length)return!t(e[0],e[1]);const r=[],n=e.length>20?new Set:null;let s=0,o=0;for(const t of e){if("object"==typeof t)r.push(t);else if(n){if(n.add(t),n.size!==++s)return!1}else if(-1!==e.indexOf(t,o+1))return!1;o++}for(let e=1;e<r.length;e++)for(let n=0;n<e;n++)if(t(r[e],r[n]))return!1;return!0},deBase64:t=>{if(void 0!==e)return e.from(t,"base64").toString("utf-8");const r=atob(t);return new TextDecoder("utf-8").decode(new Uint8Array(r.length).map((e,t)=>r.charCodeAt(t)))},hasOwn:r,...{toPointer:e=>0===e.length?"#":`#/${e.map(n).join("/")}`,pointerPart:n,errorMerge:({keywordLocation:e,instanceLocation:t},r,n)=>({keywordLocation:`${r}${e.slice(1)}`,instanceLocation:`${n}${t.slice(1)}`}),propertyIn:(e,[t,r])=>t.includes(!0)||t.some(t=>t===e)||r.some(t=>new RegExp(t,"u").test(e)),dynamicResolve:(e,t)=>(e.filter(e=>e[t])[0]||{})[t]}}}function k(){if(c)return a;c=1;const{format:e,safe:t}=O(),{scopeMethods:r}=x(),n=E(),s=new Map(Object.entries({null:t=>e("%s === null",t),boolean:t=>e('typeof %s === "boolean"',t),array:t=>e("Array.isArray(%s)",t),object:t=>e('typeof %s === "object" && %s && !Array.isArray(%s)',t,t,t),number:t=>e('typeof %s === "number"',t),integer:t=>e("Number.isInteger(%s)",t),string:t=>e('typeof %s === "string"',t)})),o=({name:r,parent:n,keyval:s,keyname:i})=>{if(r){if(n||s||i)throw new Error("name can be used only stand-alone");return r}if(!n)throw new Error("Can not use property of undefined parent!");const a=o(n);if(void 0!==s){if(i)throw new Error("Can not use key value and name together");if(!["string","number"].includes(typeof s))throw new Error("Invalid property path");return/^[a-z][a-z0-9_]*$/i.test(s)?e("%s.%s",a,t(s)):e("%s[%j]",a,s)}if(i)return e("%s[%s]",a,i);throw new Error("Unreachable")},i=new Set([].concat(...[Object,Array,String,Number,Boolean].map(e=>Object.getOwnPropertyNames(e.prototype)))),l=/^\([^)]*\) *=>/,u=/^[^=]*=>/,p=Symbol.for("toJayString");return a={types:s,buildName:o,jsHelpers:(t,a,c,{unmodifiedPrototypes:l,isJSON:u},p)=>{const{gensym:d,genpattern:f,genloop:m}=r(a,c);return{present:t=>{const r=o(t),{parent:s,keyval:c,keyname:p,inKeys:d,checked:f}=t;if(f||d&&u)throw new Error("Unreachable: useless check for undefined");if(d)return e("%s !== undefined",r);if(s&&p){a.hasOwn=n.hasOwn;const t=o(s);return u?e("%s !== undefined && hasOwn(%s, %s)",r,t,p):e("%s in %s && hasOwn(%s, %s)",p,t,t,p)}if(s&&void 0!==c){if(l&&u&&!i.has(`${c}`))return e("%s !== undefined",r);a.hasOwn=n.hasOwn;const t=o(s);return u?e("%s !== undefined && hasOwn(%s, %j)",r,t,c):e("%j in %s && hasOwn(%s, %j)",c,t,t,c)}throw new Error("Unreachable: present() check without parent")},forObjectKeys:(r,n)=>{const s=d("key");t.block(e("for (const %s of Object.keys(%s))",s,o(r)),()=>{n(c(r,s,!0),s)})},forArray:(r,n,s)=>{const i=m(),a=o(r);t.block(e("for (let %s = %s; %s < %s.length; %s++)",i,n,i,a,i),()=>{s(c(r,i,l,!0),i)})},patternTest:(t,r)=>{const n=t.replace(/[.^$|*+?(){}[\]\\]/gu,"");if(t===`^${n}$`)return e("(%s === %j)",r,t.slice(1,-1));if(p.has(t))return e("true");if([n,`${n}+`,`${n}.*`,`.*${n}.*`].includes(t))return e("%s.includes(%j)",r,n);if([`^${n}`,`^${n}+`,`^${n}.*`].includes(t))return e("%s.startsWith(%j)",r,n);if([`${n}$`,`.*${n}$`].includes(t))return e("%s.endsWith(%j)",r,n);const s=[...n].slice(0,-1).join("");return[`${n}*`,`${n}?`].includes(t)?0===s.length?e("true"):e("%s.includes(%j)",r,s):[`^${n}*`,`^${n}?`].includes(t)?0===s.length?e("true"):e("%s.startsWith(%j)",r,s):e("%s.test(%s)",f(t),r)},compare:(t,r)=>{if(!r||"object"!=typeof r)return e("%s === %j",t,r);let o;const i=e=>e.length<=3&&e.every(e=>!e||"object"!=typeof e);if(Array.isArray(r)){if(o=s.get("array")(t),i(r)){let n=e("%s.length === %d",t,r.length);for(let s=0;s<r.length;s++)n=e("%s && %s[%d] === %j",n,t,s,r[s]);return e("%s && %s",o,n)}}else{o=s.get("object")(t);const[c,l]=[Object.keys(r),Object.values(r)];if(i(l)){let s=e("Object.keys(%s).length === %d",t,c.length);c.length>0&&(a.hasOwn=n.hasOwn);for(const r of c)s=e("%s && hasOwn(%s, %j)",s,t,r);for(const n of c)s=e("%s && %s[%j] === %j",s,t,n,r[n]);return e("%s && %s",o,s)}}return a.deepEqual=n.deepEqual,e("%s && deepEqual(%s, %j)",o,t,r)},propvar:c}},jaystring:function(t){if("function"==typeof t){if(t[p])return t[p];if(Object.getPrototypeOf(t)!==Function.prototype)throw new Error("Can not stringify: a function with unexpected prototype");const e=`${t}`;if(t.prototype){if(!/^function[ (]/.test(e))throw new Error("Unexpected function");return e}if(l.test(e)||u.test(e))return e;throw new Error("Can not stringify: only either normal or arrow functions are supported")}if("object"==typeof t){const r=Object.getPrototypeOf(t);if(t instanceof RegExp&&r===RegExp.prototype)return e("%r",t);throw new Error("Can not stringify: an object with unexpected prototype")}throw new Error("Can not stringify: unknown type "+typeof t)}}}function A(){if(u)return l;u=1;const{format:e,safe:t,safenot:r}=O(),{jaystring:n}=k(),s=/[{[]/,o=/[}\]]/;return l=()=>{const i=[];let a=0;const c=()=>{if(0!==a)throw new Error("Unexpected indent at build()");const t=i.map(t=>e("%w%s",2*t.indent,t.code)).join("\n");return/^[a-z][a-z0-9]*$/i.test(t)?`return ${t}`:`return (${t})`},l=e=>{const t=Object.entries(e);for(const[e,r]of t){if(!/^[a-z][a-z0-9]*$/i.test(e))throw new Error("Unexpected scope key!");if(!("function"==typeof r||r instanceof RegExp))throw new Error("Unexpected scope value!")}return t};return{optimizedOut:!1,size:()=>i.length,write(t,...r){if("string"!=typeof t)throw new Error("Format must be a string!");if(t.includes("\n"))throw new Error("Only single lines are supported");var n;return n=e(t,...r),o.test(n.trim()[0])&&a--,i.push({indent:a,code:n}),s.test(n[n.length-1])&&a++,!0},block(e,t,r=!1){const n=a;this.write("%s {",e);const s=i.length;if(t(),s===i.length)return i.pop(),a=n,!1;if(s===i.length-1&&!r){const{code:t}=i[i.length-1];if(!/^(if|for) /.test(t))return i.length-=2,a=n,this.write("%s %s",e,t)}return this.write("}")},if(t,n,s){"false"==`${t}`?(s&&s(),n&&(this.optimizedOut=!0)):"true"==`${t}`?(n&&n(),s&&(this.optimizedOut=!0)):n&&this.block(e("if (%s)",t),n,!!s)?s&&this.block(e("else"),s):s&&this.if(r(t),s)},makeModule:(e={})=>`(function() {\n'use strict'\n${l(e).map(([e,r])=>`const ${t(e)} = ${n(r)};`).join("\n")}\n${c()}})()`,makeFunction(e={}){const t=l(e),r=t.map(e=>e[0]),n=t.map(e=>e[1]);return Function(...r,`'use strict'\n${c()}`)(...n)}}}}function S(){if(d)return p;d=1;const e=["$schema","$vocabulary","id","$id","$anchor","$ref","definitions","$defs","$recursiveRef","$recursiveAnchor","$dynamicAnchor","$dynamicRef","type","required","default","enum","const","not","allOf","anyOf","oneOf","if","then","else","maximum","minimum","exclusiveMaximum","exclusiveMinimum","multipleOf","divisibleBy","items","maxItems","minItems","additionalItems","prefixItems","contains","minContains","maxContains","uniqueItems","maxLength","minLength","format","pattern","contentEncoding","contentMediaType","contentSchema","properties","maxProperties","minProperties","additionalProperties","patternProperties","propertyNames","dependencies","dependentRequired","dependentSchemas","propertyDependencies","unevaluatedProperties","unevaluatedItems","title","description","deprecated","readOnly","writeOnly","examples","$comment","example","discriminator","removeAdditional"],t=["draft/next","draft/2020-12","draft/2019-09","draft-07","draft-06","draft-04","draft-03"].map(e=>`https://json-schema.org/${e}/schema`),r=["core","applicator","unevaluated","validation","meta-data","format-annotation","format-assertion","content"],n=[...["core","applicator","validation","meta-data","format","content"].map(e=>`https://json-schema.org/draft/2019-09/vocab/${e}`),...r.map(e=>`https://json-schema.org/draft/2020-12/vocab/${e}`)];return p={knownKeywords:e,schemaVersions:t,knownVocabularies:n}}function z(){if(m)return f;m=1;const{knownKeywords:e}=S();function t(e,t,r,n="keys"){if(!e.has(t))return e.set(t,r);if(e.get(t)!==r)throw new Error(`Conflicting duplicate ${n}: ${t}`)}function r(e){return e.includes("~")?e.replace(/~[01]/g,e=>{switch(e){case"~1":return"/";case"~0":return"~"}throw new Error("Unreachable")}):e}function n(e,t,n){if("object"!=typeof e)throw new Error("Invalid input object");if("string"!=typeof t)throw new Error("Invalid JSON pointer");const s=t.split("/");if(!["","#"].includes(s.shift()))throw new Error("Invalid JSON pointer");if(0===s.length)return e;let o=e;for(const e of s){if("string"!=typeof e)throw new Error("Invalid JSON pointer");n&&n.push(o);const t=r(e);if("object"!=typeof o)return;if(!Object.prototype.hasOwnProperty.call(o,t))return;o=o[t]}return o}const s=/^https?:\/\//;function o(e,t){if("string"!=typeof e||"string"!=typeof t)throw new Error("Unexpected path!");if(0===t.length)return e;const r=e.replace(/#.*/,"");return t.startsWith("#")?`${r}${t}`:!r.includes("/")||s.test(t)?t:s.test(r)?`${new URL(t,r)}`:t.startsWith("/")?t:[...r.split("/").slice(0,-1),t].join("/")}function i(e){return e.map(e=>e&&(e.$id||e.id)||"").filter(e=>e&&"string"==typeof e).reduce(o,"")}const a=["properties","patternProperties","$defs","definitions"],c=["const","enum","examples","example","comment"],l=Symbol("skip");function u(t,r){const n=(t,s=!1)=>{if(!t||"object"!=typeof t)return;const o=r(t);if(void 0!==o)return o===l?void 0:o;for(const r of Object.keys(t)){if(!s&&!Array.isArray(t)&&!e.includes(r))continue;if(!s&&c.includes(r))continue;const o=n(t[r],!s&&a.includes(r));if(void 0!==o)return o}};return n(t)}const p=(e,r,n=!1)=>{if(!Array.isArray(r))throw new Error("Expected an array of schemas");for(const s of r)u(s,r=>{const o=r.$id||r.id,i=o&&"string"==typeof o?o.replace(/#$/,""):null;if(i&&i.includes("://")&&!i.includes("#"))t(e,i,r,"schema $id in 'schemas'");else if(r===s&&!n)throw new Error("Schema with missing or invalid $id in 'schemas'")});return e},d=(e,t)=>{if(t)return p(d(e),t,!0);if(e)switch(Object.getPrototypeOf(e)){case Object.prototype:return new Map(Object.entries(e));case Map.prototype:return new Map(e);case Array.prototype:return p(new Map,e)}throw new Error("Unexpected value for 'schemas' option")};return f={get:n,joinPath:o,resolveReference:function t(r,s,l,u=""){const p=o(u,l),d=[],[f,m=""]=p.split("#"),y=decodeURI(m),h=(t,s,l=!1,u=!1)=>{if(!t||"object"!=typeof t)return;const m=t.$id||t.id;let g=s;if(m&&"string"==typeof m)if(g=o(g,m),g===p||g===f&&""===y)d.push([t,r,s]);else if(g===f&&"/"===y[0]){const e=[],a=n(t,y,e);void 0!==a&&d.push([a,r,o(s,i(e))])}const w=u?t.$dynamicAnchor:t.$anchor;if(w&&"string"==typeof w){if(w.includes("#"))throw new Error("$anchor can't include '#'");if(w.startsWith("/"))throw new Error("$anchor can't start with '/'");g=o(g,`#${w}`),g===p&&d.push([t,r,s])}for(const r of Object.keys(t))(l||Array.isArray(t)||e.includes(r))&&(!l&&c.includes(r)||h(t[r],g,!l&&a.includes(r)));!u&&t.$dynamicAnchor&&h(t,s,l,!0)};if(h(r,f),f===u.replace(/#$/,"")&&("/"===y[0]||""===y)){const e=[],t=n(r,y,e);void 0!==t&&d.push([t,r,i(e)])}if(s.has(f)&&s.get(f)!==r){const e=t(s.get(f),s,`#${m}`,f);d.push(...e.map(([e,t,r])=>[e,t,o(f,r)]))}return s.has(p)&&d.push([s.get(p),s.get(p),p]),d},getDynamicAnchors:function(e){const r=new Map;return u(e,n=>{if(n!==e&&(n.$id||n.id))return l;const s=n.$dynamicAnchor;if(s&&"string"==typeof s){if(s.includes("#"))throw new Error("$dynamicAnchor can't include '#'");if(!/^[a-zA-Z0-9_-]+$/.test(s))throw new Error(`Unsupported $dynamicAnchor: ${s}`);t(r,s,n,"$dynamicAnchor")}}),r},hasKeywords:(e,t)=>u(e,e=>Object.keys(e).some(e=>t.includes(e))||void 0)||!1,buildSchemas:d},f}function M(){if(h)return y;h=1;const e={email:e=>{if(e.length>318)return!1;if(/^[a-z0-9!#$%&'*+/=?^_`{|}~-]{1,20}(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]{1,21}){0,2}@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,60}[a-z0-9])?){0,3}$/i.test(e))return!0;if(!e.includes("@")||/(^\.|^"|\.@|\.\.)/.test(e))return!1;const[t,r,...n]=e.split("@");return!(!t||!r||0!==n.length||t.length>64||r.length>253)&&(!(!/^[a-z0-9.-]+$/i.test(r)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t))&&r.split(".").every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e)))},hostname:e=>{if(e.length>(e.endsWith(".")?254:253))return!1;return/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*\.?$/i.test(e)},date:e=>{if(10!==e.length)return!1;if("0"===e[5]&&"2"===e[6]){if(/^\d\d\d\d-02-(?:[012][1-8]|[12]0|[01]9)$/.test(e))return!0;const t=e.match(/^(\d\d\d\d)-02-29$/);if(!t)return!1;const r=0|t[1];return r%16==0||r%4==0&&r%25!=0}return e.endsWith("31")?/^\d\d\d\d-(?:0[13578]|1[02])-31$/.test(e):/^\d\d\d\d-(?:0[13-9]|1[012])-(?:[012][1-9]|[123]0)$/.test(e)},time:e=>{if(e.length>27)return!1;if(!/^(?:2[0-3]|[0-1]\d):[0-5]\d:(?:[0-5]\d|60)(?:\.\d+)?(?:z|[+-](?:2[0-3]|[0-1]\d)(?::?[0-5]\d)?)?$/i.test(e))return!1;if(!/:60/.test(e))return!0;const t=e.match(/([0-9.]+|[^0-9.])/g);let r=60*Number(t[0])+Number(t[2]);return"+"===t[5]?r+=1440-60*Number(t[6]||0)-Number(t[8]||0):"-"===t[5]&&(r+=60*Number(t[6]||0)+Number(t[8]||0)),r%1440==1439},"date-time":e=>{if(e.length>38)return!1;const t="0"===e[5]&&"2"===e[6];if(t&&"3"===e[8]||!/^\d\d\d\d-(?:0[1-9]|1[0-2])-(?:[0-2]\d|3[01])[t\s](?:2[0-3]|[0-1]\d):[0-5]\d:(?:[0-5]\d|60)(?:\.\d+)?(?:z|[+-](?:2[0-3]|[0-1]\d)(?::?[0-5]\d)?)$/i.test(e))return!1;if("6"===e[17]){const t=e.slice(11).match(/([0-9.]+|[^0-9.])/g);let r=60*Number(t[0])+Number(t[2]);if("+"===t[5]?r+=1440-60*Number(t[6]||0)-Number(t[8]||0):"-"===t[5]&&(r+=60*Number(t[6]||0)+Number(t[8]||0)),r%1440!=1439)return!1}if(t){if(/^\d\d\d\d-02-(?:[012][1-8]|[12]0|[01]9)/.test(e))return!0;const t=e.match(/^(\d\d\d\d)-02-29/);if(!t)return!1;const r=0|t[1];return r%16==0||r%4==0&&r%25!=0}return"3"===e[8]&&"1"===e[9]?/^\d\d\d\d-(?:0[13578]|1[02])-31/.test(e):/^\d\d\d\d-(?:0[13-9]|1[012])-(?:[012][1-9]|[123]0)/.test(e)},ipv4:e=>e.length<=15&&/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)$/.test(e),ipv6:e=>{if(e.length>45||e.length<2)return!1;let t=0,r=0,n=0,s=!1,o=!1,i=0,a=!0;for(let c=0;c<e.length;c++){const l=e.charCodeAt(c);if(1===c&&58===i&&58!==l)return!1;if(l>=48&&l<=57){if(++n>4)return!1}else if(46===l){if(t>6||r>=3||0===n||o)return!1;r++,n=0}else if(58===l){if(r>0||t>=7)return!1;if(58===i){if(s)return!1;s=!0}else 0===c&&(a=!1);t++,n=0,o=!1}else{if(!(l>=97&&l<=102||l>=65&&l<=70))return!1;if(r>0)return!1;if(++n>4)return!1;o=!0}i=l}if(t<2||r>0&&(3!==r||0===n))return!1;if(s&&2===e.length)return!0;if(r>0&&!/(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}$/.test(e))return!1;const c=r>0?6:7;return s?(a||n>0)&&t<c:t===c&&a&&n>0},uri:/^[a-z][a-z0-9+\-.]*:(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|v[0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/?(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|v[0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/?(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)?(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2}|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,"json-pointer":/^(?:|\/(?:[^~]|~0|~1)*)$/,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:|#|\/(?:[^~]|~0|~1)*)$/,uuid:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,duration:e=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e))};return y={core:e,extra:{alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/,"hex-digits":/^[0-9a-f]+$/i,"hex-digits-prefixed":/^0x[0-9a-f]+$/i,"hex-bytes":/^([0-9a-f][0-9a-f])+$/i,"hex-bytes-prefixed":/^0x([0-9a-f][0-9a-f])+$/i,base64:e=>e.length%4==0&&/^[a-z0-9+/]*={0,3}$/i.test(e),"json-pointer-uri-fragment":/^#(|\/(\/|[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)$/i,"host-name":e.hostname,"ip-address":e.ipv4,color:/^(#[0-9A-Fa-f]{3,6}|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|rgb\(\s*([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\s*,\s*([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\s*,\s*([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\s*\)|rgb\(\s*(\d?\d%|100%)\s*,\s*(\d?\d%|100%)\s*,\s*(\d?\d%|100%)\s*\))$/},weak:{regex:e=>{if(e.length>1e5)return!1;if(/[^\\]\\Z/.test(e))return!1;try{return new RegExp(e,"u"),!0}catch(e){return!1}}}}}function q(){if($)return b;$=1;const{format:e,safe:t,safeand:r,safenot:n,safenotor:s}=O(),o=A(),{resolveReference:i,joinPath:a,getDynamicAnchors:c,hasKeywords:l}=z(),u=M(),{toPointer:p,...d}=E(),{scopeMethods:f}=x(),{buildName:m,types:y,jsHelpers:h}=k(),{knownKeywords:v,schemaVersions:j,knownVocabularies:q}=S(),{initTracing:N,andDelta:P,orDelta:I,applyDelta:R,isDynamic:U,inProperties:C}=function(){if(w)return g;w=1;const e=(e,t)=>[...new Set([...e,...t])].sort(),t=(e,t)=>e.filter(e=>t.includes(e)),r=e=>(...t)=>s(e(...t.map(s))),n=(e,t)=>e&&!e.includes(t),s=({type:t=null,dyn:r={},...s})=>({type:t?[...t].sort():t,items:n(t,"array")?1/0:s.items||0,properties:n(t,"object")?[!0]:[...s.properties||[]].sort(),patterns:n(t,"object")?[]:[...s.patterns||[]].sort(),required:n(t,"object")?[]:[...s.required||[]].sort(),fullstring:n(t,"string")||s.fullstring||!1,dyn:{item:!n(t,"array")&&(r.item||!1),items:n(t,"array")?0:Math.max(s.items||0,r.items||0),properties:n(t,"object")?[]:e(s.properties||[],r.properties||[]),patterns:n(t,"object")?[]:e(s.patterns||[],r.patterns||[])},unknown:s.unknown&&!(n(t,"object")&&n(t,"array"))||!1}),o=r((r,n)=>({type:r.type&&n.type?t(r.type,n.type):r.type||n.type||null,items:Math.max(r.items,n.items),properties:e(r.properties,n.properties),patterns:e(r.patterns,n.patterns),required:e(r.required,n.required),fullstring:r.fullstring||n.fullstring,dyn:{item:r.dyn.item||n.dyn.item,items:Math.max(r.dyn.items,n.dyn.items),properties:e(r.dyn.properties,n.dyn.properties),patterns:e(r.dyn.patterns,n.dyn.patterns)},unknown:r.unknown||n.unknown})),i=(e,t)=>!0!==t&&new RegExp(e,"u").test(t),a=({properties:t,patterns:r},{properties:n,patterns:s})=>{const o=t.filter(e=>n.includes(e)||n.includes(!0)||s.some(t=>i(t,e))),a=n.filter(e=>t.includes(e)||t.includes(!0)||r.some(t=>i(t,e))),c=r.filter(e=>s.includes(e)||n.includes(!0)),l=s.filter(e=>r.includes(e)||t.includes(!0));return{properties:e(o,a),patterns:e(c,l)}},c=({properties:e,patterns:t},{properties:r,patterns:n})=>r.every(r=>e.includes(r)||e.includes(!0)||t.some(e=>i(e,r)))&&n.every(r=>t.includes(r)||e.includes(!0)),l=r((r,s)=>({type:r.type&&s.type?e(r.type,s.type):null,items:Math.min(r.items,s.items),...a(r,s),required:n(r.type,"object")&&s.required||n(s.type,"object")&&r.required||t(r.required,s.required),fullstring:r.fullstring&&s.fullstring,dyn:{item:r.dyn.item||s.dyn.item,items:Math.max(r.dyn.items,s.dyn.items),properties:e(r.dyn.properties,s.dyn.properties),patterns:e(r.dyn.patterns,s.dyn.patterns)},unknown:r.unknown||s.unknown})),u=(p=({unknown:e,items:t,dyn:r,...n})=>({items:t!==1/0&&(e||r.items>t||r.item),properties:!n.properties.includes(!0)&&(e||!c(n,r))}),(...e)=>p(...e.map(s)));var p;return g={initTracing:()=>s({}),andDelta:o,orDelta:l,applyDelta:(e,t)=>Object.assign(e,o(e,t)),isDynamic:u,inProperties:c}}(),D=new Set(["^[\\s\\S]*$","^[\\S\\s]*$","^[^]*$","",".*","^","$"]),_=["null","boolean","number","integer","string"],L=new Map(Object.entries({boolean:e=>"boolean"==typeof e,array:e=>Array.isArray(e)&&Object.getPrototypeOf(e)===Array.prototype,object:e=>e&&Object.getPrototypeOf(e)===Object.prototype,finite:e=>Number.isFinite(e),natural:e=>Number.isInteger(e)&&e>=0,string:e=>"string"==typeof e,jsonval:e=>d.deepEqual(e,JSON.parse(JSON.stringify(e)))})),J=L.get("object"),F=e=>J(e)||"boolean"==typeof e,T=(e,t)=>j.indexOf(e)>j.indexOf(`https://json-schema.org/${t}/schema`),V=(e,t)=>{const r=`${e}`.replace(/^http:\/\//,"https://").replace(/#$/,"");return!j.includes(r)||T(r,t)},W=(e,t,r=!1,n=!1)=>Object.freeze({parent:e,keyname:t,inKeys:r,number:n}),K=Symbol("evaluatedStatic"),B=Symbol("optDynamic"),H=Symbol("optDynAnchors"),Z=Symbol("optRecAnchors"),Y=new Set,G=new Map,Q=(g,w,b,$,O="")=>{const{mode:x="default",useDefaults:E=!1,removeAdditional:k=!1,includeErrors:A=!1,allErrors:S=!1,contentValidation:z,dryRun:M,lint:X=!1,allowUnusedKeywords:ee="lax"===b.mode||"spec"===b.mode,allowUnreachable:te="lax"===b.mode||"spec"===b.mode,requireSchema:re="strong"===b.mode,requireValidation:ne="strong"===b.mode,requireStringValidation:se="strong"===b.mode,forbidNoopValues:oe="strong"===b.mode,complexityChecks:ie="strong"===b.mode,unmodifiedPrototypes:ae=!1,isJSON:ce=!1,$schemaDefault:le=null,formatAssertion:ue="spec"!==b.mode||V(w.$schema,"draft/2019-09"),formats:pe={},weakFormats:de="strong"!==b.mode,extraFormats:fe=!1,schemas:me,...ye}=b,he={...u.core,...de?u.weak:{},...fe?u.extra:{},...pe};if(0!==Object.keys(ye).length)throw new Error(`Unknown options: ${Object.keys(ye).join(", ")}`);if(!["strong","lax","default","spec"].includes(x))throw new Error(`Invalid mode: ${x}`);if(!A&&S)throw new Error("allErrors requires includeErrors to be enabled");if(re&&le)throw new Error("requireSchema forbids $schemaDefault");if("strong"===x){const e={...{requireValidation:ne,requireStringValidation:se},formatAssertion:ue,complexityChecks:ie,requireSchema:re},t={weakFormats:de,allowUnusedKeywords:ee};for(const[t,r]of Object.entries(e))if(!r)throw new Error(`Strong mode demands ${t}`);for(const[e,r]of Object.entries(t))if(r)throw new Error(`Strong mode forbids ${e}`)}const{gensym:ge,getref:we,genref:be,genformat:$e}=f($),ve=be(g);let je=null;const Oe=(...e)=>{const t=je(...e);return Oe.errors=je.errors,t};$[ve]=Oe;const xe=l(g,["$ref","$recursiveRef","$dynamicRef"]),Ee=b[H]&&xe&&l(g,["$dynamicAnchor"]),ke=b[Z]?e(", recursive"):e(""),Ae=o();Ae.write("function validate(data%s%s) {",ke,b[H]?e(Ee?", dynAnchors = []":", dynAnchors"):e("")),A&&Ae.write("validate.errors = null"),S&&Ae.write("let errorCount = 0"),b[B]&&Ae.write("validate.evaluatedDynamic = null");let Se=b[H]?e(", dynAnchors"):e("");Ee&&(Ae.write("const dynLocal = [{}]"),Se=e(", [...dynAnchors, dynLocal[0] || []]"));const ze=h(Ae,$,W,{unmodifiedPrototypes:ae,isJSON:ce},D),{present:Me,forObjectKeys:qe,forArray:Ne,patternTest:Pe,compare:Ie}=ze,Re=[],Ue=()=>G.get(w),Ce=O?[O]:[],De=(o,l,f,h,M,V={},{constProp:W}={})=>{const ae=l.length>0&&l[l.length-1].prop===f,de=()=>l.filter(e=>e.prop===f),fe=!f.parent||f.checked||f.inKeys&&ce||de().length>0,ye=m(f),be=(...e)=>((e,t,r=!1)=>Object.freeze({parent:e,keyval:t,checked:r}))(f,...e),je=({path:t=[],prop:r=f,source:n,suberr:s})=>{const i=p([...M,...t]),a=A?(t=>{const r=[];let n=t;for(;n;)n.name||r.unshift(n),n=n.parent||n.errorParent;if(r.every(e=>void 0!==e.keyval))return e("%j",p(r.map(e=>e.keyval)));const s=["#"],o=()=>{const e=s.map(d.pointerPart).join("/");return s.length=0,e};let i=null;for(const{keyname:t,keyval:n,number:a}of r)if(t){a||($.pointerPart=d.pointerPart);const r=a?t:e("pointerPart(%s)",t),n=`${o()}/`;i=i?e("%s+%j+%s",i,n,r):e("%j+%s",n,r)}else n&&s.push(n);return s.length>0?e("%s+%j",i,`/${o()}`):i})(r):null;if(!0===A&&o&&n){$.errorMerge=d.errorMerge;const e=[n,i,a];S?(Ae.write("if (validate.errors === null) validate.errors = []"),Ae.write("validate.errors.push(...%s.map(e => errorMerge(e, %j, %s)))",...e)):Ae.write("validate.errors = [errorMerge(%s[0], %j, %s)]",...e)}else if(!0===A&&o){const t=e("{ keywordLocation: %j, instanceLocation: %s }",i,a);S?(Ae.write("if (%s === null) %s = []",o,o),Ae.write("%s.push(%s)",o,t)):Ae.write("%s = [%s]",o,t)}s&&xt(s),S?Ae.write("errorCount++"):Ae.write("return false")},Oe=(e,t)=>Ae.if(e,()=>je(t));X&&!$.lintErrors&&($.lintErrors=[]);const xe=(e,t)=>{const r=void 0!==t?` ${JSON.stringify(t)}`:"",n=a(O,p(M)),s=`${e}${r} at ${n}`;if(X)return $.lintErrors.push({message:s,keywordLocation:n,schema:g});throw new Error(s)},ke=(t,r)=>{try{return Pe(t,r)}catch(t){return xe(t.message),e("false")}},ze=(e,...t)=>e||xe(...t),_e=(e,...t)=>ze("lax"===x||"spec"===x||e,...t),Le=(e,t)=>_e(!(h[t]<h[e]),`Invalid ${e} / ${t} combination`),Je=(e,t="should be specified")=>ze(!ne,`[requireValidation] ${e} ${t}`),Fe=(...e)=>[...M,...e],Te=e=>ze(!k&&!E,`[removeAdditional/useDefaults] uncertain: ${e}`),Ve=(e,t)=>ze(!ie,`[complexityChecks] ${e}`,t),We=e=>((e,t,r,n)=>{if(t){const n=t.replace(/^http:\/\//,"https://").replace(/#$/,"");r(j.includes(n),"Unexpected schema version:",n),G.set(e,{exclusiveRefs:T(n,"draft/2019-09"),contentValidation:T(n,"draft/2019-09"),dependentUnsupported:T(n,"draft/2019-09"),newItemsSyntax:!T(n,"draft/2020-12"),containsEvaluates:!T(n,"draft/2020-12"),objectContains:!T(n,"draft/next"),bookending:T(n,"draft/next")})}else r(!n,"[requireSchema] $schema is required"),G.set(e,{})})(w,e||le,ze,re),Ke=N(),Be=e=>R(Ke,e);if("boolean"==typeof h)return!0===h?(Je("schema = true","is not allowed"),{stat:Ke}):(Oe(!(!fe&&!f.inKeys)||Me(f),{}),Be({type:[]}),{stat:Ke});ze(J(h),"Schema is not an object");for(const e of Object.keys(h))ze(v.includes(e)||ee,"Keyword not supported:",e);if(0===Object.keys(h).length)return Je("empty rules node","is not allowed"),{stat:Ke};const He=new Set(Object.keys(h)),Ze=new Set,Ye=(e,...t)=>{ze(Ze.has(e)||He.has(e),"Unexpected double consumption:",e),ze(d.hasOwn(h,e),"Is not an own property:",e),ze(t.every(e=>L.has(e)),"Invalid type used in consume"),ze(t.some(t=>L.get(t)(h[e])),"Unexpected type for",e),He.delete(e)},Ge=(e,...t)=>(void 0!==h[e]&&Ye(e,...t),h[e]),Qe=(e,t,r,n={})=>{if(void 0===h[e])return!1;if(Ye(e,...t),null!==r)try{const t=r(h[e]);null!==t&&Oe(t,{path:[e],...n})}catch(e){if(!X||e.message.startsWith("[opt] "))throw e;xe(e.message)}return!0};if(h===w?(We(Ge("$schema","string")),Qe("$vocabulary",["object"],e=>{for(const[t,r]of Object.entries(e))!1!==r&&ze(!0===r&&q.includes(t),"Unknown vocabulary:",t);return null})):Ue()||We(w.$schema),Ue().objectContains)for(const e of["contains","minContains","maxContains"])Ze.add(e);Qe("examples",["array"],null),Qe("example",["jsonval"],null);for(const e of["title","description","$comment"])Qe(e,["string"],null);for(const e of["deprecated","readOnly","writeOnly"])Qe(e,["boolean"],null);Qe("$defs",["object"],null)||Qe("definitions",["object"],null);const Xe=(e,r,n)=>e===g?t("validate"):we(e)||Q(e,r,b,$,n),et=()=>Ce.length>0?Ce[Ce.length-1]:"",tt=Ce.length,rt=e=>(Ce.push(a(et(),e)),null);Ue().exclusiveRefs&&h.$ref||(Qe("$id",["string"],rt)||Qe("id",["string"],rt),Qe("$anchor",["string"],null),Qe("$dynamicAnchor",["string"],null),!h.$recursiveAnchor&&oe||Qe("$recursiveAnchor",["boolean"],e=>(e&&Re.push([h,w,et()]),null)));const nt=Ee&&(h===g||h.id||h.$id);if(nt){const e=c(h);h!==g&&Ae.write("dynLocal.unshift({})");for(const[t,r]of e){const e=i(w,me,`#${t}`,et()),[n,s,o]=e[0]||[];ze(n===r,`Unexpected $dynamicAnchor resolution: ${t}`);const a=Xe(n,s,o);Ae.write("dynLocal[0][%j] = %s",`#${t}`,a)}}const st=e=>b[B]&&(h[e]||!1===h[e]||h===g),ot=Object.freeze({item:st("unevaluatedItems")?ge("evaluatedItem"):null,items:st("unevaluatedItems")?ge("evaluatedItems"):null,props:st("unevaluatedProperties")?ge("evaluatedProps"):null}),it=Object.freeze({item:ot.item||V.item,items:ot.items||V.items,props:ot.props||V.props}),at=()=>(!it.items||Ke.items===1/0)&&(!it.props||Ke.properties.includes(!0)),ct=e=>{if(it.item&&e.item&&Ke.items!==1/0&&Ae.write("%s.push(%s)",it.item,e.item),it.items&&e.items>Ke.items&&Ae.write("%s.push(%d)",it.items,e.items),it.props&&(e.properties||[]).includes(!0)&&!Ke.properties.includes(!0))Ae.write("%s[0].push(true)",it.props);else if(it.props){const t=(e,t)=>C(Ke,{properties:e,patterns:t}),r=(e.properties||[]).filter(e=>!t([e],[])),n=(e.patterns||[]).filter(e=>!t([],[e]));r.length>0&&Ae.write("%s[0].push(...%j)",it.props,r),n.length>0&&Ae.write("%s[1].push(...%j)",it.props,n);for(const t of e.propertiesVars||[])Ae.write("%s[0].push(%s)",it.props,t)}},lt=(e,t,r,n)=>{U(Ke).items&&e.item&&t&&Ae.write("%s.push(...%s)",e.item,t),U(Ke).items&&e.items&&r&&Ae.write("%s.push(...%s)",e.items,r),U(Ke).properties&&e.props&&n&&(Ae.write("%s[0].push(...%s[0])",e.props,n),Ae.write("%s[1].push(...%s[1])",e.props,n))},ut=(t,r)=>{const s=$[t]&&$[t][K]||{unknown:!0};Be(s);const o=e("%s(%s%s%s)",t,ye,b[Z]?0===Re.length?e(", recursive"):e(", recursive || %s",Xe(...Re[0])):e(""),Se);if(!A&&at())return e("!%s",o);const i=ge("res"),a=ge("err"),c=ge("suberr");return A&&Ae.write("const %s = validate.errors",a),Ae.write("const %s = %s",i,o),A&&Ae.write("const %s = %s.errors",c,t),A&&Ae.write("validate.errors = %s",a),Oe(n(i),{...r,source:c}),Ae.if(i,()=>{const r=U(s).items?e("%s.evaluatedDynamic[0]",t):null,n=U(s).items?e("%s.evaluatedDynamic[1]",t):null,o=U(s).properties?e("%s.evaluatedDynamic[2]",t):null;lt(it,r,n,o)}),null},pt=(e,t)=>e&&e.every(e=>t.includes(e)),dt=(e,t)=>t.some(t=>null===e||e.includes(t)),ft=(...e)=>de().some(t=>pt(t.stat.type,e)),mt=(...e)=>dt(Ke.type,e)&&de().every(t=>dt(t.stat.type,e)),yt=(e,t=h)=>{ze("string"==typeof e,"Invalid pattern:",e),(ne||se)&&ze(/^\^.*\$$/.test(e),"Should start with ^ and end with $:",e),/([{+*].*[{+*]|\)[{+*]|^[^^].*[{+*].)/.test(e)&&void 0===t.maxLength&&Ve("maxLength should be specified for pattern:",e)},ht=h.pattern&&!D.has(h.pattern),gt=h.uniqueItems||ht||h.patternProperties||h.format,wt=S&&gt?ge("prev"):null,bt=(t,r)=>Ae.if(!t||null===wt||e("errorCount === %s",wt),r),$t=()=>[...l,{stat:Ke,prop:f}],vt=(...e)=>De(o,$t(),...e).stat,jt=(t,...r)=>{if(r[0]===f){const t=(e=>"boolean"==typeof e?e:!(!J(e)||0!==Object.keys(e).length)||void 0)(r[1]);if(!0===t)return{sub:e("true"),delta:{}};if(!1===t)return{sub:e("false"),delta:{type:[]}}}const n=ge("sub");Ae.write("const %s = (() => {",n),S&&Ae.write("let errorCount = 0");const{stat:s}=De(t,$t(),...r);return S?Ae.write("return errorCount === 0"):Ae.write("return true"),Ae.write("})()"),{sub:n,delta:s}},Ot=()=>{const e=A&&S?ge("suberr"):null;return e&&Ae.write("let %s = null",e),e},xt=e=>{null!==o&&null!==e&&Ae.if(e,()=>Ae.write("%s.push(...%s)",o,e))},Et=()=>{if(!k)return!1;if(!0===k)return!0;if("keyword"===k)return!!h.removeAdditional&&(Ye("removeAdditional","boolean"),!0);throw new Error(`Invalid removeAdditional: ${k}`)},kt=(t,r,n)=>{Qe(t,["object","boolean"],s=>!1===s&&Et()?(Ae.write("if (%s.length > %s) %s.length = %s",ye,r,ye,r),null):!1!==s||n?(Ne(f,r,(e,r)=>(n&&Ae.write("if (%s) continue",n(r)),vt(e,s,Fe(t)))),null):e("%s.length > %s",ye,r))&&Be({items:1/0})},At=(e,t)=>{Qe(e,["object","boolean"],r=>(qe(f,(n,s)=>{Ae.if(t(s),()=>{!1===r&&Et()?Ae.write("delete %s[%s]",ye,s):vt(n,r,Fe(e))})}),null))&&Be({properties:[!0]})},St=(t,s,o)=>r(...s.map(r=>e("%s !== %j",t,r)),...o.map(e=>n(ke(e,t)))),zt=(e,t)=>{const r=t.map(e=>new RegExp(e,"u")),n=t=>e.includes(t)||r.some(e=>e.test(t));for(const e of Ke.required)ze(n(e),"Unknown required property:",e)},Mt=[],qt=()=>{const t=(t,r)=>e("!(%d %c %s)",t,r,ye);Number.isFinite(h.exclusiveMinimum)?Qe("exclusiveMinimum",["finite"],e=>t(e,"<")):(Qe("minimum",["finite"],e=>t(e,h.exclusiveMinimum?"<":"<=")),Qe("exclusiveMinimum",["boolean"],null)),Number.isFinite(h.exclusiveMaximum)?(Qe("exclusiveMaximum",["finite"],e=>t(e,">")),Le("minimum","exclusiveMaximum"),Le("exclusiveMinimum","exclusiveMaximum")):void 0!==h.maximum&&(Qe("maximum",["finite"],e=>t(e,h.exclusiveMaximum?">":">=")),Qe("exclusiveMaximum",["boolean"],null),Le("minimum","maximum"),Le("exclusiveMinimum","maximum"));const r=void 0===h.multipleOf?"divisibleBy":"multipleOf";Qe(r,["finite"],t=>{ze(t>0,`Invalid ${r}:`,t);const[n,s]=`${t}`.split("e-"),o=`${n}.`.split(".")[1].length+(s?Number(s):0);if(Number.isInteger(t*2**o))return e("%s %% %d !== 0",ye,t);$.isMultipleOf=d.isMultipleOf;const i=[ye,t,o,Math.round(t*Math.pow(10,o))];return e("!isMultipleOf(%s, %d, 1e%d, %d)",...i)})},Nt=()=>{Qe("maxLength",["natural"],t=>($.stringLength=d.stringLength,e("%s.length > %d && stringLength(%s) > %d",ye,t,ye,t))),Qe("minLength",["natural"],t=>($.stringLength=d.stringLength,e("%s.length < %d || stringLength(%s) < %d",ye,t,ye,t))),Le("minLength","maxLength"),bt(!0,()=>{const t=(t,r,n=he)=>{const s="string"==typeof t&&d.hasOwn(n,t);ze(s,"Unrecognized format used:",t);const o=n[t],i=o instanceof RegExp||"function"==typeof o;return ze(i,"Invalid format used:",t),ue?o instanceof RegExp?(d.hasOwn(pe,t)&&yt(o.source),e("!%s.test(%s)",$e(o),r)):e("!%s(%s)",$e(o),r):null};Qe("format",["string"],e=>(Be({fullstring:!0}),t(e,ye))),Qe("pattern",["string"],e=>(yt(e),Be({fullstring:!0}),D.has(e)?null:n(ke(e,ye)))),ze(!1!==h.contentSchema,"contentSchema cannot be set to false");const r=void 0===z?Ue().contentValidation:z,s=h.contentEncoding||h.contentMediaType||h.contentSchema;if(ze(!s||r||ee,'"content*" keywords are disabled by default per spec, enable with { contentValidation = true } option (see doc/Options.md for more info)'),s&&r){const e=ge("dec");h.contentMediaType&&Ae.write("let %s = %s",e,ye),"base64"===h.contentEncoding?(Oe(t("base64",ye,u.extra),{path:["contentEncoding"]}),h.contentMediaType&&($.deBase64=d.deBase64,Ae.write("try {"),Ae.write("%s = deBase64(%s)",e,e)),Ye("contentEncoding","string")):ze(!h.contentEncoding,"Unknown contentEncoding:",h.contentEncoding);let r=!1;if("application/json"===h.contentMediaType?(Ae.write("try {"),Ae.write("%s = JSON.parse(%s)",e,e),r=!0,Ye("contentMediaType","string")):ze(!h.contentMediaType,"Unknown contentMediaType:",h.contentMediaType),h.contentSchema){ze(r,"contentSchema requires contentMediaType application/json");const t=Object.freeze({name:e,errorParent:f});vt(t,h.contentSchema,Fe("contentSchema")),Ye("contentSchema","object","array"),Be({fullstring:!0})}h.contentMediaType&&(Ae.write("} catch (e) {"),je({path:["contentMediaType"]}),Ae.write("}"),h.contentEncoding&&(Ae.write("} catch (e) {"),je({path:["contentEncoding"]}),Ae.write("}")))}})},Pt=()=>{Qe("maxItems",["natural"],t=>{const r=Ue().newItemsSyntax?"prefixItems":"items";return Array.isArray(h[r])&&h[r].length>t&&xe(`Invalid maxItems: ${t} is less than ${r} array length`),e("%s.length > %d",ye,t)}),Qe("minItems",["natural"],t=>e("%s.length < %d",ye,t)),Le("minItems","maxItems");const t=e=>{for(let t=0;t<e.length;t++)vt(be(t),e[t],Fe(`${t}`));return Be({items:e.length}),null};Ue().newItemsSyntax?(Qe("prefixItems",["array"],t),kt("items",e("%d",(h.prefixItems||[]).length))):Array.isArray(h.items)?(Qe("items",["array"],t),kt("additionalItems",e("%d",h.items.length))):Qe("items",["object","boolean"],t=>(Ne(f,e("0"),e=>vt(e,t,Fe("items"))),Be({items:1/0}),null)),Ut(t=>{Ne(f,e("0"),(e,r)=>{t(e,()=>{Be({dyn:{item:!0}}),ct({item:r})})})});const r=e=>{if(!J(e))return!1;if(e.enum||d.hasOwn(e,"const"))return!0;if(e.type){if((Array.isArray(e.type)?e.type:[e.type]).every(e=>_.includes(e)))return!0}if(e.$ref){const[t]=i(w,me,e.$ref,et())[0]||[];if(r(t))return!0}return!1},n=e=>!1===e||r(e);bt(!0,()=>{Qe("uniqueItems",["boolean"],t=>!1===t?null:(void 0!==h.maxItems||n(h.items)||Array.isArray(h.items)&&n(h.additionalItems)||Ve("maxItems should be specified for non-primitive uniqueItems"),Object.assign($,{unique:d.unique,deepEqual:d.deepEqual}),e("!unique(%s)",ye)))})},It=e=>!S&&(Ke.required.includes(e)||de().some(t=>t.stat.required.includes(e))),Rt=()=>{const t=e("Object.keys(%s).length",ye);Qe("maxProperties",["natural"],r=>e("%s > %d",t,r)),Qe("minProperties",["natural"],r=>e("%s < %d",t,r)),Le("minProperties","maxProperties"),Qe("propertyNames",["object","boolean"],e=>(qe(f,(t,r)=>{const n="object"!=typeof e||e.$ref?e:{type:"string",...e},s=Object.freeze({name:r,errorParent:t,type:"string"});vt(s,n,Fe("propertyNames"))}),null)),Qe("required",["array"],e=>{for(const t of e){if(It(t))continue;const e=be(t);Oe(n(Me(e)),{path:["required"],prop:e})}return Be({required:e}),null});for(const e of["dependencies","dependentRequired","dependentSchemas"])"dependencies"!==e&&Ue().dependentUnsupported||Qe(e,["object"],t=>{for(const s of Object.keys(t)){const o="string"==typeof t[s]?[t[s]]:t[s],i=be(s,It(s));if(Array.isArray(o)&&"dependentSchemas"!==e){const t=o.filter(e=>!It(e)).map(e=>Me(be(e))),a=n(r(...t)),c={path:[e,s]};0===t.length||(i.checked?(Oe(a,c),Be({required:o})):Oe(r(Me(i),a),c))}else F(o)&&"dependentRequired"!==e?(Te(e),Ae.if(!!i.checked||Me(i),()=>{const t=vt(f,o,Fe(e,s),it);Be(I({},t)),ct(t)})):xe(`Unexpected ${e} entry`)}return null});Qe("propertyDependencies",["object"],e=>{for(const[t,r]of Object.entries(e)){ze(J(r),"propertyDependencies must be an object"),Te("propertyDependencies");const e=be(t,It(t));Ae.if(!!e.checked||Me(e),()=>{for(const[n,s]of Object.entries(r))ze(F(s),"propertyDependencies must contain schemas"),Ae.if(Ie(m(e),n),()=>{const e=vt(f,s,Fe("propertyDependencies",t,n),it);Be(I({},e)),ct(e)})})}return null}),Qe("properties",["object"],e=>{for(const t of Object.keys(e))W!==t&&vt(be(t,It(t)),e[t],Fe("properties",t));return Be({properties:Object.keys(e)}),null}),bt(h.patternProperties,()=>{if(Qe("patternProperties",["object"],e=>(qe(f,(t,r)=>{for(const n of Object.keys(e))yt(n,h.propertyNames||{}),Ae.if(ke(n,r),()=>{vt(t,e[n],Fe("patternProperties",n))})}),Be({patterns:Object.keys(e)}),null)),h.additionalProperties||!1===h.additionalProperties){const e=Object.keys(h.properties||{}),t=Object.keys(h.patternProperties||{});!1===h.additionalProperties&&Mt.push(()=>zt(e,t));At("additionalProperties",r=>St(r,e,t))}}),Ue().objectContains&&Ut(e=>{qe(f,(t,r)=>{e(t,()=>{Be({dyn:{properties:[!0]}}),ct({propertiesVars:[r]})})})})},Ut=t=>{Qe("contains",["object","boolean"],()=>{Te("contains"),Ue().objectContains&&mt("array")&&mt("object")&&Je("possible type confusion in 'contains',","forbid 'object' or 'array'");const r=ge("passes");Ae.write("let %s = 0",r);const n=Ot();return t((e,t)=>{const{sub:s}=jt(n,e,h.contains,Fe("contains"));Ae.if(s,()=>{Ae.write("%s++",r),Ue().containsEvaluates&&(ze(!k,'Can\'t use removeAdditional with draft2020+ "contains"'),t())})}),Qe("minContains",["natural"],t=>e("%s < %d",r,t),{suberr:n})||Oe(e("%s < 1",r),{path:["contains"],suberr:n}),Qe("maxContains",["natural"],t=>e("%s > %d",r,t)),Le("minContains","maxContains"),null})},Ct=()=>{Qe("not",["object","boolean"],e=>jt(null,f,e,Fe("not")).sub),h.not&&Te("not");(h.then||!1===h.then||h.else||!1===h.else||ee)&&Qe("if",["object","boolean"],e=>{Te("if/then/else");const{sub:t,delta:r}=jt(null,f,e,Fe("if"),it);let n,s,o,i;var a;return Qe("else",["object","boolean"],e=>(n=()=>{o=vt(f,e,Fe("else"),it),ct(o)},null)),Qe("then",["object","boolean"],e=>(s=()=>{i=vt(f,e,Fe("then"),it),ct(P(r,i))},null)),s||(a=r,d.deepEqual(a,{type:[]}))||(s=()=>ct(r)),Ae.if(t,s,n),Be(I(o||{},P(r,i||{}))),null});const t=(e,t="allOf")=>{ze(e.length>0,`${t} cannot be empty`);for(const[r,n]of Object.entries(e))Be(vt(f,n,Fe(t,r),it));return null};Qe("allOf",["array"],e=>t(e));let r=null;Qe("discriminator",["object"],e=>{const t=new Set,n=(e,t,r)=>ze(e,`[discriminator]: ${t}`,r),{propertyName:s,mapping:o,...a}=e,c=be(s);n(s&&!h.oneOf!=!h.anyOf,"need propertyName, oneOf OR anyOf"),n(0===Object.keys(a).length,'only "propertyName" and "mapping" are supported');return r=(e,r)=>{const a=()=>{let a;Ae.write("switch (%s) {",m(c));for(const[c,l]of Object.entries(e)){const{const:e,enum:u,...p}=(l.properties||{})[s]||{};let m=void 0!==e?[e]:u;if(!m&&l.$ref){const[e]=i(w,me,l.$ref,et())[0]||[];ze(J(e),"failed to resolve $ref:",l.$ref);const t=(e.properties||{})[s]||{};m=void 0!==t.const?[t.const]:t.enum}const y=Array.isArray(m)&&m.length>0;n(y,"branches should have unique string const or enum values for [propertyName]");const h=!(0!==Object.keys(p).length||e&&u);n(h,"only const OR enum rules are allowed on [propertyName] in branches");for(const e of m){const r=!o||d.hasOwn(o,e)&&o[e]===l.$ref;n(r,"mismatching mapping for",e);const s="string"==typeof e&&!t.has(e);n(s,"const/enum values for [propertyName] should be unique strings"),t.add(e),Ae.write("case %j:",e)}const g=vt(f,l,Fe(r,c),it,{constProp:s});ct(g),a=a?I(a,g):g,Ae.write("break")}var l;n(void 0===o||(J(l=o)?Object.keys(l).length:null)===t.size,"mismatching mapping size"),Be(a),Ae.write("default:"),je({path:[r]}),Ae.write("}")},l=()=>{if(It(s))a();else{const e=["discriminator","propertyName"];Ae.if(Me(c),a,()=>je({path:e,prop:c}))}};return S||!d.deepEqual(Ke.type,["object"])?Ae.if(y.get("object")(ye),l,()=>je({path:["discriminator"]})):l(),n(d.deepEqual(Ke.type,["object"]),"has to be checked for type:","object"),n(Ke.required.includes(s),"propertyName should be placed in required:",s),null},null});const o=(e,t)=>{const r=t.map(e=>e.type||(Array.isArray(e.const)?"array":typeof e.const)),n=r.filter(e=>!_.includes(e)&&"array"!==e).length,s=r.filter(e=>!_.includes(e)&&"object"!==e).length;(n>1||s>1)&&Te(`${e}, use discriminator to make it certain`)};Qe("anyOf",["array"],e=>{if(ze(e.length>0,"anyOf cannot be empty"),1===e.length)return t(e);if(r)return r(e,"anyOf");const i=Ot();if(!at()){o("anyOf",e);const t=Object.entries(e).map(([e,t])=>jt(i,f,t,Fe("anyOf",e),it));Be(t.map(e=>e.delta).reduce((e,t)=>I(e,t))),Oe(s(...t.map(({sub:e})=>e)),{path:["anyOf"],suberr:i});for(const{delta:e,sub:r}of t)Ae.if(r,()=>ct(e));return null}const a=e.filter(e=>d.hasOwn(e,"const")),c=e.filter(e=>!d.hasOwn(e,"const"));o("anyOf",c);const l=[...a,...c];let u;if(Ue().exclusiveRefs){let e=()=>je({path:["anyOf"],suberr:i});for(const[t,r]of Object.entries(l).reverse()){const s=e;e=()=>{const{sub:e,delta:o}=jt(i,f,r,Fe("anyOf",t));Ae.if(n(e),s),u=u?I(u,o):o}}e()}else{const t=Object.entries(e).map(([e,t])=>jt(i,f,t,Fe("anyOf",e),it));u=t.map(e=>e.delta).reduce((e,t)=>I(e,t)),Oe(s(...t.map(({sub:e})=>e)),{path:["anyOf"],suberr:i})}return Be(u),null}),Qe("oneOf",["array"],n=>{if(ze(n.length>0,"oneOf cannot be empty"),1===n.length)return t(n);if(r)return r(n,"oneOf");o("oneOf",n);const s=ge("passes");Ae.write("let %s = 0",s);const i=Ot();let a,c=0;const l=Object.entries(n).map(([t,r])=>{!A&&c++>1&&Oe(e("%s > 1",s),{path:["oneOf"]});const n=jt(i,f,r,Fe("oneOf",t),it);return Ae.if(n.sub,()=>Ae.write("%s++",s)),a=a?I(a,n.delta):n.delta,n});Be(a),Oe(e("%s !== 1",s),{path:["oneOf"]}),Ae.if(e("%s === 0",s),()=>xt(i));for(const e of l)Ae.if(e.sub,()=>ct(e.delta));return null})},Dt=(e,t,r)=>{const[n,s]=[Ae.size(),He.size];Ae.if(!!((...e)=>pt(Ke.type,e)||ft(...e))(...t)||r,e),n===Ae.size()&&s===He.size||ze(mt(...t),"Unexpected rules in type",h.type)},_t=()=>{if(Ke.items===1/0)!1===h.unevaluatedItems&&Ye("unevaluatedItems","boolean");else if(h.unevaluatedItems||!1===h.unevaluatedItems)if(U(Ke).items){if(!b[B])throw new Error("[opt] Dynamic unevaluated tracing not enabled");const t=e("Math.max(%d, ...%s)",Ke.items,it.items),r=t=>e("%s.includes(%s)",it.item,t);kt("unevaluatedItems",t,Ue().containsEvaluates?r:null)}else kt("unevaluatedItems",e("%d",Ke.items))},Lt=()=>{bt(Ke.patterns.length>0||Ke.dyn.patterns.length>0||Ke.unknown,()=>{if(Ke.properties.includes(!0))!1===h.unevaluatedProperties&&Ye("unevaluatedProperties","boolean");else if(h.unevaluatedProperties||!1===h.unevaluatedProperties){const t=e=>St(e,Ke.properties,Ke.patterns);if(U(Ke).properties){if(!b[B])throw new Error("[opt] Dynamic unevaluated tracing not enabled");$.propertyIn=d.propertyIn;const n=t=>e("!propertyIn(%s, %s)",t,it.props);At("unevaluatedProperties",e=>r(t(e),n(e)))}else!1===h.unevaluatedProperties&&zt(Ke.properties,Ke.patterns),At("unevaluatedProperties",t)}})},Jt=()=>{if(null!==wt&&Ae.write("const %s = errorCount",wt),(()=>{const e=Qe("const",["jsonval"],e=>n(Ie(ye,e)));if(e&&!ee)return!0;const t=Qe("enum",["array"],e=>{const t=e.filter(e=>e&&"object"==typeof e),r=e.filter(e=>!(e&&"object"==typeof e));return s(...[...r,...t].map(e=>Ie(ye,e)))});return e||t})()){const e=[...y.keys()];if(Be({properties:[!0],items:1/0,type:e,fullstring:!0}),!ee)return void ze(0===He.size,"Unexpected keywords mixed with const or enum:",[...He])}Dt(qt,["number","integer"],y.get("number")(ye)),Dt(Nt,["string"],y.get("string")(ye)),Dt(Pt,["array"],y.get("array")(ye)),Dt(Rt,["object"],y.get("object")(ye)),Ct(),Dt(_t,["array"],y.get("array")(ye)),Dt(Lt,["object"],y.get("object")(ye));for(const e of Mt)e();lt(V,ot.item,ot.items,ot.props)},Ft=()=>{if(ot.item&&Ae.write("const %s = []",ot.item),ot.items&&Ae.write("const %s = [0]",ot.items),ot.props&&Ae.write("const %s = [[], []]",ot.props),Qe("$ref",["string"],e=>{const t=i(w,me,e,et()),[r,n,s]=t[0]||[];if(!r&&!1!==r&&(xe("failed to resolve $ref:",e),X))return null;const o=Xe(r,n,s),a=r===g?ve:o;if(!$[a])throw new Error("Unexpected: coherence check failed");if(!$[a][K]&&r.type){const e=Array.isArray(r.type)?r.type:[r.type];Be({type:e}),ne&&(Y.add(a),e.includes("array")&&Be({items:1/0}),e.includes("object")&&Be({properties:[!0]})),se&&e.includes("string")&&(Y.add(a),Be({fullstring:!0}))}return ut(o,{path:["$ref"]})}),Ue().exclusiveRefs&&(ze(!b[B],"unevaluated* is supported only on draft2019-09 and above"),h.$ref))return;Qe("$recursiveRef",["string"],t=>{if(!b[Z])throw new Error("[opt] Recursive anchors are not enabled");ze("#"===t,'Behavior of $recursiveRef is defined only for "#"');const r=i(w,me,"#",et()),[n,s,o]=r[0];_e(n.$recursiveAnchor,"$recursiveRef without $recursiveAnchor");const a=Xe(n,s,o),c=n.$recursiveAnchor?e("(recursive || %s)",a):a;return ut(c,{path:["$recursiveRef"]})}),Qe("$dynamicRef",["string"],t=>{if(!b[H])throw new Error("[opt] Dynamic anchors are not enabled");_e(/^[^#]*#[a-zA-Z0-9_-]+$/.test(t),"Unsupported $dynamicRef format");const r=t.replace(/^[^#]+/,""),n=i(w,me,t,et());if(!n[0]&&!Ue().bookending){_e(!1,"$dynamicRef bookending resolution failed (even though not required)"),$.dynamicResolve=d.dynamicResolve;const t=e("dynamicResolve(dynAnchors || [], %j)",r);return ut(t,{path:["$dynamicRef"]})}ze(n[0],"$dynamicRef bookending resolution failed",t);const[s,o,a]=n[0],c=s.$dynamicAnchor&&`#${s.$dynamicAnchor}`===r;_e(c,"$dynamicRef without $dynamicAnchor in the same scope");const l=Xe(s,o,a);$.dynamicResolve=d.dynamicResolve;const u=c?e("(dynamicResolve(dynAnchors || [], %j) || %s)",r,l):l;return ut(u,{path:["$dynamicRef"]})});let t=null;Qe("type",["string","array"],e=>{const r=Array.isArray(e)?e:[e];for(const e of r)ze("string"==typeof e&&y.has(e),"Unknown type:",e);if(f.type)return ze(d.deepEqual(r,[f.type]),"One type allowed:",f.type),Be({type:[f.type]}),null;if(ft(...r))return null;const n=r.filter(e=>mt(e));return 0===n.length&&xe("No valid types possible"),Be({type:r}),t=s(...n.map(e=>y.get(e)(ye))),null}),t&&S?Ae.if(t,()=>je({path:["type"]}),Jt):(t&&Oe(t,{path:["type"]}),Jt()),Ke.items<1/0&&h.maxItems<=Ke.items&&Be({items:1/0})};if(void 0!==h.default&&E){fe&&xe("Can not apply default value here (e.g. at root)");const e=Ge("default","jsonval");Ae.if(Me(f),Ft,()=>Ae.write("%s = %j",ye,e))}else Qe("default",["jsonval"],null),Ae.if(!!fe||Me(f),Ft);if(Ce.length=tt,Re[0]&&Re[Re.length-1][0]===h&&Re.pop(),nt&&h!==g&&Ae.write("dynLocal.shift()"),te||ze(!Ae.optimizedOut,"some checks are never reachable"),ae){const e=["not","if","then","else"].includes(M[M.length-1]),t=["oneOf","anyOf","allOf"].includes(M[M.length-2]),r=["dependencies","dependentSchemas"].includes(M[M.length-2]),n=["propertyDependencies"].includes(M[M.length-3]);ze(e||t||r||n,"Unexpected logical path")}else if(!M.includes("not")){if((!(g!==w&&h===g)||Y.has(ve))&&(Y.delete(ve),Ke.type||Je("type"),mt("array")&&Ke.items!==1/0&&Je(h.items?"additionalItems or unevaluatedItems":"items rule"),mt("object")&&!Ke.properties.includes(!0)&&Je("additionalProperties or unevaluatedProperties"),!Ke.fullstring&&se)){xe(`[requireStringValidation] ${"pattern, format or contentSchema should be specified for strings"}, use pattern: ^[\\s\\S]*$ to opt-out`)}if("object"!=typeof h.propertyNames)for(const e of["additionalProperties","unevaluatedProperties"])h[e]&&Je(`wild-card ${e}`,"requires propertyNames")}return h.properties&&!h.required&&Je("if properties is used, required"),ze(0===He.size||ee,"Unprocessed keywords:",[...He]),{stat:Ke,local:ot}},{stat:_e,local:Le}=De(e("validate.errors"),[],{name:t("data")},g,[]);if(Y.has(ve))throw new Error("Unexpected: unvalidated cyclic ref");if(b[B]&&(U(_e).items||U(_e).properties)){if(!Le)throw new Error("Failed to trace dynamic properties");Ae.write("validate.evaluatedDynamic = [%s, %s, %s]",Le.item,Le.items,Le.props)}return S?Ae.write("return errorCount === 0"):Ae.write("return true"),Ae.write("}"),X||(je=Ae.makeFunction($),delete $[ve],$[ve]=je),$[ve][K]=_e,ve},X=(e,t)=>{if(!Array.isArray(e))throw new Error("Expected an array of schemas");try{const r=Object.create(null),{getref:n}=f(r);Y.clear(),G.clear();const s=e.map(e=>n(e)||Q(e,e,t,r));if(0!==Y.size)throw new Error("Unexpected: not all refs are validated");return{scope:r,refs:s}}catch(r){if(!t[B]&&"[opt] Dynamic unevaluated tracing not enabled"===r.message)return X(e,{...t,[B]:!0});if(!t[H]&&"[opt] Dynamic anchors are not enabled"===r.message)return X(e,{...t,[H]:!0});if(!t[Z]&&"[opt] Recursive anchors are not enabled"===r.message)return X(e,{...t,[Z]:!0});throw r}finally{Y.clear(),G.clear()}};return b={compile:X}}function N(){if(j)return v;j=1;const e=A(),{buildSchemas:t}=z(),{compile:r}=q(),{deepEqual:n}=E(),s=e=>function t(r){if(!n(r,JSON.parse(JSON.stringify(r))))return t.errors=[{instanceLocation:"#",error:"not JSON compatible"}],!1;const s=e(r);return t.errors=e.errors,s},o=e=>t=>n(t,JSON.parse(JSON.stringify(t)))&&e(t),i=(i,{parse:l=!1,multi:u=!1,jsonCheck:p=!1,isJSON:d=!1,schemas:f=[],...m}={})=>{if(p&&d)throw new Error("Can not specify both isJSON and jsonCheck options");if(l&&(p||d))throw new Error("jsonCheck and isJSON options are not applicable in parser mode");const y=d||p||l,h=u?i:[i],g={mode:l?"strong":"default",...m,schemas:t(f,h),isJSON:y},{scope:w,refs:b}=r(h,g);if(m.dryRun)return;if(m.lint)return w.lintErrors;const $=e();if(l?w.parseWrap=m.includeErrors?a:c:p&&(w.deepEqual=n,w.jsonCheckWrap=m.includeErrors?s:o),u){$.write("[");for(const e of b.slice(0,-1))$.write("%s,",e);b.length>0&&$.write("%s",b[b.length-1]),$.write("]"),l?$.write(".map(parseWrap)"):p&&$.write(".map(jsonCheckWrap)")}else l?$.write("parseWrap(%s)",b[0]):p?$.write("jsonCheckWrap(%s)",b[0]):$.write("%s",b[0]);const v=$.makeFunction(w);return v.toModule=({semi:e=!0}={})=>$.makeModule(w)+(e?";":""),v.toJSON=()=>i,v},a=e=>t=>{if("string"!=typeof t)return{valid:!1,error:"Input is not a string"};try{const r=JSON.parse(t);if(!e(r)){const{keywordLocation:t,instanceLocation:r}=e.errors[0],n=t.slice(t.lastIndexOf("/")+1);return{valid:!1,error:`JSON validation failed for ${n} at ${r}`,errors:e.errors}}return{valid:!0,value:r}}catch({message:e}){return{valid:!1,error:e}}},c=e=>t=>{if("string"!=typeof t)return{valid:!1};try{const r=JSON.parse(t);return e(r)?{valid:!0,value:r}:{valid:!1}}catch(e){return{valid:!1}}};return v={validator:i,parser:function(e,{parse:t=!0,...r}={}){if(!t)throw new Error("can not disable parse in parser");return i(e,{parse:t,...r})},lint:function(e,{lint:t=!0,...r}={}){if(!t)throw new Error("can not disable lint option in lint()");return i(e,{lint:t,...r})}}}export{N as r};