1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3429],{7930:(e,t,r)=>{"use strict";r.d(t,{k5:()=>c});var i=r(45105),n={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},a=i.createContext&&i.createContext(n),s=["attr","size","title"];function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(this,arguments)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){var i,n,a;i=e,n=t,a=r[t],(n=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(n))in i?Object.defineProperty(i,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[n]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function c(e){return t=>i.createElement(d,o({attr:u({},e.attr)},t),function e(t){return t&&t.map((t,r)=>i.createElement(t.tag,u({key:r},t.attr),e(t.child)))}(e.child))}function d(e){var t=t=>{var r,{attr:n,size:a,title:l}=e,c=function(e,t){if(null==e)return{};var r,i,n=function(e,t){if(null==e)return{};var r={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;r[i]=e[i]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,s),d=a||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),i.createElement("svg",o({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,c,{className:r,style:u(u({color:e.color||t.color},t.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),l&&i.createElement("title",null,l),e.children)};return void 0!==a?i.createElement(a.Consumer,null,e=>t(e)):t(n)}},13910:(e,t)=>{t.read=function(e,t,r,i,n){var a,s,o=8*n-i-1,l=(1<<o)-1,u=l>>1,c=-7,d=r?n-1:0,f=r?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-c)-1,p>>=-c,c+=o;c>0;a=256*a+e[t+d],d+=f,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=i;c>0;s=256*s+e[t+d],d+=f,c-=8);if(0===a)a=1-u;else{if(a===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,i),a-=u}return(p?-1:1)*s*Math.pow(2,a-i)},t.write=function(e,t,r,i,n,a){var s,o,l,u=8*a-n-1,c=(1<<u)-1,d=c>>1,f=5960464477539062e-23*(23===n),p=i?0:a-1,h=i?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(o=+!!isNaN(t),s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=c?(o=0,s=c):s+d>=1?(o=(t*l-1)*Math.pow(2,n),s+=d):(o=t*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;e[r+p]=255&o,p+=h,o/=256,n-=8);for(s=s<<n|o,u+=n;u>0;e[r+p]=255&s,p+=h,s/=256,u-=8);e[r+p-h]|=128*m}},23073:(e,t)=>{"use strict";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)},27891:(e,t)=>{"use strict";t.byteLength=function(e){var t=l(e),r=t[0],i=t[1];return(r+i)*3/4-i},t.toByteArray=function(e){var t,r,a=l(e),s=a[0],o=a[1],u=new n((s+o)*3/4-o),c=0,d=o>0?s-4:s;for(r=0;r<d;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===o&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===o&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,i=e.length,n=i%3,a=[],s=0,o=i-n;s<o;s+=16383)a.push(function(e,t,i){for(var n,a=[],s=t;s<i;s+=3)n=(e[s]<<16&0xff0000)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[n>>18&63]+r[n>>12&63]+r[n>>6&63]+r[63&n]);return a.join("")}(e,s,s+16383>o?o:s+16383));return 1===n?a.push(r[(t=e[i-1])>>2]+r[t<<4&63]+"=="):2===n&&a.push(r[(t=(e[i-2]<<8)+e[i-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),a.join("")};for(var r=[],i=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/",s=0,o=a.length;s<o;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var i=r===t?0:4-r%4;return[r,i]}i[45]=62,i[95]=63},30424:(e,t,r)=>{"use strict";r.d(t,{Wx:()=>u});var i=r(45105),n=Object.defineProperty,a=new Map,s=new WeakMap,o=0,l=void 0;function u(){var e;let{threshold:t,delay:r,trackVisibility:n,rootMargin:u,root:c,triggerOnce:d,skip:f,initialInView:p,fallbackInView:h,onChange:m}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[g,y]=i.useState(null),_=i.useRef(m),[v,b]=i.useState({inView:!!p,entry:void 0});_.current=m,i.useEffect(()=>{let e;if(!f&&g)return e=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l;if(void 0===window.IntersectionObserver&&void 0!==i){let n=e.getBoundingClientRect();return t(i,{isIntersecting:i,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:n,intersectionRect:n,rootBounds:n}),()=>{}}let{id:n,observer:u,elements:c}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var r;return"".concat(t,"_").concat("root"===t?(r=e.root)?(s.has(r)||(o+=1,s.set(r,o.toString())),s.get(r)):"0":e[t])}).toString(),r=a.get(t);if(!r){let i,n=new Map,s=new IntersectionObserver(t=>{t.forEach(t=>{var r;let a=t.isIntersecting&&i.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=a),null==(r=n.get(t.target))||r.forEach(e=>{e(a,t)})})},e);i=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:s,elements:n},a.set(t,r)}return r}(r),d=c.get(e)||[];return c.has(e)||c.set(e,d),d.push(t),u.observe(e),function(){d.splice(d.indexOf(t),1),0===d.length&&(c.delete(e),u.unobserve(e)),0===c.size&&(u.disconnect(),a.delete(n))}}(g,(t,r)=>{b({inView:t,entry:r}),_.current&&_.current(t,r),r.isIntersecting&&d&&e&&(e(),e=void 0)},{root:c,rootMargin:u,threshold:t,trackVisibility:n,delay:r},h),()=>{e&&e()}},[Array.isArray(t)?t.toString():t,g,c,u,d,f,n,h,r]);let x=null==(e=v.entry)?void 0:e.target,w=i.useRef(void 0);g||!x||d||f||w.current===x||(w.current=x,b({inView:!!p,entry:void 0}));let k=[y,v.inView,v.entry];return k.ref=k[0],k.inView=k[1],k.entry=k[2],k}i.Component},32247:()=>{},44185:(e,t,r)=>{"use strict";let i;r.d(t,{w1:()=>ic});var n,a,s,o,l,u,c=r(45105);r(12197);var d=r(23073),f=r(70371),p=r(94763).hp,h=/\/v\d+\//,m=/\.(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,g=/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]+)$/,y=["images","videos","files"];function _(e){if("string"!=typeof e)throw Error("Failed to parse URL - Invalid src: Is not a string");if(!h.test(e))throw Error("Failed to parse URL - Invalid src: Does not include version (Ex: /v1234/)");let[t,r]=e.split("?"),i=v(t),n=t;i&&(n=t.replace(RegExp(`${i}$`),""));let a=n.match(g),s=a?.groups?.transformations?.split("/").filter(e=>!!e),o={...a?.groups,format:i,seoSuffix:void 0,transformations:s||[],queryParams:{},version:a?.groups?.version?parseInt(a.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&&y.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 v(e){let t=e.match(m);if(null!==t)return t[0]}function b(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=>
1"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}(n||(n={})),(a||(a={})).mergeShapes=(e,t)=>({...e,...t});let x=n.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),w=e=>{switch(typeof e){case"undefined":return x.undefined;case"string":return x.string;case"number":return isNaN(e)?x.nan:x.number;case"boolean":return x.boolean;case"function":return x.function;case"bigint":return x.bigint;case"symbol":return x.symbol;case"object":if(Array.isArray(e))return x.array;if(null===e)return x.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return x.promise;if("undefined"!=typeof Map&&e instanceof Map)return x.map;if("undefined"!=typeof Set&&e instanceof Set)return x.set;if("undefined"!=typeof Date&&e instanceof Date)return x.date;return x.object;default:return x.unknown}}
1,k=n.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 O 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 n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(i);else if("invalid_return_type"===n.code)i(n.returnTypeError);else if("invalid_arguments"===n.code)i(n.argumentsError);else if(0===n.path.length)r._errors.push(t(n));else{let e=r,i=0;for(;i<n.path.length;){let r=n.path[i];i===n.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(n))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(this),r}static assert(e){if(!(e instanceof O))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,n.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()}}O.create=e=>new O(e);let S=(e,t)=>{let r;switch(e.code){case k.invalid_type:r=e.received===x.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case k.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,n.jsonStringifyReplacer)}`;break;case k.unrecognized_keys:r=`Unrecognized key(s) in object: ${n.joinValues(e.keys,", ")}`;break;case k.invalid_union:r="Invalid input";break;case k.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${n.joinValues(e.options)}`;break;case k.invalid_enum_value:r=`Invalid enum value. Expected ${n.joinValues(e.options)}, received '${e.received}'`;break;case k.invalid_arguments:r="Invalid function arguments";break;case k.invalid_return_type:r="Invalid function return type";break;case k.invalid_date:r="Invalid date";break;case k.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}"`:n.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case k.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 k.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 k.custom:r="Invalid input";break;case k.invalid_intersection_types:r="Intersection results could not be merged";break;case k.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case k.not_finite:r="Number must be finite";break;default:r=t.defaultError,n.assertNever(e)}return{message:r}},E=S;function A(){return E}let T=e=>{let{data:t,path:r,errorMaps:i,issueData:n}=e,a=[...r,...n.path||[]],s={...n,path:a};if(void 0!==n.message)return{...n,path:a,message:n.message};let o="";for(let e of i.filter(e=>!!e).slice().reverse())o=e(s,{data:t,defaultError:o}).message;return{...n,path:a,message:o}};function j(e,t){let r=A(),i=T({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===S?void 0:S].filter(e=>!!e)});e.common.issues.push(i)}class N{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 C;"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){let t=await e.key,i=await e.value;r.push({key:t,value:i})}return N.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let i of t){let{key:t,value:n}=i;if("aborted"===t.status||"aborted"===n.status)return C;"dirty"===t.status&&e.dirty(),"dirty"===n.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==n.value||i.alwaysSet)&&(r[t.value]=n.value)}return{status:e.value,value:r}}}let C=Object.freeze({status:"aborted"}),I=e=>({status:"dirty",value:e}),R=e=>
1({status:"valid",value:e}),$=e=>"aborted"===e.status,P=e=>"dirty"===e.status,Z=e=>"valid"===e.status,U=e=>"undefined"!=typeof Promise&&e instanceof Promise;function B(e,t,r,i){if("a"===r&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)}function L(e,t,r,i,n){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!n)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r}"function"==typeof SuppressedError&&SuppressedError,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 q{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 M=(e,t)=>{if(Z(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 O(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:n}=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:n}:{errorMap:(t,n)=>{var a,s;let{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:n.defaultError}:void 0===n.data?{message:null!=(a=null!=o?o:i)?a:n.defaultError}:"invalid_type"!==t.code?{message:n.defaultError}:{message:null!=(s=null!=o?o:r)?s:n.defaultError}},description:n}}class z{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 w(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:w(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new N,ctx:{common:e.parent.common,data:e.data,parsedType:w(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(U(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:w(e)},n=this._parseSync({data:e,path:i.path,parent:i});return M(i,n)}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:w(e)},i=this._parse({data:e,path:r.path,parent:r});return M(r,await (U(i)?i:Promise.resolve(i)))}refine(e,t){return this._refinement((r,i)=>{let n=e(r),a=()=>i.addIssue({code:k.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(r):t});return"undefined"!=typeof Promise&&n instanceof Promise?n.then(e=>!!e||(a(),!1)):!!n||(a(),!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 eR({schema:this,typeName:u.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return e$.create(this,this._def)}nullable(){return eP.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eg.create(this,this._def)}promise(){return eI.create(this,this._def)}or(e){return e_.create([this,e],this._def)}and(e){return ex.create(this,e,this._def)}transform(e){return new eR({...J(this._def),schema:this,typeName:u.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eZ({...J(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:u.ZodDefault})}brand(){return new eq({typeName:u.ZodBranded,type:this,...J(this._def)})}catch(e){return new eU({...J(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:u.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eM.create(this,e)}readonly(){return eJ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let D=/^c[^\s-]{8,}
1$/i,V=/^[0-9a-z]+$/,F=/^[0-9A-HJKMNP-TV-Z]{26}$/,W=/^[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,K=/^[a-z0-9_-]{21}$/i,Y=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,H=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,G=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Q=/^(([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})))$/,X=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ee="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",et=RegExp(`^${ee}$`);function er(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function ei(e){let t=`${ee}T${er(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)}class en extends z{_parse(e){var t,r;let a;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==x.string){let t=this._getOrReturnCtx(e);return j(t,{code:k.invalid_type,expected:x.string,received:t.parsedType}),C}let s=new N;for(let o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(j(a=this._getOrReturnCtx(e,a),{code:k.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),s.dirty());else if("max"===o.kind)e.data.length>o.value&&(j(a=this._getOrReturnCtx(e,a),{code:k.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),s.dirty());else if("length"===o.kind){let t=e.data.length>o.value,r=e.data.length<o.value;(t||r)&&(a=this._getOrReturnCtx(e,a),t?j(a,{code:k.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):r&&j(a,{code:k.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),s.dirty())}else if("email"===o.kind)H.test(e.data)||(j(a=this._getOrReturnCtx(e,a),{validation:"email",code:k.invalid_string,message:o.message}),s.dirty());else if("emoji"===o.kind)i||(i=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),i.test(e.data)||(j(a=this._getOrReturnCtx(e,a),{validation:"emoji",code:k.invalid_string,message:o.message}),s.dirty());else if("uuid"===o.kind)W.test(e.data)||(j(a=this._getOrReturnCtx(e,a),{validation:"uuid",code:k.invalid_string,message:o.message}),s.dirty());else if("nanoid"===o.kind)K.test(e.data)||(j(a=this._getOrReturnCtx(e,a),{validation:"nanoid",code:k.invalid_string,message:o.message}),s.dirty());else if("cuid"===o.kind)D.test(e.data)||(j(a=this._getOrReturnCtx(e,a),{validation:"cuid",code:k.invalid_string,message:o.message}),s.dirty());else if("cuid2"===o.kind)V.test(e.data)||(j(a=this._getOrReturnCtx(e,a),{validation:"cuid2",code:k.invalid_string,message:o.message}),s.dirty());else if("ulid"===o.kind)F.test(e.data)||(j(a=this._getOrReturnCtx(e,a),{validation:"ulid",code:k.invalid_string,message:o.message}),s.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(t){j(a=this._getOrReturnCtx(e,a),{validation:"url",code:k.invalid_string,message:o.message}),s.dirty()}else"regex"===o.kind?(o.regex.lastIndex=0,o.regex.test(e.data)||(j(a=this._getOrReturnCtx(e,a),{validation:"regex",code:k.invalid_string,message:o.message}),s.dirty())):"trim"===o.kind?e.data=e.data.trim():"includes"===o.kind?e.data.includes(o.value,o.position)||(j(a=this._getOrReturnCtx(e,a),{code:k.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),s.dirty()):"toLowerCase"===o.kind?e.data=e.data.toLowerCase():"toUpperCase"===o.kind?e.data=e.data.toUpperCase():"startsWith"===o.kind?e.data.startsWith(o.value)||(j(a=this._getOrReturnCtx(e,a),{code:k.invalid_string,validation:{startsWith:o.value},message:o.message}),s.dirty()):"endsWith"===o.kind?e.data.endsWith(o.value)||(j(a=this._getOrReturnCtx(e,a),{code:k.invalid_string,validation:{endsWith:o.value},message:o.message}),s.dirty()):"datetime"===o.kind?ei(o).test(e.data)||(j(a=this._getOrReturnCtx(e,a),{code:k.invalid_string,validation:"datetime",message:o.message}),s.dirty()):"date"===o.kind?et.test(e.data)||(j(a=this._getOrReturnCtx(e,a),{code:k.invalid_string,validation:"date",message:o.message}),s.dirty()):"time"===o.kind?RegExp(`^${er(o)}$`).test(e.data)||(j(a=this._getOrReturnCtx(e,a),{code:k.invalid_string,validation:"time",message:o.message}),s.dirty()):"duration"===o.kind?Y.test(e.data)||(j(a=this._getOrReturnCtx(e,a),{validation:"duration",code:k.invalid_string,message:o.message}),s.dirty()):"ip"===o.kind?(t=e.data,!(("v4"===(r=o.version)||!r)&&G.test(t)||("v6"===r||!r)&&Q.test(t))&&1&&(j(a=this._getOrReturnCtx(e,a),{validation:"ip",code:k.invalid_string,message:o.message}),s.dirty())):"base64"===o.kind?X.test(e.data)||(j(a=this._getOrReturnCtx(e,a),{validation:"base64",code:k.invalid_string,message:o.message}),s.dirty()):n.assertNever(o);return{status:s.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:k.invalid_string,...s.errToObj(r)})}_addCheck(e){return new en({...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)})}nanoid(e){return this._addCheck({kind:"nanoid",...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)})}base64(e){return this._addCheck({kind:"base64",...s.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...s.errToObj(e)})}datetime(e){var t,r;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!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,local:null!=(r=null==e?void 0:e.local)&&r,...s.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...s.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...s.errToObj(e)})}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 en({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new en({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new en({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}
1get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===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 isNANOID(){return!!this._def.checks.find(e=>"nanoid"===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 isBase64(){return!!this._def.checks.find(e=>"base64"===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}}en.create=e=>{var t;return new en({checks:[],typeName:u.ZodString,coerce:null!=(t=null==e?void 0:e.coerce)&&t,...J(e)})};class ea extends z{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)!==x.number){let t=this._getOrReturnCtx(e);return j(t,{code:k.invalid_type,expected:x.number,received:t.parsedType}),C}let r=new N;for(let i of this._def.checks)"int"===i.kind?n.isInteger(e.data)||(j(t=this._getOrReturnCtx(e,t),{code:k.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(j(t=this._getOrReturnCtx(e,t),{code:k.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)&&(j(t=this._getOrReturnCtx(e,t),{code:k.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,n=r>i?r:i;return parseInt(e.toFixed(n).replace(".",""))%parseInt(t.toFixed(n).replace(".",""))/Math.pow(10,n)}(e.data,i.value)&&(j(t=this._getOrReturnCtx(e,t),{code:k.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(j(t=this._getOrReturnCtx(e,t),{code:k.not_finite,message:i.message}),r.dirty()):n.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 ea({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.toString(i)}]})}_addCheck(e){return new ea({...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&&n.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)}}ea.create=e=>new ea({checks:[],typeName:u.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...J(e)});class es extends z{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)!==x.bigint){let t=this._getOrReturnCtx(e);return j(t,{code:k.invalid_type,expected:x.bigint,received:t.parsedType}),C}let r=new N;for(let i of this._def.checks)"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(j(t=this._getOrReturnCtx(e,t),{code:k.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)&&(j(t=this._getOrReturnCtx(e,t),{code:k.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(j(t=this._getOrReturnCtx(e,t),{code:k.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):n.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 es({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.toString(i)}]})}_addCheck(e){return new es({...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}}es.create=e=>{var t;return new es({checks:[],typeName:u.ZodBigInt,coerce:null!=(t=null==e?void 0:e.coerce)&&t,...J(e)})};class eo extends z{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==x.boolean){let t=this._getOrReturnCtx(e);return j(t,{code:k.invalid_type,expected:x.boolean,received:t.parsedType}),C}return R(e.data)}}eo.create=e=>new eo({typeName:u.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...J(e)});class el extends z{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==x.date){let t=this._getOrReturnCtx(e);return j(t,{code:k.invalid_type,expected:x.date,received:t.parsedType}),C}if(isNaN(e.data.getTime()))return j(this._getOrReturnCtx(e),{code:k.invalid_date}),C;let r=new N;for(let i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(j(t=this._getOrReturnCtx(e,t),{code:k.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(j(t=this._getOrReturnCtx(e,t),{code:k.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):n.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new el({...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)})}get 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}}el.create=e=>new el({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:u.ZodDate,...J(e)});class eu extends z{_parse(e){if(this._getType(e)!==x.symbol){let t=this._getOrReturnCtx(e);return j(t,{code:k.invalid_type,expected:x.symbol,received:t.parsedType}),C}return R(e.data)}}eu.create=e=>new eu({typeName:u.ZodSymbol,...J(e)});class ec extends z{_parse(e){if(this._getType(e)!==x.undefined){let t=this._getOrReturnCtx(e);return j(t,{code:k.invalid_type,expected:x.undefined,received:t.parsedType}),C}return R(e.data)}}ec.create=e=>new ec({typeName:u.ZodUndefined,...J(e)});class ed extends z{_parse(e){if(this._getType(e)!==x.null){let t=this._getOrReturnCtx(e);return j(t,{code:k.invalid_type,expected:x.null,received:t.parsedType}),C}return R(e.data)}}ed.create=e=>new ed({typeName:u.ZodNull,...J(e)});class ef extends z{constructor(){super(...arguments),this._any=!0}_parse(e){return R(e.data)}}ef.create=e=>new ef({typeName:u.ZodAny,...J(e)});class ep extends z{constructor(){super(...arguments),this._unknown=!0}_parse(e){return R(e.data)}}ep.create=e=>new ep({typeName:u.ZodUnknown,...J(e)});class eh extends z{_parse(e){let t=this._getOrReturnCtx(e);return j(t,{code:k.invalid_type,expected:x.never,received:t.parsedType}),C}}eh.create=e=>new eh({typeName:u.ZodNever,...J(e)});class em extends z{_parse(e){if(this._getType(e)!==x.undefined){let t=this._getOrReturnCtx(e);return j(t,{code:k.invalid_type,expected:x.void,received:t.parsedType}),C}return R(e.data)}}em.create=e=>new em({typeName:u.ZodVoid,...J(e)});class eg extends z{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),i=this._def;if(t.parsedType!==x.array)return j(t,{code:k.invalid_type,expected:x.array,received:t.parsedType}),C;if(null!==i.exactLength){let e=t.data.length>
1i.exactLength.value,n=t.data.length<i.exactLength.value;(e||n)&&(j(t,{code:e?k.too_big:k.too_small,minimum:n?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&&(j(t,{code:k.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&&(j(t,{code:k.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 q(t,e,t.path,r)))).then(e=>N.mergeArray(r,e));let n=[...t.data].map((e,r)=>i.type._parseSync(new q(t,e,t.path,r)));return N.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new eg({...this._def,minLength:{value:e,message:s.toString(t)}})}max(e,t){return new eg({...this._def,maxLength:{value:e,message:s.toString(t)}})}length(e,t){return new eg({...this._def,exactLength:{value:e,message:s.toString(t)}})}nonempty(e){return this.min(1,e)}}eg.create=(e,t)=>new eg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:u.ZodArray,...J(t)});class ey extends z{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=n.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==x.object){let t=this._getOrReturnCtx(e);return j(t,{code:k.invalid_type,expected:x.object,received:t.parsedType}),C}let{status:t,ctx:r}=this._processInputParams(e),{shape:i,keys:n}=this._getCached(),a=[];if(!(this._def.catchall instanceof eh&&"strip"===this._def.unknownKeys))for(let e in r.data)n.includes(e)||a.push(e);let s=[];for(let e of n){let t=i[e],n=r.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new q(r,n,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof eh){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)s.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)a.length>0&&(j(r,{code:k.unrecognized_keys,keys:a}),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 a){let i=r.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new q(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,i=await t.value;e.push({key:r,value:i,alwaysSet:t.alwaysSet})}return e}).then(e=>N.mergeObjectSync(t,e)):N.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return s.errToObj,new ey({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var i,n,a,o;let l=null!=(a=null==(n=(i=this._def).errorMap)?void 0:n.call(i,t,r).message)?a:r.defaultError;return"unrecognized_keys"===t.code?{message:null!=(o=s.errToObj(e).message)?o:l}:{message:l}}}:{}})}strip(){return new ey({...this._def,unknownKeys:"strip"})}passthrough(){return new ey({...this._def,unknownKeys:"passthrough"})}extend(e){return new ey({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ey({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:u.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ey({...this._def,catchall:e})}pick(e){let t={};return n.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])}),new ey({...this._def,shape:()=>t})}omit(e){let t={};return n.objectKeys(this.shape).forEach(r=>{e[r]||(t[r]=this.shape[r])}),new ey({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ey){let r={};for(let i in t.shape){let n=t.shape[i];r[i]=e$.create(e(n))}return new ey({...t._def,shape:()=>r})}if(t instanceof eg)return new eg({...t._def,type:e(t.element)});if(t instanceof e$)return e$.create(e(t.unwrap()));if(t instanceof eP)return eP.create(e(t.unwrap()));if(t instanceof ew)return ew.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};return n.objectKeys(this.shape).forEach(r=>{let i=this.shape[r];e&&!e[r]?t[r]=i:t[r]=i.optional()}),new ey({...this._def,shape:()=>t})}required(e){let t={};return n.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof e$;)e=e._def.innerType;t[r]=e}}),new ey({...this._def,shape:()=>t})}keyof(){return ej(n.objectKeys(this.shape))}}ey.create=(e,t)=>
1new ey({shape:()=>e,unknownKeys:"strip",catchall:eh.create(),typeName:u.ZodObject,...J(t)}),ey.strictCreate=(e,t)=>new ey({shape:()=>e,unknownKeys:"strict",catchall:eh.create(),typeName:u.ZodObject,...J(t)}),ey.lazycreate=(e,t)=>new ey({shape:e,unknownKeys:"strip",catchall:eh.create(),typeName:u.ZodObject,...J(t)});class e_ extends z{_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 O(e.ctx.common.issues));return j(t,{code:k.invalid_union,unionErrors:r}),C});{let e,i=[];for(let n of r){let r={...t,common:{...t.common,issues:[]},parent:null},a=n._parseSync({data:t.data,path:t.path,parent:r});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,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 n=i.map(e=>new O(e));return j(t,{code:k.invalid_union,unionErrors:n}),C}}get options(){return this._def.options}}e_.create=(e,t)=>new e_({options:e,typeName:u.ZodUnion,...J(t)});let ev=e=>{if(e instanceof eA)return ev(e.schema);if(e instanceof eR)return ev(e.innerType());if(e instanceof eT)return[e.value];if(e instanceof eN)return e.options;if(e instanceof eC)return n.objectValues(e.enum);else if(e instanceof eZ)return ev(e._def.innerType);else if(e instanceof ec)return[void 0];else if(e instanceof ed)return[null];else if(e instanceof e$)return[void 0,...ev(e.unwrap())];else if(e instanceof eP)return[null,...ev(e.unwrap())];else if(e instanceof eq)return ev(e.unwrap());else if(e instanceof eJ)return ev(e.unwrap());else if(e instanceof eU)return ev(e._def.innerType);else return[]};class eb extends z{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.object)return j(t,{code:k.invalid_type,expected:x.object,received:t.parsedType}),C;let r=this.discriminator,i=t.data[r],n=this.optionsMap.get(i);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(j(t,{code:k.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),C)}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=ev(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let n of t){if(i.has(n))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);i.set(n,r)}}return new eb({typeName:u.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...J(r)})}}class ex extends z{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),i=(e,i)=>{if($(e)||$(i))return C;let a=function e(t,r){let i=w(t),a=w(r);if(t===r)return{valid:!0,data:t};if(i===x.object&&a===x.object){let i=n.objectKeys(r),a=n.objectKeys(t).filter(e=>-1!==i.indexOf(e)),s={...t,...r};for(let i of a){let n=e(t[i],r[i]);if(!n.valid)return{valid:!1};s[i]=n.data}return{valid:!0,data:s}}if(i===x.array&&a===x.array){if(t.length!==r.length)return{valid:!1};let i=[];for(let n=0;n<t.length;n++){let a=e(t[n],r[n]);if(!a.valid)return{valid:!1};i.push(a.data)}return{valid:!0,data:i}}if(i===x.date&&a===x.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,i.value);return a.valid?((P(e)||P(i))&&t.dirty(),{status:t.value,value:a.data}):(j(r,{code:k.invalid_intersection_types}),C)};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}))}}ex.create=(e,t,r)=>new ex({left:e,right:t,typeName:u.ZodIntersection,...J(r)});class ew extends z{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==x.array)return j(r,{code:k.invalid_type,expected:x.array,received:r.parsedType}),C;if(r.data.length<this._def.items.length)return j(r,{code:k.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),C;!this._def.rest&&r.data.length>this._def.items.length&&(j(r,{code:k.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 q(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(i).then(e=>N.mergeArray(t,e)):N.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new ew({...this._def,rest:e})}}ew.create=(e,t)=>
1{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ew({items:e,typeName:u.ZodTuple,rest:null,...J(t)})};class ek extends z{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!==x.object)return j(r,{code:k.invalid_type,expected:x.object,received:r.parsedType}),C;let i=[],n=this._def.keyType,a=this._def.valueType;for(let e in r.data)i.push({key:n._parse(new q(r,e,r.path,e)),value:a._parse(new q(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?N.mergeObjectAsync(t,i):N.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,r){return new ek(t instanceof z?{keyType:e,valueType:t,typeName:u.ZodRecord,...J(r)}:{keyType:en.create(),valueType:e,typeName:u.ZodRecord,...J(t)})}}class eO extends z{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!==x.map)return j(r,{code:k.invalid_type,expected:x.map,received:r.parsedType}),C;let i=this._def.keyType,n=this._def.valueType,a=[...r.data.entries()].map(([e,t],a)=>({key:i._parse(new q(r,e,r.path,[a,"key"])),value:n._parse(new q(r,t,r.path,[a,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of a){let i=await r.key,n=await r.value;if("aborted"===i.status||"aborted"===n.status)return C;("dirty"===i.status||"dirty"===n.status)&&t.dirty(),e.set(i.value,n.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of a){let i=r.key,n=r.value;if("aborted"===i.status||"aborted"===n.status)return C;("dirty"===i.status||"dirty"===n.status)&&t.dirty(),e.set(i.value,n.value)}return{status:t.value,value:e}}}}eO.create=(e,t,r)=>new eO({valueType:t,keyType:e,typeName:u.ZodMap,...J(r)});class eS extends z{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==x.set)return j(r,{code:k.invalid_type,expected:x.set,received:r.parsedType}),C;let i=this._def;null!==i.minSize&&r.data.size<i.minSize.value&&(j(r,{code:k.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&&(j(r,{code:k.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());let n=this._def.valueType;function a(e){let r=new Set;for(let i of e){if("aborted"===i.status)return C;"dirty"===i.status&&t.dirty(),r.add(i.value)}return{status:t.value,value:r}}let s=[...r.data.values()].map((e,t)=>n._parse(new q(r,e,r.path,t)));return r.common.async?Promise.all(s).then(e=>a(e)):a(s)}min(e,t){return new eS({...this._def,minSize:{value:e,message:s.toString(t)}})}max(e,t){return new eS({...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)}}eS.create=(e,t)=>new eS({valueType:e,minSize:null,maxSize:null,typeName:u.ZodSet,...J(t)});class eE extends z{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.function)return j(t,{code:k.invalid_type,expected:x.function,received:t.parsedType}),C;function r(e,r){return T({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,A(),S].filter(e=>!!e),issueData:{code:k.invalid_arguments,argumentsError:r}})}function i(e,r){return T({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,A(),S].filter(e=>!!e),issueData:{code:k.invalid_return_type,returnTypeError:r}})}let n={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof eI){let e=this;return R(async function(...t){let s=new O([]),o=await e._def.args.parseAsync(t,n).catch(e=>{throw s.addIssue(r(t,e)),s}),l=await Reflect.apply(a,this,o);return await e._def.returns._def.type.parseAsync(l,n).catch(e=>{throw s.addIssue(i(l,e)),s})})}{let e=this;return R(function(...t){let s=e._def.args.safeParse(t,n);if(!s.success)throw new O([r(t,s.error)]);let o=Reflect.apply(a,this,s.data),l=e._def.returns.safeParse(o,n);if(!l.success)throw new O([i(o,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eE({...this._def,args:ew.create(e).rest(ep.create())})}returns(e){return new eE({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new eE({args:e||ew.create([]).rest(ep.create()),returns:t||ep.create(),typeName:u.ZodFunction,...J(r)})}}class eA extends z{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})}}eA.create=(e,t)=>
1new eA({getter:e,typeName:u.ZodLazy,...J(t)});class eT extends z{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return j(t,{received:t.data,code:k.invalid_literal,expected:this._def.value}),C}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ej(e,t){return new eN({values:e,typeName:u.ZodEnum,...J(t)})}eT.create=(e,t)=>new eT({value:e,typeName:u.ZodLiteral,...J(t)});class eN extends z{constructor(){super(...arguments),o.set(this,void 0)}_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return j(t,{expected:n.joinValues(r),received:t.parsedType,code:k.invalid_type}),C}if(B(this,o,"f")||L(this,o,new Set(this._def.values),"f"),!B(this,o,"f").has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return j(t,{received:t.data,code:k.invalid_enum_value,options:r}),C}return R(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,t=this._def){return eN.create(e,{...this._def,...t})}exclude(e,t=this._def){return eN.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}o=new WeakMap,eN.create=ej;class eC extends z{constructor(){super(...arguments),l.set(this,void 0)}_parse(e){let t=n.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==x.string&&r.parsedType!==x.number){let e=n.objectValues(t);return j(r,{expected:n.joinValues(e),received:r.parsedType,code:k.invalid_type}),C}if(B(this,l,"f")||L(this,l,new Set(n.getValidEnumValues(this._def.values)),"f"),!B(this,l,"f").has(e.data)){let e=n.objectValues(t);return j(r,{received:r.data,code:k.invalid_enum_value,options:e}),C}return R(e.data)}get enum(){return this._def.values}}l=new WeakMap,eC.create=(e,t)=>new eC({values:e,typeName:u.ZodNativeEnum,...J(t)});class eI extends z{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==x.promise&&!1===t.common.async?(j(t,{code:k.invalid_type,expected:x.promise,received:t.parsedType}),C):R((t.parsedType===x.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eI.create=(e,t)=>new eI({type:e,typeName:u.ZodPromise,...J(t)});class eR extends z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===u.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),i=this._def.effect||null,a={addIssue:e=>{j(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),"preprocess"===i.type){let e=i.transform(r.data,a);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return C;let i=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===i.status?C:"dirty"===i.status||"dirty"===t.value?I(i.value):i});{if("aborted"===t.value)return C;let i=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===i.status?C:"dirty"===i.status||"dirty"===t.value?I(i.value):i}}if("refinement"===i.type){let e=e=>{let t=i.refinement(e,a);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?C:("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?C:("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=>Z(e)?Promise.resolve(i.transform(e.value,a)).then(e=>({status:t.value,value:e})):e);else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Z(e))return e;let n=i.transform(e.value,a);if(n instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:n}}n.assertNever(i)}}eR.create=(e,t,r)=>new eR({schema:e,typeName:u.ZodEffects,effect:t,...J(r)}),eR.createWithPreprocess=(e,t,r)=>new eR({schema:t,effect:{type:"preprocess",transform:e},typeName:u.ZodEffects,...J(r)});class e$ extends z{_parse(e){return this._getType(e)===x.undefined?R(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}e$.create=(e,t)=>
1new e$({innerType:e,typeName:u.ZodOptional,...J(t)});class eP extends z{_parse(e){return this._getType(e)===x.null?R(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eP.create=(e,t)=>new eP({innerType:e,typeName:u.ZodNullable,...J(t)});class eZ extends z{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===x.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eZ.create=(e,t)=>new eZ({innerType:e,typeName:u.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...J(t)});class eU extends z{_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 U(i)?i.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new O(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new O(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eU.create=(e,t)=>new eU({innerType:e,typeName:u.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...J(t)});class eB extends z{_parse(e){if(this._getType(e)!==x.nan){let t=this._getOrReturnCtx(e);return j(t,{code:k.invalid_type,expected:x.nan,received:t.parsedType}),C}return{status:"valid",value:e.data}}}eB.create=e=>new eB({typeName:u.ZodNaN,...J(e)});let eL=Symbol("zod_brand");class eq extends z{_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 eM extends z{_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?C:"dirty"===e.status?(t.dirty(),I(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?C:"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 eM({in:e,out:t,typeName:u.ZodPipeline})}}class eJ extends z{_parse(e){let t=this._def.innerType._parse(e),r=e=>(Z(e)&&(e.value=Object.freeze(e.value)),e);return U(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}function ez(e,t={},r){return e?ef.create().superRefine((i,n)=>{var a,s;if(!e(i)){let e="function"==typeof t?t(i):"string"==typeof t?{message:t}:t,o=null==(s=null!=(a=e.fatal)?a:r)||s,l="string"==typeof e?{message:e}:e;n.addIssue({code:"custom",...l,fatal:o})}}):ef.create()}eJ.create=(e,t)=>new eJ({innerType:e,typeName:u.ZodReadonly,...J(t)});let eD={object:ey.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"}(u||(u={}));let eV=en.create,eF=ea.create,eW=eB.create,eK=es.create,eY=eo.create,eH=el.create,eG=eu.create,eQ=ec.create,eX=ed.create,e0=ef.create,e1=ep.create,e2=eh.create,e6=em.create,e5=eg.create,e8=ey.create,e3=ey.strictCreate,e4=e_.create,e9=eb.create,e7=ex.create,te=ew.create,tt=ek.create,tr=eO.create,ti=eS.create,tn=eE.create,ta=eA.create,ts=eT.create,to=eN.create,tl=eC.create,tu=eI.create,tc=eR.create,td=e$.create,tf=eP.create,tp=eR.createWithPreprocess,th=eM.create;var tm=Object.freeze({__proto__:null,defaultErrorMap:S,setErrorMap:function(e){E=e},getErrorMap:A,makeIssue:T,EMPTY_PATH:[],addIssueToContext:j,ParseStatus:N,INVALID:C,DIRTY:I,OK:R,isAborted:$,isDirty:P,isValid:Z,isAsync:U,get util(){return n},get objectUtil(){return a},ZodParsedType:x,getParsedType:w,ZodType:z,datetimeRegex:ei,ZodString:en,ZodNumber:ea,ZodBigInt:es,ZodBoolean:eo,ZodDate:el,ZodSymbol:eu,ZodUndefined:ec,ZodNull:ed,ZodAny:ef,ZodUnknown:ep,ZodNever:eh,ZodVoid:em,ZodArray:eg,ZodObject:ey,ZodUnion:e_,ZodDiscriminatedUnion:eb,ZodIntersection:ex,ZodTuple:ew,ZodRecord:ek,ZodMap:eO,ZodSet:eS,ZodFunction:eE,ZodLazy:eA,ZodLiteral:eT,ZodEnum:eN,ZodNativeEnum:eC,ZodPromise:eI,ZodEffects:eR,ZodTransformer:eR,ZodOptional:e$,ZodNullable:eP,ZodDefault:eZ,ZodCatch:eU,ZodNaN:eB,BRAND:eL,ZodBranded:eq,ZodPipeline:eM,ZodReadonly:eJ,custom:ez,Schema:z,ZodSchema:z,late:eD,get ZodFirstPartyTypeKind(){return u},coerce:{string:e=>en.create({...e,coerce:!0}),number:e=>
1ea.create({...e,coerce:!0}),boolean:e=>eo.create({...e,coerce:!0}),bigint:e=>es.create({...e,coerce:!0}),date:e=>el.create({...e,coerce:!0})},any:e0,array:e5,bigint:eK,boolean:eY,date:eH,discriminatedUnion:e9,effect:tc,enum:to,function:tn,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>ez(t=>t instanceof e,t),intersection:e7,lazy:ta,literal:ts,map:tr,nan:eW,nativeEnum:tl,never:e2,null:eX,nullable:tf,number:eF,object:e8,oboolean:()=>eY().optional(),onumber:()=>eF().optional(),optional:td,ostring:()=>eV().optional(),pipeline:th,preprocess:tp,promise:tu,record:tt,set:ti,strictObject:e3,string:eV,symbol:eG,transformer:tc,tuple:te,undefined:eQ,union:e4,unknown:e1,void:e6,NEVER:C,ZodIssueCode:k,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:O});class tg{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 ty extends Error{constructor(e="Unsupported"){super(e)}}function t_(){return this._qualifierModel||{error:new ty(`unsupported qualifier ${this.constructor.name}`)}}class tv{constructor(){this._qualifierModel={}}toJson(){return t_.apply(this)}}class tb extends tv{constructor(e,t){super(),this.delimiter="_",this.key=e,t instanceof tg?this.qualifierValue=t:(this.qualifierValue=new tg,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 tx extends tb{constructor(e,t){super("fl",t?new tg([e,`${t}`]).setDelimiter(":"):e),this.flagValue=t}toString(){return super.toString().replace(/\./g,"%2E")}getFlagValue(){return this.flagValue}}function tw(){var e,t,r;let i=this._actionModel&&Object.keys(this._actionModel).length,n=null==(r=null==(t=null==(e=this._actionModel)?void 0:e.source)?void 0:t.transformation)?void 0:r.error;return n&&n instanceof Error?{error:n}:i?this._actionModel:{error:new ty(`unsupported action ${this.constructor.name}`)}}class tk{constructor(){this._actionModel={}}toJson(){return tw.apply(this)}}class tO extends tk{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 tx(r)):this.qualifiers.set(t,new tb(t,r))}else this.qualifiers.set(e.key,e);return this}addFlag(e){return"string"==typeof e?this.flags.push(new tx(e)):e instanceof tx&&this.flags.push(e),this}addValueToQualifier(e,t){return this.qualifiers.get(e).addValue(t),this}}class tS extends tO{constructor(e){super(),this._actionModel={},this.addQualifier(new tb("b",new tg(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 tE{constructor(e){this.raw=e}toString(){return this.raw}toJson(){return{error:new ty(`unsupported action ${this.constructor.name}`)}}}class tA extends tg{constructor(e){super(e),this.val=e}getValue(){return this.val}}function tT(e){let t={};return Object.keys(e).forEach(r=>{t[e[r]]=r}),t}tT({444:"CHROMA_444",420:"CHROMA_420"}),tT({noCmyk:"no_cmyk",keepCmyk:"keep_cmyk",tinySrgb:"tinysrgb",srgbTrueColor:"srgb:truecolor"}),tT({limitFit:"limit",limitFill:"lfill",minimumFit:"mfit",thumbnail:"thumb",limitPad:"lpad",minimumPad:"mpad",autoPad:"auto_pad"});let tj=tT({colorSpace:"cs",dpr:"dpr",density:"dn",defaultImage:"d",format:"f",quality:"q"});tT({redEye:"redeye",advancedRedEye:"adv_redeye",oilPaint:"oil_paint",unsharpMask:"unsharp_mask",makeTransparent:"make_transparent",generativeRestore:"gen_restore",upscale:"upscale"}),tT({autoBest:"auto:best",autoEco:"auto:eco",autoGood:"auto:good",autoLow:"auto:low",jpegminiHigh:"jpegmini:1",jpegminiMedium:"jpegmini:2",jpegminiBest:"jpegmini:0"}),tT({fullHd:"full_hd",fullHdWifi:"full_hd_wifi",fullHdLean:"full_hd_lean",hdLean:"hd_lean"});
1class tN extends tO{constructor(e,t,r){let i;super(),this._actionModel={},i=t instanceof tA?t.getValue():t,this._actionModel.actionType=tj[e],this._actionModel[r]=i,this.addQualifier(new tb(e,t))}}class tC extends tx{constructor(e){super("progressive",e)}}class tI extends tN{constructor(e,t){super(e,t,"formatType")}lossy(){return this._actionModel.lossy=!0,this.addFlag(new tx("lossy")),this}progressive(e){return e instanceof tC?(this._actionModel.progressive={mode:e.getFlagValue()},this.addFlag(e)):(this._actionModel.progressive={mode:e},this.addFlag(new tx("progressive",e))),this}preserveTransparency(){return this._actionModel.preserveTransparency=!0,this.addFlag(new tx("preserve_transparency")),this}static fromJson(e){let t,{formatType:r,lossy:i,progressive:n,preserveTransparency:a}=e;return t=r?new this("f",r):new this("f"),n&&(n.mode?t.progressive(n.mode):t.progressive()),i&&t.lossy(),a&&t.preserveTransparency(),t}}class tR{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 tE(e);else t=e;return this.actions.push(t),this}addTransformation(e){return e instanceof tR?this.actions=this.actions.concat(e.actions):this.actions.push(new tE(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 tI("q",e)),this}format(e){return this.addAction(new tI("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 tS(e))}psdTools(e){return this.addAction(e)}extract(e){return this.addAction(e)}addFlag(e){let t=new tO,r=e;return"string"==typeof e&&(r=new tx(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 t$ extends tR{}class tP{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 tZ=tP,tU=["cname","secureDistribution","privateCdn","signUrl","longUrlSignature","shorten","useRootPath","secure","forceVersion","analytics","queryParams"];class tB extends tZ{constructor(e){super(),Object.assign(this,{secure:!0},this.filterOutNonSupportedKeys(e,tU))}extend(e){return new tB(Object.assign({},this,this.filterOutNonSupportedKeys(e,tU)))}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 tL(e,t,r){let i=0|t,n=String(void 0!==r?r:" ");return e.length>i?String(e):((i-=e.length)>n.length&&(n+=function(e,t){let r=t,i="";for(;r>0;)i+=e,r--;return i}(n,i/n.length)),n.slice(0,i)+String(e))}let tq={},tM=0;function tJ(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 tL(e,2,"0")}).join(".")})(e).split(".").join("")).toString(2);if((i=tL(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+=tq[e]}),t}"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(e=>{let t=tM.toString(2);tq[t=tL(t,6,"0")]=e,tM++});var tz=r(1306);function tD(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=tJ(t.sdkSemver),i=tJ(e),n=t.feature,a=t.sdkCode,s=t.product;return`B${s}${a}${r}${i}${n}`}catch(e){return"E"}}let tV={"image/upload":"images","image/private":"private_images","image/authenticated":"authenticated_images","raw/upload":"files","video/upload":"videos"};class tF{constructor(e,t={},r){this.setPublicID(e),this.setCloudConfig(t),this.setURLConfig(r)}setURLConfig(e){return this.urlConfig=new tB(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",n=!!this.suffix,a=`${r}/${i}`,s=tV[`${r}/${i}`],o=this.urlConfig.useRootPath,l=this.urlConfig.shorten;if(o)if("image/upload"===a)return"";else throw Error(`useRootPath can only be used with assetType: 'image' and deliveryType: 'upload'. Provided: ${a} instead`);if(l&&"image/upload"===a)return"iu";if(n)if(s)return s;else throw Error(`URL Suffix only supported for ${Object.keys(tV).join(", ")}, Provided: ${a} instead`);return a}getSignature(){return this.signature?`s--${this.signature}--`:""}createCloudinaryURL(e,t){var r,i,n;
1if(!this.publicID)return"";this.validateAssetForURLCreation();let a=function(e,t){let r=t.secure,i=t.privateCdn,n=t.cname,a=t.secureDistribution;return r||n?r&&!a&&i?`https://${e}-res.cloudinary.com`:r&&!a?`https://res.cloudinary.com/${e}`:r&&a&&i?`https://${a}`:r&&a?`https://${a}/${e}`:!r&&n?`http://${n}/${e}`:"ERROR":`http://res.cloudinary.com/${e}`}(this.cloudName,this.urlConfig),s=e?e.toString():"",o=(r=this.publicID,i=this.version,n=this.urlConfig.forceVersion,i?`v${i}`:r.match(/^v[0-9]+/)||r.match(/^https?:\//)||0>r.indexOf("/")?"":!1!==n?"v1":""),l=this.publicID;if("string"==typeof e)return[a,this.getResourceType(),this.getSignature(),s,o,l.replace(/,/g,"%2C"),this.suffix].filter(e=>e).join("/");{let e=[encodeURI(a),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",tD(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=${tD(t)}`);return i?`${e}?${i}`:e}}}
1class tW extends tF{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 tI("q",e)),this}format(e){return this.addAction(new tI("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 tK extends tW{constructor(e,t,r){super(e,t,r,new t$)}}class tY extends tR{}class tH extends tW{constructor(e,t,r){super(e,t,r,new tY),this.assetType="video"}transcode(e){return this.transformation.transcode(e),this}videoEdit(e){return this.transformation.videoEdit(e),this}}class tG{constructor(e){e&&(this.cloudinaryConfig=e)}image(e){return new tK(e,this.cloudinaryConfig.cloud,this.cloudinaryConfig.url)}video(e){return new tH(e,this.cloudinaryConfig.cloud,this.cloudinaryConfig.url)}setConfig(e){return this.cloudinaryConfig=e,this}getConfig(){return this.cloudinaryConfig}extendConfig(){}}var tQ=r(1306),tX=Object.defineProperty,t0={};((e,t)=>{for(var r in t)tX(e,r,{get:t[r],enumerable:!0})})(t0,{angle:()=>t5,aspectRatio:()=>t3,aspectRatioModesEnum:()=>t8,crop:()=>t4,cropModesEnum:()=>t1,extractMode:()=>t9,extractModesEnum:()=>t2,flags:()=>t7,flagsEnum:()=>t6,format:()=>re,gravity:()=>rt,height:()=>rr,multiple:()=>ri,prompt:()=>rn,width:()=>ra,x:()=>rs,y:()=>ro,zoom:()=>rl});var t1=tm.enum(["auto","crop","fill","fill_pad","fit","imagga_crop","imagga_scale","lfill","limit","lpad","mfit","mpad","pad","scale","thumb"]),t2=tm.enum(["content","mask"]),t6=tm.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"]),t5={qualifier:"a",schema:tm.union([tm.string(),tm.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"}))},t8=tm.enum(["vflip","hflip","ignore","auto_right","auto_left"]),t3={qualifier:"ar",schema:tm.union([tm.number(),t8,tm.intersection(tm.string(),tm.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"}))},t4={qualifier:"c",schema:t1.describe(JSON.stringify({text:"Mode to use when cropping an asset.",url:"https://cloudinary.com/documentation/transformation_reference#c_crop_resize"}))}
1,t9={schema:t2.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"}))},t7={qualifier:"fl",schema:tm.union([t6,tm.array(t6)]).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"}))},re={qualifier:"f",schema:tm.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"}))},rt={qualifier:"g",schema:tm.union([tm.enum(["auto","auto_content_aware","center","custom","east","face","face_center","multi_face","north","north_east","north_west","south","south_east","south_west","west"]),tm.intersection(tm.string(),tm.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"}))},rr={qualifier:"h",schema:tm.union([tm.number(),tm.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"}))},ri={schema:tm.boolean().describe(JSON.stringify({text:"Should generative AI features detect multiple instances."}))},rn={schema:tm.string().describe(JSON.stringify({text:"Natural language descriptions used for generative AI capabilities."}))},ra={qualifier:"w",schema:tm.union([tm.number(),tm.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"}))},rs={qualifier:"x",schema:tm.union([tm.string(),tm.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"}))},ro={qualifier:"y",schema:tm.union([tm.string(),tm.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"}))},rl={schema:tm.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"}))},ru=[{test:function(e){return"string"==typeof e&&!!e.startsWith("#")},convert:function(e){return`rgb:${e.replace("#","")}`}}],rc={aspectRatio:t3,crop:t4,gravity:rt,height:rr,width:ra},rd={angle:t5,gravity:rt,x:rs,y:ro},rf={alignment:{qualifier:!1,order:6},antialias:{qualifier:"antialias"},border:{qualifier:"bo",location:"primary"},color:{qualifier:"co",location:"primary",converters:ru},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}},rp={angle:t5,art:{prefix:"e",qualifier:"art",schema:tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.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:ru}
1,colorize:{prefix:"e",qualifier:"colorize",schema:tm.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:tm.union([tm.string(),tm.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:tm.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:tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.boolean(),tm.number(),tm.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:tm.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:tm.union([tm.string(),tm.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:tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.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:tm.union([tm.string(),tm.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:tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.boolean()]).describe(JSON.stringify({text:"Applies a sharpening filter.",url:"https://cloudinary.com/documentation/transformation_reference#e_sharpen"}))},shear:{prefix:"e",qualifier:"shear",schema:tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.boolean()]).describe(JSON.stringify({text:"Vectorizes an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_vectorize"}))},vibrance:{prefix:"e",qualifier:"vibrance",schema:tm.union([tm.string(),tm.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:tm.union([tm.string(),tm.boolean()]).describe(JSON.stringify({text:"Applies a vignette effect to an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_vignette"}))}};function rh({prefix:e,qualifier:t,value:r,converters:i}){let n="";e&&(n=`${e}_`);let a=r;if(i?.forEach(({test:e,convert:t})=>{e(a)&&(a=t(a))}),!0===a||"true"===a)return`${n}${t}`;if("string"==typeof a||"number"==typeof a)if(e)return`${n}${t}:${a}`;else return`${t}_${a}`}function rm(e){return`(${e.join(";")})`}function rg(e){return"string"!=typeof e?e:parseInt(e)}var ry=["auto","crop","fill","lfill","fill_pad","thumb"],r_=["auto","crop","fill","lfill","fill_pad","thumb"],rv=["crop","thumb"],rb="limit",rx=tm.object({aspectRatio:t3.schema.optional(),type:t4.schema,gravity:rt.schema.optional(),height:rr.schema.optional(),width:ra.schema.optional(),x:rs.schema.optional(),y:ro.schema.optional(),zoom:rl.schema.optional(),source:tm.boolean().optional()}),rw={aspectRatio:t3.schema.optional(),crop:tm.union([t4.schema,rx,tm.array(rx)]).default(rb).optional(),gravity:rt.schema.optional(),zoom:rl.schema.optional()},rk={angle:rp.angle.schema.optional(),art:rp.art.schema.optional(),autoBrightness:rp.autoBrightness.schema.optional(),autoColor:rp.autoColor.schema.optional(),autoContrast:rp.autoContrast.schema.optional(),assistColorblind:rp.assistColorblind.schema.optional(),background:rp.background.schema.optional(),blackwhite:rp.blackwhite.schema.optional(),blur:rp.blur.schema.optional(),blurFaces:rp.blurFaces.schema.optional(),blurRegion:rp.blurRegion.schema.optional(),border:rp.border.schema.optional(),brightness:rp.brightness.schema.optional(),brightnessHSB:rp.brightnessHSB.schema.optional(),cartoonify:rp.cartoonify.schema.optional(),color:rp.color.schema.optional(),colorize:rp.colorize.schema.optional(),contrast:rp.contrast.schema.optional(),distort:rp.distort.schema.optional(),fillLight:rp.fillLight.schema.optional(),gamma:rp.gamma.schema.optional(),gradientFade:rp.gradientFade.schema.optional(),grayscale:rp.grayscale.schema.optional(),improve:rp.improve.schema.optional(),loop:rp.loop.schema.optional(),multiply:rp.multiply.schema.optional(),negate:rp.negate.schema.optional(),oilPaint:rp.oilPaint.schema.optional(),opacity:rp.opacity.schema.optional(),outline:rp.outline.schema.optional(),pixelate:rp.pixelate.schema.optional(),pixelateFaces:rp.pixelateFaces.schema.optional(),pixelateRegion:rp.pixelateRegion.schema.optional(),radius:rp.radius.schema.optional(),redeye:rp.redeye.schema.optional(),replaceColor:rp.replaceColor.schema.optional(),saturation:rp.saturation.schema.optional(),screen:rp.screen.schema.optional(),sepia:rp.sepia.schema.optional(),shadow:rp.shadow.schema.optional(),sharpen:rp.sharpen.schema.optional(),shear:rp.shear.schema.optional(),simulateColorblind:rp.simulateColorblind.schema.optional(),tint:rp.tint.schema.optional(),trim:rp.trim.schema.optional(),unsharpMask:rp.unsharpMask.schema.optional(),vectorize:rp.vectorize.schema.optional(),vibrance:rp.vibrance.schema.optional(),vignette:rp.vignette.schema.optional()},rO={effects:tm.array(tm.object(rk)).describe(JSON.stringify({text:"Array of objects specifying transformations to be applied to asset."})).optional(),...rk},{flagsEnum:rS}=t0,rE={flags:t7.schema.optional()},rA=tm.string(),rT={namedTransformations:tm.union([rA,tm.array(rA)]).describe(JSON.stringify({text:"Named transformations to apply to asset.",url:"https://cloudinary.com/documentation/image_transformations#named_transformations"})).optional(),transformations:tm.union([rA,tm.array(rA)]).describe(JSON.stringify({text:"Deprecated: use namedTransformations instead",url:"https://cloudinary.com/documentation/image_transformations#named_transformations"})).optional()},rj=tm.object({alignment:tm.string().optional(),antialias:tm.string().optional(),border:tm.string().optional(),color:tm.string().optional(),fontFamily:tm.string().optional(),fontSize:tm.number().optional(),fontStyle:tm.union([tm.string(),tm.number()]).optional(),fontWeight:tm.string().optional(),hinting:tm.union([tm.string(),tm.number()]).optional(),letterSpacing:tm.union([tm.string(),tm.number()]).optional(),lineSpacing:tm.union([tm.string(),tm.number()]).optional(),stroke:tm.string().optional(),text:tm.string()}),rN=tm.object({angle:t5.schema.optional(),gravity:rt.schema.optional(),x:rs.schema.optional(),y:ro.schema.optional()}),rC=tm.object({appliedEffects:tm.array(tm.object({})).optional(),appliedFlags:t7.schema.optional(),effects:tm.array(tm.object({})).optional(),crop:t4.schema.optional(),flags:t7.schema.optional(),height:rr.schema.optional(),position:rN.optional(),publicId:tm.string().optional(),text:tm.union([tm.string(),rj]).optional(),url:tm.string().optional(),width:ra.schema.optional()}),rI={color:"black",fontFamily:"Arial",fontSize:200,fontWeight:"bold"},rR={overlay:rC.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:tm.array(rC).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:tm.string().describe(JSON.stringify({text:"Text to be overlaid on asset.",url:"https://cloudinary.com/documentation/image_transformations#transformation_url_structure"})).optional()},r$={preserveTransformations:tm.boolean().describe(JSON.stringify({text:"Preserves transformations from a Cloudinary U
1RL when using using a Cloudinary URL as the asset source (src)."})).optional()},rP=tm.string(),rZ={rawTransformations:tm.union([rP,tm.array(rP)]).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()},rU={removeBackground:tm.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()},rB={sanitize:tm.boolean().describe(JSON.stringify({text:"Runs a sanitizer on SVG images.",url:"https://cloudinary.com/documentation/transformation_reference#fl_sanitize"})).optional()},rL={seoSuffix:tm.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()},rq=tm.object({angle:t5.schema.optional(),gravity:rt.schema.optional(),x:rs.schema.optional(),y:ro.schema.optional()}),rM=tm.object({appliedEffects:tm.array(tm.object({})).optional(),appliedFlags:t7.schema.optional(),effects:tm.array(tm.object({})).optional(),crop:t4.schema.optional(),flags:t7.schema.optional(),height:rr.schema.optional(),position:rq.optional(),publicId:tm.string().optional(),type:tm.string().optional(),url:tm.string().optional(),width:ra.schema.optional()}),rJ={underlay:tm.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:tm.array(rM).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:tm.union([tm.number(),tm.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()},rD=tm.object({assetType:tm.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:tm.string().default("upload").describe(JSON.stringify({text:"Delivery method of the asset.",url:"https://cloudinary.com/documentation/image_transformations#delivery_types"})).optional(),dpr:tm.union([tm.string(),tm.number()]).describe(JSON.stringify({text:"Delivery method of the asset.",url:"https://cloudinary.com/documentation/image_transformations#delivery_types"})).optional(),format:tm.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:tm.union([tm.string(),tm.number()]).describe(JSON.stringify({text:"Height of the given asset."})).optional(),quality:tm.union([tm.string(),tm.number(),tm.string()]).default("auto").describe(JSON.stringify({text:"Quality of the delivered asset",url:"https://cloudinary.com/documentation/transformation_reference#q_quality"})).optional(),src:tm.string().describe(JSON.stringify({text:"Cloudinary Public ID or versioned Cloudinary URL (/v1234/)"})),strictTransformations:tm.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:tm.union([tm.string(),tm.number()]).describe(JSON.stringify({text:"Width of the given asset."})).optional(),...rw,...rO,...rE,...rT,...rR,...r$,...rZ,...rU,...rB,...rL,...rJ,...rz}),rV={defaultImage:tm.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()},rF={enhance:tm.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()},rW={extract:tm.union([rn.schema.optional(),tm.array(rn.schema).optional(),tm.object({invert:tm.boolean().default(!1).optional(),mode:t9.schema.optional(),multiple:ri.schema.default(!1).optional(),prompt:tm.union([rn.schema,tm.array(rn.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 rK(e){return"string"==typeof e?e:Array.isArray(e)?`(${e.filter(e=>"string"==typeof e).join(";")})`:void 0}var rY={fillBackground:tm.union([tm.boolean(),tm.object({crop:t4.schema.optional(),gravity:rt.schema.optional(),prompt:tm.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()},rH=tm.union([tm.string(),tm.array(tm.string())]),rG=tm.object({prompt:rH.optional(),to:tm.string().optional(),multiple:tm.boolean().optional()}),rQ={recolor:tm.union([rH,rG]).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()},rX=tm.union([tm.string(),tm.array(tm.string())]),r0=tm.object({prompt:rX.optional(),region:tm.union([tm.array(tm.number()),tm.array(tm.array(tm.number()))]).optional(),multiple:tm.boolean().optional(),removeShadow:tm.boolean().optional()}),r1={remove:tm.union([rX,r0]).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()},r2={replaceBackground:tm.union([tm.boolean(),tm.string(),tm.object({seed:tm.number().optional(),prompt:tm.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()},r6={replace:tm.union([tm.array(tm.string()),tm.array(tm.boolean()),tm.object({to:tm.string(),from:tm.string(),preserveGeometry:tm.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()},r5={restore:tm.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()},r8={zoompan:tm.union([tm.string(),tm.boolean(),tm.object({loop:rp.loop.schema.optional(),options:tm.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()},r3=rD.merge(tm.object({...rV,...rF,...rW,...rY,...rQ,...r1,...r6,...r2,...r5,...r8})),r4={streamingProfile:tm.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()},r9=rD.merge(tm.object({...r4})),r7=tm.any(),ie=tm.any(),it=[{props:rF,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{enhance:i=!1}=r;return i&&t.effect("e_enhance"),{}}},{props:rW,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{extract:i}=r;if(!i||void 0===i)return{};let n=[];if("string"==typeof i)n.push(`prompt_${i}`);else if(Array.isArray(i))n.push(`prompt_${rK(i)}`);else if("object"==typeof i&&!Array.isArray(i)){let e=rK(i.prompt);e&&n.push(`prompt_${e}`),!0===i.invert&&n.push("invert_true"),"string"==typeof i.mode&&n.push(`mode_${i.mode}`),!0===i.multiple&&n.push("multiple_true")}if(n.length>0){let e=`e_extract:${n.join(";")}`;t.addTransformation(e)}return{}}},{props:rQ,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{recolor:i}=r,n={prompt:void 0,"to-color":void 0,multiple:void 0};Array.isArray(i)?(Array.isArray(i[0])?n.prompt=rm(i[0]):n.prompt=i[0],"string"==typeof i[1]&&(n["to-color"]=i[1])):"object"==typeof i&&("string"==typeof i.prompt?n.prompt=i.prompt:Array.isArray(i.prompt)&&(n.prompt=rm(i.prompt)),"string"==typeof i.to&&(n["to-color"]=i.to),!0===i.multiple&&(n.multiple="true"));let a=Object.entries(n).filter(([,e])=>!!e).map(([e,t])=>`${e}_${t}`).join(";");return a&&t.addTransformation(`e_gen_recolor:${a}`),{}}},{props:rU,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}
1=e,{removeBackground:i=!1}=r;return i&&t.effect("e_background_removal"),{}}},{props:r1,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=rm(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=rm(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 n=r[i];return`${n}_${t}`}).join(";");return`(${i})`}(r.region)),!0===r.multiple&&(i.multiple="true"),!0===r.removeShadow&&(i["remove-shadow"]="true")}let n=Object.entries(i).filter(([,e])=>!!e).map(([e,t])=>`${e}_${t}`).join(";");return n&&e.addTransformation(`e_gen_remove:${n}`),{}}},{props:r6,assetTypes:["image","images"],plugin:({cldAsset:e,options:t})=>{let{replace:r=null}=t;if(r){let t,i,n=!1;Array.isArray(r)?(t=r[0],i=r[1],n=r[2]||!1):(t=r.from,i=r.to,n=r.preserveGeometry||!1);let a=[`e_gen_replace:from_${t}`,`to_${i}`];n&&a.push(`preserve-geometry_${n}`),e.effect(a.join(";"))}return{}}},{props:r2,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{replaceBackground:i}=r;if(!i||void 0===i)return{};let n=[];"object"==typeof i?(void 0!==i.prompt&&n.push(`prompt_${i.prompt}`),"number"==typeof i.seed&&n.push(`seed_${i.seed}`)):"string"==typeof i&&n.push(`prompt_${i}`);let a="e_gen_background_replace";return n.length>0&&(a=`${a}:${n.join(";")}`),t.addTransformation(a),{}}},{props:r5,assetTypes:["image","images"],plugin:({cldAsset:e,options:t})=>{let{restore:r=!1}=t;return r&&e.effect("e_gen_restore"),{}}},{props:rw,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||rb,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:rb,zoom:r.zoom});let n=[],a=[];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:n,zoom:a}=e,s=e.gravity,o=rg(e.height),l=rg(e.width),u=[],c=t&&ry.includes(r),d="number"==typeof i||"string"==typeof i,f="number"==typeof n||"string"==typeof n,p=d||f;return r&&(o||l||c||p)&&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}`),f&&u.push(`y_${n}`),!s&&r_.includes(r)&&!p&&(s="auto"),s&&("auto"!==s||r_.includes(r)?u.push(`g_${s}`):console.warn(`Auto gravity can only be used with crop modes: ${r_.join(", ")}. Not applying gravity.`)),a&&("auto"!==a||rv.includes(r)?u.push(`z_${a}`):console.warn(`Zoom can only be used with crop modes: ${rv.join(", ")}. Not applying zoom.`)),u}({aspectRatio:e.aspectRatio,gravity:e.gravity,type:e.type||rb,x:e.x,y:e.y,zoom:e.zoom,...t});i.length>0&&(!0===e.source?a.push(i):n.push(i))}a.forEach(e=>{e.length>0&&t.addTransformation(e.join(","))});let s={options:{}};return s.options&&n.length>0&&(s.options.resize=n.map(e=>e.join(",")).join("/")),s}},{props:r$,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{preserveTransformations:r=!1}=t;if(r)try{(function(e){let{transformations:t=[]}=_(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:rZ,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:r4,assetTypes:["video","videos"],plugin:e=>{let{cldAsset:t,options:r}=e,{streamingProfile:i}=r;return"string"==typeof i&&t.addTransformation(`sp_${i}`),{}}},{props:rV,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{defaultImage:i}=r;if("string"==typeof i){v(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:rO,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:n,converters:a}=e[r];return rh({qualifier:n,prefix:i,value:t?.[r],converters:a})})}return i({effects:rp,options:r}).filter(e=>
1!!e).forEach(e=>t.effect(e)),Array.isArray(r?.effects)&&r?.effects.forEach(e=>{let r=i({effects:rp,options:e}).filter(e=>!!e).join(",");t.effect(r)}),{}}},{props:rY,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{fillBackground:i}=r;if(void 0===i)return{};let n=rg(r.width),a=rg(r.height),s=r.aspectRatio;if(s||"number"!=typeof a||"number"!=typeof n||(s=`${n}:${a}`),!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:n}=i,a=[`ar_${s}`,`c_${e}`];"string"==typeof n?a.unshift(`b_gen_fill:${n}`):a.unshift("b_gen_fill"),"string"==typeof r&&a.push(`g_${r}`),t.addTransformation(a.join(","))}return{}}},{props:rE,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}=rS.safeParse(e);r&&t.addFlag(e)}):"object"==typeof i&&Object.entries(i).forEach(([e,r])=>{let{success:i}=rS.safeParse(e);i&&t.addTransformation(`fl_${e}:${r}`)}),{}}},{props:rR,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{text:r,overlays:i=[]}=t;function n({publicId:t,url:r,position:i,text:n,effects:a=[],appliedEffects:s=[],flags:o=[],appliedFlags:l=[],...u}){let c,d="string"==typeof t,f="string"==typeof r,h="object"==typeof n||"string"==typeof n,m="object"==typeof i;if(!d&&!f&&!h)return void console.warn("An overlay is missing Public ID, URL, or Text");if(h)c="l_text";else if(d)c=`l_${t.replace(/\//g,":")}`;else f&&(c=`l_fetch:${"function"==typeof btoa?btoa(r):void 0!==p?p.from(r).toString("base64"):void 0}`);let g=[],y=[];if(Object.keys(u).forEach(e=>{if(!b(rc,e))return;let{qualifier:t,converters:r}=rc[e],i=rh({qualifier:t,value:u[e],converters:r});i&&g.push(i)}),a.forEach(e=>{Object.keys(e).forEach(t=>{let r=rc[t]||rp[t]||rd[t];if(!r)return;let{qualifier:i,prefix:n,converters:a}=r,s=rh({qualifier:i,prefix:n,value:e[t],converters:a});s&&g.push(s)})}),s.forEach(e=>{Object.keys(e).forEach(t=>{let r=rc[t]||rp[t]||rd[t];if(!r)return;let{qualifier:i,prefix:n,converters:a}=r,s=rh({qualifier:i,prefix:n,value:e[t],converters:a});s&&y.push(s)})}),(Array.isArray(o)?o:[o]).forEach(e=>{let{success:t}=t6.safeParse(e);t&&g.push(`fl_${e}`)}),(Array.isArray(l)?l:[l]).forEach(e=>{let{success:t}=t6.safeParse(e);t&&y.push(`fl_${e}`)}),h){"string"==typeof n&&(n={...rI,text:n});let e=[];
1if("object"==typeof n)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],n=r[t];return("string"==typeof i&&(i=i.toLowerCase()),"string"==typeof n&&(n=n.toLowerCase()),i<n)?-1:+(i>n)}),"desc"===r)?i.reverse():i}(Object.keys(n).filter(e=>b(rf,e)).map(e=>{let t=n&&b(n,e)&&n[e];return{...rf[e],key:e,value:t,order:rf[e].order||99}}),"order")){let{key:r,value:i,qualifier:n,location:a,converters:s}=t,o=i;s?.forEach(({test:e,convert:t})=>{e(i)&&(o=t(i))}),"primary"===a?g.push(`${n}_${o}`):"self"===n?e.push(r):n?e.push(`${n}_${o}`):e.push(o)}let t={".":"%2E",",":"%2C","/":"%2F"},r=n?.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(!b(rd,e)||!b(i,e))return;let{qualifier:t,converters:r}=rd[e],n=rh({qualifier:t,value:i[e],converters:r});n&&y.push(n)}),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(n),"string"==typeof r?n({text:Object.assign({},rI,{text:r})}):"object"==typeof r&&n({text:Object.assign({},rI,r)}),{}}},{props:rB,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:rT,strict:!0,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{transformations:r,namedTransformations:i}=t;r&&"development"===tQ.env.NODE_ENVIRONMENT&&console.warn("The transformations prop is deprecated. Please use namedTransformations instead.");let n=i||r||[];return Array.isArray(n)||(n=[n]),n.forEach(t=>{e.addTransformation(`t_${t}`)}),{}}},{props:rL,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:rJ,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{underlay:r,underlays:i=[]}=t;function n({publicId:t,type:r,position:i,effects:n=[],flags:a=[],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(!b(rc,e))return;let{qualifier:t}=rc[e];c.push(`${t}_${o[e]}`)}),n.forEach(e=>{Object.keys(e).forEach(t=>{if(!b(rc,t))return;let{qualifier:r}=rc[t];c.push(`${r}_${e[t]}`)})}
1),l&&Object.keys(i).forEach(e=>{if(!b(rd,e))return;let{qualifier:t}=rd[e];d.push(`${t}_${i[e]}`)}),(Array.isArray(a)?a:[a]).forEach(e=>{let{success:t}=t6.safeParse(e);t&&c.push(`fl_${e}`)}),(Array.isArray(s)?s:[s]).forEach(e=>{let{success:t}=t6.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(n),"string"==typeof r&&n({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:r8,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}}}],ir=tm.union([r3,r9]).describe(JSON.stringify({text:"Asset options (Image or Video) that define delivery URL including public ID and transformations.",path:"/url-loader/assetoptions"}));function ii({options:e,config:t={},analytics:r}){let i,n;!1===r&&(void 0===t?.url&&(t.url={}),t.url.analytics=!1);let a=new tG(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=[];it.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=_(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=>{b(e,t)||(e[t]=o[t])}),e.version??(e.version=1),["image","images"].includes(e.assetType)?n=a.image(i):["video","videos"].includes(e.assetType)&&(n=a.video(i)),void 0===n)throw Error("Invalid asset type.");let l={};if(it.forEach(({plugin:t,assetTypes:r,props:i,strict:a})=>{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&&!a){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:n,options:e})||{options:void 0};Object.assign(l,d)}),"string"==typeof l.resize&&n.addTransformation(l.resize),n.setDeliveryType(e?.deliveryType||"upload"),!e.strictTransformations){if(e?.dpr){let t=e.dpr;"number"==typeof t&&(t=t.toFixed(1)),n.addTransformation(`dpr_${t}`)}let t=e?.format==="default",r=ia("f_",n,{matchType:"startsWith"}),i=r&&void 0!==e?.format;
1(l?.format||!t&&(!r||i))&&n.format(e?.format||l?.format||"auto");let a=e?.quality==="default",s=ia("q_",n,{matchType:"startsWith"}),o=s&&void 0!==e?.quality;a||s&&!o||n.quality(e?.quality||"auto")}return n.toURL({trackedAnalytics:r})}function ia(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}tm.object({analytics:tm.union([r7,tm.boolean()]).describe(JSON.stringify({text:"Tech, dependency, and feature identifiers for tracking SDK usage related to Cloudinary.",path:"/url-loader/analyticsoptions"})).optional(),config:ie.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:ir});var is=r(1306);function io(e){let t=e;return t.includes("-")&&(t=t.split("-")[0]),t}io("15.5.25"),io("6.16.0");var il=[],iu="1.11.1",ic=e=>{let{className:t,config:r,height:i,id:n,onDataLoad:a,onError:s,onMetadataLoad:o,onPause:l,onPlay:u,onEnded:p,width:h}=e,m=(0,c.useId)(),g=function(e,t){let r,{autoplay:i,controls:n=!0,language:a,languages:s,logo:o=!0,loop:l=!1,muted:u=!1,poster:c,src:d,transformation:f,quality:p="auto",...h}=e,{cloudName:m}=t?.cloud||{},{secureDistribution:g,privateCdn:y}=t?.url||{};if(!m)throw Error("A Cloudinary Cloud name is required, please make sure your environment variable is set and configured in your environment.");let v=d||"";if(v.startsWith("http"))try{let e=_(d);"string"==typeof e?.publicId&&(v=e?.publicId)}catch(e){}if(!v)throw Error("Video Player requires a src, please make sure to configure your src as a public ID or Cloudinary URL.");let b=Array.isArray(f)?f:[f];b.unshift({quality:p});let x={};"boolean"==typeof o?x.showLogo=o:"object"==typeof o&&(x={...x,showLogo:!0,logoImageUrl:o.imageUrl,logoOnclickUrl:o.onClickUrl});let w=!1;("boolean"==typeof i||"true"===i||"false"===i)&&(w=i),"string"==typeof i&&"true"!==i&&"false"!==i&&(r=i);let k={cloud_name:m,privateCdn:y,secureDistribution:g,autoplayMode:r,autoplay:w,controls:n,language:a,languages:s,loop:l,muted:u,publicId:v,transformation:b,...x,...h};return k.width&&k.height&&!k.aspectRatio&&(k.aspectRatio=`${k.width}:${k.height}`),"string"==typeof c?k.posterOptions={publicId:c}:"object"==typeof c&&("string"!=typeof c.src?k.posterOptions={publicId:ii({options:{...c,src:v,assetType:"video",format:"auto:image"},config:t})}:k.posterOptions={publicId:ii({options:c,config:t})}),k}(e,function(e){var t,r,i,n,a,s,o,l;let u=null!=(a=null==e||null==(t=e.cloud)?void 0:t.cloudName)?a:"defphekqz";if(!u)throw Error("A Cloudinary Cloud name is required, please make sure NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME is set and configured in your environment.");let c=null!=(s=null==e||null==(r=e.cloud)?void 0:r.apiKey)?s:is.env.NEXT_PUBLIC_CLOUDINARY_API_KEY,d=null!=(o=null==e||null==(i=e.url)?void 0:i.secureDistribution)?o:is.env.NEXT_PUBLIC_CLOUDINARY_SECURE_DISTRIBUTION,f=null!=(l=null==e||null==(n=e.url)?void 0:n.privateCdn)?l:is.env.NEXT_PUBLIC_CLOUDINARY_PRIVATE_CDN;return Object.assign({cloud:{...null==e?void 0:e.cloud,apiKey:c,cloudName:u},url:{...null==e?void 0:e.url,secureDistribution:d,privateCdn:f}},e)}(r)),{publicId:y}=g;if(typeof y>"u")throw Error("Video Player requires a Public ID or Cloudinary URL - please specify a src prop");let v=(0,c.useRef)(),b=(0,c.useRef)(),x=e.videoRef||b,w=(0,c.useRef)(),k=e.playerRef||w,O=n||"player-".concat(m.replace(/:/g,"")),S="cld-video-player cld-fluid";t&&(S="".concat(S," ").concat(t)),il.filter(e=>e===O).length>1?console.warn("Multiple instances of the same video detected on the\n page which may cause some features to not work.\n Try adding a unique id to each player."):il.push(O);let E={error:s,loadeddata:a,loadedmetadata:o,pause:l,play:u,ended:p};function A(e){let t=E[e.type];"function"==typeof t&&t({player:k.current,video:x.current})}return(0,c.useEffect)(()=>()=>{var e;
vendor: 25,300 bytes, line 1
1null==(e=k.current)||e.videojs.cloudinary.dispose(),il=il.filter(e=>e!==O)},[]),c.createElement(c.Fragment,null,c.createElement(d,null,c.createElement("link",{href:"https://unpkg.com/cloudinary-video-player@".concat(iu,"/dist/cld-video-player.min.css"),rel:"stylesheet"})),c.createElement("div",{style:{width:"100%",aspectRatio:"".concat(h," / ").concat(i)}},c.createElement("video",{ref:x,id:O,className:S,width:h,height:i}),c.createElement(f.default,{id:"cloudinary-videoplayer-".concat(O),src:"https://unpkg.com/cloudinary-video-player@".concat(iu,"/dist/cld-video-player.min.js"),onLoad:function(){"cloudinary"in window&&(v.current=window.cloudinary,k.current=v.current.videoPlayer(x.current,g),Object.keys(E).forEach(e=>{var t;"function"==typeof E[e]&&(null==(t=k.current)||t.on(e,A))}))},onError:e=>console.error("Failed to load Cloudinary Video Player: ".concat(e.message))})))}},94763:(e,t,r)=>{"use strict";let i=r(27891),n=r(13910),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var i=e,n=t;if(("string"!=typeof n||""===n)&&(n="utf8"),!o.isEncoding(n))throw TypeError("Unknown encoding: "+n);let r=0|h(i,n),a=s(r),l=a.write(i,n);return l!==r&&(a=a.slice(0,l)),a}if(ArrayBuffer.isView(e)){var a=e;if(U(a,Uint8Array)){let e=new Uint8Array(a);return f(e.buffer,e.byteOffset,e.byteLength)}return d(a)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(U(e,SharedArrayBuffer)||e&&U(e.buffer,SharedArrayBuffer)))return f(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let l=e.valueOf&&e.valueOf();if(null!=l&&l!==e)return o.from(l,t,r);let u=function(e){if(o.isBuffer(e)){let t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),s(e<0?0:0|p(e))}function d(e){let t=e.length<0?0:0|p(e.length),r=s(t);for(let i=0;i<t;i+=1)r[i]=255&e[i];return r}function f(e,t,r){let i;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(i=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),o.prototype),i}function p(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function h(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return P(e).length;default:if(n)return i?-1:$(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);let n="";for(let i=t;i<r;++i)n+=B[e[i]];return n}(this,t,r);case"utf8":case"utf-8":return v(this,t,r);case"ascii":return function(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}(this,t,r);case"latin1":case"binary":return function(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}(this,t,r);case"base64":var a,s,o;return a=this,s=t,o=r,0===s&&o===a.length?i.fromByteArray(a):i.fromByteArray(a.slice(s,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){let i=e.slice(t,r),n="";for(let e=0;e<i.length-1;e+=2)n+=String.fromCharCode(i[e]+256*i[e+1]);return n}(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function y(e,t,r,i,n){var a;if(0===e.length)return -1;if("string"==typeof r?(i=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(a=r*=1)!=a&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(n)return -1;else r=e.length-1;else if(r<0)if(!n)return -1;else r=0;if("string"==typeof t&&(t=o.from(t,i)),o.isBuffer(t))return 0===t.length?-1:_(e,t,r,i,n);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(n)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return _(e,[t],r,i,n)}throw TypeError("val must be string, number or Buffer")}function _(e,t,r,i,n){let a,s=1,o=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return -1;s=2,o/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){let i=-1;for(a=r;a<o;a++)if(u(e,a)===u(t,-1===i?0:a-i)){if(-1===i&&(i=a),a-i+1===l)return i*s}else -1!==i&&(a-=a-i),i=-1}else for(r+l>o&&(r=o-l),a=r;a>=0;a--){let r=!0;for(let i=0;i<l;i++)if(u(e,a+i)!==u(t,i)){r=!1;break}if(r)return a}return -1}function v(e,t,r){r=Math.min(e.length,r);let i=[],n=t;for(;n<r;){let t=e[n],a=null,s=t>239?4:t>223?3:t>191?2:1;if(n+s<=r){let r,i,o,l;switch(s){case 1:t<128&&(a=t);break;case 2:(192&(r=e[n+1]))==128&&(l=(31&t)<<6|63&r)>127&&(a=l);break;case 3:r=e[n+1],i=e[n+2],(192&r)==128&&(192&i)==128&&(l=(15&t)<<12|(63&r)<<6|63&i)>2047&&(l<55296||l>57343)&&(a=l);break;case 4:r=e[n+1],i=e[n+2],o=e[n+3],(192&r)==128&&(192&i)==128&&(192&o)==128&&(l=(15&t)<<18|(63&r)<<12|(63&i)<<6|63&o)>65535&&l<1114112&&(a=l)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|1023&a),i.push(a),n+=s}var a=i;let s=a.length;if(s<=4096)return String.fromCharCode.apply(String,a);let o="",l=0;for(;l<s;)o+=String.fromCharCode.apply(String,a.slice(l,l+=4096));return o}function b(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function x(e,t,r,i,n,a){if(!o.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<a)throw RangeError('"value" argument is out of bounds');if(r+i>e.length)throw RangeError("Index out of range")}function w(e,t,r,i,n){N(t,i,n,e,r,7);let a=Number(t&BigInt(0xffffffff));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let s=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function k(e,t,r,i,n){N(t,i,n,e,r,7);let a=Number(t&BigInt(0xffffffff));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let s=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function O(e,t,r,i,n,a){if(r+i>e.length||r<0)throw RangeError("Index out of range")}function S(e,t,r,i,a){return t*=1,r>>>=0,a||O(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}function E(e,t,r,i,a){return t*=1,r>>>=0,a||O(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}t.hp=o,t.IS=50,o.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return(u(e),e<=0)?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)},o.allocUnsafe=function(e){return c(e)},o.allocUnsafeSlow=function(e){return c(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,i=t.length;for(let n=0,a=Math.min(r,i);n<a;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:+(i<r)},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){let r;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;let i=o.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){let t=e[r];if(U(t,Uint8Array))n+t.length>i.length?(o.isBuffer(t)||(t=o.from(t)),t.copy(i,n)):Uint8Array.prototype.set.call(i,t,n);else if(o.isBuffer(t))t.copy(i,n);else throw TypeError('"list" argument must be an Array of Buffers');n+=t.length}return i},o.byteLength=h,o.prototype._isBuffer=!0,o.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},o.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},o.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},o.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?v(this,0,e):m.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){let e="",r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(o.prototype[a]=o.prototype.inspect),o.prototype.compare=function(e,t,r,i,n){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,i>>>=0,n>>>=0,this===e)return 0;let a=n-i,s=r-t,l=Math.min(a,s),u=this.slice(i,n),c=e.slice(t,r);for(let e=0;e<l;++e)if(u[e]!==c[e]){a=u[e],s=c[e];break}return a<s?-1:+(s<a)},o.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},o.prototype.write=function(e,t,r,i){var n,a,s,o,l,u,c,d;if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let f=this.length-t;if((void 0===r||r>f)&&(r=f),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let p=!1;for(;;)switch(i){case"hex":return function(e,t,r,i){let n;r=Number(r)||0;let a=e.length-r;i?(i=Number(i))>a&&(i=a):i=a;let s=t.length;for(i>s/2&&(i=s/2),n=0;n<i;++n){var o;let i=parseInt(t.substr(2*n,2),16);if((o=i)!=o)break;e[r+n]=i}return n}(this,e,t,r);case"utf8":case"utf-8":return n=t,a=r,Z($(e,this.length-n),this,n,a);case"ascii":case"latin1":case"binary":return s=t,o=r,Z(function(e){let t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,s,o);case"base64":return l=t,u=r,Z(P(e),this,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,d=r,Z(function(e,t){let r,i,n=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)i=(r=e.charCodeAt(a))>>8,n.push(r%256),n.push(i);return n}(e,this.length-c),this,c,d);default:if(p)throw TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),p=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);let i=this.subarray(e,t);return Object.setPrototypeOf(i,o.prototype),i},o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);let i=this[e],n=1,a=0;for(;++a<t&&(n*=256);)i+=this[e+a]*n;return i},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);let i=this[e+--t],n=1;for(;t>0&&(n*=256);)i+=this[e+--t]*n;return i},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=L(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&I(e,this.length-8);let i=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],n=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*r;return BigInt(i)+(BigInt(n)<<BigInt(32))}),o.prototype.readBigUInt64BE=L(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&I(e,this.length-8);let i=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],n=0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(i)<<BigInt(32))+BigInt(n)}),o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);let i=this[e],n=1,a=0;for(;++a<t&&(n*=256);)i+=this[e+a]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);let i=t,n=1,a=this[e+--i];for(;i>0&&(n*=256);)a+=this[e+--i]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(e,t){return(e>>>=0,t||b(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=L(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&I(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+0x1000000*this[++e])}),o.prototype.readBigInt64BE=L(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&I(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r)}),o.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),n.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),n.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),n.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),n.read(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,r,i){if(e*=1,t>>>=0,r>>>=0,!i){let i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}let n=1,a=0;for(this[t]=255&e;++a<r&&(n*=256);)this[t+a]=e/n&255;return t+r},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,r,i){if(e*=1,t>>>=0,r>>>=0,!i){let i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}let n=r-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+r},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigUInt64LE=L(function(e,t=0){return w(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=L(function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(e,t,r,i){if(e*=1,t>>>=0,!i){let i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}let n=0,a=1,s=0;for(this[t]=255&e;++n<r&&(a*=256);)e<0&&0===s&&0!==this[t+n-1]&&(s=1),this[t+n]=(e/a|0)-s&255;return t+r},o.prototype.writeIntBE=function(e,t,r,i){if(e*=1,t>>>=0,!i){let i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}let n=r-1,a=1,s=0;for(this[t+n]=255&e;--n>=0&&(a*=256);)e<0&&0===s&&0!==this[t+n+1]&&(s=1),this[t+n]=(e/a|0)-s&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigInt64LE=L(function(e,t=0){return w(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=L(function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeFloatLE=function(e,t,r){return S(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return S(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return E(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return E(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,i){if(!o.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(i<0)throw RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);let n=i-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,i):Uint8Array.prototype.set.call(e,this.subarray(r,i),t),n},o.prototype.fill=function(e,t,r,i){let n;if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw TypeError("encoding must be a string");if("string"==typeof i&&!o.isEncoding(i))throw TypeError("Unknown encoding: "+i);if(1===e.length){let t=e.charCodeAt(0);("utf8"===i&&t<128||"latin1"===i)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n<r;++n)this[n]=e;else{let a=o.isBuffer(e)?e:o.from(e,i),s=a.length;if(0===s)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<r-t;++n)this[n+t]=a[n%s]}return this};let A={};function T(e,t,r){A[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function j(e){let t="",r=e.length,i=+("-"===e[0]);for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function N(e,t,r,i,n,a){if(e>r||e<t){let i,n="bigint"==typeof t?"n":"";throw i=a>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${(a+1)*8}${n}`:`>= -(2${n} ** ${(a+1)*8-1}${n}) and < 2 ** ${(a+1)*8-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new A.ERR_OUT_OF_RANGE("value",i,e)}C(n,"offset"),(void 0===i[n]||void 0===i[n+a])&&I(n,i.length-(a+1))}function C(e,t){if("number"!=typeof e)throw new A.ERR_INVALID_ARG_TYPE(t,"number",e)}function I(e,t,r){if(Math.floor(e)!==e)throw C(e,r),new A.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new A.ERR_BUFFER_OUT_OF_BOUNDS;throw new A.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${t}`,e)}T("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),T("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),T("ERR_OUT_OF_RANGE",function(e,t,r){let i=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?n=j(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=j(n)),n+="n"),i+=` It must be ${t}. Received ${n}`},RangeError);let R=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;let i=e.length,n=null,a=[];for(let s=0;s<i;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!n){if(r>56319||s+1===i){(t-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function P(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Z(e,t,r,i){let n;for(n=0;n<i&&!(n+r>=t.length)&&!(n>=e.length);++n)t[n+r]=e[n];return n}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let B=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let i=16*r;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t}();function L(e){return"undefined"==typeof BigInt?q:e}function q(){throw Error("BigInt not supported")}}}]);
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.