apify-client 3.0.0-beta.108 → 3.0.0-beta.109

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 CHANGED
@@ -53,17 +53,17 @@ ${t.join("\n")}
53
53
 
54
54
  `)}return i.write("payload.value = newResult;"),i.write("return payload;"),i.compile()})(t.shape)),c=r(c,p),u)?rd([],d,c,p,n,e,p?.abortEarly===!0):c:i(c,p):(c.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),c)}});function rm(e,t,r,n){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;let i=e.filter(e=>!ef(e));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>eb(e,n,eN())))}),t)}let rg=ek("$ZodUnion",(e,t)=>{tA.init(e,t),eA(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),eA(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),eA(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),eA(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>W(e.source)).join("|")})$`)}});let r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(n,i)=>{if(r)return r(n,i);let o=!1,a=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},i);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then(t=>rm(t,n,e,i)):rm(a,n,e,i)}}),ry=ek("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,rg.init(e,t);let r=e._zod.parse;eA(e,"propValues",e=>{let t={},r=0;for(let n of e.def.options){let i=n._zod.propValues;if(!i||0===Object.keys(i).length)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(n)}"`);for(let[n,o]of(i[e.def.discriminator]?.has(void 0)&&r++,Object.entries(i)))for(let e of(Object.prototype.hasOwnProperty.call(t,n)||Z(t,n,new Set),o))t[n].add(e)}return!e.def.unionFallback&&r>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,r)=>{let n=K(e._zod.def);if(n&&!Object.prototype.hasOwnProperty.call(n,t.discriminator))throw Error(`Invalid discriminated union option at index "${r}"`)});let n=q(()=>(function(e){let t=new Map;for(let r of e.options){let n=r._zod.propValues?.[e.discriminator];if(!n||0===n.size)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let e of n)if(t.has(e)){if(void 0!==e)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,r)}return t})(t));e._zod.parse=(i,o)=>{let a=i.value;if(!Q(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),i;let s=a?.[t.discriminator],l=n.value.get(s);return l&&(void 0!==s||"backward"!==o.direction)?l._zod.run(i,o):t.unionFallback||"backward"===o.direction?r(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()).filter(e=>null!==n.value.get(e)),input:a,path:[t.discriminator],inst:e}),i)}}),rb=ek("$ZodIntersection",(e,t)=>{tA.init(e,t),e._zod.parse=(e,r)=>{let n=e.value,i=t.left._zod.run({value:n,issues:[]},r),o=t.right._zod.run({value:n,issues:[]},r);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([t,r])=>rv(e,t,r)):rv(e,i,o)}});function rv(e,t,r){let n,i=new Map,o=new Map,a=(e,t)=>{let r;if("unrecognized_keys"!==e.code||e.path?.length)if("invalid_key"!==e.code||"record"!==e.origin||e.path?.length!==1)return!1;else{let t=String(e.path[0]);o.has(t)||o.set(t,e),r=[t]}else n??(n=e),r=e.keys;for(let e of r)i.has(e)||i.set(e,{}),i.get(e)[t]=!0;return!0};for(let r of t.issues)a(r,"l")||e.issues.push(r);for(let t of r.issues)a(t,"r")||e.issues.push(t);let s=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=n?s.filter(e=>n.keys.includes(e)):[];for(let r of(t.length&&e.issues.push({...n,keys:t}),s))!t.includes(r)&&o.has(r)&&e.issues.push(o.get(r))}let l=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(et(t)&&et(r)){let n=Object.keys(r),i=Object.keys(t).filter(e=>-1!==n.indexOf(e)),o={...t,...r};for(let n of(Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__,i)){if("__proto__"===n)continue;let i=e(t[n],r[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};o[n]=i.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<t.length;i++){let o=e(t[i],r[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}(t.value,r.value);if(!l.valid){if(ef(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`)}return e.value=l.data,e}let rw=ek("$ZodRecord",(e,t)=>{tA.init(e,t);let r=eI.memoizer;r?.attach(e),e._zod.parse=(n,i)=>{let o=n.value;if(!et(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){let l;n.value=r?r.alloc(e,n,{},i):{};let u=new Set;for(let r of s)if("string"==typeof r||"number"==typeof r||"symbol"==typeof r){if(u.add("number"==typeof r?r.toString():r),"__proto__"===r)continue;let s=t.keyType._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(s.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>eb(e,i,eN())),input:r,path:[r],inst:e});continue}let l=s.value;if("__proto__"===l)continue;let c=t.valueType._zod.run({value:o[r],issues:[]},i);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...eh(r,e.issues)),n.value[l]=e.value})):(c.issues.length&&n.issues.push(...eh(r,c.issues)),n.value[l]=c.value)}for(let e in o)if(!u.has(e))if("loose"===t.mode){if("__proto__"===e)continue;n.value[e]=o[e]}else(l=l??[]).push(e);l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l,continue:!0})}else{let l;for(let u of(n.value=r?r.alloc(e,n,{},i):{},Reflect.ownKeys(o))){if("__proto__"===u||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let r=t.keyType._zod.run({value:u,issues:[]},i);if(r instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof u&&te.test(u)&&r.issues.length){let e=t.keyType._zod.run({value:Number(u),issues:[]},i);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(r=e)}if(r.issues.length){"loose"===t.mode?n.value[u]=o[u]:s?(l=l??[]).push(u):n.issues.push({code:"invalid_key",origin:"record",issues:r.issues.map(e=>eb(e,i,eN())),input:u,path:[u],inst:e});continue}let c=r.value;if("__proto__"===c)continue;let p=t.valueType._zod.run({value:o[u],issues:[]},i);p instanceof Promise?a.push(p.then(e=>{e.issues.length&&n.issues.push(...eh(u,e.issues)),n.value[c]=e.value})):(p.issues.length&&n.issues.push(...eh(u,p.issues)),n.value[c]=p.value)}l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l,continue:!0})}return a.length?Promise.all(a).then(()=>n):n}}),r_=ek("$ZodEnum",(e,t)=>{tA.init(e,t);let r=$(t.entries),n=new Set(r);e._zod.values=n,eA(e,"pattern",e=>{let t=$(e.def.entries).filter(e=>en.has(typeof e));return new RegExp(t.length?`^(${t.map(e=>ei(e.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(t,i)=>{let o=t.value;return n.has(o)||t.issues.push({code:"invalid_value",values:r,input:o,inst:e}),t}}),rE=ek("$ZodLiteral",(e,t)=>{tA.init(e,t);let r=new Set(t.values);e._zod.values=r,eA(e,"pattern",e=>{let t=e.def.values;return new RegExp(t.length?`^(${t.map(e=>"string"==typeof e?ei(e):e?ei(e.toString()):String(e)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,i)=>{let o=n.value;return r.has(o)||n.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),n}}),rS=ek("$ZodTransform",(e,t)=>{tA.init(e,t),e._zod.optin="optional",eI.memoizer?.guard(e),e._zod.parse=(r,n)=>{if("backward"===n.direction)throw new eU(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(r.value=e,r));if(i instanceof Promise)throw new eP;return r.value=i,r}});function rO(e,t){return e.value=t.issues.length?void 0:t.value,e}let rR=ek("$ZodOptional",(e,t)=>{tA.init(e,t),eA(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",eA(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),eA(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${W(t.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;let n=t.innerType._zod.run({value:e.value,issues:[]},r);return n instanceof Promise?n.then(t=>rO(e,t)):rO(e,n)}return t.innerType._zod.run(e,r)}}),rT=ek("$ZodExactOptional",(e,t)=>{rR.init(e,t),eA(e,"values",e=>e.def.innerType._zod.values),eA(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,r)=>t.innerType._zod.run(e,r)}),rA=ek("$ZodNullable",(e,t)=>{tA.init(e,t),eA(e,"optin",e=>e.def.innerType._zod.optin),eA(e,"optout",e=>e.def.innerType._zod.optout),eA(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${W(t.source)}|null)$`):void 0}),eA(e,"values",e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),rx=ek("$ZodDefault",(e,t)=>{tA.init(e,t),e._zod.optin="defaulted",eA(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(e=>rC(e,t)):rC(n,t)}});function rC(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let rk=ek("$ZodPrefault",(e,t)=>{tA.init(e,t),e._zod.optin="defaulted",eA(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),rP=ek("$ZodNonOptional",(e,t)=>{tA.init(e,t),eA(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(t=>rU(t,e)):rU(i,e)}});function rU(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function rI(e,t,r,n){return t.issues.length?e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>eb(e,n,eN()))},input:e.value}):(e.value=t.value,t.memo&&(e.memo=!0)),e}let rN=ek("$ZodCatch",(e,t)=>{tA.init(e,t),eA(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),eA(e,"optout",e=>e.def.innerType._zod.optout),eA(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let n=t.innerType._zod.run({value:e.value,issues:[]},r);return n instanceof Promise?n.then(n=>rI(e,n,t,r)):rI(e,n,t,r)}}),rL=ek("$ZodPipe",(e,t)=>{tA.init(e,t),eA(e,"values",e=>e.def.in._zod.values),eA(e,"optin",e=>e.def.in._zod.optin),eA(e,"optout",e=>e.def.out._zod.optout),eA(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){let n=t.out._zod.run(e,r);return n instanceof Promise?n.then(e=>rz(e,t.in,r)):rz(n,t.in,r)}let n=t.in._zod.run(e,r);return n instanceof Promise?n.then(e=>rz(e,t.out,r)):rz(n,t.out,r)}});function rz(e,t,r){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}let rj=ek("$ZodReadonly",(e,t)=>{tA.init(e,t),eA(e,"propValues",e=>e.def.innerType._zod.propValues),eA(e,"values",e=>e.def.innerType._zod.values),eA(e,"optin",e=>e.def.innerType?._zod?.optin),eA(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(rD):rD(n)}});function rD(e){return e.memo||(e.value=Object.freeze(e.value)),e}let r$=ek("$ZodCustom",(e,t)=>{to.init(e,t),tA.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(t=>rM(t,r,n,e));rM(i,r,n,e)}});function rM(e,t,r,n){if(!e){let e={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(e.params=n._zod.def.params),t.issues.push(eE(e))}}let rB=class $ZodRegistry{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&"object"==typeof r&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};(I=globalThis).__zod_globalRegistry??(I.__zod_globalRegistry=new rB);let rF=globalThis.__zod_globalRegistry;function rq(e){return e.checks&&(e.checks=[...e.checks]),e}function rW(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ea(t)})}function rZ(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ea(t)})}function rK(e,t){return new tl({check:"less_than",...ea(t),value:e,inclusive:!1})}function rH(e,t){return new tl({check:"less_than",...ea(t),value:e,inclusive:!0})}function rV(e,t){return new tu({check:"greater_than",...ea(t),value:e,inclusive:!1})}function rG(e,t){return new tu({check:"greater_than",...ea(t),value:e,inclusive:!0})}function rJ(e,t){return new tc({check:"multiple_of",...ea(t),value:e})}function rY(e,t){return new td({check:"max_length",...ea(t),maximum:e})}function rX(e,t){return new tf({check:"min_length",...ea(t),minimum:e})}function rQ(e,t){return new th({check:"length_equals",...ea(t),length:e})}function r0(e){return new tO({check:"overwrite",tx:e})}function r1(e,...t){for(let r of t)for(let t of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,t)&&Z(e,t,r[t]);return e}function r2(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??rF,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function r4(e,t,r,n,i){let o="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:n.path,message:i}):t.unrepresentable;if("any"===o)return!1;if(void 0===o||"throw"===o)throw Error(i);return Object.assign(r,o),!0}function r3(e,t,r={path:[],schemaPath:[]}){var n;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let n={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,n);else{let r=a.schema,o=t.processors[i.type];if(!o)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);o(e,t,r,n)}let o=e._zod.parent;o&&(a.ref||(a.ref=o),r3(o,t,n),t.seen.get(o).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&r1(a.schema,l),"input"===t.io&&function e(t,r){let n=r??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let i=t._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return e(i.element,n);if("set"===i.type)return e(i.valueType,n);if("lazy"===i.type)return e(i.getter(),n);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type||"catch"===i.type)return e(i.innerType,n);if("intersection"===i.type)return e(i.left,n)||e(i.right,n);if("record"===i.type||"map"===i.type)return e(i.keyType,n)||e(i.valueType,n);if("pipe"===i.type)return!!t._zod.traits.has("$ZodCodec")||e(i.in,n)||e(i.out,n);if("object"===i.type){for(let t in i.shape)if(e(i.shape[t],n))return!0;return!1}if("union"===i.type){for(let t of i.options)if(e(t,n))return!0;return!1}if("tuple"===i.type){for(let t of i.items)if(e(t,n))return!0;if(i.rest&&e(i.rest,n))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function r9(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function r6(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let n=new Map;for(let t of e.seen.entries()){let r=e.metadataRegistry.get(t[0])?.id;if(r){let e=n.get(r);if(e&&e!==t[0])throw Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(r,t[0])}}let i=t=>{if(t[1].schema.$ref)return;let n=t[1],{ref:i,defId:o}=(t=>{let n="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let r=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(r)return{ref:i(r)};let o=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=o,{defId:o,ref:`${i("__shared")}#/${n}/${r9(o)}`}}let i=`#/${n}/`;if(t[1]===r&&!t[1].schema.id)return{ref:"#"};let o=t[1].schema.id??`__schema${e.counter++}`;return{defId:o,ref:i+r9(o)}})(t);n.def={...n.schema},o&&(n.defId=o);let a=n.schema;for(let e in a)delete a[e];a.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
55
55
 
56
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let n=r[1];if(t===r[0]){i(r);continue}if(e.external){let n=e.external.registry.get(r[0])?.id;if(t!==r[0]&&n){i(r);continue}}if(e.metadataRegistry.get(r[0])?.id||n.cycle){i(r);continue}n.count>1&&"ref"===e.reused&&i(r)}e.external&&(e.sharedDefsExtractedFor=e.external)}let r5=new Set(["type","properties","required","additionalProperties"]),r8=["oneOf","anyOf"];function r7(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function ne(e){let t=[];for(let r of e){if("object"!=typeof r||"object"!==r.type)return null;for(let e in r)if(!r5.has(e))return null;t.push(r)}let r={},n=new Set;for(let e of t){for(let n in e.properties){if(Object.prototype.hasOwnProperty.call(r,n))continue;let e=[];for(let r of t){let t=r.properties?.[n]??r7(r);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Z(r,n,1===e.length?e[0]:ne(e)??{allOf:e})}for(let t of e.required??[])n.add(t)}let i={type:"object",properties:r};if(n.size&&(i.required=[...n]),t.every(e=>!1===e.additionalProperties))i.additionalProperties=!1;else{let e=[];for(let r of t){let t=r7(r);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function nt(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let n=t=>{let r=e.seen.get(t);if(null===r.ref)return;let i=r.def??r.schema,o={...i},a=r.ref;if(r.ref=null,a){n(a);let r=e.seen.get(a),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):r1(i,s),r1(i,o),t._zod.parent===a)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in o||delete i[e]);if(s.$ref&&r.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(i[e])===JSON.stringify(r.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==a){n(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:r.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())n(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let r=t.anyOf;if(!Array.isArray(r)||0===r.length||void 0!==t.type)return;let n=[];for(let t of r){if(!t||"object"!=typeof t)return;e(t);let r=Object.keys(t);if(1!==r.length||"type"!==r[0])return;let i=t.type;for(let e of Array.isArray(i)?i:[i]){if("string"!=typeof e)return;n.includes(e)||n.push(e)}}delete t.anyOf,t.type=1===n.length?n[0]:n}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let r of e.seen.values())for(let e of[r.schema,r.def]){let r=e?.allOf;if(!Array.isArray(r))continue;let n=t.get(r);n?n.push(e):t.set(r,[e])}for(let r of e.intersections)for(let e of t.get(r)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of r5)if(t in e)return;let r=t.filter(e=>r8.some(t=>Array.isArray(e[t]))),n=null;if(r.length){let e=r[0],i=r8.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let o=t.filter(t=>t!==e),a=e[i].map(e=>ne([...o,e]));if(a.some(e=>!e))return;n={[i]:a}}else n=ne(t);n&&(delete e.allOf,r1(e,n))}(e)}}let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(r)}r1(i,r.defId?r.schema:r.def??r.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&i.id===o&&delete i.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,Z(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?i.$defs=a:i.definitions=a);try{let r=JSON.parse(JSON.stringify(i));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:nr(t,"input",e.processors),output:nr(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let nr=(e,t,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},a=r2({...i??{},target:o,io:t,processors:r});return r3(e,a),r6(a,e),nt(a,e)},nn=(e,t,r)=>{(void 0===e[t]||r>e[t])&&(e[t]=r)},ni=(e,t,r)=>{(void 0===e[t]||r<e[t])&&(e[t]=r)},no=(e,t)=>{nn(e,"minimum",t),ni(e,"maximum",t)},na=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},ns=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},nl=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},nu=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},nc=(e,t)=>nn(e,"minimum",t.minimum),np=(e,t)=>ni(e,"maximum",t.maximum),nd=e=>(t,r)=>{nu(t,r.format);let[n,i]=e[r.format];nn(t,"minimum",n),ni(t,"maximum",i)},nf={greater_than:(e,t)=>nn(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>ni(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>na(e,t.value),number_format:nd(el),bigint_format:nd(eu),min_length:nc,max_length:np,length_equals:(e,t)=>no(e,t.length),min_size:nc,max_size:np,size_equals:(e,t)=>no(e,t.size),string_format:(e,t)=>{nu(e,t.format),t.pattern&&ns(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>nl(e,t.mime)};function nh(e){let t={},r=e._zod.def;for(let n of e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[])nf[n._zod.def.check]?.(t,n._zod.def);let n=e._zod.bag;for(let e of(void 0!==n.minimum&&nn(t,"minimum",n.minimum),void 0!==n.exclusiveMinimum&&nn(t,"exclusiveMinimum",n.exclusiveMinimum),void 0!==n.maximum&&ni(t,"maximum",n.maximum),void 0!==n.exclusiveMaximum&&ni(t,"exclusiveMaximum",n.exclusiveMaximum),void 0!==n.multipleOf&&na(t,n.multipleOf),void 0!==n.format&&(t.format??(t.format=n.format),n.format.includes("int")&&(t.isInt=!0)),n.mime&&nl(t,n.mime),n.patterns??[]))ns(t,e);return t}let nm={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ng=new Map([[t4,/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/],[t9,/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/]]),ny=e=>ng.get(e)??e;function nb(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?nb(t.out):"catch"===t.type?nb(t.innerType):e._zod.optin}let nv=new WeakMap,nw=Symbol();function n_(e,t,r,n,i){let o=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(o=!0,null));return o?(r4(t,r,n,i,"BigInt defaults cannot be represented in JSON Schema"),nw):JSON.parse(a)}let nE=(e,t,r,n)=>{let i=e._zod.def;r3(i.innerType,t,n),t.seen.get(e).ref=i.innerType};function nS(){return{localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function n(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?r[e]??e:String(t)}return r=>{switch(r.code){case"invalid_type":{let e=n(r.expected),t=n(function(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":if(null===e)return"null";if(Array.isArray(e))return"array";if(e&&Object.getPrototypeOf(e)!==Object.prototype&&"constructor"in e&&e.constructor)return e.constructor.name}return t}(r.input),r.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${es(r.values[0])}`;return`Invalid option: expected one of ${M(r.values,"|")}`;case"too_big":{let t=r.exact?"exactly ":r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Too big: expected ${r.origin??"value"} to have ${t}${r.maximum.toString()} ${n.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${t}${r.maximum.toString()}`}case"too_small":{let t=r.exact?"exactly ":r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Too small: expected ${r.origin} to have ${t}${r.minimum.toString()} ${n.unit}`;return`Too small: expected ${r.origin} to be ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Invalid string: must start with "${r.prefix}"`;if("ends_with"===r.format)return`Invalid string: must end with "${r.suffix}"`;if("includes"===r.format)return`Invalid string: must include "${r.includes}"`;if("regex"===r.format)return`Invalid string: must match pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${M(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":if(r.options&&Array.isArray(r.options)&&r.options.length>0){let e=r.options.map(e=>`'${e}'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===r.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}})()}}let nO={get:function(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,B,2)),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},nR={value:void 0,enumerable:!1},nT=new WeakSet([Object.prototype,Error.prototype]),nA=(e,t)=>{e.name="$ZodError",nR.value=t,Object.defineProperty(e,"issues",nR),nR.value=void 0,Object.defineProperty(e,"message",nO);let r=Object.getPrototypeOf(e);nT.has(r)||(nT.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},nx=ek("$ZodError",nA);function nC(e,t){return{callee:t?.callee??e,Err:t?.Err}}ek("$ZodError",nA,void 0,{Parent:Error});let nk=e=>{let t=(r,n,i,o)=>{let a=i?{...i,async:!1}:{async:!1},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new eP;if(s.issues.length){let r=new(o?.Err??e)(s.issues.map(e=>eb(e,a,eN())));throw X(r,o?.callee??t),r}return s.value};return t},nP=e=>{let t=async(r,n,i,o)=>{let a=i?{...i,async:!0}:{async:!0},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let r=new(o?.Err??e)(s.issues.map(e=>eb(e,a,eN())));throw X(r,o?.callee??t),r}return s.value};return t},nU=e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new eP;return o.issues.length?nI(e,o.issues,i):{success:!0,data:o.value}};function nI(e,t,r){let n;return{success:!1,get error(){return n||(n=new e(t.map(e=>eb(e,r,eN()))),t=void 0,r=void 0),n},set error(e){n=e,t=void 0,r=void 0}}}let nN=e=>async(t,r,n)=>{let i=n?{...n,async:!0}:{async:!0},o=t._zod.run({value:r,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?nI(e,o.issues,i):{success:!0,data:o.value}},nL=Symbol.for("zod.compile.invalid"),nz=Symbol.for("zod.compile.fallback"),nj=new WeakSet([Object.prototype,Error.prototype]);function nD(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=r(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}let n$=ek("ZodError",(e,t)=>{nx.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);nj.has(r)||(nj.add(r),nD(r,"format",e=>t=>(function(e,t=e=>e.message){let r={_errors:[]},n=(e,i=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>n({issues:e},[...i,...o.path]));else if("invalid_key"===o.code)n({issues:o.issues},[...i,...o.path]);else if("invalid_element"===o.code)n({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(0===e.length)r._errors.push(t(o));else{let n=r,i=0;for(;i<e.length;){let r=e[i],a=i===e.length-1;if("_errors"===r){a&&n._errors.push(t(o)),i++;continue}Object.prototype.hasOwnProperty.call(n,r)||Object.defineProperty(n,r,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=n[r];a&&s._errors.push(t(o)),n=s,i++}}}};return n(e),r})(e,t)),nD(r,"flatten",e=>t=>(function(e,t=e=>e.message){let r={},n=[];for(let a of e.issues)if(a.path.length>0){var i,o;(i=a.path[0],o=()=>[],!Object.prototype.hasOwnProperty.call(r,i)&&("__proto__"===i?Object.defineProperty(r,i,{value:o(),writable:!0,enumerable:!0,configurable:!0}):r[i]=o()),r[i]).push(t(a))}else n.push(t(a));return{formErrors:n,fieldErrors:r}})(e,t)),nD(r,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,B,2)}),nD(r,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,B,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error}),nM=nk(n$),nB=nP(n$),nF=nU(n$),nq=nN(n$),nW=(o=nk(n$),a=(e,t,r,n)=>o(e,t,r?{...r,direction:"backward"}:{direction:"backward"},nC(a,n))),nZ=(s=nk(n$),l=(e,t,r,n)=>s(e,t,r,nC(l,n))),nK=(u=nP(n$),c=async(e,t,r,n)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return await u(e,t,i,nC(c,n))}),nH=(p=nP(n$),d=async(e,t,r,n)=>await p(e,t,r,nC(d,n))),nV=(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return nU(n$)(e,t,n)},nG=(e,t,r)=>nU(n$)(e,t,r),nJ=async(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return nN(n$)(e,t,n)},nY=async(e,t,r)=>nN(n$)(e,t,r);function nX(){eI.memoizer||eN({memoizer:eF})}let nQ=ek("ZodType",(e,t)=>(eI.localeError||eN(nS()),tA.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Y(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return eo(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new i8({type:"custom",check:"custom",fn:e,...ea(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let n,i;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(eE(e,t.value,n._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=n),e.continue??(e.continue=!n._zod.def.abort),t.issues.push(eE(e)))},e(t.value,t)),(i=new to({check:"custom",...ea(t)}))._zod.check=r,n=i}(e,t))},overwrite(e){return this.check(r0(e))},optional(){return iY(this)},exactOptional(){var e;return e=this,new iX({type:"optional",innerType:e})},nullable(){return i0(this)},nullish(){return iY(i0(this))},nonoptional(e){var t;return t=this,new i4({type:"nonoptional",innerType:t,...ea(e)})},array(){return iN(this)},or(e){return i$([this,e])},and(e){var t;return t=this,new iF({type:"intersection",left:t,right:e})},transform(e){return i6(this,new iG({type:"transform",transform:e}))},default(e){var t,r;return t=this,r=e,new i1({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():er(r)}})},prefault(e){var t,r;return t=this,r=e,new i2({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():er(r)}})},catch(e){return function(e,t){let r;return new i3({type:"catch",innerType:e,catchValue:"function"==typeof t?t:((r=()=>t)["~constantCatch"]=!0,r)})}(this,e)},pipe(e){return i6(this,e)},readonly(){var e;return e=this,new i5({type:"readonly",innerType:e})},describe(e){let t=this.clone();return rF.add(t,{description:e}),t},meta(...e){if(0===e.length)return rF.get(this);let t=this.clone();return rF.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return eS(this,"~standard",{...tC(this),jsonSchema:{input:nr(this,"input"),output:nr(this,"output")}},!1)},set"~standard"(e){eS(this,"~standard",e)},parse:function e(t,r){return nM(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await nB(this,t,r,{callee:e})},safeParse(e,t){return nF(this,e,t)},async safeParseAsync(e,t){return nq(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){eS(this,"spa",e)},validate(e,t){let r=this._zod.bag.validator;if(void 0!==r){if(r(e)!==nL)return!0;if(!0===r.definite&&void 0===t)return!1}return function(e,t,r){let n,i=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;if(o?(i[nz]=!0,n=o({value:t,issues:[]},i)):n=e._zod.run({value:t,issues:[]},i),n instanceof Promise)throw new eP;return 0===n.issues.length}(this,e,t)},validateAsync(e,t){return(async(e,t,r)=>{let n=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},n);return i instanceof Promise&&(i=await i),0===i.issues.length})(this,e,t)},encode:function e(t,r){return nW(this,t,r,{callee:e})},decode:function e(t,r){return nZ(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await nK(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await nH(this,t,r,{callee:e})},safeEncode(e,t){return nV(this,e,t)},safeDecode(e,t){return nG(this,e,t)},async safeEncodeAsync(e,t){return nJ(this,e,t)},async safeDecodeAsync(e,t){return nY(this,e,t)},toJSONSchema(e){return((e,t={})=>r=>{let n=r2({...r,processors:t});return r3(e,n),r6(n,e),nt(n,e)})(this,{})(e)},get description(){return rF.get(this)?.description},get _def(){return this._zod.def}}),n0=ek("_ZodString",(e,t)=>{tk.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r)=>{r.type="string";let{minimum:n,maximum:i,format:o,patterns:a,contentEncoding:s,laxFormat:l}=nh(e);if("number"==typeof n&&(r.minLength=n),"number"==typeof i&&(r.maxLength=i),o&&(r.format=nm[o]??o,""===r.format&&delete r.format,("time"===o||l)&&delete r.format),s&&(r.contentEncoding=s),a&&a.size>0){let e=[...a].map(ny);1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,r)},eO({format:e=>nh(e).format??null,minLength:e=>nh(e).minimum??null,maxLength:e=>nh(e).maximum??null},{regex(...e){return this.check(function(e,t){return new tg({check:"string_format",format:"regex",...ea(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new tv({check:"string_format",format:"includes",...ea(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new tw({check:"string_format",format:"starts_with",...ea(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new t_({check:"string_format",format:"ends_with",...ea(t),suffix:e})}(...e))},min(...e){return this.check(rX(...e))},max(...e){return this.check(rY(...e))},length(...e){return this.check(rQ(...e))},nonempty(...e){return this.check(rX(1,...e))},lowercase(e){return this.check(new ty({check:"string_format",format:"lowercase",...ea(e)}))},uppercase(e){return this.check(new tb({check:"string_format",format:"uppercase",...ea(e)}))},trim(){return this.check(r0(e=>e.trim()))},normalize(...e){return this.check(function(e){return r0(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(r0(e=>e.toLowerCase()))},toUpperCase(){return this.check(r0(e=>e.toUpperCase()))},slugify(){return this.check(r0(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})),n1=ek("ZodString",(e,t)=>{tk.init(e,t),n0.init(e,t)},{email(e){return this.check(new n8({type:"string",format:"email",check:"string_format",abort:!1,...ea(e)}))},url(e){return this.check(rW(it,e))},jwt(e){return this.check(new iv({type:"string",format:"jwt",check:"string_format",abort:!1,...ea(e)}))},emoji(e){return this.check(new ii({type:"string",format:"emoji",check:"string_format",abort:!1,...ea(e)}))},guid(e){return this.check(new n7({type:"string",format:"guid",check:"string_format",abort:!1,...ea(e)}))},uuid(e){return this.check(new ie({type:"string",format:"uuid",check:"string_format",abort:!1,...ea(e)}))},uuidv4(e){return this.check(new ie({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ea(e)}))},uuidv6(e){return this.check(new ie({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ea(e)}))},uuidv7(e){return this.check(new ie({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ea(e)}))},nanoid(e){return this.check(new io({type:"string",format:"nanoid",check:"string_format",abort:!1,...ea(e)}))},cuid(e){return this.check(new ia({type:"string",format:"cuid",check:"string_format",abort:!1,...ea(e)}))},cuid2(e){return this.check(new is({type:"string",format:"cuid2",check:"string_format",abort:!1,...ea(e)}))},ulid(e){return this.check(new il({type:"string",format:"ulid",check:"string_format",abort:!1,...ea(e)}))},base64(e){return this.check(new ig({type:"string",format:"base64",check:"string_format",abort:!1,...ea(e)}))},base64url(e){return this.check(new iy({type:"string",format:"base64url",check:"string_format",abort:!1,...ea(e)}))},xid(e){return this.check(new iu({type:"string",format:"xid",check:"string_format",abort:!1,...ea(e)}))},ksuid(e){return this.check(new ic({type:"string",format:"ksuid",check:"string_format",abort:!1,...ea(e)}))},ipv4(e){return this.check(new ip({type:"string",format:"ipv4",check:"string_format",abort:!1,...ea(e)}))},ipv6(e){return this.check(new id({type:"string",format:"ipv6",check:"string_format",abort:!1,...ea(e)}))},cidrv4(e){return this.check(new ih({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ea(e)}))},cidrv6(e){return this.check(new im({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ea(e)}))},e164(e){return this.check(new ib({type:"string",format:"e164",check:"string_format",abort:!1,...ea(e)}))},datetime(e){return this.check(rZ(n3,e))},date(e){return this.check(new n9({type:"string",format:"date",check:"string_format",...ea(e)}))},time(e){return this.check(new n6({type:"string",format:"time",check:"string_format",precision:null,...ea(e)}))},duration(e){return this.check(new n5({type:"string",format:"duration",check:"string_format",...ea(e)}))}});function n2(e){return new n1(rq({type:"string",...ea(e)}))}let n4=ek("ZodStringFormat",(e,t)=>{tP.init(e,t),n0.init(e,t)}),n3=ek("ZodISODateTime",(e,t)=>{tK.init(e,t),n4.init(e,t)}),n9=ek("ZodISODate",(e,t)=>{tH.init(e,t),n4.init(e,t)}),n6=ek("ZodISOTime",(e,t)=>{tV.init(e,t),n4.init(e,t)}),n5=ek("ZodISODuration",(e,t)=>{tG.init(e,t),n4.init(e,t)}),n8=ek("ZodEmail",(e,t)=>{tN.init(e,t),n4.init(e,t)}),n7=ek("ZodGUID",(e,t)=>{tU.init(e,t),n4.init(e,t)}),ie=ek("ZodUUID",(e,t)=>{tI.init(e,t),n4.init(e,t)}),it=ek("ZodURL",(e,t)=>{tD.init(e,t),n4.init(e,t)});function ir(e){return rW(it,e)}let ii=ek("ZodEmoji",(e,t)=>{t$.init(e,t),n4.init(e,t)}),io=ek("ZodNanoID",(e,t)=>{tM.init(e,t),n4.init(e,t)}),ia=ek("ZodCUID",(e,t)=>{tB.init(e,t),n4.init(e,t)}),is=ek("ZodCUID2",(e,t)=>{tF.init(e,t),n4.init(e,t)}),il=ek("ZodULID",(e,t)=>{tq.init(e,t),n4.init(e,t)}),iu=ek("ZodXID",(e,t)=>{tW.init(e,t),n4.init(e,t)}),ic=ek("ZodKSUID",(e,t)=>{tZ.init(e,t),n4.init(e,t)}),ip=ek("ZodIPv4",(e,t)=>{tJ.init(e,t),n4.init(e,t)}),id=ek("ZodIPv6",(e,t)=>{tQ.init(e,t),n4.init(e,t)}),ih=ek("ZodCIDRv4",(e,t)=>{t0.init(e,t),n4.init(e,t)}),im=ek("ZodCIDRv6",(e,t)=>{t1.init(e,t),n4.init(e,t)}),ig=ek("ZodBase64",(e,t)=>{t3.init(e,t),n4.init(e,t)}),iy=ek("ZodBase64URL",(e,t)=>{t6.init(e,t),n4.init(e,t)}),ib=ek("ZodE164",(e,t)=>{t5.init(e,t),n4.init(e,t)}),iv=ek("ZodJWT",(e,t)=>{t8.init(e,t),n4.init(e,t)}),iw=ek("ZodNumber",(e,t)=>{t7.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let{minimum:i,maximum:o,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:l,isInt:u}=nh(e);r.type=u?"integer":"number";let c="number"==typeof l&&l>=(i??-1/0),p="number"==typeof s&&s<=(o??1/0),d="draft-04"===t.target||"openapi-3.0"===t.target;if(c?d?(r.minimum=l,r.exclusiveMinimum=!0):r.exclusiveMinimum=l:"number"==typeof i&&(r.minimum=i),p?d?(r.maximum=s,r.exclusiveMaximum=!0):r.exclusiveMaximum=s:"number"==typeof o&&(r.maximum=o),a){let i=new Set;for(let o of a)Number.isFinite(o)&&0!==o?i.add(Math.abs(o)):r4(e,t,r,n,`A multipleOf divisor of ${o} cannot be represented in JSON Schema`);let[o,...s]=i;void 0!==o&&(r.multipleOf=o),s.length&&(r.allOf=[...r.allOf??[],...s.map(e=>({multipleOf:e}))])}})(e,t,r,n),e.isFinite=!0},eO({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=nh(e);return Math.max(t??-1/0,r??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=nh(e);return Math.min(t??1/0,r??1/0)},isInt:e=>{let{isInt:t,multipleOf:r}=nh(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>nh(e).format??null},{gt(e,t){return this.check(rV(e,t))},gte(e,t){return this.check(rG(e,t))},min(e,t){return this.check(rG(e,t))},lt(e,t){return this.check(rK(e,t))},lte(e,t){return this.check(rH(e,t))},max(e,t){return this.check(rH(e,t))},int(e){return this.check(iS(e))},safe(e){return this.check(iS(e))},positive(e){return this.check(rV(0,e))},nonnegative(e){return this.check(rG(0,e))},negative(e){return this.check(rK(0,e))},nonpositive(e){return this.check(rH(0,e))},multipleOf(e,t){return this.check(rJ(e,t))},step(e,t){return this.check(rJ(e,t))},finite(){return this}}));function i_(e){return new iw(rq({type:"number",checks:[],...ea(e)}))}let iE=ek("ZodNumberFormat",(e,t)=>{re.init(e,t),iw.init(e,t)});function iS(e){return new iE({type:"number",check:"number_format",abort:!1,format:"safeint",...ea(e)})}let iO=ek("ZodBoolean",(e,t)=>{rt.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{t.type="boolean"}});function iR(e){return new iO({type:"boolean",...ea(e)})}let iT=ek("ZodNull",(e,t)=>{rr.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{"openapi-3.0"===e.target?(t.type="string",t.nullable=!0,t.enum=[null]):t.type="null"}}),iA=ek("ZodUnknown",(e,t)=>{rn.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(e,t,r)=>void 0});function ix(){return new iA({type:"unknown"})}let iC=ek("ZodNever",(e,t)=>{ri.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{t.not={}}});function ik(e){return new iC({type:"never",...ea(e)})}let iP=ek("ZodDate",(e,t)=>{ro.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{r4(e,t,r,n,"Date cannot be represented in JSON Schema")},e.min=(t,r)=>e.check(rG(t,r)),e.max=(t,r)=>e.check(rH(t,r))},eO({minDate:e=>{let{minimum:t}=nh(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=nh(e);return t?new Date(t):null}},{}));function iU(e){return new iP({type:"date",...ea(e)})}let iI=ek("ZodArray",(e,t)=>{nX(),rl.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def,{minimum:o,maximum:a}=nh(e);"number"==typeof o&&(r.minItems=o),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=r3(i.element,t,{...n,path:[...n.path,"items"]})})(e,t,r,n),e.element=t.element},{min(e,t){return this.check(rX(e,t))},nonempty(e){return this.check(rX(1,e))},max(e,t){return this.check(rY(e,t))},length(e,t){return this.check(rQ(e,t))},unwrap(){return this.element}});function iN(e,t){return new iI({type:"array",element:e,...ea(t)})}let iL=ek("ZodObject",(e,t)=>{var r;let n,i;nX(),rh.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def,o=i.shape;if(Object.getOwnPropertySymbols(o).length&&r4(e,t,r,n,"Symbol keys cannot be represented in JSON Schema"))return;for(let e in r.type="object",r.properties={},o)Z(r.properties,e,r3(o[e],t,{...n,path:[...n.path,"properties",e]}));let a=[];for(let e of Object.keys(o)){let r=i.shape[e];("input"===t.io?void 0===nb(r):void 0===r._zod.optout)&&a.push(e)}a.length>0&&(r.required=a),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=r3(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)})(e,t,r,n),r="shape",(i=r in(n=Object.getPrototypeOf(e))?void 0:n)&&Object.defineProperty(i,r,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:!1,value:void 0};return Object.defineProperty(this,r,e),e.value=(e=>e._zod.def.shape)(this),Object.defineProperty(this,r,e),e.value},set(e){Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!1,value:e})}})},{keyof(){return iK(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Y(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Y(this._zod.def,{catchall:ix()}))},loose(){return this.clone(Y(this._zod.def,{catchall:ix()}))},strict(){return this.clone(Y(this._zod.def,{catchall:ik()}))},strip(){return this.clone(Y(this._zod.def,{catchall:void 0}))},extend(e){if(!et(e))throw Error("Invalid input to extend: expected a plain object");let t=this._zod.def.checks;if(t&&t.length>0){let t=H(this);for(let r of Reflect.ownKeys(e))if(void 0!==Object.getOwnPropertyDescriptor(t,r))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return eo(this,Y(this._zod.def,{shape:ep(this,e)}))},safeExtend(e){if(!et(e))throw Error("Invalid input to safeExtend: expected a plain object");return eo(this,Y(this._zod.def,{shape:ep(this,e)}))},merge(e){if(!e?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(this._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let t={};return J(t,this,Reflect.ownKeys(H(this))),J(t,e,Reflect.ownKeys(H(e))),eo(this,Y(this._zod.def,{shape:t,get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]}))},pick(e){return function(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i={};return J(i,e,ec(e,t)),eo(e,Y(r,{shape:i,checks:[]}))}(this,e)},omit(e){return function(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(ec(e,t)),o={};return J(o,e,Reflect.ownKeys(H(e)).filter(e=>!i.has(e))),eo(e,Y(r,{shape:o,checks:[]}))}(this,e)},partial(...e){return ed(iJ,this,e[0])},exactPartial(...e){return ed(iX,this,e[0],"exactPartial")},required(...e){var t;let r,n;return r=(t=e[0])?new Set(ec(this,t)):void 0,J(n={},this,Reflect.ownKeys(H(this)),(e,t)=>r&&!r.has(t)?e:new i4({type:"nonoptional",innerType:e})),eo(this,Y(this._zod.def,{shape:n}))}});function iz(e,t){return new iL({type:"object",shape:e,catchall:ik(),...ea(t)})}function ij(e,t){return new iL({type:"object",shape:e,catchall:ix(),...ea(t)})}let iD=ek("ZodUnion",(e,t)=>{rg.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a;return o=!1===(i=e._zod.def).inclusive,a=i.options.map((e,r)=>r3(e,t,{...n,path:[...n.path,o?"oneOf":"anyOf",r]})),void(o?r.oneOf=a:r.anyOf=a)},e.options=t.options});function i$(e,t){return new iD({type:"union",options:e,...ea(t)})}let iM=ek("ZodDiscriminatedUnion",(e,t)=>{iD.init(e,t),ry.init(e,t)});function iB(e,t,r){return new iM({type:"union",options:t,discriminator:e,...ea(r)})}let iF=ek("ZodIntersection",(e,t)=>{rb.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a,s,l;return o=r3((i=e._zod.def).left,t,{...n,path:[...n.path,"allOf",0]}),a=r3(i.right,t,{...n,path:[...n.path,"allOf",1]}),void(r.allOf=l=[...(s=e=>"allOf"in e&&1===Object.keys(e).length)(o)?o.allOf:[o],...s(a)?a.allOf:[a]],t.intersections.push(l))}}),iq=ek("ZodRecord",(e,t)=>{nX(),rw.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;r.type="object";let o=i.keyType,a=nh(o).patterns;if("loose"===i.mode&&a&&a.size>0){let e=r3(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});for(let t of(r.patternProperties={},a))Z(r.patternProperties,ny(t).source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){r.propertyNames=r3(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let o=nv.get(t);o||(o=[],nv.set(t,o),t.deferred.push(()=>(function(e){let t=new Map;for(let r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);let r=new Map;for(let n of nv.get(e)??[]){let i=e.seen.get(n),o=(i?.def??i?.schema)?.propertyNames;if(!o||!0===o||r.has(o))continue;let a=function e(t,r,n){if(r.$ref){if(n.has(r))return r;n.add(r);let i=t.get(r)?.def;if(!i)return r;let o=e(t,i,n);return o===i?r:o}for(let i of["anyOf","oneOf"]){let o=r[i];if(!Array.isArray(o))continue;let a=o.map(r=>e(t,r,n));a.some((e,t)=>e!==o[t])&&(r={...r,[i]:a})}let i=Array.isArray(r.type)?r.type:[r.type],o=!i.includes("string")&&i.some(e=>"number"===e||"integer"===e),a=r.enum??(void 0!==r.const?[r.const]:void 0);if(!o&&!a?.some(e=>"number"==typeof e))return r;let{minimum:s,maximum:l,exclusiveMinimum:u,exclusiveMaximum:c,multipleOf:p,format:d,id:f,...h}=r;return h.enum?h.enum=h.enum.map(e=>"number"==typeof e?String(e):e):"number"==typeof h.const&&(h.const=String(h.const)),o&&(h.type="string",a||(h.pattern=(i.includes("number")?te:e7).source)),h}(t,o,new Set);a!==o&&r.set(o,a)}if(r.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&r.get(e.propertyNames);t&&(e.propertyNames=t)}})(t))),o.push(e)}r.additionalProperties=r3(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let s=o._zod.values,l="input"===t.io&&void 0!==nb(i.valueType);if(s&&!i.partial&&!l){let e=[...s].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e.map(String))}})(e,t,r,n),e.keyType=t.keyType,e.valueType=t.valueType});function iW(e,t,r){return new iq(t&&t._zod?{type:"record",keyType:e,valueType:t,...ea(r)}:{type:"record",keyType:n2(),valueType:e,...ea(t)})}let iZ=ek("ZodEnum",(e,t)=>{r_.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t)=>{let r=$(e._zod.def.entries);if(0===r.length){t.not={};return}r.every(e=>"number"==typeof e)&&(t.type="number"),r.every(e=>"string"==typeof e)&&(t.type="string"),t.enum=r})(e,r),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(e,n)=>{let i={};for(let n of e)if(r.has(n))i[n]=t.entries[n];else throw Error(`Key ${n} not found in enum`);return new iZ({...t,checks:[],...ea(n),entries:i})},e.exclude=(e,n)=>{let i={...t.entries};for(let t of e)if(r.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new iZ({...t,checks:[],...ea(n),entries:i})}});function iK(e,t){return new iZ({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...ea(t)})}let iH=ek("ZodLiteral",(e,t)=>{rE.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;if(0===i.values.length){r.not={};return}let o=[];for(let a of i.values)if(void 0===a){if(r4(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(r4(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(0===o.length);else if(1===o.length){let e=o[0];r.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?r.enum=[e]:r.const=e}else o.every(e=>"number"==typeof e)&&(r.type="number"),o.every(e=>"string"==typeof e)&&(r.type="string"),o.every(e=>"boolean"==typeof e)&&(r.type="boolean"),o.every(e=>null===e)&&(r.type="null"),r.enum=o})(e,t,r,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function iV(e,t){return new iH({type:"literal",values:Array.isArray(e)?e:[e],...ea(t)})}let iG=ek("ZodTransform",(e,t)=>{nX(),rS.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{r4(e,t,r,n,"Transforms cannot be represented in JSON Schema")},e._zod.parse=(r,n)=>{if("backward"===n.direction)throw new eU(e.constructor.name);r.addIssue=n=>{"string"==typeof n?r.issues.push(eE(n,r.value,t)):(n.fatal&&(n.continue=!1),n.code??(n.code="custom"),"input"in n||(n.input=r.value),n.inst??(n.inst=e),r.issues.push(eE(n)))};let i=t.transform(r.value,r);return i instanceof Promise?i.then(e=>(r.value=e,r)):(r.value=i,r)}}),iJ=ek("ZodOptional",(e,t)=>{rR.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>nE(e,t,r,n),e.unwrap=()=>e._zod.def.innerType});function iY(e){return new iJ({type:"optional",innerType:e})}let iX=ek("ZodExactOptional",(e,t)=>{rT.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>nE(e,t,r,n),e.unwrap=()=>e._zod.def.innerType}),iQ=ek("ZodNullable",(e,t)=>{rA.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a;return o=r3((i=e._zod.def).innerType,t,n),a=t.seen.get(e),void("openapi-3.0"===t.target?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}])},e.unwrap=()=>e._zod.def.innerType});function i0(e){return new iQ({type:"nullable",innerType:e})}let i1=ek("ZodDefault",(e,t)=>{rx.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o;return r3((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,void((o=n_(i.defaultValue,e,t,r,n))!==nw&&(r.default=o))},e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),i2=ek("ZodPrefault",(e,t)=>{rk.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;if(r3(i.innerType,t,n),t.seen.get(e).ref=i.innerType,"input"!==t.io)return;let o=n_(i.defaultValue,e,t,r,n);o!==nw&&(r._prefault=o)})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType}),i4=ek("ZodNonOptional",(e,t)=>{rP.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;r3((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType},e.unwrap=()=>e._zod.def.innerType}),i3=ek("ZodCatch",(e,t)=>{rN.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i,o=e._zod.def;r3(o.innerType,t,n),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{r4(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=i})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),i9=ek("ZodPipe",(e,t)=>{rL.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a;return o=(i=e._zod.def).in._zod.traits.has("$ZodTransform"),void(r3(a="input"===t.io?o?i.out:i.in:i.out,t,n),t.seen.get(e).ref=a)},e.in=t.in,e.out=t.out});function i6(e,t){return new i9({type:"pipe",in:e,out:t})}let i5=ek("ZodReadonly",(e,t)=>{rj.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;r3((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,r.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),i8=ek("ZodCustom",(e,t)=>{r$.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{r4(e,t,r,n,"Custom types cannot be represented in JSON Schema")}});function i7(e,t){var r;let n;return r=e??(()=>!0),(n=ea(t)).abort??(n.abort=!0),new i8({type:"custom",check:"custom",fn:r,...n})}let oe=ek("ZodInstanceOf",(e,t)=>{i8.init(e,t)},{properties(e,t){return this.check(new tS({check:"properties",shape:e,...ea(t)}))}});function ot(e,t={}){let r=new oe({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...ea(t)});return r._zod.bag.Class=e,r._zod.check=t=>{t.value instanceof e||t.issues.push({code:"invalid_type",expected:e.name,input:t.value,inst:r,path:[...r._zod.def.path??[]]})},r}let or="[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+",on=`${or}(?:\\.${or})*`,oi="[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?",oo=`${oi}(?:\\.${oi})+`,oa=`${on}@${oo}`;RegExp(`^${oa}$`);let os=`(${oa})( *, *${oa})*`;RegExp(`^${os}$`);let ol="[a-z\\d](?:[a-z\\d]|-(?=[a-z\\d])){0,38}";RegExp(`^${ol}$`,"i"),RegExp("^(?:(?:(?:https?):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u00a1-\\uffff][a-z0-9\\u00a1-\\uffff_-]{0,62})?[a-z0-9\\u00a1-\\uffff]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}\\.?|xn--[a-z0-9]+))(?::\\d{2,5})?(?:[/?#]\\S*)?$","i"),RegExp(`^https:\\/\\/gist\\.github\\.com\\/${ol}\\/[0-9a-f]{32}$`,"i");let ou={READY:"READY",RUNNING:"RUNNING",SUCCEEDED:"SUCCEEDED",FAILED:"FAILED",TIMING_OUT:"TIMING-OUT",TIMED_OUT:"TIMED-OUT",ABORTING:"ABORTING",ABORTED:"ABORTED"},oc=[ou.SUCCEEDED,ou.FAILED,ou.TIMED_OUT,ou.ABORTED],op={DEVELOPMENT:"DEVELOPMENT",WEB:"WEB",API:"API",SCHEDULER:"SCHEDULER",TEST:"TEST",WEBHOOK:"WEBHOOK",ACTOR:"ACTOR",CLI:"CLI",STANDBY:"STANDBY",CI:"CI",MCP:"MCP",APIFY_AI:"APIFY_AI"},od="APIFY_LOG_FORMAT",of="ACTOR_RUN_ID",oh={ACTOR_STANDBY_PORT:"4321",ACTOR_DEFAULT_DATASET_ID:"default",ACTOR_DEFAULT_KEY_VALUE_STORE_ID:"default",ACTOR_DEFAULT_REQUEST_QUEUE_ID:"default",ACTOR_WEB_SERVER_PORT:"4321",ACTOR_WEB_SERVER_URL:"http://localhost:4321"};oh.ACTOR_WEB_SERVER_PORT,oh.ACTOR_WEB_SERVER_URL,oh.ACTOR_DEFAULT_DATASET_ID,oh.ACTOR_DEFAULT_KEY_VALUE_STORE_ID,oh.ACTOR_DEFAULT_REQUEST_QUEUE_ID;let om={FULL_PERMISSIONS:"FULL_PERMISSIONS",LIMITED_PERMISSIONS:"LIMITED_PERMISSIONS"},og={OWNED_BY_ME:"ownedByMe",SHARED_WITH_ME:"sharedWithMe"};(_=N||(N={}))[_.OFF=0]="OFF",_[_.ERROR=1]="ERROR",_[_.SOFT_FAIL=2]="SOFT_FAIL",_[_.WARNING=3]="WARNING",_[_.INFO=4]="INFO",_[_.DEBUG=5]="DEBUG",_[_.PERF=6]="PERF";let oy=N,ob=Object.keys(N).filter(e=>Number.isNaN(+e));(E=L||(L={})).JSON="JSON",E.TEXT="TEXT";let ov=Symbol("apify.processed_error"),ow="[TRUNCATED]",o_="...[truncated]",oE=["_id","id","userId","impersonatedUserId","impersonatingUserId","adminUserId","actorId","actorTaskId","taskId","buildId","buildNumber","runId","name","message","stack","cause","url","method","code","status","statusCode","statusText","errorCode","errorMessage","errorResponse","response","request","data","payload","details","exception","config","headers"];var oS=r("z"),oO=r("q");let oR=class Logger extends oO.EventEmitter{options;constructor(e){super(),this.options=e}setOptions(e){this.options={...this.options,...e}}getOptions(){return this.options}_outputWithConsole(e,t){switch(e){case N.ERROR:console.error(t);break;case N.WARNING:console.warn(t);break;case N.DEBUG:console.debug(t);break;default:console.log(t)}}_log(e,t,r,n,i={}){throw Error("log() method must be implemented!")}log(e,t,...r){let n=this._log(e,t,...r);this.emit("line",n)}};let oT={skipLevelInfo:!1,skipTime:!1};let oA=class logger_json_LoggerJson extends oR{constructor(e={}){super({...oT,...e})}_log(e,t,r,n,i={}){let{prefix:o,suffix:a}=i;n&&(r={...r,exception:n}),o&&(t=`${o}: ${t}`),a&&(t=`${t} ${a}`);let s=JSON.stringify({time:this.options.skipTime?void 0:new Date,level:this.options.skipLevelInfo&&e===N.INFO?void 0:N[e],msg:t,...r});return this._outputWithConsole(e,s),s}};var ox=r("v"),oC=r.n(ox);let ok={SOFT_FAIL:"SFAIL",WARNING:"WARN"},oP={[N.ERROR]:"red",[N.SOFT_FAIL]:"red",[N.WARNING]:"yellow",[N.INFO]:"green",[N.DEBUG]:"blue",[N.PERF]:"magenta"},oU=ob.map(e=>ok[e]||e),oI=Math.max(...oU.map(e=>e.length)),oN={skipTime:!0};let oL=class LoggerText extends oR{constructor(e={}){super({...oN,...e})}_log(e,t,r,n,i={}){let{prefix:o,suffix:a}=i,s="";this.options.skipTime||(s=`${new Date().toISOString().replace("Z","").replace("T"," ")} `);let l=n?this._parseException(n):"",u=oP[e],c=oU[e],p=(e=>{let t="";for(let r=0;r<oI-e.length;r++)t+=" ";return t})(c),d=r?` ${JSON.stringify(r)}`:"";o=o?` ${o}:`:"",a=a?` ${a}`:"";let f=`${ox.gray(s)}${ox[u](c)}${p}${ox.yellow(o)} ${t||""}${ox.gray(d)}${ox.yellow(a)}${l}`;return this._outputWithConsole(e,f),f}_parseException(e,t=1){return["string","boolean","number","undefined","bigint"].includes(typeof e)?`
56
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let n=r[1];if(t===r[0]){i(r);continue}if(e.external){let n=e.external.registry.get(r[0])?.id;if(t!==r[0]&&n){i(r);continue}}if(e.metadataRegistry.get(r[0])?.id||n.cycle){i(r);continue}n.count>1&&"ref"===e.reused&&i(r)}e.external&&(e.sharedDefsExtractedFor=e.external)}let r5=new Set(["type","properties","required","additionalProperties"]),r8=["oneOf","anyOf"];function r7(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function ne(e){let t=[];for(let r of e){if("object"!=typeof r||"object"!==r.type)return null;for(let e in r)if(!r5.has(e))return null;t.push(r)}let r={},n=new Set;for(let e of t){for(let n in e.properties){if(Object.prototype.hasOwnProperty.call(r,n))continue;let e=[];for(let r of t){let t=r.properties?.[n]??r7(r);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Z(r,n,1===e.length?e[0]:ne(e)??{allOf:e})}for(let t of e.required??[])n.add(t)}let i={type:"object",properties:r};if(n.size&&(i.required=[...n]),t.every(e=>!1===e.additionalProperties))i.additionalProperties=!1;else{let e=[];for(let r of t){let t=r7(r);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function nt(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let n=t=>{let r=e.seen.get(t);if(null===r.ref)return;let i=r.def??r.schema,o={...i},a=r.ref;if(r.ref=null,a){n(a);let r=e.seen.get(a),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):r1(i,s),r1(i,o),t._zod.parent===a)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in o||delete i[e]);if(s.$ref&&r.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(i[e])===JSON.stringify(r.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==a){n(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:r.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())n(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let r=t.anyOf;if(!Array.isArray(r)||0===r.length||void 0!==t.type)return;let n=[];for(let t of r){if(!t||"object"!=typeof t)return;e(t);let r=Object.keys(t);if(1!==r.length||"type"!==r[0])return;let i=t.type;for(let e of Array.isArray(i)?i:[i]){if("string"!=typeof e)return;n.includes(e)||n.push(e)}}delete t.anyOf,t.type=1===n.length?n[0]:n}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let r of e.seen.values())for(let e of[r.schema,r.def]){let r=e?.allOf;if(!Array.isArray(r))continue;let n=t.get(r);n?n.push(e):t.set(r,[e])}for(let r of e.intersections)for(let e of t.get(r)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of r5)if(t in e)return;let r=t.filter(e=>r8.some(t=>Array.isArray(e[t]))),n=null;if(r.length){let e=r[0],i=r8.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let o=t.filter(t=>t!==e),a=e[i].map(e=>ne([...o,e]));if(a.some(e=>!e))return;n={[i]:a}}else n=ne(t);n&&(delete e.allOf,r1(e,n))}(e)}}let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(r)}r1(i,r.defId?r.schema:r.def??r.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&i.id===o&&delete i.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,Z(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?i.$defs=a:i.definitions=a);try{let r=JSON.parse(JSON.stringify(i));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:nr(t,"input",e.processors),output:nr(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let nr=(e,t,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},a=r2({...i??{},target:o,io:t,processors:r});return r3(e,a),r6(a,e),nt(a,e)},nn=(e,t,r)=>{(void 0===e[t]||r>e[t])&&(e[t]=r)},ni=(e,t,r)=>{(void 0===e[t]||r<e[t])&&(e[t]=r)},no=(e,t)=>{nn(e,"minimum",t),ni(e,"maximum",t)},na=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},ns=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},nl=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},nu=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},nc=(e,t)=>nn(e,"minimum",t.minimum),np=(e,t)=>ni(e,"maximum",t.maximum),nd=e=>(t,r)=>{nu(t,r.format);let[n,i]=e[r.format];nn(t,"minimum",n),ni(t,"maximum",i)},nf={greater_than:(e,t)=>nn(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>ni(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>na(e,t.value),number_format:nd(el),bigint_format:nd(eu),min_length:nc,max_length:np,length_equals:(e,t)=>no(e,t.length),min_size:nc,max_size:np,size_equals:(e,t)=>no(e,t.size),string_format:(e,t)=>{nu(e,t.format),t.pattern&&ns(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>nl(e,t.mime)};function nh(e){let t={},r=e._zod.def;for(let n of e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[])nf[n._zod.def.check]?.(t,n._zod.def);let n=e._zod.bag;for(let e of(void 0!==n.minimum&&nn(t,"minimum",n.minimum),void 0!==n.exclusiveMinimum&&nn(t,"exclusiveMinimum",n.exclusiveMinimum),void 0!==n.maximum&&ni(t,"maximum",n.maximum),void 0!==n.exclusiveMaximum&&ni(t,"exclusiveMaximum",n.exclusiveMaximum),void 0!==n.multipleOf&&na(t,n.multipleOf),void 0!==n.format&&(t.format??(t.format=n.format),n.format.includes("int")&&(t.isInt=!0)),n.mime&&nl(t,n.mime),n.patterns??[]))ns(t,e);return t}let nm={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ng=new Map([[t4,/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/],[t9,/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/]]),ny=e=>ng.get(e)??e;function nb(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?nb(t.out):"catch"===t.type?nb(t.innerType):e._zod.optin}let nv=new WeakMap,nw=Symbol();function n_(e,t,r,n,i){let o=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(o=!0,null));return o?(r4(t,r,n,i,"BigInt defaults cannot be represented in JSON Schema"),nw):JSON.parse(a)}let nE=(e,t,r,n)=>{let i=e._zod.def;r3(i.innerType,t,n),t.seen.get(e).ref=i.innerType};function nS(){return{localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function n(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?r[e]??e:String(t)}return r=>{switch(r.code){case"invalid_type":{let e=n(r.expected),t=n(function(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":if(null===e)return"null";if(Array.isArray(e))return"array";if(e&&Object.getPrototypeOf(e)!==Object.prototype&&"constructor"in e&&e.constructor)return e.constructor.name}return t}(r.input),r.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${es(r.values[0])}`;return`Invalid option: expected one of ${M(r.values,"|")}`;case"too_big":{let t=r.exact?"exactly ":r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Too big: expected ${r.origin??"value"} to have ${t}${r.maximum.toString()} ${n.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${t}${r.maximum.toString()}`}case"too_small":{let t=r.exact?"exactly ":r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Too small: expected ${r.origin} to have ${t}${r.minimum.toString()} ${n.unit}`;return`Too small: expected ${r.origin} to be ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Invalid string: must start with "${r.prefix}"`;if("ends_with"===r.format)return`Invalid string: must end with "${r.suffix}"`;if("includes"===r.format)return`Invalid string: must include "${r.includes}"`;if("regex"===r.format)return`Invalid string: must match pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${M(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":if(r.options&&Array.isArray(r.options)&&r.options.length>0){let e=r.options.map(e=>`'${e}'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===r.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}})()}}let nO={get:function(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,B,2)),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},nR={value:void 0,enumerable:!1},nT=new WeakSet([Object.prototype,Error.prototype]),nA=(e,t)=>{e.name="$ZodError",nR.value=t,Object.defineProperty(e,"issues",nR),nR.value=void 0,Object.defineProperty(e,"message",nO);let r=Object.getPrototypeOf(e);nT.has(r)||(nT.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},nx=ek("$ZodError",nA);function nC(e,t){return{callee:t?.callee??e,Err:t?.Err}}ek("$ZodError",nA,void 0,{Parent:Error});let nk=e=>{let t=(r,n,i,o)=>{let a=i?{...i,async:!1}:{async:!1},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new eP;if(s.issues.length){let r=new(o?.Err??e)(s.issues.map(e=>eb(e,a,eN())));throw X(r,o?.callee??t),r}return s.value};return t},nP=e=>{let t=async(r,n,i,o)=>{let a=i?{...i,async:!0}:{async:!0},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let r=new(o?.Err??e)(s.issues.map(e=>eb(e,a,eN())));throw X(r,o?.callee??t),r}return s.value};return t},nU=e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new eP;return o.issues.length?nI(e,o.issues,i):{success:!0,data:o.value}};function nI(e,t,r){let n;return{success:!1,get error(){return n||(n=new e(t.map(e=>eb(e,r,eN()))),t=void 0,r=void 0),n},set error(e){n=e,t=void 0,r=void 0}}}let nN=e=>async(t,r,n)=>{let i=n?{...n,async:!0}:{async:!0},o=t._zod.run({value:r,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?nI(e,o.issues,i):{success:!0,data:o.value}},nL=Symbol.for("zod.compile.invalid"),nz=Symbol.for("zod.compile.fallback"),nj=new WeakSet([Object.prototype,Error.prototype]);function nD(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=r(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}let n$=ek("ZodError",(e,t)=>{nx.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);nj.has(r)||(nj.add(r),nD(r,"format",e=>t=>(function(e,t=e=>e.message){let r={_errors:[]},n=(e,i=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>n({issues:e},[...i,...o.path]));else if("invalid_key"===o.code)n({issues:o.issues},[...i,...o.path]);else if("invalid_element"===o.code)n({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(0===e.length)r._errors.push(t(o));else{let n=r,i=0;for(;i<e.length;){let r=e[i],a=i===e.length-1;if("_errors"===r){a&&n._errors.push(t(o)),i++;continue}Object.prototype.hasOwnProperty.call(n,r)||Object.defineProperty(n,r,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=n[r];a&&s._errors.push(t(o)),n=s,i++}}}};return n(e),r})(e,t)),nD(r,"flatten",e=>t=>(function(e,t=e=>e.message){let r={},n=[];for(let a of e.issues)if(a.path.length>0){var i,o;(i=a.path[0],o=()=>[],!Object.prototype.hasOwnProperty.call(r,i)&&("__proto__"===i?Object.defineProperty(r,i,{value:o(),writable:!0,enumerable:!0,configurable:!0}):r[i]=o()),r[i]).push(t(a))}else n.push(t(a));return{formErrors:n,fieldErrors:r}})(e,t)),nD(r,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,B,2)}),nD(r,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,B,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error}),nM=nk(n$),nB=nP(n$),nF=nU(n$),nq=nN(n$),nW=(o=nk(n$),a=(e,t,r,n)=>o(e,t,r?{...r,direction:"backward"}:{direction:"backward"},nC(a,n))),nZ=(s=nk(n$),l=(e,t,r,n)=>s(e,t,r,nC(l,n))),nK=(u=nP(n$),c=async(e,t,r,n)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return await u(e,t,i,nC(c,n))}),nH=(p=nP(n$),d=async(e,t,r,n)=>await p(e,t,r,nC(d,n))),nV=(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return nU(n$)(e,t,n)},nG=(e,t,r)=>nU(n$)(e,t,r),nJ=async(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return nN(n$)(e,t,n)},nY=async(e,t,r)=>nN(n$)(e,t,r);function nX(){eI.memoizer||eN({memoizer:eF})}let nQ=ek("ZodType",(e,t)=>(eI.localeError||eN(nS()),tA.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Y(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return eo(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new i8({type:"custom",check:"custom",fn:e,...ea(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let n,i;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(eE(e,t.value,n._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=n),e.continue??(e.continue=!n._zod.def.abort),t.issues.push(eE(e)))},e(t.value,t)),(i=new to({check:"custom",...ea(t)}))._zod.check=r,n=i}(e,t))},overwrite(e){return this.check(r0(e))},optional(){return iY(this)},exactOptional(){var e;return e=this,new iX({type:"optional",innerType:e})},nullable(){return i0(this)},nullish(){return iY(i0(this))},nonoptional(e){var t;return t=this,new i4({type:"nonoptional",innerType:t,...ea(e)})},array(){return iN(this)},or(e){return i$([this,e])},and(e){var t;return t=this,new iF({type:"intersection",left:t,right:e})},transform(e){return i6(this,new iG({type:"transform",transform:e}))},default(e){var t,r;return t=this,r=e,new i1({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():er(r)}})},prefault(e){var t,r;return t=this,r=e,new i2({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():er(r)}})},catch(e){return function(e,t){let r;return new i3({type:"catch",innerType:e,catchValue:"function"==typeof t?t:((r=()=>t)["~constantCatch"]=!0,r)})}(this,e)},pipe(e){return i6(this,e)},readonly(){var e;return e=this,new i5({type:"readonly",innerType:e})},describe(e){let t=this.clone();return rF.add(t,{description:e}),t},meta(...e){if(0===e.length)return rF.get(this);let t=this.clone();return rF.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return eS(this,"~standard",{...tC(this),jsonSchema:{input:nr(this,"input"),output:nr(this,"output")}},!1)},set"~standard"(e){eS(this,"~standard",e)},parse:function e(t,r){return nM(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await nB(this,t,r,{callee:e})},safeParse(e,t){return nF(this,e,t)},async safeParseAsync(e,t){return nq(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){eS(this,"spa",e)},validate(e,t){let r=this._zod.bag.validator;if(void 0!==r){if(r(e)!==nL)return!0;if(!0===r.definite&&void 0===t)return!1}return function(e,t,r){let n,i=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;if(o?(i[nz]=!0,n=o({value:t,issues:[]},i)):n=e._zod.run({value:t,issues:[]},i),n instanceof Promise)throw new eP;return 0===n.issues.length}(this,e,t)},validateAsync(e,t){return(async(e,t,r)=>{let n=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},n);return i instanceof Promise&&(i=await i),0===i.issues.length})(this,e,t)},encode:function e(t,r){return nW(this,t,r,{callee:e})},decode:function e(t,r){return nZ(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await nK(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await nH(this,t,r,{callee:e})},safeEncode(e,t){return nV(this,e,t)},safeDecode(e,t){return nG(this,e,t)},async safeEncodeAsync(e,t){return nJ(this,e,t)},async safeDecodeAsync(e,t){return nY(this,e,t)},toJSONSchema(e){return((e,t={})=>r=>{let n=r2({...r,processors:t});return r3(e,n),r6(n,e),nt(n,e)})(this,{})(e)},get description(){return rF.get(this)?.description},get _def(){return this._zod.def}}),n0=ek("_ZodString",(e,t)=>{tk.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r)=>{r.type="string";let{minimum:n,maximum:i,format:o,patterns:a,contentEncoding:s,laxFormat:l}=nh(e);if("number"==typeof n&&(r.minLength=n),"number"==typeof i&&(r.maxLength=i),o&&(r.format=nm[o]??o,""===r.format&&delete r.format,("time"===o||l)&&delete r.format),s&&(r.contentEncoding=s),a&&a.size>0){let e=[...a].map(ny);1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,r)},eO({format:e=>nh(e).format??null,minLength:e=>nh(e).minimum??null,maxLength:e=>nh(e).maximum??null},{regex(...e){return this.check(function(e,t){return new tg({check:"string_format",format:"regex",...ea(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new tv({check:"string_format",format:"includes",...ea(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new tw({check:"string_format",format:"starts_with",...ea(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new t_({check:"string_format",format:"ends_with",...ea(t),suffix:e})}(...e))},min(...e){return this.check(rX(...e))},max(...e){return this.check(rY(...e))},length(...e){return this.check(rQ(...e))},nonempty(...e){return this.check(rX(1,...e))},lowercase(e){return this.check(new ty({check:"string_format",format:"lowercase",...ea(e)}))},uppercase(e){return this.check(new tb({check:"string_format",format:"uppercase",...ea(e)}))},trim(){return this.check(r0(e=>e.trim()))},normalize(...e){return this.check(function(e){return r0(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(r0(e=>e.toLowerCase()))},toUpperCase(){return this.check(r0(e=>e.toUpperCase()))},slugify(){return this.check(r0(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})),n1=ek("ZodString",(e,t)=>{tk.init(e,t),n0.init(e,t)},{email(e){return this.check(new n8({type:"string",format:"email",check:"string_format",abort:!1,...ea(e)}))},url(e){return this.check(rW(it,e))},jwt(e){return this.check(new iv({type:"string",format:"jwt",check:"string_format",abort:!1,...ea(e)}))},emoji(e){return this.check(new ii({type:"string",format:"emoji",check:"string_format",abort:!1,...ea(e)}))},guid(e){return this.check(new n7({type:"string",format:"guid",check:"string_format",abort:!1,...ea(e)}))},uuid(e){return this.check(new ie({type:"string",format:"uuid",check:"string_format",abort:!1,...ea(e)}))},uuidv4(e){return this.check(new ie({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ea(e)}))},uuidv6(e){return this.check(new ie({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ea(e)}))},uuidv7(e){return this.check(new ie({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ea(e)}))},nanoid(e){return this.check(new io({type:"string",format:"nanoid",check:"string_format",abort:!1,...ea(e)}))},cuid(e){return this.check(new ia({type:"string",format:"cuid",check:"string_format",abort:!1,...ea(e)}))},cuid2(e){return this.check(new is({type:"string",format:"cuid2",check:"string_format",abort:!1,...ea(e)}))},ulid(e){return this.check(new il({type:"string",format:"ulid",check:"string_format",abort:!1,...ea(e)}))},base64(e){return this.check(new ig({type:"string",format:"base64",check:"string_format",abort:!1,...ea(e)}))},base64url(e){return this.check(new iy({type:"string",format:"base64url",check:"string_format",abort:!1,...ea(e)}))},xid(e){return this.check(new iu({type:"string",format:"xid",check:"string_format",abort:!1,...ea(e)}))},ksuid(e){return this.check(new ic({type:"string",format:"ksuid",check:"string_format",abort:!1,...ea(e)}))},ipv4(e){return this.check(new ip({type:"string",format:"ipv4",check:"string_format",abort:!1,...ea(e)}))},ipv6(e){return this.check(new id({type:"string",format:"ipv6",check:"string_format",abort:!1,...ea(e)}))},cidrv4(e){return this.check(new ih({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ea(e)}))},cidrv6(e){return this.check(new im({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ea(e)}))},e164(e){return this.check(new ib({type:"string",format:"e164",check:"string_format",abort:!1,...ea(e)}))},datetime(e){return this.check(rZ(n3,e))},date(e){return this.check(new n9({type:"string",format:"date",check:"string_format",...ea(e)}))},time(e){return this.check(new n6({type:"string",format:"time",check:"string_format",precision:null,...ea(e)}))},duration(e){return this.check(new n5({type:"string",format:"duration",check:"string_format",...ea(e)}))}});function n2(e){return new n1(rq({type:"string",...ea(e)}))}let n4=ek("ZodStringFormat",(e,t)=>{tP.init(e,t),n0.init(e,t)}),n3=ek("ZodISODateTime",(e,t)=>{tK.init(e,t),n4.init(e,t)}),n9=ek("ZodISODate",(e,t)=>{tH.init(e,t),n4.init(e,t)}),n6=ek("ZodISOTime",(e,t)=>{tV.init(e,t),n4.init(e,t)}),n5=ek("ZodISODuration",(e,t)=>{tG.init(e,t),n4.init(e,t)}),n8=ek("ZodEmail",(e,t)=>{tN.init(e,t),n4.init(e,t)}),n7=ek("ZodGUID",(e,t)=>{tU.init(e,t),n4.init(e,t)}),ie=ek("ZodUUID",(e,t)=>{tI.init(e,t),n4.init(e,t)}),it=ek("ZodURL",(e,t)=>{tD.init(e,t),n4.init(e,t)});function ir(e){return rW(it,e)}let ii=ek("ZodEmoji",(e,t)=>{t$.init(e,t),n4.init(e,t)}),io=ek("ZodNanoID",(e,t)=>{tM.init(e,t),n4.init(e,t)}),ia=ek("ZodCUID",(e,t)=>{tB.init(e,t),n4.init(e,t)}),is=ek("ZodCUID2",(e,t)=>{tF.init(e,t),n4.init(e,t)}),il=ek("ZodULID",(e,t)=>{tq.init(e,t),n4.init(e,t)}),iu=ek("ZodXID",(e,t)=>{tW.init(e,t),n4.init(e,t)}),ic=ek("ZodKSUID",(e,t)=>{tZ.init(e,t),n4.init(e,t)}),ip=ek("ZodIPv4",(e,t)=>{tJ.init(e,t),n4.init(e,t)}),id=ek("ZodIPv6",(e,t)=>{tQ.init(e,t),n4.init(e,t)}),ih=ek("ZodCIDRv4",(e,t)=>{t0.init(e,t),n4.init(e,t)}),im=ek("ZodCIDRv6",(e,t)=>{t1.init(e,t),n4.init(e,t)}),ig=ek("ZodBase64",(e,t)=>{t3.init(e,t),n4.init(e,t)}),iy=ek("ZodBase64URL",(e,t)=>{t6.init(e,t),n4.init(e,t)}),ib=ek("ZodE164",(e,t)=>{t5.init(e,t),n4.init(e,t)}),iv=ek("ZodJWT",(e,t)=>{t8.init(e,t),n4.init(e,t)}),iw=ek("ZodNumber",(e,t)=>{t7.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let{minimum:i,maximum:o,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:l,isInt:u}=nh(e);r.type=u?"integer":"number";let c="number"==typeof l&&l>=(i??-1/0),p="number"==typeof s&&s<=(o??1/0),d="draft-04"===t.target||"openapi-3.0"===t.target;if(c?d?(r.minimum=l,r.exclusiveMinimum=!0):r.exclusiveMinimum=l:"number"==typeof i&&(r.minimum=i),p?d?(r.maximum=s,r.exclusiveMaximum=!0):r.exclusiveMaximum=s:"number"==typeof o&&(r.maximum=o),a){let i=new Set;for(let o of a)Number.isFinite(o)&&0!==o?i.add(Math.abs(o)):r4(e,t,r,n,`A multipleOf divisor of ${o} cannot be represented in JSON Schema`);let[o,...s]=i;void 0!==o&&(r.multipleOf=o),s.length&&(r.allOf=[...r.allOf??[],...s.map(e=>({multipleOf:e}))])}})(e,t,r,n),e.isFinite=!0},eO({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=nh(e);return Math.max(t??-1/0,r??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=nh(e);return Math.min(t??1/0,r??1/0)},isInt:e=>{let{isInt:t,multipleOf:r}=nh(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>nh(e).format??null},{gt(e,t){return this.check(rV(e,t))},gte(e,t){return this.check(rG(e,t))},min(e,t){return this.check(rG(e,t))},lt(e,t){return this.check(rK(e,t))},lte(e,t){return this.check(rH(e,t))},max(e,t){return this.check(rH(e,t))},int(e){return this.check(iS(e))},safe(e){return this.check(iS(e))},positive(e){return this.check(rV(0,e))},nonnegative(e){return this.check(rG(0,e))},negative(e){return this.check(rK(0,e))},nonpositive(e){return this.check(rH(0,e))},multipleOf(e,t){return this.check(rJ(e,t))},step(e,t){return this.check(rJ(e,t))},finite(){return this}}));function i_(e){return new iw(rq({type:"number",checks:[],...ea(e)}))}let iE=ek("ZodNumberFormat",(e,t)=>{re.init(e,t),iw.init(e,t)});function iS(e){return new iE({type:"number",check:"number_format",abort:!1,format:"safeint",...ea(e)})}let iO=ek("ZodBoolean",(e,t)=>{rt.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{t.type="boolean"}});function iR(e){return new iO({type:"boolean",...ea(e)})}let iT=ek("ZodNull",(e,t)=>{rr.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{"openapi-3.0"===e.target?(t.type="string",t.nullable=!0,t.enum=[null]):t.type="null"}}),iA=ek("ZodUnknown",(e,t)=>{rn.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(e,t,r)=>void 0});function ix(){return new iA({type:"unknown"})}let iC=ek("ZodNever",(e,t)=>{ri.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{t.not={}}});function ik(e){return new iC({type:"never",...ea(e)})}let iP=ek("ZodDate",(e,t)=>{ro.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{r4(e,t,r,n,"Date cannot be represented in JSON Schema")},e.min=(t,r)=>e.check(rG(t,r)),e.max=(t,r)=>e.check(rH(t,r))},eO({minDate:e=>{let{minimum:t}=nh(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=nh(e);return t?new Date(t):null}},{}));function iU(e){return new iP({type:"date",...ea(e)})}let iI=ek("ZodArray",(e,t)=>{nX(),rl.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def,{minimum:o,maximum:a}=nh(e);"number"==typeof o&&(r.minItems=o),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=r3(i.element,t,{...n,path:[...n.path,"items"]})})(e,t,r,n),e.element=t.element},{min(e,t){return this.check(rX(e,t))},nonempty(e){return this.check(rX(1,e))},max(e,t){return this.check(rY(e,t))},length(e,t){return this.check(rQ(e,t))},unwrap(){return this.element}});function iN(e,t){return new iI({type:"array",element:e,...ea(t)})}let iL=ek("ZodObject",(e,t)=>{var r;let n,i;nX(),rh.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def,o=i.shape;if(Object.getOwnPropertySymbols(o).length&&r4(e,t,r,n,"Symbol keys cannot be represented in JSON Schema"))return;for(let e in r.type="object",r.properties={},o)Z(r.properties,e,r3(o[e],t,{...n,path:[...n.path,"properties",e]}));let a=[];for(let e of Object.keys(o)){let r=i.shape[e];("input"===t.io?void 0===nb(r):void 0===r._zod.optout)&&a.push(e)}a.length>0&&(r.required=a),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=r3(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)})(e,t,r,n),r="shape",(i=r in(n=Object.getPrototypeOf(e))?void 0:n)&&Object.defineProperty(i,r,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:!1,value:void 0};return Object.defineProperty(this,r,e),e.value=(e=>e._zod.def.shape)(this),Object.defineProperty(this,r,e),e.value},set(e){Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!1,value:e})}})},{keyof(){return iK(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Y(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Y(this._zod.def,{catchall:ix()}))},loose(){return this.clone(Y(this._zod.def,{catchall:ix()}))},strict(){return this.clone(Y(this._zod.def,{catchall:ik()}))},strip(){return this.clone(Y(this._zod.def,{catchall:void 0}))},extend(e){if(!et(e))throw Error("Invalid input to extend: expected a plain object");let t=this._zod.def.checks;if(t&&t.length>0){let t=H(this);for(let r of Reflect.ownKeys(e))if(void 0!==Object.getOwnPropertyDescriptor(t,r))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return eo(this,Y(this._zod.def,{shape:ep(this,e)}))},safeExtend(e){if(!et(e))throw Error("Invalid input to safeExtend: expected a plain object");return eo(this,Y(this._zod.def,{shape:ep(this,e)}))},merge(e){if(!e?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(this._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let t={};return J(t,this,Reflect.ownKeys(H(this))),J(t,e,Reflect.ownKeys(H(e))),eo(this,Y(this._zod.def,{shape:t,get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]}))},pick(e){return function(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i={};return J(i,e,ec(e,t)),eo(e,Y(r,{shape:i,checks:[]}))}(this,e)},omit(e){return function(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(ec(e,t)),o={};return J(o,e,Reflect.ownKeys(H(e)).filter(e=>!i.has(e))),eo(e,Y(r,{shape:o,checks:[]}))}(this,e)},partial(...e){return ed(iJ,this,e[0])},exactPartial(...e){return ed(iX,this,e[0],"exactPartial")},required(...e){var t;let r,n;return r=(t=e[0])?new Set(ec(this,t)):void 0,J(n={},this,Reflect.ownKeys(H(this)),(e,t)=>r&&!r.has(t)?e:new i4({type:"nonoptional",innerType:e})),eo(this,Y(this._zod.def,{shape:n}))}});function iz(e,t){return new iL({type:"object",shape:e,catchall:ik(),...ea(t)})}function ij(e,t){return new iL({type:"object",shape:e,catchall:ix(),...ea(t)})}let iD=ek("ZodUnion",(e,t)=>{rg.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a;o=!1===(i=e._zod.def).inclusive,a=i.options.map((e,r)=>r3(e,t,{...n,path:[...n.path,o?"oneOf":"anyOf",r]})),o?r.oneOf=a:r.anyOf=a},e.options=t.options});function i$(e,t){return new iD({type:"union",options:e,...ea(t)})}let iM=ek("ZodDiscriminatedUnion",(e,t)=>{iD.init(e,t),ry.init(e,t)});function iB(e,t,r){return new iM({type:"union",options:t,discriminator:e,...ea(r)})}let iF=ek("ZodIntersection",(e,t)=>{rb.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a,s,l;o=r3((i=e._zod.def).left,t,{...n,path:[...n.path,"allOf",0]}),a=r3(i.right,t,{...n,path:[...n.path,"allOf",1]}),r.allOf=l=[...(s=e=>"allOf"in e&&1===Object.keys(e).length)(o)?o.allOf:[o],...s(a)?a.allOf:[a]],t.intersections.push(l)}}),iq=ek("ZodRecord",(e,t)=>{nX(),rw.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;r.type="object";let o=i.keyType,a=nh(o).patterns;if("loose"===i.mode&&a&&a.size>0){let e=r3(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});for(let t of(r.patternProperties={},a))Z(r.patternProperties,ny(t).source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){r.propertyNames=r3(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let o=nv.get(t);o||(o=[],nv.set(t,o),t.deferred.push(()=>(function(e){let t=new Map;for(let r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);let r=new Map;for(let n of nv.get(e)??[]){let i=e.seen.get(n),o=(i?.def??i?.schema)?.propertyNames;if(!o||!0===o||r.has(o))continue;let a=function e(t,r,n){if(r.$ref){if(n.has(r))return r;n.add(r);let i=t.get(r)?.def;if(!i)return r;let o=e(t,i,n);return o===i?r:o}for(let i of["anyOf","oneOf"]){let o=r[i];if(!Array.isArray(o))continue;let a=o.map(r=>e(t,r,n));a.some((e,t)=>e!==o[t])&&(r={...r,[i]:a})}let i=Array.isArray(r.type)?r.type:[r.type],o=!i.includes("string")&&i.some(e=>"number"===e||"integer"===e),a=r.enum??(void 0!==r.const?[r.const]:void 0);if(!o&&!a?.some(e=>"number"==typeof e))return r;let{minimum:s,maximum:l,exclusiveMinimum:u,exclusiveMaximum:c,multipleOf:p,format:d,id:f,...h}=r;return h.enum?h.enum=h.enum.map(e=>"number"==typeof e?String(e):e):"number"==typeof h.const&&(h.const=String(h.const)),o&&(h.type="string",a||(h.pattern=(i.includes("number")?te:e7).source)),h}(t,o,new Set);a!==o&&r.set(o,a)}if(r.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&r.get(e.propertyNames);t&&(e.propertyNames=t)}})(t))),o.push(e)}r.additionalProperties=r3(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let s=o._zod.values,l="input"===t.io&&void 0!==nb(i.valueType);if(s&&!i.partial&&!l){let e=[...s].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e.map(String))}})(e,t,r,n),e.keyType=t.keyType,e.valueType=t.valueType});function iW(e,t,r){return new iq(t&&t._zod?{type:"record",keyType:e,valueType:t,...ea(r)}:{type:"record",keyType:n2(),valueType:e,...ea(t)})}let iZ=ek("ZodEnum",(e,t)=>{r_.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t)=>{let r=$(e._zod.def.entries);if(0===r.length){t.not={};return}r.every(e=>"number"==typeof e)&&(t.type="number"),r.every(e=>"string"==typeof e)&&(t.type="string"),t.enum=r})(e,r),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(e,n)=>{let i={};for(let n of e)if(r.has(n))i[n]=t.entries[n];else throw Error(`Key ${n} not found in enum`);return new iZ({...t,checks:[],...ea(n),entries:i})},e.exclude=(e,n)=>{let i={...t.entries};for(let t of e)if(r.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new iZ({...t,checks:[],...ea(n),entries:i})}});function iK(e,t){return new iZ({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...ea(t)})}let iH=ek("ZodLiteral",(e,t)=>{rE.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;if(0===i.values.length){r.not={};return}let o=[];for(let a of i.values)if(void 0===a){if(r4(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(r4(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(0===o.length);else if(1===o.length){let e=o[0];r.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?r.enum=[e]:r.const=e}else o.every(e=>"number"==typeof e)&&(r.type="number"),o.every(e=>"string"==typeof e)&&(r.type="string"),o.every(e=>"boolean"==typeof e)&&(r.type="boolean"),o.every(e=>null===e)&&(r.type="null"),r.enum=o})(e,t,r,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function iV(e,t){return new iH({type:"literal",values:Array.isArray(e)?e:[e],...ea(t)})}let iG=ek("ZodTransform",(e,t)=>{nX(),rS.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{r4(e,t,r,n,"Transforms cannot be represented in JSON Schema")},e._zod.parse=(r,n)=>{if("backward"===n.direction)throw new eU(e.constructor.name);r.addIssue=n=>{"string"==typeof n?r.issues.push(eE(n,r.value,t)):(n.fatal&&(n.continue=!1),n.code??(n.code="custom"),"input"in n||(n.input=r.value),n.inst??(n.inst=e),r.issues.push(eE(n)))};let i=t.transform(r.value,r);return i instanceof Promise?i.then(e=>(r.value=e,r)):(r.value=i,r)}}),iJ=ek("ZodOptional",(e,t)=>{rR.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>nE(e,t,r,n),e.unwrap=()=>e._zod.def.innerType});function iY(e){return new iJ({type:"optional",innerType:e})}let iX=ek("ZodExactOptional",(e,t)=>{rT.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>nE(e,t,r,n),e.unwrap=()=>e._zod.def.innerType}),iQ=ek("ZodNullable",(e,t)=>{rA.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a;o=r3((i=e._zod.def).innerType,t,n),a=t.seen.get(e),"openapi-3.0"===t.target?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},e.unwrap=()=>e._zod.def.innerType});function i0(e){return new iQ({type:"nullable",innerType:e})}let i1=ek("ZodDefault",(e,t)=>{rx.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o;r3((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,(o=n_(i.defaultValue,e,t,r,n))!==nw&&(r.default=o)},e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),i2=ek("ZodPrefault",(e,t)=>{rk.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;if(r3(i.innerType,t,n),t.seen.get(e).ref=i.innerType,"input"!==t.io)return;let o=n_(i.defaultValue,e,t,r,n);o!==nw&&(r._prefault=o)})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType}),i4=ek("ZodNonOptional",(e,t)=>{rP.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;r3((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType},e.unwrap=()=>e._zod.def.innerType}),i3=ek("ZodCatch",(e,t)=>{rN.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i,o=e._zod.def;r3(o.innerType,t,n),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{r4(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=i})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),i9=ek("ZodPipe",(e,t)=>{rL.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a;o=(i=e._zod.def).in._zod.traits.has("$ZodTransform"),r3(a="input"===t.io?o?i.out:i.in:i.out,t,n),t.seen.get(e).ref=a},e.in=t.in,e.out=t.out});function i6(e,t){return new i9({type:"pipe",in:e,out:t})}let i5=ek("ZodReadonly",(e,t)=>{rj.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;r3((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,r.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),i8=ek("ZodCustom",(e,t)=>{r$.init(e,t),nQ.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{r4(e,t,r,n,"Custom types cannot be represented in JSON Schema")}});function i7(e,t){var r;let n;return r=e??(()=>!0),(n=ea(t)).abort??(n.abort=!0),new i8({type:"custom",check:"custom",fn:r,...n})}let oe=ek("ZodInstanceOf",(e,t)=>{i8.init(e,t)},{properties(e,t){return this.check(new tS({check:"properties",shape:e,...ea(t)}))}});function ot(e,t={}){let r=new oe({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...ea(t)});return r._zod.bag.Class=e,r._zod.check=t=>{t.value instanceof e||t.issues.push({code:"invalid_type",expected:e.name,input:t.value,inst:r,path:[...r._zod.def.path??[]]})},r}let or="[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+",on=`${or}(?:\\.${or})*`,oi="[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?",oo=`${oi}(?:\\.${oi})+`,oa=`${on}@${oo}`;RegExp(`^${oa}$`);let os=`(${oa})( *, *${oa})*`;RegExp(`^${os}$`);let ol="[a-z\\d](?:[a-z\\d]|-(?=[a-z\\d])){0,38}";RegExp(`^${ol}$`,"i"),RegExp("^(?:(?:(?:https?):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u00a1-\\uffff][a-z0-9\\u00a1-\\uffff_-]{0,62})?[a-z0-9\\u00a1-\\uffff]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}\\.?|xn--[a-z0-9]+))(?::\\d{2,5})?(?:[/?#]\\S*)?$","i"),RegExp(`^https:\\/\\/gist\\.github\\.com\\/${ol}\\/[0-9a-f]{32}$`,"i");let ou={READY:"READY",RUNNING:"RUNNING",SUCCEEDED:"SUCCEEDED",FAILED:"FAILED",TIMING_OUT:"TIMING-OUT",TIMED_OUT:"TIMED-OUT",ABORTING:"ABORTING",ABORTED:"ABORTED"},oc=[ou.SUCCEEDED,ou.FAILED,ou.TIMED_OUT,ou.ABORTED],op={DEVELOPMENT:"DEVELOPMENT",WEB:"WEB",API:"API",SCHEDULER:"SCHEDULER",TEST:"TEST",WEBHOOK:"WEBHOOK",ACTOR:"ACTOR",CLI:"CLI",STANDBY:"STANDBY",CI:"CI",MCP:"MCP",APIFY_AI:"APIFY_AI"},od="APIFY_LOG_FORMAT",of="ACTOR_RUN_ID",oh={ACTOR_STANDBY_PORT:"4321",ACTOR_DEFAULT_DATASET_ID:"default",ACTOR_DEFAULT_KEY_VALUE_STORE_ID:"default",ACTOR_DEFAULT_REQUEST_QUEUE_ID:"default",ACTOR_WEB_SERVER_PORT:"4321",ACTOR_WEB_SERVER_URL:"http://localhost:4321"};oh.ACTOR_WEB_SERVER_PORT,oh.ACTOR_WEB_SERVER_URL,oh.ACTOR_DEFAULT_DATASET_ID,oh.ACTOR_DEFAULT_KEY_VALUE_STORE_ID,oh.ACTOR_DEFAULT_REQUEST_QUEUE_ID;let om={FULL_PERMISSIONS:"FULL_PERMISSIONS",LIMITED_PERMISSIONS:"LIMITED_PERMISSIONS"},og={OWNED_BY_ME:"ownedByMe",SHARED_WITH_ME:"sharedWithMe"};(_=N||(N={}))[_.OFF=0]="OFF",_[_.ERROR=1]="ERROR",_[_.SOFT_FAIL=2]="SOFT_FAIL",_[_.WARNING=3]="WARNING",_[_.INFO=4]="INFO",_[_.DEBUG=5]="DEBUG",_[_.PERF=6]="PERF";let oy=N,ob=Object.keys(N).filter(e=>Number.isNaN(+e));(E=L||(L={})).JSON="JSON",E.TEXT="TEXT";let ov=Symbol("apify.processed_error"),ow="[TRUNCATED]",o_="...[truncated]",oE=["_id","id","userId","impersonatedUserId","impersonatingUserId","adminUserId","actorId","actorTaskId","taskId","buildId","buildNumber","runId","name","message","stack","cause","url","method","code","status","statusCode","statusText","errorCode","errorMessage","errorResponse","response","request","data","payload","details","exception","config","headers"];var oS=r("z"),oO=r("q");let oR=class Logger extends oO.EventEmitter{options;constructor(e){super(),this.options=e}setOptions(e){this.options={...this.options,...e}}getOptions(){return this.options}_outputWithConsole(e,t){switch(e){case N.ERROR:console.error(t);break;case N.WARNING:console.warn(t);break;case N.DEBUG:console.debug(t);break;default:console.log(t)}}_log(e,t,r,n,i={}){throw Error("log() method must be implemented!")}log(e,t,...r){let n=this._log(e,t,...r);this.emit("line",n)}};let oT={skipLevelInfo:!1,skipTime:!1};let oA=class logger_json_LoggerJson extends oR{constructor(e={}){super({...oT,...e})}_log(e,t,r,n,i={}){let{prefix:o,suffix:a}=i;n&&(r={...r,exception:n}),o&&(t=`${o}: ${t}`),a&&(t=`${t} ${a}`);let s=JSON.stringify({time:this.options.skipTime?void 0:new Date,level:this.options.skipLevelInfo&&e===N.INFO?void 0:N[e],msg:t,...r});return this._outputWithConsole(e,s),s}};var ox=r("v"),oC=r.n(ox);let ok={SOFT_FAIL:"SFAIL",WARNING:"WARN"},oP={[N.ERROR]:"red",[N.SOFT_FAIL]:"red",[N.WARNING]:"yellow",[N.INFO]:"green",[N.DEBUG]:"blue",[N.PERF]:"magenta"},oU=ob.map(e=>ok[e]||e),oI=Math.max(...oU.map(e=>e.length)),oN={skipTime:!0};let oL=class LoggerText extends oR{constructor(e={}){super({...oN,...e})}_log(e,t,r,n,i={}){let{prefix:o,suffix:a}=i,s="";this.options.skipTime||(s=`${new Date().toISOString().replace("Z","").replace("T"," ")} `);let l=n?this._parseException(n):"",u=oP[e],c=oU[e],p=(e=>{let t="";for(let r=0;r<oI-e.length;r++)t+=" ";return t})(c),d=r?` ${JSON.stringify(r)}`:"";o=o?` ${o}:`:"",a=a?` ${a}`:"";let f=`${ox.gray(s)}${ox[u](c)}${p}${ox.yellow(o)} ${t||""}${ox.gray(d)}${ox.yellow(a)}${l}`;return this._outputWithConsole(e,f),f}_parseException(e,t=1){return["string","boolean","number","undefined","bigint"].includes(typeof e)?`
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};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}
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 Log({...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 AxiosError(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 CancelToken(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:ApifyApiError))(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
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.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.
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.109"}'),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
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
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
- 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};
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 ApifyClient(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