@blockcerts/blockcerts-verifier 1.57.3 → 1.57.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -118,7 +118,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
118
118
  Code distributed by Google as part of the polymer project is also
119
119
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
120
120
  */const me=e=>t=>class extends t{connectedCallback(){this.__storeUnsubscribe=e.subscribe((()=>this._stateChanged(e.getState()))),this._stateChanged(e.getState()),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){this.__storeUnsubscribe(),super.disconnectedCallback&&super.disconnectedCallback()}_stateChanged(e){throw new Error("_stateChanged() not implemented")}};function ve(e){return ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ve(e)}function ye(e){var t=function(e,t){if("object"!==ve(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!==ve(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ve(t)?t:String(t)}function we(e,t,i){return(t=ye(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function xe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function ke(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(i),!0).forEach((function(t){we(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):xe(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function _e(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Ce="function"==typeof Symbol&&Symbol.observable||"@@observable",Ae=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ee={INIT:"@@redux/INIT"+Ae(),REPLACE:"@@redux/REPLACE"+Ae(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ae()}};function Se(e,t,i){var r;if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(_e(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw new Error(_e(1));return i(Se)(e,t)}if("function"!=typeof e)throw new Error(_e(2));var n=e,o=t,a=[],s=a,c=!1;function u(){s===a&&(s=a.slice())}function l(){if(c)throw new Error(_e(3));return o}function d(e){if("function"!=typeof e)throw new Error(_e(4));if(c)throw new Error(_e(5));var t=!0;return u(),s.push(e),function(){if(t){if(c)throw new Error(_e(6));t=!1,u();var i=s.indexOf(e);s.splice(i,1),a=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(_e(7));if(void 0===e.type)throw new Error(_e(8));if(c)throw new Error(_e(9));try{c=!0,o=n(o,e)}finally{c=!1}for(var t=a=s,i=0;i<t.length;i++){(0,t[i])()}return e}return p({type:Ee.INIT}),(r={dispatch:p,subscribe:d,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(_e(10));n=e,p({type:Ee.REPLACE})}})[Ce]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(_e(11));function i(){e.next&&e.next(l())}return i(),{unsubscribe:t(i)}}})[Ce]=function(){return this},e},r}function Pe(e,t){return function(){return t(e.apply(this,arguments))}}function Ie(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function Te(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(e){return function(){var i=e.apply(void 0,arguments),r=function(){throw new Error(_e(15))},n={getState:i.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=t.map((function(e){return e(n)}));return r=Ie.apply(void 0,o)(i.dispatch),ke(ke({},i),{},{dispatch:r})}}}function Le(e){return function(t){var i=t.dispatch,r=t.getState;return function(t){return function(n){return"function"==typeof n?n(i,r,e):t(n)}}}}var De=Le();De.withExtraArgument=Le;var Me=De;function Oe(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function Re(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}Oe((function e(t,i,r){e.super_.call(this,"E",t),Object.defineProperty(this,"lhs",{value:i,enumerable:!0}),Object.defineProperty(this,"rhs",{value:r,enumerable:!0})}),Re),Oe((function e(t,i){e.super_.call(this,"N",t),Object.defineProperty(this,"rhs",{value:i,enumerable:!0})}),Re),Oe((function e(t,i){e.super_.call(this,"D",t),Object.defineProperty(this,"lhs",{value:i,enumerable:!0})}),Re),Oe((function e(t,i,r){e.super_.call(this,"A",t),Object.defineProperty(this,"index",{value:i,enumerable:!0}),Object.defineProperty(this,"item",{value:r,enumerable:!0})}),Re);const Be="AUTO_VERIFY",je="INITIALIZE",Fe="UPDATE_CERTIFICATE_DEFINITION",Ne="RESET_CERTIFICATE_DEFINITION",ze="UPDATE_CERTIFICATE_URL",Ve="VERIFY_CERTIFICATE",$e="VALIDATE_URL_INPUT",Ue="CLEAR_VERIFIED_STEPS",He="STEP_VERIFIED",qe="UPDATE_PARENT_STEP_STATUS",Ke="UPDATE_VERIFICATION_STATUS",Je="UPDATE_FINAL_STEP",Ge="RESET_VERIFICATION_STATUS",Ye="SET_ERROR_MESSAGE",We="SHOW_VERIFICATION_MODAL",Ze="UPDATE_IS_GENERATING_PDF";const Xe={get:(e,t)=>{const i=t in e?e[t]:null;return i||console.warn("the service does not exist",t),i}};var Qe;!function(e){e.TEXT_HTML="text/html",e.IMAGE_PNG="image/png",e.IMAGE_JPEG="image/jpeg",e.IMAGE_GIF="image/gif",e.IMAGE_BMP="image/bmp",e.APPLICATION_PDF="application/pdf"}(Qe||(Qe={}));const et=["text","image","signature","variable"];function tt(e){const t=(new DOMParser).parseFromString(e,Qe.TEXT_HTML);return t.body.childElementCount===t.body.querySelectorAll(et.map((e=>`section[class*="${e}"]`)).join(", ")).length}const it="?format=json";function rt(e,t){return"string"!=typeof e?(console.warn("Trying to test a non string variable"),!1):0===e.indexOf(t)}function nt(e){return"string"==typeof e}var ot;!function(e){e.blockcypher="blockcypher",e.blockstream="blockstream",e.etherscan="etherscan"}(ot||(ot={}));const at="{transaction_id}";var st;!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"}(st||(st={}));var ct,ut=st;!function(e){e.blockcypher="blockcypher",e.blockstream="blockstream",e.etherscan="etherscan"}(ct||(ct={}));const lt="{transaction_id}";var dt,pt;!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"}(dt||(dt={})),function(e){e.btc="btc",e.eth="eth",e.mocknet="mocknet"}(pt||(pt={}));const ht={[dt.Bitcoin]:{code:dt.Bitcoin,blinkCode:pt.btc,name:"Bitcoin",prefixes:["6a20","OP_RETURN "],signatureValue:"bitcoinMainnet",transactionTemplates:{full:`https://blockchain.info/tx/${lt}`,raw:`https://blockchain.info/rawtx/${lt}`}},[dt.Ethmain]:{code:dt.Ethmain,blinkCode:pt.eth,name:"Ethereum",prefixes:["0x"],signatureValue:"ethereumMainnet",transactionTemplates:{full:`https://etherscan.io/tx/${lt}`,raw:`https://etherscan.io/tx/${lt}`}},[dt.Ethropst]:{code:dt.Ethropst,blinkCode:pt.eth,name:"Ethereum Testnet",signatureValue:"ethereumRopsten",transactionTemplates:{full:`https://ropsten.etherscan.io/tx/${lt}`,raw:`https://ropsten.etherscan.io/getRawTx?tx=${lt}`}},[dt.Ethrinkeby]:{code:dt.Ethrinkeby,blinkCode:pt.eth,name:"Ethereum Testnet",signatureValue:"ethereumRinkeby",transactionTemplates:{full:`https://rinkeby.etherscan.io/tx/${lt}`,raw:`https://rinkeby.etherscan.io/getRawTx?tx=${lt}`}},[dt.Ethgoerli]:{code:dt.Ethgoerli,blinkCode:pt.eth,name:"Ethereum Testnet",signatureValue:"ethereumGoerli",transactionTemplates:{full:`https://goerli.etherscan.io/tx/${lt}`,raw:`https://goerli.etherscan.io/getRawTx?tx=${lt}`}},[dt.Ethsepolia]:{code:dt.Ethsepolia,blinkCode:pt.eth,name:"Ethereum Testnet",signatureValue:"ethereumSepolia",transactionTemplates:{full:`https://sepolia.etherscan.io/tx/${lt}`,raw:`https://sepolia.etherscan.io/getRawTx?tx=${lt}`}},[dt.Mocknet]:{code:dt.Mocknet,blinkCode:pt.mocknet,name:"Mocknet",test:!0,signatureValue:"mockchain",transactionTemplates:{full:"",raw:""}},[dt.Regtest]:{code:dt.Regtest,blinkCode:pt.mocknet,name:"Mocknet",test:!0,signatureValue:"bitcoinRegtest",transactionTemplates:{full:"",raw:""}},[dt.Testnet]:{code:dt.Testnet,blinkCode:pt.btc,name:"Bitcoin Testnet",signatureValue:"bitcoinTestnet",transactionTemplates:{full:`https://testnet.blockchain.info/tx/${lt}`,raw:`https://testnet.blockchain.info/rawtx/${lt}`}}};const ft={SecurityContextUrl:"https://w3id.org/security/v1",MininumConfirmations:1,MinimumBlockchainExplorers:1,Race:!0,PublicKey:"ecdsa-koblitz-pubkey:1"};var gt=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 bt(e,t,i=[]){return gt(this,void 0,void 0,(function*(){if((e=Array.from(e)).length<t)throw new Error("Could not retrieve tx data");const r=e.map(((e,t)=>e.then((()=>t)).catch((e=>{throw t}))));return Promise.race(r).then((r=>(e.splice(r,1)[0].then((e=>i.push(e))),1===t?i:bt(e,t-1,i)))).catch((r=>(e.splice(r,1),bt(e,t,i))))}))}function mt({explorerAPI:e,transactionIdPlaceholder:t=lt,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!==ht.bitcoin.code&&e!==ht.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 vt="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},yt=[],wt=[],xt="undefined"!=typeof Uint8Array?Uint8Array:Array,kt=!1;function _t(){kt=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)yt[t]=e[t],wt[e.charCodeAt(t)]=t;wt["-".charCodeAt(0)]=62,wt["_".charCodeAt(0)]=63}function Ct(e,t,i){for(var r,n,o=[],a=t;a<i;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(yt[(n=r)>>18&63]+yt[n>>12&63]+yt[n>>6&63]+yt[63&n]);return o.join("")}function At(e){var t;kt||_t();for(var i=e.length,r=i%3,n="",o=[],a=16383,s=0,c=i-r;s<c;s+=a)o.push(Ct(e,s,s+a>c?c:s+a));return 1===r?(t=e[i-1],n+=yt[t>>2],n+=yt[t<<4&63],n+="=="):2===r&&(t=(e[i-2]<<8)+e[i-1],n+=yt[t>>10],n+=yt[t>>4&63],n+=yt[t<<2&63],n+="="),o.push(n),o.join("")}function Et(e,t,i,r,n){var o,a,s=8*n-r-1,c=(1<<s)-1,u=c>>1,l=-7,d=i?n-1:0,p=i?-1:1,h=e[t+d];for(d+=p,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+d],d+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+d],d+=p,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)}function St(e,t,i,r,n,o){var a,s,c,u=8*o-n-1,l=(1<<u)-1,d=l>>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,f=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?p/c:p*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*c-1)*Math.pow(2,n),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,n),a=0));n>=8;e[i+h]=255&s,h+=f,s/=256,n-=8);for(a=a<<n|s,u+=n;u>0;e[i+h]=255&a,h+=f,a/=256,u-=8);e[i+h-f]|=128*g}var Pt={}.toString,It=Array.isArray||function(e){return"[object Array]"==Pt.call(e)};Mt.TYPED_ARRAY_SUPPORT=void 0===vt.TYPED_ARRAY_SUPPORT||vt.TYPED_ARRAY_SUPPORT;var Tt=Lt();function Lt(){return Mt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Dt(e,t){if(Lt()<t)throw new RangeError("Invalid typed array length");return Mt.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Mt.prototype:(null===e&&(e=new Mt(t)),e.length=t),e}function Mt(e,t,i){if(!(Mt.TYPED_ARRAY_SUPPORT||this instanceof Mt))return new Mt(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Bt(this,e)}return Ot(this,e,t,i)}function Ot(e,t,i,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,r){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===i&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,i):new Uint8Array(t,i,r);Mt.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Mt.prototype:e=jt(e,t);return e}(e,t,i,r):"string"==typeof t?function(e,t,i){"string"==typeof i&&""!==i||(i="utf8");if(!Mt.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|zt(t,i);e=Dt(e,r);var n=e.write(t,i);n!==r&&(e=e.slice(0,n));return e}(e,t,i):function(e,t){if(Nt(t)){var i=0|Ft(t.length);return 0===(e=Dt(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?Dt(e,0):jt(e,t);if("Buffer"===t.type&&It(t.data))return jt(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Rt(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Bt(e,t){if(Rt(t),e=Dt(e,t<0?0:0|Ft(t)),!Mt.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function jt(e,t){var i=t.length<0?0:0|Ft(t.length);e=Dt(e,i);for(var r=0;r<i;r+=1)e[r]=255&t[r];return e}function Ft(e){if(e>=Lt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Lt().toString(16)+" bytes");return 0|e}function Nt(e){return!(null==e||!e._isBuffer)}function zt(e,t){if(Nt(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return hi(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return fi(e).length;default:if(r)return hi(e).length;t=(""+t).toLowerCase(),r=!0}}function Vt(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return ii(this,t,i);case"utf8":case"utf-8":return Xt(this,t,i);case"ascii":return ei(this,t,i);case"latin1":case"binary":return ti(this,t,i);case"base64":return Zt(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ri(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function $t(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function Ut(e,t,i,r,n){if(0===e.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=n?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof t&&(t=Mt.from(t,r)),Nt(t))return 0===t.length?-1:Ht(e,t,i,r,n);if("number"==typeof t)return t&=255,Mt.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):Ht(e,[t],i,r,n);throw new TypeError("val must be string, number or Buffer")}function Ht(e,t,i,r,n){var o,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,i/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){var l=-1;for(o=i;o<s;o++)if(u(e,o)===u(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(i+c>s&&(i=s-c),o=i;o>=0;o--){for(var d=!0,p=0;p<c;p++)if(u(e,o+p)!==u(t,p)){d=!1;break}if(d)return o}return-1}function qt(e,t,i,r){i=Number(i)||0;var n=e.length-i;r?(r=Number(r))>n&&(r=n):r=n;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[i+a]=s}return a}function Kt(e,t,i,r){return gi(hi(t,e.length-i),e,i,r)}function Jt(e,t,i,r){return gi(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,r)}function Gt(e,t,i,r){return Jt(e,t,i,r)}function Yt(e,t,i,r){return gi(fi(t),e,i,r)}function Wt(e,t,i,r){return gi(function(e,t){for(var i,r,n,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(i=e.charCodeAt(a))>>8,n=i%256,o.push(n),o.push(r);return o}(t,e.length-i),e,i,r)}function Zt(e,t,i){return 0===t&&i===e.length?At(e):At(e.slice(t,i))}function Xt(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n<i;){var o,a,s,c,u=e[n],l=null,d=u>239?4:u>223?3:u>191?2:1;if(n+d<=i)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[n+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[n+1],a=e[n+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[n+1],a=e[n+2],s=e[n+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),n+=d}return function(e){var t=e.length;if(t<=Qt)return String.fromCharCode.apply(String,e);var i="",r=0;for(;r<t;)i+=String.fromCharCode.apply(String,e.slice(r,r+=Qt));return i}(r)}Mt.poolSize=8192,Mt._augment=function(e){return e.__proto__=Mt.prototype,e},Mt.from=function(e,t,i){return Ot(null,e,t,i)},Mt.TYPED_ARRAY_SUPPORT&&(Mt.prototype.__proto__=Uint8Array.prototype,Mt.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Mt[Symbol.species]),Mt.alloc=function(e,t,i){return function(e,t,i,r){return Rt(t),t<=0?Dt(e,t):void 0!==i?"string"==typeof r?Dt(e,t).fill(i,r):Dt(e,t).fill(i):Dt(e,t)}(null,e,t,i)},Mt.allocUnsafe=function(e){return Bt(null,e)},Mt.allocUnsafeSlow=function(e){return Bt(null,e)},Mt.isBuffer=bi,Mt.compare=function(e,t){if(!Nt(e)||!Nt(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,r=t.length,n=0,o=Math.min(i,r);n<o;++n)if(e[n]!==t[n]){i=e[n],r=t[n];break}return i<r?-1:r<i?1:0},Mt.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Mt.concat=function(e,t){if(!It(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Mt.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var r=Mt.allocUnsafe(t),n=0;for(i=0;i<e.length;++i){var o=e[i];if(!Nt(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,n),n+=o.length}return r},Mt.byteLength=zt,Mt.prototype._isBuffer=!0,Mt.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)$t(this,t,t+1);return this},Mt.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)$t(this,t,t+3),$t(this,t+1,t+2);return this},Mt.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)$t(this,t,t+7),$t(this,t+1,t+6),$t(this,t+2,t+5),$t(this,t+3,t+4);return this},Mt.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Xt(this,0,e):Vt.apply(this,arguments)},Mt.prototype.equals=function(e){if(!Nt(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Mt.compare(this,e)},Mt.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Mt.prototype.compare=function(e,t,i,r,n){if(!Nt(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),t<0||i>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&t>=i)return 0;if(r>=n)return-1;if(t>=i)return 1;if(this===e)return 0;for(var o=(n>>>=0)-(r>>>=0),a=(i>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(r,n),u=e.slice(t,i),l=0;l<s;++l)if(c[l]!==u[l]){o=c[l],a=u[l];break}return o<a?-1:a<o?1:0},Mt.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},Mt.prototype.indexOf=function(e,t,i){return Ut(this,e,t,i,!0)},Mt.prototype.lastIndexOf=function(e,t,i){return Ut(this,e,t,i,!1)},Mt.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)r=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return qt(this,e,t,i);case"utf8":case"utf-8":return Kt(this,e,t,i);case"ascii":return Jt(this,e,t,i);case"latin1":case"binary":return Gt(this,e,t,i);case"base64":return Yt(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},Mt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Qt=4096;function ei(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(127&e[n]);return r}function ti(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(e[n]);return r}function ii(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var n="",o=t;o<i;++o)n+=pi(e[o]);return n}function ri(e,t,i){for(var r=e.slice(t,i),n="",o=0;o<r.length;o+=2)n+=String.fromCharCode(r[o]+256*r[o+1]);return n}function ni(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function oi(e,t,i,r,n,o){if(!Nt(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(i+r>e.length)throw new RangeError("Index out of range")}function ai(e,t,i,r){t<0&&(t=65535+t+1);for(var n=0,o=Math.min(e.length-i,2);n<o;++n)e[i+n]=(t&255<<8*(r?n:1-n))>>>8*(r?n:1-n)}function si(e,t,i,r){t<0&&(t=4294967295+t+1);for(var n=0,o=Math.min(e.length-i,4);n<o;++n)e[i+n]=t>>>8*(r?n:3-n)&255}function ci(e,t,i,r,n,o){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function ui(e,t,i,r,n){return n||ci(e,0,i,4),St(e,t,i,r,23,4),i+4}function li(e,t,i,r,n){return n||ci(e,0,i,8),St(e,t,i,r,52,8),i+8}Mt.prototype.slice=function(e,t){var i,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),Mt.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=Mt.prototype;else{var n=t-e;i=new Mt(n,void 0);for(var o=0;o<n;++o)i[o]=this[o+e]}return i},Mt.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||ni(e,t,this.length);for(var r=this[e],n=1,o=0;++o<t&&(n*=256);)r+=this[e+o]*n;return r},Mt.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||ni(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},Mt.prototype.readUInt8=function(e,t){return t||ni(e,1,this.length),this[e]},Mt.prototype.readUInt16LE=function(e,t){return t||ni(e,2,this.length),this[e]|this[e+1]<<8},Mt.prototype.readUInt16BE=function(e,t){return t||ni(e,2,this.length),this[e]<<8|this[e+1]},Mt.prototype.readUInt32LE=function(e,t){return t||ni(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Mt.prototype.readUInt32BE=function(e,t){return t||ni(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Mt.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||ni(e,t,this.length);for(var r=this[e],n=1,o=0;++o<t&&(n*=256);)r+=this[e+o]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*t)),r},Mt.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||ni(e,t,this.length);for(var r=t,n=1,o=this[e+--r];r>0&&(n*=256);)o+=this[e+--r]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*t)),o},Mt.prototype.readInt8=function(e,t){return t||ni(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Mt.prototype.readInt16LE=function(e,t){t||ni(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},Mt.prototype.readInt16BE=function(e,t){t||ni(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},Mt.prototype.readInt32LE=function(e,t){return t||ni(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Mt.prototype.readInt32BE=function(e,t){return t||ni(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Mt.prototype.readFloatLE=function(e,t){return t||ni(e,4,this.length),Et(this,e,!0,23,4)},Mt.prototype.readFloatBE=function(e,t){return t||ni(e,4,this.length),Et(this,e,!1,23,4)},Mt.prototype.readDoubleLE=function(e,t){return t||ni(e,8,this.length),Et(this,e,!0,52,8)},Mt.prototype.readDoubleBE=function(e,t){return t||ni(e,8,this.length),Et(this,e,!1,52,8)},Mt.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||oi(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,o=0;for(this[t]=255&e;++o<i&&(n*=256);)this[t+o]=e/n&255;return t+i},Mt.prototype.writeUIntBE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||oi(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,o=1;for(this[t+n]=255&e;--n>=0&&(o*=256);)this[t+n]=e/o&255;return t+i},Mt.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||oi(this,e,t,1,255,0),Mt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Mt.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||oi(this,e,t,2,65535,0),Mt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ai(this,e,t,!0),t+2},Mt.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||oi(this,e,t,2,65535,0),Mt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ai(this,e,t,!1),t+2},Mt.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||oi(this,e,t,4,4294967295,0),Mt.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):si(this,e,t,!0),t+4},Mt.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||oi(this,e,t,4,4294967295,0),Mt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):si(this,e,t,!1),t+4},Mt.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);oi(this,e,t,i,n-1,-n)}var o=0,a=1,s=0;for(this[t]=255&e;++o<i&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+i},Mt.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);oi(this,e,t,i,n-1,-n)}var o=i-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+i},Mt.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||oi(this,e,t,1,127,-128),Mt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Mt.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||oi(this,e,t,2,32767,-32768),Mt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ai(this,e,t,!0),t+2},Mt.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||oi(this,e,t,2,32767,-32768),Mt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ai(this,e,t,!1),t+2},Mt.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||oi(this,e,t,4,2147483647,-2147483648),Mt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):si(this,e,t,!0),t+4},Mt.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||oi(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Mt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):si(this,e,t,!1),t+4},Mt.prototype.writeFloatLE=function(e,t,i){return ui(this,e,t,!0,i)},Mt.prototype.writeFloatBE=function(e,t,i){return ui(this,e,t,!1,i)},Mt.prototype.writeDoubleLE=function(e,t,i){return li(this,e,t,!0,i)},Mt.prototype.writeDoubleBE=function(e,t,i){return li(this,e,t,!1,i)},Mt.prototype.copy=function(e,t,i,r){if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-i&&(r=e.length-t+i);var n,o=r-i;if(this===e&&i<t&&t<r)for(n=o-1;n>=0;--n)e[n+t]=this[n+i];else if(o<1e3||!Mt.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)e[n+t]=this[n+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+o),t);return o},Mt.prototype.fill=function(e,t,i,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!Mt.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var o;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o<i;++o)this[o]=e;else{var a=Nt(e)?e:hi(new Mt(e,r).toString()),s=a.length;for(o=0;o<i-t;++o)this[o+t]=a[o%s]}return this};var di=/[^+\/0-9A-Za-z-_]/g;function pi(e){return e<16?"0"+e.toString(16):e.toString(16)}function hi(e,t){var i;t=t||1/0;for(var r=e.length,n=null,o=[],a=0;a<r;++a){if((i=e.charCodeAt(a))>55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&o.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;o.push(i)}else if(i<2048){if((t-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function fi(e){return function(e){var t,i,r,n,o,a;kt||_t();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new xt(3*s/4-o),r=o>0?s-4:s;var c=0;for(t=0,i=0;t<r;t+=4,i+=3)n=wt[e.charCodeAt(t)]<<18|wt[e.charCodeAt(t+1)]<<12|wt[e.charCodeAt(t+2)]<<6|wt[e.charCodeAt(t+3)],a[c++]=n>>16&255,a[c++]=n>>8&255,a[c++]=255&n;return 2===o?(n=wt[e.charCodeAt(t)]<<2|wt[e.charCodeAt(t+1)]>>4,a[c++]=255&n):1===o&&(n=wt[e.charCodeAt(t)]<<10|wt[e.charCodeAt(t+1)]<<4|wt[e.charCodeAt(t+2)]>>2,a[c++]=n>>8&255,a[c++]=255&n),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(di,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function gi(e,t,i,r){for(var n=0;n<r&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function bi(e){return null!=e&&(!!e._isBuffer||mi(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&mi(e.slice(0,0))}(e))}function mi(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var vi=Object.freeze({__proto__:null,Buffer:Mt,INSPECT_MAX_BYTES:50,SlowBuffer:function(e){return+e!=e&&(e=0),Mt.alloc(+e)},isBuffer:bi,kMaxLength:Tt});function yi(){throw new Error("setTimeout has not been defined")}function wi(){throw new Error("clearTimeout has not been defined")}var xi=yi,ki=wi;function _i(e){if(xi===setTimeout)return setTimeout(e,0);if((xi===yi||!xi)&&setTimeout)return xi=setTimeout,setTimeout(e,0);try{return xi(e,0)}catch(t){try{return xi.call(null,e,0)}catch(t){return xi.call(this,e,0)}}}"function"==typeof vt.setTimeout&&(xi=setTimeout),"function"==typeof vt.clearTimeout&&(ki=clearTimeout);var Ci,Ai=[],Ei=!1,Si=-1;function Pi(){Ei&&Ci&&(Ei=!1,Ci.length?Ai=Ci.concat(Ai):Si=-1,Ai.length&&Ii())}function Ii(){if(!Ei){var e=_i(Pi);Ei=!0;for(var t=Ai.length;t;){for(Ci=Ai,Ai=[];++Si<t;)Ci&&Ci[Si].run();Si=-1,t=Ai.length}Ci=null,Ei=!1,function(e){if(ki===clearTimeout)return clearTimeout(e);if((ki===wi||!ki)&&clearTimeout)return ki=clearTimeout,clearTimeout(e);try{return ki(e)}catch(t){try{return ki.call(null,e)}catch(t){return ki.call(this,e)}}}(e)}}function Ti(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];Ai.push(new Li(e,t)),1!==Ai.length||Ei||_i(Ii)}function Li(e,t){this.fun=e,this.array=t}Li.prototype.run=function(){this.fun.apply(null,this.array)};function Di(){}var Mi=Di,Oi=Di,Ri=Di,Bi=Di,ji=Di,Fi=Di,Ni=Di;var zi=vt.performance||{},Vi=zi.now||zi.mozNow||zi.msNow||zi.oNow||zi.webkitNow||function(){return(new Date).getTime()};var $i=new Date;var Ui={nextTick:Ti,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Mi,addListener:Oi,once:Ri,off:Bi,removeListener:ji,removeAllListeners:Fi,emit:Ni,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Vi.call(zi),i=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(i-=e[0],(r-=e[1])<0&&(i--,r+=1e9)),[i,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-$i)/1e3}},Hi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function qi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ki(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),i}
121
- /*! https://mths.be/punycode v1.4.1 by @mathias */var Ji=2147483647,Gi=36,Yi=1,Wi=26,Zi=38,Xi=700,Qi=72,er=128,tr="-",ir=/[^\x20-\x7E]/,rr=/[\x2E\u3002\uFF0E\uFF61]/g,nr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},or=Gi-Yi,ar=Math.floor,sr=String.fromCharCode;function cr(e){throw new RangeError(nr[e])}function ur(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function lr(e,t,i){var r=0;for(e=i?ar(e/Xi):e>>1,e+=ar(e/t);e>or*Wi>>1;r+=Gi)e=ar(e/or);return ar(r+(or+1)*e/(e+Zi))}function dr(e){return function(e,t){var i=e.split("@"),r="";i.length>1&&(r=i[0]+"@",e=i[1]);var n=function(e,t){for(var i=e.length,r=[];i--;)r[i]=t(e[i]);return r}((e=e.replace(rr,".")).split("."),t).join(".");return r+n}(e,(function(e){return ir.test(e)?"xn--"+function(e){var t,i,r,n,o,a,s,c,u,l,d,p,h,f,g,b=[];for(e=function(e){for(var t,i,r=[],n=0,o=e.length;n<o;)(t=e.charCodeAt(n++))>=55296&&t<=56319&&n<o?56320==(64512&(i=e.charCodeAt(n++)))?r.push(((1023&t)<<10)+(1023&i)+65536):(r.push(t),n--):r.push(t);return r}(e),p=e.length,t=er,i=0,o=Qi,a=0;a<p;++a)(d=e[a])<128&&b.push(sr(d));for(r=n=b.length,n&&b.push(tr);r<p;){for(s=Ji,a=0;a<p;++a)(d=e[a])>=t&&d<s&&(s=d);for(s-t>ar((Ji-i)/(h=r+1))&&cr("overflow"),i+=(s-t)*h,t=s,a=0;a<p;++a)if((d=e[a])<t&&++i>Ji&&cr("overflow"),d==t){for(c=i,u=Gi;!(c<(l=u<=o?Yi:u>=o+Wi?Wi:u-o));u+=Gi)g=c-l,f=Gi-l,b.push(sr(ur(l+g%f,0))),c=ar(g/f);b.push(sr(ur(c,0))),o=lr(i,h,r==n),i=0,++r}++i,++t}return b.join("")}(e):e}))}var pr="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e},hr=/%[sdj%]/g;function fr(e){if(!Tr(e)){for(var t=[],i=0;i<arguments.length;i++)t.push(yr(arguments[i]));return t.join(" ")}i=1;for(var r=arguments,n=r.length,o=String(e).replace(hr,(function(e){if("%%"===e)return"%";if(i>=n)return e;switch(e){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch(e){return"[Circular]"}default:return e}})),a=r[i];i<n;a=r[++i])Sr(a)||!Or(a)?o+=" "+a:o+=" "+yr(a);return o}function gr(e,t){if(Dr(vt.process))return function(){return gr(e,t).apply(this,arguments)};if(!0===Ui.noDeprecation)return e;var i=!1;return function(){if(!i){if(Ui.throwDeprecation)throw new Error(t);Ui.traceDeprecation?console.trace(t):console.error(t),i=!0}return e.apply(this,arguments)}}var br,mr={};function vr(e){if(Dr(br)&&(br=Ui.env.NODE_DEBUG||""),e=e.toUpperCase(),!mr[e])if(new RegExp("\\b"+e+"\\b","i").test(br)){mr[e]=function(){var t=fr.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else mr[e]=function(){};return mr[e]}function yr(e,t){var i={seen:[],stylize:xr};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),Er(t)?i.showHidden=t:t&&Hr(i,t),Dr(i.showHidden)&&(i.showHidden=!1),Dr(i.depth)&&(i.depth=2),Dr(i.colors)&&(i.colors=!1),Dr(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=wr),kr(i,e,i.depth)}function wr(e,t){var i=yr.styles[t];return i?"["+yr.colors[i][0]+"m"+e+"["+yr.colors[i][1]+"m":e}function xr(e,t){return e}function kr(e,t,i){if(e.customInspect&&t&&jr(t.inspect)&&t.inspect!==yr&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(i,e);return Tr(r)||(r=kr(e,r,i)),r}var n=function(e,t){if(Dr(t))return e.stylize("undefined","undefined");if(Tr(t)){var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(i,"string")}if(Ir(t))return e.stylize(""+t,"number");if(Er(t))return e.stylize(""+t,"boolean");if(Sr(t))return e.stylize("null","null")}(e,t);if(n)return n;var o=Object.keys(t),a=function(e){var t={};return e.forEach((function(e,i){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),Br(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return _r(t);if(0===o.length){if(jr(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(Mr(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Rr(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Br(t))return _r(t)}var c,u="",l=!1,d=["{","}"];(Ar(t)&&(l=!0,d=["[","]"]),jr(t))&&(u=" [Function"+(t.name?": "+t.name:"")+"]");return Mr(t)&&(u=" "+RegExp.prototype.toString.call(t)),Rr(t)&&(u=" "+Date.prototype.toUTCString.call(t)),Br(t)&&(u=" "+_r(t)),0!==o.length||l&&0!=t.length?i<0?Mr(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=l?function(e,t,i,r,n){for(var o=[],a=0,s=t.length;a<s;++a)qr(t,String(a))?o.push(Cr(e,t,i,r,String(a),!0)):o.push("");return n.forEach((function(n){n.match(/^\d+$/)||o.push(Cr(e,t,i,r,n,!0))})),o}(e,t,i,a,o):o.map((function(r){return Cr(e,t,i,a,r,l)})),e.seen.pop(),function(e,t,i){var r=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return i[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+i[1];return i[0]+t+" "+e.join(", ")+" "+i[1]}(c,u,d)):d[0]+u+d[1]}function _r(e){return"["+Error.prototype.toString.call(e)+"]"}function Cr(e,t,i,r,n,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),qr(r,n)||(a="["+n+"]"),s||(e.seen.indexOf(c.value)<0?(s=Sr(i)?kr(e,c.value,null):kr(e,c.value,i-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),Dr(a)){if(o&&n.match(/^\d+$/))return s;(a=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function Ar(e){return Array.isArray(e)}function Er(e){return"boolean"==typeof e}function Sr(e){return null===e}function Pr(e){return null==e}function Ir(e){return"number"==typeof e}function Tr(e){return"string"==typeof e}function Lr(e){return"symbol"==typeof e}function Dr(e){return void 0===e}function Mr(e){return Or(e)&&"[object RegExp]"===zr(e)}function Or(e){return"object"==typeof e&&null!==e}function Rr(e){return Or(e)&&"[object Date]"===zr(e)}function Br(e){return Or(e)&&("[object Error]"===zr(e)||e instanceof Error)}function jr(e){return"function"==typeof e}function Fr(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function Nr(e){return bi(e)}function zr(e){return Object.prototype.toString.call(e)}function Vr(e){return e<10?"0"+e.toString(10):e.toString(10)}yr.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},yr.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var $r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ur(){var e,t;console.log("%s - %s",(e=new Date,t=[Vr(e.getHours()),Vr(e.getMinutes()),Vr(e.getSeconds())].join(":"),[e.getDate(),$r[e.getMonth()],t].join(" ")),fr.apply(null,arguments))}function Hr(e,t){if(!t||!Or(t))return e;for(var i=Object.keys(t),r=i.length;r--;)e[i[r]]=t[i[r]];return e}function qr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Kr={inherits:pr,_extend:Hr,log:Ur,isBuffer:Nr,isPrimitive:Fr,isFunction:jr,isError:Br,isDate:Rr,isObject:Or,isRegExp:Mr,isUndefined:Dr,isSymbol:Lr,isString:Tr,isNumber:Ir,isNullOrUndefined:Pr,isNull:Sr,isBoolean:Er,isArray:Ar,inspect:yr,deprecate:gr,format:fr,debuglog:vr},Jr=Object.freeze({__proto__:null,_extend:Hr,debuglog:vr,default:Kr,deprecate:gr,format:fr,inherits:pr,inspect:yr,isArray:Ar,isBoolean:Er,isBuffer:Nr,isDate:Rr,isError:Br,isFunction:jr,isNull:Sr,isNullOrUndefined:Pr,isNumber:Ir,isObject:Or,isPrimitive:Fr,isRegExp:Mr,isString:Tr,isSymbol:Lr,isUndefined:Dr,log:Ur});function Gr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Yr=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function Wr(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function Zr(e,t){if(e.map)return e.map(t);for(var i=[],r=0;r<e.length;r++)i.push(t(e[r],r));return i}var Xr=Object.keys||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return t};function Qr(e,t,i,r){t=t||"&",i=i||"=";var n={};if("string"!=typeof e||0===e.length)return n;var o=/\+/g;e=e.split(t);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var c=0;c<s;++c){var u,l,d,p,h=e[c].replace(o,"%20"),f=h.indexOf(i);f>=0?(u=h.substr(0,f),l=h.substr(f+1)):(u=h,l=""),d=decodeURIComponent(u),p=decodeURIComponent(l),Gr(n,d)?Yr(n[d])?n[d].push(p):n[d]=[n[d],p]:n[d]=p}return n}var en={parse:bn,resolve:wn,resolveObject:xn,format:vn,Url:tn};function tn(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var rn=/^([a-z0-9.+-]+:)/i,nn=/:[0-9]*$/,on=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,an=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),sn=["'"].concat(an),cn=["%","/","?",";","#"].concat(sn),un=["/","?","#"],ln=255,dn=/^[+a-z0-9A-Z_-]{0,63}$/,pn=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,hn={javascript:!0,"javascript:":!0},fn={javascript:!0,"javascript:":!0},gn={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function bn(e,t,i){if(e&&Or(e)&&e instanceof tn)return e;var r=new tn;return r.parse(e,t,i),r}function mn(e,t,i,r){if(!Tr(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),o=-1!==n&&n<t.indexOf("#")?"?":"#",a=t.split(o);a[0]=a[0].replace(/\\/g,"/");var s=t=a.join(o);if(s=s.trim(),!r&&1===t.split("#").length){var c=on.exec(s);if(c)return e.path=s,e.href=s,e.pathname=c[1],c[2]?(e.search=c[2],e.query=i?Qr(e.search.substr(1)):e.search.substr(1)):i&&(e.search="",e.query={}),e}var u,l,d,p,h=rn.exec(s);if(h){var f=(h=h[0]).toLowerCase();e.protocol=f,s=s.substr(h.length)}if(r||h||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===s.substr(0,2);!g||h&&fn[h]||(s=s.substr(2),e.slashes=!0)}if(!fn[h]&&(g||h&&!gn[h])){var b,m,v=-1;for(u=0;u<un.length;u++)-1!==(l=s.indexOf(un[u]))&&(-1===v||l<v)&&(v=l);for(-1!==(m=-1===v?s.lastIndexOf("@"):s.lastIndexOf("@",v))&&(b=s.slice(0,m),s=s.slice(m+1),e.auth=decodeURIComponent(b)),v=-1,u=0;u<cn.length;u++)-1!==(l=s.indexOf(cn[u]))&&(-1===v||l<v)&&(v=l);-1===v&&(v=s.length),e.host=s.slice(0,v),s=s.slice(v),kn(e),e.hostname=e.hostname||"";var y="["===e.hostname[0]&&"]"===e.hostname[e.hostname.length-1];if(!y){var w=e.hostname.split(/\./);for(u=0,d=w.length;u<d;u++){var x=w[u];if(x&&!x.match(dn)){for(var k="",_=0,C=x.length;_<C;_++)x.charCodeAt(_)>127?k+="x":k+=x[_];if(!k.match(dn)){var A=w.slice(0,u),E=w.slice(u+1),S=x.match(pn);S&&(A.push(S[1]),E.unshift(S[2])),E.length&&(s="/"+E.join(".")+s),e.hostname=A.join(".");break}}}}e.hostname.length>ln?e.hostname="":e.hostname=e.hostname.toLowerCase(),y||(e.hostname=dr(e.hostname)),p=e.port?":"+e.port:"";var P=e.hostname||"";e.host=P+p,e.href+=e.host,y&&(e.hostname=e.hostname.substr(1,e.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!hn[f])for(u=0,d=sn.length;u<d;u++){var I=sn[u];if(-1!==s.indexOf(I)){var T=encodeURIComponent(I);T===I&&(T=escape(I)),s=s.split(I).join(T)}}var L=s.indexOf("#");-1!==L&&(e.hash=s.substr(L),s=s.slice(0,L));var D=s.indexOf("?");if(-1!==D?(e.search=s.substr(D),e.query=s.substr(D+1),i&&(e.query=Qr(e.query)),s=s.slice(0,D)):i&&(e.search="",e.query={}),s&&(e.pathname=s),gn[f]&&e.hostname&&!e.pathname&&(e.pathname="/"),e.pathname||e.search){p=e.pathname||"";var M=e.search||"";e.path=p+M}return e.href=yn(e),e}function vn(e){return Tr(e)&&(e=mn({},e)),yn(e)}function yn(e){var t=e.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var i,r,n,o,a=e.protocol||"",s=e.pathname||"",c=e.hash||"",u=!1,l="";e.host?u=t+e.host:e.hostname&&(u=t+(-1===e.hostname.indexOf(":")?e.hostname:"["+this.hostname+"]"),e.port&&(u+=":"+e.port)),e.query&&Or(e.query)&&Object.keys(e.query).length&&(i=e.query,r=r||"&",n=n||"=",null===i&&(i=void 0),l="object"==typeof i?Zr(Xr(i),(function(e){var t=encodeURIComponent(Wr(e))+n;return Yr(i[e])?Zr(i[e],(function(e){return t+encodeURIComponent(Wr(e))})).join(r):t+encodeURIComponent(Wr(i[e]))})).join(r):o?encodeURIComponent(Wr(o))+n+encodeURIComponent(Wr(i)):"");var d=e.search||l&&"?"+l||"";return a&&":"!==a.substr(-1)&&(a+=":"),e.slashes||(!a||gn[a])&&!1!==u?(u="//"+(u||""),s&&"/"!==s.charAt(0)&&(s="/"+s)):u||(u=""),c&&"#"!==c.charAt(0)&&(c="#"+c),d&&"?"!==d.charAt(0)&&(d="?"+d),a+u+(s=s.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(d=d.replace("#","%23"))+c}function wn(e,t){return bn(e,!1,!0).resolve(t)}function xn(e,t){return e?bn(e,!1,!0).resolveObject(t):t}function kn(e){var t=e.host,i=nn.exec(t);i&&(":"!==(i=i[0])&&(e.port=i.substr(1)),t=t.substr(0,t.length-i.length)),t&&(e.hostname=t)}tn.prototype.parse=function(e,t,i){return mn(this,e,t,i)},tn.prototype.format=function(){return yn(this)},tn.prototype.resolve=function(e){return this.resolveObject(bn(e,!1,!0)).format()},tn.prototype.resolveObject=function(e){if(Tr(e)){var t=new tn;t.parse(e,!1,!0),e=t}for(var i,r=new tn,n=Object.keys(this),o=0;o<n.length;o++){var a=n[o];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),c=0;c<s.length;c++){var u=s[c];"protocol"!==u&&(r[u]=e[u])}return gn[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!gn[e.protocol]){for(var l=Object.keys(e),d=0;d<l.length;d++){var p=l[d];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||fn[e.protocol])r.pathname=e.pathname;else{for(i=(e.pathname||"").split("/");i.length&&!(e.host=i.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),r.pathname=i.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var h=r.pathname||"",f=r.search||"";r.path=h+f}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var g,b=r.pathname&&"/"===r.pathname.charAt(0),m=e.host||e.pathname&&"/"===e.pathname.charAt(0),v=m||b||r.host&&e.pathname,y=v,w=r.pathname&&r.pathname.split("/")||[],x=r.protocol&&!gn[r.protocol];if(i=e.pathname&&e.pathname.split("/")||[],x&&(r.hostname="",r.port=null,r.host&&(""===w[0]?w[0]=r.host:w.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===i[0]?i[0]=e.host:i.unshift(e.host)),e.host=null),v=v&&(""===i[0]||""===w[0])),m)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,w=i;else if(i.length)w||(w=[]),w.pop(),w=w.concat(i),r.search=e.search,r.query=e.query;else if(!Pr(e.search))return x&&(r.hostname=r.host=w.shift(),(g=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=g.shift(),r.host=r.hostname=g.shift())),r.search=e.search,r.query=e.query,Sr(r.pathname)&&Sr(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=w.slice(-1)[0],_=(r.host||e.host||w.length>1)&&("."===k||".."===k)||""===k,C=0,A=w.length;A>=0;A--)"."===(k=w[A])?w.splice(A,1):".."===k?(w.splice(A,1),C++):C&&(w.splice(A,1),C--);if(!v&&!y)for(;C--;C)w.unshift("..");!v||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),_&&"/"!==w.join("/").substr(-1)&&w.push("");var E=""===w[0]||w[0]&&"/"===w[0].charAt(0);return x&&(r.hostname=r.host=E?"":w.length?w.shift():"",(g=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=g.shift(),r.host=r.hostname=g.shift())),(v=v||r.host&&w.length)&&!E&&w.unshift(""),w.length?r.pathname=w.join("/"):(r.pathname=null,r.path=null),Sr(r.pathname)&&Sr(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},tn.prototype.parseHost=function(){return kn(this)};var _n,Cn,An=Ki(Object.freeze({__proto__:null,Url:tn,default:en,format:vn,parse:bn,resolve:wn,resolveObject:xn})),En={},Sn=Object.freeze({__proto__:null,default:En}),Pn=Ki(Sn),In=Fn(vt.fetch)&&Fn(vt.ReadableStream);function Tn(e){Cn||(Cn=new vt.XMLHttpRequest).open("GET",vt.location.host?"/":"https://example.com");try{return Cn.responseType=e,Cn.responseType===e}catch(e){return!1}}var Ln=void 0!==vt.ArrayBuffer,Dn=Ln&&Fn(vt.ArrayBuffer.prototype.slice),Mn=Ln&&Tn("arraybuffer"),On=!In&&Dn&&Tn("ms-stream"),Rn=!In&&Ln&&Tn("moz-chunked-arraybuffer"),Bn=Fn(Cn.overrideMimeType),jn=Fn(vt.VBArray);function Fn(e){return"function"==typeof e}function Nn(){}function zn(){zn.init.call(this)}function Vn(e){return void 0===e._maxListeners?zn.defaultMaxListeners:e._maxListeners}function $n(e,t,i,r){var n,o,a,s;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e._events),a=o[t]):(o=e._events=new Nn,e._eventsCount=0),a){if("function"==typeof a?a=o[t]=r?[i,a]:[a,i]:r?a.unshift(i):a.push(i),!a.warned&&(n=Vn(e))&&n>0&&a.length>n){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,"function"==typeof console.warn?console.warn(s):console.log(s)}}else a=o[t]=i,++e._eventsCount;return e}function Un(e,t,i){var r=!1;function n(){e.removeListener(t,n),r||(r=!0,i.apply(e,arguments))}return n.listener=i,n}function Hn(e){var t=this._events;if(t){var i=t[e];if("function"==typeof i)return 1;if(i)return i.length}return 0}function qn(e,t){for(var i=new Array(t);t--;)i[t]=e[t];return i}Cn=null,Nn.prototype=Object.create(null),zn.EventEmitter=zn,zn.usingDomains=!1,zn.prototype.domain=void 0,zn.prototype._events=void 0,zn.prototype._maxListeners=void 0,zn.defaultMaxListeners=10,zn.init=function(){this.domain=null,zn.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Nn,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},zn.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},zn.prototype.getMaxListeners=function(){return Vn(this)},zn.prototype.emit=function(e){var t,i,r,n,o,a,s,c="error"===e;if(a=this._events)c=c&&null==a.error;else if(!c)return!1;if(s=this.domain,c){if(t=arguments[1],!s){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(i=a[e]))return!1;var l="function"==typeof i;switch(r=arguments.length){case 1:!function(e,t,i){if(t)e.call(i);else for(var r=e.length,n=qn(e,r),o=0;o<r;++o)n[o].call(i)}(i,l,this);break;case 2:!function(e,t,i,r){if(t)e.call(i,r);else for(var n=e.length,o=qn(e,n),a=0;a<n;++a)o[a].call(i,r)}(i,l,this,arguments[1]);break;case 3:!function(e,t,i,r,n){if(t)e.call(i,r,n);else for(var o=e.length,a=qn(e,o),s=0;s<o;++s)a[s].call(i,r,n)}(i,l,this,arguments[1],arguments[2]);break;case 4:!function(e,t,i,r,n,o){if(t)e.call(i,r,n,o);else for(var a=e.length,s=qn(e,a),c=0;c<a;++c)s[c].call(i,r,n,o)}(i,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(r-1),o=1;o<r;o++)n[o-1]=arguments[o];!function(e,t,i,r){if(t)e.apply(i,r);else for(var n=e.length,o=qn(e,n),a=0;a<n;++a)o[a].apply(i,r)}(i,l,this,n)}return!0},zn.prototype.addListener=function(e,t){return $n(this,e,t,!1)},zn.prototype.on=zn.prototype.addListener,zn.prototype.prependListener=function(e,t){return $n(this,e,t,!0)},zn.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,Un(this,e,t)),this},zn.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,Un(this,e,t)),this},zn.prototype.removeListener=function(e,t){var i,r,n,o,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(i=r[e]))return this;if(i===t||i.listener&&i.listener===t)0==--this._eventsCount?this._events=new Nn:(delete r[e],r.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(n=-1,o=i.length;o-- >0;)if(i[o]===t||i[o].listener&&i[o].listener===t){a=i[o].listener,n=o;break}if(n<0)return this;if(1===i.length){if(i[0]=void 0,0==--this._eventsCount)return this._events=new Nn,this;delete r[e]}else!function(e,t){for(var i=t,r=i+1,n=e.length;r<n;i+=1,r+=1)e[i]=e[r];e.pop()}(i,n);r.removeListener&&this.emit("removeListener",e,a||t)}return this},zn.prototype.removeAllListeners=function(e){var t,i;if(!(i=this._events))return this;if(!i.removeListener)return 0===arguments.length?(this._events=new Nn,this._eventsCount=0):i[e]&&(0==--this._eventsCount?this._events=new Nn:delete i[e]),this;if(0===arguments.length){for(var r,n=Object.keys(i),o=0;o<n.length;++o)"removeListener"!==(r=n[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new Nn,this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},zn.prototype.listeners=function(e){var t,i=this._events;return i&&(t=i[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(t):[]},zn.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Hn.call(e,t)},zn.prototype.listenerCount=Hn,zn.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Kn=Object.freeze({__proto__:null,EventEmitter:zn,default:zn});function Jn(){this.head=null,this.tail=null,this.length=0}Jn.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},Jn.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},Jn.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},Jn.prototype.clear=function(){this.head=this.tail=null,this.length=0},Jn.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i},Jn.prototype.concat=function(e){if(0===this.length)return Mt.alloc(0);if(1===this.length)return this.head.data;for(var t=Mt.allocUnsafe(e>>>0),i=this.head,r=0;i;)i.data.copy(t,r),r+=i.data.length,i=i.next;return t};var Gn=Mt.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Yn(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!Gn(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Zn;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Xn;break;default:return void(this.write=Wn)}this.charBuffer=new Mt(6),this.charReceived=0,this.charLength=0}function Wn(e){return e.toString(this.encoding)}function Zn(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function Xn(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}Yn.prototype.write=function(e){for(var t="";this.charLength;){var i=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,i),this.charReceived+=i,this.charReceived<this.charLength)return"";if(e=e.slice(i,e.length),!((n=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived);var n;r=(t+=e.toString(this.encoding,0,r)).length-1;if((n=t.charCodeAt(r))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,r)}return t},Yn.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var i=e[e.length-t];if(1==t&&i>>5==6){this.charLength=2;break}if(t<=2&&i>>4==14){this.charLength=3;break}if(t<=3&&i>>3==30){this.charLength=4;break}}this.charReceived=t},Yn.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var i=this.charReceived,r=this.charBuffer,n=this.encoding;t+=r.slice(0,i).toString(n)}return t};var Qn=Object.freeze({__proto__:null,StringDecoder:Yn});io.ReadableState=to;var eo=vr("stream");function to(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Lo&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new Jn,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new Yn(e.encoding),this.encoding=e.encoding)}function io(e){if(!(this instanceof io))return new io(e);this._readableState=new to(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),zn.call(this)}function ro(e,t,i,r,n){var o=function(e,t){var i=null;bi(t)||"string"==typeof t||null==t||e.objectMode||(i=new TypeError("Invalid non-string/buffer chunk"));return i}(t,i);if(o)e.emit("error",o);else if(null===i)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length)}t.ended=!0,ao(e)}(e,t);else if(t.objectMode||i&&i.length>0)if(t.ended&&!n){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&n){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var c;!t.decoder||n||r||(i=t.decoder.write(i),c=!t.objectMode&&0===i.length),n||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",i),e.read(0)):(t.length+=t.objectMode?1:i.length,n?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&ao(e))),function(e,t){t.readingMore||(t.readingMore=!0,Ti(co,e,t))}(e,t)}else n||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}pr(io,zn),io.prototype.push=function(e,t){var i=this._readableState;return i.objectMode||"string"!=typeof e||(t=t||i.defaultEncoding)!==i.encoding&&(e=Mt.from(e,t),t=""),ro(this,i,e,t,!1)},io.prototype.unshift=function(e){return ro(this,this._readableState,e,"",!0)},io.prototype.isPaused=function(){return!1===this._readableState.flowing},io.prototype.setEncoding=function(e){return this._readableState.decoder=new Yn(e),this._readableState.encoding=e,this};var no=8388608;function oo(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=no?e=no:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function ao(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(eo("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Ti(so,e):so(e))}function so(e){eo("emit readable"),e.emit("readable"),po(e)}function co(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(eo("maybeReadMore read 0"),e.read(0),i!==t.length);)i=t.length;t.readingMore=!1}function uo(e){eo("readable nexttick read 0"),e.read(0)}function lo(e,t){t.reading||(eo("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),po(e),t.flowing&&!t.reading&&e.read(0)}function po(e){var t=e._readableState;for(eo("flow",t.flowing);t.flowing&&null!==e.read(););}function ho(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():i?function(e,t){var i=t.head,r=1,n=i.data;e-=n.length;for(;i=i.next;){var o=i.data,a=e>o.length?o.length:e;if(a===o.length?n+=o:n+=o.slice(0,e),0===(e-=a)){a===o.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=o.slice(a));break}++r}return t.length-=r,n}(e,t):function(e,t){var i=Mt.allocUnsafe(e),r=t.head,n=1;r.data.copy(i),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(i,i.length-e,0,a),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t);return r}(e,t.buffer,t.decoder),i);var i}function fo(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Ti(go,t,e))}function go(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function bo(e,t){for(var i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1}function mo(){}function vo(e,t,i){this.chunk=e,this.encoding=t,this.callback=i,this.next=null}function yo(e,t){Object.defineProperty(this,"buffer",{get:gr((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof Lo&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var n=!1===e.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,r,n){--t.pendingcb,i?Ti(n,r):n(r);e._writableState.errorEmitted=!0,e.emit("error",r)}(e,i,r,t,n);else{var o=Co(i);o||i.corked||i.bufferProcessing||!i.bufferedRequest||_o(e,i),r?Ti(ko,e,i,o,n):ko(e,i,o,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new So(this)}function wo(e){if(!(this instanceof wo||this instanceof Lo))return new wo(e);this._writableState=new yo(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),zn.call(this)}function xo(e,t,i,r,n,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,i?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function ko(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),Eo(e,t)}function _o(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,n=new Array(r),o=t.corkedRequestsFree;o.entry=i;for(var a=0;i;)n[a]=i,i=i.next,a+=1;xo(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new So(t)}else{for(;i;){var s=i.chunk,c=i.encoding,u=i.callback;if(xo(e,t,!1,t.objectMode?1:s.length,s,c,u),i=i.next,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=i,t.bufferProcessing=!1}function Co(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Ao(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Eo(e,t){var i=Co(t);return i&&(0===t.pendingcb?(Ao(e,t),t.finished=!0,e.emit("finish")):Ao(e,t)),i}function So(e){var t=this;this.next=null,this.entry=null,this.finish=function(i){var r=t.entry;for(t.entry=null;r;){var n=r.callback;e.pendingcb--,n(i),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}io.prototype.read=function(e){eo("read",e),e=parseInt(e,10);var t=this._readableState,i=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return eo("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?fo(this):ao(this),null;if(0===(e=oo(e,t))&&t.ended)return 0===t.length&&fo(this),null;var r,n=t.needReadable;return eo("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&eo("length less than watermark",n=!0),t.ended||t.reading?eo("reading or ended",n=!1):n&&(eo("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=oo(i,t))),null===(r=e>0?ho(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&fo(this)),null!==r&&this.emit("data",r),r},io.prototype._read=function(e){this.emit("error",new Error("not implemented"))},io.prototype.pipe=function(e,t){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,eo("pipe count=%d opts=%j",r.pipesCount,t);var n=!t||!1!==t.end?a:u;function o(e){eo("onunpipe"),e===i&&u()}function a(){eo("onend"),e.end()}r.endEmitted?Ti(n):i.once("end",n),e.on("unpipe",o);var s=function(e){return function(){var t=e._readableState;eo("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,po(e))}}(i);e.on("drain",s);var c=!1;function u(){eo("cleanup"),e.removeListener("close",h),e.removeListener("finish",f),e.removeListener("drain",s),e.removeListener("error",p),e.removeListener("unpipe",o),i.removeListener("end",a),i.removeListener("end",u),i.removeListener("data",d),c=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var l=!1;function d(t){eo("ondata"),l=!1,!1!==e.write(t)||l||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==bo(r.pipes,e))&&!c&&(eo("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,l=!0),i.pause())}function p(t){var i;eo("onerror",t),g(),e.removeListener("error",p),0===(i="error",e.listeners(i).length)&&e.emit("error",t)}function h(){e.removeListener("finish",f),g()}function f(){eo("onfinish"),e.removeListener("close",h),g()}function g(){eo("unpipe"),i.unpipe(e)}return i.on("data",d),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",p),e.once("close",h),e.once("finish",f),e.emit("pipe",i),r.flowing||(eo("pipe resume"),i.resume()),e},io.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var i=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var n=0;n<r;n++)i[n].emit("unpipe",this);return this}var o=bo(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},io.prototype.on=function(e,t){var i=zn.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&ao(this):Ti(uo,this))}return i},io.prototype.addListener=io.prototype.on,io.prototype.resume=function(){var e=this._readableState;return e.flowing||(eo("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Ti(lo,e,t))}(this,e)),this},io.prototype.pause=function(){return eo("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(eo("pause"),this._readableState.flowing=!1,this.emit("pause")),this},io.prototype.wrap=function(e){var t=this._readableState,i=!1,r=this;for(var n in e.on("end",(function(){if(eo("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(n){(eo("wrapped data"),t.decoder&&(n=t.decoder.write(n)),t.objectMode&&null==n)||(t.objectMode||n&&n.length)&&(r.push(n)||(i=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));return function(e,t){for(var i=0,r=e.length;i<r;i++)t(e[i],i)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){eo("wrapped _read",t),i&&(i=!1,e.resume())},r},io._fromList=ho,wo.WritableState=yo,pr(wo,zn),yo.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},wo.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},wo.prototype.write=function(e,t,i){var r=this._writableState,n=!1;return"function"==typeof t&&(i=t,t=null),Mt.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof i&&(i=mo),r.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),Ti(t,i)}(this,i):function(e,t,i,r){var n=!0,o=!1;return null===i?o=new TypeError("May not write null values to stream"):Mt.isBuffer(i)||"string"==typeof i||void 0===i||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),Ti(r,o),n=!1),n}(this,r,e,i)&&(r.pendingcb++,n=function(e,t,i,r,n){i=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=Mt.from(t,i));return t}(t,i,r),Mt.isBuffer(i)&&(r="buffer");var o=t.objectMode?1:i.length;t.length+=o;var a=t.length<t.highWaterMark;a||(t.needDrain=!0);if(t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest=new vo(i,r,n),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else xo(e,t,!1,o,i,r,n);return a}(this,r,e,t,i)),n},wo.prototype.cork=function(){this._writableState.corked++},wo.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||_o(this,e))},wo.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},wo.prototype._write=function(e,t,i){i(new Error("not implemented"))},wo.prototype._writev=null,wo.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,i){t.ending=!0,Eo(e,t),i&&(t.finished?Ti(i):e.once("finish",i));t.ended=!0,e.writable=!1}(this,r,i)},pr(Lo,io);for(var Po=Object.keys(wo.prototype),Io=0;Io<Po.length;Io++){var To=Po[Io];Lo.prototype[To]||(Lo.prototype[To]=wo.prototype[To])}function Lo(e){if(!(this instanceof Lo))return new Lo(e);io.call(this,e),wo.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Do)}function Do(){this.allowHalfOpen||this._writableState.ended||Ti(Mo,this)}function Mo(e){e.end()}function Oo(e){this.afterTransform=function(t,i){return function(e,t,i){var r=e._transformState;r.transforming=!1;var n=r.writecb;if(!n)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=i&&e.push(i);n(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,i)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function Ro(e){if(!(this instanceof Ro))return new Ro(e);Lo.call(this,e),this._transformState=new Oo(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){Bo(t,e)})):Bo(t)}))}function Bo(e,t){if(t)return e.emit("error",t);var i=e._writableState,r=e._transformState;if(i.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function jo(e){if(!(this instanceof jo))return new jo(e);Ro.call(this,e)}function Fo(){zn.call(this)}pr(Ro,Lo),Ro.prototype.push=function(e,t){return this._transformState.needTransform=!1,Lo.prototype.push.call(this,e,t)},Ro.prototype._transform=function(e,t,i){throw new Error("Not implemented")},Ro.prototype._write=function(e,t,i){var r=this._transformState;if(r.writecb=i,r.writechunk=e,r.writeencoding=t,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},Ro.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},pr(jo,Ro),jo.prototype._transform=function(e,t,i){i(null,e)},pr(Fo,zn),Fo.Readable=io,Fo.Writable=wo,Fo.Duplex=Lo,Fo.Transform=Ro,Fo.PassThrough=jo,Fo.Stream=Fo,Fo.prototype.pipe=function(e,t){var i=this;function r(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function n(){i.readable&&i.resume&&i.resume()}i.on("data",r),e.on("drain",n),e._isStdio||t&&!1===t.end||(i.on("end",a),i.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===zn.listenerCount(this,"error"))throw e}function u(){i.removeListener("data",r),e.removeListener("drain",n),i.removeListener("end",a),i.removeListener("close",s),i.removeListener("error",c),e.removeListener("error",c),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u)}return i.on("error",c),e.on("error",c),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e};var No=Object.freeze({__proto__:null,Duplex:Lo,PassThrough:jo,Readable:io,Stream:Fo,Transform:Ro,Writable:wo,default:Fo}),zo=3,Vo=4;function $o(e,t,i){var r,n=this;if(io.call(n),n._mode=i,n.headers={},n.rawHeaders=[],n.trailers={},n.rawTrailers=[],n.on("end",(function(){Ti((function(){n.emit("close")}))})),"fetch"===i){n._fetchResponse=t,n.url=t.url,n.statusCode=t.status,n.statusMessage=t.statusText;for(var o,a,s=t.headers[Symbol.iterator]();o=(a=s.next()).value,!a.done;)n.headers[o[0].toLowerCase()]=o[1],n.rawHeaders.push(o[0],o[1]);var c=t.body.getReader();(r=function(){c.read().then((function(e){n._destroyed||(e.done?n.push(null):(n.push(new Mt(e.value)),r()))}))})()}else{if(n._xhr=e,n._pos=0,n.url=e.responseURL,n.statusCode=e.status,n.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var i=t[1].toLowerCase();"set-cookie"===i?(void 0===n.headers[i]&&(n.headers[i]=[]),n.headers[i].push(t[2])):void 0!==n.headers[i]?n.headers[i]+=", "+t[2]:n.headers[i]=t[2],n.rawHeaders.push(t[1],t[2])}})),n._charset="x-user-defined",!Bn){var u=n.rawHeaders["mime-type"];if(u){var l=u.match(/;\s*charset=([^;])(;|$)/);l&&(n._charset=l[1].toLowerCase())}n._charset||(n._charset="utf-8")}}}function Uo(e){var t,i=this;wo.call(i),i._opts=e,i._body=[],i._headers={},e.auth&&i.setHeader("Authorization","Basic "+new Mt(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){i.setHeader(t,e.headers[t])}));var r=!0;if("disable-fetch"===e.mode)r=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!Bn;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}i._mode=function(e,t){return In&&t?"fetch":Rn?"moz-chunked-arraybuffer":On?"ms-stream":Mn&&e?"arraybuffer":jn&&e?"text:vbarray":"text"}(t,r),i.on("finish",(function(){i._onFinish()}))}pr($o,io),$o.prototype._read=function(){},$o.prototype._onXHRProgress=function(){var e=this,t=e._xhr,i=null;switch(e._mode){case"text:vbarray":if(t.readyState!==Vo)break;try{i=new vt.VBArray(t.responseBody).toArray()}catch(e){}if(null!==i){e.push(new Mt(i));break}case"text":try{i=t.responseText}catch(t){e._mode="text:vbarray";break}if(i.length>e._pos){var r=i.substr(e._pos);if("x-user-defined"===e._charset){for(var n=new Mt(r.length),o=0;o<r.length;o++)n[o]=255&r.charCodeAt(o);e.push(n)}else e.push(r,e._charset);e._pos=i.length}break;case"arraybuffer":if(t.readyState!==Vo||!t.response)break;i=t.response,e.push(new Mt(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=t.response,t.readyState!==zo||!i)break;e.push(new Mt(new Uint8Array(i)));break;case"ms-stream":if(i=t.response,t.readyState!==zo)break;var a=new vt.MSStreamReader;a.onprogress=function(){a.result.byteLength>e._pos&&(e.push(new Mt(new Uint8Array(a.result.slice(e._pos)))),e._pos=a.result.byteLength)},a.onload=function(){e.push(null)},a.readAsArrayBuffer(i)}e._xhr.readyState===Vo&&"ms-stream"!==e._mode&&e.push(null)},pr(Uo,wo);var Ho=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];function qo(e,t){"string"==typeof e&&(e=bn(e));var i=-1===vt.location.protocol.search(/^https?:$/)?"http:":"",r=e.protocol||i,n=e.hostname||e.host,o=e.port,a=e.path||"/";n&&-1!==n.indexOf(":")&&(n="["+n+"]"),e.url=(n?r+"//"+n:"")+(o?":"+o:"")+a,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var s=new Uo(e);return t&&s.on("response",t),s}function Ko(e,t){var i=qo(e,t);return i.end(),i}function Jo(){}Uo.prototype.setHeader=function(e,t){var i=e.toLowerCase();-1===Ho.indexOf(i)&&(this._headers[i]={name:e,value:t})},Uo.prototype.getHeader=function(e){return this._headers[e.toLowerCase()].value},Uo.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},Uo.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t,i=e._opts,r=e._headers;if("POST"!==i.method&&"PUT"!==i.method&&"PATCH"!==i.method||(t=function(){if(void 0!==_n)return _n;try{new vt.Blob([new ArrayBuffer(1)]),_n=!0}catch(e){_n=!1}return _n}()?new vt.Blob(e._body.map((function(e){return function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(bi(e)){for(var t=new Uint8Array(e.length),i=e.length,r=0;r<i;r++)t[r]=e[r];return t.buffer}throw new Error("Argument must be a Buffer")}(e)})),{type:(r["content-type"]||{}).value||""}):Mt.concat(e._body).toString()),"fetch"===e._mode){var n=Object.keys(r).map((function(e){return[r[e].name,r[e].value]}));vt.fetch(e._opts.url,{method:e._opts.method,headers:n,body:t,mode:"cors",credentials:i.withCredentials?"include":"same-origin"}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){e.emit("error",t)}))}else{var o=e._xhr=new vt.XMLHttpRequest;try{o.open(e._opts.method,e._opts.url,!0)}catch(t){return void Ti((function(){e.emit("error",t)}))}"responseType"in o&&(o.responseType=e._mode.split(":")[0]),"withCredentials"in o&&(o.withCredentials=!!i.withCredentials),"text"===e._mode&&"overrideMimeType"in o&&o.overrideMimeType("text/plain; charset=x-user-defined"),Object.keys(r).forEach((function(e){o.setRequestHeader(r[e].name,r[e].value)})),e._response=null,o.onreadystatechange=function(){switch(o.readyState){case zo:case Vo:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(o.onprogress=function(){e._onXHRProgress()}),o.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{o.send(t)}catch(t){return void Ti((function(){e.emit("error",t)}))}}}},Uo.prototype._onXHRProgress=function(){var e=this;(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},Uo.prototype._connect=function(){var e=this;e._destroyed||(e._response=new $o(e._xhr,e._fetchResponse,e._mode),e.emit("response",e._response))},Uo.prototype._write=function(e,t,i){this._body.push(e),i()},Uo.prototype.abort=Uo.prototype.destroy=function(){var e=this;e._destroyed=!0,e._response&&(e._response._destroyed=!0),e._xhr&&e._xhr.abort()},Uo.prototype.end=function(e,t,i){"function"==typeof e&&(i=e,e=void 0),wo.prototype.end.call(this,e,t,i)},Uo.prototype.flushHeaders=function(){},Uo.prototype.setTimeout=function(){},Uo.prototype.setNoDelay=function(){},Uo.prototype.setSocketKeepAlive=function(){},Jo.defaultMaxSockets=4;var Go=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"],Yo={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},Wo={request:qo,get:Ko,Agent:Jo,METHODS:Go,STATUS_CODES:Yo},Zo=Ki(Object.freeze({__proto__:null,Agent:Jo,METHODS:Go,STATUS_CODES:Yo,default:Wo,get:Ko,request:qo})),Xo=An,Qo=Pn.spawn,ea=Pn,ta=function(){var e,t,i=this,r=Zo,n=Zo,o={},a=!1,s={"User-Agent":"node-XMLHttpRequest",Accept:"*/*"},c={},u={},l=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","content-transfer-encoding","cookie","cookie2","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],d=["TRACE","TRACK","CONNECT"],p=!1,h=!1,f={};this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.readyState=this.UNSENT,this.onreadystatechange=null,this.responseText="",this.responseXML="",this.status=null,this.statusText=null,this.withCredentials=!1;this.open=function(e,t,i,r,n){if(this.abort(),h=!1,!function(e){return e&&-1===d.indexOf(e)}(e))throw new Error("SecurityError: Request method not allowed");o={method:e,url:t.toString(),async:"boolean"!=typeof i||i,user:r||null,password:n||null},g(this.OPENED)},this.setDisableHeaderCheck=function(e){a=e},this.setRequestHeader=function(e,t){if(this.readyState!==this.OPENED)throw new Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN");if(function(e){return a||e&&-1===l.indexOf(e.toLowerCase())}(e)){if(p)throw new Error("INVALID_STATE_ERR: send flag is true");e=u[e.toLowerCase()]||e,u[e.toLowerCase()]=e,c[e]=c[e]?c[e]+", "+t:t}else console.warn('Refused to set unsafe header "'+e+'"')},this.getResponseHeader=function(e){return"string"==typeof e&&this.readyState>this.OPENED&&t&&t.headers&&t.headers[e.toLowerCase()]&&!h?t.headers[e.toLowerCase()]:null},this.getAllResponseHeaders=function(){if(this.readyState<this.HEADERS_RECEIVED||h)return"";var e="";for(var i in t.headers)"set-cookie"!==i&&"set-cookie2"!==i&&(e+=i+": "+t.headers[i]+"\r\n");return e.substr(0,e.length-2)},this.getRequestHeader=function(e){return"string"==typeof e&&u[e.toLowerCase()]?c[u[e.toLowerCase()]]:""},this.send=function(a){if(this.readyState!==this.OPENED)throw new Error("INVALID_STATE_ERR: connection must be opened before send() is called");if(p)throw new Error("INVALID_STATE_ERR: send has already been called");var l,d=!1,f=!1,b=Xo.parse(o.url);switch(b.protocol){case"https:":d=!0;case"http:":l=b.hostname;break;case"file:":f=!0;break;case void 0:case null:case"":l="localhost";break;default:throw new Error("Protocol not supported.")}if(f){if("GET"!==o.method)throw new Error("XMLHttpRequest: Only GET method is supported");if(o.async)ea.readFile(b.pathname,"utf8",(function(e,t){e?i.handleError(e):(i.status=200,i.responseText=t,g(i.DONE))}));else try{this.responseText=ea.readFileSync(b.pathname,"utf8"),this.status=200,g(i.DONE)}catch(e){this.handleError(e)}}else{var m=b.port||(d?443:80),v=b.pathname+(b.search?b.search:"");for(var y in s)u[y.toLowerCase()]||(c[y]=s[y]);if(c.Host=l,d&&443===m||80===m||(c.Host+=":"+b.port),o.user){void 0===o.password&&(o.password="");var w=new Mt(o.user+":"+o.password);c.Authorization="Basic "+w.toString("base64")}"GET"===o.method||"HEAD"===o.method?a=null:a?(c["Content-Length"]=bi(a)?a.length:Mt.byteLength(a),c["Content-Type"]||(c["Content-Type"]="text/plain;charset=UTF-8")):"POST"===o.method&&(c["Content-Length"]=0);var x={host:l,port:m,path:v,method:o.method,headers:c,agent:!1,withCredentials:i.withCredentials};if(h=!1,o.async){var k=d?n.request:r.request;p=!0,i.dispatchEvent("readystatechange");var _=function(e){i.handleError(e)};e=k(x,(function r(n){if(301!==(t=n).statusCode&&302!==t.statusCode&&303!==t.statusCode&&307!==t.statusCode)t.setEncoding("utf8"),g(i.HEADERS_RECEIVED),i.status=t.statusCode,t.on("data",(function(e){e&&(i.responseText+=e),p&&g(i.LOADING)})),t.on("end",(function(){p&&(g(i.DONE),p=!1)})),t.on("error",(function(e){i.handleError(e)}));else{o.url=t.headers.location;var a=Xo.parse(o.url);l=a.hostname;var s={hostname:a.hostname,port:a.port,path:a.path,method:303===t.statusCode?"GET":o.method,headers:c,withCredentials:i.withCredentials};(e=k(s,r).on("error",_)).end()}})).on("error",_),a&&e.write(a),e.end(),i.dispatchEvent("loadstart")}else{var C=".node-xmlhttprequest-content-"+Ui.pid,A=".node-xmlhttprequest-sync-"+Ui.pid;ea.writeFileSync(A,"","utf8");for(var E="var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http"+(d?"s":"")+".request;var options = "+JSON.stringify(x)+";var responseText = '';var req = doRequest(options, function(response) {response.setEncoding('utf8');response.on('data', function(chunk) { responseText += chunk;});response.on('end', function() {fs.writeFileSync('"+C+"', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText}}), 'utf8');fs.unlinkSync('"+A+"');});response.on('error', function(error) {fs.writeFileSync('"+C+"', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('"+A+"');});}).on('error', function(error) {fs.writeFileSync('"+C+"', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('"+A+"');});"+(a?"req.write('"+JSON.stringify(a).slice(1,-1).replace(/'/g,"\\'")+"');":"")+"req.end();",S=Qo(Ui.argv[0],["-e",E]);ea.existsSync(A););var P=JSON.parse(ea.readFileSync(C,"utf8"));S.stdin.end(),ea.unlinkSync(C),P.err?i.handleError(P.err):(t=P.data,i.status=P.data.statusCode,i.responseText=P.data.text,g(i.DONE))}}},this.handleError=function(e){this.status=0,this.statusText=e,this.responseText=e.stack,h=!0,g(this.DONE),this.dispatchEvent("error")},this.abort=function(){e&&(e.abort(),e=null),c=s,this.status=0,this.responseText="",this.responseXML="",h=!0,this.readyState===this.UNSENT||this.readyState===this.OPENED&&!p||this.readyState===this.DONE||(p=!1,g(this.DONE)),this.readyState=this.UNSENT,this.dispatchEvent("abort")},this.addEventListener=function(e,t){e in f||(f[e]=[]),f[e].push(t)},this.removeEventListener=function(e,t){e in f&&(f[e]=f[e].filter((function(e){return e!==t})))},this.dispatchEvent=function(e){if("function"==typeof i["on"+e]&&i["on"+e](),e in f)for(var t=0,r=f[e].length;t<r;t++)f[e][t].call(i)};var g=function(e){e!=i.LOADING&&i.readyState===e||(i.readyState=e,(o.async||i.readyState<i.OPENED||i.readyState===i.DONE)&&i.dispatchEvent("readystatechange"),i.readyState!==i.DONE||h||(i.dispatchEvent("load"),i.dispatchEvent("loadend")))}},ia=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 ra(e){return ia(this,void 0,void 0,(function*(){return yield new Promise(((t,i)=>{let{url:r}=e;r||i(new Error("URL is missing")),"http://"!==r.substr(0,7)||e.forceHttp||(console.warn(`Upgrading requested url ${r} to https protocol.`),r=r.replace("http://","https://"));const n=new("undefined"==typeof XMLHttpRequest?ta:XMLHttpRequest);e["bearer-token"]&&n.setRequestHeader("Authorization",`Bearer ${e["bearer-token"]}`),n.onload=()=>{if(n.status>=200&&n.status<300)t(n.responseText);else{console.log(n.responseText);const e=`Error fetching url:${r}; status code:${n.status}`;i(new Error(e))}},n.ontimeout=e=>{console.log("ontimeout",e)},n.onreadystatechange=()=>{404===n.status&&i(new Error(`Error fetching url:${r}; status code:${n.status}`))},n.onerror=()=>{console.error(`Request failed with error ${n.responseText}`),i(new Error(n.responseText))},n.open(e.method||"GET",r),e.body?n.send(JSON.stringify(e.body)):n.send()}))}))}function na(e,t){return"string"!=typeof e?(console.warn("Trying to test a non string variable"),!1):0===e.indexOf(t)}function oa(e,t){for(let i=0;i<t.length;i++){const r=t[i];if(na(e,r))return e.slice(r.length)}return e}var aa=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 sa="https://api.etherscan.io/api?module=proxy";function ca(e){const t={[dt.Ethropst]:"ropsten",[dt.Ethrinkeby]:"rinkeby",[dt.Ethgoerli]:"goerli",[dt.Ethsepolia]:"sepolia"};if(!t[e])return sa;return`https://api-${t[e]}.etherscan.io/api?module=proxy`}const ua={serviceURL:function(e){return`${ca(e)}&action=eth_getTransactionByHash&txhash=${lt}`},serviceName:ct.etherscan,parsingFunction:function({jsonResponse:e,chain:t,key:i,keyPropertyName:r}){return aa(this,void 0,void 0,(function*(){const n=ca(t),o={serviceURL:{main:`${n}&action=eth_getBlockByNumber&boolean=true&tag=${lt}`,test:`${n}&action=eth_getBlockByNumber&boolean=true&tag=${lt}`}},a={serviceURL:{main:`${n}&action=eth_blockNumber`,test:`${n}&action=eth_blockNumber`}};const s=yield function(e,t){return aa(this,void 0,void 0,(function*(){const n=e.result.blockNumber,s=mt({explorerAPI:Object.assign(Object.assign({},o),{key:i,keyPropertyName:r}),transactionId:n,chain:t});try{const e=yield ra({url:s}),o=JSON.parse(e).result;return yield function(e,t){return aa(this,void 0,void 0,(function*(){const n=mt({explorerAPI:Object.assign(Object.assign({},a),{key:i,keyPropertyName:r}),chain:e});let o;try{o=yield ra({url:n})}catch(e){throw new Error("Unable to get remote hash")}const s=JSON.parse(o).result;if(s-t<ft.MininumConfirmations)throw new Error("Not enough");return s}))}(t,n),o}catch(e){throw new Error("Unable to get remote hash")}}))}(e,t);return function(e,t){const i=e.result,r=new Date(1e3*parseInt(t.timestamp,16)),n=i.from;return{remoteHash:oa(i.input,ht.ethmain.prefixes),issuingAddress:n,time:r,revokedAddresses:[]}}(e,s)}))},priority:-1};function la(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){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 da(e){return""===e?"":la(`${e}`)}function pa(e){return new Date(1e3*e)}const ha={serviceURL:{main:`https://api.blockcypher.com/v1/eth/main/txs/${lt}?limit=500`,test:`https://api.blockcypher.com/v1/beth/test/txs/${lt}?limit=500`},serviceName:ct.blockcypher,parsingFunction:function({jsonResponse:e}){if(e.confirmations<ft.MininumConfirmations)throw new Error("Not enough");const t=da(e.received),i=e.outputs,r=i[i.length-1];let n=e.inputs[0].addresses[0];const o=oa(r.script,ht.ethmain.prefixes);return n=function(e,t){for(let i=0;i<t.length;i++){const r=t[i];if(!na(e,r))return`${r}${e}`}return e}(n,ht.ethmain.prefixes),{remoteHash:o,issuingAddress:n,time:t,revokedAddresses:i.filter((e=>!!e.spent_by)).map((e=>e.addresses[0]))}},priority:-1};const fa={serviceURL:{main:`https://blockstream.info/api/tx/${lt}`,test:`https://blockstream.info/testnet/api/tx/${lt}`},serviceName:ct.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=pa(e.status.block_time),i=e.vout,r=i[i.length-1],n=e.vin[0].prevout.scriptpubkey_address;return{remoteHash:oa(r.scriptpubkey,ht.bitcoin.prefixes),issuingAddress:n,time:t,revokedAddresses:i.filter((e=>!!e.scriptpubkey_address)).map((e=>e.scriptpubkey_address))}},priority:-1};const ga={serviceURL:{main:`https://api.blockcypher.com/v1/btc/main/txs/${lt}?limit=500`,test:`https://api.blockcypher.com/v1/btc/test3/txs/${lt}?limit=500`},serviceName:ct.blockcypher,parsingFunction:function({jsonResponse:e}){if(e.confirmations<ft.MininumConfirmations)throw new Error("Number of transaction confirmations were less than the minimum required, according to Blockcypher API");const t=da(e.received),i=e.outputs,r=i[i.length-1],n=e.inputs[0].addresses[0];return{remoteHash:oa(r.script,ht.bitcoin.prefixes),issuingAddress:n,time:t,revokedAddresses:i.filter((e=>!!e.spent_by)).map((e=>e.addresses[0]))}},priority:-1};var ba=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 ma(e){return e.map((e=>({getTxData:(t,i)=>ba(this,void 0,void 0,(function*(){return yield function(e,t,i){return ba(this,void 0,void 0,(function*(){const r=mt({explorerAPI:e,transactionId:t,chain:i});try{const t=yield ra({url:r});return yield e.parsingFunction(Object.assign({jsonResponse:JSON.parse(t),chain:i},e))}catch(e){throw new Error("Unable to get remote hash")}}))}(e,t,i)})),priority:e.priority})))}const va=[ga,fa],ya=[ua,ha];var wa=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 xa({serviceUrl:e,transactionId:t}){return wa(this,void 0,void 0,(function*(){const i={method:"eth_getTransactionByHash",jsonrpc:"2.0",id:"getbyhash",params:["0x"+t]},r=yield ra({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 ra({url:e,body:o,method:"POST"}),s=JSON.parse(a),c=n.result,u=s.result,l=new Date(1e3*parseInt(u.timestamp,16)),d=c.from;return{remoteHash:oa(c.input,["0x"]),issuingAddress:d,time:l,revokedAddresses:[]}}))}var ka=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 _a({serviceUrl:e,transactionId:t}){return ka(this,void 0,void 0,(function*(){const i={method:"getrawtransaction",jsonrpc:"2.0",id:"rpctest",params:[t,!0]},r=yield ra({url:e,body:i,method:"POST"}),n=JSON.parse(r).result;return{issuingAddress:n.vout[0].scriptPubKey.addresses[0],remoteHash:oa(n.vout[1].scriptPubKey.asm,["6a20","OP_RETURN "]),time:pa(n.blocktime),revokedAddresses:n.vout.filter((e=>!!e.scriptPubKey.addresses)).map((e=>e.scriptPubKey.addresses)).flat()}}))}var Ca=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 Aa=[];function Ea(e=[],t=[],i=!1){const r=e.map((e=>e.serviceName)).filter((e=>!!e)).filter((e=>!!ct[e]));return r.length?t.reduce(((t,n)=>{if(r.includes(n.serviceName)){const i=Object.assign({},n),r=e.find((e=>e.serviceName===n.serviceName));if(function(e){if(e.key&&!e.keyPropertyName)throw new Error(`Property keyPropertyName is not set for ${e.serviceName}. Cannot pass the key property to the service.`);return!0}(r)){const n=Object.assign(i,r);t.push(n);const o=e.findIndex((e=>e.serviceName===n.serviceName));Aa.includes(o)||Aa.push(o)}}else t.push(n);return i&&function(e,t){t.forEach((t=>e.splice(t,1)))}(e,Aa),t}),[]):t}function Sa(e){return e.map((e=>(e.parsingFunction||(e.parsingFunction="btc"===e.chainType?_a:xa),e))).map((e=>({getTxData:t=>Ca(this,void 0,void 0,(function*(){return yield e.parsingFunction(Object.assign(Object.assign({},e),{transactionId:t}))})),priority:e.priority})))}function Pa(e){const{bitcoin:t,ethereum:i}={bitcoin:ma(Ea(r=e,va)),ethereum:ma(Ea(r,ya))};var r;const{custom:n}=function(e){return{custom:Sa(e)}}(e.filter((e=>"rpc"===e.apiType)));return{bitcoin:t,ethereum:i,custom:[...n,...ma(e.filter((e=>"rpc"!==e.apiType)))]}}var Ia,Ta=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 La(e,t){var i;switch(e){case ht[dt.Bitcoin].code:case ht[dt.Regtest].code:case ht[dt.Testnet].code:case ht[dt.Mocknet].code:return t.bitcoin;case ht[dt.Ethmain].code:case ht[dt.Ethropst].code:case ht[dt.Ethrinkeby].code:case ht[dt.Ethgoerli].code:case ht[dt.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 Da(e){return Ta(this,void 0,void 0,(function*(){let t;try{t=yield bt(e,ft.MinimumBlockchainExplorers)}catch(e){throw new Error(`Transaction lookup error: ${e.message}`)}if(!t||0===t.length)throw new Error("Could not confirm transaction data.");const i=t[0];for(let e=1;e<t.length;e++){const r=t[e];if(i.issuingAddress!==r.issuingAddress)throw new Error("Issuing addresses do not match consistently");if(i.remoteHash!==r.remoteHash)throw new Error("Remote hashes do not match consistently")}return i}))}function Ma(e,t,i,r){return Ta(this,void 0,void 0,(function*(){try{const n=function(e,t,i){if(ft.MinimumBlockchainExplorers>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 Da(n)}catch(n){if(t<e.length-1)return t++,yield Ma(e,t,i,r);throw n}}))}function Oa({transactionId:e,chain:t,explorerAPIs:i=[]}){return Ta(this,void 0,void 0,(function*(){const r=Pa(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(ft.MinimumBlockchainExplorers>r)throw new Error("Invalid application configuration; check the CONFIG.MinimumBlockchainExplorers configuration value");return i}({defaultAPIs:La(t,r),customAPIs:r.custom});return yield Ma(n,0,e,t)}))}!function(e){e.mainnet="mainnet",e.testnet="testnet"}(Ia||(Ia={}));var Ra="ecdsa-koblitz-pubkey:1",Ba="https://openbadgespec.org/v2/context.json",ja="https://www.w3.org/2018/credentials/v1",Fa="https://w3id.org/blockcerts/schema/2.0/context.json",Na="https://w3id.org/blockcerts/v2",za="https://www.blockcerts.org/schema/2.0/context.json",Va="https://w3id.org/blockcerts/schema/2.1/context.json",$a="https://w3id.org/blockcerts/v2.1",Ua="https://www.blockcerts.org/schema/2.1/context.json",Ha="https://w3id.org/blockcerts/schema/3.0/context.json",qa="https://w3id.org/blockcerts/v3",Ka="https://www.blockcerts.org/schema/3.0/context.json",Ja="https://w3id.org/blockcerts/schema/3.1/context.json",Ga="https://w3id.org/blockcerts/v3.1",Ya="https://www.blockcerts.org/schema/3.1/context.json",Wa="https://w3id.org/security/suites/merkle-2019/v1",Za="https://w3id.org/security/suites/chained-2021/v1",Xa="https://w3id.org/vc/status-list/2021/v1",Qa={"@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"}},es={"@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"}]},ts={"@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"}]},is={"@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"}}},rs={"@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"}}};const ns={};ns["https://w3id.org/openbadges/v2"]=Qa,ns[Ba]=Qa,ns[ja]={"@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"}}},ns[Fa]=es,ns[za]=es,ns[Na]=es,ns[Va]=ts,ns[Ua]=ts,ns[$a]=ts,ns[Ha]=is,ns[Ka]=is,ns[qa]=is,ns[Ja]=rs,ns[Ya]=rs,ns[Ga]=rs,ns[Wa]={"@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"}}}}},ns[Za]={"@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"}}}}},ns[Xa]={"@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"}}}}};var os={"@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",creator:{"@id":"dc:creator","@type":"@id"},expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},revoked:{"@id":"sec:expiration","@type":"xsd:dateTime"},CryptographicKey:"sec:Key",signature:"sec:signature",verification:"bc:verification",publicKeys:"bc:publicKeys",ChainpointSHA256v2:"cp:ChainpointSHA256v2",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-alpha/recipientSchema.json"},{"obi:validatesType":"SignatureLine","obi:validationSchema":"https://w3id.org/blockcerts/schema/2.0-alpha/signatureLineSchema.json"},{"obi:validatesType":"MerkleProof2017","obi:validationSchema":"https://w3id.org/blockcerts/schema/2.0-alpha/merkleProof2017Schema.json"}]},as={"@context":{id:"@id",type:"@type",bc:"https://w3id.org/blockcerts#",cp:"https://w3id.org/chainpoint#",schema:"http://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"},CryptographicKey:"sec:Key",domain:"sec:domain",nonce:"sec:nonce",proofValue:"sec:proofValue",assertionMethod:{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},proofPurpose:{"@id":"sec:proofPurpose","@type":"@vocab"},verificationMethod:{"@id":"sec:verificationMethod","@type":"@id"},created:{"@id":"bc:created","@type":"xsd:dateTime"},name:{"@id":"schema:name"}}},ss={"@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","@type":"@id"},contentEncoding:{"@id":"bc:contentEncoding","@type":"@id"},content:{"@id":"bc:content","@type":"@id"}}},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","@type":"@id"},url:{"@id":"schema:url","@type":"@id"},image:{"@id":"schema:image","@type":"@id"}}},cs={"@context":{"@protected":!0,id:"@id",type:"@type",alsoKnownAs:{"@id":"https://www.w3.org/ns/activitystreams#alsoKnownAs","@type":"@id"},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"},controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"},service:{"@id":"https://www.w3.org/ns/did#service","@type":"@id","@context":{"@protected":!0,id:"@id",type:"@type",serviceEndpoint:{"@id":"https://www.w3.org/ns/did#serviceEndpoint","@type":"@id"}}},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},us={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},EcdsaSecp256k1VerificationKey2019:{"@id":"https://w3id.org/security#EcdsaSecp256k1VerificationKey2019","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},blockchainAccountId:{"@id":"https://w3id.org/security#blockchainAccountId"},publicKeyJwk:{"@id":"https://w3id.org/security#publicKeyJwk","@type":"@json"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}},EcdsaSecp256k1Signature2019:{"@id":"https://w3id.org/security#EcdsaSecp256k1Signature2019","@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"}}},jws:{"@id":"https://w3id.org/security#jws"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}},ls={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},Ed25519VerificationKey2020:{"@id":"https://w3id.org/security#Ed25519VerificationKey2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}},Ed25519Signature2020:{"@id":"https://w3id.org/security#Ed25519Signature2020","@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"}}}}};ns["https://w3id.org/blockcerts/schema/2.0-alpha/context.json"]=os,ns["https://www.blockcerts.org/schema/2.0-alpha/context.json"]=os,ns["https://www.blockcerts.org/schema/3.0-alpha/context.json"]=as,ns["https://w3id.org/blockcerts/schema/3.0-alpha/context.json"]=as,ns["https://w3id.org/blockcerts/v3.0-alpha"]=as,ns["https://www.blockcerts.org/schema/3.0-beta/context.json"]=ss,ns["https://w3id.org/blockcerts/schema/3.0-beta/context.json"]=ss,ns["https://w3id.org/blockcerts/v3.0-beta"]=ss,ns["https://w3id.org/security/suites/ed25519-2020/v1"]=ls,ns["https://ns.did.ai/suites/secp256k1-2019/v1/"]=us,ns["https://www.w3.org/ns/did/v1"]=cs;const ds={locale:"en-US"};var ps=Object.freeze({__proto__:null,isMainnet:function(e){return rt(e,"1")||rt(e,Ra)}});var hs={locale:"en-US"},fs={"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 gs(e,t){return e&&t?fs[hs.locale]?fs[hs.locale][e]?fs[hs.locale][e][t]?fs[hs.locale][e][t]||"":"[missing locale item data]":"[missing locale group data]":"[missing locale data]":""}function bs(){return Object.keys(fs)}var ms=Object.freeze({__proto__:null,detectLocale:function(){return navigator.language||ds.locale},ensureIsSupported:function(e){let t;const i=Ks.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=ds.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 gs(e,t)},getSupportedLanguages:bs,getText:gs});class vs{publicKey;created;revoked;expires;constructor(e,t,i,r){this.publicKey=e,this.created=t,this.revoked=i,this.expires=r}}class ys{image;jobTitle;name;constructor(e,t,i){this.image=e,this.jobTitle=t,this.name=i}}class ws extends Error{stepCode;constructor(e,t){super(t),this.stepCode=e}}const xs=fs[hs.locale];var ks,_s;function Cs(){return{[ks.formatValidation]:{code:ks.formatValidation,label:xs.steps.formatValidationLabel,labelPending:xs.steps.formatValidationLabelPending,subSteps:[]},[ks.proofVerification]:{code:ks.proofVerification,label:xs.steps.signatureVerificationLabel,labelPending:xs.steps.signatureVerificationLabelPending,subSteps:[]},[ks.identityVerification]:{code:ks.identityVerification,label:xs.steps.identityVerificationLabel,labelPending:xs.steps.identityVerificationLabelPending,subSteps:[]},[ks.statusCheck]:{code:ks.statusCheck,label:xs.steps.statusCheckLabel,labelPending:xs.steps.statusCheckLabelPending,subSteps:[]}}}!function(e){e.formatValidation="formatValidation",e.proofVerification="proofVerification",e.identityVerification="identityVerification",e.statusCheck="statusCheck",e.final="final"}(ks||(ks={})),function(e){e.checkImagesIntegrity="checkImagesIntegrity",e.checkRevokedStatus="checkRevokedStatus",e.checkExpiresDate="checkExpiresDate",e.controlVerificationMethod="controlVerificationMethod"}(_s||(_s={}));var As=Object.freeze({__proto__:null,get SUB_STEPS(){return _s},get VerificationSteps(){return ks},default:Cs,final:"final"});function Es(e=[],t=[]){return e.filter((e=>t.includes(e))).filter(((e,t,i)=>i.indexOf(e)===t))}function Ss(e,t){const i=e.findIndex((e=>e===t));i>-1&&e.splice(i,1)}const Ps={[ks.formatValidation]:[_s.checkImagesIntegrity],[ks.proofVerification]:[],[ks.identityVerification]:[_s.controlVerificationMethod],[ks.statusCheck]:[_s.checkRevokedStatus,_s.checkExpiresDate]};function Is(e,t){return Ps[e].filter((e=>t.includes(e))).map((t=>Ks.verifier.convertToVerificationSubsteps(e,t)))}function Ts(e){const t=Cs();return Object.keys(t).map((i=>({...t[i],subSteps:Is(i,e)})))}var Ls=Object.freeze({__proto__:null,generateRevocationReason:function(e){return e=(e=e.trim()).length>0?` ${gs("revocation","preReason")} ${e}${"."!==e.slice(-1)?".":""}`:"",`${gs("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(ht).map((e=>ht[e])).find((t=>t.signatureValue===e));if(void 0===t)throw new Error(gs("errors","getChain"));return t}(e.chain)}}return function(e=""){return ps.isMainnet(e)?ht.bitcoin:ht.testnet}(e)},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 ws("",gs("errors","getTransactionId"))}},getTransactionLink:function(e,t){return e&&t?{rawTransactionLink:t.transactionTemplates.raw.replace(at,e),transactionLink:t.transactionTemplates.full.replace(at,e)}:null},getVerificationMap:function(e=!1,t=!1){const i=function(e,t){const i=Object.values(_s);return e||Ss(i,_s.controlVerificationMethod),t||Ss(i,_s.checkImagesIntegrity),i}(e,t);return{verificationProcess:i,verificationMap:Ts(i)}}});var Ds=Object.freeze({__proto__:null,isMockChain:function(e){if(e){const t="string"==typeof e?e:e.code;return!!Object.keys(ht).some((e=>e===t))&&!!ht[t].test}return!1}});const Ms={value:"https://dev.uniresolver.io/1.0/identifiers",set url(e){this.value=e},get url(){return this.value}};function Os(e){return e.startsWith("did:",0)}function Rs(e){return e.startsWith("did:key:",0)}var Bs;!function(e){e.ED25519="ed25519",e.SECP256K1="secp256k1"}(Bs||(Bs={}));const js={"did:key:z6Mk":Bs.ED25519,"did:key:zQ3s":Bs.SECP256K1};async function Fs(e){const t=e.substring(0,12);if(js[t]){const i=await async function(e){if(e===Bs.ED25519)return await import("./did-key-ed25519.esm-54d2cbca-52ecc5b1.js");if(e===Bs.SECP256K1)return await import("./did-key-secp256k1.esm-8a01b23c-75ec86fd.js");throw new Error("Error loading did key resolver")}(js[t]),{didDocument:r}=await i.resolve(e,{accept:"application/did+json"});return r}throw new Error("Unsupported did:key suite")}var Ns,zs={...Object.freeze({__proto__:null,getIssuerProfileUrl:function(e){if(!e.service)return"";const t=e.service.find((e=>"IssuerProfile"===e.type)),i=t?.serviceEndpoint;return i??""},resolve:async function(e,t=Ms.url){if(Rs(e)){return await Fs(e)}const i=await ra({url:`${t}/${e}`});return JSON.parse(i).didDocument},resolveDidKeyDocument:Fs}),didResolver:Ms};!function(e){e.DEFAULT="standby",e.FAILURE="failure",e.STARTING="starting",e.SUCCESS="success"}(Ns||(Ns={}));class Vs{code;label;labelPending;parentStep;status;constructor(e,t){this.code=t,this.label=gs("subSteps",`${t}Label`),this.labelPending=gs("subSteps",`${t}LabelPending`),this.parentStep=e,this.status=Ns.DEFAULT}}function $s(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 Us(e){return""===e?0:$s(`${e}`).getTime()}function Hs(e,t=null){const i=e.created?Us(e.created):null,r=e.revoked?Us(e.revoked):null,n=e.expires?Us(e.expires):null;let o=t;if(!t){o=(e.id||e.publicKey).replace("ecdsa-koblitz-pubkey:","")}return new vs(o,i,r,n)}var qs=Object.freeze({__proto__:null,convertToVerificationSubsteps:function(e,t){return new Vs(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(t){const i=gs("errors","getIssuerProfile");if(!t)throw new ws("getIssuerProfile",`${i} - ${gs("errors","issuerProfileNotSet")}`);let r;if("object"==typeof t&&(t=t.id),Os(t))try{const i=await Ks.did.resolve(t);if(Rs(t))r=function(e){return{"@context":["https://w3id.org/openbadges/v2","https://w3id.org/blockcerts/3.0"],publicKey:[{created:(new Date).toISOString(),id:e.id.split(":").pop()}]}}(i);else{const t=await Ks.did.getIssuerProfileUrl(i);t&&(r=await e(t))}return{didDocument:i,...r}}catch(e){throw console.error(e),new ws("getIssuerProfile",`${i} - ${e}`)}else if(!function(e){return/^(ftp|http|https):\/\/[^ "]+$/.test(e)}(t))throw new ws("getIssuerProfile",`${i} - ${gs("errors","issuerProfileNotSet")}`);if(r=JSON.parse(await ra({url:t}).catch((()=>{throw new ws("getIssuerProfile",i)}))),!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()))}(r)&&!function(e){const{issuer_key:t,revocation_key:i,issuerKeys:r,revocationKeys:n}=e;return!(!t||!i)||!(!r||!n)}(r))throw new ws("getIssuerProfile",`${i} - ${gs("errors","issuerProfileInvalid")}`);return r},getRevokedAssertions:async function(e,t){if(!e)return[];const i=gs("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 ra({url:e});return JSON.parse(t).revokedAssertions??[]}catch(e){throw console.error(e),new ws(_s.checkRevokedStatus,i)}},lookForTx:Oa,parseIssuerKeys:function(e){try{const t={};if("@context"in e){const i=e.publicKey||e.publicKeys;for(let e=0;e<i.length;e++){const r=Hs(i[e]);t[r.publicKey]=r}}else{const i=Hs({},(e.issuerKeys||[])[0].key);t[i.publicKey]=i}return t}catch(e){throw console.error(e),new ws("parseIssuerKeys",gs("errors","parseIssuerKeys"))}},parseRevocationKey:function(e){return e&&Object.prototype.hasOwnProperty.call(e,"revocationKeys")&&e.revocationKeys.length>0?e.revocationKeys[0].key:""}}),Ks={addresses:ps,certificates:Ls,chains:Ds,did:zs,i18n:ms,verifier:qs};function Js(e){const{credentialSubject:t}=e;return t.name||""}function Gs(e){"string"==typeof e&&(e=[e]);const t=(i=function(e){return e.filter(nt)}(e),i.find((e=>e.toLowerCase().indexOf("blockcerts")>0)));var i;const r=t.split("/").filter((e=>""!==e)),n=Object.keys(Ys),o=parseInt(n.filter((e=>function(e,t){return e.some((e=>e.includes(`v${t}`)||e.includes(`${t}.`)))}(r,e.toString())))[0],10);let a;switch(o){case 1:a=ut.V1_2;break;case 2:a=ut.V2_0;break;case 3:if(t.includes("-alpha")){a=ut.V3_0_alpha;break}if(t.includes("-beta")){a=ut.V3_0_beta;break}a=ut.V3_0}return{versionNumber:o,version:a}}const Ys={1:function(){throw new ws("","Verification of v1 certificates is not supported by this component. See the python cert-verifier for v1.1 verification or the npm package cert-verifier-js-v1-legacy for v1.2 (https://www.npmjs.com/package/@blockcerts/cert-verifier-js-v1-legacy)")},2:async function(e){const{id:t,expires:i,badge:r}=e,{image:n,name:o,description:a,subtitle:s,issuer:c}=r,u=e.recipientProfile||e.recipient.recipientProfile,l=e.issuedOn,d=e.metadataJson,p=u.name,h=function(e){const t=[];for(const i in e){const r=e[i],n=new ys(r.image,r.jobTitle,r.name);t.push(n)}return t}(r.signatureLines),f=await Ks.verifier.getIssuerProfile(c);return{certificateImage:n,description:a,expires:i,id:t,issuedOn:l,issuer:f,metadataJson:d,name:o,recipientFullName:p,recordLink:t,revocationKey:null,sealImage:f.image,signatureImage:h,subtitle:s}},3:async function(e){const{issuer:t,metadataJson:i,metadata:r,issuanceDate:n,id:o,expirationDate:a,display:s}=e,c=r||i;return{display:s,expires:a,issuedOn:n,id:o,issuer:await Ks.verifier.getIssuerProfile(t),metadataJson:c,recipientFullName:Js(e),recordLink:o}}};function Ws(e){if(Array.isArray(e)){return e.find((e=>"ChainedProof2021"!==e.type)).verificationMethod}return e.verificationMethod}var Zs;!function(e){e.MerkleProof2017="MerkleProof2017",e.MerkleProof2019="MerkleProof2019",e.Ed25519Signature2020="Ed25519Signature2020",e.EcdsaSecp256k1Signature2019="EcdsaSecp256k1Signature2019"}(Zs||(Zs={}));class Xs{expires;id;issuer;revocationKey;documentToVerify;explorerAPIs;txData;_stepsStatuses=[];hashlinkVerifier;verificationSteps;supportedVerificationSuites={[Zs.MerkleProof2017]:null,[Zs.MerkleProof2019]:null,[Zs.Ed25519Signature2020]:null,[Zs.EcdsaSecp256k1Signature2019]:null};proofVerifiers=[];verificationProcess;proofMap;constructor({certificateJson:e,expires:t,hashlinkVerifier:i,id:r,issuer:n,revocationKey:o,explorerAPIs:a}){this.expires=t,this.id=r,this.issuer=n,this.hashlinkVerifier=i,this.revocationKey=o,this.explorerAPIs=a,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();for(const e of this.proofVerifiers)await e.init();this.prepareVerificationProcess()}async verify(e=(()=>{})){this._stepCallback=e,this._stepsStatuses=[];for(let e=0;e<this.proofVerifiers.length;e++)await this.proofVerifiers[e].verifyProof();for(const e of this.verificationProcess){if(!this[e])return void console.error("verification logic for",e,"not implemented");await this[e]()}for(let e=0;e<this.proofVerifiers.length;e++)await this.proofVerifiers[e].verifyIdentity();const t=this._stepsStatuses.find((e=>e.status===Ns.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),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))}))}async loadRequiredVerificationSuites(e){if(e.includes(Zs.MerkleProof2017)){const{default:e}=await import("./MerkleProof2017-ac8d147b-dd9968ca.js");this.supportedVerificationSuites.MerkleProof2017=e}if(e.includes(Zs.MerkleProof2019)){const{default:e}=await import("./MerkleProof2019-6596bc5f-6920f4ea.js");this.supportedVerificationSuites.MerkleProof2019=e}if(e.includes(Zs.Ed25519Signature2020)){const{default:e}=await import("./Ed25519Signature2020-722d8d24-df100275.js");this.supportedVerificationSuites.Ed25519Signature2020=e}if(e.includes(Zs.EcdsaSecp256k1Signature2019)){const{default:e}=await import("./EcdsaSecp256k1Signature2019-01e33e56-6efe219a.js");this.supportedVerificationSuites.EcdsaSecp256k1Signature2019=e}}prepareVerificationProcess(){const e=Ks.certificates.getVerificationMap(!!this.issuer.didDocument,this.hashlinkVerifier?.hasHashlinksToVerify()??!1);this.verificationSteps=e.verificationMap,this.verificationProcess=e.verificationProcess,this.registerSignatureVerificationSteps(),this.registerIdentityVerificationSteps(),this.verificationSteps=this.verificationSteps.filter((e=>e.subSteps?.length>0||e.suites?.some((e=>e.subSteps.length>0))))}registerSignatureVerificationSteps(){const e=ks.proofVerification;this.verificationSteps.find((t=>t.code===e)).suites=this.getSuiteSubsteps(e)}getSuiteSubsteps(e){const t={[ks.proofVerification]:"getProofVerificationSteps",[ks.identityVerification]:"getIdentityVerificationSteps"};return this.proofVerifiers.map((i=>({proofType:i.type,subSteps:i[t[e]](e)})))}registerIdentityVerificationSteps(){const e=ks.identityVerification;this.verificationSteps.find((t=>t.code===e)).suites=this.getSuiteSubsteps(e)}async executeStep(e,t,i){if(!this._isFailing()){e&&(Ks.i18n.getText("subSteps",`${e}LabelPending`),this._updateStatusCallback(e,Ns.STARTING,i));try{const r=await t();return e&&(this._updateStatusCallback(e,Ns.SUCCESS,i),this._stepsStatuses.push({code:e,status:Ns.SUCCESS})),r}catch(t){console.error(t),e&&(this._updateStatusCallback(e,Ns.FAILURE,i,t.message),this._stepsStatuses.push({code:e,message:t.message,status:Ns.FAILURE}))}}}_stepCallback(e){}async checkImagesIntegrity(){await this.executeStep(_s.checkImagesIntegrity,(async()=>{await this.hashlinkVerifier.verifyHashlinkTable().catch((e=>{throw console.error("hashlink verification error",e),new ws(_s.checkImagesIntegrity,gs("errors","checkImagesIntegrity"))}))}))}async checkRevokedStatus(){if(this.documentToVerify.credentialStatus){const{default:e}=await import("./checkRevocationStatusList2021-904b13ff-ca07e61e.js");return void await this.executeStep(_s.checkRevokedStatus,(async()=>{await e(this.documentToVerify.credentialStatus)}))}const e=this.getRevocationListUrl();if(!e)return console.warn("No revocation list url was set on the issuer."),void await this.executeStep(_s.checkRevokedStatus,(()=>!0));const t=await this.executeStep(null,(async()=>await Ks.verifier.getRevokedAssertions(e,this.id))),{default:i}=await import("./ensureNotRevoked-2dc26afb-7b9df556.js");await this.executeStep(_s.checkRevokedStatus,(()=>i(t,this.id)))}async checkExpiresDate(){await this.executeStep(_s.checkExpiresDate,(()=>function(e=null){if(!e)return;const t=Us(e);if((new Date).getTime()>=t)throw new ws(_s.checkExpiresDate,gs("errors","ensureNotExpired"))}(this.expires)))}async controlVerificationMethod(){if(!this.issuer.didDocument)return;const{default:e}=await import("./controlVerificationMethod-80d0e7f0-27e88021.js");await this.executeStep(_s.controlVerificationMethod,(()=>{e(this.issuer.didDocument,Ws(this.documentToVerify.proof))}))}findStepFromVerificationProcess(e,t){return Ks.verifier.findVerificationSubstep(e,this.verificationSteps,t)}_failed(e){const{message:t}=e;return this._setFinalStep({status:Ns.FAILURE,message:t})}_isFailing(){return this._stepsStatuses.some((e=>e.status===Ns.FAILURE))}_succeed(){let e;return 1===this.proofVerifiers.length&&(e=this.proofVerifiers[0].type.includes("MerkleProof")?Ks.chains.isMockChain(this.proofVerifiers[0].getChain())?Ks.i18n.getComposedText("success","mocknet"):Ks.i18n.getComposedText("success","blockchain"):{...Ks.i18n.getComposedText("success","generic"),description:Ks.i18n.getComposedText("success","generic").description.replace("${SIGNATURE_TYPE}",this.proofVerifiers[0].type)}),this.proofVerifiers.length>1&&(e=Ks.i18n.getComposedText("success","multisign")),this._setFinalStep({status:Ns.SUCCESS,message:e})}_setFinalStep({status:e,message:t}){return{code:ks.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 Qs={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]",u="[object Map]",l="[object Number]",d="[object Object]",p="[object Promise]",h="[object RegExp]",f="[object Set]",g="[object String]",b="[object Symbol]",m="[object WeakMap]",v="[object ArrayBuffer]",y="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",k="[object Int8Array]",_="[object Int16Array]",C="[object Int32Array]",A="[object Uint8Array]",E="[object Uint8ClampedArray]",S="[object Uint16Array]",P="[object Uint32Array]",I=/\w*$/,T=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,D={};D[n]=D["[object Array]"]=D[v]=D[y]=D[o]=D[a]=D[w]=D[x]=D[k]=D[_]=D[C]=D[u]=D[l]=D[d]=D[h]=D[f]=D[g]=D[b]=D[A]=D[E]=D[S]=D[P]=!0,D["[object Error]"]=D[s]=D[m]=!1;var M="object"==typeof Hi&&Hi&&Hi.Object===Object&&Hi,O="object"==typeof self&&self&&self.Object===Object&&self,R=M||O||Function("return this")(),B=t&&!t.nodeType&&t,j=B&&e&&!e.nodeType&&e,F=j&&j.exports===B;function N(e,t){return e.set(t[0],t[1]),e}function z(e,t){return e.add(t),e}function V(e,t,i,r){var n=-1,o=e?e.length:0;for(r&&o&&(i=e[++n]);++n<o;)i=t(i,e[n],n,e);return i}function $(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function U(e){var t=-1,i=Array(e.size);return e.forEach((function(e,r){i[++t]=[r,e]})),i}function H(e,t){return function(i){return e(t(i))}}function q(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i}var K,J=Array.prototype,G=Function.prototype,Y=Object.prototype,W=R["__core-js_shared__"],Z=(K=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||""))?"Symbol(src)_1."+K:"",X=G.toString,Q=Y.hasOwnProperty,ee=Y.toString,te=RegExp("^"+X.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ie=F?R.Buffer:void 0,re=R.Symbol,ne=R.Uint8Array,oe=H(Object.getPrototypeOf,Object),ae=Object.create,se=Y.propertyIsEnumerable,ce=J.splice,ue=Object.getOwnPropertySymbols,le=ie?ie.isBuffer:void 0,de=H(Object.keys,Object),pe=je(R,"DataView"),he=je(R,"Map"),fe=je(R,"Promise"),ge=je(R,"Set"),be=je(R,"WeakMap"),me=je(Object,"create"),ve=$e(pe),ye=$e(he),we=$e(fe),xe=$e(ge),ke=$e(be),_e=re?re.prototype:void 0,Ce=_e?_e.valueOf:void 0;function Ae(e){var t=-1,i=e?e.length:0;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Ee(e){var t=-1,i=e?e.length:0;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function 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 Pe(e){this.__data__=new Ee(e)}function Ie(e,t){var i=He(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&qe(e)}(e)&&Q.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)!t&&!Q.call(e,a)||o&&("length"==a||ze(a,r))||i.push(a);return i}function Te(e,t,i){var r=e[t];Q.call(e,t)&&Ue(r,i)&&(void 0!==i||t in e)||(e[t]=i)}function Le(e,t){for(var i=e.length;i--;)if(Ue(e[i][0],t))return i;return-1}function De(e,t,i,r,p,m,T){var L;if(r&&(L=m?r(e,p,m,T):r(e)),void 0!==L)return L;if(!Ge(e))return e;var M=He(e);if(M){if(L=function(e){var t=e.length,i=e.constructor(t);t&&"string"==typeof e[0]&&Q.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,L)}else{var O=Ne(e),R=O==s||O==c;if(Ke(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(O==d||O==n||R&&!m){if($(e))return m?e:{};if(L=function(e){return"function"!=typeof e.constructor||Ve(e)?{}:(t=oe(e),Ge(t)?ae(t):{});var t}(R?{}:e),!t)return function(e,t){return Re(e,Fe(e),t)}(e,function(e,t){return e&&Re(t,Ye(t),e)}(L,e))}else{if(!D[O])return m?e:{};L=function(e,t,i,r){var n=e.constructor;switch(t){case v:return Oe(e);case o:case a:return new n(+e);case y:return function(e,t){var i=t?Oe(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,r);case w:case x:case k:case _:case C:case A:case E:case S:case P:return function(e,t){var i=t?Oe(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}(e,r);case u:return function(e,t,i){var r=t?i(U(e),!0):U(e);return V(r,N,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,I.exec(e));return t.lastIndex=e.lastIndex,t}(e);case f:return function(e,t,i){var r=t?i(q(e),!0):q(e);return V(r,z,new e.constructor)}(e,r,i);case b:return s=e,Ce?Object(Ce.call(s)):{}}var s}(e,O,De,t)}}T||(T=new Pe);var B=T.get(e);if(B)return B;if(T.set(e,L),!M)var j=i?function(e){return function(e,t,i){var r=t(e);return He(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,Ye,Fe)}(e):Ye(e);return function(e,t){for(var i=-1,r=e?e.length:0;++i<r&&!1!==t(e[i],i,e););}(j||e,(function(n,o){j&&(n=e[o=n]),Te(L,o,De(n,t,i,r,o,e,T))})),L}function Me(e){return!(!Ge(e)||(t=e,Z&&Z in t))&&(Je(e)||$(e)?te:T).test($e(e));var t}function Oe(e){var t=new e.constructor(e.byteLength);return new ne(t).set(new ne(e)),t}function Re(e,t,i,r){i||(i={});for(var n=-1,o=t.length;++n<o;){var a=t[n],s=r?r(i[a],e[a],a,i,e):void 0;Te(i,a,void 0===s?e[a]:s)}return i}function Be(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 je(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return Me(i)?i:void 0}Ae.prototype.clear=function(){this.__data__=me?me(null):{}},Ae.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ae.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===i?void 0:r}return Q.call(t,e)?t[e]:void 0},Ae.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Ae.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?i:t,this},Ee.prototype.clear=function(){this.__data__=[]},Ee.prototype.delete=function(e){var t=this.__data__,i=Le(t,e);return!(i<0)&&(i==t.length-1?t.pop():ce.call(t,i,1),!0)},Ee.prototype.get=function(e){var t=this.__data__,i=Le(t,e);return i<0?void 0:t[i][1]},Ee.prototype.has=function(e){return Le(this.__data__,e)>-1},Ee.prototype.set=function(e,t){var i=this.__data__,r=Le(i,e);return r<0?i.push([e,t]):i[r][1]=t,this},Se.prototype.clear=function(){this.__data__={hash:new Ae,map:new(he||Ee),string:new Ae}},Se.prototype.delete=function(e){return Be(this,e).delete(e)},Se.prototype.get=function(e){return Be(this,e).get(e)},Se.prototype.has=function(e){return Be(this,e).has(e)},Se.prototype.set=function(e,t){return Be(this,e).set(e,t),this},Pe.prototype.clear=function(){this.__data__=new Ee},Pe.prototype.delete=function(e){return this.__data__.delete(e)},Pe.prototype.get=function(e){return this.__data__.get(e)},Pe.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Ee){var r=i.__data__;if(!he||r.length<199)return r.push([e,t]),this;i=this.__data__=new Se(r)}return i.set(e,t),this};var Fe=ue?H(ue,Object):function(){return[]},Ne=function(e){return ee.call(e)};function ze(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||L.test(e))&&e>-1&&e%1==0&&e<t}function Ve(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function $e(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(pe&&Ne(new pe(new ArrayBuffer(1)))!=y||he&&Ne(new he)!=u||fe&&Ne(fe.resolve())!=p||ge&&Ne(new ge)!=f||be&&Ne(new be)!=m)&&(Ne=function(e){var t=ee.call(e),i=t==d?e.constructor:void 0,r=i?$e(i):void 0;if(r)switch(r){case ve:return y;case ye:return u;case we:return p;case xe:return f;case ke:return m}return t});var He=Array.isArray;function qe(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Je(e)}var Ke=le||function(){return!1};function Je(e){var t=Ge(e)?ee.call(e):"";return t==s||t==c}function Ge(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ye(e){return qe(e)?Ie(e):function(e){if(!Ve(e))return de(e);var t=[];for(var i in Object(e))Q.call(e,i)&&"constructor"!=i&&t.push(i);return t}(e)}e.exports=function(e){return De(e,!0,!0)}}(Qs,Qs.exports);var ec=qi(Qs.exports);function tc(e){return ec(e)}function ic(e){return e===Object(e)}function rc(e){return[...e.matchAll(/hl:{1}[a-zA-Z0-9]+:{1}[a-zA-Z0-9]+/gm)].map((e=>e[0])).filter((e=>!!e))}async function nc(e,t){const i=rc(e);if(i.length){const r=await async function(e,t){return(await Promise.all(e.map((async e=>await t.decode(e))))).reduce((function(e,t){return e.push(t.meta.url[0]),e}),[])}(i,t);e=function(e,t,i){return t.forEach(((t,r)=>{e=e.replace(i[r],t)})),e}(e,r,i)}return e}class oc{certificateImage;certificateJson;description;display;expires;explorerAPIs=[];id;isFormatValid;issuedOn;issuer;locale;metadataJson;name;options;recipientFullName;recordLink;revocationKey;sealImage;signature;signatureImage;signers=[];subtitle;hashlinkVerifier;hasHashlinks=!1;verificationSteps;verifier;constructor(e,t={}){if(this._setOptions(t),"object"!=typeof e)try{e=JSON.parse(e)}catch(e){throw new Error(Ks.i18n.getText("errors","certificateNotValid"))}this.certificateJson=tc(e)}async init(){if(this.certificateJson.display?.content){rc(this.certificateJson.display.content).length&&await import("./HashlinkVerifier-40818bdd-2156022a.js").then((e=>{this.hashlinkVerifier=new e.HashlinkVerifier}))}await this.parseJson(this.certificateJson),this.verifier=new Xs({certificateJson:this.certificateJson,expires:this.expires,id:this.id,issuer:this.issuer,hashlinkVerifier:this.hashlinkVerifier,revocationKey:this.revocationKey,explorerAPIs:tc(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=Gs(e["@context"]),i=await Ys[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({},ds,e),this.locale=Ks.i18n.ensureIsSupported("auto"===this.options.locale?Ks.i18n.detectLocale():this.options.locale),this.explorerAPIs=this.options.explorerAPIs||[],e.didResolverUrl&&(Ks.did.didResolver.url=e.didResolverUrl),hs.locale=this.locale}async _setProperties({certificateImage:e,description:t,display:i,expires:r,id:n,isFormatValid:o,issuedOn:a,issuer:s,metadataJson:c,name:u,recipientFullName:l,recordLink:d,revocationKey:p,sealImage:h,signature:f,signatureImage:g,subtitle:b}){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=u,this.recipientFullName=l,this.recordLink=d,this.revocationKey=p,this.sealImage=h,this.signature=f,this.signatureImage=g,this.subtitle=b,this.display=await this.parseHashlinksInDisplay(i)}async parseHashlinksInDisplay(e){const t=tc(e);if(t)return"text/html"!==t.contentMediaType||(t.content=await nc(t.content,this.hashlinkVerifier)),t}}var ac=function(e,t){return ac=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},ac(e,t)};function sc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}ac(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var cc=function(){return cc=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},cc.apply(this,arguments)};function uc(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 lc(e){return/^(ftp|http|https):\/\/[^ "]+$/.test(e)}function dc(e){return/^(\.\/|\.\.\/|[A-Z]:\/\/|\/)[^ "]+$/.test(e)}function pc(){return{certificateDefinition:null,errorMessage:"errors.invalidBlockcertsUrl"}}var hc=Object.freeze({__proto__:null,displayHtmlHasNoWidthConstraint:tt,download:function(e){return e+it},initializeVerificationSteps:function(e){const t=JSON.parse(JSON.stringify(e.verificationSteps));return t.map(((e,i)=>Object.assign(Object.assign({},e),{isLast:i===t.length-1,status:Ns.DEFAULT})))},isPathToCertificateValidURI:function(e){return lc(e)||dc(e)},parse:function(e,t={}){return uc(this,void 0,void 0,(function*(){t.locale||(t.locale="auto");try{const{retrieveBlockcertsVersion:i,Certificate:r}=yield import("./index-69ba64e7.js");let n;if(1===i(e["@context"]).versionNumber){const{Certificate:i}=yield import("./verifier-es-b337491f.js");n=new i(e,t)}else n=new r(e,t);return yield n.init(),{certificateDefinition:n}}catch(e){return console.error(e),{certificateDefinition:null,errorMessage:"errors.invalidBlockcerts"}}}))},read:function(e){return uc(this,void 0,void 0,(function*(){if(!e)return;const t=yield function(e){return uc(this,void 0,void 0,(function*(){return yield new Promise((function(t,i){const r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=r.onabort=i,r.readAsText(e)}))}))}(e);return t}))},retrieve:function(e){return uc(this,void 0,void 0,(function*(){if(!lc(e)&&!dc(e))return console.error("Invalid url to retrieve:",e),null;const t=e+it;return yield fetch(t).then((e=>uc(this,void 0,void 0,(function*(){return yield e.text()})))).then((e=>{try{return{certificateDefinition:JSON.parse(e)}}catch(e){return console.log(e),{certificateDefinition:null,errorMessage:"errors.invalidBlockcertsUrl"}}})).catch(pc)}))}});var fc=((e={})=>{if(!window.Proxy){const t=function(){let e=null;function t(e){return!!e&&("object"==typeof e||"function"==typeof e)}const i=function(i,r){if(!t(i)||!t(r))throw new TypeError("Cannot create proxy with a non-object as target or handler");let n=function(){};e=function(){n=function(e){throw new TypeError(`Cannot perform '${e}' on a proxy that has been revoked`)}};const o=r;r={get:null,set:null,apply:null,construct:null};for(const e in o)e in r&&(r[e]=o[e]);"function"==typeof o&&(r.apply=o.apply.bind(o));let a=this,s=!1,c=!1;"function"==typeof i?(a=function(){const e=this&&this.constructor===a,t=Array.prototype.slice.call(arguments);return n(e?"construct":"apply"),e&&r.construct?r.construct.call(this,i,t):!e&&r.apply?r.apply(i,this,t):e?(t.unshift(i),new(i.bind.apply(i,t))):i.apply(this,t)},s=!0):i instanceof Array&&(a=[],c=!0);const u=r.get?function(e){return n("get"),r.get(this,e,a)}:function(e){return n("get"),this[e]},l=r.set?function(e,t){n("set"),r.set(this,e,t,a)}:function(e,t){n("set"),this[e]=t},d=Object.getOwnPropertyNames(i),p={};d.forEach((function(e){if((s||c)&&e in a)return;const t={enumerable:!!Object.getOwnPropertyDescriptor(i,e).enumerable,get:u.bind(i,e),set:l.bind(i,e)};Object.defineProperty(a,e,t),p[e]=!0}));let h=!0;if(Object.setPrototypeOf?Object.setPrototypeOf(a,Object.getPrototypeOf(i)):a.__proto__?a.__proto__=i.__proto__:h=!1,r.get||!h)for(const e in i)p[e]||Object.defineProperty(a,e,{get:u.bind(i,e)});return Object.seal(i),Object.seal(a),a};return i.revocable=function(t,r){return{proxy:new i(t,r),revoke:e}},i}();return new t(e,Xe)}return new Proxy(e,Xe)})({certificates:hc,events:Object.freeze({__proto__:null,dispatch:function(e="",t=null,i){if(!e||"string"!=typeof e)return;if(!t||"object"!=typeof t)return;const r=new CustomEvent(e,{detail:Object.assign({certificateDefinition:t},i)});window.dispatchEvent(r)}})});function gc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bc={exports:{}},mc={},vc={exports:{}},yc={};function wc(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}var xc=/javascript\s*\:/gim;yc.whiteList=wc(),yc.getDefaultWhiteList=wc,yc.onAttr=function(e,t,i){},yc.onIgnoreAttr=function(e,t,i){},yc.safeAttrValue=function(e,t){return xc.test(t)?"":t};var kc={indexOf:function(e,t){var i,r;if(Array.prototype.indexOf)return e.indexOf(t);for(i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1},forEach:function(e,t,i){var r,n;if(Array.prototype.forEach)return e.forEach(t,i);for(r=0,n=e.length;r<n;r++)t.call(i,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}};var _c=function(e,t){";"!==(e=kc.trimRight(e))[e.length-1]&&(e+=";");var i=e.length,r=!1,n=0,o=0,a="";function s(){if(!r){var i=kc.trim(e.slice(n,o)),s=i.indexOf(":");if(-1!==s){var c=kc.trim(i.slice(0,s)),u=kc.trim(i.slice(s+1));if(c){var l=t(n,a.length,c,u,i);l&&(a+=l+"; ")}}}n=o+1}for(;o<i;o++){var c=e[o];if("/"===c&&"*"===e[o+1]){var u=e.indexOf("*/",o+2);if(-1===u)break;n=(o=u+1)+1,r=!1}else"("===c?r=!0:")"===c?r=!1:";"===c?r||s():"\n"===c&&s()}return kc.trim(a)},Cc=yc,Ac=_c;function Ec(e){return null==e}function Sc(e){(e=function(e){var t={};for(var i in e)t[i]=e[i];return t}(e||{})).whiteList=e.whiteList||Cc.whiteList,e.onAttr=e.onAttr||Cc.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||Cc.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||Cc.safeAttrValue,this.options=e}Sc.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,i=t.whiteList,r=t.onAttr,n=t.onIgnoreAttr,o=t.safeAttrValue;return Ac(e,(function(e,t,a,s,c){var u=i[a],l=!1;if(!0===u?l=u:"function"==typeof u?l=u(s):u instanceof RegExp&&(l=u.test(s)),!0!==l&&(l=!1),s=o(a,s)){var d,p={position:t,sourcePosition:e,source:c,isWhite:l};return l?Ec(d=r(a,s,p))?a+":"+s:d:Ec(d=n(a,s,p))?void 0:d}}))};var Pc=Sc;!function(e,t){var i=yc,r=Pc;for(var n in t=e.exports=function(e,t){return new r(t).process(e)},t.FilterCSS=r,i)t[n]=i[n];"undefined"!=typeof window&&(window.filterCSS=e.exports)}(vc,vc.exports);var Ic=vc.exports,Tc=gc(Ic),Lc={indexOf:function(e,t){var i,r;if(Array.prototype.indexOf)return e.indexOf(t);for(i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1},forEach:function(e,t,i){var r,n;if(Array.prototype.forEach)return e.forEach(t,i);for(r=0,n=e.length;r<n;r++)t.call(i,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}},Dc=Ic.FilterCSS,Mc=Ic.getDefaultWhiteList,Oc=Lc;function Rc(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var Bc=new Dc;function jc(e){return e.replace(Fc,"&lt;").replace(Nc,"&gt;")}var Fc=/</g,Nc=/>/g,zc=/"/g,Vc=/&quot;/g,$c=/&#([a-zA-Z0-9]*);?/gim,Uc=/&colon;?/gim,Hc=/&newline;?/gim,qc=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,Kc=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,Jc=/u\s*r\s*l\s*\(.*/gi;function Gc(e){return e.replace(zc,"&quot;")}function Yc(e){return e.replace(Vc,'"')}function Wc(e){return e.replace($c,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function Zc(e){return e.replace(Uc,":").replace(Hc," ")}function Xc(e){for(var t="",i=0,r=e.length;i<r;i++)t+=e.charCodeAt(i)<32?" ":e.charAt(i);return Oc.trim(t)}function Qc(e){return e=Xc(e=Zc(e=Wc(e=Yc(e))))}function eu(e){return e=jc(e=Gc(e))}mc.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},mc.getDefaultWhiteList=Rc,mc.onTag=function(e,t,i){},mc.onIgnoreTag=function(e,t,i){},mc.onTagAttr=function(e,t,i){},mc.onIgnoreTagAttr=function(e,t,i){},mc.safeAttrValue=function(e,t,i,r){if(i=Qc(i),"href"===t||"src"===t){if("#"===(i=Oc.trim(i)))return"#";if("http://"!==i.substr(0,7)&&"https://"!==i.substr(0,8)&&"mailto:"!==i.substr(0,7)&&"tel:"!==i.substr(0,4)&&"data:image/"!==i.substr(0,11)&&"ftp://"!==i.substr(0,6)&&"./"!==i.substr(0,2)&&"../"!==i.substr(0,3)&&"#"!==i[0]&&"/"!==i[0])return""}else if("background"===t){if(qc.lastIndex=0,qc.test(i))return""}else if("style"===t){if(Kc.lastIndex=0,Kc.test(i))return"";if(Jc.lastIndex=0,Jc.test(i)&&(qc.lastIndex=0,qc.test(i)))return"";!1!==r&&(i=(r=r||Bc).process(i))}return i=eu(i)},mc.escapeHtml=jc,mc.escapeQuote=Gc,mc.unescapeQuote=Yc,mc.escapeHtmlEntities=Wc,mc.escapeDangerHtml5Entities=Zc,mc.clearNonPrintableCharacter=Xc,mc.friendlyAttrValue=Qc,mc.escapeAttrValue=eu,mc.onIgnoreTagStripAll=function(){return""},mc.StripTagBody=function(e,t){"function"!=typeof t&&(t=function(){});var i=!Array.isArray(e),r=[],n=!1;return{onIgnoreTag:function(o,a,s){if(function(t){return!!i||-1!==Oc.indexOf(e,t)}(o)){if(s.isClosing){var c="[/removed]",u=s.position+10;return r.push([!1!==n?n:s.position,u]),n=!1,c}return n||(n=s.position),"[removed]"}return t(o,a,s)},remove:function(e){var t="",i=0;return Oc.forEach(r,(function(r){t+=e.slice(i,r[0]),i=r[1]})),t+=e.slice(i)}}},mc.stripCommentTag=function(e){for(var t="",i=0;i<e.length;){var r=e.indexOf("\x3c!--",i);if(-1===r){t+=e.slice(i);break}t+=e.slice(i,r);var n=e.indexOf("--\x3e",r);if(-1===n)break;i=n+3}return t},mc.stripBlankChar=function(e){var t=e.split("");return(t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))}))).join("")},mc.cssFilter=Bc,mc.getDefaultCSSWhiteList=Mc;var tu={},iu=Lc;function ru(e){var t,i=iu.spaceIndex(e);return t=-1===i?e.slice(1,-1):e.slice(1,i+1),"/"===(t=iu.trim(t).toLowerCase()).slice(0,1)&&(t=t.slice(1)),"/"===t.slice(-1)&&(t=t.slice(0,-1)),t}function nu(e){return"</"===e.slice(0,2)}var ou=/[^a-zA-Z0-9\\_:.-]/gim;function au(e,t){for(;t<e.length;t++){var i=e[t];if(" "!==i)return"="===i?t:-1}}function su(e,t){for(;t<e.length;t++){var i=e[t];if(" "!==i)return"'"===i||'"'===i?t:-1}}function cu(e,t){for(;t>0;t--){var i=e[t];if(" "!==i)return"="===i?t:-1}}function uu(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}tu.parseTag=function(e,t,i){var r="",n=0,o=!1,a=!1,s=0,c=e.length,u="",l="";e:for(s=0;s<c;s++){var d=e.charAt(s);if(!1===o){if("<"===d){o=s;continue}}else if(!1===a){if("<"===d){r+=i(e.slice(n,s)),o=s,n=s;continue}if(">"===d){r+=i(e.slice(n,o)),u=ru(l=e.slice(o,s+1)),r+=t(o,r.length,u,l,nu(l)),n=s+1,o=!1;continue}if('"'===d||"'"===d)for(var p=1,h=e.charAt(s-p);""===h.trim()||"="===h;){if("="===h){a=d;continue e}h=e.charAt(s-++p)}}else if(d===a){a=!1;continue}}return n<e.length&&(r+=i(e.substr(n))),r},tu.parseAttr=function(e,t){var i=0,r=0,n=[],o=!1,a=e.length;function s(e,i){if(!((e=(e=iu.trim(e)).replace(ou,"").toLowerCase()).length<1)){var r=t(e,i||"");r&&n.push(r)}}for(var c=0;c<a;c++){var u,l=e.charAt(c);if(!1!==o||"="!==l)if(!1===o||c!==r)if(/\s|\n|\t/.test(l)){if(e=e.replace(/\s|\n|\t/g," "),!1===o){if(-1===(u=au(e,c))){s(iu.trim(e.slice(i,c))),o=!1,i=c+1;continue}c=u-1;continue}if(-1===(u=cu(e,c-1))){s(o,uu(iu.trim(e.slice(i,c)))),o=!1,i=c+1;continue}}else;else{if(-1===(u=e.indexOf(l,c+1)))break;s(o,iu.trim(e.slice(r+1,u))),o=!1,i=(c=u)+1}else o=e.slice(i,c),i=c+1,r='"'===e.charAt(i)||"'"===e.charAt(i)?i:su(e,c+1)}return i<e.length&&(!1===o?s(e.slice(i)):s(o,uu(iu.trim(e.slice(i))))),iu.trim(n.join(" "))};var lu=Ic.FilterCSS,du=mc,pu=tu,hu=pu.parseTag,fu=pu.parseAttr,gu=Lc;function bu(e){return null==e}function mu(e){(e=function(e){var t={};for(var i in e)t[i]=e[i];return t}(e||{})).stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=du.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=function(e){var t={};for(var i in e)Array.isArray(e[i])?t[i.toLowerCase()]=e[i].map((function(e){return e.toLowerCase()})):t[i.toLowerCase()]=e[i];return t}(e.whiteList||e.allowList):e.whiteList=du.whiteList,e.onTag=e.onTag||du.onTag,e.onTagAttr=e.onTagAttr||du.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||du.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||du.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||du.safeAttrValue,e.escapeHtml=e.escapeHtml||du.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new lu(e.css))}mu.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,i=t.whiteList,r=t.onTag,n=t.onIgnoreTag,o=t.onTagAttr,a=t.onIgnoreTagAttr,s=t.safeAttrValue,c=t.escapeHtml,u=this.cssFilter;t.stripBlankChar&&(e=du.stripBlankChar(e)),t.allowCommentTag||(e=du.stripCommentTag(e));var l=!1;t.stripIgnoreTagBody&&(l=du.StripTagBody(t.stripIgnoreTagBody,n),n=l.onIgnoreTag);var d=hu(e,(function(e,t,l,d,p){var h={sourcePosition:e,position:t,isClosing:p,isWhite:Object.prototype.hasOwnProperty.call(i,l)},f=r(l,d,h);if(!bu(f))return f;if(h.isWhite){if(h.isClosing)return"</"+l+">";var g=function(e){var t=gu.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var i="/"===(e=gu.trim(e.slice(t+1,-1)))[e.length-1];return i&&(e=gu.trim(e.slice(0,-1))),{html:e,closing:i}}(d),b=i[l],m=fu(g.html,(function(e,t){var i=-1!==gu.indexOf(b,e),r=o(l,e,t,i);return bu(r)?i?(t=s(l,e,t,u))?e+'="'+t+'"':e:bu(r=a(l,e,t,i))?void 0:r:r}));return d="<"+l,m&&(d+=" "+m),g.closing&&(d+=" /"),d+=">"}return bu(f=n(l,d,h))?c(d):f}),c);return l&&(d=l.remove(d)),d};var vu=mu;!function(e,t){var i=mc,r=tu,n=vu;function o(e,t){return new n(t).process(e)}(t=e.exports=o).filterXSS=o,t.FilterXSS=n,function(){for(var e in i)t[e]=i[e];for(var n in r)t[n]=r[n]}(),"undefined"!=typeof window&&(window.filterXSS=e.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=e.exports)}(bc,bc.exports);var yu=gc(bc.exports);const wu={...Tc.getDefaultWhiteList(),bottom:!0,left:!0,float:!0,overflow:!0,position:!0,right:!0,top:!0,transform:!0,opacity:!0,"transform-origin":!0,"flex-direction":!0,"flex-wrap":!0,"justify-content":!0,"align-items":!0,"white-space":!0,"line-height":!0,"grid-template-columns":!0,"grid-template-rows":!0,"grid-column":!0,"grid-row":!0,"grid-area":!0,"align-self":!0,"justify-self":!0,span:!0};var xu=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,ku=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,_u=/u\s*r\s*l\s*\(.*/gi;const Cu={whiteList:function(){const e=yu.getDefaultWhiteList();return Object.keys(e).forEach((t=>{e[t].push("style"),e[t].push("class"),e[t].push("download")})),e}(),css:!1,stripIgnoreTagBody:!0,onTagAttr:function(e,t,i,r){if("style"===t)return`${t}="${Tc(i,{whiteList:wu}).replace(/; /g,";")}"`;if("img"===e&&"src"===t&&function(e){return!!e.match(/^data:.+;base64,/)}(i)){const e=function(e){return e.split("base64,")[1]}(i);try{return atob(e),`${t}="${i}"`}catch(e){return t}}},safeAttrValue:function(e,t,i,r){if(i=yu.friendlyAttrValue(i),"href"===t||"src"===t){if("#"===(i=function(e){if(String.prototype.trim)return e.trim();return e.replace(/(^\s*)|(\s*$)/g,"")}(i)))return"#";if(!function(e){return["http://","https://","mailto:","tel:","data:","#","/"].some((t=>e.substr(0,t.length)===t))}(i))return""}else if("background"===t){if(xu.lastIndex=0,xu.test(i))return""}else if("style"===t){if(ku.lastIndex=0,ku.test(i))return"";if(_u.lastIndex=0,_u.test(i)&&(xu.lastIndex=0,xu.test(i)))return"";!1!==r&&(i=(r=r||yu.getDefaultCSSWhiteList()).process(i))}return i=yu.escapeAttrValue(i)}},Au=new yu.FilterXSS(Cu);function Eu(e){return Au.process(e)}const Su="en";var Pu={locale:Su};const Iu={en:{errors:{errorLabel:"Error",invalidBlockcerts:"Not a valid Blockcerts credential. Please check with the issuer or recipient that has provided this credential.",invalidBlockcertsUrl:"Not a valid credential URL.",invalidFormatDragAndDrop:"Only JSON files are accepted",invalidUrl:"This does not seem to be a valid URL.",noIssuerName:"No name provided",noMetadata:"No metadata specified for this record",noShareUrl:"No URL to share!",noTransactionId:"No transaction ID"},text:{brandName:"Blockcerts",blockcertsHint:"Visit Blockcerts website",by:"by",certified:"Certified by",closeButton:"Click to close",downloadLink:"Download Record in JSON format",downloadPDFLink:"Download Record in PDF Format",downloadPDFLinkIsLoading:"Generating PDF...",dragAndDropHint:"(you can also drag & drop your file).",fileUpload:"Choose JSON file",issued:"Issued on",issueDate:"Issue Date",issuerName:"Issuer",issuerPublicKey:"Issuer's public key",issuerProfileDomain:"Issuer's information",item:"Item",itemPlural:"Items",metadataButton:"View Metadata",metadataTitle:"Metadata",motto:"Blockcerts, The Open Standard for Blockchain Credentials",recipient:"Recipient",share:"Share on",shareButton:"Share on Social Networks",signatureSuiteType:"Digital signature type",signatureStatusSuccess:"This signature has been successfully verified",signatureStatusTestSuccess:"This signature has been successfully verified but has been issued on a test chain",signatureStatusFailure:"This signature yielded an error during verification",signed:"Signed by",substepsListClose:"Hide",substepsListHint:"Toggle open list of substeps",transactionId:"Transaction ID",urlInput:"Enter the certificate URL",urlInputPlaceholder:"Certificate URL",verificationStepProgress:"Verifying step...",verify:"Verify",verifyAgain:"Verify again",verifyOther:"Verify another record",viewRecord:"View Record"},date:{months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"],pattern:"MM DD, YYYY"},numbers:{ordinal:["th","st","nd","rd"]}},es:{errors:{errorLabel:"Error",invalidBlockcerts:"No es una credencial válida de Blockcerts. Verifique con el emisor o el destinatario que ha proporcionado esta credencial.",invalidBlockcertsUrl:"No es URL de certificado valido.",invalidFormatDragAndDrop:"Solo se aceptan archivos JSON",invalidUrl:"Esto no parece ser un URL válido.",noIssuerName:"No nombre comunicado",noMetadata:"No se han especificado metadatos para este registro",noShareUrl:"No hay URL para compartir!",noTransactionId:"No ID de transacción"},text:{brandName:"Blockcerts",blockcertsHint:"Visite el sitio web de Blockcerts",by:"por",certified:"Certificado por",closeButton:"Haz Click para cerrar",downloadLink:"Descarga el Registro en formato JSON",downloadPDFLink:"Descarga el Registro en formato PDF",downloadPDFLinkIsLoading:"Generando PDF...",dragAndDropHint:"(también puedes arrastrar y soltar tu archivo).",fileUpload:"Escoge archivo JSON",issued:"Emitido el",issueDate:"Fecha de Emisión",issuerName:"Emisor",issuerPublicKey:"Llave publica del Emisor",issuerProfileDomain:"Información del Emisor",item:"Elemento",itemPlural:"Elementos",metadataButton:"Ver Metadata",metadataTitle:"Metadata",motto:"Blockcerts, El Estándar Abierto para Credenciales Blockchain",recipient:"Recipiente",share:"Comparte en",shareButton:"Comparte en Redes Sociales",signatureSuiteType:"Tipo de firma digital",signed:"Firmado Por",signatureStatusSuccess:"La verificación de esta firma digital ha tenido éxito",signatureStatusTestSuccess:"La verificación de esta firma digital ha tenido éxito pero se utilizó una cadena de test",signatureStatusFailure:"Error en la verificación de esta firma digital",substepsListClose:"Esconde",substepsListHint:"Pasa lista abierta de sub-pasos",transactionId:"ID de Transacción",urlInput:"Ingrese el URL del certificado",urlInputPlaceholder:"Certificado del URL",verificationStepProgress:"Paso de verificación...",verify:"Verifica",verifyAgain:"Verifica nuevamente",verifyOther:"Verifica otro registro",viewRecord:"Ver Registro"},date:{months:["enero","feb","marzo","abr","mayo","jun","jul","agosto","set","oct","nov","dic"],pattern:"MM DD, YYYY"},numbers:{ordinal:"°"}},fr:{errors:{errorLabel:"Erreur",invalidBlockcerts:"Ceci n'est pas un certificat Blockcerts valide. Veuillez s'il vous plaît contrôler avec l'organisme émetteur ou le récipiendaire de ce certificat.",invalidBlockcertsUrl:"Ceci n'est pas une URL de certificat valide.",invalidFormatDragAndDrop:"Seul le format JSON est accepté",invalidUrl:"URL invalide",noIssuerName:"Pas de nom fourni",noMetadata:"Ce certificat ne contient pas de métadata",noShareUrl:"Pas d'URL à partager!",noTransactionId:"Pas d'identifiant de transaction"},text:{brandName:"Blockcerts",blockcertsHint:"Visiter le site de Blockcerts",by:"par",certified:"Certifié par",closeButton:"Cliquer pour fermer",downloadLink:"Télécharger le certificat au format JSON",downloadPDFLink:"Télécharger le certificat au format PDF",downloadPDFLinkIsLoading:"Création du PDF...",dragAndDropHint:"(vous pouvez aussi glisser et déposer votre fichier).",fileUpload:"Choisir un fichier JSON",issued:"Émis le",issueDate:"Date d'émission",issuerName:"Émetteur",issuerPublicKey:"Clé publique de l'émetteur",issuerProfileDomain:"Profil de l'émetteur",item:"point contrôlé",itemPlural:"points contrôlés",metadataButton:"Voir les métadata",metadataTitle:"Métadata",motto:"Blockcerts, The Open Standard for Blockchain Credentials",recipient:"Titulaire",share:"Partager sur",shareButton:"Partager sur les réseaux sociaux",signatureSuiteType:"Type de signature numérique",signed:"Signé par",signatureStatusSuccess:"Cette signature a été vérifiée avec succès",signatureStatusTestSuccess:"Cette signature a été vérifiée avec succès mais la blockchain utilisée est de test",signatureStatusFailure:"Erreur durant la vérification de cette signature",substepsListClose:"Fermer",substepsListHint:"Afficher les sous-étapes",transactionId:"Identifiant de transaction",urlInput:"Entrez l'URL du certificat",urlInputPlaceholder:"URL du certificat",verificationStepProgress:"Vérification en cours...",verify:"Vérifier",verifyAgain:"Vérifier de nouveau",verifyOther:"Vérifier un autre certificat",viewRecord:"Voir le certificat"},date:{months:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Aout","Sept","Oct","Nov","Déc"],pattern:"DD MM YYYY"},numbers:{ordinal:["ème","er"]}},it:{errors:{errorLabel:"Errore",invalidBlockcerts:"Non è una definizione valida di Blockcerts.",invalidBlockcertsUrl:"Non è un URL di certificato valido.",invalidFormatDragAndDrop:"Sono accettati solo file JSON",invalidUrl:"Questo non sembra essere un URL valido.",noIssuerName:"No name provided",noMetadata:"Nessun Metadata specificato per questo record",noShareUrl:"Non c'è un URL da condividere!",noTransactionId:"Nessun ID transazione"},text:{brandName:"Blockcerts",blockcertsHint:"Visita il sito Web Blockcerts",by:"da",certified:"Certificato da",closeButton:"Fai clic per chiudere",downloadLink:"Scarica il Record in formato JSON",downloadPDFLink:"Scarica il Record in formato JSON",downloadPDFLinkIsLoading:"Generazione PDF...",dragAndDropHint:"(puoi anche trascinare il file).",fileUpload:"Scegli il file JSON",issued:"Rilasciato il",issueDate:"Data",issuerName:"Organizzazione Issuer",issuerPublicKey:"Chiave pubblica del Issuer",issuerProfileDomain:"Informazzione del Issuer",item:"Elemento",itemPlural:"Elementi",metadataButton:"Visualizza Metadata",metadataTitle:"Metadata",motto:"Blockcerts, The Open Standard for Blockchain Credentials",recipient:"Titolare",share:"Condividi",shareButton:"Condividi sui Social Network",signed:"Firmato da",signatureStatusSuccess:"This signature has been successfully verified",signatureStatusTestSuccess:"This signature has been successfully verified but has been issued on a test chain",signatureStatusFailure:"This signature yielded an error during verification",signatureSuiteType:"Digital signature type",substepsListClose:"Nascondi",substepsListHint:"Mostra gli step secondari",transactionId:"ID transazione",urlInput:"Inserisci l'URL del certificato",urlInputPlaceholder:"URL del certificato",verificationStepProgress:"Step di verifica...",verify:"Verifica",verifyAgain:"Verifica di nuovo",verifyOther:"Verifica un altro record",viewRecord:"Visualizza il Record"},date:{months:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],pattern:"DD MM YYYY"},numbers:{ordinal:"°"}}};function Tu(){return Iu}function Lu(e,t,i,r){if(!e)return"";if(e.includes(".")){const i=e.split(".");e=i[0],t=i[1]}if(!t)return"";i&&r>1&&(t+="Plural");const n=Tu();return n[Pu.locale]?n[Pu.locale][e]?n[Pu.locale][e][t]?n[Pu.locale][e][t]||"":"[missing locale item data]":"[missing locale group data]":"[missing locale data]"}function Du(e){const t=Lu("date","pattern");"Z"===e.slice(-1)?e=e.slice(0,e.length-1):e.includes("+")&&(e=e.split("+")[0]);const i=new Date(e);let r=function(e,t){const i=Lu("date","months");return e.replace("MM",i[t])}(t,i.getMonth());return r=function(e,t){return e.replace("DD",t)}(r,i.getDate().toString(10)),r=function(e,t){return e.replace("YYYY",t)}(r,i.getFullYear().toString(10)),r}function Mu(e){return e.certificateDefinition}function Ou(e){const t=Mu(e);return t?t.signers:[]}function Ru(e){const t=Mu(e);return t?t.issuedOn:""}function Bu(e){return Mu(e)?Du(Ru(e)):""}function ju(e){const t=Mu(e);return t?t.recipientFullName:""}function Fu(e){const t=Mu(e);return t?t.name:""}function Nu(e){const t=Mu(e);return t?t.issuer.name:""}function zu(e){const t=Mu(e);return t?t.issuer.image:""}function Vu(e){const t=Mu(e);if(!t)return"";const{displayHtml:i}=t.certificateJson;if(i)return Eu(i);const r=t.display;if(r)switch(r.contentMediaType){case Qe.TEXT_HTML:return Eu(r.content);case Qe.IMAGE_PNG:case Qe.IMAGE_JPEG:case Qe.IMAGE_GIF:case Qe.IMAGE_BMP:return`<img src="data:${r.contentMediaType};${r.contentEncoding},${r.content}"/>`;case Qe.APPLICATION_PDF:return`<embed width="100%" height="100%" type="application/pdf" src="data:${r.contentMediaType};${r.contentEncoding},${r.content}"/>`;default:return""}return""}function $u(e){const t=Mu(e);return t&&lc(t.recordLink)?t.recordLink:""}function Uu(e){const t=$u(e);return t?fc.certificates.download(t):""}function Hu(e){const t=Mu(e);if(t)try{return JSON.parse(t.metadataJson)}catch(e){return null}return null}function qu(e){var t;const i=Ou(e);return 0===i.length?null!==(t=nl(e,"transactionLink"))&&void 0!==t?t:[]:i.map((e=>e.transactionLink))}function Ku(e){var t;const i=Ou(e);return 0===i.length?null!==(t=nl(e,"transactionId"))&&void 0!==t?t:[]:i.map((e=>e.transactionId))}function Ju(e){const t=Ou(e);if(0===t.length){const t=nl(e,"chain");return t?t.map((e=>null==e?void 0:e.name)):[]}return t.map((e=>{var t;return null===(t=e.chain)||void 0===t?void 0:t.name}))}function Gu(e){return Ju(e).some((e=>"Mocknet"===e||(null==e?void 0:e.includes("Testnet"))))}function Yu(e,t){const i=Ju(e)[t];return!!i&&("Mocknet"===i||i.includes("Testnet"))}function Wu(e){return e.verifiedSteps||[]}function Zu(e,t){return Wu(e).find((e=>e.code===t))}function Xu(e){return Wu(e).some((e=>e.status===Ns.FAILURE))}function Qu(e){return e.finalStep}function el(e){return Ou(e).map((e=>e.issuerPublicKey))}function tl(e){return Ou(e).map((e=>e.issuerProfileUrl))}function il(e){return Ou(e).map((e=>e.issuerProfileDomain))}function rl(e){return Ou(e).map((e=>e.signatureSuiteType))}function nl(e,t){const i=Mu(e);return i?[i[t]]:null}function ol(e){const t=Mu(e);return t?t.certificateImage:""}function al(e){const t=Mu(e);return t?t.subtitle:""}function sl(e){const t=Mu(e);return t?t.description:""}function cl(e){const t=Mu(e);return t?t.signatureImage:null}function ul(e){const t=Mu(e);return t?t.sealImage:""}function ll(e){return e.isGeneratingPDF}function dl(e,t){switch(t.type){case Ue:return function(e,t){const{resetSteps:i}=t.payload;return Object.assign(Object.assign({},e),{verifiedSteps:i})}(e,t);case je:return function(e,t){return Object.assign(Object.assign({},e),t.payload.options)}(e,t);case Fe:return function(e,t){return Object.assign(Object.assign(Object.assign({},e),t.payload),t.payload.certificateDefinition&&{verifiedSteps:fc.certificates.initializeVerificationSteps(t.payload.certificateDefinition)})}(e,t);case Ne:return function(e,t){return Object.assign(Object.assign({},e),{certificateDefinition:t.payload.definition})}(e,t);case ze:return function(e,t){return Object.assign(Object.assign({},e),{input:Object.assign(Object.assign({},e.input),{certificateUrl:t.payload.url})})}(e,t);case qe:return function(e,t){const{parentStepCode:i,status:r}=t.payload;return Zu(e,i).status=r,e}(e,t);case $e:return function(e,t){return Object.assign(Object.assign({},e),{input:Object.assign(Object.assign({},e.input),{isValid:t.payload.isValid})})}(e,t);case Ye:return function(e,t){const{errorMessage:i}=t.payload;return Object.assign(Object.assign({},e),{errorMessage:i})}(e,t);case We:return function(e,t){return Object.assign(Object.assign({},e),{showVerificationModal:t.payload.showVerificationModal})}(e,t);case He:return function(e,t){const{parentStep:i}=t.payload;return function(e,t){var i;let r=e.subSteps.findIndex((e=>e.code===t.code));r>-1?e.subSteps[r]=t:(null===(i=e.suites)||void 0===i?void 0:i.length)&&e.suites.forEach((e=>{r=e.subSteps.findIndex((e=>e.code===t.code)),r>-1&&(e.subSteps[r]=t)}))}(Zu(e,i),t.payload),e}(e,t);case Ke:return function(e,t){return Object.assign(Object.assign({},e),{verificationStatus:t.payload.status})}(e,t);case Je:return function(e,t){return Object.assign(Object.assign({},e),{finalStep:t.payload.finalStep})}(e,t);case Ze:return function(e,t){return Object.assign(Object.assign({},e),{isGeneratingPDF:t.payload.isGeneratingPDF})}(e,t);default:return e}}const pl="card";var hl,fl;!function(e){e.FULL="full",e.CARD="card",e.FULLSCREEN="fullscreen"}(hl||(hl={})),function(e){e.DARK="dark",e.BRIGHT="bright"}(fl||(fl={}));const gl=function(e=function(e={}){return Object.assign({input:{},verifiedSteps:[],finalStep:null,verificationStatus:Ns.DEFAULT,showVerificationModal:!1,displayMode:pl,disableDownloadPdf:!1,theme:fl.BRIGHT},e)}()){return Se(dl,e,Te(...[Me]))}();function bl(e,{mapDispatchToProps:t={},mapStateToProps:i=(()=>({})),ownProps:r={}}){return class extends(me(gl)(be)){mapDispatchToProps(){return function(e,t){if("function"==typeof e)return Pe(e,t);if("object"!=typeof e||null===e)throw new Error(_e(16));var i={};for(var r in e){var n=e[r];"function"==typeof n&&(i[r]=Pe(n,t))}return i}(t,gl.dispatch)}mapStateToProps(e){return i(gl.getState(),e)}static get properties(){return r}_render(t){const i=Object.assign(Object.assign(Object.assign({},this.mapDispatchToProps()),this.mapStateToProps(t)),t);return de`${e(i)}`}_stateChanged(e){this._requestRender()}}}function ml(e){return{type:Ye,payload:{errorMessage:e}}}const vl="certificate-load",yl="certificate-verify";function wl(e){return e.status===Ns.SUCCESS}function xl(e){return e.status===Ns.FAILURE}function kl(e){return function(t,i){if(null==e)return;const r=Zu(i(),e);let n=r.status;n===Ns.DEFAULT&&function(e){var t,i;let r=!0;return(null===(t=e.suites)||void 0===t?void 0:t.length)&&(r=null===(i=e.suites)||void 0===i?void 0:i.flatMap((e=>e.subSteps)).some(wl)),r||e.subSteps.some(wl)}(r)&&(n=Ns.STARTING),n!==Ns.DEFAULT&&function(e){var t,i;let r=!0;return(null===(t=e.suites)||void 0===t?void 0:t.length)&&(r=null===(i=e.suites)||void 0===i?void 0:i.flatMap((e=>e.subSteps)).every(wl)),r&&e.subSteps.every(wl)}(r)&&(n=Ns.SUCCESS),function(e){var t,i;let r=!1;return(null===(t=e.suites)||void 0===t?void 0:t.length)&&(r=null===(i=e.suites)||void 0===i?void 0:i.flatMap((e=>e.subSteps)).some(xl)),r||e.subSteps.some(xl)}(r)&&(n=Ns.FAILURE),t({type:qe,payload:{parentStepCode:e,status:n}})}}class _l{constructor(){this.queue=[],this.dispatchCb=null,this.isExecuting=!1,this.intervalId=0,this.dispatchNext=this.dispatchNext.bind(this)}registerCb(e){this.dispatchCb=e}push(e){e&&this.queue.push(e)}dispatchNext(){const e=this.queue.shift();e?this.dispatchCb(e):this.intervalId&&(this.isExecuting=!1,clearInterval(this.intervalId))}execute(){!this.isExecuting&&this.queue.length&&(this.isExecuting=!0,this.intervalId=setInterval(this.dispatchNext,200))}}const Cl=new _l;function Al(e){return function(t,i){const r=function(e){return function(t){e({type:He,payload:t}),e(kl(t.parentStep))}}(t);Cl.dispatchCb||Cl.registerCb(r),Cl.push(e),Cl.execute()}}function El(){return function(e,t){const i=Mu(t());let r=[];i&&(r=fc.certificates.initializeVerificationSteps(i)),e({type:Ue,payload:{resetSteps:r}})}}function Sl(e){return{type:Ke,payload:{status:e}}}function Pl(e){return e.disableVerify}function Il(e){return e.allowDownload}function Tl(e){return e.disableDownloadPdf}function Ll(e){return e.allowSocialShare}function Dl(e){return e.showMetadata}function Ml(e){return e.displayMode}function Ol(e){return e.theme}function Rl(e){return e.locale}function Bl(e){return e.explorerAPIs}function jl(e){return e.clickableUrls}function Fl(e){return e.didResolverUrl}function Nl(e){return"string"==typeof e&&(e={label:e,description:""}),{type:Je,payload:{finalStep:e}}}function zl(){return function(e,t){return uc(this,void 0,void 0,(function*(){const i=t();if(Pl(i))return void console.warn("Verification is disabled");e({type:Ve}),e(Sl(Ns.STARTING)),e(El());const r=Mu(i);if(r){fc.events.dispatch(yl,r);const t=yield r.verify((t=>{e(Al(t))}));e(Nl(t.message)),e(Sl(t.status))}}))}}function Vl(e){return{type:We,payload:{showVerificationModal:e}}}function $l(e){return function(t,i){return uc(this,void 0,void 0,(function*(){const r=i(),n={locale:Rl(r),explorerAPIs:Bl(r),didResolverUrl:Fl(r)},{certificateDefinition:o,errorMessage:a}=yield fc.certificates.parse(e,n);t(ml(a)),t({type:Fe,payload:{certificateDefinition:o}}),fc.events.dispatch(vl,o),null!=o&&(yield t((function(e,t){return uc(this,void 0,void 0,(function*(){(function(e){return e.disableAutoVerify})(t())||(e({type:Be}),e(Vl(!0))),yield e(zl())}))})))}))}}function Ul(e){return function(t){return uc(this,void 0,void 0,(function*(){const i=fc.certificates.isPathToCertificateValidURI(e);var r;if(t((r=i,function(e){e({type:$e,payload:{isValid:r}}),e(ml(r?null:"errors.invalidUrl"))})),!i)return null;t({type:ze,payload:{url:e}});const n=yield fc.certificates.retrieve(e);n.certificateDefinition?yield t($l(n.certificateDefinition)):t(ml(n.errorMessage))}))}}const Hl=/(-\w)/g,ql=e=>e[1].toUpperCase();const Kl={src:String,"disable-auto-verify":Boolean,"disable-verify":Boolean,"allow-download":Boolean,"disable-download-pdf":Boolean,"allow-social-share":Boolean,"display-mode":String,"show-metadata":Boolean,"clickable-urls":Boolean,theme:fl,locale:String,explorerAPIs:{},"did-resolver-url":String},Jl=Object.keys(Kl).map((function(e){return e.replace(Hl,ql)})).reduce(((e,t)=>(e[t]=Kl[t],e)),{});function Gl(e){let t;const i=Object.keys(Iu).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=Su),function(e){const t=e.split("-");return t.length>1?`${t[0].toLowerCase()}-${t[1].toUpperCase()}`:t[0].toLowerCase()}(e)}function Yl(e){"auto"!==e&&e||(e=navigator.language||navigator.userLanguage||navigator.browserLanguage||Su),Pu.locale=Gl(e)}var Wl=de`<style>.buv-c-input{font-size:15px;color:#031532;border-radius:2px 0 0 2px;padding:12px 15px;background-color:#f3f4f5;border:solid 1px rgba(3,21,50,.13);box-sizing:border-box;width:100%}.buv-c-input.is-invalid{border:2px solid red}.buv-c-input::-moz-placeholder{font-family:"Open Sans",-apple-system,BlinkMacSystemFont,sans-serif;color:rgba(3,21,50,.3);letter-spacing:-0.25px}.buv-c-input::-webkit-input-placeholder{font-family:"Open Sans",-apple-system,BlinkMacSystemFont,sans-serif;color:rgba(3,21,50,.3);letter-spacing:-0.25px}.buv-c-input:-moz-placeholder{font-family:"Open Sans",-apple-system,BlinkMacSystemFont,sans-serif;color:rgba(3,21,50,.3);letter-spacing:-0.25px}.buv-c-input:-ms-input-placeholder{font-family:"Open Sans",-apple-system,BlinkMacSystemFont,sans-serif;color:rgba(3,21,50,.3);letter-spacing:-0.25px}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}</style>`;function Zl(e){return void 0===e.input.isValid||e.input.isValid}const Xl=bl((({onInput:e=(()=>{}),isValid:t=!0}={})=>{const i="buv-c-input "+(t?"":"is-invalid");return de`
121
+ /*! https://mths.be/punycode v1.4.1 by @mathias */var Ji=2147483647,Gi=36,Yi=1,Wi=26,Zi=38,Xi=700,Qi=72,er=128,tr="-",ir=/[^\x20-\x7E]/,rr=/[\x2E\u3002\uFF0E\uFF61]/g,nr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},or=Gi-Yi,ar=Math.floor,sr=String.fromCharCode;function cr(e){throw new RangeError(nr[e])}function ur(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function lr(e,t,i){var r=0;for(e=i?ar(e/Xi):e>>1,e+=ar(e/t);e>or*Wi>>1;r+=Gi)e=ar(e/or);return ar(r+(or+1)*e/(e+Zi))}function dr(e){return function(e,t){var i=e.split("@"),r="";i.length>1&&(r=i[0]+"@",e=i[1]);var n=function(e,t){for(var i=e.length,r=[];i--;)r[i]=t(e[i]);return r}((e=e.replace(rr,".")).split("."),t).join(".");return r+n}(e,(function(e){return ir.test(e)?"xn--"+function(e){var t,i,r,n,o,a,s,c,u,l,d,p,h,f,g,b=[];for(e=function(e){for(var t,i,r=[],n=0,o=e.length;n<o;)(t=e.charCodeAt(n++))>=55296&&t<=56319&&n<o?56320==(64512&(i=e.charCodeAt(n++)))?r.push(((1023&t)<<10)+(1023&i)+65536):(r.push(t),n--):r.push(t);return r}(e),p=e.length,t=er,i=0,o=Qi,a=0;a<p;++a)(d=e[a])<128&&b.push(sr(d));for(r=n=b.length,n&&b.push(tr);r<p;){for(s=Ji,a=0;a<p;++a)(d=e[a])>=t&&d<s&&(s=d);for(s-t>ar((Ji-i)/(h=r+1))&&cr("overflow"),i+=(s-t)*h,t=s,a=0;a<p;++a)if((d=e[a])<t&&++i>Ji&&cr("overflow"),d==t){for(c=i,u=Gi;!(c<(l=u<=o?Yi:u>=o+Wi?Wi:u-o));u+=Gi)g=c-l,f=Gi-l,b.push(sr(ur(l+g%f,0))),c=ar(g/f);b.push(sr(ur(c,0))),o=lr(i,h,r==n),i=0,++r}++i,++t}return b.join("")}(e):e}))}var pr="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e},hr=/%[sdj%]/g;function fr(e){if(!Tr(e)){for(var t=[],i=0;i<arguments.length;i++)t.push(yr(arguments[i]));return t.join(" ")}i=1;for(var r=arguments,n=r.length,o=String(e).replace(hr,(function(e){if("%%"===e)return"%";if(i>=n)return e;switch(e){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch(e){return"[Circular]"}default:return e}})),a=r[i];i<n;a=r[++i])Sr(a)||!Or(a)?o+=" "+a:o+=" "+yr(a);return o}function gr(e,t){if(Dr(vt.process))return function(){return gr(e,t).apply(this,arguments)};if(!0===Ui.noDeprecation)return e;var i=!1;return function(){if(!i){if(Ui.throwDeprecation)throw new Error(t);Ui.traceDeprecation?console.trace(t):console.error(t),i=!0}return e.apply(this,arguments)}}var br,mr={};function vr(e){if(Dr(br)&&(br=Ui.env.NODE_DEBUG||""),e=e.toUpperCase(),!mr[e])if(new RegExp("\\b"+e+"\\b","i").test(br)){mr[e]=function(){var t=fr.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else mr[e]=function(){};return mr[e]}function yr(e,t){var i={seen:[],stylize:xr};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),Er(t)?i.showHidden=t:t&&Hr(i,t),Dr(i.showHidden)&&(i.showHidden=!1),Dr(i.depth)&&(i.depth=2),Dr(i.colors)&&(i.colors=!1),Dr(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=wr),kr(i,e,i.depth)}function wr(e,t){var i=yr.styles[t];return i?"["+yr.colors[i][0]+"m"+e+"["+yr.colors[i][1]+"m":e}function xr(e,t){return e}function kr(e,t,i){if(e.customInspect&&t&&jr(t.inspect)&&t.inspect!==yr&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(i,e);return Tr(r)||(r=kr(e,r,i)),r}var n=function(e,t){if(Dr(t))return e.stylize("undefined","undefined");if(Tr(t)){var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(i,"string")}if(Ir(t))return e.stylize(""+t,"number");if(Er(t))return e.stylize(""+t,"boolean");if(Sr(t))return e.stylize("null","null")}(e,t);if(n)return n;var o=Object.keys(t),a=function(e){var t={};return e.forEach((function(e,i){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),Br(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return _r(t);if(0===o.length){if(jr(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(Mr(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Rr(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Br(t))return _r(t)}var c,u="",l=!1,d=["{","}"];(Ar(t)&&(l=!0,d=["[","]"]),jr(t))&&(u=" [Function"+(t.name?": "+t.name:"")+"]");return Mr(t)&&(u=" "+RegExp.prototype.toString.call(t)),Rr(t)&&(u=" "+Date.prototype.toUTCString.call(t)),Br(t)&&(u=" "+_r(t)),0!==o.length||l&&0!=t.length?i<0?Mr(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=l?function(e,t,i,r,n){for(var o=[],a=0,s=t.length;a<s;++a)qr(t,String(a))?o.push(Cr(e,t,i,r,String(a),!0)):o.push("");return n.forEach((function(n){n.match(/^\d+$/)||o.push(Cr(e,t,i,r,n,!0))})),o}(e,t,i,a,o):o.map((function(r){return Cr(e,t,i,a,r,l)})),e.seen.pop(),function(e,t,i){var r=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return i[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+i[1];return i[0]+t+" "+e.join(", ")+" "+i[1]}(c,u,d)):d[0]+u+d[1]}function _r(e){return"["+Error.prototype.toString.call(e)+"]"}function Cr(e,t,i,r,n,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),qr(r,n)||(a="["+n+"]"),s||(e.seen.indexOf(c.value)<0?(s=Sr(i)?kr(e,c.value,null):kr(e,c.value,i-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),Dr(a)){if(o&&n.match(/^\d+$/))return s;(a=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function Ar(e){return Array.isArray(e)}function Er(e){return"boolean"==typeof e}function Sr(e){return null===e}function Pr(e){return null==e}function Ir(e){return"number"==typeof e}function Tr(e){return"string"==typeof e}function Lr(e){return"symbol"==typeof e}function Dr(e){return void 0===e}function Mr(e){return Or(e)&&"[object RegExp]"===zr(e)}function Or(e){return"object"==typeof e&&null!==e}function Rr(e){return Or(e)&&"[object Date]"===zr(e)}function Br(e){return Or(e)&&("[object Error]"===zr(e)||e instanceof Error)}function jr(e){return"function"==typeof e}function Fr(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function Nr(e){return bi(e)}function zr(e){return Object.prototype.toString.call(e)}function Vr(e){return e<10?"0"+e.toString(10):e.toString(10)}yr.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},yr.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var $r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ur(){var e,t;console.log("%s - %s",(e=new Date,t=[Vr(e.getHours()),Vr(e.getMinutes()),Vr(e.getSeconds())].join(":"),[e.getDate(),$r[e.getMonth()],t].join(" ")),fr.apply(null,arguments))}function Hr(e,t){if(!t||!Or(t))return e;for(var i=Object.keys(t),r=i.length;r--;)e[i[r]]=t[i[r]];return e}function qr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Kr={inherits:pr,_extend:Hr,log:Ur,isBuffer:Nr,isPrimitive:Fr,isFunction:jr,isError:Br,isDate:Rr,isObject:Or,isRegExp:Mr,isUndefined:Dr,isSymbol:Lr,isString:Tr,isNumber:Ir,isNullOrUndefined:Pr,isNull:Sr,isBoolean:Er,isArray:Ar,inspect:yr,deprecate:gr,format:fr,debuglog:vr},Jr=Object.freeze({__proto__:null,_extend:Hr,debuglog:vr,default:Kr,deprecate:gr,format:fr,inherits:pr,inspect:yr,isArray:Ar,isBoolean:Er,isBuffer:Nr,isDate:Rr,isError:Br,isFunction:jr,isNull:Sr,isNullOrUndefined:Pr,isNumber:Ir,isObject:Or,isPrimitive:Fr,isRegExp:Mr,isString:Tr,isSymbol:Lr,isUndefined:Dr,log:Ur});function Gr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Yr=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function Wr(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function Zr(e,t){if(e.map)return e.map(t);for(var i=[],r=0;r<e.length;r++)i.push(t(e[r],r));return i}var Xr=Object.keys||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return t};function Qr(e,t,i,r){t=t||"&",i=i||"=";var n={};if("string"!=typeof e||0===e.length)return n;var o=/\+/g;e=e.split(t);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var c=0;c<s;++c){var u,l,d,p,h=e[c].replace(o,"%20"),f=h.indexOf(i);f>=0?(u=h.substr(0,f),l=h.substr(f+1)):(u=h,l=""),d=decodeURIComponent(u),p=decodeURIComponent(l),Gr(n,d)?Yr(n[d])?n[d].push(p):n[d]=[n[d],p]:n[d]=p}return n}var en={parse:bn,resolve:wn,resolveObject:xn,format:vn,Url:tn};function tn(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var rn=/^([a-z0-9.+-]+:)/i,nn=/:[0-9]*$/,on=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,an=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),sn=["'"].concat(an),cn=["%","/","?",";","#"].concat(sn),un=["/","?","#"],ln=255,dn=/^[+a-z0-9A-Z_-]{0,63}$/,pn=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,hn={javascript:!0,"javascript:":!0},fn={javascript:!0,"javascript:":!0},gn={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function bn(e,t,i){if(e&&Or(e)&&e instanceof tn)return e;var r=new tn;return r.parse(e,t,i),r}function mn(e,t,i,r){if(!Tr(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),o=-1!==n&&n<t.indexOf("#")?"?":"#",a=t.split(o);a[0]=a[0].replace(/\\/g,"/");var s=t=a.join(o);if(s=s.trim(),!r&&1===t.split("#").length){var c=on.exec(s);if(c)return e.path=s,e.href=s,e.pathname=c[1],c[2]?(e.search=c[2],e.query=i?Qr(e.search.substr(1)):e.search.substr(1)):i&&(e.search="",e.query={}),e}var u,l,d,p,h=rn.exec(s);if(h){var f=(h=h[0]).toLowerCase();e.protocol=f,s=s.substr(h.length)}if(r||h||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===s.substr(0,2);!g||h&&fn[h]||(s=s.substr(2),e.slashes=!0)}if(!fn[h]&&(g||h&&!gn[h])){var b,m,v=-1;for(u=0;u<un.length;u++)-1!==(l=s.indexOf(un[u]))&&(-1===v||l<v)&&(v=l);for(-1!==(m=-1===v?s.lastIndexOf("@"):s.lastIndexOf("@",v))&&(b=s.slice(0,m),s=s.slice(m+1),e.auth=decodeURIComponent(b)),v=-1,u=0;u<cn.length;u++)-1!==(l=s.indexOf(cn[u]))&&(-1===v||l<v)&&(v=l);-1===v&&(v=s.length),e.host=s.slice(0,v),s=s.slice(v),kn(e),e.hostname=e.hostname||"";var y="["===e.hostname[0]&&"]"===e.hostname[e.hostname.length-1];if(!y){var w=e.hostname.split(/\./);for(u=0,d=w.length;u<d;u++){var x=w[u];if(x&&!x.match(dn)){for(var k="",_=0,C=x.length;_<C;_++)x.charCodeAt(_)>127?k+="x":k+=x[_];if(!k.match(dn)){var A=w.slice(0,u),E=w.slice(u+1),S=x.match(pn);S&&(A.push(S[1]),E.unshift(S[2])),E.length&&(s="/"+E.join(".")+s),e.hostname=A.join(".");break}}}}e.hostname.length>ln?e.hostname="":e.hostname=e.hostname.toLowerCase(),y||(e.hostname=dr(e.hostname)),p=e.port?":"+e.port:"";var P=e.hostname||"";e.host=P+p,e.href+=e.host,y&&(e.hostname=e.hostname.substr(1,e.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!hn[f])for(u=0,d=sn.length;u<d;u++){var I=sn[u];if(-1!==s.indexOf(I)){var T=encodeURIComponent(I);T===I&&(T=escape(I)),s=s.split(I).join(T)}}var L=s.indexOf("#");-1!==L&&(e.hash=s.substr(L),s=s.slice(0,L));var D=s.indexOf("?");if(-1!==D?(e.search=s.substr(D),e.query=s.substr(D+1),i&&(e.query=Qr(e.query)),s=s.slice(0,D)):i&&(e.search="",e.query={}),s&&(e.pathname=s),gn[f]&&e.hostname&&!e.pathname&&(e.pathname="/"),e.pathname||e.search){p=e.pathname||"";var M=e.search||"";e.path=p+M}return e.href=yn(e),e}function vn(e){return Tr(e)&&(e=mn({},e)),yn(e)}function yn(e){var t=e.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var i,r,n,o,a=e.protocol||"",s=e.pathname||"",c=e.hash||"",u=!1,l="";e.host?u=t+e.host:e.hostname&&(u=t+(-1===e.hostname.indexOf(":")?e.hostname:"["+this.hostname+"]"),e.port&&(u+=":"+e.port)),e.query&&Or(e.query)&&Object.keys(e.query).length&&(i=e.query,r=r||"&",n=n||"=",null===i&&(i=void 0),l="object"==typeof i?Zr(Xr(i),(function(e){var t=encodeURIComponent(Wr(e))+n;return Yr(i[e])?Zr(i[e],(function(e){return t+encodeURIComponent(Wr(e))})).join(r):t+encodeURIComponent(Wr(i[e]))})).join(r):o?encodeURIComponent(Wr(o))+n+encodeURIComponent(Wr(i)):"");var d=e.search||l&&"?"+l||"";return a&&":"!==a.substr(-1)&&(a+=":"),e.slashes||(!a||gn[a])&&!1!==u?(u="//"+(u||""),s&&"/"!==s.charAt(0)&&(s="/"+s)):u||(u=""),c&&"#"!==c.charAt(0)&&(c="#"+c),d&&"?"!==d.charAt(0)&&(d="?"+d),a+u+(s=s.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(d=d.replace("#","%23"))+c}function wn(e,t){return bn(e,!1,!0).resolve(t)}function xn(e,t){return e?bn(e,!1,!0).resolveObject(t):t}function kn(e){var t=e.host,i=nn.exec(t);i&&(":"!==(i=i[0])&&(e.port=i.substr(1)),t=t.substr(0,t.length-i.length)),t&&(e.hostname=t)}tn.prototype.parse=function(e,t,i){return mn(this,e,t,i)},tn.prototype.format=function(){return yn(this)},tn.prototype.resolve=function(e){return this.resolveObject(bn(e,!1,!0)).format()},tn.prototype.resolveObject=function(e){if(Tr(e)){var t=new tn;t.parse(e,!1,!0),e=t}for(var i,r=new tn,n=Object.keys(this),o=0;o<n.length;o++){var a=n[o];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),c=0;c<s.length;c++){var u=s[c];"protocol"!==u&&(r[u]=e[u])}return gn[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!gn[e.protocol]){for(var l=Object.keys(e),d=0;d<l.length;d++){var p=l[d];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||fn[e.protocol])r.pathname=e.pathname;else{for(i=(e.pathname||"").split("/");i.length&&!(e.host=i.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),r.pathname=i.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var h=r.pathname||"",f=r.search||"";r.path=h+f}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var g,b=r.pathname&&"/"===r.pathname.charAt(0),m=e.host||e.pathname&&"/"===e.pathname.charAt(0),v=m||b||r.host&&e.pathname,y=v,w=r.pathname&&r.pathname.split("/")||[],x=r.protocol&&!gn[r.protocol];if(i=e.pathname&&e.pathname.split("/")||[],x&&(r.hostname="",r.port=null,r.host&&(""===w[0]?w[0]=r.host:w.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===i[0]?i[0]=e.host:i.unshift(e.host)),e.host=null),v=v&&(""===i[0]||""===w[0])),m)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,w=i;else if(i.length)w||(w=[]),w.pop(),w=w.concat(i),r.search=e.search,r.query=e.query;else if(!Pr(e.search))return x&&(r.hostname=r.host=w.shift(),(g=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=g.shift(),r.host=r.hostname=g.shift())),r.search=e.search,r.query=e.query,Sr(r.pathname)&&Sr(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=w.slice(-1)[0],_=(r.host||e.host||w.length>1)&&("."===k||".."===k)||""===k,C=0,A=w.length;A>=0;A--)"."===(k=w[A])?w.splice(A,1):".."===k?(w.splice(A,1),C++):C&&(w.splice(A,1),C--);if(!v&&!y)for(;C--;C)w.unshift("..");!v||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),_&&"/"!==w.join("/").substr(-1)&&w.push("");var E=""===w[0]||w[0]&&"/"===w[0].charAt(0);return x&&(r.hostname=r.host=E?"":w.length?w.shift():"",(g=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=g.shift(),r.host=r.hostname=g.shift())),(v=v||r.host&&w.length)&&!E&&w.unshift(""),w.length?r.pathname=w.join("/"):(r.pathname=null,r.path=null),Sr(r.pathname)&&Sr(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},tn.prototype.parseHost=function(){return kn(this)};var _n,Cn,An=Ki(Object.freeze({__proto__:null,Url:tn,default:en,format:vn,parse:bn,resolve:wn,resolveObject:xn})),En={},Sn=Object.freeze({__proto__:null,default:En}),Pn=Ki(Sn),In=Fn(vt.fetch)&&Fn(vt.ReadableStream);function Tn(e){Cn||(Cn=new vt.XMLHttpRequest).open("GET",vt.location.host?"/":"https://example.com");try{return Cn.responseType=e,Cn.responseType===e}catch(e){return!1}}var Ln=void 0!==vt.ArrayBuffer,Dn=Ln&&Fn(vt.ArrayBuffer.prototype.slice),Mn=Ln&&Tn("arraybuffer"),On=!In&&Dn&&Tn("ms-stream"),Rn=!In&&Ln&&Tn("moz-chunked-arraybuffer"),Bn=Fn(Cn.overrideMimeType),jn=Fn(vt.VBArray);function Fn(e){return"function"==typeof e}function Nn(){}function zn(){zn.init.call(this)}function Vn(e){return void 0===e._maxListeners?zn.defaultMaxListeners:e._maxListeners}function $n(e,t,i,r){var n,o,a,s;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e._events),a=o[t]):(o=e._events=new Nn,e._eventsCount=0),a){if("function"==typeof a?a=o[t]=r?[i,a]:[a,i]:r?a.unshift(i):a.push(i),!a.warned&&(n=Vn(e))&&n>0&&a.length>n){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,"function"==typeof console.warn?console.warn(s):console.log(s)}}else a=o[t]=i,++e._eventsCount;return e}function Un(e,t,i){var r=!1;function n(){e.removeListener(t,n),r||(r=!0,i.apply(e,arguments))}return n.listener=i,n}function Hn(e){var t=this._events;if(t){var i=t[e];if("function"==typeof i)return 1;if(i)return i.length}return 0}function qn(e,t){for(var i=new Array(t);t--;)i[t]=e[t];return i}Cn=null,Nn.prototype=Object.create(null),zn.EventEmitter=zn,zn.usingDomains=!1,zn.prototype.domain=void 0,zn.prototype._events=void 0,zn.prototype._maxListeners=void 0,zn.defaultMaxListeners=10,zn.init=function(){this.domain=null,zn.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Nn,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},zn.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},zn.prototype.getMaxListeners=function(){return Vn(this)},zn.prototype.emit=function(e){var t,i,r,n,o,a,s,c="error"===e;if(a=this._events)c=c&&null==a.error;else if(!c)return!1;if(s=this.domain,c){if(t=arguments[1],!s){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(i=a[e]))return!1;var l="function"==typeof i;switch(r=arguments.length){case 1:!function(e,t,i){if(t)e.call(i);else for(var r=e.length,n=qn(e,r),o=0;o<r;++o)n[o].call(i)}(i,l,this);break;case 2:!function(e,t,i,r){if(t)e.call(i,r);else for(var n=e.length,o=qn(e,n),a=0;a<n;++a)o[a].call(i,r)}(i,l,this,arguments[1]);break;case 3:!function(e,t,i,r,n){if(t)e.call(i,r,n);else for(var o=e.length,a=qn(e,o),s=0;s<o;++s)a[s].call(i,r,n)}(i,l,this,arguments[1],arguments[2]);break;case 4:!function(e,t,i,r,n,o){if(t)e.call(i,r,n,o);else for(var a=e.length,s=qn(e,a),c=0;c<a;++c)s[c].call(i,r,n,o)}(i,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(r-1),o=1;o<r;o++)n[o-1]=arguments[o];!function(e,t,i,r){if(t)e.apply(i,r);else for(var n=e.length,o=qn(e,n),a=0;a<n;++a)o[a].apply(i,r)}(i,l,this,n)}return!0},zn.prototype.addListener=function(e,t){return $n(this,e,t,!1)},zn.prototype.on=zn.prototype.addListener,zn.prototype.prependListener=function(e,t){return $n(this,e,t,!0)},zn.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,Un(this,e,t)),this},zn.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,Un(this,e,t)),this},zn.prototype.removeListener=function(e,t){var i,r,n,o,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(i=r[e]))return this;if(i===t||i.listener&&i.listener===t)0==--this._eventsCount?this._events=new Nn:(delete r[e],r.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(n=-1,o=i.length;o-- >0;)if(i[o]===t||i[o].listener&&i[o].listener===t){a=i[o].listener,n=o;break}if(n<0)return this;if(1===i.length){if(i[0]=void 0,0==--this._eventsCount)return this._events=new Nn,this;delete r[e]}else!function(e,t){for(var i=t,r=i+1,n=e.length;r<n;i+=1,r+=1)e[i]=e[r];e.pop()}(i,n);r.removeListener&&this.emit("removeListener",e,a||t)}return this},zn.prototype.removeAllListeners=function(e){var t,i;if(!(i=this._events))return this;if(!i.removeListener)return 0===arguments.length?(this._events=new Nn,this._eventsCount=0):i[e]&&(0==--this._eventsCount?this._events=new Nn:delete i[e]),this;if(0===arguments.length){for(var r,n=Object.keys(i),o=0;o<n.length;++o)"removeListener"!==(r=n[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new Nn,this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},zn.prototype.listeners=function(e){var t,i=this._events;return i&&(t=i[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(t):[]},zn.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Hn.call(e,t)},zn.prototype.listenerCount=Hn,zn.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Kn=Object.freeze({__proto__:null,EventEmitter:zn,default:zn});function Jn(){this.head=null,this.tail=null,this.length=0}Jn.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},Jn.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},Jn.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},Jn.prototype.clear=function(){this.head=this.tail=null,this.length=0},Jn.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i},Jn.prototype.concat=function(e){if(0===this.length)return Mt.alloc(0);if(1===this.length)return this.head.data;for(var t=Mt.allocUnsafe(e>>>0),i=this.head,r=0;i;)i.data.copy(t,r),r+=i.data.length,i=i.next;return t};var Gn=Mt.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Yn(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!Gn(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Zn;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Xn;break;default:return void(this.write=Wn)}this.charBuffer=new Mt(6),this.charReceived=0,this.charLength=0}function Wn(e){return e.toString(this.encoding)}function Zn(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function Xn(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}Yn.prototype.write=function(e){for(var t="";this.charLength;){var i=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,i),this.charReceived+=i,this.charReceived<this.charLength)return"";if(e=e.slice(i,e.length),!((n=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived);var n;r=(t+=e.toString(this.encoding,0,r)).length-1;if((n=t.charCodeAt(r))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,r)}return t},Yn.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var i=e[e.length-t];if(1==t&&i>>5==6){this.charLength=2;break}if(t<=2&&i>>4==14){this.charLength=3;break}if(t<=3&&i>>3==30){this.charLength=4;break}}this.charReceived=t},Yn.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var i=this.charReceived,r=this.charBuffer,n=this.encoding;t+=r.slice(0,i).toString(n)}return t};var Qn=Object.freeze({__proto__:null,StringDecoder:Yn});io.ReadableState=to;var eo=vr("stream");function to(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Lo&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new Jn,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new Yn(e.encoding),this.encoding=e.encoding)}function io(e){if(!(this instanceof io))return new io(e);this._readableState=new to(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),zn.call(this)}function ro(e,t,i,r,n){var o=function(e,t){var i=null;bi(t)||"string"==typeof t||null==t||e.objectMode||(i=new TypeError("Invalid non-string/buffer chunk"));return i}(t,i);if(o)e.emit("error",o);else if(null===i)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length)}t.ended=!0,ao(e)}(e,t);else if(t.objectMode||i&&i.length>0)if(t.ended&&!n){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&n){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var c;!t.decoder||n||r||(i=t.decoder.write(i),c=!t.objectMode&&0===i.length),n||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",i),e.read(0)):(t.length+=t.objectMode?1:i.length,n?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&ao(e))),function(e,t){t.readingMore||(t.readingMore=!0,Ti(co,e,t))}(e,t)}else n||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}pr(io,zn),io.prototype.push=function(e,t){var i=this._readableState;return i.objectMode||"string"!=typeof e||(t=t||i.defaultEncoding)!==i.encoding&&(e=Mt.from(e,t),t=""),ro(this,i,e,t,!1)},io.prototype.unshift=function(e){return ro(this,this._readableState,e,"",!0)},io.prototype.isPaused=function(){return!1===this._readableState.flowing},io.prototype.setEncoding=function(e){return this._readableState.decoder=new Yn(e),this._readableState.encoding=e,this};var no=8388608;function oo(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=no?e=no:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function ao(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(eo("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Ti(so,e):so(e))}function so(e){eo("emit readable"),e.emit("readable"),po(e)}function co(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(eo("maybeReadMore read 0"),e.read(0),i!==t.length);)i=t.length;t.readingMore=!1}function uo(e){eo("readable nexttick read 0"),e.read(0)}function lo(e,t){t.reading||(eo("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),po(e),t.flowing&&!t.reading&&e.read(0)}function po(e){var t=e._readableState;for(eo("flow",t.flowing);t.flowing&&null!==e.read(););}function ho(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():i?function(e,t){var i=t.head,r=1,n=i.data;e-=n.length;for(;i=i.next;){var o=i.data,a=e>o.length?o.length:e;if(a===o.length?n+=o:n+=o.slice(0,e),0===(e-=a)){a===o.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=o.slice(a));break}++r}return t.length-=r,n}(e,t):function(e,t){var i=Mt.allocUnsafe(e),r=t.head,n=1;r.data.copy(i),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(i,i.length-e,0,a),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t);return r}(e,t.buffer,t.decoder),i);var i}function fo(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Ti(go,t,e))}function go(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function bo(e,t){for(var i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1}function mo(){}function vo(e,t,i){this.chunk=e,this.encoding=t,this.callback=i,this.next=null}function yo(e,t){Object.defineProperty(this,"buffer",{get:gr((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof Lo&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var n=!1===e.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,r,n){--t.pendingcb,i?Ti(n,r):n(r);e._writableState.errorEmitted=!0,e.emit("error",r)}(e,i,r,t,n);else{var o=Co(i);o||i.corked||i.bufferProcessing||!i.bufferedRequest||_o(e,i),r?Ti(ko,e,i,o,n):ko(e,i,o,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new So(this)}function wo(e){if(!(this instanceof wo||this instanceof Lo))return new wo(e);this._writableState=new yo(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),zn.call(this)}function xo(e,t,i,r,n,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,i?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function ko(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),Eo(e,t)}function _o(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,n=new Array(r),o=t.corkedRequestsFree;o.entry=i;for(var a=0;i;)n[a]=i,i=i.next,a+=1;xo(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new So(t)}else{for(;i;){var s=i.chunk,c=i.encoding,u=i.callback;if(xo(e,t,!1,t.objectMode?1:s.length,s,c,u),i=i.next,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=i,t.bufferProcessing=!1}function Co(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Ao(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Eo(e,t){var i=Co(t);return i&&(0===t.pendingcb?(Ao(e,t),t.finished=!0,e.emit("finish")):Ao(e,t)),i}function So(e){var t=this;this.next=null,this.entry=null,this.finish=function(i){var r=t.entry;for(t.entry=null;r;){var n=r.callback;e.pendingcb--,n(i),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}io.prototype.read=function(e){eo("read",e),e=parseInt(e,10);var t=this._readableState,i=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return eo("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?fo(this):ao(this),null;if(0===(e=oo(e,t))&&t.ended)return 0===t.length&&fo(this),null;var r,n=t.needReadable;return eo("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&eo("length less than watermark",n=!0),t.ended||t.reading?eo("reading or ended",n=!1):n&&(eo("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=oo(i,t))),null===(r=e>0?ho(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&fo(this)),null!==r&&this.emit("data",r),r},io.prototype._read=function(e){this.emit("error",new Error("not implemented"))},io.prototype.pipe=function(e,t){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,eo("pipe count=%d opts=%j",r.pipesCount,t);var n=!t||!1!==t.end?a:u;function o(e){eo("onunpipe"),e===i&&u()}function a(){eo("onend"),e.end()}r.endEmitted?Ti(n):i.once("end",n),e.on("unpipe",o);var s=function(e){return function(){var t=e._readableState;eo("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,po(e))}}(i);e.on("drain",s);var c=!1;function u(){eo("cleanup"),e.removeListener("close",h),e.removeListener("finish",f),e.removeListener("drain",s),e.removeListener("error",p),e.removeListener("unpipe",o),i.removeListener("end",a),i.removeListener("end",u),i.removeListener("data",d),c=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var l=!1;function d(t){eo("ondata"),l=!1,!1!==e.write(t)||l||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==bo(r.pipes,e))&&!c&&(eo("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,l=!0),i.pause())}function p(t){var i;eo("onerror",t),g(),e.removeListener("error",p),0===(i="error",e.listeners(i).length)&&e.emit("error",t)}function h(){e.removeListener("finish",f),g()}function f(){eo("onfinish"),e.removeListener("close",h),g()}function g(){eo("unpipe"),i.unpipe(e)}return i.on("data",d),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",p),e.once("close",h),e.once("finish",f),e.emit("pipe",i),r.flowing||(eo("pipe resume"),i.resume()),e},io.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var i=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var n=0;n<r;n++)i[n].emit("unpipe",this);return this}var o=bo(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},io.prototype.on=function(e,t){var i=zn.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&ao(this):Ti(uo,this))}return i},io.prototype.addListener=io.prototype.on,io.prototype.resume=function(){var e=this._readableState;return e.flowing||(eo("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Ti(lo,e,t))}(this,e)),this},io.prototype.pause=function(){return eo("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(eo("pause"),this._readableState.flowing=!1,this.emit("pause")),this},io.prototype.wrap=function(e){var t=this._readableState,i=!1,r=this;for(var n in e.on("end",(function(){if(eo("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(n){(eo("wrapped data"),t.decoder&&(n=t.decoder.write(n)),t.objectMode&&null==n)||(t.objectMode||n&&n.length)&&(r.push(n)||(i=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));return function(e,t){for(var i=0,r=e.length;i<r;i++)t(e[i],i)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){eo("wrapped _read",t),i&&(i=!1,e.resume())},r},io._fromList=ho,wo.WritableState=yo,pr(wo,zn),yo.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},wo.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},wo.prototype.write=function(e,t,i){var r=this._writableState,n=!1;return"function"==typeof t&&(i=t,t=null),Mt.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof i&&(i=mo),r.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),Ti(t,i)}(this,i):function(e,t,i,r){var n=!0,o=!1;return null===i?o=new TypeError("May not write null values to stream"):Mt.isBuffer(i)||"string"==typeof i||void 0===i||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),Ti(r,o),n=!1),n}(this,r,e,i)&&(r.pendingcb++,n=function(e,t,i,r,n){i=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=Mt.from(t,i));return t}(t,i,r),Mt.isBuffer(i)&&(r="buffer");var o=t.objectMode?1:i.length;t.length+=o;var a=t.length<t.highWaterMark;a||(t.needDrain=!0);if(t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest=new vo(i,r,n),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else xo(e,t,!1,o,i,r,n);return a}(this,r,e,t,i)),n},wo.prototype.cork=function(){this._writableState.corked++},wo.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||_o(this,e))},wo.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},wo.prototype._write=function(e,t,i){i(new Error("not implemented"))},wo.prototype._writev=null,wo.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,i){t.ending=!0,Eo(e,t),i&&(t.finished?Ti(i):e.once("finish",i));t.ended=!0,e.writable=!1}(this,r,i)},pr(Lo,io);for(var Po=Object.keys(wo.prototype),Io=0;Io<Po.length;Io++){var To=Po[Io];Lo.prototype[To]||(Lo.prototype[To]=wo.prototype[To])}function Lo(e){if(!(this instanceof Lo))return new Lo(e);io.call(this,e),wo.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Do)}function Do(){this.allowHalfOpen||this._writableState.ended||Ti(Mo,this)}function Mo(e){e.end()}function Oo(e){this.afterTransform=function(t,i){return function(e,t,i){var r=e._transformState;r.transforming=!1;var n=r.writecb;if(!n)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=i&&e.push(i);n(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,i)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function Ro(e){if(!(this instanceof Ro))return new Ro(e);Lo.call(this,e),this._transformState=new Oo(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){Bo(t,e)})):Bo(t)}))}function Bo(e,t){if(t)return e.emit("error",t);var i=e._writableState,r=e._transformState;if(i.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function jo(e){if(!(this instanceof jo))return new jo(e);Ro.call(this,e)}function Fo(){zn.call(this)}pr(Ro,Lo),Ro.prototype.push=function(e,t){return this._transformState.needTransform=!1,Lo.prototype.push.call(this,e,t)},Ro.prototype._transform=function(e,t,i){throw new Error("Not implemented")},Ro.prototype._write=function(e,t,i){var r=this._transformState;if(r.writecb=i,r.writechunk=e,r.writeencoding=t,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},Ro.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},pr(jo,Ro),jo.prototype._transform=function(e,t,i){i(null,e)},pr(Fo,zn),Fo.Readable=io,Fo.Writable=wo,Fo.Duplex=Lo,Fo.Transform=Ro,Fo.PassThrough=jo,Fo.Stream=Fo,Fo.prototype.pipe=function(e,t){var i=this;function r(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function n(){i.readable&&i.resume&&i.resume()}i.on("data",r),e.on("drain",n),e._isStdio||t&&!1===t.end||(i.on("end",a),i.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===zn.listenerCount(this,"error"))throw e}function u(){i.removeListener("data",r),e.removeListener("drain",n),i.removeListener("end",a),i.removeListener("close",s),i.removeListener("error",c),e.removeListener("error",c),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u)}return i.on("error",c),e.on("error",c),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e};var No=Object.freeze({__proto__:null,Duplex:Lo,PassThrough:jo,Readable:io,Stream:Fo,Transform:Ro,Writable:wo,default:Fo}),zo=3,Vo=4;function $o(e,t,i){var r,n=this;if(io.call(n),n._mode=i,n.headers={},n.rawHeaders=[],n.trailers={},n.rawTrailers=[],n.on("end",(function(){Ti((function(){n.emit("close")}))})),"fetch"===i){n._fetchResponse=t,n.url=t.url,n.statusCode=t.status,n.statusMessage=t.statusText;for(var o,a,s=t.headers[Symbol.iterator]();o=(a=s.next()).value,!a.done;)n.headers[o[0].toLowerCase()]=o[1],n.rawHeaders.push(o[0],o[1]);var c=t.body.getReader();(r=function(){c.read().then((function(e){n._destroyed||(e.done?n.push(null):(n.push(new Mt(e.value)),r()))}))})()}else{if(n._xhr=e,n._pos=0,n.url=e.responseURL,n.statusCode=e.status,n.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var i=t[1].toLowerCase();"set-cookie"===i?(void 0===n.headers[i]&&(n.headers[i]=[]),n.headers[i].push(t[2])):void 0!==n.headers[i]?n.headers[i]+=", "+t[2]:n.headers[i]=t[2],n.rawHeaders.push(t[1],t[2])}})),n._charset="x-user-defined",!Bn){var u=n.rawHeaders["mime-type"];if(u){var l=u.match(/;\s*charset=([^;])(;|$)/);l&&(n._charset=l[1].toLowerCase())}n._charset||(n._charset="utf-8")}}}function Uo(e){var t,i=this;wo.call(i),i._opts=e,i._body=[],i._headers={},e.auth&&i.setHeader("Authorization","Basic "+new Mt(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){i.setHeader(t,e.headers[t])}));var r=!0;if("disable-fetch"===e.mode)r=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!Bn;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}i._mode=function(e,t){return In&&t?"fetch":Rn?"moz-chunked-arraybuffer":On?"ms-stream":Mn&&e?"arraybuffer":jn&&e?"text:vbarray":"text"}(t,r),i.on("finish",(function(){i._onFinish()}))}pr($o,io),$o.prototype._read=function(){},$o.prototype._onXHRProgress=function(){var e=this,t=e._xhr,i=null;switch(e._mode){case"text:vbarray":if(t.readyState!==Vo)break;try{i=new vt.VBArray(t.responseBody).toArray()}catch(e){}if(null!==i){e.push(new Mt(i));break}case"text":try{i=t.responseText}catch(t){e._mode="text:vbarray";break}if(i.length>e._pos){var r=i.substr(e._pos);if("x-user-defined"===e._charset){for(var n=new Mt(r.length),o=0;o<r.length;o++)n[o]=255&r.charCodeAt(o);e.push(n)}else e.push(r,e._charset);e._pos=i.length}break;case"arraybuffer":if(t.readyState!==Vo||!t.response)break;i=t.response,e.push(new Mt(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=t.response,t.readyState!==zo||!i)break;e.push(new Mt(new Uint8Array(i)));break;case"ms-stream":if(i=t.response,t.readyState!==zo)break;var a=new vt.MSStreamReader;a.onprogress=function(){a.result.byteLength>e._pos&&(e.push(new Mt(new Uint8Array(a.result.slice(e._pos)))),e._pos=a.result.byteLength)},a.onload=function(){e.push(null)},a.readAsArrayBuffer(i)}e._xhr.readyState===Vo&&"ms-stream"!==e._mode&&e.push(null)},pr(Uo,wo);var Ho=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];function qo(e,t){"string"==typeof e&&(e=bn(e));var i=-1===vt.location.protocol.search(/^https?:$/)?"http:":"",r=e.protocol||i,n=e.hostname||e.host,o=e.port,a=e.path||"/";n&&-1!==n.indexOf(":")&&(n="["+n+"]"),e.url=(n?r+"//"+n:"")+(o?":"+o:"")+a,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var s=new Uo(e);return t&&s.on("response",t),s}function Ko(e,t){var i=qo(e,t);return i.end(),i}function Jo(){}Uo.prototype.setHeader=function(e,t){var i=e.toLowerCase();-1===Ho.indexOf(i)&&(this._headers[i]={name:e,value:t})},Uo.prototype.getHeader=function(e){return this._headers[e.toLowerCase()].value},Uo.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},Uo.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t,i=e._opts,r=e._headers;if("POST"!==i.method&&"PUT"!==i.method&&"PATCH"!==i.method||(t=function(){if(void 0!==_n)return _n;try{new vt.Blob([new ArrayBuffer(1)]),_n=!0}catch(e){_n=!1}return _n}()?new vt.Blob(e._body.map((function(e){return function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(bi(e)){for(var t=new Uint8Array(e.length),i=e.length,r=0;r<i;r++)t[r]=e[r];return t.buffer}throw new Error("Argument must be a Buffer")}(e)})),{type:(r["content-type"]||{}).value||""}):Mt.concat(e._body).toString()),"fetch"===e._mode){var n=Object.keys(r).map((function(e){return[r[e].name,r[e].value]}));vt.fetch(e._opts.url,{method:e._opts.method,headers:n,body:t,mode:"cors",credentials:i.withCredentials?"include":"same-origin"}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){e.emit("error",t)}))}else{var o=e._xhr=new vt.XMLHttpRequest;try{o.open(e._opts.method,e._opts.url,!0)}catch(t){return void Ti((function(){e.emit("error",t)}))}"responseType"in o&&(o.responseType=e._mode.split(":")[0]),"withCredentials"in o&&(o.withCredentials=!!i.withCredentials),"text"===e._mode&&"overrideMimeType"in o&&o.overrideMimeType("text/plain; charset=x-user-defined"),Object.keys(r).forEach((function(e){o.setRequestHeader(r[e].name,r[e].value)})),e._response=null,o.onreadystatechange=function(){switch(o.readyState){case zo:case Vo:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(o.onprogress=function(){e._onXHRProgress()}),o.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{o.send(t)}catch(t){return void Ti((function(){e.emit("error",t)}))}}}},Uo.prototype._onXHRProgress=function(){var e=this;(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},Uo.prototype._connect=function(){var e=this;e._destroyed||(e._response=new $o(e._xhr,e._fetchResponse,e._mode),e.emit("response",e._response))},Uo.prototype._write=function(e,t,i){this._body.push(e),i()},Uo.prototype.abort=Uo.prototype.destroy=function(){var e=this;e._destroyed=!0,e._response&&(e._response._destroyed=!0),e._xhr&&e._xhr.abort()},Uo.prototype.end=function(e,t,i){"function"==typeof e&&(i=e,e=void 0),wo.prototype.end.call(this,e,t,i)},Uo.prototype.flushHeaders=function(){},Uo.prototype.setTimeout=function(){},Uo.prototype.setNoDelay=function(){},Uo.prototype.setSocketKeepAlive=function(){},Jo.defaultMaxSockets=4;var Go=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"],Yo={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},Wo={request:qo,get:Ko,Agent:Jo,METHODS:Go,STATUS_CODES:Yo},Zo=Ki(Object.freeze({__proto__:null,Agent:Jo,METHODS:Go,STATUS_CODES:Yo,default:Wo,get:Ko,request:qo})),Xo=An,Qo=Pn.spawn,ea=Pn,ta=function(){var e,t,i=this,r=Zo,n=Zo,o={},a=!1,s={"User-Agent":"node-XMLHttpRequest",Accept:"*/*"},c={},u={},l=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","content-transfer-encoding","cookie","cookie2","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],d=["TRACE","TRACK","CONNECT"],p=!1,h=!1,f={};this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.readyState=this.UNSENT,this.onreadystatechange=null,this.responseText="",this.responseXML="",this.status=null,this.statusText=null,this.withCredentials=!1;this.open=function(e,t,i,r,n){if(this.abort(),h=!1,!function(e){return e&&-1===d.indexOf(e)}(e))throw new Error("SecurityError: Request method not allowed");o={method:e,url:t.toString(),async:"boolean"!=typeof i||i,user:r||null,password:n||null},g(this.OPENED)},this.setDisableHeaderCheck=function(e){a=e},this.setRequestHeader=function(e,t){if(this.readyState!==this.OPENED)throw new Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN");if(function(e){return a||e&&-1===l.indexOf(e.toLowerCase())}(e)){if(p)throw new Error("INVALID_STATE_ERR: send flag is true");e=u[e.toLowerCase()]||e,u[e.toLowerCase()]=e,c[e]=c[e]?c[e]+", "+t:t}else console.warn('Refused to set unsafe header "'+e+'"')},this.getResponseHeader=function(e){return"string"==typeof e&&this.readyState>this.OPENED&&t&&t.headers&&t.headers[e.toLowerCase()]&&!h?t.headers[e.toLowerCase()]:null},this.getAllResponseHeaders=function(){if(this.readyState<this.HEADERS_RECEIVED||h)return"";var e="";for(var i in t.headers)"set-cookie"!==i&&"set-cookie2"!==i&&(e+=i+": "+t.headers[i]+"\r\n");return e.substr(0,e.length-2)},this.getRequestHeader=function(e){return"string"==typeof e&&u[e.toLowerCase()]?c[u[e.toLowerCase()]]:""},this.send=function(a){if(this.readyState!==this.OPENED)throw new Error("INVALID_STATE_ERR: connection must be opened before send() is called");if(p)throw new Error("INVALID_STATE_ERR: send has already been called");var l,d=!1,f=!1,b=Xo.parse(o.url);switch(b.protocol){case"https:":d=!0;case"http:":l=b.hostname;break;case"file:":f=!0;break;case void 0:case null:case"":l="localhost";break;default:throw new Error("Protocol not supported.")}if(f){if("GET"!==o.method)throw new Error("XMLHttpRequest: Only GET method is supported");if(o.async)ea.readFile(b.pathname,"utf8",(function(e,t){e?i.handleError(e):(i.status=200,i.responseText=t,g(i.DONE))}));else try{this.responseText=ea.readFileSync(b.pathname,"utf8"),this.status=200,g(i.DONE)}catch(e){this.handleError(e)}}else{var m=b.port||(d?443:80),v=b.pathname+(b.search?b.search:"");for(var y in s)u[y.toLowerCase()]||(c[y]=s[y]);if(c.Host=l,d&&443===m||80===m||(c.Host+=":"+b.port),o.user){void 0===o.password&&(o.password="");var w=new Mt(o.user+":"+o.password);c.Authorization="Basic "+w.toString("base64")}"GET"===o.method||"HEAD"===o.method?a=null:a?(c["Content-Length"]=bi(a)?a.length:Mt.byteLength(a),c["Content-Type"]||(c["Content-Type"]="text/plain;charset=UTF-8")):"POST"===o.method&&(c["Content-Length"]=0);var x={host:l,port:m,path:v,method:o.method,headers:c,agent:!1,withCredentials:i.withCredentials};if(h=!1,o.async){var k=d?n.request:r.request;p=!0,i.dispatchEvent("readystatechange");var _=function(e){i.handleError(e)};e=k(x,(function r(n){if(301!==(t=n).statusCode&&302!==t.statusCode&&303!==t.statusCode&&307!==t.statusCode)t.setEncoding("utf8"),g(i.HEADERS_RECEIVED),i.status=t.statusCode,t.on("data",(function(e){e&&(i.responseText+=e),p&&g(i.LOADING)})),t.on("end",(function(){p&&(g(i.DONE),p=!1)})),t.on("error",(function(e){i.handleError(e)}));else{o.url=t.headers.location;var a=Xo.parse(o.url);l=a.hostname;var s={hostname:a.hostname,port:a.port,path:a.path,method:303===t.statusCode?"GET":o.method,headers:c,withCredentials:i.withCredentials};(e=k(s,r).on("error",_)).end()}})).on("error",_),a&&e.write(a),e.end(),i.dispatchEvent("loadstart")}else{var C=".node-xmlhttprequest-content-"+Ui.pid,A=".node-xmlhttprequest-sync-"+Ui.pid;ea.writeFileSync(A,"","utf8");for(var E="var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http"+(d?"s":"")+".request;var options = "+JSON.stringify(x)+";var responseText = '';var req = doRequest(options, function(response) {response.setEncoding('utf8');response.on('data', function(chunk) { responseText += chunk;});response.on('end', function() {fs.writeFileSync('"+C+"', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText}}), 'utf8');fs.unlinkSync('"+A+"');});response.on('error', function(error) {fs.writeFileSync('"+C+"', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('"+A+"');});}).on('error', function(error) {fs.writeFileSync('"+C+"', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('"+A+"');});"+(a?"req.write('"+JSON.stringify(a).slice(1,-1).replace(/'/g,"\\'")+"');":"")+"req.end();",S=Qo(Ui.argv[0],["-e",E]);ea.existsSync(A););var P=JSON.parse(ea.readFileSync(C,"utf8"));S.stdin.end(),ea.unlinkSync(C),P.err?i.handleError(P.err):(t=P.data,i.status=P.data.statusCode,i.responseText=P.data.text,g(i.DONE))}}},this.handleError=function(e){this.status=0,this.statusText=e,this.responseText=e.stack,h=!0,g(this.DONE),this.dispatchEvent("error")},this.abort=function(){e&&(e.abort(),e=null),c=s,this.status=0,this.responseText="",this.responseXML="",h=!0,this.readyState===this.UNSENT||this.readyState===this.OPENED&&!p||this.readyState===this.DONE||(p=!1,g(this.DONE)),this.readyState=this.UNSENT,this.dispatchEvent("abort")},this.addEventListener=function(e,t){e in f||(f[e]=[]),f[e].push(t)},this.removeEventListener=function(e,t){e in f&&(f[e]=f[e].filter((function(e){return e!==t})))},this.dispatchEvent=function(e){if("function"==typeof i["on"+e]&&i["on"+e](),e in f)for(var t=0,r=f[e].length;t<r;t++)f[e][t].call(i)};var g=function(e){e!=i.LOADING&&i.readyState===e||(i.readyState=e,(o.async||i.readyState<i.OPENED||i.readyState===i.DONE)&&i.dispatchEvent("readystatechange"),i.readyState!==i.DONE||h||(i.dispatchEvent("load"),i.dispatchEvent("loadend")))}},ia=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 ra(e){return ia(this,void 0,void 0,(function*(){return yield new Promise(((t,i)=>{let{url:r}=e;r||i(new Error("URL is missing")),"http://"!==r.substr(0,7)||e.forceHttp||(console.warn(`Upgrading requested url ${r} to https protocol.`),r=r.replace("http://","https://"));const n=new("undefined"==typeof XMLHttpRequest?ta:XMLHttpRequest);e["bearer-token"]&&n.setRequestHeader("Authorization",`Bearer ${e["bearer-token"]}`),n.onload=()=>{if(n.status>=200&&n.status<300)t(n.responseText);else{console.log(n.responseText);const e=`Error fetching url:${r}; status code:${n.status}`;i(new Error(e))}},n.ontimeout=e=>{console.log("ontimeout",e)},n.onreadystatechange=()=>{404===n.status&&i(new Error(`Error fetching url:${r}; status code:${n.status}`))},n.onerror=()=>{console.error(`Request failed with error ${n.responseText}`),i(new Error(n.responseText))},n.open(e.method||"GET",r),e.body?n.send(JSON.stringify(e.body)):n.send()}))}))}function na(e,t){return"string"!=typeof e?(console.warn("Trying to test a non string variable"),!1):0===e.indexOf(t)}function oa(e,t){for(let i=0;i<t.length;i++){const r=t[i];if(na(e,r))return e.slice(r.length)}return e}var aa=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 sa="https://api.etherscan.io/api?module=proxy";function ca(e){const t={[dt.Ethropst]:"ropsten",[dt.Ethrinkeby]:"rinkeby",[dt.Ethgoerli]:"goerli",[dt.Ethsepolia]:"sepolia"};if(!t[e])return sa;return`https://api-${t[e]}.etherscan.io/api?module=proxy`}const ua={serviceURL:function(e){return`${ca(e)}&action=eth_getTransactionByHash&txhash=${lt}`},serviceName:ct.etherscan,parsingFunction:function({jsonResponse:e,chain:t,key:i,keyPropertyName:r}){return aa(this,void 0,void 0,(function*(){const n=ca(t),o={serviceURL:{main:`${n}&action=eth_getBlockByNumber&boolean=true&tag=${lt}`,test:`${n}&action=eth_getBlockByNumber&boolean=true&tag=${lt}`}},a={serviceURL:{main:`${n}&action=eth_blockNumber`,test:`${n}&action=eth_blockNumber`}};const s=yield function(e,t){return aa(this,void 0,void 0,(function*(){const n=e.result.blockNumber,s=mt({explorerAPI:Object.assign(Object.assign({},o),{key:i,keyPropertyName:r}),transactionId:n,chain:t});try{const e=yield ra({url:s}),o=JSON.parse(e).result;return yield function(e,t){return aa(this,void 0,void 0,(function*(){const n=mt({explorerAPI:Object.assign(Object.assign({},a),{key:i,keyPropertyName:r}),chain:e});let o;try{o=yield ra({url:n})}catch(e){throw new Error("Unable to get remote hash")}const s=JSON.parse(o).result;if(s-t<ft.MininumConfirmations)throw new Error("Not enough");return s}))}(t,n),o}catch(e){throw new Error("Unable to get remote hash")}}))}(e,t);return function(e,t){const i=e.result,r=new Date(1e3*parseInt(t.timestamp,16)),n=i.from;return{remoteHash:oa(i.input,ht.ethmain.prefixes),issuingAddress:n,time:r,revokedAddresses:[]}}(e,s)}))},priority:-1};function la(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){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 da(e){return""===e?"":la(`${e}`)}function pa(e){return new Date(1e3*e)}const ha={serviceURL:{main:`https://api.blockcypher.com/v1/eth/main/txs/${lt}?limit=500`,test:`https://api.blockcypher.com/v1/beth/test/txs/${lt}?limit=500`},serviceName:ct.blockcypher,parsingFunction:function({jsonResponse:e}){if(e.confirmations<ft.MininumConfirmations)throw new Error("Not enough");const t=da(e.received),i=e.outputs,r=i[i.length-1];let n=e.inputs[0].addresses[0];const o=oa(r.script,ht.ethmain.prefixes);return n=function(e,t){for(let i=0;i<t.length;i++){const r=t[i];if(!na(e,r))return`${r}${e}`}return e}(n,ht.ethmain.prefixes),{remoteHash:o,issuingAddress:n,time:t,revokedAddresses:i.filter((e=>!!e.spent_by)).map((e=>e.addresses[0]))}},priority:-1};const fa={serviceURL:{main:`https://blockstream.info/api/tx/${lt}`,test:`https://blockstream.info/testnet/api/tx/${lt}`},serviceName:ct.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=pa(e.status.block_time),i=e.vout,r=i[i.length-1],n=e.vin[0].prevout.scriptpubkey_address;return{remoteHash:oa(r.scriptpubkey,ht.bitcoin.prefixes),issuingAddress:n,time:t,revokedAddresses:i.filter((e=>!!e.scriptpubkey_address)).map((e=>e.scriptpubkey_address))}},priority:-1};const ga={serviceURL:{main:`https://api.blockcypher.com/v1/btc/main/txs/${lt}?limit=500`,test:`https://api.blockcypher.com/v1/btc/test3/txs/${lt}?limit=500`},serviceName:ct.blockcypher,parsingFunction:function({jsonResponse:e}){if(e.confirmations<ft.MininumConfirmations)throw new Error("Number of transaction confirmations were less than the minimum required, according to Blockcypher API");const t=da(e.received),i=e.outputs,r=i[i.length-1],n=e.inputs[0].addresses[0];return{remoteHash:oa(r.script,ht.bitcoin.prefixes),issuingAddress:n,time:t,revokedAddresses:i.filter((e=>!!e.spent_by)).map((e=>e.addresses[0]))}},priority:-1};var ba=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 ma(e){return e.map((e=>({getTxData:(t,i)=>ba(this,void 0,void 0,(function*(){return yield function(e,t,i){return ba(this,void 0,void 0,(function*(){const r=mt({explorerAPI:e,transactionId:t,chain:i});try{const t=yield ra({url:r});return yield e.parsingFunction(Object.assign({jsonResponse:JSON.parse(t),chain:i},e))}catch(e){throw new Error("Unable to get remote hash")}}))}(e,t,i)})),priority:e.priority})))}const va=[ga,fa],ya=[ua,ha];var wa=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 xa({serviceUrl:e,transactionId:t}){return wa(this,void 0,void 0,(function*(){const i={method:"eth_getTransactionByHash",jsonrpc:"2.0",id:"getbyhash",params:["0x"+t]},r=yield ra({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 ra({url:e,body:o,method:"POST"}),s=JSON.parse(a),c=n.result,u=s.result,l=new Date(1e3*parseInt(u.timestamp,16)),d=c.from;return{remoteHash:oa(c.input,["0x"]),issuingAddress:d,time:l,revokedAddresses:[]}}))}var ka=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 _a({serviceUrl:e,transactionId:t}){return ka(this,void 0,void 0,(function*(){const i={method:"getrawtransaction",jsonrpc:"2.0",id:"rpctest",params:[t,!0]},r=yield ra({url:e,body:i,method:"POST"}),n=JSON.parse(r).result;return{issuingAddress:n.vout[0].scriptPubKey.addresses[0],remoteHash:oa(n.vout[1].scriptPubKey.asm,["6a20","OP_RETURN "]),time:pa(n.blocktime),revokedAddresses:n.vout.filter((e=>!!e.scriptPubKey.addresses)).map((e=>e.scriptPubKey.addresses)).flat()}}))}var Ca=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 Aa=[];function Ea(e=[],t=[],i=!1){const r=e.map((e=>e.serviceName)).filter((e=>!!e)).filter((e=>!!ct[e]));return r.length?t.reduce(((t,n)=>{if(r.includes(n.serviceName)){const i=Object.assign({},n),r=e.find((e=>e.serviceName===n.serviceName));if(function(e){if(e.key&&!e.keyPropertyName)throw new Error(`Property keyPropertyName is not set for ${e.serviceName}. Cannot pass the key property to the service.`);return!0}(r)){const n=Object.assign(i,r);t.push(n);const o=e.findIndex((e=>e.serviceName===n.serviceName));Aa.includes(o)||Aa.push(o)}}else t.push(n);return i&&function(e,t){t.forEach((t=>e.splice(t,1)))}(e,Aa),t}),[]):t}function Sa(e){return e.map((e=>(e.parsingFunction||(e.parsingFunction="btc"===e.chainType?_a:xa),e))).map((e=>({getTxData:t=>Ca(this,void 0,void 0,(function*(){return yield e.parsingFunction(Object.assign(Object.assign({},e),{transactionId:t}))})),priority:e.priority})))}function Pa(e){const{bitcoin:t,ethereum:i}={bitcoin:ma(Ea(r=e,va)),ethereum:ma(Ea(r,ya))};var r;const{custom:n}=function(e){return{custom:Sa(e)}}(e.filter((e=>"rpc"===e.apiType)));return{bitcoin:t,ethereum:i,custom:[...n,...ma(e.filter((e=>"rpc"!==e.apiType)))]}}var Ia,Ta=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 La(e,t){var i;switch(e){case ht[dt.Bitcoin].code:case ht[dt.Regtest].code:case ht[dt.Testnet].code:case ht[dt.Mocknet].code:return t.bitcoin;case ht[dt.Ethmain].code:case ht[dt.Ethropst].code:case ht[dt.Ethrinkeby].code:case ht[dt.Ethgoerli].code:case ht[dt.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 Da(e){return Ta(this,void 0,void 0,(function*(){let t;try{t=yield bt(e,ft.MinimumBlockchainExplorers)}catch(e){throw new Error(`Transaction lookup error: ${e.message}`)}if(!t||0===t.length)throw new Error("Could not confirm transaction data.");const i=t[0];for(let e=1;e<t.length;e++){const r=t[e];if(i.issuingAddress!==r.issuingAddress)throw new Error("Issuing addresses do not match consistently");if(i.remoteHash!==r.remoteHash)throw new Error("Remote hashes do not match consistently")}return i}))}function Ma(e,t,i,r){return Ta(this,void 0,void 0,(function*(){try{const n=function(e,t,i){if(ft.MinimumBlockchainExplorers>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 Da(n)}catch(n){if(t<e.length-1)return t++,yield Ma(e,t,i,r);throw n}}))}function Oa({transactionId:e,chain:t,explorerAPIs:i=[]}){return Ta(this,void 0,void 0,(function*(){const r=Pa(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(ft.MinimumBlockchainExplorers>r)throw new Error("Invalid application configuration; check the CONFIG.MinimumBlockchainExplorers configuration value");return i}({defaultAPIs:La(t,r),customAPIs:r.custom});return yield Ma(n,0,e,t)}))}!function(e){e.mainnet="mainnet",e.testnet="testnet"}(Ia||(Ia={}));var Ra="ecdsa-koblitz-pubkey:1",Ba="https://openbadgespec.org/v2/context.json",ja="https://www.w3.org/2018/credentials/v1",Fa="https://w3id.org/blockcerts/schema/2.0/context.json",Na="https://w3id.org/blockcerts/v2",za="https://www.blockcerts.org/schema/2.0/context.json",Va="https://w3id.org/blockcerts/schema/2.1/context.json",$a="https://w3id.org/blockcerts/v2.1",Ua="https://www.blockcerts.org/schema/2.1/context.json",Ha="https://w3id.org/blockcerts/schema/3.0/context.json",qa="https://w3id.org/blockcerts/v3",Ka="https://www.blockcerts.org/schema/3.0/context.json",Ja="https://w3id.org/blockcerts/schema/3.1/context.json",Ga="https://w3id.org/blockcerts/v3.1",Ya="https://www.blockcerts.org/schema/3.1/context.json",Wa="https://w3id.org/security/suites/merkle-2019/v1",Za="https://w3id.org/security/suites/chained-2021/v1",Xa="https://w3id.org/vc/status-list/2021/v1",Qa={"@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"}},es={"@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"}]},ts={"@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"}]},is={"@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"}}},rs={"@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"}}};const ns={};ns["https://w3id.org/openbadges/v2"]=Qa,ns[Ba]=Qa,ns[ja]={"@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"}}},ns[Fa]=es,ns[za]=es,ns[Na]=es,ns[Va]=ts,ns[Ua]=ts,ns[$a]=ts,ns[Ha]=is,ns[Ka]=is,ns[qa]=is,ns[Ja]=rs,ns[Ya]=rs,ns[Ga]=rs,ns[Wa]={"@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"}}}}},ns[Za]={"@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"}}}}},ns[Xa]={"@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"}}}}};var os={"@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",creator:{"@id":"dc:creator","@type":"@id"},expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},revoked:{"@id":"sec:expiration","@type":"xsd:dateTime"},CryptographicKey:"sec:Key",signature:"sec:signature",verification:"bc:verification",publicKeys:"bc:publicKeys",ChainpointSHA256v2:"cp:ChainpointSHA256v2",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-alpha/recipientSchema.json"},{"obi:validatesType":"SignatureLine","obi:validationSchema":"https://w3id.org/blockcerts/schema/2.0-alpha/signatureLineSchema.json"},{"obi:validatesType":"MerkleProof2017","obi:validationSchema":"https://w3id.org/blockcerts/schema/2.0-alpha/merkleProof2017Schema.json"}]},as={"@context":{id:"@id",type:"@type",bc:"https://w3id.org/blockcerts#",cp:"https://w3id.org/chainpoint#",schema:"http://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"},CryptographicKey:"sec:Key",domain:"sec:domain",nonce:"sec:nonce",proofValue:"sec:proofValue",assertionMethod:{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},proofPurpose:{"@id":"sec:proofPurpose","@type":"@vocab"},verificationMethod:{"@id":"sec:verificationMethod","@type":"@id"},created:{"@id":"bc:created","@type":"xsd:dateTime"},name:{"@id":"schema:name"}}},ss={"@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","@type":"@id"},contentEncoding:{"@id":"bc:contentEncoding","@type":"@id"},content:{"@id":"bc:content","@type":"@id"}}},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","@type":"@id"},url:{"@id":"schema:url","@type":"@id"},image:{"@id":"schema:image","@type":"@id"}}},cs={"@context":{"@protected":!0,id:"@id",type:"@type",alsoKnownAs:{"@id":"https://www.w3.org/ns/activitystreams#alsoKnownAs","@type":"@id"},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"},controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},keyAgreement:{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"},service:{"@id":"https://www.w3.org/ns/did#service","@type":"@id","@context":{"@protected":!0,id:"@id",type:"@type",serviceEndpoint:{"@id":"https://www.w3.org/ns/did#serviceEndpoint","@type":"@id"}}},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},us={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},EcdsaSecp256k1VerificationKey2019:{"@id":"https://w3id.org/security#EcdsaSecp256k1VerificationKey2019","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},blockchainAccountId:{"@id":"https://w3id.org/security#blockchainAccountId"},publicKeyJwk:{"@id":"https://w3id.org/security#publicKeyJwk","@type":"@json"},publicKeyBase58:{"@id":"https://w3id.org/security#publicKeyBase58"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}},EcdsaSecp256k1Signature2019:{"@id":"https://w3id.org/security#EcdsaSecp256k1Signature2019","@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"}}},jws:{"@id":"https://w3id.org/security#jws"},verificationMethod:{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}}}},ls={"@context":{id:"@id",type:"@type","@protected":!0,proof:{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"},Ed25519VerificationKey2020:{"@id":"https://w3id.org/security#Ed25519VerificationKey2020","@context":{"@protected":!0,id:"@id",type:"@type",controller:{"@id":"https://w3id.org/security#controller","@type":"@id"},revoked:{"@id":"https://w3id.org/security#revoked","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},publicKeyMultibase:{"@id":"https://w3id.org/security#publicKeyMultibase","@type":"https://w3id.org/security#multibase"}}},Ed25519Signature2020:{"@id":"https://w3id.org/security#Ed25519Signature2020","@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"}}}}};ns["https://w3id.org/blockcerts/schema/2.0-alpha/context.json"]=os,ns["https://www.blockcerts.org/schema/2.0-alpha/context.json"]=os,ns["https://www.blockcerts.org/schema/3.0-alpha/context.json"]=as,ns["https://w3id.org/blockcerts/schema/3.0-alpha/context.json"]=as,ns["https://w3id.org/blockcerts/v3.0-alpha"]=as,ns["https://www.blockcerts.org/schema/3.0-beta/context.json"]=ss,ns["https://w3id.org/blockcerts/schema/3.0-beta/context.json"]=ss,ns["https://w3id.org/blockcerts/v3.0-beta"]=ss,ns["https://w3id.org/security/suites/ed25519-2020/v1"]=ls,ns["https://ns.did.ai/suites/secp256k1-2019/v1/"]=us,ns["https://www.w3.org/ns/did/v1"]=cs;const ds={locale:"en-US"};var ps=Object.freeze({__proto__:null,isMainnet:function(e){return rt(e,"1")||rt(e,Ra)}});var hs={locale:"en-US"},fs={"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 gs(e,t){return e&&t?fs[hs.locale]?fs[hs.locale][e]?fs[hs.locale][e][t]?fs[hs.locale][e][t]||"":"[missing locale item data]":"[missing locale group data]":"[missing locale data]":""}function bs(){return Object.keys(fs)}var ms=Object.freeze({__proto__:null,detectLocale:function(){return navigator.language||ds.locale},ensureIsSupported:function(e){let t;const i=Ks.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=ds.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 gs(e,t)},getSupportedLanguages:bs,getText:gs});class vs{publicKey;created;revoked;expires;constructor(e,t,i,r){this.publicKey=e,this.created=t,this.revoked=i,this.expires=r}}class ys{image;jobTitle;name;constructor(e,t,i){this.image=e,this.jobTitle=t,this.name=i}}class ws extends Error{stepCode;constructor(e,t){super(t),this.stepCode=e}}const xs=fs[hs.locale];var ks,_s;function Cs(){return{[ks.formatValidation]:{code:ks.formatValidation,label:xs.steps.formatValidationLabel,labelPending:xs.steps.formatValidationLabelPending,subSteps:[]},[ks.proofVerification]:{code:ks.proofVerification,label:xs.steps.signatureVerificationLabel,labelPending:xs.steps.signatureVerificationLabelPending,subSteps:[]},[ks.identityVerification]:{code:ks.identityVerification,label:xs.steps.identityVerificationLabel,labelPending:xs.steps.identityVerificationLabelPending,subSteps:[]},[ks.statusCheck]:{code:ks.statusCheck,label:xs.steps.statusCheckLabel,labelPending:xs.steps.statusCheckLabelPending,subSteps:[]}}}!function(e){e.formatValidation="formatValidation",e.proofVerification="proofVerification",e.identityVerification="identityVerification",e.statusCheck="statusCheck",e.final="final"}(ks||(ks={})),function(e){e.checkImagesIntegrity="checkImagesIntegrity",e.checkRevokedStatus="checkRevokedStatus",e.checkExpiresDate="checkExpiresDate",e.controlVerificationMethod="controlVerificationMethod"}(_s||(_s={}));var As=Object.freeze({__proto__:null,get SUB_STEPS(){return _s},get VerificationSteps(){return ks},default:Cs,final:"final"});function Es(e=[],t=[]){return e.filter((e=>t.includes(e))).filter(((e,t,i)=>i.indexOf(e)===t))}function Ss(e,t){const i=e.findIndex((e=>e===t));i>-1&&e.splice(i,1)}const Ps={[ks.formatValidation]:[_s.checkImagesIntegrity],[ks.proofVerification]:[],[ks.identityVerification]:[_s.controlVerificationMethod],[ks.statusCheck]:[_s.checkRevokedStatus,_s.checkExpiresDate]};function Is(e,t){return Ps[e].filter((e=>t.includes(e))).map((t=>Ks.verifier.convertToVerificationSubsteps(e,t)))}function Ts(e){const t=Cs();return Object.keys(t).map((i=>({...t[i],subSteps:Is(i,e)})))}var Ls=Object.freeze({__proto__:null,generateRevocationReason:function(e){return e=(e=e.trim()).length>0?` ${gs("revocation","preReason")} ${e}${"."!==e.slice(-1)?".":""}`:"",`${gs("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(ht).map((e=>ht[e])).find((t=>t.signatureValue===e));if(void 0===t)throw new Error(gs("errors","getChain"));return t}(e.chain)}}return function(e=""){return ps.isMainnet(e)?ht.bitcoin:ht.testnet}(e)},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 ws("",gs("errors","getTransactionId"))}},getTransactionLink:function(e,t){return e&&t?{rawTransactionLink:t.transactionTemplates.raw.replace(at,e),transactionLink:t.transactionTemplates.full.replace(at,e)}:null},getVerificationMap:function(e=!1,t=!1){const i=function(e,t){const i=Object.values(_s);return e||Ss(i,_s.controlVerificationMethod),t||Ss(i,_s.checkImagesIntegrity),i}(e,t);return{verificationProcess:i,verificationMap:Ts(i)}}});var Ds=Object.freeze({__proto__:null,isMockChain:function(e){if(e){const t="string"==typeof e?e:e.code;return!!Object.keys(ht).some((e=>e===t))&&!!ht[t].test}return!1}});const Ms={value:"https://dev.uniresolver.io/1.0/identifiers",set url(e){this.value=e},get url(){return this.value}};function Os(e){return e.startsWith("did:",0)}function Rs(e){return e.startsWith("did:key:",0)}var Bs;!function(e){e.ED25519="ed25519",e.SECP256K1="secp256k1"}(Bs||(Bs={}));const js={"did:key:z6Mk":Bs.ED25519,"did:key:zQ3s":Bs.SECP256K1};async function Fs(e){const t=e.substring(0,12);if(js[t]){const i=await async function(e){if(e===Bs.ED25519)return await import("./did-key-ed25519.esm-54d2cbca-52ecc5b1.js");if(e===Bs.SECP256K1)return await import("./did-key-secp256k1.esm-8a01b23c-75ec86fd.js");throw new Error("Error loading did key resolver")}(js[t]),{didDocument:r}=await i.resolve(e,{accept:"application/did+json"});return r}throw new Error("Unsupported did:key suite")}var Ns,zs={...Object.freeze({__proto__:null,getIssuerProfileUrl:function(e){if(!e.service)return"";const t=e.service.find((e=>"IssuerProfile"===e.type)),i=t?.serviceEndpoint;return i??""},resolve:async function(e,t=Ms.url){if(Rs(e)){return await Fs(e)}const i=await ra({url:`${t}/${e}`});return JSON.parse(i).didDocument},resolveDidKeyDocument:Fs}),didResolver:Ms};!function(e){e.DEFAULT="standby",e.FAILURE="failure",e.STARTING="starting",e.SUCCESS="success"}(Ns||(Ns={}));class Vs{code;label;labelPending;parentStep;status;constructor(e,t){this.code=t,this.label=gs("subSteps",`${t}Label`),this.labelPending=gs("subSteps",`${t}LabelPending`),this.parentStep=e,this.status=Ns.DEFAULT}}function $s(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 Us(e){return""===e?0:$s(`${e}`).getTime()}function Hs(e,t=null){const i=e.created?Us(e.created):null,r=e.revoked?Us(e.revoked):null,n=e.expires?Us(e.expires):null;let o=t;if(!t){o=(e.id||e.publicKey).replace("ecdsa-koblitz-pubkey:","")}return new vs(o,i,r,n)}var qs=Object.freeze({__proto__:null,convertToVerificationSubsteps:function(e,t){return new Vs(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(t){const i=gs("errors","getIssuerProfile");if(!t)throw new ws("getIssuerProfile",`${i} - ${gs("errors","issuerProfileNotSet")}`);let r;if("object"==typeof t&&(t=t.id),Os(t))try{const i=await Ks.did.resolve(t);if(Rs(t))r=function(e){return{"@context":["https://w3id.org/openbadges/v2","https://w3id.org/blockcerts/3.0"],publicKey:[{created:(new Date).toISOString(),id:e.id.split(":").pop()}]}}(i);else{const t=await Ks.did.getIssuerProfileUrl(i);t&&(r=await e(t))}return{didDocument:i,...r}}catch(e){throw console.error(e),new ws("getIssuerProfile",`${i} - ${e}`)}else if(!function(e){return/^(ftp|http|https):\/\/[^ "]+$/.test(e)}(t))throw new ws("getIssuerProfile",`${i} - ${gs("errors","issuerProfileNotSet")}`);if(r=JSON.parse(await ra({url:t}).catch((()=>{throw new ws("getIssuerProfile",i)}))),!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()))}(r)&&!function(e){const{issuer_key:t,revocation_key:i,issuerKeys:r,revocationKeys:n}=e;return!(!t||!i)||!(!r||!n)}(r))throw new ws("getIssuerProfile",`${i} - ${gs("errors","issuerProfileInvalid")}`);return r},getRevokedAssertions:async function(e,t){if(!e)return[];const i=gs("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 ra({url:e});return JSON.parse(t).revokedAssertions??[]}catch(e){throw console.error(e),new ws(_s.checkRevokedStatus,i)}},lookForTx:Oa,parseIssuerKeys:function(e){try{const t={};if("@context"in e){const i=e.publicKey||e.publicKeys;for(let e=0;e<i.length;e++){const r=Hs(i[e]);t[r.publicKey]=r}}else{const i=Hs({},(e.issuerKeys||[])[0].key);t[i.publicKey]=i}return t}catch(e){throw console.error(e),new ws("parseIssuerKeys",gs("errors","parseIssuerKeys"))}},parseRevocationKey:function(e){return e&&Object.prototype.hasOwnProperty.call(e,"revocationKeys")&&e.revocationKeys.length>0?e.revocationKeys[0].key:""}}),Ks={addresses:ps,certificates:Ls,chains:Ds,did:zs,i18n:ms,verifier:qs};function Js(e){const{credentialSubject:t}=e;return t.name||""}function Gs(e){"string"==typeof e&&(e=[e]);const t=(i=function(e){return e.filter(nt)}(e),i.find((e=>e.toLowerCase().indexOf("blockcerts")>0)));var i;const r=t.split("/").filter((e=>""!==e)),n=Object.keys(Ys),o=parseInt(n.filter((e=>function(e,t){return e.some((e=>e.includes(`v${t}`)||e.includes(`${t}.`)))}(r,e.toString())))[0],10);let a;switch(o){case 1:a=ut.V1_2;break;case 2:a=ut.V2_0;break;case 3:if(t.includes("-alpha")){a=ut.V3_0_alpha;break}if(t.includes("-beta")){a=ut.V3_0_beta;break}a=ut.V3_0}return{versionNumber:o,version:a}}const Ys={1:function(){throw new ws("","Verification of v1 certificates is not supported by this component. See the python cert-verifier for v1.1 verification or the npm package cert-verifier-js-v1-legacy for v1.2 (https://www.npmjs.com/package/@blockcerts/cert-verifier-js-v1-legacy)")},2:async function(e){const{id:t,expires:i,badge:r}=e,{image:n,name:o,description:a,subtitle:s,issuer:c}=r,u=e.recipientProfile||e.recipient.recipientProfile,l=e.issuedOn,d=e.metadataJson,p=u.name,h=function(e){const t=[];for(const i in e){const r=e[i],n=new ys(r.image,r.jobTitle,r.name);t.push(n)}return t}(r.signatureLines),f=await Ks.verifier.getIssuerProfile(c);return{certificateImage:n,description:a,expires:i,id:t,issuedOn:l,issuer:f,metadataJson:d,name:o,recipientFullName:p,recordLink:t,revocationKey:null,sealImage:f.image,signatureImage:h,subtitle:s}},3:async function(e){const{issuer:t,metadataJson:i,metadata:r,issuanceDate:n,id:o,expirationDate:a,display:s}=e,c=r||i;return{display:s,expires:a,issuedOn:n,id:o,issuer:await Ks.verifier.getIssuerProfile(t),metadataJson:c,recipientFullName:Js(e),recordLink:o}}};function Ws(e){if(Array.isArray(e)){return e.find((e=>"ChainedProof2021"!==e.type)).verificationMethod}return e.verificationMethod}var Zs;!function(e){e.MerkleProof2017="MerkleProof2017",e.MerkleProof2019="MerkleProof2019",e.Ed25519Signature2020="Ed25519Signature2020",e.EcdsaSecp256k1Signature2019="EcdsaSecp256k1Signature2019"}(Zs||(Zs={}));class Xs{expires;id;issuer;revocationKey;documentToVerify;explorerAPIs;txData;_stepsStatuses=[];hashlinkVerifier;verificationSteps;supportedVerificationSuites={[Zs.MerkleProof2017]:null,[Zs.MerkleProof2019]:null,[Zs.Ed25519Signature2020]:null,[Zs.EcdsaSecp256k1Signature2019]:null};proofVerifiers=[];verificationProcess;proofMap;constructor({certificateJson:e,expires:t,hashlinkVerifier:i,id:r,issuer:n,revocationKey:o,explorerAPIs:a}){this.expires=t,this.id=r,this.issuer=n,this.hashlinkVerifier=i,this.revocationKey=o,this.explorerAPIs=a,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();for(const e of this.proofVerifiers)await e.init();this.prepareVerificationProcess()}async verify(e=(()=>{})){this._stepCallback=e,this._stepsStatuses=[];for(let e=0;e<this.proofVerifiers.length;e++)await this.proofVerifiers[e].verifyProof();for(const e of this.verificationProcess){if(!this[e])return void console.error("verification logic for",e,"not implemented");await this[e]()}for(let e=0;e<this.proofVerifiers.length;e++)await this.proofVerifiers[e].verifyIdentity();const t=this._stepsStatuses.find((e=>e.status===Ns.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),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))}))}async loadRequiredVerificationSuites(e){if(e.includes(Zs.MerkleProof2017)){const{default:e}=await import("./MerkleProof2017-ac8d147b-dd9968ca.js");this.supportedVerificationSuites.MerkleProof2017=e}if(e.includes(Zs.MerkleProof2019)){const{default:e}=await import("./MerkleProof2019-6596bc5f-6920f4ea.js");this.supportedVerificationSuites.MerkleProof2019=e}if(e.includes(Zs.Ed25519Signature2020)){const{default:e}=await import("./Ed25519Signature2020-722d8d24-df100275.js");this.supportedVerificationSuites.Ed25519Signature2020=e}if(e.includes(Zs.EcdsaSecp256k1Signature2019)){const{default:e}=await import("./EcdsaSecp256k1Signature2019-01e33e56-6efe219a.js");this.supportedVerificationSuites.EcdsaSecp256k1Signature2019=e}}prepareVerificationProcess(){const e=Ks.certificates.getVerificationMap(!!this.issuer.didDocument,this.hashlinkVerifier?.hasHashlinksToVerify()??!1);this.verificationSteps=e.verificationMap,this.verificationProcess=e.verificationProcess,this.registerSignatureVerificationSteps(),this.registerIdentityVerificationSteps(),this.verificationSteps=this.verificationSteps.filter((e=>e.subSteps?.length>0||e.suites?.some((e=>e.subSteps.length>0))))}registerSignatureVerificationSteps(){const e=ks.proofVerification;this.verificationSteps.find((t=>t.code===e)).suites=this.getSuiteSubsteps(e)}getSuiteSubsteps(e){const t={[ks.proofVerification]:"getProofVerificationSteps",[ks.identityVerification]:"getIdentityVerificationSteps"};return this.proofVerifiers.map((i=>({proofType:i.type,subSteps:i[t[e]](e)})))}registerIdentityVerificationSteps(){const e=ks.identityVerification;this.verificationSteps.find((t=>t.code===e)).suites=this.getSuiteSubsteps(e)}async executeStep(e,t,i){if(!this._isFailing()){e&&(Ks.i18n.getText("subSteps",`${e}LabelPending`),this._updateStatusCallback(e,Ns.STARTING,i));try{const r=await t();return e&&(this._updateStatusCallback(e,Ns.SUCCESS,i),this._stepsStatuses.push({code:e,status:Ns.SUCCESS})),r}catch(t){console.error(t),e&&(this._updateStatusCallback(e,Ns.FAILURE,i,t.message),this._stepsStatuses.push({code:e,message:t.message,status:Ns.FAILURE}))}}}_stepCallback(e){}async checkImagesIntegrity(){await this.executeStep(_s.checkImagesIntegrity,(async()=>{await this.hashlinkVerifier.verifyHashlinkTable().catch((e=>{throw console.error("hashlink verification error",e),new ws(_s.checkImagesIntegrity,gs("errors","checkImagesIntegrity"))}))}))}async checkRevokedStatus(){if(this.documentToVerify.credentialStatus){const{default:e}=await import("./checkRevocationStatusList2021-904b13ff-ca07e61e.js");return void await this.executeStep(_s.checkRevokedStatus,(async()=>{await e(this.documentToVerify.credentialStatus)}))}const e=this.getRevocationListUrl();if(!e)return console.warn("No revocation list url was set on the issuer."),void await this.executeStep(_s.checkRevokedStatus,(()=>!0));const t=await this.executeStep(null,(async()=>await Ks.verifier.getRevokedAssertions(e,this.id))),{default:i}=await import("./ensureNotRevoked-2dc26afb-7b9df556.js");await this.executeStep(_s.checkRevokedStatus,(()=>i(t,this.id)))}async checkExpiresDate(){await this.executeStep(_s.checkExpiresDate,(()=>function(e=null){if(!e)return;const t=Us(e);if((new Date).getTime()>=t)throw new ws(_s.checkExpiresDate,gs("errors","ensureNotExpired"))}(this.expires)))}async controlVerificationMethod(){if(!this.issuer.didDocument)return;const{default:e}=await import("./controlVerificationMethod-80d0e7f0-27e88021.js");await this.executeStep(_s.controlVerificationMethod,(()=>{e(this.issuer.didDocument,Ws(this.documentToVerify.proof))}))}findStepFromVerificationProcess(e,t){return Ks.verifier.findVerificationSubstep(e,this.verificationSteps,t)}_failed(e){const{message:t}=e;return this._setFinalStep({status:Ns.FAILURE,message:t})}_isFailing(){return this._stepsStatuses.some((e=>e.status===Ns.FAILURE))}_succeed(){let e;return 1===this.proofVerifiers.length&&(e=this.proofVerifiers[0].type.includes("MerkleProof")?Ks.chains.isMockChain(this.proofVerifiers[0].getChain())?Ks.i18n.getComposedText("success","mocknet"):Ks.i18n.getComposedText("success","blockchain"):{...Ks.i18n.getComposedText("success","generic"),description:Ks.i18n.getComposedText("success","generic").description.replace("${SIGNATURE_TYPE}",this.proofVerifiers[0].type)}),this.proofVerifiers.length>1&&(e=Ks.i18n.getComposedText("success","multisign")),this._setFinalStep({status:Ns.SUCCESS,message:e})}_setFinalStep({status:e,message:t}){return{code:ks.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 Qs={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]",u="[object Map]",l="[object Number]",d="[object Object]",p="[object Promise]",h="[object RegExp]",f="[object Set]",g="[object String]",b="[object Symbol]",m="[object WeakMap]",v="[object ArrayBuffer]",y="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",k="[object Int8Array]",_="[object Int16Array]",C="[object Int32Array]",A="[object Uint8Array]",E="[object Uint8ClampedArray]",S="[object Uint16Array]",P="[object Uint32Array]",I=/\w*$/,T=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,D={};D[n]=D["[object Array]"]=D[v]=D[y]=D[o]=D[a]=D[w]=D[x]=D[k]=D[_]=D[C]=D[u]=D[l]=D[d]=D[h]=D[f]=D[g]=D[b]=D[A]=D[E]=D[S]=D[P]=!0,D["[object Error]"]=D[s]=D[m]=!1;var M="object"==typeof Hi&&Hi&&Hi.Object===Object&&Hi,O="object"==typeof self&&self&&self.Object===Object&&self,R=M||O||Function("return this")(),B=t&&!t.nodeType&&t,j=B&&e&&!e.nodeType&&e,F=j&&j.exports===B;function N(e,t){return e.set(t[0],t[1]),e}function z(e,t){return e.add(t),e}function V(e,t,i,r){var n=-1,o=e?e.length:0;for(r&&o&&(i=e[++n]);++n<o;)i=t(i,e[n],n,e);return i}function $(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function U(e){var t=-1,i=Array(e.size);return e.forEach((function(e,r){i[++t]=[r,e]})),i}function H(e,t){return function(i){return e(t(i))}}function q(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i}var K,J=Array.prototype,G=Function.prototype,Y=Object.prototype,W=R["__core-js_shared__"],Z=(K=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||""))?"Symbol(src)_1."+K:"",X=G.toString,Q=Y.hasOwnProperty,ee=Y.toString,te=RegExp("^"+X.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ie=F?R.Buffer:void 0,re=R.Symbol,ne=R.Uint8Array,oe=H(Object.getPrototypeOf,Object),ae=Object.create,se=Y.propertyIsEnumerable,ce=J.splice,ue=Object.getOwnPropertySymbols,le=ie?ie.isBuffer:void 0,de=H(Object.keys,Object),pe=je(R,"DataView"),he=je(R,"Map"),fe=je(R,"Promise"),ge=je(R,"Set"),be=je(R,"WeakMap"),me=je(Object,"create"),ve=$e(pe),ye=$e(he),we=$e(fe),xe=$e(ge),ke=$e(be),_e=re?re.prototype:void 0,Ce=_e?_e.valueOf:void 0;function Ae(e){var t=-1,i=e?e.length:0;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Ee(e){var t=-1,i=e?e.length:0;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function 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 Pe(e){this.__data__=new Ee(e)}function Ie(e,t){var i=He(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&qe(e)}(e)&&Q.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)!t&&!Q.call(e,a)||o&&("length"==a||ze(a,r))||i.push(a);return i}function Te(e,t,i){var r=e[t];Q.call(e,t)&&Ue(r,i)&&(void 0!==i||t in e)||(e[t]=i)}function Le(e,t){for(var i=e.length;i--;)if(Ue(e[i][0],t))return i;return-1}function De(e,t,i,r,p,m,T){var L;if(r&&(L=m?r(e,p,m,T):r(e)),void 0!==L)return L;if(!Ge(e))return e;var M=He(e);if(M){if(L=function(e){var t=e.length,i=e.constructor(t);t&&"string"==typeof e[0]&&Q.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,L)}else{var O=Ne(e),R=O==s||O==c;if(Ke(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(O==d||O==n||R&&!m){if($(e))return m?e:{};if(L=function(e){return"function"!=typeof e.constructor||Ve(e)?{}:(t=oe(e),Ge(t)?ae(t):{});var t}(R?{}:e),!t)return function(e,t){return Re(e,Fe(e),t)}(e,function(e,t){return e&&Re(t,Ye(t),e)}(L,e))}else{if(!D[O])return m?e:{};L=function(e,t,i,r){var n=e.constructor;switch(t){case v:return Oe(e);case o:case a:return new n(+e);case y:return function(e,t){var i=t?Oe(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,r);case w:case x:case k:case _:case C:case A:case E:case S:case P:return function(e,t){var i=t?Oe(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}(e,r);case u:return function(e,t,i){var r=t?i(U(e),!0):U(e);return V(r,N,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,I.exec(e));return t.lastIndex=e.lastIndex,t}(e);case f:return function(e,t,i){var r=t?i(q(e),!0):q(e);return V(r,z,new e.constructor)}(e,r,i);case b:return s=e,Ce?Object(Ce.call(s)):{}}var s}(e,O,De,t)}}T||(T=new Pe);var B=T.get(e);if(B)return B;if(T.set(e,L),!M)var j=i?function(e){return function(e,t,i){var r=t(e);return He(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,Ye,Fe)}(e):Ye(e);return function(e,t){for(var i=-1,r=e?e.length:0;++i<r&&!1!==t(e[i],i,e););}(j||e,(function(n,o){j&&(n=e[o=n]),Te(L,o,De(n,t,i,r,o,e,T))})),L}function Me(e){return!(!Ge(e)||(t=e,Z&&Z in t))&&(Je(e)||$(e)?te:T).test($e(e));var t}function Oe(e){var t=new e.constructor(e.byteLength);return new ne(t).set(new ne(e)),t}function Re(e,t,i,r){i||(i={});for(var n=-1,o=t.length;++n<o;){var a=t[n],s=r?r(i[a],e[a],a,i,e):void 0;Te(i,a,void 0===s?e[a]:s)}return i}function Be(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 je(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return Me(i)?i:void 0}Ae.prototype.clear=function(){this.__data__=me?me(null):{}},Ae.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ae.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===i?void 0:r}return Q.call(t,e)?t[e]:void 0},Ae.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Ae.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?i:t,this},Ee.prototype.clear=function(){this.__data__=[]},Ee.prototype.delete=function(e){var t=this.__data__,i=Le(t,e);return!(i<0)&&(i==t.length-1?t.pop():ce.call(t,i,1),!0)},Ee.prototype.get=function(e){var t=this.__data__,i=Le(t,e);return i<0?void 0:t[i][1]},Ee.prototype.has=function(e){return Le(this.__data__,e)>-1},Ee.prototype.set=function(e,t){var i=this.__data__,r=Le(i,e);return r<0?i.push([e,t]):i[r][1]=t,this},Se.prototype.clear=function(){this.__data__={hash:new Ae,map:new(he||Ee),string:new Ae}},Se.prototype.delete=function(e){return Be(this,e).delete(e)},Se.prototype.get=function(e){return Be(this,e).get(e)},Se.prototype.has=function(e){return Be(this,e).has(e)},Se.prototype.set=function(e,t){return Be(this,e).set(e,t),this},Pe.prototype.clear=function(){this.__data__=new Ee},Pe.prototype.delete=function(e){return this.__data__.delete(e)},Pe.prototype.get=function(e){return this.__data__.get(e)},Pe.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Ee){var r=i.__data__;if(!he||r.length<199)return r.push([e,t]),this;i=this.__data__=new Se(r)}return i.set(e,t),this};var Fe=ue?H(ue,Object):function(){return[]},Ne=function(e){return ee.call(e)};function ze(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||L.test(e))&&e>-1&&e%1==0&&e<t}function Ve(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function $e(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(pe&&Ne(new pe(new ArrayBuffer(1)))!=y||he&&Ne(new he)!=u||fe&&Ne(fe.resolve())!=p||ge&&Ne(new ge)!=f||be&&Ne(new be)!=m)&&(Ne=function(e){var t=ee.call(e),i=t==d?e.constructor:void 0,r=i?$e(i):void 0;if(r)switch(r){case ve:return y;case ye:return u;case we:return p;case xe:return f;case ke:return m}return t});var He=Array.isArray;function qe(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Je(e)}var Ke=le||function(){return!1};function Je(e){var t=Ge(e)?ee.call(e):"";return t==s||t==c}function Ge(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ye(e){return qe(e)?Ie(e):function(e){if(!Ve(e))return de(e);var t=[];for(var i in Object(e))Q.call(e,i)&&"constructor"!=i&&t.push(i);return t}(e)}e.exports=function(e){return De(e,!0,!0)}}(Qs,Qs.exports);var ec=qi(Qs.exports);function tc(e){return ec(e)}function ic(e){return e===Object(e)}function rc(e){return[...e.matchAll(/hl:{1}[a-zA-Z0-9]+:{1}[a-zA-Z0-9]+/gm)].map((e=>e[0])).filter((e=>!!e))}async function nc(e,t){const i=rc(e);if(i.length){const r=await async function(e,t){return(await Promise.all(e.map((async e=>await t.decode(e))))).reduce((function(e,t){return e.push(t.meta.url[0]),e}),[])}(i,t);e=function(e,t,i){return t.forEach(((t,r)=>{e=e.replace(i[r],t)})),e}(e,r,i)}return e}class oc{certificateImage;certificateJson;description;display;expires;explorerAPIs=[];id;isFormatValid;issuedOn;issuer;locale;metadataJson;name;options;recipientFullName;recordLink;revocationKey;sealImage;signature;signatureImage;signers=[];subtitle;hashlinkVerifier;hasHashlinks=!1;verificationSteps;verifier;constructor(e,t={}){if(this._setOptions(t),"object"!=typeof e)try{e=JSON.parse(e)}catch(e){throw new Error(Ks.i18n.getText("errors","certificateNotValid"))}this.certificateJson=tc(e)}async init(){if(this.certificateJson.display?.content){rc(this.certificateJson.display.content).length&&await import("./HashlinkVerifier-40818bdd-2156022a.js").then((e=>{this.hashlinkVerifier=new e.HashlinkVerifier}))}await this.parseJson(this.certificateJson),this.verifier=new Xs({certificateJson:this.certificateJson,expires:this.expires,id:this.id,issuer:this.issuer,hashlinkVerifier:this.hashlinkVerifier,revocationKey:this.revocationKey,explorerAPIs:tc(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=Gs(e["@context"]),i=await Ys[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({},ds,e),this.locale=Ks.i18n.ensureIsSupported("auto"===this.options.locale?Ks.i18n.detectLocale():this.options.locale),this.explorerAPIs=this.options.explorerAPIs||[],e.didResolverUrl&&(Ks.did.didResolver.url=e.didResolverUrl),hs.locale=this.locale}async _setProperties({certificateImage:e,description:t,display:i,expires:r,id:n,isFormatValid:o,issuedOn:a,issuer:s,metadataJson:c,name:u,recipientFullName:l,recordLink:d,revocationKey:p,sealImage:h,signature:f,signatureImage:g,subtitle:b}){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=u,this.recipientFullName=l,this.recordLink=d,this.revocationKey=p,this.sealImage=h,this.signature=f,this.signatureImage=g,this.subtitle=b,this.display=await this.parseHashlinksInDisplay(i)}async parseHashlinksInDisplay(e){const t=tc(e);if(t)return"text/html"!==t.contentMediaType||(t.content=await nc(t.content,this.hashlinkVerifier)),t}}var ac=function(e,t){return ac=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},ac(e,t)};function sc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}ac(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var cc=function(){return cc=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},cc.apply(this,arguments)};function uc(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 lc(e){return/^(ftp|http|https):\/\/[^ "]+$/.test(e)}function dc(e){return/^(\.\/|\.\.\/|[A-Z]:\/\/|\/)[^ "]+$/.test(e)}function pc(){return{certificateDefinition:null,errorMessage:"errors.invalidBlockcertsUrl"}}var hc=Object.freeze({__proto__:null,displayHtmlHasNoWidthConstraint:tt,download:function(e){return e+it},initializeVerificationSteps:function(e){const t=JSON.parse(JSON.stringify(e.verificationSteps));return t.map(((e,i)=>Object.assign(Object.assign({},e),{isLast:i===t.length-1,status:Ns.DEFAULT})))},isPathToCertificateValidURI:function(e){return lc(e)||dc(e)},parse:function(e,t={}){return uc(this,void 0,void 0,(function*(){t.locale||(t.locale="auto");try{const{retrieveBlockcertsVersion:i,Certificate:r}=yield import("./index-69ba64e7.js");let n;if(1===i(e["@context"]).versionNumber){const{Certificate:i}=yield import("./index-94883c71.js").then((function(e){return e.h}));n=new i(e,t)}else n=new r(e,t);return yield n.init(),{certificateDefinition:n}}catch(e){return console.error(e),{certificateDefinition:null,errorMessage:"errors.invalidBlockcerts"}}}))},read:function(e){return uc(this,void 0,void 0,(function*(){if(!e)return;const t=yield function(e){return uc(this,void 0,void 0,(function*(){return yield new Promise((function(t,i){const r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=r.onabort=i,r.readAsText(e)}))}))}(e);return t}))},retrieve:function(e){return uc(this,void 0,void 0,(function*(){if(!lc(e)&&!dc(e))return console.error("Invalid url to retrieve:",e),null;const t=e+it;return yield fetch(t).then((e=>uc(this,void 0,void 0,(function*(){return yield e.text()})))).then((e=>{try{return{certificateDefinition:JSON.parse(e)}}catch(e){return console.log(e),{certificateDefinition:null,errorMessage:"errors.invalidBlockcertsUrl"}}})).catch(pc)}))}});var fc=((e={})=>{if(!window.Proxy){const t=function(){let e=null;function t(e){return!!e&&("object"==typeof e||"function"==typeof e)}const i=function(i,r){if(!t(i)||!t(r))throw new TypeError("Cannot create proxy with a non-object as target or handler");let n=function(){};e=function(){n=function(e){throw new TypeError(`Cannot perform '${e}' on a proxy that has been revoked`)}};const o=r;r={get:null,set:null,apply:null,construct:null};for(const e in o)e in r&&(r[e]=o[e]);"function"==typeof o&&(r.apply=o.apply.bind(o));let a=this,s=!1,c=!1;"function"==typeof i?(a=function(){const e=this&&this.constructor===a,t=Array.prototype.slice.call(arguments);return n(e?"construct":"apply"),e&&r.construct?r.construct.call(this,i,t):!e&&r.apply?r.apply(i,this,t):e?(t.unshift(i),new(i.bind.apply(i,t))):i.apply(this,t)},s=!0):i instanceof Array&&(a=[],c=!0);const u=r.get?function(e){return n("get"),r.get(this,e,a)}:function(e){return n("get"),this[e]},l=r.set?function(e,t){n("set"),r.set(this,e,t,a)}:function(e,t){n("set"),this[e]=t},d=Object.getOwnPropertyNames(i),p={};d.forEach((function(e){if((s||c)&&e in a)return;const t={enumerable:!!Object.getOwnPropertyDescriptor(i,e).enumerable,get:u.bind(i,e),set:l.bind(i,e)};Object.defineProperty(a,e,t),p[e]=!0}));let h=!0;if(Object.setPrototypeOf?Object.setPrototypeOf(a,Object.getPrototypeOf(i)):a.__proto__?a.__proto__=i.__proto__:h=!1,r.get||!h)for(const e in i)p[e]||Object.defineProperty(a,e,{get:u.bind(i,e)});return Object.seal(i),Object.seal(a),a};return i.revocable=function(t,r){return{proxy:new i(t,r),revoke:e}},i}();return new t(e,Xe)}return new Proxy(e,Xe)})({certificates:hc,events:Object.freeze({__proto__:null,dispatch:function(e="",t=null,i){if(!e||"string"!=typeof e)return;if(!t||"object"!=typeof t)return;const r=new CustomEvent(e,{detail:Object.assign({certificateDefinition:t},i)});window.dispatchEvent(r)}})});function gc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bc={exports:{}},mc={},vc={exports:{}},yc={};function wc(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}var xc=/javascript\s*\:/gim;yc.whiteList=wc(),yc.getDefaultWhiteList=wc,yc.onAttr=function(e,t,i){},yc.onIgnoreAttr=function(e,t,i){},yc.safeAttrValue=function(e,t){return xc.test(t)?"":t};var kc={indexOf:function(e,t){var i,r;if(Array.prototype.indexOf)return e.indexOf(t);for(i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1},forEach:function(e,t,i){var r,n;if(Array.prototype.forEach)return e.forEach(t,i);for(r=0,n=e.length;r<n;r++)t.call(i,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}};var _c=function(e,t){";"!==(e=kc.trimRight(e))[e.length-1]&&(e+=";");var i=e.length,r=!1,n=0,o=0,a="";function s(){if(!r){var i=kc.trim(e.slice(n,o)),s=i.indexOf(":");if(-1!==s){var c=kc.trim(i.slice(0,s)),u=kc.trim(i.slice(s+1));if(c){var l=t(n,a.length,c,u,i);l&&(a+=l+"; ")}}}n=o+1}for(;o<i;o++){var c=e[o];if("/"===c&&"*"===e[o+1]){var u=e.indexOf("*/",o+2);if(-1===u)break;n=(o=u+1)+1,r=!1}else"("===c?r=!0:")"===c?r=!1:";"===c?r||s():"\n"===c&&s()}return kc.trim(a)},Cc=yc,Ac=_c;function Ec(e){return null==e}function Sc(e){(e=function(e){var t={};for(var i in e)t[i]=e[i];return t}(e||{})).whiteList=e.whiteList||Cc.whiteList,e.onAttr=e.onAttr||Cc.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||Cc.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||Cc.safeAttrValue,this.options=e}Sc.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,i=t.whiteList,r=t.onAttr,n=t.onIgnoreAttr,o=t.safeAttrValue;return Ac(e,(function(e,t,a,s,c){var u=i[a],l=!1;if(!0===u?l=u:"function"==typeof u?l=u(s):u instanceof RegExp&&(l=u.test(s)),!0!==l&&(l=!1),s=o(a,s)){var d,p={position:t,sourcePosition:e,source:c,isWhite:l};return l?Ec(d=r(a,s,p))?a+":"+s:d:Ec(d=n(a,s,p))?void 0:d}}))};var Pc=Sc;!function(e,t){var i=yc,r=Pc;for(var n in t=e.exports=function(e,t){return new r(t).process(e)},t.FilterCSS=r,i)t[n]=i[n];"undefined"!=typeof window&&(window.filterCSS=e.exports)}(vc,vc.exports);var Ic=vc.exports,Tc=gc(Ic),Lc={indexOf:function(e,t){var i,r;if(Array.prototype.indexOf)return e.indexOf(t);for(i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1},forEach:function(e,t,i){var r,n;if(Array.prototype.forEach)return e.forEach(t,i);for(r=0,n=e.length;r<n;r++)t.call(i,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}},Dc=Ic.FilterCSS,Mc=Ic.getDefaultWhiteList,Oc=Lc;function Rc(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var Bc=new Dc;function jc(e){return e.replace(Fc,"&lt;").replace(Nc,"&gt;")}var Fc=/</g,Nc=/>/g,zc=/"/g,Vc=/&quot;/g,$c=/&#([a-zA-Z0-9]*);?/gim,Uc=/&colon;?/gim,Hc=/&newline;?/gim,qc=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,Kc=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,Jc=/u\s*r\s*l\s*\(.*/gi;function Gc(e){return e.replace(zc,"&quot;")}function Yc(e){return e.replace(Vc,'"')}function Wc(e){return e.replace($c,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function Zc(e){return e.replace(Uc,":").replace(Hc," ")}function Xc(e){for(var t="",i=0,r=e.length;i<r;i++)t+=e.charCodeAt(i)<32?" ":e.charAt(i);return Oc.trim(t)}function Qc(e){return e=Xc(e=Zc(e=Wc(e=Yc(e))))}function eu(e){return e=jc(e=Gc(e))}mc.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},mc.getDefaultWhiteList=Rc,mc.onTag=function(e,t,i){},mc.onIgnoreTag=function(e,t,i){},mc.onTagAttr=function(e,t,i){},mc.onIgnoreTagAttr=function(e,t,i){},mc.safeAttrValue=function(e,t,i,r){if(i=Qc(i),"href"===t||"src"===t){if("#"===(i=Oc.trim(i)))return"#";if("http://"!==i.substr(0,7)&&"https://"!==i.substr(0,8)&&"mailto:"!==i.substr(0,7)&&"tel:"!==i.substr(0,4)&&"data:image/"!==i.substr(0,11)&&"ftp://"!==i.substr(0,6)&&"./"!==i.substr(0,2)&&"../"!==i.substr(0,3)&&"#"!==i[0]&&"/"!==i[0])return""}else if("background"===t){if(qc.lastIndex=0,qc.test(i))return""}else if("style"===t){if(Kc.lastIndex=0,Kc.test(i))return"";if(Jc.lastIndex=0,Jc.test(i)&&(qc.lastIndex=0,qc.test(i)))return"";!1!==r&&(i=(r=r||Bc).process(i))}return i=eu(i)},mc.escapeHtml=jc,mc.escapeQuote=Gc,mc.unescapeQuote=Yc,mc.escapeHtmlEntities=Wc,mc.escapeDangerHtml5Entities=Zc,mc.clearNonPrintableCharacter=Xc,mc.friendlyAttrValue=Qc,mc.escapeAttrValue=eu,mc.onIgnoreTagStripAll=function(){return""},mc.StripTagBody=function(e,t){"function"!=typeof t&&(t=function(){});var i=!Array.isArray(e),r=[],n=!1;return{onIgnoreTag:function(o,a,s){if(function(t){return!!i||-1!==Oc.indexOf(e,t)}(o)){if(s.isClosing){var c="[/removed]",u=s.position+10;return r.push([!1!==n?n:s.position,u]),n=!1,c}return n||(n=s.position),"[removed]"}return t(o,a,s)},remove:function(e){var t="",i=0;return Oc.forEach(r,(function(r){t+=e.slice(i,r[0]),i=r[1]})),t+=e.slice(i)}}},mc.stripCommentTag=function(e){for(var t="",i=0;i<e.length;){var r=e.indexOf("\x3c!--",i);if(-1===r){t+=e.slice(i);break}t+=e.slice(i,r);var n=e.indexOf("--\x3e",r);if(-1===n)break;i=n+3}return t},mc.stripBlankChar=function(e){var t=e.split("");return(t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))}))).join("")},mc.cssFilter=Bc,mc.getDefaultCSSWhiteList=Mc;var tu={},iu=Lc;function ru(e){var t,i=iu.spaceIndex(e);return t=-1===i?e.slice(1,-1):e.slice(1,i+1),"/"===(t=iu.trim(t).toLowerCase()).slice(0,1)&&(t=t.slice(1)),"/"===t.slice(-1)&&(t=t.slice(0,-1)),t}function nu(e){return"</"===e.slice(0,2)}var ou=/[^a-zA-Z0-9\\_:.-]/gim;function au(e,t){for(;t<e.length;t++){var i=e[t];if(" "!==i)return"="===i?t:-1}}function su(e,t){for(;t<e.length;t++){var i=e[t];if(" "!==i)return"'"===i||'"'===i?t:-1}}function cu(e,t){for(;t>0;t--){var i=e[t];if(" "!==i)return"="===i?t:-1}}function uu(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}tu.parseTag=function(e,t,i){var r="",n=0,o=!1,a=!1,s=0,c=e.length,u="",l="";e:for(s=0;s<c;s++){var d=e.charAt(s);if(!1===o){if("<"===d){o=s;continue}}else if(!1===a){if("<"===d){r+=i(e.slice(n,s)),o=s,n=s;continue}if(">"===d){r+=i(e.slice(n,o)),u=ru(l=e.slice(o,s+1)),r+=t(o,r.length,u,l,nu(l)),n=s+1,o=!1;continue}if('"'===d||"'"===d)for(var p=1,h=e.charAt(s-p);""===h.trim()||"="===h;){if("="===h){a=d;continue e}h=e.charAt(s-++p)}}else if(d===a){a=!1;continue}}return n<e.length&&(r+=i(e.substr(n))),r},tu.parseAttr=function(e,t){var i=0,r=0,n=[],o=!1,a=e.length;function s(e,i){if(!((e=(e=iu.trim(e)).replace(ou,"").toLowerCase()).length<1)){var r=t(e,i||"");r&&n.push(r)}}for(var c=0;c<a;c++){var u,l=e.charAt(c);if(!1!==o||"="!==l)if(!1===o||c!==r)if(/\s|\n|\t/.test(l)){if(e=e.replace(/\s|\n|\t/g," "),!1===o){if(-1===(u=au(e,c))){s(iu.trim(e.slice(i,c))),o=!1,i=c+1;continue}c=u-1;continue}if(-1===(u=cu(e,c-1))){s(o,uu(iu.trim(e.slice(i,c)))),o=!1,i=c+1;continue}}else;else{if(-1===(u=e.indexOf(l,c+1)))break;s(o,iu.trim(e.slice(r+1,u))),o=!1,i=(c=u)+1}else o=e.slice(i,c),i=c+1,r='"'===e.charAt(i)||"'"===e.charAt(i)?i:su(e,c+1)}return i<e.length&&(!1===o?s(e.slice(i)):s(o,uu(iu.trim(e.slice(i))))),iu.trim(n.join(" "))};var lu=Ic.FilterCSS,du=mc,pu=tu,hu=pu.parseTag,fu=pu.parseAttr,gu=Lc;function bu(e){return null==e}function mu(e){(e=function(e){var t={};for(var i in e)t[i]=e[i];return t}(e||{})).stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=du.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=function(e){var t={};for(var i in e)Array.isArray(e[i])?t[i.toLowerCase()]=e[i].map((function(e){return e.toLowerCase()})):t[i.toLowerCase()]=e[i];return t}(e.whiteList||e.allowList):e.whiteList=du.whiteList,e.onTag=e.onTag||du.onTag,e.onTagAttr=e.onTagAttr||du.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||du.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||du.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||du.safeAttrValue,e.escapeHtml=e.escapeHtml||du.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new lu(e.css))}mu.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,i=t.whiteList,r=t.onTag,n=t.onIgnoreTag,o=t.onTagAttr,a=t.onIgnoreTagAttr,s=t.safeAttrValue,c=t.escapeHtml,u=this.cssFilter;t.stripBlankChar&&(e=du.stripBlankChar(e)),t.allowCommentTag||(e=du.stripCommentTag(e));var l=!1;t.stripIgnoreTagBody&&(l=du.StripTagBody(t.stripIgnoreTagBody,n),n=l.onIgnoreTag);var d=hu(e,(function(e,t,l,d,p){var h={sourcePosition:e,position:t,isClosing:p,isWhite:Object.prototype.hasOwnProperty.call(i,l)},f=r(l,d,h);if(!bu(f))return f;if(h.isWhite){if(h.isClosing)return"</"+l+">";var g=function(e){var t=gu.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var i="/"===(e=gu.trim(e.slice(t+1,-1)))[e.length-1];return i&&(e=gu.trim(e.slice(0,-1))),{html:e,closing:i}}(d),b=i[l],m=fu(g.html,(function(e,t){var i=-1!==gu.indexOf(b,e),r=o(l,e,t,i);return bu(r)?i?(t=s(l,e,t,u))?e+'="'+t+'"':e:bu(r=a(l,e,t,i))?void 0:r:r}));return d="<"+l,m&&(d+=" "+m),g.closing&&(d+=" /"),d+=">"}return bu(f=n(l,d,h))?c(d):f}),c);return l&&(d=l.remove(d)),d};var vu=mu;!function(e,t){var i=mc,r=tu,n=vu;function o(e,t){return new n(t).process(e)}(t=e.exports=o).filterXSS=o,t.FilterXSS=n,function(){for(var e in i)t[e]=i[e];for(var n in r)t[n]=r[n]}(),"undefined"!=typeof window&&(window.filterXSS=e.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=e.exports)}(bc,bc.exports);var yu=gc(bc.exports);const wu={...Tc.getDefaultWhiteList(),bottom:!0,left:!0,float:!0,overflow:!0,position:!0,right:!0,top:!0,transform:!0,opacity:!0,"transform-origin":!0,"flex-direction":!0,"flex-wrap":!0,"justify-content":!0,"align-items":!0,"white-space":!0,"line-height":!0,"grid-template-columns":!0,"grid-template-rows":!0,"grid-column":!0,"grid-row":!0,"grid-area":!0,"align-self":!0,"justify-self":!0,span:!0};var xu=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,ku=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,_u=/u\s*r\s*l\s*\(.*/gi;const Cu={whiteList:function(){const e=yu.getDefaultWhiteList();return Object.keys(e).forEach((t=>{e[t].push("style"),e[t].push("class"),e[t].push("download")})),e}(),css:!1,stripIgnoreTagBody:!0,onTagAttr:function(e,t,i,r){if("style"===t)return`${t}="${Tc(i,{whiteList:wu}).replace(/; /g,";")}"`;if("img"===e&&"src"===t&&function(e){return!!e.match(/^data:.+;base64,/)}(i)){const e=function(e){return e.split("base64,")[1]}(i);try{return atob(e),`${t}="${i}"`}catch(e){return t}}},safeAttrValue:function(e,t,i,r){if(i=yu.friendlyAttrValue(i),"href"===t||"src"===t){if("#"===(i=function(e){if(String.prototype.trim)return e.trim();return e.replace(/(^\s*)|(\s*$)/g,"")}(i)))return"#";if(!function(e){return["http://","https://","mailto:","tel:","data:","#","/"].some((t=>e.substr(0,t.length)===t))}(i))return""}else if("background"===t){if(xu.lastIndex=0,xu.test(i))return""}else if("style"===t){if(ku.lastIndex=0,ku.test(i))return"";if(_u.lastIndex=0,_u.test(i)&&(xu.lastIndex=0,xu.test(i)))return"";!1!==r&&(i=(r=r||yu.getDefaultCSSWhiteList()).process(i))}return i=yu.escapeAttrValue(i)}},Au=new yu.FilterXSS(Cu);function Eu(e){return Au.process(e)}const Su="en";var Pu={locale:Su};const Iu={en:{errors:{errorLabel:"Error",invalidBlockcerts:"Not a valid Blockcerts credential. Please check with the issuer or recipient that has provided this credential.",invalidBlockcertsUrl:"Not a valid credential URL.",invalidFormatDragAndDrop:"Only JSON files are accepted",invalidUrl:"This does not seem to be a valid URL.",noIssuerName:"No name provided",noMetadata:"No metadata specified for this record",noShareUrl:"No URL to share!",noTransactionId:"No transaction ID"},text:{brandName:"Blockcerts",blockcertsHint:"Visit Blockcerts website",by:"by",certified:"Certified by",closeButton:"Click to close",downloadLink:"Download Record in JSON format",downloadPDFLink:"Download Record in PDF Format",downloadPDFLinkIsLoading:"Generating PDF...",dragAndDropHint:"(you can also drag & drop your file).",fileUpload:"Choose JSON file",issued:"Issued on",issueDate:"Issue Date",issuerName:"Issuer",issuerPublicKey:"Issuer's public key",issuerProfileDomain:"Issuer's information",item:"Item",itemPlural:"Items",metadataButton:"View Metadata",metadataTitle:"Metadata",motto:"Blockcerts, The Open Standard for Blockchain Credentials",recipient:"Recipient",share:"Share on",shareButton:"Share on Social Networks",signatureSuiteType:"Digital signature type",signatureStatusSuccess:"This signature has been successfully verified",signatureStatusTestSuccess:"This signature has been successfully verified but has been issued on a test chain",signatureStatusFailure:"This signature yielded an error during verification",signed:"Signed by",substepsListClose:"Hide",substepsListHint:"Toggle open list of substeps",transactionId:"Transaction ID",urlInput:"Enter the certificate URL",urlInputPlaceholder:"Certificate URL",verificationStepProgress:"Verifying step...",verify:"Verify",verifyAgain:"Verify again",verifyOther:"Verify another record",viewRecord:"View Record"},date:{months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"],pattern:"MM DD, YYYY"},numbers:{ordinal:["th","st","nd","rd"]}},es:{errors:{errorLabel:"Error",invalidBlockcerts:"No es una credencial válida de Blockcerts. Verifique con el emisor o el destinatario que ha proporcionado esta credencial.",invalidBlockcertsUrl:"No es URL de certificado valido.",invalidFormatDragAndDrop:"Solo se aceptan archivos JSON",invalidUrl:"Esto no parece ser un URL válido.",noIssuerName:"No nombre comunicado",noMetadata:"No se han especificado metadatos para este registro",noShareUrl:"No hay URL para compartir!",noTransactionId:"No ID de transacción"},text:{brandName:"Blockcerts",blockcertsHint:"Visite el sitio web de Blockcerts",by:"por",certified:"Certificado por",closeButton:"Haz Click para cerrar",downloadLink:"Descarga el Registro en formato JSON",downloadPDFLink:"Descarga el Registro en formato PDF",downloadPDFLinkIsLoading:"Generando PDF...",dragAndDropHint:"(también puedes arrastrar y soltar tu archivo).",fileUpload:"Escoge archivo JSON",issued:"Emitido el",issueDate:"Fecha de Emisión",issuerName:"Emisor",issuerPublicKey:"Llave publica del Emisor",issuerProfileDomain:"Información del Emisor",item:"Elemento",itemPlural:"Elementos",metadataButton:"Ver Metadata",metadataTitle:"Metadata",motto:"Blockcerts, El Estándar Abierto para Credenciales Blockchain",recipient:"Recipiente",share:"Comparte en",shareButton:"Comparte en Redes Sociales",signatureSuiteType:"Tipo de firma digital",signed:"Firmado Por",signatureStatusSuccess:"La verificación de esta firma digital ha tenido éxito",signatureStatusTestSuccess:"La verificación de esta firma digital ha tenido éxito pero se utilizó una cadena de test",signatureStatusFailure:"Error en la verificación de esta firma digital",substepsListClose:"Esconde",substepsListHint:"Pasa lista abierta de sub-pasos",transactionId:"ID de Transacción",urlInput:"Ingrese el URL del certificado",urlInputPlaceholder:"Certificado del URL",verificationStepProgress:"Paso de verificación...",verify:"Verifica",verifyAgain:"Verifica nuevamente",verifyOther:"Verifica otro registro",viewRecord:"Ver Registro"},date:{months:["enero","feb","marzo","abr","mayo","jun","jul","agosto","set","oct","nov","dic"],pattern:"MM DD, YYYY"},numbers:{ordinal:"°"}},fr:{errors:{errorLabel:"Erreur",invalidBlockcerts:"Ceci n'est pas un certificat Blockcerts valide. Veuillez s'il vous plaît contrôler avec l'organisme émetteur ou le récipiendaire de ce certificat.",invalidBlockcertsUrl:"Ceci n'est pas une URL de certificat valide.",invalidFormatDragAndDrop:"Seul le format JSON est accepté",invalidUrl:"URL invalide",noIssuerName:"Pas de nom fourni",noMetadata:"Ce certificat ne contient pas de métadata",noShareUrl:"Pas d'URL à partager!",noTransactionId:"Pas d'identifiant de transaction"},text:{brandName:"Blockcerts",blockcertsHint:"Visiter le site de Blockcerts",by:"par",certified:"Certifié par",closeButton:"Cliquer pour fermer",downloadLink:"Télécharger le certificat au format JSON",downloadPDFLink:"Télécharger le certificat au format PDF",downloadPDFLinkIsLoading:"Création du PDF...",dragAndDropHint:"(vous pouvez aussi glisser et déposer votre fichier).",fileUpload:"Choisir un fichier JSON",issued:"Émis le",issueDate:"Date d'émission",issuerName:"Émetteur",issuerPublicKey:"Clé publique de l'émetteur",issuerProfileDomain:"Profil de l'émetteur",item:"point contrôlé",itemPlural:"points contrôlés",metadataButton:"Voir les métadata",metadataTitle:"Métadata",motto:"Blockcerts, The Open Standard for Blockchain Credentials",recipient:"Titulaire",share:"Partager sur",shareButton:"Partager sur les réseaux sociaux",signatureSuiteType:"Type de signature numérique",signed:"Signé par",signatureStatusSuccess:"Cette signature a été vérifiée avec succès",signatureStatusTestSuccess:"Cette signature a été vérifiée avec succès mais la blockchain utilisée est de test",signatureStatusFailure:"Erreur durant la vérification de cette signature",substepsListClose:"Fermer",substepsListHint:"Afficher les sous-étapes",transactionId:"Identifiant de transaction",urlInput:"Entrez l'URL du certificat",urlInputPlaceholder:"URL du certificat",verificationStepProgress:"Vérification en cours...",verify:"Vérifier",verifyAgain:"Vérifier de nouveau",verifyOther:"Vérifier un autre certificat",viewRecord:"Voir le certificat"},date:{months:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Aout","Sept","Oct","Nov","Déc"],pattern:"DD MM YYYY"},numbers:{ordinal:["ème","er"]}},it:{errors:{errorLabel:"Errore",invalidBlockcerts:"Non è una definizione valida di Blockcerts.",invalidBlockcertsUrl:"Non è un URL di certificato valido.",invalidFormatDragAndDrop:"Sono accettati solo file JSON",invalidUrl:"Questo non sembra essere un URL valido.",noIssuerName:"No name provided",noMetadata:"Nessun Metadata specificato per questo record",noShareUrl:"Non c'è un URL da condividere!",noTransactionId:"Nessun ID transazione"},text:{brandName:"Blockcerts",blockcertsHint:"Visita il sito Web Blockcerts",by:"da",certified:"Certificato da",closeButton:"Fai clic per chiudere",downloadLink:"Scarica il Record in formato JSON",downloadPDFLink:"Scarica il Record in formato JSON",downloadPDFLinkIsLoading:"Generazione PDF...",dragAndDropHint:"(puoi anche trascinare il file).",fileUpload:"Scegli il file JSON",issued:"Rilasciato il",issueDate:"Data",issuerName:"Organizzazione Issuer",issuerPublicKey:"Chiave pubblica del Issuer",issuerProfileDomain:"Informazzione del Issuer",item:"Elemento",itemPlural:"Elementi",metadataButton:"Visualizza Metadata",metadataTitle:"Metadata",motto:"Blockcerts, The Open Standard for Blockchain Credentials",recipient:"Titolare",share:"Condividi",shareButton:"Condividi sui Social Network",signed:"Firmato da",signatureStatusSuccess:"This signature has been successfully verified",signatureStatusTestSuccess:"This signature has been successfully verified but has been issued on a test chain",signatureStatusFailure:"This signature yielded an error during verification",signatureSuiteType:"Digital signature type",substepsListClose:"Nascondi",substepsListHint:"Mostra gli step secondari",transactionId:"ID transazione",urlInput:"Inserisci l'URL del certificato",urlInputPlaceholder:"URL del certificato",verificationStepProgress:"Step di verifica...",verify:"Verifica",verifyAgain:"Verifica di nuovo",verifyOther:"Verifica un altro record",viewRecord:"Visualizza il Record"},date:{months:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],pattern:"DD MM YYYY"},numbers:{ordinal:"°"}}};function Tu(){return Iu}function Lu(e,t,i,r){if(!e)return"";if(e.includes(".")){const i=e.split(".");e=i[0],t=i[1]}if(!t)return"";i&&r>1&&(t+="Plural");const n=Tu();return n[Pu.locale]?n[Pu.locale][e]?n[Pu.locale][e][t]?n[Pu.locale][e][t]||"":"[missing locale item data]":"[missing locale group data]":"[missing locale data]"}function Du(e){const t=Lu("date","pattern");"Z"===e.slice(-1)?e=e.slice(0,e.length-1):e.includes("+")&&(e=e.split("+")[0]);const i=new Date(e);let r=function(e,t){const i=Lu("date","months");return e.replace("MM",i[t])}(t,i.getMonth());return r=function(e,t){return e.replace("DD",t)}(r,i.getDate().toString(10)),r=function(e,t){return e.replace("YYYY",t)}(r,i.getFullYear().toString(10)),r}function Mu(e){return e.certificateDefinition}function Ou(e){const t=Mu(e);return t?t.signers:[]}function Ru(e){const t=Mu(e);return t?t.issuedOn:""}function Bu(e){return Mu(e)?Du(Ru(e)):""}function ju(e){const t=Mu(e);return t?t.recipientFullName:""}function Fu(e){const t=Mu(e);return t?t.name:""}function Nu(e){const t=Mu(e);return t?t.issuer.name:""}function zu(e){const t=Mu(e);return t?t.issuer.image:""}function Vu(e){const t=Mu(e);if(!t)return"";const{displayHtml:i}=t.certificateJson;if(i)return Eu(i);const r=t.display;if(r)switch(r.contentMediaType){case Qe.TEXT_HTML:return Eu(r.content);case Qe.IMAGE_PNG:case Qe.IMAGE_JPEG:case Qe.IMAGE_GIF:case Qe.IMAGE_BMP:return`<img src="data:${r.contentMediaType};${r.contentEncoding},${r.content}"/>`;case Qe.APPLICATION_PDF:return`<embed width="100%" height="100%" type="application/pdf" src="data:${r.contentMediaType};${r.contentEncoding},${r.content}"/>`;default:return""}return""}function $u(e){const t=Mu(e);return t&&lc(t.recordLink)?t.recordLink:""}function Uu(e){const t=$u(e);return t?fc.certificates.download(t):""}function Hu(e){const t=Mu(e);if(t)try{return JSON.parse(t.metadataJson)}catch(e){return null}return null}function qu(e){var t;const i=Ou(e);return 0===i.length?null!==(t=nl(e,"transactionLink"))&&void 0!==t?t:[]:i.map((e=>e.transactionLink))}function Ku(e){var t;const i=Ou(e);return 0===i.length?null!==(t=nl(e,"transactionId"))&&void 0!==t?t:[]:i.map((e=>e.transactionId))}function Ju(e){const t=Ou(e);if(0===t.length){const t=nl(e,"chain");return t?t.map((e=>null==e?void 0:e.name)):[]}return t.map((e=>{var t;return null===(t=e.chain)||void 0===t?void 0:t.name}))}function Gu(e){return Ju(e).some((e=>"Mocknet"===e||(null==e?void 0:e.includes("Testnet"))))}function Yu(e,t){const i=Ju(e)[t];return!!i&&("Mocknet"===i||i.includes("Testnet"))}function Wu(e){return e.verifiedSteps||[]}function Zu(e,t){return Wu(e).find((e=>e.code===t))}function Xu(e){return Wu(e).some((e=>e.status===Ns.FAILURE))}function Qu(e){return e.finalStep}function el(e){return Ou(e).map((e=>e.issuerPublicKey))}function tl(e){return Ou(e).map((e=>e.issuerProfileUrl))}function il(e){return Ou(e).map((e=>e.issuerProfileDomain))}function rl(e){return Ou(e).map((e=>e.signatureSuiteType))}function nl(e,t){const i=Mu(e);return i?[i[t]]:null}function ol(e){const t=Mu(e);return t?t.certificateImage:""}function al(e){const t=Mu(e);return t?t.subtitle:""}function sl(e){const t=Mu(e);return t?t.description:""}function cl(e){const t=Mu(e);return t?t.signatureImage:null}function ul(e){const t=Mu(e);return t?t.sealImage:""}function ll(e){return e.isGeneratingPDF}function dl(e,t){switch(t.type){case Ue:return function(e,t){const{resetSteps:i}=t.payload;return Object.assign(Object.assign({},e),{verifiedSteps:i})}(e,t);case je:return function(e,t){return Object.assign(Object.assign({},e),t.payload.options)}(e,t);case Fe:return function(e,t){return Object.assign(Object.assign(Object.assign({},e),t.payload),t.payload.certificateDefinition&&{verifiedSteps:fc.certificates.initializeVerificationSteps(t.payload.certificateDefinition)})}(e,t);case Ne:return function(e,t){return Object.assign(Object.assign({},e),{certificateDefinition:t.payload.definition})}(e,t);case ze:return function(e,t){return Object.assign(Object.assign({},e),{input:Object.assign(Object.assign({},e.input),{certificateUrl:t.payload.url})})}(e,t);case qe:return function(e,t){const{parentStepCode:i,status:r}=t.payload;return Zu(e,i).status=r,e}(e,t);case $e:return function(e,t){return Object.assign(Object.assign({},e),{input:Object.assign(Object.assign({},e.input),{isValid:t.payload.isValid})})}(e,t);case Ye:return function(e,t){const{errorMessage:i}=t.payload;return Object.assign(Object.assign({},e),{errorMessage:i})}(e,t);case We:return function(e,t){return Object.assign(Object.assign({},e),{showVerificationModal:t.payload.showVerificationModal})}(e,t);case He:return function(e,t){const{parentStep:i}=t.payload;return function(e,t){var i;let r=e.subSteps.findIndex((e=>e.code===t.code));r>-1?e.subSteps[r]=t:(null===(i=e.suites)||void 0===i?void 0:i.length)&&e.suites.forEach((e=>{r=e.subSteps.findIndex((e=>e.code===t.code)),r>-1&&(e.subSteps[r]=t)}))}(Zu(e,i),t.payload),e}(e,t);case Ke:return function(e,t){return Object.assign(Object.assign({},e),{verificationStatus:t.payload.status})}(e,t);case Je:return function(e,t){return Object.assign(Object.assign({},e),{finalStep:t.payload.finalStep})}(e,t);case Ze:return function(e,t){return Object.assign(Object.assign({},e),{isGeneratingPDF:t.payload.isGeneratingPDF})}(e,t);default:return e}}const pl="card";var hl,fl;!function(e){e.FULL="full",e.CARD="card",e.FULLSCREEN="fullscreen"}(hl||(hl={})),function(e){e.DARK="dark",e.BRIGHT="bright"}(fl||(fl={}));const gl=function(e=function(e={}){return Object.assign({input:{},verifiedSteps:[],finalStep:null,verificationStatus:Ns.DEFAULT,showVerificationModal:!1,displayMode:pl,disableDownloadPdf:!1,theme:fl.BRIGHT},e)}()){return Se(dl,e,Te(...[Me]))}();function bl(e,{mapDispatchToProps:t={},mapStateToProps:i=(()=>({})),ownProps:r={}}){return class extends(me(gl)(be)){mapDispatchToProps(){return function(e,t){if("function"==typeof e)return Pe(e,t);if("object"!=typeof e||null===e)throw new Error(_e(16));var i={};for(var r in e){var n=e[r];"function"==typeof n&&(i[r]=Pe(n,t))}return i}(t,gl.dispatch)}mapStateToProps(e){return i(gl.getState(),e)}static get properties(){return r}_render(t){const i=Object.assign(Object.assign(Object.assign({},this.mapDispatchToProps()),this.mapStateToProps(t)),t);return de`${e(i)}`}_stateChanged(e){this._requestRender()}}}function ml(e){return{type:Ye,payload:{errorMessage:e}}}const vl="certificate-load",yl="certificate-verify";function wl(e){return e.status===Ns.SUCCESS}function xl(e){return e.status===Ns.FAILURE}function kl(e){return function(t,i){if(null==e)return;const r=Zu(i(),e);let n=r.status;n===Ns.DEFAULT&&function(e){var t,i;let r=!0;return(null===(t=e.suites)||void 0===t?void 0:t.length)&&(r=null===(i=e.suites)||void 0===i?void 0:i.flatMap((e=>e.subSteps)).some(wl)),r||e.subSteps.some(wl)}(r)&&(n=Ns.STARTING),n!==Ns.DEFAULT&&function(e){var t,i;let r=!0;return(null===(t=e.suites)||void 0===t?void 0:t.length)&&(r=null===(i=e.suites)||void 0===i?void 0:i.flatMap((e=>e.subSteps)).every(wl)),r&&e.subSteps.every(wl)}(r)&&(n=Ns.SUCCESS),function(e){var t,i;let r=!1;return(null===(t=e.suites)||void 0===t?void 0:t.length)&&(r=null===(i=e.suites)||void 0===i?void 0:i.flatMap((e=>e.subSteps)).some(xl)),r||e.subSteps.some(xl)}(r)&&(n=Ns.FAILURE),t({type:qe,payload:{parentStepCode:e,status:n}})}}class _l{constructor(){this.queue=[],this.dispatchCb=null,this.isExecuting=!1,this.intervalId=0,this.dispatchNext=this.dispatchNext.bind(this)}registerCb(e){this.dispatchCb=e}push(e){e&&this.queue.push(e)}dispatchNext(){const e=this.queue.shift();e?this.dispatchCb(e):this.intervalId&&(this.isExecuting=!1,clearInterval(this.intervalId))}execute(){!this.isExecuting&&this.queue.length&&(this.isExecuting=!0,this.intervalId=setInterval(this.dispatchNext,200))}}const Cl=new _l;function Al(e){return function(t,i){const r=function(e){return function(t){e({type:He,payload:t}),e(kl(t.parentStep))}}(t);Cl.dispatchCb||Cl.registerCb(r),Cl.push(e),Cl.execute()}}function El(){return function(e,t){const i=Mu(t());let r=[];i&&(r=fc.certificates.initializeVerificationSteps(i)),e({type:Ue,payload:{resetSteps:r}})}}function Sl(e){return{type:Ke,payload:{status:e}}}function Pl(e){return e.disableVerify}function Il(e){return e.allowDownload}function Tl(e){return e.disableDownloadPdf}function Ll(e){return e.allowSocialShare}function Dl(e){return e.showMetadata}function Ml(e){return e.displayMode}function Ol(e){return e.theme}function Rl(e){return e.locale}function Bl(e){return e.explorerAPIs}function jl(e){return e.clickableUrls}function Fl(e){return e.didResolverUrl}function Nl(e){return"string"==typeof e&&(e={label:e,description:""}),{type:Je,payload:{finalStep:e}}}function zl(){return function(e,t){return uc(this,void 0,void 0,(function*(){const i=t();if(Pl(i))return void console.warn("Verification is disabled");e({type:Ve}),e(Sl(Ns.STARTING)),e(El());const r=Mu(i);if(r){fc.events.dispatch(yl,r);const t=yield r.verify((t=>{e(Al(t))}));e(Nl(t.message)),e(Sl(t.status))}}))}}function Vl(e){return{type:We,payload:{showVerificationModal:e}}}function $l(e){return function(t,i){return uc(this,void 0,void 0,(function*(){const r=i(),n={locale:Rl(r),explorerAPIs:Bl(r),didResolverUrl:Fl(r)},{certificateDefinition:o,errorMessage:a}=yield fc.certificates.parse(e,n);t(ml(a)),t({type:Fe,payload:{certificateDefinition:o}}),fc.events.dispatch(vl,o),null!=o&&(yield t((function(e,t){return uc(this,void 0,void 0,(function*(){(function(e){return e.disableAutoVerify})(t())||(e({type:Be}),e(Vl(!0))),yield e(zl())}))})))}))}}function Ul(e){return function(t){return uc(this,void 0,void 0,(function*(){const i=fc.certificates.isPathToCertificateValidURI(e);var r;if(t((r=i,function(e){e({type:$e,payload:{isValid:r}}),e(ml(r?null:"errors.invalidUrl"))})),!i)return null;t({type:ze,payload:{url:e}});const n=yield fc.certificates.retrieve(e);n.certificateDefinition?yield t($l(n.certificateDefinition)):t(ml(n.errorMessage))}))}}const Hl=/(-\w)/g,ql=e=>e[1].toUpperCase();const Kl={src:String,"disable-auto-verify":Boolean,"disable-verify":Boolean,"allow-download":Boolean,"disable-download-pdf":Boolean,"allow-social-share":Boolean,"display-mode":String,"show-metadata":Boolean,"clickable-urls":Boolean,theme:fl,locale:String,explorerAPIs:{},"did-resolver-url":String},Jl=Object.keys(Kl).map((function(e){return e.replace(Hl,ql)})).reduce(((e,t)=>(e[t]=Kl[t],e)),{});function Gl(e){let t;const i=Object.keys(Iu).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=Su),function(e){const t=e.split("-");return t.length>1?`${t[0].toLowerCase()}-${t[1].toUpperCase()}`:t[0].toLowerCase()}(e)}function Yl(e){"auto"!==e&&e||(e=navigator.language||navigator.userLanguage||navigator.browserLanguage||Su),Pu.locale=Gl(e)}var Wl=de`<style>.buv-c-input{font-size:15px;color:#031532;border-radius:2px 0 0 2px;padding:12px 15px;background-color:#f3f4f5;border:solid 1px rgba(3,21,50,.13);box-sizing:border-box;width:100%}.buv-c-input.is-invalid{border:2px solid red}.buv-c-input::-moz-placeholder{font-family:"Open Sans",-apple-system,BlinkMacSystemFont,sans-serif;color:rgba(3,21,50,.3);letter-spacing:-0.25px}.buv-c-input::-webkit-input-placeholder{font-family:"Open Sans",-apple-system,BlinkMacSystemFont,sans-serif;color:rgba(3,21,50,.3);letter-spacing:-0.25px}.buv-c-input:-moz-placeholder{font-family:"Open Sans",-apple-system,BlinkMacSystemFont,sans-serif;color:rgba(3,21,50,.3);letter-spacing:-0.25px}.buv-c-input:-ms-input-placeholder{font-family:"Open Sans",-apple-system,BlinkMacSystemFont,sans-serif;color:rgba(3,21,50,.3);letter-spacing:-0.25px}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}</style>`;function Zl(e){return void 0===e.input.isValid||e.input.isValid}const Xl=bl((({onInput:e=(()=>{}),isValid:t=!0}={})=>{const i="buv-c-input "+(t?"":"is-invalid");return de`
122
122
  ${Wl}
123
123
  <label
124
124
  for='certificate-json-url'
@@ -144,7 +144,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
144
144
  ${nd}
145
145
  <a class$='${n}' href='${e}' title$='${r}'>
146
146
  <span class$='${i?"buv-o-button-link__label":"buv-u-visually-hidden"}'>${r}</span>
147
- </a>`}),{mapStateToProps:e=>({downloadLink:Uu(e)}),ownProps:{display:String}});window.customElements.define("buv-download-link",od);var ad=de`<style>.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-button-link{display:block;cursor:pointer;border:0;background-color:rgba(0,0,0,0)}.buv-o-button-link__label{display:block;font-size:13px;cursor:pointer}.buv-o-button-link.is-disabled,.buv-o-button-link:disabled{cursor:help;opacity:.6}.buv-c-download-pdf-link{padding:0;color:#2ab27b}.buv-c-download-pdf-link__icon{background-image:url('data:image/svg+xml,%3Csvg data-bx-workspace="master" xmlns="http://www.w3.org/2000/svg" xmlns:bx="https://boxy-svg.com" version="1.1" fill="%236e7e8e" id="Capa_1" x="0px" y="0px" width="550.801px" height="550.801px" viewBox="0 0 550.801 550.801"%3E%3Cg style="" transform="matrix(0.855886, 0, 0, 0.855886, 39.688637, 39.689045)"%3E%3Cpath d="M160.381,282.225c0-14.832-10.299-23.684-28.474-23.684c-7.414,0-12.437,0.715-15.071,1.432V307.6 c3.114,0.707,6.942,0.949,12.192,0.949C148.419,308.549,160.381,298.74,160.381,282.225z"%3E%3C/path%3E%3Cpath d="M272.875,259.019c-8.145,0-13.397,0.717-16.519,1.435v105.523c3.116,0.729,8.142,0.729,12.69,0.729 c33.017,0.231,54.554-17.946,54.554-56.474C323.842,276.719,304.215,259.019,272.875,259.019z"%3E%3C/path%3E%3Cpath d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M362.359,309.023c0,30.876-11.243,52.165-26.82,65.333 c-16.971,14.117-42.82,20.814-74.396,20.814c-18.9,0-32.297-1.197-41.401-2.389V234.365c13.399-2.149,30.878-3.346,49.304-3.346 c30.612,0,50.478,5.508,66.039,17.226C351.828,260.69,362.359,280.547,362.359,309.023z M80.7,393.499V234.365 c11.241-1.904,27.042-3.346,49.296-3.346c22.491,0,38.527,4.308,49.291,12.928c10.292,8.131,17.215,21.534,17.215,37.328 c0,15.799-5.25,29.198-14.829,38.285c-12.442,11.728-30.865,16.996-52.407,16.996c-4.778,0-9.1-0.243-12.435-0.723v57.67H80.7 V393.499z M453.601,523.353H97.2V419.302h356.4V523.353z M484.898,262.127h-61.989v36.851h57.913v29.674h-57.913v64.848h-36.593 V232.216h98.582V262.127z"%3E%3C/path%3E%3C/g%3E%3C/svg%3E');width:25px;height:25px;background-size:25px}.buv-c-download-pdf-link__label--loading{display:none}.buv-c-download-pdf-link--loading{pointer-events:none}.buv-c-download-pdf-link--loading.buv-c-download-pdf-link__icon{background-image:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin:auto;background:transparent;display:block;" width="25px" height="25px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"%3E%3Ccircle cx="50" cy="50" fill="none" stroke="%23999999" stroke-width="7" r="35" stroke-dasharray="164.93361431346415 56.97787143782138"%3E%3CanimateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"%3E%3C/animateTransform%3E%3C/circle%3E%3C/svg%3E')}.buv-c-download-pdf-link--loading .buv-c-download-pdf-link__label{color:#999}.buv-c-download-pdf-link--loading .buv-c-download-pdf-link__label--static{display:none}.buv-c-download-pdf-link--loading .buv-c-download-pdf-link__label--loading{display:block}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}</style>`;function sd(e){return{type:Ze,payload:{isGeneratingPDF:e}}}const cd={onClick:function(){return function(e,t){return uc(this,void 0,void 0,(function*(){const i=t(),{default:r}=yield import("./downloadPDF-3eae8dbd.js").then((function(e){return e.d})),n=function(e){var t;const i=Mu(e);return i?"displayHtml"in i.certificateJson?Qe.TEXT_HTML:null===(t=i.display)||void 0===t?void 0:t.contentMediaType:null}(i),o=function(e){var t;const i=Mu(e);return i?"displayHtml"in i.certificateJson?"":null===(t=i.display)||void 0===t?void 0:t.contentEncoding:""}(i),a=function(e){var t,i;const r=Mu(e);return r?"displayHtml"in r.certificateJson?r.certificateJson.displayHtml:null!==(i=null===(t=r.display)||void 0===t?void 0:t.content)&&void 0!==i?i:"":""}(i),s=ju(i),c=Fu(i),u=Bu(i),l=Nu(i),d=zu(i),p=$u(i),h=el(i),f=tl(i),g=il(i);e(sd(!0)),yield r({contentType:n,contentEncoding:o,content:a,recipientName:s,certificateTitle:c,issueDate:u,issuerName:l,issuerLogo:d,recordLink:p,issuerPublicKey:h,issuerProfileUrl:f,issuerProfileDomain:g}),e(sd(!1))}))}}},ud=bl((function({display:e="plaintext",isGeneratingPDF:t=!1,onClick:i=(()=>{}),isVisible:r=!0}={display:"plaintext",isGeneratingPDF:!1,onClick:()=>{},isVisible:!0}){if(!r)return null;const n="plaintext"===e,o=Lu("text.downloadPDFLink"),a=Lu("text.downloadPDFLinkIsLoading"),s=["buv-o-button-link","buv-c-download-pdf-link","buv-js-download-pdf-link",n?"":"buv-c-download-pdf-link__icon",t?"buv-c-download-pdf-link--loading":""].join(" ");return de`
147
+ </a>`}),{mapStateToProps:e=>({downloadLink:Uu(e)}),ownProps:{display:String}});window.customElements.define("buv-download-link",od);var ad=de`<style>.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-button-link{display:block;cursor:pointer;border:0;background-color:rgba(0,0,0,0)}.buv-o-button-link__label{display:block;font-size:13px;cursor:pointer}.buv-o-button-link.is-disabled,.buv-o-button-link:disabled{cursor:help;opacity:.6}.buv-c-download-pdf-link{padding:0;color:#2ab27b}.buv-c-download-pdf-link__icon{background-image:url('data:image/svg+xml,%3Csvg data-bx-workspace="master" xmlns="http://www.w3.org/2000/svg" xmlns:bx="https://boxy-svg.com" version="1.1" fill="%236e7e8e" id="Capa_1" x="0px" y="0px" width="550.801px" height="550.801px" viewBox="0 0 550.801 550.801"%3E%3Cg style="" transform="matrix(0.855886, 0, 0, 0.855886, 39.688637, 39.689045)"%3E%3Cpath d="M160.381,282.225c0-14.832-10.299-23.684-28.474-23.684c-7.414,0-12.437,0.715-15.071,1.432V307.6 c3.114,0.707,6.942,0.949,12.192,0.949C148.419,308.549,160.381,298.74,160.381,282.225z"%3E%3C/path%3E%3Cpath d="M272.875,259.019c-8.145,0-13.397,0.717-16.519,1.435v105.523c3.116,0.729,8.142,0.729,12.69,0.729 c33.017,0.231,54.554-17.946,54.554-56.474C323.842,276.719,304.215,259.019,272.875,259.019z"%3E%3C/path%3E%3Cpath d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M362.359,309.023c0,30.876-11.243,52.165-26.82,65.333 c-16.971,14.117-42.82,20.814-74.396,20.814c-18.9,0-32.297-1.197-41.401-2.389V234.365c13.399-2.149,30.878-3.346,49.304-3.346 c30.612,0,50.478,5.508,66.039,17.226C351.828,260.69,362.359,280.547,362.359,309.023z M80.7,393.499V234.365 c11.241-1.904,27.042-3.346,49.296-3.346c22.491,0,38.527,4.308,49.291,12.928c10.292,8.131,17.215,21.534,17.215,37.328 c0,15.799-5.25,29.198-14.829,38.285c-12.442,11.728-30.865,16.996-52.407,16.996c-4.778,0-9.1-0.243-12.435-0.723v57.67H80.7 V393.499z M453.601,523.353H97.2V419.302h356.4V523.353z M484.898,262.127h-61.989v36.851h57.913v29.674h-57.913v64.848h-36.593 V232.216h98.582V262.127z"%3E%3C/path%3E%3C/g%3E%3C/svg%3E');width:25px;height:25px;background-size:25px}.buv-c-download-pdf-link__label--loading{display:none}.buv-c-download-pdf-link--loading{pointer-events:none}.buv-c-download-pdf-link--loading.buv-c-download-pdf-link__icon{background-image:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin:auto;background:transparent;display:block;" width="25px" height="25px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"%3E%3Ccircle cx="50" cy="50" fill="none" stroke="%23999999" stroke-width="7" r="35" stroke-dasharray="164.93361431346415 56.97787143782138"%3E%3CanimateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"%3E%3C/animateTransform%3E%3C/circle%3E%3C/svg%3E')}.buv-c-download-pdf-link--loading .buv-c-download-pdf-link__label{color:#999}.buv-c-download-pdf-link--loading .buv-c-download-pdf-link__label--static{display:none}.buv-c-download-pdf-link--loading .buv-c-download-pdf-link__label--loading{display:block}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}</style>`;function sd(e){return{type:Ze,payload:{isGeneratingPDF:e}}}const cd={onClick:function(){return function(e,t){return uc(this,void 0,void 0,(function*(){const i=t(),{default:r}=yield import("./downloadPDF-e769d8ac.js").then((function(e){return e.d})),n=function(e){var t;const i=Mu(e);return i?"displayHtml"in i.certificateJson?Qe.TEXT_HTML:null===(t=i.display)||void 0===t?void 0:t.contentMediaType:null}(i),o=function(e){var t;const i=Mu(e);return i?"displayHtml"in i.certificateJson?"":null===(t=i.display)||void 0===t?void 0:t.contentEncoding:""}(i),a=function(e){var t,i;const r=Mu(e);return r?"displayHtml"in r.certificateJson?r.certificateJson.displayHtml:null!==(i=null===(t=r.display)||void 0===t?void 0:t.content)&&void 0!==i?i:"":""}(i),s=ju(i),c=Fu(i),u=Bu(i),l=Nu(i),d=zu(i),p=$u(i),h=el(i),f=tl(i),g=il(i);e(sd(!0)),yield r({contentType:n,contentEncoding:o,content:a,recipientName:s,certificateTitle:c,issueDate:u,issuerName:l,issuerLogo:d,recordLink:p,issuerPublicKey:h,issuerProfileUrl:f,issuerProfileDomain:g}),e(sd(!1))}))}}},ud=bl((function({display:e="plaintext",isGeneratingPDF:t=!1,onClick:i=(()=>{}),isVisible:r=!0}={display:"plaintext",isGeneratingPDF:!1,onClick:()=>{},isVisible:!0}){if(!r)return null;const n="plaintext"===e,o=Lu("text.downloadPDFLink"),a=Lu("text.downloadPDFLinkIsLoading"),s=["buv-o-button-link","buv-c-download-pdf-link","buv-js-download-pdf-link",n?"":"buv-c-download-pdf-link__icon",t?"buv-c-download-pdf-link--loading":""].join(" ");return de`
148
148
  ${ad}
149
149
  <button onclick='${i}'
150
150
  class$='${s}'