@dodoex/wallet-web3 0.0.23-1 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/__node-resolve_empty-677ae450.js +1 -0
  2. package/dist/__tslib-74911bf7.js +1 -0
  3. package/dist/{blocto-ba864e5a.js → blocto-601d8616.js} +1 -1
  4. package/dist/{bn-3a6203f5.js → bn-30ec88f1.js} +1 -1
  5. package/dist/{browser-ponyfill-4e5a04fb.js → browser-ponyfill-cef11f3a.js} +1 -1
  6. package/dist/cjs/{__node-resolve_empty-5f97a584.cjs → __node-resolve_empty-96fc5a78.cjs} +1 -1
  7. package/dist/cjs/__tslib-2998aec9.cjs +1 -0
  8. package/dist/cjs/{blocto-d0737f79.cjs → blocto-7a5442b1.cjs} +1 -1
  9. package/dist/cjs/{bn-d9bd266c.cjs → bn-5e8f3717.cjs} +1 -1
  10. package/dist/cjs/{browser-ponyfill-b705432f.cjs → browser-ponyfill-021dd399.cjs} +1 -1
  11. package/dist/cjs/{ethers-ef8ee0db.cjs → ethers-d427da0f.cjs} +1 -1
  12. package/dist/cjs/{id-c6b6423c.cjs → id-921e2cc8.cjs} +1 -1
  13. package/dist/cjs/{index-52ec6901.cjs → index-1c25d16c.cjs} +1 -1
  14. package/dist/cjs/{index-efe57f8e.cjs → index-6550a278.cjs} +1 -1
  15. package/dist/cjs/{index-5da4111e.cjs → index-9c021083.cjs} +1 -1
  16. package/dist/cjs/{index-452e2e4a.cjs → index-9dfe0ec2.cjs} +1 -1
  17. package/dist/cjs/{index-f70dddcf.cjs → index-a131347b.cjs} +1 -1
  18. package/dist/cjs/{index-42901f96.cjs → index-b7937670.cjs} +1 -1
  19. package/dist/cjs/index-c809f2f4.cjs +1 -0
  20. package/dist/cjs/index-c9559f81.cjs +6 -0
  21. package/dist/cjs/index-cabd3880.cjs +9 -0
  22. package/dist/cjs/index.cjs +1 -1
  23. package/dist/cjs/{index.es-83ba3777.cjs → index.es-8858d45b.cjs} +1 -1
  24. package/dist/cjs/{interface-5ed5c8e8.cjs → interface-3127c3dd.cjs} +1 -1
  25. package/dist/cjs/{portis-e3c940b3.cjs → portis-c2c8fe98.cjs} +1 -1
  26. package/dist/cjs/{provider-a95d3367.cjs → provider-bdb0309d.cjs} +1 -1
  27. package/dist/cjs/providers/connector/index.d.ts +0 -2
  28. package/dist/cjs/providers/connector/injected.d.ts +1 -1
  29. package/dist/cjs/{rainbow-6d7f99e8.cjs → rainbow-44243c7b.cjs} +1 -1
  30. package/dist/cjs/{typed-data-11f1866e.cjs → typed-data-34159c56.cjs} +1 -1
  31. package/dist/cjs/{uAuth-96bc1702.cjs → uAuth-431e30a8.cjs} +1 -1
  32. package/dist/cjs/walletConnect-5fad11b2.cjs +1 -0
  33. package/dist/cjs/walletLink-6549fa8a.cjs +1 -0
  34. package/dist/{ethers-cae8ca2f.js → ethers-2f70006d.js} +1 -1
  35. package/dist/{id-5baa4a06.js → id-8eec68c5.js} +1 -1
  36. package/dist/{index-8a23d1f2.js → index-2476a083.js} +1 -1
  37. package/dist/{index-add6de7d.js → index-2dbad8bc.js} +1 -1
  38. package/dist/{index-ac9ac9f8.js → index-516f48be.js} +1 -1
  39. package/dist/{index-b6f91fce.js → index-697913dd.js} +1 -1
  40. package/dist/{index-62d8919e.js → index-6d5e138e.js} +1 -1
  41. package/dist/index-99364a28.js +6 -0
  42. package/dist/index-99ddcdac.js +1 -0
  43. package/dist/{index-7a210334.js → index-e30c9666.js} +1 -1
  44. package/dist/{index-2900ca0e.js → index-eb683b61.js} +2 -2
  45. package/dist/{index.es-7ee571d9.js → index.es-bf27f55c.js} +1 -1
  46. package/dist/index.js +1 -1
  47. package/dist/{interface-be4c7ae7.js → interface-4d0e8ee9.js} +1 -1
  48. package/dist/{portis-63468c9e.js → portis-06d88bb4.js} +1 -1
  49. package/dist/{provider-a63da17a.js → provider-1cfe2ce3.js} +1 -1
  50. package/dist/providers/connector/index.d.ts +0 -2
  51. package/dist/providers/connector/injected.d.ts +1 -1
  52. package/dist/rainbow-79a28aee.js +1 -0
  53. package/dist/{typed-data-95c14374.js → typed-data-d439281a.js} +1 -1
  54. package/dist/{uAuth-16db027d.js → uAuth-28566c10.js} +1 -1
  55. package/dist/walletConnect-2908370b.js +1 -0
  56. package/dist/walletLink-eafcc765.js +1 -0
  57. package/package.json +4 -5
  58. package/dist/__node-resolve_empty-8094ca9f.js +0 -1
  59. package/dist/__tslib-7740bd6c.js +0 -1
  60. package/dist/cjs/__tslib-f499f151.cjs +0 -1
  61. package/dist/cjs/index-30ad4c34.cjs +0 -1
  62. package/dist/cjs/index-345945c0.cjs +0 -72
  63. package/dist/cjs/index-a7b876c9.cjs +0 -1
  64. package/dist/cjs/index-aea81c8a.cjs +0 -6
  65. package/dist/cjs/index-b6e8fbb0.cjs +0 -9
  66. package/dist/cjs/providers/connector/metamask/index.d.ts +0 -4
  67. package/dist/cjs/walletConnect-7b882192.cjs +0 -1
  68. package/dist/cjs/walletLink-28dd49dc.cjs +0 -1
  69. package/dist/index-1c4a137e.js +0 -6
  70. package/dist/index-2c76e820.js +0 -1
  71. package/dist/index-3e230de4.js +0 -1
  72. package/dist/index-e15569dc.js +0 -72
  73. package/dist/providers/connector/metamask/index.d.ts +0 -4
  74. package/dist/rainbow-79898424.js +0 -1
  75. package/dist/walletConnect-8bf2087b.js +0 -1
  76. package/dist/walletLink-075de091.js +0 -1
