ai-props 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +307 -0
- package/dist/AI.d.ts +33 -0
- package/dist/AI.d.ts.map +1 -0
- package/dist/AI.test.d.ts +2 -0
- package/dist/AI.test.d.ts.map +1 -0
- package/dist/ai-props.es.js +5923 -0
- package/dist/ai-props.umd.js +30 -0
- package/dist/components/ErrorBoundary.d.ts +17 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/examples/BlogList.d.ts +2 -0
- package/dist/examples/BlogList.d.ts.map +1 -0
- package/dist/examples/BlogList.fixture.d.ts +5 -0
- package/dist/examples/BlogList.fixture.d.ts.map +1 -0
- package/dist/examples/HeroSection.d.ts +2 -0
- package/dist/examples/HeroSection.d.ts.map +1 -0
- package/dist/examples/HeroSection.fixture.d.ts +5 -0
- package/dist/examples/HeroSection.fixture.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/test/setup.d.ts +2 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/utils/schema.d.ts +28 -0
- package/dist/utils/schema.d.ts.map +1 -0
- package/dist/utils/styles.d.ts +3 -0
- package/dist/utils/styles.d.ts.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
(function(ie,oe){typeof exports=="object"&&typeof module<"u"?oe(exports,require("react"),require("ai"),require("@ai-sdk/openai")):typeof define=="function"&&define.amd?define(["exports","react","ai","@ai-sdk/openai"],oe):(ie=typeof globalThis<"u"?globalThis:ie||self,oe(ie["ai-props"]={},ie.React,ie.ai,ie.aiSdkOpenai))})(this,function(ie,oe,jr,Zr){"use strict";var Et={exports:{}},Fe={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Bt;function Ir(){if(Bt)return Fe;Bt=1;var r=oe,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(o,l,d){var p,T={},N=null,$=null;d!==void 0&&(N=""+d),l.key!==void 0&&(N=""+l.key),l.ref!==void 0&&($=l.ref);for(p in l)n.call(l,p)&&!a.hasOwnProperty(p)&&(T[p]=l[p]);if(o&&o.defaultProps)for(p in l=o.defaultProps,l)T[p]===void 0&&(T[p]=l[p]);return{$$typeof:e,type:o,key:N,ref:$,props:T,_owner:s.current}}return Fe.Fragment=t,Fe.jsx=c,Fe.jsxs=c,Fe}var Ue={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Gt;function Nr(){return Gt||(Gt=1,process.env.NODE_ENV!=="production"&&function(){var r=oe,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),L=Symbol.iterator,z="@@iterator";function P(i){if(i===null||typeof i!="object")return null;var u=L&&i[L]||i[z];return typeof u=="function"?u:null}var Z=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(i){{for(var u=arguments.length,m=new Array(u>1?u-1:0),_=1;_<u;_++)m[_-1]=arguments[_];ee("error",i,m)}}function ee(i,u,m){{var _=Z.ReactDebugCurrentFrame,O=_.getStackAddendum();O!==""&&(u+="%s",m=m.concat([O]));var j=m.map(function(R){return String(R)});j.unshift("Warning: "+u),Function.prototype.apply.call(console[i],console,j)}}var te=!1,pe=!1,ae=!1,_e=!1,$e=!1,xe;xe=Symbol.for("react.module.reference");function ct(i){return!!(typeof i=="string"||typeof i=="function"||i===n||i===a||$e||i===s||i===d||i===p||_e||i===$||te||pe||ae||typeof i=="object"&&i!==null&&(i.$$typeof===N||i.$$typeof===T||i.$$typeof===c||i.$$typeof===o||i.$$typeof===l||i.$$typeof===xe||i.getModuleId!==void 0))}function lt(i,u,m){var _=i.displayName;if(_)return _;var O=u.displayName||u.name||"";return O!==""?m+"("+O+")":m}function A(i){return i.displayName||"Context"}function Y(i){if(i==null)return null;if(typeof i.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case n:return"Fragment";case t:return"Portal";case a:return"Profiler";case s:return"StrictMode";case d:return"Suspense";case p:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case o:var u=i;return A(u)+".Consumer";case c:var m=i;return A(m._context)+".Provider";case l:return lt(i,i.render,"ForwardRef");case T:var _=i.displayName||null;return _!==null?_:Y(i.type)||"Memo";case N:{var O=i,j=O._payload,R=O._init;try{return Y(R(j))}catch{return null}}}return null}var q=Object.assign,we=0,Se,dt,Ve,ke,ut,J,mr;function gr(){}gr.__reactDisabledLog=!0;function ws(){{if(we===0){Se=console.log,dt=console.info,Ve=console.warn,ke=console.error,ut=console.group,J=console.groupCollapsed,mr=console.groupEnd;var i={configurable:!0,enumerable:!0,value:gr,writable:!0};Object.defineProperties(console,{info:i,log:i,warn:i,error:i,group:i,groupCollapsed:i,groupEnd:i})}we++}}function ks(){{if(we--,we===0){var i={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},i,{value:Se}),info:q({},i,{value:dt}),warn:q({},i,{value:Ve}),error:q({},i,{value:ke}),group:q({},i,{value:ut}),groupCollapsed:q({},i,{value:J}),groupEnd:q({},i,{value:mr})})}we<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Mt=Z.ReactCurrentDispatcher,zt;function wt(i,u,m){{if(zt===void 0)try{throw Error()}catch(O){var _=O.stack.trim().match(/\n( *(at )?)/);zt=_&&_[1]||""}return`
|
|
18
|
+
`+zt+i}}var $t=!1,kt;{var Ts=typeof WeakMap=="function"?WeakMap:Map;kt=new Ts}function vr(i,u){if(!i||$t)return"";{var m=kt.get(i);if(m!==void 0)return m}var _;$t=!0;var O=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var j;j=Mt.current,Mt.current=null,ws();try{if(u){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(B){_=B}Reflect.construct(i,[],R)}else{try{R.call()}catch(B){_=B}i.call(R.prototype)}}else{try{throw Error()}catch(B){_=B}i()}}catch(B){if(B&&_&&typeof B.stack=="string"){for(var C=B.stack.split(`
|
|
19
|
+
`),W=_.stack.split(`
|
|
20
|
+
`),V=C.length-1,D=W.length-1;V>=1&&D>=0&&C[V]!==W[D];)D--;for(;V>=1&&D>=0;V--,D--)if(C[V]!==W[D]){if(V!==1||D!==1)do if(V--,D--,D<0||C[V]!==W[D]){var H=`
|
|
21
|
+
`+C[V].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),typeof i=="function"&&kt.set(i,H),H}while(V>=1&&D>=0);break}}}finally{$t=!1,Mt.current=j,ks(),Error.prepareStackTrace=O}var Le=i?i.displayName||i.name:"",Oe=Le?wt(Le):"";return typeof i=="function"&&kt.set(i,Oe),Oe}function Cs(i,u,m){return vr(i,!1)}function Es(i){var u=i.prototype;return!!(u&&u.isReactComponent)}function Tt(i,u,m){if(i==null)return"";if(typeof i=="function")return vr(i,Es(i));if(typeof i=="string")return wt(i);switch(i){case d:return wt("Suspense");case p:return wt("SuspenseList")}if(typeof i=="object")switch(i.$$typeof){case l:return Cs(i.render);case T:return Tt(i.type,u,m);case N:{var _=i,O=_._payload,j=_._init;try{return Tt(j(O),u,m)}catch{}}}return""}var ft=Object.prototype.hasOwnProperty,yr={},br=Z.ReactDebugCurrentFrame;function Ct(i){if(i){var u=i._owner,m=Tt(i.type,i._source,u?u.type:null);br.setExtraStackFrame(m)}else br.setExtraStackFrame(null)}function Rs(i,u,m,_,O){{var j=Function.call.bind(ft);for(var R in i)if(j(i,R)){var C=void 0;try{if(typeof i[R]!="function"){var W=Error((_||"React class")+": "+m+" type `"+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[R]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw W.name="Invariant Violation",W}C=i[R](u,R,_,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(V){C=V}C&&!(C instanceof Error)&&(Ct(O),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",_||"React class",m,R,typeof C),Ct(null)),C instanceof Error&&!(C.message in yr)&&(yr[C.message]=!0,Ct(O),S("Failed %s type: %s",m,C.message),Ct(null))}}}var Ss=Array.isArray;function Vt(i){return Ss(i)}function Os(i){{var u=typeof Symbol=="function"&&Symbol.toStringTag,m=u&&i[Symbol.toStringTag]||i.constructor.name||"Object";return m}}function As(i){try{return _r(i),!1}catch{return!0}}function _r(i){return""+i}function xr(i){if(As(i))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Os(i)),_r(i)}var pt=Z.ReactCurrentOwner,js={key:!0,ref:!0,__self:!0,__source:!0},wr,kr,Dt;Dt={};function Zs(i){if(ft.call(i,"ref")){var u=Object.getOwnPropertyDescriptor(i,"ref").get;if(u&&u.isReactWarning)return!1}return i.ref!==void 0}function Is(i){if(ft.call(i,"key")){var u=Object.getOwnPropertyDescriptor(i,"key").get;if(u&&u.isReactWarning)return!1}return i.key!==void 0}function Ns(i,u){if(typeof i.ref=="string"&&pt.current&&u&&pt.current.stateNode!==u){var m=Y(pt.current.type);Dt[m]||(S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Y(pt.current.type),i.ref),Dt[m]=!0)}}function Ps(i,u){{var m=function(){wr||(wr=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};m.isReactWarning=!0,Object.defineProperty(i,"key",{get:m,configurable:!0})}}function Ms(i,u){{var m=function(){kr||(kr=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};m.isReactWarning=!0,Object.defineProperty(i,"ref",{get:m,configurable:!0})}}var zs=function(i,u,m,_,O,j,R){var C={$$typeof:e,type:i,key:u,ref:m,props:R,_owner:j};return C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(C,"_self",{configurable:!1,enumerable:!1,writable:!1,value:_}),Object.defineProperty(C,"_source",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C};function $s(i,u,m,_,O){{var j,R={},C=null,W=null;m!==void 0&&(xr(m),C=""+m),Is(u)&&(xr(u.key),C=""+u.key),Zs(u)&&(W=u.ref,Ns(u,O));for(j in u)ft.call(u,j)&&!js.hasOwnProperty(j)&&(R[j]=u[j]);if(i&&i.defaultProps){var V=i.defaultProps;for(j in V)R[j]===void 0&&(R[j]=V[j])}if(C||W){var D=typeof i=="function"?i.displayName||i.name||"Unknown":i;C&&Ps(R,D),W&&Ms(R,D)}return zs(i,C,W,O,_,pt.current,R)}}var Lt=Z.ReactCurrentOwner,Tr=Z.ReactDebugCurrentFrame;function De(i){if(i){var u=i._owner,m=Tt(i.type,i._source,u?u.type:null);Tr.setExtraStackFrame(m)}else Tr.setExtraStackFrame(null)}var Ft;Ft=!1;function Ut(i){return typeof i=="object"&&i!==null&&i.$$typeof===e}function Cr(){{if(Lt.current){var i=Y(Lt.current.type);if(i)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+i+"`."}return""}}function Vs(i){return""}var Er={};function Ds(i){{var u=Cr();if(!u){var m=typeof i=="string"?i:i.displayName||i.name;m&&(u=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+m+">.")}return u}}function Rr(i,u){{if(!i._store||i._store.validated||i.key!=null)return;i._store.validated=!0;var m=Ds(u);if(Er[m])return;Er[m]=!0;var _="";i&&i._owner&&i._owner!==Lt.current&&(_=" It was passed a child from "+Y(i._owner.type)+"."),De(i),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,_),De(null)}}function Sr(i,u){{if(typeof i!="object")return;if(Vt(i))for(var m=0;m<i.length;m++){var _=i[m];Ut(_)&&Rr(_,u)}else if(Ut(i))i._store&&(i._store.validated=!0);else if(i){var O=P(i);if(typeof O=="function"&&O!==i.entries)for(var j=O.call(i),R;!(R=j.next()).done;)Ut(R.value)&&Rr(R.value,u)}}}function Ls(i){{var u=i.type;if(u==null||typeof u=="string")return;var m;if(typeof u=="function")m=u.propTypes;else if(typeof u=="object"&&(u.$$typeof===l||u.$$typeof===T))m=u.propTypes;else return;if(m){var _=Y(u);Rs(m,i.props,"prop",_,i)}else if(u.PropTypes!==void 0&&!Ft){Ft=!0;var O=Y(u);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",O||"Unknown")}typeof u.getDefaultProps=="function"&&!u.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Fs(i){{for(var u=Object.keys(i.props),m=0;m<u.length;m++){var _=u[m];if(_!=="children"&&_!=="key"){De(i),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",_),De(null);break}}i.ref!==null&&(De(i),S("Invalid attribute `ref` supplied to `React.Fragment`."),De(null))}}var Or={};function Ar(i,u,m,_,O,j){{var R=ct(i);if(!R){var C="";(i===void 0||typeof i=="object"&&i!==null&&Object.keys(i).length===0)&&(C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var W=Vs();W?C+=W:C+=Cr();var V;i===null?V="null":Vt(i)?V="array":i!==void 0&&i.$$typeof===e?(V="<"+(Y(i.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):V=typeof i,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",V,C)}var D=$s(i,u,m,O,j);if(D==null)return D;if(R){var H=u.children;if(H!==void 0)if(_)if(Vt(H)){for(var Le=0;Le<H.length;Le++)Sr(H[Le],i);Object.freeze&&Object.freeze(H)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Sr(H,i)}if(ft.call(u,"key")){var Oe=Y(i),B=Object.keys(u).filter(function(qs){return qs!=="key"}),Wt=B.length>0?"{key: someKey, "+B.join(": ..., ")+": ...}":"{key: someKey}";if(!Or[Oe+Wt]){var Ys=B.length>0?"{"+B.join(": ..., ")+": ...}":"{}";S(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
+
let props = %s;
|
|
27
|
+
<%s {...props} />
|
|
28
|
+
React keys must be passed directly to JSX without using spread:
|
|
29
|
+
let props = %s;
|
|
30
|
+
<%s key={someKey} {...props} />`,Wt,Oe,Ys,Oe),Or[Oe+Wt]=!0}}return i===n?Fs(D):Ls(D),D}}function Us(i,u,m){return Ar(i,u,m,!0)}function Ws(i,u,m){return Ar(i,u,m,!1)}var Bs=Ws,Gs=Us;Ue.Fragment=n,Ue.jsx=Bs,Ue.jsxs=Gs}()),Ue}process.env.NODE_ENV==="production"?Et.exports=Ir():Et.exports=Nr();var Yt=Et.exports,E;(function(r){r.assertEqual=s=>s;function e(s){}r.assertIs=e;function t(s){throw new Error}r.assertNever=t,r.arrayToEnum=s=>{const a={};for(const c of s)a[c]=c;return a},r.getValidEnumValues=s=>{const a=r.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),c={};for(const o of a)c[o]=s[o];return r.objectValues(c)},r.objectValues=s=>r.objectKeys(s).map(function(a){return s[a]}),r.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const c in s)Object.prototype.hasOwnProperty.call(s,c)&&a.push(c);return a},r.find=(s,a)=>{for(const c of s)if(a(c))return c},r.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(c=>typeof c=="string"?`'${c}'`:c).join(a)}r.joinValues=n,r.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(E||(E={}));var Rt;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Rt||(Rt={}));const g=E.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ce=r=>{switch(typeof r){case"undefined":return g.undefined;case"string":return g.string;case"number":return isNaN(r)?g.nan:g.number;case"boolean":return g.boolean;case"function":return g.function;case"bigint":return g.bigint;case"symbol":return g.symbol;case"object":return Array.isArray(r)?g.array:r===null?g.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?g.promise:typeof Map<"u"&&r instanceof Map?g.map:typeof Set<"u"&&r instanceof Set?g.set:typeof Date<"u"&&r instanceof Date?g.date:g.object;default:return g.unknown}},f=E.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"]),Pr=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class G extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},n={_errors:[]},s=a=>{for(const c of a.issues)if(c.code==="invalid_union")c.unionErrors.map(s);else if(c.code==="invalid_return_type")s(c.returnTypeError);else if(c.code==="invalid_arguments")s(c.argumentsError);else if(c.path.length===0)n._errors.push(t(c));else{let o=n,l=0;for(;l<c.path.length;){const d=c.path[l];l===c.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(t(c))):o[d]=o[d]||{_errors:[]},o=o[d],l++}}};return s(this),n}static assert(e){if(!(e instanceof G))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,E.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},n=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}G.create=r=>new G(r);const Ae=(r,e)=>{let t;switch(r.code){case f.invalid_type:r.received===g.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case f.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,E.jsonStringifyReplacer)}`;break;case f.unrecognized_keys:t=`Unrecognized key(s) in object: ${E.joinValues(r.keys,", ")}`;break;case f.invalid_union:t="Invalid input";break;case f.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${E.joinValues(r.options)}`;break;case f.invalid_enum_value:t=`Invalid enum value. Expected ${E.joinValues(r.options)}, received '${r.received}'`;break;case f.invalid_arguments:t="Invalid function arguments";break;case f.invalid_return_type:t="Invalid function return type";break;case f.invalid_date:t="Invalid date";break;case f.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:E.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case f.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case f.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case f.custom:t="Invalid input";break;case f.invalid_intersection_types:t="Intersection results could not be merged";break;case f.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case f.not_finite:t="Number must be finite";break;default:t=e.defaultError,E.assertNever(r)}return{message:t}};let qt=Ae;function Mr(r){qt=r}function ht(){return qt}const mt=r=>{const{data:e,path:t,errorMaps:n,issueData:s}=r,a=[...t,...s.path||[]],c={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let o="";const l=n.filter(d=>!!d).slice().reverse();for(const d of l)o=d(c,{data:e,defaultError:o}).message;return{...s,path:a,message:o}},zr=[];function h(r,e){const t=ht(),n=mt({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Ae?void 0:Ae].filter(s=>!!s)});r.common.issues.push(n)}class F{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const s of t){if(s.status==="aborted")return b;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const s of t){const a=await s.key,c=await s.value;n.push({key:a,value:c})}return F.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const s of t){const{key:a,value:c}=s;if(a.status==="aborted"||c.status==="aborted")return b;a.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof c.value<"u"||s.alwaysSet)&&(n[a.value]=c.value)}return{status:e.value,value:n}}}const b=Object.freeze({status:"aborted"}),je=r=>({status:"dirty",value:r}),U=r=>({status:"valid",value:r}),St=r=>r.status==="aborted",Ot=r=>r.status==="dirty",Te=r=>r.status==="valid",We=r=>typeof Promise<"u"&&r instanceof Promise;function gt(r,e,t,n){if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function Jt(r,e,t,n,s){if(typeof e=="function"?r!==e||!s:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}typeof SuppressedError=="function"&&SuppressedError;var v;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(v||(v={}));var Be,Ge;class re{constructor(e,t,n,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=s}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}}const Ht=(r,e)=>{if(Te(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new G(r.common.issues);return this._error=t,this._error}}};function x(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:s}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(c,o)=>{var l,d;const{message:p}=r;return c.code==="invalid_enum_value"?{message:p??o.defaultError}:typeof o.data>"u"?{message:(l=p??n)!==null&&l!==void 0?l:o.defaultError}:c.code!=="invalid_type"?{message:o.defaultError}:{message:(d=p??t)!==null&&d!==void 0?d:o.defaultError}},description:s}}class k{get description(){return this._def.description}_getType(e){return ce(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ce(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new F,ctx:{common:e.parent.common,data:e.data,parsedType:ce(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(We(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const s={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ce(e)},a=this._parseSync({data:e,path:s.path,parent:s});return Ht(s,a)}"~validate"(e){var t,n;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ce(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:s});return Te(a)?{value:a.value}:{issues:s.common.issues}}catch(a){!((n=(t=a==null?void 0:a.message)===null||t===void 0?void 0:t.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:s}).then(a=>Te(a)?{value:a.value}:{issues:s.common.issues})}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ce(e)},s=this._parse({data:e,path:n.path,parent:n}),a=await(We(s)?s:Promise.resolve(s));return Ht(n,a)}refine(e,t){const n=s=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(s):t;return this._refinement((s,a)=>{const c=e(s),o=()=>a.addIssue({code:f.custom,...n(s)});return typeof Promise<"u"&&c instanceof Promise?c.then(l=>l?!0:(o(),!1)):c?!0:(o(),!1)})}refinement(e,t){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof t=="function"?t(n,s):t),!1))}_refinement(e){return new Q({schema:this,typeName:y.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:t=>this["~validate"](t)}}optional(){return se.create(this,this._def)}nullable(){return ve.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return X.create(this)}promise(){return Pe.create(this,this._def)}or(e){return He.create([this,e],this._def)}and(e){return Ke.create(this,e,this._def)}transform(e){return new Q({...x(this._def),schema:this,typeName:y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new rt({...x(this._def),innerType:this,defaultValue:t,typeName:y.ZodDefault})}brand(){return new Zt({typeName:y.ZodBranded,type:this,...x(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new nt({...x(this._def),innerType:this,catchValue:t,typeName:y.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return st.create(this,e)}readonly(){return at.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $r=/^c[^\s-]{8,}$/i,Vr=/^[0-9a-z]+$/,Dr=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Lr=/^[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,Fr=/^[a-z0-9_-]{21}$/i,Ur=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Wr=/^[-+]?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)?)??$/,Br=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Gr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let At;const Yr=/^(?:(?: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])$/,qr=/^(?:(?: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])$/,Jr=/^(([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]))$/,Hr=/^(([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])$/,Kr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Xr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Kt="((\\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])))",Qr=new RegExp(`^${Kt}$`);function Xt(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function en(r){return new RegExp(`^${Xt(r)}$`)}function Qt(r){let e=`${Kt}T${Xt(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function tn(r,e){return!!((e==="v4"||!e)&&Yr.test(r)||(e==="v6"||!e)&&Jr.test(r))}function rn(r,e){if(!Ur.test(r))return!1;try{const[t]=r.split("."),n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||!s.typ||!s.alg||e&&s.alg!==e)}catch{return!1}}function nn(r,e){return!!((e==="v4"||!e)&&qr.test(r)||(e==="v6"||!e)&&Hr.test(r))}class K extends k{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==g.string){const a=this._getOrReturnCtx(e);return h(a,{code:f.invalid_type,expected:g.string,received:a.parsedType}),b}const n=new F;let s;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),h(s,{code:f.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),h(s,{code:f.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const c=e.data.length>a.value,o=e.data.length<a.value;(c||o)&&(s=this._getOrReturnCtx(e,s),c?h(s,{code:f.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&h(s,{code:f.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")Br.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"email",code:f.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")At||(At=new RegExp(Gr,"u")),At.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"emoji",code:f.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")Lr.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"uuid",code:f.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")Fr.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"nanoid",code:f.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")$r.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"cuid",code:f.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")Vr.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"cuid2",code:f.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")Dr.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"ulid",code:f.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),h(s,{validation:"url",code:f.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"regex",code:f.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),h(s,{code:f.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),h(s,{code:f.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),h(s,{code:f.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Qt(a).test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{code:f.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Qr.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{code:f.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?en(a).test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{code:f.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?Wr.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"duration",code:f.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?tn(e.data,a.version)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"ip",code:f.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?rn(e.data,a.alg)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"jwt",code:f.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?nn(e.data,a.version)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"cidr",code:f.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?Kr.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"base64",code:f.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?Xr.test(e.data)||(s=this._getOrReturnCtx(e,s),h(s,{validation:"base64url",code:f.invalid_string,message:a.message}),n.dirty()):E.assertNever(a);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(s=>e.test(s),{validation:t,code:f.invalid_string,...v.errToObj(n)})}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...v.errToObj(e)})}url(e){return this._addCheck({kind:"url",...v.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...v.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...v.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...v.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...v.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...v.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...v.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...v.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...v.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...v.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...v.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...v.errToObj(e)})}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...v.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...v.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...v.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...v.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...v.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...v.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...v.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...v.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...v.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...v.errToObj(t)})}nonempty(e){return this.min(1,v.errToObj(e))}trim(){return new K({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new K({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new K({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}K.create=r=>{var e;return new K({checks:[],typeName:y.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...x(r)})};function sn(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=t>n?t:n,a=parseInt(r.toFixed(s).replace(".","")),c=parseInt(e.toFixed(s).replace(".",""));return a%c/Math.pow(10,s)}class he extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==g.number){const a=this._getOrReturnCtx(e);return h(a,{code:f.invalid_type,expected:g.number,received:a.parsedType}),b}let n;const s=new F;for(const a of this._def.checks)a.kind==="int"?E.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:f.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:f.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:f.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?sn(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),h(n,{code:f.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:f.not_finite,message:a.message}),s.dirty()):E.assertNever(a);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,v.toString(t))}gt(e,t){return this.setLimit("min",e,!1,v.toString(t))}lte(e,t){return this.setLimit("max",e,!0,v.toString(t))}lt(e,t){return this.setLimit("max",e,!1,v.toString(t))}setLimit(e,t,n,s){return new he({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:v.toString(s)}]})}_addCheck(e){return new he({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:v.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:v.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&E.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}he.create=r=>new he({checks:[],typeName:y.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...x(r)});class me extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==g.bigint)return this._getInvalidInput(e);let n;const s=new F;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:f.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:f.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),h(n,{code:f.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):E.assertNever(a);return{status:s.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return h(t,{code:f.invalid_type,expected:g.bigint,received:t.parsedType}),b}gte(e,t){return this.setLimit("min",e,!0,v.toString(t))}gt(e,t){return this.setLimit("min",e,!1,v.toString(t))}lte(e,t){return this.setLimit("max",e,!0,v.toString(t))}lt(e,t){return this.setLimit("max",e,!1,v.toString(t))}setLimit(e,t,n,s){return new me({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:v.toString(s)}]})}_addCheck(e){return new me({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}me.create=r=>{var e;return new me({checks:[],typeName:y.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...x(r)})};class Ye extends k{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==g.boolean){const n=this._getOrReturnCtx(e);return h(n,{code:f.invalid_type,expected:g.boolean,received:n.parsedType}),b}return U(e.data)}}Ye.create=r=>new Ye({typeName:y.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...x(r)});class Ce extends k{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==g.date){const a=this._getOrReturnCtx(e);return h(a,{code:f.invalid_type,expected:g.date,received:a.parsedType}),b}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return h(a,{code:f.invalid_date}),b}const n=new F;let s;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),h(s,{code:f.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),h(s,{code:f.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):E.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ce({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:v.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:v.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}Ce.create=r=>new Ce({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:y.ZodDate,...x(r)});class vt extends k{_parse(e){if(this._getType(e)!==g.symbol){const n=this._getOrReturnCtx(e);return h(n,{code:f.invalid_type,expected:g.symbol,received:n.parsedType}),b}return U(e.data)}}vt.create=r=>new vt({typeName:y.ZodSymbol,...x(r)});class qe extends k{_parse(e){if(this._getType(e)!==g.undefined){const n=this._getOrReturnCtx(e);return h(n,{code:f.invalid_type,expected:g.undefined,received:n.parsedType}),b}return U(e.data)}}qe.create=r=>new qe({typeName:y.ZodUndefined,...x(r)});class Je extends k{_parse(e){if(this._getType(e)!==g.null){const n=this._getOrReturnCtx(e);return h(n,{code:f.invalid_type,expected:g.null,received:n.parsedType}),b}return U(e.data)}}Je.create=r=>new Je({typeName:y.ZodNull,...x(r)});class Ze extends k{constructor(){super(...arguments),this._any=!0}_parse(e){return U(e.data)}}Ze.create=r=>new Ze({typeName:y.ZodAny,...x(r)});class Ee extends k{constructor(){super(...arguments),this._unknown=!0}_parse(e){return U(e.data)}}Ee.create=r=>new Ee({typeName:y.ZodUnknown,...x(r)});class le extends k{_parse(e){const t=this._getOrReturnCtx(e);return h(t,{code:f.invalid_type,expected:g.never,received:t.parsedType}),b}}le.create=r=>new le({typeName:y.ZodNever,...x(r)});class yt extends k{_parse(e){if(this._getType(e)!==g.undefined){const n=this._getOrReturnCtx(e);return h(n,{code:f.invalid_type,expected:g.void,received:n.parsedType}),b}return U(e.data)}}yt.create=r=>new yt({typeName:y.ZodVoid,...x(r)});class X extends k{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),s=this._def;if(t.parsedType!==g.array)return h(t,{code:f.invalid_type,expected:g.array,received:t.parsedType}),b;if(s.exactLength!==null){const c=t.data.length>s.exactLength.value,o=t.data.length<s.exactLength.value;(c||o)&&(h(t,{code:c?f.too_big:f.too_small,minimum:o?s.exactLength.value:void 0,maximum:c?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&t.data.length<s.minLength.value&&(h(t,{code:f.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&t.data.length>s.maxLength.value&&(h(t,{code:f.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((c,o)=>s.type._parseAsync(new re(t,c,t.path,o)))).then(c=>F.mergeArray(n,c));const a=[...t.data].map((c,o)=>s.type._parseSync(new re(t,c,t.path,o)));return F.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new X({...this._def,minLength:{value:e,message:v.toString(t)}})}max(e,t){return new X({...this._def,maxLength:{value:e,message:v.toString(t)}})}length(e,t){return new X({...this._def,exactLength:{value:e,message:v.toString(t)}})}nonempty(e){return this.min(1,e)}}X.create=(r,e)=>new X({type:r,minLength:null,maxLength:null,exactLength:null,typeName:y.ZodArray,...x(e)});function Ie(r){if(r instanceof M){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=se.create(Ie(n))}return new M({...r._def,shape:()=>e})}else return r instanceof X?new X({...r._def,type:Ie(r.element)}):r instanceof se?se.create(Ie(r.unwrap())):r instanceof ve?ve.create(Ie(r.unwrap())):r instanceof ne?ne.create(r.items.map(e=>Ie(e))):r}class M extends k{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=E.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==g.object){const d=this._getOrReturnCtx(e);return h(d,{code:f.invalid_type,expected:g.object,received:d.parsedType}),b}const{status:n,ctx:s}=this._processInputParams(e),{shape:a,keys:c}=this._getCached(),o=[];if(!(this._def.catchall instanceof le&&this._def.unknownKeys==="strip"))for(const d in s.data)c.includes(d)||o.push(d);const l=[];for(const d of c){const p=a[d],T=s.data[d];l.push({key:{status:"valid",value:d},value:p._parse(new re(s,T,s.path,d)),alwaysSet:d in s.data})}if(this._def.catchall instanceof le){const d=this._def.unknownKeys;if(d==="passthrough")for(const p of o)l.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});else if(d==="strict")o.length>0&&(h(s,{code:f.unrecognized_keys,keys:o}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const p of o){const T=s.data[p];l.push({key:{status:"valid",value:p},value:d._parse(new re(s,T,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const d=[];for(const p of l){const T=await p.key,N=await p.value;d.push({key:T,value:N,alwaysSet:p.alwaysSet})}return d}).then(d=>F.mergeObjectSync(n,d)):F.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return v.errToObj,new M({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var s,a,c,o;const l=(c=(a=(s=this._def).errorMap)===null||a===void 0?void 0:a.call(s,t,n).message)!==null&&c!==void 0?c:n.defaultError;return t.code==="unrecognized_keys"?{message:(o=v.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new M({...this._def,unknownKeys:"strip"})}passthrough(){return new M({...this._def,unknownKeys:"passthrough"})}extend(e){return new M({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new M({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:y.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new M({...this._def,catchall:e})}pick(e){const t={};return E.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new M({...this._def,shape:()=>t})}omit(e){const t={};return E.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new M({...this._def,shape:()=>t})}deepPartial(){return Ie(this)}partial(e){const t={};return E.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];e&&!e[n]?t[n]=s:t[n]=s.optional()}),new M({...this._def,shape:()=>t})}required(e){const t={};return E.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof se;)a=a._def.innerType;t[n]=a}}),new M({...this._def,shape:()=>t})}keyof(){return er(E.objectKeys(this.shape))}}M.create=(r,e)=>new M({shape:()=>r,unknownKeys:"strip",catchall:le.create(),typeName:y.ZodObject,...x(e)}),M.strictCreate=(r,e)=>new M({shape:()=>r,unknownKeys:"strict",catchall:le.create(),typeName:y.ZodObject,...x(e)}),M.lazycreate=(r,e)=>new M({shape:r,unknownKeys:"strip",catchall:le.create(),typeName:y.ZodObject,...x(e)});class He extends k{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function s(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const c=a.map(o=>new G(o.ctx.common.issues));return h(t,{code:f.invalid_union,unionErrors:c}),b}if(t.common.async)return Promise.all(n.map(async a=>{const c={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:c}),ctx:c}})).then(s);{let a;const c=[];for(const l of n){const d={...t,common:{...t.common,issues:[]},parent:null},p=l._parseSync({data:t.data,path:t.path,parent:d});if(p.status==="valid")return p;p.status==="dirty"&&!a&&(a={result:p,ctx:d}),d.common.issues.length&&c.push(d.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=c.map(l=>new G(l));return h(t,{code:f.invalid_union,unionErrors:o}),b}}get options(){return this._def.options}}He.create=(r,e)=>new He({options:r,typeName:y.ZodUnion,...x(e)});const de=r=>r instanceof Qe?de(r.schema):r instanceof Q?de(r.innerType()):r instanceof et?[r.value]:r instanceof ge?r.options:r instanceof tt?E.objectValues(r.enum):r instanceof rt?de(r._def.innerType):r instanceof qe?[void 0]:r instanceof Je?[null]:r instanceof se?[void 0,...de(r.unwrap())]:r instanceof ve?[null,...de(r.unwrap())]:r instanceof Zt||r instanceof at?de(r.unwrap()):r instanceof nt?de(r._def.innerType):[];class bt extends k{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==g.object)return h(t,{code:f.invalid_type,expected:g.object,received:t.parsedType}),b;const n=this.discriminator,s=t.data[n],a=this.optionsMap.get(s);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}):(h(t,{code:f.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),b)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const s=new Map;for(const a of t){const c=de(a.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of c){if(s.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);s.set(o,a)}}return new bt({typeName:y.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...x(n)})}}function jt(r,e){const t=ce(r),n=ce(e);if(r===e)return{valid:!0,data:r};if(t===g.object&&n===g.object){const s=E.objectKeys(e),a=E.objectKeys(r).filter(o=>s.indexOf(o)!==-1),c={...r,...e};for(const o of a){const l=jt(r[o],e[o]);if(!l.valid)return{valid:!1};c[o]=l.data}return{valid:!0,data:c}}else if(t===g.array&&n===g.array){if(r.length!==e.length)return{valid:!1};const s=[];for(let a=0;a<r.length;a++){const c=r[a],o=e[a],l=jt(c,o);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return t===g.date&&n===g.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class Ke extends k{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),s=(a,c)=>{if(St(a)||St(c))return b;const o=jt(a.value,c.value);return o.valid?((Ot(a)||Ot(c))&&t.dirty(),{status:t.value,value:o.data}):(h(n,{code:f.invalid_intersection_types}),b)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,c])=>s(a,c)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Ke.create=(r,e,t)=>new Ke({left:r,right:e,typeName:y.ZodIntersection,...x(t)});class ne extends k{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==g.array)return h(n,{code:f.invalid_type,expected:g.array,received:n.parsedType}),b;if(n.data.length<this._def.items.length)return h(n,{code:f.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),b;!this._def.rest&&n.data.length>this._def.items.length&&(h(n,{code:f.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...n.data].map((c,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new re(n,c,n.path,o)):null}).filter(c=>!!c);return n.common.async?Promise.all(a).then(c=>F.mergeArray(t,c)):F.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new ne({...this._def,rest:e})}}ne.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ne({items:r,typeName:y.ZodTuple,rest:null,...x(e)})};class Xe extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==g.object)return h(n,{code:f.invalid_type,expected:g.object,received:n.parsedType}),b;const s=[],a=this._def.keyType,c=this._def.valueType;for(const o in n.data)s.push({key:a._parse(new re(n,o,n.path,o)),value:c._parse(new re(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?F.mergeObjectAsync(t,s):F.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof k?new Xe({keyType:e,valueType:t,typeName:y.ZodRecord,...x(n)}):new Xe({keyType:K.create(),valueType:e,typeName:y.ZodRecord,...x(t)})}}class _t extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==g.map)return h(n,{code:f.invalid_type,expected:g.map,received:n.parsedType}),b;const s=this._def.keyType,a=this._def.valueType,c=[...n.data.entries()].map(([o,l],d)=>({key:s._parse(new re(n,o,n.path,[d,"key"])),value:a._parse(new re(n,l,n.path,[d,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of c){const d=await l.key,p=await l.value;if(d.status==="aborted"||p.status==="aborted")return b;(d.status==="dirty"||p.status==="dirty")&&t.dirty(),o.set(d.value,p.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const l of c){const d=l.key,p=l.value;if(d.status==="aborted"||p.status==="aborted")return b;(d.status==="dirty"||p.status==="dirty")&&t.dirty(),o.set(d.value,p.value)}return{status:t.value,value:o}}}}_t.create=(r,e,t)=>new _t({valueType:e,keyType:r,typeName:y.ZodMap,...x(t)});class Re extends k{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==g.set)return h(n,{code:f.invalid_type,expected:g.set,received:n.parsedType}),b;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(h(n,{code:f.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(h(n,{code:f.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const a=this._def.valueType;function c(l){const d=new Set;for(const p of l){if(p.status==="aborted")return b;p.status==="dirty"&&t.dirty(),d.add(p.value)}return{status:t.value,value:d}}const o=[...n.data.values()].map((l,d)=>a._parse(new re(n,l,n.path,d)));return n.common.async?Promise.all(o).then(l=>c(l)):c(o)}min(e,t){return new Re({...this._def,minSize:{value:e,message:v.toString(t)}})}max(e,t){return new Re({...this._def,maxSize:{value:e,message:v.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Re.create=(r,e)=>new Re({valueType:r,minSize:null,maxSize:null,typeName:y.ZodSet,...x(e)});class Ne extends k{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==g.function)return h(t,{code:f.invalid_type,expected:g.function,received:t.parsedType}),b;function n(o,l){return mt({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ht(),Ae].filter(d=>!!d),issueData:{code:f.invalid_arguments,argumentsError:l}})}function s(o,l){return mt({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ht(),Ae].filter(d=>!!d),issueData:{code:f.invalid_return_type,returnTypeError:l}})}const a={errorMap:t.common.contextualErrorMap},c=t.data;if(this._def.returns instanceof Pe){const o=this;return U(async function(...l){const d=new G([]),p=await o._def.args.parseAsync(l,a).catch($=>{throw d.addIssue(n(l,$)),d}),T=await Reflect.apply(c,this,p);return await o._def.returns._def.type.parseAsync(T,a).catch($=>{throw d.addIssue(s(T,$)),d})})}else{const o=this;return U(function(...l){const d=o._def.args.safeParse(l,a);if(!d.success)throw new G([n(l,d.error)]);const p=Reflect.apply(c,this,d.data),T=o._def.returns.safeParse(p,a);if(!T.success)throw new G([s(p,T.error)]);return T.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ne({...this._def,args:ne.create(e).rest(Ee.create())})}returns(e){return new Ne({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Ne({args:e||ne.create([]).rest(Ee.create()),returns:t||Ee.create(),typeName:y.ZodFunction,...x(n)})}}class Qe extends k{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Qe.create=(r,e)=>new Qe({getter:r,typeName:y.ZodLazy,...x(e)});class et extends k{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return h(t,{received:t.data,code:f.invalid_literal,expected:this._def.value}),b}return{status:"valid",value:e.data}}get value(){return this._def.value}}et.create=(r,e)=>new et({value:r,typeName:y.ZodLiteral,...x(e)});function er(r,e){return new ge({values:r,typeName:y.ZodEnum,...x(e)})}class ge extends k{constructor(){super(...arguments),Be.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return h(t,{expected:E.joinValues(n),received:t.parsedType,code:f.invalid_type}),b}if(gt(this,Be)||Jt(this,Be,new Set(this._def.values)),!gt(this,Be).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return h(t,{received:t.data,code:f.invalid_enum_value,options:n}),b}return U(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ge.create(e,{...this._def,...t})}exclude(e,t=this._def){return ge.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}Be=new WeakMap,ge.create=er;class tt extends k{constructor(){super(...arguments),Ge.set(this,void 0)}_parse(e){const t=E.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==g.string&&n.parsedType!==g.number){const s=E.objectValues(t);return h(n,{expected:E.joinValues(s),received:n.parsedType,code:f.invalid_type}),b}if(gt(this,Ge)||Jt(this,Ge,new Set(E.getValidEnumValues(this._def.values))),!gt(this,Ge).has(e.data)){const s=E.objectValues(t);return h(n,{received:n.data,code:f.invalid_enum_value,options:s}),b}return U(e.data)}get enum(){return this._def.values}}Ge=new WeakMap,tt.create=(r,e)=>new tt({values:r,typeName:y.ZodNativeEnum,...x(e)});class Pe extends k{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==g.promise&&t.common.async===!1)return h(t,{code:f.invalid_type,expected:g.promise,received:t.parsedType}),b;const n=t.parsedType===g.promise?t.data:Promise.resolve(t.data);return U(n.then(s=>this._def.type.parseAsync(s,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Pe.create=(r,e)=>new Pe({type:r,typeName:y.ZodPromise,...x(e)});class Q extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:c=>{h(n,c),c.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const c=s.transform(n.data,a);if(n.common.async)return Promise.resolve(c).then(async o=>{if(t.value==="aborted")return b;const l=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return l.status==="aborted"?b:l.status==="dirty"||t.value==="dirty"?je(l.value):l});{if(t.value==="aborted")return b;const o=this._def.schema._parseSync({data:c,path:n.path,parent:n});return o.status==="aborted"?b:o.status==="dirty"||t.value==="dirty"?je(o.value):o}}if(s.type==="refinement"){const c=o=>{const l=s.refinement(o,a);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?b:(o.status==="dirty"&&t.dirty(),c(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?b:(o.status==="dirty"&&t.dirty(),c(o.value).then(()=>({status:t.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){const c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Te(c))return c;const o=s.transform(c.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>Te(c)?Promise.resolve(s.transform(c.value,a)).then(o=>({status:t.value,value:o})):c);E.assertNever(s)}}Q.create=(r,e,t)=>new Q({schema:r,typeName:y.ZodEffects,effect:e,...x(t)}),Q.createWithPreprocess=(r,e,t)=>new Q({schema:e,effect:{type:"preprocess",transform:r},typeName:y.ZodEffects,...x(t)});class se extends k{_parse(e){return this._getType(e)===g.undefined?U(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}se.create=(r,e)=>new se({innerType:r,typeName:y.ZodOptional,...x(e)});class ve extends k{_parse(e){return this._getType(e)===g.null?U(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ve.create=(r,e)=>new ve({innerType:r,typeName:y.ZodNullable,...x(e)});class rt extends k{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===g.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}rt.create=(r,e)=>new rt({innerType:r,typeName:y.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...x(e)});class nt extends k{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return We(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new G(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new G(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}nt.create=(r,e)=>new nt({innerType:r,typeName:y.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...x(e)});class xt extends k{_parse(e){if(this._getType(e)!==g.nan){const n=this._getOrReturnCtx(e);return h(n,{code:f.invalid_type,expected:g.nan,received:n.parsedType}),b}return{status:"valid",value:e.data}}}xt.create=r=>new xt({typeName:y.ZodNaN,...x(r)});const an=Symbol("zod_brand");class Zt extends k{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class st extends k{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?b:a.status==="dirty"?(t.dirty(),je(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?b:s.status==="dirty"?(t.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,t){return new st({in:e,out:t,typeName:y.ZodPipeline})}}class at extends k{_parse(e){const t=this._def.innerType._parse(e),n=s=>(Te(s)&&(s.value=Object.freeze(s.value)),s);return We(t)?t.then(s=>n(s)):n(t)}unwrap(){return this._def.innerType}}at.create=(r,e)=>new at({innerType:r,typeName:y.ZodReadonly,...x(e)});function tr(r,e={},t){return r?Ze.create().superRefine((n,s)=>{var a,c;if(!r(n)){const o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,l=(c=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&c!==void 0?c:!0,d=typeof o=="string"?{message:o}:o;s.addIssue({code:"custom",...d,fatal:l})}}):Ze.create()}const on={object:M.lazycreate};var y;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(y||(y={}));const cn=(r,e={message:`Input not instance of ${r.name}`})=>tr(t=>t instanceof r,e),rr=K.create,nr=he.create,ln=xt.create,dn=me.create,sr=Ye.create,un=Ce.create,fn=vt.create,pn=qe.create,hn=Je.create,mn=Ze.create,gn=Ee.create,vn=le.create,yn=yt.create,bn=X.create,_n=M.create,xn=M.strictCreate,wn=He.create,kn=bt.create,Tn=Ke.create,Cn=ne.create,En=Xe.create,Rn=_t.create,Sn=Re.create,On=Ne.create,An=Qe.create,jn=et.create,Zn=ge.create,In=tt.create,Nn=Pe.create,ar=Q.create,Pn=se.create,Mn=ve.create,zn=Q.createWithPreprocess,$n=st.create;var ue=Object.freeze({__proto__:null,defaultErrorMap:Ae,setErrorMap:Mr,getErrorMap:ht,makeIssue:mt,EMPTY_PATH:zr,addIssueToContext:h,ParseStatus:F,INVALID:b,DIRTY:je,OK:U,isAborted:St,isDirty:Ot,isValid:Te,isAsync:We,get util(){return E},get objectUtil(){return Rt},ZodParsedType:g,getParsedType:ce,ZodType:k,datetimeRegex:Qt,ZodString:K,ZodNumber:he,ZodBigInt:me,ZodBoolean:Ye,ZodDate:Ce,ZodSymbol:vt,ZodUndefined:qe,ZodNull:Je,ZodAny:Ze,ZodUnknown:Ee,ZodNever:le,ZodVoid:yt,ZodArray:X,ZodObject:M,ZodUnion:He,ZodDiscriminatedUnion:bt,ZodIntersection:Ke,ZodTuple:ne,ZodRecord:Xe,ZodMap:_t,ZodSet:Re,ZodFunction:Ne,ZodLazy:Qe,ZodLiteral:et,ZodEnum:ge,ZodNativeEnum:tt,ZodPromise:Pe,ZodEffects:Q,ZodTransformer:Q,ZodOptional:se,ZodNullable:ve,ZodDefault:rt,ZodCatch:nt,ZodNaN:xt,BRAND:an,ZodBranded:Zt,ZodPipeline:st,ZodReadonly:at,custom:tr,Schema:k,ZodSchema:k,late:on,get ZodFirstPartyTypeKind(){return y},coerce:{string:r=>K.create({...r,coerce:!0}),number:r=>he.create({...r,coerce:!0}),boolean:r=>Ye.create({...r,coerce:!0}),bigint:r=>me.create({...r,coerce:!0}),date:r=>Ce.create({...r,coerce:!0})},any:mn,array:bn,bigint:dn,boolean:sr,date:un,discriminatedUnion:kn,effect:ar,enum:Zn,function:On,instanceof:cn,intersection:Tn,lazy:An,literal:jn,map:Rn,nan:ln,nativeEnum:In,never:vn,null:hn,nullable:Mn,number:nr,object:_n,oboolean:()=>sr().optional(),onumber:()=>nr().optional(),optional:Pn,ostring:()=>rr().optional(),pipeline:$n,preprocess:zn,promise:Nn,record:En,set:Sn,strictObject:xn,string:rr,symbol:fn,transformer:ar,tuple:Cn,undefined:pn,union:wn,unknown:gn,void:yn,NEVER:b,ZodIssueCode:f,quotelessJson:Pr,ZodError:G});function Vn(r){const e={};for(const[t,n]of Object.entries(r))t==="profile"&&typeof n=="object"&&n!==null&&"customer"in n&&"solution"in n?e[t]=ue.object({customer:ue.string().describe(n.customer),solution:ue.string().describe(n.solution)}):Array.isArray(n)?e[t]=ue.array(ue.string()).describe(n.join(", ")):typeof n=="string"&&(e[t]=n.includes("|")?ue.enum(n.split("|").map(s=>s.trim())).describe(n):ue.string().describe(n));return ue.object(e)}function Dn(r){return Vn(r)}function Ln(r){return r instanceof ue.ZodType}function ir(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var s=r.length;for(e=0;e<s;e++)r[e]&&(t=ir(r[e]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function Fn(){for(var r,e,t=0,n="",s=arguments.length;t<s;t++)(r=arguments[t])&&(e=ir(r))&&(n&&(n+=" "),n+=e);return n}const It="-",Un=r=>{const e=Bn(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=r;return{getClassGroupId:c=>{const o=c.split(It);return o[0]===""&&o.length!==1&&o.shift(),or(o,e)||Wn(c)},getConflictingClassGroupIds:(c,o)=>{const l=t[c]||[];return o&&n[c]?[...l,...n[c]]:l}}},or=(r,e)=>{var c;if(r.length===0)return e.classGroupId;const t=r[0],n=e.nextPart.get(t),s=n?or(r.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const a=r.join(It);return(c=e.validators.find(({validator:o})=>o(a)))==null?void 0:c.classGroupId},cr=/^\[(.+)\]$/,Wn=r=>{if(cr.test(r)){const e=cr.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},Bn=r=>{const{theme:e,prefix:t}=r,n={nextPart:new Map,validators:[]};return Yn(Object.entries(r.classGroups),t).forEach(([a,c])=>{Nt(c,n,a,e)}),n},Nt=(r,e,t,n)=>{r.forEach(s=>{if(typeof s=="string"){const a=s===""?e:lr(e,s);a.classGroupId=t;return}if(typeof s=="function"){if(Gn(s)){Nt(s(n),e,t,n);return}e.validators.push({validator:s,classGroupId:t});return}Object.entries(s).forEach(([a,c])=>{Nt(c,lr(e,a),t,n)})})},lr=(r,e)=>{let t=r;return e.split(It).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t},Gn=r=>r.isThemeGetter,Yn=(r,e)=>e?r.map(([t,n])=>{const s=n.map(a=>typeof a=="string"?e+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([c,o])=>[e+c,o])):a);return[t,s]}):r,qn=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,n=new Map;const s=(a,c)=>{t.set(a,c),e++,e>r&&(e=0,n=t,t=new Map)};return{get(a){let c=t.get(a);if(c!==void 0)return c;if((c=n.get(a))!==void 0)return s(a,c),c},set(a,c){t.has(a)?t.set(a,c):s(a,c)}}},dr="!",Jn=r=>{const{separator:e,experimentalParseClassName:t}=r,n=e.length===1,s=e[0],a=e.length,c=o=>{const l=[];let d=0,p=0,T;for(let P=0;P<o.length;P++){let Z=o[P];if(d===0){if(Z===s&&(n||o.slice(P,P+a)===e)){l.push(o.slice(p,P)),p=P+a;continue}if(Z==="/"){T=P;continue}}Z==="["?d++:Z==="]"&&d--}const N=l.length===0?o:o.substring(p),$=N.startsWith(dr),L=$?N.substring(1):N,z=T&&T>p?T-p:void 0;return{modifiers:l,hasImportantModifier:$,baseClassName:L,maybePostfixModifierPosition:z}};return t?o=>t({className:o,parseClassName:c}):c},Hn=r=>{if(r.length<=1)return r;const e=[];let t=[];return r.forEach(n=>{n[0]==="["?(e.push(...t.sort(),n),t=[]):t.push(n)}),e.push(...t.sort()),e},Kn=r=>({cache:qn(r.cacheSize),parseClassName:Jn(r),...Un(r)}),Xn=/\s+/,Qn=(r,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:s}=e,a=[],c=r.trim().split(Xn);let o="";for(let l=c.length-1;l>=0;l-=1){const d=c[l],{modifiers:p,hasImportantModifier:T,baseClassName:N,maybePostfixModifierPosition:$}=t(d);let L=!!$,z=n(L?N.substring(0,$):N);if(!z){if(!L){o=d+(o.length>0?" "+o:o);continue}if(z=n(N),!z){o=d+(o.length>0?" "+o:o);continue}L=!1}const P=Hn(p).join(":"),Z=T?P+dr:P,S=Z+z;if(a.includes(S))continue;a.push(S);const ee=s(z,L);for(let te=0;te<ee.length;++te){const pe=ee[te];a.push(Z+pe)}o=d+(o.length>0?" "+o:o)}return o};function es(){let r=0,e,t,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=ur(e))&&(n&&(n+=" "),n+=t);return n}const ur=r=>{if(typeof r=="string")return r;let e,t="";for(let n=0;n<r.length;n++)r[n]&&(e=ur(r[n]))&&(t&&(t+=" "),t+=e);return t};function ts(r,...e){let t,n,s,a=c;function c(l){const d=e.reduce((p,T)=>T(p),r());return t=Kn(d),n=t.cache.get,s=t.cache.set,a=o,o(l)}function o(l){const d=n(l);if(d)return d;const p=Qn(l,t);return s(l,p),p}return function(){return a(es.apply(null,arguments))}}const I=r=>{const e=t=>t[r]||[];return e.isThemeGetter=!0,e},fr=/^\[(?:([a-z-]+):)?(.+)\]$/i,rs=/^\d+\/\d+$/,ns=new Set(["px","full","screen"]),ss=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,as=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,is=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,os=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cs=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fe=r=>Me(r)||ns.has(r)||rs.test(r),ye=r=>ze(r,"length",gs),Me=r=>!!r&&!Number.isNaN(Number(r)),Pt=r=>ze(r,"number",Me),it=r=>!!r&&Number.isInteger(Number(r)),ls=r=>r.endsWith("%")&&Me(r.slice(0,-1)),w=r=>fr.test(r),be=r=>ss.test(r),ds=new Set(["length","size","percentage"]),us=r=>ze(r,ds,pr),fs=r=>ze(r,"position",pr),ps=new Set(["image","url"]),hs=r=>ze(r,ps,ys),ms=r=>ze(r,"",vs),ot=()=>!0,ze=(r,e,t)=>{const n=fr.exec(r);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):t(n[2]):!1},gs=r=>as.test(r)&&!is.test(r),pr=()=>!1,vs=r=>os.test(r),ys=r=>cs.test(r),bs=ts(()=>{const r=I("colors"),e=I("spacing"),t=I("blur"),n=I("brightness"),s=I("borderColor"),a=I("borderRadius"),c=I("borderSpacing"),o=I("borderWidth"),l=I("contrast"),d=I("grayscale"),p=I("hueRotate"),T=I("invert"),N=I("gap"),$=I("gradientColorStops"),L=I("gradientColorStopPositions"),z=I("inset"),P=I("margin"),Z=I("opacity"),S=I("padding"),ee=I("saturate"),te=I("scale"),pe=I("sepia"),ae=I("skew"),_e=I("space"),$e=I("translate"),xe=()=>["auto","contain","none"],ct=()=>["auto","hidden","clip","visible","scroll"],lt=()=>["auto",w,e],A=()=>[w,e],Y=()=>["",fe,ye],q=()=>["auto",Me,w],we=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Se=()=>["solid","dashed","dotted","double","none"],dt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ve=()=>["start","end","center","between","around","evenly","stretch"],ke=()=>["","0",w],ut=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Me,w];return{cacheSize:500,separator:":",theme:{colors:[ot],spacing:[fe,ye],blur:["none","",be,w],brightness:J(),borderColor:[r],borderRadius:["none","","full",be,w],borderSpacing:A(),borderWidth:Y(),contrast:J(),grayscale:ke(),hueRotate:J(),invert:ke(),gap:A(),gradientColorStops:[r],gradientColorStopPositions:[ls,ye],inset:lt(),margin:lt(),opacity:J(),padding:A(),saturate:J(),scale:J(),sepia:ke(),skew:J(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",w]}],container:["container"],columns:[{columns:[be]}],"break-after":[{"break-after":ut()}],"break-before":[{"break-before":ut()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...we(),w]}],overflow:[{overflow:ct()}],"overflow-x":[{"overflow-x":ct()}],"overflow-y":[{"overflow-y":ct()}],overscroll:[{overscroll:xe()}],"overscroll-x":[{"overscroll-x":xe()}],"overscroll-y":[{"overscroll-y":xe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[z]}],"inset-x":[{"inset-x":[z]}],"inset-y":[{"inset-y":[z]}],start:[{start:[z]}],end:[{end:[z]}],top:[{top:[z]}],right:[{right:[z]}],bottom:[{bottom:[z]}],left:[{left:[z]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",it,w]}],basis:[{basis:lt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",w]}],grow:[{grow:ke()}],shrink:[{shrink:ke()}],order:[{order:["first","last","none",it,w]}],"grid-cols":[{"grid-cols":[ot]}],"col-start-end":[{col:["auto",{span:["full",it,w]},w]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[ot]}],"row-start-end":[{row:["auto",{span:[it,w]},w]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",w]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",w]}],gap:[{gap:[N]}],"gap-x":[{"gap-x":[N]}],"gap-y":[{"gap-y":[N]}],"justify-content":[{justify:["normal",...Ve()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ve(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ve(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[P]}],mx:[{mx:[P]}],my:[{my:[P]}],ms:[{ms:[P]}],me:[{me:[P]}],mt:[{mt:[P]}],mr:[{mr:[P]}],mb:[{mb:[P]}],ml:[{ml:[P]}],"space-x":[{"space-x":[_e]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_e]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",w,e]}],"min-w":[{"min-w":[w,e,"min","max","fit"]}],"max-w":[{"max-w":[w,e,"none","full","min","max","fit","prose",{screen:[be]},be]}],h:[{h:[w,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[w,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[w,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[w,e,"auto","min","max","fit"]}],"font-size":[{text:["base",be,ye]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Pt]}],"font-family":[{font:[ot]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",w]}],"line-clamp":[{"line-clamp":["none",Me,Pt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fe,w]}],"list-image":[{"list-image":["none",w]}],"list-style-type":[{list:["none","disc","decimal",w]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[Z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[Z]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fe,ye]}],"underline-offset":[{"underline-offset":["auto",fe,w]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",w]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",w]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[Z]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...we(),fs]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",us]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},hs]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[L]}],"gradient-via-pos":[{via:[L]}],"gradient-to-pos":[{to:[L]}],"gradient-from":[{from:[$]}],"gradient-via":[{via:[$]}],"gradient-to":[{to:[$]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[Z]}],"border-style":[{border:[...Se(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[Z]}],"divide-style":[{divide:Se()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Se()]}],"outline-offset":[{"outline-offset":[fe,w]}],"outline-w":[{outline:[fe,ye]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[Z]}],"ring-offset-w":[{"ring-offset":[fe,ye]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",be,ms]}],"shadow-color":[{shadow:[ot]}],opacity:[{opacity:[Z]}],"mix-blend":[{"mix-blend":[...dt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":dt()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",be,w]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[T]}],saturate:[{saturate:[ee]}],sepia:[{sepia:[pe]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[T]}],"backdrop-opacity":[{"backdrop-opacity":[Z]}],"backdrop-saturate":[{"backdrop-saturate":[ee]}],"backdrop-sepia":[{"backdrop-sepia":[pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",w]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",w]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",w]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[te]}],"scale-x":[{"scale-x":[te]}],"scale-y":[{"scale-y":[te]}],rotate:[{rotate:[it,w]}],"translate-x":[{"translate-x":[$e]}],"translate-y":[{"translate-y":[$e]}],"skew-x":[{"skew-x":[ae]}],"skew-y":[{"skew-y":[ae]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",w]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",w]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",w]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[fe,ye,Pt]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function hr(...r){return bs(Fn(r))}const _s=Zr.openai("gpt-4o");function xs({children:r,prompt:e,schema:t,model:n=_s,output:s="object",count:a,cols:c,gap:o="1rem",className:l,itemClassName:d,schemaName:p,schemaDescription:T,mode:N="json",experimental_telemetry:$,experimental_providerMetadata:L}){const[z,P]=oe.useState([]),[Z,S]=oe.useState(null),ee=Ln(t)?t:Dn(t),te=s==="array"?{display:"grid",gridTemplateColumns:`repeat(${c||1}, minmax(0, 1fr))`,gap:o}:void 0;if(oe.useEffect(()=>{(async()=>{try{const _e=(await jr.generateObject({model:n,prompt:s==="array"?`Generate an array of ${a||c||3} items. ${e}`:e,output:"no-schema",mode:N,...$&&{experimental_telemetry:$},...L&&{experimental_providerMetadata:L}})).object,$e=s==="array"?Array.isArray(_e)?_e.map(xe=>ee.parse(xe)):[]:[ee.parse(_e)];P($e)}catch(ae){S(ae instanceof Error?ae:new Error("Unknown error"))}})()},[e,ee,n,s,a,c,o,l,p,T,N,$,L]),Z)throw Z;return z.length?s==="array"?Yt.jsx("div",{style:te,className:hr("ai-grid",l),children:z.map((pe,ae)=>Yt.jsx("div",{className:hr("ai-grid-item",d),children:r(pe)},ae))}):r(z[0]):null}ie.AI=xs,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { Component, ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
FallbackComponent: React.ComponentType<{
|
|
5
|
+
error: Error;
|
|
6
|
+
}>;
|
|
7
|
+
}
|
|
8
|
+
interface State {
|
|
9
|
+
error: Error | null;
|
|
10
|
+
}
|
|
11
|
+
export declare class ErrorBoundary extends Component<Props, State> {
|
|
12
|
+
constructor(props: Props);
|
|
13
|
+
static getDerivedStateFromError(error: Error): State;
|
|
14
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEnD,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAA;IACnB,iBAAiB,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAA;CACzD;AAED,UAAU,KAAK;IACb,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CACpB;AAED,qBAAa,aAAc,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBAC5C,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK;IAIpD,MAAM;CAUP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlogList.d.ts","sourceRoot":"","sources":["../../src/examples/BlogList.tsx"],"names":[],"mappings":"AAyBA,wBAAgB,QAAQ,IAAI,GAAG,CAAC,OAAO,CA8BtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlogList.fixture.d.ts","sourceRoot":"","sources":["../../src/examples/BlogList.fixture.tsx"],"names":[],"mappings":";;;AAsEA,wBAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeroSection.d.ts","sourceRoot":"","sources":["../../src/examples/HeroSection.tsx"],"names":[],"mappings":"AA0BA,wBAAgB,WAAW,IAAI,GAAG,CAAC,OAAO,CA+BzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeroSection.fixture.d.ts","sourceRoot":"","sources":["../../src/examples/HeroSection.fixture.tsx"],"names":[],"mappings":";;;AA2DA,wBAEC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/test/setup.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type ProfileObject = {
|
|
3
|
+
customer: string;
|
|
4
|
+
solution: string;
|
|
5
|
+
};
|
|
6
|
+
export type SchemaShape = {
|
|
7
|
+
productType: string;
|
|
8
|
+
profile: ProfileObject;
|
|
9
|
+
description: string;
|
|
10
|
+
tags: string[];
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
export interface SchemaObject extends SchemaShape {
|
|
14
|
+
[key: string]: string | string[] | ProfileObject | Record<string, unknown> | unknown;
|
|
15
|
+
}
|
|
16
|
+
export type SchemaZodShape = {
|
|
17
|
+
productType: z.ZodEnum<[string, ...string[]]> | z.ZodString;
|
|
18
|
+
profile: z.ZodObject<{
|
|
19
|
+
customer: z.ZodString;
|
|
20
|
+
solution: z.ZodString;
|
|
21
|
+
}>;
|
|
22
|
+
description: z.ZodString;
|
|
23
|
+
tags: z.ZodArray<z.ZodString>;
|
|
24
|
+
[key: string]: z.ZodTypeAny;
|
|
25
|
+
};
|
|
26
|
+
export declare function createSchemaFromObject(schema: SchemaObject): z.ZodObject<SchemaZodShape>;
|
|
27
|
+
export declare function isZodSchema(value: unknown): value is z.ZodSchema;
|
|
28
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/utils/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,aAAa,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AAED,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAA;CACrF;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAA;IAC3D,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC;QACnB,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAA;QACrB,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAA;KACtB,CAAC,CAAA;IACF,WAAW,EAAE,CAAC,CAAC,SAAS,CAAA;IACxB,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,UAAU,CAAA;CAC5B,CAAA;AAuBD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,YAAY,GAAG,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAExF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,CAAC,CAAC,SAAS,CAEhE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/utils/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ai-props",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Magic AI Prop Generation",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/ai-props.umd.js",
|
|
7
|
+
"module": "./dist/ai-props.es.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/ai-props.es.js",
|
|
12
|
+
"require": "./dist/ai-props.umd.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "vite",
|
|
21
|
+
"build": "tsc && vite build && tsc --emitDeclarationOnly",
|
|
22
|
+
"test": "vitest",
|
|
23
|
+
"cosmos": "cosmos",
|
|
24
|
+
"cosmos:export": "cosmos-export",
|
|
25
|
+
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx}\""
|
|
26
|
+
},
|
|
27
|
+
"release": {
|
|
28
|
+
"branches": [
|
|
29
|
+
"main"
|
|
30
|
+
],
|
|
31
|
+
"plugins": [
|
|
32
|
+
"@semantic-release/commit-analyzer",
|
|
33
|
+
"@semantic-release/release-notes-generator",
|
|
34
|
+
"@semantic-release/npm",
|
|
35
|
+
"@semantic-release/github"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"@types/react": "^18.2.0",
|
|
40
|
+
"@types/react-dom": "^18.2.0",
|
|
41
|
+
"react": "^18.2.0",
|
|
42
|
+
"react-dom": "^18.2.0"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@ai-sdk/openai": "^1.0.8",
|
|
46
|
+
"ai": "^4.0.18",
|
|
47
|
+
"clsx": "^2.1.1",
|
|
48
|
+
"tailwind-merge": "^2.5.5"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@opentelemetry/api": "^1.9.0",
|
|
52
|
+
"@semantic-release/commit-analyzer": "^13.0.0",
|
|
53
|
+
"@semantic-release/github": "^11.0.1",
|
|
54
|
+
"@semantic-release/npm": "^12.0.1",
|
|
55
|
+
"@semantic-release/release-notes-generator": "^14.0.1",
|
|
56
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
57
|
+
"@testing-library/react": "^14.1.0",
|
|
58
|
+
"@types/node": "^20.10.2",
|
|
59
|
+
"@types/react": "^18.2.0",
|
|
60
|
+
"@types/react-dom": "^18.2.0",
|
|
61
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
62
|
+
"@vitest/coverage-v8": "^2.1.8",
|
|
63
|
+
"jsdom": "^22.1.0",
|
|
64
|
+
"prettier": "^3.4.2",
|
|
65
|
+
"react": "^18.2.0",
|
|
66
|
+
"react-cosmos": "^6.0.0",
|
|
67
|
+
"react-dom": "^18.2.0",
|
|
68
|
+
"semantic-release": "^24.2.0",
|
|
69
|
+
"typescript": "^5.3.2",
|
|
70
|
+
"vite": "^5.0.2",
|
|
71
|
+
"vitest": "^1.0.2",
|
|
72
|
+
"zod": "^3.22.4"
|
|
73
|
+
},
|
|
74
|
+
"keywords": [
|
|
75
|
+
"react",
|
|
76
|
+
"ai",
|
|
77
|
+
"props",
|
|
78
|
+
"openai",
|
|
79
|
+
"gpt"
|
|
80
|
+
],
|
|
81
|
+
"author": "",
|
|
82
|
+
"license": "MIT"
|
|
83
|
+
}
|