1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[399],{6526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return b}});let i=r(7677),a=r(544),n=r(4848),s=a._(r(6540)),o=i._(r(961)),l=i._(r(6085)),u=r(7282),d=r(2105),c=r(9641);r(7679);let p=r(7644),f=i._(r(5472)),h=r(1903),m={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function g(e,t,r,i,a,n,s){let o=null==e?void 0:e.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),null==r?void 0:r.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let i=!1,a=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>i,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{i=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}(null==i?void 0:i.current)&&i.current(e)}}))}function y(e){return s.use?{fetchPriority:e}:{fetchpriority:e}}let _=(0,s.forwardRef)((e,t)=>{let{src:r,srcSet:i,sizes:a,height:o,width:l,decoding:u,className:d,style:c,fetchPriority:p,placeholder:f,loading:m,unoptimized:_,fill:v,onLoadRef:b,onLoadingCompleteRef:x,setBlurComplete:w,setShowAltText:k,sizesInput:S,onLoad:O,onError:A,...j}=e,T=(0,s.useCallback)(e=>{e&&(A&&(e.src=e.src),e.complete&&g(e,f,b,x,w,_,S))},[r,f,b,x,w,A,_,S]),C=(0,h.useMergedRef)(t,T);return(0,n.jsx)("img",{...j,...y(p),loading:m,width:l,height:o,decoding:u,"data-nimg":v?"fill":"1",className:d,style:c,sizes:a,srcSet:i,src:r,ref:C,onLoad:e=>{g(e.currentTarget,f,b,x,w,_,S)},onError:e=>{k(!0),"empty"!==f&&w(!0),A&&A(e)}})});function v(e){let{isAppRouter:t,imgAttributes:r}=e,i={as:"image",imageSrcSet:r.srcSet,imageSizes:r.sizes,crossOrigin:r.crossOrigin,referrerPolicy:r.referrerPolicy,...y(r.fetchPriority)};return t&&o.default.preload?(o.default.preload(r.src,i),null):(0,n.jsx)(l.default,{children:(0,n.jsx)("link",{rel:"preload",href:r.srcSet?void 0:r.src,...i},"__nimg-"+r.src+r.srcSet+r.sizes)})}let b=(0,s.forwardRef)((e,t)=>{let r=(0,s.useContext)(p.RouterContext),i=(0,s.useContext)(c.ImageConfigContext),a=(0,s.useMemo)(()=>{let e=m||i||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r}},[i]),{onLoad:o,onLoadingComplete:l}=e,h=(0,s.useRef)(o);(0,s.useEffect)(()=>{h.current=o},[o]);let g=(0,s.useRef)(l);(0,s.useEffect)(()=>{g.current=l},[l]);let[y,b]=(0,s.useState)(!1),[x,w]=(0,s.useState)(!1),{props:k,meta:S}=(0,u.getImgProps)(e,{defaultLoader:f.default,imgConf:a,blurComplete:y,showAltText:x});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_,{...k,unoptimized:S.unoptimized,placeholder:S.placeholder,fill:S.fill,onLoadRef:h,onLoadingCompleteRef:g,setBlurComplete:b,setShowAltText:w,sizesInput:e.sizes,ref:t}),S.priority?(0,n.jsx)(v,{isAppRouter:!r,imgAttributes:k}):null]})});("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)},7282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return o}}),r(7679);let i=r(9197),a=r(2105);function n(e){return void 0!==e.default}function s(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function o(e,t){var r;let o,l,u,{src:d,sizes:c,unoptimized:p=!1,priority:f=!1,loading:h,className:m,quality:g,width:y,height:_,fill:v=!1,style:b,overrideSrc:x,onLoad:w,onLoadingComplete:k,placeholder:S="empty",blurDataURL:O,fetchPriority:A,decoding:j="async",layout:T,objectFit:C,objectPosition:N,lazyBoundary:E,lazyRoot:$,...R}=e,{imgConf:I,showAltText:Z,blurComplete:P,defaultLoader:q}=t,z=I||a.imageConfigDefault;if("allSizes"in z)o=z;else{let e=[...z.deviceSizes,...z.imageSizes].sort((e,t)=>
1e-t),t=z.deviceSizes.sort((e,t)=>e-t);o={...z,allSizes:e,deviceSizes:t}}if(void 0===q)throw Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");let M=R.loader||q;delete R.loader,delete R.srcSet;let J="__next_img_default"in M;if(J){if("custom"===o.loader)throw Error('Image with src "'+d+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=M;M=t=>{let{config:r,...i}=t;return e(i)}}if(T){"fill"===T&&(v=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[T];e&&(b={...b,...e});let t={responsive:"100vw",fill:"100vw"}[T];t&&!c&&(c=t)}let L="",F=s(y),D=s(_);if((r=d)&&"object"==typeof r&&(n(r)||void 0!==r.src)){let e=n(d)?d.default:d;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(l=e.blurWidth,u=e.blurHeight,O=O||e.blurDataURL,L=e.src,!v){if(F||D){if(F&&!D){let t=F/e.width;D=Math.round(e.height*t)}else if(!F&&D){let t=D/e.height;F=Math.round(e.width*t)}}else F=e.width,D=e.height}}let U=!f&&("lazy"===h||void 0===h);(!(d="string"==typeof d?d:L)||d.startsWith("data:")||d.startsWith("blob:"))&&(p=!0,U=!1),o.unoptimized&&(p=!0),J&&d.endsWith(".svg")&&!o.dangerouslyAllowSVG&&(p=!0);let V=s(g),B=Object.assign(v?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:C,objectPosition:N}:{},Z?{}:{color:"transparent"},b),W=P||"empty"===S?null:"blur"===S?'url("data:image/svg+xml;charset=utf-8,'+(0,i.getImageBlurSvg)({widthInt:F,heightInt:D,blurWidth:l,blurHeight:u,blurDataURL:O||"",objectFit:B.objectFit})+'")':'url("'+S+'")',K=W?{backgroundSize:B.objectFit||"cover",backgroundPosition:B.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:W}:{},H=function(e){let{config:t,src:r,unoptimized:i,width:a,quality:n,sizes:s,loader:o}=e;if(i)return{src:r,srcSet:void 0,sizes:void 0};let{widths:l,kind:u}=function(e,t,r){let{deviceSizes:i,allSizes:a}=e;if(r){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let i;i=e.exec(r);i)t.push(parseInt(i[2]));if(t.length){let e=.01*Math.min(...t);return{widths:a.filter(t=>t>=i[0]*e),kind:"w"}}return{widths:a,kind:"w"}}return"number"!=typeof t?{widths:i,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>a.find(t=>t>=e)||a[a.length-1]))],kind:"x"}}(t,a,s),d=l.length-1;return{sizes:s||"w"!==u?s:"100vw",srcSet:l.map((e,i)=>o({config:t,src:r,quality:n,width:e})+" "+("w"===u?e:i+1)+u).join(", "),src:o({config:t,src:r,quality:n,width:l[d]})}}({config:o,src:d,unoptimized:p,width:F,quality:V,sizes:c,loader:M});return{props:{...R,loading:U?"lazy":h,fetchPriority:A,width:F,height:D,decoding:j,className:m,style:{...B,...K},sizes:H.sizes,srcSet:H.srcSet,src:x||H.src},meta:{unoptimized:p,priority:f,placeholder:S,fill:v}}}},9197:(e,t)=>{"use strict";function r(e){let{widthInt:t,heightInt:r,blurWidth:i,blurHeight:a,blurDataURL:n,objectFit:s}=e,o=i?40*i:t,l=a?40*a:r,u=o&&l?"viewBox='0 0 "+o+" "+l+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+u+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(u?"none":"contain"===s?"xMidYMid":"cover"===s?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+n+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},2364:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return l},getImageProps:function(){return o}});let i=r(7677),a=r(7282),n=r(6526),s=i._(r(5472));function o(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:s.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let l=n.Image},5472:(e,t)=>{"use strict";function r(e){let{config:t,src:r,width:i,quality:a}=e;return t.path+"?url="+encodeURIComponent(r)+"&w="+i+"&q="+(a||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}}),r.__next_img_default=!0;let i=r},9965:(e,t,r)=>{e.exports=r(2364)},8133:(e,t,r)=>{e.exports=r(7610)},5399:(e,t,r)=>{"use strict";let i;r.d(t,{bo:()=>i_});var a,n,s,o,l,u,d=r(6540),c=r(9965);async function p(e){try{let t=await fetch(e.src);if(423===t.status)return await new Promise(e=>setTimeout(e,500)),await p(e);if(!t.ok)return{success:!1,status:t.status,error:t.headers.get("x-cld-error")||"Unknown error"};return{success:!0,status:t.status}}catch(e){return{success:!1,status:500,error:e.message||"Network error"}}}r(2928).Buffer;var f=r(2928).Buffer,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),a=t;i&&(a=t.replace(RegExp(`${i}$`),""));let n=a.match(g),s=n?.groups?.transformations?.split("/").filter(e=>!!e),o={...n?.groups,format:i,seoSuffix:void 0,transformations:s||[],queryParams:{},version:n?.groups?.version?parseInt(n.groups.version.replace("v","")):void 0};if("res.cloudinary.com"===o.host&&!o.cloudName)throw Error("Failed to parse URL - Invalid src: Cloudinary URL delivered from res.cloudinary.com must include Cloud Name (ex: res.cloudinary.com/<Cloud Name>/image/...)");if(r&&(o.queryParams=r.split("&").reduce((e,t)=>{let[r,i]=t.split("=");return e[r]=i,e},{})),o.assetType&&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=>"number"!=typeof t[t[e]]),i={};for(let e of r)i[e]=t[e];return e.objectValues(i)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(let r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(a||(a={})),(n||(n={})).mergeShapes=(e,t)=>({...e,...t});let x=a.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}}
vendor: 5,766 bytes, line 1
1,k=a.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class S extends Error{get errors(){return this.issues}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}format(e){let t=e||function(e){return e.message},r={_errors:[]},i=e=>{for(let a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(i);else if("invalid_return_type"===a.code)i(a.returnTypeError);else if("invalid_arguments"===a.code)i(a.argumentsError);else if(0===a.path.length)r._errors.push(t(a));else{let e=r,i=0;for(;i<a.path.length;){let r=a.path[i];i===a.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(a))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(this),r}static assert(e){if(!(e instanceof S))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,a.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},r=[];for(let i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}S.create=e=>new S(e);let O=(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,a.jsonStringifyReplacer)}`;break;case k.unrecognized_keys:r=`Unrecognized key(s) in object: ${a.joinValues(e.keys,", ")}`;break;case k.invalid_union:r="Invalid input";break;case k.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${a.joinValues(e.options)}`;break;case k.invalid_enum_value:r=`Invalid enum value. Expected ${a.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}"`:a.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,a.assertNever(e)}return{message:r}},A=O;function j(){return A}let T=e=>{let{data:t,path:r,errorMaps:i,issueData:a}=e,n=[...r,...a.path||[]],s={...a,path:n};if(void 0!==a.message)return{...a,path:n,message:a.message};let o="";for(let e of i.filter(e=>!!e).slice().reverse())o=e(s,{data:t,defaultError:o}).message;return{...a,path:n,message:o}};function C(e,t){let r=j(),i=T({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===O?void 0:O].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 E;"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:a}=i;if("aborted"===t.status||"aborted"===a.status)return E;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==a.value||i.alwaysSet)&&(r[t.value]=a.value)}return{status:e.value,value:r}}}let E=Object.freeze({status:"aborted"}),$=e=>({status:"dirty",value:e}),R=e=>
1({status:"valid",value:e}),I=e=>"aborted"===e.status,Z=e=>"dirty"===e.status,P=e=>"valid"===e.status,q=e=>"undefined"!=typeof Promise&&e instanceof Promise;function z(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 M(e,t,r,i,a){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?a.call(e,r):a?a.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 J{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 L=(e,t)=>{if(P(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 S(e.common.issues);return this._error=t,this._error}}};function F(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:i,description:a}=e;if(t&&(r||i))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:a}:{errorMap:(t,a)=>{var n,s;let{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:a.defaultError}:void 0===a.data?{message:null!==(n=null!=o?o:i)&&void 0!==n?n:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(s=null!=o?o:r)&&void 0!==s?s:a.defaultError}},description:a}}class D{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(q(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)&&void 0!==r&&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)},a=this._parseSync({data:e,path:i.path,parent:i});return L(i,a)}"~validate"(e){var t,r;let i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:w(e)};if(!this["~standard"].async)try{let t=this._parseSync({data:e,path:[],parent:i});return P(t)?{value:t.value}:{issues:i.common.issues}}catch(e){(null===(r=null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.toLowerCase())||void 0===r?void 0:r.includes("encountered"))&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:i}).then(e=>P(e)?{value:e.value}:{issues:i.common.issues})}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 L(r,await (q(i)?i:Promise.resolve(i)))}refine(e,t){let r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,i)=>{let a=e(t),n=()=>i.addIssue({code:k.custom,...r(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then(e=>!!e||(n(),!1)):!!a||(n(),!1)})}refinement(e,t){return this._refinement((r,i)=>!!e(r)||(i.addIssue("function"==typeof t?t(r,i):t),!1))}_refinement(e){return new eq({schema:this,typeName:u.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}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),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return ez.create(this,this._def)}nullable(){return eM.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eb.create(this)}promise(){return eP.create(this,this._def)}or(e){return ew.create([this,e],this._def)}and(e){return eO.create(this,e,this._def)}transform(e){return new eq({...F(this._def),schema:this,typeName:u.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eJ({...F(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:u.ZodDefault})}brand(){return new eU({typeName:u.ZodBranded,type:this,...F(this._def)})}catch(e){return new eL({...F(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 eV.create(this,e)}readonly(){return eB.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let U=/^c[^\s-]{8,}
1$/i,V=/^[0-9a-z]+$/,B=/^[0-9A-HJKMNP-TV-Z]{26}$/i,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,H=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,G=/^[-+]?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)?)??$/,Y=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Q=/^(?:(?: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])$/,X=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ee=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,et=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,er=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ei=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ea="((\\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])))",en=RegExp(`^${ea}$`);function es(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 eo(e){let t=`${ea}T${es(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)}class el extends D{_parse(e){var t,r,n,s;let o;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==x.string){let t=this._getOrReturnCtx(e);return C(t,{code:k.invalid_type,expected:x.string,received:t.parsedType}),E}let l=new N;for(let u of this._def.checks)if("min"===u.kind)e.data.length<u.value&&(C(o=this._getOrReturnCtx(e,o),{code:k.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),l.dirty());else if("max"===u.kind)e.data.length>u.value&&(C(o=this._getOrReturnCtx(e,o),{code:k.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),l.dirty());else if("length"===u.kind){let t=e.data.length>u.value,r=e.data.length<u.value;(t||r)&&(o=this._getOrReturnCtx(e,o),t?C(o,{code:k.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}):r&&C(o,{code:k.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}),l.dirty())}else if("email"===u.kind)Y.test(e.data)||(C(o=this._getOrReturnCtx(e,o),{validation:"email",code:k.invalid_string,message:u.message}),l.dirty());else if("emoji"===u.kind)i||(i=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),i.test(e.data)||(C(o=this._getOrReturnCtx(e,o),{validation:"emoji",code:k.invalid_string,message:u.message}),l.dirty());else if("uuid"===u.kind)W.test(e.data)||(C(o=this._getOrReturnCtx(e,o),{validation:"uuid",code:k.invalid_string,message:u.message}),l.dirty());else if("nanoid"===u.kind)K.test(e.data)||(C(o=this._getOrReturnCtx(e,o),{validation:"nanoid",code:k.invalid_string,message:u.message}),l.dirty());else if("cuid"===u.kind)U.test(e.data)||(C(o=this._getOrReturnCtx(e,o),{validation:"cuid",code:k.invalid_string,message:u.message}),l.dirty());else if("cuid2"===u.kind)V.test(e.data)||(C(o=this._getOrReturnCtx(e,o),{validation:"cuid2",code:k.invalid_string,message:u.message}),l.dirty());else if("ulid"===u.kind)B.test(e.data)||(C(o=this._getOrReturnCtx(e,o),{validation:"ulid",code:k.invalid_string,message:u.message}),l.dirty());else if("url"===u.kind)try{new URL(e.data)}catch(t){C(o=this._getOrReturnCtx(e,o),{validation:"url",code:k.invalid_string,message:u.message}),l.dirty()}else"regex"===u.kind?(u.regex.lastIndex=0,u.regex.test(e.data)||(C(o=this._getOrReturnCtx(e,o),{validation:"regex",code:k.invalid_string,message:u.message}),l.dirty())):"trim"===u.kind?e.data=e.data.trim():"includes"===u.kind?e.data.includes(u.value,u.position)||(C(o=this._getOrReturnCtx(e,o),{code:k.invalid_string,validation:{includes:u.value,position:u.position},message:u.message}),l.dirty()):"toLowerCase"===u.kind?e.data=e.data.toLowerCase():"toUpperCase"===u.kind?e.data=e.data.toUpperCase():"startsWith"===u.kind?e.data.startsWith(u.value)||(C(o=this._getOrReturnCtx(e,o),{code:k.invalid_string,validation:{startsWith:u.value},message:u.message}),l.dirty()):"endsWith"===u.kind?e.data.endsWith(u.value)||(C(o=this._getOrReturnCtx(e,o),{code:k.invalid_string,validation:{endsWith:u.value},message:u.message}),l.dirty()):"datetime"===u.kind?eo(u).test(e.data)||(C(o=this._getOrReturnCtx(e,o),{code:k.invalid_string,validation:"datetime",message:u.message}),l.dirty()):"date"===u.kind?en.test(e.data)||(C(o=this._getOrReturnCtx(e,o),{code:k.invalid_string,validation:"date",message:u.message}),l.dirty()):"time"===u.kind?RegExp(`^${es(u)}$`).test(e.data)||(C(o=this._getOrReturnCtx(e,o),{code:k.invalid_string,validation:"time",message:u.message}),l.dirty()):"duration"===u.kind?G.test(e.data)||(C(o=this._getOrReturnCtx(e,o),{validation:"duration",code:k.invalid_string,message:u.message}),l.dirty()):"ip"===u.kind?(t=e.data,("v4"===(r=u.version)||!r)&&Q.test(t)||("v6"===r||!r)&&ee.test(t)||(C(o=this._getOrReturnCtx(e,o),{validation:"ip",code:k.invalid_string,message:u.message}),l.dirty())):"jwt"===u.kind?!function(e,t){if(!H.test(e))return!1;try{let[r]=e.split("."),i=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(i));if("object"!=typeof a||null===a||!a.typ||!a.alg||t&&a.alg!==t)return!1;return!0}catch(e){return!1}}(e.data,u.alg)&&(C(o=this._getOrReturnCtx(e,o),{validation:"jwt",code:k.invalid_string,message:u.message}),l.dirty()):"cidr"===u.kind?(n=e.data,("v4"===(s=u.version)||!s)&&X.test(n)||("v6"===s||!s)&&et.test(n)||(C(o=this._getOrReturnCtx(e,o),{validation:"cidr",code:k.invalid_string,message:u.message}),l.dirty())):"base64"===u.kind?er.test(e.data)||(C(o=this._getOrReturnCtx(e,o),{validation:"base64",code:k.invalid_string,message:u.message}),l.dirty()):"base64url"===u.kind?ei.test(e.data)||(C(o=this._getOrReturnCtx(e,o),{validation:"base64url",code:k.invalid_string,message:u.message}),l.dirty()):a.assertNever(u);return{status:l.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 el({...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)})}base64url(e){return this._addCheck({kind:"base64url",...s.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...s.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...s.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...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)&&void 0!==t&&t,local:null!==(r=null==e?void 0:e.local)&&void 0!==r&&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 el({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new el({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new el({...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 isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===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}}el.create=e=>{var t;return new el({checks:[],typeName:u.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...F(e)})};class eu extends D{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 C(t,{code:k.invalid_type,expected:x.number,received:t.parsedType}),E}let r=new N;for(let i of this._def.checks)"int"===i.kind?a.isInteger(e.data)||(C(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)&&(C(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)&&(C(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,a=r>i?r:i;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}(e.data,i.value)&&(C(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)||(C(t=this._getOrReturnCtx(e,t),{code:k.not_finite,message:i.message}),r.dirty()):a.assertNever(i);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,s.toString(t))}gt(e,t){return this.setLimit("min",e,!1,s.toString(t))}lte(e,t){return this.setLimit("max",e,!0,s.toString(t))}lt(e,t){return this.setLimit("max",e,!1,s.toString(t))}setLimit(e,t,r,i){return new eu({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.toString(i)}]})}_addCheck(e){return new eu({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:s.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:s.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:s.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:s.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:s.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:s.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:s.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:s.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:s.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&a.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"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)}}eu.create=e=>new eu({checks:[],typeName:u.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...F(e)});class ed extends D{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==x.bigint)return this._getInvalidInput(e);let r=new N;for(let i of this._def.checks)"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(C(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)&&(C(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)&&(C(t=this._getOrReturnCtx(e,t),{code:k.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):a.assertNever(i);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return C(t,{code:k.invalid_type,expected:x.bigint,received:t.parsedType}),E}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 ed({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.toString(i)}]})}_addCheck(e){return new ed({...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}}ed.create=e=>{var t;return new ed({checks:[],typeName:u.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...F(e)})};class ec extends D{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==x.boolean){let t=this._getOrReturnCtx(e);return C(t,{code:k.invalid_type,expected:x.boolean,received:t.parsedType}),E}return R(e.data)}}ec.create=e=>new ec({typeName:u.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...F(e)});class ep extends D{_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 C(t,{code:k.invalid_type,expected:x.date,received:t.parsedType}),E}if(isNaN(e.data.getTime()))return C(this._getOrReturnCtx(e),{code:k.invalid_date}),E;let r=new N;for(let i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(C(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&&(C(t=this._getOrReturnCtx(e,t),{code:k.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):a.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ep({...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}}ep.create=e=>new ep({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:u.ZodDate,...F(e)});class ef extends D{_parse(e){if(this._getType(e)!==x.symbol){let t=this._getOrReturnCtx(e);return C(t,{code:k.invalid_type,expected:x.symbol,received:t.parsedType}),E}return R(e.data)}}ef.create=e=>new ef({typeName:u.ZodSymbol,...F(e)});class eh extends D{_parse(e){if(this._getType(e)!==x.undefined){let t=this._getOrReturnCtx(e);return C(t,{code:k.invalid_type,expected:x.undefined,received:t.parsedType}),E}return R(e.data)}}eh.create=e=>new eh({typeName:u.ZodUndefined,...F(e)});class em extends D{_parse(e){if(this._getType(e)!==x.null){let t=this._getOrReturnCtx(e);return C(t,{code:k.invalid_type,expected:x.null,received:t.parsedType}),E}return R(e.data)}}em.create=e=>new em({typeName:u.ZodNull,...F(e)});class eg extends D{constructor(){super(...arguments),this._any=!0}_parse(e){return R(e.data)}}eg.create=e=>new eg({typeName:u.ZodAny,...F(e)});class ey extends D{constructor(){super(...arguments),this._unknown=!0}_parse(e){return R(e.data)}}ey.create=e=>new ey({typeName:u.ZodUnknown,...F(e)});class e_ extends D{_parse(e){let t=this._getOrReturnCtx(e);return C(t,{code:k.invalid_type,expected:x.never,received:t.parsedType}),E}}e_.create=e=>new e_({typeName:u.ZodNever,...F(e)});class ev extends D{_parse(e){if(this._getType(e)!==x.undefined){let t=this._getOrReturnCtx(e);return C(t,{code:k.invalid_type,expected:x.void,received:t.parsedType}),E}return R(e.data)}}ev.create=e=>new ev({typeName:u.ZodVoid,...F(e)});class eb extends D{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),i=this._def;if(t.parsedType!==x.array)return C(t,{code:k.invalid_type,expected:x.array,received:t.parsedType}),E;if(null!==i.exactLength){let e=t.data.length>i.exactLength.value,a=t.data.length<i.exactLength.value;(e||a)&&(C(t,{code:e?k.too_big:k.too_small,minimum:a?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&(C(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&&(C(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 J(t,e,t.path,r)))).then(e=>N.mergeArray(r,e));let a=[...t.data].map((e,r)=>i.type._parseSync(new J(t,e,t.path,r)));return N.mergeArray(r,a)}
1get element(){return this._def.type}min(e,t){return new eb({...this._def,minLength:{value:e,message:s.toString(t)}})}max(e,t){return new eb({...this._def,maxLength:{value:e,message:s.toString(t)}})}length(e,t){return new eb({...this._def,exactLength:{value:e,message:s.toString(t)}})}nonempty(e){return this.min(1,e)}}eb.create=(e,t)=>new eb({type:e,minLength:null,maxLength:null,exactLength:null,typeName:u.ZodArray,...F(t)});class ex extends D{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=a.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==x.object){let t=this._getOrReturnCtx(e);return C(t,{code:k.invalid_type,expected:x.object,received:t.parsedType}),E}let{status:t,ctx:r}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),n=[];if(!(this._def.catchall instanceof e_&&"strip"===this._def.unknownKeys))for(let e in r.data)a.includes(e)||n.push(e);let s=[];for(let e of a){let t=i[e],a=r.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new J(r,a,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof e_){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of n)s.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)n.length>0&&(C(r,{code:k.unrecognized_keys,keys:n}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of n){let i=r.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new J(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 ex({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var i,a,n,o;let l=null!==(n=null===(a=(i=this._def).errorMap)||void 0===a?void 0:a.call(i,t,r).message)&&void 0!==n?n:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(o=s.errToObj(e).message)&&void 0!==o?o:l}:{message:l}}}:{}})}strip(){return new ex({...this._def,unknownKeys:"strip"})}passthrough(){return new ex({...this._def,unknownKeys:"passthrough"})}extend(e){return new ex({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ex({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 ex({...this._def,catchall:e})}pick(e){let t={};return a.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])}),new ex({...this._def,shape:()=>t})}omit(e){let t={};return a.objectKeys(this.shape).forEach(r=>{e[r]||(t[r]=this.shape[r])}),new ex({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ex){let r={};for(let i in t.shape){let a=t.shape[i];r[i]=ez.create(e(a))}return new ex({...t._def,shape:()=>r})}return t instanceof eb?new eb({...t._def,type:e(t.element)}):t instanceof ez?ez.create(e(t.unwrap())):t instanceof eM?eM.create(e(t.unwrap())):t instanceof eA?eA.create(t.items.map(t=>e(t))):t}(this)}partial(e){let t={};return a.objectKeys(this.shape).forEach(r=>{let i=this.shape[r];e&&!e[r]?t[r]=i:t[r]=i.optional()}),new ex({...this._def,shape:()=>t})}required(e){let t={};return a.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof ez;)e=e._def.innerType;t[r]=e}}),new ex({...this._def,shape:()=>t})}keyof(){return eR(a.objectKeys(this.shape))}}ex.create=(e,t)=>new ex({shape:()=>e,unknownKeys:"strip",catchall:e_.create(),typeName:u.ZodObject,...F(t)}),ex.strictCreate=(e,t)=>new ex({shape:()=>e,unknownKeys:"strict",catchall:e_.create(),typeName:u.ZodObject,...F(t)}),ex.lazycreate=(e,t)=>new ex({shape:e,unknownKeys:"strip",catchall:e_.create(),typeName:u.ZodObject,...F(t)});class ew extends D{_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 S(e.ctx.common.issues));return C(t,{code:k.invalid_union,unionErrors:r}),E});{let e;let i=[];for(let a of r){let r={...t,common:{...t.common,issues:[]},parent:null},n=a._parseSync({data:t.data,path:t.path,parent:r});if("valid"===n.status)return n;"dirty"!==n.status||e||(e={result:n,ctx:r}),r.common.issues.length&&i.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let a=i.map(e=>new S(e));return C(t,{code:k.invalid_union,unionErrors:a}),E}}get options(){return this._def.options}}ew.create=(e,t)=>
1new ew({options:e,typeName:u.ZodUnion,...F(t)});let ek=e=>{if(e instanceof eE)return ek(e.schema);if(e instanceof eq)return ek(e.innerType());if(e instanceof e$)return[e.value];if(e instanceof eI)return e.options;if(e instanceof eZ)return a.objectValues(e.enum);if(e instanceof eJ)return ek(e._def.innerType);if(e instanceof eh)return[void 0];else if(e instanceof em)return[null];else if(e instanceof ez)return[void 0,...ek(e.unwrap())];else if(e instanceof eM)return[null,...ek(e.unwrap())];else if(e instanceof eU)return ek(e.unwrap());else if(e instanceof eB)return ek(e.unwrap());else if(e instanceof eL)return ek(e._def.innerType);else return[]};class eS extends D{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.object)return C(t,{code:k.invalid_type,expected:x.object,received:t.parsedType}),E;let r=this.discriminator,i=t.data[r],a=this.optionsMap.get(i);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(C(t,{code:k.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),E)}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=ek(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of t){if(i.has(a))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,r)}}return new eS({typeName:u.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...F(r)})}}class eO extends D{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),i=(e,i)=>{if(I(e)||I(i))return E;let n=function e(t,r){let i=w(t),n=w(r);if(t===r)return{valid:!0,data:t};if(i===x.object&&n===x.object){let i=a.objectKeys(r),n=a.objectKeys(t).filter(e=>-1!==i.indexOf(e)),s={...t,...r};for(let i of n){let a=e(t[i],r[i]);if(!a.valid)return{valid:!1};s[i]=a.data}return{valid:!0,data:s}}if(i===x.array&&n===x.array){if(t.length!==r.length)return{valid:!1};let i=[];for(let a=0;a<t.length;a++){let n=e(t[a],r[a]);if(!n.valid)return{valid:!1};i.push(n.data)}return{valid:!0,data:i}}return i===x.date&&n===x.date&&+t==+r?{valid:!0,data:t}:{valid:!1}}(e.value,i.value);return n.valid?((Z(e)||Z(i))&&t.dirty(),{status:t.value,value:n.data}):(C(r,{code:k.invalid_intersection_types}),E)};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}))}}eO.create=(e,t,r)=>new eO({left:e,right:t,typeName:u.ZodIntersection,...F(r)});class eA extends D{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==x.array)return C(r,{code:k.invalid_type,expected:x.array,received:r.parsedType}),E;if(r.data.length<this._def.items.length)return C(r,{code:k.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),E;!this._def.rest&&r.data.length>this._def.items.length&&(C(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 J(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 eA({...this._def,rest:e})}}eA.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new eA({items:e,typeName:u.ZodTuple,rest:null,...F(t)})};class ej extends D{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 C(r,{code:k.invalid_type,expected:x.object,received:r.parsedType}),E;let i=[],a=this._def.keyType,n=this._def.valueType;for(let e in r.data)i.push({key:a._parse(new J(r,e,r.path,e)),value:n._parse(new J(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?N.mergeObjectAsync(t,i):N.mergeObjectSync(t,i)}
1get element(){return this._def.valueType}static create(e,t,r){return new ej(t instanceof D?{keyType:e,valueType:t,typeName:u.ZodRecord,...F(r)}:{keyType:el.create(),valueType:e,typeName:u.ZodRecord,...F(t)})}}class eT extends D{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 C(r,{code:k.invalid_type,expected:x.map,received:r.parsedType}),E;let i=this._def.keyType,a=this._def.valueType,n=[...r.data.entries()].map(([e,t],n)=>({key:i._parse(new J(r,e,r.path,[n,"key"])),value:a._parse(new J(r,t,r.path,[n,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of n){let i=await r.key,a=await r.value;if("aborted"===i.status||"aborted"===a.status)return E;("dirty"===i.status||"dirty"===a.status)&&t.dirty(),e.set(i.value,a.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of n){let i=r.key,a=r.value;if("aborted"===i.status||"aborted"===a.status)return E;("dirty"===i.status||"dirty"===a.status)&&t.dirty(),e.set(i.value,a.value)}return{status:t.value,value:e}}}}eT.create=(e,t,r)=>new eT({valueType:t,keyType:e,typeName:u.ZodMap,...F(r)});class eC extends D{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==x.set)return C(r,{code:k.invalid_type,expected:x.set,received:r.parsedType}),E;let i=this._def;null!==i.minSize&&r.data.size<i.minSize.value&&(C(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&&(C(r,{code:k.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());let a=this._def.valueType;function n(e){let r=new Set;for(let i of e){if("aborted"===i.status)return E;"dirty"===i.status&&t.dirty(),r.add(i.value)}return{status:t.value,value:r}}let s=[...r.data.values()].map((e,t)=>a._parse(new J(r,e,r.path,t)));return r.common.async?Promise.all(s).then(e=>n(e)):n(s)}min(e,t){return new eC({...this._def,minSize:{value:e,message:s.toString(t)}})}max(e,t){return new eC({...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)}}eC.create=(e,t)=>new eC({valueType:e,minSize:null,maxSize:null,typeName:u.ZodSet,...F(t)});class eN extends D{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.function)return C(t,{code:k.invalid_type,expected:x.function,received:t.parsedType}),E;function r(e,r){return T({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,j(),O].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,j(),O].filter(e=>!!e),issueData:{code:k.invalid_return_type,returnTypeError:r}})}let a={errorMap:t.common.contextualErrorMap},n=t.data;if(this._def.returns instanceof eP){let e=this;return R(async function(...t){let s=new S([]),o=await e._def.args.parseAsync(t,a).catch(e=>{throw s.addIssue(r(t,e)),s}),l=await Reflect.apply(n,this,o);return await e._def.returns._def.type.parseAsync(l,a).catch(e=>{throw s.addIssue(i(l,e)),s})})}{let e=this;return R(function(...t){let s=e._def.args.safeParse(t,a);if(!s.success)throw new S([r(t,s.error)]);let o=Reflect.apply(n,this,s.data),l=e._def.returns.safeParse(o,a);if(!l.success)throw new S([i(o,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eN({...this._def,args:eA.create(e).rest(ey.create())})}returns(e){return new eN({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new eN({args:e||eA.create([]).rest(ey.create()),returns:t||ey.create(),typeName:u.ZodFunction,...F(r)})}}class eE extends D{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})}}eE.create=(e,t)=>
1new eE({getter:e,typeName:u.ZodLazy,...F(t)});class e$ extends D{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return C(t,{received:t.data,code:k.invalid_literal,expected:this._def.value}),E}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eR(e,t){return new eI({values:e,typeName:u.ZodEnum,...F(t)})}e$.create=(e,t)=>new e$({value:e,typeName:u.ZodLiteral,...F(t)});class eI extends D{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 C(t,{expected:a.joinValues(r),received:t.parsedType,code:k.invalid_type}),E}if(z(this,o,"f")||M(this,o,new Set(this._def.values),"f"),!z(this,o,"f").has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return C(t,{received:t.data,code:k.invalid_enum_value,options:r}),E}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 eI.create(e,{...this._def,...t})}exclude(e,t=this._def){return eI.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}o=new WeakMap,eI.create=eR;class eZ extends D{constructor(){super(...arguments),l.set(this,void 0)}_parse(e){let t=a.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==x.string&&r.parsedType!==x.number){let e=a.objectValues(t);return C(r,{expected:a.joinValues(e),received:r.parsedType,code:k.invalid_type}),E}if(z(this,l,"f")||M(this,l,new Set(a.getValidEnumValues(this._def.values)),"f"),!z(this,l,"f").has(e.data)){let e=a.objectValues(t);return C(r,{received:r.data,code:k.invalid_enum_value,options:e}),E}return R(e.data)}get enum(){return this._def.values}}l=new WeakMap,eZ.create=(e,t)=>new eZ({values:e,typeName:u.ZodNativeEnum,...F(t)});class eP extends D{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==x.promise&&!1===t.common.async?(C(t,{code:k.invalid_type,expected:x.promise,received:t.parsedType}),E):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})))}}eP.create=(e,t)=>new eP({type:e,typeName:u.ZodPromise,...F(t)});class eq extends D{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,n={addIssue:e=>{C(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),"preprocess"===i.type){let e=i.transform(r.data,n);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return E;let i=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===i.status?E:"dirty"===i.status||"dirty"===t.value?$(i.value):i});{if("aborted"===t.value)return E;let i=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===i.status?E:"dirty"===i.status||"dirty"===t.value?$(i.value):i}}if("refinement"===i.type){let e=e=>{let t=i.refinement(e,n);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?E:("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?E:("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=>P(e)?Promise.resolve(i.transform(e.value,n)).then(e=>({status:t.value,value:e})):e);{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!P(e))return e;let a=i.transform(e.value,n);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}}a.assertNever(i)}}eq.create=(e,t,r)=>new eq({schema:e,typeName:u.ZodEffects,effect:t,...F(r)}),eq.createWithPreprocess=(e,t,r)=>new eq({schema:t,effect:{type:"preprocess",transform:e},typeName:u.ZodEffects,...F(r)}
1);class ez extends D{_parse(e){return this._getType(e)===x.undefined?R(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ez.create=(e,t)=>new ez({innerType:e,typeName:u.ZodOptional,...F(t)});class eM extends D{_parse(e){return this._getType(e)===x.null?R(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eM.create=(e,t)=>new eM({innerType:e,typeName:u.ZodNullable,...F(t)});class eJ extends D{_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}}eJ.create=(e,t)=>new eJ({innerType:e,typeName:u.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...F(t)});class eL extends D{_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 q(i)?i.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new S(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new S(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eL.create=(e,t)=>new eL({innerType:e,typeName:u.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...F(t)});class eF extends D{_parse(e){if(this._getType(e)!==x.nan){let t=this._getOrReturnCtx(e);return C(t,{code:k.invalid_type,expected:x.nan,received:t.parsedType}),E}return{status:"valid",value:e.data}}}eF.create=e=>new eF({typeName:u.ZodNaN,...F(e)});let eD=Symbol("zod_brand");class eU extends D{_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 eV extends D{_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?E:"dirty"===e.status?(t.dirty(),$(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?E:"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 eV({in:e,out:t,typeName:u.ZodPipeline})}}class eB extends D{_parse(e){let t=this._def.innerType._parse(e),r=e=>(P(e)&&(e.value=Object.freeze(e.value)),e);return q(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}function eW(e,t={},r){return e?eg.create().superRefine((i,a)=>{var n,s;if(!e(i)){let e="function"==typeof t?t(i):"string"==typeof t?{message:t}:t,o=null===(s=null!==(n=e.fatal)&&void 0!==n?n:r)||void 0===s||s,l="string"==typeof e?{message:e}:e;a.addIssue({code:"custom",...l,fatal:o})}}):eg.create()}eB.create=(e,t)=>new eB({innerType:e,typeName:u.ZodReadonly,...F(t)});let eK={object:ex.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 eH=el.create,eG=eu.create,eY=eF.create,eQ=ed.create,eX=ec.create,e0=ep.create,e1=ef.create,e9=eh.create,e2=em.create,e4=eg.create,e3=ey.create,e6=e_.create,e5=ev.create,e8=eb.create,e7=ex.create,te=ex.strictCreate,tt=ew.create,tr=eS.create,ti=eO.create,ta=eA.create,tn=ej.create,ts=eT.create,to=eC.create,tl=eN.create,tu=eE.create,td=e$.create,tc=eI.create,tp=eZ.create,tf=eP.create,th=eq.create,tm=ez.create,tg=eM.create,ty=eq.createWithPreprocess,t_=eV.create;var tv=Object.freeze({__proto__:null,defaultErrorMap:O,setErrorMap:function(e){A=e},getErrorMap:j,makeIssue:T,EMPTY_PATH:[],addIssueToContext:C,ParseStatus:N,INVALID:E,DIRTY:$,OK:R,isAborted:I,isDirty:Z,isValid:P,isAsync:q,get util(){return a},get objectUtil(){return n},ZodParsedType:x,getParsedType:w,ZodType:D,datetimeRegex:eo,ZodString:el,ZodNumber:eu,ZodBigInt:ed,ZodBoolean:ec,ZodDate:ep,ZodSymbol:ef,ZodUndefined:eh,ZodNull:em,ZodAny:eg,ZodUnknown:ey,ZodNever:e_,ZodVoid:ev,ZodArray:eb,ZodObject:ex,ZodUnion:ew,ZodDiscriminatedUnion:eS,ZodIntersection:eO,ZodTuple:eA,ZodRecord:ej,ZodMap:eT,ZodSet:eC,ZodFunction:eN,ZodLazy:eE,ZodLiteral:e$,ZodEnum:eI,ZodNativeEnum:eZ,ZodPromise:eP,ZodEffects:eq,ZodTransformer:eq,ZodOptional:ez,ZodNullable:eM,ZodDefault:eJ,ZodCatch:eL,ZodNaN:eF,BRAND:eD,ZodBranded:eU,ZodPipeline:eV,ZodReadonly:eB,custom:eW,Schema:D,ZodSchema:D,late:eK,get ZodFirstPartyTypeKind(){return u},coerce:{string:e=>el.create({...e,coerce:!0}),number:e=>eu.create({...e,coerce:!0}),boolean:e=>ec.create({...e,coerce:!0}),bigint:e=>ed.create({...e,coerce:!0}),date:e=>ep.create({...e,coerce:!0})},any:e4,array:e8,bigint:eQ,boolean:eX,date:e0,discriminatedUnion:tr,effect:th,enum:tc,function:tl,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>eW(t=>t instanceof e,t),intersection:ti,lazy:tu,literal:td,map:ts,nan:eY,nativeEnum:tp,never:e6,null:e2,nullable:tg,number:eG,object:e7,oboolean:()=>eX().optional(),onumber:()=>eG().optional(),optional:tm,ostring:()=>eH().optional(),pipeline:t_,preprocess:ty,promise:tf,record:tn,set:to,strictObject:te,string:eH,symbol:e1,transformer:th,tuple:ta,undefined:e9,union:tt,unknown:e3,void:e5,NEVER:E,ZodIssueCode:k,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:S});class tb{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}}
1class tx extends Error{constructor(e="Unsupported"){super(e)}}function tw(){return this._qualifierModel||{error:new tx(`unsupported qualifier ${this.constructor.name}`)}}class tk{constructor(){this._qualifierModel={}}toJson(){return tw.apply(this)}}class tS extends tk{constructor(e,t){super(),this.delimiter="_",this.key=e,t instanceof tb?this.qualifierValue=t:(this.qualifierValue=new tb,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 tO extends tS{constructor(e,t){super("fl",t?new tb([e,`${t}`]).setDelimiter(":"):e),this.flagValue=t}toString(){return super.toString().replace(/\./g,"%2E")}getFlagValue(){return this.flagValue}}function tA(){var e,t,r;let i=this._actionModel&&Object.keys(this._actionModel).length,a=null===(r=null===(t=null===(e=this._actionModel)||void 0===e?void 0:e.source)||void 0===t?void 0:t.transformation)||void 0===r?void 0:r.error;return a&&a instanceof Error?{error:a}:i?this._actionModel:{error:new tx(`unsupported action ${this.constructor.name}`)}}class tj{constructor(){this._actionModel={}}toJson(){return tA.apply(this)}}class tT extends tj{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 tO(r)):this.qualifiers.set(t,new tS(t,r))}else this.qualifiers.set(e.key,e);return this}addFlag(e){return"string"==typeof e?this.flags.push(new tO(e)):e instanceof tO&&this.flags.push(e),this}addValueToQualifier(e,t){return this.qualifiers.get(e).addValue(t),this}}class tC extends tT{constructor(e){super(),this._actionModel={},this.addQualifier(new tS("b",new tb(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 tN{constructor(e){this.raw=e}toString(){return this.raw}toJson(){return{error:new tx(`unsupported action ${this.constructor.name}`)}}}class tE extends tb{constructor(e){super(e),this.val=e}getValue(){return this.val}}function t$(e){let t={};return Object.keys(e).forEach(r=>{t[e[r]]=r}),t}t$({444:"CHROMA_444",420:"CHROMA_420"}),t$({noCmyk:"no_cmyk",keepCmyk:"keep_cmyk",tinySrgb:"tinysrgb",srgbTrueColor:"srgb:truecolor"}),t$({limitFit:"limit",limitFill:"lfill",minimumFit:"mfit",thumbnail:"thumb",limitPad:"lpad",minimumPad:"mpad",autoPad:"auto_pad"});let tR=t$({colorSpace:"cs",dpr:"dpr",density:"dn",defaultImage:"d",format:"f",quality:"q"});t$({redEye:"redeye",advancedRedEye:"adv_redeye",oilPaint:"oil_paint",unsharpMask:"unsharp_mask",makeTransparent:"make_transparent",generativeRestore:"gen_restore",upscale:"upscale"}),t$({autoBest:"auto:best",autoEco:"auto:eco",autoGood:"auto:good",autoLow:"auto:low",jpegminiHigh:"jpegmini:1",jpegminiMedium:"jpegmini:2",jpegminiBest:"jpegmini:0"}),t$({fullHd:"full_hd",fullHdWifi:"full_hd_wifi",fullHdLean:"full_hd_lean",hdLean:"hd_lean"});class tI extends tT{constructor(e,t,r){let i;super(),this._actionModel={},i=t instanceof tE?t.getValue():t,this._actionModel.actionType=tR[e],this._actionModel[r]=i,this.addQualifier(new tS(e,t))}}class tZ extends tO{constructor(e){super("progressive",e)}}class tP extends tI{constructor(e,t){super(e,t,"formatType")}lossy(){return this._actionModel.lossy=!0,this.addFlag(new tO("lossy")),this}progressive(e){return e instanceof tZ?(this._actionModel.progressive={mode:e.getFlagValue()},this.addFlag(e)):(this._actionModel.progressive={mode:e},this.addFlag(new tO("progressive",e))),this}preserveTransparency(){return this._actionModel.preserveTransparency=!0,this.addFlag(new tO("preserve_transparency")),this}static fromJson(e){let t;let{formatType:r,lossy:i,progressive:a,preserveTransparency:n}=e;return t=r?new this("f",r):new this("f"),a&&(a.mode?t.progressive(a.mode):t.progressive()),i&&t.lossy(),n&&t.preserveTransparency(),t}}class tq{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";t=new tN(e)}else t=e;return this.actions.push(t),this}addTransformation(e){return e instanceof tq?this.actions=this.actions.concat(e.actions):this.actions.push(new tN(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 tP("q",e)),this}format(e){return this.addAction(new tP("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 tC(e))}psdTools(e){return this.addAction(e)}extract(e){return this.addAction(e)}addFlag(e){let t=new tT,r=e;return"string"==typeof e&&(r=new tO(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 tz extends tq{}class tM{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 tJ=tM,tL=["cname","secureDistribution","privateCdn","signUrl","longUrlSignature","shorten","useRootPath","secure","forceVersion","analytics","queryParams"];class tF extends tJ{constructor(e){super(),Object.assign(this,{secure:!0},this.filterOutNonSupportedKeys(e,tL))}extend(e){return new tF(Object.assign({},this,this.filterOutNonSupportedKeys(e,tL)))}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 tD(e,t,r){let i=t>>0,a=String(void 0!==r?r:" ");return e.length>i?String(e):((i-=e.length)>a.length&&(a+=function(e,t){let r=t,i="";for(;r>0;)i+=e,r--;return i}(a,i/a.length)),a.slice(0,i)+String(e))}let tU={},tV=0;function tB(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 tD(e,2,"0")}).join(".")})(e).split(".").join("")).toString(2);if((i=tD(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+=tU[e]}),t}"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(e=>{let t=tV.toString(2);tU[t=tD(t,6,"0")]=e,tV++});var tW=r(7836);function tK(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 tW.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=tB(t.sdkSemver),i=tB(e),a=t.feature,n=t.sdkCode,s=t.product;return`B${s}${n}${r}${i}${a}`}catch(e){return"E"}}let tH={"image/upload":"images","image/private":"private_images","image/authenticated":"authenticated_images","raw/upload":"files","video/upload":"videos"};class tG{constructor(e,t={},r){this.setPublicID(e),this.setCloudConfig(t),this.setURLConfig(r)}setURLConfig(e){return this.urlConfig=new tF(e),this}setCloudConfig(e){return this.cloudName=e.cloudName,this.apiKey=e.apiKey,this.apiSecret=e.apiSecret,this.authToken=e.authToken,this}setPublicID(e){return this.publicID=e?e.toString():"",this}setDeliveryType(e){return this.deliveryType=e,this}setSuffix(e){return this.suffix=e,this}setSignature(e){return this.signature=e,this}setVersion(e){return e&&(this.version=e),this}setAssetType(e){return e&&(this.assetType=e),this}sign(){return this}toURL(e={}){return this.createCloudinaryURL(null,e.trackedAnalytics)}validateAssetForURLCreation(){if(void 0===this.cloudName)throw"You must supply a cloudName when initializing the asset";let e=this.suffix&&this.suffix.indexOf(".")>=0,t=this.suffix&&this.suffix.indexOf("/")>=0;if(e||t)throw"`suffix`` should not include . or /"}getResourceType(){var e,t;let r=(e=this.assetType)?e:"image",i=(t=this.deliveryType)?t:"upload",a=!!this.suffix,n=`${r}/${i}`,s=tH[`${r}/${i}`],o=this.urlConfig.useRootPath,l=this.urlConfig.shorten;if(o){if("image/upload"===n)return"";throw Error(`useRootPath can only be used with assetType: 'image' and deliveryType: 'upload'. Provided: ${n} instead`)}if(l&&"image/upload"===n)return"iu";if(a){if(s)return s;throw Error(`URL Suffix only supported for ${Object.keys(tH).join(", ")}, Provided: ${n} instead`)}return n}getSignature(){return this.signature?`s--${this.signature}--`:""}createCloudinaryURL(e,t){var r,i,a;
1if(!this.publicID)return"";this.validateAssetForURLCreation();let n=function(e,t){let r=t.secure,i=t.privateCdn,a=t.cname,n=t.secureDistribution;return r||a?r&&!n&&i?`https://${e}-res.cloudinary.com`:r&&!n?`https://res.cloudinary.com/${e}`:r&&n&&i?`https://${n}`:r&&n?`https://${n}/${e}`:!r&&a?`http://${a}/${e}`:"ERROR":`http://res.cloudinary.com/${e}`}(this.cloudName,this.urlConfig),s=e?e.toString():"",o=(r=this.publicID,i=this.version,a=this.urlConfig.forceVersion,i?`v${i}`:r.match(/^v[0-9]+/)||r.match(/^https?:\//)||0>r.indexOf("/")?"":!1!==a?"v1":""),l=this.publicID;if("string"==typeof e)return[n,this.getResourceType(),this.getSignature(),s,o,l.replace(/,/g,"%2C"),this.suffix].filter(e=>e).join("/");{let e=[encodeURI(n),this.getResourceType(),this.getSignature(),encodeURI(s),o,encodeURI(l).replace(/,/g,"%2C"),this.suffix&&encodeURI(this.suffix)].filter(e=>e).join("/").replace(/\?/g,"%3F").replace(/=/g,"%3D"),r=!1!==this.urlConfig.analytics&&!l.includes("?"),i="";if("object"==typeof this.urlConfig.queryParams)try{let e=new URLSearchParams(this.urlConfig.queryParams);r&&e.set("_a",tK(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=${tK(t)}`);return i?`${e}?${i}`:e}}}
1class tY extends tG{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 tP("q",e)),this}format(e){return this.addAction(new tP("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 tQ extends tY{constructor(e,t,r){super(e,t,r,new tz)}}class tX extends tq{}class t0 extends tY{constructor(e,t,r){super(e,t,r,new tX),this.assetType="video"}transcode(e){return this.transformation.transcode(e),this}videoEdit(e){return this.transformation.videoEdit(e),this}}class t1{constructor(e){e&&(this.cloudinaryConfig=e)}image(e){return new tQ(e,this.cloudinaryConfig.cloud,this.cloudinaryConfig.url)}video(e){return new t0(e,this.cloudinaryConfig.cloud,this.cloudinaryConfig.url)}setConfig(e){return this.cloudinaryConfig=e,this}getConfig(){return this.cloudinaryConfig}extendConfig(){}}var t9=r(7836),t2=Object.defineProperty,t4={};((e,t)=>{for(var r in t)t2(e,r,{get:t[r],enumerable:!0})})(t4,{angle:()=>t8,aspectRatio:()=>re,aspectRatioModesEnum:()=>t7,crop:()=>rt,cropModesEnum:()=>t3,extractMode:()=>rr,extractModesEnum:()=>t6,flags:()=>ri,flagsEnum:()=>t5,format:()=>ra,gravity:()=>rn,height:()=>rs,multiple:()=>ro,prompt:()=>rl,width:()=>ru,x:()=>rd,y:()=>rc,zoom:()=>rp});var t3=tv.enum(["auto","crop","fill","fill_pad","fit","imagga_crop","imagga_scale","lfill","limit","lpad","mfit","mpad","pad","scale","thumb"]),t6=tv.enum(["content","mask"]),t5=tv.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"]),t8={qualifier:"a",schema:tv.union([tv.string(),tv.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"}))},t7=tv.enum(["vflip","hflip","ignore","auto_right","auto_left"]),re={qualifier:"ar",schema:tv.union([tv.number(),t7,tv.intersection(tv.string(),tv.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"}))},rt={qualifier:"c",schema:t3.describe(JSON.stringify({text:"Mode to use when cropping an asset.",url:"https://cloudinary.com/documentation/transformation_reference#c_crop_resize"}))}
1,rr={schema:t6.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"}))},ri={qualifier:"fl",schema:tv.union([t5,tv.array(t5)]).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"}))},ra={qualifier:"f",schema:tv.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"}))},rn={qualifier:"g",schema:tv.union([tv.enum(["auto","auto_content_aware","center","custom","east","face","face_center","multi_face","north","north_east","north_west","south","south_east","south_west","west"]),tv.intersection(tv.string(),tv.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"}))},rs={qualifier:"h",schema:tv.union([tv.number(),tv.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"}))},ro={schema:tv.boolean().describe(JSON.stringify({text:"Should generative AI features detect multiple instances."}))},rl={schema:tv.string().describe(JSON.stringify({text:"Natural language descriptions used for generative AI capabilities."}))},ru={qualifier:"w",schema:tv.union([tv.number(),tv.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"}))},rd={qualifier:"x",schema:tv.union([tv.string(),tv.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"}))},rc={qualifier:"y",schema:tv.union([tv.string(),tv.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"}))},rp={schema:tv.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"}))},rf=[{test:function(e){return"string"==typeof e&&!!e.startsWith("#")},convert:function(e){return`rgb:${e.replace("#","")}`}}],rh={aspectRatio:re,crop:rt,gravity:rn,height:rs,width:ru},rm={angle:t8,gravity:rn,x:rd,y:rc},rg={alignment:{qualifier:!1,order:6},antialias:{qualifier:"antialias"},border:{qualifier:"bo",location:"primary"},color:{qualifier:"co",location:"primary",converters:rf},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}},ry={angle:t8,art:{prefix:"e",qualifier:"art",schema:tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.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:rf}
1,colorize:{prefix:"e",qualifier:"colorize",schema:tv.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:tv.union([tv.string(),tv.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:tv.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:tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.boolean(),tv.number(),tv.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:tv.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:tv.union([tv.string(),tv.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:tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.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:tv.union([tv.string(),tv.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:tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.boolean()]).describe(JSON.stringify({text:"Applies a sharpening filter.",url:"https://cloudinary.com/documentation/transformation_reference#e_sharpen"}))},shear:{prefix:"e",qualifier:"shear",schema:tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.boolean()]).describe(JSON.stringify({text:"Vectorizes an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_vectorize"}))},vibrance:{prefix:"e",qualifier:"vibrance",schema:tv.union([tv.string(),tv.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:tv.union([tv.string(),tv.boolean()]).describe(JSON.stringify({text:"Applies a vignette effect to an image.",url:"https://cloudinary.com/documentation/transformation_reference#e_vignette"}))}};function r_({prefix:e,qualifier:t,value:r,converters:i}){let a="";e&&(a=`${e}_`);let n=r;return(i?.forEach(({test:e,convert:t})=>{e(n)&&(n=t(n))}),!0===n||"true"===n)?`${a}${t}`:"string"==typeof n||"number"==typeof n?e?`${a}${t}:${n}`:`${t}_${n}`:void 0}function rv(e){return`(${e.join(";")})`}function rb(e){return"string"!=typeof e?e:parseInt(e)}var rx=["auto","crop","fill","lfill","fill_pad","thumb"],rw=["auto","crop","fill","lfill","fill_pad","thumb"],rk=["crop","thumb"],rS="limit",rO=tv.object({aspectRatio:re.schema.optional(),type:rt.schema,gravity:rn.schema.optional(),height:rs.schema.optional(),width:ru.schema.optional(),x:rd.schema.optional(),y:rc.schema.optional(),zoom:rp.schema.optional(),source:tv.boolean().optional()}),rA={aspectRatio:re.schema.optional(),crop:tv.union([rt.schema,rO,tv.array(rO)]).default(rS).optional(),gravity:rn.schema.optional(),zoom:rp.schema.optional()},rj={angle:ry.angle.schema.optional(),art:ry.art.schema.optional(),autoBrightness:ry.autoBrightness.schema.optional(),autoColor:ry.autoColor.schema.optional(),autoContrast:ry.autoContrast.schema.optional(),assistColorblind:ry.assistColorblind.schema.optional(),background:ry.background.schema.optional(),blackwhite:ry.blackwhite.schema.optional(),blur:ry.blur.schema.optional(),blurFaces:ry.blurFaces.schema.optional(),blurRegion:ry.blurRegion.schema.optional(),border:ry.border.schema.optional(),brightness:ry.brightness.schema.optional(),brightnessHSB:ry.brightnessHSB.schema.optional(),cartoonify:ry.cartoonify.schema.optional(),color:ry.color.schema.optional(),colorize:ry.colorize.schema.optional(),contrast:ry.contrast.schema.optional(),distort:ry.distort.schema.optional(),fillLight:ry.fillLight.schema.optional(),gamma:ry.gamma.schema.optional(),gradientFade:ry.gradientFade.schema.optional(),grayscale:ry.grayscale.schema.optional(),improve:ry.improve.schema.optional(),loop:ry.loop.schema.optional(),multiply:ry.multiply.schema.optional(),negate:ry.negate.schema.optional(),oilPaint:ry.oilPaint.schema.optional(),opacity:ry.opacity.schema.optional(),outline:ry.outline.schema.optional(),pixelate:ry.pixelate.schema.optional(),pixelateFaces:ry.pixelateFaces.schema.optional(),pixelateRegion:ry.pixelateRegion.schema.optional(),radius:ry.radius.schema.optional(),redeye:ry.redeye.schema.optional(),replaceColor:ry.replaceColor.schema.optional(),saturation:ry.saturation.schema.optional(),screen:ry.screen.schema.optional(),sepia:ry.sepia.schema.optional(),shadow:ry.shadow.schema.optional(),sharpen:ry.sharpen.schema.optional(),shear:ry.shear.schema.optional(),simulateColorblind:ry.simulateColorblind.schema.optional(),tint:ry.tint.schema.optional(),trim:ry.trim.schema.optional(),unsharpMask:ry.unsharpMask.schema.optional(),vectorize:ry.vectorize.schema.optional(),vibrance:ry.vibrance.schema.optional(),vignette:ry.vignette.schema.optional()},rT={effects:tv.array(tv.object(rj)).describe(JSON.stringify({text:"Array of objects specifying transformations to be applied to asset."})).optional(),...rj},{flagsEnum:rC}=t4,rN={flags:ri.schema.optional()},rE=tv.string(),r$={namedTransformations:tv.union([rE,tv.array(rE)]).describe(JSON.stringify({text:"Named transformations to apply to asset.",url:"https://cloudinary.com/documentation/image_transformations#named_transformations"})).optional(),transformations:tv.union([rE,tv.array(rE)]).describe(JSON.stringify({text:"Deprecated: use namedTransformations instead",url:"https://cloudinary.com/documentation/image_transformations#named_transformations"})).optional()},rR=tv.object({alignment:tv.string().optional(),antialias:tv.string().optional(),border:tv.string().optional(),color:tv.string().optional(),fontFamily:tv.string().optional(),fontSize:tv.number().optional(),fontStyle:tv.union([tv.string(),tv.number()]).optional(),fontWeight:tv.string().optional(),hinting:tv.union([tv.string(),tv.number()]).optional(),letterSpacing:tv.union([tv.string(),tv.number()]).optional(),lineSpacing:tv.union([tv.string(),tv.number()]).optional(),stroke:tv.string().optional(),text:tv.string()}),rI=tv.object({angle:t8.schema.optional(),gravity:rn.schema.optional(),x:rd.schema.optional(),y:rc.schema.optional()}),rZ=tv.object({appliedEffects:tv.array(tv.object({})).optional(),appliedFlags:ri.schema.optional(),effects:tv.array(tv.object({})).optional(),crop:rt.schema.optional(),flags:ri.schema.optional(),height:rs.schema.optional(),position:rI.optional(),publicId:tv.string().optional(),text:tv.union([tv.string(),rR]).optional(),url:tv.string().optional(),width:ru.schema.optional()}),rP={color:"black",fontFamily:"Arial",fontSize:200,fontWeight:"bold"},rq={overlay:rZ.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:tv.array(rZ).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:tv.string().describe(JSON.stringify({text:"Text to be overlaid on asset.",url:"https://cloudinary.com/documentation/image_transformations#transformation_url_structure"})).optional()},rz={preserveTransformations:tv.boolean().describe(JSON.stringify({text:"Preserves transformations from a Cloudinary U
1RL when using using a Cloudinary URL as the asset source (src)."})).optional()},rM=tv.string(),rJ={rawTransformations:tv.union([rM,tv.array(rM)]).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()},rL={removeBackground:tv.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()},rF={sanitize:tv.boolean().describe(JSON.stringify({text:"Runs a sanitizer on SVG images.",url:"https://cloudinary.com/documentation/transformation_reference#fl_sanitize"})).optional()},rD={seoSuffix:tv.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()},rU=tv.object({angle:t8.schema.optional(),gravity:rn.schema.optional(),x:rd.schema.optional(),y:rc.schema.optional()}),rV=tv.object({appliedEffects:tv.array(tv.object({})).optional(),appliedFlags:ri.schema.optional(),effects:tv.array(tv.object({})).optional(),crop:rt.schema.optional(),flags:ri.schema.optional(),height:rs.schema.optional(),position:rU.optional(),publicId:tv.string().optional(),type:tv.string().optional(),url:tv.string().optional(),width:ru.schema.optional()}),rB={underlay:tv.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:tv.array(rV).describe(JSON.stringify({text:"Image layers that are applied under the base image.",url:"https://cloudinary.com/documentation/transformation_reference#l_layer"})).optional()},rW={version:tv.union([tv.number(),tv.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()},rK=tv.object({assetType:tv.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:tv.string().default("upload").describe(JSON.stringify({text:"Delivery method of the asset.",url:"https://cloudinary.com/documentation/image_transformations#delivery_types"})).optional(),dpr:tv.union([tv.string(),tv.number()]).describe(JSON.stringify({text:"Delivery method of the asset.",url:"https://cloudinary.com/documentation/image_transformations#delivery_types"})).optional(),format:tv.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:tv.union([tv.string(),tv.number()]).describe(JSON.stringify({text:"Height of the given asset."})).optional(),quality:tv.union([tv.string(),tv.number(),tv.string()]).default("auto").describe(JSON.stringify({text:"Quality of the delivered asset",url:"https://cloudinary.com/documentation/transformation_reference#q_quality"})).optional(),src:tv.string().describe(JSON.stringify({text:"Cloudinary Public ID or versioned Cloudinary URL (/v1234/)"})),strictTransformations:tv.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:tv.union([tv.string(),tv.number()]).describe(JSON.stringify({text:"Width of the given asset."})).optional(),...rA,...rT,...rN,...r$,...rq,...rz,...rJ,...rL,...rF,...rD,...rB,...rW}),rH={defaultImage:tv.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()},rG={enhance:tv.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()},rY={extract:tv.union([rl.schema.optional(),tv.array(rl.schema).optional(),tv.object({invert:tv.boolean().default(!1).optional(),mode:rr.schema.optional(),multiple:ro.schema.default(!1).optional(),prompt:tv.union([rl.schema,tv.array(rl.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 rQ(e){return"string"==typeof e?e:Array.isArray(e)?`(${e.filter(e=>"string"==typeof e).join(";")})`:void 0}var rX={fillBackground:tv.union([tv.boolean(),tv.object({crop:rt.schema.optional(),gravity:rn.schema.optional(),prompt:tv.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()},r0=tv.union([tv.string(),tv.array(tv.string())]),r1=tv.object({prompt:r0.optional(),to:tv.string().optional(),multiple:tv.boolean().optional()}),r9={recolor:tv.union([r0,r1]).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()},r2=tv.union([tv.string(),tv.array(tv.string())]),r4=tv.object({prompt:r2.optional(),region:tv.union([tv.array(tv.number()),tv.array(tv.array(tv.number()))]).optional(),multiple:tv.boolean().optional(),removeShadow:tv.boolean().optional()}),r3={remove:tv.union([r2,r4]).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()},r6={replaceBackground:tv.union([tv.boolean(),tv.string(),tv.object({seed:tv.number().optional(),prompt:tv.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()},r5={replace:tv.union([tv.array(tv.string()),tv.array(tv.boolean()),tv.object({to:tv.string(),from:tv.string(),preserveGeometry:tv.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()},r8={restore:tv.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()},r7={zoompan:tv.union([tv.string(),tv.boolean(),tv.object({loop:ry.loop.schema.optional(),options:tv.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()},ie=rK.merge(tv.object({...rH,...rG,...rY,...rX,...r9,...r3,...r5,...r6,...r8,...r7})),it={streamingProfile:tv.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()},ir=rK.merge(tv.object({...it})),ii=tv.any(),ia=tv.any(),is=[{props:rG,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{enhance:i=!1}=r;return i&&t.effect("e_enhance"),{}}},{props:rY,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{extract:i}=r;if(!i||void 0===i)return{};let a=[];if("string"==typeof i)a.push(`prompt_${i}`);else if(Array.isArray(i))a.push(`prompt_${rQ(i)}`);else if("object"==typeof i&&!Array.isArray(i)){let e=rQ(i.prompt);e&&a.push(`prompt_${e}`),!0===i.invert&&a.push("invert_true"),"string"==typeof i.mode&&a.push(`mode_${i.mode}`),!0===i.multiple&&a.push("multiple_true")}if(a.length>0){let e=`e_extract:${a.join(";")}`;t.addTransformation(e)}return{}}},{props:r9,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{recolor:i}=r,a={prompt:void 0,"to-color":void 0,multiple:void 0};Array.isArray(i)?(Array.isArray(i[0])?a.prompt=rv(i[0]):a.prompt=i[0],"string"==typeof i[1]&&(a["to-color"]=i[1])):"object"==typeof i&&("string"==typeof i.prompt?a.prompt=i.prompt:Array.isArray(i.prompt)&&(a.prompt=rv(i.prompt)),"string"==typeof i.to&&(a["to-color"]=i.to),!0===i.multiple&&(a.multiple="true"));let n=Object.entries(a).filter(([,e])=>!!e).map(([e,t])=>`${e}_${t}`).join(";");return n&&t.addTransformation(`e_gen_recolor:${n}`),{}}},{props:rL,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}
1=e,{removeBackground:i=!1}=r;return i&&t.effect("e_background_removal"),{}}},{props:r3,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=rv(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=rv(r.prompt)),Array.isArray(r.region)&&(i.region=function e(t){let r={0:"x",1:"y",2:"w",3:"h"},i=t.map((t,i)=>{if(Array.isArray(t))return e(t);let a=r[i];return`${a}_${t}`}).join(";");return`(${i})`}(r.region)),!0===r.multiple&&(i.multiple="true"),!0===r.removeShadow&&(i["remove-shadow"]="true")}let a=Object.entries(i).filter(([,e])=>!!e).map(([e,t])=>`${e}_${t}`).join(";");return a&&e.addTransformation(`e_gen_remove:${a}`),{}}},{props:r5,assetTypes:["image","images"],plugin:({cldAsset:e,options:t})=>{let{replace:r=null}=t;if(r){let t,i,a=!1;Array.isArray(r)?(t=r[0],i=r[1],a=r[2]||!1):(t=r.from,i=r.to,a=r.preserveGeometry||!1);let n=[`e_gen_replace:from_${t}`,`to_${i}`];a&&n.push(`preserve-geometry_${a}`),e.effect(n.join(";"))}return{}}},{props:r6,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{replaceBackground:i}=r;if(!i||void 0===i)return{};let a=[];"object"==typeof i?(void 0!==i.prompt&&a.push(`prompt_${i.prompt}`),"number"==typeof i.seed&&a.push(`seed_${i.seed}`)):"string"==typeof i&&a.push(`prompt_${i}`);let n="e_gen_background_replace";return a.length>0&&(n=`${n}:${a.join(";")}`),t.addTransformation(n),{}}},{props:r8,assetTypes:["image","images"],plugin:({cldAsset:e,options:t})=>{let{restore:r=!1}=t;return r&&e.effect("e_gen_restore"),{}}},{props:rA,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||rS,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:rS,zoom:r.zoom});let a=[],n=[];for(let e of i){let t={width:e.width,height:e.height};void 0===t.width&&void 0===e.aspectRatio&&(t.width=r.width,void 0===t.height&&(t.height=r.height));let i=function(e){let{aspectRatio:t,type:r,x:i,y:a,zoom:n}=e,s=e.gravity,o=rb(e.height),l=rb(e.width),u=[],d=t&&rx.includes(r),c="number"==typeof i||"string"==typeof i,p="number"==typeof a||"string"==typeof a,f=c||p;return r&&(o||l||d||f)&&u.push(`c_${r}`),d&&u.push(`ar_${t}`),l&&u.push(`w_${l}`),["limit"].includes(r)||"number"!=typeof o||u.push(`h_${o}`),c&&u.push(`x_${i}`),p&&u.push(`y_${a}`),!s&&rw.includes(r)&&!f&&(s="auto"),s&&("auto"!==s||rw.includes(r)?u.push(`g_${s}`):console.warn(`Auto gravity can only be used with crop modes: ${rw.join(", ")}. Not applying gravity.`)),n&&("auto"!==n||rk.includes(r)?u.push(`z_${n}`):console.warn(`Zoom can only be used with crop modes: ${rk.join(", ")}. Not applying zoom.`)),u}({aspectRatio:e.aspectRatio,gravity:e.gravity,type:e.type||rS,x:e.x,y:e.y,zoom:e.zoom,...t});i.length>0&&(!0===e.source?n.push(i):a.push(i))}n.forEach(e=>{e.length>0&&t.addTransformation(e.join(","))});let s={options:{}};return s.options&&a.length>0&&(s.options.resize=a.map(e=>e.join(",")).join("/")),s}},{props:rz,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:rJ,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:it,assetTypes:["video","videos"],plugin:e=>{let{cldAsset:t,options:r}=e,{streamingProfile:i}=r;return"string"==typeof i&&t.addTransformation(`sp_${i}`),{}}},{props:rH,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:rT,assetTypes:["image","images","video","videos"],plugin:e=>{let{cldAsset:t,options:r}=e;function i({effects:e,options:t}){return Object.keys(e).map(r=>{let{prefix:i,qualifier:a,converters:n}=e[r];return r_({qualifier:a,prefix:i,value:t?.[r],converters:n})})}return i({effects:ry,options:r}).filter(e=>
1!!e).forEach(e=>t.effect(e)),Array.isArray(r?.effects)&&r?.effects.forEach(e=>{let r=i({effects:ry,options:e}).filter(e=>!!e).join(",");t.effect(r)}),{}}},{props:rX,assetTypes:["image","images"],plugin:e=>{let{cldAsset:t,options:r}=e,{fillBackground:i}=r;if(void 0===i)return{};let a=rb(r.width),n=rb(r.height),s=r.aspectRatio;if(s||"number"!=typeof n||"number"!=typeof a||(s=`${a}:${n}`),!s)return{};if(!0===i){let e=["b_gen_fill",`ar_${s}`,"c_pad"];t.addTransformation(e.join(","))}else if("object"==typeof i){let{crop:e="pad",gravity:r,prompt:a}=i,n=[`ar_${s}`,`c_${e}`];"string"==typeof a?n.unshift(`b_gen_fill:${a}`):n.unshift("b_gen_fill"),"string"==typeof r&&n.push(`g_${r}`),t.addTransformation(n.join(","))}return{}}},{props:rN,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}=rC.safeParse(e);r&&t.addFlag(e)}):"object"==typeof i&&Object.entries(i).forEach(([e,r])=>{let{success:i}=rC.safeParse(e);i&&t.addTransformation(`fl_${e}:${r}`)}),{}}},{props:rq,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{text:r,overlays:i=[]}=t;function a({publicId:t,url:r,position:i,text:a,effects:n=[],appliedEffects:s=[],flags:o=[],appliedFlags:l=[],...u}){let d;let c="string"==typeof t,p="string"==typeof r,h="object"==typeof a||"string"==typeof a,m="object"==typeof i;if(!c&&!p&&!h){console.warn("An overlay is missing Public ID, URL, or Text");return}h?d="l_text":c?d=`l_${t.replace(/\//g,":")}`:p&&(d=`l_fetch:${"function"==typeof btoa?btoa(r):void 0!==f?f.from(r).toString("base64"):void 0}`);let g=[],y=[];if(Object.keys(u).forEach(e=>{if(!b(rh,e))return;let{qualifier:t,converters:r}=rh[e],i=r_({qualifier:t,value:u[e],converters:r});i&&g.push(i)}),n.forEach(e=>{Object.keys(e).forEach(t=>{let r=rh[t]||ry[t]||rm[t];if(!r)return;let{qualifier:i,prefix:a,converters:n}=r,s=r_({qualifier:i,prefix:a,value:e[t],converters:n});s&&g.push(s)})}),s.forEach(e=>{Object.keys(e).forEach(t=>{let r=rh[t]||ry[t]||rm[t];if(!r)return;let{qualifier:i,prefix:a,converters:n}=r,s=r_({qualifier:i,prefix:a,value:e[t],converters:n});s&&y.push(s)})}),(Array.isArray(o)?o:[o]).forEach(e=>{let{success:t}=t5.safeParse(e);t&&g.push(`fl_${e}`)}),(Array.isArray(l)?l:[l]).forEach(e=>{let{success:t}=t5.safeParse(e);t&&y.push(`fl_${e}`)}),h){"string"==typeof a&&(a={...rP,text:a});let e=[];
1if("object"==typeof a)for(let t of function(e=[],t,r="asc"){let i=[...e];return"string"!=typeof t?i:(i=i.sort(function(e,r){let i=e[t],a=r[t];return("string"==typeof i&&(i=i.toLowerCase()),"string"==typeof a&&(a=a.toLowerCase()),i<a)?-1:i>a?1:0}),"desc"===r)?i.reverse():i}(Object.keys(a).filter(e=>b(rg,e)).map(e=>{let t=a&&b(a,e)&&a[e];return{...rg[e],key:e,value:t,order:rg[e].order||99}}),"order")){let{key:r,value:i,qualifier:a,location:n,converters:s}=t,o=i;s?.forEach(({test:e,convert:t})=>{e(i)&&(o=t(i))}),"primary"===n?g.push(`${a}_${o}`):"self"===a?e.push(r):a?e.push(`${a}_${o}`):e.push(o)}let t={".":"%2E",",":"%2C","/":"%2F"},r=a?.text||"";"string"==typeof r&&Object.keys(t)?.forEach(e=>{r=r?.replace(e,t[e])}),d=`${d}:${e.join("_")}:${r}`}m&&Object.keys(i).forEach(e=>{if(!b(rm,e)||!b(i,e))return;let{qualifier:t,converters:r}=rm[e],a=r_({qualifier:t,value:i[e],converters:r});a&&y.push(a)}),g.length>0&&(d=`${d},${g.join(",")}`),d=`${d}/fl_layer_apply,fl_no_overflow`,y.length>0&&(d=`${d},${y.join(",")}`),e.addTransformation(d)}return Array.isArray(i)&&i.forEach(a),"string"==typeof r?a({text:Object.assign({},rP,{text:r})}):"object"==typeof r&&a({text:Object.assign({},rP,r)}),{}}},{props:rF,assetTypes:["image","images"],plugin:({cldAsset:e,options:t})=>{let{sanitize:r=!0}=t;return r&&("svg"===t.format||e.publicID.endsWith(".svg"))&&e.effect("fl_sanitize"),{}}},{props:r$,strict:!0,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{transformations:r,namedTransformations:i}=t;r&&"development"===t9.env.NODE_ENVIRONMENT&&console.warn("The transformations prop is deprecated. Please use namedTransformations instead.");let a=i||r||[];return Array.isArray(a)||(a=[a]),a.forEach(t=>{e.addTransformation(`t_${t}`)}),{}}},{props:rD,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:rB,assetTypes:["image","images","video","videos"],plugin:({cldAsset:e,options:t})=>{let{underlay:r,underlays:i=[]}=t;function a({publicId:t,type:r,position:i,effects:a=[],flags:n=[],appliedFlags:s=[],...o}){let l="object"==typeof i;if("string"!=typeof t){console.warn(`An ${r} is missing a Public ID`);return}let u=`u_${t.replace(/\//g,":")}`,d=[],c=[];Object.keys(o).forEach(e=>{if(!b(rh,e))return;let{qualifier:t}=rh[e];d.push(`${t}_${o[e]}`)}),a.forEach(e=>{Object.keys(e).forEach(t=>{if(!b(rh,t))return;let{qualifier:r}=rh[t];d.push(`${r}_${e[t]}`)})}
1),l&&Object.keys(i).forEach(e=>{if(!b(rm,e))return;let{qualifier:t}=rm[e];c.push(`${t}_${i[e]}`)}),(Array.isArray(n)?n:[n]).forEach(e=>{let{success:t}=t5.safeParse(e);t&&d.push(`fl_${e}`)}),(Array.isArray(s)?s:[s]).forEach(e=>{let{success:t}=t5.safeParse(e);t&&c.push(`fl_${e}`)}),u=`${u},${d.join(",")}`,u=`${u}/fl_layer_apply,fl_no_overflow`,c.length>0&&(u=`${u},${c.join(",")}`),e.addTransformation(u)}return Array.isArray(i)&&i.forEach(a),"string"==typeof r&&a({publicId:r,crop:"fill",width:"1.0",height:"1.0",flags:["relative"]}),{}}},{props:rW,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:r7,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}}}],io=tv.union([ie,ir]).describe(JSON.stringify({text:"Asset options (Image or Video) that define delivery URL including public ID and transformations.",path:"/url-loader/assetoptions"}));function il(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}tv.object({analytics:tv.union([ii,tv.boolean()]).describe(JSON.stringify({text:"Tech, dependency, and feature identifiers for tracking SDK usage related to Cloudinary.",path:"/url-loader/analyticsoptions"})).optional(),config:ia.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:io}),r(3368);var iu=r(8133),id={abort:"onAbort","batch-cancelled":"onBatchCancelled",close:"onClose","display-changed":"onDisplayChanged",publicid:"onPublicId","queues-end":"onQueuesEnd","queues-start":"onQueuesStart",retry:"onRetry","show-completed":"onShowCompleted","source-changed":"onSourceChanged",success:"onSuccess",tags:"onTags","upload-added":"onUploadAdded"},ic=r(7836),ip=im("15.0.4"),ih=im("6.16.0");function im(e){let t=e;return t.includes("-")&&(t=t.split("-")[0]),t}function ig(e){let t=e?.cloud?.cloudName??"dfq2mhbki";if(!t)throw Error("A Cloudinary Cloud name is required, please make sure NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME is set and configured in your environment.");let r=e?.cloud?.apiKey??ic.env.NEXT_PUBLIC_CLOUDINARY_API_KEY,i=e?.url?.secureDistribution??ic.env.NEXT_PUBLIC_CLOUDINARY_SECURE_DISTRIBUTION,a=e?.url?.privateCdn??ic.env.NEXT_PUBLIC_CLOUDINARY_PRIVATE_CDN;return Object.assign({cloud:{...e?.cloud,apiKey:r,cloudName:t},url:{...e?.url,secureDistribution:i,privateCdn:a}},e)}function iy(e,t,r){return function({options:e,config:t={},analytics:r}){let i,a;!1===r&&(void 0===t?.url&&(t.url={}),t.url.analytics=!1);let n=new t1(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=[];is.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)?a=n.image(i):["video","videos"].includes(e.assetType)&&(a=n.video(i)),void 0===a)throw Error("Invalid asset type.");let l={};if(is.forEach(({plugin:t,assetTypes:r,props:i,strict:n})=>{let s=e?.assetType!==void 0&&r.includes(e.assetType),o=Object.keys(i),u=Object.keys(e),d=o.map(e=>u.includes(e)).filter(e=>!!e).length>0;if(!s){d&&console.warn(`One of the following props [${o.join(", ")}] was used with an unsupported asset type [${e?.assetType}]`);return}if(e.strictTransformations&&!n){d&&console.warn(`One of the following props [${o.join(", ")}] was used that is not supported with Strict Transformations.`);return}let{options:c}=t({cldAsset:a,options:e})||{options:void 0};Object.assign(l,c)}),"string"==typeof l.resize&&a.addTransformation(l.resize),a.setDeliveryType(e?.deliveryType||"upload"),!e.strictTransformations){if(e?.d
1pr){let t=e.dpr;"number"==typeof t&&(t=t.toFixed(1)),a.addTransformation(`dpr_${t}`)}let t=e?.format==="default",r=il("f_",a,{matchType:"startsWith"}),i=r&&void 0!==e?.format;(l?.format||!t&&(!r||i))&&a.format(e?.format||l?.format||"auto");let n=e?.quality==="default",s=il("q_",a,{matchType:"startsWith"}),o=s&&void 0!==e?.quality;n||s&&!o||a.quality(e?.quality||"auto")}return a.toURL({trackedAnalytics:r})}({options:e,config:ig(t),analytics:Object.assign({product:"A",sdkCode:"V",sdkSemver:ih,techVersion:ip,feature:""},r)})}(0,d.forwardRef)(function(e,t){let r=!1,i=["assetType","config","deliveryType","strictTransformations"];is.forEach(({props:e})=>{Object.keys(e).forEach(e=>{if(i.includes(e))throw Error(`Option ${e} already exists!`);i.push(e)})});let a={alt:e.alt,src:e.src};Object.keys(e).filter(e=>"string"==typeof e&&!i.includes(e)).forEach(t=>a[t]=e[t]);let n=Object.keys(a).map(e=>`${e}:${a[e]}`).join(";"),[s,o]=(0,d.useState)(n),l={};async function u(t){let i=!0;if(r)return;if(r=!0,"function"==typeof e.onError){let r=e.onError(t);"boolean"==typeof r&&!1===r&&(i=!1)}else"boolean"==typeof e.onError&&!1===e.onError&&(i=!1);if(!1===i)return;let a=t.target,s=await p({src:a.src});s.error,s.success&&o(`${n};${Date.now()}`)}i.forEach(t=>{let r=e[t];r&&(l[t]=r)}),!0===e.unoptimized&&(a.src=iy({...l,width:a.width,height:a.height,src:a.src,format:"default",quality:"default"},e.config));let f=(0,d.useCallback)(u,[p,n]),h=c;return"default"in h&&(h=h.default),d.createElement(h,{key:s,...a,loader:t=>(function({loaderOptions:e,imageProps:t,cldOptions:r,cldConfig:i={}}){let a={...t,...r};if(a.width="string"==typeof a.width?parseInt(a.width):a.width,a.height="string"==typeof a.height?parseInt(a.height):a.height,"number"==typeof e?.width&&"number"==typeof a.width&&e.width!==a.width){let t=e.width/a.width;a.width=e.width,"number"==typeof a.height&&(a.height=Math.floor(a.height*t))}else"number"==typeof e?.width&&"number"!=typeof a?.width&&(a.width=e?.width);return iy(a,i)})({loaderOptions:t,imageProps:a,cldOptions:l,cldConfig:e.config}),onError:f,ref:t})});var i_=({children:e,config:t,onError:r,onOpen:i,onUpload:a,options:n,signatureEndpoint:s,uploadPreset:o,...l})=>{let u=(0,d.useRef)(),c=(0,d.useRef)(),[p,f]=(0,d.useState)(void 0),[h,m]=(0,d.useState)(void 0),[g,y]=(0,d.useState)(!0),_=ig(t),v=s&&function({signatureEndpoint:e,fetch:t}){return function(r,i){if(void 0===e)throw Error("Failed to generate signature: signatureEndpoint property undefined.");if(void 0===t)throw Error("Failed to generate signature: fetch property undefined.");t(e,{method:"POST",body:JSON.stringify({paramsToSign:i}),headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{r(e.signature)}).catch(e=>{r(null,e)})}}({signatureEndpoint:String(s),fetch}),b=function({uploadSignature:e,...t},r){let i="function"==typeof e,{cloudName:a,apiKey:n}=r?.cloud||{};if(!a)throw Error("A Cloudinary Cloud name is required, please make sure your environment variable is set and configured in your environment.");if(i&&!n)throw Error("A Cloudinary API Key is required for signed requests, please make sure your environment variable is set and configured in your environment.");if(!i&&!t.uploadPreset)throw Error("A Cloudinary Upload Preset is required for unsigned uploads. Please specify an uploadPreset or configure signed uploads.");let s={cloudName:a,apiKey:n,...t};return i&&(s.uploadSignature=e),s}({uploadPreset:o||ic.env.NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET,uploadSignature:v,...n},_),x=function(e){return function(t,r){t&&"function"==typeof e.onError&&e.onError(t,r),"function"==typeof e.onResult&&e.onResult(r);let i="string"==typeof r?.event&&id[r.event];"string"==typeof i&&"function"==typeof e[i]&&(0,e[i])(r)}}({onError:e=>{f(e),"function"==typeof r&&r(e,{widget:c.current,...k})},onResult:e=>{if("string"!=typeof e?.event)return;m(e);let t=id[e.event];"string"==typeof t&&"function"==typeof l[t]&&(0,l[t])(e,{widget:c.current,...k});let r=`${t}Action`;r&&"function"==typeof l[r]&&(0,l[r])(e)}});function w(e,t=[]){if(c.current||(c.current=S()),"function"==typeof c?.current[e])return c.current[e](...t)}(0,d.useEffect)(()=>{typeof h>"u"||"success"!==h.event||"function"!=typeof a||a(h,c.current)},[h]),(0,d.useEffect)(()=>()=>{c.current?.destroy(),c.current=void 0},[]);let k={close:function(e){w("close",[e])},destroy:function(e){return w("destroy",[e])},hide:function(){w("hide")},isDestroyed:function(){return w("isDestroyed")},isMinimized:function(){return w("isMinimized")},isShowing:function(){return w("isShowing")},minimize:function(){w("minimize")},open:function(e,t){w("open",[e,t]),"function"==typeof i&&i(c.current)},show:function(){w("show")},update:function(){w("update")}};function S(){return u.current?.createUploadWidget(b,x)}return d.createElement(d.Fragment,null,"function"==typeof e&&e({cloudinary:u.current,widget:c.current,results:h,error:p,isLoading:g,...k}),d.createElement(iu,{id:`cloudinary-uploadwidget-${Math.floor(100*Math.random())}`,src:"https://upload-widget.cloudinary.com/global/all.js",onLoad:function(){var e;y(!1),u.current||(u.current=window.cloudinary),e=()=>{c.current||(c.current=S())},window&&"requestIdleCallback"in window?requestIdleCallback(e):setTimeout(()=>e(),1)},onError:e=>console.error(`Failed to load Cloudinary Upload Widget: ${e.message}`)}))}}}]);
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.