@@ -1 +1 @@
1
- import{arrayify as e,isBytesLike as t,hexlify as r}from"@ethersproject/bytes";import{shallowCopy as o}from"@ethersproject/properties";import{L as n,t as s,a as i}from"./id-5baa4a06.js";function l(t){t=atob(t);const r=[];for(let e=0;e<t.length;e++)r.push(t.charCodeAt(e));return e(r)}function c(t){t=e(t);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}var a=function(e,t,r,o){return new(r||(r=Promise))((function(n,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function l(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}c((o=o.apply(e,t||[])).next())}))};function u(t,r){return a(this,void 0,void 0,(function*(){null==r&&(r={});const o={method:r.method||"GET",headers:r.headers||{},body:r.body||void 0};if(!0!==r.skipFetchSetup&&(o.mode="cors",o.cache="no-cache",o.credentials="same-origin",o.redirect="follow",o.referrer="client"),null!=r.fetchOptions){const e=r.fetchOptions;e.mode&&(o.mode=e.mode),e.cache&&(o.cache=e.cache),e.credentials&&(o.credentials=e.credentials),e.redirect&&(o.redirect=e.redirect),e.referrer&&(o.referrer=e.referrer)}const n=yield fetch(t,o),s=yield n.arrayBuffer(),i={};return n.headers.forEach?n.headers.forEach(((e,t)=>{i[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{i[e.toLowerCase()]=n.headers.get(e)})),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:e(new Uint8Array(s))}}))}var h=function(e,t,r,o){return new(r||(r=Promise))((function(n,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function l(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}c((o=o.apply(e,t||[])).next())}))};const d=new n("web/5.7.1");function f(e){return new Promise((t=>{setTimeout(t,e)}))}function p(e,o){if(null==e)return null;if("string"==typeof e)return e;if(t(e)){if(o&&("text"===o.split("/")[0]||"application/json"===o.split(";")[0].trim()))try{return i(e)}catch(e){}return r(e)}return e}function y(e,t,r){const i="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;d.assertArgument(i>0&&i%1==0,"invalid connection throttle limit","connection.throttleLimit",i);const a="object"==typeof e?e.throttleCallback:null,y="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;d.assertArgument(y>0&&y%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",y);const m="object"==typeof e&&!!e.errorPassThrough,E={};let b=null;const g={method:"GET"};let w=!1,R=12e4;if("string"==typeof e)b=e;else if("object"==typeof e){if(null!=e&&null!=e.url||d.throwArgumentError("missing URL","connection.url",e),b=e.url,"number"==typeof e.timeout&&e.timeout>0&&(R=e.timeout),e.headers)for(const t in e.headers)E[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(w=!0);if(g.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==b.substring(0,6)&&!0!==e.allowInsecureAuthentication&&d.throwError("basic authentication requires a secure https url",n.errors.INVALID_ARGUMENT,{argument:"url",url:b,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;E.authorization={key:"Authorization",value:"Basic "+c(s(t))}}null!=e.skipFetchSetup&&(g.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(g.fetchOptions=o(e.fetchOptions))}const v=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),C=b?b.match(v):null;if(C)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":C[1]||"text/plain"},body:C[2]?l(C[3]):(S=C[3],s(S.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){d.throwError("processing response error",n.errors.SERVER_ERROR,{body:p(C[1],C[2]),error:e,requestBody:null,requestMethod:"GET",url:b})}var S;t&&(g.method="POST",g.body=t,null==E["content-type"]&&(E["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==E["content-length"]&&(E["content-length"]={key:"Content-Length",value:String(t.length)}));const O={};Object.keys(E).forEach((e=>{const t=E[e];O[t.key]=t.value})),g.headers=O;const T=function(){let e=null;return{promise:new Promise((function(t,r){R&&(e=setTimeout((()=>{null!=e&&(e=null,r(d.makeError("timeout",n.errors.TIMEOUT,{requestBody:p(g.body,O["content-type"]),requestMethod:g.method,timeout:R,url:b})))}),R))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),k=function(){return h(this,void 0,void 0,(function*(){for(let e=0;e<i;e++){let t=null;try{if(t=yield u(b,g),e<i)if(301===t.statusCode||302===t.statusCode){const e=t.headers.location||"";if("GET"===g.method&&e.match(/^https:/)){b=t.headers.location;continue}}else if(429===t.statusCode){let r=!0;if(a&&(r=yield a(e,b)),r){let r=0;const o=t.headers["retry-after"];r="string"==typeof o&&o.match(/^[1-9][0-9]*$/)?1e3*parseInt(o):y*parseInt(String(Math.random()*Math.pow(2,e))),yield f(r);continue}}}catch(e){t=e.response,null==t&&(T.cancel(),d.throwError("missing response",n.errors.SERVER_ERROR,{requestBody:p(g.body,O["content-type"]),requestMethod:g.method,serverError:e,url:b}))}let o=t.body;if(w&&304===t.statusCode?o=null:!m&&(t.statusCode<200||t.statusCode>=300)&&(T.cancel(),d.throwError("bad response",n.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:p(o,t.headers?t.headers["content-type"]:null),requestBody:p(g.body,O["content-type"]),requestMethod:g.method,url:b})),r)try{const e=yield r(o,t);return T.cancel(),e}catch(r){if(r.throttleRetry&&e<i){let t=!0;if(a&&(t=yield a(e,b)),t){const t=y*parseInt(String(Math.random()*Math.pow(2,e)));yield f(t);continue}}T.cancel(),d.throwError("processing response error",n.errors.SERVER_ERROR,{body:p(o,t.headers?t.headers["content-type"]:null),error:r,requestBody:p(g.body,O["content-type"]),requestMethod:g.method,url:b})}return T.cancel(),o}return d.throwError("failed response",n.errors.SERVER_ERROR,{requestBody:p(g.body,O["content-type"]),requestMethod:g.method,url:b})}))}();return Promise.race([T.promise,k])}function m(e,t,r){let l=null;if(null!=t){l=s(t);const r="string"==typeof e?{url:e}:o(e);if(r.headers){0!==Object.keys(r.headers).filter((e=>"content-type"===e.toLowerCase())).length||(r.headers=o(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return y(e,l,((e,t)=>{let o=null;if(null!=e)try{o=JSON.parse(i(e))}catch(t){d.throwError("invalid JSON",n.errors.SERVER_ERROR,{body:e,error:t})}return r&&(o=r(o,t)),o}))}function E(e,t){return t||(t={}),null==(t=o(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,o){let n=null,s=!1;const i=()=>!s&&(s=!0,n&&clearTimeout(n),!0);t.timeout&&(n=setTimeout((()=>{i()&&o(new Error("timeout"))}),t.timeout));const l=t.retryLimit;let c=0;!function n(){return e().then((function(e){if(void 0!==e)i()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",n);else if(t.onceBlock)t.onceBlock.once("block",n);else if(!s){if(c++,c>l)return void(i()&&o(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,c)));e<t.floor&&(e=t.floor),e>t.ceiling&&(e=t.ceiling),setTimeout(n,e)}return null}),(function(e){i()&&o(e)}))}()}))}var b=Object.freeze({__proto__:null,_fetchData:y,fetchJson:m,poll:E});export{y as _,l as d,c as e,m as f,b as l,E as p};
1
+ import{arrayify as e,isBytesLike as t,hexlify as r}from"@ethersproject/bytes";import{shallowCopy as o}from"@ethersproject/properties";import{L as n,t as s,a as i}from"./id-8eec68c5.js";function l(t){t=atob(t);const r=[];for(let e=0;e<t.length;e++)r.push(t.charCodeAt(e));return e(r)}function c(t){t=e(t);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}var a=function(e,t,r,o){return new(r||(r=Promise))((function(n,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function l(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}c((o=o.apply(e,t||[])).next())}))};function u(t,r){return a(this,void 0,void 0,(function*(){null==r&&(r={});const o={method:r.method||"GET",headers:r.headers||{},body:r.body||void 0};if(!0!==r.skipFetchSetup&&(o.mode="cors",o.cache="no-cache",o.credentials="same-origin",o.redirect="follow",o.referrer="client"),null!=r.fetchOptions){const e=r.fetchOptions;e.mode&&(o.mode=e.mode),e.cache&&(o.cache=e.cache),e.credentials&&(o.credentials=e.credentials),e.redirect&&(o.redirect=e.redirect),e.referrer&&(o.referrer=e.referrer)}const n=yield fetch(t,o),s=yield n.arrayBuffer(),i={};return n.headers.forEach?n.headers.forEach(((e,t)=>{i[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{i[e.toLowerCase()]=n.headers.get(e)})),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:e(new Uint8Array(s))}}))}var h=function(e,t,r,o){return new(r||(r=Promise))((function(n,s){function i(e){try{c(o.next(e))}catch(e){s(e)}}function l(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}c((o=o.apply(e,t||[])).next())}))};const d=new n("web/5.7.1");function f(e){return new Promise((t=>{setTimeout(t,e)}))}function p(e,o){if(null==e)return null;if("string"==typeof e)return e;if(t(e)){if(o&&("text"===o.split("/")[0]||"application/json"===o.split(";")[0].trim()))try{return i(e)}catch(e){}return r(e)}return e}function y(e,t,r){const i="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;d.assertArgument(i>0&&i%1==0,"invalid connection throttle limit","connection.throttleLimit",i);const a="object"==typeof e?e.throttleCallback:null,y="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;d.assertArgument(y>0&&y%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",y);const m="object"==typeof e&&!!e.errorPassThrough,E={};let g=null;const w={method:"GET"};let b=!1,R=12e4;if("string"==typeof e)g=e;else if("object"==typeof e){if(null!=e&&null!=e.url||d.throwArgumentError("missing URL","connection.url",e),g=e.url,"number"==typeof e.timeout&&e.timeout>0&&(R=e.timeout),e.headers)for(const t in e.headers)E[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(b=!0);if(w.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==g.substring(0,6)&&!0!==e.allowInsecureAuthentication&&d.throwError("basic authentication requires a secure https url",n.errors.INVALID_ARGUMENT,{argument:"url",url:g,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;E.authorization={key:"Authorization",value:"Basic "+c(s(t))}}null!=e.skipFetchSetup&&(w.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(w.fetchOptions=o(e.fetchOptions))}const v=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),C=g?g.match(v):null;if(C)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":C[1]||"text/plain"},body:C[2]?l(C[3]):(S=C[3],s(S.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){d.throwError("processing response error",n.errors.SERVER_ERROR,{body:p(C[1],C[2]),error:e,requestBody:null,requestMethod:"GET",url:g})}var S;t&&(w.method="POST",w.body=t,null==E["content-type"]&&(E["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==E["content-length"]&&(E["content-length"]={key:"Content-Length",value:String(t.length)}));const O={};Object.keys(E).forEach((e=>{const t=E[e];O[t.key]=t.value})),w.headers=O;const T=function(){let e=null;return{promise:new Promise((function(t,r){R&&(e=setTimeout((()=>{null!=e&&(e=null,r(d.makeError("timeout",n.errors.TIMEOUT,{requestBody:p(w.body,O["content-type"]),requestMethod:w.method,timeout:R,url:g})))}),R))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),k=function(){return h(this,void 0,void 0,(function*(){for(let e=0;e<i;e++){let t=null;try{if(t=yield u(g,w),e<i)if(301===t.statusCode||302===t.statusCode){const e=t.headers.location||"";if("GET"===w.method&&e.match(/^https:/)){g=t.headers.location;continue}}else if(429===t.statusCode){let r=!0;if(a&&(r=yield a(e,g)),r){let r=0;const o=t.headers["retry-after"];r="string"==typeof o&&o.match(/^[1-9][0-9]*$/)?1e3*parseInt(o):y*parseInt(String(Math.random()*Math.pow(2,e))),yield f(r);continue}}}catch(e){t=e.response,null==t&&(T.cancel(),d.throwError("missing response",n.errors.SERVER_ERROR,{requestBody:p(w.body,O["content-type"]),requestMethod:w.method,serverError:e,url:g}))}let o=t.body;if(b&&304===t.statusCode?o=null:!m&&(t.statusCode<200||t.statusCode>=300)&&(T.cancel(),d.throwError("bad response",n.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:p(o,t.headers?t.headers["content-type"]:null),requestBody:p(w.body,O["content-type"]),requestMethod:w.method,url:g})),r)try{const e=yield r(o,t);return T.cancel(),e}catch(r){if(r.throttleRetry&&e<i){let t=!0;if(a&&(t=yield a(e,g)),t){const t=y*parseInt(String(Math.random()*Math.pow(2,e)));yield f(t);continue}}T.cancel(),d.throwError("processing response error",n.errors.SERVER_ERROR,{body:p(o,t.headers?t.headers["content-type"]:null),error:r,requestBody:p(w.body,O["content-type"]),requestMethod:w.method,url:g})}return T.cancel(),o}return d.throwError("failed response",n.errors.SERVER_ERROR,{requestBody:p(w.body,O["content-type"]),requestMethod:w.method,url:g})}))}();return Promise.race([T.promise,k])}function m(e,t,r){let l=null;if(null!=t){l=s(t);const r="string"==typeof e?{url:e}:o(e);if(r.headers){0!==Object.keys(r.headers).filter((e=>"content-type"===e.toLowerCase())).length||(r.headers=o(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return y(e,l,((e,t)=>{let o=null;if(null!=e)try{o=JSON.parse(i(e))}catch(t){d.throwError("invalid JSON",n.errors.SERVER_ERROR,{body:e,error:t})}return r&&(o=r(o,t)),o}))}function E(e,t){return t||(t={}),null==(t=o(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,o){let n=null,s=!1;const i=()=>!s&&(s=!0,n&&clearTimeout(n),!0);t.timeout&&(n=setTimeout((()=>{i()&&o(new Error("timeout"))}),t.timeout));const l=t.retryLimit;let c=0;!function n(){return e().then((function(e){if(void 0!==e)i()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",n);else if(t.onceBlock)t.onceBlock.once("block",n);else if(!s){if(c++,c>l)return void(i()&&o(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,c)));e<t.floor&&(e=t.floor),e>t.ceiling&&(e=t.ceiling),setTimeout(n,e)}return null}),(function(e){i()&&o(e)}))}()}))}var g=Object.freeze({__proto__:null,_fetchData:y,fetchJson:m,poll:E});export{y as _,l as d,c as e,m as f,g as l,E as p};