@reclaimprotocol/browser-extension-sdk
Version:
This guide will walk you through integrating the Reclaim Protocol Browser Extension SDK into your own browser extension or web application. It covers installation, manifest configuration, background initialization, content script setup, and how to trigg
10 lines • 55.3 kB
JavaScript
var t={251:(t,e)=>{
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
e.read=function(t,e,r,n,o){var i,u,f=8*o-n-1,s=(1<<f)-1,a=s>>1,c=-7,l=r?o-1:0,h=r?-1:1,p=t[e+l];for(l+=h,i=p&(1<<-c)-1,p>>=-c,c+=f;c>0;i=256*i+t[e+l],l+=h,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+t[e+l],l+=h,c-=8);if(0===i)i=1-a;else{if(i===s)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),i-=a}return(p?-1:1)*u*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var u,f,s,a=8*i-o-1,c=(1<<a)-1,l=c>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,y=n?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,u=c):(u=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-u))<1&&(u--,s*=2),(e+=u+l>=1?h/s:h*Math.pow(2,1-l))*s>=2&&(u++,s/=2),u+l>=c?(f=0,u=c):u+l>=1?(f=(e*s-1)*Math.pow(2,o),u+=l):(f=e*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;t[r+p]=255&f,p+=y,f/=256,o-=8);for(u=u<<o|f,a+=o;a>0;t[r+p]=255&u,p+=y,u/=256,a-=8);t[r+p-y]|=128*d}},287:(t,e,r)=>{
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
const n=r(526),o=r(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=s,e.IS=50;const u=2147483647;function f(t){if(t>u)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return a(t,e,r)}function a(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|d(t,e);let n=f(r);const o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return s.from(n,e,r);const o=function(t){if(s.isBuffer(t)){const e=0|y(t.length),r=f(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||H(t.length)?f(0):h(t);if("Buffer"===t.type&&Array.isArray(t.data))return h(t.data)}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return c(t),f(t<0?0:0|y(t))}function h(t){const e=t.length<0?0:0|y(t.length),r=f(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,s.prototype),n}function y(t){if(t>=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(t).length;default:if(o)return n?-1:z(t).length;e=(""+e).toLowerCase(),o=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return B(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return _(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function E(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function w(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),H(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,o){let i,u=1,f=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;u=2,f/=2,s/=2,r/=2}function a(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}if(o){let n=-1;for(i=r;i<f;i++)if(a(t,i)===a(e,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===s)return n*u}else-1!==n&&(i-=i-n),n=-1}else for(r+s>f&&(r=f-s),i=r;i>=0;i--){let r=!0;for(let n=0;n<s;n++)if(a(t,i+n)!==a(e,n)){r=!1;break}if(r)return i}return-1}function m(t,e,r,n){r=Number(r)||0;const o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=e.length;let u;for(n>i/2&&(n=i/2),u=0;u<n;++u){const n=parseInt(e.substr(2*u,2),16);if(H(n))return u;t[r+u]=n}return u}function v(t,e,r,n){return Q(z(e,t.length-r),t,r,n)}function I(t,e,r,n){return Q(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function O(t,e,r,n){return Q(K(e),t,r,n)}function S(t,e,r,n){return Q(function(t,e){let r,n,o;const i=[];for(let u=0;u<t.length&&!((e-=2)<0);++u)r=t.charCodeAt(u),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);const n=[];let o=e;for(;o<r;){const e=t[o];let i=null,u=e>239?4:e>223?3:e>191?2:1;if(o+u<=r){let r,n,f,s;switch(u){case 1:e<128&&(i=e);break;case 2:r=t[o+1],128==(192&r)&&(s=(31&e)<<6|63&r,s>127&&(i=s));break;case 3:r=t[o+1],n=t[o+2],128==(192&r)&&128==(192&n)&&(s=(15&e)<<12|(63&r)<<6|63&n,s>2047&&(s<55296||s>57343)&&(i=s));break;case 4:r=t[o+1],n=t[o+2],f=t[o+3],128==(192&r)&&128==(192&n)&&128==(192&f)&&(s=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&f,s>65535&&s<1114112&&(i=s))}}null===i?(i=65533,u=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=u}return function(t){const e=t.length;if(e<=R)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=R));return r}(n)}s.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,r){return a(t,e,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,r){return function(t,e,r){return c(t),t<=0?f(t):void 0!==e?"string"==typeof r?f(t).fill(e,r):f(t).fill(e):f(t)}(t,e,r)},s.allocUnsafe=function(t){return l(t)},s.allocUnsafeSlow=function(t){return l(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).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}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=s.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(q(e,Uint8Array))o+e.length>n.length?(s.isBuffer(e)||(e=s.from(e)),e.copy(n,o)):Uint8Array.prototype.set.call(n,e,o);else{if(!s.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)E(this,e,e+1);return this},s.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)E(this,e,e+3),E(this,e+1,e+2);return this},s.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)E(this,e,e+7),E(this,e+1,e+6),E(this,e+2,e+5),E(this,e+3,e+4);return this},s.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):g.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){let t="";const r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(t,e,r,n,o){if(q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;let i=(o>>>=0)-(n>>>=0),u=(r>>>=0)-(e>>>=0);const f=Math.min(i,u),a=this.slice(n,o),c=t.slice(e,r);for(let t=0;t<f;++t)if(a[t]!==c[t]){i=a[t],u=c[t];break}return i<u?-1:u<i?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return w(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return w(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":case"latin1":case"binary":return I(this,t,e,r);case"base64":return O(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function L(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function _(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function B(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=e;n<r;++n)o+=J[t[n]];return o}function P(t,e,r){const n=t.slice(e,r);let o="";for(let t=0;t<n.length-1;t+=2)o+=String.fromCharCode(n[t]+256*n[t+1]);return o}function F(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,r,n,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function U(t,e,r,n,o){Y(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i;let u=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=u,u>>=8,t[r++]=u,u>>=8,t[r++]=u,u>>=8,t[r++]=u,r}function N(t,e,r,n,o){Y(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r+7]=i,i>>=8,t[r+6]=i,i>>=8,t[r+5]=i,i>>=8,t[r+4]=i;let u=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=u,u>>=8,t[r+2]=u,u>>=8,t[r+1]=u,u>>=8,t[r]=u,r+8}function k(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,r,n,i){return e=+e,r>>>=0,i||k(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,i){return e=+e,r>>>=0,i||k(t,0,r,8),o.write(t,e,r,n,52,8),r+8}s.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);let n=this[t+--e],o=1;for(;e>0&&(o*=256);)n+=this[t+--e]*o;return n},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||F(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||F(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||F(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||F(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||F(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=Z(function(t){W(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))}),s.prototype.readBigUInt64BE=Z(function(t){W(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)}),s.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);let n=e,o=1,i=this[t+--n];for(;n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return t>>>=0,e||F(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||F(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t>>>=0,e||F(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||F(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=Z(function(t){W(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),s.prototype.readBigInt64BE=Z(function(t){W(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)}),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||F(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||F(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||F(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||F(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){C(this,t,e,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){C(this,t,e,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=Z(function(t,e=0){return U(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Z(function(t,e=0){return N(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,t,e,r,n-1,-n)}let o=0,i=1,u=0;for(this[e]=255&t;++o<r&&(i*=256);)t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/i|0)-u&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,t,e,r,n-1,-n)}let o=r-1,i=1,u=0;for(this[e+o]=255&t;--o>=0&&(i*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/i|0)-u&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=Z(function(t,e=0){return U(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Z(function(t,e=0){return N(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const o=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),o},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{const i=s.isBuffer(t)?t:s.from(t,n),u=i.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=i[o%u]}return this};const x={};function M(t,e,r){x[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function G(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Y(t,e,r,n,o,i){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let o;throw o=i>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new x.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){W(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||$(e,t.length-(r+1))}(n,o,i)}function W(t,e){if("number"!=typeof t)throw new x.ERR_INVALID_ARG_TYPE(e,"number",t)}function $(t,e,r){if(Math.floor(t)!==t)throw W(t,r),new x.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new x.ERR_BUFFER_OUT_OF_BOUNDS;throw new x.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}M("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),M("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),M("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=G(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=G(o)),o+="n"),n+=` It must be ${e}. Received ${o}`,n},RangeError);const V=/[^+/0-9A-Za-z-_]/g;function z(t,e){let r;e=e||1/0;const n=t.length;let o=null;const i=[];for(let u=0;u<n;++u){if(r=t.charCodeAt(u),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(u+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function K(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Q(t,e,r,n){let o;for(o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function H(t){return t!=t}const J=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)e[n+o]=t[r]+t[o]}return e}();function Z(t){return"undefined"==typeof BigInt?X:t}function X(){throw new Error("BigInt not supported")}},296:(t,e,r)=>{r.r(e),r.d(e,{WebSocket:()=>y,default:()=>d});var n,o=r(856);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function s(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}function c(t,e,r){return e=h(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(l=function(){return!!t})()}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}(t=r.hmd(t),"undefined"==typeof window)?(n=function(){return s(function t(e,r){var n=this;u(this,t),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Creating mock WebSocket for background context"),this.url=e,this.protocols=r,this.readyState=3,setTimeout(function(){"function"==typeof n.onclose&&n.onclose({code:1e3,reason:"WebSockets not supported in background context"})},0)},[{key:"send",value:function(){throw o.w9.warn(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Cannot use WebSockets in background context"),new Error("WebSockets are not available in background context")}},{key:"close",value:function(){}},{key:"sendPromise",value:function(){return Promise.reject(new Error("WebSockets are not available in background context"))}},{key:"addEventListener",value:function(){}},{key:"removeEventListener",value:function(){}}])}(),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Using mock WebSocket implementation for background context")):(n=function(t){function e(t,r){var n;return u(this,e),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Creating WebSocket with URL:",t),(n=c(this,e,[t,r])).addEventListener("error",function(t){"function"==typeof n.onerror&&n.onerror(t)}),n.addEventListener("open",function(t){"function"==typeof n.onopen&&n.onopen(t)}),n.addEventListener("close",function(t){"function"==typeof n.onclose&&n.onclose(t)}),n.addEventListener("message",function(t){"function"==typeof n.onmessage&&n.onmessage(t)}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),s(e,[{key:"sendPromise",value:function(t){var e=this;return new Promise(function(r,n){try{e.send(t),r()}catch(t){n(t)}})}}])}(window.WebSocket),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] Using browser WebSocket implementation"));var y=n;const d=n;t.exports&&(t.exports=n,t.exports.WebSocket=n,t.exports.default=n),o.w9.info(o.Ey.POLYFILLS,"[WEBSOCKET-POLYFILL] WebSocket polyfill initialized")},526:(t,e)=>{e.byteLength=function(t){var e=f(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=f(t),u=i[0],s=i[1],a=new o(function(t,e,r){return 3*(e+r)/4-r}(0,u,s)),c=0,l=s>0?u-4:u;for(r=0;r<l;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],a[c++]=e>>16&255,a[c++]=e>>8&255,a[c++]=255&e;2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,a[c++]=255&e);1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,a[c++]=e>>8&255,a[c++]=255&e);return a},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],u=16383,f=0,s=n-o;f<s;f+=u)i.push(a(t,f,f+u>s?s:f+u));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0;u<64;++u)r[u]=i[u],n[i.charCodeAt(u)]=u;function f(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function s(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function a(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(255&t[i+2]),o.push(s(n));return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},606:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var f,s=[],a=!1,c=-1;function l(){a&&f&&(a=!1,f.length?s=f.concat(s):c=-1,s.length&&h())}function h(){if(!a){var t=u(l);a=!0;for(var e=s.length;e;){for(f=s,s=[];++c<e;)f&&f[c].run();c=-1,e=s.length}f=null,a=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function y(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new p(t,e)),1!==s.length||a||u(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=y,n.addListener=y,n.once=y,n.off=y,n.removeListener=y,n.removeAllListeners=y,n.emit=y,n.prependListener=y,n.prependOnceListener=y,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},856:(t,e,r)=>{r.d(e,{Ey:()=>m,w9:()=>v});var n="https://logs.reclaimprotocol.org/api/business-logs/logDump";function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}var f=function(){function t(e){var r=e.sessionId,n=e.providerId,o=e.appId,i=e.logLine,u=e.type,f=e.time,s=void 0===f?null:f;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sessionId=r,this.providerId=n,this.appId=o,this.logLine=i,this.type=u,this.time=s||new Date}return e=t,n=[{key:"fromDateTimeToTimeStamp",value:function(t){return(1e6*t.getTime()).toString()}},{key:"fromError",value:function(e){var r=e.sessionId,n=e.providerId,o=e.appId,i=e.error,u=e.type,f=e.message,s=void 0===f?"":f,a=i.stack||"",c=i.message||i.toString();return new t({sessionId:r,providerId:n,appId:o,logLine:s?"".concat(s,": ").concat(c,"\n").concat(a):"".concat(c,"\n").concat(a),type:u,time:new Date})}}],(r=[{key:"toJson",value:function(){return{logLine:this.logLine,ts:t.fromDateTimeToTimeStamp(this.time),type:this.type,sessionId:this.sessionId,providerId:this.providerId,appId:this.appId}}}])&&i(e.prototype,r),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n}();function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof f?n:f,a=Object.create(s.prototype);return c(a,"_invoke",function(r,n,o){var i,f,s,a=0,c=o||[],l=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,r){return i=e,f=0,s=t,h.n=r,u}};function p(r,n){for(f=r,s=n,e=0;!l&&a&&!o&&e<c.length;e++){var o,i=c[e],p=h.p,y=i[2];r>3?(o=y===n)&&(s=i[(f=i[4])?5:(f=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=r<2&&p<i[1])?(f=0,h.v=n,h.n=i[1]):p<y&&(o=r<3||i[0]>n||n>y)&&(i[4]=r,i[5]=n,h.n=y,f=0))}if(o||r>1)return u;throw l=!0,n}return function(o,c,y){if(a>1)throw TypeError("Generator is already running");for(l&&1===c&&p(c,y),f=c,s=y;(e=f<2?t:s)||!l;){i||(f?f<3?(f>1&&(h.n=-1),p(f,s)):h.n=s:h.v=s);try{if(a=2,i){if(f||(o="next"),e=i[o]){if(!(e=e.call(i,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,f<2&&(f=0)}else 1===f&&(e=i.return)&&e.call(i),f<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),f=1);i=t}else if((e=(l=h.n<0)?s:r.call(n,h))!==u)break}catch(e){i=t,f=1,s=e}finally{a=1}}return{value:e,done:l}}}(r,o,i),!0),a}var u={};function f(){}function s(){}function l(){}e=Object.getPrototypeOf;var h=[][n]?e(e([][n]())):(c(e={},n,function(){return this}),e),p=l.prototype=f.prototype=Object.create(h);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,c(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return s.prototype=l,c(p,"constructor",l),c(l,"constructor",s),s.displayName="GeneratorFunction",c(l,o,"GeneratorFunction"),c(p),c(p,o,"Generator"),c(p,n,function(){return this}),c(p,"toString",function(){return"[object Generator]"}),(a=function(){return{w:i,m:y}})()}function c(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}c=function(t,e,r,n){function i(e,r){c(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},c(t,e,r,n)}function l(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function p(t,e,r,n,o,i,u){try{var f=t[i](u),s=f.value}catch(t){return void r(t)}f.done?e(s):Promise.resolve(s).then(n,o)}function y(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function u(t){p(i,n,o,u,f,"next",t)}function f(t){p(i,n,o,u,f,"throw",t)}u(void 0)})}}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,g(n.key),n)}}function g(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.logs=[],this.isSending=!1,this.maxBatchSize=20,this.flushInterval=5e3,this.flushIntervalId=null,this.startFlushInterval()},e=[{key:"startFlushInterval",value:function(){var t=this;this.flushIntervalId&&clearInterval(this.flushIntervalId),this.flushIntervalId=setInterval(function(){t.flush()},this.flushInterval)}},{key:"stopFlushInterval",value:function(){this.flushIntervalId&&(clearInterval(this.flushIntervalId),this.flushIntervalId=null)}},{key:"addLog",value:function(t){this.logs.push(t),this.logs.length>=this.maxBatchSize&&this.flush()}},{key:"log",value:function(t){var e=t.sessionId,r=t.providerId,n=t.appId,o=t.message,i=t.type,u=new f({sessionId:e,providerId:r,appId:n,logLine:o,type:i});this.addLog(u)}},{key:"logError",value:function(t){var e=t.sessionId,r=t.providerId,n=t.appId,o=t.error,i=t.type,u=t.message,s=f.fromError({sessionId:e,providerId:r,appId:n,error:o,type:i,message:u});this.addLog(s)}},{key:"flush",value:(u=y(a().m(function t(){var e,r;return a().w(function(t){for(;;)switch(t.p=t.n){case 0:if(0!==this.logs.length&&!this.isSending){t.n=1;break}return t.a(2);case 1:return e=l(this.logs),this.logs=[],t.p=2,this.isSending=!0,t.n=3,this.sendLogs(e);case 3:t.n=5;break;case 4:t.p=4,r=t.v,console.error("Error flushing logs:",r),this.logs=[].concat(l(this.logs),l(e));case 5:return t.p=5,this.isSending=!1,t.f(5);case 6:return t.a(2)}},t,this,[[2,4,5,6]])})),function(){return u.apply(this,arguments)})},{key:"getDeviceLoggingId",value:(i=y(a().m(function t(){var e;return a().w(function(t){for(;;)if(0===t.n)return e=crypto.randomUUID(),t.a(2,e)},t)})),function(){return i.apply(this,arguments)})},{key:"sendLogs",value:(o=y(a().m(function t(e){var r,o,i,u,f,s,c,l,h,p,y;return a().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,e&&0!==e.length){t.n=1;break}return t.a(2);case 1:return r=e.map(function(t){return t.toJson()}),u=JSON,f=r,t.n=2,this.getDeviceLoggingId();case 2:return s=t.v,c={logs:f,source:"reclaim-extension",deviceId:s},o=u.stringify.call(u,c),t.n=3,fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:o});case 3:if((i=t.v).ok){t.n=5;break}return l=console,h="Failed to send ".concat(e.length," logs [").concat(new Blob([o]).size," B] (batch ").concat(e.length,")"),t.n=4,i.text();case 4:p=t.v,l.error.call(l,h,p);case 5:t.n=7;break;case 6:t.p=6,y=t.v,console.error("Failed to send logs (batch ".concat(e.length,")"),y);case 7:return t.a(2)}},t,this,[[0,6]])})),function(t){return o.apply(this,arguments)})}],e&&d(t.prototype,e),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,o,i,u}());function E(t){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(t)}function w(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,b(n.key),n)}}function b(t){var e=function(t,e){if("object"!=E(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==E(e)?e:e+""}var m=Object.freeze({BACKGROUND:"background",CONTENT:"content",POPUP:"popup",INIT:"init",VERIFICATION:"verification",FETCH:"fetch",PROVIDER:"provider",CLAIM:"claim",PROOF:"proof",OFFSCREEN:"offscreen",POLYFILLS:"polyfills",SESSION_TIMER:"session-timer"}),v=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.enabled=!0,this.allowedTypes=new Set}return e=t,r=[{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"setTypes",value:function(t){Array.isArray(t)&&(this.allowedTypes=new Set(t))}},{key:"clearTypes",value:function(){this.allowedTypes.clear()}},{key:"log",value:function(e){var r;if(this.enabled&&(!(this.allowedTypes.size>0)||this.allowedTypes.has(e))){for(var n=t.typeColor(e),o=arguments.length,i=new Array(o>1?o-1:0),u=1;u<o;u++)i[u-1]=arguments[u];(r=console).log.apply(r,["%c[".concat(e,"][INFO]"),"color: ".concat(n,"; font-weight: bold;")].concat(i))}}},{key:"info",value:function(e){var r;if(this.enabled&&(!(this.allowedTypes.size>0)||this.allowedTypes.has(e))){for(var n=t.typeColor(e),o=arguments.length,i=new Array(o>1?o-1:0),u=1;u<o;u++)i[u-1]=arguments[u];(r=console).info.apply(r,["%c[".concat(e,"][INFO]"),"color: ".concat(n,"; font-weight: bold;")].concat(i))}}},{key:"warn",value:function(e){var r;if(this.enabled&&(!(this.allowedTypes.size>0)||this.allowedTypes.has(e))){for(var n=t.typeColor(e,"warn"),o=arguments.length,i=new Array(o>1?o-1:0),u=1;u<o;u++)i[u-1]=arguments[u];(r=console).warn.apply(r,["%c[".concat(e,"][WARN]"),"color: ".concat(n,"; font-weight: bold;")].concat(i))}}},{key:"error",value:function(e){var r;if(this.enabled&&(!(this.allowedTypes.size>0)||this.allowedTypes.has(e))){for(var n=t.typeColor(e,"error"),o=arguments.length,i=new Array(o>1?o-1:0),u=1;u<o;u++)i[u-1]=arguments[u];(r=console).error.apply(r,["%c[".concat(e,"][ERROR]"),"color: ".concat(n,"; font-weight: bold;")].concat(i))}}}],n=[{key:"typeColor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",r={background:"#0074D9",content:"#2ECC40",popup:"#FF851B",init:"#B10DC9",verification:"#FF4136",fetch:"#39CCCC",provider:"#FFDC00",claim:"#7FDBFF",proof:"#85144b",offscreen:"#AAAAAA",polyfills:"#0074D9","session-timer":"#2ECC40"},n=r[Object.keys(r).find(function(e){return t.toLowerCase().includes(e)})]||"#888888";return"info"!==e&&(n={info:"",warn:"#FFA500",error:"#FF0000"}[e]||n),n}}],r&&w(e.prototype,r),n&&w(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n}()),I=r(606);void 0!==I&&I.env?v.disable():v.enable()},952:(t,e,r)=>{r.d(e,{wx:()=>o,J_:()=>n});var n={CONTENT_SCRIPT:"content-script",BACKGROUND:"background",OFFSCREEN:"offscreen"},o={START_VERIFICATION:"START_VERIFICATION",CANCEL_VERIFICATION:"CANCEL_VERIFICATION",GENERATE_PROOF_REQUEST:"GENERATE_PROOF_REQUEST",CLAIM_CREATION_REQUESTED:"CLAIM_CREATION_REQUESTED",CLAIM_CREATION_SUCCESS:"CLAIM_CREATION_SUCCESS",CLAIM_CREATION_FAILED:"CLAIM_CREATION_FAILED",PROOF_GENERATION_STARTED:"PROOF_GENERATION_STARTED",PROOF_GENERATION_SUCCESS:"PROOF_GENERATION_SUCCESS",PROOF_GENERATION_FAILED:"PROOF_GENERATION_FAILED",PROOF_SUBMITTED:"PROOF_SUBMITTED",PROOF_SUBMISSION_FAILED:"PROOF_SUBMISSION_FAILED",GENERATE_PROOF:"GENERATE_PROOF",GENERATED_PROOF_RESPONSE:"GENERATED_PROOF_RESPONSE",GENERATE_CLAIM_ON_ATTESTOR:"GENERATE_CLAIM_ON_ATTESTOR",GET_PRIVATE_KEY:"GET_PRIVATE_KEY",GET_PRIVATE_KEY_RESPONSE:"GET_PRIVATE_KEY_RESPONSE",SHOW_PROVIDER_VERIFICATION_POPUP:"SHOW_PROVIDER_VERIFICATION_POPUP",OFFSCREEN_DOCUMENT_READY:"OFFSCREEN_DOCUMENT_READY",GENERATE_PROOF_RESPONSE:"GENERATE_PROOF_RESPONSE",PING_OFFSCREEN:"PING_OFFSCREEN",CLOSE_CURRENT_TAB:"CLOSE_CURRENT_TAB",GET_CURRENT_TAB_ID:"GET_CURRENT_TAB_ID",REQUEST_PROVIDER_DATA:"REQUEST_PROVIDER_DATA",PROVIDER_DATA_READY:"PROVIDER_DATA_READY",CONTENT_SCRIPT_LOADED:"CONTENT_SCRIPT_LOADED",SHOULD_INITIALIZE:"SHOULD_INITIALIZE",CHECK_IF_MANAGED_TAB:"CHECK_IF_MANAGED_TAB",FILTERED_REQUEST_FOUND:"FILTERED_REQUEST_FOUND",INTERCEPTED_REQUEST:"INTERCEPTED_REQUEST",INTERCEPTED_RESPONSE:"INTERCEPTED_RESPONSE"}},997:(t,e,r)=>{var n=r(287),o=r(606),i=r.n(o),u=r(856);function f(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var f=n&&n.prototype instanceof a?n:a,c=Object.create(f.prototype);return s(c,"_invoke",function(r,n,o){var i,f,s,a=0,c=o||[],l=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,r){return i=e,f=0,s=t,h.n=r,u}};function p(r,n){for(f=r,s=n,e=0;!l&&a&&!o&&e<c.length;e++){var o,i=c[e],p=h.p,y=i[2];r>3?(o=y===n)&&(s=i[(f=i[4])?5:(f=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=r<2&&p<i[1])?(f=0,h.v=n,h.n=i[1]):p<y&&(o=r<3||i[0]>n||n>y)&&(i[4]=r,i[5]=n,h.n=y,f=0))}if(o||r>1)return u;throw l=!0,n}return function(o,c,y){if(a>1)throw TypeError("Generator is already running");for(l&&1===c&&p(c,y),f=c,s=y;(e=f<2?t:s)||!l;){i||(f?f<3?(f>1&&(h.n=-1),p(f,s)):h.n=s:h.v=s);try{if(a=2,i){if(f||(o="next"),e=i[o]){if(!(e=e.call(i,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,f<2&&(f=0)}else 1===f&&(e=i.return)&&e.call(i),f<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),f=1);i=t}else if((e=(l=h.n<0)?s:r.call(n,h))!==u)break}catch(e){i=t,f=1,s=e}finally{a=1}}return{value:e,done:l}}}(r,o,i),!0),c}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var h=[][n]?e(e([][n]())):(s(e={},n,function(){return this}),e),p=l.prototype=a.prototype=Object.create(h);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,s(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return c.prototype=l,s(p,"constructor",l),s(l,"constructor",c),c.displayName="GeneratorFunction",s(l,o,"GeneratorFunction"),s(p),s(p,o,"Generator"),s(p,n,function(){return this}),s(p,"toString",function(){return"[object Generator]"}),(f=function(){return{w:i,m:y}})()}function s(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}s=function(t,e,r,n){function i(e,r){s(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},s(t,e,r,n)}function a(t,e,r,n,o,i,u){try{var f=t[i](u),s=f.value}catch(t){return void r(t)}f.done?e(s):Promise.resolve(s).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function u(t){a(i,n,o,u,f,"next",t)}function f(t){a(i,n,o,u,f,"throw",t)}u(void 0)})}}var l,h,p,y="undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==y?y:Function("return this")(),d="undefined"==typeof window,g="undefined"!=typeof document&&void 0!==document.contentType;if(y.Buffer=y.Buffer||n.hp,y.process=y.process||i(),void 0!==y.WebSocket||g)g?u.w9.info(u.Ey.POLYFILLS,"Skipping WebSocket in content script context"):u.w9.info(u.Ey.POLYFILLS,"Using native WebSocket implementation");else try{var E=r(296).WebSocket;y.WebSocket=E,u.w9.info(u.Ey.POLYFILLS,"WebSocket polyfill added to global")}catch(t){u.w9.warn(u.Ey.POLYFILLS,"Failed to load WebSocket polyfill:",t)}if(y.process&&(y.process.browser=!0),"function"!=typeof y.require)y.require=function(t){switch(t){case"ws":if(g)return u.w9.info(u.Ey.POLYFILLS,"Blocking ws module in content script"),{};try{return{WebSocket:r(296).WebSocket}}catch(t){return u.w9.warn(u.Ey.POLYFILLS,"Failed to load WebSocket for ws module:",t),{}}case"fs":return y.fs;case"path":return y.path;case"os":return y.os;case"crypto":return y.crypto;case"worker_