@matchain/matchid-sdk-react 0.1.53-alpha.2 → 0.1.53-alpha.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/assets/icon/index.d.mts +4 -2
- package/dist/assets/icon/index.d.ts +4 -2
- package/dist/assets/icon/index.js +19 -0
- package/dist/assets/icon/index.js.map +1 -1
- package/dist/assets/icon/index.mjs +3 -1
- package/dist/chunk-3CR66BEX.mjs +19 -0
- package/dist/chunk-3CR66BEX.mjs.map +1 -0
- package/dist/{chunk-LHNKZISB.mjs → chunk-3USZ4ZZY.mjs} +20 -2
- package/dist/chunk-3USZ4ZZY.mjs.map +1 -0
- package/dist/{chunk-4A2YPGO3.mjs → chunk-4J3KZCLG.mjs} +2 -2
- package/dist/{chunk-HYQ3T6WW.mjs → chunk-JX73EY6V.mjs} +2 -14
- package/dist/chunk-JX73EY6V.mjs.map +1 -0
- package/dist/{chunk-MX7N57AH.mjs → chunk-OCQ2AIM3.mjs} +7 -2
- package/dist/{chunk-MX7N57AH.mjs.map → chunk-OCQ2AIM3.mjs.map} +1 -1
- package/dist/{chunk-FB5MHLWX.mjs → chunk-V2S54LGG.mjs} +2 -2
- package/dist/{chunk-W5A6WY7Y.mjs → chunk-XXZZYALJ.mjs} +807 -191
- package/dist/chunk-XXZZYALJ.mjs.map +1 -0
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +1111 -442
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +7 -4
- package/dist/config/chains/index.mjs +2 -1
- package/dist/hooks/api/index.d.mts +2 -2
- package/dist/hooks/api/index.d.ts +2 -2
- package/dist/hooks/api/index.js +202 -88
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +6 -5
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +515 -401
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +5 -4
- package/dist/{index-IwwXQ_QV.d.ts → index-BaYTgL99.d.mts} +3 -2
- package/dist/{index-B8cUP7cH.d.ts → index-BhU3hF7y.d.ts} +2 -2
- package/dist/{index-iWHaT8HV.d.mts → index-Bpd2gBNh.d.mts} +1 -1
- package/dist/{index-Df-WlkXq.d.ts → index-C5StsjWY.d.ts} +11 -4
- package/dist/{index-BS-NO8Y2.d.ts → index-CFqk8eNo.d.ts} +12 -12
- package/dist/{index-BCGJczpk.d.mts → index-D1QeVZyN.d.ts} +3 -2
- package/dist/{index-DNJuiNdz.d.mts → index-D_UNctDI.d.mts} +11 -4
- package/dist/{index-BsL6zo6a.d.ts → index-DaXXoRxr.d.ts} +1 -1
- package/dist/{index-K5vXmiRX.d.ts → index-Dt92N6yZ.d.ts} +1 -1
- package/dist/{index-CZqdmQu1.d.mts → index-W6yjuOKT.d.mts} +1 -1
- package/dist/{index-Bil_db2f.d.mts → index-mxbJ8CFx.d.mts} +12 -12
- package/dist/{index-yy3VTdFU.d.mts → index-wqqEUufi.d.mts} +2 -2
- package/dist/index.css +3 -0
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1297 -680
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -11
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{types-CZbR7ERa.d.mts → types-Bx_FJ11s.d.mts} +2 -1
- package/dist/{types-CZbR7ERa.d.ts → types-Bx_FJ11s.d.ts} +2 -1
- package/dist/ui/index.d.mts +3 -3
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.js +62 -59
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +2 -2
- package/dist/utils/index.d.mts +2 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +3 -1
- package/example/dist/assets/ccip-nxE3Zma4.js +1 -0
- package/example/dist/assets/index-BFAv3rdU.css +1 -0
- package/example/dist/assets/index-DMWWRDPI.js +1658 -0
- package/example/dist/index.html +2 -2
- package/example/src/pages/User/index.tsx +7 -1
- package/package.json +2 -1
- package/dist/chunk-HYQ3T6WW.mjs.map +0 -1
- package/dist/chunk-LHNKZISB.mjs.map +0 -1
- package/dist/chunk-W5A6WY7Y.mjs.map +0 -1
- package/example/dist/assets/TransportWebHID-BEu7tC0r.js +0 -1
- package/example/dist/assets/bignumber-iG7K-qxw.js +0 -10
- package/example/dist/assets/ccip-a6wQ1Vcb.js +0 -1
- package/example/dist/assets/draggabilly-CRYR_S0q.js +0 -14
- package/example/dist/assets/index--dp9m9Ep.js +0 -1
- package/example/dist/assets/index-BDTHolFv.js +0 -569
- package/example/dist/assets/index-BZl59qLb.js +0 -179
- package/example/dist/assets/index-BmMbYNHO.js +0 -303
- package/example/dist/assets/index-C7cxVRDF.js +0 -1677
- package/example/dist/assets/index-CJk171Yb.js +0 -1
- package/example/dist/assets/index-CQiBesAa.js +0 -3
- package/example/dist/assets/index-D62loNA9.js +0 -3
- package/example/dist/assets/index-DqyX3FG6.js +0 -1
- package/example/dist/assets/index-Gy3FXGhr.css +0 -1
- package/example/dist/assets/inherits_browser-BlmhoU4v.js +0 -1
- package/example/dist/assets/solanaEmbed.esm-Djn-u4Vn.js +0 -38
- /package/dist/{chunk-4A2YPGO3.mjs.map → chunk-4J3KZCLG.mjs.map} +0 -0
- /package/dist/{chunk-FB5MHLWX.mjs.map → chunk-V2S54LGG.mjs.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as R,z as j,e as A,D as X,A as L,B as H,C as V,F as $}from"./index-C7cxVRDF.js";import{s as T}from"./index-CJk171Yb.js";var C={};const W=R(j);(function(i){i.__esModule=!0;var t=W,e=5;function n(c){var l=Buffer.alloc(2);return l.writeUInt16BE(c,0),l}var o={data:Buffer.alloc(0),dataLength:0,sequence:0},r=function(c,l){return{makeBlocks:function(u){var a=Buffer.concat([n(u.length),u]),s=l-5,d=Math.ceil(a.length/s);a=Buffer.concat([a,Buffer.alloc(d*s-a.length+1).fill(0)]);for(var h=[],v=0;v<d;v++){var p=Buffer.alloc(5);p.writeUInt16BE(c,0),p.writeUInt8(e,2),p.writeUInt16BE(v,3);var b=a.slice(v*s,(v+1)*s);h.push(Buffer.concat([p,b]))}return h},reduceResponse:function(u,a){var s=u||o,d=s.data,h=s.dataLength,v=s.sequence;if(a.readUInt16BE(0)!==c)throw new t.TransportError("Invalid channel","InvalidChannel");if(a.readUInt8(2)!==e)throw new t.TransportError("Invalid tag","InvalidTag");if(a.readUInt16BE(3)!==v)throw new t.TransportError("Invalid sequence","InvalidSequence");u||(h=a.readUInt16BE(5)),v++;var p=a.slice(u?5:7);return d=Buffer.concat([d,p]),d.length>h&&(d=d.slice(0,h)),{data:d,dataLength:h,sequence:v}},getReducedResult:function(u){if(u&&u.dataLength===u.data.length)return u.data}}};i.default=r})(C);const G=A(C);var U=function(){return U=Object.assign||function(i){for(var t,e=1,n=arguments.length;e<n;e++){t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o])}return i},U.apply(this,arguments)},y,f;(function(i){i.blue="blue",i.nanoS="nanoS",i.nanoSP="nanoSP",i.nanoX="nanoX",i.nanoFTS="nanoFTS"})(f||(f={}));var k=(y={},y[f.blue]={id:f.blue,productName:"Ledger Blue",productIdMM:0,legacyUsbProductId:0,usbOnly:!0,memorySize:480*1024,masks:[822083584,822149120],getBlockSize:function(i){return 4*1024}},y[f.nanoS]={id:f.nanoS,productName:"Ledger Nano S",productIdMM:16,legacyUsbProductId:1,usbOnly:!0,memorySize:320*1024,masks:[823132160],getBlockSize:function(i){var t;return T.lt((t=T.coerce(i))!==null&&t!==void 0?t:"","2.0.0")?4*1024:2*1024}},y[f.nanoSP]={id:f.nanoSP,productName:"Ledger Nano S Plus",productIdMM:80,legacyUsbProductId:5,usbOnly:!0,memorySize:1536*1024,masks:[856686592],getBlockSize:function(i){return 32}},y[f.nanoX]={id:f.nanoX,productName:"Ledger Nano X",productIdMM:64,legacyUsbProductId:4,usbOnly:!1,memorySize:2*1024*1024,masks:[855638016],getBlockSize:function(i){return 4*1024},bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}]},y[f.nanoFTS]={id:f.nanoFTS,productName:"Ledger Nano FTS",productIdMM:96,legacyUsbProductId:6,usbOnly:!1,memorySize:2*1024*1024,masks:[857735168],getBlockSize:function(i){return 4*1024},bluetoothSpec:[{serviceUuid:"13d63400-2c97-6004-0000-4c6564676572",notifyUuid:"13d63400-2c97-6004-0001-4c6564676572",writeUuid:"13d63400-2c97-6004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-6004-0003-4c6564676572"}]},y);f.blue,f.nanoS,f.nanoSP,f.nanoX,f.nanoFTS;var P=Object.values(k),F=11415,O=function(i){var t=P.find(function(o){return o.legacyUsbProductId===i});if(t)return t;var e=i>>8,n=P.find(function(o){return o.productIdMM===e});return n},K=[],M={};for(var J in k){var z=k[J],_=z.bluetoothSpec;if(_)for(var B=0;B<_.length;B++){var I=_[B];K.push(I.serviceUuid),M[I.serviceUuid]=M[I.serviceUuid.replace(/-/g,"")]=U({deviceModel:z},I)}}let Q=0;const w=[],N=(i,t,e)=>{const n={type:i,id:String(++Q),date:new Date};t&&(n.message=t),Z(n)},Y=i=>(w.push(i),()=>{const t=w.indexOf(i);t!==-1&&(w[t]=w[w.length-1],w.pop())});function Z(i){for(let t=0;t<w.length;t++)try{w[t](i)}catch(e){console.error(e)}}typeof window<"u"&&(window.__ledgerLogsListen=Y);var ee=function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),g=function(i,t,e,n){function o(r){return r instanceof e?r:new e(function(c){c(r)})}return new(e||(e=Promise))(function(r,c){function l(s){try{a(n.next(s))}catch(d){c(d)}}function u(s){try{a(n.throw(s))}catch(d){c(d)}}function a(s){s.done?r(s.value):o(s.value).then(l,u)}a((n=n.apply(i,t||[])).next())})},m=function(i,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(a){return function(s){return u([a,s])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,o&&(r=a[0]&2?o.return:a[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[a[0]&2,r.value]),a[0]){case 0:case 1:r=a;break;case 4:return e.label++,{value:a[1],done:!1};case 5:e.label++,o=a[1],a=[0];continue;case 7:a=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){e.label=a[1];break}if(a[0]===6&&e.label<r[1]){e.label=r[1],r=a;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(a);break}r[2]&&e.ops.pop(),e.trys.pop();continue}a=t.call(i,e)}catch(s){a=[6,s],o=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ne=function(i,t){var e=typeof Symbol=="function"&&i[Symbol.iterator];if(!e)return i;var n=e.call(i),o,r=[],c;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)r.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(c)throw c.error}}return r},te=[{vendorId:F}],re=function(){return Promise.resolve(!!(window.navigator&&window.navigator.hid))},x=function(){var i=navigator.hid;if(!i)throw new V("navigator.hid is not supported","HIDNotSupported");return i};function q(){return g(this,void 0,void 0,function(){var i;return m(this,function(t){switch(t.label){case 0:return[4,x().requestDevice({filters:te})];case 1:return i=t.sent(),Array.isArray(i)?[2,i]:[2,[i]]}})})}function D(){return g(this,void 0,void 0,function(){var i;return m(this,function(t){switch(t.label){case 0:return[4,x().getDevices()];case 1:return i=t.sent(),[2,i.filter(function(e){return e.vendorId===F})]}})})}function ie(){return g(this,void 0,void 0,function(){var i,t;return m(this,function(e){switch(e.label){case 0:return[4,D()];case 1:return i=e.sent(),i.length>0?[2,i[0]]:[4,q()];case 2:return t=e.sent(),[2,t[0]]}})})}var ue=function(i){ee(t,i);function t(e){var n=i.call(this)||this;return n.channel=Math.floor(Math.random()*65535),n.packetSize=64,n.inputs=[],n.read=function(){return n.inputs.length?Promise.resolve(n.inputs.shift()):new Promise(function(o){n.inputCallback=o})},n.onInputReport=function(o){var r=Buffer.from(o.data.buffer);n.inputCallback?(n.inputCallback(r),n.inputCallback=null):n.inputs.push(r)},n._disconnectEmitted=!1,n._emitDisconnect=function(o){n._disconnectEmitted||(n._disconnectEmitted=!0,n.emit("disconnect",o))},n.exchange=function(o){return g(n,void 0,void 0,function(){var r,c=this;return m(this,function(l){switch(l.label){case 0:return[4,this.exchangeAtomicImpl(function(){return g(c,void 0,void 0,function(){var u,a,s,d,h,v,p,b,E;return m(this,function(S){switch(S.label){case 0:u=this,a=u.channel,s=u.packetSize,N("apdu","=> "+o.toString("hex")),d=G(a,s),h=d.makeBlocks(o),v=0,S.label=1;case 1:return v<h.length?[4,this.device.sendReport(0,h[v])]:[3,4];case 2:S.sent(),S.label=3;case 3:return v++,[3,1];case 4:return(p=d.getReducedResult(b))?[3,6]:[4,this.read()];case 5:return E=S.sent(),b=d.reduceResponse(b,E),[3,4];case 6:return N("apdu","<= "+p.toString("hex")),[2,p]}})})}).catch(function(u){throw u&&u.message&&u.message.includes("write")?(c._emitDisconnect(u),new X(u.message)):u})];case 1:return r=l.sent(),[2,r]}})})},n.device=e,n.deviceModel=typeof e.productId=="number"?O(e.productId):void 0,e.addEventListener("inputreport",n.onInputReport),n}return t.request=function(){return g(this,void 0,void 0,function(){var e,n;return m(this,function(o){switch(o.label){case 0:return[4,q()];case 1:return e=ne.apply(void 0,[o.sent(),1]),n=e[0],[2,t.open(n)]}})})},t.openConnected=function(){return g(this,void 0,void 0,function(){var e;return m(this,function(n){switch(n.label){case 0:return[4,D()];case 1:return e=n.sent(),e.length===0?[2,null]:[2,t.open(e[0])]}})})},t.open=function(e){return g(this,void 0,void 0,function(){var n,o;return m(this,function(r){switch(r.label){case 0:return[4,e.open()];case 1:return r.sent(),n=new t(e),o=function(c){e===c.device&&(x().removeEventListener("disconnect",o),n._emitDisconnect(new $))},x().addEventListener("disconnect",o),[2,n]}})})},t.prototype.close=function(){return g(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return[4,this.exchangeBusyPromise];case 1:return e.sent(),this.device.removeEventListener("inputreport",this.onInputReport),[4,this.device.close()];case 2:return e.sent(),[2]}})})},t.prototype.setScrambleKey=function(){},t.isSupported=re,t.list=D,t.listen=function(e){var n=!1;ie().then(function(r){if(!r)e.error(new L("Access denied to use Ledger device"));else if(!n){var c=typeof r.productId=="number"?O(r.productId):void 0;e.next({type:"add",descriptor:r,deviceModel:c}),e.complete()}},function(r){e.error(new L(r.message))});function o(){n=!0}return{unsubscribe:o}},t}(H);export{ue as default};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{s as rt,c as Ur}from"./index-C7cxVRDF.js";import{i as tt}from"./inherits_browser-BlmhoU4v.js";var Re={},sr;function En(){if(sr)return Re;sr=1;var o=rt.Buffer,g=o.isEncoding||function(d){switch(d=""+d,d&&d.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 S(d){if(!d)return"utf8";for(var s;;)switch(d){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return d;default:if(s)return;d=(""+d).toLowerCase(),s=!0}}function b(d){var s=S(d);if(typeof s!="string"&&(o.isEncoding===g||!g(d)))throw new Error("Unknown encoding: "+d);return s||d}Re.StringDecoder=y;function y(d){this.encoding=b(d);var s;switch(this.encoding){case"utf16le":this.text=T,this.end=_,s=4;break;case"utf8":this.fillLast=E,s=4;break;case"base64":this.text=X,this.end=V,s=3;break;default:this.write=z,this.end=U;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=o.allocUnsafe(s)}y.prototype.write=function(d){if(d.length===0)return"";var s,N;if(this.lastNeed){if(s=this.fillLast(d),s===void 0)return"";N=this.lastNeed,this.lastNeed=0}else N=0;return N<d.length?s?s+this.text(d,N):this.text(d,N):s||""},y.prototype.end=C,y.prototype.text=F,y.prototype.fillLast=function(d){if(this.lastNeed<=d.length)return d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,d.length),this.lastNeed-=d.length};function B(d){return d<=127?0:d>>5===6?2:d>>4===14?3:d>>3===30?4:d>>6===2?-1:-2}function P(d,s,N){var W=s.length-1;if(W<N)return 0;var H=B(s[W]);return H>=0?(H>0&&(d.lastNeed=H-1),H):--W<N||H===-2?0:(H=B(s[W]),H>=0?(H>0&&(d.lastNeed=H-2),H):--W<N||H===-2?0:(H=B(s[W]),H>=0?(H>0&&(H===2?H=0:d.lastNeed=H-3),H):0))}function O(d,s,N){if((s[0]&192)!==128)return d.lastNeed=0,"�";if(d.lastNeed>1&&s.length>1){if((s[1]&192)!==128)return d.lastNeed=1,"�";if(d.lastNeed>2&&s.length>2&&(s[2]&192)!==128)return d.lastNeed=2,"�"}}function E(d){var s=this.lastTotal-this.lastNeed,N=O(this,d);if(N!==void 0)return N;if(this.lastNeed<=d.length)return d.copy(this.lastChar,s,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,s,0,d.length),this.lastNeed-=d.length}function F(d,s){var N=P(this,d,s);if(!this.lastNeed)return d.toString("utf8",s);this.lastTotal=N;var W=d.length-(N-this.lastNeed);return d.copy(this.lastChar,0,W),d.toString("utf8",s,W)}function C(d){var s=d&&d.length?this.write(d):"";return this.lastNeed?s+"�":s}function T(d,s){if((d.length-s)%2===0){var N=d.toString("utf16le",s);if(N){var W=N.charCodeAt(N.length-1);if(W>=55296&&W<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1],N.slice(0,-1)}return N}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=d[d.length-1],d.toString("utf16le",s,d.length-1)}function _(d){var s=d&&d.length?this.write(d):"";if(this.lastNeed){var N=this.lastTotal-this.lastNeed;return s+this.lastChar.toString("utf16le",0,N)}return s}function X(d,s){var N=(d.length-s)%3;return N===0?d.toString("base64",s):(this.lastNeed=3-N,this.lastTotal=3,N===1?this.lastChar[0]=d[d.length-1]:(this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1]),d.toString("base64",s,d.length-N))}function V(d){var s=d&&d.length?this.write(d):"";return this.lastNeed?s+this.lastChar.toString("base64",0,3-this.lastNeed):s}function z(d){return d.toString(this.encoding)}function U(d){return d&&d.length?this.write(d):""}return Re}var Ce={},De={},Mr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var g={},S=Symbol("test"),b=Object(S);if(typeof S=="string"||Object.prototype.toString.call(S)!=="[object Symbol]"||Object.prototype.toString.call(b)!=="[object Symbol]")return!1;var y=42;g[S]=y;for(var B in g)return!1;if(typeof Object.keys=="function"&&Object.keys(g).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(g).length!==0)return!1;var P=Object.getOwnPropertySymbols(g);if(P.length!==1||P[0]!==S||!Object.prototype.propertyIsEnumerable.call(g,S))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var O=Object.getOwnPropertyDescriptor(g,S);if(O.value!==y||O.enumerable!==!0)return!1}return!0},_e,ur;function ir(){if(ur)return _e;ur=1;var o=Mr;return _e=function(){return o()&&!!Symbol.toStringTag},_e}var nt=Object,it=Error,ot=EvalError,at=RangeError,ft=ReferenceError,kr=SyntaxError,Ie=TypeError,st=URIError,ut=Math.abs,lt=Math.floor,ct=Math.max,pt=Math.min,yt=Math.pow,ht=Object.getOwnPropertyDescriptor,Ne=ht;if(Ne)try{Ne([],"length")}catch{Ne=null}var Ae=Ne,Be=Object.defineProperty||!1;if(Be)try{Be({},"a",{value:1})}catch{Be=!1}var Fe=Be,$e,lr;function gt(){if(lr)return $e;lr=1;var o=typeof Symbol<"u"&&Symbol,g=Mr;return $e=function(){return typeof o!="function"||typeof Symbol!="function"||typeof o("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:g()},$e}var Ue,cr;function dt(){if(cr)return Ue;cr=1;var o="Function.prototype.bind called on incompatible ",g=Object.prototype.toString,S=Math.max,b="[object Function]",y=function(E,F){for(var C=[],T=0;T<E.length;T+=1)C[T]=E[T];for(var _=0;_<F.length;_+=1)C[_+E.length]=F[_];return C},B=function(E,F){for(var C=[],T=F,_=0;T<E.length;T+=1,_+=1)C[_]=E[T];return C},P=function(O,E){for(var F="",C=0;C<O.length;C+=1)F+=O[C],C+1<O.length&&(F+=E);return F};return Ue=function(E){var F=this;if(typeof F!="function"||g.apply(F)!==b)throw new TypeError(o+F);for(var C=B(arguments,1),T,_=function(){if(this instanceof T){var d=F.apply(this,y(C,arguments));return Object(d)===d?d:this}return F.apply(E,y(C,arguments))},X=S(0,F.length-C.length),V=[],z=0;z<X;z++)V[z]="$"+z;if(T=Function("binder","return function ("+P(V,",")+"){ return binder.apply(this,arguments); }")(_),F.prototype){var U=function(){};U.prototype=F.prototype,T.prototype=new U,U.prototype=null}return T},Ue}var Me,pr;function we(){if(pr)return Me;pr=1;var o=dt();return Me=Function.prototype.bind||o,Me}var ke,yr;function or(){return yr||(yr=1,ke=Function.prototype.call),ke}var Ge,hr;function ar(){return hr||(hr=1,Ge=Function.prototype.apply),Ge}var vt=typeof Reflect<"u"&&Reflect&&Reflect.apply,mt=we(),At=ar(),wt=or(),St=vt,Gr=St||mt.call(wt,At),bt=we(),Ot=Ie,Et=or(),Pt=Gr,fr=function(g){if(g.length<1||typeof g[0]!="function")throw new Ot("a function is required");return Pt(bt,Et,g)},qe,gr;function Nt(){if(gr)return qe;gr=1;var o=fr,g=Ae,S;try{S=[].__proto__===Array.prototype}catch(P){if(!P||typeof P!="object"||!("code"in P)||P.code!=="ERR_PROTO_ACCESS")throw P}var b=!!S&&g&&g(Object.prototype,"__proto__"),y=Object,B=y.getPrototypeOf;return qe=b&&typeof b.get=="function"?o([b.get]):typeof B=="function"?function(O){return B(O==null?O:y(O))}:!1,qe}var Le,dr;function Bt(){if(dr)return Le;dr=1;var o=Function.prototype.call,g=Object.prototype.hasOwnProperty,S=we();return Le=S.call(o,g),Le}var L,qr=nt,Tt=it,jt=ot,It=at,Ft=ft,ve=kr,de=Ie,Rt=st,Ct=ut,Dt=lt,_t=ct,$t=pt,Ut=yt,Lr=Function,We=function(o){try{return Lr('"use strict"; return ('+o+").constructor;")()}catch{}},me=Ae,Mt=Fe,xe=function(){throw new de},kt=me?function(){try{return arguments.callee,xe}catch{try{return me(arguments,"callee").get}catch{return xe}}}():xe,ye=gt()(),Gt=Nt(),te=typeof Reflect=="function"&&Reflect.getPrototypeOf||qr.getPrototypeOf||Gt,Wr=ar(),Se=or(),ge={},qt=typeof Uint8Array>"u"||!te?L:te(Uint8Array),pe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?L:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?L:ArrayBuffer,"%ArrayIteratorPrototype%":ye&&te?te([][Symbol.iterator]()):L,"%AsyncFromSyncIteratorPrototype%":L,"%AsyncFunction%":ge,"%AsyncGenerator%":ge,"%AsyncGeneratorFunction%":ge,"%AsyncIteratorPrototype%":ge,"%Atomics%":typeof Atomics>"u"?L:Atomics,"%BigInt%":typeof BigInt>"u"?L:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?L:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?L:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?L:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Tt,"%eval%":eval,"%EvalError%":jt,"%Float32Array%":typeof Float32Array>"u"?L:Float32Array,"%Float64Array%":typeof Float64Array>"u"?L:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?L:FinalizationRegistry,"%Function%":Lr,"%GeneratorFunction%":ge,"%Int8Array%":typeof Int8Array>"u"?L:Int8Array,"%Int16Array%":typeof Int16Array>"u"?L:Int16Array,"%Int32Array%":typeof Int32Array>"u"?L:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ye&&te?te(te([][Symbol.iterator]())):L,"%JSON%":typeof JSON=="object"?JSON:L,"%Map%":typeof Map>"u"?L:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ye||!te?L:te(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":qr,"%Object.getOwnPropertyDescriptor%":me,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?L:Promise,"%Proxy%":typeof Proxy>"u"?L:Proxy,"%RangeError%":It,"%ReferenceError%":Ft,"%Reflect%":typeof Reflect>"u"?L:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?L:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ye||!te?L:te(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?L:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ye&&te?te(""[Symbol.iterator]()):L,"%Symbol%":ye?Symbol:L,"%SyntaxError%":ve,"%ThrowTypeError%":kt,"%TypedArray%":qt,"%TypeError%":de,"%Uint8Array%":typeof Uint8Array>"u"?L:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?L:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?L:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?L:Uint32Array,"%URIError%":Rt,"%WeakMap%":typeof WeakMap>"u"?L:WeakMap,"%WeakRef%":typeof WeakRef>"u"?L:WeakRef,"%WeakSet%":typeof WeakSet>"u"?L:WeakSet,"%Function.prototype.call%":Se,"%Function.prototype.apply%":Wr,"%Object.defineProperty%":Mt,"%Math.abs%":Ct,"%Math.floor%":Dt,"%Math.max%":_t,"%Math.min%":$t,"%Math.pow%":Ut};if(te)try{null.error}catch(o){var Lt=te(te(o));pe["%Error.prototype%"]=Lt}var Wt=function o(g){var S;if(g==="%AsyncFunction%")S=We("async function () {}");else if(g==="%GeneratorFunction%")S=We("function* () {}");else if(g==="%AsyncGeneratorFunction%")S=We("async function* () {}");else if(g==="%AsyncGenerator%"){var b=o("%AsyncGeneratorFunction%");b&&(S=b.prototype)}else if(g==="%AsyncIteratorPrototype%"){var y=o("%AsyncGenerator%");y&&te&&(S=te(y.prototype))}return pe[g]=S,S},vr={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},be=we(),Te=Bt(),xt=be.call(Se,Array.prototype.concat),zt=be.call(Wr,Array.prototype.splice),mr=be.call(Se,String.prototype.replace),je=be.call(Se,String.prototype.slice),Vt=be.call(Se,RegExp.prototype.exec),Ht=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Jt=/\\(\\)?/g,Xt=function(g){var S=je(g,0,1),b=je(g,-1);if(S==="%"&&b!=="%")throw new ve("invalid intrinsic syntax, expected closing `%`");if(b==="%"&&S!=="%")throw new ve("invalid intrinsic syntax, expected opening `%`");var y=[];return mr(g,Ht,function(B,P,O,E){y[y.length]=O?mr(E,Jt,"$1"):P||B}),y},Yt=function(g,S){var b=g,y;if(Te(vr,b)&&(y=vr[b],b="%"+y[0]+"%"),Te(pe,b)){var B=pe[b];if(B===ge&&(B=Wt(b)),typeof B>"u"&&!S)throw new de("intrinsic "+g+" exists, but is not available. Please file an issue!");return{alias:y,name:b,value:B}}throw new ve("intrinsic "+g+" does not exist!")},xr=function(g,S){if(typeof g!="string"||g.length===0)throw new de("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof S!="boolean")throw new de('"allowMissing" argument must be a boolean');if(Vt(/^%?[^%]*%?$/,g)===null)throw new ve("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var b=Xt(g),y=b.length>0?b[0]:"",B=Yt("%"+y+"%",S),P=B.name,O=B.value,E=!1,F=B.alias;F&&(y=F[0],zt(b,xt([0,1],F)));for(var C=1,T=!0;C<b.length;C+=1){var _=b[C],X=je(_,0,1),V=je(_,-1);if((X==='"'||X==="'"||X==="`"||V==='"'||V==="'"||V==="`")&&X!==V)throw new ve("property names with quotes must have matching quotes");if((_==="constructor"||!T)&&(E=!0),y+="."+_,P="%"+y+"%",Te(pe,P))O=pe[P];else if(O!=null){if(!(_ in O)){if(!S)throw new de("base intrinsic for "+g+" exists, but the property is not available.");return}if(me&&C+1>=b.length){var z=me(O,_);T=!!z,T&&"get"in z&&!("originalValue"in z.get)?O=z.get:O=O[_]}else T=Te(O,_),O=O[_];T&&!E&&(pe[P]=O)}}return O},zr=xr,Vr=fr,Zt=Vr([zr("%String.prototype.indexOf%")]),Hr=function(g,S){var b=zr(g,!!S);return typeof b=="function"&&Zt(g,".prototype.")>-1?Vr([b]):b},ze,Ar;function Qt(){if(Ar)return ze;Ar=1;var o=ir()(),g=Hr,S=g("Object.prototype.toString"),b=function(O){return o&&O&&typeof O=="object"&&Symbol.toStringTag in O?!1:S(O)==="[object Arguments]"},y=function(O){return b(O)?!0:O!==null&&typeof O=="object"&&"length"in O&&typeof O.length=="number"&&O.length>=0&&S(O)!=="[object Array]"&&"callee"in O&&S(O.callee)==="[object Function]"},B=function(){return b(arguments)}();return b.isLegacyArguments=y,ze=B?b:y,ze}var Ve,wr;function Kt(){if(wr)return Ve;wr=1;var o=Object.prototype.toString,g=Function.prototype.toString,S=/^\s*(?:function)?\*/,b=ir()(),y=Object.getPrototypeOf,B=function(){if(!b)return!1;try{return Function("return function*() {}")()}catch{}},P;return Ve=function(E){if(typeof E!="function")return!1;if(S.test(g.call(E)))return!0;if(!b){var F=o.call(E);return F==="[object GeneratorFunction]"}if(!y)return!1;if(typeof P>"u"){var C=B();P=C?y(C):!1}return y(E)===P},Ve}var He,Sr;function en(){if(Sr)return He;Sr=1;var o=Function.prototype.toString,g=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,S,b;if(typeof g=="function"&&typeof Object.defineProperty=="function")try{S=Object.defineProperty({},"length",{get:function(){throw b}}),b={},g(function(){throw 42},null,S)}catch(s){s!==b&&(g=null)}else g=null;var y=/^\s*class\b/,B=function(N){try{var W=o.call(N);return y.test(W)}catch{return!1}},P=function(N){try{return B(N)?!1:(o.call(N),!0)}catch{return!1}},O=Object.prototype.toString,E="[object Object]",F="[object Function]",C="[object GeneratorFunction]",T="[object HTMLAllCollection]",_="[object HTML document.all class]",X="[object HTMLCollection]",V=typeof Symbol=="function"&&!!Symbol.toStringTag,z=!(0 in[,]),U=function(){return!1};if(typeof document=="object"){var d=document.all;O.call(d)===O.call(document.all)&&(U=function(N){if((z||!N)&&(typeof N>"u"||typeof N=="object"))try{var W=O.call(N);return(W===T||W===_||W===X||W===E)&&N("")==null}catch{}return!1})}return He=g?function(N){if(U(N))return!0;if(!N||typeof N!="function"&&typeof N!="object")return!1;try{g(N,null,S)}catch(W){if(W!==b)return!1}return!B(N)&&P(N)}:function(N){if(U(N))return!0;if(!N||typeof N!="function"&&typeof N!="object")return!1;if(V)return P(N);if(B(N))return!1;var W=O.call(N);return W!==F&&W!==C&&!/^\[object HTML/.test(W)?!1:P(N)},He}var Je,br;function rn(){if(br)return Je;br=1;var o=en(),g=Object.prototype.toString,S=Object.prototype.hasOwnProperty,b=function(E,F,C){for(var T=0,_=E.length;T<_;T++)S.call(E,T)&&(C==null?F(E[T],T,E):F.call(C,E[T],T,E))},y=function(E,F,C){for(var T=0,_=E.length;T<_;T++)C==null?F(E.charAt(T),T,E):F.call(C,E.charAt(T),T,E)},B=function(E,F,C){for(var T in E)S.call(E,T)&&(C==null?F(E[T],T,E):F.call(C,E[T],T,E))},P=function(E,F,C){if(!o(F))throw new TypeError("iterator must be a function");var T;arguments.length>=3&&(T=C),g.call(E)==="[object Array]"?b(E,F,T):typeof E=="string"?y(E,F,T):B(E,F,T)};return Je=P,Je}var Xe,Or;function tn(){return Or||(Or=1,Xe=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Xe}var Ye,Er;function nn(){if(Er)return Ye;Er=1;var o=tn(),g=typeof globalThis>"u"?Ur:globalThis;return Ye=function(){for(var b=[],y=0;y<o.length;y++)typeof g[o[y]]=="function"&&(b[b.length]=o[y]);return b},Ye}var Jr={exports:{}},Pr=Fe,on=kr,he=Ie,Nr=Ae,an=function(g,S,b){if(!g||typeof g!="object"&&typeof g!="function")throw new he("`obj` must be an object or a function`");if(typeof S!="string"&&typeof S!="symbol")throw new he("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new he("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new he("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new he("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new he("`loose`, if provided, must be a boolean");var y=arguments.length>3?arguments[3]:null,B=arguments.length>4?arguments[4]:null,P=arguments.length>5?arguments[5]:null,O=arguments.length>6?arguments[6]:!1,E=!!Nr&&Nr(g,S);if(Pr)Pr(g,S,{configurable:P===null&&E?E.configurable:!P,enumerable:y===null&&E?E.enumerable:!y,value:b,writable:B===null&&E?E.writable:!B});else if(O||!y&&!B&&!P)g[S]=b;else throw new on("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},nr=Fe,Xr=function(){return!!nr};Xr.hasArrayLengthDefineBug=function(){if(!nr)return null;try{return nr([],"length",{value:1}).length!==1}catch{return!0}};var fn=Xr,sn=xr,Br=an,un=fn(),Tr=Ae,jr=Ie,ln=sn("%Math.floor%"),cn=function(g,S){if(typeof g!="function")throw new jr("`fn` is not a function");if(typeof S!="number"||S<0||S>4294967295||ln(S)!==S)throw new jr("`length` must be a positive 32-bit integer");var b=arguments.length>2&&!!arguments[2],y=!0,B=!0;if("length"in g&&Tr){var P=Tr(g,"length");P&&!P.configurable&&(y=!1),P&&!P.writable&&(B=!1)}return(y||B||!b)&&(un?Br(g,"length",S,!0,!0):Br(g,"length",S)),g},pn=we(),yn=ar(),hn=Gr,gn=function(){return hn(pn,yn,arguments)};(function(o){var g=cn,S=Fe,b=fr,y=gn;o.exports=function(P){var O=b(arguments),E=P.length-(arguments.length-1);return g(O,1+(E>0?E:0),!0)},S?S(o.exports,"apply",{value:y}):o.exports.apply=y})(Jr);var dn=Jr.exports,Ze,Ir;function Yr(){if(Ir)return Ze;Ir=1;var o=rn(),g=nn(),S=dn,b=Hr,y=Ae,B=b("Object.prototype.toString"),P=ir()(),O=typeof globalThis>"u"?Ur:globalThis,E=g(),F=b("String.prototype.slice"),C=Object.getPrototypeOf,T=b("Array.prototype.indexOf",!0)||function(U,d){for(var s=0;s<U.length;s+=1)if(U[s]===d)return s;return-1},_={__proto__:null};P&&y&&C?o(E,function(z){var U=new O[z];if(Symbol.toStringTag in U){var d=C(U),s=y(d,Symbol.toStringTag);if(!s){var N=C(d);s=y(N,Symbol.toStringTag)}_["$"+z]=S(s.get)}}):o(E,function(z){var U=new O[z],d=U.slice||U.set;d&&(_["$"+z]=S(d))});var X=function(U){var d=!1;return o(_,function(s,N){if(!d)try{"$"+s(U)===N&&(d=F(N,1))}catch{}}),d},V=function(U){var d=!1;return o(_,function(s,N){if(!d)try{s(U),d=F(N,1)}catch{}}),d};return Ze=function(U){if(!U||typeof U!="object")return!1;if(!P){var d=F(B(U),8,-1);return T(E,d)>-1?d:d!=="Object"?!1:V(U)}return y?X(U):null},Ze}var Qe,Fr;function vn(){if(Fr)return Qe;Fr=1;var o=Yr();return Qe=function(S){return!!o(S)},Qe}var Rr;function mn(){return Rr||(Rr=1,function(o){var g=Qt(),S=Kt(),b=Yr(),y=vn();function B(w){return w.call.bind(w)}var P=typeof BigInt<"u",O=typeof Symbol<"u",E=B(Object.prototype.toString),F=B(Number.prototype.valueOf),C=B(String.prototype.valueOf),T=B(Boolean.prototype.valueOf);if(P)var _=B(BigInt.prototype.valueOf);if(O)var X=B(Symbol.prototype.valueOf);function V(w,et){if(typeof w!="object")return!1;try{return et(w),!0}catch{return!1}}o.isArgumentsObject=g,o.isGeneratorFunction=S,o.isTypedArray=y;function z(w){return typeof Promise<"u"&&w instanceof Promise||w!==null&&typeof w=="object"&&typeof w.then=="function"&&typeof w.catch=="function"}o.isPromise=z;function U(w){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(w):y(w)||u(w)}o.isArrayBufferView=U;function d(w){return b(w)==="Uint8Array"}o.isUint8Array=d;function s(w){return b(w)==="Uint8ClampedArray"}o.isUint8ClampedArray=s;function N(w){return b(w)==="Uint16Array"}o.isUint16Array=N;function W(w){return b(w)==="Uint32Array"}o.isUint32Array=W;function H(w){return b(w)==="Int8Array"}o.isInt8Array=H;function ee(w){return b(w)==="Int16Array"}o.isInt16Array=ee;function ie(w){return b(w)==="Int32Array"}o.isInt32Array=ie;function e(w){return b(w)==="Float32Array"}o.isFloat32Array=e;function r(w){return b(w)==="Float64Array"}o.isFloat64Array=r;function t(w){return b(w)==="BigInt64Array"}o.isBigInt64Array=t;function c(w){return b(w)==="BigUint64Array"}o.isBigUint64Array=c;function i(w){return E(w)==="[object Map]"}i.working=typeof Map<"u"&&i(new Map);function f(w){return typeof Map>"u"?!1:i.working?i(w):w instanceof Map}o.isMap=f;function h(w){return E(w)==="[object Set]"}h.working=typeof Set<"u"&&h(new Set);function n(w){return typeof Set>"u"?!1:h.working?h(w):w instanceof Set}o.isSet=n;function a(w){return E(w)==="[object WeakMap]"}a.working=typeof WeakMap<"u"&&a(new WeakMap);function p(w){return typeof WeakMap>"u"?!1:a.working?a(w):w instanceof WeakMap}o.isWeakMap=p;function l(w){return E(w)==="[object WeakSet]"}l.working=typeof WeakSet<"u"&&l(new WeakSet);function A(w){return l(w)}o.isWeakSet=A;function j(w){return E(w)==="[object ArrayBuffer]"}j.working=typeof ArrayBuffer<"u"&&j(new ArrayBuffer);function R(w){return typeof ArrayBuffer>"u"?!1:j.working?j(w):w instanceof ArrayBuffer}o.isArrayBuffer=R;function k(w){return E(w)==="[object DataView]"}k.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&k(new DataView(new ArrayBuffer(1),0,1));function u(w){return typeof DataView>"u"?!1:k.working?k(w):w instanceof DataView}o.isDataView=u;var v=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function m(w){return E(w)==="[object SharedArrayBuffer]"}function I(w){return typeof v>"u"?!1:(typeof m.working>"u"&&(m.working=m(new v)),m.working?m(w):w instanceof v)}o.isSharedArrayBuffer=I;function D(w){return E(w)==="[object AsyncFunction]"}o.isAsyncFunction=D;function x(w){return E(w)==="[object Map Iterator]"}o.isMapIterator=x;function M(w){return E(w)==="[object Set Iterator]"}o.isSetIterator=M;function q(w){return E(w)==="[object Generator]"}o.isGeneratorObject=q;function G(w){return E(w)==="[object WebAssembly.Module]"}o.isWebAssemblyCompiledModule=G;function Z(w){return V(w,F)}o.isNumberObject=Z;function Q(w){return V(w,C)}o.isStringObject=Q;function K(w){return V(w,T)}o.isBooleanObject=K;function J(w){return P&&V(w,_)}o.isBigIntObject=J;function Oe(w){return O&&V(w,X)}o.isSymbolObject=Oe;function Qr(w){return Z(w)||Q(w)||K(w)||J(w)||Oe(w)}o.isBoxedPrimitive=Qr;function Kr(w){return typeof Uint8Array<"u"&&(R(w)||I(w))}o.isAnyArrayBuffer=Kr,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(w){Object.defineProperty(o,w,{enumerable:!1,value:function(){throw new Error(w+" is not supported in userland")}})})}(De)),De}var Ke,Cr;function An(){return Cr||(Cr=1,Ke=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}),Ke}var Dr;function Pn(){return Dr||(Dr=1,function(o){var g={},S=Object.getOwnPropertyDescriptors||function(v){for(var m=Object.keys(v),I={},D=0;D<m.length;D++)I[m[D]]=Object.getOwnPropertyDescriptor(v,m[D]);return I},b=/%[sdj%]/g;o.format=function(u){if(!ee(u)){for(var v=[],m=0;m<arguments.length;m++)v.push(O(arguments[m]));return v.join(" ")}for(var m=1,I=arguments,D=I.length,x=String(u).replace(b,function(q){if(q==="%%")return"%";if(m>=D)return q;switch(q){case"%s":return String(I[m++]);case"%d":return Number(I[m++]);case"%j":try{return JSON.stringify(I[m++])}catch{return"[Circular]"}default:return q}}),M=I[m];m<D;M=I[++m])N(M)||!t(M)?x+=" "+M:x+=" "+O(M);return x},o.deprecate=function(u,v){if(typeof process<"u"&&process.noDeprecation===!0)return u;if(typeof process>"u")return function(){return o.deprecate(u,v).apply(this,arguments)};var m=!1;function I(){if(!m){if(process.throwDeprecation)throw new Error(v);process.traceDeprecation?console.trace(v):console.error(v),m=!0}return u.apply(this,arguments)}return I};var y={},B=/^$/;if(g.NODE_DEBUG){var P=g.NODE_DEBUG;P=P.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),B=new RegExp("^"+P+"$","i")}o.debuglog=function(u){if(u=u.toUpperCase(),!y[u])if(B.test(u)){var v=process.pid;y[u]=function(){var m=o.format.apply(o,arguments);console.error("%s %d: %s",u,v,m)}}else y[u]=function(){};return y[u]};function O(u,v){var m={seen:[],stylize:F};return arguments.length>=3&&(m.depth=arguments[2]),arguments.length>=4&&(m.colors=arguments[3]),s(v)?m.showHidden=v:v&&o._extend(m,v),e(m.showHidden)&&(m.showHidden=!1),e(m.depth)&&(m.depth=2),e(m.colors)&&(m.colors=!1),e(m.customInspect)&&(m.customInspect=!0),m.colors&&(m.stylize=E),T(m,u,m.depth)}o.inspect=O,O.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]},O.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function E(u,v){var m=O.styles[v];return m?"\x1B["+O.colors[m][0]+"m"+u+"\x1B["+O.colors[m][1]+"m":u}function F(u,v){return u}function C(u){var v={};return u.forEach(function(m,I){v[m]=!0}),v}function T(u,v,m){if(u.customInspect&&v&&f(v.inspect)&&v.inspect!==o.inspect&&!(v.constructor&&v.constructor.prototype===v)){var I=v.inspect(m,u);return ee(I)||(I=T(u,I,m)),I}var D=_(u,v);if(D)return D;var x=Object.keys(v),M=C(x);if(u.showHidden&&(x=Object.getOwnPropertyNames(v)),i(v)&&(x.indexOf("message")>=0||x.indexOf("description")>=0))return X(v);if(x.length===0){if(f(v)){var q=v.name?": "+v.name:"";return u.stylize("[Function"+q+"]","special")}if(r(v))return u.stylize(RegExp.prototype.toString.call(v),"regexp");if(c(v))return u.stylize(Date.prototype.toString.call(v),"date");if(i(v))return X(v)}var G="",Z=!1,Q=["{","}"];if(d(v)&&(Z=!0,Q=["[","]"]),f(v)){var K=v.name?": "+v.name:"";G=" [Function"+K+"]"}if(r(v)&&(G=" "+RegExp.prototype.toString.call(v)),c(v)&&(G=" "+Date.prototype.toUTCString.call(v)),i(v)&&(G=" "+X(v)),x.length===0&&(!Z||v.length==0))return Q[0]+G+Q[1];if(m<0)return r(v)?u.stylize(RegExp.prototype.toString.call(v),"regexp"):u.stylize("[Object]","special");u.seen.push(v);var J;return Z?J=V(u,v,m,M,x):J=x.map(function(Oe){return z(u,v,m,M,Oe,Z)}),u.seen.pop(),U(J,G,Q)}function _(u,v){if(e(v))return u.stylize("undefined","undefined");if(ee(v)){var m="'"+JSON.stringify(v).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return u.stylize(m,"string")}if(H(v))return u.stylize(""+v,"number");if(s(v))return u.stylize(""+v,"boolean");if(N(v))return u.stylize("null","null")}function X(u){return"["+Error.prototype.toString.call(u)+"]"}function V(u,v,m,I,D){for(var x=[],M=0,q=v.length;M<q;++M)A(v,String(M))?x.push(z(u,v,m,I,String(M),!0)):x.push("");return D.forEach(function(G){G.match(/^\d+$/)||x.push(z(u,v,m,I,G,!0))}),x}function z(u,v,m,I,D,x){var M,q,G;if(G=Object.getOwnPropertyDescriptor(v,D)||{value:v[D]},G.get?G.set?q=u.stylize("[Getter/Setter]","special"):q=u.stylize("[Getter]","special"):G.set&&(q=u.stylize("[Setter]","special")),A(I,D)||(M="["+D+"]"),q||(u.seen.indexOf(G.value)<0?(N(m)?q=T(u,G.value,null):q=T(u,G.value,m-1),q.indexOf(`
|
|
2
|
-
`)>-1&&(x?q=q.split(`
|
|
3
|
-
`).map(function(Z){return" "+Z}).join(`
|
|
4
|
-
`).slice(2):q=`
|
|
5
|
-
`+q.split(`
|
|
6
|
-
`).map(function(Z){return" "+Z}).join(`
|
|
7
|
-
`))):q=u.stylize("[Circular]","special")),e(M)){if(x&&D.match(/^\d+$/))return q;M=JSON.stringify(""+D),M.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(M=M.slice(1,-1),M=u.stylize(M,"name")):(M=M.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),M=u.stylize(M,"string"))}return M+": "+q}function U(u,v,m){var I=u.reduce(function(D,x){return x.indexOf(`
|
|
8
|
-
`)>=0,D+x.replace(/\u001b\[\d\d?m/g,"").length+1},0);return I>60?m[0]+(v===""?"":v+`
|
|
9
|
-
`)+" "+u.join(`,
|
|
10
|
-
`)+" "+m[1]:m[0]+v+" "+u.join(", ")+" "+m[1]}o.types=mn();function d(u){return Array.isArray(u)}o.isArray=d;function s(u){return typeof u=="boolean"}o.isBoolean=s;function N(u){return u===null}o.isNull=N;function W(u){return u==null}o.isNullOrUndefined=W;function H(u){return typeof u=="number"}o.isNumber=H;function ee(u){return typeof u=="string"}o.isString=ee;function ie(u){return typeof u=="symbol"}o.isSymbol=ie;function e(u){return u===void 0}o.isUndefined=e;function r(u){return t(u)&&n(u)==="[object RegExp]"}o.isRegExp=r,o.types.isRegExp=r;function t(u){return typeof u=="object"&&u!==null}o.isObject=t;function c(u){return t(u)&&n(u)==="[object Date]"}o.isDate=c,o.types.isDate=c;function i(u){return t(u)&&(n(u)==="[object Error]"||u instanceof Error)}o.isError=i,o.types.isNativeError=i;function f(u){return typeof u=="function"}o.isFunction=f;function h(u){return u===null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||typeof u=="symbol"||typeof u>"u"}o.isPrimitive=h,o.isBuffer=An();function n(u){return Object.prototype.toString.call(u)}function a(u){return u<10?"0"+u.toString(10):u.toString(10)}var p=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function l(){var u=new Date,v=[a(u.getHours()),a(u.getMinutes()),a(u.getSeconds())].join(":");return[u.getDate(),p[u.getMonth()],v].join(" ")}o.log=function(){console.log("%s - %s",l(),o.format.apply(o,arguments))},o.inherits=tt,o._extend=function(u,v){if(!v||!t(v))return u;for(var m=Object.keys(v),I=m.length;I--;)u[m[I]]=v[m[I]];return u};function A(u,v){return Object.prototype.hasOwnProperty.call(u,v)}var j=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;o.promisify=function(v){if(typeof v!="function")throw new TypeError('The "original" argument must be of type Function');if(j&&v[j]){var m=v[j];if(typeof m!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(m,j,{value:m,enumerable:!1,writable:!1,configurable:!0}),m}function m(){for(var I,D,x=new Promise(function(G,Z){I=G,D=Z}),M=[],q=0;q<arguments.length;q++)M.push(arguments[q]);M.push(function(G,Z){G?D(G):I(Z)});try{v.apply(this,M)}catch(G){D(G)}return x}return Object.setPrototypeOf(m,Object.getPrototypeOf(v)),j&&Object.defineProperty(m,j,{value:m,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(m,S(v))},o.promisify.custom=j;function R(u,v){if(!u){var m=new Error("Promise was rejected with a falsy value");m.reason=u,u=m}return v(u)}function k(u){if(typeof u!="function")throw new TypeError('The "original" argument must be of type Function');function v(){for(var m=[],I=0;I<arguments.length;I++)m.push(arguments[I]);var D=m.pop();if(typeof D!="function")throw new TypeError("The last argument must be of type Function");var x=this,M=function(){return D.apply(x,arguments)};u.apply(this,m).then(function(q){process.nextTick(M.bind(null,null,q))},function(q){process.nextTick(R.bind(null,q,M))})}return Object.setPrototypeOf(v,Object.getPrototypeOf(u)),Object.defineProperties(v,S(u)),v}o.callbackify=k}(Ce)),Ce}var wn=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,er=Math.ceil,ae=Math.floor,ne="[BigNumber Error] ",_r=ne+"Number primitive has more than 15 significant digits: ",se=1e14,$=14,rr=9007199254740991,tr=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],le=1e7,re=1e9;function Zr(o){var g,S,b,y=s.prototype={constructor:s,toString:null,valueOf:null},B=new s(1),P=20,O=4,E=-7,F=21,C=-1e7,T=1e7,_=!1,X=1,V=0,z={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},U="0123456789abcdefghijklmnopqrstuvwxyz",d=!0;function s(e,r){var t,c,i,f,h,n,a,p,l=this;if(!(l instanceof s))return new s(e,r);if(r==null){if(e&&e._isBigNumber===!0){l.s=e.s,!e.c||e.e>T?l.c=l.e=null:e.e<C?l.c=[l.e=0]:(l.e=e.e,l.c=e.c.slice());return}if((n=typeof e=="number")&&e*0==0){if(l.s=1/e<0?(e=-e,-1):1,e===~~e){for(f=0,h=e;h>=10;h/=10,f++);f>T?l.c=l.e=null:(l.e=f,l.c=[e]);return}p=String(e)}else{if(!wn.test(p=String(e)))return b(l,p,n);l.s=p.charCodeAt(0)==45?(p=p.slice(1),-1):1}(f=p.indexOf("."))>-1&&(p=p.replace(".","")),(h=p.search(/e/i))>0?(f<0&&(f=h),f+=+p.slice(h+1),p=p.substring(0,h)):f<0&&(f=p.length)}else{if(Y(r,2,U.length,"Base"),r==10&&d)return l=new s(e),ee(l,P+l.e+1,O);if(p=String(e),n=typeof e=="number"){if(e*0!=0)return b(l,p,n,r);if(l.s=1/e<0?(p=p.slice(1),-1):1,s.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(_r+e)}else l.s=p.charCodeAt(0)===45?(p=p.slice(1),-1):1;for(t=U.slice(0,r),f=h=0,a=p.length;h<a;h++)if(t.indexOf(c=p.charAt(h))<0){if(c=="."){if(h>f){f=a;continue}}else if(!i&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){i=!0,h=-1,f=0;continue}return b(l,String(e),n,r)}n=!1,p=S(p,r,10,l.s),(f=p.indexOf("."))>-1?p=p.replace(".",""):f=p.length}for(h=0;p.charCodeAt(h)===48;h++);for(a=p.length;p.charCodeAt(--a)===48;);if(p=p.slice(h,++a)){if(a-=h,n&&s.DEBUG&&a>15&&(e>rr||e!==ae(e)))throw Error(_r+l.s*e);if((f=f-h-1)>T)l.c=l.e=null;else if(f<C)l.c=[l.e=0];else{if(l.e=f,l.c=[],h=(f+1)%$,f<0&&(h+=$),h<a){for(h&&l.c.push(+p.slice(0,h)),a-=$;h<a;)l.c.push(+p.slice(h,h+=$));h=$-(p=p.slice(h)).length}else h-=a;for(;h--;p+="0");l.c.push(+p)}}else l.c=[l.e=0]}s.clone=Zr,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=function(e){var r,t;if(e!=null)if(typeof e=="object"){if(e.hasOwnProperty(r="DECIMAL_PLACES")&&(t=e[r],Y(t,0,re,r),P=t),e.hasOwnProperty(r="ROUNDING_MODE")&&(t=e[r],Y(t,0,8,r),O=t),e.hasOwnProperty(r="EXPONENTIAL_AT")&&(t=e[r],t&&t.pop?(Y(t[0],-re,0,r),Y(t[1],0,re,r),E=t[0],F=t[1]):(Y(t,-re,re,r),E=-(F=t<0?-t:t))),e.hasOwnProperty(r="RANGE"))if(t=e[r],t&&t.pop)Y(t[0],-re,-1,r),Y(t[1],1,re,r),C=t[0],T=t[1];else if(Y(t,-re,re,r),t)C=-(T=t<0?-t:t);else throw Error(ne+r+" cannot be zero: "+t);if(e.hasOwnProperty(r="CRYPTO"))if(t=e[r],t===!!t)if(t)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))_=t;else throw _=!t,Error(ne+"crypto unavailable");else _=t;else throw Error(ne+r+" not true or false: "+t);if(e.hasOwnProperty(r="MODULO_MODE")&&(t=e[r],Y(t,0,9,r),X=t),e.hasOwnProperty(r="POW_PRECISION")&&(t=e[r],Y(t,0,re,r),V=t),e.hasOwnProperty(r="FORMAT"))if(t=e[r],typeof t=="object")z=t;else throw Error(ne+r+" not an object: "+t);if(e.hasOwnProperty(r="ALPHABET"))if(t=e[r],typeof t=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(t))d=t.slice(0,10)=="0123456789",U=t;else throw Error(ne+r+" invalid: "+t)}else throw Error(ne+"Object expected: "+e);return{DECIMAL_PLACES:P,ROUNDING_MODE:O,EXPONENTIAL_AT:[E,F],RANGE:[C,T],CRYPTO:_,MODULO_MODE:X,POW_PRECISION:V,FORMAT:z,ALPHABET:U}},s.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!s.DEBUG)return!0;var r,t,c=e.c,i=e.e,f=e.s;e:if({}.toString.call(c)=="[object Array]"){if((f===1||f===-1)&&i>=-re&&i<=re&&i===ae(i)){if(c[0]===0){if(i===0&&c.length===1)return!0;break e}if(r=(i+1)%$,r<1&&(r+=$),String(c[0]).length==r){for(r=0;r<c.length;r++)if(t=c[r],t<0||t>=se||t!==ae(t))break e;if(t!==0)return!0}}}else if(c===null&&i===null&&(f===null||f===1||f===-1))return!0;throw Error(ne+"Invalid BigNumber: "+e)},s.maximum=s.max=function(){return W(arguments,-1)},s.minimum=s.min=function(){return W(arguments,1)},s.random=function(){var e=9007199254740992,r=Math.random()*e&2097151?function(){return ae(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(t){var c,i,f,h,n,a=0,p=[],l=new s(B);if(t==null?t=P:Y(t,0,re),h=er(t/$),_)if(crypto.getRandomValues){for(c=crypto.getRandomValues(new Uint32Array(h*=2));a<h;)n=c[a]*131072+(c[a+1]>>>11),n>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),c[a]=i[0],c[a+1]=i[1]):(p.push(n%1e14),a+=2);a=h/2}else if(crypto.randomBytes){for(c=crypto.randomBytes(h*=7);a<h;)n=(c[a]&31)*281474976710656+c[a+1]*1099511627776+c[a+2]*4294967296+c[a+3]*16777216+(c[a+4]<<16)+(c[a+5]<<8)+c[a+6],n>=9e15?crypto.randomBytes(7).copy(c,a):(p.push(n%1e14),a+=7);a=h/7}else throw _=!1,Error(ne+"crypto unavailable");if(!_)for(;a<h;)n=r(),n<9e15&&(p[a++]=n%1e14);for(h=p[--a],t%=$,h&&t&&(n=tr[$-t],p[a]=ae(h/n)*n);p[a]===0;p.pop(),a--);if(a<0)p=[f=0];else{for(f=-1;p[0]===0;p.splice(0,1),f-=$);for(a=1,n=p[0];n>=10;n/=10,a++);a<$&&(f-=$-a)}return l.e=f,l.c=p,l}}(),s.sum=function(){for(var e=1,r=arguments,t=new s(r[0]);e<r.length;)t=t.plus(r[e++]);return t},S=function(){var e="0123456789";function r(t,c,i,f){for(var h,n=[0],a,p=0,l=t.length;p<l;){for(a=n.length;a--;n[a]*=c);for(n[0]+=f.indexOf(t.charAt(p++)),h=0;h<n.length;h++)n[h]>i-1&&(n[h+1]==null&&(n[h+1]=0),n[h+1]+=n[h]/i|0,n[h]%=i)}return n.reverse()}return function(t,c,i,f,h){var n,a,p,l,A,j,R,k,u=t.indexOf("."),v=P,m=O;for(u>=0&&(l=V,V=0,t=t.replace(".",""),k=new s(c),j=k.pow(t.length-u),V=l,k.c=r(ue(oe(j.c),j.e,"0"),10,i,e),k.e=k.c.length),R=r(t,c,i,h?(n=U,e):(n=e,U)),p=l=R.length;R[--l]==0;R.pop());if(!R[0])return n.charAt(0);if(u<0?--p:(j.c=R,j.e=p,j.s=f,j=g(j,k,v,m,i),R=j.c,A=j.r,p=j.e),a=p+v+1,u=R[a],l=i/2,A=A||a<0||R[a+1]!=null,A=m<4?(u!=null||A)&&(m==0||m==(j.s<0?3:2)):u>l||u==l&&(m==4||A||m==6&&R[a-1]&1||m==(j.s<0?8:7)),a<1||!R[0])t=A?ue(n.charAt(1),-v,n.charAt(0)):n.charAt(0);else{if(R.length=a,A)for(--i;++R[--a]>i;)R[a]=0,a||(++p,R=[1].concat(R));for(l=R.length;!R[--l];);for(u=0,t="";u<=l;t+=n.charAt(R[u++]));t=ue(t,p,n.charAt(0))}return t}}(),g=function(){function e(c,i,f){var h,n,a,p,l=0,A=c.length,j=i%le,R=i/le|0;for(c=c.slice();A--;)a=c[A]%le,p=c[A]/le|0,h=R*a+p*j,n=j*a+h%le*le+l,l=(n/f|0)+(h/le|0)+R*p,c[A]=n%f;return l&&(c=[l].concat(c)),c}function r(c,i,f,h){var n,a;if(f!=h)a=f>h?1:-1;else for(n=a=0;n<f;n++)if(c[n]!=i[n]){a=c[n]>i[n]?1:-1;break}return a}function t(c,i,f,h){for(var n=0;f--;)c[f]-=n,n=c[f]<i[f]?1:0,c[f]=n*h+c[f]-i[f];for(;!c[0]&&c.length>1;c.splice(0,1));}return function(c,i,f,h,n){var a,p,l,A,j,R,k,u,v,m,I,D,x,M,q,G,Z,Q=c.s==i.s?1:-1,K=c.c,J=i.c;if(!K||!K[0]||!J||!J[0])return new s(!c.s||!i.s||(K?J&&K[0]==J[0]:!J)?NaN:K&&K[0]==0||!J?Q*0:Q/0);for(u=new s(Q),v=u.c=[],p=c.e-i.e,Q=f+p+1,n||(n=se,p=fe(c.e/$)-fe(i.e/$),Q=Q/$|0),l=0;J[l]==(K[l]||0);l++);if(J[l]>(K[l]||0)&&p--,Q<0)v.push(1),A=!0;else{for(M=K.length,G=J.length,l=0,Q+=2,j=ae(n/(J[0]+1)),j>1&&(J=e(J,j,n),K=e(K,j,n),G=J.length,M=K.length),x=G,m=K.slice(0,G),I=m.length;I<G;m[I++]=0);Z=J.slice(),Z=[0].concat(Z),q=J[0],J[1]>=n/2&&q++;do{if(j=0,a=r(J,m,G,I),a<0){if(D=m[0],G!=I&&(D=D*n+(m[1]||0)),j=ae(D/q),j>1)for(j>=n&&(j=n-1),R=e(J,j,n),k=R.length,I=m.length;r(R,m,k,I)==1;)j--,t(R,G<k?Z:J,k,n),k=R.length,a=1;else j==0&&(a=j=1),R=J.slice(),k=R.length;if(k<I&&(R=[0].concat(R)),t(m,R,I,n),I=m.length,a==-1)for(;r(J,m,G,I)<1;)j++,t(m,G<I?Z:J,I,n),I=m.length}else a===0&&(j++,m=[0]);v[l++]=j,m[0]?m[I++]=K[x]||0:(m=[K[x]],I=1)}while((x++<M||m[0]!=null)&&Q--);A=m[0]!=null,v[0]||v.splice(0,1)}if(n==se){for(l=1,Q=v[0];Q>=10;Q/=10,l++);ee(u,f+(u.e=l+p*$-1)+1,h,A)}else u.e=p,u.r=+A;return u}}();function N(e,r,t,c){var i,f,h,n,a;if(t==null?t=O:Y(t,0,8),!e.c)return e.toString();if(i=e.c[0],h=e.e,r==null)a=oe(e.c),a=c==1||c==2&&(h<=E||h>=F)?Pe(a,h):ue(a,h,"0");else if(e=ee(new s(e),r,t),f=e.e,a=oe(e.c),n=a.length,c==1||c==2&&(r<=f||f<=E)){for(;n<r;a+="0",n++);a=Pe(a,f)}else if(r-=h,a=ue(a,f,"0"),f+1>n){if(--r>0)for(a+=".";r--;a+="0");}else if(r+=f-n,r>0)for(f+1==n&&(a+=".");r--;a+="0");return e.s<0&&i?"-"+a:a}function W(e,r){for(var t,c,i=1,f=new s(e[0]);i<e.length;i++)c=new s(e[i]),(!c.s||(t=ce(f,c))===r||t===0&&f.s===r)&&(f=c);return f}function H(e,r,t){for(var c=1,i=r.length;!r[--i];r.pop());for(i=r[0];i>=10;i/=10,c++);return(t=c+t*$-1)>T?e.c=e.e=null:t<C?e.c=[e.e=0]:(e.e=t,e.c=r),e}b=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,r=/^([^.]+)\.$/,t=/^\.([^.]+)$/,c=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(f,h,n,a){var p,l=n?h:h.replace(i,"");if(c.test(l))f.s=isNaN(l)?null:l<0?-1:1;else{if(!n&&(l=l.replace(e,function(A,j,R){return p=(R=R.toLowerCase())=="x"?16:R=="b"?2:8,!a||a==p?j:A}),a&&(p=a,l=l.replace(r,"$1").replace(t,"0.$1")),h!=l))return new s(l,p);if(s.DEBUG)throw Error(ne+"Not a"+(a?" base "+a:"")+" number: "+h);f.s=null}f.c=f.e=null}}();function ee(e,r,t,c){var i,f,h,n,a,p,l,A=e.c,j=tr;if(A){e:{for(i=1,n=A[0];n>=10;n/=10,i++);if(f=r-i,f<0)f+=$,h=r,a=A[p=0],l=ae(a/j[i-h-1]%10);else if(p=er((f+1)/$),p>=A.length)if(c){for(;A.length<=p;A.push(0));a=l=0,i=1,f%=$,h=f-$+1}else break e;else{for(a=n=A[p],i=1;n>=10;n/=10,i++);f%=$,h=f-$+i,l=h<0?0:ae(a/j[i-h-1]%10)}if(c=c||r<0||A[p+1]!=null||(h<0?a:a%j[i-h-1]),c=t<4?(l||c)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||c||t==6&&(f>0?h>0?a/j[i-h]:0:A[p-1])%10&1||t==(e.s<0?8:7)),r<1||!A[0])return A.length=0,c?(r-=e.e+1,A[0]=j[($-r%$)%$],e.e=-r||0):A[0]=e.e=0,e;if(f==0?(A.length=p,n=1,p--):(A.length=p+1,n=j[$-f],A[p]=h>0?ae(a/j[i-h]%j[h])*n:0),c)for(;;)if(p==0){for(f=1,h=A[0];h>=10;h/=10,f++);for(h=A[0]+=n,n=1;h>=10;h/=10,n++);f!=n&&(e.e++,A[0]==se&&(A[0]=1));break}else{if(A[p]+=n,A[p]!=se)break;A[p--]=0,n=1}for(f=A.length;A[--f]===0;A.pop());}e.e>T?e.c=e.e=null:e.e<C&&(e.c=[e.e=0])}return e}function ie(e){var r,t=e.e;return t===null?e.toString():(r=oe(e.c),r=t<=E||t>=F?Pe(r,t):ue(r,t,"0"),e.s<0?"-"+r:r)}return y.absoluteValue=y.abs=function(){var e=new s(this);return e.s<0&&(e.s=1),e},y.comparedTo=function(e,r){return ce(this,new s(e,r))},y.decimalPlaces=y.dp=function(e,r){var t,c,i,f=this;if(e!=null)return Y(e,0,re),r==null?r=O:Y(r,0,8),ee(new s(f),e+f.e+1,r);if(!(t=f.c))return null;if(c=((i=t.length-1)-fe(this.e/$))*$,i=t[i])for(;i%10==0;i/=10,c--);return c<0&&(c=0),c},y.dividedBy=y.div=function(e,r){return g(this,new s(e,r),P,O)},y.dividedToIntegerBy=y.idiv=function(e,r){return g(this,new s(e,r),0,1)},y.exponentiatedBy=y.pow=function(e,r){var t,c,i,f,h,n,a,p,l,A=this;if(e=new s(e),e.c&&!e.isInteger())throw Error(ne+"Exponent not an integer: "+ie(e));if(r!=null&&(r=new s(r)),n=e.e>14,!A.c||!A.c[0]||A.c[0]==1&&!A.e&&A.c.length==1||!e.c||!e.c[0])return l=new s(Math.pow(+ie(A),n?e.s*(2-Ee(e)):+ie(e))),r?l.mod(r):l;if(a=e.s<0,r){if(r.c?!r.c[0]:!r.s)return new s(NaN);c=!a&&A.isInteger()&&r.isInteger(),c&&(A=A.mod(r))}else{if(e.e>9&&(A.e>0||A.e<-1||(A.e==0?A.c[0]>1||n&&A.c[1]>=24e7:A.c[0]<8e13||n&&A.c[0]<=9999975e7)))return f=A.s<0&&Ee(e)?-0:0,A.e>-1&&(f=1/f),new s(a?1/f:f);V&&(f=er(V/$+2))}for(n?(t=new s(.5),a&&(e.s=1),p=Ee(e)):(i=Math.abs(+ie(e)),p=i%2),l=new s(B);;){if(p){if(l=l.times(A),!l.c)break;f?l.c.length>f&&(l.c.length=f):c&&(l=l.mod(r))}if(i){if(i=ae(i/2),i===0)break;p=i%2}else if(e=e.times(t),ee(e,e.e+1,1),e.e>14)p=Ee(e);else{if(i=+ie(e),i===0)break;p=i%2}A=A.times(A),f?A.c&&A.c.length>f&&(A.c.length=f):c&&(A=A.mod(r))}return c?l:(a&&(l=B.div(l)),r?l.mod(r):f?ee(l,V,O,h):l)},y.integerValue=function(e){var r=new s(this);return e==null?e=O:Y(e,0,8),ee(r,r.e+1,e)},y.isEqualTo=y.eq=function(e,r){return ce(this,new s(e,r))===0},y.isFinite=function(){return!!this.c},y.isGreaterThan=y.gt=function(e,r){return ce(this,new s(e,r))>0},y.isGreaterThanOrEqualTo=y.gte=function(e,r){return(r=ce(this,new s(e,r)))===1||r===0},y.isInteger=function(){return!!this.c&&fe(this.e/$)>this.c.length-2},y.isLessThan=y.lt=function(e,r){return ce(this,new s(e,r))<0},y.isLessThanOrEqualTo=y.lte=function(e,r){return(r=ce(this,new s(e,r)))===-1||r===0},y.isNaN=function(){return!this.s},y.isNegative=function(){return this.s<0},y.isPositive=function(){return this.s>0},y.isZero=function(){return!!this.c&&this.c[0]==0},y.minus=function(e,r){var t,c,i,f,h=this,n=h.s;if(e=new s(e,r),r=e.s,!n||!r)return new s(NaN);if(n!=r)return e.s=-r,h.plus(e);var a=h.e/$,p=e.e/$,l=h.c,A=e.c;if(!a||!p){if(!l||!A)return l?(e.s=-r,e):new s(A?h:NaN);if(!l[0]||!A[0])return A[0]?(e.s=-r,e):new s(l[0]?h:O==3?-0:0)}if(a=fe(a),p=fe(p),l=l.slice(),n=a-p){for((f=n<0)?(n=-n,i=l):(p=a,i=A),i.reverse(),r=n;r--;i.push(0));i.reverse()}else for(c=(f=(n=l.length)<(r=A.length))?n:r,n=r=0;r<c;r++)if(l[r]!=A[r]){f=l[r]<A[r];break}if(f&&(i=l,l=A,A=i,e.s=-e.s),r=(c=A.length)-(t=l.length),r>0)for(;r--;l[t++]=0);for(r=se-1;c>n;){if(l[--c]<A[c]){for(t=c;t&&!l[--t];l[t]=r);--l[t],l[c]+=se}l[c]-=A[c]}for(;l[0]==0;l.splice(0,1),--p);return l[0]?H(e,l,p):(e.s=O==3?-1:1,e.c=[e.e=0],e)},y.modulo=y.mod=function(e,r){var t,c,i=this;return e=new s(e,r),!i.c||!e.s||e.c&&!e.c[0]?new s(NaN):!e.c||i.c&&!i.c[0]?new s(i):(X==9?(c=e.s,e.s=1,t=g(i,e,0,3),e.s=c,t.s*=c):t=g(i,e,0,X),e=i.minus(t.times(e)),!e.c[0]&&X==1&&(e.s=i.s),e)},y.multipliedBy=y.times=function(e,r){var t,c,i,f,h,n,a,p,l,A,j,R,k,u,v,m=this,I=m.c,D=(e=new s(e,r)).c;if(!I||!D||!I[0]||!D[0])return!m.s||!e.s||I&&!I[0]&&!D||D&&!D[0]&&!I?e.c=e.e=e.s=null:(e.s*=m.s,!I||!D?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(c=fe(m.e/$)+fe(e.e/$),e.s*=m.s,a=I.length,A=D.length,a<A&&(k=I,I=D,D=k,i=a,a=A,A=i),i=a+A,k=[];i--;k.push(0));for(u=se,v=le,i=A;--i>=0;){for(t=0,j=D[i]%v,R=D[i]/v|0,h=a,f=i+h;f>i;)p=I[--h]%v,l=I[h]/v|0,n=R*p+l*j,p=j*p+n%v*v+k[f]+t,t=(p/u|0)+(n/v|0)+R*l,k[f--]=p%u;k[f]=t}return t?++c:k.splice(0,1),H(e,k,c)},y.negated=function(){var e=new s(this);return e.s=-e.s||null,e},y.plus=function(e,r){var t,c=this,i=c.s;if(e=new s(e,r),r=e.s,!i||!r)return new s(NaN);if(i!=r)return e.s=-r,c.minus(e);var f=c.e/$,h=e.e/$,n=c.c,a=e.c;if(!f||!h){if(!n||!a)return new s(i/0);if(!n[0]||!a[0])return a[0]?e:new s(n[0]?c:i*0)}if(f=fe(f),h=fe(h),n=n.slice(),i=f-h){for(i>0?(h=f,t=a):(i=-i,t=n),t.reverse();i--;t.push(0));t.reverse()}for(i=n.length,r=a.length,i-r<0&&(t=a,a=n,n=t,r=i),i=0;r;)i=(n[--r]=n[r]+a[r]+i)/se|0,n[r]=se===n[r]?0:n[r]%se;return i&&(n=[i].concat(n),++h),H(e,n,h)},y.precision=y.sd=function(e,r){var t,c,i,f=this;if(e!=null&&e!==!!e)return Y(e,1,re),r==null?r=O:Y(r,0,8),ee(new s(f),e,r);if(!(t=f.c))return null;if(i=t.length-1,c=i*$+1,i=t[i]){for(;i%10==0;i/=10,c--);for(i=t[0];i>=10;i/=10,c++);}return e&&f.e+1>c&&(c=f.e+1),c},y.shiftedBy=function(e){return Y(e,-rr,rr),this.times("1e"+e)},y.squareRoot=y.sqrt=function(){var e,r,t,c,i,f=this,h=f.c,n=f.s,a=f.e,p=P+4,l=new s("0.5");if(n!==1||!h||!h[0])return new s(!n||n<0&&(!h||h[0])?NaN:h?f:1/0);if(n=Math.sqrt(+ie(f)),n==0||n==1/0?(r=oe(h),(r.length+a)%2==0&&(r+="0"),n=Math.sqrt(+r),a=fe((a+1)/2)-(a<0||a%2),n==1/0?r="5e"+a:(r=n.toExponential(),r=r.slice(0,r.indexOf("e")+1)+a),t=new s(r)):t=new s(n+""),t.c[0]){for(a=t.e,n=a+p,n<3&&(n=0);;)if(i=t,t=l.times(i.plus(g(f,i,p,1))),oe(i.c).slice(0,n)===(r=oe(t.c)).slice(0,n))if(t.e<a&&--n,r=r.slice(n-3,n+1),r=="9999"||!c&&r=="4999"){if(!c&&(ee(i,i.e+P+2,0),i.times(i).eq(f))){t=i;break}p+=4,n+=4,c=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(ee(t,t.e+P+2,1),e=!t.times(t).eq(f));break}}return ee(t,t.e+P+1,O,e)},y.toExponential=function(e,r){return e!=null&&(Y(e,0,re),e++),N(this,e,r,1)},y.toFixed=function(e,r){return e!=null&&(Y(e,0,re),e=e+this.e+1),N(this,e,r)},y.toFormat=function(e,r,t){var c,i=this;if(t==null)e!=null&&r&&typeof r=="object"?(t=r,r=null):e&&typeof e=="object"?(t=e,e=r=null):t=z;else if(typeof t!="object")throw Error(ne+"Argument not an object: "+t);if(c=i.toFixed(e,r),i.c){var f,h=c.split("."),n=+t.groupSize,a=+t.secondaryGroupSize,p=t.groupSeparator||"",l=h[0],A=h[1],j=i.s<0,R=j?l.slice(1):l,k=R.length;if(a&&(f=n,n=a,a=f,k-=f),n>0&&k>0){for(f=k%n||n,l=R.substr(0,f);f<k;f+=n)l+=p+R.substr(f,n);a>0&&(l+=p+R.slice(f)),j&&(l="-"+l)}c=A?l+(t.decimalSeparator||"")+((a=+t.fractionGroupSize)?A.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+(t.fractionGroupSeparator||"")):A):l}return(t.prefix||"")+c+(t.suffix||"")},y.toFraction=function(e){var r,t,c,i,f,h,n,a,p,l,A,j,R=this,k=R.c;if(e!=null&&(n=new s(e),!n.isInteger()&&(n.c||n.s!==1)||n.lt(B)))throw Error(ne+"Argument "+(n.isInteger()?"out of range: ":"not an integer: ")+ie(n));if(!k)return new s(R);for(r=new s(B),p=t=new s(B),c=a=new s(B),j=oe(k),f=r.e=j.length-R.e-1,r.c[0]=tr[(h=f%$)<0?$+h:h],e=!e||n.comparedTo(r)>0?f>0?r:p:n,h=T,T=1/0,n=new s(j),a.c[0]=0;l=g(n,r,0,1),i=t.plus(l.times(c)),i.comparedTo(e)!=1;)t=c,c=i,p=a.plus(l.times(i=p)),a=i,r=n.minus(l.times(i=r)),n=i;return i=g(e.minus(t),c,0,1),a=a.plus(i.times(p)),t=t.plus(i.times(c)),a.s=p.s=R.s,f=f*2,A=g(p,c,f,O).minus(R).abs().comparedTo(g(a,t,f,O).minus(R).abs())<1?[p,c]:[a,t],T=h,A},y.toNumber=function(){return+ie(this)},y.toPrecision=function(e,r){return e!=null&&Y(e,1,re),N(this,e,r,2)},y.toString=function(e){var r,t=this,c=t.s,i=t.e;return i===null?c?(r="Infinity",c<0&&(r="-"+r)):r="NaN":(e==null?r=i<=E||i>=F?Pe(oe(t.c),i):ue(oe(t.c),i,"0"):e===10&&d?(t=ee(new s(t),P+i+1,O),r=ue(oe(t.c),t.e,"0")):(Y(e,2,U.length,"Base"),r=S(ue(oe(t.c),i,"0"),10,e,c,!0)),c<0&&t.c[0]&&(r="-"+r)),r},y.valueOf=y.toJSON=function(){return ie(this)},y._isBigNumber=!0,y[Symbol.toStringTag]="BigNumber",y[Symbol.for("nodejs.util.inspect.custom")]=y.valueOf,o!=null&&s.set(o),s}function fe(o){var g=o|0;return o>0||o===g?g:g-1}function oe(o){for(var g,S,b=1,y=o.length,B=o[0]+"";b<y;){for(g=o[b++]+"",S=$-g.length;S--;g="0"+g);B+=g}for(y=B.length;B.charCodeAt(--y)===48;);return B.slice(0,y+1||1)}function ce(o,g){var S,b,y=o.c,B=g.c,P=o.s,O=g.s,E=o.e,F=g.e;if(!P||!O)return null;if(S=y&&!y[0],b=B&&!B[0],S||b)return S?b?0:-O:P;if(P!=O)return P;if(S=P<0,b=E==F,!y||!B)return b?0:!y^S?1:-1;if(!b)return E>F^S?1:-1;for(O=(E=y.length)<(F=B.length)?E:F,P=0;P<O;P++)if(y[P]!=B[P])return y[P]>B[P]^S?1:-1;return E==F?0:E>F^S?1:-1}function Y(o,g,S,b){if(o<g||o>S||o!==ae(o))throw Error(ne+(b||"Argument")+(typeof o=="number"?o<g||o>S?" out of range: ":" not an integer: ":" not a primitive number: ")+String(o))}function Ee(o){var g=o.c.length-1;return fe(o.e/$)==g&&o.c[g]%2!=0}function Pe(o,g){return(o.length>1?o.charAt(0)+"."+o.slice(1):o)+(g<0?"e":"e+")+g}function ue(o,g,S){var b,y;if(g<0){for(y=S+".";++g;y+=S);o=y+o}else if(b=o.length,++g>b){for(y=S,g-=b;--g;y+=S);o+=y}else g<b&&(o=o.slice(0,g)+"."+o.slice(g));return o}var $r=Zr();const Nn=Object.freeze(Object.defineProperty({__proto__:null,BigNumber:$r,default:$r},Symbol.toStringTag,{value:"Module"}));export{Pn as a,dn as b,Hr as c,an as d,nt as e,Nn as f,xr as g,fn as h,En as r,Mr as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as p,L as m,M as y,N as g,O,Q as k,R as L,U as E,X as h,Y as x}from"./index-C7cxVRDF.js";class M extends p{constructor({callbackSelector:s,cause:e,data:n,extraData:c,sender:u,urls:t}){var i;super(e.shortMessage||"An error occurred while fetching for an offchain result.",{cause:e,metaMessages:[...e.metaMessages||[],(i=e.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",t&&[" Gateway URL(s):",...t.map(f=>` ${m(f)}`)],` Sender: ${u}`,` Data: ${n}`,` Callback selector: ${s}`,` Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class R extends p{constructor({result:s,url:e}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${m(e)}`,`Response: ${y(s)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class $ extends p{constructor({sender:s,to:e}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${e}`,`OffchainLookup sender address: ${s}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}const j="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function v(o,{blockNumber:s,blockTag:e,data:n,to:c}){const{args:u}=g({data:n,abi:[S]}),[t,i,f,a,r]=u,{ccipRead:l}=o,b=l&&typeof(l==null?void 0:l.request)=="function"?l.request:q;try{if(!O(c,t))throw new $({sender:t,to:c});const d=await b({data:f,sender:t,urls:i}),{data:w}=await k(o,{blockNumber:s,blockTag:e,data:L([a,E([{type:"bytes"},{type:"bytes"}],[d,r])]),to:c});return w}catch(d){throw new M({callbackSelector:a,cause:d,data:n,extraData:r,sender:t,urls:i})}}async function q({data:o,sender:s,urls:e}){var c;let n=new Error("An unknown error occurred.");for(let u=0;u<e.length;u++){const t=e[u],i=t.includes("{data}")?"GET":"POST",f=i==="POST"?{data:o,sender:s}:void 0;try{const a=await fetch(t.replace("{sender}",s).replace("{data}",o),{body:JSON.stringify(f),method:i});let r;if((c=a.headers.get("Content-Type"))!=null&&c.startsWith("application/json")?r=(await a.json()).data:r=await a.text(),!a.ok){n=new h({body:f,details:r!=null&&r.error?y(r.error):a.statusText,headers:a.headers,status:a.status,url:t});continue}if(!x(r)){n=new R({result:r,url:t});continue}return r}catch(a){n=new h({body:f,details:a.message,url:t})}}throw n}export{q as ccipRequest,v as offchainLookup,S as offchainLookupAbiItem,j as offchainLookupSignature};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{c as T,e as O}from"./index-C7cxVRDF.js";function U(y,f){for(var h=0;h<f.length;h++){const l=f[h];if(typeof l!="string"&&!Array.isArray(l)){for(const d in l)if(d!=="default"&&!(d in y)){const e=Object.getOwnPropertyDescriptor(l,d);e&&Object.defineProperty(y,d,e.get?e:{enumerable:!0,get:()=>l[d]})}}}return Object.freeze(Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}))}var W={exports:{}},P={exports:{}};/*!
|
|
2
|
-
* Infinite Scroll v2.0.4
|
|
3
|
-
* measure size of elements
|
|
4
|
-
* MIT license
|
|
5
|
-
*/var C;function I(){return C||(C=1,function(y){(function(f,h){y.exports?y.exports=h():f.getSize=h()})(window,function(){function h(s){let g=parseFloat(s);return s.indexOf("%")==-1&&!isNaN(g)&&g}let l=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];function d(){let s={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};return l.forEach(g=>{s[g]=0}),s}function e(s){if(typeof s=="string"&&(s=document.querySelector(s)),!(s&&typeof s=="object"&&s.nodeType))return;let r=getComputedStyle(s);if(r.display=="none")return d();let a={};a.width=s.offsetWidth,a.height=s.offsetHeight;let t=a.isBorderBox=r.boxSizing=="border-box";l.forEach(E=>{let v=r[E],b=parseFloat(v);a[E]=isNaN(b)?0:b});let n=a.paddingLeft+a.paddingRight,u=a.paddingTop+a.paddingBottom,x=a.marginLeft+a.marginRight,i=a.marginTop+a.marginBottom,o=a.borderLeftWidth+a.borderRightWidth,c=a.borderTopWidth+a.borderBottomWidth,p=h(r.width);p!==!1&&(a.width=p+(t?0:n+o));let m=h(r.height);return m!==!1&&(a.height=m+(t?0:u+c)),a.innerWidth=a.width-(n+o),a.innerHeight=a.height-(u+c),a.outerWidth=a.width+x,a.outerHeight=a.height+i,a}return e})}(P)),P.exports}var D={exports:{}},S={exports:{}},L;function j(){return L||(L=1,function(y){(function(f,h){y.exports?y.exports=h():f.EvEmitter=h()})(typeof window<"u"?window:T,function(){function f(){}let h=f.prototype;return h.on=function(l,d){if(!l||!d)return this;let e=this._events=this._events||{},s=e[l]=e[l]||[];return s.includes(d)||s.push(d),this},h.once=function(l,d){if(!l||!d)return this;this.on(l,d);let e=this._onceEvents=this._onceEvents||{},s=e[l]=e[l]||{};return s[d]=!0,this},h.off=function(l,d){let e=this._events&&this._events[l];if(!e||!e.length)return this;let s=e.indexOf(d);return s!=-1&&e.splice(s,1),this},h.emitEvent=function(l,d){let e=this._events&&this._events[l];if(!e||!e.length)return this;e=e.slice(0),d=d||[];let s=this._onceEvents&&this._onceEvents[l];for(let g of e)s&&s[g]&&(this.off(l,g),delete s[g]),g.apply(this,d);return this},h.allOff=function(){return delete this._events,delete this._onceEvents,this},f})}(S)),S.exports}/*!
|
|
6
|
-
* Unidragger v3.0.1
|
|
7
|
-
* Draggable base class
|
|
8
|
-
* MIT license
|
|
9
|
-
*/var M;function k(){return M||(M=1,function(y){(function(f,h){y.exports?y.exports=h(f,j()):f.Unidragger=h(f,f.EvEmitter)})(typeof window<"u"?window:T,function(h,l){function d(){}let e=d.prototype=Object.create(l.prototype);e.handleEvent=function(t){let n="on"+t.type;this[n]&&this[n](t)};let s,g;"ontouchstart"in h?(s="touchstart",g=["touchmove","touchend","touchcancel"]):h.PointerEvent?(s="pointerdown",g=["pointermove","pointerup","pointercancel"]):(s="mousedown",g=["mousemove","mouseup"]),e.touchActionValue="none",e.bindHandles=function(){this._bindHandles("addEventListener",this.touchActionValue)},e.unbindHandles=function(){this._bindHandles("removeEventListener","")},e._bindHandles=function(t,n){this.handles.forEach(u=>{u[t](s,this),u[t]("click",this),h.PointerEvent&&(u.style.touchAction=n)})},e.bindActivePointerEvents=function(){g.forEach(t=>{h.addEventListener(t,this)})},e.unbindActivePointerEvents=function(){g.forEach(t=>{h.removeEventListener(t,this)})},e.withPointer=function(t,n){n.pointerId===this.pointerIdentifier&&this[t](n,n)},e.withTouch=function(t,n){let u;for(let x of n.changedTouches)x.identifier===this.pointerIdentifier&&(u=x);u&&this[t](n,u)},e.onmousedown=function(t){this.pointerDown(t,t)},e.ontouchstart=function(t){this.pointerDown(t,t.changedTouches[0])},e.onpointerdown=function(t){this.pointerDown(t,t)};const r=["TEXTAREA","INPUT","SELECT","OPTION"],a=["radio","checkbox","button","submit","image","file"];return e.pointerDown=function(t,n){let u=r.includes(t.target.nodeName),x=a.includes(t.target.type),i=!u||x;!this.isPointerDown&&!t.button&&i&&(this.isPointerDown=!0,this.pointerIdentifier=n.pointerId!==void 0?n.pointerId:n.identifier,this.pointerDownPointer={pageX:n.pageX,pageY:n.pageY},this.bindActivePointerEvents(),this.emitEvent("pointerDown",[t,n]))},e.onmousemove=function(t){this.pointerMove(t,t)},e.onpointermove=function(t){this.withPointer("pointerMove",t)},e.ontouchmove=function(t){this.withTouch("pointerMove",t)},e.pointerMove=function(t,n){let u={x:n.pageX-this.pointerDownPointer.pageX,y:n.pageY-this.pointerDownPointer.pageY};this.emitEvent("pointerMove",[t,n,u]),!this.isDragging&&this.hasDragStarted(u)&&this.dragStart(t,n),this.isDragging&&this.dragMove(t,n,u)},e.hasDragStarted=function(t){return Math.abs(t.x)>3||Math.abs(t.y)>3},e.dragStart=function(t,n){this.isDragging=!0,this.isPreventingClicks=!0,this.emitEvent("dragStart",[t,n])},e.dragMove=function(t,n,u){this.emitEvent("dragMove",[t,n,u])},e.onmouseup=function(t){this.pointerUp(t,t)},e.onpointerup=function(t){this.withPointer("pointerUp",t)},e.ontouchend=function(t){this.withTouch("pointerUp",t)},e.pointerUp=function(t,n){this.pointerDone(),this.emitEvent("pointerUp",[t,n]),this.isDragging?this.dragEnd(t,n):this.staticClick(t,n)},e.dragEnd=function(t,n){this.isDragging=!1,setTimeout(()=>delete this.isPreventingClicks),this.emitEvent("dragEnd",[t,n])},e.pointerDone=function(){this.isPointerDown=!1,delete this.pointerIdentifier,this.unbindActivePointerEvents(),this.emitEvent("pointerDone")},e.onpointercancel=function(t){this.withPointer("pointerCancel",t)},e.ontouchcancel=function(t){this.withTouch("pointerCancel",t)},e.pointerCancel=function(t,n){this.pointerDone(),this.emitEvent("pointerCancel",[t,n])},e.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},e.staticClick=function(t,n){let u=t.type==="mouseup";u&&this.isIgnoringMouseUp||(this.emitEvent("staticClick",[t,n]),u&&(this.isIgnoringMouseUp=!0,setTimeout(()=>{delete this.isIgnoringMouseUp},400)))},d})}(D)),D.exports}/*!
|
|
10
|
-
* Draggabilly v3.0.0
|
|
11
|
-
* Make that shiz draggable
|
|
12
|
-
* https://draggabilly.desandro.com
|
|
13
|
-
* MIT license
|
|
14
|
-
*/(function(y){(function(f,h){y.exports?y.exports=h(f,I(),k()):f.Draggabilly=h(f,f.getSize,f.Unidragger)})(typeof window<"u"?window:T,function(h,l,d){function e(){}let s=h.jQuery;function g(i,o){this.element=typeof i=="string"?document.querySelector(i):i,s&&(this.$element=s(this.element)),this.options={},this.option(o),this._create()}let r=g.prototype=Object.create(d.prototype);r.option=function(i){this.options={...this.options,...i}};const a=["relative","absolute","fixed"];r._create=function(){this.position={},this._getPosition(),this.startPoint={x:0,y:0},this.dragPoint={x:0,y:0},this.startPosition={...this.position};let i=getComputedStyle(this.element);a.includes(i.position)||(this.element.style.position="relative"),this.on("pointerDown",this.handlePointerDown),this.on("pointerUp",this.handlePointerUp),this.on("dragStart",this.handleDragStart),this.on("dragMove",this.handleDragMove),this.on("dragEnd",this.handleDragEnd),this.setHandles(),this.enable()},r.setHandles=function(){let{handle:i}=this.options;typeof i=="string"?this.handles=this.element.querySelectorAll(i):typeof i=="object"&&i.length?this.handles=i:i instanceof HTMLElement?this.handles=[i]:this.handles=[this.element]};const t=["dragStart","dragMove","dragEnd"];let n=r.emitEvent;r.emitEvent=function(i,o){if(!this.isEnabled&&t.includes(i))return;n.call(this,i,o);let p=h.jQuery;if(!p||!this.$element)return;let m,E=o;o&&o[0]instanceof Event&&([m,...E]=o);let b=p.Event(m);b.type=i,this.$element.trigger(b,E)},r._getPosition=function(){let i=getComputedStyle(this.element),o=this._getPositionCoord(i.left,"width"),c=this._getPositionCoord(i.top,"height");this.position.x=isNaN(o)?0:o,this.position.y=isNaN(c)?0:c,this._addTransformPosition(i)},r._getPositionCoord=function(i,o){if(i.includes("%")){let c=l(this.element.parentNode);return c?parseFloat(i)/100*c[o]:0}return parseInt(i,10)},r._addTransformPosition=function(i){let o=i.transform;if(!o.startsWith("matrix"))return;let c=o.split(","),p=o.startsWith("matrix3d")?12:4,m=parseInt(c[p],10),E=parseInt(c[p+1],10);this.position.x+=m,this.position.y+=E},r.handlePointerDown=function(i,o){this.isEnabled&&(this.pointerDownPointer={pageX:o.pageX,pageY:o.pageY},i.preventDefault(),document.activeElement.blur(),this.bindActivePointerEvents(i),this.element.classList.add("is-pointer-down"))},r.handleDragStart=function(){this.isEnabled&&(this._getPosition(),this.measureContainment(),this.startPosition.x=this.position.x,this.startPosition.y=this.position.y,this.setLeftTop(),this.dragPoint.x=0,this.dragPoint.y=0,this.element.classList.add("is-dragging"),this.animate())},r.measureContainment=function(){let i=this.getContainer();if(!i)return;let o=l(this.element),c=l(i),{borderLeftWidth:p,borderRightWidth:m,borderTopWidth:E,borderBottomWidth:v}=c,b=this.element.getBoundingClientRect(),w=i.getBoundingClientRect(),z=p+m,A=E+v,_=this.relativeStartPosition={x:b.left-(w.left+p),y:b.top-(w.top+E)};this.containSize={width:c.width-z-_.x-o.width,height:c.height-A-_.y-o.height}},r.getContainer=function(){let i=this.options.containment;return i?i instanceof HTMLElement?i:typeof i=="string"?document.querySelector(i):this.element.parentNode:void 0},r.handleDragMove=function(i,o,c){if(!this.isEnabled)return;let p=c.x,m=c.y,E=this.options.grid,v=E&&E[0],b=E&&E[1];p=u(p,v),m=u(m,b),p=this.containDrag("x",p,v),m=this.containDrag("y",m,b),p=this.options.axis=="y"?0:p,m=this.options.axis=="x"?0:m,this.position.x=this.startPosition.x+p,this.position.y=this.startPosition.y+m,this.dragPoint.x=p,this.dragPoint.y=m};function u(i,o,c){return o?(c=c||"round",Math[c](i/o)*o):i}r.containDrag=function(i,o,c){if(!this.options.containment)return o;let p=i=="x"?"width":"height",m=this.relativeStartPosition[i],E=u(-m,c,"ceil"),v=this.containSize[p];return v=u(v,c,"floor"),Math.max(E,Math.min(v,o))},r.handlePointerUp=function(){this.element.classList.remove("is-pointer-down")},r.handleDragEnd=function(){this.isEnabled&&(this.element.style.transform="",this.setLeftTop(),this.element.classList.remove("is-dragging"))},r.animate=function(){this.isDragging&&(this.positionDrag(),requestAnimationFrame(()=>this.animate()))},r.setLeftTop=function(){let{x:i,y:o}=this.position;this.element.style.left=`${i}px`,this.element.style.top=`${o}px`},r.positionDrag=function(){let{x:i,y:o}=this.dragPoint;this.element.style.transform=`translate3d(${i}px, ${o}px, 0)`},r.setPosition=function(i,o){this.position.x=i,this.position.y=o,this.setLeftTop()},r.enable=function(){this.isEnabled||(this.isEnabled=!0,this.bindHandles())},r.disable=function(){this.isEnabled&&(this.isEnabled=!1,this.isDragging&&this.dragEnd(),this.unbindHandles())};const x=["transform","left","top","position"];return r.destroy=function(){this.disable(),x.forEach(i=>{this.element.style[i]=""}),this.unbindHandles(),this.$element&&this.$element.removeData("draggabilly")},r._init=e,s&&s.bridget&&s.bridget("draggabilly",g),g})})(W);var H=W.exports;const R=O(H),B=U({__proto__:null,default:R},[H]);export{B as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as M,s as D,P as U}from"./index-C7cxVRDF.js";var I={exports:{}};(function(l){var o=Object.prototype.hasOwnProperty,e="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(e=!1));function i(u,t,s){this.fn=u,this.context=t,this.once=s||!1}function r(u,t,s,a,_){if(typeof s!="function")throw new TypeError("The listener must be a function");var v=new i(s,a||u,_),d=e?e+t:t;return u._events[d]?u._events[d].fn?u._events[d]=[u._events[d],v]:u._events[d].push(v):(u._events[d]=v,u._eventsCount++),u}function h(u,t){--u._eventsCount===0?u._events=new n:delete u._events[t]}function f(){this._events=new n,this._eventsCount=0}f.prototype.eventNames=function(){var t=[],s,a;if(this._eventsCount===0)return t;for(a in s=this._events)o.call(s,a)&&t.push(e?a.slice(1):a);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(s)):t},f.prototype.listeners=function(t){var s=e?e+t:t,a=this._events[s];if(!a)return[];if(a.fn)return[a.fn];for(var _=0,v=a.length,d=new Array(v);_<v;_++)d[_]=a[_].fn;return d},f.prototype.listenerCount=function(t){var s=e?e+t:t,a=this._events[s];return a?a.fn?1:a.length:0},f.prototype.emit=function(t,s,a,_,v,d){var w=e?e+t:t;if(!this._events[w])return!1;var c=this._events[w],y=arguments.length,b,p;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),y){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,s),!0;case 3:return c.fn.call(c.context,s,a),!0;case 4:return c.fn.call(c.context,s,a,_),!0;case 5:return c.fn.call(c.context,s,a,_,v),!0;case 6:return c.fn.call(c.context,s,a,_,v,d),!0}for(p=1,b=new Array(y-1);p<y;p++)b[p-1]=arguments[p];c.fn.apply(c.context,b)}else{var m=c.length,g;for(p=0;p<m;p++)switch(c[p].once&&this.removeListener(t,c[p].fn,void 0,!0),y){case 1:c[p].fn.call(c[p].context);break;case 2:c[p].fn.call(c[p].context,s);break;case 3:c[p].fn.call(c[p].context,s,a);break;case 4:c[p].fn.call(c[p].context,s,a,_);break;default:if(!b)for(g=1,b=new Array(y-1);g<y;g++)b[g-1]=arguments[g];c[p].fn.apply(c[p].context,b)}}return!0},f.prototype.on=function(t,s,a){return r(this,t,s,a,!1)},f.prototype.once=function(t,s,a){return r(this,t,s,a,!0)},f.prototype.removeListener=function(t,s,a,_){var v=e?e+t:t;if(!this._events[v])return this;if(!s)return h(this,v),this;var d=this._events[v];if(d.fn)d.fn===s&&(!_||d.once)&&(!a||d.context===a)&&h(this,v);else{for(var w=0,c=[],y=d.length;w<y;w++)(d[w].fn!==s||_&&!d[w].once||a&&d[w].context!==a)&&c.push(d[w]);c.length?this._events[v]=c.length===1?c[0]:c:h(this,v)}return this},f.prototype.removeAllListeners=function(t){var s;return t?(s=e?e+t:t,this._events[s]&&h(this,s)):(this._events=new n,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=e,f.EventEmitter=f,l.exports=f})(I);var $=I.exports;const W=M($);var z=function(){var l=function(o,e){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},l(o,e)};return function(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");l(o,e);function n(){this.constructor=o}o.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),R=function(l){z(o,l);function o(){return l!==null&&l.apply(this,arguments)||this}return o}(W),q={exports:{}};(function(l){var o=Object.prototype.hasOwnProperty,e="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(e=!1));function i(u,t,s){this.fn=u,this.context=t,this.once=s||!1}function r(u,t,s,a,_){if(typeof s!="function")throw new TypeError("The listener must be a function");var v=new i(s,a||u,_),d=e?e+t:t;return u._events[d]?u._events[d].fn?u._events[d]=[u._events[d],v]:u._events[d].push(v):(u._events[d]=v,u._eventsCount++),u}function h(u,t){--u._eventsCount===0?u._events=new n:delete u._events[t]}function f(){this._events=new n,this._eventsCount=0}f.prototype.eventNames=function(){var t=[],s,a;if(this._eventsCount===0)return t;for(a in s=this._events)o.call(s,a)&&t.push(e?a.slice(1):a);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(s)):t},f.prototype.listeners=function(t){var s=e?e+t:t,a=this._events[s];if(!a)return[];if(a.fn)return[a.fn];for(var _=0,v=a.length,d=new Array(v);_<v;_++)d[_]=a[_].fn;return d},f.prototype.listenerCount=function(t){var s=e?e+t:t,a=this._events[s];return a?a.fn?1:a.length:0},f.prototype.emit=function(t,s,a,_,v,d){var w=e?e+t:t;if(!this._events[w])return!1;var c=this._events[w],y=arguments.length,b,p;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),y){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,s),!0;case 3:return c.fn.call(c.context,s,a),!0;case 4:return c.fn.call(c.context,s,a,_),!0;case 5:return c.fn.call(c.context,s,a,_,v),!0;case 6:return c.fn.call(c.context,s,a,_,v,d),!0}for(p=1,b=new Array(y-1);p<y;p++)b[p-1]=arguments[p];c.fn.apply(c.context,b)}else{var m=c.length,g;for(p=0;p<m;p++)switch(c[p].once&&this.removeListener(t,c[p].fn,void 0,!0),y){case 1:c[p].fn.call(c[p].context);break;case 2:c[p].fn.call(c[p].context,s);break;case 3:c[p].fn.call(c[p].context,s,a);break;case 4:c[p].fn.call(c[p].context,s,a,_);break;default:if(!b)for(g=1,b=new Array(y-1);g<y;g++)b[g-1]=arguments[g];c[p].fn.apply(c[p].context,b)}}return!0},f.prototype.on=function(t,s,a){return r(this,t,s,a,!1)},f.prototype.once=function(t,s,a){return r(this,t,s,a,!0)},f.prototype.removeListener=function(t,s,a,_){var v=e?e+t:t;if(!this._events[v])return this;if(!s)return h(this,v),this;var d=this._events[v];if(d.fn)d.fn===s&&(!_||d.once)&&(!a||d.context===a)&&h(this,v);else{for(var w=0,c=[],y=d.length;w<y;w++)(d[w].fn!==s||_&&!d[w].once||a&&d[w].context!==a)&&c.push(d[w]);c.length?this._events[v]=c.length===1?c[0]:c:h(this,v)}return this},f.prototype.removeAllListeners=function(t){var s;return t?(s=e?e+t:t,this._events[s]&&h(this,s)):(this._events=new n,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=e,f.EventEmitter=f,l.exports=f})(q);var N=q.exports;const H=M(N);var L=D.Buffer;function B(l){if(l.length>=255)throw new TypeError("Alphabet too long");for(var o=new Uint8Array(256),e=0;e<o.length;e++)o[e]=255;for(var n=0;n<l.length;n++){var i=l.charAt(n),r=i.charCodeAt(0);if(o[r]!==255)throw new TypeError(i+" is ambiguous");o[r]=n}var h=l.length,f=l.charAt(0),u=Math.log(h)/Math.log(256),t=Math.log(256)/Math.log(h);function s(v){if((Array.isArray(v)||v instanceof Uint8Array)&&(v=L.from(v)),!L.isBuffer(v))throw new TypeError("Expected Buffer");if(v.length===0)return"";for(var d=0,w=0,c=0,y=v.length;c!==y&&v[c]===0;)c++,d++;for(var b=(y-c)*t+1>>>0,p=new Uint8Array(b);c!==y;){for(var m=v[c],g=0,x=b-1;(m!==0||g<w)&&x!==-1;x--,g++)m+=256*p[x]>>>0,p[x]=m%h>>>0,m=m/h>>>0;if(m!==0)throw new Error("Non-zero carry");w=g,c++}for(var E=b-w;E!==b&&p[E]===0;)E++;for(var K=f.repeat(d);E<b;++E)K+=l.charAt(p[E]);return K}function a(v){if(typeof v!="string")throw new TypeError("Expected String");if(v.length===0)return L.alloc(0);for(var d=0,w=0,c=0;v[d]===f;)w++,d++;for(var y=(v.length-d)*u+1>>>0,b=new Uint8Array(y);d<v.length;){var p=o[v.charCodeAt(d)];if(p===255)return;for(var m=0,g=y-1;(p!==0||m<c)&&g!==-1;g--,m++)p+=h*b[g]>>>0,b[g]=p%256>>>0,p=p/256>>>0;if(p!==0)throw new Error("Non-zero carry");c=m,d++}for(var x=y-c;x!==y&&b[x]===0;)x++;var E=L.allocUnsafe(w+(y-x));E.fill(0,0,w);for(var K=w;x!==y;)E[K++]=b[x++];return E}function _(v){var d=a(v);if(d)return d;throw new Error("Non-base"+h+" character")}return{encode:s,decodeUnsafe:a,decode:_}}var F=B,G=F,J="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",Q=G(J);const k=M(Q);var A=function(l,o,e,n){function i(r){return r instanceof e?r:new e(function(h){h(r)})}return new(e||(e=Promise))(function(r,h){function f(s){try{t(n.next(s))}catch(a){h(a)}}function u(s){try{t(n.throw(s))}catch(a){h(a)}}function t(s){s.done?r(s.value):i(s.value).then(f,u)}t((n=n.apply(l,o||[])).next())})};class V extends H{constructor(o,e){if(super(),this._network=e,this._publicKey=null,this._popup=null,this._handlerAdded=!1,this._nextRequestId=1,this._autoApprove=!1,this._responsePromises=new Map,this.handleMessage=n=>{var i;if(this._injectedProvider&&n.source===window||n.origin===((i=this._providerUrl)===null||i===void 0?void 0:i.origin)&&n.source===this._popup){if(n.data.method==="connected"){const r=new U(n.data.params.publicKey);(!this._publicKey||!this._publicKey.equals(r))&&(this._publicKey&&!this._publicKey.equals(r)&&this.handleDisconnect(),this._publicKey=r,this._autoApprove=!!n.data.params.autoApprove,this.emit("connect",this._publicKey))}else if(n.data.method==="disconnected")this.handleDisconnect();else if(n.data.result||n.data.error){const r=this._responsePromises.get(n.data.id);if(r){const[h,f]=r;n.data.result?h(n.data.result):f(new Error(n.data.error))}}}},this._beforeUnload=()=>{this.disconnect()},Y(o))this._injectedProvider=o;else if(X(o))this._providerUrl=new URL(o),this._providerUrl.hash=new URLSearchParams({origin:window.location.origin,network:this._network}).toString();else throw new Error("provider parameter must be an injected provider or a URL string.")}handleConnect(){var o;return this._handlerAdded||(this._handlerAdded=!0,window.addEventListener("message",this.handleMessage),window.addEventListener("beforeunload",this._beforeUnload)),this._injectedProvider?new Promise(e=>{this.sendRequest("connect",{}),e()}):(window.name="parent",this._popup=window.open((o=this._providerUrl)===null||o===void 0?void 0:o.toString(),"_blank","location,resizable,width=460,height=675"),new Promise(e=>{this.once("connect",e)}))}handleDisconnect(){this._handlerAdded&&(this._handlerAdded=!1,window.removeEventListener("message",this.handleMessage),window.removeEventListener("beforeunload",this._beforeUnload)),this._publicKey&&(this._publicKey=null,this.emit("disconnect")),this._responsePromises.forEach(([,o],e)=>{this._responsePromises.delete(e),o(new Error("Wallet disconnected"))})}sendRequest(o,e){return A(this,void 0,void 0,function*(){if(o!=="connect"&&!this.connected)throw new Error("Wallet not connected");const n=this._nextRequestId;return++this._nextRequestId,new Promise((i,r)=>{var h,f,u,t;this._responsePromises.set(n,[i,r]),this._injectedProvider?this._injectedProvider.postMessage({jsonrpc:"2.0",id:n,method:o,params:Object.assign({network:this._network},e)}):((h=this._popup)===null||h===void 0||h.postMessage({jsonrpc:"2.0",id:n,method:o,params:e},(u=(f=this._providerUrl)===null||f===void 0?void 0:f.origin)!==null&&u!==void 0?u:""),this.autoApprove||(t=this._popup)===null||t===void 0||t.focus())})})}get publicKey(){return this._publicKey}get connected(){return this._publicKey!==null}get autoApprove(){return this._autoApprove}connect(){return A(this,void 0,void 0,function*(){this._popup&&this._popup.close(),yield this.handleConnect()})}disconnect(){return A(this,void 0,void 0,function*(){this._injectedProvider&&(yield this.sendRequest("disconnect",{})),this._popup&&this._popup.close(),this.handleDisconnect()})}sign(o,e){return A(this,void 0,void 0,function*(){if(!(o instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");const n=yield this.sendRequest("sign",{data:o,display:e}),i=k.decode(n.signature),r=new U(n.publicKey);return{signature:i,publicKey:r}})}signTransaction(o){return A(this,void 0,void 0,function*(){const e=yield this.sendRequest("signTransaction",{message:k.encode(o.serializeMessage())}),n=k.decode(e.signature),i=new U(e.publicKey);return o.addSignature(i,n),o})}signAllTransactions(o){return A(this,void 0,void 0,function*(){const e=yield this.sendRequest("signAllTransactions",{messages:o.map(r=>k.encode(r.serializeMessage()))}),n=e.signatures.map(r=>k.decode(r)),i=new U(e.publicKey);return o=o.map((r,h)=>(r.addSignature(i,n[h]),r)),o})}diffieHellman(o){return A(this,void 0,void 0,function*(){if(!(o instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");return yield this.sendRequest("diffieHellman",{publicKey:o})})}}function X(l){return typeof l=="string"}function Y(l){return Z(l)&&"postMessage"in l&&typeof l.postMessage=="function"}function Z(l){return typeof l=="object"&&l!==null}var ee=function(){var l=function(o,e){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},l(o,e)};return function(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");l(o,e);function n(){this.constructor=o}o.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),P=function(l,o,e,n){function i(r){return r instanceof e?r:new e(function(h){h(r)})}return new(e||(e=Promise))(function(r,h){function f(s){try{t(n.next(s))}catch(a){h(a)}}function u(s){try{t(n.throw(s))}catch(a){h(a)}}function t(s){s.done?r(s.value):i(s.value).then(f,u)}t((n=n.apply(l,o||[])).next())})},T=function(l,o){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,h;return h={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function f(t){return function(s){return u([t,s])}}function u(t){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,i&&(r=t[0]&2?i.return:t[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,t[1])).done)return r;switch(i=0,r&&(t=[t[0]&2,r.value]),t[0]){case 0:case 1:r=t;break;case 4:return e.label++,{value:t[1],done:!1};case 5:e.label++,i=t[1],t=[0];continue;case 7:t=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(t[0]===6||t[0]===2)){e=0;continue}if(t[0]===3&&(!r||t[1]>r[0]&&t[1]<r[3])){e.label=t[1];break}if(t[0]===6&&e.label<r[1]){e.label=r[1],r=t;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(t);break}r[2]&&e.ops.pop(),e.trys.pop();continue}t=o.call(l,e)}catch(s){t=[6,s],i=0}finally{n=r=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}},te=function(l){ee(o,l);function o(e,n){var i=l.call(this)||this;return i._instance=null,i._handleConnect=function(){i.emit("connect")},i._handleDisconnect=function(){window.clearInterval(i._pollTimer),i.emit("disconnect")},i._provider=e,i._network=n,i}return Object.defineProperty(o.prototype,"publicKey",{get:function(){return this._instance.publicKey||null},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"connected",{get:function(){return this._instance.connected||!1},enumerable:!1,configurable:!0}),o.prototype.connect=function(){return P(this,void 0,void 0,function(){var e=this;return T(this,function(n){switch(n.label){case 0:return this._instance=new V(this._provider,this._network),this._instance.on("connect",this._handleConnect),this._instance.on("disconnect",this._handleDisconnect),this._pollTimer=window.setInterval(function(){var i,r;((r=(i=e._instance)===null||i===void 0?void 0:i._popup)===null||r===void 0?void 0:r.closed)!==!1&&e._handleDisconnect()},200),[4,this._instance.connect()];case 1:return n.sent(),[2]}})})},o.prototype.disconnect=function(){return P(this,void 0,void 0,function(){return T(this,function(e){switch(e.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return this._instance.removeAllListeners("connect"),this._instance.removeAllListeners("disconnect"),[4,this._instance.disconnect()];case 1:return e.sent(),[2]}})})},o.prototype.signTransaction=function(e){return P(this,void 0,void 0,function(){return T(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._instance.signTransaction(e)];case 1:return[2,n.sent()]}})})},o.prototype.signAllTransactions=function(e){return P(this,void 0,void 0,function(){return T(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._instance.signAllTransactions(e)];case 1:return[2,n.sent()]}})})},o.prototype.signMessage=function(e,n){return n===void 0&&(n="hex"),P(this,void 0,void 0,function(){var i;return T(this,function(r){switch(r.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._instance.sign(e,n)];case 1:return i=r.sent().signature,[2,Uint8Array.from(i)]}})})},o}(R),ne=function(){var l=function(o,e){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},l(o,e)};return function(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");l(o,e);function n(){this.constructor=o}o.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),C=function(l,o,e,n){function i(r){return r instanceof e?r:new e(function(h){h(r)})}return new(e||(e=Promise))(function(r,h){function f(s){try{t(n.next(s))}catch(a){h(a)}}function u(s){try{t(n.throw(s))}catch(a){h(a)}}function t(s){s.done?r(s.value):i(s.value).then(f,u)}t((n=n.apply(l,o||[])).next())})},S=function(l,o){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,h;return h={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function f(t){return function(s){return u([t,s])}}function u(t){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,i&&(r=t[0]&2?i.return:t[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,t[1])).done)return r;switch(i=0,r&&(t=[t[0]&2,r.value]),t[0]){case 0:case 1:r=t;break;case 4:return e.label++,{value:t[1],done:!1};case 5:e.label++,i=t[1],t=[0];continue;case 7:t=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(t[0]===6||t[0]===2)){e=0;continue}if(t[0]===3&&(!r||t[1]>r[0]&&t[1]<r[3])){e.label=t[1];break}if(t[0]===6&&e.label<r[1]){e.label=r[1],r=t;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(t);break}r[2]&&e.ops.pop(),e.trys.pop();continue}t=o.call(l,e)}catch(s){t=[6,s],i=0}finally{n=r=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}},re=function(l){ne(o,l);function o(e,n){var i=l.call(this)||this;return i._provider=e,i._network=n,i}return Object.defineProperty(o.prototype,"publicKey",{get:function(){return this._provider.publicKey},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"connected",{get:function(){return this._provider.isConnected},enumerable:!1,configurable:!0}),o.prototype.connect=function(){return C(this,void 0,void 0,function(){var e;return S(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),this.connected)throw new Error("Wallet already connected");return[4,this._provider.connect()];case 1:return n.sent(),this.emit("connect"),[3,3];case 2:throw e=n.sent(),this.emit("disconnect"),e;case 3:return[2]}})})},o.prototype.disconnect=function(){return C(this,void 0,void 0,function(){return S(this,function(e){switch(e.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._provider.disconnect()];case 1:return e.sent(),this.emit("disconnect"),[2]}})})},o.prototype.signTransaction=function(e){return C(this,void 0,void 0,function(){return S(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._provider.signTransaction(e,this._network)];case 1:return[2,n.sent()]}})})},o.prototype.signAllTransactions=function(e){return C(this,void 0,void 0,function(){return S(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._provider.signAllTransactions(e,this._network)];case 1:return[2,n.sent()]}})})},o.prototype.signMessage=function(e){return C(this,void 0,void 0,function(){var n;return S(this,function(i){switch(i.label){case 0:if(!this.connected)throw new Error("Wallet not connected");if(!(e instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");return[4,this._provider.signMessage(e)];case 1:return n=i.sent().signature,[2,n]}})})},o}(R),ie=function(){var l=function(o,e){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},l(o,e)};return function(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");l(o,e);function n(){this.constructor=o}o.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),O=function(l,o,e,n){function i(r){return r instanceof e?r:new e(function(h){h(r)})}return new(e||(e=Promise))(function(r,h){function f(s){try{t(n.next(s))}catch(a){h(a)}}function u(s){try{t(n.throw(s))}catch(a){h(a)}}function t(s){s.done?r(s.value):i(s.value).then(f,u)}t((n=n.apply(l,o||[])).next())})},j=function(l,o){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,h;return h={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function f(t){return function(s){return u([t,s])}}function u(t){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,i&&(r=t[0]&2?i.return:t[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,t[1])).done)return r;switch(i=0,r&&(t=[t[0]&2,r.value]),t[0]){case 0:case 1:r=t;break;case 4:return e.label++,{value:t[1],done:!1};case 5:e.label++,i=t[1],t=[0];continue;case 7:t=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(t[0]===6||t[0]===2)){e=0;continue}if(t[0]===3&&(!r||t[1]>r[0]&&t[1]<r[3])){e.label=t[1];break}if(t[0]===6&&e.label<r[1]){e.label=r[1],r=t;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(t);break}r[2]&&e.ops.pop(),e.trys.pop();continue}t=o.call(l,e)}catch(s){t=[6,s],i=0}finally{n=r=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}},se=function(l){ie(o,l);function o(e){var n=l.call(this)||this;return n._network="mainnet-beta",n._adapterInstance=null,n._connectHandler=null,n._connected=function(){n._connectHandler&&(n._connectHandler.resolve(),n._connectHandler=null),n.emit("connect",n.publicKey)},n._disconnected=function(){n._connectHandler&&(n._connectHandler.reject(),n._connectHandler=null),n._adapterInstance=null,n.emit("disconnect")},e!=null&&e.network&&(n._network=e==null?void 0:e.network),e!=null&&e.provider?n._provider=e==null?void 0:e.provider:window.salmon?n._provider=window.salmon:n._provider="https://app.salmonwallet.io",n}return Object.defineProperty(o.prototype,"publicKey",{get:function(){var e;return((e=this._adapterInstance)===null||e===void 0?void 0:e.publicKey)||null},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isConnected",{get:function(){var e;return!!(!((e=this._adapterInstance)===null||e===void 0)&&e.connected)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"connected",{get:function(){return this.isConnected},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"autoApprove",{get:function(){return!1},enumerable:!1,configurable:!0}),o.prototype.connect=function(){return O(this,void 0,void 0,function(){var e=this;return j(this,function(n){switch(n.label){case 0:return this.connected?[2]:(typeof this._provider=="string"?this._adapterInstance=new te(this._provider,this._network):this._adapterInstance=new re(this._provider,this._network),this._adapterInstance.on("connect",this._connected),this._adapterInstance.on("disconnect",this._disconnected),this._adapterInstance.connect(),[4,new Promise(function(i,r){e._connectHandler={resolve:i,reject:r}})]);case 1:return n.sent(),[2]}})})},o.prototype.disconnect=function(){return O(this,void 0,void 0,function(){return j(this,function(e){switch(e.label){case 0:return this._adapterInstance?[4,this._adapterInstance.disconnect()]:[2];case 1:return e.sent(),[2]}})})},o.prototype.signTransaction=function(e){return O(this,void 0,void 0,function(){return j(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signTransaction(e)];case 1:return[2,n.sent()]}})})},o.prototype.signAllTransactions=function(e){return O(this,void 0,void 0,function(){return j(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signAllTransactions(e)];case 1:return[2,n.sent()]}})})},o.prototype.signMessage=function(e,n){return n===void 0&&(n="utf8"),O(this,void 0,void 0,function(){return j(this,function(i){switch(i.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signMessage(e,n)];case 1:return[2,i.sent()]}})})},o.prototype.sign=function(e,n){return n===void 0&&(n="utf8"),O(this,void 0,void 0,function(){return j(this,function(i){switch(i.label){case 0:return[4,this.signMessage(e,n)];case 1:return[2,i.sent()]}})})},o}(W);export{se as default};
|