apify-client 3.0.0-beta.107 → 3.0.0-beta.108
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/bundle.js +6 -6
- package/dist/bundle.js.map +1 -1
- package/dist/http_clients/axios.d.ts +5 -3
- package/dist/http_clients/axios.js +16 -6
- package/dist/http_clients/base.d.ts +8 -2
- package/dist/http_clients/base.js +8 -2
- package/dist/resource_clients/actor_server.d.ts +4 -3
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! LICENSE: bundle.js.LICENSE.txt */
|
|
2
|
-
var e={v(e,t,r){var n=r("z");let i=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,o=()=>{let e={enabled:void 0!==n&&"0"!==n.env.FORCE_COLOR,visible:!0,styles:{},keys:{}},t=(e,t,r)=>"function"==typeof e?e(t):e.wrap(t,r),o=(r,n)=>{if(""===r||null==r)return"";if(!1===e.enabled)return r;if(!1===e.visible)return"";let i=""+r,o=i.includes("\n"),a=n.length;for(a>0&&n.includes("unstyle")&&(n=[...new Set(["unstyle",...n])].reverse());a-- >0;)i=t(e.styles[n[a]],i,o);return i},a=(t,r,n)=>{var i;let a,s,l;e.styles[t]=(a=(i={name:t,codes:r}).open=`\x1b[${i.codes[0]}m`,s=i.close=`\x1b[${i.codes[1]}m`,l=i.regex=RegExp(`\\u001b\\[${i.codes[1]}m`,"g"),i.wrap=(e,t)=>{e.includes(s)&&(e=e.replace(l,s+a));let r=a+e+s;return t?r.replace(/\r*\n/g,`${s}$&${a}`):r},i),(e.keys[n]||(e.keys[n]=[])).push(t),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,set(r){e.alias(t,r)},get(){let r=e=>o(e,r.stack);return Reflect.setPrototypeOf(r,e),r.stack=this.stack?this.stack.concat(t):[t],r}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),e.ansiRegex=i,e.hasColor=e.hasAnsi=t=>(e.ansiRegex.lastIndex=0,"string"==typeof t&&""!==t&&e.ansiRegex.test(t)),e.alias=(t,r)=>{let n="string"==typeof r?e[r]:r;if("function"!=typeof n)throw TypeError("Expected alias to be the name of an existing color (string) or a function");n.stack||(Reflect.defineProperty(n,"name",{value:t}),e.styles[t]=n,n.stack=[t]),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,set(r){e.alias(t,r)},get(){let t=e=>o(e,t.stack);return Reflect.setPrototypeOf(t,e),t.stack=this.stack?this.stack.concat(n.stack):n.stack,t}})},e.theme=t=>{if(!(null!==t&&"object"==typeof t&&!Array.isArray(t)))throw TypeError("Expected theme to be an object");for(let r of Object.keys(t))e.alias(r,t[r]);return e},e.alias("unstyle",t=>"string"==typeof t&&""!==t?(e.ansiRegex.lastIndex=0,t.replace(e.ansiRegex,"")):""),e.alias("noop",e=>e),e.none=e.clear=e.noop,e.stripColor=e.unstyle,e.symbols=r("L"),e.define=a,e};e.exports=o(),e.exports.create=o},L(e,t,r){var n=r("z");let i=void 0!==n&&"Hyper"===n.env.TERM_PROGRAM,o=void 0!==n&&"win32"===n.platform,a=void 0!==n&&"linux"===n.platform,s={ballotDisabled:"☒",ballotOff:"☐",ballotOn:"☑",bullet:"•",bulletWhite:"◦",fullBlock:"█",heart:"❤",identicalTo:"≡",line:"─",mark:"※",middot:"·",minus:"-",multiplication:"×",obelus:"÷",pencilDownRight:"✎",pencilRight:"✏",pencilUpRight:"✐",percent:"%",pilcrow2:"❡",pilcrow:"¶",plusMinus:"±",question:"?",section:"§",starsOff:"☆",starsOn:"★",upDownArrow:"↕"},l=Object.assign({},s,{check:"√",cross:"×",ellipsisLarge:"...",ellipsis:"...",info:"i",questionSmall:"?",pointer:">",pointerSmall:"»",radioOff:"( )",radioOn:"(*)",warning:"‼"}),u=Object.assign({},s,{ballotCross:"✘",check:"✔",cross:"✖",ellipsisLarge:"⋯",ellipsis:"…",info:"ℹ",questionFull:"?",questionSmall:"﹖",pointer:a?"▸":"❯",pointerSmall:a?"‣":"›",radioOff:"◯",radioOn:"◉",warning:"⚠"});e.exports=o&&!i?l:u,Reflect.defineProperty(e.exports,"common",{enumerable:!1,value:s}),Reflect.defineProperty(e.exports,"windows",{enumerable:!1,value:l}),Reflect.defineProperty(e.exports,"other",{enumerable:!1,value:u})},JO(e,t){t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,o=l(e),a=o[0],s=o[1],u=new i((a+s)*3/4-s),c=0,p=s>0?a-4:a;for(r=0;r<p;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(function(e,t,n){for(var i,o=[],a=t;a<n;a+=3)i=(e[a]<<16&0xff0000)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,a,a+16383>s?s:a+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="u">typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},d(e,t,r){var n=r("JO"),i=r("r"),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var n=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!s.isEncoding(i))throw TypeError("Unknown encoding: "+i);var o=0|h(n,i),l=a(o),u=l.write(n,i);return u!==o&&(l=l.slice(0,u)),l}if(ArrayBuffer.isView(e)){var c=e;if(C(c,Uint8Array)){var m=new Uint8Array(c);return d(m.buffer,m.byteOffset,m.byteLength)}return p(c)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(C(e,ArrayBuffer)||e&&C(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(C(e,SharedArrayBuffer)||e&&C(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var g=e.valueOf&&e.valueOf();if(null!=g&&g!==e)return s.from(g,t,r);var y=function(e){if(s.isBuffer(e)){var t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?a(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(y)return y;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),a(e<0?0:0|f(e))}function p(e){for(var t=e.length<0?0:0|f(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),s.prototype),n}function f(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return T(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return A(e).length;default:if(i)return n?-1:T(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var i,o,a,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=k[e[o]];return i}(this,t,r);case"utf8":case"utf-8":return v(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return i=this,o=t,a=r,0===o&&a===i.length?n.fromByteArray(i):n.fromByteArray(i.slice(o,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(this,t,r);default:if(s)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){var o;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return b(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,s/=2,l/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=r;o<s;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*a}else -1!==c&&(o-=o-c),c=-1}else for(r+l>s&&(r=s-l),o=r;o>=0;o--){for(var p=!0,d=0;d<l;d++)if(u(e,o+d)!==u(t,d)){p=!1;break}if(p)return o}return -1}function v(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,l,u=e[i],c=null,p=u>239?4:u>223?3:u>191?2:1;if(i+p<=r)switch(p){case 1:u<128&&(c=u);break;case 2:(192&(o=e[i+1]))==128&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],(192&o)==128&&(192&a)==128&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],(192&o)==128&&(192&a)==128&&(192&s)==128&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,p=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=p}var d=n,f=d.length;if(f<=4096)return String.fromCharCode.apply(String,d);for(var h="",m=0;m<f;)h+=String.fromCharCode.apply(String,d.slice(m,m+=4096));return h}function w(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,i,o){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function E(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function S(e,t,r,n,o){return t*=1,r>>>=0,o||E(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function O(e,t,r,n,o){return t*=1,r>>>=0,o||E(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!s.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return(u(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(C(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),C(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=s.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(C(o,Uint8Array))i+o.length>n.length?s.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else if(s.isBuffer(o))o.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?v(this,0,e):m.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,i){if(C(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,a=r-t,l=Math.min(o,a),u=this.slice(n,i),c=e.slice(t,r),p=0;p<l;++p)if(u[p]!==c[p]){o=u[p],a=c[p];break}return o<a?-1:+(a<o)},s.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,a,s,l,u,c,p,d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var f=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s,l=parseInt(t.substr(2*a,2),16);if((s=l)!=s)break;e[r+a]=l}return a}(this,e,t,r);case"utf8":case"utf-8":return i=t,o=r,x(T(e,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return a=t,s=r,x(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,a,s);case"base64":return l=t,u=r,x(A(e),this,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,p=r,x(function(e,t){for(var r,n,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(e,this.length-c),this,c,p);default:if(f)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var o=1,a=0;for(this[t]=255&e;++a<r&&(o*=256);)this[t+a]=e/o&255;return t+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return S(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return S(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return O(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return O(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var a=s.isBuffer(e)?e:s.from(e,n),l=a.length;if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=a[i%l]}return this};var R=/[^+/0-9A-Za-z-_]/g;function T(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function A(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function x(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function C(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var k=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},q(e){var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(r,n){var i,o,a;function s(r){e.removeListener(t,l),n(r)}function l(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}m(e,t,l,{once:!0}),"error"!==t&&(i=e,o=s,a={once:!0},"function"==typeof i.on&&m(i,"error",o,a))})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var i,o,a,u=Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,console&&console.warn&&console.warn(u)}return e}function c(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):h(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function h(e,t){for(var r=Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else if("function"==typeof e.addEventListener)e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var a,s=Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else for(var u=l.length,c=h(l,u),r=0;r<u;++r)n(c[r],this,t);return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,a;if(s(t),void 0===(n=this._events)||void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},r(e,t){t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<<s)-1,u=l>>1,c=-7,p=r?i-1:0,d=r?-1:1,f=e[t+p];for(p+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+p],p+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+p],p+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?0/0:(f?-1:1)*2e308;a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,p=c>>1,d=5960464477539062e-23*(23===i),f=n?0:o-1,h=n?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||1/0===t?(s=+!!isNaN(t),a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+p>=1?t+=d/l:t+=d*Math.pow(2,1-p),t*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(t*l-1)*Math.pow(2,i),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&s,f+=h,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[r+f]=255&a,f+=h,a/=256,u-=8);e[r+f-h]|=128*m}},c5(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},z(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var l=[],u=!1,c=-1;function p(){u&&n&&(u=!1,n.length?l=n.concat(l):c=-1,l.length&&d())}function d(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(n=l,l=[];++c<t;)n&&n[c].run();c=-1,t=l.length}n=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new f(e,t)),1!==l.length||u||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},K(e,t,r){var n=r("d"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},c(e,t,r){e.exports=i;var n=r("q").EventEmitter;function i(){n.call(this)}r("c5")(i,n),i.Readable=r("e"),i.Writable=r("ep"),i.Duplex=r("F"),i.Transform=r("h"),i.PassThrough=r("zM"),i.finished=r("n"),i.pipeline=r("Kx"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",l),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",u),e.on("error",u),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},x(e){var t={};function r(e,r,n){n||(n=Error);var i=function(e){function t(t,n,i){return e.call(this,"string"==typeof r?r:r(t,n,i))||this}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e,t}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(!Array.isArray(e))return"of ".concat(t," ").concat(String(e));var r=e.length;return(e=e.map(function(e){return String(e)}),r>2)?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(l="must not be",t=t.replace(/^not /,"")):l="must be",o=" argument",(void 0===a||a>e.length)&&(a=e.length),e.substring(a-o.length,a)===o)u="The ".concat(e," ").concat(l," ").concat(n(t,"type"));else{var i,o,a,s,l,u,c=("number"!=typeof s&&(s=0),s+1>e.length||-1===e.indexOf(".",s))?"argument":"property";u='The "'.concat(e,'" ').concat(c," ").concat(l," ").concat(n(t,"type"))}return u+". Received type ".concat(typeof r)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},F(e,t,r){var n=r("z"),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var o=r("e"),a=r("ep");r("c5")(c,o);for(var s=i(a.prototype),l=0;l<s.length;l++){var u=s[l];c.prototype[u]||(c.prototype[u]=a.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",p)))}function p(){this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},zM(e,t,r){e.exports=i;var n=r("h");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r("c5")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},e(e,t,r){var n,i,o,a,s,l=r("z");e.exports=R,R.ReadableState=O,r("q").EventEmitter;var u=function(e,t){return e.listeners(t).length},c=r("J"),p=r("d").Buffer,d=(void 0!==r.g?r.g:"u">typeof window?window:"u">typeof self?self:{}).Uint8Array||function(){},f=r("b");i=f&&f.debuglog?f.debuglog("stream"):function(){};var h=r("LP"),m=r("w"),g=r("G").getHighWaterMark,y=r("x").F,b=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,w=y.ERR_METHOD_NOT_IMPLEMENTED,_=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r("c5")(R,c);var E=m.errorOrDestroy,S=["error","close","destroy","pause","resume"];function O(e,t,i){n=n||r("F"),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(o||(o=r("t").I),this.decoder=new o(e.encoding),this.encoding=e.encoding)}function R(e){if(n=n||r("F"),!(this instanceof R))return new R(e);var t=this instanceof n;this._readableState=new O(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function T(e,t,r,n,o){i("readableAddChunk",t);var a,s,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?C(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,k(e)))}}(e,l);else if(o||(s=function(e,t){var r;return p.isBuffer(t)||t instanceof d||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t)),r}(l,t)),s)E(e,s);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===p.prototype||(a=t,t=p.from(a)),n)l.endEmitted?E(e,new _):A(e,l,t,!0);else if(l.ended)E(e,new v);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!r?(t=l.decoder.write(t),l.objectMode||0!==t.length?A(e,l,t,!1):P(e,l)):A(e,l,t,!1)}else n||(l.reading=!1,P(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function A(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&C(e)),P(e,t)}function x(e,t){var r;if(e<=0||0===t.length&&t.ended)return 0;if(t.objectMode)return 1;if(e!=e)if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length;return(e>t.highWaterMark&&((r=e)>=0x40000000?r=0x40000000:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),t.highWaterMark=r),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function C(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,l.nextTick(k,e))}function k(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,z(e)}function P(e,t){t.readingMore||(t.readingMore=!0,l.nextTick(U,e,t))}function U(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(i("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function I(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){i("readable nexttick read 0"),e.read(0)}function L(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),z(e),t.flowing&&!t.reading&&e.read(0)}function z(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function D(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,l.nextTick($,t,e))}function $(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function M(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),R.prototype.destroy=m.destroy,R.prototype._undestroy=m.undestroy,R.prototype._destroy=function(e,t){t(e)},R.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=p.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},R.prototype.unshift=function(e){return T(this,e,null,!0,!1)},R.prototype.isPaused=function(){return!1===this._readableState.flowing},R.prototype.setEncoding=function(e){o||(o=r("t").I);var t=new o(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this},R.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t,r=this._readableState,n=e;if(0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return i("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?D(this):C(this),null;if(0===(e=x(e,r))&&r.ended)return 0===r.length&&D(this),null;var o=r.needReadable;return i("need readable",o),(0===r.length||r.length-e<r.highWaterMark)&&i("length less than watermark",o=!0),r.ended||r.reading?i("reading or ended",o=!1):o&&(i("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=x(n,r))),null===(t=e>0?j(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&D(this)),null!==t&&this.emit("data",t),t},R.prototype._read=function(e){E(this,new w("_read()"))},R.prototype.pipe=function(e,t){var r,n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,i("pipe count=%d opts=%j",o.pipesCount,t);var a=t&&!1===t.end||e===l.stdout||e===l.stderr?g:s;function s(){i("onend"),e.end()}o.endEmitted?l.nextTick(a):n.once("end",a),e.on("unpipe",function t(r,a){i("onunpipe"),r===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,i("cleanup"),e.removeListener("close",h),e.removeListener("finish",m),e.removeListener("drain",c),e.removeListener("error",f),e.removeListener("unpipe",t),n.removeListener("end",s),n.removeListener("end",g),n.removeListener("data",d),p=!0,o.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c())});var c=(r=n,function(){var e=r._readableState;i("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&u(r,"data")&&(e.flowing=!0,z(r))});e.on("drain",c);var p=!1;function d(t){i("ondata");var r=e.write(t);i("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==M(o.pipes,e))&&!p&&(i("false write response, pause",o.awaitDrain),o.awaitDrain++),n.pause())}function f(t){i("onerror",t),g(),e.removeListener("error",f),0===u(e,"error")&&E(e,t)}function h(){e.removeListener("finish",m),g()}function m(){i("onfinish"),e.removeListener("close",h),g()}function g(){i("unpipe"),n.unpipe(e)}return n.on("data",d),!function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",h),e.once("finish",m),e.emit("pipe",n),o.flowing||(i("pipe resume"),n.resume()),e},R.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=M(t.pipes,e);return -1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},R.prototype.on=function(e,t){var r=c.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?C(this):n.reading||l.nextTick(N,this)),r},R.prototype.addListener=R.prototype.on,R.prototype.removeListener=function(e,t){var r=c.prototype.removeListener.call(this,e,t);return"readable"===e&&l.nextTick(I,this),r},R.prototype.removeAllListeners=function(e){var t=c.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&l.nextTick(I,this),t},R.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(i("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,l.nextTick(L,e,t))),r.paused=!1,this},R.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},R.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))}),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a<S.length;a++)e.on(S[a],this.emit.bind(this,S[a]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(R.prototype[Symbol.asyncIterator]=function(){return void 0===a&&(a=r("tm")),a(this)}),Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(R.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(R.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),R._fromList=j,Object.defineProperty(R.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(R.from=function(e,t){return void 0===s&&(s=r("s")),s(R,e,t)})},h(e,t,r){e.exports=c;var n=r("x").F,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,l=r("F");function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);l.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",p)}function p(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush(function(t,r){d(e,t,r)})}function d(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r("c5")(c,l),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new i("_transform()"))},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,function(e){t(e)})}},ep(e,t,r){var n,i,o=r("z");function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){var r=t,n=e,i=r.entry;for(r.entry=null;i;){var o=i.callback;n.pendingcb--,o(void 0),i=i.next}n.corkedRequestsFree.next=r}}e.exports=R,R.WritableState=O;var s={deprecate:r("N")},l=r("J"),u=r("d").Buffer,c=(void 0!==r.g?r.g:"u">typeof window?window:"u">typeof self?self:{}).Uint8Array||function(){},p=r("w"),d=r("G").getHighWaterMark,f=r("x").F,h=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,y=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,w=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,E=p.errorOrDestroy;function S(){}function O(e,t,i){n=n||r("F"),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)--r.pendingcb,n?(o.nextTick(i,t),o.nextTick(P,e,r),e._writableState.errorEmitted=!0,E(e,t)):(i(t),e._writableState.errorEmitted=!0,E(e,t),P(e,r));else{var a=C(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||x(e,r),n?o.nextTick(A,e,r,a,i):A(e,r,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}r("c5")(R,l),O.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};try{Object.defineProperty(O.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}function R(e){var t=this instanceof(n=n||r("F"));if(!t&&!i.call(R,this))return new R(e);this._writableState=new O(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function T(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function A(e,t,r,n){var i,o;r||(i=e,0===(o=t).length&&o.needDrain&&(o.needDrain=!1,i.emit("drain"))),t.pendingcb--,n(),P(e,t)}function x(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=Array(t.bufferedRequestCount),i=t.corkedRequestsFree;i.entry=r;for(var o=0,s=!0;r;)n[o]=r,r.isBuf||(s=!1),r=r.next,o+=1;n.allBuffers=s,T(e,t,!0,t.length,n,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,p=t.objectMode?1:l.length;if(T(e,t,!1,p,l,u,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(r){t.pendingcb--,r&&E(e,r),t.prefinished=!0,e.emit("prefinish"),P(e,t)})}function P(e,t){var r=C(t);if(r&&(t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,o.nextTick(k,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(R,Symbol.hasInstance,{value:function(e){return!!i.call(this,e)||this===R&&e&&e._writableState instanceof O}})):i=function(e){return e instanceof this},R.prototype.pipe=function(){E(this,new y)},R.prototype.write=function(e,t,r){var n,i,a,s,l,p,d,f=this._writableState,m=!1,g=!f.objectMode&&(n=e,u.isBuffer(n)||n instanceof c);return(g&&!u.isBuffer(e)&&(i=e,e=u.from(i)),"function"==typeof t&&(r=t,t=null),g?t="buffer":t||(t=f.defaultEncoding),"function"!=typeof r&&(r=S),f.ending)?(a=r,E(this,s=new w),o.nextTick(a,s)):(g||(l=e,p=r,null===l?d=new v:"string"==typeof l||f.objectMode||(d=new h("chunk",["string","Buffer"],l)),!d||(E(this,d),o.nextTick(p,d),0)))&&(f.pendingcb++,m=function(e,t,r,n,i,o){if(!r){var a,s,l=(a=n,s=i,t.objectMode||!1===t.decodeStrings||"string"!=typeof a||(a=u.from(a,s)),a);n!==l&&(r=!0,i="buffer",n=l)}var c=t.objectMode?1:n.length;t.length+=c;var p=t.length<t.highWaterMark;if(p||(t.needDrain=!0),t.writing||t.corked){var d=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},d?d.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,c,n,i,o);return p}(this,f,g,e,t,r)),m},R.prototype.cork=function(){this._writableState.corked++},R.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||x(this,e))},R.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(e,t,r){r(new m("_write()"))},R.prototype._writev=null,R.prototype.end=function(e,t,r){var n,i,a,s=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),s.corked&&(s.corked=1,this.uncork()),s.ending||(n=this,i=s,a=r,i.ending=!0,P(n,i),a&&(i.finished?o.nextTick(a):n.once("finish",a)),i.ended=!0,n.writable=!1),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),R.prototype.destroy=p.destroy,R.prototype._undestroy=p.undestroy,R.prototype._destroy=function(e,t){t(e)}},tm(e,t,r){var n,i=r("z");function o(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r("n"),s=Symbol("lastResolve"),l=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),p=Symbol("lastPromise"),d=Symbol("handlePromise"),f=Symbol("stream");function h(e,t){return{value:e,done:t}}function m(e){var t=e[s];if(null!==t){var r=e[f].read();null!==r&&(e[p]=null,e[s]=null,e[l]=null,t(h(r,!1)))}}function g(e){i.nextTick(m,e)}var y=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((o(n={get stream(){return this[f]},next:function(){var e,t,r=this,n=this[u];if(null!==n)return Promise.reject(n);if(this[c])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(e,t){i.nextTick(function(){r[u]?t(r[u]):e(h(void 0,!0))})});var o=this[p];if(o)t=new Promise((e=this,function(t,r){o.then(function(){e[c]?t(h(void 0,!0)):e[d](t,r)},r)}));else{var a=this[f].read();if(null!==a)return Promise.resolve(h(a,!1));t=new Promise(this[d])}return this[p]=t,t}},Symbol.asyncIterator,function(){return this}),o(n,"return",function(){var e=this;return new Promise(function(t,r){e[f].destroy(null,function(e){e?r(e):t(h(void 0,!0))})})}),n),y);e.exports=function(e){var t,r=Object.create(b,(o(t={},f,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,l,{value:null,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,c,{value:e._readableState.endEmitted,writable:!0}),o(t,d,{value:function(e,t){var n=r[f].read();n?(r[p]=null,r[s]=null,r[l]=null,e(h(n,!1))):(r[s]=e,r[l]=t)},writable:!0}),t));return r[p]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[l];null!==t&&(r[p]=null,r[s]=null,r[l]=null,t(e)),r[u]=e;return}var n=r[s];null!==n&&(r[p]=null,r[s]=null,r[l]=null,n(h(void 0,!0))),r[c]=!0}),e.on("readable",g.bind(null,r)),r}},LP(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=o(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var a=r("d").Buffer,s=r("o").inspect,l=s&&s.custom||"inspect";e.exports=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.head=null,this.tail=null,this.length=0}return e=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n=a.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=i.data,r=o,a.prototype.copy.call(t,n,r),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return s(this,i(i({},t),{},{depth:0,customInspect:!1}))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}()},w(e,t,r){var n=r("z");function i(e,t){a(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(o,r),t(e)):n.nextTick(o,r)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},n(e,t,r){var n=r("x").F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),a=o||i,s=!1,o=function(){if(!s){s=!0;for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];a.apply(this,t)}};var a,s,l=r.readable||!1!==r.readable&&t.readable,u=r.writable||!1!==r.writable&&t.writable,c=function(){t.writable||d()},p=t._writableState&&t._writableState.finished,d=function(){u=!1,p=!0,l||o.call(t)},f=t._readableState&&t._readableState.endEmitted,h=function(){l=!1,f=!0,u||o.call(t)},m=function(e){o.call(t,e)},g=function(){var e;return l&&!f?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):u&&!p?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},y=function(){t.req.on("finish",d)};return t.setHeader&&"function"==typeof t.abort?(t.on("complete",d),t.on("abort",g),t.req?y():t.on("request",y)):u&&!t._writableState&&(t.on("end",c),t.on("close",c)),t.on("end",h),t.on("finish",d),!1!==r.error&&t.on("error",m),t.on("close",g),function(){t.removeListener("complete",d),t.removeListener("abort",g),t.removeListener("request",y),t.req&&t.req.removeListener("finish",d),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",d),t.removeListener("end",h),t.removeListener("error",m),t.removeListener("close",g)}}},s(e){e.exports=function(){throw Error("Readable.from is not available in the browser")}},Kx(e,t,r){var n,i=r("x").F,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function l(e){e()}function u(e,t){return e.pipe(t)}e.exports=function(){for(var e,t,i=arguments.length,c=Array(i),p=0;p<i;p++)c[p]=arguments[p];var d=(e=c).length&&"function"==typeof e[e.length-1]?e.pop():s;if(Array.isArray(c[0])&&(c=c[0]),c.length<2)throw new o("streams");var f=c.map(function(e,i){var o,s,u,p,h,m,g=i<c.length-1;return o=i>0,u=s=function(e){t||(t=e),e&&f.forEach(l),g||(f.forEach(l),d(t))},p=!1,s=function(){p||(p=!0,u.apply(void 0,arguments))},h=!1,e.on("close",function(){h=!0}),void 0===n&&(n=r("n")),n(e,{readable:g,writable:o},function(e){if(e)return s(e);h=!0,s()}),m=!1,function(t){if(!h&&!m){if(m=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();s(t||new a("pipe"))}}});return c.reduce(u)}},G(e,t,r){var n=r("x").F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=null!=t.highWaterMark?t.highWaterMark:i?t[r]:null;if(null!=o){if(!(isFinite(o)&&Math.floor(o)===o)||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},J(e,t,r){e.exports=r("q").EventEmitter},t(e,t,r){var n=r("K").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){var t;if(!e)return"utf8";for(;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=p,t=3;break;default:this.write=d,this.end=f;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},N(e,t,r){e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}};function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}},o(){},b(){}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t,n)=>{var i=(t,n)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[n]:t[i]})};i(t,"get"),i(n,"value")},r.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{let e,t,i,o,a,s,l,u,c,p,d,f,h,m,g;r.d(n,{TD:()=>f6,B:()=>f8,h0:()=>d6,XP:()=>d8,v8:()=>f7,G7:()=>d9,Lu:()=>fe,vp:()=>fi,Jo:()=>fa,UP:()=>lI,rj:()=>hj,VI:()=>lP,Ns:()=>lH,yD:()=>u2,Ip:()=>uC,kt:()=>dY,KW:()=>d0,fK:()=>lD,wb:()=>fh,wv:()=>hi,yY:()=>fs,qQ:()=>lz,_:()=>uP,Qq:()=>uG,tY:()=>lN,rE:()=>uz,PD:()=>fE,lE:()=>hl,ss:()=>dK,kq:()=>dH,m_:()=>lj,O_:()=>fr,OE:()=>l$,oc:()=>fj,oW:()=>hp,dK:()=>lG,Ry:()=>fK,Ng:()=>fG,Hg:()=>ft,L6:()=>hf,Ty:()=>hg,gP:()=>lM,py:()=>hb,YS:()=>dV,t1:()=>hS,jE:()=>hR,D_:()=>lL,jx:()=>hT,F:()=>hC,J_:()=>fX,hH:()=>hk,zC:()=>hx,_l:()=>d7,fu:()=>uI});var y,b,v,w,_,E,S,O,R,T,A,x,C,k,P,U,I,N,L,z,j,D={};function $(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function M(e,t="|"){return e.map(e=>es(e)).join(t)}function B(e,t){return"bigint"==typeof t?t.toString():t}r.r(D),r.d(D,{hasBrowserEnv:()=>a3,hasStandardBrowserEnv:()=>a6,hasStandardBrowserWebWorkerEnv:()=>a5,navigator:()=>a9,origin:()=>a8});let F=class Cached{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}};function q(e){return new F(e)}function W(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Z(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function K(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function H(e){return K(e._zod.def)??e._zod.def.shape}function V(e,t,r){Object.defineProperty(e,t,{get(){let e=r();return Z(this,t,e),e},enumerable:!0,configurable:!0})}function G(e,t,r){t in e?Z(e,t,r):e[t]=r}function J(e,t,r,n){let i=H(t);for(let o of r){let r=Object.getOwnPropertyDescriptor(i,o);r.enumerable&&(r.get?V(e,o,()=>{let e=t._zod.def.shape[o];return n?n(e,o):e}):G(e,o,n?n(r.value,o):r.value))}}function Y(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}let X="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Q(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let ee=q(()=>{if(eI.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function et(e){if(!1===Q(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==Q(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function er(e){return et(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let en=new Set(["string","number","symbol"]);function ei(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function eo(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function ea(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function es(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}let el={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},eu={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function ec(e,t){let r=H(e),n=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&n.push(e)}return n}function ep(e,t){let r={};J(r,e,Reflect.ownKeys(H(e)));for(let e of Reflect.ownKeys(t)){let n=Object.getOwnPropertyDescriptor(t,e);n.enumerable&&(n.get?V(r,e,()=>t[e]):G(r,e,n.value))}return r}function ed(e,t,r,n="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${n}() cannot be used on object schemas containing refinements`);let o=r?new Set(ec(t,r)):void 0,a={};return J(a,t,Reflect.ownKeys(H(t)),e&&((t,r)=>o&&!o.has(r)?t:new e({type:"optional",innerType:t}))),eo(t,Y(t._zod.def,{shape:a,checks:[]}))}function ef(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function eh(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function em(e){return"string"==typeof e?e:e?.message}function eg(e){let t=[];for(let r of e??[]){let e=r._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let n=e.maximum??e.length??e.size;n>=0&&t.push([n,r])}return t}function ey(e,t,r){var n;for(let i=t;i<e.length;i++)(n=e[i]).schema??(n.schema=r)}function eb(e,t,r){let n=e.inst?._zod?.traits;n?.has("$ZodType")&&(n.has("$ZodCheck")?e.schema??(e.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,o=e.message?e.message:em(e.inst?._zod.def?.error?.(e))??em(i?.(e))??em(t?.error?.(e))??em(r.customError?.(e))??em(r.localeError?.(e))??"Invalid input",a={};for(let t of Object.keys(e))"inst"!==t&&"schema"!==t&&"continue"!==t&&"input"!==t&&"__proto__"!==t&&(a[t]=e[t]);return a.path??(a.path=[]),a.message=o,t?.reportInput&&(a.input=e.input),a}let ev=/[\uD800-\uDBFF]/;function ew(e){let t=e.length;if(!ev.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(64512&e.charCodeAt(n))==55296&&(64512&e.charCodeAt(n+1))==56320&&(r--,n++);return r}function e_(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function eE(...e){let[t,r,n]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:n}:{...t}}function eS(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}function eO(e,t){for(let r in e){let n=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return eS(this,r,n(this))},set(e){eS(this,r,e)}})}return t}let eR=!1,eT={configurable:!0,get(){eR=!0}};function eA(t,r,n){let i=Object.getPrototypeOf(t._zod);if(r in i&&e!==t._zod){e=void 0;return}e=t._zod,Object.defineProperty(i,r,{configurable:!0,get(){Object.defineProperty(this,r,eT);let e=eR;eR=!1;try{let t=n(this);return eR?delete this[r]:Object.defineProperty(this,r,{configurable:!0,writable:!0,value:t}),eR=eR||e,t}catch(t){throw delete this[r],eR=eR||e,t}},set(e){Object.defineProperty(this,r,{configurable:!0,writable:!0,value:e})}})}let ex={value:void 0,enumerable:!1},eC="captureStackTrace"in Error?Error:null;function ek(e,t,r,n){function i(e){this.def=e,this.constr=u,this.traits=new Set}i.prototype={};let o=r&&new WeakSet;function a(n,a){if(n._zod){if(n._zod.traits.has(e))return}else{ex.value=new i(a);try{Object.defineProperty(n,"_zod",ex)}finally{ex.value=void 0}}if(n._zod.traits.add(e),t(n,a),o){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,i=e;for(;i&&i!==t;)i=Object.getPrototypeOf(i);let a=i??e;if(!o.has(a)){o.add(a);for(let e in r){let t=Object.getOwnPropertyDescriptor(r,e);t.get?Object.defineProperty(a,e,{...t,enumerable:!1}):function(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:eS(this,t,r.bind(this))},set(e){eS(this,t,e)}})}(a,e,t.value)}}}let s=u.prototype;for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&(e in n||(n[e]=s[e].bind(n)))}let s=n?.Parent??Object;let l=class Definition extends s{};function u(e){let t=n?.Parent?function(e){let t=eC;if(t){let r=t.stackTraceLimit;if("number"==typeof r){try{t.stackTraceLimit=0}catch{return eC=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}(l):this;a(t,e);let r=t._zod.deferred;if(r){for(let e of r)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(l,"name",{value:e}),Object.defineProperty(u,"init",{value:a}),Object.defineProperty(u,Symbol.hasInstance,{value:t=>!!n?.Parent&&t instanceof n.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}let eP=class $ZodAsyncError extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};let eU=class $ZodEncodeError extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(U=globalThis).__zod_globalConfig??(U.__zod_globalConfig={});let eI=globalThis.__zod_globalConfig;function eN(e){return e&&Object.assign(eI,e),eI}let eL=class $ZodCyclicError extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}};let ez="~memo",ej=[];function eD(e){return null!==e&&"object"==typeof e}function e$(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}let eM=new WeakMap,eB=[],eF={alloc(e,r,n){let i=t;if(!i)return n;t=void 0;let o={value:n,issues:null};return i.set(r.value,o),eB.push(o),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,r=(e,r)=>{var n,i;let o;if("backward"!==r.direction&&(n=r,i=e.value,void 0!==(o=n[ez]?.backEdges)&&eD(i)&&o.has(i)))throw new eL;return t(e,r)};e._zod.parse=r,e._zod.run===t&&(e._zod.run=r)})},attach(e){var r;let n,i,o,a=!1;(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,s=(l,u)=>{let c;if(void 0===n){let t=function e(t,r,n){var i,o;let a=eM.get(t);if(void 0!==a)return 2*!!a;if(r.has(t))return 2;r.add(t);let s=0,l=t=>{if(2!==s&&t?._zod){let i=e(t,r,n);i>s&&(s=i)}},u=e=>{e>s&&(s=e)},c=t._zod.def;switch(c.type){case"object":{let t=K(c);u(t?((t,i)=>{let o=0;for(let a of Reflect.ownKeys(t)){let s=Object.getOwnPropertyDescriptor(t,a);if(i&&!s.enumerable)continue;let l=s.get?1:s.value?._zod?e(s.value,r,n):0;l>o&&(o=l)}return o})(t,!0):1),l(c.catchall);break}case"array":l(c.element);break;case"tuple":for(let e of c.items)l(e);l(c.rest);break;case"record":case"map":l(c.keyType),l(c.valueType);break;case"set":l(c.valueType);break;case"union":for(let e of c.options)l(e);break;case"intersection":l(c.left),l(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":l(c.innerType);break;case"pipe":l(c.in),l(c.out);break;case"function":l(c.input),l(c.output);break;case"lazy":{let i=c._cachedInner??(n?t._zod.innerType:void 0);u(i?e(i,r,!1):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let r=t.value;if(r&&"object"==typeof r){if(r._zod)l(r);else if(Array.isArray(r))for(let e of r)l(e)}}}return r.delete(t),i=t,1!==(o=s)&&eM.set(i,2===o),o}(e,new Set,!1);if(0===t)return e._zod.parse=r,e._zod.run===s&&(e._zod.run=r),r(l,u);2===t||a?n=!0:a=!0}let p=l.value;if(!eD(p))return r(l,u);let d=u[ez];if(d||(d={buckets:new WeakMap,backEdges:void 0},u[ez]=d),i===u)c=o;else{var f;let t;(t=(f=d).buckets.get(e))||(t=new WeakMap,f.buckets.set(e,t)),c=t,i=u,o=c}let h=c.get(p);if(h)return l.value=h.value,h.issues?h.issues.length&&l.issues.push(...e$(h.issues)):(l.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(h.value)),l;t=c;let m=eB.length,g=r(l,u);t=void 0;let y=eB.length>m?eB.pop():void 0;return g instanceof Promise?g.then(e=>(y&&(y.issues=e.issues.length?e$(e.issues):ej),e)):(y&&(y.issues=g.issues.length?e$(g.issues):ej),g)};e._zod.parse=s,e._zod.run===r&&(e._zod.run=s)})}},eq=/^[cC][0-9a-z]{6,}$/,eW=/^[0-9a-z]+$/,eZ=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,eK=/^[0-9a-vA-V]{20}$/,eH=/^[A-Za-z0-9]{27}$/,eV=/^[a-zA-Z0-9_-]{21}$/,eG=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,eJ=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,eY=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,eX=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,eQ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,e0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,e1=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,e2=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,e4=/^https?$/,e3=/^\+[1-9]\d{6,14}$/,e9="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",e6=RegExp(`^${e9}$`);function e5(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let e8=/^[\s\S]{0,}$/,e7=/^-?\d+$/,te=/^-?\d+(?:\.\d+)?$/,tt=/^(?:true|false)$/i,tr=/^null$/i,tn=/^[^A-Z]*$/,ti=/^[^a-z]*$/,to=ek("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),ta=e=>{let t=e.value;return null!=t&&void 0!==t.length},ts={number:"number",bigint:"bigint",object:"date"},tl=ek("$ZodCheckLessThan",(e,t)=>{to.init(e,t);let r=ts[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:ts[typeof n.value]??r,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tu=ek("$ZodCheckGreaterThan",(e,t)=>{to.init(e,t);let r=ts[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:ts[typeof n.value]??r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tc=ek("$ZodCheckMultipleOf",(e,t)=>{to.init(e,t),e._zod.check=r=>{let n,i,o;if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):0==(i=Math.round(n=r.value/t.value),o=4*Number.EPSILON*Math.max(Math.abs(n),1),Math.abs(n-i)<o?0:n-i))||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),tp=ek("$ZodCheckNumberFormat",(e,t)=>{to.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,o]=el[t.format];e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s))return void a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}))}s<i&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),td=ek("$ZodCheckMaxLength",(e,t)=>{var r;to.init(e,t),(r=e._zod.def).when??(r.when=ta),e._zod.check=r=>{let n=r.value,i=n.length;if(("string"==typeof n&&i>t.maximum?ew(n):i)<=t.maximum)return;let o=e_(n);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),tf=ek("$ZodCheckMinLength",(e,t)=>{var r;to.init(e,t),(r=e._zod.def).when??(r.when=ta),e._zod.check=r=>{let n=r.value,i=n.length;if(("string"==typeof n&&i>=t.minimum&&i<2*t.minimum?ew(n):i)>=t.minimum)return;let o=e_(n);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),th=ek("$ZodCheckLengthEquals",(e,t)=>{var r;to.init(e,t),(r=e._zod.def).when??(r.when=ta),e._zod.check=r=>{let n=r.value,i=n.length,o="string"==typeof n&&i>=t.length&&i<=2*t.length?ew(n):i;if(o===t.length)return;let a=e_(n),s=o>t.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),tm=ek("$ZodCheckStringFormat",(e,t)=>{var r,n;to.init(e,t),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),tg=ek("$ZodCheckRegex",(e,t)=>{tm.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ty=ek("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=tn),tm.init(e,t)}),tb=ek("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ti),tm.init(e,t)}),tv=ek("$ZodCheckIncludes",(e,t)=>{to.init(e,t);let r=ei(t.includes),n=new RegExp("number"==typeof t.position?`^.{${t.position},}${r}`:r);t.pattern=n,e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),tw=ek("$ZodCheckStartsWith",(e,t)=>{to.init(e,t);let r=RegExp(`^${ei(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),t_=ek("$ZodCheckEndsWith",(e,t)=>{to.init(e,t);let r=RegExp(`.*${ei(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});function tE(e,t,r){e.issues.length&&t.issues.push(...eh(r,e.issues))}let tS=ek("$ZodCheckProperties",(e,t)=>{let r;to.init(e,t),eS(e,Symbol.iterator,function*(){yield e},!1),e._zod.check=n=>{let i;if(null==n.value)return void n.issues.push({expected:"object",code:"invalid_type",input:n.value,inst:e});r??(r=Reflect.ownKeys(t.shape).map(e=>[e,t.shape[e]]));let o=n.value;for(let[e,t]of r){let r=t._zod.run({value:o[e],issues:[]},{});r instanceof Promise?(i??(i=[]),i.push(r.then(t=>tE(t,n,e)))):tE(r,n,e)}if(i)return Promise.all(i).then(()=>void 0)}}),tO=ek("$ZodCheckOverwrite",(e,t)=>{to.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});let tR=class Doc{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
2
|
+
var e={v(e,t,r){var n=r("z");let i=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,o=()=>{let e={enabled:void 0!==n&&"0"!==n.env.FORCE_COLOR,visible:!0,styles:{},keys:{}},t=(e,t,r)=>"function"==typeof e?e(t):e.wrap(t,r),o=(r,n)=>{if(""===r||null==r)return"";if(!1===e.enabled)return r;if(!1===e.visible)return"";let i=""+r,o=i.includes("\n"),a=n.length;for(a>0&&n.includes("unstyle")&&(n=[...new Set(["unstyle",...n])].reverse());a-- >0;)i=t(e.styles[n[a]],i,o);return i},a=(t,r,n)=>{var i;let a,s,l;e.styles[t]=(a=(i={name:t,codes:r}).open=`\x1b[${i.codes[0]}m`,s=i.close=`\x1b[${i.codes[1]}m`,l=i.regex=RegExp(`\\u001b\\[${i.codes[1]}m`,"g"),i.wrap=(e,t)=>{e.includes(s)&&(e=e.replace(l,s+a));let r=a+e+s;return t?r.replace(/\r*\n/g,`${s}$&${a}`):r},i),(e.keys[n]||(e.keys[n]=[])).push(t),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,set(r){e.alias(t,r)},get(){let r=e=>o(e,r.stack);return Reflect.setPrototypeOf(r,e),r.stack=this.stack?this.stack.concat(t):[t],r}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),e.ansiRegex=i,e.hasColor=e.hasAnsi=t=>(e.ansiRegex.lastIndex=0,"string"==typeof t&&""!==t&&e.ansiRegex.test(t)),e.alias=(t,r)=>{let n="string"==typeof r?e[r]:r;if("function"!=typeof n)throw TypeError("Expected alias to be the name of an existing color (string) or a function");n.stack||(Reflect.defineProperty(n,"name",{value:t}),e.styles[t]=n,n.stack=[t]),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,set(r){e.alias(t,r)},get(){let t=e=>o(e,t.stack);return Reflect.setPrototypeOf(t,e),t.stack=this.stack?this.stack.concat(n.stack):n.stack,t}})},e.theme=t=>{if(!(null!==t&&"object"==typeof t&&!Array.isArray(t)))throw TypeError("Expected theme to be an object");for(let r of Object.keys(t))e.alias(r,t[r]);return e},e.alias("unstyle",t=>"string"==typeof t&&""!==t?(e.ansiRegex.lastIndex=0,t.replace(e.ansiRegex,"")):""),e.alias("noop",e=>e),e.none=e.clear=e.noop,e.stripColor=e.unstyle,e.symbols=r("L"),e.define=a,e};e.exports=o(),e.exports.create=o},L(e,t,r){var n=r("z");let i=void 0!==n&&"Hyper"===n.env.TERM_PROGRAM,o=void 0!==n&&"win32"===n.platform,a=void 0!==n&&"linux"===n.platform,s={ballotDisabled:"☒",ballotOff:"☐",ballotOn:"☑",bullet:"•",bulletWhite:"◦",fullBlock:"█",heart:"❤",identicalTo:"≡",line:"─",mark:"※",middot:"·",minus:"-",multiplication:"×",obelus:"÷",pencilDownRight:"✎",pencilRight:"✏",pencilUpRight:"✐",percent:"%",pilcrow2:"❡",pilcrow:"¶",plusMinus:"±",question:"?",section:"§",starsOff:"☆",starsOn:"★",upDownArrow:"↕"},l=Object.assign({},s,{check:"√",cross:"×",ellipsisLarge:"...",ellipsis:"...",info:"i",questionSmall:"?",pointer:">",pointerSmall:"»",radioOff:"( )",radioOn:"(*)",warning:"‼"}),u=Object.assign({},s,{ballotCross:"✘",check:"✔",cross:"✖",ellipsisLarge:"⋯",ellipsis:"…",info:"ℹ",questionFull:"?",questionSmall:"﹖",pointer:a?"▸":"❯",pointerSmall:a?"‣":"›",radioOff:"◯",radioOn:"◉",warning:"⚠"});e.exports=o&&!i?l:u,Reflect.defineProperty(e.exports,"common",{enumerable:!1,value:s}),Reflect.defineProperty(e.exports,"windows",{enumerable:!1,value:l}),Reflect.defineProperty(e.exports,"other",{enumerable:!1,value:u})},JO(e,t){t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,o=l(e),a=o[0],s=o[1],u=new i((a+s)*3/4-s),c=0,p=s>0?a-4:a;for(r=0;r<p;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(function(e,t,n){for(var i,o=[],a=t;a<n;a+=3)i=(e[a]<<16&0xff0000)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,a,a+16383>s?s:a+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="u">typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},d(e,t,r){var n=r("JO"),i=r("r"),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var n=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!s.isEncoding(i))throw TypeError("Unknown encoding: "+i);var o=0|h(n,i),l=a(o),u=l.write(n,i);return u!==o&&(l=l.slice(0,u)),l}if(ArrayBuffer.isView(e)){var c=e;if(C(c,Uint8Array)){var m=new Uint8Array(c);return d(m.buffer,m.byteOffset,m.byteLength)}return p(c)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(C(e,ArrayBuffer)||e&&C(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(C(e,SharedArrayBuffer)||e&&C(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var g=e.valueOf&&e.valueOf();if(null!=g&&g!==e)return s.from(g,t,r);var y=function(e){if(s.isBuffer(e)){var t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?a(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(y)return y;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),a(e<0?0:0|f(e))}function p(e){for(var t=e.length<0?0:0|f(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),s.prototype),n}function f(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return T(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return A(e).length;default:if(i)return n?-1:T(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var i,o,a,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=k[e[o]];return i}(this,t,r);case"utf8":case"utf-8":return v(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return i=this,o=t,a=r,0===o&&a===i.length?n.fromByteArray(i):n.fromByteArray(i.slice(o,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(this,t,r);default:if(s)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){var o;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return b(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,s/=2,l/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=r;o<s;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*a}else -1!==c&&(o-=o-c),c=-1}else for(r+l>s&&(r=s-l),o=r;o>=0;o--){for(var p=!0,d=0;d<l;d++)if(u(e,o+d)!==u(t,d)){p=!1;break}if(p)return o}return -1}function v(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,l,u=e[i],c=null,p=u>239?4:u>223?3:u>191?2:1;if(i+p<=r)switch(p){case 1:u<128&&(c=u);break;case 2:(192&(o=e[i+1]))==128&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],(192&o)==128&&(192&a)==128&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],(192&o)==128&&(192&a)==128&&(192&s)==128&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,p=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=p}var d=n,f=d.length;if(f<=4096)return String.fromCharCode.apply(String,d);for(var h="",m=0;m<f;)h+=String.fromCharCode.apply(String,d.slice(m,m+=4096));return h}function w(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,i,o){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function E(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function S(e,t,r,n,o){return t*=1,r>>>=0,o||E(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function O(e,t,r,n,o){return t*=1,r>>>=0,o||E(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!s.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return(u(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(C(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),C(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=s.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(C(o,Uint8Array))i+o.length>n.length?s.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else if(s.isBuffer(o))o.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?v(this,0,e):m.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,i){if(C(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,a=r-t,l=Math.min(o,a),u=this.slice(n,i),c=e.slice(t,r),p=0;p<l;++p)if(u[p]!==c[p]){o=u[p],a=c[p];break}return o<a?-1:+(a<o)},s.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,a,s,l,u,c,p,d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var f=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s,l=parseInt(t.substr(2*a,2),16);if((s=l)!=s)break;e[r+a]=l}return a}(this,e,t,r);case"utf8":case"utf-8":return i=t,o=r,x(T(e,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return a=t,s=r,x(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,a,s);case"base64":return l=t,u=r,x(A(e),this,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,p=r,x(function(e,t){for(var r,n,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(e,this.length-c),this,c,p);default:if(f)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var o=1,a=0;for(this[t]=255&e;++a<r&&(o*=256);)this[t+a]=e/o&255;return t+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return S(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return S(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return O(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return O(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var a=s.isBuffer(e)?e:s.from(e,n),l=a.length;if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=a[i%l]}return this};var R=/[^+/0-9A-Za-z-_]/g;function T(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function A(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function x(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function C(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var k=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},q(e){var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(r,n){var i,o,a;function s(r){e.removeListener(t,l),n(r)}function l(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}m(e,t,l,{once:!0}),"error"!==t&&(i=e,o=s,a={once:!0},"function"==typeof i.on&&m(i,"error",o,a))})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var i,o,a,u=Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,console&&console.warn&&console.warn(u)}return e}function c(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):h(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function h(e,t){for(var r=Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else if("function"==typeof e.addEventListener)e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var a,s=Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else for(var u=l.length,c=h(l,u),r=0;r<u;++r)n(c[r],this,t);return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,a;if(s(t),void 0===(n=this._events)||void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},r(e,t){t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<<s)-1,u=l>>1,c=-7,p=r?i-1:0,d=r?-1:1,f=e[t+p];for(p+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+p],p+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+p],p+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?0/0:(f?-1:1)*2e308;a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,p=c>>1,d=5960464477539062e-23*(23===i),f=n?0:o-1,h=n?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||1/0===t?(s=+!!isNaN(t),a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+p>=1?t+=d/l:t+=d*Math.pow(2,1-p),t*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(t*l-1)*Math.pow(2,i),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&s,f+=h,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[r+f]=255&a,f+=h,a/=256,u-=8);e[r+f-h]|=128*m}},c5(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},z(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var l=[],u=!1,c=-1;function p(){u&&n&&(u=!1,n.length?l=n.concat(l):c=-1,l.length&&d())}function d(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(n=l,l=[];++c<t;)n&&n[c].run();c=-1,t=l.length}n=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new f(e,t)),1!==l.length||u||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},K(e,t,r){var n=r("d"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},c(e,t,r){e.exports=i;var n=r("q").EventEmitter;function i(){n.call(this)}r("c5")(i,n),i.Readable=r("e"),i.Writable=r("ep"),i.Duplex=r("F"),i.Transform=r("h"),i.PassThrough=r("zM"),i.finished=r("n"),i.pipeline=r("Kx"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",l),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",u),e.on("error",u),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},x(e){var t={};function r(e,r,n){n||(n=Error);var i=function(e){function t(t,n,i){return e.call(this,"string"==typeof r?r:r(t,n,i))||this}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e,t}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(!Array.isArray(e))return"of ".concat(t," ").concat(String(e));var r=e.length;return(e=e.map(function(e){return String(e)}),r>2)?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(l="must not be",t=t.replace(/^not /,"")):l="must be",o=" argument",(void 0===a||a>e.length)&&(a=e.length),e.substring(a-o.length,a)===o)u="The ".concat(e," ").concat(l," ").concat(n(t,"type"));else{var i,o,a,s,l,u,c=("number"!=typeof s&&(s=0),s+1>e.length||-1===e.indexOf(".",s))?"argument":"property";u='The "'.concat(e,'" ').concat(c," ").concat(l," ").concat(n(t,"type"))}return u+". Received type ".concat(typeof r)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},F(e,t,r){var n=r("z"),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var o=r("e"),a=r("ep");r("c5")(c,o);for(var s=i(a.prototype),l=0;l<s.length;l++){var u=s[l];c.prototype[u]||(c.prototype[u]=a.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",p)))}function p(){this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},zM(e,t,r){e.exports=i;var n=r("h");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r("c5")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},e(e,t,r){var n,i,o,a,s,l=r("z");e.exports=R,R.ReadableState=O,r("q").EventEmitter;var u=function(e,t){return e.listeners(t).length},c=r("J"),p=r("d").Buffer,d=(void 0!==r.g?r.g:"u">typeof window?window:"u">typeof self?self:{}).Uint8Array||function(){},f=r("b");i=f&&f.debuglog?f.debuglog("stream"):function(){};var h=r("LP"),m=r("w"),g=r("G").getHighWaterMark,y=r("x").F,b=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,w=y.ERR_METHOD_NOT_IMPLEMENTED,_=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r("c5")(R,c);var E=m.errorOrDestroy,S=["error","close","destroy","pause","resume"];function O(e,t,i){n=n||r("F"),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(o||(o=r("t").I),this.decoder=new o(e.encoding),this.encoding=e.encoding)}function R(e){if(n=n||r("F"),!(this instanceof R))return new R(e);var t=this instanceof n;this._readableState=new O(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function T(e,t,r,n,o){i("readableAddChunk",t);var a,s,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?C(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,k(e)))}}(e,l);else if(o||(s=function(e,t){var r;return p.isBuffer(t)||t instanceof d||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t)),r}(l,t)),s)E(e,s);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===p.prototype||(a=t,t=p.from(a)),n)l.endEmitted?E(e,new _):A(e,l,t,!0);else if(l.ended)E(e,new v);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!r?(t=l.decoder.write(t),l.objectMode||0!==t.length?A(e,l,t,!1):P(e,l)):A(e,l,t,!1)}else n||(l.reading=!1,P(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function A(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&C(e)),P(e,t)}function x(e,t){var r;if(e<=0||0===t.length&&t.ended)return 0;if(t.objectMode)return 1;if(e!=e)if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length;return(e>t.highWaterMark&&((r=e)>=0x40000000?r=0x40000000:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),t.highWaterMark=r),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function C(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,l.nextTick(k,e))}function k(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,z(e)}function P(e,t){t.readingMore||(t.readingMore=!0,l.nextTick(U,e,t))}function U(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(i("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function I(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){i("readable nexttick read 0"),e.read(0)}function L(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),z(e),t.flowing&&!t.reading&&e.read(0)}function z(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function D(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,l.nextTick($,t,e))}function $(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function M(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),R.prototype.destroy=m.destroy,R.prototype._undestroy=m.undestroy,R.prototype._destroy=function(e,t){t(e)},R.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=p.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},R.prototype.unshift=function(e){return T(this,e,null,!0,!1)},R.prototype.isPaused=function(){return!1===this._readableState.flowing},R.prototype.setEncoding=function(e){o||(o=r("t").I);var t=new o(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this},R.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t,r=this._readableState,n=e;if(0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return i("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?D(this):C(this),null;if(0===(e=x(e,r))&&r.ended)return 0===r.length&&D(this),null;var o=r.needReadable;return i("need readable",o),(0===r.length||r.length-e<r.highWaterMark)&&i("length less than watermark",o=!0),r.ended||r.reading?i("reading or ended",o=!1):o&&(i("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=x(n,r))),null===(t=e>0?j(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&D(this)),null!==t&&this.emit("data",t),t},R.prototype._read=function(e){E(this,new w("_read()"))},R.prototype.pipe=function(e,t){var r,n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,i("pipe count=%d opts=%j",o.pipesCount,t);var a=t&&!1===t.end||e===l.stdout||e===l.stderr?g:s;function s(){i("onend"),e.end()}o.endEmitted?l.nextTick(a):n.once("end",a),e.on("unpipe",function t(r,a){i("onunpipe"),r===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,i("cleanup"),e.removeListener("close",h),e.removeListener("finish",m),e.removeListener("drain",c),e.removeListener("error",f),e.removeListener("unpipe",t),n.removeListener("end",s),n.removeListener("end",g),n.removeListener("data",d),p=!0,o.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c())});var c=(r=n,function(){var e=r._readableState;i("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&u(r,"data")&&(e.flowing=!0,z(r))});e.on("drain",c);var p=!1;function d(t){i("ondata");var r=e.write(t);i("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==M(o.pipes,e))&&!p&&(i("false write response, pause",o.awaitDrain),o.awaitDrain++),n.pause())}function f(t){i("onerror",t),g(),e.removeListener("error",f),0===u(e,"error")&&E(e,t)}function h(){e.removeListener("finish",m),g()}function m(){i("onfinish"),e.removeListener("close",h),g()}function g(){i("unpipe"),n.unpipe(e)}return n.on("data",d),!function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",h),e.once("finish",m),e.emit("pipe",n),o.flowing||(i("pipe resume"),n.resume()),e},R.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=M(t.pipes,e);return -1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},R.prototype.on=function(e,t){var r=c.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?C(this):n.reading||l.nextTick(N,this)),r},R.prototype.addListener=R.prototype.on,R.prototype.removeListener=function(e,t){var r=c.prototype.removeListener.call(this,e,t);return"readable"===e&&l.nextTick(I,this),r},R.prototype.removeAllListeners=function(e){var t=c.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&l.nextTick(I,this),t},R.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(i("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,l.nextTick(L,e,t))),r.paused=!1,this},R.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},R.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))}),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a<S.length;a++)e.on(S[a],this.emit.bind(this,S[a]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(R.prototype[Symbol.asyncIterator]=function(){return void 0===a&&(a=r("tm")),a(this)}),Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(R.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(R.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),R._fromList=j,Object.defineProperty(R.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(R.from=function(e,t){return void 0===s&&(s=r("s")),s(R,e,t)})},h(e,t,r){e.exports=c;var n=r("x").F,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,l=r("F");function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);l.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",p)}function p(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush(function(t,r){d(e,t,r)})}function d(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r("c5")(c,l),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new i("_transform()"))},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,function(e){t(e)})}},ep(e,t,r){var n,i,o=r("z");function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){var r=t,n=e,i=r.entry;for(r.entry=null;i;){var o=i.callback;n.pendingcb--,o(void 0),i=i.next}n.corkedRequestsFree.next=r}}e.exports=R,R.WritableState=O;var s={deprecate:r("N")},l=r("J"),u=r("d").Buffer,c=(void 0!==r.g?r.g:"u">typeof window?window:"u">typeof self?self:{}).Uint8Array||function(){},p=r("w"),d=r("G").getHighWaterMark,f=r("x").F,h=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,y=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,w=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,E=p.errorOrDestroy;function S(){}function O(e,t,i){n=n||r("F"),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)--r.pendingcb,n?(o.nextTick(i,t),o.nextTick(P,e,r),e._writableState.errorEmitted=!0,E(e,t)):(i(t),e._writableState.errorEmitted=!0,E(e,t),P(e,r));else{var a=C(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||x(e,r),n?o.nextTick(A,e,r,a,i):A(e,r,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}r("c5")(R,l),O.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};try{Object.defineProperty(O.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}function R(e){var t=this instanceof(n=n||r("F"));if(!t&&!i.call(R,this))return new R(e);this._writableState=new O(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function T(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function A(e,t,r,n){var i,o;r||(i=e,0===(o=t).length&&o.needDrain&&(o.needDrain=!1,i.emit("drain"))),t.pendingcb--,n(),P(e,t)}function x(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=Array(t.bufferedRequestCount),i=t.corkedRequestsFree;i.entry=r;for(var o=0,s=!0;r;)n[o]=r,r.isBuf||(s=!1),r=r.next,o+=1;n.allBuffers=s,T(e,t,!0,t.length,n,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,p=t.objectMode?1:l.length;if(T(e,t,!1,p,l,u,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(r){t.pendingcb--,r&&E(e,r),t.prefinished=!0,e.emit("prefinish"),P(e,t)})}function P(e,t){var r=C(t);if(r&&(t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,o.nextTick(k,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(R,Symbol.hasInstance,{value:function(e){return!!i.call(this,e)||this===R&&e&&e._writableState instanceof O}})):i=function(e){return e instanceof this},R.prototype.pipe=function(){E(this,new y)},R.prototype.write=function(e,t,r){var n,i,a,s,l,p,d,f=this._writableState,m=!1,g=!f.objectMode&&(n=e,u.isBuffer(n)||n instanceof c);return(g&&!u.isBuffer(e)&&(i=e,e=u.from(i)),"function"==typeof t&&(r=t,t=null),g?t="buffer":t||(t=f.defaultEncoding),"function"!=typeof r&&(r=S),f.ending)?(a=r,E(this,s=new w),o.nextTick(a,s)):(g||(l=e,p=r,null===l?d=new v:"string"==typeof l||f.objectMode||(d=new h("chunk",["string","Buffer"],l)),!d||(E(this,d),o.nextTick(p,d),0)))&&(f.pendingcb++,m=function(e,t,r,n,i,o){if(!r){var a,s,l=(a=n,s=i,t.objectMode||!1===t.decodeStrings||"string"!=typeof a||(a=u.from(a,s)),a);n!==l&&(r=!0,i="buffer",n=l)}var c=t.objectMode?1:n.length;t.length+=c;var p=t.length<t.highWaterMark;if(p||(t.needDrain=!0),t.writing||t.corked){var d=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},d?d.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,c,n,i,o);return p}(this,f,g,e,t,r)),m},R.prototype.cork=function(){this._writableState.corked++},R.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||x(this,e))},R.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(e,t,r){r(new m("_write()"))},R.prototype._writev=null,R.prototype.end=function(e,t,r){var n,i,a,s=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),s.corked&&(s.corked=1,this.uncork()),s.ending||(n=this,i=s,a=r,i.ending=!0,P(n,i),a&&(i.finished?o.nextTick(a):n.once("finish",a)),i.ended=!0,n.writable=!1),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),R.prototype.destroy=p.destroy,R.prototype._undestroy=p.undestroy,R.prototype._destroy=function(e,t){t(e)}},tm(e,t,r){var n,i=r("z");function o(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r("n"),s=Symbol("lastResolve"),l=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),p=Symbol("lastPromise"),d=Symbol("handlePromise"),f=Symbol("stream");function h(e,t){return{value:e,done:t}}function m(e){var t=e[s];if(null!==t){var r=e[f].read();null!==r&&(e[p]=null,e[s]=null,e[l]=null,t(h(r,!1)))}}function g(e){i.nextTick(m,e)}var y=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((o(n={get stream(){return this[f]},next:function(){var e,t,r=this,n=this[u];if(null!==n)return Promise.reject(n);if(this[c])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(e,t){i.nextTick(function(){r[u]?t(r[u]):e(h(void 0,!0))})});var o=this[p];if(o)t=new Promise((e=this,function(t,r){o.then(function(){e[c]?t(h(void 0,!0)):e[d](t,r)},r)}));else{var a=this[f].read();if(null!==a)return Promise.resolve(h(a,!1));t=new Promise(this[d])}return this[p]=t,t}},Symbol.asyncIterator,function(){return this}),o(n,"return",function(){var e=this;return new Promise(function(t,r){e[f].destroy(null,function(e){e?r(e):t(h(void 0,!0))})})}),n),y);e.exports=function(e){var t,r=Object.create(b,(o(t={},f,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,l,{value:null,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,c,{value:e._readableState.endEmitted,writable:!0}),o(t,d,{value:function(e,t){var n=r[f].read();n?(r[p]=null,r[s]=null,r[l]=null,e(h(n,!1))):(r[s]=e,r[l]=t)},writable:!0}),t));return r[p]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[l];null!==t&&(r[p]=null,r[s]=null,r[l]=null,t(e)),r[u]=e;return}var n=r[s];null!==n&&(r[p]=null,r[s]=null,r[l]=null,n(h(void 0,!0))),r[c]=!0}),e.on("readable",g.bind(null,r)),r}},LP(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=o(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var a=r("d").Buffer,s=r("o").inspect,l=s&&s.custom||"inspect";e.exports=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.head=null,this.tail=null,this.length=0}return e=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n=a.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=i.data,r=o,a.prototype.copy.call(t,n,r),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return s(this,i(i({},t),{},{depth:0,customInspect:!1}))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}()},w(e,t,r){var n=r("z");function i(e,t){a(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(o,r),t(e)):n.nextTick(o,r)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},n(e,t,r){var n=r("x").F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),a=o||i,s=!1,o=function(){if(!s){s=!0;for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];a.apply(this,t)}};var a,s,l=r.readable||!1!==r.readable&&t.readable,u=r.writable||!1!==r.writable&&t.writable,c=function(){t.writable||d()},p=t._writableState&&t._writableState.finished,d=function(){u=!1,p=!0,l||o.call(t)},f=t._readableState&&t._readableState.endEmitted,h=function(){l=!1,f=!0,u||o.call(t)},m=function(e){o.call(t,e)},g=function(){var e;return l&&!f?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):u&&!p?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},y=function(){t.req.on("finish",d)};return t.setHeader&&"function"==typeof t.abort?(t.on("complete",d),t.on("abort",g),t.req?y():t.on("request",y)):u&&!t._writableState&&(t.on("end",c),t.on("close",c)),t.on("end",h),t.on("finish",d),!1!==r.error&&t.on("error",m),t.on("close",g),function(){t.removeListener("complete",d),t.removeListener("abort",g),t.removeListener("request",y),t.req&&t.req.removeListener("finish",d),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",d),t.removeListener("end",h),t.removeListener("error",m),t.removeListener("close",g)}}},s(e){e.exports=function(){throw Error("Readable.from is not available in the browser")}},Kx(e,t,r){var n,i=r("x").F,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function l(e){e()}function u(e,t){return e.pipe(t)}e.exports=function(){for(var e,t,i=arguments.length,c=Array(i),p=0;p<i;p++)c[p]=arguments[p];var d=(e=c).length&&"function"==typeof e[e.length-1]?e.pop():s;if(Array.isArray(c[0])&&(c=c[0]),c.length<2)throw new o("streams");var f=c.map(function(e,i){var o,s,u,p,h,m,g=i<c.length-1;return o=i>0,u=s=function(e){t||(t=e),e&&f.forEach(l),g||(f.forEach(l),d(t))},p=!1,s=function(){p||(p=!0,u.apply(void 0,arguments))},h=!1,e.on("close",function(){h=!0}),void 0===n&&(n=r("n")),n(e,{readable:g,writable:o},function(e){if(e)return s(e);h=!0,s()}),m=!1,function(t){if(!h&&!m){if(m=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();s(t||new a("pipe"))}}});return c.reduce(u)}},G(e,t,r){var n=r("x").F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=null!=t.highWaterMark?t.highWaterMark:i?t[r]:null;if(null!=o){if(!(isFinite(o)&&Math.floor(o)===o)||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},J(e,t,r){e.exports=r("q").EventEmitter},t(e,t,r){var n=r("K").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){var t;if(!e)return"utf8";for(;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=p,t=3;break;default:this.write=d,this.end=f;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},N(e,t,r){e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}};function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}},o(){},b(){}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t,n)=>{var i=(t,n)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[n]:t[i]})};i(t,"get"),i(n,"value")},r.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{let e,t,i,o,a,s,l,u,c,p,d,f,h,m,g;r.d(n,{TD:()=>f6,B:()=>f8,h0:()=>d6,XP:()=>d8,v8:()=>f7,G7:()=>d9,Lu:()=>fe,vp:()=>fi,Jo:()=>fa,UP:()=>lI,rj:()=>hj,VI:()=>lk,Ns:()=>lH,yD:()=>u2,Ip:()=>uC,kt:()=>dY,KW:()=>d0,fK:()=>lD,wb:()=>fh,wv:()=>hi,yY:()=>fs,qQ:()=>lz,_:()=>uP,Qq:()=>uG,tY:()=>lN,rE:()=>uz,PD:()=>fE,lE:()=>hl,ss:()=>dK,kq:()=>dH,m_:()=>lj,O_:()=>fr,OE:()=>l$,oc:()=>fj,oW:()=>hp,dK:()=>lG,Ry:()=>fK,Ng:()=>fG,Hg:()=>ft,L6:()=>hf,Ty:()=>hg,gP:()=>lM,py:()=>hb,YS:()=>dV,t1:()=>hS,jE:()=>hR,D_:()=>lL,jx:()=>hT,F:()=>hC,J_:()=>fX,hH:()=>hk,zC:()=>hx,_l:()=>d7,fu:()=>uI});var y,b,v,w,_,E,S,O,R,T,A,x,C,k,P,U,I,N,L,z,j,D={};function $(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function M(e,t="|"){return e.map(e=>es(e)).join(t)}function B(e,t){return"bigint"==typeof t?t.toString():t}r.r(D),r.d(D,{hasBrowserEnv:()=>a3,hasStandardBrowserEnv:()=>a6,hasStandardBrowserWebWorkerEnv:()=>a5,navigator:()=>a9,origin:()=>a8});let F=class Cached{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}};function q(e){return new F(e)}function W(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Z(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function K(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function H(e){return K(e._zod.def)??e._zod.def.shape}function V(e,t,r){Object.defineProperty(e,t,{get(){let e=r();return Z(this,t,e),e},enumerable:!0,configurable:!0})}function G(e,t,r){t in e?Z(e,t,r):e[t]=r}function J(e,t,r,n){let i=H(t);for(let o of r){let r=Object.getOwnPropertyDescriptor(i,o);r.enumerable&&(r.get?V(e,o,()=>{let e=t._zod.def.shape[o];return n?n(e,o):e}):G(e,o,n?n(r.value,o):r.value))}}function Y(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}let X="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Q(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let ee=q(()=>{if(eI.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function et(e){if(!1===Q(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==Q(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function er(e){return et(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let en=new Set(["string","number","symbol"]);function ei(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function eo(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function ea(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function es(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}let el={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},eu={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function ec(e,t){let r=H(e),n=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&n.push(e)}return n}function ep(e,t){let r={};J(r,e,Reflect.ownKeys(H(e)));for(let e of Reflect.ownKeys(t)){let n=Object.getOwnPropertyDescriptor(t,e);n.enumerable&&(n.get?V(r,e,()=>t[e]):G(r,e,n.value))}return r}function ed(e,t,r,n="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${n}() cannot be used on object schemas containing refinements`);let o=r?new Set(ec(t,r)):void 0,a={};return J(a,t,Reflect.ownKeys(H(t)),e&&((t,r)=>o&&!o.has(r)?t:new e({type:"optional",innerType:t}))),eo(t,Y(t._zod.def,{shape:a,checks:[]}))}function ef(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function eh(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function em(e){return"string"==typeof e?e:e?.message}function eg(e){let t=[];for(let r of e??[]){let e=r._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let n=e.maximum??e.length??e.size;n>=0&&t.push([n,r])}return t}function ey(e,t,r){var n;for(let i=t;i<e.length;i++)(n=e[i]).schema??(n.schema=r)}function eb(e,t,r){let n=e.inst?._zod?.traits;n?.has("$ZodType")&&(n.has("$ZodCheck")?e.schema??(e.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,o=e.message?e.message:em(e.inst?._zod.def?.error?.(e))??em(i?.(e))??em(t?.error?.(e))??em(r.customError?.(e))??em(r.localeError?.(e))??"Invalid input",a={};for(let t of Object.keys(e))"inst"!==t&&"schema"!==t&&"continue"!==t&&"input"!==t&&"__proto__"!==t&&(a[t]=e[t]);return a.path??(a.path=[]),a.message=o,t?.reportInput&&(a.input=e.input),a}let ev=/[\uD800-\uDBFF]/;function ew(e){let t=e.length;if(!ev.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(64512&e.charCodeAt(n))==55296&&(64512&e.charCodeAt(n+1))==56320&&(r--,n++);return r}function e_(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function eE(...e){let[t,r,n]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:n}:{...t}}function eS(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}function eO(e,t){for(let r in e){let n=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return eS(this,r,n(this))},set(e){eS(this,r,e)}})}return t}let eR=!1,eT={configurable:!0,get(){eR=!0}};function eA(t,r,n){let i=Object.getPrototypeOf(t._zod);if(r in i&&e!==t._zod){e=void 0;return}e=t._zod,Object.defineProperty(i,r,{configurable:!0,get(){Object.defineProperty(this,r,eT);let e=eR;eR=!1;try{let t=n(this);return eR?delete this[r]:Object.defineProperty(this,r,{configurable:!0,writable:!0,value:t}),eR=eR||e,t}catch(t){throw delete this[r],eR=eR||e,t}},set(e){Object.defineProperty(this,r,{configurable:!0,writable:!0,value:e})}})}let ex={value:void 0,enumerable:!1},eC="captureStackTrace"in Error?Error:null;function ek(e,t,r,n){function i(e){this.def=e,this.constr=u,this.traits=new Set}i.prototype={};let o=r&&new WeakSet;function a(n,a){if(n._zod){if(n._zod.traits.has(e))return}else{ex.value=new i(a);try{Object.defineProperty(n,"_zod",ex)}finally{ex.value=void 0}}if(n._zod.traits.add(e),t(n,a),o){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,i=e;for(;i&&i!==t;)i=Object.getPrototypeOf(i);let a=i??e;if(!o.has(a)){o.add(a);for(let e in r){let t=Object.getOwnPropertyDescriptor(r,e);t.get?Object.defineProperty(a,e,{...t,enumerable:!1}):function(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:eS(this,t,r.bind(this))},set(e){eS(this,t,e)}})}(a,e,t.value)}}}let s=u.prototype;for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&(e in n||(n[e]=s[e].bind(n)))}let s=n?.Parent??Object;let l=class Definition extends s{};function u(e){let t=n?.Parent?function(e){let t=eC;if(t){let r=t.stackTraceLimit;if("number"==typeof r){try{t.stackTraceLimit=0}catch{return eC=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}(l):this;a(t,e);let r=t._zod.deferred;if(r){for(let e of r)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(l,"name",{value:e}),Object.defineProperty(u,"init",{value:a}),Object.defineProperty(u,Symbol.hasInstance,{value:t=>!!n?.Parent&&t instanceof n.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}let eP=class $ZodAsyncError extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};let eU=class $ZodEncodeError extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(U=globalThis).__zod_globalConfig??(U.__zod_globalConfig={});let eI=globalThis.__zod_globalConfig;function eN(e){return e&&Object.assign(eI,e),eI}let eL=class $ZodCyclicError extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}};let ez="~memo",ej=[];function eD(e){return null!==e&&"object"==typeof e}function e$(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}let eM=new WeakMap,eB=[],eF={alloc(e,r,n){let i=t;if(!i)return n;t=void 0;let o={value:n,issues:null};return i.set(r.value,o),eB.push(o),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,r=(e,r)=>{var n,i;let o;if("backward"!==r.direction&&(n=r,i=e.value,void 0!==(o=n[ez]?.backEdges)&&eD(i)&&o.has(i)))throw new eL;return t(e,r)};e._zod.parse=r,e._zod.run===t&&(e._zod.run=r)})},attach(e){var r;let n,i,o,a=!1;(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,s=(l,u)=>{let c;if(void 0===n){let t=function e(t,r,n){var i,o;let a=eM.get(t);if(void 0!==a)return 2*!!a;if(r.has(t))return 2;r.add(t);let s=0,l=t=>{if(2!==s&&t?._zod){let i=e(t,r,n);i>s&&(s=i)}},u=e=>{e>s&&(s=e)},c=t._zod.def;switch(c.type){case"object":{let t=K(c);u(t?((t,i)=>{let o=0;for(let a of Reflect.ownKeys(t)){let s=Object.getOwnPropertyDescriptor(t,a);if(i&&!s.enumerable)continue;let l=s.get?1:s.value?._zod?e(s.value,r,n):0;l>o&&(o=l)}return o})(t,!0):1),l(c.catchall);break}case"array":l(c.element);break;case"tuple":for(let e of c.items)l(e);l(c.rest);break;case"record":case"map":l(c.keyType),l(c.valueType);break;case"set":l(c.valueType);break;case"union":for(let e of c.options)l(e);break;case"intersection":l(c.left),l(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":l(c.innerType);break;case"pipe":l(c.in),l(c.out);break;case"function":l(c.input),l(c.output);break;case"lazy":{let i=c._cachedInner??(n?t._zod.innerType:void 0);u(i?e(i,r,!1):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let r=t.value;if(r&&"object"==typeof r){if(r._zod)l(r);else if(Array.isArray(r))for(let e of r)l(e)}}}return r.delete(t),i=t,1!==(o=s)&&eM.set(i,2===o),o}(e,new Set,!1);if(0===t)return e._zod.parse=r,e._zod.run===s&&(e._zod.run=r),r(l,u);2===t||a?n=!0:a=!0}let p=l.value;if(!eD(p))return r(l,u);let d=u[ez];if(d||(d={buckets:new WeakMap,backEdges:void 0},u[ez]=d),i===u)c=o;else{var f;let t;(t=(f=d).buckets.get(e))||(t=new WeakMap,f.buckets.set(e,t)),c=t,i=u,o=c}let h=c.get(p);if(h)return l.value=h.value,h.issues?h.issues.length&&l.issues.push(...e$(h.issues)):(l.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(h.value)),l;t=c;let m=eB.length,g=r(l,u);t=void 0;let y=eB.length>m?eB.pop():void 0;return g instanceof Promise?g.then(e=>(y&&(y.issues=e.issues.length?e$(e.issues):ej),e)):(y&&(y.issues=g.issues.length?e$(g.issues):ej),g)};e._zod.parse=s,e._zod.run===r&&(e._zod.run=s)})}},eq=/^[cC][0-9a-z]{6,}$/,eW=/^[0-9a-z]+$/,eZ=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,eK=/^[0-9a-vA-V]{20}$/,eH=/^[A-Za-z0-9]{27}$/,eV=/^[a-zA-Z0-9_-]{21}$/,eG=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,eJ=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,eY=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,eX=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,eQ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,e0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,e1=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,e2=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,e4=/^https?$/,e3=/^\+[1-9]\d{6,14}$/,e9="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",e6=RegExp(`^${e9}$`);function e5(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let e8=/^[\s\S]{0,}$/,e7=/^-?\d+$/,te=/^-?\d+(?:\.\d+)?$/,tt=/^(?:true|false)$/i,tr=/^null$/i,tn=/^[^A-Z]*$/,ti=/^[^a-z]*$/,to=ek("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),ta=e=>{let t=e.value;return null!=t&&void 0!==t.length},ts={number:"number",bigint:"bigint",object:"date"},tl=ek("$ZodCheckLessThan",(e,t)=>{to.init(e,t);let r=ts[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:ts[typeof n.value]??r,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tu=ek("$ZodCheckGreaterThan",(e,t)=>{to.init(e,t);let r=ts[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:ts[typeof n.value]??r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tc=ek("$ZodCheckMultipleOf",(e,t)=>{to.init(e,t),e._zod.check=r=>{let n,i,o;if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):0==(i=Math.round(n=r.value/t.value),o=4*Number.EPSILON*Math.max(Math.abs(n),1),Math.abs(n-i)<o?0:n-i))||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),tp=ek("$ZodCheckNumberFormat",(e,t)=>{to.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,o]=el[t.format];e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s))return void a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}))}s<i&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),td=ek("$ZodCheckMaxLength",(e,t)=>{var r;to.init(e,t),(r=e._zod.def).when??(r.when=ta),e._zod.check=r=>{let n=r.value,i=n.length;if(("string"==typeof n&&i>t.maximum?ew(n):i)<=t.maximum)return;let o=e_(n);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),tf=ek("$ZodCheckMinLength",(e,t)=>{var r;to.init(e,t),(r=e._zod.def).when??(r.when=ta),e._zod.check=r=>{let n=r.value,i=n.length;if(("string"==typeof n&&i>=t.minimum&&i<2*t.minimum?ew(n):i)>=t.minimum)return;let o=e_(n);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),th=ek("$ZodCheckLengthEquals",(e,t)=>{var r;to.init(e,t),(r=e._zod.def).when??(r.when=ta),e._zod.check=r=>{let n=r.value,i=n.length,o="string"==typeof n&&i>=t.length&&i<=2*t.length?ew(n):i;if(o===t.length)return;let a=e_(n),s=o>t.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),tm=ek("$ZodCheckStringFormat",(e,t)=>{var r,n;to.init(e,t),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),tg=ek("$ZodCheckRegex",(e,t)=>{tm.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ty=ek("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=tn),tm.init(e,t)}),tb=ek("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ti),tm.init(e,t)}),tv=ek("$ZodCheckIncludes",(e,t)=>{to.init(e,t);let r=ei(t.includes),n=new RegExp("number"==typeof t.position?`^.{${t.position},}${r}`:r);t.pattern=n,e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),tw=ek("$ZodCheckStartsWith",(e,t)=>{to.init(e,t);let r=RegExp(`^${ei(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),t_=ek("$ZodCheckEndsWith",(e,t)=>{to.init(e,t);let r=RegExp(`.*${ei(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});function tE(e,t,r){e.issues.length&&t.issues.push(...eh(r,e.issues))}let tS=ek("$ZodCheckProperties",(e,t)=>{let r;to.init(e,t),eS(e,Symbol.iterator,function*(){yield e},!1),e._zod.check=n=>{let i;if(null==n.value)return void n.issues.push({expected:"object",code:"invalid_type",input:n.value,inst:e});r??(r=Reflect.ownKeys(t.shape).map(e=>[e,t.shape[e]]));let o=n.value;for(let[e,t]of r){let r=t._zod.run({value:o[e],issues:[]},{});r instanceof Promise?(i??(i=[]),i.push(r.then(t=>tE(t,n,e)))):tE(r,n,e)}if(i)return Promise.all(i).then(()=>void 0)}}),tO=ek("$ZodCheckOverwrite",(e,t)=>{to.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});let tR=class Doc{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
3
3
|
${t.join("\n")}
|
|
4
4
|
};`)(...Object.values(this.closed))}};let tT={major:4,minor:6,patch:7},tA=ek("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tT;let n=e._zod.def.checks,i=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(let t of i)for(let r of t._zod.onattach)r(e);if(0===i.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,r,n)=>{let i;if(t.memo)return t;let o=ef(t);for(let a of r){if(a._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}(t)||!a._zod.def.when(t))continue}else if(o)continue;let r=t.issues.length,s=a._zod.check(t);if(s instanceof Promise&&n?.async===!1)throw new eP;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s,t.issues.length!==r&&(ey(t.issues,r,e),o||(o=ef(t,r)))});else{if(t.issues.length===r)continue;ey(t.issues,r,e),o||(o=ef(t,r))}}return i?i.then(()=>t):t},r=(r,n,o)=>{if(ef(r))return r.aborted=!0,r;let a=t(n,i,o);if(a instanceof Promise){if(!1===o.async)throw new eP;return a.then(t=>e._zod.parse(t,o))}return e._zod.parse(a,o)};e._zod.run=(n,o)=>{if(o.skipChecks)return e._zod.parse(n,o);if("backward"===o.direction){let t=e._zod.parse({value:n.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,n,o)):r(t,n,o)}let a=e._zod.parse(n,o);if(a instanceof Promise){if(!1===o.async)throw new eP;return a.then(e=>t(e,i,o))}return t(a,i,o)}}},{get"~standard"(){return eS(this,"~standard",tC(this),!1)},set"~standard"(e){eS(this,"~standard",e)}}),tx=(e,t)=>e.issues.length?{issues:e.issues.map(e=>eb(e,t,eN()))}:{value:e.value};function tC(e){return{validate:t=>{let r={async:!1};try{let n=e._zod.run({value:t,issues:[]},r);if(!(n instanceof Promise))return tx(n,r)}catch(e){}return async function(e,t){let r={async:!0};return tx(await e._zod.run({value:t,issues:[]},r),r)}(e,t)},vendor:"zod",version:1}}let tk=ek("$ZodString",(e,t)=>{tA.init(e,t),e._zod.pattern=t.pattern??e8,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),tP=ek("$ZodStringFormat",(e,t)=>{tm.init(e,t),tk.init(e,t)}),tU=ek("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=eJ),tP.init(e,t)}),tI=ek("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=eY(e))}else t.pattern??(t.pattern=eY());tP.init(e,t)}),tN=ek("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=eX),tP.init(e,t)});function tL(e){try{if("u">typeof URL&&"function"==typeof URL.canParse)return URL.canParse(e);return new URL(e),!0}catch{return!1}}let tz=/[\t\n\r]/g;function tj(e){return e.replace(tz,"")}let tD=ek("$ZodURL",(e,t)=>{tP.init(e,t),e._zod.check=r=>{try{var n,i;let o=r.value.trim(),a="normalize"in t||"hostname"in t||"protocol"in t?function(e,t){if(!t.normalize&&t.protocol?.source===e4.source&&!/^https?:\/\//i.test(e))return 1;try{if("u">typeof URL){let t=URL;if("function"==typeof t.parse)return t.parse(e)??2}return new URL(e)}catch{return 2}}(o,t):tL(o)||2;if(1===a)return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});if(2===a)return void r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});if(!0===a){r.value=tj(o);return}t.hostname&&((n=t.hostname).lastIndex=0,!n.test(a.hostname))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&((i=t.protocol).lastIndex=0,!i.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?a.href:tj(o);return}catch(n){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),t$=ek("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$","u")),tP.init(e,t)}),tM=ek("$ZodNanoID",(e,t)=>{var r;if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=void 0===t.length?eV:(r=t.length,RegExp(`^[a-zA-Z0-9_-]{${r}}$`))),tP.init(e,t)}),tB=ek("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=eq),tP.init(e,t)}),tF=ek("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=eW),tP.init(e,t)}),tq=ek("$ZodULID",(e,t)=>{t.pattern??(t.pattern=eZ),tP.init(e,t)}),tW=ek("$ZodXID",(e,t)=>{t.pattern??(t.pattern=eK),tP.init(e,t)}),tZ=ek("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=eH),tP.init(e,t)}),tK=ek("$ZodISODateTime",(e,t)=>{let r,n,i;t.pattern??(r=["Z"],t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),n=`${e5({precision:t.precision,seconds:!0})}(?:${r.join("|")})`,i=t.local?`${n}|${e5({precision:t.precision})}`:n,t.pattern=RegExp(`^${e9}T(?:${i})$`)),tP.init(e,t)}),tH=ek("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=e6),tP.init(e,t)}),tV=ek("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${e5(t)}$`)),tP.init(e,t)}),tG=ek("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=eG),tP.init(e,t)}),tJ=ek("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=eQ),tP.init(e,t)}),tY=/^[0-9a-fA-F:.]+$/;function tX(e){return!!tY.test(e)&&tL(`http://[${e}]`)}let tQ=ek("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=e0),tP.init(e,t),e._zod.check=r=>{tX(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),t0=ek("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=e1),tP.init(e,t)}),t1=ek("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=e2),tP.init(e,t),e._zod.check=r=>{!function(e){let t=e.split("/");if(2!==t.length)return!1;let[r,n]=t;if(!n)return!1;let i=Number(n);return`${i}`===n&&!(i<0)&&!(i>128)&&tX(r)}(r.value)&&r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function t2(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let t4=/^[0-9a-zA-Z+/]*={0,2}$/,t3=ek("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=t4),tP.init(e,t),e._zod.check=r=>{t2(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),t9=/^[A-Za-z0-9_-]*$/,t6=ek("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=t9),tP.init(e,t),e._zod.check=r=>{!function(e){if(!t9.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return t2(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),t5=ek("$ZodE164",(e,t)=>{t.pattern??(t.pattern=e3),tP.init(e,t)}),t8=ek("$ZodJWT",(e,t)=>{tP.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),t7=ek("$ZodNumber",(e,t)=>{tA.init(e,t),e._zod.pattern=te,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let i=r.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return r;let o="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:String(i):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),r}}),re=ek("$ZodNumberFormat",(e,t)=>{tp.init(e,t),t7.init(e,t)}),rt=ek("$ZodBoolean",(e,t)=>{tA.init(e,t),e._zod.pattern=tt,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let i=r.value;return"boolean"==typeof i||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),rr=ek("$ZodNull",(e,t)=>{tA.init(e,t),e._zod.pattern=tr,e._zod.values=new Set([null]),e._zod.parse=(t,r)=>{let n=t.value;return null===n||t.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),t}}),rn=ek("$ZodUnknown",(e,t)=>{tA.init(e,t),e._zod.parse=e=>e}),ri=ek("$ZodNever",(e,t)=>{tA.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),ro=ek("$ZodDate",(e,t)=>{tA.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch(e){}let i=r.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:e}),r}}),ra=e=>Array.isArray(e)?e.length:-1;function rs(e,t,r){e.issues.length&&t.issues.push(...eh(r,e.issues)),t.value[r]=e.value}let rl=ek("$ZodArray",(e,t)=>{tA.init(e,t);let r=eI.memoizer;r?.attach(e),e._zod.parse=(n,i)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=r?r.alloc(e,n,Array(o.length),i):Array(o.length);let a=[],s=i?.abortEarly;for(let e=0;e<o.length;e++){let r=o[e],l=t.element._zod.run({value:r,issues:[]},i);if(l instanceof Promise)a.push(l.then(t=>rs(t,n,e)));else if(rs(l,n,e),s&&0!==l.issues.length&&ef(l))break}return a.length?Promise.all(a).then(()=>n):n},function(e,t){let r=eg(e._zod.def.checks);if(!r.length)return;let n=Math.min(...r.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(r,o)=>{let a=t(r.value);if(a>n&&!o?.skipChecks&&o?.direction!=="backward"){for(let[t,n]of eg(e._zod.def.checks))if(a>t&&n._zod.def.when(r)){let t=r.issues.length;return n._zod.check(r),r.issues[t].continue=!1,ey(r.issues,t,e),r}}return i(r,o)}}(e,ra)});function ru(e,t,r,n,i,o){let a=r in n,s="optional"===o;if(a||!s||"optional"!==i){if(e.issues.length){if(void 0!==i&&s&&!a)return;t.issues.push(...eh(r,e.issues))}if(!a&&void 0===i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}void 0===e.value?(a||"defaulted"===i&&!s)&&(t.value[r]=void 0):t.value[r]=e.value}}let rc=[];function rp(e){var t;let r=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),i=n.length?n:rc,o=i.length?[...r,...i]:r;for(let t of o)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Object.keys(t=e.shape).filter(e=>void 0!==t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,allKeys:o,symbolKeys:i,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(a)}}function rd(e,t,r,n,i,o,a){let s=[],l=i.keySet,u=i.catchall._zod,c=u.def.type,p=u.optin,d=u.optout,f=0;for(let i in t){if(a&&r.issues.length!==f){if(ef(r,f))break;f=r.issues.length}if(l.has(i))continue;if("__proto__"===i){"never"===c&&s.push(i);continue}if("never"===c){s.push(i);continue}let o=u.run({value:t[i],issues:[]},n);o instanceof Promise?e.push(o.then(e=>ru(e,r,i,t,p,d))):ru(o,r,i,t,p,d)}return(s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o,continue:!0}),e.length)?Promise.all(e).then(()=>r):r}let rf=ek("$ZodObject",(e,t)=>{let r;tA.init(e,t);let n=Object.getOwnPropertyDescriptor(t,"shape"),i=n?.get?n.get.raw:t.shape??{};if(i){let e=()=>{let r={...i};return Object.defineProperty(t,"shape",{value:r}),e.raw=r,r};e.raw=i,Object.defineProperty(t,"shape",{get:e})}let o=q(()=>rp(t));eA(e,"propValues",e=>{let t=e.def.shape,r={};for(let e in t){let n=t[e]._zod;if(n.values){for(let t of(Object.prototype.hasOwnProperty.call(r,e)||Z(r,e,new Set),n.values))r[e].add(t);void 0!==n.optin&&r[e].add(void 0)}}return r});let a=t.catchall,s=eI.memoizer;s?.attach(e),e._zod.parse=(t,n)=>{r??(r=o.value);let i=t.value;if(!Q(i))return t.issues.push({expected:"object",code:"invalid_type",input:i,inst:e}),t;t.value=s?s.alloc(e,t,{},n):{};let l=[],u=r.shape,c=n?.abortEarly,p=t.issues.length;for(let e of r.allKeys){if(c&&t.issues.length!==p){if(ef(t,p))break;p=t.issues.length}if("__proto__"===e)continue;let r=u[e],o=r._zod.optin,a=r._zod.optout,s=r._zod.run({value:i[e],issues:[]},n);s instanceof Promise?l.push(s.then(r=>ru(r,t,e,i,o,a))):ru(s,t,e,i,o,a)}return a?rd(l,i,t,n,o.value,e,!0===c):l.length?Promise.all(l).then(()=>t):t}}),rh=ek("$ZodObjectJIT",(e,t)=>{let r,n;rf.init(e,t);let i=e._zod.parse,o=q(()=>rp(t)),a=eI.memoizer,s=!eI.jitless,l=s&&ee.value,u=t.catchall;e._zod.parse=(c,p)=>{n??(n=o.value);let d=c.value;return Q(d)?s&&l&&p?.async===!1&&!0!==p.jitless?(r||(r=(t=>{let r=o.value,n=r.symbolKeys,i=new tR(["payload","ctx"],{shape:t,inst:e,memo:a,syms:n}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,l=(e,t)=>`
|
|
5
5
|
let ${e}_ab = false;
|
|
@@ -57,13 +57,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
57
57
|
${e}`:null===e?"\nnull":"symbol"==typeof e?`
|
|
58
58
|
${e.toString()}`:"object"==typeof e&&ov in e?this._parseLoggerException(e,t):`
|
|
59
59
|
${JSON.stringify(e,null,2)}`}_parseLoggerException(e,t=1){let r=[];e.type&&r.push(`type=${e.type}`),e.details&&Object.entries(e.details).map(([e,t])=>r.push(`${e}=${t}`));let n=e.stack||e.reason||e.message,i=n===e.stack,o=function(e,t){let r,n=t.split("\n");try{({cause:r}=e)}catch{}if(null!=r&&"object"==typeof r&&ov in r){var i;let e=(i=r).stack?String(i.stack):Error.prototype.toString.call(i),t=e.indexOf("\n at");if(-1!==t){let{len:r,offset:i}=function(e,t){for(let r=0;r<e.length-3;r++){let n=t.indexOf(e[r]);if(-1!==n){let i=t.length-n;if(i>3){let o=1,a=Math.min(e.length-r,i);for(;a>o&&e[r+o]===t[n+o];)o++;if(o>3)return{len:o,offset:r}}}}return{len:0,offset:0}}(n,e.slice(t+1).split("\n"));if(r>0){let e=r-2,t=` ... ${e} lines matching cause stack trace ...`;n.splice(i+1,e,ox.grey(t))}}}return n}(e,n);i&&(o[0]=e.message||o[0]),r.length&&(o[0]+=ox.gray(`(details: ${r.join(", ")})`));for(let e=1;e<o.length;e++)o[e]=ox.gray(o[e]);if(e.cause){let r=this._parseException(e.cause,t+1).trim().split("\n");o.push(ox.red(` CAUSE: ${ox.reset(r[0])}`),...r.slice(1))}return`
|
|
60
|
-
${o.map(e=>`${" ".repeat(2*t)}${e}`).join("\n")}`}};let oz=class Log{LEVELS=N;options;preferredFieldsMap;warningsOnceLogged=new Set;constructor(e={}){let t;if(this.options={...{level:(t=oS.env.APIFY_LOG_LEVEL)?Number.isFinite(+t)?+t:N[t]?N[t]:+t:N.INFO,maxDepth:4,gradualLimitFactor:.5,maxStringLength:1e3,maxArrayLength:500,maxFields:20,preferredFields:[...oE],prefix:null,suffix:null,truncationSuffix:o_,truncationFlagKey:ow,logger:(e=>{switch(e){case L.JSON:return new oA;case L.TEXT:default:return new oL}})(function(){let e=oS.env[od]||L.TEXT;switch(e.toLowerCase()){case L.JSON.toLowerCase():return L.JSON;case L.TEXT.toLowerCase():return L.TEXT;default:return console.warn(`Unknown value for environment variable ${od}: ${e}`),L.TEXT}}()),data:{}},...e},!N[this.options.level])throw Error('Options "level" must be one of log.LEVELS enum!');if("number"!=typeof this.options.maxDepth)throw Error('Options "maxDepth" must be a number!');if("number"!=typeof this.options.gradualLimitFactor)throw Error('Options "gradualLimitFactor" must be a number!');if("number"!=typeof this.options.maxStringLength)throw Error('Options "maxStringLength" must be a number!');if("number"!=typeof this.options.maxArrayLength)throw Error('Options "maxArrayLength" must be a number!');if("number"!=typeof this.options.maxFields)throw Error('Options "maxFields" must be a number!');if(!Array.isArray(this.options.preferredFields))throw Error('Options "preferredFields" must be an array!');if(this.options.prefix&&"string"!=typeof this.options.prefix)throw Error('Options "prefix" must be a string!');if(this.options.suffix&&"string"!=typeof this.options.suffix)throw Error('Options "suffix" must be a string!');if("string"!=typeof this.options.truncationSuffix)throw Error('Options "truncationSuffix" must be a string!');if("string"!=typeof this.options.truncationFlagKey)throw Error('Options "truncationFlagKey" must be a string!');if("object"!=typeof this.options.logger)throw Error('Options "logger" must be an object!');if("object"!=typeof this.options.data)throw Error('Options "data" must be an object!');this.preferredFieldsMap=Object.fromEntries(this.options.preferredFields.map((e,t)=>[e,t]))}_sanitizeData(e){return function e(t,r){let{maxDepth:n=1/0,gradualLimitFactor:i=1,maxStringLength:o=1/0,maxArrayLength:a=1/0,maxFields:s=1/0,preferredFieldsMap:l={},truncationSuffix:u=o_,truncationFlagKey:c=ow}=r;if("string"==typeof t)return t.length>o?function(e,t,r=o_){if(t=Math.floor(t),r.length>t)throw Error("suffix string cannot be longer than maxLength");return"string"==typeof e&&e.length>t&&(e=e.substr(0,t-r.length)+r),e}(t,o,u):t;if(["number","boolean","symbol","bigint"].includes(typeof t)||null==t||t instanceof Date)return t;if(t instanceof Error){let{name:e,message:r,stack:n,cause:i,...o}=t;t={name:e,message:r,stack:n,cause:i,...o,[ov]:!0}}let p=t=>e(t,{...r,maxDepth:n-1,maxStringLength:Math.max(Math.floor(o*i),u.length),maxArrayLength:Math.floor(a*i),maxFields:Math.floor(s*i)});if(Array.isArray(t)){if(n<=0)return"[array]";let e=t.slice(0,a).map(p);return t.length>a&&e.push(u),e}if("object"==typeof t&&null!==t){if(n<=0)return"[object]";let e=Reflect.ownKeys(t);e.sort((e,t)=>{let r=l[String(e)]??-1,n=l[String(t)]??-1;return -1===r&&-1===n?0:-1===r?1:-1===n?-1:r-n});let r={};return e.slice(0,s).forEach(e=>{r[e]=p(t[e])}),e.length>s&&(r[c]=!0),r}if("function"==typeof t)return"[function]";console.log(`WARNING: Object cannot be logged: ${t}`)}(e,{maxDepth:this.options.maxDepth,gradualLimitFactor:this.options.gradualLimitFactor,maxStringLength:this.options.maxStringLength,maxArrayLength:this.options.maxArrayLength,maxFields:this.options.maxFields,preferredFieldsMap:this.preferredFieldsMap,truncationSuffix:this.options.truncationSuffix,truncationFlagKey:this.options.truncationFlagKey})}getLevel(){return this.options.level}setLevel(e){if(!N[e])throw Error('Options "level" must be one of log.LEVELS enum!');this.options.level=e}internal(e,t,r,n){e>this.options.level||(r=Reflect.ownKeys(r={...this.options.data,...r}).length>0?this._sanitizeData(r):void 0,n=this._sanitizeData(n),this.options.logger.log(e,t,r,n,{prefix:this.options.prefix,suffix:this.options.suffix}))}setOptions(e){this.options={...this.options,...e}}getOptions(){return{...this.options}}child(e){let{prefix:t}=this.options;e.prefix&&(t=t?`${t}:${e.prefix}`:e.prefix);let r=e.data?{...this.options.data,...e.data}:this.options.data;return new oz({...this.options,...e,prefix:t,data:r})}error(e,t){this.internal(N.ERROR,e,t)}exception(e,t,r){this.internal(N.ERROR,t,r,e)}softFail(e,t){this.internal(N.SOFT_FAIL,e,t)}warning(e,t){this.internal(N.WARNING,e,t)}info(e,t){this.internal(N.INFO,e,t)}debug(e,t){this.internal(N.DEBUG,e,t)}perf(e,t){this.internal(N.PERF,e,t)}warningOnce(e){this.warningsOnceLogged.has(e)||(this.warningsOnceLogged.add(e),this.warning(e))}deprecated(e){this.warningOnce(e)}};let oj=new oz;function oD(e,t){return function(){return e.apply(t,arguments)}}var o$=r("z");let{toString:oM}=Object.prototype,{getPrototypeOf:oB}=Object,{iterator:oF,toStringTag:oq}=Symbol,oW=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),oZ=e=>"string"==typeof e&&("__proto__"===e||"constructor"===e||"prototype"===e),oK=(e,t,r)=>e===Object.prototype||!r&&null===t,oH=(e,t)=>{let r=e,n=[];for(;null!=r&&-1===n.indexOf(r);){n.push(r);let i=oB(r);if(oK(r,i,r===e))break;if(oW(r,t))return!0;r=i}return!1},oV=(f=Object.create(null),e=>{let t=oM.call(e);return f[t]||(f[t]=t.slice(8,-1).toLowerCase())}),oG=e=>(e=e.toLowerCase(),t=>oV(t)===e),oJ=e=>t=>typeof t===e,{isArray:oY}=Array,oX=oJ("undefined");function oQ(e){return null!==e&&!oX(e)&&null!==e.constructor&&!oX(e.constructor)&&o2(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let o0=oG("ArrayBuffer"),o1=oJ("string"),o2=oJ("function"),o4=oJ("number"),o3=e=>null!==e&&"object"==typeof e,o9=e=>{if(!o3(e))return!1;let t=oB(e);return(null===t||t===Object.prototype||null===oB(t))&&(oK(e,t,!0)||!oW(e,oq)&&!oW(e,oF))},o6=oG("Date"),o5=oG("File"),o8=oG("Blob"),o7=oG("FileList"),ae=oG("Set"),at="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:"u">typeof global?global:{},ar=void 0!==at.FormData?at.FormData:void 0,an=oG("URLSearchParams"),[ai,ao,aa,as]=["ReadableStream","Request","Response","Headers"].map(oG);function al(e,t,{allOwnKeys:r=!1}={}){let n,i;if(null!=e)if("object"!=typeof e&&(e=[e]),oY(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{let i;if(oQ(e))return;let o=r?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;for(n=0;n<a;n++)i=o[n],t.call(null,e[i],i,e)}}let au="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,ac=e=>!oX(e)&&e!==au,ap=(h="u">typeof Uint8Array&&oB(Uint8Array),e=>h&&e instanceof h),ad=oG("HTMLFormElement"),{propertyIsEnumerable:af}=Object.prototype,ah=oG("RegExp"),am=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};al(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)},ag=oG("AsyncFunction"),ay=(y="function"==typeof setImmediate,b=o2(au.postMessage),y?setImmediate:b?(v=`axios@${Math.random()}`,w=[],au.addEventListener("message",({source:e,data:t})=>{e===au&&t===v&&w.length&&w.shift()()},!1),e=>{w.push(e),au.postMessage(v,"*")}):e=>setTimeout(e)),ab="u">typeof queueMicrotask?queueMicrotask.bind(au):void 0!==o$&&o$.nextTick||ay,av=e=>null!=e&&o2(e[oF]);var aw={isArray:oY,isArrayBuffer:o0,isBuffer:oQ,isFormData:e=>{if(!e)return!1;if(ar&&e instanceof ar)return!0;let t=oB(e);if(!t||t===Object.prototype||!o2(e.append))return!1;let r=oV(e);return"formdata"===r||"object"===r&&o2(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&o0(e.buffer)},isString:o1,isNumber:o4,isBoolean:e=>!0===e||!1===e,isObject:o3,isPlainObject:o9,isEmptyObject:e=>{if(!o3(e)||oQ(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:ai,isRequest:ao,isResponse:aa,isHeaders:as,isUndefined:oX,isDate:o6,isFile:o5,isReactNativeBlob:e=>!!(e&&void 0!==e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:o8,isRegExp:ah,isFunction:o2,isStream:e=>o3(e)&&o2(e.pipe),isURLSearchParams:an,isTypedArray:ap,isFileList:o7,forEach:al,merge:function e(...t){let{caseless:r,skipUndefined:n}=ac(this)&&this||{},i={},o=r?Object.create(null):null,a=(t,r)=>{if("__proto__"===r||"constructor"===r||"prototype"===r)return;let a=r;if(o&&"string"==typeof r){let e=r.toLowerCase(),t=o[e];void 0!==t&&oW(i,t)?a=t:o[e]=r}let s=oW(i,a)?i[a]:void 0;o9(s)&&o9(t)?i[a]=e(s,t):o9(t)?i[a]=e({},t):oY(t)?i[a]=t.slice():n&&oX(t)||(i[a]=t)};for(let e=0,r=t.length;e<r;e++){let r=t[e];if(!r||oQ(r)||(al(r,a),"object"!=typeof r||oY(r)||!Object.getOwnPropertySymbols))continue;let n=Object.getOwnPropertySymbols(r);for(let e=0;e<n.length;e++){let t=n[e];af.call(r,t)&&a(r[t],t)}}return i},extend:(e,t,r,{allOwnKeys:n}={})=>(al(t,(t,n)=>{r&&o2(t)?Object.defineProperty(e,n,{__proto__:null,value:oD(t,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,n,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],(!n||n(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=!1!==r&&oB(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype)return t},kindOf:oV,kindOfTest:oG,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},toArray:e=>{if(!e)return null;if(oY(e))return e;let t=e.length;if(!Number.isSafeInteger(t)||t<0||t>0xffffffff)return null;let r=new Set,n=new Set,i=e;for(;null!=i&&r.size<t;){if(n.has(i))return null;n.add(i);let o=oB(i);if(oK(i,o,i===e))break;Object.getOwnPropertyNames(i).forEach(e=>{let n=+e;Number.isInteger(n)&&n>=0&&n<t&&String(n)===e&&oW(i,e)&&r.add(n)}),i=o}if(r.size!==t)return null;let o=Array(t);for(;t-- >0;)o[t]=e[t];return o},forEachEntry:(e,t)=>{let r,n=(e&&e[oF]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let r,n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:ad,hasOwnProperty:oW,hasOwnProp:oW,hasOwnInPrototypeChain:oH,getSafeProp:(e,t)=>null!=e&&oH(e,t)?e[t]:void 0,toSafeFlatObject:e=>{if(null==e||"object"!=typeof e&&"function"!=typeof e)return e;let t=oB(e);if(null===t&&(e=>{if(!Object.isExtensible(e))return!1;let t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(oZ(t))return!1;let r=Object.getOwnPropertyDescriptor(e,t);return!!r&&r.configurable&&!0===r.writable})})(e))return e;let r=Object.create(null),n=Object.create(null),i=[],o=e;for(;null!=o&&-1===i.indexOf(o);){i.push(o);let a=o===e?t:oB(o);if(oK(o,a,o===e))break;let s=Object.getOwnPropertyNames(o);for(let t of(Object.getOwnPropertySymbols&&s.push(...Object.getOwnPropertySymbols(o)),s))!oZ(t)&&(oW(n,t)||(r[t]=e[t],n[t]=!0));o=a}return r},reduceDescriptors:am,freezeMethods:e=>{am(e,(t,r)=>{if(o2(e)&&["arguments","caller","callee"].includes(r))return!1;if(o2(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{let r={};return(oY(e)?e:String(e).split(t)).forEach(e=>{r[e]=!0}),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e*=1)?e:t,findKey:function(e,t){let r;if(oQ(e))return null;t=t.toLowerCase();let n=Object.keys(e),i=n.length;for(;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null},global:au,isContextDefined:ac,isSpecCompliantForm:function(e){return!!(e&&o2(e.append)&&"FormData"===e[oq]&&e[oF])},toJSONObject:e=>{let t=new WeakSet,r=e=>{if(o3(e)){if(t.has(e))return;if(oQ(e))return e;if(!("toJSON"in e)){let n;if(t.add(e),ae(e))for(let t of(n=[],e)){let e=r(t);oX(e)||n.push(e)}else n=oY(e)?[]:{},al(e,(e,t)=>{let i=r(e);oX(i)||(n[t]=i)});return t.delete(e),n}}return e};return r(e)},isAsyncFn:ag,isThenable:e=>e&&(o3(e)||o2(e))&&o2(e.then)&&o2(e.catch),setImmediate:ay,asap:ab,isIterable:av,isSafeIterable:e=>null!=e&&oH(e,oF)&&av(e)};let a_=aw.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),aE=RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),aS=RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function aO(e,t){return aw.isArray(e)?e.map(e=>aO(e,t)):function(e){let t=0,r=e.length;for(;t<r;){let r=e.charCodeAt(t);if(9!==r&&32!==r)break;t+=1}for(;r>t;){let t=e.charCodeAt(r-1);if(9!==t&&32!==t)break;r-=1}return 0===t&&r===e.length?e:e.slice(t,r)}(String(e).replace(t,""))}function aR(e){let t=Object.create(null);return aw.forEach(e.toJSON(),(e,r)=>{t[r]=aO(e,aS)}),t}let aT=Symbol("internals");function aA(e){return e&&String(e).trim().toLowerCase()}function ax(e){return!1===e||null==e?e:aw.isArray(e)?e.map(ax):aO(String(e),aE)}let aC=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function ak(e){let t=0,r=e.length;for(;t<r;){let r=e.charCodeAt(t);if(9!==r&&32!==r)break;t+=1}for(;r>t;){let t=e.charCodeAt(r-1);if(9!==t&&32!==t)break;r-=1}return 0===t&&r===e.length?e:e.slice(t,r)}let aP=e=>"__proto__"===e?"__Proto__":e;function aU(e,t,r,n,i){if(aw.isFunction(n))return n.call(e,t,r);if(i&&(t=r),aw.isString(t)){if(aw.isString(n))return -1!==t.indexOf(n);if(aw.isRegExp(n))return n.test(t)}}let aI=class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function i(e,t,r){let i=aA(t);if(!i)return;let o=aw.findKey(n,i);o&&void 0!==n[o]&&!0!==r&&(void 0!==r||!1===n[o])||(n[aP(o||t)]=ax(e))}let o=(e,t)=>aw.forEach(e,(e,r)=>i(e,r,t));if(aw.isPlainObject(e)||e instanceof this.constructor)o(e,t);else{let n;if(aw.isString(e)&&(e=e.trim())&&(n=e,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim()))){var a;let r,n,i,s;o((a=e,s=Object.create(null),a&&a.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim();let t=aw.hasOwnProp(s,r);!r||t&&aw.hasOwnProp(a_,r)||("set-cookie"===r?t?s[r].push(n):s[r]=[n]:s[r]=t?s[r]+", "+n:n)}),s),t)}else if(aw.isObject(e)&&aw.isSafeIterable(e)){let r=Object.create(null),n,i;for(let t of e){if(!aw.isArray(t))throw TypeError("Object iterator must return a key-value pair");i=t[0],aw.hasOwnProp(r,i)?(n=r[i],r[i]=aw.isArray(n)?[...n,t[1]]:[n,t[1]]):r[i]=t[1]}o(r,t)}else null!=e&&i(t,e,r)}return this}get(e,t){if(e=aA(e)){let r=aw.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t){let t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=n.exec(e);)r[t[1]]=t[2];return r}if(aw.isFunction(t))return t.call(this,e,r);if(aw.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=aA(e)){let r=aw.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||aU(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function i(e){if(e=aA(e)){let i=aw.findKey(r,e);i&&(!t||aU(r,r[i],i,t))&&(delete r[i],n=!0)}}return aw.isArray(e)?e.forEach(i):i(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||aU(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r=Object.create(null);return aw.forEach(this,(n,i)=>{let o=aw.findKey(r,i);if(o){t[o]=ax(n),delete t[i];return}let a=aP(e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(i).trim());a!==i&&delete t[i],t[a]=ax(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return aw.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&aw.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){let e=this.get("set-cookie");return aw.isArray(e)?e:null==e||!1===e?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return function(e){let t=Object.create(null),r=String(e),n=0,i=!1,o=!1;function a(e){let i=ak(r.slice(n,e)),o=i.indexOf("=");if(o<1)return;let a=ak(i.slice(0,o));if(!aC.test(a))return;let s=a.toLowerCase();if("__proto__"===s||"constructor"===s||"prototype"===s)return;let l=ak(i.slice(o+1));t[s]=function(e){let t=e.length-1;if(t<1||34!==e.charCodeAt(0)||34!==e.charCodeAt(t))return e;let r="";for(let n=1;n<t;n++){let i=e.charCodeAt(n);if(34===i||92===i&&(n+=1)>=t)return e;r+=e[n]}return r}(l)}for(let e=0;e<r.length;e++){let t=r.charCodeAt(e);i?o?o=!1:92===t?o=!0:34===t&&(i=!1):34===t?i=!0:(44===t||59===t)&&(a(e),n=e+1)}return a(r.length),t}(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[aT]=this[aT]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=aA(e);if(!t[n]){let i;i=aw.toCamelCase(" "+e),["get","set","has"].forEach(t=>{Object.defineProperty(r,t+i,{__proto__:null,value:function(r,n,i){return this[t].call(this,e,r,n,i)},configurable:!0})}),t[n]=!0}}return aw.isArray(e)?e.forEach(n):n(e),this}};aI.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),aw.reduceDescriptors(aI.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),aw.freezeMethods(aI);let aN="[REDACTED ****]";function aL(e){try{return String(e)}catch(e){return""}}let az=Symbol("causeStack");let aj=class AxiosError extends Error{static from(e,t,r,n,i,o){let a=e.message;!a&&aw.isArray(e.errors)&&e.errors.length&&(a=e.errors.map(e=>{try{return e&&e.message?aL(e.message):aL(e)}catch(e){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError");let s=new aj(a,t||e.code,r,n,i);return Object.defineProperty(s,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),s.name=e.name,!function(e,t){try{let r=t&&t.stack;if("string"!=typeof r||!r)return;let n=e.stack;if("string"!=typeof n||!n)return;let i="\nCaused by: "+r;e.stack=n+i,Object.defineProperty(e,az,{__proto__:null,value:i})}catch(e){}}(s,e),null!=e.status&&null==s.status&&(s.status=e.status),o&&Object.assign(s,o),s}constructor(e,t,r,n,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status)}toJSON(){let e,t,r,n=this.config,i=n&&aw.hasOwnProp(n,"redact")?n.redact:void 0,o=aw.isArray(i)&&i.length>0?(e=new Set(i.map(e=>String(e).toLowerCase())),t=[],(r=n=>{let i;if(null===n||"object"!=typeof n||aw.isBuffer(n))return n;if(-1===t.indexOf(n)){if(n instanceof aI&&(n=n.toJSON()),t.push(n),aw.isArray(n))i=[],n.forEach((e,t)=>{let n=r(e);aw.isUndefined(n)||(i[t]=n)});else{if(!aw.isPlainObject(n)&&function(e){if(aw.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(aw.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(n))return t.pop(),n;for(let[t,o]of(i=Object.create(null),Object.entries(n))){let n=e.has(t.toLowerCase())?aN:r(o);aw.isUndefined(n)||(i[t]=n)}}return t.pop(),i}})(n)):aw.toJSONObject(n);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};aj.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",aj.ERR_BAD_OPTION="ERR_BAD_OPTION",aj.ECONNABORTED="ECONNABORTED",aj.ETIMEDOUT="ETIMEDOUT",aj.ECONNREFUSED="ECONNREFUSED",aj.ERR_NETWORK="ERR_NETWORK",aj.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",aj.ERR_DEPRECATED="ERR_DEPRECATED",aj.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",aj.ERR_BAD_REQUEST="ERR_BAD_REQUEST",aj.ERR_CANCELED="ERR_CANCELED",aj.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",aj.ERR_INVALID_URL="ERR_INVALID_URL",aj.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var aD=aj;function a$(e){return aw.isPlainObject(e)||aw.isArray(e)}function aM(e){return aw.endsWith(e,"[]")?e.slice(0,-2):e}function aB(e,t,r){return e?e.concat(t).map(function(e,t){return e=aM(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}let aF=aw.toFlatObject(aw,{},null,function(e){return/^is[A-Z]/.test(e)});var aq=function(e,t,r){if(!aw.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(e,t)=>{let n=aw.getSafeProp(r,e);return aw.isUndefined(n)?t:n},i=n("metaTokens",!0),o=n("visitor")||h,a=n("dots",!1),s=n("indexes",!1),l=n("Blob")||"u">typeof Blob&&Blob,u=n("maxDepth",100),c=l&&aw.isSpecCompliantForm(t),p=[];if(!aw.isFunction(o))throw TypeError("visitor must be a function");function d(e){if(null===e)return"";if(aw.isDate(e))return e.toISOString();if(aw.isBoolean(e))return e.toString();if(!c&&aw.isBlob(e))throw new aD("Blob is not supported. Use a Buffer instead.");if(aw.isArrayBuffer(e)||aw.isTypedArray(e)){if(c&&"function"==typeof l)return new l([e]);throw new aD("Blob is not supported. Use a Buffer instead.",aD.ERR_NOT_SUPPORT)}return e}function f(e){if(e>u)throw new aD("Object is too deeply nested ("+e+" levels). Max depth: "+u,aD.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(e,r,n){let o=e;if(aw.isReactNative(t)&&aw.isReactNativeBlob(e))return t.append(aB(n,r,a),d(e)),!1;if(e&&!n&&"object"==typeof e)if(aw.endsWith(r,"{}"))r=i?r:r.slice(0,-2),e=function(e){if(1/0===u)return JSON.stringify(e);let t=[];return JSON.stringify(e,function(e,r){if(!aw.isObject(r))return r;for(;t.length&&t[t.length-1]!==this;)t.pop();return t.push(r),f(1+t.length-1),r})}(e);else{var l;if(aw.isArray(e)&&(l=e,aw.isArray(l)&&!l.some(a$))||(aw.isFileList(e)||aw.endsWith(r,"[]"))&&(o=aw.toArray(e)))return r=aM(r),o.forEach(function(e,n){aw.isUndefined(e)||null===e||t.append(!0===s?aB([r],n,a):null===s?r:r+"[]",d(e))}),!1}return!!a$(e)||(t.append(aB(n,r,a),d(e)),!1)}let m=Object.assign(aF,{defaultVisitor:h,convertValue:d,isVisitable:a$});if(!aw.isObject(e))throw TypeError("data must be an object");return!function e(r,n,i=0){if(!aw.isUndefined(r)){if(f(i),-1!==p.indexOf(r))throw Error("Circular reference detected in "+n.join("."));p.push(r),aw.forEach(r,function(r,a){!0===(!(aw.isUndefined(r)||null===r)&&o.call(t,r,aw.isString(a)?a.trim():a,n,m))&&e(r,n?n.concat(a):[a],i+1)}),p.pop()}}(e),t};function aW(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function aZ(e,t){this._pairs=[],e&&aq(e,this,t)}let aK=aZ.prototype;function aH(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function aV(e,t,r){let n;if(!t)return e;e=e||"";let i=aw.isFunction(r)?{serialize:r}:r,o=aw.getSafeProp(i,"encode")||aH,a=aw.getSafeProp(i,"serialize");if(n=a?a(t,i):aw.isURLSearchParams(t)?t.toString():new aZ(t,i).toString(o)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}aK.append=function(e,t){this._pairs.push([e,t])},aK.toString=function(e){let t=e?t=>e.call(this,t,aW):aW;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};let aG=Symbol("internals");function aJ(e){return e?e.length:0}function aY(e){if(e)for(;e.length&&null===e[e.length-1];)e.pop()}function aX(e,t){let r=e.handlers,n=aJ(r);r!==t.handlersRef?(t.handlersRef=r,t.handlerEntries.clear()):n!==t.handlersLength&&(n?t.handlerEntries.forEach(function(e,n){r[e.index]!==e.handler&&t.handlerEntries.delete(n)}):t.handlerEntries.clear()),t.handlersLength=n}let aQ=class InterceptorManager{constructor(){this.handlers=[],this[aG]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,r){let n={fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null},i=this[aG];null==this.handlers&&(this.handlers=[]),aX(this,i);let o=i.nextId++;return this.handlers.push(n),i.handlerEntries.set(o,{handler:n,index:this.handlers.length-1}),i.handlersLength=this.handlers.length,o}eject(e){let t=this[aG];aX(this,t);let r="string"==typeof e&&""!==e&&String(Number(e))===e?Number(e):e,n=t.handlerEntries.get(r);if(n){if(t.handlerEntries.delete(r),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,t.iterationDepth||(aY(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],aX(this,this[aG]))}forEach(e){let t=this[aG];aX(this,t),t.iterationDepth++;try{aw.forEach(this.handlers,function(t){null!==t&&e(t)})}finally{--t.iterationDepth||(aX(this,t),aY(this.handlers),t.handlersLength=aJ(this.handlers))}}};var a0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0,encodeBasicAuthUsername:!1},a1="u">typeof URLSearchParams?URLSearchParams:aZ,a2="u">typeof FormData?FormData:null,a4="u">typeof Blob?Blob:null;let a3="u">typeof window&&"u">typeof document,a9="object"==typeof navigator&&navigator||void 0,a6=a3&&(!a9||0>["ReactNative","NativeScript","NS"].indexOf(a9.product)),a5="u">typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,a8=a3&&window.location.href||"http://localhost";var a7={...D,isBrowser:!0,classes:{URLSearchParams:a1,FormData:a2,Blob:a4},protocols:["http","https","file","blob","url","data"]};function se(e){if(e>100)throw new aD("FormData field is too deeply nested ("+e+" levels). Max depth: 100",aD.ERR_FORM_DATA_DEPTH_EXCEEDED)}function st(e){let t,r,n={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)n[r=i[t]]=e[r];return n}function sr(e){if(!aw.isArray(e))return e;let t=Object.keys(e);return t.length!==e.length||t.some((e,t)=>e!==String(t))?st(e):e}var sn=function(e){if(aw.isFormData(e)&&aw.isFunction(e.entries)){let t={};aw.forEachEntry(e,(e,r)=>{!function e(t,r,n,i){se(i);let o=t[i++];if("__proto__"===o)return!0;let a=Number.isFinite(+o),s=i>=t.length;return(o=!o&&aw.isArray(n)?n.length:o,s)?aw.hasOwnProp(n,o)?(n[o]=sr(n[o]),n[o]=aw.isArray(n[o])?n[o].concat(r):[n[o],r]):n[o]=r:(aw.hasOwnProp(n,o)&&aw.isObject(n[o])||(n[o]=[]),e(t,r,n[o],i)&&aw.isArray(n[o])&&(n[o]=st(n[o]))),!a}(function(e){let t,r=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;for(;null!==(t=n.exec(e));)se(r.length),r.push("[]"===t[0]?"":t[1]||t[0]);return r}(e),r,t,0)});let r=[t];for(;r.length;){let e=r.pop();Object.keys(e).forEach(t=>{let n=e[t]=sr(e[t]);(aw.isArray(n)||aw.isPlainObject(n))&&r.push(n)})}return t}return null};let si=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),so=(e,t)=>null!=e&&aw.hasOwnProp(e,t)?e[t]:void 0,sa={transitional:a0,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=aw.isObject(e);if(o&&aw.isHTMLForm(e)&&(e=new FormData(e)),aw.isFormData(e))return i?JSON.stringify(sn(e)):e;if(aw.isArrayBuffer(e)||aw.isBuffer(e)||aw.isStream(e)||aw.isFile(e)||aw.isBlob(e)||aw.isReadableStream(e))return e;if(aw.isArrayBufferView(e))return e.buffer;if(aw.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){let t=so(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return aq(e,new a7.classes.URLSearchParams,{visitor:function(e,t,r,n){return a7.isNode&&aw.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t}).toString();if((r=aw.isFileList(e))||n.indexOf("multipart/form-data")>-1){let n=so(this,"env"),i=n&&n.FormData;return aq(r?{"files[]":e}:e,i&&new i,t)}}if(o||i){t.setContentType("application/json",!1);var a=e;if(aw.isString(a))try{return(0,JSON.parse)(a),aw.trim(a)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(a)}return e}],transformResponse:[function(e){let t=so(this,"transitional")||sa.transitional,r=t&&t.forcedJSONParsing,n=so(this,"responseType"),i="json"===n;if(aw.isResponse(e)||aw.isReadableStream(e))return e;if(e&&aw.isString(e)&&(r&&!n||i)){let r=t&&t.silentJSONParsing;try{return JSON.parse(e,so(this,"parseReviver"))}catch(e){if(!r&&i){if("SyntaxError"===e.name)throw aD.from(e,aD.ERR_BAD_RESPONSE,this,null,so(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:a7.classes.FormData,Blob:a7.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function ss(e,t){let r=this||sa,n=t||r,i=aI.from(n.headers),o=n.data;return aw.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function sl(e){return!!(e&&e.__CANCEL__)}aw.forEach(si,e=>{sa.headers[e]={}});let su=class CanceledError extends aD{constructor(e,t,r){super(null==e?"canceled":e,aD.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function sc(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new aD("Request failed with status code "+r.status,r.status>=400&&r.status<500?aD.ERR_BAD_REQUEST:aD.ERR_BAD_RESPONSE,r.config,r.request,r))}let sp=/[\t\n\r]/g;function sd(e){if("string"!=typeof e)return e;let t=0;for(;t<e.length&&32>=e.charCodeAt(t);)t++;return e.slice(t).replace(sp,"")}function sf(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1].toLowerCase()||""}let sh=e=>{try{return decodeURIComponent(e)}catch(t){return e}};var sm=a7.hasStandardBrowserEnv?{write(e,t,r,n,i,o,a){if("u"<typeof document)return;let s=[`${e}=${encodeURIComponent(t)}`];aw.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),aw.isString(n)&&s.push(`path=${n}`),aw.isString(i)&&s.push(`domain=${i}`),!0===o&&s.push("secure"),aw.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if("u"<typeof document)return null;let t=document.cookie;if(!t)return null;let r=t.split(";");for(let t=0;t<r.length;t++){let n=r[t].replace(/^\s+/,""),i=n.indexOf("=");if(-1!==i&&n.slice(0,i)===e)return sh(n.slice(i+1))}return null},async readAsync(e){try{let t="u">typeof window&&window.cookieStore;if(t&&aw.isFunction(t.get)){let r=await t.get(e);return r?sh(r.value):null}}catch(e){}return this.read(e)},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,readAsync:async()=>null,remove(){}},sg=function(e,t){let r,n=Array(e=e||10),i=Array(e),o=0,a=0;return t=void 0!==t?t:1e3,function(s){let l=Date.now(),u=i[a];r||(r=l),n[o]=s,i[o]=l;let c=a,p=0;for(;c!==o;)p+=n[c++],c%=e;if((o=(o+1)%e)===a&&(a=(a+1)%e),l-r<t)return;let d=u&&l-u;return d?Math.round(1e3*p/d):void 0}},sy=function(e,t){let r,n,i=0,o=1e3/t,a=(t,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-i;s>=o?a(e,t):(r=e,n||(n=setTimeout(()=>{n=null,a(r)},o-s)))},()=>r&&a(r),(...e)=>a(e)]};let sb=(e,t,r=3)=>{let n=0,i=sg(50,250);return sy(r=>{if(!r||!aw.isNumber(r.loaded))return;let o=r.loaded,a=r.lengthComputable?r.total:void 0,s=Math.max(0,null!=a?Math.min(o,a):o),l=Math.max(0,s-n),u=i(l);n=Math.max(n,s),e({loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a?(a-s)/u:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})},r)},sv=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},sw=(e,t=aw.asap)=>(...r)=>t(()=>e(...r));var s_=a7.hasStandardBrowserEnv?(m=new URL(a7.origin),e=>(e=new URL(e,document.baseURI||a7.origin),m.protocol===e.protocol&&m.host===e.host&&m.port===e.port)):()=>!0;let sE=/^https?:(?!\/\/)/i;function sS(e,t){if("string"==typeof e){let n=sd(e);if(sE.test(n)){var r;let e,i,o;throw new aD(`Invalid URL ${JSON.stringify((o=(-1===(i=(e=n.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${aN}@`)).indexOf("#"))?e:e.slice(0,i)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${aN}`),-1===i?o:`${o}#${!(r=e.slice(i+1))?r:r.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,r="")=>`${t}${r}${aN}`)}`))}: missing "//" after protocol`,aD.ERR_INVALID_URL,t)}}}function sO(e,t,r,n){sS(t,n);let i=!("string"==typeof t&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t));if(e&&(i||!1===r)){sS(e,n);if(!t)return e;let r=e.length;for(;r>0&&47===e.charCodeAt(r-1);)r--;return e.slice(0,r)+"/"+t.replace(/^\/+/,"")}return t}let sR=e=>e instanceof aI?{...e}:e,sT=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>{let r=Object.getOwnPropertyDescriptor(e,t);return r&&r.enumerable})):Object.keys(e);function sA(e,t,r,n){return aw.isPlainObject(e)&&aw.isPlainObject(t)?aw.merge.call({caseless:n},e,t):aw.isPlainObject(t)?aw.merge({},t):aw.isArray(t)?t.slice():t}function sx(e,t,r,n){return aw.isUndefined(t)?aw.isUndefined(e)?void 0:sA(void 0,e,r,n):sA(e,t,r,n)}function sC(e,t){if(!aw.isUndefined(t))return sA(void 0,t)}function sk(e,t){return aw.isUndefined(t)?aw.isUndefined(e)?void 0:sA(void 0,e):sA(void 0,t)}function sP(e,t,r,n,i){return aw.hasOwnProp(i,r)?sA(e,t):aw.hasOwnProp(n,r)?sA(void 0,e):void 0}let sU=Object.freeze({__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0}),sI={url:sC,method:sC,data:sC,baseURL:sk,transformRequest:sk,transformResponse:sk,params:function(e,t){let r=[],n=new WeakMap,i={};function o(e,t){if(!aw.isPlainObject(t))return aw.isArray(t)?t.slice():t;let o=aw.isPlainObject(e)?e:i,a=n.get(t);if(a||(a=new WeakMap,n.set(t,a)),a.has(o))return a.get(o);let s={};return a.set(o,s),r.push({base:o,source:t,result:s}),s}let a=aw.isUndefined(t)?o(void 0,e):o(e,t);for(;r.length;){let{base:e,source:t,result:n}=r.pop(),i=new Set(sT(e)),a=new Set(sT(t));new Set([...i,...a]).forEach(r=>{if("__proto__"===r||"constructor"===r||"prototype"===r)return;let s=a.has(r),l=s?t[r]:void 0,u=(!s||aw.isPlainObject(l))&&i.has(r)?e[r]:void 0;n[r]=s?o(u,l):o(void 0,u)})}return!function(e){let t=[{value:e}],r=new WeakSet,n=new WeakSet;for(;t.length;){let{value:e,done:i}=t.pop();if(!aw.isPlainObject(e)&&!aw.isArray(e))continue;if(i){r.delete(e);continue}if(r.has(e))throw new aD("Circular reference detected in params",aD.ERR_BAD_OPTION_VALUE);if(n.has(e))continue;n.add(e),r.add(e),t.push({value:e,done:!0});let o=Object.keys(e);Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertySymbols(e).forEach(t=>{let r=Object.getOwnPropertyDescriptor(e,t);r&&r.enumerable&&o.push(t)}),o.forEach(r=>{if("__proto__"===r||"constructor"===r||"prototype"===r){let n=Object.getOwnPropertyDescriptor(e,r);n&&aw.hasOwnProp(n,"value")&&t.push({value:n.value})}else t.push({value:e[r]})})}}(a),a},paramsSerializer:sk,timeout:sk,timeoutErrorMessage:sk,withCredentials:sk,withXSRFToken:sk,adapter:sk,responseType:sk,xsrfCookieName:sk,xsrfHeaderName:sk,onUploadProgress:sk,onDownloadProgress:sk,decompress:sk,maxContentLength:sk,maxBodyLength:sk,beforeRedirect:sk,transport:sk,httpAgent:sk,httpsAgent:sk,cancelToken:sk,socketPath:sk,allowedSocketPaths:sk,responseEncoding:sk,validateStatus:sP,headers:function(e,t,r){return sx(sR(e),sR(t),r,!0)}};function sN(e,t){e=e||{},t=t||{};let r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",sU);let n=sT({...e,...t});for(let i=0,o=n.length;i<o;i++){let o=n[i];if("__proto__"===o||"constructor"===o||"prototype"===o)continue;let a=aw.hasOwnProp(sI,o)?sI[o]:sx,s=aw.hasOwnProp(e,o)?e[o]:void 0,l=aw.hasOwnProp(t,o)?t[o]:void 0,u=a===sP?a(s,l,o,e,t):a(s,l,o);aw.isUndefined(u)&&a!==sP||(r[o]=u)}return aw.hasOwnProp(t,"validateStatus")&&aw.isUndefined(t.validateStatus)&&!1===function(e,t,r){let n=aw.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!aw.isUndefined(n)){if(!aw.isPlainObject(n))return;else if(aw.hasOwnProp(n,r))return n[r]}let i=aw.hasOwnProp(e,"transitional")?e.transitional:void 0;if(aw.isPlainObject(i)&&aw.hasOwnProp(i,r))return i[r]}(e,t,"validateStatusUndefinedResolves")&&(aw.hasOwnProp(e,"validateStatus")?r.validateStatus=sA(void 0,e.validateStatus):delete r.validateStatus),r}let sL=["content-type","content-length"],sz=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),sj=e=>sm.read(e);var sD=function(e,t=sj){let r=sN({},e),n=e=>aw.hasOwnProp(r,e)?r[e]:void 0,i=n("data"),o=n("withXSRFToken"),a=n("xsrfHeaderName"),s=n("xsrfCookieName"),l=n("headers"),u=n("auth"),c=n("baseURL"),p=n("allowAbsoluteUrls"),d=n("url");if(r.headers=l=aI.from(l),r.url=aV(sO(c,d,p,r),n("params"),n("paramsSerializer")),u){let t=aw.getSafeProp(u,"username")||"",r=aw.getSafeProp(u,"password")||"",i=n("transitional"),o=i&&aw.hasOwnProp(i,"encodeBasicAuthUsername")&&!0===i.encodeBasicAuthUsername;try{l.set("Authorization","Basic "+btoa((o?sz(t):t)+":"+(r?sz(r):"")))}catch(t){throw aD.from(t,aD.ERR_BAD_OPTION_VALUE,e)}}if(aw.isFormData(i)){let e=aw.getSafeProp(i,"getHeaders");if(a7.hasStandardBrowserEnv||a7.hasStandardBrowserWebWorkerEnv||aw.isReactNative(i))l.setContentType(void 0);else{var f,h;aw.isFunction(e)&&(f=l,h=e.call(i),"content-only"!==n("formDataHeaderPolicy")?f.set(h):Object.entries(h||{}).forEach(([e,t])=>{sL.includes(e.toLowerCase())&&f.set(e,t)}))}}if(a7.hasStandardBrowserEnv&&(aw.isFunction(o)&&(o=o(r)),!0===o||null==o&&s_(r.url))){let e=a&&s&&t(s);e&&l.set(a,e)}return r},s$="u">typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){let n,i,o,a,s,l,u,c,p;try{let e=a7.hasStandardBrowserEnv&&"u">typeof window&&window.cookieStore;n=e&&aw.isFunction(e.get)}catch(e){}let d=sD(e,n?e=>(i=e,null):void 0),f=d.data,h=aI.from(d.headers).normalize(),{responseType:m,onUploadProgress:g,onDownloadProgress:y}=d;function b(){clearTimeout(a);try{u&&u()}catch(e){setTimeout(()=>{throw e})}try{c&&c()}catch(e){setTimeout(()=>{throw e})}v&&(l&&v.removeEventListener("progress",l),v.upload&&(s&&v.upload.removeEventListener("progress",s),u&&v.upload.removeEventListener("loadend",u))),d.cancelToken&&d.cancelToken.unsubscribe(o),d.signal&&d.signal.removeEventListener("abort",o)}let v=new XMLHttpRequest;function w(n){if(!v)return;if(0===v.status&&"file"!==(sf(sd(d.url))||sf(a7.origin))&&!(v.responseURL&&v.responseURL.startsWith("file:"))){r(new aD("Request aborted",aD.ECONNABORTED,e,v)),b(),v=null;return}try{n?p&&p(n):c&&c()}catch(e){setTimeout(()=>{throw e})}if(!v)return;let i=aI.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());sc(function(e){t(e),b()},function(e){r(e),b()},{data:m&&"text"!==m&&"json"!==m?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:i,config:e,request:v}),v=null}if(v.open(d.method.toUpperCase(),d.url,!0),v.timeout=d.timeout,"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||4!==v.readyState||(0!==v.status||v.responseURL&&v.responseURL.startsWith("file:"))&&setTimeout(w)},v.onabort=function(){v&&(r(new aD("Request aborted",aD.ECONNABORTED,e,v)),b(),v=null)},v.onerror=function(t){let n=new aD(t&&t.message?t.message:"Network Error",aD.ERR_NETWORK,e,v);n.event=t||null,r(n),b(),v=null},v.ontimeout=function(){if(!v)return;let t=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",n=d.transitional||a0;d.timeoutErrorMessage&&(t=d.timeoutErrorMessage),r(new aD(t,n.clarifyTimeoutError?aD.ETIMEDOUT:aD.ECONNABORTED,e,v)),b(),v=null},void 0===f&&h.setContentType(null),aw.isUndefined(d.withCredentials)||(v.withCredentials=!!d.withCredentials),m&&"json"!==m&&(v.responseType=d.responseType),y&&([l,c,p]=sb(y,!0),v.addEventListener("progress",l)),g&&v.upload&&([s,u]=sb(g),v.upload.addEventListener("progress",s),v.upload.addEventListener("loadend",u)),d.cancelToken||d.signal){if(o=t=>{if(!v)return;r(!t||t.type?new su(null,e,v):t);let n=v;b(),v=null,n.abort()},d.cancelToken&&d.cancelToken.subscribe(o),!v)return;d.signal&&(d.signal.aborted?o():d.signal.addEventListener("abort",o))}if(!v)return;let _=sf(d.url);if(_&&!a7.protocols.includes(_)){r(new aD("Unsupported protocol "+_+":",aD.ERR_BAD_REQUEST,e)),b();return}let E=()=>{v&&("setRequestHeader"in v&&aw.forEach(aR(h),function(e,t){v.setRequestHeader(t,e)}),v.send(f||null))};if(i){let t="u">typeof performance&&aw.isFunction(performance.now)?()=>performance.now():Date.now,n=v.timeout>0?t()+Number(v.timeout):void 0,o=()=>{if(!v)return;let e=v;e.ontimeout(),e.abort()};if(void 0!==n){let e=()=>{let r=n-t();r>0?a=setTimeout(e,Math.min(r,0x7fffffff)):o()};e()}sm.readAsync(i).then(e=>{if(v){if(void 0!==n&&t()>=n)return void o();if(e){let t=aw.hasOwnProp(d,"xsrfHeaderName")&&d.xsrfHeaderName;h.set(t,e)}E()}}).catch(t=>{v&&(r(aD.from(t,null,e,v)),b(),v=null)})}else E()})};let sM=function*(e,t){let r,n=e.byteLength;if(!t||n<t)return void(yield e);let i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},sB=async function*(e,t){for await(let r of sF(e))yield*sM(r,t)},sF=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);let t=e.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},sq=(e,t,r,n)=>{let i,o=sB(e,t),a=0,s=e=>{!i&&(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await o.next();if(t){s(),e.close();return}let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},sW=e=>String(e).replace(/\r\n|\r|\n/g,"\r\n"),sZ=e=>String(e).replace(/[\r\n"]/g,e=>"\r"===e?"%0D":"\n"===e?"%0A":"%22"),sK=(e,t)=>{let r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);t&&(13===i||10===i)?(13===i&&10===e.charCodeAt(n+1)&&n++,r+=2):i<128?r++:i<2048?r+=2:i>=55296&&i<=56319&&e.charCodeAt(n+1)>=56320&&57343>=e.charCodeAt(n+1)?(r+=4,n++):r+=3}return r};let sH=class FormDataError extends TypeError{constructor(e,t){super(e),this.name="FormDataError",this.reason=t}};let sV=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,sG=(e,t,r)=>t+2<r&&sV(e.charCodeAt(t+1))&&sV(e.charCodeAt(t+2)),sJ=e=>e<=57?e-48:(223&e)-55,sY=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||43===e||47===e||45===e||95===e,sX=e=>9===e||10===e||12===e||13===e||32===e,sQ=e=>{var t;let r,n,i=e.length,o=0,a=0,s=!1;for(let t=0;t<i;t++){let r=e.charCodeAt(t);if(37===r&&sG(e,t,i)&&(r=16*sJ(e.charCodeAt(t+1))+sJ(e.charCodeAt(t+2)),t+=2),!sX(r)){if(61===r){a++;continue}if(!sY(r)||a>0){s=!0;continue}o++}}if(s||a>2||a>0&&(o+a)%4!=0||o%4==1){let t,r;return t=e.length,r=0,t>0&&61===e.charCodeAt(t-1)&&(r++,t>1&&61===e.charCodeAt(t-2)&&r++),Math.floor((t-r)*3/4)}return r=Math.floor((t=o)/4),3*r+(2==(n=t%4)?1:2*(3===n))},s0={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:s1}=aw,s2=e=>{if(!aw.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},s4=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},s3=e=>{let t,r=void 0!==aw.global&&null!==aw.global?aw.global:globalThis,{ReadableStream:n,TextEncoder:i}=r;e=aw.merge.call({skipUndefined:!0},{Request:r.Request,Response:r.Response,Blob:r.Blob},e);let o=aw.hasOwnProp(e,"fetch")?e.fetch:void 0,{Request:a,Response:s,Blob:l}=e,u=o?s1(o):"function"==typeof fetch,c=s1(a),p=s1(s);if(!u)return!1;let d=u&&s1(n),f=u&&("function"==typeof i?(t=new i,e=>t.encode(e)):async e=>new Uint8Array(await new a(e).arrayBuffer())),h=c&&d&&s4(()=>{let e=!1,t=new a(a7.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),m=p&&d&&s4(()=>aw.isReadableStream(new s("").body)),g=Object.assign(Object.create(null),s0);c&&!s4(()=>new a(a7.origin,g))&&(delete g.cache,s4(()=>new a(a7.origin,g))||(g.cache=s0.cache));let y={stream:m&&(e=>e.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{y[e]||(y[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new aD(`Response type '${e}' is not supported`,aD.ERR_NOT_SUPPORT,r)})});let b=async e=>null==e?0:aw.isBlob(e)?e.size:aw.isArrayBufferView(e)||aw.isArrayBuffer(e)?e.byteLength:(aw.isURLSearchParams(e)&&(e+=""),aw.isString(e))?(await f(e)).byteLength:void 0;return async e=>{let t,{url:r,method:n,data:u,signal:p,cancelToken:f,timeout:v,onDownloadProgress:w,onUploadProgress:_,responseType:E,headers:S,withCredentials:O="same-origin",fetchOptions:R,maxContentLength:T,maxBodyLength:A,maxRedirects:x}=sD(e),C=aw.isNumber(T)&&T>-1,k=aw.isNumber(A)&&A>-1,P=t=>aw.hasOwnProp(e,t)?e[t]:void 0,U=o||fetch;E=E?(E+"").toLowerCase():"text";let I=((e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let r=new AbortController,n=!1,i=function(e){if(!n){n=!0,a();let t=e instanceof Error?e:this.reason;r.abort(t instanceof aD?t:new su(t instanceof Error?t.message:t))}},o=t&&setTimeout(()=>{o=null,i(new aD(`timeout of ${t}ms exceeded`,aD.ETIMEDOUT))},t),a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{let t=aw.getSafeProp(e,"unsubscribe");aw.isFunction(t)?t.call(e,i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>{if(!n){if(e.aborted)return void i.call(e);e.addEventListener("abort",i,{once:!0})}});let{signal:s}=r;return s.unsubscribe=()=>aw.asap(a),s})([p,f&&f.toAbortSignal()],v),N=null,L=I&&I.unsubscribe&&(()=>{I.unsubscribe()}),z=null,j=null,D=()=>new aD("Request body larger than maxBodyLength limit",aD.ERR_BAD_REQUEST,e,N);try{var $,M;let o,p,f,v,B,F=P("auth");if(F){let e=aw.getSafeProp(F,"username")||"",t=aw.getSafeProp(F,"password")||"";f={username:e,password:t}}if(v=($=r).indexOf("://"),B=$,-1!==v&&(B=B.slice(v+3)),B.includes("@")||B.includes(":")){if(o=new URL(r,a7.origin),!f&&(o.username||o.password)){let e=s2(o.username),t=s2(o.password);f={username:e,password:t}}(o.username||o.password)&&(o.username="",o.password="",r=o.href)}if(f){let e;S.delete("authorization"),S.set("Authorization","Basic "+btoa((e=(f.username||"")+":"+(f.password||""),encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))}if(C&&o&&"data:"===o.protocol){let t;if(M=o.href,t="string"==typeof M?M.indexOf("#"):-1,((e,t,r)=>{if(!e||"string"!=typeof e||!/^data:/i.test(e))return 0;let n=e.indexOf(",");if(n<0)return 0;let i=e.slice(5,n),o=e.slice(n+1);if(r.test(i))return t(o);let a=0;for(let e=0,t=o.length;e<t;e++){let r=o.charCodeAt(e);if(37===r&&sG(o,e,t))a+=1,e+=2;else if(r<128)a+=1;else if(r<2048)a+=2;else if(r>=55296&&r<=56319&&e+1<t){let t=o.charCodeAt(e+1);t>=56320&&t<=57343?(a+=4,e++):a+=3}else a+=3}return a})(-1===t?M:M.slice(0,t),sQ,/; *base64[\t\n\f\r ]*$/i)>T)throw new aD("maxContentLength size of "+T+" exceeded",aD.ERR_BAD_RESPONSE,e,N)}let q=aw.isSpecCompliantForm(u)&&aI.from(P("headers")).getContentType();if(aw.isString(q)&&/^multipart\/form-data(?:\s*;|$)/i.test(q.trim())){let e=aI.parseParameters(q);aw.hasOwnProp(e,"boundary")&&(p=e.boundary)}if(aw.isSpecCompliantForm(u)&&"get"!==n&&"head"!==n&&(k||_&&h||void 0!==p)&&(u=function(e,t,r,n,i){if(!aw.isFunction(t))throw new aD("Blob is not supported",aD.ERR_NOT_SUPPORT);if(void 0===i)if(aw.isFunction(a7.generateString))i="axios-"+a7.generateString(36,"0123456789abcdef");else{let e=aw.global.crypto;if(!e||!aw.isFunction(e.getRandomValues))throw new aD("Random byte generation is not supported",aD.ERR_NOT_SUPPORT);let t=new Uint8Array(18);e.getRandomValues(t),i="axios-"+Array.from(t,e=>("0"+e.toString(16)).slice(-2)).join("")}try{return function(e,t,r,n,i){if(!aw.isFunction(t))throw new sH("Blob is not supported","blob");if(!aw.isString(i)||!/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(i)||/ $/.test(i))throw new sH("Invalid multipart boundary","boundary");let o="--"+i+"--\r\n",a=o.length,s=[],l=e=>{if(a+e>r)throw n()};for(let[t,r]of(l(0),e)){let e=aw.isString(r),n=e?sK(r,!0):r.size;if(!Number.isFinite(n)||n<0)throw new sH("Unsupported FormData part size","part");l(n+sK(t,!0)+(!e&&r.name?sK(r.name,!1):0)+(!e&&r.type?sK(r.type,!1):0));let o="--"+i+'\r\nContent-Disposition: form-data; name="'+sZ(sW(t))+'"';e||(o+='; filename="'+sZ(aw.isString(r.name)?r.name:"blob")+'"\r\nContent-Type: '+String(r.type||"application/octet-stream").replace(/[\r\n]/g,""));let u=sK(o+="\r\n\r\n",!1)+n+2;l(u),a+=u,s.push({header:o,value:r,isString:e})}let u=[];for(let e of s)u.push(e.header,e.isString?sW(e.value):e.value,"\r\n");return u.push(o),new t(u,{type:"multipart/form-data; boundary="+i})}(e,t,r,n,i)}catch(e){if(e instanceof sH){let t="boundary"===e.reason?aD.ERR_BAD_OPTION_VALUE:aD.ERR_BAD_REQUEST;throw new aD(e.message,t)}throw e}}(u,l,k?A:1/0,D,p),S.setContentType(void 0===p?u.type:q),t=u.size),k&&"get"!==n&&"head"!==n){let e=await b(u);if("number"==typeof e&&isFinite(e)&&(t=e,e>A))throw D()}let W=k&&(aw.isReadableStream(u)||aw.isStream(u)),Z=(e,t,r)=>sq(e,65536,e=>{if(k&&e>A)throw z=D();t&&t(e)},r);if(h&&"get"!==n&&"head"!==n&&(_||W)){if(t=null==t?await (async(e,t)=>{let r=aw.toFiniteNumber(e.getContentLength());return null==r?b(t):r})(S,u):t,0!==t||W){let e,n=new a(r,{method:"POST",body:u,duplex:"half"});if(aw.isFormData(u)&&(e=n.headers.get("content-type"))&&S.setContentType(e),n.body){let[e,r]=_&&sv(t,sb(sw(_)))||[];u=Z(n.body,e,r)}}}else if(W&&!c&&d&&"get"!==n&&"head"!==n)u=Z(u);else if(W&&c&&!h&&"get"!==n&&"head"!==n)throw new aD("Stream request bodies are not supported by the current fetch implementation",aD.ERR_NOT_SUPPORT,e,N);aw.isString(O)||(O=O?"include":"omit");let K=c&&"credentials"in a.prototype;if(aw.isFormData(u)){let e=S.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&S.delete("content-type")}S.set("User-Agent","axios/1.21.1",!1);let H=null==R?R:Object.assign(Object.create(null),R);H&&(delete H.body,delete H.headers,delete H.method,delete H.signal,delete H.duplex,delete H.credentials);let V=Object.assign(Object.create(null),H,{signal:I,method:n.toUpperCase(),headers:aR(S.normalize()),body:u,duplex:"half",credentials:K?O:void 0});c&&(aw.forEach(g,(e,t)=>{void 0===V[t]&&(V[t]=e)}),void 0===V.signal&&(V.signal=null),void 0===V.body&&(V.body=null)),0===x&&(V.redirect="manual",H&&(H.redirect="manual")),N=c&&new a(r,V);let G=await (c?U(N,H):U(r,V)),J=aI.from(G.headers);if(C){let t=aw.toFiniteNumber(J.getContentLength());if(null!=t&&t>T)throw new aD("maxContentLength size of "+T+" exceeded",aD.ERR_BAD_RESPONSE,e,N)}let Y=m&&("stream"===E||"response"===E);if(m&&G.body&&(w||C||Y&&L)){let t={};["status","statusText","headers"].forEach(e=>{t[e]=G[e]});let r=aw.toFiniteNumber(J.getContentLength()),[n,i]=w&&sv(r,sb(sw(w),!0))||[];G=new s(sq(G.body,65536,t=>{if(C&&t>T)throw j=new aD("maxContentLength size of "+T+" exceeded",aD.ERR_BAD_RESPONSE,e,N);n&&n(t)},()=>{i&&i(),L&&L()}),t)}E=E||"text";let X=await y[aw.findKey(y,E)||"text"](G,e);if(C&&!m&&!Y){let t;if(null!=X&&("number"==typeof X.byteLength?t=X.byteLength:"number"==typeof X.size?t=X.size:"string"==typeof X&&(t="function"==typeof i?new i().encode(X).byteLength:X.length)),"number"==typeof t&&t>T)throw new aD("maxContentLength size of "+T+" exceeded",aD.ERR_BAD_RESPONSE,e,N)}return!Y&&L&&L(),await new Promise((t,r)=>{sc(t,r,{data:X,headers:aI.from(G.headers),status:G.status,statusText:G.statusText,config:e,request:N})})}catch(t){if(L&&L(),I&&I.aborted&&I.reason instanceof aD){let r=I.reason;throw r.config=e,N&&(r.request=N),t!==r&&Object.defineProperty(r,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),r}if(z)throw N&&!z.request&&(z.request=N),z;if(j)throw j;if(t instanceof aD)throw N&&!t.request&&(t.request=N),t;if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message)){let r=new aD("Network Error",aD.ERR_NETWORK,e,N,t&&t.response);throw Object.defineProperty(r,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),r}throw aD.from(t,t&&t.code,e,N,t&&t.response)}}},s9=new Map,s6=e=>{let t=Object.create(null),r=e&&aw.hasOwnProp(e,"env")&&e.env;["fetch","Request","Response","Blob"].forEach(e=>{r&&aw.hasOwnProp(r,e)&&(t[e]=r[e])});let{fetch:n,Request:i,Response:o,Blob:a}=t,s=[i,o,n,a],l=s.length,u,c,p=s9;for(;l--;)u=s[l],void 0===(c=p.get(u))&&p.set(u,c=l?new Map:s3(t)),p=c;return c};s6();let s5={http:null,xhr:s$,fetch:{get:s6}};aw.forEach(s5,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});let s8=e=>`- ${e}`,s7=e=>aw.isFunction(e)||null===e||!1===e;var le=function(e,t){let r,n,{length:i}=e=aw.isArray(e)?e:[e],o={};for(let a=0;a<i;a++){let i;if(n=r=e[a],!s7(r)&&void 0===(n=s5[(i=String(r)).toLowerCase()]))throw new aD(`Unknown adapter '${i}'`);if(n&&(aw.isFunction(n)||(n=n.get(t))))break;o[i||"#"+a]=n}if(!n){let e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new aD("There is no suitable adapter to dispatch the request "+(i?e.length>1?"since :\n"+e.map(s8).join("\n"):" "+s8(e[0]):"as no adapter specified"),aD.ERR_NOT_SUPPORT)}return n};function lt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new su(null,e)}function lr(e,t){return Math.max(0,Math.round(e()-t))}function ln(e){let t=aw.toSafeFlatObject(e);lt(t),t.headers=aI.from(aw.getSafeProp(t,"headers")),t.data=ss.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);let r=le(t.adapter||sa.adapter,t),n="u">typeof performance&&aw.isFunction(performance.now)?()=>performance.now():Date.now,i=n();return r(t).then(function(e){lt(t),e.duration=lr(n,i),t.response=e;try{e.data=ss.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=aI.from(e.headers),e},function(e){if(!sl(e)&&(lt(t),e&&e.response)){e.response.duration=lr(n,i),t.response=e.response;try{e.response.data=ss.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=aI.from(e.response.headers)}return Promise.reject(e)})}let li={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{li[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let lo={};li.transitional=function(e,t,r){function n(e,t){return"[Axios v1.21.1] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new aD(n(i," has been removed"+(t?" in "+t:"")),aD.ERR_DEPRECATED);return t&&!lo[i]&&(lo[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}},li.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var la=function(e,t,r){if("object"!=typeof e||null===e)throw new aD("options must be an object",aD.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let o=n[i],a=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(a){let t=e[o],r=void 0===t||a(t,o,e);if(!0!==r)throw new aD("option "+o+" must be "+r,aD.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new aD("Unknown option "+o,aD.ERR_BAD_OPTION)}};let ls=e=>{if(null==e||aw.isPlainObject(e)||e instanceof aI)return!0;try{return aw.isObject(e)&&"AxiosHeaders"===aw.getSafeProp(e,Symbol.toStringTag)&&["toJSON","set","get","has","delete","clear","normalize","concat","toString",Symbol.iterator].every(t=>aw.isFunction(aw.getSafeProp(e,t)))}catch(e){return!1}};let ll=class Axios{constructor(e){this.defaults=e||{},this.interceptors={request:new aQ,response:new aQ}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=t.stack,n="";if("string"==typeof r){let e=r.indexOf("\n");n=-1===e?"":r.slice(e+1)}if(e.stack){if(n){let t,r=n.indexOf("\n"),i=-1===r?-1:n.indexOf("\n",r+1),o=-1===i?n:n.slice(i+1),a=String(e.stack),s=(t=aw.hasOwnProp(e,az)&&e[az])&&a.endsWith(t)?a.length-t.length:-1,l=-1===s?a:a.slice(0,s),u=-1===s?"":a.slice(s);l.endsWith(o)||(e.stack=l+"\n"+n+u)}}else e.stack=n}catch(e){}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:i,paramsSerializer:o,headers:a}=t=sN(this.defaults,t);void 0!==i&&la(i,{silentJSONParsing:li.transitional(li.boolean),forcedJSONParsing:li.transitional(li.boolean),clarifyTimeoutError:li.transitional(li.boolean),legacyInterceptorReqResOrdering:li.transitional(li.boolean),advertiseZstdAcceptEncoding:li.transitional(li.boolean),validateStatusUndefinedResolves:li.transitional(li.boolean),encodeBasicAuthUsername:li.transitional(li.boolean)},!1),null!=o&&(aw.isFunction(o)?t.paramsSerializer={serialize:o}:la(o,{encode:li.function,serialize:li.function},!0)),void 0!==t.allowAbsoluteUrls||(aw.hasOwnProp(this.defaults,"allowAbsoluteUrls")&&void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),la(t,{baseUrl:li.spelling("baseURL"),withXsrfToken:li.spelling("withXSRFToken")},!0),t.method=(aw.getSafeProp(t,"method")||aw.getSafeProp(this.defaults,"method")||"get").toLowerCase();let s=aw.getSafeProp(a,"common"),l=aw.getSafeProp(a,t.method),u=a&&aw.merge(ls(s)?s:void 0,ls(l)?l:void 0);a&&aw.forEach(si.concat("common"),e=>{ls(aw.getSafeProp(a,e))&&delete a[e]}),t.headers=aI.concat(u,a);let c=[],p=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;p=p&&e.synchronous;let r=t.transitional||a0;r&&r.legacyInterceptorReqResOrdering?c.unshift(e.fulfilled,e.rejected):c.push(e.fulfilled,e.rejected)});let d=[];this.interceptors.response.forEach(function(e){d.push(e.fulfilled,e.rejected)});let f=0;if(!p){let e=[ln.bind(this),void 0];for(e.unshift(...c),e.push(...d),n=e.length,r=Promise.resolve(t);f<n;)r=r.then(e[f++],e[f++]);return r}n=c.length;let h=t;for(;f<n;){let e=c[f++],t=c[f++];try{h=e?e(h):h}catch(e){if(!t){r=Promise.reject(e);break}try{let n=t.call(this,e);aw.isThenable(n)&&(r=Promise.resolve(n).then(()=>ln.call(this,h)))}catch(e){r=Promise.reject(e)}break}}if(!r)try{r=ln.call(this,h)}catch(e){r=Promise.reject(e)}for(f=0,n=d.length;f<n;)r=r.then(d[f++],d[f++]);return r}getUri(e){return aV(sO((e=sN(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};aw.forEach(["delete","get","head","options"],function(e){ll.prototype[e]=async function(t,r){return this.request(sN(r||{},{method:e,url:t,data:r&&aw.hasOwnProp(r,"data")?r.data:void 0}))}}),aw.forEach(["post","put","patch","query"],function(e){function t(t){return async function(r,n,i){return this.request(sN(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ll.prototype[e]=t(),"query"!==e&&(ll.prototype[e+"Form"]=t(!0))});let lu=class CancelToken{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});let r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t,n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new su(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new lu(function(t){e=t}),cancel:e}}};let lc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(lc).forEach(([e,t])=>{void 0===lc[t]&&(lc[t]=e)});let lp=function e(t){let r=new ll(t),n=oD(ll.prototype.request,r);return aw.extend(n,ll.prototype,r,{allOwnKeys:!0}),aw.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(sN(t,r))},n}(sa);lp.Axios=ll,lp.CanceledError=su,lp.CancelToken=lu,lp.isCancel=sl,lp.VERSION="1.21.1",lp.toFormData=aq,lp.AxiosError=aD,lp.Cancel=lp.CanceledError,lp.all=function(e){return Promise.all(e)},lp.spread=function(e){return function(t){return e.apply(null,t)}},lp.isAxiosError=function(e){return aw.isObject(e)&&!0===e.isAxiosError},lp.mergeConfig=sN,lp.AxiosHeaders=aI,lp.formToJSON=e=>sn(aw.isHTMLForm(e)?new FormData(e):e),lp.getAdapter=le,lp.HttpStatusCode=lc,lp.default=lp;let{Axios:ld,AxiosError:lf,CanceledError:lh,isCancel:lm,CancelToken:lg,VERSION:ly,all:lb,Cancel:lv,isAxiosError:lw,spread:l_,toFormData:lE,AxiosHeaders:lS,HttpStatusCode:lO,formToJSON:lR,getAdapter:lT,mergeConfig:lA,create:lx}=lp,lC={isNode:!1,platform:void 0,async compress(){throw Error("Request body compression is only available in Node.js.")},async createHttpAgents(){},openBlobBody:e=>e};function lk(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}let lP=class ApifyClientError extends Error{};let lU=/at( async)? (?![A-Za-z]*HttpClient\.)([A-Za-z]+(Collection)?Client)\.(?!call \()([A-Za-z]+) \(/;let lI=class ApifyApiError extends lP{name;clientMethod;statusCode;type;attempt;httpMethod;path;originalStack;data;constructor(e,t){let r,n,i,o=e.data;if(un(o)){let t=new TextDecoder().decode(e.data);try{o=JSON.parse(t)}catch{o=t}}if(o&&o.error){let{error:e}=o;r=e.message,n=e.type,i=e.data}else if(o){let e;try{e=JSON.stringify(o,null,2)}catch{e=`${o}`}r=`Unexpected error: ${e}`}super(r),this.name=this.constructor.name,this.clientMethod=this.#e(),this.statusCode=e.status,this.type=n,this.attempt=t,this.httpMethod=e.config?.method,this.path=this.#t(e);let a=this.stack;this.originalStack=a.slice(a.indexOf("\n")),this.stack=this.#r(),this.data=i}static fromResponse(e,t){return new(lB[e.status]??(e.status>=500?lM:lI))(e,t)}#t(e){let t,r=e.config?.url;try{t=new URL(r)}catch{return r}return t.pathname+t.search}#e(){let e=this.stack.match(lU);return e?`${e[2]}.${e[4]}`:"unknown"}#r(){let{name:e,...t}=this,r=Object.entries(t).map(e=>{let[t,r]=e;return"originalStack"===t&&(t="stack"),` ${t}: ${r}`}).join("\n");return`${e}: ${this.message}
|
|
61
|
-
${r}`}};let lN=class InvalidRequestError extends lI{};let lL=class UnauthorizedError extends lI{};let lz=class ForbiddenError extends lI{};let lj=class NotFoundError extends lI{};let lD=class ConflictError extends lI{};let l$=class RateLimitError extends lI{};let lM=class ServerError extends lI{};let lB={400:lN,401:lL,403:lz,404:lj,409:lD,429:l$},{localeError:lF}=nS();function lq(e){return null===e?"null":Array.isArray(e)?"array":typeof e}let lW=/^Invalid input: expected (an array of .+|a typed array|an object|object|array|function|number|string|boolean)$/;function lZ(e){switch(typeof e){case"string":if(""===e)return"''";return e.length>200?`${e.slice(0,200)}… (${e.length-200} more characters)`:e;case"number":case"boolean":return String(e);case"bigint":return`${e}n`;default:return}}function lK(e){if("number"==typeof e&&Number.isNaN(e))return"received NaN";if(""===e)return"received an empty string";let t=lZ(e);return void 0===t?`received ${lq(e)}`:`received the ${lq(e)} \`${t}\``}let lH=class ArgumentValidationError extends Error{issues;cause;constructor(e,t,r){super(function(e,t,r){let n=[],i={total:0};for(let r of e.issues)!function e(t,r,n,i,o){let a=[...n,...t.path];if("invalid_union"===t.code){let n=t.errors.map(e=>e.reduce((e,t)=>Math.max(e,function e(t,r){let n=r+t.path.length;if("invalid_union"===t.code){let r=-1;for(let i of t.errors)for(let t of i)r=Math.max(r,e(t,n));return r}return n}(t,a.length)),-1)),s=Math.max(...n);for(let[l,u]of t.errors.entries())if(n[l]===s)for(let t of u)e(t,r,a,i,o);return}if(o.total+=1,i.length>=10)return;let s=a.length?` at \`${function(e){let t="";for(let r of e)"number"==typeof r?t+=`[${r}]`:t+=t?`.${String(r)}`:String(r);return t}(a)}\``:"",l=function(e,t){let r=e;for(let e of t){if(null===r||"object"!=typeof r)return;r=r[e]}return r}(r,a),u=lZ(l),c=function(e,t){if("invalid_type"===e.code){if("number"===e.expected&&"number"==typeof t)return"Invalid input: expected a finite number";if("date"===e.expected&&"[object Date]"===Object.prototype.toString.call(t))return"Invalid input: expected a valid date"}return e.message}(t,l),p="",d=lW.exec(c),f=/, received (\S+)$/.exec(c),h=d?.[1].startsWith("an array of")?"array":d?.[1];d&&h!==(Number.isNaN(l)?"NaN":lq(l))?c+=`, ${lK(l)}`:f&&f[1]===lq(l)&&void 0!==u?c=`${c.slice(0,f.index)}, ${lK(l)}`:void 0===u||c.endsWith(`received ${u}`)||(p=`, got \`${u}\``),i.push(`${c}${s}${p}`)}(r,t,[],n,i);let o=r?n.map(e=>`${e} in \`${r}\``):[...n],a=i.total-n.length;return a>0&&o.push(`... and ${a} more problem${1===a?"":"s"}`),o.join("\n")}(e,t,r),{cause:e}),this.name="ArgumentValidationError",this.issues=e.issues,this.cause=e}};function lV(e,t,r){let n=t.safeParse(e,{error:lF});if(!n.success)throw new lH(n.error,e,r);return n.data}i7(e=>"object"==typeof e&&null!==e,{error:"Invalid input: expected object"});let lG=class ResponseValidationError extends
|
|
60
|
+
${o.map(e=>`${" ".repeat(2*t)}${e}`).join("\n")}`}};let oz=class Log{LEVELS=N;options;preferredFieldsMap;warningsOnceLogged=new Set;constructor(e={}){let t;if(this.options={...{level:(t=oS.env.APIFY_LOG_LEVEL)?Number.isFinite(+t)?+t:N[t]?N[t]:+t:N.INFO,maxDepth:4,gradualLimitFactor:.5,maxStringLength:1e3,maxArrayLength:500,maxFields:20,preferredFields:[...oE],prefix:null,suffix:null,truncationSuffix:o_,truncationFlagKey:ow,logger:(e=>{switch(e){case L.JSON:return new oA;case L.TEXT:default:return new oL}})(function(){let e=oS.env[od]||L.TEXT;switch(e.toLowerCase()){case L.JSON.toLowerCase():return L.JSON;case L.TEXT.toLowerCase():return L.TEXT;default:return console.warn(`Unknown value for environment variable ${od}: ${e}`),L.TEXT}}()),data:{}},...e},!N[this.options.level])throw Error('Options "level" must be one of log.LEVELS enum!');if("number"!=typeof this.options.maxDepth)throw Error('Options "maxDepth" must be a number!');if("number"!=typeof this.options.gradualLimitFactor)throw Error('Options "gradualLimitFactor" must be a number!');if("number"!=typeof this.options.maxStringLength)throw Error('Options "maxStringLength" must be a number!');if("number"!=typeof this.options.maxArrayLength)throw Error('Options "maxArrayLength" must be a number!');if("number"!=typeof this.options.maxFields)throw Error('Options "maxFields" must be a number!');if(!Array.isArray(this.options.preferredFields))throw Error('Options "preferredFields" must be an array!');if(this.options.prefix&&"string"!=typeof this.options.prefix)throw Error('Options "prefix" must be a string!');if(this.options.suffix&&"string"!=typeof this.options.suffix)throw Error('Options "suffix" must be a string!');if("string"!=typeof this.options.truncationSuffix)throw Error('Options "truncationSuffix" must be a string!');if("string"!=typeof this.options.truncationFlagKey)throw Error('Options "truncationFlagKey" must be a string!');if("object"!=typeof this.options.logger)throw Error('Options "logger" must be an object!');if("object"!=typeof this.options.data)throw Error('Options "data" must be an object!');this.preferredFieldsMap=Object.fromEntries(this.options.preferredFields.map((e,t)=>[e,t]))}_sanitizeData(e){return function e(t,r){let{maxDepth:n=1/0,gradualLimitFactor:i=1,maxStringLength:o=1/0,maxArrayLength:a=1/0,maxFields:s=1/0,preferredFieldsMap:l={},truncationSuffix:u=o_,truncationFlagKey:c=ow}=r;if("string"==typeof t)return t.length>o?function(e,t,r=o_){if(t=Math.floor(t),r.length>t)throw Error("suffix string cannot be longer than maxLength");return"string"==typeof e&&e.length>t&&(e=e.substr(0,t-r.length)+r),e}(t,o,u):t;if(["number","boolean","symbol","bigint"].includes(typeof t)||null==t||t instanceof Date)return t;if(t instanceof Error){let{name:e,message:r,stack:n,cause:i,...o}=t;t={name:e,message:r,stack:n,cause:i,...o,[ov]:!0}}let p=t=>e(t,{...r,maxDepth:n-1,maxStringLength:Math.max(Math.floor(o*i),u.length),maxArrayLength:Math.floor(a*i),maxFields:Math.floor(s*i)});if(Array.isArray(t)){if(n<=0)return"[array]";let e=t.slice(0,a).map(p);return t.length>a&&e.push(u),e}if("object"==typeof t&&null!==t){if(n<=0)return"[object]";let e=Reflect.ownKeys(t);e.sort((e,t)=>{let r=l[String(e)]??-1,n=l[String(t)]??-1;return -1===r&&-1===n?0:-1===r?1:-1===n?-1:r-n});let r={};return e.slice(0,s).forEach(e=>{r[e]=p(t[e])}),e.length>s&&(r[c]=!0),r}if("function"==typeof t)return"[function]";console.log(`WARNING: Object cannot be logged: ${t}`)}(e,{maxDepth:this.options.maxDepth,gradualLimitFactor:this.options.gradualLimitFactor,maxStringLength:this.options.maxStringLength,maxArrayLength:this.options.maxArrayLength,maxFields:this.options.maxFields,preferredFieldsMap:this.preferredFieldsMap,truncationSuffix:this.options.truncationSuffix,truncationFlagKey:this.options.truncationFlagKey})}getLevel(){return this.options.level}setLevel(e){if(!N[e])throw Error('Options "level" must be one of log.LEVELS enum!');this.options.level=e}internal(e,t,r,n){e>this.options.level||(r=Reflect.ownKeys(r={...this.options.data,...r}).length>0?this._sanitizeData(r):void 0,n=this._sanitizeData(n),this.options.logger.log(e,t,r,n,{prefix:this.options.prefix,suffix:this.options.suffix}))}setOptions(e){this.options={...this.options,...e}}getOptions(){return{...this.options}}child(e){let{prefix:t}=this.options;e.prefix&&(t=t?`${t}:${e.prefix}`:e.prefix);let r=e.data?{...this.options.data,...e.data}:this.options.data;return new oz({...this.options,...e,prefix:t,data:r})}error(e,t){this.internal(N.ERROR,e,t)}exception(e,t,r){this.internal(N.ERROR,t,r,e)}softFail(e,t){this.internal(N.SOFT_FAIL,e,t)}warning(e,t){this.internal(N.WARNING,e,t)}info(e,t){this.internal(N.INFO,e,t)}debug(e,t){this.internal(N.DEBUG,e,t)}perf(e,t){this.internal(N.PERF,e,t)}warningOnce(e){this.warningsOnceLogged.has(e)||(this.warningsOnceLogged.add(e),this.warning(e))}deprecated(e){this.warningOnce(e)}};let oj=new oz;function oD(e,t){return function(){return e.apply(t,arguments)}}var o$=r("z");let{toString:oM}=Object.prototype,{getPrototypeOf:oB}=Object,{iterator:oF,toStringTag:oq}=Symbol,oW=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),oZ=e=>"string"==typeof e&&("__proto__"===e||"constructor"===e||"prototype"===e),oK=(e,t,r)=>e===Object.prototype||!r&&null===t,oH=(e,t)=>{let r=e,n=[];for(;null!=r&&-1===n.indexOf(r);){n.push(r);let i=oB(r);if(oK(r,i,r===e))break;if(oW(r,t))return!0;r=i}return!1},oV=(f=Object.create(null),e=>{let t=oM.call(e);return f[t]||(f[t]=t.slice(8,-1).toLowerCase())}),oG=e=>(e=e.toLowerCase(),t=>oV(t)===e),oJ=e=>t=>typeof t===e,{isArray:oY}=Array,oX=oJ("undefined");function oQ(e){return null!==e&&!oX(e)&&null!==e.constructor&&!oX(e.constructor)&&o2(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let o0=oG("ArrayBuffer"),o1=oJ("string"),o2=oJ("function"),o4=oJ("number"),o3=e=>null!==e&&"object"==typeof e,o9=e=>{if(!o3(e))return!1;let t=oB(e);return(null===t||t===Object.prototype||null===oB(t))&&(oK(e,t,!0)||!oW(e,oq)&&!oW(e,oF))},o6=oG("Date"),o5=oG("File"),o8=oG("Blob"),o7=oG("FileList"),ae=oG("Set"),at="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:"u">typeof global?global:{},ar=void 0!==at.FormData?at.FormData:void 0,an=oG("URLSearchParams"),[ai,ao,aa,as]=["ReadableStream","Request","Response","Headers"].map(oG);function al(e,t,{allOwnKeys:r=!1}={}){let n,i;if(null!=e)if("object"!=typeof e&&(e=[e]),oY(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{let i;if(oQ(e))return;let o=r?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;for(n=0;n<a;n++)i=o[n],t.call(null,e[i],i,e)}}let au="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,ac=e=>!oX(e)&&e!==au,ap=(h="u">typeof Uint8Array&&oB(Uint8Array),e=>h&&e instanceof h),ad=oG("HTMLFormElement"),{propertyIsEnumerable:af}=Object.prototype,ah=oG("RegExp"),am=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};al(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)},ag=oG("AsyncFunction"),ay=(y="function"==typeof setImmediate,b=o2(au.postMessage),y?setImmediate:b?(v=`axios@${Math.random()}`,w=[],au.addEventListener("message",({source:e,data:t})=>{e===au&&t===v&&w.length&&w.shift()()},!1),e=>{w.push(e),au.postMessage(v,"*")}):e=>setTimeout(e)),ab="u">typeof queueMicrotask?queueMicrotask.bind(au):void 0!==o$&&o$.nextTick||ay,av=e=>null!=e&&o2(e[oF]);var aw={isArray:oY,isArrayBuffer:o0,isBuffer:oQ,isFormData:e=>{if(!e)return!1;if(ar&&e instanceof ar)return!0;let t=oB(e);if(!t||t===Object.prototype||!o2(e.append))return!1;let r=oV(e);return"formdata"===r||"object"===r&&o2(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&o0(e.buffer)},isString:o1,isNumber:o4,isBoolean:e=>!0===e||!1===e,isObject:o3,isPlainObject:o9,isEmptyObject:e=>{if(!o3(e)||oQ(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:ai,isRequest:ao,isResponse:aa,isHeaders:as,isUndefined:oX,isDate:o6,isFile:o5,isReactNativeBlob:e=>!!(e&&void 0!==e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:o8,isRegExp:ah,isFunction:o2,isStream:e=>o3(e)&&o2(e.pipe),isURLSearchParams:an,isTypedArray:ap,isFileList:o7,forEach:al,merge:function e(...t){let{caseless:r,skipUndefined:n}=ac(this)&&this||{},i={},o=r?Object.create(null):null,a=(t,r)=>{if("__proto__"===r||"constructor"===r||"prototype"===r)return;let a=r;if(o&&"string"==typeof r){let e=r.toLowerCase(),t=o[e];void 0!==t&&oW(i,t)?a=t:o[e]=r}let s=oW(i,a)?i[a]:void 0;o9(s)&&o9(t)?i[a]=e(s,t):o9(t)?i[a]=e({},t):oY(t)?i[a]=t.slice():n&&oX(t)||(i[a]=t)};for(let e=0,r=t.length;e<r;e++){let r=t[e];if(!r||oQ(r)||(al(r,a),"object"!=typeof r||oY(r)||!Object.getOwnPropertySymbols))continue;let n=Object.getOwnPropertySymbols(r);for(let e=0;e<n.length;e++){let t=n[e];af.call(r,t)&&a(r[t],t)}}return i},extend:(e,t,r,{allOwnKeys:n}={})=>(al(t,(t,n)=>{r&&o2(t)?Object.defineProperty(e,n,{__proto__:null,value:oD(t,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,n,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],(!n||n(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=!1!==r&&oB(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype)return t},kindOf:oV,kindOfTest:oG,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},toArray:e=>{if(!e)return null;if(oY(e))return e;let t=e.length;if(!Number.isSafeInteger(t)||t<0||t>0xffffffff)return null;let r=new Set,n=new Set,i=e;for(;null!=i&&r.size<t;){if(n.has(i))return null;n.add(i);let o=oB(i);if(oK(i,o,i===e))break;Object.getOwnPropertyNames(i).forEach(e=>{let n=+e;Number.isInteger(n)&&n>=0&&n<t&&String(n)===e&&oW(i,e)&&r.add(n)}),i=o}if(r.size!==t)return null;let o=Array(t);for(;t-- >0;)o[t]=e[t];return o},forEachEntry:(e,t)=>{let r,n=(e&&e[oF]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let r,n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:ad,hasOwnProperty:oW,hasOwnProp:oW,hasOwnInPrototypeChain:oH,getSafeProp:(e,t)=>null!=e&&oH(e,t)?e[t]:void 0,toSafeFlatObject:e=>{if(null==e||"object"!=typeof e&&"function"!=typeof e)return e;let t=oB(e);if(null===t&&(e=>{if(!Object.isExtensible(e))return!1;let t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(oZ(t))return!1;let r=Object.getOwnPropertyDescriptor(e,t);return!!r&&r.configurable&&!0===r.writable})})(e))return e;let r=Object.create(null),n=Object.create(null),i=[],o=e;for(;null!=o&&-1===i.indexOf(o);){i.push(o);let a=o===e?t:oB(o);if(oK(o,a,o===e))break;let s=Object.getOwnPropertyNames(o);for(let t of(Object.getOwnPropertySymbols&&s.push(...Object.getOwnPropertySymbols(o)),s))!oZ(t)&&(oW(n,t)||(r[t]=e[t],n[t]=!0));o=a}return r},reduceDescriptors:am,freezeMethods:e=>{am(e,(t,r)=>{if(o2(e)&&["arguments","caller","callee"].includes(r))return!1;if(o2(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{let r={};return(oY(e)?e:String(e).split(t)).forEach(e=>{r[e]=!0}),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e*=1)?e:t,findKey:function(e,t){let r;if(oQ(e))return null;t=t.toLowerCase();let n=Object.keys(e),i=n.length;for(;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null},global:au,isContextDefined:ac,isSpecCompliantForm:function(e){return!!(e&&o2(e.append)&&"FormData"===e[oq]&&e[oF])},toJSONObject:e=>{let t=new WeakSet,r=e=>{if(o3(e)){if(t.has(e))return;if(oQ(e))return e;if(!("toJSON"in e)){let n;if(t.add(e),ae(e))for(let t of(n=[],e)){let e=r(t);oX(e)||n.push(e)}else n=oY(e)?[]:{},al(e,(e,t)=>{let i=r(e);oX(i)||(n[t]=i)});return t.delete(e),n}}return e};return r(e)},isAsyncFn:ag,isThenable:e=>e&&(o3(e)||o2(e))&&o2(e.then)&&o2(e.catch),setImmediate:ay,asap:ab,isIterable:av,isSafeIterable:e=>null!=e&&oH(e,oF)&&av(e)};let a_=aw.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),aE=RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),aS=RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function aO(e,t){return aw.isArray(e)?e.map(e=>aO(e,t)):function(e){let t=0,r=e.length;for(;t<r;){let r=e.charCodeAt(t);if(9!==r&&32!==r)break;t+=1}for(;r>t;){let t=e.charCodeAt(r-1);if(9!==t&&32!==t)break;r-=1}return 0===t&&r===e.length?e:e.slice(t,r)}(String(e).replace(t,""))}function aR(e){let t=Object.create(null);return aw.forEach(e.toJSON(),(e,r)=>{t[r]=aO(e,aS)}),t}let aT=Symbol("internals");function aA(e){return e&&String(e).trim().toLowerCase()}function ax(e){return!1===e||null==e?e:aw.isArray(e)?e.map(ax):aO(String(e),aE)}let aC=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function ak(e){let t=0,r=e.length;for(;t<r;){let r=e.charCodeAt(t);if(9!==r&&32!==r)break;t+=1}for(;r>t;){let t=e.charCodeAt(r-1);if(9!==t&&32!==t)break;r-=1}return 0===t&&r===e.length?e:e.slice(t,r)}let aP=e=>"__proto__"===e?"__Proto__":e;function aU(e,t,r,n,i){if(aw.isFunction(n))return n.call(e,t,r);if(i&&(t=r),aw.isString(t)){if(aw.isString(n))return -1!==t.indexOf(n);if(aw.isRegExp(n))return n.test(t)}}let aI=class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function i(e,t,r){let i=aA(t);if(!i)return;let o=aw.findKey(n,i);o&&void 0!==n[o]&&!0!==r&&(void 0!==r||!1===n[o])||(n[aP(o||t)]=ax(e))}let o=(e,t)=>aw.forEach(e,(e,r)=>i(e,r,t));if(aw.isPlainObject(e)||e instanceof this.constructor)o(e,t);else{let n;if(aw.isString(e)&&(e=e.trim())&&(n=e,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim()))){var a;let r,n,i,s;o((a=e,s=Object.create(null),a&&a.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim();let t=aw.hasOwnProp(s,r);!r||t&&aw.hasOwnProp(a_,r)||("set-cookie"===r?t?s[r].push(n):s[r]=[n]:s[r]=t?s[r]+", "+n:n)}),s),t)}else if(aw.isObject(e)&&aw.isSafeIterable(e)){let r=Object.create(null),n,i;for(let t of e){if(!aw.isArray(t))throw TypeError("Object iterator must return a key-value pair");i=t[0],aw.hasOwnProp(r,i)?(n=r[i],r[i]=aw.isArray(n)?[...n,t[1]]:[n,t[1]]):r[i]=t[1]}o(r,t)}else null!=e&&i(t,e,r)}return this}get(e,t){if(e=aA(e)){let r=aw.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t){let t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=n.exec(e);)r[t[1]]=t[2];return r}if(aw.isFunction(t))return t.call(this,e,r);if(aw.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=aA(e)){let r=aw.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||aU(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function i(e){if(e=aA(e)){let i=aw.findKey(r,e);i&&(!t||aU(r,r[i],i,t))&&(delete r[i],n=!0)}}return aw.isArray(e)?e.forEach(i):i(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||aU(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r=Object.create(null);return aw.forEach(this,(n,i)=>{let o=aw.findKey(r,i);if(o){t[o]=ax(n),delete t[i];return}let a=aP(e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(i).trim());a!==i&&delete t[i],t[a]=ax(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return aw.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&aw.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){let e=this.get("set-cookie");return aw.isArray(e)?e:null==e||!1===e?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return function(e){let t=Object.create(null),r=String(e),n=0,i=!1,o=!1;function a(e){let i=ak(r.slice(n,e)),o=i.indexOf("=");if(o<1)return;let a=ak(i.slice(0,o));if(!aC.test(a))return;let s=a.toLowerCase();if("__proto__"===s||"constructor"===s||"prototype"===s)return;let l=ak(i.slice(o+1));t[s]=function(e){let t=e.length-1;if(t<1||34!==e.charCodeAt(0)||34!==e.charCodeAt(t))return e;let r="";for(let n=1;n<t;n++){let i=e.charCodeAt(n);if(34===i||92===i&&(n+=1)>=t)return e;r+=e[n]}return r}(l)}for(let e=0;e<r.length;e++){let t=r.charCodeAt(e);i?o?o=!1:92===t?o=!0:34===t&&(i=!1):34===t?i=!0:(44===t||59===t)&&(a(e),n=e+1)}return a(r.length),t}(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[aT]=this[aT]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=aA(e);if(!t[n]){let i;i=aw.toCamelCase(" "+e),["get","set","has"].forEach(t=>{Object.defineProperty(r,t+i,{__proto__:null,value:function(r,n,i){return this[t].call(this,e,r,n,i)},configurable:!0})}),t[n]=!0}}return aw.isArray(e)?e.forEach(n):n(e),this}};aI.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),aw.reduceDescriptors(aI.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),aw.freezeMethods(aI);let aN="[REDACTED ****]";function aL(e){try{return String(e)}catch(e){return""}}let az=Symbol("causeStack");let aj=class AxiosError extends Error{static from(e,t,r,n,i,o){let a=e.message;!a&&aw.isArray(e.errors)&&e.errors.length&&(a=e.errors.map(e=>{try{return e&&e.message?aL(e.message):aL(e)}catch(e){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError");let s=new aj(a,t||e.code,r,n,i);return Object.defineProperty(s,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),s.name=e.name,!function(e,t){try{let r=t&&t.stack;if("string"!=typeof r||!r)return;let n=e.stack;if("string"!=typeof n||!n)return;let i="\nCaused by: "+r;e.stack=n+i,Object.defineProperty(e,az,{__proto__:null,value:i})}catch(e){}}(s,e),null!=e.status&&null==s.status&&(s.status=e.status),o&&Object.assign(s,o),s}constructor(e,t,r,n,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status)}toJSON(){let e,t,r,n=this.config,i=n&&aw.hasOwnProp(n,"redact")?n.redact:void 0,o=aw.isArray(i)&&i.length>0?(e=new Set(i.map(e=>String(e).toLowerCase())),t=[],(r=n=>{let i;if(null===n||"object"!=typeof n||aw.isBuffer(n))return n;if(-1===t.indexOf(n)){if(n instanceof aI&&(n=n.toJSON()),t.push(n),aw.isArray(n))i=[],n.forEach((e,t)=>{let n=r(e);aw.isUndefined(n)||(i[t]=n)});else{if(!aw.isPlainObject(n)&&function(e){if(aw.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(aw.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(n))return t.pop(),n;for(let[t,o]of(i=Object.create(null),Object.entries(n))){let n=e.has(t.toLowerCase())?aN:r(o);aw.isUndefined(n)||(i[t]=n)}}return t.pop(),i}})(n)):aw.toJSONObject(n);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};aj.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",aj.ERR_BAD_OPTION="ERR_BAD_OPTION",aj.ECONNABORTED="ECONNABORTED",aj.ETIMEDOUT="ETIMEDOUT",aj.ECONNREFUSED="ECONNREFUSED",aj.ERR_NETWORK="ERR_NETWORK",aj.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",aj.ERR_DEPRECATED="ERR_DEPRECATED",aj.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",aj.ERR_BAD_REQUEST="ERR_BAD_REQUEST",aj.ERR_CANCELED="ERR_CANCELED",aj.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",aj.ERR_INVALID_URL="ERR_INVALID_URL",aj.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var aD=aj;function a$(e){return aw.isPlainObject(e)||aw.isArray(e)}function aM(e){return aw.endsWith(e,"[]")?e.slice(0,-2):e}function aB(e,t,r){return e?e.concat(t).map(function(e,t){return e=aM(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}let aF=aw.toFlatObject(aw,{},null,function(e){return/^is[A-Z]/.test(e)});var aq=function(e,t,r){if(!aw.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(e,t)=>{let n=aw.getSafeProp(r,e);return aw.isUndefined(n)?t:n},i=n("metaTokens",!0),o=n("visitor")||h,a=n("dots",!1),s=n("indexes",!1),l=n("Blob")||"u">typeof Blob&&Blob,u=n("maxDepth",100),c=l&&aw.isSpecCompliantForm(t),p=[];if(!aw.isFunction(o))throw TypeError("visitor must be a function");function d(e){if(null===e)return"";if(aw.isDate(e))return e.toISOString();if(aw.isBoolean(e))return e.toString();if(!c&&aw.isBlob(e))throw new aD("Blob is not supported. Use a Buffer instead.");if(aw.isArrayBuffer(e)||aw.isTypedArray(e)){if(c&&"function"==typeof l)return new l([e]);throw new aD("Blob is not supported. Use a Buffer instead.",aD.ERR_NOT_SUPPORT)}return e}function f(e){if(e>u)throw new aD("Object is too deeply nested ("+e+" levels). Max depth: "+u,aD.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(e,r,n){let o=e;if(aw.isReactNative(t)&&aw.isReactNativeBlob(e))return t.append(aB(n,r,a),d(e)),!1;if(e&&!n&&"object"==typeof e)if(aw.endsWith(r,"{}"))r=i?r:r.slice(0,-2),e=function(e){if(1/0===u)return JSON.stringify(e);let t=[];return JSON.stringify(e,function(e,r){if(!aw.isObject(r))return r;for(;t.length&&t[t.length-1]!==this;)t.pop();return t.push(r),f(1+t.length-1),r})}(e);else{var l;if(aw.isArray(e)&&(l=e,aw.isArray(l)&&!l.some(a$))||(aw.isFileList(e)||aw.endsWith(r,"[]"))&&(o=aw.toArray(e)))return r=aM(r),o.forEach(function(e,n){aw.isUndefined(e)||null===e||t.append(!0===s?aB([r],n,a):null===s?r:r+"[]",d(e))}),!1}return!!a$(e)||(t.append(aB(n,r,a),d(e)),!1)}let m=Object.assign(aF,{defaultVisitor:h,convertValue:d,isVisitable:a$});if(!aw.isObject(e))throw TypeError("data must be an object");return!function e(r,n,i=0){if(!aw.isUndefined(r)){if(f(i),-1!==p.indexOf(r))throw Error("Circular reference detected in "+n.join("."));p.push(r),aw.forEach(r,function(r,a){!0===(!(aw.isUndefined(r)||null===r)&&o.call(t,r,aw.isString(a)?a.trim():a,n,m))&&e(r,n?n.concat(a):[a],i+1)}),p.pop()}}(e),t};function aW(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function aZ(e,t){this._pairs=[],e&&aq(e,this,t)}let aK=aZ.prototype;function aH(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function aV(e,t,r){let n;if(!t)return e;e=e||"";let i=aw.isFunction(r)?{serialize:r}:r,o=aw.getSafeProp(i,"encode")||aH,a=aw.getSafeProp(i,"serialize");if(n=a?a(t,i):aw.isURLSearchParams(t)?t.toString():new aZ(t,i).toString(o)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}aK.append=function(e,t){this._pairs.push([e,t])},aK.toString=function(e){let t=e?t=>e.call(this,t,aW):aW;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};let aG=Symbol("internals");function aJ(e){return e?e.length:0}function aY(e){if(e)for(;e.length&&null===e[e.length-1];)e.pop()}function aX(e,t){let r=e.handlers,n=aJ(r);r!==t.handlersRef?(t.handlersRef=r,t.handlerEntries.clear()):n!==t.handlersLength&&(n?t.handlerEntries.forEach(function(e,n){r[e.index]!==e.handler&&t.handlerEntries.delete(n)}):t.handlerEntries.clear()),t.handlersLength=n}let aQ=class InterceptorManager{constructor(){this.handlers=[],this[aG]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,r){let n={fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null},i=this[aG];null==this.handlers&&(this.handlers=[]),aX(this,i);let o=i.nextId++;return this.handlers.push(n),i.handlerEntries.set(o,{handler:n,index:this.handlers.length-1}),i.handlersLength=this.handlers.length,o}eject(e){let t=this[aG];aX(this,t);let r="string"==typeof e&&""!==e&&String(Number(e))===e?Number(e):e,n=t.handlerEntries.get(r);if(n){if(t.handlerEntries.delete(r),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,t.iterationDepth||(aY(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],aX(this,this[aG]))}forEach(e){let t=this[aG];aX(this,t),t.iterationDepth++;try{aw.forEach(this.handlers,function(t){null!==t&&e(t)})}finally{--t.iterationDepth||(aX(this,t),aY(this.handlers),t.handlersLength=aJ(this.handlers))}}};var a0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0,encodeBasicAuthUsername:!1},a1="u">typeof URLSearchParams?URLSearchParams:aZ,a2="u">typeof FormData?FormData:null,a4="u">typeof Blob?Blob:null;let a3="u">typeof window&&"u">typeof document,a9="object"==typeof navigator&&navigator||void 0,a6=a3&&(!a9||0>["ReactNative","NativeScript","NS"].indexOf(a9.product)),a5="u">typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,a8=a3&&window.location.href||"http://localhost";var a7={...D,isBrowser:!0,classes:{URLSearchParams:a1,FormData:a2,Blob:a4},protocols:["http","https","file","blob","url","data"]};function se(e){if(e>100)throw new aD("FormData field is too deeply nested ("+e+" levels). Max depth: 100",aD.ERR_FORM_DATA_DEPTH_EXCEEDED)}function st(e){let t,r,n={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)n[r=i[t]]=e[r];return n}function sr(e){if(!aw.isArray(e))return e;let t=Object.keys(e);return t.length!==e.length||t.some((e,t)=>e!==String(t))?st(e):e}var sn=function(e){if(aw.isFormData(e)&&aw.isFunction(e.entries)){let t={};aw.forEachEntry(e,(e,r)=>{!function e(t,r,n,i){se(i);let o=t[i++];if("__proto__"===o)return!0;let a=Number.isFinite(+o),s=i>=t.length;return(o=!o&&aw.isArray(n)?n.length:o,s)?aw.hasOwnProp(n,o)?(n[o]=sr(n[o]),n[o]=aw.isArray(n[o])?n[o].concat(r):[n[o],r]):n[o]=r:(aw.hasOwnProp(n,o)&&aw.isObject(n[o])||(n[o]=[]),e(t,r,n[o],i)&&aw.isArray(n[o])&&(n[o]=st(n[o]))),!a}(function(e){let t,r=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;for(;null!==(t=n.exec(e));)se(r.length),r.push("[]"===t[0]?"":t[1]||t[0]);return r}(e),r,t,0)});let r=[t];for(;r.length;){let e=r.pop();Object.keys(e).forEach(t=>{let n=e[t]=sr(e[t]);(aw.isArray(n)||aw.isPlainObject(n))&&r.push(n)})}return t}return null};let si=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),so=(e,t)=>null!=e&&aw.hasOwnProp(e,t)?e[t]:void 0,sa={transitional:a0,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=aw.isObject(e);if(o&&aw.isHTMLForm(e)&&(e=new FormData(e)),aw.isFormData(e))return i?JSON.stringify(sn(e)):e;if(aw.isArrayBuffer(e)||aw.isBuffer(e)||aw.isStream(e)||aw.isFile(e)||aw.isBlob(e)||aw.isReadableStream(e))return e;if(aw.isArrayBufferView(e))return e.buffer;if(aw.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){let t=so(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return aq(e,new a7.classes.URLSearchParams,{visitor:function(e,t,r,n){return a7.isNode&&aw.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t}).toString();if((r=aw.isFileList(e))||n.indexOf("multipart/form-data")>-1){let n=so(this,"env"),i=n&&n.FormData;return aq(r?{"files[]":e}:e,i&&new i,t)}}if(o||i){t.setContentType("application/json",!1);var a=e;if(aw.isString(a))try{return(0,JSON.parse)(a),aw.trim(a)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(a)}return e}],transformResponse:[function(e){let t=so(this,"transitional")||sa.transitional,r=t&&t.forcedJSONParsing,n=so(this,"responseType"),i="json"===n;if(aw.isResponse(e)||aw.isReadableStream(e))return e;if(e&&aw.isString(e)&&(r&&!n||i)){let r=t&&t.silentJSONParsing;try{return JSON.parse(e,so(this,"parseReviver"))}catch(e){if(!r&&i){if("SyntaxError"===e.name)throw aD.from(e,aD.ERR_BAD_RESPONSE,this,null,so(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:a7.classes.FormData,Blob:a7.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function ss(e,t){let r=this||sa,n=t||r,i=aI.from(n.headers),o=n.data;return aw.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function sl(e){return!!(e&&e.__CANCEL__)}aw.forEach(si,e=>{sa.headers[e]={}});let su=class CanceledError extends aD{constructor(e,t,r){super(null==e?"canceled":e,aD.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function sc(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new aD("Request failed with status code "+r.status,r.status>=400&&r.status<500?aD.ERR_BAD_REQUEST:aD.ERR_BAD_RESPONSE,r.config,r.request,r))}let sp=/[\t\n\r]/g;function sd(e){if("string"!=typeof e)return e;let t=0;for(;t<e.length&&32>=e.charCodeAt(t);)t++;return e.slice(t).replace(sp,"")}function sf(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1].toLowerCase()||""}let sh=e=>{try{return decodeURIComponent(e)}catch(t){return e}};var sm=a7.hasStandardBrowserEnv?{write(e,t,r,n,i,o,a){if("u"<typeof document)return;let s=[`${e}=${encodeURIComponent(t)}`];aw.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),aw.isString(n)&&s.push(`path=${n}`),aw.isString(i)&&s.push(`domain=${i}`),!0===o&&s.push("secure"),aw.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if("u"<typeof document)return null;let t=document.cookie;if(!t)return null;let r=t.split(";");for(let t=0;t<r.length;t++){let n=r[t].replace(/^\s+/,""),i=n.indexOf("=");if(-1!==i&&n.slice(0,i)===e)return sh(n.slice(i+1))}return null},async readAsync(e){try{let t="u">typeof window&&window.cookieStore;if(t&&aw.isFunction(t.get)){let r=await t.get(e);return r?sh(r.value):null}}catch(e){}return this.read(e)},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,readAsync:async()=>null,remove(){}},sg=function(e,t){let r,n=Array(e=e||10),i=Array(e),o=0,a=0;return t=void 0!==t?t:1e3,function(s){let l=Date.now(),u=i[a];r||(r=l),n[o]=s,i[o]=l;let c=a,p=0;for(;c!==o;)p+=n[c++],c%=e;if((o=(o+1)%e)===a&&(a=(a+1)%e),l-r<t)return;let d=u&&l-u;return d?Math.round(1e3*p/d):void 0}},sy=function(e,t){let r,n,i=0,o=1e3/t,a=(t,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-i;s>=o?a(e,t):(r=e,n||(n=setTimeout(()=>{n=null,a(r)},o-s)))},()=>r&&a(r),(...e)=>a(e)]};let sb=(e,t,r=3)=>{let n=0,i=sg(50,250);return sy(r=>{if(!r||!aw.isNumber(r.loaded))return;let o=r.loaded,a=r.lengthComputable?r.total:void 0,s=Math.max(0,null!=a?Math.min(o,a):o),l=Math.max(0,s-n),u=i(l);n=Math.max(n,s),e({loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a?(a-s)/u:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})},r)},sv=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},sw=(e,t=aw.asap)=>(...r)=>t(()=>e(...r));var s_=a7.hasStandardBrowserEnv?(m=new URL(a7.origin),e=>(e=new URL(e,document.baseURI||a7.origin),m.protocol===e.protocol&&m.host===e.host&&m.port===e.port)):()=>!0;let sE=/^https?:(?!\/\/)/i;function sS(e,t){if("string"==typeof e){let n=sd(e);if(sE.test(n)){var r;let e,i,o;throw new aD(`Invalid URL ${JSON.stringify((o=(-1===(i=(e=n.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${aN}@`)).indexOf("#"))?e:e.slice(0,i)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${aN}`),-1===i?o:`${o}#${!(r=e.slice(i+1))?r:r.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,r="")=>`${t}${r}${aN}`)}`))}: missing "//" after protocol`,aD.ERR_INVALID_URL,t)}}}function sO(e,t,r,n){sS(t,n);let i=!("string"==typeof t&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t));if(e&&(i||!1===r)){sS(e,n);if(!t)return e;let r=e.length;for(;r>0&&47===e.charCodeAt(r-1);)r--;return e.slice(0,r)+"/"+t.replace(/^\/+/,"")}return t}let sR=e=>e instanceof aI?{...e}:e,sT=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>{let r=Object.getOwnPropertyDescriptor(e,t);return r&&r.enumerable})):Object.keys(e);function sA(e,t,r,n){return aw.isPlainObject(e)&&aw.isPlainObject(t)?aw.merge.call({caseless:n},e,t):aw.isPlainObject(t)?aw.merge({},t):aw.isArray(t)?t.slice():t}function sx(e,t,r,n){return aw.isUndefined(t)?aw.isUndefined(e)?void 0:sA(void 0,e,r,n):sA(e,t,r,n)}function sC(e,t){if(!aw.isUndefined(t))return sA(void 0,t)}function sk(e,t){return aw.isUndefined(t)?aw.isUndefined(e)?void 0:sA(void 0,e):sA(void 0,t)}function sP(e,t,r,n,i){return aw.hasOwnProp(i,r)?sA(e,t):aw.hasOwnProp(n,r)?sA(void 0,e):void 0}let sU=Object.freeze({__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0}),sI={url:sC,method:sC,data:sC,baseURL:sk,transformRequest:sk,transformResponse:sk,params:function(e,t){let r=[],n=new WeakMap,i={};function o(e,t){if(!aw.isPlainObject(t))return aw.isArray(t)?t.slice():t;let o=aw.isPlainObject(e)?e:i,a=n.get(t);if(a||(a=new WeakMap,n.set(t,a)),a.has(o))return a.get(o);let s={};return a.set(o,s),r.push({base:o,source:t,result:s}),s}let a=aw.isUndefined(t)?o(void 0,e):o(e,t);for(;r.length;){let{base:e,source:t,result:n}=r.pop(),i=new Set(sT(e)),a=new Set(sT(t));new Set([...i,...a]).forEach(r=>{if("__proto__"===r||"constructor"===r||"prototype"===r)return;let s=a.has(r),l=s?t[r]:void 0,u=(!s||aw.isPlainObject(l))&&i.has(r)?e[r]:void 0;n[r]=s?o(u,l):o(void 0,u)})}return!function(e){let t=[{value:e}],r=new WeakSet,n=new WeakSet;for(;t.length;){let{value:e,done:i}=t.pop();if(!aw.isPlainObject(e)&&!aw.isArray(e))continue;if(i){r.delete(e);continue}if(r.has(e))throw new aD("Circular reference detected in params",aD.ERR_BAD_OPTION_VALUE);if(n.has(e))continue;n.add(e),r.add(e),t.push({value:e,done:!0});let o=Object.keys(e);Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertySymbols(e).forEach(t=>{let r=Object.getOwnPropertyDescriptor(e,t);r&&r.enumerable&&o.push(t)}),o.forEach(r=>{if("__proto__"===r||"constructor"===r||"prototype"===r){let n=Object.getOwnPropertyDescriptor(e,r);n&&aw.hasOwnProp(n,"value")&&t.push({value:n.value})}else t.push({value:e[r]})})}}(a),a},paramsSerializer:sk,timeout:sk,timeoutErrorMessage:sk,withCredentials:sk,withXSRFToken:sk,adapter:sk,responseType:sk,xsrfCookieName:sk,xsrfHeaderName:sk,onUploadProgress:sk,onDownloadProgress:sk,decompress:sk,maxContentLength:sk,maxBodyLength:sk,beforeRedirect:sk,transport:sk,httpAgent:sk,httpsAgent:sk,cancelToken:sk,socketPath:sk,allowedSocketPaths:sk,responseEncoding:sk,validateStatus:sP,headers:function(e,t,r){return sx(sR(e),sR(t),r,!0)}};function sN(e,t){e=e||{},t=t||{};let r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",sU);let n=sT({...e,...t});for(let i=0,o=n.length;i<o;i++){let o=n[i];if("__proto__"===o||"constructor"===o||"prototype"===o)continue;let a=aw.hasOwnProp(sI,o)?sI[o]:sx,s=aw.hasOwnProp(e,o)?e[o]:void 0,l=aw.hasOwnProp(t,o)?t[o]:void 0,u=a===sP?a(s,l,o,e,t):a(s,l,o);aw.isUndefined(u)&&a!==sP||(r[o]=u)}return aw.hasOwnProp(t,"validateStatus")&&aw.isUndefined(t.validateStatus)&&!1===function(e,t,r){let n=aw.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!aw.isUndefined(n)){if(!aw.isPlainObject(n))return;else if(aw.hasOwnProp(n,r))return n[r]}let i=aw.hasOwnProp(e,"transitional")?e.transitional:void 0;if(aw.isPlainObject(i)&&aw.hasOwnProp(i,r))return i[r]}(e,t,"validateStatusUndefinedResolves")&&(aw.hasOwnProp(e,"validateStatus")?r.validateStatus=sA(void 0,e.validateStatus):delete r.validateStatus),r}let sL=["content-type","content-length"],sz=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),sj=e=>sm.read(e);var sD=function(e,t=sj){let r=sN({},e),n=e=>aw.hasOwnProp(r,e)?r[e]:void 0,i=n("data"),o=n("withXSRFToken"),a=n("xsrfHeaderName"),s=n("xsrfCookieName"),l=n("headers"),u=n("auth"),c=n("baseURL"),p=n("allowAbsoluteUrls"),d=n("url");if(r.headers=l=aI.from(l),r.url=aV(sO(c,d,p,r),n("params"),n("paramsSerializer")),u){let t=aw.getSafeProp(u,"username")||"",r=aw.getSafeProp(u,"password")||"",i=n("transitional"),o=i&&aw.hasOwnProp(i,"encodeBasicAuthUsername")&&!0===i.encodeBasicAuthUsername;try{l.set("Authorization","Basic "+btoa((o?sz(t):t)+":"+(r?sz(r):"")))}catch(t){throw aD.from(t,aD.ERR_BAD_OPTION_VALUE,e)}}if(aw.isFormData(i)){let e=aw.getSafeProp(i,"getHeaders");if(a7.hasStandardBrowserEnv||a7.hasStandardBrowserWebWorkerEnv||aw.isReactNative(i))l.setContentType(void 0);else{var f,h;aw.isFunction(e)&&(f=l,h=e.call(i),"content-only"!==n("formDataHeaderPolicy")?f.set(h):Object.entries(h||{}).forEach(([e,t])=>{sL.includes(e.toLowerCase())&&f.set(e,t)}))}}if(a7.hasStandardBrowserEnv&&(aw.isFunction(o)&&(o=o(r)),!0===o||null==o&&s_(r.url))){let e=a&&s&&t(s);e&&l.set(a,e)}return r},s$="u">typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){let n,i,o,a,s,l,u,c,p;try{let e=a7.hasStandardBrowserEnv&&"u">typeof window&&window.cookieStore;n=e&&aw.isFunction(e.get)}catch(e){}let d=sD(e,n?e=>(i=e,null):void 0),f=d.data,h=aI.from(d.headers).normalize(),{responseType:m,onUploadProgress:g,onDownloadProgress:y}=d;function b(){clearTimeout(a);try{u&&u()}catch(e){setTimeout(()=>{throw e})}try{c&&c()}catch(e){setTimeout(()=>{throw e})}v&&(l&&v.removeEventListener("progress",l),v.upload&&(s&&v.upload.removeEventListener("progress",s),u&&v.upload.removeEventListener("loadend",u))),d.cancelToken&&d.cancelToken.unsubscribe(o),d.signal&&d.signal.removeEventListener("abort",o)}let v=new XMLHttpRequest;function w(n){if(!v)return;if(0===v.status&&"file"!==(sf(sd(d.url))||sf(a7.origin))&&!(v.responseURL&&v.responseURL.startsWith("file:"))){r(new aD("Request aborted",aD.ECONNABORTED,e,v)),b(),v=null;return}try{n?p&&p(n):c&&c()}catch(e){setTimeout(()=>{throw e})}if(!v)return;let i=aI.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());sc(function(e){t(e),b()},function(e){r(e),b()},{data:m&&"text"!==m&&"json"!==m?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:i,config:e,request:v}),v=null}if(v.open(d.method.toUpperCase(),d.url,!0),v.timeout=d.timeout,"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||4!==v.readyState||(0!==v.status||v.responseURL&&v.responseURL.startsWith("file:"))&&setTimeout(w)},v.onabort=function(){v&&(r(new aD("Request aborted",aD.ECONNABORTED,e,v)),b(),v=null)},v.onerror=function(t){let n=new aD(t&&t.message?t.message:"Network Error",aD.ERR_NETWORK,e,v);n.event=t||null,r(n),b(),v=null},v.ontimeout=function(){if(!v)return;let t=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",n=d.transitional||a0;d.timeoutErrorMessage&&(t=d.timeoutErrorMessage),r(new aD(t,n.clarifyTimeoutError?aD.ETIMEDOUT:aD.ECONNABORTED,e,v)),b(),v=null},void 0===f&&h.setContentType(null),aw.isUndefined(d.withCredentials)||(v.withCredentials=!!d.withCredentials),m&&"json"!==m&&(v.responseType=d.responseType),y&&([l,c,p]=sb(y,!0),v.addEventListener("progress",l)),g&&v.upload&&([s,u]=sb(g),v.upload.addEventListener("progress",s),v.upload.addEventListener("loadend",u)),d.cancelToken||d.signal){if(o=t=>{if(!v)return;r(!t||t.type?new su(null,e,v):t);let n=v;b(),v=null,n.abort()},d.cancelToken&&d.cancelToken.subscribe(o),!v)return;d.signal&&(d.signal.aborted?o():d.signal.addEventListener("abort",o))}if(!v)return;let _=sf(d.url);if(_&&!a7.protocols.includes(_)){r(new aD("Unsupported protocol "+_+":",aD.ERR_BAD_REQUEST,e)),b();return}let E=()=>{v&&("setRequestHeader"in v&&aw.forEach(aR(h),function(e,t){v.setRequestHeader(t,e)}),v.send(f||null))};if(i){let t="u">typeof performance&&aw.isFunction(performance.now)?()=>performance.now():Date.now,n=v.timeout>0?t()+Number(v.timeout):void 0,o=()=>{if(!v)return;let e=v;e.ontimeout(),e.abort()};if(void 0!==n){let e=()=>{let r=n-t();r>0?a=setTimeout(e,Math.min(r,0x7fffffff)):o()};e()}sm.readAsync(i).then(e=>{if(v){if(void 0!==n&&t()>=n)return void o();if(e){let t=aw.hasOwnProp(d,"xsrfHeaderName")&&d.xsrfHeaderName;h.set(t,e)}E()}}).catch(t=>{v&&(r(aD.from(t,null,e,v)),b(),v=null)})}else E()})};let sM=function*(e,t){let r,n=e.byteLength;if(!t||n<t)return void(yield e);let i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},sB=async function*(e,t){for await(let r of sF(e))yield*sM(r,t)},sF=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);let t=e.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},sq=(e,t,r,n)=>{let i,o=sB(e,t),a=0,s=e=>{!i&&(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await o.next();if(t){s(),e.close();return}let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},sW=e=>String(e).replace(/\r\n|\r|\n/g,"\r\n"),sZ=e=>String(e).replace(/[\r\n"]/g,e=>"\r"===e?"%0D":"\n"===e?"%0A":"%22"),sK=(e,t)=>{let r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);t&&(13===i||10===i)?(13===i&&10===e.charCodeAt(n+1)&&n++,r+=2):i<128?r++:i<2048?r+=2:i>=55296&&i<=56319&&e.charCodeAt(n+1)>=56320&&57343>=e.charCodeAt(n+1)?(r+=4,n++):r+=3}return r};let sH=class FormDataError extends TypeError{constructor(e,t){super(e),this.name="FormDataError",this.reason=t}};let sV=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,sG=(e,t,r)=>t+2<r&&sV(e.charCodeAt(t+1))&&sV(e.charCodeAt(t+2)),sJ=e=>e<=57?e-48:(223&e)-55,sY=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||43===e||47===e||45===e||95===e,sX=e=>9===e||10===e||12===e||13===e||32===e,sQ=e=>{var t;let r,n,i=e.length,o=0,a=0,s=!1;for(let t=0;t<i;t++){let r=e.charCodeAt(t);if(37===r&&sG(e,t,i)&&(r=16*sJ(e.charCodeAt(t+1))+sJ(e.charCodeAt(t+2)),t+=2),!sX(r)){if(61===r){a++;continue}if(!sY(r)||a>0){s=!0;continue}o++}}if(s||a>2||a>0&&(o+a)%4!=0||o%4==1){let t,r;return t=e.length,r=0,t>0&&61===e.charCodeAt(t-1)&&(r++,t>1&&61===e.charCodeAt(t-2)&&r++),Math.floor((t-r)*3/4)}return r=Math.floor((t=o)/4),3*r+(2==(n=t%4)?1:2*(3===n))},s0={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:s1}=aw,s2=e=>{if(!aw.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},s4=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},s3=e=>{let t,r=void 0!==aw.global&&null!==aw.global?aw.global:globalThis,{ReadableStream:n,TextEncoder:i}=r;e=aw.merge.call({skipUndefined:!0},{Request:r.Request,Response:r.Response,Blob:r.Blob},e);let o=aw.hasOwnProp(e,"fetch")?e.fetch:void 0,{Request:a,Response:s,Blob:l}=e,u=o?s1(o):"function"==typeof fetch,c=s1(a),p=s1(s);if(!u)return!1;let d=u&&s1(n),f=u&&("function"==typeof i?(t=new i,e=>t.encode(e)):async e=>new Uint8Array(await new a(e).arrayBuffer())),h=c&&d&&s4(()=>{let e=!1,t=new a(a7.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),m=p&&d&&s4(()=>aw.isReadableStream(new s("").body)),g=Object.assign(Object.create(null),s0);c&&!s4(()=>new a(a7.origin,g))&&(delete g.cache,s4(()=>new a(a7.origin,g))||(g.cache=s0.cache));let y={stream:m&&(e=>e.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{y[e]||(y[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new aD(`Response type '${e}' is not supported`,aD.ERR_NOT_SUPPORT,r)})});let b=async e=>null==e?0:aw.isBlob(e)?e.size:aw.isArrayBufferView(e)||aw.isArrayBuffer(e)?e.byteLength:(aw.isURLSearchParams(e)&&(e+=""),aw.isString(e))?(await f(e)).byteLength:void 0;return async e=>{let t,{url:r,method:n,data:u,signal:p,cancelToken:f,timeout:v,onDownloadProgress:w,onUploadProgress:_,responseType:E,headers:S,withCredentials:O="same-origin",fetchOptions:R,maxContentLength:T,maxBodyLength:A,maxRedirects:x}=sD(e),C=aw.isNumber(T)&&T>-1,k=aw.isNumber(A)&&A>-1,P=t=>aw.hasOwnProp(e,t)?e[t]:void 0,U=o||fetch;E=E?(E+"").toLowerCase():"text";let I=((e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let r=new AbortController,n=!1,i=function(e){if(!n){n=!0,a();let t=e instanceof Error?e:this.reason;r.abort(t instanceof aD?t:new su(t instanceof Error?t.message:t))}},o=t&&setTimeout(()=>{o=null,i(new aD(`timeout of ${t}ms exceeded`,aD.ETIMEDOUT))},t),a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{let t=aw.getSafeProp(e,"unsubscribe");aw.isFunction(t)?t.call(e,i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>{if(!n){if(e.aborted)return void i.call(e);e.addEventListener("abort",i,{once:!0})}});let{signal:s}=r;return s.unsubscribe=()=>aw.asap(a),s})([p,f&&f.toAbortSignal()],v),N=null,L=I&&I.unsubscribe&&(()=>{I.unsubscribe()}),z=null,j=null,D=()=>new aD("Request body larger than maxBodyLength limit",aD.ERR_BAD_REQUEST,e,N);try{var $,M;let o,p,f,v,B,F=P("auth");if(F){let e=aw.getSafeProp(F,"username")||"",t=aw.getSafeProp(F,"password")||"";f={username:e,password:t}}if(v=($=r).indexOf("://"),B=$,-1!==v&&(B=B.slice(v+3)),B.includes("@")||B.includes(":")){if(o=new URL(r,a7.origin),!f&&(o.username||o.password)){let e=s2(o.username),t=s2(o.password);f={username:e,password:t}}(o.username||o.password)&&(o.username="",o.password="",r=o.href)}if(f){let e;S.delete("authorization"),S.set("Authorization","Basic "+btoa((e=(f.username||"")+":"+(f.password||""),encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))}if(C&&o&&"data:"===o.protocol){let t;if(M=o.href,t="string"==typeof M?M.indexOf("#"):-1,((e,t,r)=>{if(!e||"string"!=typeof e||!/^data:/i.test(e))return 0;let n=e.indexOf(",");if(n<0)return 0;let i=e.slice(5,n),o=e.slice(n+1);if(r.test(i))return t(o);let a=0;for(let e=0,t=o.length;e<t;e++){let r=o.charCodeAt(e);if(37===r&&sG(o,e,t))a+=1,e+=2;else if(r<128)a+=1;else if(r<2048)a+=2;else if(r>=55296&&r<=56319&&e+1<t){let t=o.charCodeAt(e+1);t>=56320&&t<=57343?(a+=4,e++):a+=3}else a+=3}return a})(-1===t?M:M.slice(0,t),sQ,/; *base64[\t\n\f\r ]*$/i)>T)throw new aD("maxContentLength size of "+T+" exceeded",aD.ERR_BAD_RESPONSE,e,N)}let q=aw.isSpecCompliantForm(u)&&aI.from(P("headers")).getContentType();if(aw.isString(q)&&/^multipart\/form-data(?:\s*;|$)/i.test(q.trim())){let e=aI.parseParameters(q);aw.hasOwnProp(e,"boundary")&&(p=e.boundary)}if(aw.isSpecCompliantForm(u)&&"get"!==n&&"head"!==n&&(k||_&&h||void 0!==p)&&(u=function(e,t,r,n,i){if(!aw.isFunction(t))throw new aD("Blob is not supported",aD.ERR_NOT_SUPPORT);if(void 0===i)if(aw.isFunction(a7.generateString))i="axios-"+a7.generateString(36,"0123456789abcdef");else{let e=aw.global.crypto;if(!e||!aw.isFunction(e.getRandomValues))throw new aD("Random byte generation is not supported",aD.ERR_NOT_SUPPORT);let t=new Uint8Array(18);e.getRandomValues(t),i="axios-"+Array.from(t,e=>("0"+e.toString(16)).slice(-2)).join("")}try{return function(e,t,r,n,i){if(!aw.isFunction(t))throw new sH("Blob is not supported","blob");if(!aw.isString(i)||!/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(i)||/ $/.test(i))throw new sH("Invalid multipart boundary","boundary");let o="--"+i+"--\r\n",a=o.length,s=[],l=e=>{if(a+e>r)throw n()};for(let[t,r]of(l(0),e)){let e=aw.isString(r),n=e?sK(r,!0):r.size;if(!Number.isFinite(n)||n<0)throw new sH("Unsupported FormData part size","part");l(n+sK(t,!0)+(!e&&r.name?sK(r.name,!1):0)+(!e&&r.type?sK(r.type,!1):0));let o="--"+i+'\r\nContent-Disposition: form-data; name="'+sZ(sW(t))+'"';e||(o+='; filename="'+sZ(aw.isString(r.name)?r.name:"blob")+'"\r\nContent-Type: '+String(r.type||"application/octet-stream").replace(/[\r\n]/g,""));let u=sK(o+="\r\n\r\n",!1)+n+2;l(u),a+=u,s.push({header:o,value:r,isString:e})}let u=[];for(let e of s)u.push(e.header,e.isString?sW(e.value):e.value,"\r\n");return u.push(o),new t(u,{type:"multipart/form-data; boundary="+i})}(e,t,r,n,i)}catch(e){if(e instanceof sH){let t="boundary"===e.reason?aD.ERR_BAD_OPTION_VALUE:aD.ERR_BAD_REQUEST;throw new aD(e.message,t)}throw e}}(u,l,k?A:1/0,D,p),S.setContentType(void 0===p?u.type:q),t=u.size),k&&"get"!==n&&"head"!==n){let e=await b(u);if("number"==typeof e&&isFinite(e)&&(t=e,e>A))throw D()}let W=k&&(aw.isReadableStream(u)||aw.isStream(u)),Z=(e,t,r)=>sq(e,65536,e=>{if(k&&e>A)throw z=D();t&&t(e)},r);if(h&&"get"!==n&&"head"!==n&&(_||W)){if(t=null==t?await (async(e,t)=>{let r=aw.toFiniteNumber(e.getContentLength());return null==r?b(t):r})(S,u):t,0!==t||W){let e,n=new a(r,{method:"POST",body:u,duplex:"half"});if(aw.isFormData(u)&&(e=n.headers.get("content-type"))&&S.setContentType(e),n.body){let[e,r]=_&&sv(t,sb(sw(_)))||[];u=Z(n.body,e,r)}}}else if(W&&!c&&d&&"get"!==n&&"head"!==n)u=Z(u);else if(W&&c&&!h&&"get"!==n&&"head"!==n)throw new aD("Stream request bodies are not supported by the current fetch implementation",aD.ERR_NOT_SUPPORT,e,N);aw.isString(O)||(O=O?"include":"omit");let K=c&&"credentials"in a.prototype;if(aw.isFormData(u)){let e=S.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&S.delete("content-type")}S.set("User-Agent","axios/1.21.1",!1);let H=null==R?R:Object.assign(Object.create(null),R);H&&(delete H.body,delete H.headers,delete H.method,delete H.signal,delete H.duplex,delete H.credentials);let V=Object.assign(Object.create(null),H,{signal:I,method:n.toUpperCase(),headers:aR(S.normalize()),body:u,duplex:"half",credentials:K?O:void 0});c&&(aw.forEach(g,(e,t)=>{void 0===V[t]&&(V[t]=e)}),void 0===V.signal&&(V.signal=null),void 0===V.body&&(V.body=null)),0===x&&(V.redirect="manual",H&&(H.redirect="manual")),N=c&&new a(r,V);let G=await (c?U(N,H):U(r,V)),J=aI.from(G.headers);if(C){let t=aw.toFiniteNumber(J.getContentLength());if(null!=t&&t>T)throw new aD("maxContentLength size of "+T+" exceeded",aD.ERR_BAD_RESPONSE,e,N)}let Y=m&&("stream"===E||"response"===E);if(m&&G.body&&(w||C||Y&&L)){let t={};["status","statusText","headers"].forEach(e=>{t[e]=G[e]});let r=aw.toFiniteNumber(J.getContentLength()),[n,i]=w&&sv(r,sb(sw(w),!0))||[];G=new s(sq(G.body,65536,t=>{if(C&&t>T)throw j=new aD("maxContentLength size of "+T+" exceeded",aD.ERR_BAD_RESPONSE,e,N);n&&n(t)},()=>{i&&i(),L&&L()}),t)}E=E||"text";let X=await y[aw.findKey(y,E)||"text"](G,e);if(C&&!m&&!Y){let t;if(null!=X&&("number"==typeof X.byteLength?t=X.byteLength:"number"==typeof X.size?t=X.size:"string"==typeof X&&(t="function"==typeof i?new i().encode(X).byteLength:X.length)),"number"==typeof t&&t>T)throw new aD("maxContentLength size of "+T+" exceeded",aD.ERR_BAD_RESPONSE,e,N)}return!Y&&L&&L(),await new Promise((t,r)=>{sc(t,r,{data:X,headers:aI.from(G.headers),status:G.status,statusText:G.statusText,config:e,request:N})})}catch(t){if(L&&L(),I&&I.aborted&&I.reason instanceof aD){let r=I.reason;throw r.config=e,N&&(r.request=N),t!==r&&Object.defineProperty(r,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),r}if(z)throw N&&!z.request&&(z.request=N),z;if(j)throw j;if(t instanceof aD)throw N&&!t.request&&(t.request=N),t;if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message)){let r=new aD("Network Error",aD.ERR_NETWORK,e,N,t&&t.response);throw Object.defineProperty(r,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),r}throw aD.from(t,t&&t.code,e,N,t&&t.response)}}},s9=new Map,s6=e=>{let t=Object.create(null),r=e&&aw.hasOwnProp(e,"env")&&e.env;["fetch","Request","Response","Blob"].forEach(e=>{r&&aw.hasOwnProp(r,e)&&(t[e]=r[e])});let{fetch:n,Request:i,Response:o,Blob:a}=t,s=[i,o,n,a],l=s.length,u,c,p=s9;for(;l--;)u=s[l],void 0===(c=p.get(u))&&p.set(u,c=l?new Map:s3(t)),p=c;return c};s6();let s5={http:null,xhr:s$,fetch:{get:s6}};aw.forEach(s5,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});let s8=e=>`- ${e}`,s7=e=>aw.isFunction(e)||null===e||!1===e;var le=function(e,t){let r,n,{length:i}=e=aw.isArray(e)?e:[e],o={};for(let a=0;a<i;a++){let i;if(n=r=e[a],!s7(r)&&void 0===(n=s5[(i=String(r)).toLowerCase()]))throw new aD(`Unknown adapter '${i}'`);if(n&&(aw.isFunction(n)||(n=n.get(t))))break;o[i||"#"+a]=n}if(!n){let e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new aD("There is no suitable adapter to dispatch the request "+(i?e.length>1?"since :\n"+e.map(s8).join("\n"):" "+s8(e[0]):"as no adapter specified"),aD.ERR_NOT_SUPPORT)}return n};function lt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new su(null,e)}function lr(e,t){return Math.max(0,Math.round(e()-t))}function ln(e){let t=aw.toSafeFlatObject(e);lt(t),t.headers=aI.from(aw.getSafeProp(t,"headers")),t.data=ss.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);let r=le(t.adapter||sa.adapter,t),n="u">typeof performance&&aw.isFunction(performance.now)?()=>performance.now():Date.now,i=n();return r(t).then(function(e){lt(t),e.duration=lr(n,i),t.response=e;try{e.data=ss.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=aI.from(e.headers),e},function(e){if(!sl(e)&&(lt(t),e&&e.response)){e.response.duration=lr(n,i),t.response=e.response;try{e.response.data=ss.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=aI.from(e.response.headers)}return Promise.reject(e)})}let li={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{li[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let lo={};li.transitional=function(e,t,r){function n(e,t){return"[Axios v1.21.1] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new aD(n(i," has been removed"+(t?" in "+t:"")),aD.ERR_DEPRECATED);return t&&!lo[i]&&(lo[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}},li.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var la=function(e,t,r){if("object"!=typeof e||null===e)throw new aD("options must be an object",aD.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let o=n[i],a=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(a){let t=e[o],r=void 0===t||a(t,o,e);if(!0!==r)throw new aD("option "+o+" must be "+r,aD.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new aD("Unknown option "+o,aD.ERR_BAD_OPTION)}};let ls=e=>{if(null==e||aw.isPlainObject(e)||e instanceof aI)return!0;try{return aw.isObject(e)&&"AxiosHeaders"===aw.getSafeProp(e,Symbol.toStringTag)&&["toJSON","set","get","has","delete","clear","normalize","concat","toString",Symbol.iterator].every(t=>aw.isFunction(aw.getSafeProp(e,t)))}catch(e){return!1}};let ll=class Axios{constructor(e){this.defaults=e||{},this.interceptors={request:new aQ,response:new aQ}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=t.stack,n="";if("string"==typeof r){let e=r.indexOf("\n");n=-1===e?"":r.slice(e+1)}if(e.stack){if(n){let t,r=n.indexOf("\n"),i=-1===r?-1:n.indexOf("\n",r+1),o=-1===i?n:n.slice(i+1),a=String(e.stack),s=(t=aw.hasOwnProp(e,az)&&e[az])&&a.endsWith(t)?a.length-t.length:-1,l=-1===s?a:a.slice(0,s),u=-1===s?"":a.slice(s);l.endsWith(o)||(e.stack=l+"\n"+n+u)}}else e.stack=n}catch(e){}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:i,paramsSerializer:o,headers:a}=t=sN(this.defaults,t);void 0!==i&&la(i,{silentJSONParsing:li.transitional(li.boolean),forcedJSONParsing:li.transitional(li.boolean),clarifyTimeoutError:li.transitional(li.boolean),legacyInterceptorReqResOrdering:li.transitional(li.boolean),advertiseZstdAcceptEncoding:li.transitional(li.boolean),validateStatusUndefinedResolves:li.transitional(li.boolean),encodeBasicAuthUsername:li.transitional(li.boolean)},!1),null!=o&&(aw.isFunction(o)?t.paramsSerializer={serialize:o}:la(o,{encode:li.function,serialize:li.function},!0)),void 0!==t.allowAbsoluteUrls||(aw.hasOwnProp(this.defaults,"allowAbsoluteUrls")&&void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),la(t,{baseUrl:li.spelling("baseURL"),withXsrfToken:li.spelling("withXSRFToken")},!0),t.method=(aw.getSafeProp(t,"method")||aw.getSafeProp(this.defaults,"method")||"get").toLowerCase();let s=aw.getSafeProp(a,"common"),l=aw.getSafeProp(a,t.method),u=a&&aw.merge(ls(s)?s:void 0,ls(l)?l:void 0);a&&aw.forEach(si.concat("common"),e=>{ls(aw.getSafeProp(a,e))&&delete a[e]}),t.headers=aI.concat(u,a);let c=[],p=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;p=p&&e.synchronous;let r=t.transitional||a0;r&&r.legacyInterceptorReqResOrdering?c.unshift(e.fulfilled,e.rejected):c.push(e.fulfilled,e.rejected)});let d=[];this.interceptors.response.forEach(function(e){d.push(e.fulfilled,e.rejected)});let f=0;if(!p){let e=[ln.bind(this),void 0];for(e.unshift(...c),e.push(...d),n=e.length,r=Promise.resolve(t);f<n;)r=r.then(e[f++],e[f++]);return r}n=c.length;let h=t;for(;f<n;){let e=c[f++],t=c[f++];try{h=e?e(h):h}catch(e){if(!t){r=Promise.reject(e);break}try{let n=t.call(this,e);aw.isThenable(n)&&(r=Promise.resolve(n).then(()=>ln.call(this,h)))}catch(e){r=Promise.reject(e)}break}}if(!r)try{r=ln.call(this,h)}catch(e){r=Promise.reject(e)}for(f=0,n=d.length;f<n;)r=r.then(d[f++],d[f++]);return r}getUri(e){return aV(sO((e=sN(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};aw.forEach(["delete","get","head","options"],function(e){ll.prototype[e]=async function(t,r){return this.request(sN(r||{},{method:e,url:t,data:r&&aw.hasOwnProp(r,"data")?r.data:void 0}))}}),aw.forEach(["post","put","patch","query"],function(e){function t(t){return async function(r,n,i){return this.request(sN(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ll.prototype[e]=t(),"query"!==e&&(ll.prototype[e+"Form"]=t(!0))});let lu=class CancelToken{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});let r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t,n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new su(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new lu(function(t){e=t}),cancel:e}}};let lc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(lc).forEach(([e,t])=>{void 0===lc[t]&&(lc[t]=e)});let lp=function e(t){let r=new ll(t),n=oD(ll.prototype.request,r);return aw.extend(n,ll.prototype,r,{allOwnKeys:!0}),aw.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(sN(t,r))},n}(sa);lp.Axios=ll,lp.CanceledError=su,lp.CancelToken=lu,lp.isCancel=sl,lp.VERSION="1.21.1",lp.toFormData=aq,lp.AxiosError=aD,lp.Cancel=lp.CanceledError,lp.all=function(e){return Promise.all(e)},lp.spread=function(e){return function(t){return e.apply(null,t)}},lp.isAxiosError=function(e){return aw.isObject(e)&&!0===e.isAxiosError},lp.mergeConfig=sN,lp.AxiosHeaders=aI,lp.formToJSON=e=>sn(aw.isHTMLForm(e)?new FormData(e):e),lp.getAdapter=le,lp.HttpStatusCode=lc,lp.default=lp;let{Axios:ld,AxiosError:lf,CanceledError:lh,isCancel:lm,CancelToken:lg,VERSION:ly,all:lb,Cancel:lv,isAxiosError:lw,spread:l_,toFormData:lE,AxiosHeaders:lS,HttpStatusCode:lO,formToJSON:lR,getAdapter:lT,mergeConfig:lA,create:lx}=lp,lC={isNode:!1,platform:void 0,async compress(){throw Error("Request body compression is only available in Node.js.")},async createHttpAgents(){},openBlobBody:e=>e};let lk=class ApifyClientError extends Error{};function lP(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}let lU=/at( async)? (?![A-Za-z]*HttpClient\.)([A-Za-z]+(Collection)?Client)\.(?!call \()([A-Za-z]+) \(/;let lI=class ApifyApiError extends lk{name;clientMethod;statusCode;type;attempt;httpMethod;path;originalStack;data;constructor(e,t){let r,n,i,o=e.data;if(un(o)){let t=new TextDecoder().decode(e.data);try{o=JSON.parse(t)}catch{o=t}}if(o&&o.error){let{error:e}=o;r=e.message,n=e.type,i=e.data}else if(o){let e;try{e=JSON.stringify(o,null,2)}catch{e=`${o}`}r=`Unexpected error: ${e}`}super(r),this.name=this.constructor.name,this.clientMethod=this.#e(),this.statusCode=e.status,this.type=n,this.attempt=t,this.httpMethod=e.config?.method,this.path=this.#t(e);let a=this.stack;this.originalStack=a.slice(a.indexOf("\n")),this.stack=this.#r(),this.data=i}static fromResponse(e,t){return new(lB[e.status]??(e.status>=500?lM:lI))(e,t)}#t(e){let t,r=e.config?.url;try{t=new URL(r)}catch{return r}return t.pathname+t.search}#e(){let e=this.stack.match(lU);return e?`${e[2]}.${e[4]}`:"unknown"}#r(){let{name:e,...t}=this,r=Object.entries(t).map(e=>{let[t,r]=e;return"originalStack"===t&&(t="stack"),` ${t}: ${r}`}).join("\n");return`${e}: ${this.message}
|
|
61
|
+
${r}`}};let lN=class InvalidRequestError extends lI{};let lL=class UnauthorizedError extends lI{};let lz=class ForbiddenError extends lI{};let lj=class NotFoundError extends lI{};let lD=class ConflictError extends lI{};let l$=class RateLimitError extends lI{};let lM=class ServerError extends lI{};let lB={400:lN,401:lL,403:lz,404:lj,409:lD,429:l$},{localeError:lF}=nS();function lq(e){return null===e?"null":Array.isArray(e)?"array":typeof e}let lW=/^Invalid input: expected (an array of .+|a typed array|an object|object|array|function|number|string|boolean)$/;function lZ(e){switch(typeof e){case"string":if(""===e)return"''";return e.length>200?`${e.slice(0,200)}… (${e.length-200} more characters)`:e;case"number":case"boolean":return String(e);case"bigint":return`${e}n`;default:return}}function lK(e){if("number"==typeof e&&Number.isNaN(e))return"received NaN";if(""===e)return"received an empty string";let t=lZ(e);return void 0===t?`received ${lq(e)}`:`received the ${lq(e)} \`${t}\``}let lH=class ArgumentValidationError extends Error{issues;cause;constructor(e,t,r){super(function(e,t,r){let n=[],i={total:0};for(let r of e.issues)!function e(t,r,n,i,o){let a=[...n,...t.path];if("invalid_union"===t.code){let n=t.errors.map(e=>e.reduce((e,t)=>Math.max(e,function e(t,r){let n=r+t.path.length;if("invalid_union"===t.code){let r=-1;for(let i of t.errors)for(let t of i)r=Math.max(r,e(t,n));return r}return n}(t,a.length)),-1)),s=Math.max(...n);for(let[l,u]of t.errors.entries())if(n[l]===s)for(let t of u)e(t,r,a,i,o);return}if(o.total+=1,i.length>=10)return;let s=a.length?` at \`${function(e){let t="";for(let r of e)"number"==typeof r?t+=`[${r}]`:t+=t?`.${String(r)}`:String(r);return t}(a)}\``:"",l=function(e,t){let r=e;for(let e of t){if(null===r||"object"!=typeof r)return;r=r[e]}return r}(r,a),u=lZ(l),c=function(e,t){if("invalid_type"===e.code){if("number"===e.expected&&"number"==typeof t)return"Invalid input: expected a finite number";if("date"===e.expected&&"[object Date]"===Object.prototype.toString.call(t))return"Invalid input: expected a valid date"}return e.message}(t,l),p="",d=lW.exec(c),f=/, received (\S+)$/.exec(c),h=d?.[1].startsWith("an array of")?"array":d?.[1];d&&h!==(Number.isNaN(l)?"NaN":lq(l))?c+=`, ${lK(l)}`:f&&f[1]===lq(l)&&void 0!==u?c=`${c.slice(0,f.index)}, ${lK(l)}`:void 0===u||c.endsWith(`received ${u}`)||(p=`, got \`${u}\``),i.push(`${c}${s}${p}`)}(r,t,[],n,i);let o=r?n.map(e=>`${e} in \`${r}\``):[...n],a=i.total-n.length;return a>0&&o.push(`... and ${a} more problem${1===a?"":"s"}`),o.join("\n")}(e,t,r),{cause:e}),this.name="ArgumentValidationError",this.issues=e.issues,this.cause=e}};function lV(e,t,r){let n=t.safeParse(e,{error:lF});if(!n.success)throw new lH(n.error,e,r);return n.data}i7(e=>"object"==typeof e&&null!==e,{error:"Invalid input: expected object"});let lG=class ResponseValidationError extends lk{issues;method;url;constructor(e,t,r){let n=r.method.toUpperCase(),i=new lH(e,t).message;super(`Response from ${n} ${r.url} does not match the API schema:
|
|
62
62
|
${i}
|
|
63
|
-
The API returned something its OpenAPI specification does not describe. Please report this at https://github.com/apify/apify-client-js/issues.`,{cause:e}),this.name="ResponseValidationError",this.issues=e.issues,this.method=n,this.url=r.url}};var lJ=JSON.parse('{"rE":"3.0.0-beta.107"}'),lY=r("z");let lX=new TextEncoder,{rE:lQ}=lJ,l0=["audio/","image/","video/"],l1=new Set(["application/epub+zip","application/gzip","application/java-archive","application/vnd.android.package-archive","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.rar","application/x-7z-compressed","application/x-bzip","application/x-bzip2","application/x-gzip","application/x-rar-compressed","application/x-xz","application/x-zip-compressed","application/zip","application/zstd","font/woff","font/woff2"]),l2=new Set(["audio/aiff","audio/basic","audio/l16","audio/l24","audio/midi","audio/vnd.wave","audio/wav","audio/wave","audio/x-aiff","audio/x-wav","image/bmp","image/tiff","image/vnd.adobe.photoshop","image/vnd.microsoft.icon","image/x-icon","image/x-ms-bmp"]),l4=["+json","+xml"];function l3(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let l9=i7(l3,{error:"Invalid input: expected an object"}),{localeError:l6}=nS(),l5=new iL({type:"object",shape:{data:ix()}??{},...ea(void 0)});function l8(e,t){let{method:r="GET",url:n=""}=e.config,i=l5.safeParse(e.data,{error:l6});if(!i.success)throw new lG(i.error,e.data,{method:r,url:n});let{data:o}=i.data,a=t.safeParse(o,{error:l6});if(!a.success)throw new lG(a.error,o,{method:r,url:n});return a.data}function l7(e){if(!(e instanceof lj))throw e}function ue(e,t){if(!t)throw e;l7(e)}function ut(e){if(e){var t=lX.encode(JSON.stringify(e));let r="";for(let e=0;e<t.length;e+=32768)r+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(r)}}function ur(e){return void 0!==lY?lY.env?.[e]:void 0}function un(e){return ArrayBuffer.isView(e)?!uo(e,"DataView"):uo(e,"ArrayBuffer")}function ui(e){return uo(e,"Blob")||uo(e,"File")}function uo(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function ua(e){if(null===e||"object"!=typeof e)return!1;let{on:t,pipe:r}=e;return"function"==typeof t&&"function"==typeof r}S=function(e,t){if("object"!==lk(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==lk(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(Symbol.asyncIterator,"string"),i="symbol"===lk(S)?S:String(S);let us=class RequestQueuePaginationIterator{#n;#i;#o;#a;constructor(e){this.#n=e.maxPageLimit,this.#o=e.limit,this.#a=e.cursor,this.#i=e.getPage}async *[i](){let e=this.#a,t=0;for(;;){let r=this.#o?Math.min(this.#n,this.#o-t):this.#n,n=await this.#i({limit:r,cursor:e});if(0===n.items.length||(yield n,t+=n.items.length,this.#o&&t>=this.#o||!n.nextCursor))return;e=n.nextCursor}}};function ul(e,t){return(0===e&&(e=void 0),0===t&&(t=void 0),void 0===e)?t:void 0===t?e:Math.min(e,t)}let uu={limit:i_().min(0).optional(),offset:i_().min(0).optional(),chunkSize:i_().positive().optional()};function uc(e,t){for(let[r,n]of Object.entries(t??{}))if(void 0!==n){if(Array.isArray(n)){e.searchParams.set(r,n.join(","));continue}e.searchParams.set(r,String(n))}return e}let up=n2().nonempty().refine(e=>"."!==e&&".."!==e,{error:"URL path must not contain dot segments"});function ud(e){return encodeURIComponent(lV(e,up))}function uf(e){return Array.isArray(e)?e.map(ud).join("/"):e}async function uh(e,t){return new Promise(r=>{if(t?.aborted)return void r();let n=()=>{clearTimeout(i),r()},i=setTimeout(()=>{t?.removeEventListener("abort",n),r()},e);t?.addEventListener("abort",n,{once:!0})})}let um="toBSON",ug="toString",uy="_bsontype";RegExp(`(.|^$|^${um}$|^${uy}|^${ug}$)`),RegExp(".","g"),RegExp("^$"),RegExp(`^${um}$`),RegExp(`^${ug}$`),RegExp(`^${uy}$`),RegExp("^(anonymous|page-not-found|docs|terms-of-use|about|pricing|privacy-policy|customers|request-form|request-solution|release-notes|jobs|api-reference|video-tutorials|acts|key-value-stores|schedules|account|sign-up|sign-in-discourse|admin|documentation|change-password|enroll-account|forgot-password|reset-password|sign-in|verify-email|live-status|browser-info|webhooks|health-check|api|change-log|dashboard|community|crawlers|ext|schemas|admin|administration|crawler|act|library|lib|apifier|team|contact|doc|documentation|for-business|for-developers|developers|business|integrations|job|setting|settings|privacy|policy|assets|help|config|configuration|terms|hiring|hire|status|status-page|solutions|support|market|marketplace|download|downloads|username|users|user|login|logout|signin|sign|signup|sign-out|signout|plugins|plug-ins|reset|password|passwords|square|profile-photos|profiles|true|false|js|css|img|images|image|partials|fonts|font|dynamic_templates|app|schedules|community|storage|storages|account|node_modules|bower_components|video|knowledgebase|forum|customers|blog|health-check|health|anim|forum_topics.json|forum_categories.json|me|you|him|she|it|external|actor|crawler|scheduler|api|sdk|puppeteer|webdriver|selenium|(selenium.*webdriver)|undefined|page-analyzer|wp-login.php|welcome.action|echo|proxy|super-proxy|gdpr|case-studies|use-cases|how-to|kb|cookies|cookie-policy|cookies-policy|powered-by|run|runs|actor|actors|act|acts|success-stories|roadmap|join-marketplace|presskit|press-kit|covid-19|covid|covid19|matfyz|ideas|public-actors|resources|partners|affiliate|industries|web-scraping|custom-solutions|solution-provider|alternatives|platform|freelancers|freelancer|partner|preview|templates|data-for-generative-ai|discord|praguecrawl|prague-crawl|bob|ai-agents|reel|video-reel|mcp|mcpc|model-context-protocol|modelcontextprotocol|apify.com|design-kit|press-kit|scrapers|professional-services|challenge|challange|1m-challenge|1m-usd-challenge|contact-sales|creator|creators|creator-plan|request-an-integration|whitepaper|adviser|crawlee|ultimate-scraper|agent-skills|key-value-store|request-queue|request-queues|build|builds|dataset|datasets|schedule|standby|pay-per-event|pay-per-result|pay-per-usage|ppe|ppr|compute-unit|compute-units|agent|agents|agentic|llms|llm|openai|anthropic|claude|copilot|mistral|gemini|llama|chatbot|chatgpt|prompt|prompts|embeddings|vectors|rag|agentic-commerce|agentic-economy|agentic-payments|a2a|a2b|a2p|ap2|b2a|acp|ucp|mpp|x402|l402|anp|agp|erc-8004|kya|kyapay|official|verified|certified|authorized|partner-official|gold-partner|premium-partner|staff|moderator|apify-admin|console|cli|studio|gateway|workbench|agents-marketplace|agents-store|mcp-server|mcp-servers|mcp-gateway|asia|latam|emea|apac|i18n|l10n|localization|localisation|usd|eur|gbp|jpy|cny|usdc|usdt|btc|eth|sol|crypto|fiat|stablecoin|stablecoins|payment|payments|payout|payouts|invoice|invoices|wallet|soc|soc2|iso|iso-27001|hipaa|ccpa|pci|pci-dss|dpa|dpia|dmca|sla|eula|aml|kyc|contributor|contributors|maintainer|maintainers|core-team|oss|open-source|opensource|open-source-software|spam|scam|phishing|malware|hack|hacked|giveaway|airdrop|bitcoin-giveaway|free-credits|free-money|launch|launches|webinar|webinars|meetup|meetups|summit|conference|conferences|org|orgs|organisation|workspace|workspaces|tenant|tenants|role|roles|permission|permissions|saml|scim|token|tokens|apikey|api-key|api-keys|keys|secret|secrets|coupon|coupons|discount|discounts|promos|refund|refunds|credit|credits|billing-portal|production|prod|canary|internal|restricted|conversations|reactions|mentions|channel|channels|inbox|no-reply|noreply|accessibility|imprint|impressum|trust|trust-center|security-center|brand|branding|support-team|abuse|outage|incident|incidents|what-is-new|whatsnew|index|index\\.html|(favicon\\.[a-z]+)|BingSiteAuth.xml|(google.+\\.html)|robots\\.txt|(sitemap\\.[a-z]+)|(apple-touch-icon.*)|security-whitepaper\\.pdf|security\\.txt|llms\\.txt|llms-full\\.txt|(.*\\.md)|(\\..*)|(xxx-.*)|((.+[^a-z]|)porn([^a-z].+|))|((.+[^a-z]|)vagina([^a-z].+|))|((.+[^a-z]|)dildo([^a-z].+|))|((.+[^a-z]|)nsfw([^a-z].+|))|((.+[^a-z]|)hentai([^a-z].+|))|((.+[^a-z]|)cunt([^a-z].+|))|((.+[^a-z]|)fuck([^a-z].+|))|((.+[^a-z]|)shit([^a-z].+|))|((.+[^a-z]|)bitch([^a-z].+|))|((.+[^a-z]|)slut([^a-z].+|))|((.+[^a-z]|)whore([^a-z].+|))|((.+[^a-z]|)boob([^a-z].+|))|((.+[^a-z]|)tits([^a-z].+|))|((.+[^a-z]|)cock([^a-z].+|))|((.+[^a-z]|)anus([^a-z].+|))|((.+[^a-z]|)pussy([^a-z].+|))|((.+[^a-z]|)nude([^a-z].+|))|((.+[^a-z]|)penis([^a-z].+|))|((.+[^a-z]|)naked([^a-z].+|))|(install-cli\\..*)|([^0-9a-z].*)|(.*[^0-9a-z])|(.*[_.\\-]{2}.*)|0|about|access|account|accounts|activate|activities|activity|ad|add|address|adm|admin|administration|administrator|ads|adult|advertising|affiliate|affiliates|ajax|all|alpha|analysis|analytics|android|anon|anonymous|api|app|apps|archive|archives|article|asct|asset|atom|auth|authentication|avatar|backup|balancer-manager|banner|banners|beta|billing|bin|blog|blogs|board|book|bookmark|bot|bots|bug|business|cache|cadastro|calendar|call|campaign|cancel|captcha|career|careers|cart|categories|category|cgi|cgi-bin|changelog|chat|check|checking|checkout|client|cliente|clients|code|codereview|comercial|comment|comments|communities|community|company|compare|compras|config|configuration|connect|contact|contact-us|contact_us|contactus|contest|contribute|corp|create|css|dashboard|data|db|default|delete|demo|design|designer|destroy|dev|devel|developer|developers|diagram|diary|dict|dictionary|die|dir|direct_messages|directory|dist|doc|docs|documentation|domain|download|downloads|ecommerce|edit|editor|edu|education|email|employment|empty|end|enterprise|entries|entry|error|errors|eval|event|events|exit|explore|facebook|faq|favorite|favorites|feature|features|feed|feedback|feeds|file|files|first|flash|fleet|fleets|flog|follow|followers|following|forgot|form|forum|forums|founder|free|friend|friends|ftp|gadget|gadgets|game|games|get|gift|gifts|gist|github|graph|group|groups|guest|guests|help|home|homepage|host|hosting|hostmaster|hostname|howto|hpg|html|http|httpd|https|i|iamges|icon|icons|id|idea|ideas|image|images|imap|img|index|indice|info|information|inquiry|instagram|intranet|invitations|invite|ipad|iphone|irc|is|issue|issues|it|item|items|java|javascript|job|jobs|join|js|json|jump|knowledgebase|language|languages|last|ldap-status|legal|license|link|links|linux|list|lists|log|log-in|log-out|log_in|log_out|login|logout|logs|m|mac|mail|mail1|mail2|mail3|mail4|mail5|mailer|mailing|maintenance|manager|manual|map|maps|marketing|master|me|media|member|members|message|messages|messenger|microblog|microblogs|mine|mis|mob|mobile|movie|movies|mp3|msg|msn|music|musicas|mx|my|mysql|name|named|nan|navi|navigation|net|network|new|news|newsletter|nick|nickname|notes|noticias|notification|notifications|notify|ns|ns1|ns10|ns2|ns3|ns4|ns5|ns6|ns7|ns8|ns9|null|oauth|oauth_clients|offer|offers|official|old|online|openid|operator|order|orders|organization|organizations|overview|owner|owners|page|pager|pages|panel|password|payment|perl|phone|photo|photoalbum|photos|php|phpmyadmin|phppgadmin|phpredisadmin|pic|pics|ping|plan|plans|plugin|plugins|policy|pop|pop3|popular|portal|post|postfix|postmaster|posts|pr|premium|press|price|pricing|privacy|privacy-policy|privacy_policy|privacypolicy|private|product|products|profile|project|projects|promo|pub|public|purpose|put|python|query|random|ranking|read|readme|recent|recruit|recruitment|register|registration|release|remove|replies|report|reports|repositories|repository|req|request|requests|reset|roc|root|rss|ruby|rule|sag|sale|sales|sample|samples|save|school|script|scripts|search|secure|security|self|send|server|server-info|server-status|service|services|session|sessions|setting|settings|setup|share|shop|show|sign-in|sign-up|sign_in|sign_up|signin|signout|signup|site|sitemap|sites|smartphone|smtp|soporte|source|spec|special|sql|src|ssh|ssl|ssladmin|ssladministrator|sslwebmaster|staff|stage|staging|start|stat|state|static|stats|status|store|stores|stories|style|styleguide|stylesheet|stylesheets|subdomain|subscribe|subscription|subscriptions|suporte|support|svn|swf|sys|sysadmin|sysadministrator|system|tablet|tablets|tag|talk|task|tasks|team|teams|tech|telnet|term|terms|terms-of-service|terms_of_service|termsofservice|test|test1|test2|test3|teste|testing|tests|theme|themes|thread|threads|tmp|todo|tool|tools|top|topic|topics|tos|tour|translations|trends|tutorial|tux|tv|twitter|undef|unfollow|unsubscribe|update|upload|uploads|url|usage|user|username|users|usuario|vendas|ver|version|video|videos|visitor|watch|weather|web|webhook|webhooks|webmail|webmaster|website|websites|welcome|widget|widgets|wiki|win|windows|word|work|works|workshop|ww|wws|www|www1|www2|www3|www4|www5|www6|www7|wwws|wwww|xfn|xml|xmpp|xpg|xxx|yaml|year|yml|you|yourdomain|yourname|yoursite|yourusername)$","i"),(O=z||(z={})).MONGODB_PING="MONGODB_PING",O.MONGODB_READ="MONGODB_READ",O.MONGODB_WRITE="MONGODB_WRITE",O.REDIS="REDIS",O.REDIS_PING="REDIS_PING",O.REDIS_WRITE="REDIS_WRITE",r("c");var ub=r("d").Buffer;r("d").Buffer,r("d").Buffer,(R=j||(j={})).VERSION="v",R.USER="u";let uv="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),uw=globalThis.crypto?.subtle;async function u_(e,t){if(!uw)throw Error(`SubtleCrypto is not available in this environment.
|
|
63
|
+
The API returned something its OpenAPI specification does not describe. Please report this at https://github.com/apify/apify-client-js/issues.`,{cause:e}),this.name="ResponseValidationError",this.issues=e.issues,this.method=n,this.url=r.url}};var lJ=JSON.parse('{"rE":"3.0.0-beta.108"}'),lY=r("z");let lX=new TextEncoder,{rE:lQ}=lJ,l0=["audio/","image/","video/"],l1=new Set(["application/epub+zip","application/gzip","application/java-archive","application/vnd.android.package-archive","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.rar","application/x-7z-compressed","application/x-bzip","application/x-bzip2","application/x-gzip","application/x-rar-compressed","application/x-xz","application/x-zip-compressed","application/zip","application/zstd","font/woff","font/woff2"]),l2=new Set(["audio/aiff","audio/basic","audio/l16","audio/l24","audio/midi","audio/vnd.wave","audio/wav","audio/wave","audio/x-aiff","audio/x-wav","image/bmp","image/tiff","image/vnd.adobe.photoshop","image/vnd.microsoft.icon","image/x-icon","image/x-ms-bmp"]),l4=["+json","+xml"];function l3(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let l9=i7(l3,{error:"Invalid input: expected an object"}),{localeError:l6}=nS(),l5=new iL({type:"object",shape:{data:ix()}??{},...ea(void 0)});function l8(e,t){let{method:r="GET",url:n=""}=e.config,i=l5.safeParse(e.data,{error:l6});if(!i.success)throw new lG(i.error,e.data,{method:r,url:n});let{data:o}=i.data,a=t.safeParse(o,{error:l6});if(!a.success)throw new lG(a.error,o,{method:r,url:n});return a.data}function l7(e){if(!(e instanceof lj))throw e}function ue(e,t){if(!t)throw e;l7(e)}function ut(e){if(e){var t=lX.encode(JSON.stringify(e));let r="";for(let e=0;e<t.length;e+=32768)r+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(r)}}function ur(e){return void 0!==lY?lY.env?.[e]:void 0}function un(e){return ArrayBuffer.isView(e)?!uo(e,"DataView"):uo(e,"ArrayBuffer")}function ui(e){return uo(e,"Blob")||uo(e,"File")}function uo(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function ua(e){if(null===e||"object"!=typeof e)return!1;let{on:t,pipe:r}=e;return"function"==typeof t&&"function"==typeof r}S=function(e,t){if("object"!==lP(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==lP(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(Symbol.asyncIterator,"string"),i="symbol"===lP(S)?S:String(S);let us=class RequestQueuePaginationIterator{#n;#i;#o;#a;constructor(e){this.#n=e.maxPageLimit,this.#o=e.limit,this.#a=e.cursor,this.#i=e.getPage}async *[i](){let e=this.#a,t=0;for(;;){let r=this.#o?Math.min(this.#n,this.#o-t):this.#n,n=await this.#i({limit:r,cursor:e});if(0===n.items.length||(yield n,t+=n.items.length,this.#o&&t>=this.#o||!n.nextCursor))return;e=n.nextCursor}}};function ul(e,t){return(0===e&&(e=void 0),0===t&&(t=void 0),void 0===e)?t:void 0===t?e:Math.min(e,t)}let uu={limit:i_().min(0).optional(),offset:i_().min(0).optional(),chunkSize:i_().positive().optional()};function uc(e,t){for(let[r,n]of Object.entries(t??{}))if(void 0!==n){if(Array.isArray(n)){e.searchParams.set(r,n.join(","));continue}e.searchParams.set(r,String(n))}return e}let up=n2().nonempty().refine(e=>"."!==e&&".."!==e,{error:"URL path must not contain dot segments"});function ud(e){return encodeURIComponent(lV(e,up))}function uf(e){return Array.isArray(e)?e.map(ud).join("/"):e}async function uh(e,t){return new Promise(r=>{if(t?.aborted)return void r();let n=()=>{clearTimeout(i),r()},i=setTimeout(()=>{t?.removeEventListener("abort",n),r()},e);t?.addEventListener("abort",n,{once:!0})})}let um="toBSON",ug="toString",uy="_bsontype";RegExp(`(.|^$|^${um}$|^${uy}|^${ug}$)`),RegExp(".","g"),RegExp("^$"),RegExp(`^${um}$`),RegExp(`^${ug}$`),RegExp(`^${uy}$`),RegExp("^(anonymous|page-not-found|docs|terms-of-use|about|pricing|privacy-policy|customers|request-form|request-solution|release-notes|jobs|api-reference|video-tutorials|acts|key-value-stores|schedules|account|sign-up|sign-in-discourse|admin|documentation|change-password|enroll-account|forgot-password|reset-password|sign-in|verify-email|live-status|browser-info|webhooks|health-check|api|change-log|dashboard|community|crawlers|ext|schemas|admin|administration|crawler|act|library|lib|apifier|team|contact|doc|documentation|for-business|for-developers|developers|business|integrations|job|setting|settings|privacy|policy|assets|help|config|configuration|terms|hiring|hire|status|status-page|solutions|support|market|marketplace|download|downloads|username|users|user|login|logout|signin|sign|signup|sign-out|signout|plugins|plug-ins|reset|password|passwords|square|profile-photos|profiles|true|false|js|css|img|images|image|partials|fonts|font|dynamic_templates|app|schedules|community|storage|storages|account|node_modules|bower_components|video|knowledgebase|forum|customers|blog|health-check|health|anim|forum_topics.json|forum_categories.json|me|you|him|she|it|external|actor|crawler|scheduler|api|sdk|puppeteer|webdriver|selenium|(selenium.*webdriver)|undefined|page-analyzer|wp-login.php|welcome.action|echo|proxy|super-proxy|gdpr|case-studies|use-cases|how-to|kb|cookies|cookie-policy|cookies-policy|powered-by|run|runs|actor|actors|act|acts|success-stories|roadmap|join-marketplace|presskit|press-kit|covid-19|covid|covid19|matfyz|ideas|public-actors|resources|partners|affiliate|industries|web-scraping|custom-solutions|solution-provider|alternatives|platform|freelancers|freelancer|partner|preview|templates|data-for-generative-ai|discord|praguecrawl|prague-crawl|bob|ai-agents|reel|video-reel|mcp|mcpc|model-context-protocol|modelcontextprotocol|apify.com|design-kit|press-kit|scrapers|professional-services|challenge|challange|1m-challenge|1m-usd-challenge|contact-sales|creator|creators|creator-plan|request-an-integration|whitepaper|adviser|crawlee|ultimate-scraper|agent-skills|key-value-store|request-queue|request-queues|build|builds|dataset|datasets|schedule|standby|pay-per-event|pay-per-result|pay-per-usage|ppe|ppr|compute-unit|compute-units|agent|agents|agentic|llms|llm|openai|anthropic|claude|copilot|mistral|gemini|llama|chatbot|chatgpt|prompt|prompts|embeddings|vectors|rag|agentic-commerce|agentic-economy|agentic-payments|a2a|a2b|a2p|ap2|b2a|acp|ucp|mpp|x402|l402|anp|agp|erc-8004|kya|kyapay|official|verified|certified|authorized|partner-official|gold-partner|premium-partner|staff|moderator|apify-admin|console|cli|studio|gateway|workbench|agents-marketplace|agents-store|mcp-server|mcp-servers|mcp-gateway|asia|latam|emea|apac|i18n|l10n|localization|localisation|usd|eur|gbp|jpy|cny|usdc|usdt|btc|eth|sol|crypto|fiat|stablecoin|stablecoins|payment|payments|payout|payouts|invoice|invoices|wallet|soc|soc2|iso|iso-27001|hipaa|ccpa|pci|pci-dss|dpa|dpia|dmca|sla|eula|aml|kyc|contributor|contributors|maintainer|maintainers|core-team|oss|open-source|opensource|open-source-software|spam|scam|phishing|malware|hack|hacked|giveaway|airdrop|bitcoin-giveaway|free-credits|free-money|launch|launches|webinar|webinars|meetup|meetups|summit|conference|conferences|org|orgs|organisation|workspace|workspaces|tenant|tenants|role|roles|permission|permissions|saml|scim|token|tokens|apikey|api-key|api-keys|keys|secret|secrets|coupon|coupons|discount|discounts|promos|refund|refunds|credit|credits|billing-portal|production|prod|canary|internal|restricted|conversations|reactions|mentions|channel|channels|inbox|no-reply|noreply|accessibility|imprint|impressum|trust|trust-center|security-center|brand|branding|support-team|abuse|outage|incident|incidents|what-is-new|whatsnew|index|index\\.html|(favicon\\.[a-z]+)|BingSiteAuth.xml|(google.+\\.html)|robots\\.txt|(sitemap\\.[a-z]+)|(apple-touch-icon.*)|security-whitepaper\\.pdf|security\\.txt|llms\\.txt|llms-full\\.txt|(.*\\.md)|(\\..*)|(xxx-.*)|((.+[^a-z]|)porn([^a-z].+|))|((.+[^a-z]|)vagina([^a-z].+|))|((.+[^a-z]|)dildo([^a-z].+|))|((.+[^a-z]|)nsfw([^a-z].+|))|((.+[^a-z]|)hentai([^a-z].+|))|((.+[^a-z]|)cunt([^a-z].+|))|((.+[^a-z]|)fuck([^a-z].+|))|((.+[^a-z]|)shit([^a-z].+|))|((.+[^a-z]|)bitch([^a-z].+|))|((.+[^a-z]|)slut([^a-z].+|))|((.+[^a-z]|)whore([^a-z].+|))|((.+[^a-z]|)boob([^a-z].+|))|((.+[^a-z]|)tits([^a-z].+|))|((.+[^a-z]|)cock([^a-z].+|))|((.+[^a-z]|)anus([^a-z].+|))|((.+[^a-z]|)pussy([^a-z].+|))|((.+[^a-z]|)nude([^a-z].+|))|((.+[^a-z]|)penis([^a-z].+|))|((.+[^a-z]|)naked([^a-z].+|))|(install-cli\\..*)|([^0-9a-z].*)|(.*[^0-9a-z])|(.*[_.\\-]{2}.*)|0|about|access|account|accounts|activate|activities|activity|ad|add|address|adm|admin|administration|administrator|ads|adult|advertising|affiliate|affiliates|ajax|all|alpha|analysis|analytics|android|anon|anonymous|api|app|apps|archive|archives|article|asct|asset|atom|auth|authentication|avatar|backup|balancer-manager|banner|banners|beta|billing|bin|blog|blogs|board|book|bookmark|bot|bots|bug|business|cache|cadastro|calendar|call|campaign|cancel|captcha|career|careers|cart|categories|category|cgi|cgi-bin|changelog|chat|check|checking|checkout|client|cliente|clients|code|codereview|comercial|comment|comments|communities|community|company|compare|compras|config|configuration|connect|contact|contact-us|contact_us|contactus|contest|contribute|corp|create|css|dashboard|data|db|default|delete|demo|design|designer|destroy|dev|devel|developer|developers|diagram|diary|dict|dictionary|die|dir|direct_messages|directory|dist|doc|docs|documentation|domain|download|downloads|ecommerce|edit|editor|edu|education|email|employment|empty|end|enterprise|entries|entry|error|errors|eval|event|events|exit|explore|facebook|faq|favorite|favorites|feature|features|feed|feedback|feeds|file|files|first|flash|fleet|fleets|flog|follow|followers|following|forgot|form|forum|forums|founder|free|friend|friends|ftp|gadget|gadgets|game|games|get|gift|gifts|gist|github|graph|group|groups|guest|guests|help|home|homepage|host|hosting|hostmaster|hostname|howto|hpg|html|http|httpd|https|i|iamges|icon|icons|id|idea|ideas|image|images|imap|img|index|indice|info|information|inquiry|instagram|intranet|invitations|invite|ipad|iphone|irc|is|issue|issues|it|item|items|java|javascript|job|jobs|join|js|json|jump|knowledgebase|language|languages|last|ldap-status|legal|license|link|links|linux|list|lists|log|log-in|log-out|log_in|log_out|login|logout|logs|m|mac|mail|mail1|mail2|mail3|mail4|mail5|mailer|mailing|maintenance|manager|manual|map|maps|marketing|master|me|media|member|members|message|messages|messenger|microblog|microblogs|mine|mis|mob|mobile|movie|movies|mp3|msg|msn|music|musicas|mx|my|mysql|name|named|nan|navi|navigation|net|network|new|news|newsletter|nick|nickname|notes|noticias|notification|notifications|notify|ns|ns1|ns10|ns2|ns3|ns4|ns5|ns6|ns7|ns8|ns9|null|oauth|oauth_clients|offer|offers|official|old|online|openid|operator|order|orders|organization|organizations|overview|owner|owners|page|pager|pages|panel|password|payment|perl|phone|photo|photoalbum|photos|php|phpmyadmin|phppgadmin|phpredisadmin|pic|pics|ping|plan|plans|plugin|plugins|policy|pop|pop3|popular|portal|post|postfix|postmaster|posts|pr|premium|press|price|pricing|privacy|privacy-policy|privacy_policy|privacypolicy|private|product|products|profile|project|projects|promo|pub|public|purpose|put|python|query|random|ranking|read|readme|recent|recruit|recruitment|register|registration|release|remove|replies|report|reports|repositories|repository|req|request|requests|reset|roc|root|rss|ruby|rule|sag|sale|sales|sample|samples|save|school|script|scripts|search|secure|security|self|send|server|server-info|server-status|service|services|session|sessions|setting|settings|setup|share|shop|show|sign-in|sign-up|sign_in|sign_up|signin|signout|signup|site|sitemap|sites|smartphone|smtp|soporte|source|spec|special|sql|src|ssh|ssl|ssladmin|ssladministrator|sslwebmaster|staff|stage|staging|start|stat|state|static|stats|status|store|stores|stories|style|styleguide|stylesheet|stylesheets|subdomain|subscribe|subscription|subscriptions|suporte|support|svn|swf|sys|sysadmin|sysadministrator|system|tablet|tablets|tag|talk|task|tasks|team|teams|tech|telnet|term|terms|terms-of-service|terms_of_service|termsofservice|test|test1|test2|test3|teste|testing|tests|theme|themes|thread|threads|tmp|todo|tool|tools|top|topic|topics|tos|tour|translations|trends|tutorial|tux|tv|twitter|undef|unfollow|unsubscribe|update|upload|uploads|url|usage|user|username|users|usuario|vendas|ver|version|video|videos|visitor|watch|weather|web|webhook|webhooks|webmail|webmaster|website|websites|welcome|widget|widgets|wiki|win|windows|word|work|works|workshop|ww|wws|www|www1|www2|www3|www4|www5|www6|www7|wwws|wwww|xfn|xml|xmpp|xpg|xxx|yaml|year|yml|you|yourdomain|yourname|yoursite|yourusername)$","i"),(O=z||(z={})).MONGODB_PING="MONGODB_PING",O.MONGODB_READ="MONGODB_READ",O.MONGODB_WRITE="MONGODB_WRITE",O.REDIS="REDIS",O.REDIS_PING="REDIS_PING",O.REDIS_WRITE="REDIS_WRITE",r("c");var ub=r("d").Buffer;r("d").Buffer,r("d").Buffer,(R=j||(j={})).VERSION="v",R.USER="u";let uv="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),uw=globalThis.crypto?.subtle;async function u_(e,t){if(!uw)throw Error(`SubtleCrypto is not available in this environment.
|
|
64
64
|
Please ensure you're running in an environment that supports Web Crypto API,
|
|
65
|
-
or submit an issue to https://github.com/apify/apify-shared-js so we can help you further.`);let r=new TextEncoder,n=await uw.importKey("raw",r.encode(e),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),i=Array.from(new Uint8Array(await uw.sign("HMAC",n,r.encode(t)))).map(e=>e.toString(16).padStart(2,"0")).join("").substring(0,30);var o=BigInt(`0x${i}`);if(0n===o)return uv[0];let a="";for(;o>0n;)a=uv[Number(o%62n)]+a,o/=62n;return a}async function uE({resourceId:e,urlSigningSecretKey:t,expiresInMillis:r,version:n=0}){let i=r?new Date().getTime()+r:0,o=await u_(t,`${n}.${i}.${e}`);var a=new TextEncoder().encode(`${n}.${i}.${o}`);let s="";for(let e=0;e<a.length;e++)s+=String.fromCharCode(a[e]);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}r("d").Buffer;let uS=new Uint8Array(256);uS[9]|=2,uS[32]|=2,uS[59]|=4,uS[44]|=8;for(let e=128;e<=255;e++)uS[e]|=1;for(let e of"!#$%&'*+-.^_`|~")uS[e.charCodeAt(0)]|=16;for(let e=48;e<=57;e++)uS[e]|=16;for(let e=65;e<=90;e++)uS[e]|=17;for(let e=97;e<=122;e++)uS[e]|=16;let uO=((g=function(){}).prototype=Object.create(null),g),uR="application/json",uT=[RegExp(`^${uR}`,"i"),/^application\/.*xml$/i,/^text\//i],uA=i7(e=>"object"==typeof e&&null!==e&&"string"==typeof e.contentEncoding&&"function"==typeof e.compress,{error:"Invalid input: expected an HttpCompressor"}),ux=iz({quality:iS().min(0).max(11).default(6)});let uC=class BrotliHttpCompressor{contentEncoding="br";#s;constructor(e={}){let{quality:t}=lV(e,ux,"BrotliHttpCompressorOptions");this.#s=t}async compress(e){return lC.compress(e,{algorithm:"br",quality:this.#s})}};let uk=iz({quality:iS().min(1).max(9).default(6)});let uP=class GzipHttpCompressor{contentEncoding="gzip";#s;constructor(e={}){let{quality:t}=lV(e,uk,"GzipHttpCompressorOptions");this.#s=t}async compress(e){return lC.compress(e,{algorithm:"gzip",quality:this.#s})}};let uU=iz({quality:iS().min(1).max(19).default(3)});let uI=class ZstdHttpCompressor{contentEncoding="zstd";#s;constructor(e={}){let{quality:t}=lV(e,uU,"ZstdHttpCompressorOptions");this.#s=t}async compress(e){return lC.compress(e,{algorithm:"zstd",quality:this.#s})}};let uN=i$([iK(["brotli","gzip","zstd"]),uA]);function uL(e){if("string"!=typeof e)return e;switch(e){case"gzip":return new uP;case"brotli":return new uC;case"zstd":return new uI}}let uz=class InvalidResponseBodyError extends
|
|
65
|
+
or submit an issue to https://github.com/apify/apify-shared-js so we can help you further.`);let r=new TextEncoder,n=await uw.importKey("raw",r.encode(e),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),i=Array.from(new Uint8Array(await uw.sign("HMAC",n,r.encode(t)))).map(e=>e.toString(16).padStart(2,"0")).join("").substring(0,30);var o=BigInt(`0x${i}`);if(0n===o)return uv[0];let a="";for(;o>0n;)a=uv[Number(o%62n)]+a,o/=62n;return a}async function uE({resourceId:e,urlSigningSecretKey:t,expiresInMillis:r,version:n=0}){let i=r?new Date().getTime()+r:0,o=await u_(t,`${n}.${i}.${e}`);var a=new TextEncoder().encode(`${n}.${i}.${o}`);let s="";for(let e=0;e<a.length;e++)s+=String.fromCharCode(a[e]);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}r("d").Buffer;let uS=new Uint8Array(256);uS[9]|=2,uS[32]|=2,uS[59]|=4,uS[44]|=8;for(let e=128;e<=255;e++)uS[e]|=1;for(let e of"!#$%&'*+-.^_`|~")uS[e.charCodeAt(0)]|=16;for(let e=48;e<=57;e++)uS[e]|=16;for(let e=65;e<=90;e++)uS[e]|=17;for(let e=97;e<=122;e++)uS[e]|=16;let uO=((g=function(){}).prototype=Object.create(null),g),uR="application/json",uT=[RegExp(`^${uR}`,"i"),/^application\/.*xml$/i,/^text\//i],uA=i7(e=>"object"==typeof e&&null!==e&&"string"==typeof e.contentEncoding&&"function"==typeof e.compress,{error:"Invalid input: expected an HttpCompressor"}),ux=iz({quality:iS().min(0).max(11).default(6)});let uC=class BrotliHttpCompressor{contentEncoding="br";#s;constructor(e={}){let{quality:t}=lV(e,ux,"BrotliHttpCompressorOptions");this.#s=t}async compress(e){return lC.compress(e,{algorithm:"br",quality:this.#s})}};let uk=iz({quality:iS().min(1).max(9).default(6)});let uP=class GzipHttpCompressor{contentEncoding="gzip";#s;constructor(e={}){let{quality:t}=lV(e,uk,"GzipHttpCompressorOptions");this.#s=t}async compress(e){return lC.compress(e,{algorithm:"gzip",quality:this.#s})}};let uU=iz({quality:iS().min(1).max(19).default(3)});let uI=class ZstdHttpCompressor{contentEncoding="zstd";#s;constructor(e={}){let{quality:t}=lV(e,uU,"ZstdHttpCompressorOptions");this.#s=t}async compress(e){return lC.compress(e,{algorithm:"zstd",quality:this.#s})}};let uN=i$([iK(["brotli","gzip","zstd"]),uA]);function uL(e){if("string"!=typeof e)return e;switch(e){case"gzip":return new uP;case"brotli":return new uC;case"zstd":return new uI}}let uz=class InvalidResponseBodyError extends lk{code;response;constructor(e,t){super(`Response body could not be parsed.
|
|
66
66
|
Cause:${t.message}`),this.name=this.constructor.name,this.code="invalid-response-body",this.response=e,this.cause=t}};let uj=i_().gt(0);let uD=class Statistics{calls=0;requests=0;rateLimitErrors=[];addRateLimitError(e){lV(e,uj);let t=e-1;this.#l(t),this.rateLimitErrors[t]++}#l(e){if(this.rateLimitErrors.length<=e)for(let t=0;t<=e;t++)"number"!=typeof this.rateLimitErrors[t]&&(this.rateLimitErrors[t]=0)}};let u$=i$([iK(["short","medium","long","noTimeout"]),i_().positive()]).optional(),uM=ot(AbortSignal).optional(),uB={timeoutSecs:u$,signal:uM},uF=iz(uB);var uq=r("d").Buffer;let uW="application/json",uZ="application/x-www-form-urlencoded",uK={maxRetries:i_().int().nonnegative(),minDelayBetweenRetriesMillis:i_().nonnegative(),timeoutShortSecs:i_().positive(),timeoutMediumSecs:i_().positive(),timeoutLongSecs:i_().positive(),timeoutMaxSecs:i_().positive()},uH=ij(uK).partial(),uV=new Set(["FormData","ReadableStream"]);let uG=class HttpClient{stats;logger;maxRetries;minDelayBetweenRetriesMillis;timeoutMillis;timeoutMaxMillis;httpCompressor;defaultHeaders;constructor(e={}){lV(e,uH,"HttpClientOptions"),this.stats=e.stats??new uD,this.logger=e.logger??oj.child({prefix:"ApifyClient"}),this.maxRetries=e.maxRetries??8,this.minDelayBetweenRetriesMillis=e.minDelayBetweenRetriesMillis??500,this.timeoutMillis={short:(e.timeoutShortSecs??5)*1e3,medium:(e.timeoutMediumSecs??30)*1e3,long:(e.timeoutLongSecs??360)*1e3},this.timeoutMaxMillis=(e.timeoutMaxSecs??360)*1e3,this.httpCompressor=uL(e.compression??"brotli");let t={},r=e.workflowKey||ur("APIFY_WORKFLOW_KEY");if(r&&(t["X-Apify-Workflow-Key"]=r),lC.platform){var n;let r=!!ur("APIFY_IS_AT_HOME"),i=`ApifyClient/${lQ} (${lC.platform}); isAtHome/${r}`;e.userAgentSuffix&&(i+=`; ${(Array.isArray(n=e.userAgentSuffix)?n:[n]).join("; ")}`),t["User-Agent"]=i}e.token&&(t.Authorization=`Bearer ${e.token}`),this.defaultHeaders=uY(t,e.headers)}setDefaultAuthorization(e){void 0===uJ(this.defaultHeaders,"authorization")&&(this.defaultHeaders.Authorization=`Bearer ${e}`)}isTimeoutError(e){return e instanceof Error&&"TimeoutError"===e.name}isRetryableTransportError(e){return!1}async close(){}async sendRequest(e){throw Error(`Implement sendRequest() to send ${e.method} ${e.url}, or override call() entirely.`)}async call(e){e.signal?.throwIfAborted(),this.stats.calls++;let{headers:t,body:r}=await this.prepareRequest(e),n=this.buildUrl(e.url,e.params);return this.#u(async(i,o)=>this.#c({config:e,url:n,headers:t,body:r,attempt:o,stopRetrying:i}),e.signal)}async prepareRequest(e){let t=uY(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Authorization",r=uJ(e,"authorization");if("Authorization"===t||void 0===r)return e;let n={...e};return uX(n,"authorization"),uY(n,{[t]:r})}(this.defaultHeaders,e.authorizationHeader),e.headers),r=function(e,t,r){if(null!=e){if(ua(e))return e;if(ui(e))return void 0===uJ(t,"content-type")&&e.type&&(t["Content-Type"]=e.type),e;if(un(e))return!lC.isNode||uq.isBuffer(e)?e:ArrayBuffer.isView(e)?uq.from(e.buffer,e.byteOffset,e.byteLength):uq.from(e);if("string"==typeof e)return e;if("object"==typeof e){var n,i;if(e instanceof URLSearchParams)return void 0===uJ(t,"content-type")&&(t["Content-Type"]=`${uZ};charset=utf-8`),e.toString();let o=(n=e,Object.prototype.toString.call(n).slice(8,-1));if(uV.has(o))throw TypeError(`Unsupported request body type: ${o}`);void 0===uJ(t,"content-type")&&(t["Content-Type"]=uW);let a=uJ(t,"content-type");if(uQ(a)===uZ){let t,r;return i=e,t=new URLSearchParams,r=(e,n)=>{if(null!=n)if(n instanceof Date)t.append(e,n.toISOString());else if(un(n)){var i;t.append(e,(ArrayBuffer.isView(i=n)?uq.from(i.buffer,i.byteOffset,i.byteLength):uq.from(i)).toString("base64"))}else if(Array.isArray(n)){let t=n.some(u1);n.forEach((n,i)=>r(t?`${e}[${i}]`:`${e}[]`,n))}else"object"==typeof n?Object.entries(n).forEach(t=>{let[n,i]=t;return r(`${e}[${n}]`,i)}):t.append(e,String(n))},Object.entries(i).forEach(e=>{let[t,n]=e;return r(t,n)}),t.toString()}return JSON.stringify(e,r&&uQ(a)===uW?u0:void 0)}throw TypeError(`Unsupported request body type: ${typeof e}`)}}(e.data,t,e.stringifyFunctions),n=e.compression??this.httpCompressor,i=n&&function(e,t){if(void 0===e||!lC.isNode||void 0!==uJ(t,"content-encoding")||!function(e){if(!e)return!0;let t=e.split(";",1)[0].trim().toLowerCase();return!!(l2.has(t)||l4.some(e=>t.endsWith(e)))||!l1.has(t)&&!l0.some(e=>t.startsWith(e))}(uJ(t,"content-type")))return;let r="string"==typeof e?lX.encode(e):un(e)?ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e):void 0;return r&&r.byteLength>=1024?r:void 0}(r,t);return i&&(r=await n.compress(uq.from(i.buffer,i.byteOffset,i.byteLength)),uX(t=uY(t,{"Content-Encoding":n.contentEncoding}),"content-length")),ui(r)&&lC.isNode&&(t=uY(t,{"Content-Length":String(r.size)})),{headers:t,body:r}}buildUrl(e,t){let r=[];for(let[e,n]of Object.entries(t??{}))void 0!==n&&(n instanceof Date?r.push([e,n.toISOString()]):"boolean"==typeof n?r.push([e,String(Number(n))]):r.push([e,String(n)]));if(0===r.length)return e;let n=new URLSearchParams(r).toString();return`${e}${e.includes("?")?"&":"?"}${n}`}computeTimeoutMillis(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"medium";if("noTimeout"===t)return;let r="number"==typeof t?1e3*t:this.timeoutMillis[t];return r>this.timeoutMaxMillis&&this.logger.warningOnce(`The requested timeout of ${r/1e3}s exceeds timeoutMaxSecs (${this.timeoutMaxMillis/1e3}s) and is capped at it. Raise timeoutMaxSecs on the client to allow longer request timeouts.`),Math.min(r*2**(e-1),this.timeoutMaxMillis)}async #u(e,t){let r=!0,n=()=>{r=!1};for(let i=1;i<=this.maxRetries;i++){t?.throwIfAborted();try{return await e(n,i)}catch(e){if(t?.throwIfAborted(),!r)throw e;this.#p(e,i)}let o=this.minDelayBetweenRetriesMillis*2**(i-1)*(1+Math.random());await uh(o,t)}return t?.throwIfAborted(),e(n,this.maxRetries+1)}async #c(e){let t,r,n,{config:i,url:o,headers:a,body:s,attempt:l,stopRetrying:u}=e;this.stats.requests++;let c=ua(i.data),p=ui(s)?lC.openBlobBody(s,e=>{t={error:e}}):s;try{r=await this.sendRequest({method:i.method,url:o,headers:a,body:p,timeoutMillis:this.computeTimeoutMillis(l,i.timeoutSecs),stream:"stream"===i.responseType,followRedirects:i.followRedirects??!0,signal:i.signal})}catch(e){if(i.signal?.throwIfAborted(),t)throw u(),function(e,t){if(!(e instanceof Error)||void 0!==e.cause)return e;let r=new Set;for(let n=t;n instanceof Error&&!r.has(n);n=n.cause){if(n===e)return e;r.add(n)}return e.cause=t,e}(t.error,e);throw this.#d(e,i,u),e}finally{p!==s&&ua(p)&&p.destroy()}let d=r.status>=300,f=d&&this.#f(r.status,i.retryStatusCodes),h=d&&!1===i.throwOnErrorStatus&&(!f||c||l>this.maxRetries);d&&!h&&ua(r.body)&&(r.body=await (async function(e){return new Promise((t,r)=>{let n=[];e.on("data",e=>{n.push(e)}).on("error",e=>r(e)).on("end",()=>t(ub.concat(n)))})})(r.body).catch(()=>void 0));try{n=this.#h(r,i)}catch(e){if(!d)throw u(),e;n=r.body}let m={status:r.status,headers:r.headers,data:n,config:i};if(!d||(429===r.status&&!1!==i.throwOnErrorStatus&&this.stats.addRateLimitError(l),h))return m;let g=lI.fromResponse(m,l);throw f?c&&(this.#m(),u()):u(),g}#h(e,t){let{body:r}=e;if("stream"===t.responseType||"buffer"===t.responseType||void 0===r||ua(r))return r;if(0!==r.byteLength)try{var n;return function(e,t){var r;let n,i;try{let e=function(e){let t=e.length,r=0;for(;(2&uS[e.charCodeAt(r)])!=0;)r++;let n=r,i=0,o=-1,a=0;for(;n<t;){let t=e.charCodeAt(n),r=uS[t];if((4&r)!=0){a|=8&r;break}(2&r)!=0?-1===o&&(o=n):o=-1,i|=65280&t|r,n++}let s=-1===o?n:o,l=e.slice(r,s),u=(65281&i)==0?l:l.toLowerCase();return n===t||0!==a?{type:u,index:n,parameters:new uO}:function(e,t,r,n){let i=new uO;e:for(;r<n;){for(r++;(2&uS[e.charCodeAt(r)])!=0;)r++;let t=r,o=0,a=-1;for(;r<n;){let s=e.charCodeAt(r),l=uS[s];if((4&l)!=0){if((8&l)!=0)break e;continue e}if(61===s){let s=-1===a?r:a,l=e.slice(t,s),u=(65281&o)==0?l:l.toLowerCase();for(r++;(2&uS[e.charCodeAt(r)])!=0;)r++;if(r<n&&34===e.charCodeAt(r)){let t=++r,o=!1;for(;r<n;){let a=e.charCodeAt(r);if(34===a){void 0===i[u]&&(i[u]=o?function(e,t,r){let n="";for(let i=t;i<r;i++)92===e.charCodeAt(i)&&(n+=e.slice(t,i),t=++i);return n+e.slice(t,r)}(e,t,r):e.slice(t,r)),r++;let a=0;for(;r<n;){let t=uS[e.charCodeAt(r)];if((4&t)!=0){a=8&t;break}r++}if(0!==a)break e;continue e}if(92===a&&r+1<n){o=!0,r+=2;continue}r++}continue e}let c=r,p=0,d=-1;for(;r<n;){let t=uS[e.charCodeAt(r)];if((4&t)!=0){p=8&t;break}(2&t)!=0?-1===d&&(d=r):d=-1,r++}if(void 0===i[u]){let t=-1===d?r:d;i[u]=e.slice(c,t)}if(0!==p)break e;continue e}(2&l)!=0?-1===a&&(a=r):a=-1,o|=65280&s|l,r++}}return{type:t,index:r,parameters:i}}(e,u,n,t)}(t);n=e.type,i=e.parameters.charset}catch{return e}if(!((r=n)&&uT.some(e=>e.test(r))))return e;let o=function(e){try{return new TextDecoder(e,{ignoreBOM:!0})}catch{return}}(i);if(!o)return e;let a=o.decode(e);return n===uR?JSON.parse(a):a}(r,(n=e.headers["content-type"],(Array.isArray(n)?n[0]:n)??""))}catch(t){throw new uz(e,t)}}#d(e,t,r){t.doNotRetryTimeouts&&this.isTimeoutError(e)||!1===t.retryTransportErrors||!this.isRetryableTransportError(e)?r():ua(t.data)&&(this.#m(),r())}#f(e,t){return t?t.includes(e):429===e||e>=500}#m(){this.logger.warningOnce("Request body was a stream - retrying will not work, as part of it was already consumed."),this.logger.warningOnce("If you want Apify client to handle retries for you, collect the stream into a buffer before sending it.")}#p(e,t){t===Math.round(this.maxRetries/2)&&this.logger.warning(`API request failed ${t} times. Max attempts: ${this.maxRetries+1}.
|
|
67
|
-
Cause:${e.stack}`)}};function uJ(e,t){let r=t.toLowerCase(),n=Object.keys(e).find(e=>e.toLowerCase()===r);return void 0===n?void 0:e[n]}function uY(e,t){let r={...e};for(let[e,n]of Object.entries(t??{})){for(let t of Object.keys(r))t.toLowerCase()===e.toLowerCase()&&delete r[t];r[e]=n}return r}function uX(e,t){let r=t.toLowerCase();for(let t of Object.keys(e))t.toLowerCase()===r&&delete e[t]}function uQ(e){return e?.split(";",1)[0].trim().toLowerCase()}function u0(e,t){return"function"==typeof t?t.toString():t}function u1(e){return!!Array.isArray(e)||"object"==typeof e&&null!==e&&!(e instanceof Date)&&!un(e)}let u2=class AxiosHttpClient extends uG{axios;httpAgent;httpsAgent;#g;constructor(e={}){for(let t of(super(e),this.axios=lp.create({proxy:!1,validateStatus:null,transformRequest:[],transformResponse:[],responseType:"arraybuffer",maxBodyLength:1/0,maxContentLength:-1}),this.axios.defaults.headers=new lS,e.requestInterceptors??[]))this.axios.interceptors.request.use(t)}isTimeoutError(e){return!!super.isTimeoutError(e)||lp.isAxiosError(e)&&(e.code===lf.ECONNABORTED||e.code===lf.ETIMEDOUT)}isRetryableTransportError(e){return!!lp.isAxiosError(e)&&"object"==typeof e.request&&null!==e.request&&null!=e.config}async close(){await this.#g?.catch(()=>{}),this.httpAgent?.destroy(),this.httpsAgent?.destroy()}async sendRequest(e){await this.#y();let{method:t,url:r,headers:n,body:i,timeoutMillis:o,stream:a,followRedirects:s,signal:l}=e,u=await this.axios.request({method:t,url:r,headers:n,data:i,timeout:o??0,signal:l,responseType:a?"stream":"arraybuffer",...ua(i)||!s?{maxRedirects:0}:{}});return{status:u.status,headers:lS.from(u.headers).toJSON(),body:u.data}}async #y(){return this.#g??=this.#b(),this.#g}async #b(){let e=await lC.createHttpAgents({timeoutMillis:this.timeoutMaxMillis});e&&(this.httpAgent=e.httpAgent,this.httpsAgent=e.httpsAgent,this.axios.defaults.httpAgent=this.httpAgent,this.axios.defaults.httpsAgent=this.httpsAgent)}};let u4=class ApiClient{id;safeId;baseUrl;publicBaseUrl;resourcePath;url;apifyClient;httpClient;params;constructor(e){let{baseUrl:t,publicBaseUrl:r,apifyClient:n,httpClient:i,resourcePath:o,id:a,params:s={}}=e;this.id=a,this.safeId=a&&this.toSafeId(a),this.baseUrl=t,this.publicBaseUrl=r,this.resourcePath=o,this.url=a?`${t}/${o}/${ud(this.safeId)}`:`${t}/${o}`,this.apifyClient=n,this.httpClient=i,this.params=s}subResourceOptions(e){return{...{baseUrl:this.buildUrl(),publicBaseUrl:this.publicBaseUrl,apifyClient:this.apifyClient,httpClient:this.httpClient,params:this.buildParams()},...e}}buildUrl(e){return e?`${this.url}/${uf(e)}`:this.url}buildPublicUrl(e){let t=this.id?`${this.publicBaseUrl}/${this.resourcePath}/${ud(this.safeId)}`:`${this.publicBaseUrl}/${this.resourcePath}`;return e?`${t}/${uf(e)}`:t}buildParams(e){return{...this.params,...e}}toSafeId(e){return e.replaceAll("/","~")}listPaginatedFromCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{chunkSize:r,...n}=t,i=ul(t.limit,r),o=e({...n,limit:i}),a=(e,t)=>{let r=Math.max(e.count??0,e.items.length);return t?Math.min(r,t):r};return Object.defineProperty(o,Symbol.asyncIterator,{value:async function*(){let s=await o;yield*s.items;let l=a(s,i),u=(t.offset??0)+l,c=t.limit?t.limit-l:void 0;for(;l>0&&(void 0===c||c>0);){let t=ul(c,r),i={...n,limit:t,offset:u};s=await e(i),yield*s.items,u+=l=a(s,t),void 0!==c&&(c-=l)}}})}};let u3=class ResourceClient extends u4{timeoutForWaitForFinish(e,t,r){if(void 0!==e)return e;if(void 0===r)return t;let n=Math.min(r,60);return n<=0?t:n+this.httpClient.timeoutMillis[t]/1e3}async getResource(e,t,r,n){let i={url:this.buildUrl(),method:"GET",params:this.buildParams(t),timeoutSecs:r,signal:n};try{let t=await this.httpClient.call(i);return l8(t,e)}catch(e){ue(e,this.id)}}async updateResource(e,t,r,n){return l8(await this.httpClient.call({url:this.buildUrl(),method:"PUT",params:this.buildParams(),data:t,timeoutSecs:r,signal:n}),e)}async deleteResource(e,t){try{await this.httpClient.call({url:this.buildUrl(),method:"DELETE",params:this.buildParams(),timeoutSecs:e,signal:t})}catch(e){ue(e,this.id)}}async waitForJobFinish(e){let t,r,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{waitSecs:o=999999,timeoutSecs:a="noTimeout",signal:s}=i,l=1e3*o,u=Date.now(),c=()=>{let e=Date.now();return!(e-u>=l)&&(void 0===r||!(e-r>=3e3))&&!(t&&oc.includes(t.status))};for(;;){let i=Math.max(0,Math.round((l-(Date.now()-u))/1e3)),o={url:this.buildUrl(),method:"GET",params:this.buildParams({waitForFinish:i}),timeoutSecs:a,signal:s};try{let n=await this.httpClient.call(o);t=l8(n,e),r=void 0}catch(e){l7(e),t=void 0,r??=Date.now(),n=e}if(!c())break;await uh(250,s),s?.throwIfAborted()}if(!t)throw n;return t}};function u9(e){return rZ(n3,e)}function u6(e){return new iP({type:"date",coerce:!0,...ea(e)})}function u5(e){let t;return()=>t??=e()}let u8=u5(()=>ij({total:iS().min(0),offset:iS().min(0),limit:iS().min(1),desc:iR(),count:iS().min(0)})),u7=u5(()=>ij({totalBuilds:iS().optional(),totalRuns:iS().optional(),totalUsers:iS().optional(),totalUsers7Days:iS().optional(),totalUsers30Days:iS().optional(),totalUsers90Days:iS().optional(),totalMetamorphs:iS().optional(),lastRunStartedAt:u9({offset:!0}).pipe(u6()).optional(),actorReviewCount:iS().optional(),actorReviewRating:i_().optional(),bookmarkCount:iS().optional(),publicActorRunStats30Days:ij({ABORTED:iS().optional(),FAILED:iS().optional(),SUCCEEDED:iS().optional(),"TIMED-OUT":iS().optional(),TOTAL:iS().optional()}).optional()})),ce=u5(()=>ij({id:n2(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),name:n2(),username:n2(),title:n2().optional(),stats:u7().nullable().optional()})),ct=u5(()=>u8().extend({items:iN(ce())})),cr=u5(()=>iK(["LIMITED_PERMISSIONS","FULL_PERMISSIONS"]).or(n2())),cn=u5(()=>iK(["BASE64","TEXT"]).or(n2())),ci=u5(()=>ij({format:cn().optional(),content:n2().optional(),name:n2()})),co=u5(()=>ij({name:n2(),folder:iR()})),ca=u5(()=>iN(i$([ci(),co()]))),cs=u5(()=>ij({build:n2().optional(),timeoutSecs:iS().optional(),memoryMbytes:iS().optional(),restartOnError:iR().nullable().optional(),maxItems:iS().nullable().optional(),maxTotalChargeUsd:i_().nullable().optional(),isMaxTotalChargeUsdSetByUser:iR().nullable().optional(),forcePermissionLevel:cr().nullable().optional()})),cl=u5(()=>ij({isEnabled:iR().nullable().optional(),desiredRequestsPerActorRun:iS().nullable().optional(),maxRequestsPerActorRun:iS().nullable().optional(),idleTimeoutSecs:iS().nullable().optional(),build:n2().nullable().optional(),memoryMbytes:iS().nullable().optional(),disableStandbyFieldsOverride:iR().nullable().optional(),shouldPassActorInput:iR().nullable().optional(),tenancy:iK(["SINGLE_TENANT","MULTI_TENANT"]).or(n2()).nullable().optional(),isConsoleAuthEnabled:iR().nullable().optional(),isTokenlessEnabled:iR().nullable().optional()})),cu=u5(()=>ij({body:n2().optional(),contentType:n2().optional()})),cc=u5(()=>iK(["SOURCE_FILES","GIT_REPO","TARBALL","GITHUB_GIST","SOURCE_CODE"]).or(n2())),cp=u5(()=>ij({name:n2(),value:n2().optional(),isSecret:iR().nullable().optional(),valueHash:n2().optional()})),cd=u5(()=>ij({versionNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/),sourceType:cc().nullable(),envVars:iN(cp()).nullable().optional(),applyEnvVarsToBuild:iR().nullable().optional(),buildTag:n2().nullable().optional(),sourceFiles:ca().optional(),gitRepoUrl:n2().nullable().optional(),tarballUrl:n2().nullable().optional(),gitHubGistUrl:n2().nullable().optional(),actorPath:n2().min(1).max(255).nullable().optional(),githubWebhookId:iS().nullable().optional(),gitlabWebhookId:iS().nullable().optional(),bitbucketWebhookId:n2().nullable().optional()})),cf=u5(()=>ij({apifyMarginPercentage:i_(),createdAt:u9({offset:!0}).pipe(u6()),startedAt:u9({offset:!0}).pipe(u6()),notifiedAboutFutureChangeAt:u9({offset:!0}).pipe(u6()).nullable().optional(),notifiedAboutChangeAt:u9({offset:!0}).pipe(u6()).nullable().optional(),notifiedAboutRentalToPpePriceChangeAt:u9({offset:!0}).pipe(u6()).nullable().optional(),reasonForChange:n2().nullable().optional(),isPriceChangeNotificationSuppressed:iR().optional(),forceContainsSignificantPriceChange:iR().optional()})),ch=u5(()=>ij({tieredEventPriceUsd:i_()})),cm=u5(()=>iW(n2(),ch())),cg=u5(()=>ij({eventTitle:n2(),eventDescription:n2(),eventPriceUsd:i_().optional(),eventTieredPricingUsd:cm().optional(),isPrimaryEvent:iR().optional(),isOneTimeEvent:iR().nullable().optional()})),cy=u5(()=>cf().extend({pricingModel:iV("PAY_PER_EVENT"),pricingPerEvent:ij({actorChargeEvents:iW(n2(),cg()).optional()}),minimalMaxTotalChargeUsd:i_().nullable().optional(),isPPEPlatformUsagePaidByUser:iR().nullable().optional()})),cb=u5(()=>ij({tieredPricePerUnitUsd:i_()})),cv=u5(()=>iW(n2(),cb())),cw=u5(()=>cf().extend({pricingModel:iV("PRICE_PER_DATASET_ITEM"),unitName:n2(),pricePerUnitUsd:i_().optional(),tieredPricing:cv().optional()})),c_=u5(()=>cf().extend({pricingModel:iV("FLAT_PRICE_PER_MONTH"),trialMinutes:iS(),pricePerUnitUsd:i_()})),cE=u5(()=>cf().extend({pricingModel:iV("FREE")})),cS=u5(()=>iB("pricingModel",[cy(),cw(),c_(),cE()])),cO=u5(()=>ij({buildId:n2().optional(),buildNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).nullable().optional(),buildNumberInt:iS().optional(),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional()})),cR=u5(()=>iW(n2(),cO().nullable())),cT=u5(()=>iK(["NONE","RESIDENTIAL_PROXY_REQUIRED","UNDER_MAINTENANCE"]).or(n2()).nullable()),cA=u5(()=>ij({id:n2(),userId:n2(),name:n2(),username:n2(),description:n2().nullable().optional(),restartOnError:iR().nullable().optional(),isPublic:iR(),actorPermissionLevel:cr().optional(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),stats:u7(),versions:iN(cd()),pricingInfos:iN(cS()).optional(),defaultRunOptions:cs(),exampleRunInput:cu().nullable().optional(),isDeprecated:iR().nullable().optional(),deploymentKey:n2().optional(),title:n2().nullable().optional(),taggedBuilds:cR().nullable().optional(),actorStandby:cl().nullable().optional(),readmeSummary:n2().optional(),seoTitle:n2().nullable().optional(),seoDescription:n2().nullable().optional(),pictureUrl:n2().nullable().optional(),standbyUrl:n2().nullable().optional(),notice:cT().optional(),categories:iN(n2()).optional(),isCritical:iR().optional(),isGeneric:iR().optional(),isSourceCodeHidden:iR().optional(),hasNoDataset:iR().optional()})),cx=u5(()=>ij({total:iS(),items:iN(cd())})),cC=u5(()=>ij({total:iS(),items:iN(cp())})),ck=u5(()=>iK(["ACTOR.BUILD.ABORTED","ACTOR.BUILD.CREATED","ACTOR.BUILD.FAILED","ACTOR.BUILD.SUCCEEDED","ACTOR.BUILD.TIMED_OUT","ACTOR.RUN.ABORTED","ACTOR.RUN.CREATED","ACTOR.RUN.FAILED","ACTOR.RUN.RESURRECTED","ACTOR.RUN.SUCCEEDED","ACTOR.RUN.TIMED_OUT","TEST"]).or(n2())),cP=u5(()=>ij({actorId:n2().nullable().optional(),actorTaskId:n2().nullable().optional(),actorRunId:n2().nullable().optional()})),cU=u5(()=>ij({userIntegrationId:n2().optional(),channelId:n2().optional(),messageTemplate:n2().optional()})),cI=u5(()=>ij({fields:iN(n2()).optional(),omit:iN(n2()).optional()})),cN=u5(()=>ij({userIntegrationId:n2().optional(),emailTo:iN(n2()).optional(),subject:n2().optional(),body:n2().optional(),attachmentFormat:n2().optional(),attachmentTransformation:cI().optional()})),cL=u5(()=>ij({userIntegrationId:n2().optional(),filename:n2().optional(),format:n2().nullable().optional(),transformation:cI().optional()})),cz=u5(()=>ij({userIntegrationId:n2().optional(),repository:n2().optional(),title:n2().optional(),body:n2().optional()})),cj=u5(()=>iK(["ACTIVE","SUCCEEDED","FAILED"]).or(n2())),cD=u5(()=>ij({status:cj(),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),removedAt:u9({offset:!0}).pipe(u6()).nullable().optional()})),c$=u5(()=>ij({totalDispatches:iS().optional()})),cM=u5(()=>ij({id:n2(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),userId:n2(),isAdHoc:iR().nullable().optional(),isEnabled:iR().optional(),actionType:n2().optional(),isApifyIntegration:iR().nullable().optional(),shouldInterpolateStrings:iR().nullable().optional(),eventTypes:iN(ck()),condition:cP(),ignoreSslErrors:iR(),doNotRetry:iR().nullable().optional(),requestUrl:ir({normalize:!0}).nullable().optional(),payloadTemplate:n2().nullable().optional(),headersTemplate:n2().nullable().optional(),title:n2().nullable().optional(),description:n2().nullable().optional(),slackMessage:cU().optional(),googleMail:cN().optional(),googleDrive:cL().optional(),githubIssue:cz().optional(),lastDispatch:cD().nullable().optional(),stats:c$().nullable().optional()})),cB=u5(()=>iK(["READY","RUNNING","SUCCEEDED","FAILED","TIMING-OUT","TIMED-OUT","ABORTING","ABORTED"]).or(n2())),cF=u5(()=>iK(["DEVELOPMENT","WEB","API","SCHEDULER","TEST","WEBHOOK","ACTOR","CLI","CI","STANDBY","MCP"]).or(n2())),cq=u5(()=>ij({origin:cF(),clientIp:n2().optional(),userAgent:n2().optional(),githubActionsRunUrl:n2().optional(),actorRunId:n2().optional(),webhookDispatchId:n2().optional()})),cW=u5(()=>ij({id:n2(),actId:n2().optional(),userId:n2().optional(),status:cB(),startedAt:u9({offset:!0}).pipe(u6()),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),usageTotalUsd:i_().optional(),buildNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),buildNumberInt:iS().optional(),meta:cq().optional()})),cZ=u5(()=>u8().extend({items:iN(cW())})),cK=u5(()=>ij({durationMillis:iS().optional(),runTimeSecs:i_().optional(),computeUnits:i_().optional(),imageSizeBytes:iS().nullable().optional()})),cH=u5(()=>ij({useCache:iR().nullable().optional(),betaPackages:iR().nullable().optional(),memoryMbytes:iS().nullable().optional(),diskMbytes:iS().nullable().optional(),tag:n2().nullable().optional(),debug:iR().nullable().optional()})),cV=u5(()=>ij({ACTOR_COMPUTE_UNITS:i_().nullable().optional()})),cG=u5(()=>ij({templateId:n2().optional(),generatedBy:n2().optional()})),cJ=u5(()=>ij({actorSpecification:iV(1).optional(),name:n2().optional(),title:n2().optional(),description:n2().optional(),version:n2().regex(/^[0-9]+(\.[0-9]+)+$/).optional(),buildTag:n2().optional(),meta:cG().optional(),environmentVariables:iW(n2(),n2()).optional(),dockerfile:n2().optional(),dockerContextDir:n2().optional(),readme:n2().nullable().optional(),input:iW(n2(),ix()).nullable().optional(),output:iW(n2(),ix()).nullable().optional(),changelog:n2().nullable().optional(),storages:ij({dataset:iW(n2(),ix()).optional(),datasets:iW(n2(),iW(n2(),ix())).optional(),keyValueStore:iW(n2(),ix()).optional()}).optional(),defaultMemoryMbytes:i$([n2(),iS()]).optional(),minMemoryMbytes:iS().min(128).optional(),maxMemoryMbytes:iS().min(128).optional(),usesStandbyMode:iR().optional(),webServerSchema:iW(n2(),ix()).optional(),webServerMcpPath:n2().optional()})),cY=u5(()=>ij({id:n2(),actId:n2(),userId:n2(),startedAt:u9({offset:!0}).pipe(u6()),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),status:cB(),meta:cq(),stats:cK().nullable().optional(),options:cH().nullable().optional(),usage:cV().nullable().optional(),usageTotalUsd:i_().nullable().optional(),usageUsd:cV().nullable().optional(),inputSchema:n2().nullable().optional(),readme:n2().nullable().optional(),changelog:n2().nullable().optional(),exitCode:iS().nullable().optional(),gitCommitId:n2().optional(),gitBranchName:n2().optional(),createdByOrganizationMemberUserId:n2().optional(),buildNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),imageDigest:n2().nullable().optional(),actVersion:ij({sourceType:cc().optional(),buildTag:n2().nullable().optional(),versionNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/).optional(),gitRepoUrl:n2().optional(),sourceFiles:iN(ci()).optional(),gitHubGistUrl:n2().optional(),tarballUrl:n2().optional(),actorPath:n2().nullable().optional()}).optional(),actorDefinition:cJ().nullable().optional()})),cX=u5(()=>ij({origin:cF(),clientIp:n2().nullable().optional(),userAgent:n2().nullable().optional(),scheduleId:n2().nullable().optional(),scheduledAt:u9({offset:!0}).pipe(u6()).nullable().optional(),actorRunId:n2().optional(),webhookDispatchId:n2().optional(),scheduledAct2Id:n2().optional(),scheduledActorTaskId:n2().optional()})),cQ=u5(()=>ij({deployment:iK(["SINGLE_TENANT","MULTI_TENANT_OWNER_PAID","MULTI_TENANT_FREE_USERS","MULTI_TENANT_PAYING_USERS"]).or(n2())})),c0=u5(()=>ij({id:n2(),actId:n2(),userId:n2().optional(),actorTaskId:n2().nullable().optional(),status:cB(),startedAt:u9({offset:!0}).pipe(u6()),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),buildId:n2(),buildNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).optional(),buildNumberInt:iS().optional(),meta:cX(),usageTotalUsd:i_(),defaultKeyValueStoreId:n2(),defaultDatasetId:n2(),defaultRequestQueueId:n2(),standby:cQ().nullable().optional()})),c1=u5(()=>u8().extend({items:iN(c0())})),c2=u5(()=>ij({inputBodyLen:iS().min(0).nullable().optional(),migrationCount:iS().min(0).optional(),rebootCount:iS().min(0).optional(),restartCount:iS().min(0).optional(),resurrectCount:iS().min(0).optional(),memAvgBytes:i_().optional(),memMaxBytes:iS().min(0).optional(),memCurrentBytes:iS().min(0).optional(),cpuAvgUsage:i_().optional(),cpuMaxUsage:i_().optional(),cpuCurrentUsage:i_().optional(),netRxBytes:iS().min(0).optional(),netTxBytes:iS().min(0).optional(),durationMillis:iS().min(0).optional(),runTimeSecs:i_().min(0).optional(),metamorph:iS().min(0).optional(),computeUnits:i_().min(0).optional()})),c4=u5(()=>ij({eventTotalUsd:i_(),eventTitle:n2()})),c3=u5(()=>ij({platform:n2().optional(),appId:n2().optional(),isAiTool:iR().optional()})),c9=u5(()=>ij({build:n2(),timeoutSecs:iS().min(0),memoryMbytes:iS().min(128).max(32768),diskMbytes:iS().min(0),restartOnError:iR().nullable().optional(),maxItems:iS().min(0).nullable().optional(),maxTotalChargeUsd:i_().min(0).nullable().optional(),isMaxTotalChargeUsdSetByUser:iR().optional()})),c6=u5(()=>iK(["ANYONE_WITH_ID_CAN_READ","ANYONE_WITH_NAME_CAN_READ","FOLLOW_USER_SETTING","RESTRICTED"]).or(n2())),c5=u5(()=>ij({ACTOR_COMPUTE_UNITS:i_().nullable().optional(),DATASET_READS:iS().nullable().optional(),DATASET_WRITES:iS().nullable().optional(),KEY_VALUE_STORE_READS:iS().nullable().optional(),KEY_VALUE_STORE_WRITES:iS().nullable().optional(),KEY_VALUE_STORE_LISTS:iS().nullable().optional(),REQUEST_QUEUE_READS:iS().nullable().optional(),REQUEST_QUEUE_WRITES:iS().nullable().optional(),DATA_TRANSFER_INTERNAL_GBYTES:i_().nullable().optional(),DATA_TRANSFER_EXTERNAL_GBYTES:i_().nullable().optional(),PROXY_RESIDENTIAL_TRANSFER_GBYTES:i_().nullable().optional(),PROXY_SERPS:iS().nullable().optional(),PROXY_UNBLOCKER_UNITS:i_().nullable().optional()})),c8=u5(()=>ij({ACTOR_COMPUTE_UNITS:i_().nullable().optional(),DATASET_READS:i_().nullable().optional(),DATASET_WRITES:i_().nullable().optional(),KEY_VALUE_STORE_READS:i_().nullable().optional(),KEY_VALUE_STORE_WRITES:i_().nullable().optional(),KEY_VALUE_STORE_LISTS:i_().nullable().optional(),REQUEST_QUEUE_READS:i_().nullable().optional(),REQUEST_QUEUE_WRITES:i_().nullable().optional(),DATA_TRANSFER_INTERNAL_GBYTES:i_().nullable().optional(),DATA_TRANSFER_EXTERNAL_GBYTES:i_().nullable().optional(),PROXY_RESIDENTIAL_TRANSFER_GBYTES:i_().nullable().optional(),PROXY_SERPS:i_().nullable().optional(),PROXY_UNBLOCKER_UNITS:i_().nullable().optional()})),c7=u5(()=>ij({createdAt:u9({offset:!0}).pipe(u6()),actorId:n2(),buildId:n2(),inputKey:n2().nullable().optional(),buildTags:iN(n2()).optional()})),pe=u5(()=>ij({id:n2(),actId:n2(),userId:n2(),actorTaskId:n2().nullable().optional(),startedAt:u9({offset:!0}).pipe(u6()),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),status:cB(),statusMessage:n2().nullable().optional(),isStatusMessageTerminal:iR().nullable().optional(),meta:cX(),pricingInfo:cS().optional(),stats:c2(),chargedEventCounts:iW(n2(),iS()).optional(),accountedChargedEventCounts:iW(n2(),iS()).nullable().optional(),eventUsage:iW(n2(),c4()).optional(),externalChargedTotalUsd:i_().optional(),standby:cQ().nullable().optional(),integrationTracking:c3().optional(),createdByOrganizationMemberUserId:n2().optional(),consoleUrl:ir({normalize:!0}).optional(),output:iW(n2(),ir({normalize:!0})).optional(),options:c9(),buildId:n2(),exitCode:iS().nullable().optional(),generalAccess:c6().nullable().optional(),defaultKeyValueStoreId:n2(),defaultDatasetId:n2(),defaultRequestQueueId:n2(),storageIds:ij({datasets:ij({default:n2().optional()}).catchall(n2()).optional(),keyValueStores:ij({default:n2().optional()}).catchall(n2()).optional(),requestQueues:ij({default:n2().optional()}).catchall(n2()).optional()}).optional(),buildNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).nullable().optional(),containerUrl:ir({normalize:!0}).optional(),isContainerServerReady:iR().nullable().optional(),gitBranchName:n2().nullable().optional(),usage:c5().nullable().optional(),usageTotalUsd:i_().nullable().optional(),usageUsd:c8().nullable().optional(),metamorphs:iN(c7()).nullable().optional(),platformUsageBillingModel:n2().optional()})),pt=u5(()=>ij({readCount:iS().optional(),writeCount:iS().optional(),storageBytes:iS().optional(),inflatedBytes:iS().optional()})),pr=u5(()=>ij({id:n2(),name:n2().nullable().optional(),title:n2().nullable().optional(),userId:n2(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),accessedAt:u9({offset:!0}).pipe(u6()),itemCount:iS().min(0),cleanItemCount:iS().min(0),actId:n2().nullable().optional(),actRunId:n2().nullable().optional(),fields:iN(n2()).nullable().optional(),schema:iW(n2(),ix()).nullable().optional(),consoleUrl:ir({normalize:!0}),itemsPublicUrl:ir({normalize:!0}).optional(),urlSigningSecretKey:n2().nullable().optional(),generalAccess:c6().nullable().optional(),stats:pt().optional()})),pn=u5(()=>ij({min:i_().nullable().optional(),max:i_().nullable().optional(),nullCount:iS().nullable().optional(),emptyCount:iS().nullable().optional()})),pi=u5(()=>ij({fieldStatistics:iW(n2(),pn()).nullable().optional()})),po=u5(()=>ij({readCount:iS().optional(),writeCount:iS().optional(),deleteCount:iS().optional(),listCount:iS().optional(),s3StorageBytes:iS().optional(),storageBytes:iS().optional()})),pa=u5(()=>ij({id:n2(),name:n2().nullable().optional(),title:n2().nullable().optional(),userId:n2().nullable().optional(),username:n2().nullable().optional(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),accessedAt:u9({offset:!0}).pipe(u6()),actId:n2().nullable().optional(),actRunId:n2().nullable().optional(),consoleUrl:ir({normalize:!0}).optional(),keysPublicUrl:ir({normalize:!0}).optional(),recordsPublicUrl:ir({normalize:!0}).optional(),schema:iW(n2(),ix()).nullable().optional(),urlSigningSecretKey:n2().nullable().optional(),generalAccess:c6().nullable().optional(),stats:po().optional()})),ps=u5(()=>ij({key:n2(),size:iS(),recordPublicUrl:ir({normalize:!0})})),pl=u5(()=>ij({items:iN(ps()),count:iS(),limit:iS(),exclusiveStartKey:n2().nullable().optional(),isTruncated:iR(),nextExclusiveStartKey:n2().nullable().optional()})),pu=u5(()=>n2()),pc=u5(()=>n2()),pp=u5(()=>u9({offset:!0}).pipe(u6())),pd=u5(()=>u9({offset:!0}).pipe(u6())),pf=u5(()=>u9({offset:!0}).pipe(u6())),ph=u5(()=>iS().min(0)),pm=u5(()=>iS().min(0)),pg=u5(()=>iS()),py=u5(()=>iR()),pb=u5(()=>ij({deleteCount:iS().optional(),headItemReadCount:iS().optional(),readCount:iS().optional(),storageBytes:iS().optional(),writeCount:iS().optional()})),pv=u5(()=>ij({id:pu(),name:n2().nullable().optional(),title:n2().nullable().optional(),userId:pc(),actId:n2().nullable().optional(),actRunId:n2().nullable().optional(),createdAt:pp(),modifiedAt:pd(),accessedAt:pf(),totalRequestCount:ph(),handledRequestCount:pm(),pendingRequestCount:pg(),hadMultipleClients:py(),consoleUrl:ir({normalize:!0}),stats:pb().optional(),generalAccess:c6().nullable().optional()})),pw=u5(()=>n2()),p_=u5(()=>n2()),pE=u5(()=>iK(["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"]).or(n2())),pS=u5(()=>pE()),pO=u5(()=>iS()),pR=u5(()=>iW(n2(),ix())),pT=u5(()=>ij({uniqueKey:pw(),url:p_(),method:pS().optional(),retryCount:pO().optional(),loadedUrl:n2().nullable().optional(),payload:i$([n2(),iW(n2(),ix())]).nullable().optional(),headers:iW(n2(),ix()).nullable().optional(),userData:pR().optional(),noRetry:iR().nullable().optional(),errorMessages:iN(n2()).nullable().optional(),handledAt:u9({offset:!0}).pipe(u6()).nullable().optional()})),pA=u5(()=>n2()),px=u5(()=>u9({offset:!0}).pipe(u6())),pC=u5(()=>pT().extend({id:pA().optional(),lockExpiresAt:px().optional(),lockByClient:n2().optional()}).required({id:!0})),pk=u5(()=>ij({items:iN(pC()),limit:iS(),exclusiveStartId:n2().optional(),cursor:n2().optional(),nextCursor:n2().optional()})),pP=u5(()=>iR()),pU=u5(()=>iR()),pI=u5(()=>ij({requestId:pA(),wasAlreadyPresent:pP(),wasAlreadyHandled:pU()})),pN=u5(()=>ij({requestId:pA(),uniqueKey:pw(),wasAlreadyPresent:pP(),wasAlreadyHandled:pU()})),pL=u5(()=>ij({id:pA().optional(),uniqueKey:pw(),url:p_(),method:pS().optional()})),pz=u5(()=>ij({processedRequests:iN(pN()),unprocessedRequests:iN(pL())})),pj=u5(()=>ij({uniqueKey:pw().optional(),id:pA()})),pD=u5(()=>ij({uniqueKey:pw(),id:pA().optional()})),p$=u5(()=>i$([pj(),pD()])),pM=u5(()=>ij({processedRequests:iN(p$()),unprocessedRequests:iN(pL())})),pB=u5(()=>ij({unlockedCount:iS()})),pF=u5(()=>ij({lockExpiresAt:px()})),pq=u5(()=>iS()),pW=u5(()=>ij({id:pA(),uniqueKey:pw(),url:p_(),method:pS().optional(),retryCount:pO().optional()})),pZ=u5(()=>ij({limit:pq(),queueModifiedAt:pd(),hadMultipleClients:py(),items:iN(pW())})),pK=u5(()=>ij({id:pA(),uniqueKey:pw(),url:p_(),method:pS().optional(),retryCount:pO().optional(),lockExpiresAt:px()})),pH=u5(()=>ij({limit:pq(),queueModifiedAt:pd(),queueHasLockedRequests:iR().optional(),clientKey:n2().optional(),hadMultipleClients:py(),lockSecs:iS(),items:iN(pK())})),pV=u5(()=>ij({totalRuns:iS().optional(),lastRunStartedAt:u9({offset:!0}).pipe(u6()).nullable().optional()})),pG=u5(()=>ij({id:n2(),userId:n2(),actId:n2(),actName:n2().nullable().optional(),name:n2(),title:n2().nullable().optional(),username:n2().nullable().optional(),actUsername:n2().nullable().optional(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),stats:pV().nullable().optional(),isPublic:iR().optional()})),pJ=u5(()=>u8().extend({items:iN(pG())})),pY=u5(()=>ij({build:n2().nullable().optional(),timeoutSecs:iS().nullable().optional(),memoryMbytes:iS().nullable().optional(),maxItems:iS().nullable().optional(),maxTotalChargeUsd:i_().nullable().optional(),restartOnError:iR().nullable().optional(),isMaxTotalChargeUsdSetByUser:iR().nullable().optional(),forcePermissionLevel:cr().nullable().optional()})),pX=u5(()=>iW(n2(),ix())),pQ=u5(()=>ij({publishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),seoTitle:n2().max(60).nullable().optional(),seoDescription:n2().max(160).nullable().optional(),inputSchemaFields:iN(n2()).nullable().optional(),datasetName:n2().nullable().optional(),datasetView:n2().nullable().optional(),categorization:n2().nullable().optional(),highlightedFields:iN(n2()).nullable().optional(),faq:iN(ij({question:n2(),answer:n2()})).nullable().optional()})),p0=u5(()=>ij({id:n2(),userId:n2(),actId:n2(),name:n2(),nameLowerCase:n2().optional(),username:n2().nullable().optional(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),removedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),stats:pV().nullable().optional(),options:pY().nullable().optional(),input:i$([pX(),iN(pX())]).nullable().optional(),title:n2().nullable().optional(),description:n2().nullable().optional(),actorStandby:cl().nullable().optional(),standbyUrl:ir({normalize:!0}).nullable().optional(),isPublic:iR().optional(),publicConfig:pQ().nullable().optional()})),p1=u5(()=>ij({readCount:iS().optional(),writeCount:iS().optional(),deleteCount:iS().optional(),listCount:iS().optional(),s3StorageBytes:iS().optional()})),p2=u5(()=>ij({id:n2(),name:n2().nullable().optional(),title:n2().nullable().optional(),userId:n2().nullable().optional(),username:n2().nullable().optional(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),accessedAt:u9({offset:!0}).pipe(u6()),actId:n2().nullable().optional(),actRunId:n2().nullable().optional(),schema:i$([iW(n2(),ix()),n2()]).nullable().optional(),generalAccess:c6().nullable().optional(),stats:p1().optional()})),p4=u5(()=>u8().extend({unnamed:iR().optional(),items:iN(p2())})),p3=u5(()=>ij({id:n2(),name:n2().nullable().optional(),userId:n2(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),accessedAt:u9({offset:!0}).pipe(u6()),itemCount:iS(),cleanItemCount:iS(),actId:n2().nullable().optional(),actRunId:n2().nullable().optional(),title:n2().nullable().optional(),username:n2().optional(),generalAccess:c6().nullable().optional(),stats:pt().optional()})),p9=u5(()=>u8().extend({unnamed:iR().optional(),items:iN(p3())})),p6=u5(()=>ij({deleteCount:iS().optional(),headItemReadCount:iS().optional(),readCount:iS().optional(),writeCount:iS().optional(),s3StorageBytes:iS().optional(),dynamodbStorageBytes:iS().optional()})),p5=u5(()=>ij({id:pu(),name:n2().nullable().optional(),title:n2().nullable().optional(),userId:pc(),username:n2().optional(),createdAt:pp(),modifiedAt:pd(),accessedAt:pf(),expireAt:u9({offset:!0}).pipe(u6()).optional(),totalRequestCount:ph(),handledRequestCount:pm(),pendingRequestCount:pg(),actId:n2().nullable().optional(),actRunId:n2().nullable().optional(),hadMultipleClients:py(),generalAccess:c6().nullable().optional(),stats:p6().optional()})),p8=u5(()=>u8().extend({unnamed:iR().optional(),items:iN(p5())})),p7=u5(()=>ij({id:n2(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),userId:n2(),isAdHoc:iR().nullable().optional(),isApifyIntegration:iR().optional(),isEnabled:iR().optional(),actionType:n2().optional(),shouldInterpolateStrings:iR().nullable().optional(),eventTypes:iN(ck()),condition:cP(),ignoreSslErrors:iR(),doNotRetry:iR(),requestUrl:ir({normalize:!0}).nullable().optional(),headersTemplate:n2().nullable().optional(),title:n2().nullable().optional(),description:n2().nullable().optional(),slackMessage:cU().optional(),googleMail:cN().optional(),googleDrive:cL().optional(),githubIssue:cz().optional(),lastDispatch:cD().nullable().optional(),stats:c$().nullable().optional()})),de=u5(()=>u8().extend({items:iN(p7())})),dt=u5(()=>ij({_id:n2().optional(),actionType:n2().optional(),condition:cP().optional(),requestUrl:ir({normalize:!0}).nullable().optional(),isAdHoc:iR().optional(),isApifyIntegration:iR().nullable().optional(),slackMessage:cU().optional(),googleMail:cN().optional(),googleDrive:cL().optional(),githubIssue:cz().optional()})),dr=u5(()=>ij({id:n2(),userId:n2(),webhookId:n2(),createdAt:u9({offset:!0}).pipe(u6()),status:cj(),eventType:ck(),eventData:ij({actorId:n2(),actorRunId:n2().optional(),actorBuildId:n2().optional(),actorTaskId:n2().nullable().optional()}).nullable().optional(),webhook:dt().nullable().optional(),calls:iN(ij({startedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),errorMessage:n2().nullable().optional(),responseStatus:iS().nullable().optional(),responseBody:n2().nullable().optional(),debugPostMessage:iW(n2(),ix()).optional()})).optional()})),dn=u5(()=>u8().extend({items:iN(dr())})),di=u5(()=>ij({id:n2(),userId:n2(),name:n2(),cronExpression:n2(),timezone:n2(),isEnabled:iR(),isExclusive:iR(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),nextRunAt:u9({offset:!0}).pipe(u6()).nullable().optional(),lastRunAt:u9({offset:!0}).pipe(u6()).nullable().optional()})),da=u5(()=>ij({email:iR().optional()})),ds=u5(()=>ij({id:n2(),type:iV("RUN_ACTOR"),actorId:n2()})),dl=u5(()=>ij({id:n2(),type:iV("RUN_ACTOR_TASK"),actorTaskId:n2()})),du=u5(()=>iB("type",[ds(),dl()])),dc=u5(()=>di().extend({title:n2().nullable().optional(),notifications:da().optional(),integrationTracking:c3().optional(),actions:iN(du())})),dp=u5(()=>u8().extend({items:iN(dc())})),dd=u5(()=>ij({body:n2().nullable().optional(),contentType:n2().nullable().optional()})),df=u5(()=>ij({version:iS().optional(),data:ij({cronExpression:n2().optional(),timezone:n2().optional()}).optional()}).nullable()),dh=u5(()=>ij({id:n2(),type:iV("RUN_ACTOR"),actorId:n2(),runInput:dd().nullable().optional(),runOptions:pY().nullable().optional()})),dm=u5(()=>ij({id:n2(),type:iV("RUN_ACTOR_TASK"),actorTaskId:n2(),input:iW(n2(),ix()).nullable().optional()})),dg=u5(()=>iB("type",[dh(),dm()])),dy=u5(()=>di().extend({description:n2().nullable().optional(),title:n2().nullable().optional(),notifications:da().optional(),uiState:df().optional(),integrationTracking:c3().optional(),actions:iN(dg())})),db=u5(()=>ij({message:n2(),level:n2(),createdAt:u9({offset:!0}).pipe(u6())})),dv=u5(()=>ij({pricingModel:n2(),apifyMarginPercentage:i_().optional(),createdAt:u9({offset:!0}).pipe(u6()).optional(),startedAt:u9({offset:!0}).pipe(u6()).optional(),notifiedAboutChangeAt:u9({offset:!0}).pipe(u6()).nullable().optional(),notifiedAboutFutureChangeAt:u9({offset:!0}).pipe(u6()).nullable().optional(),isPriceChangeNotificationSuppressed:iR().optional(),forceContainsSignificantPriceChange:iR().optional(),isPPEPlatformUsagePaidByUser:iR().optional(),reasonForChange:n2().nullable().optional(),minimalMaxTotalChargeUsd:i_().nullable().optional(),pricingPerEvent:iW(n2(),ix()).nullable().optional(),pricePerUnitUsd:i_().optional(),trialMinutes:iS().optional(),unitName:n2().optional(),tieredPricing:iW(n2(),ij({tieredPricePerUnitUsd:i_().optional()})).optional(),notifiedAboutRentalToPpePriceChangeAt:u9({offset:!0}).pipe(u6()).nullable().optional()})),dw=u5(()=>ij({id:n2(),title:n2(),name:n2(),username:n2(),userFullName:n2().nullable().optional(),description:n2().nullable().optional(),categories:iN(n2()).optional(),notice:cT().optional(),pictureUrl:n2().nullable().optional(),userPictureUrl:ir({normalize:!0}).nullable().optional(),url:ir({normalize:!0}).nullable().optional(),stats:u7(),currentPricingInfo:dv().optional(),isWhiteListedForAgenticPayments:iR().nullable().optional(),actorReviewCount:iS().optional(),actorReviewRating:i_().optional(),bookmarkCount:iS().optional(),badge:n2().nullable().optional(),readmeSummary:n2().optional(),inputSchema:ij({type:n2(),properties:iW(n2(),ij({type:i$([n2(),iN(n2())]).optional()})),required:iN(n2()).optional()}).optional()})),d_=u5(()=>u8().extend({items:iN(dw())})),dE=u5(()=>ij({bio:n2().nullable().optional(),readme:n2().nullable().optional(),name:n2().optional(),pictureUrl:ir({normalize:!0}).nullable().optional(),githubUsername:n2().nullable().optional(),websiteUrl:ir({normalize:!0}).nullable().optional(),twitterUsername:n2().nullable().optional()})),dS=u5(()=>ij({id:n2().optional(),name:n2(),description:n2().nullable(),availableCount:iS().optional()})),dO=u5(()=>ij({password:n2().nullable().optional(),groups:iN(dS())})),dR=u5(()=>iW(n2(),iS())),dT=u5(()=>ij({id:n2().optional(),description:n2().optional(),isEnabled:iR().optional(),monthlyBasePriceUsd:i_().optional(),monthlyUsageCreditsUsd:i_().optional(),usageDiscountPercent:i_().optional(),enabledPlatformFeatures:iN(n2()).optional(),maxMonthlyUsageUsd:i_().optional(),maxActorMemoryGbytes:i_().optional(),maxMonthlyActorComputeUnits:i_().optional(),maxMonthlyResidentialProxyGbytes:i_().optional(),maxMonthlyProxySerps:iS().optional(),maxMonthlyExternalDataTransferGbytes:i_().optional(),maxActorCount:iS().optional(),maxActorTaskCount:iS().optional(),dataRetentionDays:iS().optional(),availableProxyGroups:dR(),teamAccountSeatCount:iS().optional(),supportLevel:n2().optional(),availableAddOns:iN(n2()).optional(),tier:n2().optional(),apiRateLimitBoosts:iS().optional(),maxScheduleCount:iS().optional(),maxConcurrentActorRuns:iS().optional(),planPricing:iW(n2(),ix()).optional(),planVersion:i_().optional(),legacyPlanId:n2().optional(),planTags:iN(n2()).optional(),overageThresholdUsd:i_().optional(),maxMonthlyUnblockerUnits:iS().optional(),maxPublicActorTaskCount:iS().optional(),maxPublicActorTaskCountPerActor:iS().optional(),forceBillingInterval:n2().optional(),personalizedSupport:n2().nullable().optional(),monitoringLevel:iK(["STANDARD"]).or(n2()).nullable().optional(),isPayingCustomer:iR().optional()})),dA=u5(()=>ij({isEnabled:iR(),disabledReason:n2().nullable(),disabledReasonType:n2().nullable(),isTrial:iR(),trialExpirationAt:u9({offset:!0}).pipe(u6()).nullable()})),dx=u5(()=>ij({ACTORS:dA(),STORAGE:dA(),SCHEDULER:dA(),PROXY:dA(),PROXY_EXTERNAL_ACCESS:dA(),PROXY_RESIDENTIAL:dA(),PROXY_SERPS:dA(),WEBHOOKS:dA(),ACTORS_PUBLIC_ALL:dA(),ACTORS_PUBLIC_DEVELOPER:dA()})),dC=u5(()=>ij({id:n2().optional(),username:n2(),profile:dE().optional(),email:n2().nullable().optional(),proxy:dO().optional(),plan:dT().optional(),effectivePlatformFeatures:dx().optional(),createdAt:u9({offset:!0}).pipe(u6()).optional(),isPaying:iR().optional(),organizationOwnerUserId:n2().nullable().optional()})),dk=u5(()=>ij({startAt:u9({offset:!0}).pipe(u6()),endAt:u9({offset:!0}).pipe(u6())})),dP=u5(()=>ij({quantityAbove:i_(),discountPercent:i_(),tierQuantity:i_(),unitPriceUsd:i_(),priceUsd:i_()})),dU=u5(()=>ij({quantity:i_(),baseAmountUsd:i_(),baseUnitPriceUsd:i_().optional(),amountAfterVolumeDiscountUsd:i_().optional(),priceTiers:iN(dP()).optional()})),dI=u5(()=>iW(n2(),dU())),dN=u5(()=>iW(n2(),dU())),dL=u5(()=>ij({date:u9({offset:!0}).pipe(u6()),serviceUsage:dN(),totalUsageCreditsUsd:i_()})),dz=u5(()=>ij({usageCycle:dk(),monthlyServiceUsage:dI(),dailyServiceUsages:iN(dL()),totalUsageCreditsUsdBeforeVolumeDiscount:i_(),totalUsageCreditsUsdAfterVolumeDiscount:i_()})),dj=u5(()=>ij({maxMonthlyUsageUsd:i_(),maxMonthlyActorComputeUnits:i_(),maxMonthlyExternalDataTransferGbytes:i_(),maxMonthlyProxySerps:iS(),maxMonthlyResidentialProxyGbytes:i_(),maxActorMemoryGbytes:i_(),maxActorCount:iS(),maxActorTaskCount:iS(),maxConcurrentActorJobs:iS(),maxTeamAccountSeatCount:iS(),dataRetentionDays:iS(),maxScheduleCount:iS().optional(),maxMonthlyUnblockerUnits:i_().optional()})),dD=u5(()=>ij({monthlyUsageUsd:i_(),monthlyActorComputeUnits:i_(),monthlyExternalDataTransferGbytes:i_(),monthlyProxySerps:iS(),monthlyResidentialProxyGbytes:i_(),actorMemoryGbytes:i_(),actorCount:iS(),actorTaskCount:iS(),activeActorJobCount:iS(),teamAccountSeatCount:iS(),scheduleCount:iS().optional(),monthlyUnblockerUnits:i_().optional()})),d$=u5(()=>ij({monthlyUsageCycle:dk(),limits:dj(),current:dD()})),dM=u5(()=>{let e=cY();return e.extend({actVersion:e.shape.actVersion.unwrap().extend({buildTag:n2().nullable().optional()}).optional()})}),dB=u5(()=>dy().extend({uiState:df().nullable().optional()})),dF=new Set(["actor-memory-limit-exceeded","concurrent-runs-limit-exceeded"]);async function dq(e,t,r,n){if(!t)return e();let i=!0===t?1/0:Date.now()+1e3*t;for(;;)try{return await e()}catch(o){if(!(o instanceof lI)||!dF.has(o.type??""))throw o;let e=i-Date.now();if(e<=0)throw o;let t=Math.min(1e4,e);r.info(`Not enough resources to start the run, retrying in ${Number((t/1e3).toPrecision(3))}s: ${o.message}`),await uh(t,n),n?.throwIfAborted()}}let dW=iz({raw:iR().optional(),...uB}),dZ=dW.extend({buffer:iR().optional()});let dK=class LogClient extends u3{constructor(e){super({resourcePath:"logs",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="long",signal:r,buffer:n,...i}=lV(e,dZ,"LogGetOptions"),o={url:this.buildUrl(),method:"GET",params:this.buildParams(i),timeoutSecs:t,signal:r};n&&(o.responseType="buffer");try{return(await this.httpClient.call(o)).data}catch(e){ue(e,this.id)}}async stream(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="long",signal:r,raw:n}=lV(e,dW,"LogOptions"),i={url:this.buildUrl(),method:"GET",params:this.buildParams({stream:!0,raw:n}),responseType:"stream",timeoutSecs:t,signal:r};try{return(await this.httpClient.call(i)).data}catch(e){ue(e,this.id)}}};let dH=class LoggerActorRedirect extends oR{constructor(e={}){super({skipTime:!0,level:N.DEBUG,...e})}_log(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(e>this.options.level)return;if(r||n)throw Error("Redirect logger does not use other arguments than level and message");let{prefix:o}=i;o=o?`${o}`:"";let a="";this.options.skipTime||(a=`${new Date().toISOString().replace("Z","").replace("T"," ")} `);let s=`${oC().gray(a)}${oC().cyan(o)}${t||""}`;return this._outputWithConsole(N.INFO,s),s}};let dV=class StreamedLog{#v;#w=[];#_=new TextDecoder;#E=/(?:\n|^)(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z)/g;#S;#O;#R;#T=null;#A=!1;#x=new AbortController;#C=new AbortController;constructor(e){let{toLog:t,logClient:r,fromStart:n=!0,signal:i}=e;this.#v=t,this.#O=r,this.#R=i,this.#S=n?null:new Date}start(){if(this.#T)throw Error("Streaming task already active");this.#A=!1,this.#x=new AbortController,this.#C=new AbortController,this.#T=this.#k()}async stop(){if(!this.#T)throw Error("Streaming task is not active");this.#A=!0,this.#C.abort();let e=this.#x,t=setTimeout(()=>e.abort(),1e3);try{await this.#T}catch(e){if(!(e instanceof Error&&"AbortError"===e.name))throw e}finally{clearTimeout(t),this.#T=null}}async #k(){let e=this.#R?AbortSignal.any([this.#R,this.#x.signal]):this.#x.signal;try{let t,r=500;for(;!t;){let n;if(this.#A){let r=await this.#O.get({raw:!0,signal:this.#R});t=await this.#P([new TextEncoder().encode(r??"")],e);break}try{n=await this.#O.stream({raw:!0,signal:e})}catch(e){if(this.#A&&!this.#R?.aborted)continue;throw e}if(!n)return;if(this.#A){n.destroy();continue}(t=await this.#P(n,e))||(await uh(r,AbortSignal.any([e,this.#C.signal])),r=Math.min(2*r,5e3))}let n=this.#_.decode(t).trim();n.length&&this.#v.info(n)}catch(t){if(e.aborted)return;oj.warning("Log redirection stopped due to error",t)}}async #P(e,t){let r;try{for await(let t of e){r??=new Uint8Array;let e=new Uint8Array(r.length+t.length);e.set(r,0),e.set(t,r.length);let n=e.lastIndexOf(10);if(r=e.slice(n),this.#w.push(e.slice(0,n)),this.#U(),this.#A)break}}catch(e){if(!t.aborted)throw e}return r}#U(){let e=this.#_.decode(function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}(this.#w)).split(this.#E).slice(1),t=e.filter((e,t)=>t%2==0),r=e.filter((e,t)=>t%2!=0);this.#w=[],t.forEach((e,t)=>{let n=r[t];this.#S&&new Date(e)<this.#S||this.#v.info((e+n).trim())})}};let dG=iz({waitForFinish:i_().optional(),...uB}),dJ=iz({waitSecs:i_().optional(),...uB});let dY=class BuildClient extends u3{constructor(e){super({resourcePath:"actor-builds",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t,signal:r,...n}=lV(e,dG,"BuildClientGetOptions");return this.getResource(dM(),n,this.timeoutForWaitForFinish(t,"short",n.waitForFinish),r)}async abort(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return l8(await this.httpClient.call({url:this.buildUrl("abort"),method:"POST",params:this.buildParams(),timeoutSecs:t,signal:r}),dM())}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}async getOpenApiDefinition(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="medium",signal:r}=lV(e,uF,"TimeoutOptions");return(await this.httpClient.call({url:this.buildUrl("openapi.json"),method:"GET",params:this.buildParams(),timeoutSecs:t,signal:r})).data}async waitForFinish(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,dJ,"BuildClientWaitForFinishOptions");return this.waitForJobFinish(dM(),t)}log(){return new dK(this.subResourceOptions({resourcePath:"log"}))}};let dX=class ResourceCollectionClient extends u4{async listResources(e,t,r,n){return l8(await this.httpClient.call({url:this.buildUrl(),method:"GET",params:this.buildParams(t),timeoutSecs:r,signal:n}),e)}listUnpaginatedResources(e,t,r){let n=this.listResources(e,void 0,t,r);return Object.defineProperty(n,Symbol.asyncIterator,{async *value(){yield*(await n).items}})}listResourcesPaginated(e,t,r){let{timeoutSecs:n=r,signal:i,...o}=t;return this.listPaginatedFromCallback(async t=>this.listResources(e,t,n,i),o)}async createResource(e,t,r,n){return l8(await this.httpClient.call({url:this.buildUrl(),method:"POST",params:this.buildParams(),data:t,timeoutSecs:r,signal:n}),e)}async getOrCreateResource(e,t,r,n,i){return l8(await this.httpClient.call({url:this.buildUrl(),method:"POST",params:this.buildParams({name:t}),data:r,timeoutSecs:n,signal:i}),e)}};let dQ=iz({...uu,desc:iR().optional(),...uB});let d0=class BuildCollectionClient extends dX{constructor(e){super({...e,resourcePath:e.resourcePath||"actor-builds"})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,dQ,"BuildCollectionClientListOptions");return this.listResourcesPaginated(cZ(),t,"medium")}};let d1=[429,503],d2=/^(\d+)\.(\d+)\.(\d+)$/;function d4(e){let t=d2.exec(e??"");if(t)return[Number(t[1]),Number(t[2]),Number(t[3])]}let d3=iz({method:iK(["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"]).optional(),params:iW(n2(),ix()).optional(),headers:iW(n2(),n2()).optional(),data:ix().optional(),parentRequestId:n2().optional(),compression:uN.optional(),responseType:iK(["parsed","buffer","stream"]).optional(),...uB});let d9=class ActorServerClient extends u3{#I;constructor(e){super({resourcePath:"actors",...e})}async getUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions"),n=this.#I??=this.#N(t,r).then(e=>e.standbyUrl);try{return await n}catch(e){throw this.#I===n&&(this.#I=void 0),e}}async getOpenApiSpec(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions"),n=await this.#N(t,r),i=n.actorStandby?.build||"latest",o=n.taggedBuilds?.[i]?.buildId??void 0,a=d4(i);if(void 0===o&&void 0!==a)for await(let e of new d0(this.subResourceOptions({resourcePath:"builds"})).list({desc:!0,timeoutSecs:t,signal:r})){if(e.buildNumber===i){o=e.id;break}if(function(e,t){let r=d4(e);return void 0!==r&&r[0]===t[0]&&r[1]===t[1]&&r[2]<t[2]}(e.buildNumber,a))break}let s=void 0===o?void 0:await new dY({baseUrl:this.apifyClient.baseUrl,publicBaseUrl:this.apifyClient.publicBaseUrl,httpClient:this.httpClient,apifyClient:this.apifyClient,id:o}).get({timeoutSecs:t,signal:r});if(void 0===s)throw new lP(`Build ${i} of Actor ${this.id} does not exist.`);return s.actorDefinition?.webServerSchema}async request(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,n2());let{method:r="GET",params:n,headers:i,data:o,parentRequestId:a,compression:s,responseType:l,timeoutSecs:u="long",signal:c}=lV(t,d3,"ActorServerRequestOptions");if("stream"===l&&!lC.isNode)throw Error("The 'stream' response type can only be used in Node.js environment.");let p=await this.getUrl({signal:c}),d=e.split("#")[0].replace(/^\/+/,"");return this.httpClient.call({url:`${p.replace(/\/+$/,"")}/${d}`,method:r,params:n,headers:void 0===a?i:uY(i??{},{"X-Actor-Request-ID":a}),data:o,compression:void 0!==s&&uL(s),authorizationHeader:"X-Apify-Authorization",throwOnErrorStatus:!1,retryStatusCodes:d1,retryTransportErrors:!1,followRedirects:!1,responseType:l,timeoutSecs:u,signal:c})}async #N(e,t){let r=l8(await this.httpClient.call({url:this.buildUrl(),method:"GET",params:this.buildParams(),timeoutSecs:e,signal:t}),cA());if(!r.standbyUrl)throw new lP(`Actor ${this.id} is not a Server Actor.`);return this.#I=Promise.resolve(r.standbyUrl),r}};let d6=class ActorEnvVarClient extends u3{constructor(e){super({resourcePath:"env-vars",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(cp(),{},t,r)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(cp(),e,r,n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}};let d5=l9.optional();let d8=class ActorEnvVarCollectionClient extends dX{constructor(e){super({resourcePath:"env-vars",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.listUnpaginatedResources(cC(),t,r)}async create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,d5);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.createResource(cp(),e,r,n)}};var d7=((T={}).Active="ACTIVE",T.Succeeded="SUCCEEDED",T.Failed="FAILED",T),fe=((A={}).SourceFiles="SOURCE_FILES",A.GitRepo="GIT_REPO",A.Tarball="TARBALL",A.GitHubGist="GITHUB_GIST",A.SourceCode="SOURCE_CODE",A),ft=((x={}).RunActor="RUN_ACTOR",x.RunActorTask="RUN_ACTOR_TASK",x),fr=((C={}).Actors="ACTORS",C.Storage="STORAGE",C.ProxySERPS="PROXY_SERPS",C.Scheduler="SCHEDULER",C.Webhooks="WEBHOOKS",C.Proxy="PROXY",C.ProxyExternalAccess="PROXY_EXTERNAL_ACCESS",C);let fn=n2().min(1);let fi=class ActorVersionClient extends u3{constructor(e){super({resourcePath:"versions",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(cd(),{},t,r)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(cd(),e,r,n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}envVar(e){return lV(e,fn),new d6(this.subResourceOptions({id:e}))}envVars(){return new d8(this.subResourceOptions())}};let fo=l9.optional();let fa=class ActorVersionCollectionClient extends dX{constructor(e){super({resourcePath:"versions",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.listUnpaginatedResources(cx(),t,r)}async create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fo);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.createResource(cd(),e,r,n)}};var fs=((k={}).JSON="json",k.JSONL="jsonl",k.XML="xml",k.HTML="html",k.CSV="csv",k.XLSX="xlsx",k.RSS="rss",k);let fl=iK(fs),fu=i7(l3,"Expected an object"),fc=iz({clean:iR().optional(),desc:iR().optional(),flatten:iN(n2()).optional(),fields:iN(n2()).optional(),omit:iN(n2()).optional(),...uu,skipEmpty:iR().optional(),skipHidden:iR().optional(),unwind:iN(n2()).optional(),view:n2().optional(),signature:n2().optional(),...uB}),fp=iz({attachment:iR().optional(),bom:iR().optional(),clean:iR().optional(),delimiter:n2().optional(),desc:iR().optional(),flatten:iN(n2()).optional(),fields:iN(n2()).optional(),omit:iN(n2()).optional(),limit:i_().min(0).optional(),offset:i_().min(0).optional(),skipEmpty:iR().optional(),skipHeaderRow:iR().optional(),skipHidden:iR().optional(),unwind:iN(n2()).optional(),view:n2().optional(),xmlRoot:n2().optional(),xmlRow:n2().optional(),signature:n2().optional(),stream:iR().optional(),...uB}),fd=i$([fu,n2(),iN(fu)]),ff=iz({clean:iR().optional(),desc:iR().optional(),flatten:iN(n2()).optional(),fields:iN(n2()).optional(),format:fl.optional(),omit:iN(n2()).optional(),limit:i_().min(0).optional(),offset:i_().min(0).optional(),skipEmpty:iR().optional(),skipHidden:iR().optional(),unwind:iN(n2()).optional(),view:n2().optional(),expiresInSecs:i_().positive().optional(),...uB});let fh=class DatasetClient extends u3{constructor(e){super({resourcePath:"datasets",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(pr(),{},t,r)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(pr(),e,r,n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}listItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t=this;let{timeoutSecs:r="long",signal:n,...i}=lV(e,fc,"DatasetClientListItemOptions");return this.listPaginatedFromCallback(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=await t.httpClient.call({url:t.buildUrl("items"),method:"GET",params:t.buildParams(e),timeoutSecs:r,signal:n});return t.#L(i,e.desc??!1)},i)}async downloadItems(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fl);let{timeoutSecs:r="long",signal:n,stream:i,...o}=lV(t,fp,"DatasetClientDownloadItemsOptions");if(i&&!lC.isNode)throw Error("The stream option can only be used in Node.js environment.");let{data:a}=await this.httpClient.call({url:this.buildUrl("items"),method:"GET",params:this.buildParams({format:e,...o}),responseType:i?"stream":"buffer",timeoutSecs:r,signal:n});return a}async pushItems(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fd);let{timeoutSecs:r="medium",signal:n}=lV(t,uF,"TimeoutOptions");await this.httpClient.call({url:this.buildUrl("items"),method:"POST",headers:{"content-type":"application/json; charset=utf-8"},data:e,params:this.buildParams(),doNotRetryTimeouts:!0,timeoutSecs:r,signal:n})}async getStatistics(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return l8(await this.httpClient.call({url:this.buildUrl("statistics"),method:"GET",params:this.buildParams(),timeoutSecs:t,signal:r}),pi())}async createItemsPublicUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="long",signal:r,expiresInSecs:n,...i}=lV(e,ff,"DatasetClientCreateItemsUrlOptions"),o=await this.get({timeoutSecs:t,signal:r}),a=new URL(this.buildPublicUrl("items"));if(o?.urlSigningSecretKey){let e=await uE({resourceId:o.id,urlSigningSecretKey:o.urlSigningSecretKey,expiresInMillis:n?1e3*n:void 0});a.searchParams.set("signature",e)}return(a=uc(a,i)).toString()}#L(e,t){let r=e.headers["x-apify-pagination-desc"];return{items:e.data,total:Number(e.headers["x-apify-pagination-total"]),offset:Number(e.headers["x-apify-pagination-offset"]),count:Math.max(Number(e.headers["x-apify-pagination-count"]??0),e.data.length),limit:Number(e.headers["x-apify-pagination-limit"]),desc:"string"==typeof r?JSON.parse(r):t}}};let fm=iz({limit:i_().min(0).optional(),chunkSize:i_().positive().optional(),exclusiveStartKey:n2().optional(),collection:n2().optional(),prefix:n2().optional(),signature:n2().optional(),...uB}),fg=n2().min(1),fy=iz({limit:i_().min(0).optional(),exclusiveStartKey:n2().optional(),collection:n2().optional(),prefix:n2().optional(),expiresInSecs:i_().positive().optional(),...uB}),fb=n2(),fv=iz({buffer:iR().optional(),stream:iR().optional(),disableRedirect:iR().optional(),signature:n2().optional(),...uB}),fw=iz({key:n2(),value:i7(e=>void 0!==e&&"symbol"!=typeof e&&"bigint"!=typeof e&&"function"!=typeof e&&("number"!=typeof e||Number.isFinite(e)),"Expected a JSON-serializable value, binary data, or a stream"),contentType:n2().min(1).optional(),contentEncoding:n2().trim().min(1).optional()}),f_=iz({...uB,doNotRetryTimeouts:iR().optional()});let fE=class KeyValueStoreClient extends u3{constructor(e){super({resourcePath:"key-value-stores",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(pa(),{},t,r)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="long",signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(pa(),e,r,n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}listKeys(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t=this;let{chunkSize:r,timeoutSecs:n="medium",signal:i,...o}=lV(e,fm,"KeyValueClientListKeysOptions"),a=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l8(await t.httpClient.call({url:t.buildUrl("keys"),method:"GET",params:t.buildParams(e),timeoutSecs:n,signal:i}),pl())},s=a({...o,limit:ul(o.limit,r)});return Object.defineProperty(s,Symbol.asyncIterator,{value:async function*(){let e=await s;yield*e.items;let t=o.limit?o.limit-e.items.length:void 0;for(;e.items.length>0&&null!=e.nextExclusiveStartKey&&(void 0===t||t>0);){let n={...o,limit:ul(t,r),exclusiveStartKey:e.nextExclusiveStartKey};e=await a(n),yield*e.items,t&&(t-=e.items.length)}}})}async getRecordPublicUrl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fg);let{timeoutSecs:r="long",signal:n}=lV(t,uF,"TimeoutOptions"),i=await this.get({timeoutSecs:r,signal:n}),o=new URL(this.buildPublicUrl(["records",e]));if(i?.urlSigningSecretKey){let t=await u_(i.urlSigningSecretKey,e);o.searchParams.append("signature",t)}return o.toString()}async createKeysPublicUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="long",signal:r,expiresInSecs:n,...i}=lV(e,fy,"KeyValueClientCreateKeysUrlOptions"),o=await this.get({timeoutSecs:t,signal:r}),a=new URL(this.buildPublicUrl("keys"));if(o?.urlSigningSecretKey){let e=await uE({resourceId:o.id,urlSigningSecretKey:o.urlSigningSecretKey,expiresInMillis:n?1e3*n:void 0});a.searchParams.set("signature",e)}return(a=uc(a,i)).toString()}async recordExists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{timeoutSecs:r="long",signal:n}=lV(t,uF,"TimeoutOptions"),i={url:this.buildUrl(["records",e]),method:"HEAD",params:this.buildParams(),timeoutSecs:r,signal:n};try{return await this.httpClient.call(i),!0}catch(e){l7(e)}return!1}async getRecord(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fb);let r=lV(t,fv,"KeyValueClientGetRecordOptions");if(r.stream&&!lC.isNode)throw Error("The stream option can only be used in Node.js environment.");"disableRedirect"in r&&oj.deprecated("The disableRedirect option for getRecord() is deprecated. It has no effect and will be removed in the following major release.");let n={attachment:"true"};r.signature&&(n.signature=r.signature);let i={url:this.buildUrl(["records",e]),method:"GET",params:this.buildParams(n),timeoutSecs:r.timeoutSecs??"long",signal:r.signal};r.buffer&&(i.responseType="buffer"),r.stream&&(i.responseType="stream");try{let t=await this.httpClient.call(i);return{key:e,value:t.data,contentType:t.headers["content-type"]}}catch(e){l7(e)}}async setRecord(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fw);let r=lV(t,f_,"KeyValueStoreRecordOptions"),{key:n,contentEncoding:i}=e,{value:o,contentType:a}=e,{timeoutSecs:s="long",signal:l,doNotRetryTimeouts:u}=r;if(void 0!==i&&!lC.isNode)throw Error("The contentEncoding option can only be used in Node.js environment.");let c=ua(o)||un(o)||ui(o);if(void 0!==i&&"identity"!==i.trim().toLowerCase()&&!c)throw TypeError(`Cannot upload a value of type ${typeof o} with Content-Encoding: ${i}. An encoding other than identity declares the value is already compressed, so pass the compressed bytes as a Buffer, an ArrayBuffer, a typed array, a Blob, or a readable stream.`);if(a||(a=ui(o)?o.type||"application/octet-stream":c?"application/octet-stream":"string"==typeof o?"text/plain; charset=utf-8":"application/json; charset=utf-8"),a.startsWith("application/json")&&!c&&"string"!=typeof o)try{o=JSON.stringify(o,null,2)}catch(e){throw Error(`The record value cannot be stringified to JSON. Please provide other content type.
|
|
67
|
+
Cause:${e.stack}`)}};function uJ(e,t){let r=t.toLowerCase(),n=Object.keys(e).find(e=>e.toLowerCase()===r);return void 0===n?void 0:e[n]}function uY(e,t){let r={...e};for(let[e,n]of Object.entries(t??{})){for(let t of Object.keys(r))t.toLowerCase()===e.toLowerCase()&&delete r[t];r[e]=n}return r}function uX(e,t){let r=t.toLowerCase();for(let t of Object.keys(e))t.toLowerCase()===r&&delete e[t]}function uQ(e){return e?.split(";",1)[0].trim().toLowerCase()}function u0(e,t){return"function"==typeof t?t.toString():t}function u1(e){return!!Array.isArray(e)||"object"==typeof e&&null!==e&&!(e instanceof Date)&&!un(e)}let u2=class AxiosHttpClient extends uG{axios;httpAgent;httpsAgent;#g;constructor(e={}){for(let t of(super(e),this.axios=lp.create({proxy:!1,validateStatus:null,transformRequest:[],transformResponse:[],responseType:"arraybuffer",maxBodyLength:1/0,maxContentLength:-1}),this.axios.defaults.headers=new lS,e.requestInterceptors??[]))this.axios.interceptors.request.use(t)}isTimeoutError(e){return!!super.isTimeoutError(e)||lp.isAxiosError(e)&&(e.code===lf.ECONNABORTED||e.code===lf.ETIMEDOUT)}isRetryableTransportError(e){return!!lp.isAxiosError(e)&&"object"==typeof e.request&&null!==e.request&&null!=e.config}async close(){await this.#g?.catch(()=>{}),this.httpAgent?.destroy(),this.httpsAgent?.destroy()}async sendRequest(e){await this.#y();let{method:t,url:r,headers:n,body:i,timeoutMillis:o,stream:a,followRedirects:s,signal:l}=e,u=!s&&!lC.isNode,c=await this.axios.request({method:t,url:r,headers:u?{"User-Agent":null,...n}:n,data:i,timeout:o??0,signal:l,responseType:a?"stream":"arraybuffer",...ua(i)||!s?{maxRedirects:0}:{},...u?{adapter:"fetch"}:{}});if(u&&0===c.status)throw new lk(`${t} ${r} responded with a redirect, which the client does not follow.`);return{status:c.status,headers:lS.from(c.headers).toJSON(),body:c.data}}async #y(){return this.#g??=this.#b(),this.#g}async #b(){let e=await lC.createHttpAgents({timeoutMillis:this.timeoutMaxMillis});e&&(this.httpAgent=e.httpAgent,this.httpsAgent=e.httpsAgent,this.axios.defaults.httpAgent=this.httpAgent,this.axios.defaults.httpsAgent=this.httpsAgent)}};let u4=class ApiClient{id;safeId;baseUrl;publicBaseUrl;resourcePath;url;apifyClient;httpClient;params;constructor(e){let{baseUrl:t,publicBaseUrl:r,apifyClient:n,httpClient:i,resourcePath:o,id:a,params:s={}}=e;this.id=a,this.safeId=a&&this.toSafeId(a),this.baseUrl=t,this.publicBaseUrl=r,this.resourcePath=o,this.url=a?`${t}/${o}/${ud(this.safeId)}`:`${t}/${o}`,this.apifyClient=n,this.httpClient=i,this.params=s}subResourceOptions(e){return{...{baseUrl:this.buildUrl(),publicBaseUrl:this.publicBaseUrl,apifyClient:this.apifyClient,httpClient:this.httpClient,params:this.buildParams()},...e}}buildUrl(e){return e?`${this.url}/${uf(e)}`:this.url}buildPublicUrl(e){let t=this.id?`${this.publicBaseUrl}/${this.resourcePath}/${ud(this.safeId)}`:`${this.publicBaseUrl}/${this.resourcePath}`;return e?`${t}/${uf(e)}`:t}buildParams(e){return{...this.params,...e}}toSafeId(e){return e.replaceAll("/","~")}listPaginatedFromCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{chunkSize:r,...n}=t,i=ul(t.limit,r),o=e({...n,limit:i}),a=(e,t)=>{let r=Math.max(e.count??0,e.items.length);return t?Math.min(r,t):r};return Object.defineProperty(o,Symbol.asyncIterator,{value:async function*(){let s=await o;yield*s.items;let l=a(s,i),u=(t.offset??0)+l,c=t.limit?t.limit-l:void 0;for(;l>0&&(void 0===c||c>0);){let t=ul(c,r),i={...n,limit:t,offset:u};s=await e(i),yield*s.items,u+=l=a(s,t),void 0!==c&&(c-=l)}}})}};let u3=class ResourceClient extends u4{timeoutForWaitForFinish(e,t,r){if(void 0!==e)return e;if(void 0===r)return t;let n=Math.min(r,60);return n<=0?t:n+this.httpClient.timeoutMillis[t]/1e3}async getResource(e,t,r,n){let i={url:this.buildUrl(),method:"GET",params:this.buildParams(t),timeoutSecs:r,signal:n};try{let t=await this.httpClient.call(i);return l8(t,e)}catch(e){ue(e,this.id)}}async updateResource(e,t,r,n){return l8(await this.httpClient.call({url:this.buildUrl(),method:"PUT",params:this.buildParams(),data:t,timeoutSecs:r,signal:n}),e)}async deleteResource(e,t){try{await this.httpClient.call({url:this.buildUrl(),method:"DELETE",params:this.buildParams(),timeoutSecs:e,signal:t})}catch(e){ue(e,this.id)}}async waitForJobFinish(e){let t,r,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{waitSecs:o=999999,timeoutSecs:a="noTimeout",signal:s}=i,l=1e3*o,u=Date.now(),c=()=>{let e=Date.now();return!(e-u>=l)&&(void 0===r||!(e-r>=3e3))&&!(t&&oc.includes(t.status))};for(;;){let i=Math.max(0,Math.round((l-(Date.now()-u))/1e3)),o={url:this.buildUrl(),method:"GET",params:this.buildParams({waitForFinish:i}),timeoutSecs:a,signal:s};try{let n=await this.httpClient.call(o);t=l8(n,e),r=void 0}catch(e){l7(e),t=void 0,r??=Date.now(),n=e}if(!c())break;await uh(250,s),s?.throwIfAborted()}if(!t)throw n;return t}};function u9(e){return rZ(n3,e)}function u6(e){return new iP({type:"date",coerce:!0,...ea(e)})}function u5(e){let t;return()=>t??=e()}let u8=u5(()=>ij({total:iS().min(0),offset:iS().min(0),limit:iS().min(1),desc:iR(),count:iS().min(0)})),u7=u5(()=>ij({totalBuilds:iS().optional(),totalRuns:iS().optional(),totalUsers:iS().optional(),totalUsers7Days:iS().optional(),totalUsers30Days:iS().optional(),totalUsers90Days:iS().optional(),totalMetamorphs:iS().optional(),lastRunStartedAt:u9({offset:!0}).pipe(u6()).optional(),actorReviewCount:iS().optional(),actorReviewRating:i_().optional(),bookmarkCount:iS().optional(),publicActorRunStats30Days:ij({ABORTED:iS().optional(),FAILED:iS().optional(),SUCCEEDED:iS().optional(),"TIMED-OUT":iS().optional(),TOTAL:iS().optional()}).optional()})),ce=u5(()=>ij({id:n2(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),name:n2(),username:n2(),title:n2().optional(),stats:u7().nullable().optional()})),ct=u5(()=>u8().extend({items:iN(ce())})),cr=u5(()=>iK(["LIMITED_PERMISSIONS","FULL_PERMISSIONS"]).or(n2())),cn=u5(()=>iK(["BASE64","TEXT"]).or(n2())),ci=u5(()=>ij({format:cn().optional(),content:n2().optional(),name:n2()})),co=u5(()=>ij({name:n2(),folder:iR()})),ca=u5(()=>iN(i$([ci(),co()]))),cs=u5(()=>ij({build:n2().optional(),timeoutSecs:iS().optional(),memoryMbytes:iS().optional(),restartOnError:iR().nullable().optional(),maxItems:iS().nullable().optional(),maxTotalChargeUsd:i_().nullable().optional(),isMaxTotalChargeUsdSetByUser:iR().nullable().optional(),forcePermissionLevel:cr().nullable().optional()})),cl=u5(()=>ij({isEnabled:iR().nullable().optional(),desiredRequestsPerActorRun:iS().nullable().optional(),maxRequestsPerActorRun:iS().nullable().optional(),idleTimeoutSecs:iS().nullable().optional(),build:n2().nullable().optional(),memoryMbytes:iS().nullable().optional(),disableStandbyFieldsOverride:iR().nullable().optional(),shouldPassActorInput:iR().nullable().optional(),tenancy:iK(["SINGLE_TENANT","MULTI_TENANT"]).or(n2()).nullable().optional(),isConsoleAuthEnabled:iR().nullable().optional(),isTokenlessEnabled:iR().nullable().optional()})),cu=u5(()=>ij({body:n2().optional(),contentType:n2().optional()})),cc=u5(()=>iK(["SOURCE_FILES","GIT_REPO","TARBALL","GITHUB_GIST","SOURCE_CODE"]).or(n2())),cp=u5(()=>ij({name:n2(),value:n2().optional(),isSecret:iR().nullable().optional(),valueHash:n2().optional()})),cd=u5(()=>ij({versionNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/),sourceType:cc().nullable(),envVars:iN(cp()).nullable().optional(),applyEnvVarsToBuild:iR().nullable().optional(),buildTag:n2().nullable().optional(),sourceFiles:ca().optional(),gitRepoUrl:n2().nullable().optional(),tarballUrl:n2().nullable().optional(),gitHubGistUrl:n2().nullable().optional(),actorPath:n2().min(1).max(255).nullable().optional(),githubWebhookId:iS().nullable().optional(),gitlabWebhookId:iS().nullable().optional(),bitbucketWebhookId:n2().nullable().optional()})),cf=u5(()=>ij({apifyMarginPercentage:i_(),createdAt:u9({offset:!0}).pipe(u6()),startedAt:u9({offset:!0}).pipe(u6()),notifiedAboutFutureChangeAt:u9({offset:!0}).pipe(u6()).nullable().optional(),notifiedAboutChangeAt:u9({offset:!0}).pipe(u6()).nullable().optional(),notifiedAboutRentalToPpePriceChangeAt:u9({offset:!0}).pipe(u6()).nullable().optional(),reasonForChange:n2().nullable().optional(),isPriceChangeNotificationSuppressed:iR().optional(),forceContainsSignificantPriceChange:iR().optional()})),ch=u5(()=>ij({tieredEventPriceUsd:i_()})),cm=u5(()=>iW(n2(),ch())),cg=u5(()=>ij({eventTitle:n2(),eventDescription:n2(),eventPriceUsd:i_().optional(),eventTieredPricingUsd:cm().optional(),isPrimaryEvent:iR().optional(),isOneTimeEvent:iR().nullable().optional()})),cy=u5(()=>cf().extend({pricingModel:iV("PAY_PER_EVENT"),pricingPerEvent:ij({actorChargeEvents:iW(n2(),cg()).optional()}),minimalMaxTotalChargeUsd:i_().nullable().optional(),isPPEPlatformUsagePaidByUser:iR().nullable().optional()})),cb=u5(()=>ij({tieredPricePerUnitUsd:i_()})),cv=u5(()=>iW(n2(),cb())),cw=u5(()=>cf().extend({pricingModel:iV("PRICE_PER_DATASET_ITEM"),unitName:n2(),pricePerUnitUsd:i_().optional(),tieredPricing:cv().optional()})),c_=u5(()=>cf().extend({pricingModel:iV("FLAT_PRICE_PER_MONTH"),trialMinutes:iS(),pricePerUnitUsd:i_()})),cE=u5(()=>cf().extend({pricingModel:iV("FREE")})),cS=u5(()=>iB("pricingModel",[cy(),cw(),c_(),cE()])),cO=u5(()=>ij({buildId:n2().optional(),buildNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).nullable().optional(),buildNumberInt:iS().optional(),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional()})),cR=u5(()=>iW(n2(),cO().nullable())),cT=u5(()=>iK(["NONE","RESIDENTIAL_PROXY_REQUIRED","UNDER_MAINTENANCE"]).or(n2()).nullable()),cA=u5(()=>ij({id:n2(),userId:n2(),name:n2(),username:n2(),description:n2().nullable().optional(),restartOnError:iR().nullable().optional(),isPublic:iR(),actorPermissionLevel:cr().optional(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),stats:u7(),versions:iN(cd()),pricingInfos:iN(cS()).optional(),defaultRunOptions:cs(),exampleRunInput:cu().nullable().optional(),isDeprecated:iR().nullable().optional(),deploymentKey:n2().optional(),title:n2().nullable().optional(),taggedBuilds:cR().nullable().optional(),actorStandby:cl().nullable().optional(),readmeSummary:n2().optional(),seoTitle:n2().nullable().optional(),seoDescription:n2().nullable().optional(),pictureUrl:n2().nullable().optional(),standbyUrl:n2().nullable().optional(),notice:cT().optional(),categories:iN(n2()).optional(),isCritical:iR().optional(),isGeneric:iR().optional(),isSourceCodeHidden:iR().optional(),hasNoDataset:iR().optional()})),cx=u5(()=>ij({total:iS(),items:iN(cd())})),cC=u5(()=>ij({total:iS(),items:iN(cp())})),ck=u5(()=>iK(["ACTOR.BUILD.ABORTED","ACTOR.BUILD.CREATED","ACTOR.BUILD.FAILED","ACTOR.BUILD.SUCCEEDED","ACTOR.BUILD.TIMED_OUT","ACTOR.RUN.ABORTED","ACTOR.RUN.CREATED","ACTOR.RUN.FAILED","ACTOR.RUN.RESURRECTED","ACTOR.RUN.SUCCEEDED","ACTOR.RUN.TIMED_OUT","TEST"]).or(n2())),cP=u5(()=>ij({actorId:n2().nullable().optional(),actorTaskId:n2().nullable().optional(),actorRunId:n2().nullable().optional()})),cU=u5(()=>ij({userIntegrationId:n2().optional(),channelId:n2().optional(),messageTemplate:n2().optional()})),cI=u5(()=>ij({fields:iN(n2()).optional(),omit:iN(n2()).optional()})),cN=u5(()=>ij({userIntegrationId:n2().optional(),emailTo:iN(n2()).optional(),subject:n2().optional(),body:n2().optional(),attachmentFormat:n2().optional(),attachmentTransformation:cI().optional()})),cL=u5(()=>ij({userIntegrationId:n2().optional(),filename:n2().optional(),format:n2().nullable().optional(),transformation:cI().optional()})),cz=u5(()=>ij({userIntegrationId:n2().optional(),repository:n2().optional(),title:n2().optional(),body:n2().optional()})),cj=u5(()=>iK(["ACTIVE","SUCCEEDED","FAILED"]).or(n2())),cD=u5(()=>ij({status:cj(),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),removedAt:u9({offset:!0}).pipe(u6()).nullable().optional()})),c$=u5(()=>ij({totalDispatches:iS().optional()})),cM=u5(()=>ij({id:n2(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),userId:n2(),isAdHoc:iR().nullable().optional(),isEnabled:iR().optional(),actionType:n2().optional(),isApifyIntegration:iR().nullable().optional(),shouldInterpolateStrings:iR().nullable().optional(),eventTypes:iN(ck()),condition:cP(),ignoreSslErrors:iR(),doNotRetry:iR().nullable().optional(),requestUrl:ir({normalize:!0}).nullable().optional(),payloadTemplate:n2().nullable().optional(),headersTemplate:n2().nullable().optional(),title:n2().nullable().optional(),description:n2().nullable().optional(),slackMessage:cU().optional(),googleMail:cN().optional(),googleDrive:cL().optional(),githubIssue:cz().optional(),lastDispatch:cD().nullable().optional(),stats:c$().nullable().optional()})),cB=u5(()=>iK(["READY","RUNNING","SUCCEEDED","FAILED","TIMING-OUT","TIMED-OUT","ABORTING","ABORTED"]).or(n2())),cF=u5(()=>iK(["DEVELOPMENT","WEB","API","SCHEDULER","TEST","WEBHOOK","ACTOR","CLI","CI","STANDBY","MCP"]).or(n2())),cq=u5(()=>ij({origin:cF(),clientIp:n2().optional(),userAgent:n2().optional(),githubActionsRunUrl:n2().optional(),actorRunId:n2().optional(),webhookDispatchId:n2().optional()})),cW=u5(()=>ij({id:n2(),actId:n2().optional(),userId:n2().optional(),status:cB(),startedAt:u9({offset:!0}).pipe(u6()),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),usageTotalUsd:i_().optional(),buildNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),buildNumberInt:iS().optional(),meta:cq().optional()})),cZ=u5(()=>u8().extend({items:iN(cW())})),cK=u5(()=>ij({durationMillis:iS().optional(),runTimeSecs:i_().optional(),computeUnits:i_().optional(),imageSizeBytes:iS().nullable().optional()})),cH=u5(()=>ij({useCache:iR().nullable().optional(),betaPackages:iR().nullable().optional(),memoryMbytes:iS().nullable().optional(),diskMbytes:iS().nullable().optional(),tag:n2().nullable().optional(),debug:iR().nullable().optional()})),cV=u5(()=>ij({ACTOR_COMPUTE_UNITS:i_().nullable().optional()})),cG=u5(()=>ij({templateId:n2().optional(),generatedBy:n2().optional()})),cJ=u5(()=>ij({actorSpecification:iV(1).optional(),name:n2().optional(),title:n2().optional(),description:n2().optional(),version:n2().regex(/^[0-9]+(\.[0-9]+)+$/).optional(),buildTag:n2().optional(),meta:cG().optional(),environmentVariables:iW(n2(),n2()).optional(),dockerfile:n2().optional(),dockerContextDir:n2().optional(),readme:n2().nullable().optional(),input:iW(n2(),ix()).nullable().optional(),output:iW(n2(),ix()).nullable().optional(),changelog:n2().nullable().optional(),storages:ij({dataset:iW(n2(),ix()).optional(),datasets:iW(n2(),iW(n2(),ix())).optional(),keyValueStore:iW(n2(),ix()).optional()}).optional(),defaultMemoryMbytes:i$([n2(),iS()]).optional(),minMemoryMbytes:iS().min(128).optional(),maxMemoryMbytes:iS().min(128).optional(),usesStandbyMode:iR().optional(),webServerSchema:iW(n2(),ix()).optional(),webServerMcpPath:n2().optional()})),cY=u5(()=>ij({id:n2(),actId:n2(),userId:n2(),startedAt:u9({offset:!0}).pipe(u6()),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),status:cB(),meta:cq(),stats:cK().nullable().optional(),options:cH().nullable().optional(),usage:cV().nullable().optional(),usageTotalUsd:i_().nullable().optional(),usageUsd:cV().nullable().optional(),inputSchema:n2().nullable().optional(),readme:n2().nullable().optional(),changelog:n2().nullable().optional(),exitCode:iS().nullable().optional(),gitCommitId:n2().optional(),gitBranchName:n2().optional(),createdByOrganizationMemberUserId:n2().optional(),buildNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),imageDigest:n2().nullable().optional(),actVersion:ij({sourceType:cc().optional(),buildTag:n2().nullable().optional(),versionNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/).optional(),gitRepoUrl:n2().optional(),sourceFiles:iN(ci()).optional(),gitHubGistUrl:n2().optional(),tarballUrl:n2().optional(),actorPath:n2().nullable().optional()}).optional(),actorDefinition:cJ().nullable().optional()})),cX=u5(()=>ij({origin:cF(),clientIp:n2().nullable().optional(),userAgent:n2().nullable().optional(),scheduleId:n2().nullable().optional(),scheduledAt:u9({offset:!0}).pipe(u6()).nullable().optional(),actorRunId:n2().optional(),webhookDispatchId:n2().optional(),scheduledAct2Id:n2().optional(),scheduledActorTaskId:n2().optional()})),cQ=u5(()=>ij({deployment:iK(["SINGLE_TENANT","MULTI_TENANT_OWNER_PAID","MULTI_TENANT_FREE_USERS","MULTI_TENANT_PAYING_USERS"]).or(n2())})),c0=u5(()=>ij({id:n2(),actId:n2(),userId:n2().optional(),actorTaskId:n2().nullable().optional(),status:cB(),startedAt:u9({offset:!0}).pipe(u6()),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),buildId:n2(),buildNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).optional(),buildNumberInt:iS().optional(),meta:cX(),usageTotalUsd:i_(),defaultKeyValueStoreId:n2(),defaultDatasetId:n2(),defaultRequestQueueId:n2(),standby:cQ().nullable().optional()})),c1=u5(()=>u8().extend({items:iN(c0())})),c2=u5(()=>ij({inputBodyLen:iS().min(0).nullable().optional(),migrationCount:iS().min(0).optional(),rebootCount:iS().min(0).optional(),restartCount:iS().min(0).optional(),resurrectCount:iS().min(0).optional(),memAvgBytes:i_().optional(),memMaxBytes:iS().min(0).optional(),memCurrentBytes:iS().min(0).optional(),cpuAvgUsage:i_().optional(),cpuMaxUsage:i_().optional(),cpuCurrentUsage:i_().optional(),netRxBytes:iS().min(0).optional(),netTxBytes:iS().min(0).optional(),durationMillis:iS().min(0).optional(),runTimeSecs:i_().min(0).optional(),metamorph:iS().min(0).optional(),computeUnits:i_().min(0).optional()})),c4=u5(()=>ij({eventTotalUsd:i_(),eventTitle:n2()})),c3=u5(()=>ij({platform:n2().optional(),appId:n2().optional(),isAiTool:iR().optional()})),c9=u5(()=>ij({build:n2(),timeoutSecs:iS().min(0),memoryMbytes:iS().min(128).max(32768),diskMbytes:iS().min(0),restartOnError:iR().nullable().optional(),maxItems:iS().min(0).nullable().optional(),maxTotalChargeUsd:i_().min(0).nullable().optional(),isMaxTotalChargeUsdSetByUser:iR().optional()})),c6=u5(()=>iK(["ANYONE_WITH_ID_CAN_READ","ANYONE_WITH_NAME_CAN_READ","FOLLOW_USER_SETTING","RESTRICTED"]).or(n2())),c5=u5(()=>ij({ACTOR_COMPUTE_UNITS:i_().nullable().optional(),DATASET_READS:iS().nullable().optional(),DATASET_WRITES:iS().nullable().optional(),KEY_VALUE_STORE_READS:iS().nullable().optional(),KEY_VALUE_STORE_WRITES:iS().nullable().optional(),KEY_VALUE_STORE_LISTS:iS().nullable().optional(),REQUEST_QUEUE_READS:iS().nullable().optional(),REQUEST_QUEUE_WRITES:iS().nullable().optional(),DATA_TRANSFER_INTERNAL_GBYTES:i_().nullable().optional(),DATA_TRANSFER_EXTERNAL_GBYTES:i_().nullable().optional(),PROXY_RESIDENTIAL_TRANSFER_GBYTES:i_().nullable().optional(),PROXY_SERPS:iS().nullable().optional(),PROXY_UNBLOCKER_UNITS:i_().nullable().optional()})),c8=u5(()=>ij({ACTOR_COMPUTE_UNITS:i_().nullable().optional(),DATASET_READS:i_().nullable().optional(),DATASET_WRITES:i_().nullable().optional(),KEY_VALUE_STORE_READS:i_().nullable().optional(),KEY_VALUE_STORE_WRITES:i_().nullable().optional(),KEY_VALUE_STORE_LISTS:i_().nullable().optional(),REQUEST_QUEUE_READS:i_().nullable().optional(),REQUEST_QUEUE_WRITES:i_().nullable().optional(),DATA_TRANSFER_INTERNAL_GBYTES:i_().nullable().optional(),DATA_TRANSFER_EXTERNAL_GBYTES:i_().nullable().optional(),PROXY_RESIDENTIAL_TRANSFER_GBYTES:i_().nullable().optional(),PROXY_SERPS:i_().nullable().optional(),PROXY_UNBLOCKER_UNITS:i_().nullable().optional()})),c7=u5(()=>ij({createdAt:u9({offset:!0}).pipe(u6()),actorId:n2(),buildId:n2(),inputKey:n2().nullable().optional(),buildTags:iN(n2()).optional()})),pe=u5(()=>ij({id:n2(),actId:n2(),userId:n2(),actorTaskId:n2().nullable().optional(),startedAt:u9({offset:!0}).pipe(u6()),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),status:cB(),statusMessage:n2().nullable().optional(),isStatusMessageTerminal:iR().nullable().optional(),meta:cX(),pricingInfo:cS().optional(),stats:c2(),chargedEventCounts:iW(n2(),iS()).optional(),accountedChargedEventCounts:iW(n2(),iS()).nullable().optional(),eventUsage:iW(n2(),c4()).optional(),externalChargedTotalUsd:i_().optional(),standby:cQ().nullable().optional(),integrationTracking:c3().optional(),createdByOrganizationMemberUserId:n2().optional(),consoleUrl:ir({normalize:!0}).optional(),output:iW(n2(),ir({normalize:!0})).optional(),options:c9(),buildId:n2(),exitCode:iS().nullable().optional(),generalAccess:c6().nullable().optional(),defaultKeyValueStoreId:n2(),defaultDatasetId:n2(),defaultRequestQueueId:n2(),storageIds:ij({datasets:ij({default:n2().optional()}).catchall(n2()).optional(),keyValueStores:ij({default:n2().optional()}).catchall(n2()).optional(),requestQueues:ij({default:n2().optional()}).catchall(n2()).optional()}).optional(),buildNumber:n2().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).nullable().optional(),containerUrl:ir({normalize:!0}).optional(),isContainerServerReady:iR().nullable().optional(),gitBranchName:n2().nullable().optional(),usage:c5().nullable().optional(),usageTotalUsd:i_().nullable().optional(),usageUsd:c8().nullable().optional(),metamorphs:iN(c7()).nullable().optional(),platformUsageBillingModel:n2().optional()})),pt=u5(()=>ij({readCount:iS().optional(),writeCount:iS().optional(),storageBytes:iS().optional(),inflatedBytes:iS().optional()})),pr=u5(()=>ij({id:n2(),name:n2().nullable().optional(),title:n2().nullable().optional(),userId:n2(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),accessedAt:u9({offset:!0}).pipe(u6()),itemCount:iS().min(0),cleanItemCount:iS().min(0),actId:n2().nullable().optional(),actRunId:n2().nullable().optional(),fields:iN(n2()).nullable().optional(),schema:iW(n2(),ix()).nullable().optional(),consoleUrl:ir({normalize:!0}),itemsPublicUrl:ir({normalize:!0}).optional(),urlSigningSecretKey:n2().nullable().optional(),generalAccess:c6().nullable().optional(),stats:pt().optional()})),pn=u5(()=>ij({min:i_().nullable().optional(),max:i_().nullable().optional(),nullCount:iS().nullable().optional(),emptyCount:iS().nullable().optional()})),pi=u5(()=>ij({fieldStatistics:iW(n2(),pn()).nullable().optional()})),po=u5(()=>ij({readCount:iS().optional(),writeCount:iS().optional(),deleteCount:iS().optional(),listCount:iS().optional(),s3StorageBytes:iS().optional(),storageBytes:iS().optional()})),pa=u5(()=>ij({id:n2(),name:n2().nullable().optional(),title:n2().nullable().optional(),userId:n2().nullable().optional(),username:n2().nullable().optional(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),accessedAt:u9({offset:!0}).pipe(u6()),actId:n2().nullable().optional(),actRunId:n2().nullable().optional(),consoleUrl:ir({normalize:!0}).optional(),keysPublicUrl:ir({normalize:!0}).optional(),recordsPublicUrl:ir({normalize:!0}).optional(),schema:iW(n2(),ix()).nullable().optional(),urlSigningSecretKey:n2().nullable().optional(),generalAccess:c6().nullable().optional(),stats:po().optional()})),ps=u5(()=>ij({key:n2(),size:iS(),recordPublicUrl:ir({normalize:!0})})),pl=u5(()=>ij({items:iN(ps()),count:iS(),limit:iS(),exclusiveStartKey:n2().nullable().optional(),isTruncated:iR(),nextExclusiveStartKey:n2().nullable().optional()})),pu=u5(()=>n2()),pc=u5(()=>n2()),pp=u5(()=>u9({offset:!0}).pipe(u6())),pd=u5(()=>u9({offset:!0}).pipe(u6())),pf=u5(()=>u9({offset:!0}).pipe(u6())),ph=u5(()=>iS().min(0)),pm=u5(()=>iS().min(0)),pg=u5(()=>iS()),py=u5(()=>iR()),pb=u5(()=>ij({deleteCount:iS().optional(),headItemReadCount:iS().optional(),readCount:iS().optional(),storageBytes:iS().optional(),writeCount:iS().optional()})),pv=u5(()=>ij({id:pu(),name:n2().nullable().optional(),title:n2().nullable().optional(),userId:pc(),actId:n2().nullable().optional(),actRunId:n2().nullable().optional(),createdAt:pp(),modifiedAt:pd(),accessedAt:pf(),totalRequestCount:ph(),handledRequestCount:pm(),pendingRequestCount:pg(),hadMultipleClients:py(),consoleUrl:ir({normalize:!0}),stats:pb().optional(),generalAccess:c6().nullable().optional()})),pw=u5(()=>n2()),p_=u5(()=>n2()),pE=u5(()=>iK(["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"]).or(n2())),pS=u5(()=>pE()),pO=u5(()=>iS()),pR=u5(()=>iW(n2(),ix())),pT=u5(()=>ij({uniqueKey:pw(),url:p_(),method:pS().optional(),retryCount:pO().optional(),loadedUrl:n2().nullable().optional(),payload:i$([n2(),iW(n2(),ix())]).nullable().optional(),headers:iW(n2(),ix()).nullable().optional(),userData:pR().optional(),noRetry:iR().nullable().optional(),errorMessages:iN(n2()).nullable().optional(),handledAt:u9({offset:!0}).pipe(u6()).nullable().optional()})),pA=u5(()=>n2()),px=u5(()=>u9({offset:!0}).pipe(u6())),pC=u5(()=>pT().extend({id:pA().optional(),lockExpiresAt:px().optional(),lockByClient:n2().optional()}).required({id:!0})),pk=u5(()=>ij({items:iN(pC()),limit:iS(),exclusiveStartId:n2().optional(),cursor:n2().optional(),nextCursor:n2().optional()})),pP=u5(()=>iR()),pU=u5(()=>iR()),pI=u5(()=>ij({requestId:pA(),wasAlreadyPresent:pP(),wasAlreadyHandled:pU()})),pN=u5(()=>ij({requestId:pA(),uniqueKey:pw(),wasAlreadyPresent:pP(),wasAlreadyHandled:pU()})),pL=u5(()=>ij({id:pA().optional(),uniqueKey:pw(),url:p_(),method:pS().optional()})),pz=u5(()=>ij({processedRequests:iN(pN()),unprocessedRequests:iN(pL())})),pj=u5(()=>ij({uniqueKey:pw().optional(),id:pA()})),pD=u5(()=>ij({uniqueKey:pw(),id:pA().optional()})),p$=u5(()=>i$([pj(),pD()])),pM=u5(()=>ij({processedRequests:iN(p$()),unprocessedRequests:iN(pL())})),pB=u5(()=>ij({unlockedCount:iS()})),pF=u5(()=>ij({lockExpiresAt:px()})),pq=u5(()=>iS()),pW=u5(()=>ij({id:pA(),uniqueKey:pw(),url:p_(),method:pS().optional(),retryCount:pO().optional()})),pZ=u5(()=>ij({limit:pq(),queueModifiedAt:pd(),hadMultipleClients:py(),items:iN(pW())})),pK=u5(()=>ij({id:pA(),uniqueKey:pw(),url:p_(),method:pS().optional(),retryCount:pO().optional(),lockExpiresAt:px()})),pH=u5(()=>ij({limit:pq(),queueModifiedAt:pd(),queueHasLockedRequests:iR().optional(),clientKey:n2().optional(),hadMultipleClients:py(),lockSecs:iS(),items:iN(pK())})),pV=u5(()=>ij({totalRuns:iS().optional(),lastRunStartedAt:u9({offset:!0}).pipe(u6()).nullable().optional()})),pG=u5(()=>ij({id:n2(),userId:n2(),actId:n2(),actName:n2().nullable().optional(),name:n2(),title:n2().nullable().optional(),username:n2().nullable().optional(),actUsername:n2().nullable().optional(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),stats:pV().nullable().optional(),isPublic:iR().optional()})),pJ=u5(()=>u8().extend({items:iN(pG())})),pY=u5(()=>ij({build:n2().nullable().optional(),timeoutSecs:iS().nullable().optional(),memoryMbytes:iS().nullable().optional(),maxItems:iS().nullable().optional(),maxTotalChargeUsd:i_().nullable().optional(),restartOnError:iR().nullable().optional(),isMaxTotalChargeUsdSetByUser:iR().nullable().optional(),forcePermissionLevel:cr().nullable().optional()})),pX=u5(()=>iW(n2(),ix())),pQ=u5(()=>ij({publishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),seoTitle:n2().max(60).nullable().optional(),seoDescription:n2().max(160).nullable().optional(),inputSchemaFields:iN(n2()).nullable().optional(),datasetName:n2().nullable().optional(),datasetView:n2().nullable().optional(),categorization:n2().nullable().optional(),highlightedFields:iN(n2()).nullable().optional(),faq:iN(ij({question:n2(),answer:n2()})).nullable().optional()})),p0=u5(()=>ij({id:n2(),userId:n2(),actId:n2(),name:n2(),nameLowerCase:n2().optional(),username:n2().nullable().optional(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),removedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),stats:pV().nullable().optional(),options:pY().nullable().optional(),input:i$([pX(),iN(pX())]).nullable().optional(),title:n2().nullable().optional(),description:n2().nullable().optional(),actorStandby:cl().nullable().optional(),standbyUrl:ir({normalize:!0}).nullable().optional(),isPublic:iR().optional(),publicConfig:pQ().nullable().optional()})),p1=u5(()=>ij({readCount:iS().optional(),writeCount:iS().optional(),deleteCount:iS().optional(),listCount:iS().optional(),s3StorageBytes:iS().optional()})),p2=u5(()=>ij({id:n2(),name:n2().nullable().optional(),title:n2().nullable().optional(),userId:n2().nullable().optional(),username:n2().nullable().optional(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),accessedAt:u9({offset:!0}).pipe(u6()),actId:n2().nullable().optional(),actRunId:n2().nullable().optional(),schema:i$([iW(n2(),ix()),n2()]).nullable().optional(),generalAccess:c6().nullable().optional(),stats:p1().optional()})),p4=u5(()=>u8().extend({unnamed:iR().optional(),items:iN(p2())})),p3=u5(()=>ij({id:n2(),name:n2().nullable().optional(),userId:n2(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),accessedAt:u9({offset:!0}).pipe(u6()),itemCount:iS(),cleanItemCount:iS(),actId:n2().nullable().optional(),actRunId:n2().nullable().optional(),title:n2().nullable().optional(),username:n2().optional(),generalAccess:c6().nullable().optional(),stats:pt().optional()})),p9=u5(()=>u8().extend({unnamed:iR().optional(),items:iN(p3())})),p6=u5(()=>ij({deleteCount:iS().optional(),headItemReadCount:iS().optional(),readCount:iS().optional(),writeCount:iS().optional(),s3StorageBytes:iS().optional(),dynamodbStorageBytes:iS().optional()})),p5=u5(()=>ij({id:pu(),name:n2().nullable().optional(),title:n2().nullable().optional(),userId:pc(),username:n2().optional(),createdAt:pp(),modifiedAt:pd(),accessedAt:pf(),expireAt:u9({offset:!0}).pipe(u6()).optional(),totalRequestCount:ph(),handledRequestCount:pm(),pendingRequestCount:pg(),actId:n2().nullable().optional(),actRunId:n2().nullable().optional(),hadMultipleClients:py(),generalAccess:c6().nullable().optional(),stats:p6().optional()})),p8=u5(()=>u8().extend({unnamed:iR().optional(),items:iN(p5())})),p7=u5(()=>ij({id:n2(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),userId:n2(),isAdHoc:iR().nullable().optional(),isApifyIntegration:iR().optional(),isEnabled:iR().optional(),actionType:n2().optional(),shouldInterpolateStrings:iR().nullable().optional(),eventTypes:iN(ck()),condition:cP(),ignoreSslErrors:iR(),doNotRetry:iR(),requestUrl:ir({normalize:!0}).nullable().optional(),headersTemplate:n2().nullable().optional(),title:n2().nullable().optional(),description:n2().nullable().optional(),slackMessage:cU().optional(),googleMail:cN().optional(),googleDrive:cL().optional(),githubIssue:cz().optional(),lastDispatch:cD().nullable().optional(),stats:c$().nullable().optional()})),de=u5(()=>u8().extend({items:iN(p7())})),dt=u5(()=>ij({_id:n2().optional(),actionType:n2().optional(),condition:cP().optional(),requestUrl:ir({normalize:!0}).nullable().optional(),isAdHoc:iR().optional(),isApifyIntegration:iR().nullable().optional(),slackMessage:cU().optional(),googleMail:cN().optional(),googleDrive:cL().optional(),githubIssue:cz().optional()})),dr=u5(()=>ij({id:n2(),userId:n2(),webhookId:n2(),createdAt:u9({offset:!0}).pipe(u6()),status:cj(),eventType:ck(),eventData:ij({actorId:n2(),actorRunId:n2().optional(),actorBuildId:n2().optional(),actorTaskId:n2().nullable().optional()}).nullable().optional(),webhook:dt().nullable().optional(),calls:iN(ij({startedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),finishedAt:u9({offset:!0}).pipe(u6()).nullable().optional(),errorMessage:n2().nullable().optional(),responseStatus:iS().nullable().optional(),responseBody:n2().nullable().optional(),debugPostMessage:iW(n2(),ix()).optional()})).optional()})),dn=u5(()=>u8().extend({items:iN(dr())})),di=u5(()=>ij({id:n2(),userId:n2(),name:n2(),cronExpression:n2(),timezone:n2(),isEnabled:iR(),isExclusive:iR(),createdAt:u9({offset:!0}).pipe(u6()),modifiedAt:u9({offset:!0}).pipe(u6()),nextRunAt:u9({offset:!0}).pipe(u6()).nullable().optional(),lastRunAt:u9({offset:!0}).pipe(u6()).nullable().optional()})),da=u5(()=>ij({email:iR().optional()})),ds=u5(()=>ij({id:n2(),type:iV("RUN_ACTOR"),actorId:n2()})),dl=u5(()=>ij({id:n2(),type:iV("RUN_ACTOR_TASK"),actorTaskId:n2()})),du=u5(()=>iB("type",[ds(),dl()])),dc=u5(()=>di().extend({title:n2().nullable().optional(),notifications:da().optional(),integrationTracking:c3().optional(),actions:iN(du())})),dp=u5(()=>u8().extend({items:iN(dc())})),dd=u5(()=>ij({body:n2().nullable().optional(),contentType:n2().nullable().optional()})),df=u5(()=>ij({version:iS().optional(),data:ij({cronExpression:n2().optional(),timezone:n2().optional()}).optional()}).nullable()),dh=u5(()=>ij({id:n2(),type:iV("RUN_ACTOR"),actorId:n2(),runInput:dd().nullable().optional(),runOptions:pY().nullable().optional()})),dm=u5(()=>ij({id:n2(),type:iV("RUN_ACTOR_TASK"),actorTaskId:n2(),input:iW(n2(),ix()).nullable().optional()})),dg=u5(()=>iB("type",[dh(),dm()])),dy=u5(()=>di().extend({description:n2().nullable().optional(),title:n2().nullable().optional(),notifications:da().optional(),uiState:df().optional(),integrationTracking:c3().optional(),actions:iN(dg())})),db=u5(()=>ij({message:n2(),level:n2(),createdAt:u9({offset:!0}).pipe(u6())})),dv=u5(()=>ij({pricingModel:n2(),apifyMarginPercentage:i_().optional(),createdAt:u9({offset:!0}).pipe(u6()).optional(),startedAt:u9({offset:!0}).pipe(u6()).optional(),notifiedAboutChangeAt:u9({offset:!0}).pipe(u6()).nullable().optional(),notifiedAboutFutureChangeAt:u9({offset:!0}).pipe(u6()).nullable().optional(),isPriceChangeNotificationSuppressed:iR().optional(),forceContainsSignificantPriceChange:iR().optional(),isPPEPlatformUsagePaidByUser:iR().optional(),reasonForChange:n2().nullable().optional(),minimalMaxTotalChargeUsd:i_().nullable().optional(),pricingPerEvent:iW(n2(),ix()).nullable().optional(),pricePerUnitUsd:i_().optional(),trialMinutes:iS().optional(),unitName:n2().optional(),tieredPricing:iW(n2(),ij({tieredPricePerUnitUsd:i_().optional()})).optional(),notifiedAboutRentalToPpePriceChangeAt:u9({offset:!0}).pipe(u6()).nullable().optional()})),dw=u5(()=>ij({id:n2(),title:n2(),name:n2(),username:n2(),userFullName:n2().nullable().optional(),description:n2().nullable().optional(),categories:iN(n2()).optional(),notice:cT().optional(),pictureUrl:n2().nullable().optional(),userPictureUrl:ir({normalize:!0}).nullable().optional(),url:ir({normalize:!0}).nullable().optional(),stats:u7(),currentPricingInfo:dv().optional(),isWhiteListedForAgenticPayments:iR().nullable().optional(),actorReviewCount:iS().optional(),actorReviewRating:i_().optional(),bookmarkCount:iS().optional(),badge:n2().nullable().optional(),readmeSummary:n2().optional(),inputSchema:ij({type:n2(),properties:iW(n2(),ij({type:i$([n2(),iN(n2())]).optional()})),required:iN(n2()).optional()}).optional()})),d_=u5(()=>u8().extend({items:iN(dw())})),dE=u5(()=>ij({bio:n2().nullable().optional(),readme:n2().nullable().optional(),name:n2().optional(),pictureUrl:ir({normalize:!0}).nullable().optional(),githubUsername:n2().nullable().optional(),websiteUrl:ir({normalize:!0}).nullable().optional(),twitterUsername:n2().nullable().optional()})),dS=u5(()=>ij({id:n2().optional(),name:n2(),description:n2().nullable(),availableCount:iS().optional()})),dO=u5(()=>ij({password:n2().nullable().optional(),groups:iN(dS())})),dR=u5(()=>iW(n2(),iS())),dT=u5(()=>ij({id:n2().optional(),description:n2().optional(),isEnabled:iR().optional(),monthlyBasePriceUsd:i_().optional(),monthlyUsageCreditsUsd:i_().optional(),usageDiscountPercent:i_().optional(),enabledPlatformFeatures:iN(n2()).optional(),maxMonthlyUsageUsd:i_().optional(),maxActorMemoryGbytes:i_().optional(),maxMonthlyActorComputeUnits:i_().optional(),maxMonthlyResidentialProxyGbytes:i_().optional(),maxMonthlyProxySerps:iS().optional(),maxMonthlyExternalDataTransferGbytes:i_().optional(),maxActorCount:iS().optional(),maxActorTaskCount:iS().optional(),dataRetentionDays:iS().optional(),availableProxyGroups:dR(),teamAccountSeatCount:iS().optional(),supportLevel:n2().optional(),availableAddOns:iN(n2()).optional(),tier:n2().optional(),apiRateLimitBoosts:iS().optional(),maxScheduleCount:iS().optional(),maxConcurrentActorRuns:iS().optional(),planPricing:iW(n2(),ix()).optional(),planVersion:i_().optional(),legacyPlanId:n2().optional(),planTags:iN(n2()).optional(),overageThresholdUsd:i_().optional(),maxMonthlyUnblockerUnits:iS().optional(),maxPublicActorTaskCount:iS().optional(),maxPublicActorTaskCountPerActor:iS().optional(),forceBillingInterval:n2().optional(),personalizedSupport:n2().nullable().optional(),monitoringLevel:iK(["STANDARD"]).or(n2()).nullable().optional(),isPayingCustomer:iR().optional()})),dA=u5(()=>ij({isEnabled:iR(),disabledReason:n2().nullable(),disabledReasonType:n2().nullable(),isTrial:iR(),trialExpirationAt:u9({offset:!0}).pipe(u6()).nullable()})),dx=u5(()=>ij({ACTORS:dA(),STORAGE:dA(),SCHEDULER:dA(),PROXY:dA(),PROXY_EXTERNAL_ACCESS:dA(),PROXY_RESIDENTIAL:dA(),PROXY_SERPS:dA(),WEBHOOKS:dA(),ACTORS_PUBLIC_ALL:dA(),ACTORS_PUBLIC_DEVELOPER:dA()})),dC=u5(()=>ij({id:n2().optional(),username:n2(),profile:dE().optional(),email:n2().nullable().optional(),proxy:dO().optional(),plan:dT().optional(),effectivePlatformFeatures:dx().optional(),createdAt:u9({offset:!0}).pipe(u6()).optional(),isPaying:iR().optional(),organizationOwnerUserId:n2().nullable().optional()})),dk=u5(()=>ij({startAt:u9({offset:!0}).pipe(u6()),endAt:u9({offset:!0}).pipe(u6())})),dP=u5(()=>ij({quantityAbove:i_(),discountPercent:i_(),tierQuantity:i_(),unitPriceUsd:i_(),priceUsd:i_()})),dU=u5(()=>ij({quantity:i_(),baseAmountUsd:i_(),baseUnitPriceUsd:i_().optional(),amountAfterVolumeDiscountUsd:i_().optional(),priceTiers:iN(dP()).optional()})),dI=u5(()=>iW(n2(),dU())),dN=u5(()=>iW(n2(),dU())),dL=u5(()=>ij({date:u9({offset:!0}).pipe(u6()),serviceUsage:dN(),totalUsageCreditsUsd:i_()})),dz=u5(()=>ij({usageCycle:dk(),monthlyServiceUsage:dI(),dailyServiceUsages:iN(dL()),totalUsageCreditsUsdBeforeVolumeDiscount:i_(),totalUsageCreditsUsdAfterVolumeDiscount:i_()})),dj=u5(()=>ij({maxMonthlyUsageUsd:i_(),maxMonthlyActorComputeUnits:i_(),maxMonthlyExternalDataTransferGbytes:i_(),maxMonthlyProxySerps:iS(),maxMonthlyResidentialProxyGbytes:i_(),maxActorMemoryGbytes:i_(),maxActorCount:iS(),maxActorTaskCount:iS(),maxConcurrentActorJobs:iS(),maxTeamAccountSeatCount:iS(),dataRetentionDays:iS(),maxScheduleCount:iS().optional(),maxMonthlyUnblockerUnits:i_().optional()})),dD=u5(()=>ij({monthlyUsageUsd:i_(),monthlyActorComputeUnits:i_(),monthlyExternalDataTransferGbytes:i_(),monthlyProxySerps:iS(),monthlyResidentialProxyGbytes:i_(),actorMemoryGbytes:i_(),actorCount:iS(),actorTaskCount:iS(),activeActorJobCount:iS(),teamAccountSeatCount:iS(),scheduleCount:iS().optional(),monthlyUnblockerUnits:i_().optional()})),d$=u5(()=>ij({monthlyUsageCycle:dk(),limits:dj(),current:dD()})),dM=u5(()=>{let e=cY();return e.extend({actVersion:e.shape.actVersion.unwrap().extend({buildTag:n2().nullable().optional()}).optional()})}),dB=u5(()=>dy().extend({uiState:df().nullable().optional()})),dF=new Set(["actor-memory-limit-exceeded","concurrent-runs-limit-exceeded"]);async function dq(e,t,r,n){if(!t)return e();let i=!0===t?1/0:Date.now()+1e3*t;for(;;)try{return await e()}catch(o){if(!(o instanceof lI)||!dF.has(o.type??""))throw o;let e=i-Date.now();if(e<=0)throw o;let t=Math.min(1e4,e);r.info(`Not enough resources to start the run, retrying in ${Number((t/1e3).toPrecision(3))}s: ${o.message}`),await uh(t,n),n?.throwIfAborted()}}let dW=iz({raw:iR().optional(),...uB}),dZ=dW.extend({buffer:iR().optional()});let dK=class LogClient extends u3{constructor(e){super({resourcePath:"logs",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="long",signal:r,buffer:n,...i}=lV(e,dZ,"LogGetOptions"),o={url:this.buildUrl(),method:"GET",params:this.buildParams(i),timeoutSecs:t,signal:r};n&&(o.responseType="buffer");try{return(await this.httpClient.call(o)).data}catch(e){ue(e,this.id)}}async stream(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="long",signal:r,raw:n}=lV(e,dW,"LogOptions"),i={url:this.buildUrl(),method:"GET",params:this.buildParams({stream:!0,raw:n}),responseType:"stream",timeoutSecs:t,signal:r};try{return(await this.httpClient.call(i)).data}catch(e){ue(e,this.id)}}};let dH=class LoggerActorRedirect extends oR{constructor(e={}){super({skipTime:!0,level:N.DEBUG,...e})}_log(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(e>this.options.level)return;if(r||n)throw Error("Redirect logger does not use other arguments than level and message");let{prefix:o}=i;o=o?`${o}`:"";let a="";this.options.skipTime||(a=`${new Date().toISOString().replace("Z","").replace("T"," ")} `);let s=`${oC().gray(a)}${oC().cyan(o)}${t||""}`;return this._outputWithConsole(N.INFO,s),s}};let dV=class StreamedLog{#v;#w=[];#_=new TextDecoder;#E=/(?:\n|^)(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z)/g;#S;#O;#R;#T=null;#A=!1;#x=new AbortController;#C=new AbortController;constructor(e){let{toLog:t,logClient:r,fromStart:n=!0,signal:i}=e;this.#v=t,this.#O=r,this.#R=i,this.#S=n?null:new Date}start(){if(this.#T)throw Error("Streaming task already active");this.#A=!1,this.#x=new AbortController,this.#C=new AbortController,this.#T=this.#k()}async stop(){if(!this.#T)throw Error("Streaming task is not active");this.#A=!0,this.#C.abort();let e=this.#x,t=setTimeout(()=>e.abort(),1e3);try{await this.#T}catch(e){if(!(e instanceof Error&&"AbortError"===e.name))throw e}finally{clearTimeout(t),this.#T=null}}async #k(){let e=this.#R?AbortSignal.any([this.#R,this.#x.signal]):this.#x.signal;try{let t,r=500;for(;!t;){let n;if(this.#A){let r=await this.#O.get({raw:!0,signal:this.#R});t=await this.#P([new TextEncoder().encode(r??"")],e);break}try{n=await this.#O.stream({raw:!0,signal:e})}catch(e){if(this.#A&&!this.#R?.aborted)continue;throw e}if(!n)return;if(this.#A){n.destroy();continue}(t=await this.#P(n,e))||(await uh(r,AbortSignal.any([e,this.#C.signal])),r=Math.min(2*r,5e3))}let n=this.#_.decode(t).trim();n.length&&this.#v.info(n)}catch(t){if(e.aborted)return;oj.warning("Log redirection stopped due to error",t)}}async #P(e,t){let r;try{for await(let t of e){r??=new Uint8Array;let e=new Uint8Array(r.length+t.length);e.set(r,0),e.set(t,r.length);let n=e.lastIndexOf(10);if(r=e.slice(n),this.#w.push(e.slice(0,n)),this.#U(),this.#A)break}}catch(e){if(!t.aborted)throw e}return r}#U(){let e=this.#_.decode(function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}(this.#w)).split(this.#E).slice(1),t=e.filter((e,t)=>t%2==0),r=e.filter((e,t)=>t%2!=0);this.#w=[],t.forEach((e,t)=>{let n=r[t];this.#S&&new Date(e)<this.#S||this.#v.info((e+n).trim())})}};let dG=iz({waitForFinish:i_().optional(),...uB}),dJ=iz({waitSecs:i_().optional(),...uB});let dY=class BuildClient extends u3{constructor(e){super({resourcePath:"actor-builds",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t,signal:r,...n}=lV(e,dG,"BuildClientGetOptions");return this.getResource(dM(),n,this.timeoutForWaitForFinish(t,"short",n.waitForFinish),r)}async abort(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return l8(await this.httpClient.call({url:this.buildUrl("abort"),method:"POST",params:this.buildParams(),timeoutSecs:t,signal:r}),dM())}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}async getOpenApiDefinition(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="medium",signal:r}=lV(e,uF,"TimeoutOptions");return(await this.httpClient.call({url:this.buildUrl("openapi.json"),method:"GET",params:this.buildParams(),timeoutSecs:t,signal:r})).data}async waitForFinish(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,dJ,"BuildClientWaitForFinishOptions");return this.waitForJobFinish(dM(),t)}log(){return new dK(this.subResourceOptions({resourcePath:"log"}))}};let dX=class ResourceCollectionClient extends u4{async listResources(e,t,r,n){return l8(await this.httpClient.call({url:this.buildUrl(),method:"GET",params:this.buildParams(t),timeoutSecs:r,signal:n}),e)}listUnpaginatedResources(e,t,r){let n=this.listResources(e,void 0,t,r);return Object.defineProperty(n,Symbol.asyncIterator,{async *value(){yield*(await n).items}})}listResourcesPaginated(e,t,r){let{timeoutSecs:n=r,signal:i,...o}=t;return this.listPaginatedFromCallback(async t=>this.listResources(e,t,n,i),o)}async createResource(e,t,r,n){return l8(await this.httpClient.call({url:this.buildUrl(),method:"POST",params:this.buildParams(),data:t,timeoutSecs:r,signal:n}),e)}async getOrCreateResource(e,t,r,n,i){return l8(await this.httpClient.call({url:this.buildUrl(),method:"POST",params:this.buildParams({name:t}),data:r,timeoutSecs:n,signal:i}),e)}};let dQ=iz({...uu,desc:iR().optional(),...uB});let d0=class BuildCollectionClient extends dX{constructor(e){super({...e,resourcePath:e.resourcePath||"actor-builds"})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,dQ,"BuildCollectionClientListOptions");return this.listResourcesPaginated(cZ(),t,"medium")}};let d1=[429,503],d2=/^(\d+)\.(\d+)\.(\d+)$/;function d4(e){let t=d2.exec(e??"");if(t)return[Number(t[1]),Number(t[2]),Number(t[3])]}let d3=iz({method:iK(["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"]).optional(),params:iW(n2(),ix()).optional(),headers:iW(n2(),n2()).optional(),data:ix().optional(),parentRequestId:n2().optional(),compression:uN.optional(),responseType:iK(["parsed","buffer","stream"]).optional(),...uB});let d9=class ActorServerClient extends u3{#I;constructor(e){super({resourcePath:"actors",...e})}async getUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions"),n=this.#I??=this.#N(t,r).then(e=>e.standbyUrl);try{return await n}catch(e){throw this.#I===n&&(this.#I=void 0),e}}async getOpenApiSpec(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions"),n=await this.#N(t,r),i=n.actorStandby?.build||"latest",o=n.taggedBuilds?.[i]?.buildId??void 0,a=d4(i);if(void 0===o&&void 0!==a)for await(let e of new d0(this.subResourceOptions({resourcePath:"builds"})).list({desc:!0,timeoutSecs:t,signal:r})){if(e.buildNumber===i){o=e.id;break}if(function(e,t){let r=d4(e);return void 0!==r&&r[0]===t[0]&&r[1]===t[1]&&r[2]<t[2]}(e.buildNumber,a))break}let s=void 0===o?void 0:await new dY({baseUrl:this.apifyClient.baseUrl,publicBaseUrl:this.apifyClient.publicBaseUrl,httpClient:this.httpClient,apifyClient:this.apifyClient,id:o}).get({timeoutSecs:t,signal:r});if(void 0===s)throw new lk(`Build ${i} of Actor ${this.id} does not exist.`);return s.actorDefinition?.webServerSchema}async request(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,n2());let{method:r="GET",params:n,headers:i,data:o,parentRequestId:a,compression:s,responseType:l,timeoutSecs:u="long",signal:c}=lV(t,d3,"ActorServerRequestOptions");if("stream"===l&&!lC.isNode)throw Error("The 'stream' response type can only be used in Node.js environment.");let p=await this.getUrl({signal:c}),d=e.split("#")[0].replace(/^\/+/,"");return this.httpClient.call({url:`${p.replace(/\/+$/,"")}/${d}`,method:r,params:n,headers:void 0===a?i:uY(i??{},{"X-Actor-Request-ID":a}),data:o,compression:void 0!==s&&uL(s),authorizationHeader:"X-Apify-Authorization",throwOnErrorStatus:!1,retryStatusCodes:d1,retryTransportErrors:!1,followRedirects:!1,responseType:l,timeoutSecs:u,signal:c})}async #N(e,t){let r=l8(await this.httpClient.call({url:this.buildUrl(),method:"GET",params:this.buildParams(),timeoutSecs:e,signal:t}),cA());if(!r.standbyUrl)throw new lk(`Actor ${this.id} is not a Server Actor.`);return this.#I=Promise.resolve(r.standbyUrl),r}};let d6=class ActorEnvVarClient extends u3{constructor(e){super({resourcePath:"env-vars",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(cp(),{},t,r)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(cp(),e,r,n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}};let d5=l9.optional();let d8=class ActorEnvVarCollectionClient extends dX{constructor(e){super({resourcePath:"env-vars",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.listUnpaginatedResources(cC(),t,r)}async create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,d5);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.createResource(cp(),e,r,n)}};var d7=((T={}).Active="ACTIVE",T.Succeeded="SUCCEEDED",T.Failed="FAILED",T),fe=((A={}).SourceFiles="SOURCE_FILES",A.GitRepo="GIT_REPO",A.Tarball="TARBALL",A.GitHubGist="GITHUB_GIST",A.SourceCode="SOURCE_CODE",A),ft=((x={}).RunActor="RUN_ACTOR",x.RunActorTask="RUN_ACTOR_TASK",x),fr=((C={}).Actors="ACTORS",C.Storage="STORAGE",C.ProxySERPS="PROXY_SERPS",C.Scheduler="SCHEDULER",C.Webhooks="WEBHOOKS",C.Proxy="PROXY",C.ProxyExternalAccess="PROXY_EXTERNAL_ACCESS",C);let fn=n2().min(1);let fi=class ActorVersionClient extends u3{constructor(e){super({resourcePath:"versions",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(cd(),{},t,r)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(cd(),e,r,n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}envVar(e){return lV(e,fn),new d6(this.subResourceOptions({id:e}))}envVars(){return new d8(this.subResourceOptions())}};let fo=l9.optional();let fa=class ActorVersionCollectionClient extends dX{constructor(e){super({resourcePath:"versions",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.listUnpaginatedResources(cx(),t,r)}async create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fo);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.createResource(cd(),e,r,n)}};var fs=((k={}).JSON="json",k.JSONL="jsonl",k.XML="xml",k.HTML="html",k.CSV="csv",k.XLSX="xlsx",k.RSS="rss",k);let fl=iK(fs),fu=i7(l3,"Expected an object"),fc=iz({clean:iR().optional(),desc:iR().optional(),flatten:iN(n2()).optional(),fields:iN(n2()).optional(),omit:iN(n2()).optional(),...uu,skipEmpty:iR().optional(),skipHidden:iR().optional(),unwind:iN(n2()).optional(),view:n2().optional(),signature:n2().optional(),...uB}),fp=iz({attachment:iR().optional(),bom:iR().optional(),clean:iR().optional(),delimiter:n2().optional(),desc:iR().optional(),flatten:iN(n2()).optional(),fields:iN(n2()).optional(),omit:iN(n2()).optional(),limit:i_().min(0).optional(),offset:i_().min(0).optional(),skipEmpty:iR().optional(),skipHeaderRow:iR().optional(),skipHidden:iR().optional(),unwind:iN(n2()).optional(),view:n2().optional(),xmlRoot:n2().optional(),xmlRow:n2().optional(),signature:n2().optional(),stream:iR().optional(),...uB}),fd=i$([fu,n2(),iN(fu)]),ff=iz({clean:iR().optional(),desc:iR().optional(),flatten:iN(n2()).optional(),fields:iN(n2()).optional(),format:fl.optional(),omit:iN(n2()).optional(),limit:i_().min(0).optional(),offset:i_().min(0).optional(),skipEmpty:iR().optional(),skipHidden:iR().optional(),unwind:iN(n2()).optional(),view:n2().optional(),expiresInSecs:i_().positive().optional(),...uB});let fh=class DatasetClient extends u3{constructor(e){super({resourcePath:"datasets",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(pr(),{},t,r)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(pr(),e,r,n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}listItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t=this;let{timeoutSecs:r="long",signal:n,...i}=lV(e,fc,"DatasetClientListItemOptions");return this.listPaginatedFromCallback(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=await t.httpClient.call({url:t.buildUrl("items"),method:"GET",params:t.buildParams(e),timeoutSecs:r,signal:n});return t.#L(i,e.desc??!1)},i)}async downloadItems(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fl);let{timeoutSecs:r="long",signal:n,stream:i,...o}=lV(t,fp,"DatasetClientDownloadItemsOptions");if(i&&!lC.isNode)throw Error("The stream option can only be used in Node.js environment.");let{data:a}=await this.httpClient.call({url:this.buildUrl("items"),method:"GET",params:this.buildParams({format:e,...o}),responseType:i?"stream":"buffer",timeoutSecs:r,signal:n});return a}async pushItems(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fd);let{timeoutSecs:r="medium",signal:n}=lV(t,uF,"TimeoutOptions");await this.httpClient.call({url:this.buildUrl("items"),method:"POST",headers:{"content-type":"application/json; charset=utf-8"},data:e,params:this.buildParams(),doNotRetryTimeouts:!0,timeoutSecs:r,signal:n})}async getStatistics(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return l8(await this.httpClient.call({url:this.buildUrl("statistics"),method:"GET",params:this.buildParams(),timeoutSecs:t,signal:r}),pi())}async createItemsPublicUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="long",signal:r,expiresInSecs:n,...i}=lV(e,ff,"DatasetClientCreateItemsUrlOptions"),o=await this.get({timeoutSecs:t,signal:r}),a=new URL(this.buildPublicUrl("items"));if(o?.urlSigningSecretKey){let e=await uE({resourceId:o.id,urlSigningSecretKey:o.urlSigningSecretKey,expiresInMillis:n?1e3*n:void 0});a.searchParams.set("signature",e)}return(a=uc(a,i)).toString()}#L(e,t){let r=e.headers["x-apify-pagination-desc"];return{items:e.data,total:Number(e.headers["x-apify-pagination-total"]),offset:Number(e.headers["x-apify-pagination-offset"]),count:Math.max(Number(e.headers["x-apify-pagination-count"]??0),e.data.length),limit:Number(e.headers["x-apify-pagination-limit"]),desc:"string"==typeof r?JSON.parse(r):t}}};let fm=iz({limit:i_().min(0).optional(),chunkSize:i_().positive().optional(),exclusiveStartKey:n2().optional(),collection:n2().optional(),prefix:n2().optional(),signature:n2().optional(),...uB}),fg=n2().min(1),fy=iz({limit:i_().min(0).optional(),exclusiveStartKey:n2().optional(),collection:n2().optional(),prefix:n2().optional(),expiresInSecs:i_().positive().optional(),...uB}),fb=n2(),fv=iz({buffer:iR().optional(),stream:iR().optional(),disableRedirect:iR().optional(),signature:n2().optional(),...uB}),fw=iz({key:n2(),value:i7(e=>void 0!==e&&"symbol"!=typeof e&&"bigint"!=typeof e&&"function"!=typeof e&&("number"!=typeof e||Number.isFinite(e)),"Expected a JSON-serializable value, binary data, or a stream"),contentType:n2().min(1).optional(),contentEncoding:n2().trim().min(1).optional()}),f_=iz({...uB,doNotRetryTimeouts:iR().optional()});let fE=class KeyValueStoreClient extends u3{constructor(e){super({resourcePath:"key-value-stores",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(pa(),{},t,r)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="long",signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(pa(),e,r,n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}listKeys(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t=this;let{chunkSize:r,timeoutSecs:n="medium",signal:i,...o}=lV(e,fm,"KeyValueClientListKeysOptions"),a=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l8(await t.httpClient.call({url:t.buildUrl("keys"),method:"GET",params:t.buildParams(e),timeoutSecs:n,signal:i}),pl())},s=a({...o,limit:ul(o.limit,r)});return Object.defineProperty(s,Symbol.asyncIterator,{value:async function*(){let e=await s;yield*e.items;let t=o.limit?o.limit-e.items.length:void 0;for(;e.items.length>0&&null!=e.nextExclusiveStartKey&&(void 0===t||t>0);){let n={...o,limit:ul(t,r),exclusiveStartKey:e.nextExclusiveStartKey};e=await a(n),yield*e.items,t&&(t-=e.items.length)}}})}async getRecordPublicUrl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fg);let{timeoutSecs:r="long",signal:n}=lV(t,uF,"TimeoutOptions"),i=await this.get({timeoutSecs:r,signal:n}),o=new URL(this.buildPublicUrl(["records",e]));if(i?.urlSigningSecretKey){let t=await u_(i.urlSigningSecretKey,e);o.searchParams.append("signature",t)}return o.toString()}async createKeysPublicUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="long",signal:r,expiresInSecs:n,...i}=lV(e,fy,"KeyValueClientCreateKeysUrlOptions"),o=await this.get({timeoutSecs:t,signal:r}),a=new URL(this.buildPublicUrl("keys"));if(o?.urlSigningSecretKey){let e=await uE({resourceId:o.id,urlSigningSecretKey:o.urlSigningSecretKey,expiresInMillis:n?1e3*n:void 0});a.searchParams.set("signature",e)}return(a=uc(a,i)).toString()}async recordExists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{timeoutSecs:r="long",signal:n}=lV(t,uF,"TimeoutOptions"),i={url:this.buildUrl(["records",e]),method:"HEAD",params:this.buildParams(),timeoutSecs:r,signal:n};try{return await this.httpClient.call(i),!0}catch(e){l7(e)}return!1}async getRecord(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fb);let r=lV(t,fv,"KeyValueClientGetRecordOptions");if(r.stream&&!lC.isNode)throw Error("The stream option can only be used in Node.js environment.");"disableRedirect"in r&&oj.deprecated("The disableRedirect option for getRecord() is deprecated. It has no effect and will be removed in the following major release.");let n={attachment:"true"};r.signature&&(n.signature=r.signature);let i={url:this.buildUrl(["records",e]),method:"GET",params:this.buildParams(n),timeoutSecs:r.timeoutSecs??"long",signal:r.signal};r.buffer&&(i.responseType="buffer"),r.stream&&(i.responseType="stream");try{let t=await this.httpClient.call(i);return{key:e,value:t.data,contentType:t.headers["content-type"]}}catch(e){l7(e)}}async setRecord(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fw);let r=lV(t,f_,"KeyValueStoreRecordOptions"),{key:n,contentEncoding:i}=e,{value:o,contentType:a}=e,{timeoutSecs:s="long",signal:l,doNotRetryTimeouts:u}=r;if(void 0!==i&&!lC.isNode)throw Error("The contentEncoding option can only be used in Node.js environment.");let c=ua(o)||un(o)||ui(o);if(void 0!==i&&"identity"!==i.trim().toLowerCase()&&!c)throw TypeError(`Cannot upload a value of type ${typeof o} with Content-Encoding: ${i}. An encoding other than identity declares the value is already compressed, so pass the compressed bytes as a Buffer, an ArrayBuffer, a typed array, a Blob, or a readable stream.`);if(a||(a=ui(o)?o.type||"application/octet-stream":c?"application/octet-stream":"string"==typeof o?"text/plain; charset=utf-8":"application/json; charset=utf-8"),a.startsWith("application/json")&&!c&&"string"!=typeof o)try{o=JSON.stringify(o,null,2)}catch(e){throw Error(`The record value cannot be stringified to JSON. Please provide other content type.
|
|
68
68
|
Cause: ${e.message}`)}let p={url:this.buildUrl(["records",n]),method:"PUT",params:this.buildParams(),data:o,headers:{"content-type":a,...void 0!==i&&{"content-encoding":i}},doNotRetryTimeouts:u,timeoutSecs:s,signal:l};await this.httpClient.call(p)}async deleteRecord(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fb);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");await this.httpClient.call({url:this.buildUrl(["records",e]),method:"DELETE",params:this.buildParams(),timeoutSecs:r,signal:n})}};let fS=iz({limit:i_().min(0).optional(),...uB}),fO=iz({lockSecs:i_(),limit:i_().min(0).optional(),...uB}),fR=i7(e=>l3(e)&&void 0===e.id,"Expected a request object without an `id`"),fT=iz({forefront:iR().optional(),...uB}),fA=iN(fR).min(1),fx=iR().optional(),fC=i_().optional(),fk=iN(i7(e=>l3(e)&&("string"==typeof e.id||"string"==typeof e.uniqueKey),"Expected a request object with an `id` or a `uniqueKey`")).min(1).max(25),fP=n2(),fU=i7(e=>l3(e)&&"string"==typeof e.id,"Expected a request object with an `id`"),fI=iz({lockSecs:i_(),forefront:iR().optional(),...uB}),fN=iN(iK(["locked","pending"])).min(1),fL=iz({limit:i_().min(0).optional(),chunkSize:i_().positive().optional(),cursor:n2().optional(),filter:fN.optional(),...uB}),fz=iz({limit:i_().min(0).optional(),maxPageLimit:i_().default(1e3),cursor:n2().optional(),filter:fN.optional(),...uB});let fj=class RequestQueueClient extends u3{#z;#j;constructor(e,t={}){super({resourcePath:"request-queues",...e}),this.#z=t.clientKey,this.#j=t.timeoutSecs}#D(e,t){return void 0!==e?e:void 0===this.#j||this.httpClient.timeoutMillis[t]/1e3<=this.#j?t:this.#j}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t,signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(pv(),{},this.#D(t,"short"),r)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r,signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(pv(),e,this.#D(r,"short"),n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t,signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(this.#D(t,"short"),r)}async listHead(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,fS,"RequestQueueClientListHeadOptions");return l8(await this.httpClient.call({url:this.buildUrl("head"),method:"GET",timeoutSecs:this.#D(t.timeoutSecs,"short"),signal:t.signal,params:this.buildParams({limit:t.limit,clientKey:this.#z})}),pZ())}async listAndLockHead(e){let t=lV(e,fO,"RequestQueueClientListAndLockHeadOptions");return l8(await this.httpClient.call({url:this.buildUrl("head/lock"),method:"POST",timeoutSecs:this.#D(t.timeoutSecs,"medium"),signal:t.signal,params:this.buildParams({limit:t.limit,lockSecs:t.lockSecs,clientKey:this.#z})}),pH())}async addRequest(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fR);let r=lV(t,fT,"RequestQueueClientAddRequestOptions");return l8(await this.httpClient.call({url:this.buildUrl("requests"),method:"POST",timeoutSecs:this.#D(r.timeoutSecs,"short"),signal:r.signal,data:e,params:this.buildParams({forefront:r.forefront,clientKey:this.#z})}),pI())}async addRequestBatch(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=lV(t,fT,"RequestQueueClientAddRequestOptions");return l8(await this.httpClient.call({url:this.buildUrl("requests/batch"),method:"POST",timeoutSecs:this.#D(r.timeoutSecs,"medium"),signal:r.signal,headers:{"content-type":"application/json"},data:`[${e.map(e=>{let{json:t}=e;return t}).join(",")}]`,params:this.buildParams({forefront:r.forefront,clientKey:this.#z})}),pz())}async addRequestBatchWithRetries(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{forefront:r,timeoutSecs:n,signal:i,maxUnprocessedRequestsRetries:o=3,minDelayBetweenUnprocessedRequestsRetriesMillis:a=500}=t,s=e,l=[],u=[];for(let t=0;t<1+o;t++){try{let o=await this.addRequestBatch(s,{forefront:r,timeoutSecs:n,signal:i});l.push(...o.processedRequests),u=o.unprocessedRequests,0!==u.length&&this.httpClient.stats.addRateLimitError(t+1);let a=l.map(e=>{let{uniqueKey:t}=e;return t});if(s=e.filter(e=>{let{request:t}=e;return!a.includes(t.uniqueKey)}),0===s.length)break}catch(r){if(i?.throwIfAborted(),r instanceof lG)throw r;oj.exception(r,"Request batch insert failed");let t=l.map(e=>{let{uniqueKey:t}=e;return t});u=e.filter(e=>{let{request:r}=e;return!t.includes(r.uniqueKey)}).map(e=>{let{request:{method:t,uniqueKey:r,url:n}}=e;return{method:t,uniqueKey:r,url:n}});break}let o=Math.floor((1+Math.random())*2**t*a);await uh(o,i),i?.throwIfAborted()}return{processedRequests:l,unprocessedRequests:u}}async batchAddRequests(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{forefront:r,timeoutSecs:n,signal:i,maxUnprocessedRequestsRetries:o=3,maxParallel:a=5,minDelayBetweenUnprocessedRequestsRetriesMillis:s=500}=t;lV(e,fA),lV(r,fx),lV(n,u$),lV(i,uM),lV(o,fC),lV(a,fC),lV(s,fC);let l=new Set,u=[],c=9437184-Math.ceil(9437184*1e-4);for(let r of function(e,t){let{maxCount:r,maxByteLength:n}=t,i=[],o=[],a=1;for(let t of e)o.length>0&&(o.length>=r||a+t.byteLength+1>n)&&(i.push(o),o=[],a=1),o.push(t),a+=t.byteLength+1;return o.length>0&&i.push(o),i}(e.map((e,t)=>{let r=JSON.stringify(e),n=lX.encode(r).byteLength;if(n+2>c)throw Error(`RequestQueueClient.batchAddRequests: The size of the request with index: ${t} exceeds the maximum allowed size (${c} bytes).`);return{request:e,json:r,byteLength:n}}),{maxCount:25,maxByteLength:c})){let e=this.addRequestBatchWithRetries(r,t);l.add(e),e.then(t=>{l.delete(e),u.push(t)},()=>void 0),l.size>=a&&await Promise.race(l)}await Promise.all(l);let p={processedRequests:[],unprocessedRequests:[]};return u.forEach(e=>{let{processedRequests:t,unprocessedRequests:r}=e;p.processedRequests.push(...t),p.unprocessedRequests.push(...r)}),p}async batchDeleteRequests(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fk);let{timeoutSecs:r,signal:n}=lV(t,uF,"TimeoutOptions");return l8(await this.httpClient.call({url:this.buildUrl("requests/batch"),method:"DELETE",timeoutSecs:this.#D(r,"short"),signal:n,data:e,params:this.buildParams({clientKey:this.#z})}),pM())}async getRequest(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fP);let{timeoutSecs:r,signal:n}=lV(t,uF,"TimeoutOptions"),i={url:this.buildUrl(["requests",e]),method:"GET",timeoutSecs:this.#D(r,"short"),signal:n,params:this.buildParams()};try{let e=await this.httpClient.call(i);return l8(e,pC())}catch(e){l7(e)}}async updateRequest(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fU);let r=lV(t,fT,"RequestQueueClientAddRequestOptions");return l8(await this.httpClient.call({url:this.buildUrl(["requests",e.id]),method:"PUT",timeoutSecs:this.#D(r.timeoutSecs,"medium"),signal:r.signal,data:e,params:this.buildParams({forefront:r.forefront,clientKey:this.#z})}),pI())}async deleteRequest(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fP);let{timeoutSecs:r,signal:n}=lV(t,uF,"TimeoutOptions");await this.httpClient.call({url:this.buildUrl(["requests",e]),method:"DELETE",timeoutSecs:this.#D(r,"short"),signal:n,params:this.buildParams({clientKey:this.#z})})}async prolongRequestLock(e,t){lV(e,fP);let r=lV(t,fI,"RequestQueueClientProlongRequestLockOptions");return l8(await this.httpClient.call({url:this.buildUrl(["requests",e,"lock"]),method:"PUT",timeoutSecs:this.#D(r.timeoutSecs,"medium"),signal:r.signal,params:this.buildParams({forefront:r.forefront,lockSecs:r.lockSecs,clientKey:this.#z})}),pF())}async deleteRequestLock(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fP);let r=lV(t,fT,"RequestQueueClientDeleteRequestLockOptions");await this.httpClient.call({url:this.buildUrl(["requests",e,"lock"]),method:"DELETE",timeoutSecs:this.#D(r.timeoutSecs,"short"),signal:r.signal,params:this.buildParams({forefront:r.forefront,clientKey:this.#z})})}listRequests(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t=this;let{chunkSize:r,timeoutSecs:n,signal:i,...o}=lV(e,fL,"RequestQueueClientListRequestsOptions"),a=this.#D(n,"medium"),s=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l8(await t.httpClient.call({url:t.buildUrl("requests"),method:"GET",timeoutSecs:a,signal:i,params:t.buildParams({...e,filter:e.filter?e.filter.join(","):void 0,clientKey:t.#z})}),pk())},l=s({...o,limit:ul(o.limit,r)});return Object.defineProperty(l,Symbol.asyncIterator,{value:async function*(){let e=await l;yield*e.items;let t=o.limit?o.limit-e.items.length:void 0;for(;e.items.length>0&&e.nextCursor&&(void 0===t||t>0);){let n={...o,limit:ul(t,r),cursor:e.nextCursor};e=await s(n),yield*e.items,t&&(t-=e.items.length)}}})}async unlockRequests(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t,signal:r}=lV(e,uF,"TimeoutOptions");return l8(await this.httpClient.call({url:this.buildUrl("requests/unlock"),method:"POST",timeoutSecs:this.#D(t,"long"),signal:r,params:this.buildParams({clientKey:this.#z})}),pB())}paginateRequests(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{limit:t,cursor:r,filter:n,maxPageLimit:i,timeoutSecs:o,signal:a}=lV(e,fz,"RequestQueueClientPaginateRequestsOptions");return new us({getPage:async e=>this.listRequests({...e,filter:n,timeoutSecs:o,signal:a}),limit:t,cursor:r,maxPageLimit:i})}};let fD=iz({waitForFinish:i_().optional(),...uB}),f$=iz({gracefully:iR().optional(),...uB}),fM=n2(),fB=iz({contentType:n2().optional(),build:n2().optional(),...uB}),fF=iz({build:n2().optional(),memory:i_().optional(),runTimeoutSecs:i_().optional(),maxItems:i_().optional(),maxTotalChargeUsd:i_().optional(),restartOnError:iR().optional(),...uB}),fq=iz({eventName:n2(),count:i_().default(1),idempotencyKey:n2().optional(),requestId:n2().optional(),...uB}),fW=iz({waitSecs:i_().optional(),...uB}),fZ=iz({clean:iR().optional(),fields:iN(n2()).optional(),omit:iN(n2()).optional(),...uu,skipEmpty:iR().optional(),skipHidden:iR().optional(),unwind:iN(n2()).optional(),pollIntervalSecs:i_().min(0).optional(),...uB});let fK=class RunClient extends u3{constructor(e){super({...e,resourcePath:e.resourcePath||"actor-runs"})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t,signal:r,...n}=lV(e,fD,"RunGetOptions");return this.getResource(pe(),n,this.timeoutForWaitForFinish(t,"short",n.waitForFinish),r)}async abort(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="medium",signal:r,...n}=lV(e,f$,"RunAbortOptions");return l8(await this.httpClient.call({url:this.buildUrl("abort"),method:"POST",params:this.buildParams(n),timeoutSecs:t,signal:r}),pe())}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}async metamorph(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};lV(e,fM);let n=lV(r,fB,"RunMetamorphOptions"),i={targetActorId:this.toSafeId(e),build:n.build},o={url:this.buildUrl("metamorph"),method:"POST",data:t,params:this.buildParams(i),stringifyFunctions:!0,timeoutSecs:n.timeoutSecs??"medium",signal:n.signal};return n.contentType&&(o.headers={"content-type":n.contentType}),l8(await this.httpClient.call(o),pe())}async reboot(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="medium",signal:r}=lV(e,uF,"TimeoutOptions"),n={url:this.buildUrl("reboot"),method:"POST",timeoutSecs:t,signal:r};return l8(await this.httpClient.call(n),pe())}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(pe(),e,r,n)}async resurrect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="medium",signal:r,runTimeoutSecs:n,...i}=lV(e,fF,"RunResurrectOptions");return l8(await this.httpClient.call({url:this.buildUrl("resurrect"),method:"POST",params:this.buildParams({...i,timeout:n}),timeoutSecs:t,signal:r}),pe())}async charge(e){let{eventName:t,count:r,idempotencyKey:n,timeoutSecs:i="short",requestId:o,signal:a}=lV(e,fq,"RunChargeOptions"),s=(Math.random()+1).toString(36).slice(3,8),l=n??`${this.id}-${t}-${Date.now()}-${s}`,u={url:this.buildUrl("charge"),method:"POST",data:{eventName:t,count:r,requestId:o},headers:{"idempotency-key":l},timeoutSecs:i,signal:a};return await this.httpClient.call(u)}async waitForFinish(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,fW,"RunWaitForFinishOptions");return this.waitForJobFinish(pe(),t)}dataset(){return new fh(this.subResourceOptions({resourcePath:"dataset"}))}keyValueStore(){return new fE(this.subResourceOptions({resourcePath:"key-value-store"}))}requestQueue(){return new fj(this.subResourceOptions({resourcePath:"request-queue"}))}log(){return new dK(this.subResourceOptions({resourcePath:"log"}))}async getStreamedLog(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};lV(e.timeoutSecs,u$),lV(e.signal,uM);let{fromStart:t=!0,timeoutSecs:r="long",signal:n}=e,{toLog:i}=e;if(null!==i&&lC.isNode){if(void 0===i||"default"===i){let e=await this.get({timeoutSecs:r,signal:n}),t=e?.id??"",o=e?.actId??"",a=o?await this.apifyClient.actor(o).get({timeoutSecs:r,signal:n}):void 0,s=[a?.name??"",`runId:${t}`].filter(Boolean).join(" ");i=new oz({level:oy.DEBUG,prefix:`${s} -> `,logger:new dH})}return new dV({logClient:this.log(),toLog:i,fromStart:t,signal:n})}}async *iterateDatasetItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{offset:t,limit:r,chunkSize:n,pollIntervalSecs:i=5,timeoutSecs:o="long",signal:a,...s}=lV(e,fZ,"RunIterateDatasetItemsOptions"),l=n||1e3,u=t??0,c=r?u+r:void 0,p=await this.get({timeoutSecs:o,signal:a}),d=p&&p.id!==this.id?this.apifyClient.run(p.id):this,f=d.dataset(),h=async(e,t)=>f.listItems({...s,offset:e,limit:t,timeoutSecs:o,signal:a});for(;;){let e=!p||oc.includes(p.status),t=await f.get({timeoutSecs:o,signal:a}),r=t?.itemCount??0;for(void 0!==c&&(r=Math.min(r,c));u<r;){let e=Math.min(l,r-u),t=await h(u,e);yield*t.items,u+=e}if(void 0!==c&&u>=c)return;if(e)break;p=await d.waitForFinish({waitSecs:i,timeoutSecs:o,signal:a})}let{clean:m,skipEmpty:g,unwind:y}=s;for(;;){let e=void 0!==c?Math.min(l,c-u):l,t=await h(u,e);if(yield*t.items,0===t.count&&(!(m||g||y?.length)||0===(await f.listItems({offset:u,limit:1,timeoutSecs:o,signal:a})).items.length)||(u+=e,void 0!==c&&u>=c))return}}};let fH=iK(ou),fV=iz({...uu,desc:iR().optional(),status:i$([fH,iN(fH)]).optional(),startedBefore:i$([iU(),n2()]).optional(),startedAfter:i$([iU(),n2()]).optional(),...uB});let fG=class RunCollectionClient extends dX{constructor(e){super({resourcePath:"runs",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,fV,"RunCollectionListOptions");return this.listResourcesPaginated(c1(),t,"medium")}};let fJ=iz({...uu,desc:iR().optional(),...uB}),fY=l9.optional();let fX=class WebhookCollectionClient extends dX{constructor(e){super({resourcePath:"webhooks",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,fJ,"WebhookCollectionListOptions");return this.listResourcesPaginated(de(),t,"medium")}async create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,fY);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.createResource(cM(),e,r,n)}};let fQ=iz({build:n2().optional(),contentType:n2().optional(),memory:i_().optional(),runTimeoutSecs:i_().min(0).optional(),waitForFinish:i_().optional(),webhooks:iN(l9).optional(),maxItems:i_().min(0).optional(),maxTotalChargeUsd:i_().min(0).optional(),restartOnError:iR().optional(),forcePermissionLevel:iK(om).optional(),waitForResources:i$([iR(),i_().min(0)]).optional(),...uB}),f0=iz({build:n2().optional(),contentType:n2().optional(),memory:i_().optional(),runTimeoutSecs:i_().min(0).optional(),waitSecs:i_().min(0).optional(),webhooks:iN(l9).optional(),maxItems:i_().min(0).optional(),maxTotalChargeUsd:i_().min(0).optional(),log:i$([new iT({type:"null",...ea(void 0)}),ot(oz),iV("default")]).optional(),restartOnError:iR().optional(),forcePermissionLevel:iK(om).optional(),waitForResources:i$([iR(),i_().min(0)]).optional(),...uB}),f1=iz({build:n2().optional(),contentType:n2().optional(),...uB}),f2=n2().min(1),f4=iz({betaPackages:iR().optional(),tag:n2().optional(),useCache:iR().optional(),waitForFinish:i_().optional(),...uB}),f3=iz({waitForFinish:i_().optional(),...uB}),f9=iz({status:iK(ou).optional(),origin:iK(op).optional()});let f6=class ActorClient extends u3{#$;constructor(e){super({resourcePath:"actors",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(cA(),{},t,r)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(cA(),e,r,n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}async start(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=lV(t,fQ,"ActorStartOptions"),{waitForFinish:n,runTimeoutSecs:i,memory:o,build:a,maxItems:s,maxTotalChargeUsd:l,restartOnError:u,forcePermissionLevel:c,waitForResources:p,timeoutSecs:d,signal:f}=r,h={waitForFinish:n,timeout:i,memory:o,build:a,webhooks:ut(r.webhooks),maxItems:s,maxTotalChargeUsd:l,restartOnError:u,forcePermissionLevel:c},m={url:this.buildUrl("runs"),method:"POST",data:e,params:this.buildParams(h),stringifyFunctions:!0,timeoutSecs:this.timeoutForWaitForFinish(d,"medium",n),signal:f};return r.contentType&&(m.headers={"content-type":r.contentType}),l8(await dq(async()=>this.httpClient.call(m),!ua(e)&&p,this.httpClient.logger,f),pe())}async call(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{waitSecs:r,log:n,timeoutSecs:i="noTimeout",signal:o,...a}=lV(t,f0,"ActorCallOptions"),{id:s}=await this.start(e,{...a,timeoutSecs:i,signal:o}),l=this.apifyClient.run(s),u=await l.getStreamedLog({toLog:n,signal:o});return u?.start(),this.apifyClient.run(s).waitForFinish({waitSecs:r,timeoutSecs:i,signal:o}).finally(async()=>{await u?.stop()})}async validateInput(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=lV(t,f1,"ActorValidateInputOptions"),n={url:this.buildUrl("validate-input"),method:"POST",data:e,params:this.buildParams({build:r.build}),stringifyFunctions:!0,timeoutSecs:r.timeoutSecs??"short",signal:r.signal};return r.contentType&&(n.headers={"content-type":r.contentType}),(await this.httpClient.call(n)).data.valid}async build(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,f2);let{timeoutSecs:r,signal:n,...i}=lV(t,f4,"ActorBuildOptions");return l8(await this.httpClient.call({url:this.buildUrl("builds"),method:"POST",params:this.buildParams({version:e,...i}),timeoutSecs:this.timeoutForWaitForFinish(r,"medium",i.waitForFinish),signal:n}),dM())}async defaultBuild(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t,signal:r,...n}=lV(e,f3,"BuildClientGetOptions"),{id:i}=l8(await this.httpClient.call({url:this.buildUrl("builds/default"),method:"GET",params:this.buildParams(n),timeoutSecs:this.timeoutForWaitForFinish(t,"short",n.waitForFinish),signal:r}),dM());return new dY({baseUrl:this.apifyClient.baseUrl,publicBaseUrl:this.apifyClient.publicBaseUrl,httpClient:this.httpClient,apifyClient:this.apifyClient,id:i})}lastRun(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,f9,"ActorLastRunOptions");return new fK(this.subResourceOptions({id:"last",params:this.buildParams(t),resourcePath:"runs"}))}builds(){return new d0(this.subResourceOptions({resourcePath:"builds"}))}runs(){return new fG(this.subResourceOptions({resourcePath:"runs"}))}version(e){return lV(e,f2),new fi(this.subResourceOptions({id:e}))}versions(){return new fa(this.subResourceOptions())}webhooks(){return new fX(this.subResourceOptions())}server(){return this.#$??=new d9({baseUrl:this.baseUrl,publicBaseUrl:this.publicBaseUrl,apifyClient:this.apifyClient,httpClient:this.httpClient,id:this.id,params:this.params}),this.#$}standby(){return this.httpClient.logger.deprecated("`standby()` is deprecated and will be removed in v4. Use `server()` instead."),this.server()}};let f5=l9.optional();let f8=class ActorCollectionClient extends dX{constructor(e){super({resourcePath:"actors",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,he,"ActorCollectionListOptions");return this.listResourcesPaginated(ct(),t,"medium")}async create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,f5);let{timeoutSecs:r="medium",signal:n}=lV(t,uF,"TimeoutOptions");return this.createResource(cA(),e,r,n)}};var f7=((P={}).CREATED_AT="createdAt",P.LAST_RUN_STARTED_AT="stats.lastRunStartedAt",P);let he=iz({my:iR().optional(),...uu,desc:iR().optional(),sortBy:iK(f7).optional(),...uB}),ht=iz({unnamed:iR().optional(),...uu,desc:iR().optional(),ownership:iK(og).optional(),...uB}),hr=n2().optional(),hn=l9.optional();let hi=class DatasetCollectionClient extends dX{constructor(e){super({resourcePath:"datasets",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,ht,"DatasetCollectionClientListOptions");return this.listResourcesPaginated(p9(),t,"medium")}async getOrCreate(e,t){lV(e,hr),lV(t?.schema,hn),lV(t?.timeoutSecs,u$),lV(t?.signal,uM);let{timeoutSecs:r="short",signal:n,...i}=t??{},o=Object.keys(i).length>0;return this.getOrCreateResource(pr(),e,o?i:void 0,r,n)}};let ho=iz({unnamed:iR().optional(),...uu,desc:iR().optional(),ownership:iK(og).optional(),...uB}),ha=n2().optional(),hs=l9.optional();let hl=class KeyValueStoreCollectionClient extends dX{constructor(e){super({resourcePath:"key-value-stores",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,ho,"KeyValueStoreCollectionClientListOptions");return this.listResourcesPaginated(p4(),t,"medium")}async getOrCreate(e,t){lV(e,ha),lV(t?.schema,hs),lV(t?.timeoutSecs,u$),lV(t?.signal,uM);let{timeoutSecs:r="short",signal:n,...i}=t??{},o=Object.keys(i).length>0;return this.getOrCreateResource(pa(),e,o?i:void 0,r,n)}};let hu=iz({unnamed:iR().optional(),...uu,desc:iR().optional(),ownership:iK(og).optional(),...uB}),hc=n2().optional();let hp=class RequestQueueCollectionClient extends dX{constructor(e){super({resourcePath:"request-queues",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,hu,"RequestQueueCollectionListOptions");return this.listResourcesPaginated(p8(),t,"medium")}async getOrCreate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,hc);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.getOrCreateResource(pv(),e,void 0,r,n)}};let hd=iN(db());let hf=class ScheduleClient extends u3{constructor(e){super({resourcePath:"schedules",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(dB(),{},t,r)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(dB(),e,r,n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}async getLog(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="medium",signal:r}=lV(e,uF,"TimeoutOptions");return l8(await this.httpClient.call({url:this.buildUrl("log"),method:"GET",params:this.buildParams(),timeoutSecs:t,signal:r}),hd)}};let hh=iz({...uu,desc:iR().optional(),...uB}),hm=l9.optional();let hg=class ScheduleCollectionClient extends dX{constructor(e){super({resourcePath:"schedules",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,hh,"ScheduleCollectionListOptions");return this.listResourcesPaginated(dp(),t,"medium")}async create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,hm);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.createResource(dB(),e,r,n)}};let hy=iz({...uu,search:n2().optional(),sortBy:n2().optional(),category:n2().optional(),username:n2().optional(),pricingModel:n2().optional(),includeUnrunnableActors:iR().optional(),...uB});let hb=class StoreCollectionClient extends dX{constructor(e){super({resourcePath:"store",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,hy,"StoreCollectionListOptions");return this.listResourcesPaginated(d_(),t,"medium")}};let hv=l9.optional(),hw=iz({build:n2().optional(),memory:i_().optional(),runTimeoutSecs:i_().min(0).optional(),waitForFinish:i_().optional(),webhooks:iN(l9).optional(),maxItems:i_().min(0).optional(),maxTotalChargeUsd:i_().min(0).optional(),restartOnError:iR().optional(),waitForResources:i$([iR(),i_().min(0)]).optional(),...uB}),h_=iz({build:n2().optional(),memory:i_().optional(),runTimeoutSecs:i_().min(0).optional(),waitSecs:i_().min(0).optional(),webhooks:iN(l9).optional(),maxItems:i_().min(0).optional(),maxTotalChargeUsd:i_().min(0).optional(),restartOnError:iR().optional(),waitForResources:i$([iR(),i_().min(0)]).optional(),...uB}),hE=iz({status:iK(ou).optional(),origin:iK(op).optional()});let hS=class TaskClient extends u3{constructor(e){super({resourcePath:"actor-tasks",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(p0(),{},t,r)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(p0(),e,r,n)}async publish(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.update({isPublic:!0},e)}async unpublish(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.update({isPublic:!1},e)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}async start(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,hv);let r=lV(t,hw,"TaskStartOptions"),{waitForFinish:n,runTimeoutSecs:i,memory:o,build:a,maxItems:s,maxTotalChargeUsd:l,restartOnError:u,waitForResources:c,timeoutSecs:p,signal:d}=r,f={waitForFinish:n,timeout:i,memory:o,build:a,webhooks:ut(r.webhooks),maxItems:s,maxTotalChargeUsd:l,restartOnError:u},h={url:this.buildUrl("runs"),method:"POST",data:e,params:this.buildParams(f),stringifyFunctions:!0,headers:{"Content-Type":"application/json"},timeoutSecs:this.timeoutForWaitForFinish(p,"medium",n),signal:d};return l8(await dq(async()=>this.httpClient.call(h),!ua(e)&&c,this.httpClient.logger,d),pe())}async call(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,hv);let{waitSecs:r,timeoutSecs:n="noTimeout",signal:i,...o}=lV(t,h_,"TaskCallOptions"),{id:a}=await this.start(e,{...o,timeoutSecs:n,signal:i});return this.apifyClient.run(a).waitForFinish({waitSecs:r,timeoutSecs:n,signal:i})}async getInput(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return(await this.httpClient.call({url:this.buildUrl("input"),method:"GET",params:this.buildParams(),timeoutSecs:t,signal:r})).data}async updateInput(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return(await this.httpClient.call({url:this.buildUrl("input"),method:"PUT",params:this.buildParams(),data:e,timeoutSecs:r,signal:n})).data}lastRun(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,hE,"TaskLastRunOptions");return new fK(this.subResourceOptions({id:"last",params:this.buildParams(t),resourcePath:"runs"}))}runs(){return new fG(this.subResourceOptions({resourcePath:"runs"}))}webhooks(){return new fX(this.subResourceOptions())}};let hO=iz({...uu,desc:iR().optional(),...uB});let hR=class TaskCollectionClient extends dX{constructor(e){super({resourcePath:"actor-tasks",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,hO,"TaskCollectionListOptions");return this.listResourcesPaginated(pJ(),t,"medium")}async create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="medium",signal:n}=lV(t,uF,"TimeoutOptions");return this.createResource(p0(),e,r,n)}};let hT=class UserClient extends u3{constructor(e){super({resourcePath:"users",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(dC(),{},t,r)}async monthlyUsage(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return l8(await this.httpClient.call({url:this.buildUrl("usage/monthly"),method:"GET",params:this.buildParams(),timeoutSecs:t,signal:r}),dz())}async limits(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return l8(await this.httpClient.call({url:this.buildUrl("limits"),method:"GET",params:this.buildParams(),timeoutSecs:t,signal:r}),d$())}async updateLimits(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions"),i={url:this.buildUrl("limits"),method:"PUT",params:this.buildParams(),data:e,timeoutSecs:r,signal:n};await this.httpClient.call(i)}};let hA=iz({...uu,desc:iR().optional(),...uB});let hx=class WebhookDispatchCollectionClient extends dX{constructor(e){super({resourcePath:"webhook-dispatches",...e})}list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=lV(e,hA,"WebhookDispatchCollectionListOptions");return this.listResourcesPaginated(dn(),t,"medium")}};let hC=class WebhookClient extends u3{constructor(e){super({resourcePath:"webhooks",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(cM(),{},t,r)}async update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,l9);let{timeoutSecs:r="short",signal:n}=lV(t,uF,"TimeoutOptions");return this.updateResource(cM(),e,r,n)}async delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.deleteResource(t,r)}async test(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="medium",signal:r}=lV(e,uF,"TimeoutOptions");return l8(await this.httpClient.call({url:this.buildUrl("test"),method:"POST",params:this.buildParams(),timeoutSecs:t,signal:r}),dr())}dispatches(){return new hx(this.subResourceOptions({resourcePath:"dispatches"}))}};let hk=class WebhookDispatchClient extends u3{constructor(e){super({resourcePath:"webhook-dispatches",...e})}async get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{timeoutSecs:t="short",signal:r}=lV(e,uF,"TimeoutOptions");return this.getResource(dr(),{},t,r)}};let hP="https://api.apify.com";function hU(e){let t=new URL(e),r=t.pathname.replace(/\/+$/,"");return t.pathname=r.endsWith("/v2")?r:`${r}/v2`,t.href}let hI=iz({baseUrl:n2().default(hP),compression:uN.default("brotli"),headers:iW(n2(),n2()).optional(),publicBaseUrl:n2().default(hP),maxRetries:uK.maxRetries.default(8),minDelayBetweenRetriesMillis:uK.minDelayBetweenRetriesMillis.default(500),timeoutShortSecs:uK.timeoutShortSecs.default(5),timeoutMediumSecs:uK.timeoutMediumSecs.default(30),timeoutLongSecs:uK.timeoutLongSecs.default(360),timeoutMaxSecs:uK.timeoutMaxSecs.default(360),token:n2().optional(),userAgentSuffix:i$([n2(),iN(n2())]).optional()}),hN=iz({baseUrl:n2().default(hP),publicBaseUrl:n2().default(hP),token:n2().optional(),httpClient:ot(uG)}),hL=n2().min(1),hz=iz({clientKey:n2().min(1).optional(),timeoutSecs:i_().positive().optional()});let hj=class ApifyClient{baseUrl;publicBaseUrl;token;stats;logger;#M;#B;constructor(e={}){let t=lV(e,hI,"ApifyClientOptions"),{baseUrl:r,compression:n,headers:i,publicBaseUrl:o,maxRetries:a,minDelayBetweenRetriesMillis:s,timeoutShortSecs:l,timeoutMediumSecs:u,timeoutLongSecs:c,timeoutMaxSecs:p,token:d}=t;this.baseUrl=hU(r),this.publicBaseUrl=hU(o),this.token=d,this.stats=new uD,this.logger=oj.child({prefix:"ApifyClient"}),this.#B={stats:this.stats,maxRetries:a,minDelayBetweenRetriesMillis:s,compression:n,headers:i,timeoutShortSecs:l,timeoutMediumSecs:u,timeoutLongSecs:c,timeoutMaxSecs:p,logger:this.logger,token:this.token,userAgentSuffix:t.userAgentSuffix}}static withCustomHttpClient(e){let{httpClient:t,...r}=lV(e,hN,"ApifyClientCustomHttpClientOptions"),n=new hj(r);return n.httpClient=t,n}get httpClient(){return this.#M??=new u2(this.#B),this.#M}set httpClient(e){this.token&&e.setDefaultAuthorization(this.token),this.#M=e,this.stats=e.stats}#F(){return{baseUrl:this.baseUrl,publicBaseUrl:this.publicBaseUrl,apifyClient:this,httpClient:this.httpClient}}actors(){return new f8(this.#F())}actor(e){return lV(e,hL),new f6({id:e,...this.#F()})}builds(){return new d0(this.#F())}build(e){return lV(e,hL),new dY({id:e,...this.#F()})}datasets(){return new hi(this.#F())}dataset(e){return lV(e,hL),new fh({id:e,...this.#F()})}keyValueStores(){return new hl(this.#F())}keyValueStore(e){return lV(e,hL),new fE({id:e,...this.#F()})}log(e){return lV(e,hL),new dK({id:e,...this.#F()})}requestQueues(){return new hp(this.#F())}requestQueue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};lV(e,hL);let r=lV(t,hz,"RequestQueueUserOptions");return new fj({id:e,...this.#F()},r)}runs(){return new fG({...this.#F(),resourcePath:"actor-runs"})}run(e){return lV(e,hL),new fK({id:e,...this.#F()})}tasks(){return new hR(this.#F())}task(e){return lV(e,hL),new hS({id:e,...this.#F()})}schedules(){return new hg(this.#F())}schedule(e){return lV(e,hL),new hf({id:e,...this.#F()})}user(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"me";return lV(e,hL),new hT({id:e,...this.#F()})}webhooks(){return new fX(this.#F())}webhook(e){return lV(e,hL),new hC({id:e,...this.#F()})}webhookDispatches(){return new hx(this.#F())}webhookDispatch(e){return lV(e,hL),new hk({id:e,...this.#F()})}store(){return new hb(this.#F())}async setStatusMessage(e,t){let r=ur(of);if(!r)throw Error(`Environment variable ${of} is not set!`);await this.run(r).update({statusMessage:e,...t})}}})();var i=n.TD,o=n.B,a=n.h0,s=n.XP,l=n.v8,u=n.G7,c=n.Lu,p=n.vp,d=n.Jo,f=n.UP,h=n.rj,m=n.VI,g=n.Ns,y=n.yD,b=n.Ip,v=n.kt,w=n.KW,_=n.fK,E=n.wb,S=n.wv,O=n.yY,R=n.qQ,T=n._,A=n.Qq,x=n.tY,C=n.rE,k=n.PD,P=n.lE,U=n.ss,I=n.kq,N=n.m_,L=n.O_,z=n.OE,j=n.oc,D=n.oW,$=n.dK,M=n.Ry,B=n.Ng,F=n.Hg,q=n.L6,W=n.Ty,Z=n.gP,K=n.py,H=n.YS,V=n.t1,G=n.jE,J=n.D_,Y=n.jx,X=n.F,Q=n.J_,ee=n.hH,et=n.zC,er=n._l,en=n.fu;export{i as ActorClient,o as ActorCollectionClient,a as ActorEnvVarClient,s as ActorEnvVarCollectionClient,l as ActorListSortBy,u as ActorServerClient,c as ActorSourceType,p as ActorVersionClient,d as ActorVersionCollectionClient,f as ApifyApiError,h as ApifyClient,m as ApifyClientError,g as ArgumentValidationError,y as AxiosHttpClient,b as BrotliHttpCompressor,v as BuildClient,w as BuildCollectionClient,_ as ConflictError,E as DatasetClient,S as DatasetCollectionClient,O as DownloadItemsFormat,R as ForbiddenError,T as GzipHttpCompressor,A as HttpClient,x as InvalidRequestError,C as InvalidResponseBodyError,k as KeyValueStoreClient,P as KeyValueStoreCollectionClient,U as LogClient,I as LoggerActorRedirect,N as NotFoundError,L as PlatformFeature,z as RateLimitError,j as RequestQueueClient,D as RequestQueueCollectionClient,$ as ResponseValidationError,M as RunClient,B as RunCollectionClient,F as ScheduleActions,q as ScheduleClient,W as ScheduleCollectionClient,Z as ServerError,K as StoreCollectionClient,H as StreamedLog,V as TaskClient,G as TaskCollectionClient,J as UnauthorizedError,Y as UserClient,X as WebhookClient,Q as WebhookCollectionClient,ee as WebhookDispatchClient,et as WebhookDispatchCollectionClient,er as WebhookDispatchStatus,en as ZstdHttpCompressor};
|
|
69
69
|
//# sourceMappingURL=bundle.js.map
|