1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[20553],{20553:(e,t,r)=>{let i;r.d(t,{dp:()=>r7});var a,n,s,o,l=r(7620),u=r(32536);async function c(e){try{let t=await fetch(e.src);if(423===t.status)return await new Promise(e=>setTimeout(e,500)),await c(e);if(!t.ok)return{success:!1,status:t.status,error:t.headers.get("x-cld-error")||"Unknown error"};return{success:!0,status:t.status}}catch(e){return{success:!1,status:500,error:e.message||"Network error"}}}r(60996).hp;var d=r(60996).hp,p=/\/v\d+\//,h=/\.(ai|avif|gif|png|webp|bmp|bw|djvu|dng|ps|ept|eps|eps3|fbx|flif|gif|glb|gltf|heif|heic|ico|indd|jpg|jpe|jpeg|jp2|wdp|jxr|hdp|obj|pdf|ply|png|psd|arw|cr2|svg|tga|tif|tiff|u3ma|usdz|webp|3g2|3gp|avi|flv|m3u8|ts|m2ts|mts|mov|mkv|mp4|mpeg|mpd|mxf|ogv|webm|wmv)$/i,f=/https?:\/\/(?<host>[^/]+)\/(?<cloudName>[^/]+)?\/?(?<assetType>image|images|video|videos|raw|files)\/(?<deliveryType>upload|fetch|private|authenticated|sprite|facebook|twitter|youtube|vimeo)?\/?(?<signature>s--([a-zA-Z0-9_-]{8}|[a-zA-Z0-9_-]{32})--)?\/?(?<transformations>(?:[^_/]+_[^,/]+,?\/?)*\/)*(?<version>v\d+|\w{1,2})\/(?<publicId>[^\s]+)$/,m=["images","videos","files"];function g(e){if("string"!=typeof e)throw Error("Failed to parse URL - Invalid src: Is not a string");if(!p.test(e))throw Error("Failed to parse URL - Invalid src: Does not include version (Ex: /v1234/)");let[t,r]=e.split("?"),i=y(t),a=t;i&&(a=t.replace(RegExp(`${i}$`),""));let n=a.match(f),s=n?.groups?.transformations?.split("/").filter(e=>!!e),o={...n?.groups,format:i,seoSuffix:void 0,transformations:s||[],queryParams:{},version:n?.groups?.version?parseInt(n.groups.version.replace("v","")):void 0};if("res.cloudinary.com"===o.host&&!o.cloudName)throw Error("Failed to parse URL - Invalid src: Cloudinary URL delivered from res.cloudinary.com must include Cloud Name (ex: res.cloudinary.com/<Cloud Name>/image/...)");if(r&&(o.queryParams=r.split("&").reduce((e,t)=>{let[r,i]=t.split("=");return e[r]=i,e},{})),o.assetType&&m.includes(o.assetType)){let e=o.publicId?.split("/")||[];o.seoSuffix=e.pop(),o.publicId=e.join("/")}return o.publicId&&(o.publicId=decodeURIComponent(o.publicId)),o}function y(e){let t=e.match(h);if(null!==t)return t[0]}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw Error()},e.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},e.getValidEnumValues=t=>{let r=e.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),i={};for(let e of r)i[e]=t[e];return e.objectValues(i)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(let r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(a||(a={})),(n||(n={})).mergeShapes=(e,t)=>({...e,...t});let v=a.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),b=e=>{switch(typeof e){case"undefined":return v.undefined;case"string":return v.string;case"number":return isNaN(e)?v.nan:v.number;case"boolean":return v.boolean;case"function":return v.function;case"bigint":return v.bigint;case"symbol":return v.symbol;case"object":if(Array.isArray(e))return v.array;if(null===e)return v.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return v.promise;if("undefined"!=typeof Map&&e instanceof Map)return v.map;if("undefined"!=typeof Set&&e instanceof Set)return v.set;if("undefined"!=typeof Date&&e instanceof Date)return v.date;return v.object;default:return v.unknown}}
1,x=a.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class w extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},r={_errors:[]},i=e=>{for(let a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(i);else if("invalid_return_type"===a.code)i(a.returnTypeError);else if("invalid_arguments"===a.code)i(a.argumentsError);else if(0===a.path.length)r._errors.push(t(a));else{let e=r,i=0;for(;i<a.path.length;){let r=a.path[i];i===a.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(a))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,a.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},r=[];for(let i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}w.create=e=>new w(e);let k=(e,t)=>{let r;switch(e.code){case x.invalid_type:r=e.received===v.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case x.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,a.jsonStringifyReplacer)}`;break;case x.unrecognized_keys:r=`Unrecognized key(s) in object: ${a.joinValues(e.keys,", ")}`;break;case x.invalid_union:r="Invalid input";break;case x.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${a.joinValues(e.options)}`;break;case x.invalid_enum_value:r=`Invalid enum value. Expected ${a.joinValues(e.options)}, received '${e.received}'`;break;case x.invalid_arguments:r="Invalid function arguments";break;case x.invalid_return_type:r="Invalid function return type";break;case x.invalid_date:r="Invalid date";break;case x.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:a.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case x.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case x.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case x.custom:r="Invalid input";break;case x.invalid_intersection_types:r="Intersection results could not be merged";break;case x.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case x.not_finite:r="Number must be finite";break;default:r=t.defaultError,a.assertNever(e)}return{message:r}},O=k;function S(){return O}let T=e=>{let{data:t,path:r,errorMaps:i,issueData:a}=e,n=[...r,...a.path||[]],s={...a,path:n},o="";for(let e of i.filter(e=>!!e).slice().reverse())o=e(s,{data:t,defaultError:o}).message;return{...a,path:n,message:a.message||o}};function N(e,t){let r=T({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,S(),k].filter(e=>!!e)});e.common.issues.push(r)}class j{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let i of t){if("aborted"===i.status)return A;"dirty"===i.status&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t)r.push({key:await e.key,value:await e.value});return j.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let i of t){let{key:t,value:a}=i;if("aborted"===t.status||"aborted"===a.status)return A;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==a.value||i.alwaysSet)&&(r[t.value]=a.value)}return{status:e.value,value:r}}}let A=Object.freeze({status:"aborted"}),C=e=>({status:"dirty",value:e}),$=e=>
1({status:"valid",value:e}),E=e=>"aborted"===e.status,Z=e=>"dirty"===e.status,R=e=>"valid"===e.status,I=e=>"undefined"!=typeof Promise&&e instanceof Promise;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(s||(s={}));class P{constructor(e,t,r,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let q=(e,t)=>{if(R(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new w(e.common.issues);return this._error=t,this._error}}};function J(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:i,description:a}=e;if(t&&(r||i))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:a}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=i?i:t.defaultError}:{message:null!=r?r:t.defaultError},description:a}}class L{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return b(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:b(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new j,ctx:{common:e.parent.common,data:e.data,parsedType:b(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(I(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;let i={common:{issues:[],async:null!=(r=null==t?void 0:t.async)&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:b(e)},a=this._parseSync({data:e,path:i.path,parent:i});return q(i,a)}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:b(e)},i=this._parse({data:e,path:r.path,parent:r});return q(r,await (I(i)?i:Promise.resolve(i)))}refine(e,t){return this._refinement((r,i)=>{let a=e(r),n=()=>i.addIssue({code:x.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(r):t});return"undefined"!=typeof Promise&&a instanceof Promise?a.then(e=>!!e||(n(),!1)):!!a||(n(),!1)})}refinement(e,t){return this._refinement((r,i)=>!!e(r)||(i.addIssue("function"==typeof t?t(r,i):t),!1))}_refinement(e){return new ek({schema:this,typeName:o.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return eO.create(this,this._def)}nullable(){return eS.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return es.create(this,this._def)}promise(){return ew.create(this,this._def)}or(e){return el.create([this,e],this._def)}and(e){return ed.create(this,e,this._def)}transform(e){return new ek({...J(this._def),schema:this,typeName:o.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eT({...J(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:o.ZodDefault})}brand(){return new eC({typeName:o.ZodBranded,type:this,...J(this._def)})}catch(e){return new eN({...J(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:o.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return e$.create(this,e)}readonly(){return eE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let z=/^c[^\s-]{8,}
1$/i,M=/^[a-z][a-z0-9]*$/,U=/^[0-9A-HJKMNP-TV-Z]{26}$/,D=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,V=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,F=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,B=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,K=e=>{if(e.precision)if(e.offset)return RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);else return RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`);if(0===e.precision)if(e.offset)return RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$");else return RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$");return e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")};class W extends L{_parse(e){let t;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==v.string){let t=this._getOrReturnCtx(e);return N(t,{code:x.invalid_type,expected:v.string,received:t.parsedType}),A}let r=new j;for(let o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(N(t=this._getOrReturnCtx(e,t),{code:x.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if("max"===o.kind)e.data.length>o.value&&(N(t=this._getOrReturnCtx(e,t),{code:x.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if("length"===o.kind){let i=e.data.length>o.value,a=e.data.length<o.value;(i||a)&&(t=this._getOrReturnCtx(e,t),i?N(t,{code:x.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&N(t,{code:x.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if("email"===o.kind)V.test(e.data)||(N(t=this._getOrReturnCtx(e,t),{validation:"email",code:x.invalid_string,message:o.message}),r.dirty());else if("emoji"===o.kind)i||(i=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),i.test(e.data)||(N(t=this._getOrReturnCtx(e,t),{validation:"emoji",code:x.invalid_string,message:o.message}),r.dirty());else if("uuid"===o.kind)D.test(e.data)||(N(t=this._getOrReturnCtx(e,t),{validation:"uuid",code:x.invalid_string,message:o.message}),r.dirty());else if("cuid"===o.kind)z.test(e.data)||(N(t=this._getOrReturnCtx(e,t),{validation:"cuid",code:x.invalid_string,message:o.message}),r.dirty());else if("cuid2"===o.kind)M.test(e.data)||(N(t=this._getOrReturnCtx(e,t),{validation:"cuid2",code:x.invalid_string,message:o.message}),r.dirty());else if("ulid"===o.kind)U.test(e.data)||(N(t=this._getOrReturnCtx(e,t),{validation:"ulid",code:x.invalid_string,message:o.message}),r.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(i){N(t=this._getOrReturnCtx(e,t),{validation:"url",code:x.invalid_string,message:o.message}),r.dirty()}else if("regex"===o.kind)o.regex.lastIndex=0,o.regex.test(e.data)||(N(t=this._getOrReturnCtx(e,t),{validation:"regex",code:x.invalid_string,message:o.message}),r.dirty());else if("trim"===o.kind)e.data=e.data.trim();else if("includes"===o.kind)e.data.includes(o.value,o.position)||(N(t=this._getOrReturnCtx(e,t),{code:x.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty());else if("toLowerCase"===o.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===o.kind)e.data=e.data.toUpperCase();else if("startsWith"===o.kind)e.data.startsWith(o.value)||(N(t=this._getOrReturnCtx(e,t),{code:x.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty());else if("endsWith"===o.kind)e.data.endsWith(o.value)||(N(t=this._getOrReturnCtx(e,t),{code:x.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty());else if("datetime"===o.kind)K(o).test(e.data)||(N(t=this._getOrReturnCtx(e,t),{code:x.invalid_string,validation:"datetime",message:o.message}),r.dirty());else if("ip"===o.kind){var n,s;n=e.data,!(("v4"===(s=o.version)||!s)&&F.test(n)||("v6"===s||!s)&&B.test(n))&&1&&
1(N(t=this._getOrReturnCtx(e,t),{validation:"ip",code:x.invalid_string,message:o.message}),r.dirty())}else a.assertNever(o);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:x.invalid_string,...s.errToObj(r)})}_addCheck(e){return new W({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...s.errToObj(e)})}url(e){return this._addCheck({kind:"url",...s.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...s.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...s.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...s.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...s.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...s.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...s.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!=(t=null==e?void 0:e.offset)&&t,...s.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...s.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...s.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...s.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...s.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...s.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...s.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...s.errToObj(t)})}nonempty(e){return this.min(1,s.errToObj(e))}trim(){return new W({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new W({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new W({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}W.create=e=>{var t;return new W({checks:[],typeName:o.ZodString,coerce:null!=(t=null==e?void 0:e.coerce)&&t,...J(e)})};class H extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==v.number){let t=this._getOrReturnCtx(e);return N(t,{code:x.invalid_type,expected:v.number,received:t.parsedType}),A}let r=new j;for(let i of this._def.checks)"int"===i.kind?a.isInteger(e.data)||(N(t=this._getOrReturnCtx(e,t),{code:x.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(N(t=this._getOrReturnCtx(e,t),{code:x.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):"max"===i.kind?(i.inclusive?e.data>i.value:e.data>=i.value)&&(N(t=this._getOrReturnCtx(e,t),{code:x.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):"multipleOf"===i.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,a=r>i?r:i;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}(e.data,i.value)&&(N(t=this._getOrReturnCtx(e,t),{code:x.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(N(t=this._getOrReturnCtx(e,t),{code:x.not_finite,message:i.message}),r.dirty()):a.assertNever(i);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,s.toString(t))}gt(e,t){return this.setLimit("min",e,!1,s.toString(t))}lte(e,t){return this.setLimit("max",e,!0,s.toString(t))}lt(e,t){return this.setLimit("max",e,!1,s.toString(t))}
1setLimit(e,t,r,i){return new H({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.toString(i)}]})}_addCheck(e){return new H({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:s.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:s.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:s.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:s.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:s.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:s.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:s.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:s.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:s.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&a.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return Number.isFinite(t)&&Number.isFinite(e)}}H.create=e=>new H({checks:[],typeName:o.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...J(e)});class Y extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==v.bigint){let t=this._getOrReturnCtx(e);return N(t,{code:x.invalid_type,expected:v.bigint,received:t.parsedType}),A}let r=new j;for(let i of this._def.checks)"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(N(t=this._getOrReturnCtx(e,t),{code:x.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):"max"===i.kind?(i.inclusive?e.data>i.value:e.data>=i.value)&&(N(t=this._getOrReturnCtx(e,t),{code:x.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(N(t=this._getOrReturnCtx(e,t),{code:x.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):a.assertNever(i);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,s.toString(t))}gt(e,t){return this.setLimit("min",e,!1,s.toString(t))}lte(e,t){return this.setLimit("max",e,!0,s.toString(t))}lt(e,t){return this.setLimit("max",e,!1,s.toString(t))}setLimit(e,t,r,i){return new Y({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.toString(i)}]})}_addCheck(e){return new Y({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:s.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:s.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:s.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:s.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:s.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Y.create=e=>{var t;return new Y({checks:[],typeName:o.ZodBigInt,coerce:null!=(t=null==e?void 0:e.coerce)&&t,...J(e)})};class Q extends L{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==v.boolean){let t=this._getOrReturnCtx(e);return N(t,{code:x.invalid_type,expected:v.boolean,received:t.parsedType}),A}return $(e.data)}}Q.create=e=>new Q({typeName:o.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...J(e)});class G extends L{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==v.date){let t=this._getOrReturnCtx(e);return N(t,{code:x.invalid_type,expected:v.date,received:t.parsedType}),A}if(isNaN(e.data.getTime()))return N(this._getOrReturnCtx(e),{code:x.invalid_date}),A;let r=new j;for(let i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(N(t=this._getOrReturnCtx(e,t),{code:x.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(N(t=this._getOrReturnCtx(e,t),{code:x.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):a.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new G({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:s.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:s.toString(t)})}
1get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}G.create=e=>new G({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:o.ZodDate,...J(e)});class X extends L{_parse(e){if(this._getType(e)!==v.symbol){let t=this._getOrReturnCtx(e);return N(t,{code:x.invalid_type,expected:v.symbol,received:t.parsedType}),A}return $(e.data)}}X.create=e=>new X({typeName:o.ZodSymbol,...J(e)});class ee extends L{_parse(e){if(this._getType(e)!==v.undefined){let t=this._getOrReturnCtx(e);return N(t,{code:x.invalid_type,expected:v.undefined,received:t.parsedType}),A}return $(e.data)}}ee.create=e=>new ee({typeName:o.ZodUndefined,...J(e)});class et extends L{_parse(e){if(this._getType(e)!==v.null){let t=this._getOrReturnCtx(e);return N(t,{code:x.invalid_type,expected:v.null,received:t.parsedType}),A}return $(e.data)}}et.create=e=>new et({typeName:o.ZodNull,...J(e)});class er extends L{constructor(){super(...arguments),this._any=!0}_parse(e){return $(e.data)}}er.create=e=>new er({typeName:o.ZodAny,...J(e)});class ei extends L{constructor(){super(...arguments),this._unknown=!0}_parse(e){return $(e.data)}}ei.create=e=>new ei({typeName:o.ZodUnknown,...J(e)});class ea extends L{_parse(e){let t=this._getOrReturnCtx(e);return N(t,{code:x.invalid_type,expected:v.never,received:t.parsedType}),A}}ea.create=e=>new ea({typeName:o.ZodNever,...J(e)});class en extends L{_parse(e){if(this._getType(e)!==v.undefined){let t=this._getOrReturnCtx(e);return N(t,{code:x.invalid_type,expected:v.void,received:t.parsedType}),A}return $(e.data)}}en.create=e=>new en({typeName:o.ZodVoid,...J(e)});class es extends L{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),i=this._def;if(t.parsedType!==v.array)return N(t,{code:x.invalid_type,expected:v.array,received:t.parsedType}),A;if(null!==i.exactLength){let e=t.data.length>i.exactLength.value,a=t.data.length<i.exactLength.value;(e||a)&&(N(t,{code:e?x.too_big:x.too_small,minimum:a?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&(N(t,{code:x.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),null!==i.maxLength&&t.data.length>i.maxLength.value&&(N(t,{code:x.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>i.type._parseAsync(new P(t,e,t.path,r)))).then(e=>j.mergeArray(r,e));let a=[...t.data].map((e,r)=>i.type._parseSync(new P(t,e,t.path,r)));return j.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new es({...this._def,minLength:{value:e,message:s.toString(t)}})}max(e,t){return new es({...this._def,maxLength:{value:e,message:s.toString(t)}})}length(e,t){return new es({...this._def,exactLength:{value:e,message:s.toString(t)}})}nonempty(e){return this.min(1,e)}}es.create=(e,t)=>new es({type:e,minLength:null,maxLength:null,exactLength:null,typeName:o.ZodArray,...J(t)});class eo extends L{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=a.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==v.object){let t=this._getOrReturnCtx(e);return N(t,{code:x.invalid_type,expected:v.object,received:t.parsedType}),A}let{status:t,ctx:r}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),n=[];if(!(this._def.catchall instanceof ea&&"strip"===this._def.unknownKeys))for(let e in r.data)a.includes(e)||n.push(e);let s=[];for(let e of a){let t=i[e],a=r.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new P(r,a,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof ea){let e=this._def.unknownKeys;
1if("passthrough"===e)for(let e of n)s.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)n.length>0&&(N(r,{code:x.unrecognized_keys,keys:n}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of n){let i=r.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new P(r,i,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let r=await t.key;e.push({key:r,value:await t.value,alwaysSet:t.alwaysSet})}return e}).then(e=>j.mergeObjectSync(t,e)):j.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return s.errToObj,new eo({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var i,a,n,o;let l=null!=(n=null==(a=(i=this._def).errorMap)?void 0:a.call(i,t,r).message)?n:r.defaultError;return"unrecognized_keys"===t.code?{message:null!=(o=s.errToObj(e).message)?o:l}:{message:l}}}:{}})}strip(){return new eo({...this._def,unknownKeys:"strip"})}passthrough(){return new eo({...this._def,unknownKeys:"passthrough"})}extend(e){return new eo({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new eo({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:o.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new eo({...this._def,catchall:e})}pick(e){let t={};return a.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])}),new eo({...this._def,shape:()=>t})}omit(e){let t={};return a.objectKeys(this.shape).forEach(r=>{e[r]||(t[r]=this.shape[r])}),new eo({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof eo){let r={};for(let i in t.shape){let a=t.shape[i];r[i]=eO.create(e(a))}return new eo({...t._def,shape:()=>r})}if(t instanceof es)return new es({...t._def,type:e(t.element)});if(t instanceof eO)return eO.create(e(t.unwrap()));if(t instanceof eS)return eS.create(e(t.unwrap()));if(t instanceof ep)return ep.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};return a.objectKeys(this.shape).forEach(r=>{let i=this.shape[r];e&&!e[r]?t[r]=i:t[r]=i.optional()}),new eo({...this._def,shape:()=>t})}required(e){let t={};return a.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof eO;)e=e._def.innerType;t[r]=e}}),new eo({...this._def,shape:()=>t})}keyof(){return ev(a.objectKeys(this.shape))}}eo.create=(e,t)=>new eo({shape:()=>e,unknownKeys:"strip",catchall:ea.create(),typeName:o.ZodObject,...J(t)}),eo.strictCreate=(e,t)=>new eo({shape:()=>e,unknownKeys:"strict",catchall:ea.create(),typeName:o.ZodObject,...J(t)}),eo.lazycreate=(e,t)=>new eo({shape:e,unknownKeys:"strip",catchall:ea.create(),typeName:o.ZodObject,...J(t)});class el extends L{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new w(e.ctx.common.issues));return N(t,{code:x.invalid_union,unionErrors:r}),A});{let e,i=[];for(let a of r){let r={...t,common:{...t.common,issues:[]},parent:null},n=a._parseSync({data:t.data,path:t.path,parent:r});if("valid"===n.status)return n;"dirty"!==n.status||e||(e={result:n,ctx:r}),r.common.issues.length&&i.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let a=i.map(e=>new w(e));return N(t,{code:x.invalid_union,unionErrors:a}),A}}get options(){return this._def.options}}el.create=(e,t)=>new el({options:e,typeName:o.ZodUnion,...J(t)});let eu=e=>{if(e instanceof ey)return eu(e.schema);if(e instanceof ek)return eu(e.innerType());if(e instanceof e_)return[e.value];if(e instanceof eb)return e.options;if(e instanceof ex)return Object.keys(e.enum);else if(e instanceof eT)return eu(e._def.innerType);else if(e instanceof ee)return[void 0];else if(e instanceof et)return[null];else return null};class ec extends L{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==v.object)return N(t,{code:x.invalid_type,expected:v.object,received:t.parsedType}),A;let r=this.discriminator,i=t.data[r],a=this.optionsMap.get(i);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(N(t,{code:x.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),A)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let i=new Map;for(let r of t){let t=eu(r.shape[e]);if(!t)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of t){if(i.has(a))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,r)}}return new ec({typeName:o.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...J(r)})}}class ed extends L{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),i=(e,i)=>{if(E(e)||E(i))return A;let n=function e(t,r){let i=b(t),n=b(r);if(t===r)return{valid:!0,data:t};if(i===v.object&&n===v.object){let i=a.objectKeys(r),n=a.objectKeys(t).filter(e=>-1!==i.indexOf(e)),s={...t,...r};for(let i of n){let a=e(t[i],r[i]);
1if(!a.valid)return{valid:!1};s[i]=a.data}return{valid:!0,data:s}}if(i===v.array&&n===v.array){if(t.length!==r.length)return{valid:!1};let i=[];for(let a=0;a<t.length;a++){let n=e(t[a],r[a]);if(!n.valid)return{valid:!1};i.push(n.data)}return{valid:!0,data:i}}if(i===v.date&&n===v.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,i.value);return n.valid?((Z(e)||Z(i))&&t.dirty(),{status:t.value,value:n.data}):(N(r,{code:x.invalid_intersection_types}),A)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>i(e,t)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ed.create=(e,t,r)=>new ed({left:e,right:t,typeName:o.ZodIntersection,...J(r)});class ep extends L{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==v.array)return N(r,{code:x.invalid_type,expected:v.array,received:r.parsedType}),A;if(r.data.length<this._def.items.length)return N(r,{code:x.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&r.data.length>this._def.items.length&&(N(r,{code:x.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let i=[...r.data].map((e,t)=>{let i=this._def.items[t]||this._def.rest;return i?i._parse(new P(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(i).then(e=>j.mergeArray(t,e)):j.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new ep({...this._def,rest:e})}}ep.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ep({items:e,typeName:o.ZodTuple,rest:null,...J(t)})};class eh extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==v.object)return N(r,{code:x.invalid_type,expected:v.object,received:r.parsedType}),A;let i=[],a=this._def.keyType,n=this._def.valueType;for(let e in r.data)i.push({key:a._parse(new P(r,e,r.path,e)),value:n._parse(new P(r,r.data[e],r.path,e))});return r.common.async?j.mergeObjectAsync(t,i):j.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,r){return new eh(t instanceof L?{keyType:e,valueType:t,typeName:o.ZodRecord,...J(r)}:{keyType:W.create(),valueType:e,typeName:o.ZodRecord,...J(t)})}}class ef extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==v.map)return N(r,{code:x.invalid_type,expected:v.map,received:r.parsedType}),A;let i=this._def.keyType,a=this._def.valueType,n=[...r.data.entries()].map(([e,t],n)=>({key:i._parse(new P(r,e,r.path,[n,"key"])),value:a._parse(new P(r,t,r.path,[n,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of n){let i=await r.key,a=await r.value;if("aborted"===i.status||"aborted"===a.status)return A;("dirty"===i.status||"dirty"===a.status)&&t.dirty(),e.set(i.value,a.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of n){let i=r.key,a=r.value;if("aborted"===i.status||"aborted"===a.status)return A;("dirty"===i.status||"dirty"===a.status)&&t.dirty(),e.set(i.value,a.value)}return{status:t.value,value:e}}}}ef.create=(e,t,r)=>new ef({valueType:t,keyType:e,typeName:o.ZodMap,...J(r)});class em extends L{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==v.set)return N(r,{code:x.invalid_type,expected:v.set,received:r.parsedType}),A;let i=this._def;null!==i.minSize&&r.data.size<i.minSize.value&&(N(r,{code:x.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),null!==i.maxSize&&r.data.size>i.maxSize.value&&(N(r,{code:x.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());let a=this._def.valueType;function n(e){let r=new Set;for(let i of e){if("aborted"===i.status)return A;"dirty"===i.status&&t.dirty(),r.add(i.value)}return{status:t.value,value:r}}let s=[...r.data.values()].map((e,t)=>a._parse(new P(r,e,r.path,t)));return r.common.async?Promise.all(s).then(e=>n(e)):n(s)}min(e,t){return new em({...this._def,minSize:{value:e,message:s.toString(t)}})}max(e,t){return new em({...this._def,maxSize:{value:e,message:s.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}em.create=(e,t)=>
1new em({valueType:e,minSize:null,maxSize:null,typeName:o.ZodSet,...J(t)});class eg extends L{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==v.function)return N(t,{code:x.invalid_type,expected:v.function,received:t.parsedType}),A;function r(e,r){return T({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,S(),k].filter(e=>!!e),issueData:{code:x.invalid_arguments,argumentsError:r}})}function i(e,r){return T({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,S(),k].filter(e=>!!e),issueData:{code:x.invalid_return_type,returnTypeError:r}})}let a={errorMap:t.common.contextualErrorMap},n=t.data;if(this._def.returns instanceof ew){let e=this;return $(async function(...t){let s=new w([]),o=await e._def.args.parseAsync(t,a).catch(e=>{throw s.addIssue(r(t,e)),s}),l=await Reflect.apply(n,this,o);return await e._def.returns._def.type.parseAsync(l,a).catch(e=>{throw s.addIssue(i(l,e)),s})})}{let e=this;return $(function(...t){let s=e._def.args.safeParse(t,a);if(!s.success)throw new w([r(t,s.error)]);let o=Reflect.apply(n,this,s.data),l=e._def.returns.safeParse(o,a);if(!l.success)throw new w([i(o,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eg({...this._def,args:ep.create(e).rest(ei.create())})}returns(e){return new eg({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new eg({args:e||ep.create([]).rest(ei.create()),returns:t||ei.create(),typeName:o.ZodFunction,...J(r)})}}class ey extends L{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ey.create=(e,t)=>new ey({getter:e,typeName:o.ZodLazy,...J(t)});class e_ extends L{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return N(t,{received:t.data,code:x.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ev(e,t){return new eb({values:e,typeName:o.ZodEnum,...J(t)})}e_.create=(e,t)=>new e_({value:e,typeName:o.ZodLiteral,...J(t)});class eb extends L{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return N(t,{expected:a.joinValues(r),received:t.parsedType,code:x.invalid_type}),A}if(-1===this._def.values.indexOf(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return N(t,{received:t.data,code:x.invalid_enum_value,options:r}),A}return $(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return eb.create(e)}exclude(e){return eb.create(this.options.filter(t=>!e.includes(t)))}}eb.create=ev;class ex extends L{_parse(e){let t=a.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==v.string&&r.parsedType!==v.number){let e=a.objectValues(t);return N(r,{expected:a.joinValues(e),received:r.parsedType,code:x.invalid_type}),A}if(-1===t.indexOf(e.data)){let e=a.objectValues(t);return N(r,{received:r.data,code:x.invalid_enum_value,options:e}),A}return $(e.data)}get enum(){return this._def.values}}ex.create=(e,t)=>new ex({values:e,typeName:o.ZodNativeEnum,...J(t)});class ew extends L{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==v.promise&&!1===t.common.async?(N(t,{code:x.invalid_type,expected:v.promise,received:t.parsedType}),A):$((t.parsedType===v.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ew.create=(e,t)=>new ew({type:e,typeName:o.ZodPromise,...J(t)});class ek extends L{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===o.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),i=this._def.effect||null,n={addIssue:e=>{N(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};
1if(n.addIssue=n.addIssue.bind(n),"preprocess"===i.type){let e=i.transform(r.data,n);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(e).then(e=>this._def.schema._parseAsync({data:e,path:r.path,parent:r})):this._def.schema._parseSync({data:e,path:r.path,parent:r})}if("refinement"===i.type){let e=e=>{let t=i.refinement(e,n);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?A:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===i.status?A:("dirty"===i.status&&t.dirty(),e(i.value),{status:t.value,value:i.value})}}if("transform"===i.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>R(e)?Promise.resolve(i.transform(e.value,n)).then(e=>({status:t.value,value:e})):e);else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!R(e))return e;let a=i.transform(e.value,n);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}a.assertNever(i)}}ek.create=(e,t,r)=>new ek({schema:e,typeName:o.ZodEffects,effect:t,...J(r)}),ek.createWithPreprocess=(e,t,r)=>new ek({schema:t,effect:{type:"preprocess",transform:e},typeName:o.ZodEffects,...J(r)});class eO extends L{_parse(e){return this._getType(e)===v.undefined?$(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eO.create=(e,t)=>new eO({innerType:e,typeName:o.ZodOptional,...J(t)});class eS extends L{_parse(e){return this._getType(e)===v.null?$(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eS.create=(e,t)=>new eS({innerType:e,typeName:o.ZodNullable,...J(t)});class eT extends L{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===v.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eT.create=(e,t)=>new eT({innerType:e,typeName:o.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...J(t)});class eN extends L{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return I(i)?i.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new w(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new w(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eN.create=(e,t)=>new eN({innerType:e,typeName:o.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...J(t)});class ej extends L{_parse(e){if(this._getType(e)!==v.nan){let t=this._getOrReturnCtx(e);return N(t,{code:x.invalid_type,expected:v.nan,received:t.parsedType}),A}return{status:"valid",value:e.data}}}ej.create=e=>new ej({typeName:o.ZodNaN,...J(e)});let eA=Symbol("zod_brand");class eC extends L{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class e$ extends L{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?A:"dirty"===e.status?(t.dirty(),C(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?A:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new e$({in:e,out:t,typeName:o.ZodPipeline})}}class eE extends L{_parse(e){let t=this._def.innerType._parse(e);return R(t)&&(t.value=Object.freeze(t.value)),t}}eE.create=(e,t)=>
1new eE({innerType:e,typeName:o.ZodReadonly,...J(t)});let eZ=(e,t={},r)=>e?er.create().superRefine((i,a)=>{var n,s;if(!e(i)){let e="function"==typeof t?t(i):"string"==typeof t?{message:t}:t,o=null==(s=null!=(n=e.fatal)?n:r)||s,l="string"==typeof e?{message:e}:e;a.addIssue({code:"custom",...l,fatal:o})}}):er.create(),eR={object:eo.lazycreate};!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(o||(o={}));let eI=W.create,eP=H.create,eq=ej.create,eJ=Y.create,eL=Q.create,ez=G.create,eM=X.create,eU=ee.create,eD=et.create,eV=er.create,eF=ei.create,eB=ea.create,eK=en.create,eW=es.create,eH=eo.create,eY=eo.strictCreate,eQ=el.create,eG=ec.create,eX=ed.create,e0=ep.create,e1=eh.create,e2=ef.create,e4=em.create,e9=eg.create,e5=ey.create,e3=e_.create,e6=eb.create,e8=ex.create,e7=ew.create,te=ek.create,tt=eO.create,tr=eS.create,ti=ek.createWithPreprocess,ta=e$.create;var tn=Object.freeze({__proto__:null,defaultErrorMap:k,setErrorMap:function(e){O=e},getErrorMap:S,makeIssue:T,EMPTY_PATH:[],addIssueToContext:N,ParseStatus:j,INVALID:A,DIRTY:C,OK:$,isAborted:E,isDirty:Z,isValid:R,isAsync:I,get util(){return a},get objectUtil(){return n},ZodParsedType:v,getParsedType:b,ZodType:L,ZodString:W,ZodNumber:H,ZodBigInt:Y,ZodBoolean:Q,ZodDate:G,ZodSymbol:X,ZodUndefined:ee,ZodNull:et,ZodAny:er,ZodUnknown:ei,ZodNever:ea,ZodVoid:en,ZodArray:es,ZodObject:eo,ZodUnion:el,ZodDiscriminatedUnion:ec,ZodIntersection:ed,ZodTuple:ep,ZodRecord:eh,ZodMap:ef,ZodSet:em,ZodFunction:eg,ZodLazy:ey,ZodLiteral:e_,ZodEnum:eb,ZodNativeEnum:ex,ZodPromise:ew,ZodEffects:ek,ZodTransformer:ek,ZodOptional:eO,ZodNullable:eS,ZodDefault:eT,ZodCatch:eN,ZodNaN:ej,BRAND:eA,ZodBranded:eC,ZodPipeline:e$,ZodReadonly:eE,custom:eZ,Schema:L,ZodSchema:L,late:eR,get ZodFirstPartyTypeKind(){return o},coerce:{string:e=>W.create({...e,coerce:!0}),number:e=>H.create({...e,coerce:!0}),boolean:e=>Q.create({...e,coerce:!0}),bigint:e=>Y.create({...e,coerce:!0}),date:e=>G.create({...e,coerce:!0})},any:eV,array:eW,bigint:eJ,boolean:eL,date:ez,discriminatedUnion:eG,effect:te,enum:e6,function:e9,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>eZ(t=>t instanceof e,t),intersection:eX,lazy:e5,literal:e3,map:e2,nan:eq,nativeEnum:e8,never:eB,null:eD,nullable:tr,number:eP,object:eH,oboolean:()=>eL().optional(),onumber:()=>eP().optional(),optional:tt,ostring:()=>eI().optional(),pipeline:ta,preprocess:ti,promise:e7,record:e1,set:e4,strictObject:eY,string:eI,symbol:eM,transformer:te,tuple:e0,undefined:eU,union:eQ,unknown:eF,void:eK,NEVER:A,ZodIssueCode:x,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:w});class ts{constructor(e){this.values=[],this.delimiter=":",this.hasValue(e)&&this.addValue(e)}toString(){return this.values.join(this.delimiter)}hasValue(e){return null!=e&&""!==e}addValue(e){return Array.isArray(e)?this.values=this.values.concat(e):this.values.push(e),this.values=this.values.filter(e=>this.hasValue(e)),this}setDelimiter(e){return this.delimiter=e,this}}class to extends Error{constructor(e="Unsupported"){super(e)}}function tl(){return this._qualifierModel||{error:new to(`unsupported qualifier ${this.constructor.name}`)}}class tu{constructor(){this._qualifierModel={}}toJson(){return tl.apply(this)}}class tc extends tu{constructor(e,t){super(),this.delimiter="_",this.key=e,t instanceof ts?this.qual
1ifierValue=t:(this.qualifierValue=new ts,this.qualifierValue.addValue(t))}toString(){let{key:e,delimiter:t,qualifierValue:r}=this;return`${e}${t}${r.toString()}`}addValue(e){return this.qualifierValue.addValue(e),this}}class td extends tc{constructor(e,t){super("fl",t?new ts([e,`${t}`]).setDelimiter(":"):e),this.flagValue=t}toString(){return super.toString().replace(/\./g,"%2E")}getFlagValue(){return this.flagValue}}function tp(){var e,t,r;let i=this._actionModel&&Object.keys(this._actionModel).length,a=null==(r=null==(t=null==(e=this._actionModel)?void 0:e.source)?void 0:t.transformation)?void 0:r.error;return a&&a instanceof Error?{error:a}:i?this._actionModel:{error:new to(`unsupported action ${this.constructor.name}`)}}class th{constructor(){this._actionModel={}}toJson(){return tp.apply(this)}}class tf extends th{constructor(){super(...arguments),this.qualifiers=new Map,this.flags=[],this.delimiter=",",this.actionTag=""}prepareQualifiers(){}getActionTag(){return this.actionTag}setActionTag(e){return this.actionTag=e,this}toString(){return this.prepareQualifiers(),(function(e,t){let r=Array.from(e.entries());return t.forEach(e=>{r.push(["fl",e])}),r.sort().map(e=>e[1])})(this.qualifiers,this.flags).join(this.delimiter)}addQualifier(e){if("string"==typeof e){let[t,r]=e.toLowerCase().split("_");"fl"===t?this.flags.push(new td(r)):this.qualifiers.set(t,new tc(t,r))}else this.qualifiers.set(e.key,e);return this}addFlag(e){return"string"==typeof e?this.flags.push(new td(e)):e instanceof td&&this.flags.push(e),this}addValueToQualifier(e,t){return this.qualifiers.get(e).addValue(t),this}}class tm extends tf{constructor(e){super(),this._actionModel={},this.addQualifier(new tc("b",new ts(function(e){return e&&e.match(/^#/)?`rgb:${e.substr(1)}`:e}(e)).setDelimiter("_"))),this._actionModel.color=e,this._actionModel.actionType="backgroundColor"}static fromJson(e){let{color:t}=e;return new this(t)}}class tg{constructor(e){this.raw=e}toString(){return this.raw}toJson(){return{error:new to(`unsupported action ${this.constructor.name}`)}}}class ty extends ts{constructor(e){super(e),this.val=e}getValue(){return this.val}}function t_(e){let t={};return Object.keys(e).forEach(r=>{t[e[r]]=r}),t}t_({444:"CHROMA_444",420:"CHROMA_420"}),t_({noCmyk:"no_cmyk",keepCmyk:"keep_cmyk",tinySrgb:"tinysrgb",srgbTrueColor:"srgb:truecolor"}),t_({limitFit:"limit",limitFill:"lfill",minimumFit:"mfit",thumbnail:"thumb",limitPad:"lpad",minimumPad:"mpad",autoPad:"auto_pad"});let tv=t_({colorSpace:"cs",dpr:"dpr",density:"dn",defaultImage:"d",format:"f",quality:"q"});t_({redEye:"redeye",advancedRedEye:"adv_redeye",oilPaint:"oil_paint",unsharpMask:"unsharp_mask",makeTransparent:"make_transparent",generativeRestore:"gen_restore",upscale:"upscale"}),t_({autoBest:"auto:best",autoEco:"auto:eco",autoGood:"auto:good",autoLow:"auto:low",jpegminiHigh:"jpegmini:1",jpegminiMedium:"jpegmini:2",jpegminiBest:"jpegmini:0"}),t_({fullHd:"full_hd",fullHdWifi:"full_hd_wifi",fullHdLean:"full_hd_lean",hdLean:"hd_lean"});class tb extends tf{constructor(e,t,r){let i;super(),this._actionModel={},i=t instanceof ty?t.getValue():t,this._actionModel.actionType=tv[e],this._actionModel[r]=i,this.addQualifier(new tc(e,t))}}class tx extends td{constructor(e){super("progressive",e)}}class tw extends tb{constructor(e,t){super(e,t,"formatType")}lossy(){return this._actionModel.lossy=!0,this.addFlag(new td("lossy")),this}progressive(e){return e instanceof tx?(this._actionModel.progressive={mode:e.getFlagValue()},this.addFlag(e)):(this._actionModel.progressive={mode:e},this.addFlag(new td("progressive",e))),this}preserveTransparency(){return this._actionModel.preserveTransparency=!0,this.addFlag(new td("preserve_transparency")),this}static fromJson(e){let t,{formatType:r,lossy:i,progressive:a,preserveTransparency:n}=e;return t=r?new this("f",r):new this("f"),a&&(a.mode?t.progressive(a.mode):t.progressive()),i&&t.lossy(),n&&t.preserveTransparency(),t}}class tk{constructor(){this.actions=[]}addAction(e){let t;if("string"==typeof e)if(e.indexOf("/")>=0)throw"addAction cannot accept a string with a forward slash in it - /, use .addTransformation() instead";else t=new tg(e);else t=e;return this.actions.push(t),this}addTransformation(e){return e instanceof tk?this.actions=this.actions.concat(e.actions):this.actions.push(new tg(e)),this}toString(){return this.actions.map(e=>e.toString()).filter(e=>e).join("/")}animated(e){return this.addAction(e)}border(e){return this.addAction(e)}reshape(e){return this.addAction(e)}resize(e){return this.addAction(e)}quality(e){return this.addAction(new tw("q",e)),this}format(e){return this.addAction(new tw("f",e)),this}
1roundCorners(e){return this.addAction(e)}overlay(e){return this.addAction(e)}underlay(e){return e.setLayerType("u"),this.addAction(e)}addVariable(e){return this.addAction(e)}conditional(e){return this.addAction(e)}effect(e){return this.addAction(e)}adjust(e){return this.addAction(e)}rotate(e){return this.addAction(e)}namedTransformation(e){return this.addAction(e)}delivery(e){return this.addAction(e)}backgroundColor(e){return this.addAction(new tm(e))}psdTools(e){return this.addAction(e)}extract(e){return this.addAction(e)}addFlag(e){let t=new tf,r=e;return"string"==typeof e&&(r=new td(e)),t.addQualifier(r),this.addAction(t)}customFunction(e){return this.addAction(e)}transcode(e){return this.addAction(e)}videoEdit(e){return this.addAction(e)}toJson(){let e=[];for(let t of this.actions){let r=t.toJson();if("error"in r&&r.error)return r;e.push(r)}return{actions:e}}}class tO extends tk{}class tS{filterOutNonSupportedKeys(e,t){let r=Object.create({});return"object"!=typeof e||e instanceof Array?Object.create({}):(Object.keys(e).forEach(i=>{t.indexOf(i)>=0?r[i]=e[i]:console.warn("Warning - unsupported key provided to configuration: ",i)}),r)}}let tT=tS,tN=["cname","secureDistribution","privateCdn","signUrl","longUrlSignature","shorten","useRootPath","secure","forceVersion","analytics","queryParams"];class tj extends tT{constructor(e){super(),Object.assign(this,{secure:!0},this.filterOutNonSupportedKeys(e,tN))}extend(e){return new tj(Object.assign({},this,this.filterOutNonSupportedKeys(e,tN)))}setCname(e){return this.cname=e,this}setSecureDistribution(e){return this.secureDistribution=e,this}setPrivateCdn(e){return this.privateCdn=e,this}setSignUrl(e){return this.signUrl=e,this}setLongUrlSignature(e){return this.longUrlSignature=e,this}setShorten(e){return this.shorten=e,this}setUseRootPath(e){return this.useRootPath=e,this}setSecure(e){return this.secure=e,this}setForceVersion(e){return this.forceVersion=e,this}setQueryParams(e){return this.queryParams=e,this}}function tA(e,t,r){let i=0|t,a=String(void 0!==r?r:" ");return e.length>i?String(e):((i-=e.length)>a.length&&(a+=function(e,t){let r=t,i="";for(;r>0;)i+=e,r--;return i}(a,i/a.length)),a.slice(0,i)+String(e))}let tC={},t$=0;function tE(e){let t="",r=e.split(".").length,i=parseInt((function(e){if(e.split(".").length<2)throw Error("invalid semVer, must have at least two segments");return e.split(".").reverse().map(e=>{let t=+e;if(isNaN(t)||t<0)throw"Invalid version number provided";return tA(e,2,"0")}).join(".")})(e).split(".").join("")).toString(2);if((i=tA(i,6*r,"0")).length%6!=0)throw"Version must be smaller than 43.21.26)";return i.match(/.{1,6}/g).forEach(e=>{t+=tC[e]}),t}"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(e=>{let t=t$.toString(2);tC[t=tA(t,6,"0")]=e,t$++});var tZ=r(40459);function tR(e){let t=function(e){let t={sdkSemver:e.sdkSemver,techVersion:e.techVersion,sdkCode:e.sdkCode,product:e.product,feature:"0"};return e.accessibility&&(t.feature="D"),e.lazyload&&(t.feature="C"),e.responsive&&(t.feature="A"),e.placeholder&&(t.feature="B"),t}(function(e){let t={techVersion:function(){let e="0.0.0";if("undefined"!=typeof window)return e;try{return tZ.versions.node||e}catch(t){return e}}(),sdkCode:"T",sdkSemver:"1.15.0".split("-")[0],product:"A",responsive:!1,placeholder:!1,lazyload:!1,accessibility:!1};return e?Object.assign(Object.assign({},t),e):t}(e));try{let e=function(e){let t=e.split(".");return`${t[0]}.${t[1]}`}(t.techVersion),r=tE(t.sdkSemver),i=tE(e),a=t.feature,n=t.sdkCode,s=t.product;return`B${s}${n}${r}${i}${a}`}catch(e){return"E"}}let tI={"image/upload":"images","image/private":"private_images","image/authenticated":"authenticated_images","raw/upload":"files","video/upload":"videos"};class tP{constructor(e,t={},r){this.setPublicID(e),this.setCloudConfig(t),this.setURLConfig(r)}setURLConfig(e){return this.urlConfig=new tj(e),this}setCloudConfig(e){return this.cloudName=e.cloudName,this.apiKey=e.apiKey,this.apiSecret=e.apiSecret,this.authToken=e.authToken,this}setPublicID(e){return this.publicID=e?e.toString():"",this}setDeliveryType(e){return this.deliveryType=e,this}setSuffix(e){return this.suffix=e,this}setSignature(e){return this.signature=e,this}setVersion(e){return e&&(this.version=e),this}setAssetType(e){return e&&(this.assetType=e),this}sign(){return this}toURL(e={}){return this.createCloudinaryURL(null,e.trackedAnalytics)}validateAssetForURLCreation(){if(void 0===this.cloudName)throw"You must supply a cloudName when initializing the asset";let e=this.suffix&&this.suffix.indexOf(".")>=0,t=this.suffix&&this.suffix.indexOf("/")>=0;if(e||t)throw"`suffix`` should not include . or /"}getResourceType(){var e,t;let r=(e=this.assetType)?e:"image",i=(t=this.deliveryType)?t:"upload",a=!!this.suffix,n=`${r}/${i}`,s=tI[`${r}/${i}`],o=this.urlConfig.useRootPath,l=this.urlConfig.shorten;if(o)if("image/upload"===n)return"";else throw Error(`useRootPath can only be used with assetType: 'image' and deliveryType: 'upload'. Provided: ${n} instead`);if(l&&"image/upload"===n)return"iu";if(a)if(s)return s;else throw Error(`URL Suffix only supported for ${Object.keys(tI).join(", ")}, Provided: ${n} instead`);return n}getSignature(){return this.signature?`s--${this.signature}--`:""}createCloudinaryURL(e,t){var r,i,a;
1if(!this.publicID)return"";this.validateAssetForURLCreation();let n=function(e,t){let r=t.secure,i=t.privateCdn,a=t.cname,n=t.secureDistribution;return r||a?r&&!n&&i?`https://${e}-res.cloudinary.com`:r&&!n?`https://res.cloudinary.com/${e}`:r&&n&&i?`https://${n}`:r&&n?`https://${n}/${e}`:!r&&a?`http://${a}/${e}`:"ERROR":`http://res.cloudinary.com/${e}`}(this.cloudName,this.urlConfig),s=e?e.toString():"",o=(r=this.publicID,i=this.version,a=this.urlConfig.forceVersion,i?`v${i}`:r.match(/^v[0-9]+/)||r.match(/^https?:\//)||0>r.indexOf("/")?"":!1!==a?"v1":""),l=this.publicID;if("string"==typeof e)return[n,this.getResourceType(),this.getSignature(),s,o,l.replace(/,/g,"%2C"),this.suffix].filter(e=>e).join("/");{let e=[encodeURI(n),this.getResourceType(),this.getSignature(),encodeURI(s),o,encodeURI(l).replace(/,/g,"%2C"),this.suffix&&encodeURI(this.suffix)].filter(e=>e).join("/").replace(/\?/g,"%3F").replace(/=/g,"%3D"),r=!1!==this.urlConfig.analytics&&!l.includes("?"),i="";if("object"==typeof this.urlConfig.queryParams)try{let e=new URLSearchParams(this.urlConfig.queryParams);r&&e.set("_a",tR(t)),i=e.toString()}catch(e){console.error("Error: URLSearchParams is not available so the queryParams object cannot be parsed, please try passing as an already parsed string")}else i=this.urlConfig.queryParams||"",r&&(i+=`${i.length>0?"&":""}_a=${tR(t)}`);return i?`${e}?${i}`:e}}}
1class tq extends tP{constructor(e,t,r,i){super(e,t,r),this.transformation=i}animated(e){return this.transformation.animated(e),this}border(e){return this.transformation.border(e),this}reshape(e){return this.transformation.reshape(e),this}resize(e){return this.transformation.resize(e),this}quality(e){return this.addAction(new tw("q",e)),this}format(e){return this.addAction(new tw("f",e)),this}roundCorners(e){return this.transformation.roundCorners(e),this}overlay(e){return this.transformation.overlay(e),this}addVariable(e){return this.transformation.addVariable(e),this}conditional(e){return this.transformation.conditional(e),this}effect(e){return this.transformation.effect(e),this}adjust(e){return this.transformation.adjust(e),this}rotate(e){return this.transformation.rotate(e),this}namedTransformation(e){return this.transformation.namedTransformation(e),this}delivery(e){return this.transformation.delivery(e),this}backgroundColor(e){return this.transformation.backgroundColor(e),this}psdTools(e){return this.transformation.psdTools(e),this}extract(e){return this.transformation.extract(e),this}addFlag(e){return this.transformation.addFlag(e),this}customFunction(e){return this.transformation.customFunction(e),this}addAction(e){return this.transformation.addAction(e),this}addTransformation(e){return this.transformation.addTransformation(e),this}toString(){return this.transformation.toString()}underlay(e){return this.transformation.underlay(e),this}toURL(e={}){return this.createCloudinaryURL(this.transformation,null==e?void 0:e.trackedAnalytics)}}class tJ extends tq{constructor(e,t,r){super(e,t,r,new tO)}}class tL extends tk{}class tz extends tq{constructor(e,t,r){super(e,t,r,new tL),this.assetType="video"}transcode(e){return this.transformation.transcode(e),this}videoEdit(e){return this.transformation.videoEdit(e),this}}class tM{constructor(e){e&&(this.cloudinaryConfig=e)}image(e){return new tJ(e,this.cloudinaryConfig.cloud,this.cloudinaryConfig.url)}video(e){return new tz(e,this.cloudinaryConfig.cloud,this.cloudinaryConfig.url)}setConfig(e){return this.cloudinaryConfig=e,this}getConfig(){return this.cloudinaryConfig}extendConfig(){}}var tU=r(40459),tD=Object.defineProperty,tV={};((e,t)=>{for(var r in t)tD(e,r,{get:t[r],enumerable:!0})})(tV,{angle:()=>tW,aspectRatio:()=>tY,aspectRatioModesEnum:()=>tH,crop:()=>tQ,cropModesEnum:()=>tF,extractMode:()=>tG,extractModesEnum:()=>tB,flags:()=>tX,flagsEnum:()=>tK,format:()=>t0,gravity:()=>t1,height:()=>t2,multiple:()=>t4,prompt:()=>t9,width:()=>t5,x:()=>t3,y:()=>t6,zoom:()=>t8});var tF=tn.enum(["auto","crop","fill","fill_pad","fit","imagga_crop","imagga_scale","lfill","limit","lpad","mfit","mpad","pad","scale","thumb"]),tB=tn.enum(["content","mask"]),tK=tn.enum(["animated","any_format","apng","attachment","awebp","clip","clip_evenodd","cutter","force_icc","force_strip","getinfo","group4","hlsv3","ignore_aspect_ratio","ignore_mask_channels","immutable_cache","keep_attribution","keep_dar","keep_iptc","layer_apply","lossy","mono","no_overflow","no_stream","png8_fl_png24_fl_png32","preserve_transparency","progressive","rasterize","region_relative","relative","replace_image","sanitize","splice","streaming_attachment","strip_profile","text_disallow_overflow","text_no_trim","tiff8_lzw","tiled","truncate_ts","waveform"]),tW={qualifier:"a",schema:tn.union([tn.string(),tn.number()]).describe(JSON.stringify({text:"Rotates or flips an asset by the specified number of degrees or automatically according to its orientation or available metadata.",url:"https://cloudinary.com/documentation/transformation_reference#a_angle"}))},tH=tn.enum(["vflip","hflip","ignore","auto_right","auto_left"]),tY={qualifier:"ar",schema:tn.union([tn.number(),tH,tn.intersection(tn.string(),tn.object({}))]).describe(JSON.stringify({text:"Crops or resizes the asset to a new aspect ratio.",url:"https://cloudinary.com/documentation/transformation_reference#ar_aspect_ratio"}))},tQ={qualifier:"c",schema:tF.describe(JSON.stringify({text:"Mode to use when cropping an asset.",url:"https://cloudinary.com/documentation/transformation_reference#c_crop_resize"}))}
1,tG={schema:tB.default("content").describe(JSON.stringify({text:"Whether to keep the content of the extracted area, or to replace it with a mask.",url:"https://cloudinary.com/documentation/transformation_reference#e_extract"}))},tX={qualifier:"fl",schema:tn.union([tK,tn.array(tK)]).describe(JSON.stringify({text:"Alters the regular behavior of another transformation or the overall delivery behavior.",url:"https://cloudinary.com/documentation/transformation_reference#fl_flag"}))},t0={qualifier:"f",schema:tn.string().describe(JSON.stringify({text:"Converts (if necessary) and delivers an asset in the specified format regardless of the file extension used in the delivery URL.",url:"https://cloudinary.com/documentation/transformation_reference#f_format"}))},t1={qualifier:"g",schema:tn.union([tn.enum(["auto","auto_content_aware","center","custom","east","face","face_center","multi_face","north","north_east","north_west","south","south_east","south_west","west"]),tn.intersection(tn.string(),tn.object({}))]).describe(JSON.stringify({text:"Determines which part of an asset to focus on. Note: Default of auto is applied for supported crop modes only.",url:"https://cloudinary.com/documentation/transformation_reference#g_gravity"}))},t2={qualifier:"h",schema:tn.union([tn.number(),tn.string()]).describe(JSON.stringify({text:"A qualifier that determines the height of a transformed asset or an overlay.",url:"https://cloudinary.com/documentation/transformation_reference#h_height"}))},t4={schema:tn.boolean().describe(JSON.stringify({text:"Should generative AI features detect multiple instances."}))},t9={schema:tn.string().describe(JSON.stringify({text:"Natural language descriptions used for generative AI capabilities."}))},t5={qualifier:"w",schema:tn.union([tn.number(),tn.string()]).describe(JSON.stringify({text:"A qualifier that sets the desired width of an asset using a specified value, or automatically based on the available width.",url:"https://cloudinary.com/documentation/transformation_reference#w_width"}))},t3={qualifier:"x",schema:tn.union([tn.string(),tn.number()]).describe(JSON.stringify({text:"Adjusts the starting location or offset of the x axis.",url:"https://cloudinary.com/documentation/transformation_reference#x_y_coordinates"}))},t6={qualifier:"y",schema:tn.union([tn.string(),tn.number()]).describe(JSON.stringify({text:"Adjusts the starting location or offset of the y axis.",url:"https://cloudinary.com/documentation/transformation_reference#x_y_coordinates"}))},t8={schema:tn.string().describe(JSON.stringify({text:"Controls how close to crop to the detected coordinates when using face-detection, custom-coordinate, or object-specific gravity.",url:"https://cloudinary.com/documentation/transformation_reference#z_zoom"}))},t7=[{test:function(e){return"string"==typeof e&&!!e.startsWith("#")},convert:function(e){return`rgb:${e.replace("#","")}`}}],re={aspectRatio:tY,crop:tQ,gravity:t1,height:t2,width:t5},rt={angle:tW,gravity:t1,x:t3,y:t6},rr={alignment:{qualifier:!1,order:6},antialias:{qualifier:"antialias"},border:{qualifier:"bo",location:"primary"},color:{qualifier:"co",location:"primary",converters:t7},fontFamily:{qualifier:!1,order:1},fontSize:{qualifier:!1,order:2},fontStyle:{qualifier:!1,order:4},fontWeight:{qualifier:!1,order:3},hinting:{qualifier:"hinting"},letterSpacing:{qualifier:"letter_spacing"},lineSpacing:{qualifier:"line_spacing"},stroke:{qualifier:"self",order:7},textDecoration:{qualifier:!1,order:5}},ri={angle:tW,art:{prefix:"e",qualifier:"art",schema:tn.string().describe(JSON.stringify({text:"Applies the selected artistic filter.",url:"https://cloudinary.com/documentation/transformation_reference#e_art"}))},autoBrightness:{prefix:"e",qualifier:"auto_brightness",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Automatically adjusts the image brightness and blends the result with the original image.",url:"https://cloudinary.com/documentation/transformation_reference#e_auto_brightness"}))},autoColor:{prefix:"e",qualifier:"auto_color",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Automatically adjusts the image color balance and blends the result with the original image.",url:"https://cloudinary.com/documentation/transformation_reference#e_auto_color"}))},autoContrast:{prefix:"e",qualifier:"auto_contrast",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Automatically adjusts the image contrast and blends the result with the original image.",url:"https://cloudinary.com/documentation/transformation_reference#e_auto_contrast"}))},assistColorblind:{prefix:"e",qualifier:"assist_colorblind",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Applies stripes or color adju
1stment to help people with common color blind conditions to differentiate between colors that are similar for them.",url:"https://cloudinary.com/documentation/transformation_reference#e_assist_colorblind"}))},background:{qualifier:"b",schema:tn.string().describe(JSON.stringify({text:"Applies a background to empty or transparent areas.",url:"https://cloudinary.com/documentation/transformation_reference#b_background"}))},blackwhite:{prefix:"e",qualifier:"blackwhite",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Converts an image to black and white.",url:"https://cloudinary.com/documentation/transformation_reference#e_blackwhite"}))},blur:{prefix:"e",qualifier:"blur",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Applies a blurring filter to an asset.",url:"https://cloudinary.com/documentation/transformation_reference#e_blur"}))},blurFaces:{prefix:"e",qualifier:"blur_faces",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Blurs all detected faces in an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_blur_faces"}))},blurRegion:{prefix:"e",qualifier:"blur_region",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Applies a blurring filter to the region of an image specified by x, y, width and height, or an area of text. If no region is specified, the whole image is blurred.",url:"https://cloudinary.com/documentation/transformation_reference#e_blur_region"}))},border:{qualifier:"bo",schema:tn.string().describe(JSON.stringify({text:"Adds a solid border around an image or video.",url:"https://cloudinary.com/documentation/transformation_reference#bo_border"}))},brightness:{prefix:"e",qualifier:"brightness",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Adjusts the image or video brightness.",url:"https://cloudinary.com/documentation/transformation_reference#e_brightness"}))},brightnessHSB:{prefix:"e",qualifier:"brightness_hsb",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Adjusts image brightness modulation in HSB to prevent artifacts in some images.",url:"https://cloudinary.com/documentation/transformation_reference#e_brightness_hsb"}))},cartoonify:{prefix:"e",qualifier:"cartoonify",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Applies a cartoon effect to an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_cartoonify"}))},color:{qualifier:"co",schema:tn.string().describe(JSON.stringify({text:"A qualifier that specifies the color to use with the corresponding transformation.",url:"https://cloudinary.com/documentation/transformation_reference#co_color"})),converters:t7}
1,colorize:{prefix:"e",qualifier:"colorize",schema:tn.string().describe(JSON.stringify({text:"Colorizes an image. By default, gray is used for colorization. You can specify a different color using the color qualifier.",url:"https://cloudinary.com/documentation/transformation_reference#e_colorize"}))},contrast:{prefix:"e",qualifier:"contrast",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Adjusts an image or video contrast.",url:"https://cloudinary.com/documentation/transformation_reference#e_contrast"}))},displace:{prefix:"e",qualifier:"distort",schema:tn.string().describe(JSON.stringify({text:"Displaces the pixels in an image according to the color channels of the pixels in another specified image (a gradient map specified with the overlay parameter).",url:"https://cloudinary.com/documentation/transformation_reference#e_displace"}))},distort:{prefix:"e",qualifier:"distort",schema:tn.string().describe(JSON.stringify({text:"Distorts an image to a new shape by either adjusting its corners or by warping it into an arc.",url:"https://cloudinary.com/documentation/transformation_reference#e_distort"}))},fillLight:{prefix:"e",qualifier:"fill_light",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Adjusts the fill light and optionally blends the result with the original image.",url:"https://cloudinary.com/documentation/transformation_reference#e_fill_light"}))},gamma:{prefix:"e",qualifier:"gamma",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Adjusts the image or video gamma level.",url:"https://cloudinary.com/documentation/transformation_reference#e_gamma"}))},gradientFade:{prefix:"e",qualifier:"gradient_fade",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Applies a gradient fade effect from the edge of an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_gradient_fade"}))},grayscale:{prefix:"e",qualifier:"grayscale",schema:tn.boolean().describe(JSON.stringify({text:"Converts an image to grayscale (multiple shades of gray).",url:"https://cloudinary.com/documentation/transformation_reference#e_grayscale"}))},hue:{prefix:"e",qualifier:"hue",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Adjusts an image's hue.",url:"https://cloudinary.com/documentation/transformation_reference#e_hue"}))},improve:{prefix:"e",qualifier:"improve",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Adjusts an image's colors, contrast and brightness to improve its appearance.",url:"https://cloudinary.com/documentation/transformation_reference#e_improve"}))},loop:{prefix:"e",qualifier:"loop",schema:tn.union([tn.boolean(),tn.number(),tn.string()]).describe(JSON.stringify({text:"Loops a video or animated image the specified number of times.",url:"https://cloudinary.com/documentation/transformation_reference#e_loop"}))},multiply:{prefix:"e",qualifier:"multiply",schema:tn.boolean().describe(JSON.stringify({text:"A qualifier that blends image layers using the multiply blend mode",url:"https://cloudinary.com/documentation/transformation_reference#e_multiply"}))},negate:{prefix:"e",qualifier:"negate",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"https://cloudinary.com/documentation/transformation_reference#e_negate",url:"https://cloudinary.com/documentation/transformation_reference#e_negate"}))},noise:{prefix:"e",qualifier:"noise",schema:tn.boolean().describe(JSON.stringify({text:"https://cloudinary.com/documentation/transformation_reference#e_noise",url:"https://cloudinary.com/documentation/transformation_reference#e_noise"}))},oilPaint:{prefix:"e",qualifier:"oil_paint",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"https://cloudinary.com/documentation/transformation_reference#e_oil_paint",url:"https://cloudinary.com/documentation/transformation_reference#e_oil_paint"}))},opacity:{qualifier:"o",schema:tn.union([tn.string(),tn.number()]).describe(JSON.stringify({text:"Adjusts the opacity of an asset and makes it semi-transparent.",url:"https://cloudinary.com/documentation/transformation_reference#o_opacity"}))},outline:{prefix:"e",qualifier:"outline",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Adds an outline effect to an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_outline"}))},pixelate:{prefix:"e",qualifier:"pixelate",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Applies a pixelation effect.",url:"https://cloudinary.com/documentation/transformation_reference#e_pixelate"}))},pixelateFaces:{prefix:"e",qualifier:"pixelate_faces",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Pixelates all detected faces in an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_pixelate_faces"}))},pixelateRegion:{prefix:"e",qualifier:"pixelate_region",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Pixelates the region of an image specified by x, y, width and height, or an area of text.",url:"https://cloudinary.com/documentation/transformation_reference#e_pixelate_region"}))},radius:{qualifier:"r",schema:tn.union([tn.string(),tn.number()]).describe(JSON.stringify({text:"Rounds the corners of an image or video.",url:"https://cloudinary.com/documentation/transformation_reference#r_round_corners"}))},redeye:{prefix:"e",qualifier:"redeye",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Automatically removes red eyes in an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_redeye"}))},replaceColor:{prefix:"e",qualifier:"replace_color",schema:tn.string().describe(JSON.stringify({text:"Maps an input color and those similar to the input color to corresponding shades of a specified output color.",url:"https://cloudinary.com/documentation/transformation_reference#e_replace_color"}))},saturation:{prefix:"e",qualifier:"saturation",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Adjusts an image or video saturation level.",url:"https://cloudinary.com/documentation/transformation_reference#e_saturation"}))},screen:{prefix:"e",qualifier:"screen",schema:tn.boolean().describe(JSON.stringify({text:"A qualifier that blends image layers using the screen blend mode.",url:"https://cloudinary.com/documentation/transformation_reference#e_screen"}))},sepia:{prefix:"e",qualifier:"sepia",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Changes the color scheme of an image to sepia.",url:"https://cloudinary.com/documentation/transformation_reference#e_sepia"}))},shadow:{prefix:"e",qualifier:"shadow",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Adds a gray shadow to the bottom right of an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_shadow"}))},sharpen:{prefix:"e",qualifier:"sharpen",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Applies a sharpening filter.",url:"https://cloudinary.com/documentation/transformation_reference#e_sharpen"}))},shear:{prefix:"e",qualifier:"shear",schema:tn.string().describe(JSON.stringify({text:"Skews an image according to the two specified values in degrees.",url:"https://cloudinary.com/documentation/transformation_reference#e_shear"}))},simulateColorblind:{prefix:"e",qualifier:"simulate_colorblind",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Simulates the way an image would appear to someone with the specified color blind condition.",url:"https://cloudinary.com/documentation/transformation_reference#e_simulate_colorblind"}))},tint:{prefix:"e",qualifier:"tint",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Blends an image with one or more tint colors at a specified intensity.",url:"https://cloudinary.com/documentation/transformation_reference#e_tint"}))},trim:{prefix:"e",qualifier:"trim",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Detects and removes image edges whose color is similar to the corner pixels.",url:"https://cloudinary.com/documentation/transformation_reference#e_trim"}))},unsharpMask:{prefix:"e",qualifier:"unsharp_mask",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Applies an unsharp mask filter to an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_unsharp_mask"}))}
1,vectorize:{prefix:"e",qualifier:"vectorize",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Vectorizes an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_vectorize"}))},vibrance:{prefix:"e",qualifier:"vibrance",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Applies a vibrance filter to an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_vibrance"}))},vignette:{prefix:"e",qualifier:"vignette",schema:tn.union([tn.string(),tn.boolean()]).describe(JSON.stringify({text:"Applies a vignette effect to an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_vignette"}))}};function ra({prefix:e,qualifier:t,value:r,converters:i}){let a="";e&&(a=`${e}_`);let n=r;if(i?.forEach(({test:e,convert:t})=>{e(n)&&(n=t(n))}),!0===n||"true"===n)return`${a}${t}`;if("string"==typeof n||"number"==typeof n)if(e)return`${a}${t}:${n}`;else return`${t}_${n}`}function rn(e){return`(${e.join(";")})`}function rs(e){return"string"!=typeof e?e:parseInt(e)}var ro=["auto","crop","fill","lfill","fill_pad","thumb"],rl=["auto","crop","fill","lfill","fill_pad","thumb"],ru=["crop","thumb"],rc="limit",rd=tn.object({aspectRatio:tY.schema.optional(),type:tQ.schema,gravity:t1.schema.optional(),height:t2.schema.optional(),width:t5.schema.optional(),x:t3.schema.optional(),y:t6.schema.optional(),zoom:t8.schema.optional(),source:tn.boolean().optional()}),rp={aspectRatio:tY.schema.optional(),crop:tn.union([tQ.schema,rd,tn.array(rd)]).default(rc).optional(),gravity:t1.schema.optional(),zoom:t8.schema.optional()},rh={angle:ri.angle.schema.optional(),art:ri.art.schema.optional(),autoBrightness:ri.autoBrightness.schema.optional(),autoColor:ri.autoColor.schema.optional(),autoContrast:ri.autoContrast.schema.optional(),assistColorblind:ri.assistColorblind.schema.optional(),background:ri.background.schema.optional(),blackwhite:ri.blackwhite.schema.optional(),blur:ri.blur.schema.optional(),blurFaces:ri.blurFaces.schema.optional(),blurRegion:ri.blurRegion.schema.optional(),border:ri.border.schema.optional(),brightness:ri.brightness.schema.optional(),brightnessHSB:ri.brightnessHSB.schema.optional(),cartoonify:ri.cartoonify.schema.optional(),color:ri.color.schema.optional(),colorize:ri.colorize.schema.optional(),contrast:ri.contrast.schema.optional(),distort:ri.distort.schema.optional(),fillLight:ri.fillLight.schema.optional(),gamma:ri.gamma.schema.optional(),gradientFade:ri.gradientFade.schema.optional(),grayscale:ri.grayscale.schema.optional(),improve:ri.improve.schema.optional(),loop:ri.loop.schema.optional(),multiply:ri.multiply.schema.optional(),negate:ri.negate.schema.optional(),oilPaint:ri.oilPaint.schema.optional(),opacity:ri.opacity.schema.optional(),outline:ri.outline.schema.optional(),pixelate:ri.pixelate.schema.optional(),pixelateFaces:ri.pixelateFaces.schema.optional(),pixelateRegion:ri.pixelateRegion.schema.optional(),radius:ri.radius.schema.optional(),redeye:ri.redeye.schema.optional(),replaceColor:ri.replaceColor.schema.optional(),saturation:ri.saturation.schema.optional(),screen:ri.screen.schema.optional(),sepia:ri.sepia.schema.optional(),shadow:ri.shadow.schema.optional(),sharpen:ri.sharpen.schema.optional(),shear:ri.shear.schema.optional(),simulateColorblind:ri.simulateColorblind.schema.optional(),tint:ri.tint.schema.optional(),trim:ri.trim.schema.optional(),unsharpMask:ri.unsharpMask.schema.optional(),vectorize:ri.vectorize.schema.optional(),vibrance:ri.vibrance.schema.optional(),vignette:ri.vignette.schema.optional()},rf={effects:tn.array(tn.object(rh)).describe(JSON.stringify({text:"Array of objects specifying transformations to be applied to asset."})).optional(),...rh},{flagsEnum:rm}=tV,rg={flags:tX.schema.optional()},ry=tn.string(),r_={namedTransformations:tn.union([ry,tn.array(ry)]).describe(JSON.stringify({text:"Named transformations to apply to asset.",url:"https://cloudinary.com/documentation/image_transformations#named_transformations"})).optional(),transformations:tn.union([ry,tn.array(ry)]).describe(JSON.stringify({text:"Deprecated: use namedTransformations instead",url:"https://cloudinary.com/documentation/image_transformations#named_transformations"})).optional()},rv=tn.object({alignment:tn.string().optional(),antialias:tn.string().optional(),border:tn.string().optional(),color:tn.string().optional(),fontFamily:tn.string().optional(),fontSize:tn.number().optional(),fontStyle:tn.union([tn.string(),tn.number()]).optional(),fontWeight:tn.string().optional(),hinting:tn.union([tn.string(),tn.number()]).optional(),letterSpacing:tn.union([tn.string(),tn.number()]).optional(),lineSpacing:tn.union([tn.string(),tn.number()]).optional(),stroke:tn.string().optional(),text:tn.string()}),rb=tn.object({angle:tW.schema.optional(),gravity:t1.schema.optional(),x:t3.schema.optional(),y:t6.schema.optional()}),rx=tn.object({appliedEffects:tn.array(tn.object({})).optional(),appliedFlags:tX.schema.optional(),effects:tn.array(tn.object({})).optional(),crop:tQ.schema.optional(),flags:tX.schema.optional(),height:t2.schema.optional(),position:rb.optional(),publicId:tn.string().optional(),text:tn.union([tn.string(),rv]).optional(),url:tn.string().optional(),width:t5.schema.optional()}),rw={color:"black",fontFamily:"Arial",fontSize:200,fontWeight:"bold"},rk={overlay:rx.describe(JSON.stringify({text:"Image or text layer that is applied on top of the base image.",url:"https://cloudinary.com/documentation/transformation_reference#l_layer"})).optional(),overlays:tn.array(rx).describe(JSON.stringify({text:"Image or text layers that are applied on top of the base image.",url:"https://cloudinary.com/documentation/transformation_reference#l_layer"})).optional(),text:tn.string().describe(JSON.stringify({text:"Text to be overlaid on asset.",url:"https://cloudinary.com/documentation/image_transformations#transformation_url_structure"})).optional()},rO={preserveTransformations:tn.boolean().describe(JSON.stringify({text:"Preserves transformations from a Cloudinary U
1RL when using using a Cloudinary URL as the asset source (src)."})).optional()},rS=tn.string(),rT={rawTransformations:tn.union([rS,tn.array(rS)]).describe(JSON.stringify({text:"Array of transformation parameters using the Cloudinary URL API to apply to an asset.",url:"https://cloudinary.com/documentation/transformation_reference"})).optional()},rN={removeBackground:tn.boolean().describe(JSON.stringify({text:"Removes the background of an image using the Cloudinary AI Background Removal Add-On (Required).",url:"https://cloudinary.com/documentation/cloudinary_ai_background_removal_addon"})).optional()},rj={sanitize:tn.boolean().describe(JSON.stringify({text:"Runs a sanitizer on SVG images.",url:"https://cloudinary.com/documentation/transformation_reference#fl_sanitize"})).optional()},rA={seoSuffix:tn.string().describe(JSON.stringify({text:"Configures the URL to include an SEO-friendly suffix in the URL",url:"https://cloudinary.com/documentation/advanced_url_delivery_options#seo_friendly_media_asset_urls"})).optional()},rC=tn.object({angle:tW.schema.optional(),gravity:t1.schema.optional(),x:t3.schema.optional(),y:t6.schema.optional()}),r$=tn.object({appliedEffects:tn.array(tn.object({})).optional(),appliedFlags:tX.schema.optional(),effects:tn.array(tn.object({})).optional(),crop:tQ.schema.optional(),flags:tX.schema.optional(),height:t2.schema.optional(),position:rC.optional(),publicId:tn.string().optional(),type:tn.string().optional(),url:tn.string().optional(),width:t5.schema.optional()}),rE={underlay:tn.string().describe(JSON.stringify({text:"Public ID of image that is applied under the base image.",url:"https://cloudinary.com/documentation/transformation_reference#l_layer"})).optional(),underlays:tn.array(r$).describe(JSON.stringify({text:"Image layers that are applied under the base image.",url:"https://cloudinary.com/documentation/transformation_reference#l_layer"})).optional()},rZ={version:tn.union([tn.number(),tn.string()]).describe(JSON.stringify({text:"Custom version number to apply to asset URL.",url:"https://cloudinary.com/documentation/advanced_url_delivery_options#asset_versions"})).optional()},rR=tn.object({assetType:tn.string().default("image").describe(JSON.stringify({text:"The type of asset to deliver.",url:"https://cloudinary.com/documentation/image_transformations#transformation_url_structure"})).optional(),deliveryType:tn.string().default("upload").describe(JSON.stringify({text:"Delivery method of the asset.",url:"https://cloudinary.com/documentation/image_transformations#delivery_types"})).optional(),dpr:tn.union([tn.string(),tn.number()]).describe(JSON.stringify({text:"Delivery method of the asset.",url:"https://cloudinary.com/documentation/image_transformations#delivery_types"})).optional(),format:tn.string().default("auto").describe(JSON.stringify({text:"Converts (if necessary) and delivers an asset in the specified format.",url:"https://cloudinary.com/documentation/transformation_reference#f_format"})).optional(),height:tn.union([tn.string(),tn.number()]).describe(JSON.stringify({text:"Height of the given asset."})).optional(),quality:tn.union([tn.string(),tn.number(),tn.string()]).default("auto").describe(JSON.stringify({text:"Quality of the delivered asset",url:"https://cloudinary.com/documentation/transformation_reference#q_quality"})).optional(),src:tn.string().describe(JSON.stringify({text:"Cloudinary Public ID or versioned Cloudinary URL (/v1234/)"})),strictTransformations:tn.boolean().describe(JSON.stringify({text:"Gives you the ability to have more control over what transformations are permitted to be used from your Cloudinary account.",url:"https://cloudinary.com/documentation/control_access_to_media#strict_transformations"})).optional(),width:tn.union([tn.string(),tn.number()]).describe(JSON.stringify({text:"Width of the given asset."})).optional(),...rp,...rf,...rg,...r_,...rk,...rO,...rT,...rN,...rj,...rA,...rE,...rZ}),rI={defaultImage:tn.string().describe(JSON.stringify({text:"Configures the default image to use in case the given public ID is not available. Must include file extension.",url:"https://cloudinary.com/documentation/transformation_reference#d_default_image"})).optional()},rP={enhance:tn.boolean().describe(JSON.stringify({text:"Uses AI to analyze an image and make adjustments to enhance the appeal of the image.",url:"https://cloudinary.com/documentation/transformation_reference#e_enhance"})).optional()},rq={extract:tn.union([t9.schema.optional(),tn.array(t9.schema).optional(),tn.object({invert:tn.boolean().default(!1).optional(),mode:tG.schema.optional(),multiple:t4.schema.default(!1).optional(),prompt:tn.union([t9.schema,tn.array(t9.schema)]).optional()})]).describe(JSON.stringify({text:"Extracts an area or multiple areas of an image, described
1in natural language.",url:"https://cloudinary.com/documentation/transformation_reference#e_extract"})).optional()};function rJ(e){return"string"==typeof e?e:Array.isArray(e)?`(${e.filter(e=>"string"==typeof e).join(";")})`:void 0}var rL={fillBackground:tn.union([tn.boolean(),tn.object({crop:tQ.schema.optional(),gravity:t1.schema.optional(),prompt:tn.string().optional()})]).describe(JSON.stringify({text:"Uses Generative Fill to extended padded image with AI",url:"https://cloudinary.com/documentation/transformation_reference#b_gen_fill"})).optional()},rz=tn.union([tn.string(),tn.array(tn.string())]),rM=tn.object({prompt:rz.optional(),to:tn.string().optional(),multiple:tn.boolean().optional()}),rU={recolor:tn.union([rz,rM]).describe(JSON.stringify({text:"Uses generative AI to recolor parts of your image, maintaining the relative shading.",url:"https://cloudinary.com/documentation/transformation_reference#e_gen_recolor"})).optional()},rD=tn.union([tn.string(),tn.array(tn.string())]),rV=tn.object({prompt:rD.optional(),region:tn.union([tn.array(tn.number()),tn.array(tn.array(tn.number()))]).optional(),multiple:tn.boolean().optional(),removeShadow:tn.boolean().optional()}),rF={remove:tn.union([rD,rV]).describe(JSON.stringify({text:"Applies zooming and/or panning to an image, resulting in a video or animated image.",url:"https://cloudinary.com/documentation/transformation_reference#e_zoompan"})).optional()},rB={replaceBackground:tn.union([tn.boolean(),tn.string(),tn.object({seed:tn.number().optional(),prompt:tn.string().optional()})]).describe(JSON.stringify({text:"Replaces the background of an image with an AI-generated background.",url:"https://cloudinary.com/documentation/transformation_reference#e_gen_background_replace"})).optional()},rK={replace:tn.union([tn.array(tn.string()),tn.array(tn.boolean()),tn.object({to:tn.string(),from:tn.string(),preserveGeometry:tn.boolean().optional()})]).describe(JSON.stringify({text:"Uses generative AI to replace parts of your image with something else.",url:"https://cloudinary.com/documentation/transformation_reference#e_gen_replace"})).optional()},rW={restore:tn.boolean().describe(JSON.stringify({text:"Uses generative AI to restore details in poor quality images or images that may have become degraded through repeated processing and compression.",url:"https://cloudinary.com/documentation/transformation_reference#e_gen_restore"})).optional()},rH={zoompan:tn.union([tn.string(),tn.boolean(),tn.object({loop:ri.loop.schema.optional(),options:tn.string()})]).describe(JSON.stringify({text:"Applies zooming and/or panning to an image, resulting in a video or animated image.",url:"https://cloudinary.com/documentation/transformation_reference#e_zoompan"})).optional()},rY=rR.merge(tn.object({...rI,...rP,...rq,...rL,...rU,...rF,...rK,...rB,...rW,...rH})),rQ={streamingProfile:tn.string().describe(JSON.stringify({text:"The streaming profile to apply when delivering a video using adaptive bitrate streaming.",url:"https://cloudinary.com/documentation/transformation_reference#sp_streaming_profile"})).optional()},rG=rR.merge(tn.object({...rQ})),rX=tn.any(),r0=tn.any(),r1=[{props:rP,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{enhance:i=!1}=r;return i&&t.effect("e_enhance"),{}}},{props:rq,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{extract:i}=r;if(!i||void 0===i)return{};let a=[];if("string"==typeof i)a.push(`prompt_${i}`);else if(Array.isArray(i))a.push(`prompt_${rJ(i)}`);else if("object"==typeof i&&!Array.isArray(i)){let e=rJ(i.prompt);e&&a.push(`prompt_${e}`),!0===i.invert&&a.push("invert_true"),"string"==typeof i.mode&&a.push(`mode_${i.mode}`),!0===i.multiple&&a.push("multiple_true")}if(a.length>0){let e=`e_extract:${a.join(";")}`;t.addTransformation(e)}return{}}},{props:rU,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{recolor:i}=r,a={prompt:void 0,"to-color":void 0,multiple:void 0};Array.isArray(i)?(Array.isArray(i[0])?a.prompt=rn(i[0]):a.prompt=i[0],"string"==typeof i[1]&&(a["to-color"]=i[1])):"object"==typeof i&&("string"==typeof i.prompt?a.prompt=i.prompt:Array.isArray(i.prompt)&&(a.prompt=rn(i.prompt)),"string"==typeof i.to&&(a["to-color"]=i.to),!0===i.multiple&&(a.multiple="true"));let n=Object.entries(a).filter(([,e])=>!!e).map(([e,t])=>`${e}_${t}`).join(";");return n&&t.addTransformation(`e_gen_recolor:${n}`),{}}},{props:rN,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}
1=e,{removeBackground:i=!1}=r;return i&&t.effect("e_background_removal"),{}}},{props:rF,assetTypes:["image","images"],plugin:({cldAsset:e,options:t})=>{let{remove:r}=t,i={prompt:void 0,region:void 0,multiple:void 0,"remove-shadow":void 0};if("string"==typeof r)i.prompt=r;else if(Array.isArray(r))i.prompt=rn(r);else if("object"==typeof r){let e="string"==typeof r.prompt||Array.isArray(r.prompt),t=Array.isArray(r.region);if(e&&t)throw Error("Invalid remove options: you can not have both a prompt and a region. More info: https://cloudinary.com/documentation/transformation_reference#e_gen_remove");"string"==typeof r.prompt?i.prompt=r.prompt:Array.isArray(r.prompt)&&(i.prompt=rn(r.prompt)),Array.isArray(r.region)&&(i.region=function e(t){let r={0:"x",1:"y",2:"w",3:"h"},i=t.map((t,i)=>{if(Array.isArray(t))return e(t);let a=r[i];return`${a}_${t}`}).join(";");return`(${i})`}(r.region)),!0===r.multiple&&(i.multiple="true"),!0===r.removeShadow&&(i["remove-shadow"]="true")}let a=Object.entries(i).filter(([,e])=>!!e).map(([e,t])=>`${e}_${t}`).join(";");return a&&e.addTransformation(`e_gen_remove:${a}`),{}}},{props:rK,assetTypes:["image","images"],plugin:({cldAsset:e,options:t})=>{let{replace:r=null}=t;if(r){let t,i,a=!1;Array.isArray(r)?(t=r[0],i=r[1],a=r[2]||!1):(t=r.from,i=r.to,a=r.preserveGeometry||!1);let n=[`e_gen_replace:from_${t}`,`to_${i}`];a&&n.push(`preserve-geometry_${a}`),e.effect(n.join(";"))}return{}}},{props:rB,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{replaceBackground:i}=r;if(!i||void 0===i)return{};let a=[];"object"==typeof i?(void 0!==i.prompt&&a.push(`prompt_${i.prompt}`),"number"==typeof i.seed&&a.push(`seed_${i.seed}`)):"string"==typeof i&&a.push(`prompt_${i}`);let n="e_gen_background_replace";return a.length>0&&(n=`${n}:${a.join(";")}`),t.addTransformation(n),{}}},{props:rW,assetTypes:["image","images"],plugin:({cldAsset:e,options:t})=>{let{restore:r=!1}=t;return r&&e.effect("e_gen_restore"),{}}},{props:rp,assetTypes:["image","images","video","videos"],plugin:e=>{let{cldAsset:t,options:r}=e,i=[];"string"==typeof r.crop||void 0===r.crop?i.push({aspectRatio:r.aspectRatio,height:r.height,gravity:r.gravity,type:r.crop||rc,width:r.width,zoom:r.zoom}):"object"!=typeof r.crop||Array.isArray(r.crop)?Array.isArray(r.crop)&&(i=r.crop):i.push(r.crop),1===i.length&&!0===i[0].source&&i.push({aspectRatio:r.aspectRatio,width:r.width,height:r.height,gravity:r.gravity,type:rc,zoom:r.zoom});let a=[],n=[];for(let e of i){let t={width:e.width,height:e.height};void 0===t.width&&void 0===e.aspectRatio&&(t.width=r.width,void 0===t.height&&(t.height=r.height));let i=function(e){let{aspectRatio:t,type:r,x:i,y:a,zoom:n}=e,s=e.gravity,o=rs(e.height),l=rs(e.width),u=[],c=t&&ro.includes(r),d="number"==typeof i||"string"==typeof i,p="number"==typeof a||"string"==typeof a,h=d||p;return r&&(o||l||c||h)&&u.push(`c_${r}`),c&&u.push(`ar_${t}`),l&&u.push(`w_${l}`),["limit"].includes(r)||"number"!=typeof o||u.push(`h_${o}`),d&&u.push(`x_${i}`),p&&u.push(`y_${a}`),!s&&rl.includes(r)&&!h&&(s="auto"),s&&("auto"!==s||rl.includes(r)?u.push(`g_${s}`):console.warn(`Auto gravity can only be used with crop modes: ${rl.join(", ")}. Not applying gravity.`)),n&&("auto"!==n||ru.includes(r)?u.push(`z_${n}`):console.warn(`Zoom can only be used with crop modes: ${ru.join(", ")}. Not applying zoom.`)),u}({aspectRatio:e.aspectRatio,gravity:e.gravity,type:e.type||rc,x:e.x,y:e.y,zoom:e.zoom,...t});i.length>0&&(!0===e.source?n.push(i):a.push(i))}n.forEach(e=>{e.length>0&&t.addTransformation(e.join(","))});let s={options:{}};return s.options&&a.length>0&&(s.options.resize=a.map(e=>e.join(",")).join("/")),s}},{props:rO,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{preserveTransformations:r=!1}=t;if(r)try{(function(e){let{transformations:t=[]}=g(e)||{};return t.map(e=>e.split(","))})(t.src).map(e=>e.join(",")).flat().forEach(t=>{e.addTransformation(t)})}catch(e){console.warn(`Failed to preserve transformations: ${e.message}`)}return{}}},{props:rT,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{rawTransformations:r=[]}=t;return Array.isArray(r)||(r=[r]),r.forEach(t=>{e.addTransformation(t)}),{}}},{props:rQ,assetTypes:["video","videos"],plugin:e=>{let{cldAsset:t,options:r}=e,{streamingProfile:i}=r;return"string"==typeof i&&t.addTransformation(`sp_${i}`),{}}},{props:rI,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{defaultImage:i}=r;if("string"==typeof i){y(i)||console.warn("The defaultImage prop may be missing a format and must include it along with the public ID. (Ex: myimage.jpg)");let e=i.replace(/\//g,":");t.addTransformation(`d_${e}`)}return{}}},{props:rf,assetTypes:["image","images","video","videos"],plugin:e=>{let{cldAsset:t,options:r}=e;function i({effects:e,options:t}){return Object.keys(e).map(r=>{let{prefix:i,qualifier:a,converters:n}=e[r];return ra({qualifier:a,prefix:i,value:t?.[r],converters:n})})}return i({effects:ri,options:r}).filter(e=>
1!!e).forEach(e=>t.effect(e)),Array.isArray(r?.effects)&&r?.effects.forEach(e=>{let r=i({effects:ri,options:e}).filter(e=>!!e).join(",");t.effect(r)}),{}}},{props:rL,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{fillBackground:i}=r;if(void 0===i)return{};let a=rs(r.width),n=rs(r.height),s=r.aspectRatio;if(s||"number"!=typeof n||"number"!=typeof a||(s=`${a}:${n}`),!s)return{};if(!0===i){let e=["b_gen_fill",`ar_${s}`,"c_pad"];t.addTransformation(e.join(","))}else if("object"==typeof i){let{crop:e="pad",gravity:r,prompt:a}=i,n=[`ar_${s}`,`c_${e}`];"string"==typeof a?n.unshift(`b_gen_fill:${a}`):n.unshift("b_gen_fill"),"string"==typeof r&&n.push(`g_${r}`),t.addTransformation(n.join(","))}return{}}},{props:rg,assetTypes:["image","images","video","videos"],plugin:e=>{let{cldAsset:t,options:r}=e,{flags:i=[]}=r;return Array.isArray(i)&&i.length>0?i.forEach(e=>{let{success:r}=rm.safeParse(e);r&&t.addFlag(e)}):"object"==typeof i&&Object.entries(i).forEach(([e,r])=>{let{success:i}=rm.safeParse(e);i&&t.addTransformation(`fl_${e}:${r}`)}),{}}},{props:rk,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{text:r,overlays:i=[]}=t;function a({publicId:t,url:r,position:i,text:a,effects:n=[],appliedEffects:s=[],flags:o=[],appliedFlags:l=[],...u}){let c,p="string"==typeof t,h="string"==typeof r,f="object"==typeof a||"string"==typeof a,m="object"==typeof i;if(!p&&!h&&!f)return void console.warn("An overlay is missing Public ID, URL, or Text");if(f)c="l_text";else if(p)c=`l_${t.replace(/\//g,":")}`;else h&&(c=`l_fetch:${"function"==typeof btoa?btoa(r):void 0!==d?d.from(r).toString("base64"):void 0}`);let g=[],y=[];if(Object.keys(u).forEach(e=>{if(!_(re,e))return;let{qualifier:t,converters:r}=re[e],i=ra({qualifier:t,value:u[e],converters:r});i&&g.push(i)}),n.forEach(e=>{Object.keys(e).forEach(t=>{let r=re[t]||ri[t]||rt[t];if(!r)return;let{qualifier:i,prefix:a,converters:n}=r,s=ra({qualifier:i,prefix:a,value:e[t],converters:n});s&&g.push(s)})}),s.forEach(e=>{Object.keys(e).forEach(t=>{let r=re[t]||ri[t]||rt[t];if(!r)return;let{qualifier:i,prefix:a,converters:n}=r,s=ra({qualifier:i,prefix:a,value:e[t],converters:n});s&&y.push(s)})}),(Array.isArray(o)?o:[o]).forEach(e=>{let{success:t}=tK.safeParse(e);t&&g.push(`fl_${e}`)}),(Array.isArray(l)?l:[l]).forEach(e=>{let{success:t}=tK.safeParse(e);t&&y.push(`fl_${e}`)}),f){"string"==typeof a&&(a={...rw,text:a});let e=[];
1if("object"==typeof a)for(let t of function(e=[],t,r="asc"){let i=[...e];return"string"!=typeof t?i:(i=i.sort(function(e,r){let i=e[t],a=r[t];return("string"==typeof i&&(i=i.toLowerCase()),"string"==typeof a&&(a=a.toLowerCase()),i<a)?-1:+(i>a)}),"desc"===r)?i.reverse():i}(Object.keys(a).filter(e=>_(rr,e)).map(e=>{let t=a&&_(a,e)&&a[e];return{...rr[e],key:e,value:t,order:rr[e].order||99}}),"order")){let{key:r,value:i,qualifier:a,location:n,converters:s}=t,o=i;s?.forEach(({test:e,convert:t})=>{e(i)&&(o=t(i))}),"primary"===n?g.push(`${a}_${o}`):"self"===a?e.push(r):a?e.push(`${a}_${o}`):e.push(o)}let t={".":"%2E",",":"%2C","/":"%2F"},r=a?.text||"";"string"==typeof r&&Object.keys(t)?.forEach(e=>{r=r?.replace(e,t[e])}),c=`${c}:${e.join("_")}:${r}`}m&&Object.keys(i).forEach(e=>{if(!_(rt,e)||!_(i,e))return;let{qualifier:t,converters:r}=rt[e],a=ra({qualifier:t,value:i[e],converters:r});a&&y.push(a)}),g.length>0&&(c=`${c},${g.join(",")}`),c=`${c}/fl_layer_apply,fl_no_overflow`,y.length>0&&(c=`${c},${y.join(",")}`),e.addTransformation(c)}return Array.isArray(i)&&i.forEach(a),"string"==typeof r?a({text:Object.assign({},rw,{text:r})}):"object"==typeof r&&a({text:Object.assign({},rw,r)}),{}}},{props:rj,assetTypes:["image","images"],plugin:({cldAsset:e,options:t})=>{let{sanitize:r=!0}=t;return r&&("svg"===t.format||e.publicID.endsWith(".svg"))&&e.effect("fl_sanitize"),{}}},{props:r_,strict:!0,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{transformations:r,namedTransformations:i}=t;r&&"development"===tU.env.NODE_ENVIRONMENT&&console.warn("The transformations prop is deprecated. Please use namedTransformations instead.");let a=i||r||[];return Array.isArray(a)||(a=[a]),a.forEach(t=>{e.addTransformation(`t_${t}`)}),{}}},{props:rA,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{seoSuffix:r}=t;return"string"==typeof r&&("fetch"===t.deliveryType?console.warn("SEO suffix is not supported with a delivery type of fetch"):e.setSuffix(r)),{}}},{props:rE,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{underlay:r,underlays:i=[]}=t;function a({publicId:t,type:r,position:i,effects:a=[],flags:n=[],appliedFlags:s=[],...o}){let l="object"==typeof i;if("string"!=typeof t)return void console.warn(`An ${r} is missing a Public ID`);let u=`u_${t.replace(/\//g,":")}`,c=[],d=[];Object.keys(o).forEach(e=>{if(!_(re,e))return;let{qualifier:t}=re[e];c.push(`${t}_${o[e]}`)}),a.forEach(e=>{Object.keys(e).forEach(t=>{if(!_(re,t))return;let{qualifier:r}=re[t];c.push(`${r}_${e[t]}`)})}
1),l&&Object.keys(i).forEach(e=>{if(!_(rt,e))return;let{qualifier:t}=rt[e];d.push(`${t}_${i[e]}`)}),(Array.isArray(n)?n:[n]).forEach(e=>{let{success:t}=tK.safeParse(e);t&&c.push(`fl_${e}`)}),(Array.isArray(s)?s:[s]).forEach(e=>{let{success:t}=tK.safeParse(e);t&&d.push(`fl_${e}`)}),u=`${u},${c.join(",")}`,u=`${u}/fl_layer_apply,fl_no_overflow`,d.length>0&&(u=`${u},${d.join(",")}`),e.addTransformation(u)}return Array.isArray(i)&&i.forEach(a),"string"==typeof r&&a({publicId:r,crop:"fill",width:"1.0",height:"1.0",flags:["relative"]}),{}}},{props:rZ,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{version:r}=t;return("string"==typeof r||"number"==typeof r)&&e.setVersion(`${r}`.replace("v","")),{}}},{props:rH,assetTypes:["image","images"],plugin:({cldAsset:e,options:t})=>{let{zoompan:r=!1}=t,i={format:void 0};if(!0===r)e.effect("e_zoompan");else if("string"==typeof r)"loop"===r?(e.effect("e_zoompan"),e.effect("e_loop")):e.effect(`e_zoompan:${r}`);else if("object"==typeof r){let t,i="e_zoompan";"string"==typeof r.options&&(i=`${i}:${r.options}`),e.effect(i),!0===r.loop?t="e_loop":("string"==typeof r.loop||"number"==typeof r.loop)&&(t=`e_loop:${r.loop}`),t&&e.effect(t)}return!1!==r&&(i.format="auto:animated"),{options:i}}}],r2=tn.union([rY,rG]).describe(JSON.stringify({text:"Asset options (Image or Video) that define delivery URL including public ID and transformations.",path:"/url-loader/assetoptions"}));function r4(e,t,r){if(void 0===t.transformation)return;let{matchType:i="includes"}=r||{};return t.transformation.actions.flatMap(e=>e.toString().split("/").flatMap(e=>e.split(","))).filter(t=>"startsWith"===i?t.startsWith(e):t.includes(e)).length>0}tn.object({analytics:tn.union([rX,tn.boolean()]).describe(JSON.stringify({text:"Tech, dependency, and feature identifiers for tracking SDK usage related to Cloudinary.",path:"/url-loader/analyticsoptions"})).optional(),config:r0.describe(JSON.stringify({text:"Configuration parameters for environment and Cloudinary account.",url:"https://cloudinary.com/documentation/cloudinary_sdks#configuration_parameters",path:"/url-loader/analyticsoptions"})).optional(),options:r2}),r(81564),r(23792);var r9=r(40459),r5=r6("15.5.12"),r3=r6("6.17.5");function r6(e){let t=e;return t.includes("-")&&(t=t.split("-")[0]),t}function r8(e,t,r){return function({options:e,config:t={},analytics:r}){let i,a;!1===r&&(void 0===t?.url&&(t.url={}),t.url.analytics=!1);let n=new tM(t);if("string"!=typeof e?.src)throw Error("Failed to construct Cloudinary URL: Missing source (src) in options.");e?.assetType||(e.assetType="image");let s=[];r1.forEach(({props:e})=>{Object.keys(e).forEach(e=>{if(s.includes(e))throw Error(`Option ${e} already exists!`);s.push(e)})});let o={};if("string"==typeof e.src&&/^https?:\/\//.test(e.src))try{let t=g(e.src);i=t?.publicId,o.seoSuffix=t?.seoSuffix,o.version=t?.version}catch(e){}if(i||(i=e.src),Object.keys(o).forEach(t=>{_(e,t)||(e[t]=o[t])}),e.version??(e.version=1),["image","images"].includes(e.assetType)?a=n.image(i):["video","videos"].includes(e.assetType)&&(a=n.video(i)),void 0===a)throw Error("Invalid asset type.");let l={};if(r1.forEach(({plugin:t,assetTypes:r,props:i,strict:n})=>{let s=e?.assetType!==void 0&&r.includes(e.assetType),o=Object.keys(i),u=Object.keys(e),c=o.map(e=>u.includes(e)).filter(e=>!!e).length>0;if(!s){c&&console.warn(`One of the following props [${o.join(", ")}] was used with an unsupported asset type [${e?.assetType}]`);return}if(e.strictTransformations&&!n){c&&console.warn(`One of the following props [${o.join(", ")}] was used that is not supported with Strict Transformations.`);return}let{options:d}=t({cldAsset:a,options:e})||{options:void 0};Object.assign(l,d)}),"string"==typeof l.resize&&a.addTransformation(l.resize),a.setDeliveryType(e?.deliveryType||"upload"),!e.strictTransformations){if(e?.dpr){let t=e.dpr;"number"==typeof t&&(t=t.toFixed(1)),a.addTransformation(`dpr_${t}`)}let t=e?.format==="default",r=r4("f_",a,{matchType:"startsWith"}),i=r&&void 0!==e?.format;
1(l?.format||!t&&(!r||i))&&a.format(e?.format||l?.format||"auto");let n=e?.quality==="default",s=r4("q_",a,{matchType:"startsWith"}),o=s&&void 0!==e?.quality;n||s&&!o||a.quality(e?.quality||"auto")}return a.toURL({trackedAnalytics:r})}({options:e,config:function(e){let t=e?.cloud?.cloudName??"dxeq6jwsb";if(!t)throw Error("A Cloudinary Cloud name is required, please make sure NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME is set and configured in your environment.");let r=e?.cloud?.apiKey??r9.env.NEXT_PUBLIC_CLOUDINARY_API_KEY,i=e?.url?.secureDistribution??r9.env.NEXT_PUBLIC_CLOUDINARY_SECURE_DISTRIBUTION,a=e?.url?.privateCdn??r9.env.NEXT_PUBLIC_CLOUDINARY_PRIVATE_CDN;return Object.assign({cloud:{...e?.cloud,apiKey:r,cloudName:t},url:{...e?.url,secureDistribution:i,privateCdn:a}},e)}(t),analytics:Object.assign({product:"A",sdkCode:"V",sdkSemver:r3,techVersion:r5,feature:""},r)})}var r7=(0,l.forwardRef)(function(e,t){let r=!1,i=["assetType","config","deliveryType","strictTransformations"];r1.forEach(({props:e})=>{Object.keys(e).forEach(e=>{if(i.includes(e))throw Error(`Option ${e} already exists!`);i.push(e)})});let a={alt:e.alt,src:e.src};Object.keys(e).filter(e=>"string"==typeof e&&!i.includes(e)).forEach(t=>a[t]=e[t]);let n=Object.keys(a).map(e=>`${e}:${a[e]}`).join(";"),[s,o]=(0,l.useState)(n),d={};async function p(t){let i=!0;if(r)return;if(r=!0,"function"==typeof e.onError){let r=e.onError(t);"boolean"==typeof r&&!1===r&&(i=!1)}else"boolean"==typeof e.onError&&!1===e.onError&&(i=!1);if(!1===i)return;let a=t.target,s=await c({src:a.src});s.error,s.success&&o(`${n};${Date.now()}`)}i.forEach(t=>{let r=e[t];r&&(d[t]=r)}),!0===e.unoptimized,a.src=r8({...d,width:a.width,height:a.height,src:a.src,format:"default",quality:"default"},e.config);let h=(0,l.useCallback)(p,[c,n]),f=u.default;return"default"in f&&(f=f.default),l.createElement(f,{key:s,...a,loader:t=>(function({loaderOptions:e,imageProps:t,cldOptions:r,cldConfig:i={}}){let a={...t,...r};if(a.width="string"==typeof a.width?parseInt(a.width):a.width,a.height="string"==typeof a.height?parseInt(a.height):a.height,"number"==typeof e?.width&&"number"==typeof a.width&&e.width!==a.width){let t=e.width/a.width;a.width=e.width,"number"==typeof a.height&&(a.height=Math.floor(a.height*t))}else"number"==typeof e?.width&&"number"!=typeof a?.width&&(a.width=e?.width);return r8(a,i)})({loaderOptions:t,imageProps:a,cldOptions:d,cldConfig:e.config}),onError:h,ref:t})})},81564:(e,t)=>{function r(){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.