@ht-rnd/json-schema-editor 1.0.6 → 1.0.8

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.
@@ -1,43 +1,40 @@
1
- (function(rr,Z){typeof exports=="object"&&typeof module<"u"?Z(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],Z):(rr=typeof globalThis<"u"?globalThis:rr||self,Z(rr["json-schema-editor"]={},rr.React,rr.ReactDOM))})(this,(function(rr,Z,Yi){"use strict";function Ji(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const S=Ji(Z),qn=Ji(Yi);function Xi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Un={exports:{}},gn={};/**
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 Qi;function Bh(){if(Qi)return gn;Qi=1;var e=Z,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(i,c,l){var u,p={},m=null,v=null;l!==void 0&&(m=""+l),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(v=c.ref);for(u in c)n.call(c,u)&&!o.hasOwnProperty(u)&&(p[u]=c[u]);if(i&&i.defaultProps)for(u in c=i.defaultProps,c)p[u]===void 0&&(p[u]=c[u]);return{$$typeof:t,type:i,key:m,ref:v,props:p,_owner:s.current}}return gn.Fragment=r,gn.jsx=a,gn.jsxs=a,gn}var vn={};/**
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 ec;function Wh(){return ec||(ec=1,process.env.NODE_ENV!=="production"&&(function(){var e=Z,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),x=Symbol.iterator,y="@@iterator";function h(P){if(P===null||typeof P!="object")return null;var X=x&&P[x]||P[y];return typeof X=="function"?X:null}var _=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(P){{for(var X=arguments.length,ue=new Array(X>1?X-1:0),_e=1;_e<X;_e++)ue[_e-1]=arguments[_e];b("error",P,ue)}}function b(P,X,ue){{var _e=_.ReactDebugCurrentFrame,Be=_e.getStackAddendum();Be!==""&&(X+="%s",ue=ue.concat([Be]));var Ke=ue.map(function(Ve){return String(Ve)});Ke.unshift("Warning: "+X),Function.prototype.apply.call(console[P],console,Ke)}}var w=!1,g=!1,$=!1,E=!1,k=!1,I;I=Symbol.for("react.module.reference");function z(P){return!!(typeof P=="string"||typeof P=="function"||P===n||P===o||k||P===s||P===l||P===u||E||P===v||w||g||$||typeof P=="object"&&P!==null&&(P.$$typeof===m||P.$$typeof===p||P.$$typeof===a||P.$$typeof===i||P.$$typeof===c||P.$$typeof===I||P.getModuleId!==void 0))}function M(P,X,ue){var _e=P.displayName;if(_e)return _e;var Be=X.displayName||X.name||"";return Be!==""?ue+"("+Be+")":ue}function V(P){return P.displayName||"Context"}function F(P){if(P==null)return null;if(typeof P.tag=="number"&&f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof P=="function")return P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case s:return"StrictMode";case l:return"Suspense";case u:return"SuspenseList"}if(typeof P=="object")switch(P.$$typeof){case i:var X=P;return V(X)+".Consumer";case a:var ue=P;return V(ue._context)+".Provider";case c:return M(P,P.render,"ForwardRef");case p:var _e=P.displayName||null;return _e!==null?_e:F(P.type)||"Memo";case m:{var Be=P,Ke=Be._payload,Ve=Be._init;try{return F(Ve(Ke))}catch{return null}}}return null}var W=Object.assign,re=0,Y,ae,L,ve,G,T,K;function O(){}O.__reactDisabledLog=!0;function C(){{if(re===0){Y=console.log,ae=console.info,L=console.warn,ve=console.error,G=console.group,T=console.groupCollapsed,K=console.groupEnd;var P={configurable:!0,enumerable:!0,value:O,writable:!0};Object.defineProperties(console,{info:P,log:P,warn:P,error:P,group:P,groupCollapsed:P,groupEnd:P})}re++}}function R(){{if(re--,re===0){var P={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},P,{value:Y}),info:W({},P,{value:ae}),warn:W({},P,{value:L}),error:W({},P,{value:ve}),group:W({},P,{value:G}),groupCollapsed:W({},P,{value:T}),groupEnd:W({},P,{value:K})})}re<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=_.ReactCurrentDispatcher,B;function Q(P,X,ue){{if(B===void 0)try{throw Error()}catch(Be){var _e=Be.stack.trim().match(/\n( *(at )?)/);B=_e&&_e[1]||""}return`
18
- `+B+P}}var pe=!1,ie;{var N=typeof WeakMap=="function"?WeakMap:Map;ie=new N}function A(P,X){if(!P||pe)return"";{var ue=ie.get(P);if(ue!==void 0)return ue}var _e;pe=!0;var Be=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ke;Ke=q.current,q.current=null,C();try{if(X){var Ve=function(){throw Error()};if(Object.defineProperty(Ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ve,[])}catch(ht){_e=ht}Reflect.construct(P,[],Ve)}else{try{Ve.call()}catch(ht){_e=ht}P.call(Ve.prototype)}}else{try{throw Error()}catch(ht){_e=ht}P()}}catch(ht){if(ht&&_e&&typeof ht.stack=="string"){for(var De=ht.stack.split(`
19
- `),dt=_e.stack.split(`
20
- `),Xe=De.length-1,tt=dt.length-1;Xe>=1&&tt>=0&&De[Xe]!==dt[tt];)tt--;for(;Xe>=1&&tt>=0;Xe--,tt--)if(De[Xe]!==dt[tt]){if(Xe!==1||tt!==1)do if(Xe--,tt--,tt<0||De[Xe]!==dt[tt]){var $t=`
21
- `+De[Xe].replace(" at new "," at ");return P.displayName&&$t.includes("<anonymous>")&&($t=$t.replace("<anonymous>",P.displayName)),typeof P=="function"&&ie.set(P,$t),$t}while(Xe>=1&&tt>=0);break}}}finally{pe=!1,q.current=Ke,R(),Error.prepareStackTrace=Be}var pn=P?P.displayName||P.name:"",Nr=pn?Q(pn):"";return typeof P=="function"&&ie.set(P,Nr),Nr}function H(P,X,ue){return A(P,!1)}function J(P){var X=P.prototype;return!!(X&&X.isReactComponent)}function le(P,X,ue){if(P==null)return"";if(typeof P=="function")return A(P,J(P));if(typeof P=="string")return Q(P);switch(P){case l:return Q("Suspense");case u:return Q("SuspenseList")}if(typeof P=="object")switch(P.$$typeof){case c:return H(P.render);case p:return le(P.type,X,ue);case m:{var _e=P,Be=_e._payload,Ke=_e._init;try{return le(Ke(Be),X,ue)}catch{}}}return""}var ye=Object.prototype.hasOwnProperty,He={},ot=_.ReactDebugCurrentFrame;function Ge(P){if(P){var X=P._owner,ue=le(P.type,P._source,X?X.type:null);ot.setExtraStackFrame(ue)}else ot.setExtraStackFrame(null)}function j(P,X,ue,_e,Be){{var Ke=Function.call.bind(ye);for(var Ve in P)if(Ke(P,Ve)){var De=void 0;try{if(typeof P[Ve]!="function"){var dt=Error((_e||"React class")+": "+ue+" type `"+Ve+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof P[Ve]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw dt.name="Invariant Violation",dt}De=P[Ve](X,Ve,_e,ue,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Xe){De=Xe}De&&!(De instanceof Error)&&(Ge(Be),f("%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).",_e||"React class",ue,Ve,typeof De),Ge(null)),De instanceof Error&&!(De.message in He)&&(He[De.message]=!0,Ge(Be),f("Failed %s type: %s",ue,De.message),Ge(null))}}}var D=Array.isArray;function U(P){return D(P)}function ne(P){{var X=typeof Symbol=="function"&&Symbol.toStringTag,ue=X&&P[Symbol.toStringTag]||P.constructor.name||"Object";return ue}}function se(P){try{return ee(P),!1}catch{return!0}}function ee(P){return""+P}function he(P){if(se(P))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ne(P)),ee(P)}var Ie=_.ReactCurrentOwner,Ue={key:!0,ref:!0,__self:!0,__source:!0},nt,tr;function Ut(P){if(ye.call(P,"ref")){var X=Object.getOwnPropertyDescriptor(P,"ref").get;if(X&&X.isReactWarning)return!1}return P.ref!==void 0}function Bi(P){if(ye.call(P,"key")){var X=Object.getOwnPropertyDescriptor(P,"key").get;if(X&&X.isReactWarning)return!1}return P.key!==void 0}function Ln(P,X){typeof P.ref=="string"&&Ie.current}function zn(P,X){{var ue=function(){nt||(nt=!0,f("%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)",X))};ue.isReactWarning=!0,Object.defineProperty(P,"key",{get:ue,configurable:!0})}}function Wi(P,X){{var ue=function(){tr||(tr=!0,f("%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)",X))};ue.isReactWarning=!0,Object.defineProperty(P,"ref",{get:ue,configurable:!0})}}var Go=function(P,X,ue,_e,Be,Ke,Ve){var De={$$typeof:t,type:P,key:X,ref:ue,props:Ve,_owner:Ke};return De._store={},Object.defineProperty(De._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(De,"_self",{configurable:!1,enumerable:!1,writable:!1,value:_e}),Object.defineProperty(De,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Be}),Object.freeze&&(Object.freeze(De.props),Object.freeze(De)),De};function Hi(P,X,ue,_e,Be){{var Ke,Ve={},De=null,dt=null;ue!==void 0&&(he(ue),De=""+ue),Bi(X)&&(he(X.key),De=""+X.key),Ut(X)&&(dt=X.ref,Ln(X,Be));for(Ke in X)ye.call(X,Ke)&&!Ue.hasOwnProperty(Ke)&&(Ve[Ke]=X[Ke]);if(P&&P.defaultProps){var Xe=P.defaultProps;for(Ke in Xe)Ve[Ke]===void 0&&(Ve[Ke]=Xe[Ke])}if(De||dt){var tt=typeof P=="function"?P.displayName||P.name||"Unknown":P;De&&zn(Ve,tt),dt&&Wi(Ve,tt)}return Go(P,De,dt,Be,_e,Ie.current,Ve)}}var mn=_.ReactCurrentOwner,Mh=_.ReactDebugCurrentFrame;function hn(P){if(P){var X=P._owner,ue=le(P.type,P._source,X?X.type:null);Mh.setExtraStackFrame(ue)}else Mh.setExtraStackFrame(null)}var Gi;Gi=!1;function Ki(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function Vh(){{if(mn.current){var P=F(mn.current.type);if(P)return`
22
-
23
- Check the render method of \``+P+"`."}return""}}function O$(P){return""}var Fh={};function I$(P){{var X=Vh();if(!X){var ue=typeof P=="string"?P:P.displayName||P.name;ue&&(X=`
24
-
25
- Check the top-level render call using <`+ue+">.")}return X}}function Lh(P,X){{if(!P._store||P._store.validated||P.key!=null)return;P._store.validated=!0;var ue=I$(X);if(Fh[ue])return;Fh[ue]=!0;var _e="";P&&P._owner&&P._owner!==mn.current&&(_e=" It was passed a child from "+F(P._owner.type)+"."),hn(P),f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ue,_e),hn(null)}}function zh(P,X){{if(typeof P!="object")return;if(U(P))for(var ue=0;ue<P.length;ue++){var _e=P[ue];Ki(_e)&&Lh(_e,X)}else if(Ki(P))P._store&&(P._store.validated=!0);else if(P){var Be=h(P);if(typeof Be=="function"&&Be!==P.entries)for(var Ke=Be.call(P),Ve;!(Ve=Ke.next()).done;)Ki(Ve.value)&&Lh(Ve.value,X)}}}function D$(P){{var X=P.type;if(X==null||typeof X=="string")return;var ue;if(typeof X=="function")ue=X.propTypes;else if(typeof X=="object"&&(X.$$typeof===c||X.$$typeof===p))ue=X.propTypes;else return;if(ue){var _e=F(X);j(ue,P.props,"prop",_e,P)}else if(X.PropTypes!==void 0&&!Gi){Gi=!0;var Be=F(X);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Be||"Unknown")}typeof X.getDefaultProps=="function"&&!X.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function M$(P){{for(var X=Object.keys(P.props),ue=0;ue<X.length;ue++){var _e=X[ue];if(_e!=="children"&&_e!=="key"){hn(P),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",_e),hn(null);break}}P.ref!==null&&(hn(P),f("Invalid attribute `ref` supplied to `React.Fragment`."),hn(null))}}var qh={};function Uh(P,X,ue,_e,Be,Ke){{var Ve=z(P);if(!Ve){var De="";(P===void 0||typeof P=="object"&&P!==null&&Object.keys(P).length===0)&&(De+=" 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 dt=O$();dt?De+=dt:De+=Vh();var Xe;P===null?Xe="null":U(P)?Xe="array":P!==void 0&&P.$$typeof===t?(Xe="<"+(F(P.type)||"Unknown")+" />",De=" Did you accidentally export a JSX literal instead of a component?"):Xe=typeof P,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Xe,De)}var tt=Hi(P,X,ue,Be,Ke);if(tt==null)return tt;if(Ve){var $t=X.children;if($t!==void 0)if(_e)if(U($t)){for(var pn=0;pn<$t.length;pn++)zh($t[pn],P);Object.freeze&&Object.freeze($t)}else f("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 zh($t,P)}if(ye.call(X,"key")){var Nr=F(P),ht=Object.keys(X).filter(function(U$){return U$!=="key"}),Zi=ht.length>0?"{key: someKey, "+ht.join(": ..., ")+": ...}":"{key: someKey}";if(!qh[Nr+Zi]){var q$=ht.length>0?"{"+ht.join(": ..., ")+": ...}":"{}";f(`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} />`,Zi,Nr,q$,Nr),qh[Nr+Zi]=!0}}return P===n?M$(tt):D$(tt),tt}}function V$(P,X,ue){return Uh(P,X,ue,!0)}function F$(P,X,ue){return Uh(P,X,ue,!1)}var L$=F$,z$=V$;vn.Fragment=n,vn.jsx=L$,vn.jsxs=z$})()),vn}var tc;function Hh(){return tc||(tc=1,process.env.NODE_ENV==="production"?Un.exports=Bh():Un.exports=Wh()),Un.exports}var d=Hh(),yn=e=>e.type==="checkbox",_r=e=>e instanceof Date,ft=e=>e==null;const rc=e=>typeof e=="object";var Qe=e=>!ft(e)&&!Array.isArray(e)&&rc(e)&&!_r(e),nc=e=>Qe(e)&&e.target?yn(e.target)?e.target.checked:e.target.value:e,Gh=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,sc=(e,t)=>e.has(Gh(t)),Kh=e=>{const t=e.constructor&&e.constructor.prototype;return Qe(t)&&t.hasOwnProperty("isPrototypeOf")},Ko=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ye(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Ko&&(e instanceof Blob||n))&&(r||Qe(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!Kh(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=Ye(e[s]));else return e;return t}var Bn=e=>/^\w*$/.test(e),Ze=e=>e===void 0,Wn=e=>Array.isArray(e)?e.filter(Boolean):[],Zo=e=>Wn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),oe=(e,t,r)=>{if(!t||!Qe(e))return r;const n=(Bn(t)?[t]:Zo(t)).reduce((s,o)=>ft(s)?s:s[o],e);return Ze(n)||n===e?Ze(e[t])?r:e[t]:n},pt=e=>typeof e=="boolean",ze=(e,t,r)=>{let n=-1;const s=Bn(t)?[t]:Zo(t),o=s.length,a=o-1;for(;++n<o;){const i=s[n];let c=r;if(n!==a){const l=e[i];c=Qe(l)||Array.isArray(l)?l:isNaN(+s[n+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=c,e=e[i]}};const Hn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Bt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Yo=Z.createContext(null);Yo.displayName="HookFormContext";const at=()=>Z.useContext(Yo),Zh=e=>{const{children:t,...r}=e;return Z.createElement(Yo.Provider,{value:r},t)};var oc=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const a=o;return t._proxyFormState[a]!==xt.all&&(t._proxyFormState[a]=!n||xt.all),r&&(r[a]=!0),e[a]}});return s};const Gn=typeof window<"u"?Z.useLayoutEffect:Z.useEffect;function ac(e){const t=at(),{control:r=t.control,disabled:n,name:s,exact:o}=e||{},[a,i]=Z.useState(r._formState),c=Z.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Gn(()=>r._subscribe({name:s,formState:c.current,exact:o,callback:l=>{!n&&i({...r._formState,...l})}}),[s,n,o]),Z.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),Z.useMemo(()=>oc(a,r,c.current,!1),[a,r])}var gt=e=>typeof e=="string",Jo=(e,t,r,n,s)=>gt(e)?(n&&t.watch.add(e),oe(r,e,s)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),oe(r,o))):(n&&(t.watchAll=!0),r),Xo=e=>ft(e)||!rc(e);function St(e,t,r=new WeakSet){if(Xo(e)||Xo(t))return Object.is(e,t);if(_r(e)&&_r(t))return e.getTime()===t.getTime();const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const o of n){const a=e[o];if(!s.includes(o))return!1;if(o!=="ref"){const i=t[o];if(_r(a)&&_r(i)||Qe(a)&&Qe(i)||Array.isArray(a)&&Array.isArray(i)?!St(a,i,r):!Object.is(a,i))return!1}}return!0}function bn(e){const t=at(),{control:r=t.control,name:n,defaultValue:s,disabled:o,exact:a,compute:i}=e||{},c=Z.useRef(s),l=Z.useRef(i),u=Z.useRef(void 0),p=Z.useRef(r),m=Z.useRef(n);l.current=i;const[v,x]=Z.useState(()=>{const w=r._getWatch(n,c.current);return l.current?l.current(w):w}),y=Z.useCallback(w=>{const g=Jo(n,r._names,w||r._formValues,!1,c.current);return l.current?l.current(g):g},[r._formValues,r._names,n]),h=Z.useCallback(w=>{if(!o){const g=Jo(n,r._names,w||r._formValues,!1,c.current);if(l.current){const $=l.current(g);St($,u.current)||(x($),u.current=$)}else x(g)}},[r._formValues,r._names,o,n]);Gn(()=>((p.current!==r||!St(m.current,n))&&(p.current=r,m.current=n,h()),r._subscribe({name:n,formState:{values:!0},exact:a,callback:w=>{h(w.values)}})),[r,a,n,h]),Z.useEffect(()=>r._removeUnmounted());const _=p.current!==r,f=m.current,b=Z.useMemo(()=>{if(o)return null;const w=!_&&!St(f,n);return _||w?y():null},[o,_,n,f,y]);return b!==null?b:v}function Yh(e){const t=at(),{name:r,disabled:n,control:s=t.control,shouldUnregister:o,defaultValue:a}=e,i=sc(s._names.array,r),c=Z.useMemo(()=>oe(s._formValues,r,oe(s._defaultValues,r,a)),[s,r,a]),l=bn({control:s,name:r,defaultValue:c,exact:!0}),u=ac({control:s,name:r,exact:!0}),p=Z.useRef(e),m=Z.useRef(void 0),v=Z.useRef(s.register(r,{...e.rules,value:l,...pt(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const x=Z.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!oe(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!oe(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!oe(u.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!oe(u.validatingFields,r)},error:{enumerable:!0,get:()=>oe(u.errors,r)}}),[u,r]),y=Z.useCallback(b=>v.current.onChange({target:{value:nc(b),name:r},type:Hn.CHANGE}),[r]),h=Z.useCallback(()=>v.current.onBlur({target:{value:oe(s._formValues,r),name:r},type:Hn.BLUR}),[r,s._formValues]),_=Z.useCallback(b=>{const w=oe(s._fields,r);w&&b&&(w._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:g=>b.setCustomValidity(g),reportValidity:()=>b.reportValidity()})},[s._fields,r]),f=Z.useMemo(()=>({name:r,value:l,...pt(n)||u.disabled?{disabled:u.disabled||n}:{},onChange:y,onBlur:h,ref:_}),[r,n,u.disabled,y,h,_,l]);return Z.useEffect(()=>{const b=s._options.shouldUnregister||o,w=m.current;w&&w!==r&&!i&&s.unregister(w),s.register(r,{...p.current.rules,...pt(p.current.disabled)?{disabled:p.current.disabled}:{}});const g=($,E)=>{const k=oe(s._fields,$);k&&k._f&&(k._f.mount=E)};if(g(r,!0),b){const $=Ye(oe(s._options.defaultValues,r,p.current.defaultValue));ze(s._defaultValues,r,$),Ze(oe(s._formValues,r))&&ze(s._formValues,r,$)}return!i&&s.register(r),m.current=r,()=>{(i?b&&!s._state.action:b)?s.unregister(r):g(r,!1)}},[r,s,i,o]),Z.useEffect(()=>{s._setDisabledField({disabled:n,name:r})},[n,r,s]),Z.useMemo(()=>({field:f,formState:u,fieldState:x}),[f,u,x])}const nr=e=>e.render(Yh(e));var Qo=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},mt=e=>Array.isArray(e)?e:[e],ic=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}};function cc(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const s=e[n],o=t[n];if(s&&Qe(s)&&o){const a=cc(s,o);Qe(a)&&(r[n]=a)}else e[n]&&(r[n]=o)}return r}var it=e=>Qe(e)&&!Object.keys(e).length,ea=e=>e.type==="file",Et=e=>typeof e=="function",Kn=e=>{if(!Ko)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},lc=e=>e.type==="select-multiple",ta=e=>e.type==="radio",Jh=e=>ta(e)||yn(e),ra=e=>Kn(e)&&e.isConnected;function Xh(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Ze(e)?n++:e[t[n++]];return e}function Qh(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ze(e[t]))return!1;return!0}function Je(e,t){const r=Array.isArray(t)?t:Bn(t)?[t]:Zo(t),n=r.length===1?e:Xh(e,r),s=r.length-1,o=r[s];return n&&delete n[o],s!==0&&(Qe(n)&&it(n)||Array.isArray(n)&&Qh(n))&&Je(e,r.slice(0,-1)),e}var ep=e=>{for(const t in e)if(Et(e[t]))return!0;return!1};function uc(e){return Array.isArray(e)||Qe(e)&&!ep(e)}function na(e,t={}){for(const r in e){const n=e[r];uc(n)?(t[r]=Array.isArray(n)?[]:{},na(n,t[r])):Ze(n)||(t[r]=!0)}return t}function Ar(e,t,r){r||(r=na(t));for(const n in e){const s=e[n];if(uc(s))Ze(t)||Xo(r[n])?r[n]=na(s,Array.isArray(s)?[]:{}):Ar(s,ft(t)?{}:t[n],r[n]);else{const o=t[n];r[n]=!St(s,o)}}return r}const dc={value:!1,isValid:!1},fc={value:!0,isValid:!0};var mc=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ze(e[0].attributes.value)?Ze(e[0].value)||e[0].value===""?fc:{value:e[0].value,isValid:!0}:fc:dc}return dc},hc=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ze(e)?e:t?e===""?NaN:e&&+e:r&&gt(e)?new Date(e):n?n(e):e;const pc={isValid:!1,value:null};var gc=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,pc):pc;function vc(e){const t=e.ref;return ea(t)?t.files:ta(t)?gc(e.refs).value:lc(t)?[...t.selectedOptions].map(({value:r})=>r):yn(t)?mc(e.refs).value:hc(Ze(t.value)?e.ref.value:t.value,e)}var tp=(e,t,r,n)=>{const s={};for(const o of e){const a=oe(t,o);a&&ze(s,o,a._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Zn=e=>e instanceof RegExp,_n=e=>Ze(e)?e:Zn(e)?e.source:Qe(e)?Zn(e.value)?e.value.source:e.value:e,Tr=e=>({isOnSubmit:!e||e===xt.onSubmit,isOnBlur:e===xt.onBlur,isOnChange:e===xt.onChange,isOnAll:e===xt.all,isOnTouch:e===xt.onTouched});const yc="AsyncFunction";var rp=e=>!!e&&!!e.validate&&!!(Et(e.validate)&&e.validate.constructor.name===yc||Qe(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===yc)),np=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),sa=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Or=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const o=oe(e,s);if(o){const{_f:a,...i}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],s)&&!n)return!0;if(a.ref&&t(a.ref,a.name)&&!n)return!0;if(Or(i,t))break}else if(Qe(i)&&Or(i,t))break}}};function bc(e,t,r){const n=oe(e,r);if(n||Bn(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const o=s.join("."),a=oe(t,o),i=oe(e,o);if(a&&!Array.isArray(a)&&r!==o)return{name:r};if(i&&i.type)return{name:o,error:i};if(i&&i.root&&i.root.type)return{name:`${o}.root`,error:i.root};s.pop()}return{name:r}}var sp=(e,t,r,n)=>{r(e);const{name:s,...o}=e;return it(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!n||xt.all))},op=(e,t,r)=>!e||!t||e===t||mt(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),ap=(e,t,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(t||e):(r?n.isOnBlur:s.isOnBlur)?!e:(r?n.isOnChange:s.isOnChange)?e:!0,ip=(e,t)=>!Wn(oe(e,t)).length&&Je(e,t),_c=(e,t,r)=>{const n=mt(oe(e,r));return ze(n,"root",t[r]),ze(e,r,n),e};function xc(e,t,r="validate"){if(gt(e)||Array.isArray(e)&&e.every(gt)||pt(e)&&!e)return{type:r,message:gt(e)?e:"",ref:t}}var Ir=e=>Qe(e)&&!Zn(e)?e:{value:e,message:""},oa=async(e,t,r,n,s,o)=>{const{ref:a,refs:i,required:c,maxLength:l,minLength:u,min:p,max:m,pattern:v,validate:x,name:y,valueAsNumber:h,mount:_}=e._f,f=oe(r,y);if(!_||t.has(y))return{};const b=i?i[0]:a,w=V=>{s&&b.reportValidity&&(b.setCustomValidity(pt(V)?"":V||""),b.reportValidity())},g={},$=ta(a),E=yn(a),k=$||E,I=(h||ea(a))&&Ze(a.value)&&Ze(f)||Kn(a)&&a.value===""||f===""||Array.isArray(f)&&!f.length,z=Qo.bind(null,y,n,g),M=(V,F,W,re=Bt.maxLength,Y=Bt.minLength)=>{const ae=V?F:W;g[y]={type:V?re:Y,message:ae,ref:a,...z(V?re:Y,ae)}};if(o?!Array.isArray(f)||!f.length:c&&(!k&&(I||ft(f))||pt(f)&&!f||E&&!mc(i).isValid||$&&!gc(i).isValid)){const{value:V,message:F}=gt(c)?{value:!!c,message:c}:Ir(c);if(V&&(g[y]={type:Bt.required,message:F,ref:b,...z(Bt.required,F)},!n))return w(F),g}if(!I&&(!ft(p)||!ft(m))){let V,F;const W=Ir(m),re=Ir(p);if(!ft(f)&&!isNaN(f)){const Y=a.valueAsNumber||f&&+f;ft(W.value)||(V=Y>W.value),ft(re.value)||(F=Y<re.value)}else{const Y=a.valueAsDate||new Date(f),ae=G=>new Date(new Date().toDateString()+" "+G),L=a.type=="time",ve=a.type=="week";gt(W.value)&&f&&(V=L?ae(f)>ae(W.value):ve?f>W.value:Y>new Date(W.value)),gt(re.value)&&f&&(F=L?ae(f)<ae(re.value):ve?f<re.value:Y<new Date(re.value))}if((V||F)&&(M(!!V,W.message,re.message,Bt.max,Bt.min),!n))return w(g[y].message),g}if((l||u)&&!I&&(gt(f)||o&&Array.isArray(f))){const V=Ir(l),F=Ir(u),W=!ft(V.value)&&f.length>+V.value,re=!ft(F.value)&&f.length<+F.value;if((W||re)&&(M(W,V.message,F.message),!n))return w(g[y].message),g}if(v&&!I&&gt(f)){const{value:V,message:F}=Ir(v);if(Zn(V)&&!f.match(V)&&(g[y]={type:Bt.pattern,message:F,ref:a,...z(Bt.pattern,F)},!n))return w(F),g}if(x){if(Et(x)){const V=await x(f,r),F=xc(V,b);if(F&&(g[y]={...F,...z(Bt.validate,F.message)},!n))return w(F.message),g}else if(Qe(x)){let V={};for(const F in x){if(!it(V)&&!n)break;const W=xc(await x[F](f,r),b,F);W&&(V={...W,...z(F,W.message)},w(W.message),n&&(g[y]=V))}if(!it(V)&&(g[y]={ref:b,...V},!n))return g}}return w(!0),g};const cp={mode:xt.onSubmit,reValidateMode:xt.onChange,shouldFocusError:!0};function lp(e={}){let t={...cp,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Et(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=Qe(t.defaultValues)||Qe(t.values)?Ye(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Ye(s),a={action:!1,mount:!1,watch:!1},i={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let p={...u};const m={array:ic(),state:ic()},v=t.criteriaMode===xt.all,x=j=>D=>{clearTimeout(l),l=setTimeout(j,D)},y=async j=>{if(!t.disabled&&(u.isValid||p.isValid||j)){const D=t.resolver?it((await E()).errors):await I(n,!0);D!==r.isValid&&m.state.next({isValid:D})}},h=(j,D)=>{!t.disabled&&(u.isValidating||u.validatingFields||p.isValidating||p.validatingFields)&&((j||Array.from(i.mount)).forEach(U=>{U&&(D?ze(r.validatingFields,U,D):Je(r.validatingFields,U))}),m.state.next({validatingFields:r.validatingFields,isValidating:!it(r.validatingFields)}))},_=(j,D=[],U,ne,se=!0,ee=!0)=>{if(ne&&U&&!t.disabled){if(a.action=!0,ee&&Array.isArray(oe(n,j))){const he=U(oe(n,j),ne.argA,ne.argB);se&&ze(n,j,he)}if(ee&&Array.isArray(oe(r.errors,j))){const he=U(oe(r.errors,j),ne.argA,ne.argB);se&&ze(r.errors,j,he),ip(r.errors,j)}if((u.touchedFields||p.touchedFields)&&ee&&Array.isArray(oe(r.touchedFields,j))){const he=U(oe(r.touchedFields,j),ne.argA,ne.argB);se&&ze(r.touchedFields,j,he)}(u.dirtyFields||p.dirtyFields)&&(r.dirtyFields=Ar(s,o)),m.state.next({name:j,isDirty:M(j,D),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ze(o,j,D)},f=(j,D)=>{ze(r.errors,j,D),m.state.next({errors:r.errors})},b=j=>{r.errors=j,m.state.next({errors:r.errors,isValid:!1})},w=(j,D,U,ne)=>{const se=oe(n,j);if(se){const ee=oe(o,j,Ze(U)?oe(s,j):U);Ze(ee)||ne&&ne.defaultChecked||D?ze(o,j,D?ee:vc(se._f)):W(j,ee),a.mount&&!a.action&&y()}},g=(j,D,U,ne,se)=>{let ee=!1,he=!1;const Ie={name:j};if(!t.disabled){if(!U||ne){(u.isDirty||p.isDirty)&&(he=r.isDirty,r.isDirty=Ie.isDirty=M(),ee=he!==Ie.isDirty);const Ue=St(oe(s,j),D);he=!!oe(r.dirtyFields,j),Ue?Je(r.dirtyFields,j):ze(r.dirtyFields,j,!0),Ie.dirtyFields=r.dirtyFields,ee=ee||(u.dirtyFields||p.dirtyFields)&&he!==!Ue}if(U){const Ue=oe(r.touchedFields,j);Ue||(ze(r.touchedFields,j,U),Ie.touchedFields=r.touchedFields,ee=ee||(u.touchedFields||p.touchedFields)&&Ue!==U)}ee&&se&&m.state.next(Ie)}return ee?Ie:{}},$=(j,D,U,ne)=>{const se=oe(r.errors,j),ee=(u.isValid||p.isValid)&&pt(D)&&r.isValid!==D;if(t.delayError&&U?(c=x(()=>f(j,U)),c(t.delayError)):(clearTimeout(l),c=null,U?ze(r.errors,j,U):Je(r.errors,j)),(U?!St(se,U):se)||!it(ne)||ee){const he={...ne,...ee&&pt(D)?{isValid:D}:{},errors:r.errors,name:j};r={...r,...he},m.state.next(he)}},E=async j=>{h(j,!0);const D=await t.resolver(o,t.context,tp(j||i.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return h(j),D},k=async j=>{const{errors:D}=await E(j);if(j)for(const U of j){const ne=oe(D,U);ne?ze(r.errors,U,ne):Je(r.errors,U)}else r.errors=D;return D},I=async(j,D,U={valid:!0})=>{for(const ne in j){const se=j[ne];if(se){const{_f:ee,...he}=se;if(ee){const Ie=i.array.has(ee.name),Ue=se._f&&rp(se._f);Ue&&u.validatingFields&&h([ee.name],!0);const nt=await oa(se,i.disabled,o,v,t.shouldUseNativeValidation&&!D,Ie);if(Ue&&u.validatingFields&&h([ee.name]),nt[ee.name]&&(U.valid=!1,D))break;!D&&(oe(nt,ee.name)?Ie?_c(r.errors,nt,ee.name):ze(r.errors,ee.name,nt[ee.name]):Je(r.errors,ee.name))}!it(he)&&await I(he,D,U)}}return U.valid},z=()=>{for(const j of i.unMount){const D=oe(n,j);D&&(D._f.refs?D._f.refs.every(U=>!ra(U)):!ra(D._f.ref))&&B(j)}i.unMount=new Set},M=(j,D)=>!t.disabled&&(j&&D&&ze(o,j,D),!St(G(),s)),V=(j,D,U)=>Jo(j,i,{...a.mount?o:Ze(D)?s:gt(j)?{[j]:D}:D},U,D),F=j=>Wn(oe(a.mount?o:s,j,t.shouldUnregister?oe(s,j,[]):[])),W=(j,D,U={})=>{const ne=oe(n,j);let se=D;if(ne){const ee=ne._f;ee&&(!ee.disabled&&ze(o,j,hc(D,ee)),se=Kn(ee.ref)&&ft(D)?"":D,lc(ee.ref)?[...ee.ref.options].forEach(he=>he.selected=se.includes(he.value)):ee.refs?yn(ee.ref)?ee.refs.forEach(he=>{(!he.defaultChecked||!he.disabled)&&(Array.isArray(se)?he.checked=!!se.find(Ie=>Ie===he.value):he.checked=se===he.value||!!se)}):ee.refs.forEach(he=>he.checked=he.value===se):ea(ee.ref)?ee.ref.value="":(ee.ref.value=se,ee.ref.type||m.state.next({name:j,values:Ye(o)})))}(U.shouldDirty||U.shouldTouch)&&g(j,se,U.shouldTouch,U.shouldDirty,!0),U.shouldValidate&&ve(j)},re=(j,D,U)=>{for(const ne in D){if(!D.hasOwnProperty(ne))return;const se=D[ne],ee=j+"."+ne,he=oe(n,ee);(i.array.has(j)||Qe(se)||he&&!he._f)&&!_r(se)?re(ee,se,U):W(ee,se,U)}},Y=(j,D,U={})=>{const ne=oe(n,j),se=i.array.has(j),ee=Ye(D);ze(o,j,ee),se?(m.array.next({name:j,values:Ye(o)}),(u.isDirty||u.dirtyFields||p.isDirty||p.dirtyFields)&&U.shouldDirty&&m.state.next({name:j,dirtyFields:Ar(s,o),isDirty:M(j,ee)})):ne&&!ne._f&&!ft(ee)?re(j,ee,U):W(j,ee,U),sa(j,i)&&m.state.next({...r,name:j}),m.state.next({name:a.mount?j:void 0,values:Ye(o)})},ae=async j=>{a.mount=!0;const D=j.target;let U=D.name,ne=!0;const se=oe(n,U),ee=Ue=>{ne=Number.isNaN(Ue)||_r(Ue)&&isNaN(Ue.getTime())||St(Ue,oe(o,U,Ue))},he=Tr(t.mode),Ie=Tr(t.reValidateMode);if(se){let Ue,nt;const tr=D.type?vc(se._f):nc(j),Ut=j.type===Hn.BLUR||j.type===Hn.FOCUS_OUT,Bi=!np(se._f)&&!t.resolver&&!oe(r.errors,U)&&!se._f.deps||ap(Ut,oe(r.touchedFields,U),r.isSubmitted,Ie,he),Ln=sa(U,i,Ut);ze(o,U,tr),Ut?(!D||!D.readOnly)&&(se._f.onBlur&&se._f.onBlur(j),c&&c(0)):se._f.onChange&&se._f.onChange(j);const zn=g(U,tr,Ut),Wi=!it(zn)||Ln;if(!Ut&&m.state.next({name:U,type:j.type,values:Ye(o)}),Bi)return(u.isValid||p.isValid)&&(t.mode==="onBlur"?Ut&&y():Ut||y()),Wi&&m.state.next({name:U,...Ln?{}:zn});if(!Ut&&Ln&&m.state.next({...r}),t.resolver){const{errors:Go}=await E([U]);if(ee(tr),ne){const Hi=bc(r.errors,n,U),mn=bc(Go,n,Hi.name||U);Ue=mn.error,U=mn.name,nt=it(Go)}}else h([U],!0),Ue=(await oa(se,i.disabled,o,v,t.shouldUseNativeValidation))[U],h([U]),ee(tr),ne&&(Ue?nt=!1:(u.isValid||p.isValid)&&(nt=await I(n,!0)));ne&&(se._f.deps&&(!Array.isArray(se._f.deps)||se._f.deps.length>0)&&ve(se._f.deps),$(U,nt,Ue,zn))}},L=(j,D)=>{if(oe(r.errors,D)&&j.focus)return j.focus(),1},ve=async(j,D={})=>{let U,ne;const se=mt(j);if(t.resolver){const ee=await k(Ze(j)?j:se);U=it(ee),ne=j?!se.some(he=>oe(ee,he)):U}else j?(ne=(await Promise.all(se.map(async ee=>{const he=oe(n,ee);return await I(he&&he._f?{[ee]:he}:he)}))).every(Boolean),!(!ne&&!r.isValid)&&y()):ne=U=await I(n);return m.state.next({...!gt(j)||(u.isValid||p.isValid)&&U!==r.isValid?{}:{name:j},...t.resolver||!j?{isValid:U}:{},errors:r.errors}),D.shouldFocus&&!ne&&Or(n,L,j?se:i.mount),ne},G=(j,D)=>{let U={...a.mount?o:s};return D&&(U=cc(D.dirtyFields?r.dirtyFields:r.touchedFields,U)),Ze(j)?U:gt(j)?oe(U,j):j.map(ne=>oe(U,ne))},T=(j,D)=>({invalid:!!oe((D||r).errors,j),isDirty:!!oe((D||r).dirtyFields,j),error:oe((D||r).errors,j),isValidating:!!oe(r.validatingFields,j),isTouched:!!oe((D||r).touchedFields,j)}),K=j=>{j&&mt(j).forEach(D=>Je(r.errors,D)),m.state.next({errors:j?r.errors:{}})},O=(j,D,U)=>{const ne=(oe(n,j,{_f:{}})._f||{}).ref,se=oe(r.errors,j)||{},{ref:ee,message:he,type:Ie,...Ue}=se;ze(r.errors,j,{...Ue,...D,ref:ne}),m.state.next({name:j,errors:r.errors,isValid:!1}),U&&U.shouldFocus&&ne&&ne.focus&&ne.focus()},C=(j,D)=>Et(j)?m.state.subscribe({next:U=>"values"in U&&j(V(void 0,D),U)}):V(j,D,!0),R=j=>m.state.subscribe({next:D=>{op(j.name,D.name,j.exact)&&sp(D,j.formState||u,He,j.reRenderRoot)&&j.callback({values:{...o},...r,...D,defaultValues:s})}}).unsubscribe,q=j=>(a.mount=!0,p={...p,...j.formState},R({...j,formState:p})),B=(j,D={})=>{for(const U of j?mt(j):i.mount)i.mount.delete(U),i.array.delete(U),D.keepValue||(Je(n,U),Je(o,U)),!D.keepError&&Je(r.errors,U),!D.keepDirty&&Je(r.dirtyFields,U),!D.keepTouched&&Je(r.touchedFields,U),!D.keepIsValidating&&Je(r.validatingFields,U),!t.shouldUnregister&&!D.keepDefaultValue&&Je(s,U);m.state.next({values:Ye(o)}),m.state.next({...r,...D.keepDirty?{isDirty:M()}:{}}),!D.keepIsValid&&y()},Q=({disabled:j,name:D})=>{(pt(j)&&a.mount||j||i.disabled.has(D))&&(j?i.disabled.add(D):i.disabled.delete(D))},pe=(j,D={})=>{let U=oe(n,j);const ne=pt(D.disabled)||pt(t.disabled);return ze(n,j,{...U||{},_f:{...U&&U._f?U._f:{ref:{name:j}},name:j,mount:!0,...D}}),i.mount.add(j),U?Q({disabled:pt(D.disabled)?D.disabled:t.disabled,name:j}):w(j,!0,D.value),{...ne?{disabled:D.disabled||t.disabled}:{},...t.progressive?{required:!!D.required,min:_n(D.min),max:_n(D.max),minLength:_n(D.minLength),maxLength:_n(D.maxLength),pattern:_n(D.pattern)}:{},name:j,onChange:ae,onBlur:ae,ref:se=>{if(se){pe(j,D),U=oe(n,j);const ee=Ze(se.value)&&se.querySelectorAll&&se.querySelectorAll("input,select,textarea")[0]||se,he=Jh(ee),Ie=U._f.refs||[];if(he?Ie.find(Ue=>Ue===ee):ee===U._f.ref)return;ze(n,j,{_f:{...U._f,...he?{refs:[...Ie.filter(ra),ee,...Array.isArray(oe(s,j))?[{}]:[]],ref:{type:ee.type,name:j}}:{ref:ee}}}),w(j,!1,void 0,ee)}else U=oe(n,j,{}),U._f&&(U._f.mount=!1),(t.shouldUnregister||D.shouldUnregister)&&!(sc(i.array,j)&&a.action)&&i.unMount.add(j)}}},ie=()=>t.shouldFocusError&&Or(n,L,i.mount),N=j=>{pt(j)&&(m.state.next({disabled:j}),Or(n,(D,U)=>{const ne=oe(n,U);ne&&(D.disabled=ne._f.disabled||j,Array.isArray(ne._f.refs)&&ne._f.refs.forEach(se=>{se.disabled=ne._f.disabled||j}))},0,!1))},A=(j,D)=>async U=>{let ne;U&&(U.preventDefault&&U.preventDefault(),U.persist&&U.persist());let se=Ye(o);if(m.state.next({isSubmitting:!0}),t.resolver){const{errors:ee,values:he}=await E();r.errors=ee,se=Ye(he)}else await I(n);if(i.disabled.size)for(const ee of i.disabled)Je(se,ee);if(Je(r.errors,"root"),it(r.errors)){m.state.next({errors:{}});try{await j(se,U)}catch(ee){ne=ee}}else D&&await D({...r.errors},U),ie(),setTimeout(ie);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:it(r.errors)&&!ne,submitCount:r.submitCount+1,errors:r.errors}),ne)throw ne},H=(j,D={})=>{oe(n,j)&&(Ze(D.defaultValue)?Y(j,Ye(oe(s,j))):(Y(j,D.defaultValue),ze(s,j,Ye(D.defaultValue))),D.keepTouched||Je(r.touchedFields,j),D.keepDirty||(Je(r.dirtyFields,j),r.isDirty=D.defaultValue?M(j,Ye(oe(s,j))):M()),D.keepError||(Je(r.errors,j),u.isValid&&y()),m.state.next({...r}))},J=(j,D={})=>{const U=j?Ye(j):s,ne=Ye(U),se=it(j),ee=se?s:ne;if(D.keepDefaultValues||(s=U),!D.keepValues){if(D.keepDirtyValues){const he=new Set([...i.mount,...Object.keys(Ar(s,o))]);for(const Ie of Array.from(he))oe(r.dirtyFields,Ie)?ze(ee,Ie,oe(o,Ie)):Y(Ie,oe(ee,Ie))}else{if(Ko&&Ze(j))for(const he of i.mount){const Ie=oe(n,he);if(Ie&&Ie._f){const Ue=Array.isArray(Ie._f.refs)?Ie._f.refs[0]:Ie._f.ref;if(Kn(Ue)){const nt=Ue.closest("form");if(nt){nt.reset();break}}}}if(D.keepFieldsRef)for(const he of i.mount)Y(he,oe(ee,he));else n={}}o=t.shouldUnregister?D.keepDefaultValues?Ye(s):{}:Ye(ee),m.array.next({values:{...ee}}),m.state.next({values:{...ee}})}i={mount:D.keepDirtyValues?i.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!u.isValid||!!D.keepIsValid||!!D.keepDirtyValues||!t.shouldUnregister&&!it(ee),a.watch=!!t.shouldUnregister,m.state.next({submitCount:D.keepSubmitCount?r.submitCount:0,isDirty:se?!1:D.keepDirty?r.isDirty:!!(D.keepDefaultValues&&!St(j,s)),isSubmitted:D.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:se?{}:D.keepDirtyValues?D.keepDefaultValues&&o?Ar(s,o):r.dirtyFields:D.keepDefaultValues&&j?Ar(s,j):D.keepDirty?r.dirtyFields:{},touchedFields:D.keepTouched?r.touchedFields:{},errors:D.keepErrors?r.errors:{},isSubmitSuccessful:D.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:s})},le=(j,D)=>J(Et(j)?j(o):j,D),ye=(j,D={})=>{const U=oe(n,j),ne=U&&U._f;if(ne){const se=ne.refs?ne.refs[0]:ne.ref;se.focus&&(se.focus(),D.shouldSelect&&Et(se.select)&&se.select())}},He=j=>{r={...r,...j}},Ge={control:{register:pe,unregister:B,getFieldState:T,handleSubmit:A,setError:O,_subscribe:R,_runSchema:E,_focusError:ie,_getWatch:V,_getDirty:M,_setValid:y,_setFieldArray:_,_setDisabledField:Q,_setErrors:b,_getFieldArray:F,_reset:J,_resetDefaultValues:()=>Et(t.defaultValues)&&t.defaultValues().then(j=>{le(j,t.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:z,_disableForm:N,_subjects:m,_proxyFormState:u,get _fields(){return n},get _formValues(){return o},get _state(){return a},set _state(j){a=j},get _defaultValues(){return s},get _names(){return i},set _names(j){i=j},get _formState(){return r},get _options(){return t},set _options(j){t={...t,...j}}},subscribe:q,trigger:ve,register:pe,handleSubmit:A,watch:C,setValue:Y,getValues:G,reset:le,resetField:H,clearErrors:K,unregister:B,setError:O,setFocus:ye,getFieldState:T};return{...Ge,formControl:Ge}}var sr=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},aa=(e,t,r={})=>r.shouldFocus||Ze(r.shouldFocus)?r.focusName||`${e}.${Ze(r.focusIndex)?t:r.focusIndex}.`:"",ia=(e,t)=>[...e,...mt(t)],ca=e=>Array.isArray(e)?e.map(()=>{}):void 0;function la(e,t,r){return[...e.slice(0,t),...mt(r),...e.slice(t)]}var ua=(e,t,r)=>Array.isArray(e)?(Ze(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],da=(e,t)=>[...mt(t),...mt(e)];function up(e,t){let r=0;const n=[...e];for(const s of t)n.splice(s-r,1),r++;return Wn(n).length?n:[]}var fa=(e,t)=>Ze(t)?[]:up(e,mt(t).sort((r,n)=>r-n)),ma=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},wc=(e,t,r)=>(e[t]=r,e);function $c(e){const t=at(),{control:r=t.control,name:n,keyName:s="id",shouldUnregister:o,rules:a}=e,[i,c]=Z.useState(r._getFieldArray(n)),l=Z.useRef(r._getFieldArray(n).map(sr)),u=Z.useRef(!1);r._names.array.add(n),Z.useMemo(()=>a&&i.length>=0&&r.register(n,a),[r,n,i.length,a]),Gn(()=>r._subjects.array.subscribe({next:({values:w,name:g})=>{if(g===n||!g){const $=oe(w,n);Array.isArray($)&&(c($),l.current=$.map(sr))}}}).unsubscribe,[r,n]);const p=Z.useCallback(w=>{u.current=!0,r._setFieldArray(n,w)},[r,n]),m=(w,g)=>{const $=mt(Ye(w)),E=ia(r._getFieldArray(n),$);r._names.focus=aa(n,E.length-1,g),l.current=ia(l.current,$.map(sr)),p(E),c(E),r._setFieldArray(n,E,ia,{argA:ca(w)})},v=(w,g)=>{const $=mt(Ye(w)),E=da(r._getFieldArray(n),$);r._names.focus=aa(n,0,g),l.current=da(l.current,$.map(sr)),p(E),c(E),r._setFieldArray(n,E,da,{argA:ca(w)})},x=w=>{const g=fa(r._getFieldArray(n),w);l.current=fa(l.current,w),p(g),c(g),!Array.isArray(oe(r._fields,n))&&ze(r._fields,n,void 0),r._setFieldArray(n,g,fa,{argA:w})},y=(w,g,$)=>{const E=mt(Ye(g)),k=la(r._getFieldArray(n),w,E);r._names.focus=aa(n,w,$),l.current=la(l.current,w,E.map(sr)),p(k),c(k),r._setFieldArray(n,k,la,{argA:w,argB:ca(g)})},h=(w,g)=>{const $=r._getFieldArray(n);ma($,w,g),ma(l.current,w,g),p($),c($),r._setFieldArray(n,$,ma,{argA:w,argB:g},!1)},_=(w,g)=>{const $=r._getFieldArray(n);ua($,w,g),ua(l.current,w,g),p($),c($),r._setFieldArray(n,$,ua,{argA:w,argB:g},!1)},f=(w,g)=>{const $=Ye(g),E=wc(r._getFieldArray(n),w,$);l.current=[...E].map((k,I)=>!k||I===w?sr():l.current[I]),p(E),c([...E]),r._setFieldArray(n,E,wc,{argA:w,argB:$},!0,!1)},b=w=>{const g=mt(Ye(w));l.current=g.map(sr),p([...g]),c([...g]),r._setFieldArray(n,[...g],$=>$,{},!0,!1)};return Z.useEffect(()=>{if(r._state.action=!1,sa(n,r._names)&&r._subjects.state.next({...r._formState}),u.current&&(!Tr(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Tr(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then(w=>{const g=oe(w.errors,n),$=oe(r._formState.errors,n);($?!g&&$.type||g&&($.type!==g.type||$.message!==g.message):g&&g.type)&&(g?ze(r._formState.errors,n,g):Je(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const w=oe(r._fields,n);w&&w._f&&!(Tr(r._options.reValidateMode).isOnSubmit&&Tr(r._options.mode).isOnSubmit)&&oa(w,r._names.disabled,r._formValues,r._options.criteriaMode===xt.all,r._options.shouldUseNativeValidation,!0).then(g=>!it(g)&&r._subjects.state.next({errors:_c(r._formState.errors,g,n)}))}r._subjects.state.next({name:n,values:Ye(r._formValues)}),r._names.focus&&Or(r._fields,(w,g)=>{if(r._names.focus&&g.startsWith(r._names.focus)&&w.focus)return w.focus(),1}),r._names.focus="",r._setValid(),u.current=!1},[i,n,r]),Z.useEffect(()=>(!oe(r._formValues,n)&&r._setFieldArray(n),()=>{const w=(g,$)=>{const E=oe(r._fields,g);E&&E._f&&(E._f.mount=$)};r._options.shouldUnregister||o?r.unregister(n):w(n,!1)}),[n,r,s,o]),{swap:Z.useCallback(h,[p,n,r]),move:Z.useCallback(_,[p,n,r]),prepend:Z.useCallback(v,[p,n,r]),append:Z.useCallback(m,[p,n,r]),remove:Z.useCallback(x,[p,n,r]),insert:Z.useCallback(y,[p,n,r]),update:Z.useCallback(f,[p,n,r]),replace:Z.useCallback(b,[p,n,r]),fields:Z.useMemo(()=>i.map((w,g)=>({...w,[s]:l.current[g]||sr()})),[i,s])}}function dp(e={}){const t=Z.useRef(void 0),r=Z.useRef(void 0),[n,s]=Z.useState({isDirty:!1,isValidating:!1,isLoading:Et(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Et(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Et(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...i}=lp(e);t.current={...i,formState:n}}const o=t.current.control;return o._options=e,Gn(()=>{const a=o._subscribe({formState:o._proxyFormState,callback:()=>s({...o._formState}),reRenderRoot:!0});return s(i=>({...i,isReady:!0})),o._formState.isReady=!0,a},[o]),Z.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Z.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),Z.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),Z.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),Z.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==n.isDirty&&o._subjects.state.next({isDirty:a})}},[o,n.isDirty]),Z.useEffect(()=>{var a;e.values&&!St(e.values,r.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((a=o._options.resetOptions)===null||a===void 0)&&a.keepIsValid||o._setValid(),r.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[o,e.values]),Z.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=oc(n,o),t.current}const fp="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let xn=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=fp[r[e]&63];return t};function Sc(e,[t,r]){return Math.min(r,Math.max(t,e))}function $e(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function mp(e,t){const r=S.createContext(t),n=o=>{const{children:a,...i}=o,c=S.useMemo(()=>i,Object.values(i));return d.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function s(o){const a=S.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,s]}function Ot(e,t=[]){let r=[];function n(o,a){const i=S.createContext(a),c=r.length;r=[...r,a];const l=p=>{var _;const{scope:m,children:v,...x}=p,y=((_=m==null?void 0:m[e])==null?void 0:_[c])||i,h=S.useMemo(()=>x,Object.values(x));return d.jsx(y.Provider,{value:h,children:v})};l.displayName=o+"Provider";function u(p,m){var y;const v=((y=m==null?void 0:m[e])==null?void 0:y[c])||i,x=S.useContext(v);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[l,u]}const s=()=>{const o=r.map(a=>S.createContext(a));return function(i){const c=(i==null?void 0:i[e])||o;return S.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return s.scopeName=e,[n,hp(s,...t)]}function hp(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const a=n.reduce((i,{useScope:c,scopeName:l})=>{const p=c(o)[`__scope${l}`];return{...i,...p}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function Ec(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Dr(...e){return t=>{let r=!1;const n=e.map(s=>{const o=Ec(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():Ec(e[s],null)}}}}function qe(...e){return S.useCallback(Dr(...e),e)}function Cc(e){const t=pp(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(vp);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function pp(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=bp(s),i=yp(o,s.props);return s.type!==S.Fragment&&(i.ref=n?Dr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gp=Symbol("radix.slottable");function vp(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gp}function yp(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function bp(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function kc(e){const t=e+"CollectionProvider",[r,n]=Ot(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:h,children:_}=y,f=Z.useRef(null),b=Z.useRef(new Map).current;return d.jsx(s,{scope:h,itemMap:b,collectionRef:f,children:_})};a.displayName=t;const i=e+"CollectionSlot",c=Cc(i),l=Z.forwardRef((y,h)=>{const{scope:_,children:f}=y,b=o(i,_),w=qe(h,b.collectionRef);return d.jsx(c,{ref:w,children:f})});l.displayName=i;const u=e+"CollectionItemSlot",p="data-radix-collection-item",m=Cc(u),v=Z.forwardRef((y,h)=>{const{scope:_,children:f,...b}=y,w=Z.useRef(null),g=qe(h,w),$=o(u,_);return Z.useEffect(()=>($.itemMap.set(w,{ref:w,...b}),()=>void $.itemMap.delete(w))),d.jsx(m,{[p]:"",ref:g,children:f})});v.displayName=u;function x(y){const h=o(e+"CollectionConsumer",y);return Z.useCallback(()=>{const f=h.collectionRef.current;if(!f)return[];const b=Array.from(f.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort(($,E)=>b.indexOf($.ref.current)-b.indexOf(E.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:v},x,n]}var _p=S.createContext(void 0);function ha(e){const t=S.useContext(_p);return e||t||"ltr"}function xp(e){const t=wp(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(Sp);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function wp(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=Cp(s),i=Ep(o,s.props);return s.type!==S.Fragment&&(i.ref=n?Dr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $p=Symbol("radix.slottable");function Sp(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$p}function Ep(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function Cp(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var kp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=kp.reduce((e,t)=>{const r=xp(`Primitive.${t}`),n=S.forwardRef((s,o)=>{const{asChild:a,...i}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function jp(e,t){e&&qn.flushSync(()=>e.dispatchEvent(t))}function or(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Rp(e,t=globalThis==null?void 0:globalThis.document){const r=or(e);S.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Pp="DismissableLayer",pa="dismissableLayer.update",Np="dismissableLayer.pointerDownOutside",Ap="dismissableLayer.focusOutside",jc,Rc=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yn=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:i,...c}=e,l=S.useContext(Rc),[u,p]=S.useState(null),m=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=S.useState({}),x=qe(t,E=>p(E)),y=Array.from(l.layers),[h]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=y.indexOf(h),f=u?y.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,w=f>=_,g=Ip(E=>{const k=E.target,I=[...l.branches].some(z=>z.contains(k));!w||I||(s==null||s(E),a==null||a(E),E.defaultPrevented||i==null||i())},m),$=Dp(E=>{const k=E.target;[...l.branches].some(z=>z.contains(k))||(o==null||o(E),a==null||a(E),E.defaultPrevented||i==null||i())},m);return Rp(E=>{f===l.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},m),S.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(jc=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Pc(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=jc)}},[u,m,r,l]),S.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Pc())},[u,l]),S.useEffect(()=>{const E=()=>v({});return document.addEventListener(pa,E),()=>document.removeEventListener(pa,E)},[]),d.jsx(Ae.div,{...c,ref:x,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:$e(e.onFocusCapture,$.onFocusCapture),onBlurCapture:$e(e.onBlurCapture,$.onBlurCapture),onPointerDownCapture:$e(e.onPointerDownCapture,g.onPointerDownCapture)})});Yn.displayName=Pp;var Tp="DismissableLayerBranch",Op=S.forwardRef((e,t)=>{const r=S.useContext(Rc),n=S.useRef(null),s=qe(t,n);return S.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),d.jsx(Ae.div,{...e,ref:s})});Op.displayName=Tp;function Ip(e,t=globalThis==null?void 0:globalThis.document){const r=or(e),n=S.useRef(!1),s=S.useRef(()=>{});return S.useEffect(()=>{const o=i=>{if(i.target&&!n.current){let c=function(){Nc(Np,r,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Dp(e,t=globalThis==null?void 0:globalThis.document){const r=or(e),n=S.useRef(!1);return S.useEffect(()=>{const s=o=>{o.target&&!n.current&&Nc(Ap,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Pc(){const e=new CustomEvent(pa);document.dispatchEvent(e)}function Nc(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?jp(s,o):s.dispatchEvent(o)}var ga=0;function Ac(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Tc()),document.body.insertAdjacentElement("beforeend",e[1]??Tc()),ga++,()=>{ga===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ga--}},[])}function Tc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var va="focusScope.autoFocusOnMount",ya="focusScope.autoFocusOnUnmount",Oc={bubbles:!1,cancelable:!0},Mp="FocusScope",ba=S.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...a}=e,[i,c]=S.useState(null),l=or(s),u=or(o),p=S.useRef(null),m=qe(t,y=>c(y)),v=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(n){let y=function(b){if(v.paused||!i)return;const w=b.target;i.contains(w)?p.current=w:ar(p.current,{select:!0})},h=function(b){if(v.paused||!i)return;const w=b.relatedTarget;w!==null&&(i.contains(w)||ar(p.current,{select:!0}))},_=function(b){if(document.activeElement===document.body)for(const g of b)g.removedNodes.length>0&&ar(i)};document.addEventListener("focusin",y),document.addEventListener("focusout",h);const f=new MutationObserver(_);return i&&f.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",h),f.disconnect()}}},[n,i,v.paused]),S.useEffect(()=>{if(i){Mc.add(v);const y=document.activeElement;if(!i.contains(y)){const _=new CustomEvent(va,Oc);i.addEventListener(va,l),i.dispatchEvent(_),_.defaultPrevented||(Vp(Up(Ic(i)),{select:!0}),document.activeElement===y&&ar(i))}return()=>{i.removeEventListener(va,l),setTimeout(()=>{const _=new CustomEvent(ya,Oc);i.addEventListener(ya,u),i.dispatchEvent(_),_.defaultPrevented||ar(y??document.body,{select:!0}),i.removeEventListener(ya,u),Mc.remove(v)},0)}}},[i,l,u,v]);const x=S.useCallback(y=>{if(!r&&!n||v.paused)return;const h=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(h&&_){const f=y.currentTarget,[b,w]=Fp(f);b&&w?!y.shiftKey&&_===w?(y.preventDefault(),r&&ar(b,{select:!0})):y.shiftKey&&_===b&&(y.preventDefault(),r&&ar(w,{select:!0})):_===f&&y.preventDefault()}},[r,n,v.paused]);return d.jsx(Ae.div,{tabIndex:-1,...a,ref:m,onKeyDown:x})});ba.displayName=Mp;function Vp(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ar(n,{select:t}),document.activeElement!==r)return}function Fp(e){const t=Ic(e),r=Dc(t,e),n=Dc(t.reverse(),e);return[r,n]}function Ic(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Dc(e,t){for(const r of e)if(!Lp(r,{upTo:t}))return r}function Lp(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function zp(e){return e instanceof HTMLInputElement&&"select"in e}function ar(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&zp(e)&&t&&e.select()}}var Mc=qp();function qp(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Vc(e,t),e.unshift(t)},remove(t){var r;e=Vc(e,t),(r=e[0])==null||r.resume()}}}function Vc(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Up(e){return e.filter(t=>t.tagName!=="A")}var ct=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},Bp=S[" useId ".trim().toString()]||(()=>{}),Wp=0;function ir(e){const[t,r]=S.useState(Bp());return ct(()=>{r(n=>n??String(Wp++))},[e]),e||(t?`radix-${t}`:"")}const Hp=["top","right","bottom","left"],cr=Math.min,vt=Math.max,Jn=Math.round,Xn=Math.floor,It=e=>({x:e,y:e}),Gp={left:"right",right:"left",bottom:"top",top:"bottom"},Kp={start:"end",end:"start"};function _a(e,t,r){return vt(e,cr(t,r))}function Wt(e,t){return typeof e=="function"?e(t):e}function Ht(e){return e.split("-")[0]}function Mr(e){return e.split("-")[1]}function xa(e){return e==="x"?"y":"x"}function wa(e){return e==="y"?"height":"width"}const Zp=new Set(["top","bottom"]);function Dt(e){return Zp.has(Ht(e))?"y":"x"}function $a(e){return xa(Dt(e))}function Yp(e,t,r){r===void 0&&(r=!1);const n=Mr(e),s=$a(e),o=wa(s);let a=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Qn(a)),[a,Qn(a)]}function Jp(e){const t=Qn(e);return[Sa(e),t,Sa(t)]}function Sa(e){return e.replace(/start|end/g,t=>Kp[t])}const Fc=["left","right"],Lc=["right","left"],Xp=["top","bottom"],Qp=["bottom","top"];function eg(e,t,r){switch(e){case"top":case"bottom":return r?t?Lc:Fc:t?Fc:Lc;case"left":case"right":return t?Xp:Qp;default:return[]}}function tg(e,t,r,n){const s=Mr(e);let o=eg(Ht(e),r==="start",n);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(Sa)))),o}function Qn(e){return e.replace(/left|right|bottom|top/g,t=>Gp[t])}function rg(e){return{top:0,right:0,bottom:0,left:0,...e}}function zc(e){return typeof e!="number"?rg(e):{top:e,right:e,bottom:e,left:e}}function es(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function qc(e,t,r){let{reference:n,floating:s}=e;const o=Dt(t),a=$a(t),i=wa(a),c=Ht(t),l=o==="y",u=n.x+n.width/2-s.width/2,p=n.y+n.height/2-s.height/2,m=n[i]/2-s[i]/2;let v;switch(c){case"top":v={x:u,y:n.y-s.height};break;case"bottom":v={x:u,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:p};break;case"left":v={x:n.x-s.width,y:p};break;default:v={x:n.x,y:n.y}}switch(Mr(t)){case"start":v[a]-=m*(r&&l?-1:1);break;case"end":v[a]+=m*(r&&l?-1:1);break}return v}const ng=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:a}=r,i=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:p}=qc(l,n,c),m=n,v={},x=0;for(let y=0;y<i.length;y++){const{name:h,fn:_}=i[y],{x:f,y:b,data:w,reset:g}=await _({x:u,y:p,initialPlacement:n,placement:m,strategy:s,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});u=f??u,p=b??p,v={...v,[h]:{...v[h],...w}},g&&x<=50&&(x++,typeof g=="object"&&(g.placement&&(m=g.placement),g.rects&&(l=g.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):g.rects),{x:u,y:p}=qc(l,m,c)),y=-1)}return{x:u,y:p,placement:m,strategy:s,middlewareData:v}};async function wn(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:a,elements:i,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=Wt(t,e),x=zc(v),h=i[m?p==="floating"?"reference":"floating":p],_=es(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(h)))==null||r?h:h.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(i.floating)),boundary:l,rootBoundary:u,strategy:c})),f=p==="floating"?{x:n,y:s,width:a.floating.width,height:a.floating.height}:a.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(i.floating)),w=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},g=es(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:f,offsetParent:b,strategy:c}):f);return{top:(_.top-g.top+x.top)/w.y,bottom:(g.bottom-_.bottom+x.bottom)/w.y,left:(_.left-g.left+x.left)/w.x,right:(g.right-_.right+x.right)/w.x}}const sg=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:a,elements:i,middlewareData:c}=t,{element:l,padding:u=0}=Wt(e,t)||{};if(l==null)return{};const p=zc(u),m={x:r,y:n},v=$a(s),x=wa(v),y=await a.getDimensions(l),h=v==="y",_=h?"top":"left",f=h?"bottom":"right",b=h?"clientHeight":"clientWidth",w=o.reference[x]+o.reference[v]-m[v]-o.floating[x],g=m[v]-o.reference[v],$=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let E=$?$[b]:0;(!E||!await(a.isElement==null?void 0:a.isElement($)))&&(E=i.floating[b]||o.floating[x]);const k=w/2-g/2,I=E/2-y[x]/2-1,z=cr(p[_],I),M=cr(p[f],I),V=z,F=E-y[x]-M,W=E/2-y[x]/2+k,re=_a(V,W,F),Y=!c.arrow&&Mr(s)!=null&&W!==re&&o.reference[x]/2-(W<V?z:M)-y[x]/2<0,ae=Y?W<V?W-V:W-F:0;return{[v]:m[v]+ae,data:{[v]:re,centerOffset:W-re-ae,...Y&&{alignmentOffset:ae}},reset:Y}}}),og=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:a,initialPlacement:i,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:y=!0,...h}=Wt(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const _=Ht(s),f=Dt(i),b=Ht(i)===i,w=await(c.isRTL==null?void 0:c.isRTL(l.floating)),g=m||(b||!y?[Qn(i)]:Jp(i)),$=x!=="none";!m&&$&&g.push(...tg(i,y,x,w));const E=[i,...g],k=await wn(t,h),I=[];let z=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&I.push(k[_]),p){const W=Yp(s,a,w);I.push(k[W[0]],k[W[1]])}if(z=[...z,{placement:s,overflows:I}],!I.every(W=>W<=0)){var M,V;const W=(((M=o.flip)==null?void 0:M.index)||0)+1,re=E[W];if(re&&(!(p==="alignment"?f!==Dt(re):!1)||z.every(L=>Dt(L.placement)===f?L.overflows[0]>0:!0)))return{data:{index:W,overflows:z},reset:{placement:re}};let Y=(V=z.filter(ae=>ae.overflows[0]<=0).sort((ae,L)=>ae.overflows[1]-L.overflows[1])[0])==null?void 0:V.placement;if(!Y)switch(v){case"bestFit":{var F;const ae=(F=z.filter(L=>{if($){const ve=Dt(L.placement);return ve===f||ve==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(ve=>ve>0).reduce((ve,G)=>ve+G,0)]).sort((L,ve)=>L[1]-ve[1])[0])==null?void 0:F[0];ae&&(Y=ae);break}case"initialPlacement":Y=i;break}if(s!==Y)return{reset:{placement:Y}}}return{}}}};function Uc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bc(e){return Hp.some(t=>e[t]>=0)}const ag=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Wt(e,t);switch(n){case"referenceHidden":{const o=await wn(t,{...s,elementContext:"reference"}),a=Uc(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Bc(a)}}}case"escaped":{const o=await wn(t,{...s,altBoundary:!0}),a=Uc(o,r.floating);return{data:{escapedOffsets:a,escaped:Bc(a)}}}default:return{}}}}},Wc=new Set(["left","top"]);async function ig(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),a=Ht(r),i=Mr(r),c=Dt(r)==="y",l=Wc.has(a)?-1:1,u=o&&c?-1:1,p=Wt(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof x=="number"&&(v=i==="end"?x*-1:x),c?{x:v*u,y:m*l}:{x:m*l,y:v*u}}const cg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:a,middlewareData:i}=t,c=await ig(t,e);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:a}}}}},lg=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:i={fn:h=>{let{x:_,y:f}=h;return{x:_,y:f}}},...c}=Wt(e,t),l={x:r,y:n},u=await wn(t,c),p=Dt(Ht(s)),m=xa(p);let v=l[m],x=l[p];if(o){const h=m==="y"?"top":"left",_=m==="y"?"bottom":"right",f=v+u[h],b=v-u[_];v=_a(f,v,b)}if(a){const h=p==="y"?"top":"left",_=p==="y"?"bottom":"right",f=x+u[h],b=x-u[_];x=_a(f,x,b)}const y=i.fn({...t,[m]:v,[p]:x});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[m]:o,[p]:a}}}}}},ug=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:l=!0}=Wt(e,t),u={x:r,y:n},p=Dt(s),m=xa(p);let v=u[m],x=u[p];const y=Wt(i,t),h=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const b=m==="y"?"height":"width",w=o.reference[m]-o.floating[b]+h.mainAxis,g=o.reference[m]+o.reference[b]-h.mainAxis;v<w?v=w:v>g&&(v=g)}if(l){var _,f;const b=m==="y"?"width":"height",w=Wc.has(Ht(s)),g=o.reference[p]-o.floating[b]+(w&&((_=a.offset)==null?void 0:_[p])||0)+(w?0:h.crossAxis),$=o.reference[p]+o.reference[b]+(w?0:((f=a.offset)==null?void 0:f[p])||0)-(w?h.crossAxis:0);x<g?x=g:x>$&&(x=$)}return{[m]:v,[p]:x}}}},dg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:a,elements:i}=t,{apply:c=()=>{},...l}=Wt(e,t),u=await wn(t,l),p=Ht(s),m=Mr(s),v=Dt(s)==="y",{width:x,height:y}=o.floating;let h,_;p==="top"||p==="bottom"?(h=p,_=m===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(_=p,h=m==="end"?"top":"bottom");const f=y-u.top-u.bottom,b=x-u.left-u.right,w=cr(y-u[h],f),g=cr(x-u[_],b),$=!t.middlewareData.shift;let E=w,k=g;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(k=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=f),$&&!m){const z=vt(u.left,0),M=vt(u.right,0),V=vt(u.top,0),F=vt(u.bottom,0);v?k=x-2*(z!==0||M!==0?z+M:vt(u.left,u.right)):E=y-2*(V!==0||F!==0?V+F:vt(u.top,u.bottom))}await c({...t,availableWidth:k,availableHeight:E});const I=await a.getDimensions(i.floating);return x!==I.width||y!==I.height?{reset:{rects:!0}}:{}}}};function ts(){return typeof window<"u"}function Vr(e){return Hc(e)?(e.nodeName||"").toLowerCase():"#document"}function yt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mt(e){var t;return(t=(Hc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hc(e){return ts()?e instanceof Node||e instanceof yt(e).Node:!1}function Ct(e){return ts()?e instanceof Element||e instanceof yt(e).Element:!1}function Vt(e){return ts()?e instanceof HTMLElement||e instanceof yt(e).HTMLElement:!1}function Gc(e){return!ts()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yt(e).ShadowRoot}const fg=new Set(["inline","contents"]);function $n(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!fg.has(s)}const mg=new Set(["table","td","th"]);function hg(e){return mg.has(Vr(e))}const pg=[":popover-open",":modal"];function rs(e){return pg.some(t=>{try{return e.matches(t)}catch{return!1}})}const gg=["transform","translate","scale","rotate","perspective"],vg=["transform","translate","scale","rotate","perspective","filter"],yg=["paint","layout","strict","content"];function Ea(e){const t=Ca(),r=Ct(e)?kt(e):e;return gg.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||vg.some(n=>(r.willChange||"").includes(n))||yg.some(n=>(r.contain||"").includes(n))}function bg(e){let t=lr(e);for(;Vt(t)&&!Fr(t);){if(Ea(t))return t;if(rs(t))return null;t=lr(t)}return null}function Ca(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _g=new Set(["html","body","#document"]);function Fr(e){return _g.has(Vr(e))}function kt(e){return yt(e).getComputedStyle(e)}function ns(e){return Ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lr(e){if(Vr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gc(e)&&e.host||Mt(e);return Gc(t)?t.host:t}function Kc(e){const t=lr(e);return Fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vt(t)&&$n(t)?t:Kc(t)}function Sn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Kc(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),a=yt(s);if(o){const i=ka(a);return t.concat(a,a.visualViewport||[],$n(s)?s:[],i&&r?Sn(i):[])}return t.concat(s,Sn(s,[],r))}function ka(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zc(e){const t=kt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Vt(e),o=s?e.offsetWidth:r,a=s?e.offsetHeight:n,i=Jn(r)!==o||Jn(n)!==a;return i&&(r=o,n=a),{width:r,height:n,$:i}}function ja(e){return Ct(e)?e:e.contextElement}function Lr(e){const t=ja(e);if(!Vt(t))return It(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=Zc(t);let a=(o?Jn(r.width):r.width)/n,i=(o?Jn(r.height):r.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const xg=It(0);function Yc(e){const t=yt(e);return!Ca()||!t.visualViewport?xg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wg(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==yt(e)?!1:t}function xr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=ja(e);let a=It(1);t&&(n?Ct(n)&&(a=Lr(n)):a=Lr(e));const i=wg(o,r,n)?Yc(o):It(0);let c=(s.left+i.x)/a.x,l=(s.top+i.y)/a.y,u=s.width/a.x,p=s.height/a.y;if(o){const m=yt(o),v=n&&Ct(n)?yt(n):n;let x=m,y=ka(x);for(;y&&n&&v!==x;){const h=Lr(y),_=y.getBoundingClientRect(),f=kt(y),b=_.left+(y.clientLeft+parseFloat(f.paddingLeft))*h.x,w=_.top+(y.clientTop+parseFloat(f.paddingTop))*h.y;c*=h.x,l*=h.y,u*=h.x,p*=h.y,c+=b,l+=w,x=yt(y),y=ka(x)}}return es({width:u,height:p,x:c,y:l})}function ss(e,t){const r=ns(e).scrollLeft;return t?t.left+r:xr(Mt(e)).left+r}function Jc(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-ss(e,r),s=r.top+t.scrollTop;return{x:n,y:s}}function $g(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",a=Mt(n),i=t?rs(t.floating):!1;if(n===a||i&&o)return r;let c={scrollLeft:0,scrollTop:0},l=It(1);const u=It(0),p=Vt(n);if((p||!p&&!o)&&((Vr(n)!=="body"||$n(a))&&(c=ns(n)),Vt(n))){const v=xr(n);l=Lr(n),u.x=v.x+n.clientLeft,u.y=v.y+n.clientTop}const m=a&&!p&&!o?Jc(a,c):It(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+m.x,y:r.y*l.y-c.scrollTop*l.y+u.y+m.y}}function Sg(e){return Array.from(e.getClientRects())}function Eg(e){const t=Mt(e),r=ns(e),n=e.ownerDocument.body,s=vt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=vt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+ss(e);const i=-r.scrollTop;return kt(n).direction==="rtl"&&(a+=vt(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:a,y:i}}const Xc=25;function Cg(e,t){const r=yt(e),n=Mt(e),s=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,i=0,c=0;if(s){o=s.width,a=s.height;const u=Ca();(!u||u&&t==="fixed")&&(i=s.offsetLeft,c=s.offsetTop)}const l=ss(n);if(l<=0){const u=n.ownerDocument,p=u.body,m=getComputedStyle(p),v=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(n.clientWidth-p.clientWidth-v);x<=Xc&&(o-=x)}else l<=Xc&&(o+=l);return{width:o,height:a,x:i,y:c}}const kg=new Set(["absolute","fixed"]);function jg(e,t){const r=xr(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=Vt(e)?Lr(e):It(1),a=e.clientWidth*o.x,i=e.clientHeight*o.y,c=s*o.x,l=n*o.y;return{width:a,height:i,x:c,y:l}}function Qc(e,t,r){let n;if(t==="viewport")n=Cg(e,r);else if(t==="document")n=Eg(Mt(e));else if(Ct(t))n=jg(t,r);else{const s=Yc(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return es(n)}function el(e,t){const r=lr(e);return r===t||!Ct(r)||Fr(r)?!1:kt(r).position==="fixed"||el(r,t)}function Rg(e,t){const r=t.get(e);if(r)return r;let n=Sn(e,[],!1).filter(i=>Ct(i)&&Vr(i)!=="body"),s=null;const o=kt(e).position==="fixed";let a=o?lr(e):e;for(;Ct(a)&&!Fr(a);){const i=kt(a),c=Ea(a);!c&&i.position==="fixed"&&(s=null),(o?!c&&!s:!c&&i.position==="static"&&!!s&&kg.has(s.position)||$n(a)&&!c&&el(e,a))?n=n.filter(u=>u!==a):s=i,a=lr(a)}return t.set(e,n),n}function Pg(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const a=[...r==="clippingAncestors"?rs(t)?[]:Rg(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((l,u)=>{const p=Qc(t,u,s);return l.top=vt(p.top,l.top),l.right=cr(p.right,l.right),l.bottom=cr(p.bottom,l.bottom),l.left=vt(p.left,l.left),l},Qc(t,i,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ng(e){const{width:t,height:r}=Zc(e);return{width:t,height:r}}function Ag(e,t,r){const n=Vt(t),s=Mt(t),o=r==="fixed",a=xr(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const c=It(0);function l(){c.x=ss(s)}if(n||!n&&!o)if((Vr(t)!=="body"||$n(s))&&(i=ns(t)),n){const v=xr(t,!0,o,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else s&&l();o&&!n&&s&&l();const u=s&&!n&&!o?Jc(s,i):It(0),p=a.left+i.scrollLeft-c.x-u.x,m=a.top+i.scrollTop-c.y-u.y;return{x:p,y:m,width:a.width,height:a.height}}function Ra(e){return kt(e).position==="static"}function tl(e,t){if(!Vt(e)||kt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Mt(e)===r&&(r=r.ownerDocument.body),r}function rl(e,t){const r=yt(e);if(rs(e))return r;if(!Vt(e)){let s=lr(e);for(;s&&!Fr(s);){if(Ct(s)&&!Ra(s))return s;s=lr(s)}return r}let n=tl(e,t);for(;n&&hg(n)&&Ra(n);)n=tl(n,t);return n&&Fr(n)&&Ra(n)&&!Ea(n)?r:n||bg(e)||r}const Tg=async function(e){const t=this.getOffsetParent||rl,r=this.getDimensions,n=await r(e.floating);return{reference:Ag(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Og(e){return kt(e).direction==="rtl"}const Ig={convertOffsetParentRelativeRectToViewportRelativeRect:$g,getDocumentElement:Mt,getClippingRect:Pg,getOffsetParent:rl,getElementRects:Tg,getClientRects:Sg,getDimensions:Ng,getScale:Lr,isElement:Ct,isRTL:Og};function nl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dg(e,t){let r=null,n;const s=Mt(e);function o(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),o();const l=e.getBoundingClientRect(),{left:u,top:p,width:m,height:v}=l;if(i||t(),!m||!v)return;const x=Xn(p),y=Xn(s.clientWidth-(u+m)),h=Xn(s.clientHeight-(p+v)),_=Xn(u),b={rootMargin:-x+"px "+-y+"px "+-h+"px "+-_+"px",threshold:vt(0,cr(1,c))||1};let w=!0;function g($){const E=$[0].intersectionRatio;if(E!==c){if(!w)return a();E?a(!1,E):n=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!nl(l,e.getBoundingClientRect())&&a(),w=!1}try{r=new IntersectionObserver(g,{...b,root:s.ownerDocument})}catch{r=new IntersectionObserver(g,b)}r.observe(e)}return a(!0),o}function Mg(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=ja(e),u=s||o?[...l?Sn(l):[],...Sn(t)]:[];u.forEach(_=>{s&&_.addEventListener("scroll",r,{passive:!0}),o&&_.addEventListener("resize",r)});const p=l&&i?Dg(l,r):null;let m=-1,v=null;a&&(v=new ResizeObserver(_=>{let[f]=_;f&&f.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),r()}),l&&!c&&v.observe(l),v.observe(t));let x,y=c?xr(e):null;c&&h();function h(){const _=xr(e);y&&!nl(y,_)&&r(),y=_,x=requestAnimationFrame(h)}return r(),()=>{var _;u.forEach(f=>{s&&f.removeEventListener("scroll",r),o&&f.removeEventListener("resize",r)}),p==null||p(),(_=v)==null||_.disconnect(),v=null,c&&cancelAnimationFrame(x)}}const Vg=cg,Fg=lg,Lg=og,zg=dg,qg=ag,sl=sg,Ug=ug,Bg=(e,t,r)=>{const n=new Map,s={platform:Ig,...r},o={...s.platform,_c:n};return ng(e,t,{...s,platform:o})};var Wg=typeof document<"u",Hg=function(){},os=Wg?Z.useLayoutEffect:Hg;function as(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!as(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!as(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function ol(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function al(e,t){const r=ol(e);return Math.round(t*r)/r}function Pa(e){const t=S.useRef(e);return os(()=>{t.current=e}),t}function Gg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:a}={},transform:i=!0,whileElementsMounted:c,open:l}=e,[u,p]=S.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=S.useState(n);as(m,n)||v(n);const[x,y]=S.useState(null),[h,_]=S.useState(null),f=S.useCallback(L=>{L!==$.current&&($.current=L,y(L))},[]),b=S.useCallback(L=>{L!==E.current&&(E.current=L,_(L))},[]),w=o||x,g=a||h,$=S.useRef(null),E=S.useRef(null),k=S.useRef(u),I=c!=null,z=Pa(c),M=Pa(s),V=Pa(l),F=S.useCallback(()=>{if(!$.current||!E.current)return;const L={placement:t,strategy:r,middleware:m};M.current&&(L.platform=M.current),Bg($.current,E.current,L).then(ve=>{const G={...ve,isPositioned:V.current!==!1};W.current&&!as(k.current,G)&&(k.current=G,qn.flushSync(()=>{p(G)}))})},[m,t,r,M,V]);os(()=>{l===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,p(L=>({...L,isPositioned:!1})))},[l]);const W=S.useRef(!1);os(()=>(W.current=!0,()=>{W.current=!1}),[]),os(()=>{if(w&&($.current=w),g&&(E.current=g),w&&g){if(z.current)return z.current(w,g,F);F()}},[w,g,F,z,I]);const re=S.useMemo(()=>({reference:$,floating:E,setReference:f,setFloating:b}),[f,b]),Y=S.useMemo(()=>({reference:w,floating:g}),[w,g]),ae=S.useMemo(()=>{const L={position:r,left:0,top:0};if(!Y.floating)return L;const ve=al(Y.floating,u.x),G=al(Y.floating,u.y);return i?{...L,transform:"translate("+ve+"px, "+G+"px)",...ol(Y.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ve,top:G}},[r,i,Y.floating,u.x,u.y]);return S.useMemo(()=>({...u,update:F,refs:re,elements:Y,floatingStyles:ae}),[u,F,re,Y,ae])}const Kg=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?sl({element:n.current,padding:s}).fn(r):{}:n?sl({element:n,padding:s}).fn(r):{}}}},Zg=(e,t)=>({...Vg(e),options:[e,t]}),Yg=(e,t)=>({...Fg(e),options:[e,t]}),Jg=(e,t)=>({...Ug(e),options:[e,t]}),Xg=(e,t)=>({...Lg(e),options:[e,t]}),Qg=(e,t)=>({...zg(e),options:[e,t]}),ev=(e,t)=>({...qg(e),options:[e,t]}),tv=(e,t)=>({...Kg(e),options:[e,t]});var rv="Arrow",il=S.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return d.jsx(Ae.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});il.displayName=rv;var nv=il;function Na(e){const[t,r]=S.useState(void 0);return ct(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let a,i;if("borderBoxSize"in o){const c=o.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;r({width:a,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Aa="Popper",[cl,is]=Ot(Aa),[sv,ll]=cl(Aa),ul=e=>{const{__scopePopper:t,children:r}=e,[n,s]=S.useState(null);return d.jsx(sv,{scope:t,anchor:n,onAnchorChange:s,children:r})};ul.displayName=Aa;var dl="PopperAnchor",fl=S.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=ll(dl,r),a=S.useRef(null),i=qe(t,a),c=S.useRef(null);return S.useEffect(()=>{const l=c.current;c.current=(n==null?void 0:n.current)||a.current,l!==c.current&&o.onAnchorChange(c.current)}),n?null:d.jsx(Ae.div,{...s,ref:i})});fl.displayName=dl;var Ta="PopperContent",[ov,av]=cl(Ta),ml=S.forwardRef((e,t)=>{var B,Q,pe,ie,N,A;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:x,...y}=e,h=ll(Ta,r),[_,f]=S.useState(null),b=qe(t,H=>f(H)),[w,g]=S.useState(null),$=Na(w),E=($==null?void 0:$.width)??0,k=($==null?void 0:$.height)??0,I=n+(o!=="center"?"-"+o:""),z=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},M=Array.isArray(l)?l:[l],V=M.length>0,F={padding:z,boundary:M.filter(cv),altBoundary:V},{refs:W,floatingStyles:re,placement:Y,isPositioned:ae,middlewareData:L}=Gg({strategy:"fixed",placement:I,whileElementsMounted:(...H)=>Mg(...H,{animationFrame:v==="always"}),elements:{reference:h.anchor},middleware:[Zg({mainAxis:s+k,alignmentAxis:a}),c&&Yg({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Jg():void 0,...F}),c&&Xg({...F}),Qg({...F,apply:({elements:H,rects:J,availableWidth:le,availableHeight:ye})=>{const{width:He,height:ot}=J.reference,Ge=H.floating.style;Ge.setProperty("--radix-popper-available-width",`${le}px`),Ge.setProperty("--radix-popper-available-height",`${ye}px`),Ge.setProperty("--radix-popper-anchor-width",`${He}px`),Ge.setProperty("--radix-popper-anchor-height",`${ot}px`)}}),w&&tv({element:w,padding:i}),lv({arrowWidth:E,arrowHeight:k}),m&&ev({strategy:"referenceHidden",...F})]}),[ve,G]=gl(Y),T=or(x);ct(()=>{ae&&(T==null||T())},[ae,T]);const K=(B=L.arrow)==null?void 0:B.x,O=(Q=L.arrow)==null?void 0:Q.y,C=((pe=L.arrow)==null?void 0:pe.centerOffset)!==0,[R,q]=S.useState();return ct(()=>{_&&q(window.getComputedStyle(_).zIndex)},[_]),d.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:ae?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:R,"--radix-popper-transform-origin":[(ie=L.transformOrigin)==null?void 0:ie.x,(N=L.transformOrigin)==null?void 0:N.y].join(" "),...((A=L.hide)==null?void 0:A.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(ov,{scope:r,placedSide:ve,onArrowChange:g,arrowX:K,arrowY:O,shouldHideArrow:C,children:d.jsx(Ae.div,{"data-side":ve,"data-align":G,...y,ref:b,style:{...y.style,animation:ae?void 0:"none"}})})})});ml.displayName=Ta;var hl="PopperArrow",iv={top:"bottom",right:"left",bottom:"top",left:"right"},pl=S.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=av(hl,n),a=iv[o.placedSide];return d.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:d.jsx(nv,{...s,ref:r,style:{...s.style,display:"block"}})})});pl.displayName=hl;function cv(e){return e!==null}var lv=e=>({name:"transformOrigin",options:e,fn(t){var h,_,f;const{placement:r,rects:n,middlewareData:s}=t,a=((h=s.arrow)==null?void 0:h.centerOffset)!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[l,u]=gl(r),p={start:"0%",center:"50%",end:"100%"}[u],m=(((_=s.arrow)==null?void 0:_.x)??0)+i/2,v=(((f=s.arrow)==null?void 0:f.y)??0)+c/2;let x="",y="";return l==="bottom"?(x=a?p:`${m}px`,y=`${-c}px`):l==="top"?(x=a?p:`${m}px`,y=`${n.floating.height+c}px`):l==="right"?(x=`${-c}px`,y=a?p:`${v}px`):l==="left"&&(x=`${n.floating.width+c}px`,y=a?p:`${v}px`),{data:{x,y}}}});function gl(e){const[t,r="center"]=e.split("-");return[t,r]}var vl=ul,yl=fl,bl=ml,_l=pl,uv="Portal",cs=S.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[s,o]=S.useState(!1);ct(()=>o(!0),[]);const a=r||s&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Yi.createPortal(d.jsx(Ae.div,{...n,ref:t}),a):null});cs.displayName=uv;function dv(e){const t=fv(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(hv);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function fv(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=gv(s),i=pv(o,s.props);return s.type!==S.Fragment&&(i.ref=n?Dr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mv=Symbol("radix.slottable");function hv(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mv}function pv(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function gv(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var vv=S[" useInsertionEffect ".trim().toString()]||ct;function wr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,a]=yv({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:s;{const u=S.useRef(e!==void 0);S.useEffect(()=>{const p=u.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,n])}const l=S.useCallback(u=>{var p;if(i){const m=bv(u)?u(e):u;m!==e&&((p=a.current)==null||p.call(a,m))}else o(u)},[i,e,o,a]);return[c,l]}function yv({defaultProp:e,onChange:t}){const[r,n]=S.useState(e),s=S.useRef(r),o=S.useRef(t);return vv(()=>{o.current=t},[t]),S.useEffect(()=>{var a;s.current!==r&&((a=o.current)==null||a.call(o,r),s.current=r)},[r,s]),[r,n,o]}function bv(e){return typeof e=="function"}function Oa(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var xl=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),_v="VisuallyHidden",wl=S.forwardRef((e,t)=>d.jsx(Ae.span,{...e,ref:t,style:{...xl,...e.style}}));wl.displayName=_v;var xv=wl,wv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},zr=new WeakMap,ls=new WeakMap,us={},Ia=0,$l=function(e){return e&&(e.host||$l(e.parentNode))},$v=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=$l(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Sv=function(e,t,r,n){var s=$v(t,Array.isArray(e)?e:[e]);us[r]||(us[r]=new WeakMap);var o=us[r],a=[],i=new Set,c=new Set(s),l=function(p){!p||i.has(p)||(i.add(p),l(p.parentNode))};s.forEach(l);var u=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(i.has(m))u(m);else try{var v=m.getAttribute(n),x=v!==null&&v!=="false",y=(zr.get(m)||0)+1,h=(o.get(m)||0)+1;zr.set(m,y),o.set(m,h),a.push(m),y===1&&x&&ls.set(m,!0),h===1&&m.setAttribute(r,"true"),x||m.setAttribute(n,"true")}catch(_){console.error("aria-hidden: cannot operate on ",m,_)}})};return u(t),i.clear(),Ia++,function(){a.forEach(function(p){var m=zr.get(p)-1,v=o.get(p)-1;zr.set(p,m),o.set(p,v),m||(ls.has(p)||p.removeAttribute(n),ls.delete(p)),v||p.removeAttribute(r)}),Ia--,Ia||(zr=new WeakMap,zr=new WeakMap,ls=new WeakMap,us={})}},Sl=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=wv(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Sv(n,s,r,"aria-hidden")):function(){return null}},Ft=function(){return Ft=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Ft.apply(this,arguments)};function El(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function Ev(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var ds="right-scroll-bar-position",fs="width-before-scroll-bar",Cv="with-scroll-bars-hidden",kv="--removed-body-scroll-bar-size";function Da(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function jv(e,t){var r=Z.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var Rv=typeof window<"u"?S.useLayoutEffect:S.useEffect,Cl=new WeakMap;function Pv(e,t){var r=jv(null,function(n){return e.forEach(function(s){return Da(s,n)})});return Rv(function(){var n=Cl.get(r);if(n){var s=new Set(n),o=new Set(e),a=r.current;s.forEach(function(i){o.has(i)||Da(i,null)}),o.forEach(function(i){s.has(i)||Da(i,a)})}Cl.set(r,e)},[e]),r}function Nv(e){return e}function Av(e,t){t===void 0&&(t=Nv);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var a=t(o,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(i){return o(i)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(o),a=r}var c=function(){var u=a;a=[],u.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),r}}}};return s}function Tv(e){e===void 0&&(e={});var t=Av(null);return t.options=Ft({async:!0,ssr:!1},e),t}var kl=function(e){var t=e.sideCar,r=El(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return S.createElement(n,Ft({},r))};kl.isSideCarExport=!0;function Ov(e,t){return e.useMedium(t),kl}var jl=Tv(),Ma=function(){},ms=S.forwardRef(function(e,t){var r=S.useRef(null),n=S.useState({onScrollCapture:Ma,onWheelCapture:Ma,onTouchMoveCapture:Ma}),s=n[0],o=n[1],a=e.forwardProps,i=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,p=e.shards,m=e.sideCar,v=e.noRelative,x=e.noIsolation,y=e.inert,h=e.allowPinchZoom,_=e.as,f=_===void 0?"div":_,b=e.gapMode,w=El(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),g=m,$=Pv([r,t]),E=Ft(Ft({},w),s);return S.createElement(S.Fragment,null,u&&S.createElement(g,{sideCar:jl,removeScrollBar:l,shards:p,noRelative:v,noIsolation:x,inert:y,setCallbacks:o,allowPinchZoom:!!h,lockRef:r,gapMode:b}),a?S.cloneElement(S.Children.only(i),Ft(Ft({},E),{ref:$})):S.createElement(f,Ft({},E,{className:c,ref:$}),i))});ms.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ms.classNames={fullWidth:fs,zeroRight:ds};var Iv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Dv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Iv();return t&&e.setAttribute("nonce",t),e}function Mv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Vv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Fv=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Dv())&&(Mv(t,r),Vv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Lv=function(){var e=Fv();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Rl=function(){var e=Lv(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},zv={left:0,top:0,right:0,gap:0},Va=function(e){return parseInt(e||"",10)||0},qv=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Va(r),Va(n),Va(s)]},Uv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zv;var t=qv(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Bv=Rl(),qr="data-scroll-locked",Wv=function(e,t,r,n){var s=e.left,o=e.top,a=e.right,i=e.gap;return r===void 0&&(r="margin"),`
31
- .`.concat(Cv,` {
1
+ (function(kt,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],d):(kt=typeof globalThis<"u"?globalThis:kt||self,d(kt["json-schema-editor"]={},kt.React,kt.React,kt.ReactDOM))})(this,(function(kt,d,J,Si){"use strict";function Ei(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const S=Ei(J),fn=Ei(Si),Ah="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Wr=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Ah[r[e]&63];return t};var Hr=e=>e.type==="checkbox",Qt=e=>e instanceof Date,Je=e=>e==null;const ki=e=>typeof e=="object";var Re=e=>!Je(e)&&!Array.isArray(e)&&ki(e)&&!Qt(e),xi=e=>Re(e)&&e.target?Hr(e.target)?e.target.checked:e.target.value:e,Th=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Ci=(e,t)=>e.has(Th(t)),Ih=e=>{const t=e.constructor&&e.constructor.prototype;return Re(t)&&t.hasOwnProperty("isPrototypeOf")},Ss=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function De(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Ss&&(e instanceof Blob||n))&&(r||Re(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!Ih(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=De(e[o]));else return e;return t}var pn=e=>/^\w*$/.test(e),Oe=e=>e===void 0,hn=e=>Array.isArray(e)?e.filter(Boolean):[],Es=e=>hn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ee=(e,t,r)=>{if(!t||!Re(e))return r;const n=(pn(t)?[t]:Es(t)).reduce((o,s)=>Je(o)?o:o[s],e);return Oe(n)||n===e?Oe(e[t])?r:e[t]:n},Qe=e=>typeof e=="boolean",Pe=(e,t,r)=>{let n=-1;const o=pn(t)?[t]:Es(t),s=o.length,a=s-1;for(;++n<s;){const i=o[n];let c=r;if(n!==a){const l=e[i];c=Re(l)||Array.isArray(l)?l:isNaN(+o[n+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=c,e=e[i]}};const mn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},st={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},xt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ks=J.createContext(null);ks.displayName="HookFormContext";const Be=()=>J.useContext(ks),Oh=e=>{const{children:t,...r}=e;return J.createElement(ks.Provider,{value:r},t)};var Pi=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const a=s;return t._proxyFormState[a]!==st.all&&(t._proxyFormState[a]=!n||st.all),r&&(r[a]=!0),e[a]}});return o};const gn=typeof window<"u"?J.useLayoutEffect:J.useEffect;function Ni(e){const t=Be(),{control:r=t.control,disabled:n,name:o,exact:s}=e||{},[a,i]=J.useState(r._formState),c=J.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return gn(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:l=>{!n&&i({...r._formState,...l})}}),[o,n,s]),J.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),J.useMemo(()=>Pi(a,r,c.current,!1),[a,r])}var et=e=>typeof e=="string",xs=(e,t,r,n,o)=>et(e)?(n&&t.watch.add(e),ee(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),ee(r,s))):(n&&(t.watchAll=!0),r),Cs=e=>Je(e)||!ki(e);function ct(e,t,r=new WeakSet){if(Cs(e)||Cs(t))return Object.is(e,t);if(Qt(e)&&Qt(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const a=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const i=t[s];if(Qt(a)&&Qt(i)||Re(a)&&Re(i)||Array.isArray(a)&&Array.isArray(i)?!ct(a,i,r):!Object.is(a,i))return!1}}return!0}function Kr(e){const t=Be(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:a,compute:i}=e||{},c=J.useRef(o),l=J.useRef(i),u=J.useRef(void 0),p=J.useRef(r),h=J.useRef(n);l.current=i;const[v,w]=J.useState(()=>{const $=r._getWatch(n,c.current);return l.current?l.current($):$}),y=J.useCallback($=>{const g=xs(n,r._names,$||r._formValues,!1,c.current);return l.current?l.current(g):g},[r._formValues,r._names,n]),m=J.useCallback($=>{if(!s){const g=xs(n,r._names,$||r._formValues,!1,c.current);if(l.current){const E=l.current(g);ct(E,u.current)||(w(E),u.current=E)}else w(g)}},[r._formValues,r._names,s,n]);gn(()=>((p.current!==r||!ct(h.current,n))&&(p.current=r,h.current=n,m()),r._subscribe({name:n,formState:{values:!0},exact:a,callback:$=>{m($.values)}})),[r,a,n,m]),J.useEffect(()=>r._removeUnmounted());const _=p.current!==r,f=h.current,b=J.useMemo(()=>{if(s)return null;const $=!_&&!ct(f,n);return _||$?y():null},[s,_,n,f,y]);return b!==null?b:v}function Dh(e){const t=Be(),{name:r,disabled:n,control:o=t.control,shouldUnregister:s,defaultValue:a,exact:i=!0}=e,c=Ci(o._names.array,r),l=J.useMemo(()=>ee(o._formValues,r,ee(o._defaultValues,r,a)),[o,r,a]),u=Kr({control:o,name:r,defaultValue:l,exact:i}),p=Ni({control:o,name:r,exact:i}),h=J.useRef(e),v=J.useRef(void 0),w=J.useRef(o.register(r,{...e.rules,value:u,...Qe(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const y=J.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ee(p.errors,r)},isDirty:{enumerable:!0,get:()=>!!ee(p.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ee(p.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ee(p.validatingFields,r)},error:{enumerable:!0,get:()=>ee(p.errors,r)}}),[p,r]),m=J.useCallback($=>w.current.onChange({target:{value:xi($),name:r},type:mn.CHANGE}),[r]),_=J.useCallback(()=>w.current.onBlur({target:{value:ee(o._formValues,r),name:r},type:mn.BLUR}),[r,o._formValues]),f=J.useCallback($=>{const g=ee(o._fields,r);g&&$&&(g._f.ref={focus:()=>$.focus&&$.focus(),select:()=>$.select&&$.select(),setCustomValidity:E=>$.setCustomValidity(E),reportValidity:()=>$.reportValidity()})},[o._fields,r]),b=J.useMemo(()=>({name:r,value:u,...Qe(n)||p.disabled?{disabled:p.disabled||n}:{},onChange:m,onBlur:_,ref:f}),[r,n,p.disabled,m,_,f,u]);return J.useEffect(()=>{const $=o._options.shouldUnregister||s,g=v.current;g&&g!==r&&!c&&o.unregister(g),o.register(r,{...h.current.rules,...Qe(h.current.disabled)?{disabled:h.current.disabled}:{}});const E=(k,C)=>{const O=ee(o._fields,k);O&&O._f&&(O._f.mount=C)};if(E(r,!0),$){const k=De(ee(o._options.defaultValues,r,h.current.defaultValue));Pe(o._defaultValues,r,k),Oe(ee(o._formValues,r))&&Pe(o._formValues,r,k)}return!c&&o.register(r),v.current=r,()=>{(c?$&&!o._state.action:$)?o.unregister(r):E(r,!1)}},[r,o,c,s]),J.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),J.useMemo(()=>({field:b,formState:p,fieldState:y}),[b,p,y])}const Mt=e=>e.render(Dh(e));var Ps=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Ye=e=>Array.isArray(e)?e:[e],Ai=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function Ti(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const o=e[n],s=t[n];if(o&&Re(o)&&s){const a=Ti(o,s);Re(a)&&(r[n]=a)}else e[n]&&(r[n]=s)}return r}var We=e=>Re(e)&&!Object.keys(e).length,Ns=e=>e.type==="file",lt=e=>typeof e=="function",vn=e=>{if(!Ss)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ii=e=>e.type==="select-multiple",As=e=>e.type==="radio",Mh=e=>As(e)||Hr(e),Ts=e=>vn(e)&&e.isConnected;function zh(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Oe(e)?n++:e[t[n++]];return e}function jh(e){for(const t in e)if(e.hasOwnProperty(t)&&!Oe(e[t]))return!1;return!0}function Le(e,t){const r=Array.isArray(t)?t:pn(t)?[t]:Es(t),n=r.length===1?e:zh(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&(Re(n)&&We(n)||Array.isArray(n)&&jh(n))&&Le(e,r.slice(0,-1)),e}var Fh=e=>{for(const t in e)if(lt(e[t]))return!0;return!1};function Oi(e){return Array.isArray(e)||Re(e)&&!Fh(e)}function Is(e,t={}){for(const r in e){const n=e[r];Oi(n)?(t[r]=Array.isArray(n)?[]:{},Is(n,t[r])):Oe(n)||(t[r]=!0)}return t}function dr(e,t,r){r||(r=Is(t));for(const n in e){const o=e[n];if(Oi(o))Oe(t)||Cs(r[n])?r[n]=Is(o,Array.isArray(o)?[]:{}):dr(o,Je(t)?{}:t[n],r[n]);else{const s=t[n];r[n]=!ct(o,s)}}return r}const Di={value:!1,isValid:!1},Mi={value:!0,isValid:!0};var zi=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Oe(e[0].attributes.value)?Oe(e[0].value)||e[0].value===""?Mi:{value:e[0].value,isValid:!0}:Mi:Di}return Di},ji=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Oe(e)?e:t?e===""?NaN:e&&+e:r&&et(e)?new Date(e):n?n(e):e;const Fi={isValid:!1,value:null};var Vi=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Fi):Fi;function Li(e){const t=e.ref;return Ns(t)?t.files:As(t)?Vi(e.refs).value:Ii(t)?[...t.selectedOptions].map(({value:r})=>r):Hr(t)?zi(e.refs).value:ji(Oe(t.value)?e.ref.value:t.value,e)}var Vh=(e,t,r,n)=>{const o={};for(const s of e){const a=ee(t,s);a&&Pe(o,s,a._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},yn=e=>e instanceof RegExp,Gr=e=>Oe(e)?e:yn(e)?e.source:Re(e)?yn(e.value)?e.value.source:e.value:e,fr=e=>({isOnSubmit:!e||e===st.onSubmit,isOnBlur:e===st.onBlur,isOnChange:e===st.onChange,isOnAll:e===st.all,isOnTouch:e===st.onTouched});const Ri="AsyncFunction";var Lh=e=>!!e&&!!e.validate&&!!(lt(e.validate)&&e.validate.constructor.name===Ri||Re(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ri)),Rh=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Os=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const pr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=ee(e,o);if(s){const{_f:a,...i}=s;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!n)return!0;if(a.ref&&t(a.ref,a.name)&&!n)return!0;if(pr(i,t))break}else if(Re(i)&&pr(i,t))break}}};function qi(e,t,r){const n=ee(e,r);if(n||pn(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),a=ee(t,s),i=ee(e,s);if(a&&!Array.isArray(a)&&r!==s)return{name:r};if(i&&i.type)return{name:s,error:i};if(i&&i.root&&i.root.type)return{name:`${s}.root`,error:i.root};o.pop()}return{name:r}}var qh=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return We(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(a=>t[a]===(!n||st.all))},Uh=(e,t,r)=>!e||!t||e===t||Ye(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Zh=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,Bh=(e,t)=>!hn(ee(e,t)).length&&Le(e,t),Ui=(e,t,r)=>{const n=Ye(ee(e,r));return Pe(n,"root",t[r]),Pe(e,r,n),e};function Zi(e,t,r="validate"){if(et(e)||Array.isArray(e)&&e.every(et)||Qe(e)&&!e)return{type:r,message:et(e)?e:"",ref:t}}var hr=e=>Re(e)&&!yn(e)?e:{value:e,message:""},Ds=async(e,t,r,n,o,s)=>{const{ref:a,refs:i,required:c,maxLength:l,minLength:u,min:p,max:h,pattern:v,validate:w,name:y,valueAsNumber:m,mount:_}=e._f,f=ee(r,y);if(!_||t.has(y))return{};const b=i?i[0]:a,$=j=>{o&&b.reportValidity&&(b.setCustomValidity(Qe(j)?"":j||""),b.reportValidity())},g={},E=As(a),k=Hr(a),C=E||k,O=(m||Ns(a))&&Oe(a.value)&&Oe(f)||vn(a)&&a.value===""||f===""||Array.isArray(f)&&!f.length,V=Ps.bind(null,y,n,g),z=(j,R,Z,ne=xt.maxLength,G=xt.minLength)=>{const oe=j?R:Z;g[y]={type:j?ne:G,message:oe,ref:a,...V(j?ne:G,oe)}};if(s?!Array.isArray(f)||!f.length:c&&(!C&&(O||Je(f))||Qe(f)&&!f||k&&!zi(i).isValid||E&&!Vi(i).isValid)){const{value:j,message:R}=et(c)?{value:!!c,message:c}:hr(c);if(j&&(g[y]={type:xt.required,message:R,ref:b,...V(xt.required,R)},!n))return $(R),g}if(!O&&(!Je(p)||!Je(h))){let j,R;const Z=hr(h),ne=hr(p);if(!Je(f)&&!isNaN(f)){const G=a.valueAsNumber||f&&+f;Je(Z.value)||(j=G>Z.value),Je(ne.value)||(R=G<ne.value)}else{const G=a.valueAsDate||new Date(f),oe=H=>new Date(new Date().toDateString()+" "+H),F=a.type=="time",fe=a.type=="week";et(Z.value)&&f&&(j=F?oe(f)>oe(Z.value):fe?f>Z.value:G>new Date(Z.value)),et(ne.value)&&f&&(R=F?oe(f)<oe(ne.value):fe?f<ne.value:G<new Date(ne.value))}if((j||R)&&(z(!!j,Z.message,ne.message,xt.max,xt.min),!n))return $(g[y].message),g}if((l||u)&&!O&&(et(f)||s&&Array.isArray(f))){const j=hr(l),R=hr(u),Z=!Je(j.value)&&f.length>+j.value,ne=!Je(R.value)&&f.length<+R.value;if((Z||ne)&&(z(Z,j.message,R.message),!n))return $(g[y].message),g}if(v&&!O&&et(f)){const{value:j,message:R}=hr(v);if(yn(j)&&!f.match(j)&&(g[y]={type:xt.pattern,message:R,ref:a,...V(xt.pattern,R)},!n))return $(R),g}if(w){if(lt(w)){const j=await w(f,r),R=Zi(j,b);if(R&&(g[y]={...R,...V(xt.validate,R.message)},!n))return $(R.message),g}else if(Re(w)){let j={};for(const R in w){if(!We(j)&&!n)break;const Z=Zi(await w[R](f,r),b,R);Z&&(j={...Z,...V(R,Z.message)},$(Z.message),n&&(g[y]=j))}if(!We(j)&&(g[y]={ref:b,...j},!n))return g}}return $(!0),g};const Wh={mode:st.onSubmit,reValidateMode:st.onChange,shouldFocusError:!0};function Hh(e={}){let t={...Wh,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:lt(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=Re(t.defaultValues)||Re(t.values)?De(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:De(o),a={action:!1,mount:!1,watch:!1},i={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let p={...u};const h={array:Ai(),state:Ai()},v=t.criteriaMode===st.all,w=P=>M=>{clearTimeout(l),l=setTimeout(P,M)},y=async P=>{if(!t.disabled&&(u.isValid||p.isValid||P)){const M=t.resolver?We((await k()).errors):await O(n,!0);M!==r.isValid&&h.state.next({isValid:M})}},m=(P,M)=>{!t.disabled&&(u.isValidating||u.validatingFields||p.isValidating||p.validatingFields)&&((P||Array.from(i.mount)).forEach(U=>{U&&(M?Pe(r.validatingFields,U,M):Le(r.validatingFields,U))}),h.state.next({validatingFields:r.validatingFields,isValidating:!We(r.validatingFields)}))},_=(P,M=[],U,te,re=!0,X=!0)=>{if(te&&U&&!t.disabled){if(a.action=!0,X&&Array.isArray(ee(n,P))){const le=U(ee(n,P),te.argA,te.argB);re&&Pe(n,P,le)}if(X&&Array.isArray(ee(r.errors,P))){const le=U(ee(r.errors,P),te.argA,te.argB);re&&Pe(r.errors,P,le),Bh(r.errors,P)}if((u.touchedFields||p.touchedFields)&&X&&Array.isArray(ee(r.touchedFields,P))){const le=U(ee(r.touchedFields,P),te.argA,te.argB);re&&Pe(r.touchedFields,P,le)}(u.dirtyFields||p.dirtyFields)&&(r.dirtyFields=dr(o,s)),h.state.next({name:P,isDirty:z(P,M),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Pe(s,P,M)},f=(P,M)=>{Pe(r.errors,P,M),h.state.next({errors:r.errors})},b=P=>{r.errors=P,h.state.next({errors:r.errors,isValid:!1})},$=(P,M,U,te)=>{const re=ee(n,P);if(re){const X=ee(s,P,Oe(U)?ee(o,P):U);Oe(X)||te&&te.defaultChecked||M?Pe(s,P,M?X:Li(re._f)):Z(P,X),a.mount&&!a.action&&y()}},g=(P,M,U,te,re)=>{let X=!1,le=!1;const xe={name:P};if(!t.disabled){if(!U||te){(u.isDirty||p.isDirty)&&(le=r.isDirty,r.isDirty=xe.isDirty=z(),X=le!==xe.isDirty);const Ie=ct(ee(o,P),M);le=!!ee(r.dirtyFields,P),Ie?Le(r.dirtyFields,P):Pe(r.dirtyFields,P,!0),xe.dirtyFields=r.dirtyFields,X=X||(u.dirtyFields||p.dirtyFields)&&le!==!Ie}if(U){const Ie=ee(r.touchedFields,P);Ie||(Pe(r.touchedFields,P,U),xe.touchedFields=r.touchedFields,X=X||(u.touchedFields||p.touchedFields)&&Ie!==U)}X&&re&&h.state.next(xe)}return X?xe:{}},E=(P,M,U,te)=>{const re=ee(r.errors,P),X=(u.isValid||p.isValid)&&Qe(M)&&r.isValid!==M;if(t.delayError&&U?(c=w(()=>f(P,U)),c(t.delayError)):(clearTimeout(l),c=null,U?Pe(r.errors,P,U):Le(r.errors,P)),(U?!ct(re,U):re)||!We(te)||X){const le={...te,...X&&Qe(M)?{isValid:M}:{},errors:r.errors,name:P};r={...r,...le},h.state.next(le)}},k=async P=>{m(P,!0);const M=await t.resolver(s,t.context,Vh(P||i.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return m(P),M},C=async P=>{const{errors:M}=await k(P);if(P)for(const U of P){const te=ee(M,U);te?Pe(r.errors,U,te):Le(r.errors,U)}else r.errors=M;return M},O=async(P,M,U={valid:!0})=>{for(const te in P){const re=P[te];if(re){const{_f:X,...le}=re;if(X){const xe=i.array.has(X.name),Ie=re._f&&Lh(re._f);Ie&&u.validatingFields&&m([X.name],!0);const Ge=await Ds(re,i.disabled,s,v,t.shouldUseNativeValidation&&!M,xe);if(Ie&&u.validatingFields&&m([X.name]),Ge[X.name]&&(U.valid=!1,M))break;!M&&(ee(Ge,X.name)?xe?Ui(r.errors,Ge,X.name):Pe(r.errors,X.name,Ge[X.name]):Le(r.errors,X.name))}!We(le)&&await O(le,M,U)}}return U.valid},V=()=>{for(const P of i.unMount){const M=ee(n,P);M&&(M._f.refs?M._f.refs.every(U=>!Ts(U)):!Ts(M._f.ref))&&q(P)}i.unMount=new Set},z=(P,M)=>!t.disabled&&(P&&M&&Pe(s,P,M),!ct(H(),o)),j=(P,M,U)=>xs(P,i,{...a.mount?s:Oe(M)?o:et(P)?{[P]:M}:M},U,M),R=P=>hn(ee(a.mount?s:o,P,t.shouldUnregister?ee(o,P,[]):[])),Z=(P,M,U={})=>{const te=ee(n,P);let re=M;if(te){const X=te._f;X&&(!X.disabled&&Pe(s,P,ji(M,X)),re=vn(X.ref)&&Je(M)?"":M,Ii(X.ref)?[...X.ref.options].forEach(le=>le.selected=re.includes(le.value)):X.refs?Hr(X.ref)?X.refs.forEach(le=>{(!le.defaultChecked||!le.disabled)&&(Array.isArray(re)?le.checked=!!re.find(xe=>xe===le.value):le.checked=re===le.value||!!re)}):X.refs.forEach(le=>le.checked=le.value===re):Ns(X.ref)?X.ref.value="":(X.ref.value=re,X.ref.type||h.state.next({name:P,values:De(s)})))}(U.shouldDirty||U.shouldTouch)&&g(P,re,U.shouldTouch,U.shouldDirty,!0),U.shouldValidate&&fe(P)},ne=(P,M,U)=>{for(const te in M){if(!M.hasOwnProperty(te))return;const re=M[te],X=P+"."+te,le=ee(n,X);(i.array.has(P)||Re(re)||le&&!le._f)&&!Qt(re)?ne(X,re,U):Z(X,re,U)}},G=(P,M,U={})=>{const te=ee(n,P),re=i.array.has(P),X=De(M);Pe(s,P,X),re?(h.array.next({name:P,values:De(s)}),(u.isDirty||u.dirtyFields||p.isDirty||p.dirtyFields)&&U.shouldDirty&&h.state.next({name:P,dirtyFields:dr(o,s),isDirty:z(P,X)})):te&&!te._f&&!Je(X)?ne(P,X,U):Z(P,X,U),Os(P,i)&&h.state.next({...r,name:P}),h.state.next({name:a.mount?P:void 0,values:De(s)})},oe=async P=>{a.mount=!0;const M=P.target;let U=M.name,te=!0;const re=ee(n,U),X=Ie=>{te=Number.isNaN(Ie)||Qt(Ie)&&isNaN(Ie.getTime())||ct(Ie,ee(s,U,Ie))},le=fr(t.mode),xe=fr(t.reValidateMode);if(re){let Ie,Ge;const Br=M.type?Li(re._f):xi(P),Xt=P.type===mn.BLUR||P.type===mn.FOCUS_OUT,eC=!Rh(re._f)&&!t.resolver&&!ee(r.errors,U)&&!re._f.deps||Zh(Xt,ee(r.touchedFields,U),r.isSubmitted,xe,le),wi=Os(U,i,Xt);Pe(s,U,Br),Xt?(!M||!M.readOnly)&&(re._f.onBlur&&re._f.onBlur(P),c&&c(0)):re._f.onChange&&re._f.onChange(P);const $i=g(U,Br,Xt),tC=!We($i)||wi;if(!Xt&&h.state.next({name:U,type:P.type,values:De(s)}),eC)return(u.isValid||p.isValid)&&(t.mode==="onBlur"?Xt&&y():Xt||y()),tC&&h.state.next({name:U,...wi?{}:$i});if(!Xt&&wi&&h.state.next({...r}),t.resolver){const{errors:Ph}=await k([U]);if(X(Br),te){const rC=qi(r.errors,n,U),Nh=qi(Ph,n,rC.name||U);Ie=Nh.error,U=Nh.name,Ge=We(Ph)}}else m([U],!0),Ie=(await Ds(re,i.disabled,s,v,t.shouldUseNativeValidation))[U],m([U]),X(Br),te&&(Ie?Ge=!1:(u.isValid||p.isValid)&&(Ge=await O(n,!0)));te&&(re._f.deps&&(!Array.isArray(re._f.deps)||re._f.deps.length>0)&&fe(re._f.deps),E(U,Ge,Ie,$i))}},F=(P,M)=>{if(ee(r.errors,M)&&P.focus)return P.focus(),1},fe=async(P,M={})=>{let U,te;const re=Ye(P);if(t.resolver){const X=await C(Oe(P)?P:re);U=We(X),te=P?!re.some(le=>ee(X,le)):U}else P?(te=(await Promise.all(re.map(async X=>{const le=ee(n,X);return await O(le&&le._f?{[X]:le}:le)}))).every(Boolean),!(!te&&!r.isValid)&&y()):te=U=await O(n);return h.state.next({...!et(P)||(u.isValid||p.isValid)&&U!==r.isValid?{}:{name:P},...t.resolver||!P?{isValid:U}:{},errors:r.errors}),M.shouldFocus&&!te&&pr(n,F,P?re:i.mount),te},H=(P,M)=>{let U={...a.mount?s:o};return M&&(U=Ti(M.dirtyFields?r.dirtyFields:r.touchedFields,U)),Oe(P)?U:et(P)?ee(U,P):P.map(te=>ee(U,te))},I=(P,M)=>({invalid:!!ee((M||r).errors,P),isDirty:!!ee((M||r).dirtyFields,P),error:ee((M||r).errors,P),isValidating:!!ee(r.validatingFields,P),isTouched:!!ee((M||r).touchedFields,P)}),K=P=>{P&&Ye(P).forEach(M=>Le(r.errors,M)),h.state.next({errors:P?r.errors:{}})},D=(P,M,U)=>{const te=(ee(n,P,{_f:{}})._f||{}).ref,re=ee(r.errors,P)||{},{ref:X,message:le,type:xe,...Ie}=re;Pe(r.errors,P,{...Ie,...M,ref:te}),h.state.next({name:P,errors:r.errors,isValid:!1}),U&&U.shouldFocus&&te&&te.focus&&te.focus()},x=(P,M)=>lt(P)?h.state.subscribe({next:U=>"values"in U&&P(j(void 0,M),U)}):j(P,M,!0),N=P=>h.state.subscribe({next:M=>{Uh(P.name,M.name,P.exact)&&qh(M,P.formState||u,Ve,P.reRenderRoot)&&P.callback({values:{...s},...r,...M,defaultValues:o})}}).unsubscribe,L=P=>(a.mount=!0,p={...p,...P.formState},N({...P,formState:p})),q=(P,M={})=>{for(const U of P?Ye(P):i.mount)i.mount.delete(U),i.array.delete(U),M.keepValue||(Le(n,U),Le(s,U)),!M.keepError&&Le(r.errors,U),!M.keepDirty&&Le(r.dirtyFields,U),!M.keepTouched&&Le(r.touchedFields,U),!M.keepIsValidating&&Le(r.validatingFields,U),!t.shouldUnregister&&!M.keepDefaultValue&&Le(o,U);h.state.next({values:De(s)}),h.state.next({...r,...M.keepDirty?{isDirty:z()}:{}}),!M.keepIsValid&&y()},Q=({disabled:P,name:M})=>{(Qe(P)&&a.mount||P||i.disabled.has(M))&&(P?i.disabled.add(M):i.disabled.delete(M))},ue=(P,M={})=>{let U=ee(n,P);const te=Qe(M.disabled)||Qe(t.disabled);return Pe(n,P,{...U||{},_f:{...U&&U._f?U._f:{ref:{name:P}},name:P,mount:!0,...M}}),i.mount.add(P),U?Q({disabled:Qe(M.disabled)?M.disabled:t.disabled,name:P}):$(P,!0,M.value),{...te?{disabled:M.disabled||t.disabled}:{},...t.progressive?{required:!!M.required,min:Gr(M.min),max:Gr(M.max),minLength:Gr(M.minLength),maxLength:Gr(M.maxLength),pattern:Gr(M.pattern)}:{},name:P,onChange:oe,onBlur:oe,ref:re=>{if(re){ue(P,M),U=ee(n,P);const X=Oe(re.value)&&re.querySelectorAll&&re.querySelectorAll("input,select,textarea")[0]||re,le=Mh(X),xe=U._f.refs||[];if(le?xe.find(Ie=>Ie===X):X===U._f.ref)return;Pe(n,P,{_f:{...U._f,...le?{refs:[...xe.filter(Ts),X,...Array.isArray(ee(o,P))?[{}]:[]],ref:{type:X.type,name:P}}:{ref:X}}}),$(P,!1,void 0,X)}else U=ee(n,P,{}),U._f&&(U._f.mount=!1),(t.shouldUnregister||M.shouldUnregister)&&!(Ci(i.array,P)&&a.action)&&i.unMount.add(P)}}},se=()=>t.shouldFocusError&&pr(n,F,i.mount),A=P=>{Qe(P)&&(h.state.next({disabled:P}),pr(n,(M,U)=>{const te=ee(n,U);te&&(M.disabled=te._f.disabled||P,Array.isArray(te._f.refs)&&te._f.refs.forEach(re=>{re.disabled=te._f.disabled||P}))},0,!1))},T=(P,M)=>async U=>{let te;U&&(U.preventDefault&&U.preventDefault(),U.persist&&U.persist());let re=De(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:le}=await k();r.errors=X,re=De(le)}else await O(n);if(i.disabled.size)for(const X of i.disabled)Le(re,X);if(Le(r.errors,"root"),We(r.errors)){h.state.next({errors:{}});try{await P(re,U)}catch(X){te=X}}else M&&await M({...r.errors},U),se(),setTimeout(se);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:We(r.errors)&&!te,submitCount:r.submitCount+1,errors:r.errors}),te)throw te},W=(P,M={})=>{ee(n,P)&&(Oe(M.defaultValue)?G(P,De(ee(o,P))):(G(P,M.defaultValue),Pe(o,P,De(M.defaultValue))),M.keepTouched||Le(r.touchedFields,P),M.keepDirty||(Le(r.dirtyFields,P),r.isDirty=M.defaultValue?z(P,De(ee(o,P))):z()),M.keepError||(Le(r.errors,P),u.isValid&&y()),h.state.next({...r}))},Y=(P,M={})=>{const U=P?De(P):o,te=De(U),re=We(P),X=re?o:te;if(M.keepDefaultValues||(o=U),!M.keepValues){if(M.keepDirtyValues){const le=new Set([...i.mount,...Object.keys(dr(o,s))]);for(const xe of Array.from(le))ee(r.dirtyFields,xe)?Pe(X,xe,ee(s,xe)):G(xe,ee(X,xe))}else{if(Ss&&Oe(P))for(const le of i.mount){const xe=ee(n,le);if(xe&&xe._f){const Ie=Array.isArray(xe._f.refs)?xe._f.refs[0]:xe._f.ref;if(vn(Ie)){const Ge=Ie.closest("form");if(Ge){Ge.reset();break}}}}if(M.keepFieldsRef)for(const le of i.mount)G(le,ee(X,le));else n={}}s=t.shouldUnregister?M.keepDefaultValues?De(o):{}:De(X),h.array.next({values:{...X}}),h.state.next({values:{...X}})}i={mount:M.keepDirtyValues?i.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!u.isValid||!!M.keepIsValid||!!M.keepDirtyValues||!t.shouldUnregister&&!We(X),a.watch=!!t.shouldUnregister,h.state.next({submitCount:M.keepSubmitCount?r.submitCount:0,isDirty:re?!1:M.keepDirty?r.isDirty:!!(M.keepDefaultValues&&!ct(P,o)),isSubmitted:M.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:re?{}:M.keepDirtyValues?M.keepDefaultValues&&s?dr(o,s):r.dirtyFields:M.keepDefaultValues&&P?dr(o,P):M.keepDirty?r.dirtyFields:{},touchedFields:M.keepTouched?r.touchedFields:{},errors:M.keepErrors?r.errors:{},isSubmitSuccessful:M.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},ce=(P,M)=>Y(lt(P)?P(s):P,M),he=(P,M={})=>{const U=ee(n,P),te=U&&U._f;if(te){const re=te.refs?te.refs[0]:te.ref;re.focus&&(re.focus(),M.shouldSelect&&lt(re.select)&&re.select())}},Ve=P=>{r={...r,...P}},Ze={control:{register:ue,unregister:q,getFieldState:I,handleSubmit:T,setError:D,_subscribe:N,_runSchema:k,_focusError:se,_getWatch:j,_getDirty:z,_setValid:y,_setFieldArray:_,_setDisabledField:Q,_setErrors:b,_getFieldArray:R,_reset:Y,_resetDefaultValues:()=>lt(t.defaultValues)&&t.defaultValues().then(P=>{ce(P,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:V,_disableForm:A,_subjects:h,_proxyFormState:u,get _fields(){return n},get _formValues(){return s},get _state(){return a},set _state(P){a=P},get _defaultValues(){return o},get _names(){return i},set _names(P){i=P},get _formState(){return r},get _options(){return t},set _options(P){t={...t,...P}}},subscribe:L,trigger:fe,register:ue,handleSubmit:T,watch:x,setValue:G,getValues:H,reset:ce,resetField:W,clearErrors:K,unregister:q,setError:D,setFocus:he,getFieldState:I};return{...Ze,formControl:Ze}}var zt=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Ms=(e,t,r={})=>r.shouldFocus||Oe(r.shouldFocus)?r.focusName||`${e}.${Oe(r.focusIndex)?t:r.focusIndex}.`:"",zs=(e,t)=>[...e,...Ye(t)],js=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Fs(e,t,r){return[...e.slice(0,t),...Ye(r),...e.slice(t)]}var Vs=(e,t,r)=>Array.isArray(e)?(Oe(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Ls=(e,t)=>[...Ye(t),...Ye(e)];function Kh(e,t){let r=0;const n=[...e];for(const o of t)n.splice(o-r,1),r++;return hn(n).length?n:[]}var Rs=(e,t)=>Oe(t)?[]:Kh(e,Ye(t).sort((r,n)=>r-n)),qs=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Bi=(e,t,r)=>(e[t]=r,e);function Wi(e){const t=Be(),{control:r=t.control,name:n,keyName:o="id",shouldUnregister:s,rules:a}=e,[i,c]=J.useState(r._getFieldArray(n)),l=J.useRef(r._getFieldArray(n).map(zt)),u=J.useRef(!1);r._names.array.add(n),J.useMemo(()=>a&&i.length>=0&&r.register(n,a),[r,n,i.length,a]),gn(()=>r._subjects.array.subscribe({next:({values:$,name:g})=>{if(g===n||!g){const E=ee($,n);Array.isArray(E)&&(c(E),l.current=E.map(zt))}}}).unsubscribe,[r,n]);const p=J.useCallback($=>{u.current=!0,r._setFieldArray(n,$)},[r,n]),h=($,g)=>{const E=Ye(De($)),k=zs(r._getFieldArray(n),E);r._names.focus=Ms(n,k.length-1,g),l.current=zs(l.current,E.map(zt)),p(k),c(k),r._setFieldArray(n,k,zs,{argA:js($)})},v=($,g)=>{const E=Ye(De($)),k=Ls(r._getFieldArray(n),E);r._names.focus=Ms(n,0,g),l.current=Ls(l.current,E.map(zt)),p(k),c(k),r._setFieldArray(n,k,Ls,{argA:js($)})},w=$=>{const g=Rs(r._getFieldArray(n),$);l.current=Rs(l.current,$),p(g),c(g),!Array.isArray(ee(r._fields,n))&&Pe(r._fields,n,void 0),r._setFieldArray(n,g,Rs,{argA:$})},y=($,g,E)=>{const k=Ye(De(g)),C=Fs(r._getFieldArray(n),$,k);r._names.focus=Ms(n,$,E),l.current=Fs(l.current,$,k.map(zt)),p(C),c(C),r._setFieldArray(n,C,Fs,{argA:$,argB:js(g)})},m=($,g)=>{const E=r._getFieldArray(n);qs(E,$,g),qs(l.current,$,g),p(E),c(E),r._setFieldArray(n,E,qs,{argA:$,argB:g},!1)},_=($,g)=>{const E=r._getFieldArray(n);Vs(E,$,g),Vs(l.current,$,g),p(E),c(E),r._setFieldArray(n,E,Vs,{argA:$,argB:g},!1)},f=($,g)=>{const E=De(g),k=Bi(r._getFieldArray(n),$,E);l.current=[...k].map((C,O)=>!C||O===$?zt():l.current[O]),p(k),c([...k]),r._setFieldArray(n,k,Bi,{argA:$,argB:E},!0,!1)},b=$=>{const g=Ye(De($));l.current=g.map(zt),p([...g]),c([...g]),r._setFieldArray(n,[...g],E=>E,{},!0,!1)};return J.useEffect(()=>{if(r._state.action=!1,Os(n,r._names)&&r._subjects.state.next({...r._formState}),u.current&&(!fr(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!fr(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then($=>{const g=ee($.errors,n),E=ee(r._formState.errors,n);(E?!g&&E.type||g&&(E.type!==g.type||E.message!==g.message):g&&g.type)&&(g?Pe(r._formState.errors,n,g):Le(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const $=ee(r._fields,n);$&&$._f&&!(fr(r._options.reValidateMode).isOnSubmit&&fr(r._options.mode).isOnSubmit)&&Ds($,r._names.disabled,r._formValues,r._options.criteriaMode===st.all,r._options.shouldUseNativeValidation,!0).then(g=>!We(g)&&r._subjects.state.next({errors:Ui(r._formState.errors,g,n)}))}r._subjects.state.next({name:n,values:De(r._formValues)}),r._names.focus&&pr(r._fields,($,g)=>{if(r._names.focus&&g.startsWith(r._names.focus)&&$.focus)return $.focus(),1}),r._names.focus="",r._setValid(),u.current=!1},[i,n,r]),J.useEffect(()=>(!ee(r._formValues,n)&&r._setFieldArray(n),()=>{const $=(g,E)=>{const k=ee(r._fields,g);k&&k._f&&(k._f.mount=E)};r._options.shouldUnregister||s?r.unregister(n):$(n,!1)}),[n,r,o,s]),{swap:J.useCallback(m,[p,n,r]),move:J.useCallback(_,[p,n,r]),prepend:J.useCallback(v,[p,n,r]),append:J.useCallback(h,[p,n,r]),remove:J.useCallback(w,[p,n,r]),insert:J.useCallback(y,[p,n,r]),update:J.useCallback(f,[p,n,r]),replace:J.useCallback(b,[p,n,r]),fields:J.useMemo(()=>i.map(($,g)=>({...$,[o]:l.current[g]||zt()})),[i,o])}}function Gh(e={}){const t=J.useRef(void 0),r=J.useRef(void 0),[n,o]=J.useState({isDirty:!1,isValidating:!1,isLoading:lt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:lt(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!lt(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...i}=Hh(e);t.current={...i,formState:n}}const s=t.current.control;return s._options=e,gn(()=>{const a=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(i=>({...i,isReady:!0})),s._formState.isReady=!0,a},[s]),J.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),J.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),J.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),J.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),J.useEffect(()=>{if(s._proxyFormState.isDirty){const a=s._getDirty();a!==n.isDirty&&s._subjects.state.next({isDirty:a})}},[s,n.isDirty]),J.useEffect(()=>{var a;e.values&&!ct(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((a=s._options.resetOptions)===null||a===void 0)&&a.keepIsValid||s._setValid(),r.current=e.values,o(i=>({...i}))):s._resetDefaultValues()},[s,e.values]),J.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=Pi(n,s),t.current}const bn={form:{width:"full",height:"md"},output:{position:"bottom",showJson:!0,width:"full",height:"md"},settings:{width:"md"},spacing:"md"},Hi={sm:"max-h-[300px]",md:"max-h-[500px]",lg:"max-h-[800px]",full:"max-h-full"},Jh={sm:300,md:500,lg:800,full:void 0},Us={sm:"w-full max-w-[600px]",md:"w-full max-w-[800px]",lg:"w-full max-w-[1200px]",full:"w-full"},Yh={sm:"sm:max-w-[500px]",md:"sm:max-w-[700px]",lg:"sm:max-w-[1000px]",full:"w-full sm:max-w-full"},Xh={top:"flex-col-reverse",bottom:"flex-col",left:"flex-row-reverse",right:"flex-row"},Ki={sm:"gap-2",md:"gap-4",lg:"gap-6"},Qh=["string","integer","number","boolean","object","array"],em=["int-32","int-64"],tm=["float","double","big-decimal"],rm=["date","date-time","local-date-time","time","duration","email","hostname","ipv4","ipv6","password","html","json","json-path","uri","uri-refrence","uri-template","relative-json-pointer","json-pointer","regex","uuid"],Gi=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ee(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Zs=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Gi(n.ref,r,e):n&&n.refs&&n.refs.forEach(o=>Gi(o,r,e))}},Ji=(e,t)=>{t.shouldUseNativeValidation&&Zs(e,t);const r={};for(const n in e){const o=ee(t.fields,n),s=Object.assign(e[n]||{},{ref:o&&o.ref});if(nm(t.names||Object.keys(e),n)){const a=Object.assign({},ee(r,n));Pe(a,"root",s),Pe(r,n,a)}else Pe(r,n,s)}return r},nm=(e,t)=>{const r=Yi(t);return e.some(n=>Yi(n).match(`^${r}\\.\\d+`))};function Yi(e){return e.replace(/\]|\[/g,"")}function B(e,t,r){function n(i,c){if(i._zod||Object.defineProperty(i,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),i._zod.traits.has(e))return;i._zod.traits.add(e),t(i,c);const l=a.prototype,u=Object.keys(l);for(let p=0;p<u.length;p++){const h=u[p];h in i||(i[h]=l[h].bind(i))}}const o=r?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function a(i){var c;const l=r?.Parent?new s:this;n(l,i),(c=l._zod).deferred??(c.deferred=[]);for(const u of l._zod.deferred)u();return l}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:i=>r?.Parent&&i instanceof r.Parent?!0:i?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class mr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Xi extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Qi={};function jt(e){return Qi}function om(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function Bs(e,t){return typeof t=="bigint"?t.toString():t}function Ws(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Hs(e){return e==null}function Ks(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function sm(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){const c=n.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const s=r>o?r:o,a=Number.parseInt(e.toFixed(s).replace(".","")),i=Number.parseInt(t.toFixed(s).replace(".",""));return a%i/10**s}const ec=Symbol("evaluating");function Ne(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==ec)return n===void 0&&(n=ec,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function er(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function tr(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function tc(e){return JSON.stringify(e)}function am(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const rc="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function _n(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const im=Ws(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function gr(e){if(_n(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(_n(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function nc(e){return gr(e)?{...e}:Array.isArray(e)?[...e]:e}const cm=new Set(["string","number","symbol"]);function wn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ft(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function de(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function lm(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const um={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function dm(e,t){const r=e._zod.def,n=tr(e._zod.def,{get shape(){const o={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(o[s]=r.shape[s])}return er(this,"shape",o),o},checks:[]});return Ft(e,n)}function fm(e,t){const r=e._zod.def,n=tr(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete o[s]}return er(this,"shape",o),o},checks:[]});return Ft(e,n)}function pm(e,t){if(!gr(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const o=tr(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return er(this,"shape",s),s},checks:[]});return Ft(e,o)}function hm(e,t){if(!gr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return er(this,"shape",n),n},checks:e._zod.def.checks};return Ft(e,r)}function mm(e,t){const r=tr(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return er(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Ft(e,r)}function gm(e,t,r){const n=tr(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(s[a]=e?new e({type:"optional",innerType:o[a]}):o[a])}else for(const a in o)s[a]=e?new e({type:"optional",innerType:o[a]}):o[a];return er(this,"shape",s),s},checks:[]});return Ft(t,n)}function vm(e,t,r){const n=tr(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const a in r){if(!(a in s))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(s[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(const a in o)s[a]=new e({type:"nonoptional",innerType:o[a]});return er(this,"shape",s),s},checks:[]});return Ft(t,n)}function vr(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function yr(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function $n(e){return typeof e=="string"?e:e?.message}function Vt(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=$n(e.inst?._zod.def?.error?.(e))??$n(t?.error?.(e))??$n(r.customError?.(e))??$n(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function Gs(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Jr(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const oc=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Bs,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Js=B("$ZodError",oc),Sn=B("$ZodError",oc,{Parent:Error});function ym(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function bm(e,t=r=>r.message){const r={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)r._errors.push(t(s));else{let a=r,i=0;for(;i<s.path.length;){const c=s.path[i];i===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(t(s))):a[c]=a[c]||{_errors:[]},a=a[c],i++}}};return n(e),r}const En=e=>(t,r,n,o)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new mr;if(a.issues.length){const i=new(o?.Err??e)(a.issues.map(c=>Vt(c,s,jt())));throw rc(i,o?.callee),i}return a.value},_m=En(Sn),kn=e=>async(t,r,n,o)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const i=new(o?.Err??e)(a.issues.map(c=>Vt(c,s,jt())));throw rc(i,o?.callee),i}return a.value},wm=kn(Sn),xn=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new mr;return s.issues.length?{success:!1,error:new(e??Js)(s.issues.map(a=>Vt(a,o,jt())))}:{success:!0,data:s.value}},$m=xn(Sn),Cn=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(a=>Vt(a,o,jt())))}:{success:!0,data:s.value}},Sm=Cn(Sn),Em=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return En(e)(t,r,o)},km=e=>(t,r,n)=>En(e)(t,r,n),xm=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return kn(e)(t,r,o)},Cm=e=>async(t,r,n)=>kn(e)(t,r,n),Pm=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return xn(e)(t,r,o)},Nm=e=>(t,r,n)=>xn(e)(t,r,n),Am=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Cn(e)(t,r,o)},Tm=e=>async(t,r,n)=>Cn(e)(t,r,n),Im=/^[cC][^\s-]{8,}$/,Om=/^[0-9a-z]+$/,Dm=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Mm=/^[0-9a-vA-V]{20}$/,zm=/^[A-Za-z0-9]{27}$/,jm=/^[a-zA-Z0-9_-]{21}$/,Fm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Vm=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,sc=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Lm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Rm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function qm(){return new RegExp(Rm,"u")}const Um=/^(?:(?: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])$/,Zm=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,Bm=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,Wm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Hm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ac=/^[A-Za-z0-9_-]*$/,Km=/^\+(?:[0-9]){6,14}[0-9]$/,ic="(?:(?:\\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])))",Gm=new RegExp(`^${ic}$`);function cc(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Jm(e){return new RegExp(`^${cc(e)}$`)}function Ym(e){const t=cc({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${ic}T(?:${n})$`)}const Xm=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Qm=/^-?\d+$/,eg=/^-?\d+(?:\.\d+)?/,tg=/^(?:true|false)$/i,rg=/^[^A-Z]*$/,ng=/^[^a-z]*$/,Xe=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),lc={number:"number",bigint:"bigint",object:"date"},uc=B("$ZodCheckLessThan",(e,t)=>{Xe.init(e,t);const r=lc[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),dc=B("$ZodCheckGreaterThan",(e,t)=>{Xe.init(e,t);const r=lc[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),og=B("$ZodCheckMultipleOf",(e,t)=>{Xe.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):sm(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),sg=B("$ZodCheckNumberFormat",(e,t)=>{Xe.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,s]=um[t.format];e._zod.onattach.push(a=>{const i=a._zod.bag;i.format=t.format,i.minimum=o,i.maximum=s,r&&(i.pattern=Qm)}),e._zod.check=a=>{const i=a.value;if(r){if(!Number.isInteger(i)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:i,inst:e});return}if(!Number.isSafeInteger(i)){i>0?a.issues.push({input:i,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):a.issues.push({input:i,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}i<o&&a.issues.push({origin:"number",input:i,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),i>s&&a.issues.push({origin:"number",input:i,code:"too_big",maximum:s,inst:e})}}),ag=B("$ZodCheckMaxLength",(e,t)=>{var r;Xe.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Hs(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const a=Gs(o);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ig=B("$ZodCheckMinLength",(e,t)=>{var r;Xe.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Hs(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const a=Gs(o);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),cg=B("$ZodCheckLengthEquals",(e,t)=>{var r;Xe.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Hs(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,s=o.length;if(s===t.length)return;const a=Gs(o),i=s>t.length;n.issues.push({origin:a,...i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Pn=B("$ZodCheckStringFormat",(e,t)=>{var r,n;Xe.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),lg=B("$ZodCheckRegex",(e,t)=>{Pn.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ug=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=rg),Pn.init(e,t)}),dg=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ng),Pn.init(e,t)}),fg=B("$ZodCheckIncludes",(e,t)=>{Xe.init(e,t);const r=wn(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),pg=B("$ZodCheckStartsWith",(e,t)=>{Xe.init(e,t);const r=new RegExp(`^${wn(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),hg=B("$ZodCheckEndsWith",(e,t)=>{Xe.init(e,t);const r=new RegExp(`.*${wn(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),mg=B("$ZodCheckOverwrite",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class gg{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
2
+ `).filter(a=>a),o=Math.min(...n.map(a=>a.length-a.trimStart().length)),s=n.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(const a of s)this.content.push(a)}compile(){const t=Function,r=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...r,o.join(`
3
+ `))}}const vg={major:4,minor:1,patch:13},Me=B("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=vg;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(a,i,c)=>{let l=vr(a),u;for(const p of i){if(p._zod.def.when){if(!p._zod.def.when(a))continue}else if(l)continue;const h=a.issues.length,v=p._zod.check(a);if(v instanceof Promise&&c?.async===!1)throw new mr;if(u||v instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await v,a.issues.length!==h&&(l||(l=vr(a,h)))});else{if(a.issues.length===h)continue;l||(l=vr(a,h))}}return u?u.then(()=>a):a},s=(a,i,c)=>{if(vr(a))return a.aborted=!0,a;const l=o(i,n,c);if(l instanceof Promise){if(c.async===!1)throw new mr;return l.then(u=>e._zod.parse(u,c))}return e._zod.parse(l,c)};e._zod.run=(a,i)=>{if(i.skipChecks)return e._zod.parse(a,i);if(i.direction==="backward"){const l=e._zod.parse({value:a.value,issues:[]},{...i,skipChecks:!0});return l instanceof Promise?l.then(u=>s(u,a,i)):s(l,a,i)}const c=e._zod.parse(a,i);if(c instanceof Promise){if(i.async===!1)throw new mr;return c.then(l=>o(l,n,i))}return o(c,n,i)}}e["~standard"]={validate:o=>{try{const s=$m(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Sm(e,o).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),Ys=B("$ZodString",(e,t)=>{Me.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Xm(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ze=B("$ZodStringFormat",(e,t)=>{Pn.init(e,t),Ys.init(e,t)}),yg=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Vm),ze.init(e,t)}),bg=B("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=sc(n))}else t.pattern??(t.pattern=sc());ze.init(e,t)}),_g=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Lm),ze.init(e,t)}),wg=B("$ZodURL",(e,t)=>{ze.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),$g=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=qm()),ze.init(e,t)}),Sg=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=jm),ze.init(e,t)}),Eg=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Im),ze.init(e,t)}),kg=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Om),ze.init(e,t)}),xg=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Dm),ze.init(e,t)}),Cg=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Mm),ze.init(e,t)}),Pg=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=zm),ze.init(e,t)}),Ng=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ym(t)),ze.init(e,t)}),Ag=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Gm),ze.init(e,t)}),Tg=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Jm(t)),ze.init(e,t)}),Ig=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Fm),ze.init(e,t)}),Og=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Um),ze.init(e,t),e._zod.bag.format="ipv4"}),Dg=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Zm),ze.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Mg=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Bm),ze.init(e,t)}),zg=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Wm),ze.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[o,s]=n;if(!s)throw new Error;const a=Number(s);if(`${a}`!==s)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function fc(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const jg=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Hm),ze.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{fc(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Fg(e){if(!ac.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return fc(r)}const Vg=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ac),ze.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Fg(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Lg=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Km),ze.init(e,t)});function Rg(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const qg=B("$ZodJWT",(e,t)=>{ze.init(e,t),e._zod.check=r=>{Rg(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),pc=B("$ZodNumber",(e,t)=>{Me.init(e,t),e._zod.pattern=e._zod.bag.pattern??eg,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),r}}),Ug=B("$ZodNumberFormat",(e,t)=>{sg.init(e,t),pc.init(e,t)}),Zg=B("$ZodBoolean",(e,t)=>{Me.init(e,t),e._zod.pattern=tg,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),Bg=B("$ZodAny",(e,t)=>{Me.init(e,t),e._zod.parse=r=>r}),Wg=B("$ZodUnknown",(e,t)=>{Me.init(e,t),e._zod.parse=r=>r}),Hg=B("$ZodNever",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function hc(e,t,r){e.issues.length&&t.issues.push(...yr(r,e.issues)),t.value[r]=e.value}const Kg=B("$ZodArray",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const s=[];for(let a=0;a<o.length;a++){const i=o[a],c=t.element._zod.run({value:i,issues:[]},n);c instanceof Promise?s.push(c.then(l=>hc(l,r,a))):hc(c,r,a)}return s.length?Promise.all(s).then(()=>r):r}});function Nn(e,t,r,n){e.issues.length&&t.issues.push(...yr(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function mc(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=lm(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function gc(e,t,r,n,o,s){const a=[],i=o.keySet,c=o.catchall._zod,l=c.def.type;for(const u in t){if(i.has(u))continue;if(l==="never"){a.push(u);continue}const p=c.run({value:t[u],issues:[]},n);p instanceof Promise?e.push(p.then(h=>Nn(h,r,u,t))):Nn(p,r,u,t)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}const Gg=B("$ZodObject",(e,t)=>{if(Me.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const i=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...i};return Object.defineProperty(t,"shape",{value:c}),c}})}const n=Ws(()=>mc(t));Ne(e._zod,"propValues",()=>{const i=t.shape,c={};for(const l in i){const u=i[l]._zod;if(u.values){c[l]??(c[l]=new Set);for(const p of u.values)c[l].add(p)}}return c});const o=_n,s=t.catchall;let a;e._zod.parse=(i,c)=>{a??(a=n.value);const l=i.value;if(!o(l))return i.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),i;i.value={};const u=[],p=a.shape;for(const h of a.keys){const w=p[h]._zod.run({value:l[h],issues:[]},c);w instanceof Promise?u.push(w.then(y=>Nn(y,i,h,l))):Nn(w,i,h,l)}return s?gc(u,l,i,c,n.value,e):u.length?Promise.all(u).then(()=>i):i}}),Jg=B("$ZodObjectJIT",(e,t)=>{Gg.init(e,t);const r=e._zod.parse,n=Ws(()=>mc(t)),o=h=>{const v=new gg(["shape","payload","ctx"]),w=n.value,y=b=>{const $=tc(b);return`shape[${$}]._zod.run({ value: input[${$}], issues: [] }, ctx)`};v.write("const input = payload.value;");const m=Object.create(null);let _=0;for(const b of w.keys)m[b]=`key_${_++}`;v.write("const newResult = {};");for(const b of w.keys){const $=m[b],g=tc(b);v.write(`const ${$} = ${y(b)};`),v.write(`
4
+ if (${$}.issues.length) {
5
+ payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
6
+ ...iss,
7
+ path: iss.path ? [${g}, ...iss.path] : [${g}]
8
+ })));
9
+ }
10
+
11
+
12
+ if (${$}.value === undefined) {
13
+ if (${g} in input) {
14
+ newResult[${g}] = undefined;
15
+ }
16
+ } else {
17
+ newResult[${g}] = ${$}.value;
18
+ }
19
+
20
+ `)}v.write("payload.value = newResult;"),v.write("return payload;");const f=v.compile();return(b,$)=>f(h,b,$)};let s;const a=_n,i=!Qi.jitless,l=i&&im.value,u=t.catchall;let p;e._zod.parse=(h,v)=>{p??(p=n.value);const w=h.value;return a(w)?i&&l&&v?.async===!1&&v.jitless!==!0?(s||(s=o(t.shape)),h=s(h,v),u?gc([],w,h,v,p,e):h):r(h,v):(h.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),h)}});function vc(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!vr(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(a=>Vt(a,n,jt())))}),t)}const Yg=B("$ZodUnion",(e,t)=>{Me.init(e,t),Ne(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ne(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ne(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Ne(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Ks(s.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(r)return n(o,s);let a=!1;const i=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},s);if(l instanceof Promise)i.push(l),a=!0;else{if(l.issues.length===0)return l;i.push(l)}}return a?Promise.all(i).then(c=>vc(c,o,e,s)):vc(i,o,e,s)}}),Xg=B("$ZodIntersection",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,s=t.left._zod.run({value:o,issues:[]},n),a=t.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||a instanceof Promise?Promise.all([s,a]).then(([c,l])=>yc(r,c,l)):yc(r,s,a)}});function Xs(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(gr(e)&&gr(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),o={...e,...t};for(const s of n){const a=Xs(e[s],t[s]);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};o[s]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],s=t[n],a=Xs(o,s);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function yc(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),vr(e))return e;const n=Xs(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const Qg=B("$ZodRecord",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!gr(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;const s=[],a=t.keyType._zod.values;if(a){r.value={};const i=new Set;for(const l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){i.add(typeof l=="number"?l.toString():l);const u=t.valueType._zod.run({value:o[l],issues:[]},n);u instanceof Promise?s.push(u.then(p=>{p.issues.length&&r.issues.push(...yr(l,p.issues)),r.value[l]=p.value})):(u.issues.length&&r.issues.push(...yr(l,u.issues)),r.value[l]=u.value)}let c;for(const l in o)i.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c})}else{r.value={};for(const i of Reflect.ownKeys(o)){if(i==="__proto__")continue;const c=t.keyType._zod.run({value:i,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(u=>Vt(u,n,jt())),input:i,path:[i],inst:e}),r.value[c.value]=c.value;continue}const l=t.valueType._zod.run({value:o[i],issues:[]},n);l instanceof Promise?s.push(l.then(u=>{u.issues.length&&r.issues.push(...yr(i,u.issues)),r.value[c.value]=u.value})):(l.issues.length&&r.issues.push(...yr(i,l.issues)),r.value[c.value]=l.value)}}return s.length?Promise.all(s).then(()=>r):r}}),ev=B("$ZodEnum",(e,t)=>{Me.init(e,t);const r=om(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>cm.has(typeof o)).map(o=>typeof o=="string"?wn(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const a=o.value;return n.has(a)||o.issues.push({code:"invalid_value",values:r,input:a,inst:e}),o}}),tv=B("$ZodTransform",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Xi(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(r.value=a,r));if(o instanceof Promise)throw new mr;return r.value=o,r}});function bc(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const rv=B("$ZodOptional",(e,t)=>{Me.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ne(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ne(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ks(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>bc(s,r.value)):bc(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),nv=B("$ZodNullable",(e,t)=>{Me.init(e,t),Ne(e._zod,"optin",()=>t.innerType._zod.optin),Ne(e._zod,"optout",()=>t.innerType._zod.optout),Ne(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ks(r.source)}|null)$`):void 0}),Ne(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),ov=B("$ZodDefault",(e,t)=>{Me.init(e,t),e._zod.optin="optional",Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>_c(s,t)):_c(o,t)}});function _c(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const sv=B("$ZodPrefault",(e,t)=>{Me.init(e,t),e._zod.optin="optional",Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),av=B("$ZodNonOptional",(e,t)=>{Me.init(e,t),Ne(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>wc(s,e)):wc(o,e)}});function wc(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const iv=B("$ZodCatch",(e,t)=>{Me.init(e,t),Ne(e._zod,"optin",()=>t.innerType._zod.optin),Ne(e._zod,"optout",()=>t.innerType._zod.optout),Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(a=>Vt(a,n,jt()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>Vt(s,n,jt()))},input:r.value}),r.issues=[]),r)}}),cv=B("$ZodPipe",(e,t)=>{Me.init(e,t),Ne(e._zod,"values",()=>t.in._zod.values),Ne(e._zod,"optin",()=>t.in._zod.optin),Ne(e._zod,"optout",()=>t.out._zod.optout),Ne(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(a=>An(a,t.in,n)):An(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>An(s,t.out,n)):An(o,t.out,n)}});function An(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const lv=B("$ZodReadonly",(e,t)=>{Me.init(e,t),Ne(e._zod,"propValues",()=>t.innerType._zod.propValues),Ne(e._zod,"values",()=>t.innerType._zod.values),Ne(e._zod,"optin",()=>t.innerType?._zod?.optin),Ne(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then($c):$c(o)}});function $c(e){return e.value=Object.freeze(e.value),e}const uv=B("$ZodLazy",(e,t)=>{Me.init(e,t),Ne(e._zod,"innerType",()=>t.getter()),Ne(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Ne(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Ne(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Ne(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),dv=B("$ZodCustom",(e,t)=>{Xe.init(e,t),Me.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>Sc(s,r,n,e));Sc(o,r,n,e)}});function Sc(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(Jr(o))}}var Ec;class fv{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function pv(){return new fv}(Ec=globalThis).__zod_globalRegistry??(Ec.__zod_globalRegistry=pv());const Tn=globalThis.__zod_globalRegistry;function hv(e,t){return new e({type:"string",...de(t)})}function mv(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...de(t)})}function kc(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...de(t)})}function gv(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...de(t)})}function vv(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...de(t)})}function yv(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...de(t)})}function bv(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...de(t)})}function _v(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...de(t)})}function wv(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...de(t)})}function $v(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...de(t)})}function Sv(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...de(t)})}function Ev(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...de(t)})}function kv(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...de(t)})}function xv(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...de(t)})}function Cv(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...de(t)})}function Pv(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...de(t)})}function Nv(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...de(t)})}function Av(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...de(t)})}function Tv(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...de(t)})}function Iv(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...de(t)})}function Ov(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...de(t)})}function Dv(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...de(t)})}function Mv(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...de(t)})}function zv(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...de(t)})}function jv(e,t){return new e({type:"string",format:"date",check:"string_format",...de(t)})}function Fv(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...de(t)})}function Vv(e,t){return new e({type:"string",format:"duration",check:"string_format",...de(t)})}function Lv(e,t){return new e({type:"number",checks:[],...de(t)})}function Rv(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...de(t)})}function qv(e,t){return new e({type:"boolean",...de(t)})}function Uv(e){return new e({type:"any"})}function Zv(e){return new e({type:"unknown"})}function Bv(e,t){return new e({type:"never",...de(t)})}function xc(e,t){return new uc({check:"less_than",...de(t),value:e,inclusive:!1})}function Qs(e,t){return new uc({check:"less_than",...de(t),value:e,inclusive:!0})}function Cc(e,t){return new dc({check:"greater_than",...de(t),value:e,inclusive:!1})}function ea(e,t){return new dc({check:"greater_than",...de(t),value:e,inclusive:!0})}function Pc(e,t){return new og({check:"multiple_of",...de(t),value:e})}function Nc(e,t){return new ag({check:"max_length",...de(t),maximum:e})}function In(e,t){return new ig({check:"min_length",...de(t),minimum:e})}function Ac(e,t){return new cg({check:"length_equals",...de(t),length:e})}function Wv(e,t){return new lg({check:"string_format",format:"regex",...de(t),pattern:e})}function Hv(e){return new ug({check:"string_format",format:"lowercase",...de(e)})}function Kv(e){return new dg({check:"string_format",format:"uppercase",...de(e)})}function Gv(e,t){return new fg({check:"string_format",format:"includes",...de(t),includes:e})}function Jv(e,t){return new pg({check:"string_format",format:"starts_with",...de(t),prefix:e})}function Yv(e,t){return new hg({check:"string_format",format:"ends_with",...de(t),suffix:e})}function br(e){return new mg({check:"overwrite",tx:e})}function Xv(e){return br(t=>t.normalize(e))}function Qv(){return br(e=>e.trim())}function ey(){return br(e=>e.toLowerCase())}function ty(){return br(e=>e.toUpperCase())}function ry(){return br(e=>am(e))}function ny(e,t,r){return new e({type:"array",element:t,...de(r)})}function oy(e,t,r){return new e({type:"custom",check:"custom",fn:t,...de(r)})}function sy(e){const t=ay(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Jr(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(Jr(o))}},e(r.value,r)));return t}function ay(e,t){const r=new Xe({check:"custom",...de(t)});return r._zod.check=e,r}function Tc(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function iy(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,a=n.path.join(".");if(!r[a])if("unionErrors"in n){var i=n.unionErrors[0].errors[0];r[a]={message:i.message,type:i.code}}else r[a]={message:s,type:o};if("unionErrors"in n&&n.unionErrors.forEach(function(u){return u.errors.forEach(function(p){return e.push(p)})}),t){var c=r[a].types,l=c&&c[n.code];r[a]=Ps(a,t,r,o,l?[].concat(l,n.message):n.message)}e.shift()}return r}function cy(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,a=n.path.join(".");if(!r[a])if(n.code==="invalid_union"&&n.errors.length>0){var i=n.errors[0][0];r[a]={message:i.message,type:i.code}}else r[a]={message:s,type:o};if(n.code==="invalid_union"&&n.errors.forEach(function(u){return u.forEach(function(p){return e.push(p)})}),t){var c=r[a].types,l=c&&c[n.code];r[a]=Ps(a,t,r,o,l?[].concat(l,n.message):n.message)}e.shift()}return r}function ly(e,t,r){if(r===void 0&&(r={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,o,s){try{return Promise.resolve(Tc(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(a){return s.shouldUseNativeValidation&&Zs({},s),{errors:{},values:r.raw?Object.assign({},n):a}})},function(a){if((function(i){return Array.isArray(i?.issues)})(a))return{values:{},errors:Ji(iy(a.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw a}))}catch(a){return Promise.reject(a)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,o,s){try{return Promise.resolve(Tc(function(){return Promise.resolve((r.mode==="sync"?_m:wm)(e,n,t)).then(function(a){return s.shouldUseNativeValidation&&Zs({},s),{errors:{},values:r.raw?Object.assign({},n):a}})},function(a){if((function(i){return i instanceof Js})(a))return{values:{},errors:Ji(cy(a.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}const uy=B("ZodISODateTime",(e,t)=>{Ng.init(e,t),Fe.init(e,t)});function dy(e){return zv(uy,e)}const fy=B("ZodISODate",(e,t)=>{Ag.init(e,t),Fe.init(e,t)});function py(e){return jv(fy,e)}const hy=B("ZodISOTime",(e,t)=>{Tg.init(e,t),Fe.init(e,t)});function my(e){return Fv(hy,e)}const gy=B("ZodISODuration",(e,t)=>{Ig.init(e,t),Fe.init(e,t)});function vy(e){return Vv(gy,e)}const at=B("ZodError",(e,t)=>{Js.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>bm(e,r)},flatten:{value:r=>ym(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Bs,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Bs,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),yy=En(at),by=kn(at),_y=xn(at),wy=Cn(at),$y=Em(at),Sy=km(at),Ey=xm(at),ky=Cm(at),xy=Pm(at),Cy=Nm(at),Py=Am(at),Ny=Tm(at),je=B("ZodType",(e,t)=>(Me.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(tr(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]})),e.clone=(r,n)=>Ft(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>yy(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>_y(e,r,n),e.parseAsync=async(r,n)=>by(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>wy(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>$y(e,r,n),e.decode=(r,n)=>Sy(e,r,n),e.encodeAsync=async(r,n)=>Ey(e,r,n),e.decodeAsync=async(r,n)=>ky(e,r,n),e.safeEncode=(r,n)=>xy(e,r,n),e.safeDecode=(r,n)=>Cy(e,r,n),e.safeEncodeAsync=async(r,n)=>Py(e,r,n),e.safeDecodeAsync=async(r,n)=>Ny(e,r,n),e.refine=(r,n)=>e.check($b(r,n)),e.superRefine=r=>e.check(Sb(r)),e.overwrite=r=>e.check(br(r)),e.optional=()=>Lc(e),e.nullable=()=>Rc(e),e.nullish=()=>Lc(Rc(e)),e.nonoptional=r=>hb(e,r),e.array=()=>_r(e),e.or=r=>ra([e,r]),e.and=r=>ob(e,r),e.transform=r=>Uc(e,cb(r)),e.default=r=>db(e,r),e.prefault=r=>pb(e,r),e.catch=r=>gb(e,r),e.pipe=r=>Uc(e,r),e.readonly=()=>bb(e),e.describe=r=>{const n=e.clone();return Tn.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Tn.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Tn.get(e);const n=e.clone();return Tn.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Ic=B("_ZodString",(e,t)=>{Ys.init(e,t),je.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(Wv(...n)),e.includes=(...n)=>e.check(Gv(...n)),e.startsWith=(...n)=>e.check(Jv(...n)),e.endsWith=(...n)=>e.check(Yv(...n)),e.min=(...n)=>e.check(In(...n)),e.max=(...n)=>e.check(Nc(...n)),e.length=(...n)=>e.check(Ac(...n)),e.nonempty=(...n)=>e.check(In(1,...n)),e.lowercase=n=>e.check(Hv(n)),e.uppercase=n=>e.check(Kv(n)),e.trim=()=>e.check(Qv()),e.normalize=(...n)=>e.check(Xv(...n)),e.toLowerCase=()=>e.check(ey()),e.toUpperCase=()=>e.check(ty()),e.slugify=()=>e.check(ry())}),Ay=B("ZodString",(e,t)=>{Ys.init(e,t),Ic.init(e,t),e.email=r=>e.check(mv(Ty,r)),e.url=r=>e.check(_v(Iy,r)),e.jwt=r=>e.check(Mv(Hy,r)),e.emoji=r=>e.check(wv(Oy,r)),e.guid=r=>e.check(kc(Oc,r)),e.uuid=r=>e.check(gv(On,r)),e.uuidv4=r=>e.check(vv(On,r)),e.uuidv6=r=>e.check(yv(On,r)),e.uuidv7=r=>e.check(bv(On,r)),e.nanoid=r=>e.check($v(Dy,r)),e.guid=r=>e.check(kc(Oc,r)),e.cuid=r=>e.check(Sv(My,r)),e.cuid2=r=>e.check(Ev(zy,r)),e.ulid=r=>e.check(kv(jy,r)),e.base64=r=>e.check(Iv(Zy,r)),e.base64url=r=>e.check(Ov(By,r)),e.xid=r=>e.check(xv(Fy,r)),e.ksuid=r=>e.check(Cv(Vy,r)),e.ipv4=r=>e.check(Pv(Ly,r)),e.ipv6=r=>e.check(Nv(Ry,r)),e.cidrv4=r=>e.check(Av(qy,r)),e.cidrv6=r=>e.check(Tv(Uy,r)),e.e164=r=>e.check(Dv(Wy,r)),e.datetime=r=>e.check(dy(r)),e.date=r=>e.check(py(r)),e.time=r=>e.check(my(r)),e.duration=r=>e.check(vy(r))});function ut(e){return hv(Ay,e)}const Fe=B("ZodStringFormat",(e,t)=>{ze.init(e,t),Ic.init(e,t)}),Ty=B("ZodEmail",(e,t)=>{_g.init(e,t),Fe.init(e,t)}),Oc=B("ZodGUID",(e,t)=>{yg.init(e,t),Fe.init(e,t)}),On=B("ZodUUID",(e,t)=>{bg.init(e,t),Fe.init(e,t)}),Iy=B("ZodURL",(e,t)=>{wg.init(e,t),Fe.init(e,t)}),Oy=B("ZodEmoji",(e,t)=>{$g.init(e,t),Fe.init(e,t)}),Dy=B("ZodNanoID",(e,t)=>{Sg.init(e,t),Fe.init(e,t)}),My=B("ZodCUID",(e,t)=>{Eg.init(e,t),Fe.init(e,t)}),zy=B("ZodCUID2",(e,t)=>{kg.init(e,t),Fe.init(e,t)}),jy=B("ZodULID",(e,t)=>{xg.init(e,t),Fe.init(e,t)}),Fy=B("ZodXID",(e,t)=>{Cg.init(e,t),Fe.init(e,t)}),Vy=B("ZodKSUID",(e,t)=>{Pg.init(e,t),Fe.init(e,t)}),Ly=B("ZodIPv4",(e,t)=>{Og.init(e,t),Fe.init(e,t)}),Ry=B("ZodIPv6",(e,t)=>{Dg.init(e,t),Fe.init(e,t)}),qy=B("ZodCIDRv4",(e,t)=>{Mg.init(e,t),Fe.init(e,t)}),Uy=B("ZodCIDRv6",(e,t)=>{zg.init(e,t),Fe.init(e,t)}),Zy=B("ZodBase64",(e,t)=>{jg.init(e,t),Fe.init(e,t)}),By=B("ZodBase64URL",(e,t)=>{Vg.init(e,t),Fe.init(e,t)}),Wy=B("ZodE164",(e,t)=>{Lg.init(e,t),Fe.init(e,t)}),Hy=B("ZodJWT",(e,t)=>{qg.init(e,t),Fe.init(e,t)}),Dc=B("ZodNumber",(e,t)=>{pc.init(e,t),je.init(e,t),e.gt=(n,o)=>e.check(Cc(n,o)),e.gte=(n,o)=>e.check(ea(n,o)),e.min=(n,o)=>e.check(ea(n,o)),e.lt=(n,o)=>e.check(xc(n,o)),e.lte=(n,o)=>e.check(Qs(n,o)),e.max=(n,o)=>e.check(Qs(n,o)),e.int=n=>e.check(Mc(n)),e.safe=n=>e.check(Mc(n)),e.positive=n=>e.check(Cc(0,n)),e.nonnegative=n=>e.check(ea(0,n)),e.negative=n=>e.check(xc(0,n)),e.nonpositive=n=>e.check(Qs(0,n)),e.multipleOf=(n,o)=>e.check(Pc(n,o)),e.step=(n,o)=>e.check(Pc(n,o)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function tt(e){return Lv(Dc,e)}const Ky=B("ZodNumberFormat",(e,t)=>{Ug.init(e,t),Dc.init(e,t)});function Mc(e){return Rv(Ky,e)}const Gy=B("ZodBoolean",(e,t)=>{Zg.init(e,t),je.init(e,t)});function Dn(e){return qv(Gy,e)}const Jy=B("ZodAny",(e,t)=>{Bg.init(e,t),je.init(e,t)});function zc(){return Uv(Jy)}const Yy=B("ZodUnknown",(e,t)=>{Wg.init(e,t),je.init(e,t)});function jc(){return Zv(Yy)}const Xy=B("ZodNever",(e,t)=>{Hg.init(e,t),je.init(e,t)});function Qy(e){return Bv(Xy,e)}const eb=B("ZodArray",(e,t)=>{Kg.init(e,t),je.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(In(r,n)),e.nonempty=r=>e.check(In(1,r)),e.max=(r,n)=>e.check(Nc(r,n)),e.length=(r,n)=>e.check(Ac(r,n)),e.unwrap=()=>e.element});function _r(e,t){return ny(eb,e,t)}const tb=B("ZodObject",(e,t)=>{Jg.init(e,t),je.init(e,t),Ne(e,"shape",()=>t.shape),e.keyof=()=>Fc(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:jc()}),e.loose=()=>e.clone({...e._zod.def,catchall:jc()}),e.strict=()=>e.clone({...e._zod.def,catchall:Qy()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>pm(e,r),e.safeExtend=r=>hm(e,r),e.merge=r=>mm(e,r),e.pick=r=>dm(e,r),e.omit=r=>fm(e,r),e.partial=(...r)=>gm(Vc,e,r[0]),e.required=(...r)=>vm(qc,e,r[0])});function ta(e,t){const r={type:"object",shape:e??{},...de(t)};return new tb(r)}const rb=B("ZodUnion",(e,t)=>{Yg.init(e,t),je.init(e,t),e.options=t.options});function ra(e,t){return new rb({type:"union",options:e,...de(t)})}const nb=B("ZodIntersection",(e,t)=>{Xg.init(e,t),je.init(e,t)});function ob(e,t){return new nb({type:"intersection",left:e,right:t})}const sb=B("ZodRecord",(e,t)=>{Qg.init(e,t),je.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function ab(e,t,r){return new sb({type:"record",keyType:e,valueType:t,...de(r)})}const na=B("ZodEnum",(e,t)=>{ev.init(e,t),je.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const s={};for(const a of n)if(r.has(a))s[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new na({...t,checks:[],...de(o),entries:s})},e.exclude=(n,o)=>{const s={...t.entries};for(const a of n)if(r.has(a))delete s[a];else throw new Error(`Key ${a} not found in enum`);return new na({...t,checks:[],...de(o),entries:s})}});function Fc(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new na({type:"enum",entries:r,...de(t)})}const ib=B("ZodTransform",(e,t)=>{tv.init(e,t),je.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Xi(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Jr(s,r.value,t));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Jr(a))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function cb(e){return new ib({type:"transform",transform:e})}const Vc=B("ZodOptional",(e,t)=>{rv.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Lc(e){return new Vc({type:"optional",innerType:e})}const lb=B("ZodNullable",(e,t)=>{nv.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Rc(e){return new lb({type:"nullable",innerType:e})}const ub=B("ZodDefault",(e,t)=>{ov.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function db(e,t){return new ub({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():nc(t)}})}const fb=B("ZodPrefault",(e,t)=>{sv.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType});function pb(e,t){return new fb({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():nc(t)}})}const qc=B("ZodNonOptional",(e,t)=>{av.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType});function hb(e,t){return new qc({type:"nonoptional",innerType:e,...de(t)})}const mb=B("ZodCatch",(e,t)=>{iv.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function gb(e,t){return new mb({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const vb=B("ZodPipe",(e,t)=>{cv.init(e,t),je.init(e,t),e.in=t.in,e.out=t.out});function Uc(e,t){return new vb({type:"pipe",in:e,out:t})}const yb=B("ZodReadonly",(e,t)=>{lv.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.innerType});function bb(e){return new yb({type:"readonly",innerType:e})}const _b=B("ZodLazy",(e,t)=>{uv.init(e,t),je.init(e,t),e.unwrap=()=>e._zod.def.getter()});function oa(e){return new _b({type:"lazy",getter:e})}const wb=B("ZodCustom",(e,t)=>{dv.init(e,t),je.init(e,t)});function $b(e,t={}){return oy(wb,e,t)}function Sb(e){return sy(e)}const wr=ta({type:Fc(["string","number","integer","boolean","object","array"]).optional(),title:ut().optional(),description:ut().optional(),default:zc().optional(),minimum:tt().optional(),maximum:tt().optional(),exclusiveMin:tt().optional(),exclusiveMax:tt().optional(),multipleOf:tt().optional(),minLength:tt().optional(),maxLength:tt().optional(),minContains:tt().optional(),maxContains:tt().optional(),minProperties:tt().optional(),maxProperties:tt().optional(),isModifiable:Dn().optional(),"x-modifiable":_r(ut()).optional(),pattern:ut().optional(),format:ut().optional(),minItems:tt().optional(),maxItems:tt().optional(),uniqueItems:Dn().optional(),enum:_r(zc()).optional(),$id:ut().optional(),$schema:ut().optional()}).extend({properties:oa(()=>ab(ut(),wr)).optional(),items:oa(()=>ra([wr,_r(wr)])).optional(),required:_r(ut()).optional(),additionalProperties:oa(()=>ra([Dn(),wr])).optional()}),Eb=ta({root:wr,properties:_r(ta({id:ut(),key:ut().min(1),isRequired:Dn(),schema:wr}))}),kb=e=>{const t=s=>{const a={...s};if(Array.isArray(a.properties)){const i={},c=[];a.properties.forEach(l=>{l.key&&(i[l.key]=t(l.schema),l.isRequired&&c.push(l.key))}),a.properties=i,c.length>0&&(a.required=c)}return typeof a.items=="object"&&a.items!==null&&!Array.isArray(a.items)?a.items=t(a.items):Array.isArray(a.items)&&(a.items=a.items.map(i=>t(i))),a},r={...t(e.root)},n={},o=[];return e.properties.forEach(s=>{s.key&&(n[s.key]=t(s.schema),s.isRequired&&o.push(s.key))}),Object.keys(n).length>0&&(r.properties=n),o.length>0&&(r.required=o),r},xb=e=>{const t=i=>{const c={...i};if(typeof c.properties=="object"&&!Array.isArray(c.properties)){const l=[];Object.keys(c.properties).forEach(u=>{const p=c.properties[u];l.push({id:Wr(6),key:u,isRequired:c.required?.includes(u)||!1,schema:t(p)})}),c.properties=l}return typeof c.items=="object"&&c.items!==null&&!Array.isArray(c.items)?c.items=t(c.items):Array.isArray(c.items)&&(c.items=c.items.map(l=>t(l))),c},{properties:r,required:n,...o}=e,a=t({properties:r,required:n});return{root:{...o,...a.root},properties:a.properties||[]}},Cb=({rootType:e="object",defaultValue:t})=>{const r=Wr(6),n=Gh({resolver:ly(Eb),defaultValues:t?xb(t):{root:{type:e,$schema:"http://json-schema.org/draft/2020-12/schema",...e==="object"&&{additionalProperties:!0},...e==="array"&&{items:{type:"string"}}},properties:e==="object"?[{id:r,key:`field_${r}`,isRequired:!1,schema:{type:"number"}}]:[]}}),o=n.watch(),s=J.useMemo(()=>kb(o),[o]);return{methods:n,jsonSchema:s}};function Zc(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Zc(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Bc(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Zc(e))&&(n&&(n+=" "),n+=t);return n}const Pb=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Nb=(e,t)=>({classGroupId:e,validator:t}),Wc=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Mn="-",Hc=[],Ab="arbitrary..",Tb=e=>{const t=Ob(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Ib(a);const i=a.split(Mn),c=i[0]===""&&i.length>1?1:0;return Kc(i,c,t)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=n[a],l=r[a];return c?l?Pb(l,c):c:l||Hc}return r[a]||Hc}}},Kc=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const l=Kc(e,t+1,s);if(l)return l}const a=r.validators;if(a===null)return;const i=t===0?e.join(Mn):e.slice(t).join(Mn),c=a.length;for(let l=0;l<c;l++){const u=a[l];if(u.validator(i))return u.classGroupId}},Ib=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Ab+n:void 0})(),Ob=e=>{const{theme:t,classGroups:r}=e;return Db(r,t)},Db=(e,t)=>{const r=Wc();for(const n in e){const o=e[n];sa(o,r,n,t)}return r},sa=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const a=e[s];Mb(a,t,r,n)}},Mb=(e,t,r,n)=>{if(typeof e=="string"){zb(e,t,r);return}if(typeof e=="function"){jb(e,t,r,n);return}Fb(e,t,r,n)},zb=(e,t,r)=>{const n=e===""?t:Gc(t,e);n.classGroupId=r},jb=(e,t,r,n)=>{if(Vb(e)){sa(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Nb(r,e))},Fb=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let a=0;a<s;a++){const[i,c]=o[a];sa(c,Gc(t,i),r,n)}},Gc=(e,t)=>{let r=e;const n=t.split(Mn),o=n.length;for(let s=0;s<o;s++){const a=n[s];let i=r.nextPart.get(a);i||(i=Wc(),r.nextPart.set(a,i)),r=i}return r},Vb=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Lb=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,a)=>{r[s]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let a=r[s];if(a!==void 0)return a;if((a=n[s])!==void 0)return o(s,a),a},set(s,a){s in r?r[s]=a:o(s,a)}}},aa="!",Jc=":",Rb=[],Yc=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),qb=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let a=0,i=0,c=0,l;const u=o.length;for(let y=0;y<u;y++){const m=o[y];if(a===0&&i===0){if(m===Jc){s.push(o.slice(c,y)),c=y+1;continue}if(m==="/"){l=y;continue}}m==="["?a++:m==="]"?a--:m==="("?i++:m===")"&&i--}const p=s.length===0?o:o.slice(c);let h=p,v=!1;p.endsWith(aa)?(h=p.slice(0,-1),v=!0):p.startsWith(aa)&&(h=p.slice(1),v=!0);const w=l&&l>c?l-c:void 0;return Yc(s,v,h,w)};if(t){const o=t+Jc,s=n;n=a=>a.startsWith(o)?s(a.slice(o.length)):Yc(Rb,!1,a,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},Ub=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const a=r[s],i=a[0]==="[",c=t.has(a);i||c?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(a)):o.push(a)}return o.length>0&&(o.sort(),n.push(...o)),n}},Zb=e=>({cache:Lb(e.cacheSize),parseClassName:qb(e),sortModifiers:Ub(e),...Tb(e)}),Bb=/\s+/,Wb=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(Bb);let c="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{isExternal:p,modifiers:h,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:y}=r(u);if(p){c=u+(c.length>0?" "+c:c);continue}let m=!!y,_=n(m?w.substring(0,y):w);if(!_){if(!m){c=u+(c.length>0?" "+c:c);continue}if(_=n(w),!_){c=u+(c.length>0?" "+c:c);continue}m=!1}const f=h.length===0?"":h.length===1?h[0]:s(h).join(":"),b=v?f+aa:f,$=b+_;if(a.indexOf($)>-1)continue;a.push($);const g=o(_,m);for(let E=0;E<g.length;++E){const k=g[E];a.push(b+k)}c=u+(c.length>0?" "+c:c)}return c},Hb=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Xc(r))&&(o&&(o+=" "),o+=n);return o},Xc=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Xc(e[n]))&&(r&&(r+=" "),r+=t);return r},Kb=(e,...t)=>{let r,n,o,s;const a=c=>{const l=t.reduce((u,p)=>p(u),e());return r=Zb(l),n=r.cache.get,o=r.cache.set,s=i,i(c)},i=c=>{const l=n(c);if(l)return l;const u=Wb(c,r);return o(c,u),u};return s=a,(...c)=>s(Hb(...c))},Gb=[],qe=e=>{const t=r=>r[e]||Gb;return t.isThemeGetter=!0,t},Qc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,el=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jb=/^\d+\/\d+$/,Yb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xb=/\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$/,Qb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,e_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,t_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$r=e=>Jb.test(e),be=e=>!!e&&!Number.isNaN(Number(e)),Lt=e=>!!e&&Number.isInteger(Number(e)),ia=e=>e.endsWith("%")&&be(e.slice(0,-1)),Ct=e=>Yb.test(e),r_=()=>!0,n_=e=>Xb.test(e)&&!Qb.test(e),tl=()=>!1,o_=e=>e_.test(e),s_=e=>t_.test(e),a_=e=>!ae(e)&&!ie(e),i_=e=>Sr(e,al,tl),ae=e=>Qc.test(e),rr=e=>Sr(e,il,n_),ca=e=>Sr(e,f_,be),rl=e=>Sr(e,ol,tl),c_=e=>Sr(e,sl,s_),zn=e=>Sr(e,cl,o_),ie=e=>el.test(e),Yr=e=>Er(e,il),l_=e=>Er(e,p_),nl=e=>Er(e,ol),u_=e=>Er(e,al),d_=e=>Er(e,sl),jn=e=>Er(e,cl,!0),Sr=(e,t,r)=>{const n=Qc.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Er=(e,t,r=!1)=>{const n=el.exec(e);return n?n[1]?t(n[1]):r:!1},ol=e=>e==="position"||e==="percentage",sl=e=>e==="image"||e==="url",al=e=>e==="length"||e==="size"||e==="bg-size",il=e=>e==="length",f_=e=>e==="number",p_=e=>e==="family-name",cl=e=>e==="shadow",h_=Kb(()=>{const e=qe("color"),t=qe("font"),r=qe("text"),n=qe("font-weight"),o=qe("tracking"),s=qe("leading"),a=qe("breakpoint"),i=qe("container"),c=qe("spacing"),l=qe("radius"),u=qe("shadow"),p=qe("inset-shadow"),h=qe("text-shadow"),v=qe("drop-shadow"),w=qe("blur"),y=qe("perspective"),m=qe("aspect"),_=qe("ease"),f=qe("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],g=()=>[...$(),ie,ae],E=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],C=()=>[ie,ae,c],O=()=>[$r,"full","auto",...C()],V=()=>[Lt,"none","subgrid",ie,ae],z=()=>["auto",{span:["full",Lt,ie,ae]},Lt,ie,ae],j=()=>[Lt,"auto",ie,ae],R=()=>["auto","min","max","fr",ie,ae],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ne=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...C()],oe=()=>[$r,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],F=()=>[e,ie,ae],fe=()=>[...$(),nl,rl,{position:[ie,ae]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",u_,i_,{size:[ie,ae]}],K=()=>[ia,Yr,rr],D=()=>["","none","full",l,ie,ae],x=()=>["",be,Yr,rr],N=()=>["solid","dashed","dotted","double"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[be,ia,nl,rl],Q=()=>["","none",w,ie,ae],ue=()=>["none",be,ie,ae],se=()=>["none",be,ie,ae],A=()=>[be,ie,ae],T=()=>[$r,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ct],breakpoint:[Ct],color:[r_],container:[Ct],"drop-shadow":[Ct],ease:["in","out","in-out"],font:[a_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ct],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ct],shadow:[Ct],spacing:["px",be],text:[Ct],"text-shadow":[Ct],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$r,ae,ie,m]}],container:["container"],columns:[{columns:[be,ae,ie,i]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"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"],sr:["sr-only","not-sr-only"],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:g()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[Lt,"auto",ie,ae]}],basis:[{basis:[$r,"full","auto",i,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[be,$r,"auto","initial","none",ae]}],grow:[{grow:["",be,ie,ae]}],shrink:[{shrink:["",be,ie,ae]}],order:[{order:[Lt,"first","last","none",ie,ae]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:oe()}],w:[{w:[i,"screen",...oe()]}],"min-w":[{"min-w":[i,"screen","none",...oe()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...oe()]}],h:[{h:["screen","lh",...oe()]}],"min-h":[{"min-h":["screen","lh","none",...oe()]}],"max-h":[{"max-h":["screen","lh",...oe()]}],"font-size":[{text:["base",r,Yr,rr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ie,ca]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ia,ae]}],"font-family":[{font:[l_,ae,t]}],"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:[o,ie,ae]}],"line-clamp":[{"line-clamp":[be,"none",ie,ca]}],leading:[{leading:[s,...C()]}],"list-image":[{"list-image":["none",ie,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ie,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:[be,"from-font","auto",ie,rr]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[be,"auto",ie,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie,ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ie,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:fe()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Lt,ie,ae],radial:["",ie,ae],conic:[Lt,ie,ae]},d_,c_]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:x()}],"border-w-x":[{"border-x":x()}],"border-w-y":[{"border-y":x()}],"border-w-s":[{"border-s":x()}],"border-w-e":[{"border-e":x()}],"border-w-t":[{"border-t":x()}],"border-w-r":[{"border-r":x()}],"border-w-b":[{"border-b":x()}],"border-w-l":[{"border-l":x()}],"divide-x":[{"divide-x":x()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":x()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...N(),"hidden","none"]}],"divide-style":[{divide:[...N(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...N(),"none","hidden"]}],"outline-offset":[{"outline-offset":[be,ie,ae]}],"outline-w":[{outline:["",be,Yr,rr]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",u,jn,zn]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",p,jn,zn]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:x()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[be,rr]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":x()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",h,jn,zn]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[be,ie,ae]}],"mix-blend":[{"mix-blend":[...L(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":L()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[be]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[ie,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":$()}],"mask-image-conic-pos":[{"mask-conic":[be]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:fe()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ie,ae]}],filter:[{filter:["","none",ie,ae]}],blur:[{blur:Q()}],brightness:[{brightness:[be,ie,ae]}],contrast:[{contrast:[be,ie,ae]}],"drop-shadow":[{"drop-shadow":["","none",v,jn,zn]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",be,ie,ae]}],"hue-rotate":[{"hue-rotate":[be,ie,ae]}],invert:[{invert:["",be,ie,ae]}],saturate:[{saturate:[be,ie,ae]}],sepia:[{sepia:["",be,ie,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",ie,ae]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[be,ie,ae]}],"backdrop-contrast":[{"backdrop-contrast":[be,ie,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",be,ie,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[be,ie,ae]}],"backdrop-invert":[{"backdrop-invert":["",be,ie,ae]}],"backdrop-opacity":[{"backdrop-opacity":[be,ie,ae]}],"backdrop-saturate":[{"backdrop-saturate":[be,ie,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",be,ie,ae]}],"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:["","all","colors","opacity","shadow","transform","none",ie,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[be,"initial",ie,ae]}],ease:[{ease:["linear","initial",_,ie,ae]}],delay:[{delay:[be,ie,ae]}],animate:[{animate:["none",f,ie,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,ie,ae]}],"perspective-origin":[{"perspective-origin":g()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[ie,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:g()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:T()}],"translate-x":[{"translate-x":T()}],"translate-y":[{"translate-y":T()}],"translate-z":[{"translate-z":T()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",ie,ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",ie,ae]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[be,Yr,rr,ca]}],stroke:[{stroke:["none",...F()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function ge(...e){return h_(Bc(e))}function ll(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fn={exports:{}},la={},Pt={},nr={},ua={},da={},fa={},ul;function Vn(){return ul||(ul=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((b,$)=>`${b}${$}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((b,$)=>($ instanceof r&&(b[$.str]=(b[$.str]||0)+1),b),{})}}e._Code=n,e.nil=new n("");function o(_,...f){const b=[_[0]];let $=0;for(;$<f.length;)i(b,f[$]),b.push(_[++$]);return new n(b)}e._=o;const s=new n("+");function a(_,...f){const b=[v(_[0])];let $=0;for(;$<f.length;)b.push(s),i(b,f[$]),b.push(s,v(_[++$]));return c(b),new n(b)}e.str=a;function i(_,f){f instanceof n?_.push(...f._items):f instanceof r?_.push(f):_.push(p(f))}e.addCodeArg=i;function c(_){let f=1;for(;f<_.length-1;){if(_[f]===s){const b=l(_[f-1],_[f+1]);if(b!==void 0){_.splice(f-1,3,b);continue}_[f++]="+"}f++}}function l(_,f){if(f==='""')return _;if(_==='""')return f;if(typeof _=="string")return f instanceof r||_[_.length-1]!=='"'?void 0:typeof f!="string"?`${_.slice(0,-1)}${f}"`:f[0]==='"'?_.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(_ instanceof r))return`"${_}${f.slice(1)}`}function u(_,f){return f.emptyStr()?_:_.emptyStr()?f:a`${_}${f}`}e.strConcat=u;function p(_){return typeof _=="number"||typeof _=="boolean"||_===null?_:v(Array.isArray(_)?_.join(","):_)}function h(_){return new n(v(_))}e.stringify=h;function v(_){return JSON.stringify(_).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function w(_){return typeof _=="string"&&e.IDENTIFIER.test(_)?new n(`.${_}`):o`[${_}]`}e.getProperty=w;function y(_){if(typeof _=="string"&&e.IDENTIFIER.test(_))return new n(`${_}`);throw new Error(`CodeGen: invalid export name: ${_}, use explicit $id name mapping`)}e.getEsmExportName=y;function m(_){return new n(_.toString())}e.regexpCode=m})(fa)),fa}var pa={},dl;function fl(){return dl||(dl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Vn();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:l,parent:u}={}){this._names={},this._prefixes=l,this._parent=u}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,p;if(!((p=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||p===void 0)&&p.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=o;class s extends t.Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:p}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(u)}[${p}]`}}e.ValueScopeName=s;const a=(0,t._)`\n`;class i extends o{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?a:t.nil}}get(){return this._scope}name(l){return new s(l,this._newName(l))}value(l,u){var p;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const h=this.toName(l),{prefix:v}=h,w=(p=u.key)!==null&&p!==void 0?p:u.ref;let y=this._values[v];if(y){const f=y.get(w);if(f)return f}else y=this._values[v]=new Map;y.set(w,h);const m=this._scope[v]||(this._scope[v]=[]),_=m.length;return m[_]=u.ref,h.setValue(u,{property:v,itemIndex:_}),h}getValue(l,u){const p=this._values[l];if(p)return p.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${l}${p.scopePath}`})}scopeCode(l=this._values,u,p){return this._reduceValues(l,h=>{if(h.value===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return h.value.code},u,p)}_reduceValues(l,u,p={},h){let v=t.nil;for(const w in l){const y=l[w];if(!y)continue;const m=p[w]=p[w]||new Map;y.forEach(_=>{if(m.has(_))return;m.set(_,n.Started);let f=u(_);if(f){const b=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${b} ${_} = ${f};${this.opts._n}`}else if(f=h?.(_))v=(0,t._)`${v}${f}${this.opts._n}`;else throw new r(_);m.set(_,n.Completed)})}return v}}e.ValueScope=i})(pa)),pa}var pl;function pe(){return pl||(pl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Vn(),r=fl();var n=Vn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var o=fl();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(x,N){return this}}class a extends s{constructor(x,N,L){super(),this.varKind=x,this.name=N,this.rhs=L}render({es5:x,_n:N}){const L=x?r.varKinds.var:this.varKind,q=this.rhs===void 0?"":` = ${this.rhs}`;return`${L} ${this.name}${q};`+N}optimizeNames(x,N){if(x[this.name.str])return this.rhs&&(this.rhs=Z(this.rhs,x,N)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends s{constructor(x,N,L){super(),this.lhs=x,this.rhs=N,this.sideEffects=L}render({_n:x}){return`${this.lhs} = ${this.rhs};`+x}optimizeNames(x,N){if(!(this.lhs instanceof t.Name&&!x[this.lhs.str]&&!this.sideEffects))return this.rhs=Z(this.rhs,x,N),this}get names(){const x=this.lhs instanceof t.Name?{}:{...this.lhs.names};return R(x,this.rhs)}}class c extends i{constructor(x,N,L,q){super(x,L,q),this.op=N}render({_n:x}){return`${this.lhs} ${this.op}= ${this.rhs};`+x}}class l extends s{constructor(x){super(),this.label=x,this.names={}}render({_n:x}){return`${this.label}:`+x}}class u extends s{constructor(x){super(),this.label=x,this.names={}}render({_n:x}){return`break${this.label?` ${this.label}`:""};`+x}}class p extends s{constructor(x){super(),this.error=x}render({_n:x}){return`throw ${this.error};`+x}get names(){return this.error.names}}class h extends s{constructor(x){super(),this.code=x}render({_n:x}){return`${this.code};`+x}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(x,N){return this.code=Z(this.code,x,N),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends s{constructor(x=[]){super(),this.nodes=x}render(x){return this.nodes.reduce((N,L)=>N+L.render(x),"")}optimizeNodes(){const{nodes:x}=this;let N=x.length;for(;N--;){const L=x[N].optimizeNodes();Array.isArray(L)?x.splice(N,1,...L):L?x[N]=L:x.splice(N,1)}return x.length>0?this:void 0}optimizeNames(x,N){const{nodes:L}=this;let q=L.length;for(;q--;){const Q=L[q];Q.optimizeNames(x,N)||(ne(x,Q.names),L.splice(q,1))}return L.length>0?this:void 0}get names(){return this.nodes.reduce((x,N)=>j(x,N.names),{})}}class w extends v{render(x){return"{"+x._n+super.render(x)+"}"+x._n}}class y extends v{}class m extends w{}m.kind="else";class _ extends w{constructor(x,N){super(N),this.condition=x}render(x){let N=`if(${this.condition})`+super.render(x);return this.else&&(N+="else "+this.else.render(x)),N}optimizeNodes(){super.optimizeNodes();const x=this.condition;if(x===!0)return this.nodes;let N=this.else;if(N){const L=N.optimizeNodes();N=this.else=Array.isArray(L)?new m(L):L}if(N)return x===!1?N instanceof _?N:N.nodes:this.nodes.length?this:new _(G(x),N instanceof _?[N]:N.nodes);if(!(x===!1||!this.nodes.length))return this}optimizeNames(x,N){var L;if(this.else=(L=this.else)===null||L===void 0?void 0:L.optimizeNames(x,N),!!(super.optimizeNames(x,N)||this.else))return this.condition=Z(this.condition,x,N),this}get names(){const x=super.names;return R(x,this.condition),this.else&&j(x,this.else.names),x}}_.kind="if";class f extends w{}f.kind="for";class b extends f{constructor(x){super(),this.iteration=x}render(x){return`for(${this.iteration})`+super.render(x)}optimizeNames(x,N){if(super.optimizeNames(x,N))return this.iteration=Z(this.iteration,x,N),this}get names(){return j(super.names,this.iteration.names)}}class $ extends f{constructor(x,N,L,q){super(),this.varKind=x,this.name=N,this.from=L,this.to=q}render(x){const N=x.es5?r.varKinds.var:this.varKind,{name:L,from:q,to:Q}=this;return`for(${N} ${L}=${q}; ${L}<${Q}; ${L}++)`+super.render(x)}get names(){const x=R(super.names,this.from);return R(x,this.to)}}class g extends f{constructor(x,N,L,q){super(),this.loop=x,this.varKind=N,this.name=L,this.iterable=q}render(x){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(x)}optimizeNames(x,N){if(super.optimizeNames(x,N))return this.iterable=Z(this.iterable,x,N),this}get names(){return j(super.names,this.iterable.names)}}class E extends w{constructor(x,N,L){super(),this.name=x,this.args=N,this.async=L}render(x){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(x)}}E.kind="func";class k extends v{render(x){return"return "+super.render(x)}}k.kind="return";class C extends w{render(x){let N="try"+super.render(x);return this.catch&&(N+=this.catch.render(x)),this.finally&&(N+=this.finally.render(x)),N}optimizeNodes(){var x,N;return super.optimizeNodes(),(x=this.catch)===null||x===void 0||x.optimizeNodes(),(N=this.finally)===null||N===void 0||N.optimizeNodes(),this}optimizeNames(x,N){var L,q;return super.optimizeNames(x,N),(L=this.catch)===null||L===void 0||L.optimizeNames(x,N),(q=this.finally)===null||q===void 0||q.optimizeNames(x,N),this}get names(){const x=super.names;return this.catch&&j(x,this.catch.names),this.finally&&j(x,this.finally.names),x}}class O extends w{constructor(x){super(),this.error=x}render(x){return`catch(${this.error})`+super.render(x)}}O.kind="catch";class V extends w{render(x){return"finally"+super.render(x)}}V.kind="finally";class z{constructor(x,N={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...N,_n:N.lines?`
21
+ `:""},this._extScope=x,this._scope=new r.Scope({parent:x}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(x){return this._scope.name(x)}scopeName(x){return this._extScope.name(x)}scopeValue(x,N){const L=this._extScope.value(x,N);return(this._values[L.prefix]||(this._values[L.prefix]=new Set)).add(L),L}getScopeValue(x,N){return this._extScope.getValue(x,N)}scopeRefs(x){return this._extScope.scopeRefs(x,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(x,N,L,q){const Q=this._scope.toName(N);return L!==void 0&&q&&(this._constants[Q.str]=L),this._leafNode(new a(x,Q,L)),Q}const(x,N,L){return this._def(r.varKinds.const,x,N,L)}let(x,N,L){return this._def(r.varKinds.let,x,N,L)}var(x,N,L){return this._def(r.varKinds.var,x,N,L)}assign(x,N,L){return this._leafNode(new i(x,N,L))}add(x,N){return this._leafNode(new c(x,e.operators.ADD,N))}code(x){return typeof x=="function"?x():x!==t.nil&&this._leafNode(new h(x)),this}object(...x){const N=["{"];for(const[L,q]of x)N.length>1&&N.push(","),N.push(L),(L!==q||this.opts.es5)&&(N.push(":"),(0,t.addCodeArg)(N,q));return N.push("}"),new t._Code(N)}if(x,N,L){if(this._blockNode(new _(x)),N&&L)this.code(N).else().code(L).endIf();else if(N)this.code(N).endIf();else if(L)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(x){return this._elseNode(new _(x))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(_,m)}_for(x,N){return this._blockNode(x),N&&this.code(N).endFor(),this}for(x,N){return this._for(new b(x),N)}forRange(x,N,L,q,Q=this.opts.es5?r.varKinds.var:r.varKinds.let){const ue=this._scope.toName(x);return this._for(new $(Q,ue,N,L),()=>q(ue))}forOf(x,N,L,q=r.varKinds.const){const Q=this._scope.toName(x);if(this.opts.es5){const ue=N instanceof t.Name?N:this.var("_arr",N);return this.forRange("_i",0,(0,t._)`${ue}.length`,se=>{this.var(Q,(0,t._)`${ue}[${se}]`),L(Q)})}return this._for(new g("of",q,Q,N),()=>L(Q))}forIn(x,N,L,q=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(x,(0,t._)`Object.keys(${N})`,L);const Q=this._scope.toName(x);return this._for(new g("in",q,Q,N),()=>L(Q))}endFor(){return this._endBlockNode(f)}label(x){return this._leafNode(new l(x))}break(x){return this._leafNode(new u(x))}return(x){const N=new k;if(this._blockNode(N),this.code(x),N.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(x,N,L){if(!N&&!L)throw new Error('CodeGen: "try" without "catch" and "finally"');const q=new C;if(this._blockNode(q),this.code(x),N){const Q=this.name("e");this._currNode=q.catch=new O(Q),N(Q)}return L&&(this._currNode=q.finally=new V,this.code(L)),this._endBlockNode(O,V)}throw(x){return this._leafNode(new p(x))}block(x,N){return this._blockStarts.push(this._nodes.length),x&&this.code(x).endBlock(N),this}endBlock(x){const N=this._blockStarts.pop();if(N===void 0)throw new Error("CodeGen: not in self-balancing block");const L=this._nodes.length-N;if(L<0||x!==void 0&&L!==x)throw new Error(`CodeGen: wrong number of nodes: ${L} vs ${x} expected`);return this._nodes.length=N,this}func(x,N=t.nil,L,q){return this._blockNode(new E(x,N,L)),q&&this.code(q).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(x=1){for(;x-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(x){return this._currNode.nodes.push(x),this}_blockNode(x){this._currNode.nodes.push(x),this._nodes.push(x)}_endBlockNode(x,N){const L=this._currNode;if(L instanceof x||N&&L instanceof N)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${N?`${x.kind}/${N.kind}`:x.kind}"`)}_elseNode(x){const N=this._currNode;if(!(N instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=N.else=x,this}get _root(){return this._nodes[0]}get _currNode(){const x=this._nodes;return x[x.length-1]}set _currNode(x){const N=this._nodes;N[N.length-1]=x}}e.CodeGen=z;function j(D,x){for(const N in x)D[N]=(D[N]||0)+(x[N]||0);return D}function R(D,x){return x instanceof t._CodeOrName?j(D,x.names):D}function Z(D,x,N){if(D instanceof t.Name)return L(D);if(!q(D))return D;return new t._Code(D._items.reduce((Q,ue)=>(ue instanceof t.Name&&(ue=L(ue)),ue instanceof t._Code?Q.push(...ue._items):Q.push(ue),Q),[]));function L(Q){const ue=N[Q.str];return ue===void 0||x[Q.str]!==1?Q:(delete x[Q.str],ue)}function q(Q){return Q instanceof t._Code&&Q._items.some(ue=>ue instanceof t.Name&&x[ue.str]===1&&N[ue.str]!==void 0)}}function ne(D,x){for(const N in x)D[N]=(D[N]||0)-(x[N]||0)}function G(D){return typeof D=="boolean"||typeof D=="number"||D===null?!D:(0,t._)`!${K(D)}`}e.not=G;const oe=I(e.operators.AND);function F(...D){return D.reduce(oe)}e.and=F;const fe=I(e.operators.OR);function H(...D){return D.reduce(fe)}e.or=H;function I(D){return(x,N)=>x===t.nil?N:N===t.nil?x:(0,t._)`${K(x)} ${D} ${K(N)}`}function K(D){return D instanceof t.Name?D:(0,t._)`(${D})`}})(da)),da}var _e={},hl;function Se(){if(hl)return _e;hl=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.checkStrictMode=_e.getErrorPath=_e.Type=_e.useFunc=_e.setEvaluated=_e.evaluatedPropsToName=_e.mergeEvaluated=_e.eachItem=_e.unescapeJsonPointer=_e.escapeJsonPointer=_e.escapeFragment=_e.unescapeFragment=_e.schemaRefOrVal=_e.schemaHasRulesButRef=_e.schemaHasRules=_e.checkUnknownRules=_e.alwaysValidSchema=_e.toHash=void 0;const e=pe(),t=Vn();function r(g){const E={};for(const k of g)E[k]=!0;return E}_e.toHash=r;function n(g,E){return typeof E=="boolean"?E:Object.keys(E).length===0?!0:(o(g,E),!s(E,g.self.RULES.all))}_e.alwaysValidSchema=n;function o(g,E=g.schema){const{opts:k,self:C}=g;if(!k.strictSchema||typeof E=="boolean")return;const O=C.RULES.keywords;for(const V in E)O[V]||$(g,`unknown keyword: "${V}"`)}_e.checkUnknownRules=o;function s(g,E){if(typeof g=="boolean")return!g;for(const k in g)if(E[k])return!0;return!1}_e.schemaHasRules=s;function a(g,E){if(typeof g=="boolean")return!g;for(const k in g)if(k!=="$ref"&&E.all[k])return!0;return!1}_e.schemaHasRulesButRef=a;function i({topSchemaRef:g,schemaPath:E},k,C,O){if(!O){if(typeof k=="number"||typeof k=="boolean")return k;if(typeof k=="string")return(0,e._)`${k}`}return(0,e._)`${g}${E}${(0,e.getProperty)(C)}`}_e.schemaRefOrVal=i;function c(g){return p(decodeURIComponent(g))}_e.unescapeFragment=c;function l(g){return encodeURIComponent(u(g))}_e.escapeFragment=l;function u(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}_e.escapeJsonPointer=u;function p(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}_e.unescapeJsonPointer=p;function h(g,E){if(Array.isArray(g))for(const k of g)E(k);else E(g)}_e.eachItem=h;function v({mergeNames:g,mergeToName:E,mergeValues:k,resultToName:C}){return(O,V,z,j)=>{const R=z===void 0?V:z instanceof e.Name?(V instanceof e.Name?g(O,V,z):E(O,V,z),z):V instanceof e.Name?(E(O,z,V),V):k(V,z);return j===e.Name&&!(R instanceof e.Name)?C(O,R):R}}_e.mergeEvaluated={props:v({mergeNames:(g,E,k)=>g.if((0,e._)`${k} !== true && ${E} !== undefined`,()=>{g.if((0,e._)`${E} === true`,()=>g.assign(k,!0),()=>g.assign(k,(0,e._)`${k} || {}`).code((0,e._)`Object.assign(${k}, ${E})`))}),mergeToName:(g,E,k)=>g.if((0,e._)`${k} !== true`,()=>{E===!0?g.assign(k,!0):(g.assign(k,(0,e._)`${k} || {}`),y(g,k,E))}),mergeValues:(g,E)=>g===!0?!0:{...g,...E},resultToName:w}),items:v({mergeNames:(g,E,k)=>g.if((0,e._)`${k} !== true && ${E} !== undefined`,()=>g.assign(k,(0,e._)`${E} === true ? true : ${k} > ${E} ? ${k} : ${E}`)),mergeToName:(g,E,k)=>g.if((0,e._)`${k} !== true`,()=>g.assign(k,E===!0?!0:(0,e._)`${k} > ${E} ? ${k} : ${E}`)),mergeValues:(g,E)=>g===!0?!0:Math.max(g,E),resultToName:(g,E)=>g.var("items",E)})};function w(g,E){if(E===!0)return g.var("props",!0);const k=g.var("props",(0,e._)`{}`);return E!==void 0&&y(g,k,E),k}_e.evaluatedPropsToName=w;function y(g,E,k){Object.keys(k).forEach(C=>g.assign((0,e._)`${E}${(0,e.getProperty)(C)}`,!0))}_e.setEvaluated=y;const m={};function _(g,E){return g.scopeValue("func",{ref:E,code:m[E.code]||(m[E.code]=new t._Code(E.code))})}_e.useFunc=_;var f;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(f||(_e.Type=f={}));function b(g,E,k){if(g instanceof e.Name){const C=E===f.Num;return k?C?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:C?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return k?(0,e.getProperty)(g).toString():"/"+u(g)}_e.getErrorPath=b;function $(g,E,k=g.opts.strictSchema){if(k){if(E=`strict mode: ${E}`,k===!0)throw new Error(E);g.self.logger.warn(E)}}return _e.checkStrictMode=$,_e}var Ln={},ml;function dt(){if(ml)return Ln;ml=1,Object.defineProperty(Ln,"__esModule",{value:!0});const e=pe(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Ln.default=t,Ln}var gl;function Rn(){return gl||(gl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=pe(),r=Se(),n=dt();e.keywordError={message:({keyword:m})=>(0,t.str)`must pass "${m}" keyword validation`},e.keyword$DataError={message:({keyword:m,schemaType:_})=>_?(0,t.str)`"${m}" keyword must be ${_} ($data)`:(0,t.str)`"${m}" keyword is invalid ($data)`};function o(m,_=e.keywordError,f,b){const{it:$}=m,{gen:g,compositeRule:E,allErrors:k}=$,C=p(m,_,f);b??(E||k)?c(g,C):l($,(0,t._)`[${C}]`)}e.reportError=o;function s(m,_=e.keywordError,f){const{it:b}=m,{gen:$,compositeRule:g,allErrors:E}=b,k=p(m,_,f);c($,k),g||E||l(b,n.default.vErrors)}e.reportExtraError=s;function a(m,_){m.assign(n.default.errors,_),m.if((0,t._)`${n.default.vErrors} !== null`,()=>m.if(_,()=>m.assign((0,t._)`${n.default.vErrors}.length`,_),()=>m.assign(n.default.vErrors,null)))}e.resetErrorsCount=a;function i({gen:m,keyword:_,schemaValue:f,data:b,errsCount:$,it:g}){if($===void 0)throw new Error("ajv implementation error");const E=m.name("err");m.forRange("i",$,n.default.errors,k=>{m.const(E,(0,t._)`${n.default.vErrors}[${k}]`),m.if((0,t._)`${E}.instancePath === undefined`,()=>m.assign((0,t._)`${E}.instancePath`,(0,t.strConcat)(n.default.instancePath,g.errorPath))),m.assign((0,t._)`${E}.schemaPath`,(0,t.str)`${g.errSchemaPath}/${_}`),g.opts.verbose&&(m.assign((0,t._)`${E}.schema`,f),m.assign((0,t._)`${E}.data`,b))})}e.extendErrors=i;function c(m,_){const f=m.const("err",_);m.if((0,t._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),m.code((0,t._)`${n.default.errors}++`)}function l(m,_){const{gen:f,validateName:b,schemaEnv:$}=m;$.$async?f.throw((0,t._)`new ${m.ValidationError}(${_})`):(f.assign((0,t._)`${b}.errors`,_),f.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(m,_,f){const{createErrors:b}=m.it;return b===!1?(0,t._)`{}`:h(m,_,f)}function h(m,_,f={}){const{gen:b,it:$}=m,g=[v($,f),w(m,f)];return y(m,_,g),b.object(...g)}function v({errorPath:m},{instancePath:_}){const f=_?(0,t.str)`${m}${(0,r.getErrorPath)(_,r.Type.Str)}`:m;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function w({keyword:m,it:{errSchemaPath:_}},{schemaPath:f,parentSchema:b}){let $=b?_:(0,t.str)`${_}/${m}`;return f&&($=(0,t.str)`${$}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,$]}function y(m,{params:_,message:f},b){const{keyword:$,data:g,schemaValue:E,it:k}=m,{opts:C,propertyName:O,topSchemaRef:V,schemaPath:z}=k;b.push([u.keyword,$],[u.params,typeof _=="function"?_(m):_||(0,t._)`{}`]),C.messages&&b.push([u.message,typeof f=="function"?f(m):f]),C.verbose&&b.push([u.schema,E],[u.parentSchema,(0,t._)`${V}${z}`],[n.default.data,g]),O&&b.push([u.propertyName,O])}})(ua)),ua}var vl;function m_(){if(vl)return nr;vl=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.boolOrEmptySchema=nr.topBoolOrEmptySchema=void 0;const e=Rn(),t=pe(),r=dt(),n={message:"boolean schema is false"};function o(i){const{gen:c,schema:l,validateName:u}=i;l===!1?a(i,!1):typeof l=="object"&&l.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}nr.topBoolOrEmptySchema=o;function s(i,c){const{gen:l,schema:u}=i;u===!1?(l.var(c,!1),a(i)):l.var(c,!0)}nr.boolOrEmptySchema=s;function a(i,c){const{gen:l,data:u}=i,p={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:i};(0,e.reportError)(p,n,void 0,c)}return nr}var Ue={},or={},yl;function bl(){if(yl)return or;yl=1,Object.defineProperty(or,"__esModule",{value:!0}),or.getRules=or.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(o){return typeof o=="string"&&t.has(o)}or.isJSONType=r;function n(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}return or.getRules=n,or}var Nt={},_l;function wl(){if(_l)return Nt;_l=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.shouldUseRule=Nt.shouldUseGroup=Nt.schemaHasRulesForType=void 0;function e({schema:n,self:o},s){const a=o.RULES.types[s];return a&&a!==!0&&t(n,a)}Nt.schemaHasRulesForType=e;function t(n,o){return o.rules.some(s=>r(n,s))}Nt.shouldUseGroup=t;function r(n,o){var s;return n[o.keyword]!==void 0||((s=o.definition.implements)===null||s===void 0?void 0:s.some(a=>n[a]!==void 0))}return Nt.shouldUseRule=r,Nt}var $l;function qn(){if($l)return Ue;$l=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.reportTypeError=Ue.checkDataTypes=Ue.checkDataType=Ue.coerceAndCheckDataType=Ue.getJSONTypes=Ue.getSchemaTypes=Ue.DataType=void 0;const e=bl(),t=wl(),r=Rn(),n=pe(),o=Se();var s;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(s||(Ue.DataType=s={}));function a(f){const b=i(f.type);if(b.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!b.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&b.push("null")}return b}Ue.getSchemaTypes=a;function i(f){const b=Array.isArray(f)?f:f?[f]:[];if(b.every(e.isJSONType))return b;throw new Error("type must be JSONType or JSONType[]: "+b.join(","))}Ue.getJSONTypes=i;function c(f,b){const{gen:$,data:g,opts:E}=f,k=u(b,E.coerceTypes),C=b.length>0&&!(k.length===0&&b.length===1&&(0,t.schemaHasRulesForType)(f,b[0]));if(C){const O=w(b,g,E.strictNumbers,s.Wrong);$.if(O,()=>{k.length?p(f,b,k):m(f)})}return C}Ue.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function u(f,b){return b?f.filter($=>l.has($)||b==="array"&&$==="array"):[]}function p(f,b,$){const{gen:g,data:E,opts:k}=f,C=g.let("dataType",(0,n._)`typeof ${E}`),O=g.let("coerced",(0,n._)`undefined`);k.coerceTypes==="array"&&g.if((0,n._)`${C} == 'object' && Array.isArray(${E}) && ${E}.length == 1`,()=>g.assign(E,(0,n._)`${E}[0]`).assign(C,(0,n._)`typeof ${E}`).if(w(b,E,k.strictNumbers),()=>g.assign(O,E))),g.if((0,n._)`${O} !== undefined`);for(const z of $)(l.has(z)||z==="array"&&k.coerceTypes==="array")&&V(z);g.else(),m(f),g.endIf(),g.if((0,n._)`${O} !== undefined`,()=>{g.assign(E,O),h(f,O)});function V(z){switch(z){case"string":g.elseIf((0,n._)`${C} == "number" || ${C} == "boolean"`).assign(O,(0,n._)`"" + ${E}`).elseIf((0,n._)`${E} === null`).assign(O,(0,n._)`""`);return;case"number":g.elseIf((0,n._)`${C} == "boolean" || ${E} === null
22
+ || (${C} == "string" && ${E} && ${E} == +${E})`).assign(O,(0,n._)`+${E}`);return;case"integer":g.elseIf((0,n._)`${C} === "boolean" || ${E} === null
23
+ || (${C} === "string" && ${E} && ${E} == +${E} && !(${E} % 1))`).assign(O,(0,n._)`+${E}`);return;case"boolean":g.elseIf((0,n._)`${E} === "false" || ${E} === 0 || ${E} === null`).assign(O,!1).elseIf((0,n._)`${E} === "true" || ${E} === 1`).assign(O,!0);return;case"null":g.elseIf((0,n._)`${E} === "" || ${E} === 0 || ${E} === false`),g.assign(O,null);return;case"array":g.elseIf((0,n._)`${C} === "string" || ${C} === "number"
24
+ || ${C} === "boolean" || ${E} === null`).assign(O,(0,n._)`[${E}]`)}}}function h({gen:f,parentData:b,parentDataProperty:$},g){f.if((0,n._)`${b} !== undefined`,()=>f.assign((0,n._)`${b}[${$}]`,g))}function v(f,b,$,g=s.Correct){const E=g===s.Correct?n.operators.EQ:n.operators.NEQ;let k;switch(f){case"null":return(0,n._)`${b} ${E} null`;case"array":k=(0,n._)`Array.isArray(${b})`;break;case"object":k=(0,n._)`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":k=C((0,n._)`!(${b} % 1) && !isNaN(${b})`);break;case"number":k=C();break;default:return(0,n._)`typeof ${b} ${E} ${f}`}return g===s.Correct?k:(0,n.not)(k);function C(O=n.nil){return(0,n.and)((0,n._)`typeof ${b} == "number"`,O,$?(0,n._)`isFinite(${b})`:n.nil)}}Ue.checkDataType=v;function w(f,b,$,g){if(f.length===1)return v(f[0],b,$,g);let E;const k=(0,o.toHash)(f);if(k.array&&k.object){const C=(0,n._)`typeof ${b} != "object"`;E=k.null?C:(0,n._)`!${b} || ${C}`,delete k.null,delete k.array,delete k.object}else E=n.nil;k.number&&delete k.integer;for(const C in k)E=(0,n.and)(E,v(C,b,$,g));return E}Ue.checkDataTypes=w;const y={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:b})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${b}}`};function m(f){const b=_(f);(0,r.reportError)(b,y)}Ue.reportTypeError=m;function _(f){const{gen:b,data:$,schema:g}=f,E=(0,o.schemaRefOrVal)(f,g,"type");return{gen:b,keyword:"type",data:$,schema:g.type,schemaCode:E,schemaValue:E,parentSchema:g,params:{},it:f}}return Ue}var Xr={},Sl;function g_(){if(Sl)return Xr;Sl=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.assignDefaults=void 0;const e=pe(),t=Se();function r(o,s){const{properties:a,items:i}=o.schema;if(s==="object"&&a)for(const c in a)n(o,c,a[c].default);else s==="array"&&Array.isArray(i)&&i.forEach((c,l)=>n(o,l,c.default))}Xr.assignDefaults=r;function n(o,s,a){const{gen:i,compositeRule:c,data:l,opts:u}=o;if(a===void 0)return;const p=(0,e._)`${l}${(0,e.getProperty)(s)}`;if(c){(0,t.checkStrictMode)(o,`default is ignored for: ${p}`);return}let h=(0,e._)`${p} === undefined`;u.useDefaults==="empty"&&(h=(0,e._)`${h} || ${p} === null || ${p} === ""`),i.if(h,(0,e._)`${p} = ${(0,e.stringify)(a)}`)}return Xr}var ft={},Te={},El;function pt(){if(El)return Te;El=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.validateUnion=Te.validateArray=Te.usePattern=Te.callValidateCode=Te.schemaProperties=Te.allSchemaProperties=Te.noPropertyInData=Te.propertyInData=Te.isOwnProperty=Te.hasPropFunc=Te.reportMissingProp=Te.checkMissingProp=Te.checkReportMissingProp=void 0;const e=pe(),t=Se(),r=dt(),n=Se();function o(f,b){const{gen:$,data:g,it:E}=f;$.if(u($,g,b,E.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${b}`},!0),f.error()})}Te.checkReportMissingProp=o;function s({gen:f,data:b,it:{opts:$}},g,E){return(0,e.or)(...g.map(k=>(0,e.and)(u(f,b,k,$.ownProperties),(0,e._)`${E} = ${k}`)))}Te.checkMissingProp=s;function a(f,b){f.setParams({missingProperty:b},!0),f.error()}Te.reportMissingProp=a;function i(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Te.hasPropFunc=i;function c(f,b,$){return(0,e._)`${i(f)}.call(${b}, ${$})`}Te.isOwnProperty=c;function l(f,b,$,g){const E=(0,e._)`${b}${(0,e.getProperty)($)} !== undefined`;return g?(0,e._)`${E} && ${c(f,b,$)}`:E}Te.propertyInData=l;function u(f,b,$,g){const E=(0,e._)`${b}${(0,e.getProperty)($)} === undefined`;return g?(0,e.or)(E,(0,e.not)(c(f,b,$))):E}Te.noPropertyInData=u;function p(f){return f?Object.keys(f).filter(b=>b!=="__proto__"):[]}Te.allSchemaProperties=p;function h(f,b){return p(b).filter($=>!(0,t.alwaysValidSchema)(f,b[$]))}Te.schemaProperties=h;function v({schemaCode:f,data:b,it:{gen:$,topSchemaRef:g,schemaPath:E,errorPath:k},it:C},O,V,z){const j=z?(0,e._)`${f}, ${b}, ${g}${E}`:b,R=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,k)],[r.default.parentData,C.parentData],[r.default.parentDataProperty,C.parentDataProperty],[r.default.rootData,r.default.rootData]];C.opts.dynamicRef&&R.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const Z=(0,e._)`${j}, ${$.object(...R)}`;return V!==e.nil?(0,e._)`${O}.call(${V}, ${Z})`:(0,e._)`${O}(${Z})`}Te.callValidateCode=v;const w=(0,e._)`new RegExp`;function y({gen:f,it:{opts:b}},$){const g=b.unicodeRegExp?"u":"",{regExp:E}=b.code,k=E($,g);return f.scopeValue("pattern",{key:k.toString(),ref:k,code:(0,e._)`${E.code==="new RegExp"?w:(0,n.useFunc)(f,E)}(${$}, ${g})`})}Te.usePattern=y;function m(f){const{gen:b,data:$,keyword:g,it:E}=f,k=b.name("valid");if(E.allErrors){const O=b.let("valid",!0);return C(()=>b.assign(O,!1)),O}return b.var(k,!0),C(()=>b.break()),k;function C(O){const V=b.const("len",(0,e._)`${$}.length`);b.forRange("i",0,V,z=>{f.subschema({keyword:g,dataProp:z,dataPropType:t.Type.Num},k),b.if((0,e.not)(k),O)})}}Te.validateArray=m;function _(f){const{gen:b,schema:$,keyword:g,it:E}=f;if(!Array.isArray($))throw new Error("ajv implementation error");if($.some(V=>(0,t.alwaysValidSchema)(E,V))&&!E.opts.unevaluated)return;const C=b.let("valid",!1),O=b.name("_valid");b.block(()=>$.forEach((V,z)=>{const j=f.subschema({keyword:g,schemaProp:z,compositeRule:!0},O);b.assign(C,(0,e._)`${C} || ${O}`),f.mergeValidEvaluated(j,O)||b.if((0,e.not)(C))})),f.result(C,()=>f.reset(),()=>f.error(!0))}return Te.validateUnion=_,Te}var kl;function v_(){if(kl)return ft;kl=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.validateKeywordUsage=ft.validSchemaType=ft.funcKeywordCode=ft.macroKeywordCode=void 0;const e=pe(),t=dt(),r=pt(),n=Rn();function o(h,v){const{gen:w,keyword:y,schema:m,parentSchema:_,it:f}=h,b=v.macro.call(f.self,m,_,f),$=l(w,y,b);f.opts.validateSchema!==!1&&f.self.validateSchema(b,!0);const g=w.name("valid");h.subschema({schema:b,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${y}`,topSchemaRef:$,compositeRule:!0},g),h.pass(g,()=>h.error(!0))}ft.macroKeywordCode=o;function s(h,v){var w;const{gen:y,keyword:m,schema:_,parentSchema:f,$data:b,it:$}=h;c($,v);const g=!b&&v.compile?v.compile.call($.self,_,f,$):v.validate,E=l(y,m,g),k=y.let("valid");h.block$data(k,C),h.ok((w=v.valid)!==null&&w!==void 0?w:k);function C(){if(v.errors===!1)z(),v.modifying&&a(h),j(()=>h.error());else{const R=v.async?O():V();v.modifying&&a(h),j(()=>i(h,R))}}function O(){const R=y.let("ruleErrs",null);return y.try(()=>z((0,e._)`await `),Z=>y.assign(k,!1).if((0,e._)`${Z} instanceof ${$.ValidationError}`,()=>y.assign(R,(0,e._)`${Z}.errors`),()=>y.throw(Z))),R}function V(){const R=(0,e._)`${E}.errors`;return y.assign(R,null),z(e.nil),R}function z(R=v.async?(0,e._)`await `:e.nil){const Z=$.opts.passContext?t.default.this:t.default.self,ne=!("compile"in v&&!b||v.schema===!1);y.assign(k,(0,e._)`${R}${(0,r.callValidateCode)(h,E,Z,ne)}`,v.modifying)}function j(R){var Z;y.if((0,e.not)((Z=v.valid)!==null&&Z!==void 0?Z:k),R)}}ft.funcKeywordCode=s;function a(h){const{gen:v,data:w,it:y}=h;v.if(y.parentData,()=>v.assign(w,(0,e._)`${y.parentData}[${y.parentDataProperty}]`))}function i(h,v){const{gen:w}=h;w.if((0,e._)`Array.isArray(${v})`,()=>{w.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(h)},()=>h.error())}function c({schemaEnv:h},v){if(v.async&&!h.$async)throw new Error("async keyword in sync schema")}function l(h,v,w){if(w===void 0)throw new Error(`keyword "${v}" failed to compile`);return h.scopeValue("keyword",typeof w=="function"?{ref:w}:{ref:w,code:(0,e.stringify)(w)})}function u(h,v,w=!1){return!v.length||v.some(y=>y==="array"?Array.isArray(h):y==="object"?h&&typeof h=="object"&&!Array.isArray(h):typeof h==y||w&&typeof h>"u")}ft.validSchemaType=u;function p({schema:h,opts:v,self:w,errSchemaPath:y},m,_){if(Array.isArray(m.keyword)?!m.keyword.includes(_):m.keyword!==_)throw new Error("ajv implementation error");const f=m.dependencies;if(f?.some(b=>!Object.prototype.hasOwnProperty.call(h,b)))throw new Error(`parent schema must have dependencies of ${_}: ${f.join(",")}`);if(m.validateSchema&&!m.validateSchema(h[_])){const $=`keyword "${_}" value is invalid at path "${y}": `+w.errorsText(m.validateSchema.errors);if(v.validateSchema==="log")w.logger.error($);else throw new Error($)}}return ft.validateKeywordUsage=p,ft}var At={},xl;function y_(){if(xl)return At;xl=1,Object.defineProperty(At,"__esModule",{value:!0}),At.extendSubschemaMode=At.extendSubschemaData=At.getSubschema=void 0;const e=pe(),t=Se();function r(s,{keyword:a,schemaProp:i,schema:c,schemaPath:l,errSchemaPath:u,topSchemaRef:p}){if(a!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const h=s.schema[a];return i===void 0?{schema:h,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${a}`}:{schema:h[i],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(i)}`,errSchemaPath:`${s.errSchemaPath}/${a}/${(0,t.escapeFragment)(i)}`}}if(c!==void 0){if(l===void 0||u===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:l,topSchemaRef:p,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}At.getSubschema=r;function n(s,a,{dataProp:i,dataPropType:c,data:l,dataTypes:u,propertyName:p}){if(l!==void 0&&i!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=a;if(i!==void 0){const{errorPath:w,dataPathArr:y,opts:m}=a,_=h.let("data",(0,e._)`${a.data}${(0,e.getProperty)(i)}`,!0);v(_),s.errorPath=(0,e.str)`${w}${(0,t.getErrorPath)(i,c,m.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${i}`,s.dataPathArr=[...y,s.parentDataProperty]}if(l!==void 0){const w=l instanceof e.Name?l:h.let("data",l,!0);v(w),p!==void 0&&(s.propertyName=p)}u&&(s.dataTypes=u);function v(w){s.data=w,s.dataLevel=a.dataLevel+1,s.dataTypes=[],a.definedProperties=new Set,s.parentData=a.data,s.dataNames=[...a.dataNames,w]}}At.extendSubschemaData=n;function o(s,{jtdDiscriminator:a,jtdMetadata:i,compositeRule:c,createErrors:l,allErrors:u}){c!==void 0&&(s.compositeRule=c),l!==void 0&&(s.createErrors=l),u!==void 0&&(s.allErrors=u),s.jtdDiscriminator=a,s.jtdMetadata=i}return At.extendSubschemaMode=o,At}var Ke={},ha,Cl;function Pl(){return Cl||(Cl=1,ha=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var a=s[o];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),ha}var ma={exports:{}},Nl;function b_(){if(Nl)return ma.exports;Nl=1;var e=ma.exports=function(n,o,s){typeof o=="function"&&(s=o,o={}),s=o.cb||s;var a=typeof s=="function"?s:s.pre||function(){},i=s.post||function(){};t(o,a,i,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,o,s,a,i,c,l,u,p,h){if(a&&typeof a=="object"&&!Array.isArray(a)){o(a,i,c,l,u,p,h);for(var v in a){var w=a[v];if(Array.isArray(w)){if(v in e.arrayKeywords)for(var y=0;y<w.length;y++)t(n,o,s,w[y],i+"/"+v+"/"+y,c,i,v,a,y)}else if(v in e.propsKeywords){if(w&&typeof w=="object")for(var m in w)t(n,o,s,w[m],i+"/"+v+"/"+r(m),c,i,v,a,m)}else(v in e.keywords||n.allKeys&&!(v in e.skipKeywords))&&t(n,o,s,w,i+"/"+v,c,i,v,a)}s(a,i,c,l,u,p,h)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return ma.exports}var Al;function Un(){if(Al)return Ke;Al=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.getSchemaRefs=Ke.resolveUrl=Ke.normalizeId=Ke._getFullPath=Ke.getFullPath=Ke.inlineRef=void 0;const e=Se(),t=Pl(),r=b_(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(y,m=!0){return typeof y=="boolean"?!0:m===!0?!a(y):m?i(y)<=m:!1}Ke.inlineRef=o;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(y){for(const m in y){if(s.has(m))return!0;const _=y[m];if(Array.isArray(_)&&_.some(a)||typeof _=="object"&&a(_))return!0}return!1}function i(y){let m=0;for(const _ in y){if(_==="$ref")return 1/0;if(m++,!n.has(_)&&(typeof y[_]=="object"&&(0,e.eachItem)(y[_],f=>m+=i(f)),m===1/0))return 1/0}return m}function c(y,m="",_){_!==!1&&(m=p(m));const f=y.parse(m);return l(y,f)}Ke.getFullPath=c;function l(y,m){return y.serialize(m).split("#")[0]+"#"}Ke._getFullPath=l;const u=/#\/?$/;function p(y){return y?y.replace(u,""):""}Ke.normalizeId=p;function h(y,m,_){return _=p(_),y.resolve(m,_)}Ke.resolveUrl=h;const v=/^[a-z_][-a-z0-9._]*$/i;function w(y,m){if(typeof y=="boolean")return{};const{schemaId:_,uriResolver:f}=this.opts,b=p(y[_]||m),$={"":b},g=c(f,b,!1),E={},k=new Set;return r(y,{allKeys:!0},(V,z,j,R)=>{if(R===void 0)return;const Z=g+z;let ne=$[R];typeof V[_]=="string"&&(ne=G.call(this,V[_])),oe.call(this,V.$anchor),oe.call(this,V.$dynamicAnchor),$[z]=ne;function G(F){const fe=this.opts.uriResolver.resolve;if(F=p(ne?fe(ne,F):F),k.has(F))throw O(F);k.add(F);let H=this.refs[F];return typeof H=="string"&&(H=this.refs[H]),typeof H=="object"?C(V,H.schema,F):F!==p(Z)&&(F[0]==="#"?(C(V,E[F],F),E[F]=V):this.refs[F]=Z),F}function oe(F){if(typeof F=="string"){if(!v.test(F))throw new Error(`invalid anchor "${F}"`);G.call(this,`#${F}`)}}}),E;function C(V,z,j){if(z!==void 0&&!t(V,z))throw O(j)}function O(V){return new Error(`reference "${V}" resolves to more than one schema`)}}return Ke.getSchemaRefs=w,Ke}var Tl;function Qr(){if(Tl)return Pt;Tl=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.getData=Pt.KeywordCxt=Pt.validateFunctionCode=void 0;const e=m_(),t=qn(),r=wl(),n=qn(),o=g_(),s=v_(),a=y_(),i=pe(),c=dt(),l=Un(),u=Se(),p=Rn();function h(A){if(g(A)&&(k(A),$(A))){m(A);return}v(A,()=>(0,e.topBoolOrEmptySchema)(A))}Pt.validateFunctionCode=h;function v({gen:A,validateName:T,schema:W,schemaEnv:Y,opts:ce},he){ce.code.es5?A.func(T,(0,i._)`${c.default.data}, ${c.default.valCxt}`,Y.$async,()=>{A.code((0,i._)`"use strict"; ${f(W,ce)}`),y(A,ce),A.code(he)}):A.func(T,(0,i._)`${c.default.data}, ${w(ce)}`,Y.$async,()=>A.code(f(W,ce)).code(he))}function w(A){return(0,i._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${A.dynamicRef?(0,i._)`, ${c.default.dynamicAnchors}={}`:i.nil}}={}`}function y(A,T){A.if(c.default.valCxt,()=>{A.var(c.default.instancePath,(0,i._)`${c.default.valCxt}.${c.default.instancePath}`),A.var(c.default.parentData,(0,i._)`${c.default.valCxt}.${c.default.parentData}`),A.var(c.default.parentDataProperty,(0,i._)`${c.default.valCxt}.${c.default.parentDataProperty}`),A.var(c.default.rootData,(0,i._)`${c.default.valCxt}.${c.default.rootData}`),T.dynamicRef&&A.var(c.default.dynamicAnchors,(0,i._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{A.var(c.default.instancePath,(0,i._)`""`),A.var(c.default.parentData,(0,i._)`undefined`),A.var(c.default.parentDataProperty,(0,i._)`undefined`),A.var(c.default.rootData,c.default.data),T.dynamicRef&&A.var(c.default.dynamicAnchors,(0,i._)`{}`)})}function m(A){const{schema:T,opts:W,gen:Y}=A;v(A,()=>{W.$comment&&T.$comment&&R(A),V(A),Y.let(c.default.vErrors,null),Y.let(c.default.errors,0),W.unevaluated&&_(A),C(A),Z(A)})}function _(A){const{gen:T,validateName:W}=A;A.evaluated=T.const("evaluated",(0,i._)`${W}.evaluated`),T.if((0,i._)`${A.evaluated}.dynamicProps`,()=>T.assign((0,i._)`${A.evaluated}.props`,(0,i._)`undefined`)),T.if((0,i._)`${A.evaluated}.dynamicItems`,()=>T.assign((0,i._)`${A.evaluated}.items`,(0,i._)`undefined`))}function f(A,T){const W=typeof A=="object"&&A[T.schemaId];return W&&(T.code.source||T.code.process)?(0,i._)`/*# sourceURL=${W} */`:i.nil}function b(A,T){if(g(A)&&(k(A),$(A))){E(A,T);return}(0,e.boolOrEmptySchema)(A,T)}function $({schema:A,self:T}){if(typeof A=="boolean")return!A;for(const W in A)if(T.RULES.all[W])return!0;return!1}function g(A){return typeof A.schema!="boolean"}function E(A,T){const{schema:W,gen:Y,opts:ce}=A;ce.$comment&&W.$comment&&R(A),z(A),j(A);const he=Y.const("_errs",c.default.errors);C(A,he),Y.var(T,(0,i._)`${he} === ${c.default.errors}`)}function k(A){(0,u.checkUnknownRules)(A),O(A)}function C(A,T){if(A.opts.jtd)return G(A,[],!1,T);const W=(0,t.getSchemaTypes)(A.schema),Y=(0,t.coerceAndCheckDataType)(A,W);G(A,W,!Y,T)}function O(A){const{schema:T,errSchemaPath:W,opts:Y,self:ce}=A;T.$ref&&Y.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(T,ce.RULES)&&ce.logger.warn(`$ref: keywords ignored in schema at path "${W}"`)}function V(A){const{schema:T,opts:W}=A;T.default!==void 0&&W.useDefaults&&W.strictSchema&&(0,u.checkStrictMode)(A,"default is ignored in the schema root")}function z(A){const T=A.schema[A.opts.schemaId];T&&(A.baseId=(0,l.resolveUrl)(A.opts.uriResolver,A.baseId,T))}function j(A){if(A.schema.$async&&!A.schemaEnv.$async)throw new Error("async schema in sync schema")}function R({gen:A,schemaEnv:T,schema:W,errSchemaPath:Y,opts:ce}){const he=W.$comment;if(ce.$comment===!0)A.code((0,i._)`${c.default.self}.logger.log(${he})`);else if(typeof ce.$comment=="function"){const Ve=(0,i.str)`${Y}/$comment`,it=A.scopeValue("root",{ref:T.root});A.code((0,i._)`${c.default.self}.opts.$comment(${he}, ${Ve}, ${it}.schema)`)}}function Z(A){const{gen:T,schemaEnv:W,validateName:Y,ValidationError:ce,opts:he}=A;W.$async?T.if((0,i._)`${c.default.errors} === 0`,()=>T.return(c.default.data),()=>T.throw((0,i._)`new ${ce}(${c.default.vErrors})`)):(T.assign((0,i._)`${Y}.errors`,c.default.vErrors),he.unevaluated&&ne(A),T.return((0,i._)`${c.default.errors} === 0`))}function ne({gen:A,evaluated:T,props:W,items:Y}){W instanceof i.Name&&A.assign((0,i._)`${T}.props`,W),Y instanceof i.Name&&A.assign((0,i._)`${T}.items`,Y)}function G(A,T,W,Y){const{gen:ce,schema:he,data:Ve,allErrors:it,opts:Ze,self:P}=A,{RULES:M}=P;if(he.$ref&&(Ze.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(he,M))){ce.block(()=>q(A,"$ref",M.all.$ref.definition));return}Ze.jtd||F(A,T),ce.block(()=>{for(const te of M.rules)U(te);U(M.post)});function U(te){(0,r.shouldUseGroup)(he,te)&&(te.type?(ce.if((0,n.checkDataType)(te.type,Ve,Ze.strictNumbers)),oe(A,te),T.length===1&&T[0]===te.type&&W&&(ce.else(),(0,n.reportTypeError)(A)),ce.endIf()):oe(A,te),it||ce.if((0,i._)`${c.default.errors} === ${Y||0}`))}}function oe(A,T){const{gen:W,schema:Y,opts:{useDefaults:ce}}=A;ce&&(0,o.assignDefaults)(A,T.type),W.block(()=>{for(const he of T.rules)(0,r.shouldUseRule)(Y,he)&&q(A,he.keyword,he.definition,T.type)})}function F(A,T){A.schemaEnv.meta||!A.opts.strictTypes||(fe(A,T),A.opts.allowUnionTypes||H(A,T),I(A,A.dataTypes))}function fe(A,T){if(T.length){if(!A.dataTypes.length){A.dataTypes=T;return}T.forEach(W=>{D(A.dataTypes,W)||N(A,`type "${W}" not allowed by context "${A.dataTypes.join(",")}"`)}),x(A,T)}}function H(A,T){T.length>1&&!(T.length===2&&T.includes("null"))&&N(A,"use allowUnionTypes to allow union type keyword")}function I(A,T){const W=A.self.RULES.all;for(const Y in W){const ce=W[Y];if(typeof ce=="object"&&(0,r.shouldUseRule)(A.schema,ce)){const{type:he}=ce.definition;he.length&&!he.some(Ve=>K(T,Ve))&&N(A,`missing type "${he.join(",")}" for keyword "${Y}"`)}}}function K(A,T){return A.includes(T)||T==="number"&&A.includes("integer")}function D(A,T){return A.includes(T)||T==="integer"&&A.includes("number")}function x(A,T){const W=[];for(const Y of A.dataTypes)D(T,Y)?W.push(Y):T.includes("integer")&&Y==="number"&&W.push("integer");A.dataTypes=W}function N(A,T){const W=A.schemaEnv.baseId+A.errSchemaPath;T+=` at "${W}" (strictTypes)`,(0,u.checkStrictMode)(A,T,A.opts.strictTypes)}class L{constructor(T,W,Y){if((0,s.validateKeywordUsage)(T,W,Y),this.gen=T.gen,this.allErrors=T.allErrors,this.keyword=Y,this.data=T.data,this.schema=T.schema[Y],this.$data=W.$data&&T.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(T,this.schema,Y,this.$data),this.schemaType=W.schemaType,this.parentSchema=T.schema,this.params={},this.it=T,this.def=W,this.$data)this.schemaCode=T.gen.const("vSchema",se(this.$data,T));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,W.schemaType,W.allowUndefined))throw new Error(`${Y} value must be ${JSON.stringify(W.schemaType)}`);("code"in W?W.trackErrors:W.errors!==!1)&&(this.errsCount=T.gen.const("_errs",c.default.errors))}result(T,W,Y){this.failResult((0,i.not)(T),W,Y)}failResult(T,W,Y){this.gen.if(T),Y?Y():this.error(),W?(this.gen.else(),W(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(T,W){this.failResult((0,i.not)(T),void 0,W)}fail(T){if(T===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(T),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(T){if(!this.$data)return this.fail(T);const{schemaCode:W}=this;this.fail((0,i._)`${W} !== undefined && (${(0,i.or)(this.invalid$data(),T)})`)}error(T,W,Y){if(W){this.setParams(W),this._error(T,Y),this.setParams({});return}this._error(T,Y)}_error(T,W){(T?p.reportExtraError:p.reportError)(this,this.def.error,W)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(T){this.allErrors||this.gen.if(T)}setParams(T,W){W?Object.assign(this.params,T):this.params=T}block$data(T,W,Y=i.nil){this.gen.block(()=>{this.check$data(T,Y),W()})}check$data(T=i.nil,W=i.nil){if(!this.$data)return;const{gen:Y,schemaCode:ce,schemaType:he,def:Ve}=this;Y.if((0,i.or)((0,i._)`${ce} === undefined`,W)),T!==i.nil&&Y.assign(T,!0),(he.length||Ve.validateSchema)&&(Y.elseIf(this.invalid$data()),this.$dataError(),T!==i.nil&&Y.assign(T,!1)),Y.else()}invalid$data(){const{gen:T,schemaCode:W,schemaType:Y,def:ce,it:he}=this;return(0,i.or)(Ve(),it());function Ve(){if(Y.length){if(!(W instanceof i.Name))throw new Error("ajv implementation error");const Ze=Array.isArray(Y)?Y:[Y];return(0,i._)`${(0,n.checkDataTypes)(Ze,W,he.opts.strictNumbers,n.DataType.Wrong)}`}return i.nil}function it(){if(ce.validateSchema){const Ze=T.scopeValue("validate$data",{ref:ce.validateSchema});return(0,i._)`!${Ze}(${W})`}return i.nil}}subschema(T,W){const Y=(0,a.getSubschema)(this.it,T);(0,a.extendSubschemaData)(Y,this.it,T),(0,a.extendSubschemaMode)(Y,T);const ce={...this.it,...Y,items:void 0,props:void 0};return b(ce,W),ce}mergeEvaluated(T,W){const{it:Y,gen:ce}=this;Y.opts.unevaluated&&(Y.props!==!0&&T.props!==void 0&&(Y.props=u.mergeEvaluated.props(ce,T.props,Y.props,W)),Y.items!==!0&&T.items!==void 0&&(Y.items=u.mergeEvaluated.items(ce,T.items,Y.items,W)))}mergeValidEvaluated(T,W){const{it:Y,gen:ce}=this;if(Y.opts.unevaluated&&(Y.props!==!0||Y.items!==!0))return ce.if(W,()=>this.mergeEvaluated(T,i.Name)),!0}}Pt.KeywordCxt=L;function q(A,T,W,Y){const ce=new L(A,W,T);"code"in W?W.code(ce,Y):ce.$data&&W.validate?(0,s.funcKeywordCode)(ce,W):"macro"in W?(0,s.macroKeywordCode)(ce,W):(W.compile||W.validate)&&(0,s.funcKeywordCode)(ce,W)}const Q=/^\/(?:[^~]|~0|~1)*$/,ue=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function se(A,{dataLevel:T,dataNames:W,dataPathArr:Y}){let ce,he;if(A==="")return c.default.rootData;if(A[0]==="/"){if(!Q.test(A))throw new Error(`Invalid JSON-pointer: ${A}`);ce=A,he=c.default.rootData}else{const P=ue.exec(A);if(!P)throw new Error(`Invalid JSON-pointer: ${A}`);const M=+P[1];if(ce=P[2],ce==="#"){if(M>=T)throw new Error(Ze("property/index",M));return Y[T-M]}if(M>T)throw new Error(Ze("data",M));if(he=W[T-M],!ce)return he}let Ve=he;const it=ce.split("/");for(const P of it)P&&(he=(0,i._)`${he}${(0,i.getProperty)((0,u.unescapeJsonPointer)(P))}`,Ve=(0,i._)`${Ve} && ${he}`);return Ve;function Ze(P,M){return`Cannot access ${P} ${M} levels up, current level is ${T}`}}return Pt.getData=se,Pt}var Zn={},Il;function Bn(){if(Il)return Zn;Il=1,Object.defineProperty(Zn,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Zn.default=e,Zn}var Wn={},Ol;function en(){if(Ol)return Wn;Ol=1,Object.defineProperty(Wn,"__esModule",{value:!0});const e=Un();class t extends Error{constructor(n,o,s,a){super(a||`can't resolve reference ${s} from id ${o}`),this.missingRef=(0,e.resolveUrl)(n,o,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return Wn.default=t,Wn}var rt={},Dl;function Hn(){if(Dl)return rt;Dl=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.resolveSchema=rt.getCompilingSchema=rt.resolveRef=rt.compileSchema=rt.SchemaEnv=void 0;const e=pe(),t=Bn(),r=dt(),n=Un(),o=Se(),s=Qr();class a{constructor(_){var f;this.refs={},this.dynamicAnchors={};let b;typeof _.schema=="object"&&(b=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(f=_.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(b?.[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=b?.$async,this.refs={}}}rt.SchemaEnv=a;function i(m){const _=u.call(this,m);if(_)return _;const f=(0,n.getFullPath)(this.opts.uriResolver,m.root.baseId),{es5:b,lines:$}=this.opts.code,{ownProperties:g}=this.opts,E=new e.CodeGen(this.scope,{es5:b,lines:$,ownProperties:g});let k;m.$async&&(k=E.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const C=E.scopeName("validate");m.validateName=C;const O={gen:E,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:E.scopeValue("schema",this.opts.code.source===!0?{ref:m.schema,code:(0,e.stringify)(m.schema)}:{ref:m.schema}),validateName:C,ValidationError:k,schema:m.schema,schemaEnv:m,rootId:f,baseId:m.baseId||f,schemaPath:e.nil,errSchemaPath:m.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let V;try{this._compilations.add(m),(0,s.validateFunctionCode)(O),E.optimize(this.opts.code.optimize);const z=E.toString();V=`${E.scopeRefs(r.default.scope)}return ${z}`,this.opts.code.process&&(V=this.opts.code.process(V,m));const R=new Function(`${r.default.self}`,`${r.default.scope}`,V)(this,this.scope.get());if(this.scope.value(C,{ref:R}),R.errors=null,R.schema=m.schema,R.schemaEnv=m,m.$async&&(R.$async=!0),this.opts.code.source===!0&&(R.source={validateName:C,validateCode:z,scopeValues:E._values}),this.opts.unevaluated){const{props:Z,items:ne}=O;R.evaluated={props:Z instanceof e.Name?void 0:Z,items:ne instanceof e.Name?void 0:ne,dynamicProps:Z instanceof e.Name,dynamicItems:ne instanceof e.Name},R.source&&(R.source.evaluated=(0,e.stringify)(R.evaluated))}return m.validate=R,m}catch(z){throw delete m.validate,delete m.validateName,V&&this.logger.error("Error compiling schema, function code:",V),z}finally{this._compilations.delete(m)}}rt.compileSchema=i;function c(m,_,f){var b;f=(0,n.resolveUrl)(this.opts.uriResolver,_,f);const $=m.refs[f];if($)return $;let g=h.call(this,m,f);if(g===void 0){const E=(b=m.localRefs)===null||b===void 0?void 0:b[f],{schemaId:k}=this.opts;E&&(g=new a({schema:E,schemaId:k,root:m,baseId:_}))}if(g!==void 0)return m.refs[f]=l.call(this,g)}rt.resolveRef=c;function l(m){return(0,n.inlineRef)(m.schema,this.opts.inlineRefs)?m.schema:m.validate?m:i.call(this,m)}function u(m){for(const _ of this._compilations)if(p(_,m))return _}rt.getCompilingSchema=u;function p(m,_){return m.schema===_.schema&&m.root===_.root&&m.baseId===_.baseId}function h(m,_){let f;for(;typeof(f=this.refs[_])=="string";)_=f;return f||this.schemas[_]||v.call(this,m,_)}function v(m,_){const f=this.opts.uriResolver.parse(_),b=(0,n._getFullPath)(this.opts.uriResolver,f);let $=(0,n.getFullPath)(this.opts.uriResolver,m.baseId,void 0);if(Object.keys(m.schema).length>0&&b===$)return y.call(this,f,m);const g=(0,n.normalizeId)(b),E=this.refs[g]||this.schemas[g];if(typeof E=="string"){const k=v.call(this,m,E);return typeof k?.schema!="object"?void 0:y.call(this,f,k)}if(typeof E?.schema=="object"){if(E.validate||i.call(this,E),g===(0,n.normalizeId)(_)){const{schema:k}=E,{schemaId:C}=this.opts,O=k[C];return O&&($=(0,n.resolveUrl)(this.opts.uriResolver,$,O)),new a({schema:k,schemaId:C,root:m,baseId:$})}return y.call(this,f,E)}}rt.resolveSchema=v;const w=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(m,{baseId:_,schema:f,root:b}){var $;if((($=m.fragment)===null||$===void 0?void 0:$[0])!=="/")return;for(const k of m.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const C=f[(0,o.unescapeFragment)(k)];if(C===void 0)return;f=C;const O=typeof f=="object"&&f[this.opts.schemaId];!w.has(k)&&O&&(_=(0,n.resolveUrl)(this.opts.uriResolver,_,O))}let g;if(typeof f!="boolean"&&f.$ref&&!(0,o.schemaHasRulesButRef)(f,this.RULES)){const k=(0,n.resolveUrl)(this.opts.uriResolver,_,f.$ref);g=v.call(this,b,k)}const{schemaId:E}=this.opts;if(g=g||new a({schema:f,schemaId:E,root:b,baseId:_}),g.schema!==g.root.schema)return g}return rt}const __={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Kn={},tn={exports:{}},ga,Ml;function zl(){if(Ml)return ga;Ml=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(h){let v="",w=0,y=0;for(y=0;y<h.length;y++)if(w=h[y].charCodeAt(0),w!==48){if(!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=h[y];break}for(y+=1;y<h.length;y++){if(w=h[y].charCodeAt(0),!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=h[y]}return v}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(h){return h.length=0,!0}function s(h,v,w){if(h.length){const y=r(h);if(y!=="")v.push(y);else return w.error=!0,!1;h.length=0}return!0}function a(h){let v=0;const w={error:!1,address:"",zone:""},y=[],m=[];let _=!1,f=!1,b=s;for(let $=0;$<h.length;$++){const g=h[$];if(!(g==="["||g==="]"))if(g===":"){if(_===!0&&(f=!0),!b(m,y,w))break;if(++v>7){w.error=!0;break}$>0&&h[$-1]===":"&&(_=!0),y.push(":");continue}else if(g==="%"){if(!b(m,y,w))break;b=o}else{m.push(g);continue}}return m.length&&(b===o?w.zone=m.join(""):f?y.push(m.join("")):y.push(r(m))),w.address=y.join(""),w}function i(h){if(c(h,":")<2)return{host:h,isIPV6:!1};const v=a(h);if(v.error)return{host:h,isIPV6:!1};{let w=v.address,y=v.address;return v.zone&&(w+="%"+v.zone,y+="%25"+v.zone),{host:w,isIPV6:!0,escapedHost:y}}}function c(h,v){let w=0;for(let y=0;y<h.length;y++)h[y]===v&&w++;return w}function l(h){let v=h;const w=[];let y=-1,m=0;for(;m=v.length;){if(m===1){if(v===".")break;if(v==="/"){w.push("/");break}else{w.push(v);break}}else if(m===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){w.push("/");break}}else if(m===3&&v==="/.."){w.length!==0&&w.pop(),w.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),w.length!==0&&w.pop();continue}}if((y=v.indexOf("/",1))===-1){w.push(v);break}else w.push(v.slice(0,y)),v=v.slice(y)}return w.join("")}function u(h,v){const w=v!==!0?escape:unescape;return h.scheme!==void 0&&(h.scheme=w(h.scheme)),h.userinfo!==void 0&&(h.userinfo=w(h.userinfo)),h.host!==void 0&&(h.host=w(h.host)),h.path!==void 0&&(h.path=w(h.path)),h.query!==void 0&&(h.query=w(h.query)),h.fragment!==void 0&&(h.fragment=w(h.fragment)),h}function p(h){const v=[];if(h.userinfo!==void 0&&(v.push(h.userinfo),v.push("@")),h.host!==void 0){let w=unescape(h.host);if(!t(w)){const y=i(w);y.isIPV6===!0?w=`[${y.escapedHost}]`:w=h.host}v.push(w)}return(typeof h.port=="number"||typeof h.port=="string")&&(v.push(":"),v.push(String(h.port))),v.length?v.join(""):void 0}return ga={nonSimpleDomain:n,recomposeAuthority:p,normalizeComponentEncoding:u,removeDotSegments:l,isIPv4:t,isUUID:e,normalizeIPv6:i,stringArrayToHexStripped:r},ga}var va,jl;function w_(){if(jl)return va;jl=1;const{isUUID:e}=zl(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(g){return r.indexOf(g)!==-1}function o(g){return g.secure===!0?!0:g.secure===!1?!1:g.scheme?g.scheme.length===3&&(g.scheme[0]==="w"||g.scheme[0]==="W")&&(g.scheme[1]==="s"||g.scheme[1]==="S")&&(g.scheme[2]==="s"||g.scheme[2]==="S"):!1}function s(g){return g.host||(g.error=g.error||"HTTP URIs must have a host."),g}function a(g){const E=String(g.scheme).toLowerCase()==="https";return(g.port===(E?443:80)||g.port==="")&&(g.port=void 0),g.path||(g.path="/"),g}function i(g){return g.secure=o(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g}function c(g){if((g.port===(o(g)?443:80)||g.port==="")&&(g.port=void 0),typeof g.secure=="boolean"&&(g.scheme=g.secure?"wss":"ws",g.secure=void 0),g.resourceName){const[E,k]=g.resourceName.split("?");g.path=E&&E!=="/"?E:void 0,g.query=k,g.resourceName=void 0}return g.fragment=void 0,g}function l(g,E){if(!g.path)return g.error="URN can not be parsed",g;const k=g.path.match(t);if(k){const C=E.scheme||g.scheme||"urn";g.nid=k[1].toLowerCase(),g.nss=k[2];const O=`${C}:${E.nid||g.nid}`,V=$(O);g.path=void 0,V&&(g=V.parse(g,E))}else g.error=g.error||"URN can not be parsed.";return g}function u(g,E){if(g.nid===void 0)throw new Error("URN without nid cannot be serialized");const k=E.scheme||g.scheme||"urn",C=g.nid.toLowerCase(),O=`${k}:${E.nid||C}`,V=$(O);V&&(g=V.serialize(g,E));const z=g,j=g.nss;return z.path=`${C||E.nid}:${j}`,E.skipEscape=!0,z}function p(g,E){const k=g;return k.uuid=k.nss,k.nss=void 0,!E.tolerant&&(!k.uuid||!e(k.uuid))&&(k.error=k.error||"UUID is not valid."),k}function h(g){const E=g;return E.nss=(g.uuid||"").toLowerCase(),E}const v={scheme:"http",domainHost:!0,parse:s,serialize:a},w={scheme:"https",domainHost:v.domainHost,parse:s,serialize:a},y={scheme:"ws",domainHost:!0,parse:i,serialize:c},m={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},b={http:v,https:w,ws:y,wss:m,urn:{scheme:"urn",parse:l,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:h,skipNormalize:!0}};Object.setPrototypeOf(b,null);function $(g){return g&&(b[g]||b[g.toLowerCase()])||void 0}return va={wsIsSecure:o,SCHEMES:b,isValidSchemeName:n,getSchemeHandler:$},va}var Fl;function $_(){if(Fl)return tn.exports;Fl=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:o,nonSimpleDomain:s}=zl(),{SCHEMES:a,getSchemeHandler:i}=w_();function c(m,_){return typeof m=="string"?m=h(w(m,_),_):typeof m=="object"&&(m=w(h(m,_),_)),m}function l(m,_,f){const b=f?Object.assign({scheme:"null"},f):{scheme:"null"},$=u(w(m,b),w(_,b),b,!0);return b.skipEscape=!0,h($,b)}function u(m,_,f,b){const $={};return b||(m=w(h(m,f),f),_=w(h(_,f),f)),f=f||{},!f.tolerant&&_.scheme?($.scheme=_.scheme,$.userinfo=_.userinfo,$.host=_.host,$.port=_.port,$.path=t(_.path||""),$.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?($.userinfo=_.userinfo,$.host=_.host,$.port=_.port,$.path=t(_.path||""),$.query=_.query):(_.path?(_.path[0]==="/"?$.path=t(_.path):((m.userinfo!==void 0||m.host!==void 0||m.port!==void 0)&&!m.path?$.path="/"+_.path:m.path?$.path=m.path.slice(0,m.path.lastIndexOf("/")+1)+_.path:$.path=_.path,$.path=t($.path)),$.query=_.query):($.path=m.path,_.query!==void 0?$.query=_.query:$.query=m.query),$.userinfo=m.userinfo,$.host=m.host,$.port=m.port),$.scheme=m.scheme),$.fragment=_.fragment,$}function p(m,_,f){return typeof m=="string"?(m=unescape(m),m=h(n(w(m,f),!0),{...f,skipEscape:!0})):typeof m=="object"&&(m=h(n(m,!0),{...f,skipEscape:!0})),typeof _=="string"?(_=unescape(_),_=h(n(w(_,f),!0),{...f,skipEscape:!0})):typeof _=="object"&&(_=h(n(_,!0),{...f,skipEscape:!0})),m.toLowerCase()===_.toLowerCase()}function h(m,_){const f={host:m.host,scheme:m.scheme,userinfo:m.userinfo,port:m.port,path:m.path,query:m.query,nid:m.nid,nss:m.nss,uuid:m.uuid,fragment:m.fragment,reference:m.reference,resourceName:m.resourceName,secure:m.secure,error:""},b=Object.assign({},_),$=[],g=i(b.scheme||f.scheme);g&&g.serialize&&g.serialize(f,b),f.path!==void 0&&(b.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),b.reference!=="suffix"&&f.scheme&&$.push(f.scheme,":");const E=r(f);if(E!==void 0&&(b.reference!=="suffix"&&$.push("//"),$.push(E),f.path&&f.path[0]!=="/"&&$.push("/")),f.path!==void 0){let k=f.path;!b.absolutePath&&(!g||!g.absolutePath)&&(k=t(k)),E===void 0&&k[0]==="/"&&k[1]==="/"&&(k="/%2F"+k.slice(2)),$.push(k)}return f.query!==void 0&&$.push("?",f.query),f.fragment!==void 0&&$.push("#",f.fragment),$.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function w(m,_){const f=Object.assign({},_),b={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let $=!1;f.reference==="suffix"&&(f.scheme?m=f.scheme+":"+m:m="//"+m);const g=m.match(v);if(g){if(b.scheme=g[1],b.userinfo=g[3],b.host=g[4],b.port=parseInt(g[5],10),b.path=g[6]||"",b.query=g[7],b.fragment=g[8],isNaN(b.port)&&(b.port=g[5]),b.host)if(o(b.host)===!1){const C=e(b.host);b.host=C.host.toLowerCase(),$=C.isIPV6}else $=!0;b.scheme===void 0&&b.userinfo===void 0&&b.host===void 0&&b.port===void 0&&b.query===void 0&&!b.path?b.reference="same-document":b.scheme===void 0?b.reference="relative":b.fragment===void 0?b.reference="absolute":b.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==b.reference&&(b.error=b.error||"URI is not a "+f.reference+" reference.");const E=i(f.scheme||b.scheme);if(!f.unicodeSupport&&(!E||!E.unicodeSupport)&&b.host&&(f.domainHost||E&&E.domainHost)&&$===!1&&s(b.host))try{b.host=URL.domainToASCII(b.host.toLowerCase())}catch(k){b.error=b.error||"Host's domain name can not be converted to ASCII: "+k}(!E||E&&!E.skipNormalize)&&(m.indexOf("%")!==-1&&(b.scheme!==void 0&&(b.scheme=unescape(b.scheme)),b.host!==void 0&&(b.host=unescape(b.host))),b.path&&(b.path=escape(unescape(b.path))),b.fragment&&(b.fragment=encodeURI(decodeURIComponent(b.fragment)))),E&&E.parse&&E.parse(b,f)}else b.error=b.error||"URI can not be parsed.";return b}const y={SCHEMES:a,normalize:c,resolve:l,resolveComponent:u,equal:p,serialize:h,parse:w};return tn.exports=y,tn.exports.default=y,tn.exports.fastUri=y,tn.exports}var Vl;function S_(){if(Vl)return Kn;Vl=1,Object.defineProperty(Kn,"__esModule",{value:!0});const e=$_();return e.code='require("ajv/dist/runtime/uri").default',Kn.default=e,Kn}var Ll;function Rl(){return Ll||(Ll=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Qr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=pe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Bn(),o=en(),s=bl(),a=Hn(),i=pe(),c=Un(),l=qn(),u=Se(),p=__,h=S_(),v=(H,I)=>new RegExp(H,I);v.code="new RegExp";const w=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function b(H){var I,K,D,x,N,L,q,Q,ue,se,A,T,W,Y,ce,he,Ve,it,Ze,P,M,U,te,re,X;const le=H.strict,xe=(I=H.code)===null||I===void 0?void 0:I.optimize,Ie=xe===!0||xe===void 0?1:xe||0,Ge=(D=(K=H.code)===null||K===void 0?void 0:K.regExp)!==null&&D!==void 0?D:v,Br=(x=H.uriResolver)!==null&&x!==void 0?x:h.default;return{strictSchema:(L=(N=H.strictSchema)!==null&&N!==void 0?N:le)!==null&&L!==void 0?L:!0,strictNumbers:(Q=(q=H.strictNumbers)!==null&&q!==void 0?q:le)!==null&&Q!==void 0?Q:!0,strictTypes:(se=(ue=H.strictTypes)!==null&&ue!==void 0?ue:le)!==null&&se!==void 0?se:"log",strictTuples:(T=(A=H.strictTuples)!==null&&A!==void 0?A:le)!==null&&T!==void 0?T:"log",strictRequired:(Y=(W=H.strictRequired)!==null&&W!==void 0?W:le)!==null&&Y!==void 0?Y:!1,code:H.code?{...H.code,optimize:Ie,regExp:Ge}:{optimize:Ie,regExp:Ge},loopRequired:(ce=H.loopRequired)!==null&&ce!==void 0?ce:f,loopEnum:(he=H.loopEnum)!==null&&he!==void 0?he:f,meta:(Ve=H.meta)!==null&&Ve!==void 0?Ve:!0,messages:(it=H.messages)!==null&&it!==void 0?it:!0,inlineRefs:(Ze=H.inlineRefs)!==null&&Ze!==void 0?Ze:!0,schemaId:(P=H.schemaId)!==null&&P!==void 0?P:"$id",addUsedSchema:(M=H.addUsedSchema)!==null&&M!==void 0?M:!0,validateSchema:(U=H.validateSchema)!==null&&U!==void 0?U:!0,validateFormats:(te=H.validateFormats)!==null&&te!==void 0?te:!0,unicodeRegExp:(re=H.unicodeRegExp)!==null&&re!==void 0?re:!0,int32range:(X=H.int32range)!==null&&X!==void 0?X:!0,uriResolver:Br}}class ${constructor(I={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,I=this.opts={...I,...b(I)};const{es5:K,lines:D}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:y,es5:K,lines:D}),this.logger=j(I.logger);const x=I.validateFormats;I.validateFormats=!1,this.RULES=(0,s.getRules)(),g.call(this,m,I,"NOT SUPPORTED"),g.call(this,_,I,"DEPRECATED","warn"),this._metaOpts=V.call(this),I.formats&&C.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&O.call(this,I.keywords),typeof I.meta=="object"&&this.addMetaSchema(I.meta),k.call(this),I.validateFormats=x}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:I,meta:K,schemaId:D}=this.opts;let x=p;D==="id"&&(x={...p},x.id=x.$id,delete x.$id),K&&I&&this.addMetaSchema(x,x[D],!1)}defaultMeta(){const{meta:I,schemaId:K}=this.opts;return this.opts.defaultMeta=typeof I=="object"?I[K]||I:void 0}validate(I,K){let D;if(typeof I=="string"){if(D=this.getSchema(I),!D)throw new Error(`no schema with key or ref "${I}"`)}else D=this.compile(I);const x=D(K);return"$async"in D||(this.errors=D.errors),x}compile(I,K){const D=this._addSchema(I,K);return D.validate||this._compileSchemaEnv(D)}compileAsync(I,K){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:D}=this.opts;return x.call(this,I,K);async function x(se,A){await N.call(this,se.$schema);const T=this._addSchema(se,A);return T.validate||L.call(this,T)}async function N(se){se&&!this.getSchema(se)&&await x.call(this,{$ref:se},!0)}async function L(se){try{return this._compileSchemaEnv(se)}catch(A){if(!(A instanceof o.default))throw A;return q.call(this,A),await Q.call(this,A.missingSchema),L.call(this,se)}}function q({missingSchema:se,missingRef:A}){if(this.refs[se])throw new Error(`AnySchema ${se} is loaded but ${A} cannot be resolved`)}async function Q(se){const A=await ue.call(this,se);this.refs[se]||await N.call(this,A.$schema),this.refs[se]||this.addSchema(A,se,K)}async function ue(se){const A=this._loading[se];if(A)return A;try{return await(this._loading[se]=D(se))}finally{delete this._loading[se]}}}addSchema(I,K,D,x=this.opts.validateSchema){if(Array.isArray(I)){for(const L of I)this.addSchema(L,void 0,D,x);return this}let N;if(typeof I=="object"){const{schemaId:L}=this.opts;if(N=I[L],N!==void 0&&typeof N!="string")throw new Error(`schema ${L} must be string`)}return K=(0,c.normalizeId)(K||N),this._checkUnique(K),this.schemas[K]=this._addSchema(I,D,K,x,!0),this}addMetaSchema(I,K,D=this.opts.validateSchema){return this.addSchema(I,K,!0,D),this}validateSchema(I,K){if(typeof I=="boolean")return!0;let D;if(D=I.$schema,D!==void 0&&typeof D!="string")throw new Error("$schema must be a string");if(D=D||this.opts.defaultMeta||this.defaultMeta(),!D)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const x=this.validate(D,I);if(!x&&K){const N="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(N);else throw new Error(N)}return x}getSchema(I){let K;for(;typeof(K=E.call(this,I))=="string";)I=K;if(K===void 0){const{schemaId:D}=this.opts,x=new a.SchemaEnv({schema:{},schemaId:D});if(K=a.resolveSchema.call(this,x,I),!K)return;this.refs[I]=K}return K.validate||this._compileSchemaEnv(K)}removeSchema(I){if(I instanceof RegExp)return this._removeAllSchemas(this.schemas,I),this._removeAllSchemas(this.refs,I),this;switch(typeof I){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const K=E.call(this,I);return typeof K=="object"&&this._cache.delete(K.schema),delete this.schemas[I],delete this.refs[I],this}case"object":{const K=I;this._cache.delete(K);let D=I[this.opts.schemaId];return D&&(D=(0,c.normalizeId)(D),delete this.schemas[D],delete this.refs[D]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(I){for(const K of I)this.addKeyword(K);return this}addKeyword(I,K){let D;if(typeof I=="string")D=I,typeof K=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),K.keyword=D);else if(typeof I=="object"&&K===void 0){if(K=I,D=K.keyword,Array.isArray(D)&&!D.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Z.call(this,D,K),!K)return(0,u.eachItem)(D,N=>ne.call(this,N)),this;oe.call(this,K);const x={...K,type:(0,l.getJSONTypes)(K.type),schemaType:(0,l.getJSONTypes)(K.schemaType)};return(0,u.eachItem)(D,x.type.length===0?N=>ne.call(this,N,x):N=>x.type.forEach(L=>ne.call(this,N,x,L))),this}getKeyword(I){const K=this.RULES.all[I];return typeof K=="object"?K.definition:!!K}removeKeyword(I){const{RULES:K}=this;delete K.keywords[I],delete K.all[I];for(const D of K.rules){const x=D.rules.findIndex(N=>N.keyword===I);x>=0&&D.rules.splice(x,1)}return this}addFormat(I,K){return typeof K=="string"&&(K=new RegExp(K)),this.formats[I]=K,this}errorsText(I=this.errors,{separator:K=", ",dataVar:D="data"}={}){return!I||I.length===0?"No errors":I.map(x=>`${D}${x.instancePath} ${x.message}`).reduce((x,N)=>x+K+N)}$dataMetaSchema(I,K){const D=this.RULES.all;I=JSON.parse(JSON.stringify(I));for(const x of K){const N=x.split("/").slice(1);let L=I;for(const q of N)L=L[q];for(const q in D){const Q=D[q];if(typeof Q!="object")continue;const{$data:ue}=Q.definition,se=L[q];ue&&se&&(L[q]=fe(se))}}return I}_removeAllSchemas(I,K){for(const D in I){const x=I[D];(!K||K.test(D))&&(typeof x=="string"?delete I[D]:x&&!x.meta&&(this._cache.delete(x.schema),delete I[D]))}}_addSchema(I,K,D,x=this.opts.validateSchema,N=this.opts.addUsedSchema){let L;const{schemaId:q}=this.opts;if(typeof I=="object")L=I[q];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof I!="boolean")throw new Error("schema must be object or boolean")}let Q=this._cache.get(I);if(Q!==void 0)return Q;D=(0,c.normalizeId)(L||D);const ue=c.getSchemaRefs.call(this,I,D);return Q=new a.SchemaEnv({schema:I,schemaId:q,meta:K,baseId:D,localRefs:ue}),this._cache.set(Q.schema,Q),N&&!D.startsWith("#")&&(D&&this._checkUnique(D),this.refs[D]=Q),x&&this.validateSchema(I,!0),Q}_checkUnique(I){if(this.schemas[I]||this.refs[I])throw new Error(`schema with key or id "${I}" already exists`)}_compileSchemaEnv(I){if(I.meta?this._compileMetaSchema(I):a.compileSchema.call(this,I),!I.validate)throw new Error("ajv implementation error");return I.validate}_compileMetaSchema(I){const K=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,I)}finally{this.opts=K}}}$.ValidationError=n.default,$.MissingRefError=o.default,e.default=$;function g(H,I,K,D="error"){for(const x in H){const N=x;N in I&&this.logger[D](`${K}: option ${x}. ${H[N]}`)}}function E(H){return H=(0,c.normalizeId)(H),this.schemas[H]||this.refs[H]}function k(){const H=this.opts.schemas;if(H)if(Array.isArray(H))this.addSchema(H);else for(const I in H)this.addSchema(H[I],I)}function C(){for(const H in this.opts.formats){const I=this.opts.formats[H];I&&this.addFormat(H,I)}}function O(H){if(Array.isArray(H)){this.addVocabulary(H);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const I in H){const K=H[I];K.keyword||(K.keyword=I),this.addKeyword(K)}}function V(){const H={...this.opts};for(const I of w)delete H[I];return H}const z={log(){},warn(){},error(){}};function j(H){if(H===!1)return z;if(H===void 0)return console;if(H.log&&H.warn&&H.error)return H;throw new Error("logger must implement log, warn and error methods")}const R=/^[a-z_$][a-z0-9_$:-]*$/i;function Z(H,I){const{RULES:K}=this;if((0,u.eachItem)(H,D=>{if(K.keywords[D])throw new Error(`Keyword ${D} is already defined`);if(!R.test(D))throw new Error(`Keyword ${D} has invalid name`)}),!!I&&I.$data&&!("code"in I||"validate"in I))throw new Error('$data keyword must have "code" or "validate" function')}function ne(H,I,K){var D;const x=I?.post;if(K&&x)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:N}=this;let L=x?N.post:N.rules.find(({type:Q})=>Q===K);if(L||(L={type:K,rules:[]},N.rules.push(L)),N.keywords[H]=!0,!I)return;const q={keyword:H,definition:{...I,type:(0,l.getJSONTypes)(I.type),schemaType:(0,l.getJSONTypes)(I.schemaType)}};I.before?G.call(this,L,q,I.before):L.rules.push(q),N.all[H]=q,(D=I.implements)===null||D===void 0||D.forEach(Q=>this.addKeyword(Q))}function G(H,I,K){const D=H.rules.findIndex(x=>x.keyword===K);D>=0?H.rules.splice(D,0,I):(H.rules.push(I),this.logger.warn(`rule ${K} is not defined`))}function oe(H){let{metaSchema:I}=H;I!==void 0&&(H.$data&&this.opts.$data&&(I=fe(I)),H.validateSchema=this.compile(I,!0))}const F={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function fe(H){return{anyOf:[H,F]}}})(la)),la}var Gn={},Jn={},Yn={},ql;function E_(){if(ql)return Yn;ql=1,Object.defineProperty(Yn,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Yn.default=e,Yn}var Rt={},Ul;function ya(){if(Ul)return Rt;Ul=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.callRef=Rt.getValidate=void 0;const e=en(),t=pt(),r=pe(),n=dt(),o=Hn(),s=Se(),a={keyword:"$ref",schemaType:"string",code(l){const{gen:u,schema:p,it:h}=l,{baseId:v,schemaEnv:w,validateName:y,opts:m,self:_}=h,{root:f}=w;if((p==="#"||p==="#/")&&v===f.baseId)return $();const b=o.resolveRef.call(_,f,v,p);if(b===void 0)throw new e.default(h.opts.uriResolver,v,p);if(b instanceof o.SchemaEnv)return g(b);return E(b);function $(){if(w===f)return c(l,y,w,w.$async);const k=u.scopeValue("root",{ref:f});return c(l,(0,r._)`${k}.validate`,f,f.$async)}function g(k){const C=i(l,k);c(l,C,k,k.$async)}function E(k){const C=u.scopeValue("schema",m.code.source===!0?{ref:k,code:(0,r.stringify)(k)}:{ref:k}),O=u.name("valid"),V=l.subschema({schema:k,dataTypes:[],schemaPath:r.nil,topSchemaRef:C,errSchemaPath:p},O);l.mergeEvaluated(V),l.ok(O)}}};function i(l,u){const{gen:p}=l;return u.validate?p.scopeValue("validate",{ref:u.validate}):(0,r._)`${p.scopeValue("wrapper",{ref:u})}.validate`}Rt.getValidate=i;function c(l,u,p,h){const{gen:v,it:w}=l,{allErrors:y,schemaEnv:m,opts:_}=w,f=_.passContext?n.default.this:r.nil;h?b():$();function b(){if(!m.$async)throw new Error("async schema referenced by sync schema");const k=v.let("valid");v.try(()=>{v.code((0,r._)`await ${(0,t.callValidateCode)(l,u,f)}`),E(u),y||v.assign(k,!0)},C=>{v.if((0,r._)`!(${C} instanceof ${w.ValidationError})`,()=>v.throw(C)),g(C),y||v.assign(k,!1)}),l.ok(k)}function $(){l.result((0,t.callValidateCode)(l,u,f),()=>E(u),()=>g(u))}function g(k){const C=(0,r._)`${k}.errors`;v.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${C} : ${n.default.vErrors}.concat(${C})`),v.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function E(k){var C;if(!w.opts.unevaluated)return;const O=(C=p?.validate)===null||C===void 0?void 0:C.evaluated;if(w.props!==!0)if(O&&!O.dynamicProps)O.props!==void 0&&(w.props=s.mergeEvaluated.props(v,O.props,w.props));else{const V=v.var("props",(0,r._)`${k}.evaluated.props`);w.props=s.mergeEvaluated.props(v,V,w.props,r.Name)}if(w.items!==!0)if(O&&!O.dynamicItems)O.items!==void 0&&(w.items=s.mergeEvaluated.items(v,O.items,w.items));else{const V=v.var("items",(0,r._)`${k}.evaluated.items`);w.items=s.mergeEvaluated.items(v,V,w.items,r.Name)}}}return Rt.callRef=c,Rt.default=a,Rt}var Zl;function Bl(){if(Zl)return Jn;Zl=1,Object.defineProperty(Jn,"__esModule",{value:!0});const e=E_(),t=ya(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Jn.default=r,Jn}var Xn={},Qn={},Wl;function k_(){if(Wl)return Qn;Wl=1,Object.defineProperty(Qn,"__esModule",{value:!0});const e=pe(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:s,schemaCode:a})=>(0,e.str)`must be ${r[s].okStr} ${a}`,params:({keyword:s,schemaCode:a})=>(0,e._)`{comparison: ${r[s].okStr}, limit: ${a}}`},o={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(s){const{keyword:a,data:i,schemaCode:c}=s;s.fail$data((0,e._)`${i} ${r[a].fail} ${c} || isNaN(${i})`)}};return Qn.default=o,Qn}var eo={},Hl;function x_(){if(Hl)return eo;Hl=1,Object.defineProperty(eo,"__esModule",{value:!0});const e=pe(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:o,data:s,schemaCode:a,it:i}=n,c=i.opts.multipleOfPrecision,l=o.let("res"),u=c?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:(0,e._)`${l} !== parseInt(${l})`;n.fail$data((0,e._)`(${a} === 0 || (${l} = ${s}/${a}, ${u}))`)}};return eo.default=r,eo}var to={},ro={},Kl;function C_(){if(Kl)return ro;Kl=1,Object.defineProperty(ro,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,o=0,s;for(;o<r;)n++,s=t.charCodeAt(o++),s>=55296&&s<=56319&&o<r&&(s=t.charCodeAt(o),(s&64512)===56320&&o++);return n}return ro.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',ro}var Gl;function P_(){if(Gl)return to;Gl=1,Object.defineProperty(to,"__esModule",{value:!0});const e=pe(),t=Se(),r=C_(),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:a}){const i=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:a,data:i,schemaCode:c,it:l}=s,u=a==="maxLength"?e.operators.GT:e.operators.LT,p=l.opts.unicode===!1?(0,e._)`${i}.length`:(0,e._)`${(0,t.useFunc)(s.gen,r.default)}(${i})`;s.fail$data((0,e._)`${p} ${u} ${c}`)}};return to.default=o,to}var no={},Jl;function N_(){if(Jl)return no;Jl=1,Object.defineProperty(no,"__esModule",{value:!0});const e=pt(),t=pe(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,t.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,t._)`{pattern: ${o}}`},code(o){const{data:s,$data:a,schema:i,schemaCode:c,it:l}=o,u=l.opts.unicodeRegExp?"u":"",p=a?(0,t._)`(new RegExp(${c}, ${u}))`:(0,e.usePattern)(o,i);o.fail$data((0,t._)`!${p}.test(${s})`)}};return no.default=n,no}var oo={},Yl;function A_(){if(Yl)return oo;Yl=1,Object.defineProperty(oo,"__esModule",{value:!0});const e=pe(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:o}){const s=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:o,data:s,schemaCode:a}=n,i=o==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${s}).length ${i} ${a}`)}};return oo.default=r,oo}var so={},Xl;function T_(){if(Xl)return so;Xl=1,Object.defineProperty(so,"__esModule",{value:!0});const e=pt(),t=pe(),r=Se(),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:a,schema:i,schemaCode:c,data:l,$data:u,it:p}=s,{opts:h}=p;if(!u&&i.length===0)return;const v=i.length>=h.loopRequired;if(p.allErrors?w():y(),h.strictRequired){const f=s.parentSchema.properties,{definedProperties:b}=s.it;for(const $ of i)if(f?.[$]===void 0&&!b.has($)){const g=p.schemaEnv.baseId+p.errSchemaPath,E=`required property "${$}" is not defined at "${g}" (strictRequired)`;(0,r.checkStrictMode)(p,E,p.opts.strictRequired)}}function w(){if(v||u)s.block$data(t.nil,m);else for(const f of i)(0,e.checkReportMissingProp)(s,f)}function y(){const f=a.let("missing");if(v||u){const b=a.let("valid",!0);s.block$data(b,()=>_(f,b)),s.ok(b)}else a.if((0,e.checkMissingProp)(s,i,f)),(0,e.reportMissingProp)(s,f),a.else()}function m(){a.forOf("prop",c,f=>{s.setParams({missingProperty:f}),a.if((0,e.noPropertyInData)(a,l,f,h.ownProperties),()=>s.error())})}function _(f,b){s.setParams({missingProperty:f}),a.forOf(f,c,()=>{a.assign(b,(0,e.propertyInData)(a,l,f,h.ownProperties)),a.if((0,t.not)(b),()=>{s.error(),a.break()})},t.nil)}}};return so.default=o,so}var ao={},Ql;function I_(){if(Ql)return ao;Ql=1,Object.defineProperty(ao,"__esModule",{value:!0});const e=pe(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:o}){const s=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:o,data:s,schemaCode:a}=n,i=o==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${s}.length ${i} ${a}`)}};return ao.default=r,ao}var io={},co={},eu;function ba(){if(eu)return co;eu=1,Object.defineProperty(co,"__esModule",{value:!0});const e=Pl();return e.code='require("ajv/dist/runtime/equal").default',co.default=e,co}var tu;function O_(){if(tu)return io;tu=1,Object.defineProperty(io,"__esModule",{value:!0});const e=qn(),t=pe(),r=Se(),n=ba(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:i}})=>(0,t.str)`must NOT have duplicate items (items ## ${i} and ${a} are identical)`,params:({params:{i:a,j:i}})=>(0,t._)`{i: ${a}, j: ${i}}`},code(a){const{gen:i,data:c,$data:l,schema:u,parentSchema:p,schemaCode:h,it:v}=a;if(!l&&!u)return;const w=i.let("valid"),y=p.items?(0,e.getSchemaTypes)(p.items):[];a.block$data(w,m,(0,t._)`${h} === false`),a.ok(w);function m(){const $=i.let("i",(0,t._)`${c}.length`),g=i.let("j");a.setParams({i:$,j:g}),i.assign(w,!0),i.if((0,t._)`${$} > 1`,()=>(_()?f:b)($,g))}function _(){return y.length>0&&!y.some($=>$==="object"||$==="array")}function f($,g){const E=i.name("item"),k=(0,e.checkDataTypes)(y,E,v.opts.strictNumbers,e.DataType.Wrong),C=i.const("indices",(0,t._)`{}`);i.for((0,t._)`;${$}--;`,()=>{i.let(E,(0,t._)`${c}[${$}]`),i.if(k,(0,t._)`continue`),y.length>1&&i.if((0,t._)`typeof ${E} == "string"`,(0,t._)`${E} += "_"`),i.if((0,t._)`typeof ${C}[${E}] == "number"`,()=>{i.assign(g,(0,t._)`${C}[${E}]`),a.error(),i.assign(w,!1).break()}).code((0,t._)`${C}[${E}] = ${$}`)})}function b($,g){const E=(0,r.useFunc)(i,n.default),k=i.name("outer");i.label(k).for((0,t._)`;${$}--;`,()=>i.for((0,t._)`${g} = ${$}; ${g}--;`,()=>i.if((0,t._)`${E}(${c}[${$}], ${c}[${g}])`,()=>{a.error(),i.assign(w,!1).break(k)})))}}};return io.default=s,io}var lo={},ru;function D_(){if(ru)return lo;ru=1,Object.defineProperty(lo,"__esModule",{value:!0});const e=pe(),t=Se(),r=ba(),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:a,data:i,$data:c,schemaCode:l,schema:u}=s;c||u&&typeof u=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(a,r.default)}(${i}, ${l})`):s.fail((0,e._)`${u} !== ${i}`)}};return lo.default=o,lo}var uo={},nu;function M_(){if(nu)return uo;nu=1,Object.defineProperty(uo,"__esModule",{value:!0});const e=pe(),t=Se(),r=ba(),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:a,data:i,$data:c,schema:l,schemaCode:u,it:p}=s;if(!c&&l.length===0)throw new Error("enum must have non-empty array");const h=l.length>=p.opts.loopEnum;let v;const w=()=>v??(v=(0,t.useFunc)(a,r.default));let y;if(h||c)y=a.let("valid"),s.block$data(y,m);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const f=a.const("vSchema",u);y=(0,e.or)(...l.map((b,$)=>_(f,$)))}s.pass(y);function m(){a.assign(y,!1),a.forOf("v",u,f=>a.if((0,e._)`${w()}(${i}, ${f})`,()=>a.assign(y,!0).break()))}function _(f,b){const $=l[b];return typeof $=="object"&&$!==null?(0,e._)`${w()}(${i}, ${f}[${b}])`:(0,e._)`${i} === ${$}`}}};return uo.default=o,uo}var ou;function su(){if(ou)return Xn;ou=1,Object.defineProperty(Xn,"__esModule",{value:!0});const e=k_(),t=x_(),r=P_(),n=N_(),o=A_(),s=T_(),a=I_(),i=O_(),c=D_(),l=M_(),u=[e.default,t.default,r.default,n.default,o.default,s.default,a.default,i.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default];return Xn.default=u,Xn}var fo={},kr={},au;function iu(){if(au)return kr;au=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.validateAdditionalItems=void 0;const e=pe(),t=Se(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:a,it:i}=s,{items:c}=a;if(!Array.isArray(c)){(0,t.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(s,c)}};function o(s,a){const{gen:i,schema:c,data:l,keyword:u,it:p}=s;p.items=!0;const h=i.const("len",(0,e._)`${l}.length`);if(c===!1)s.setParams({len:a.length}),s.pass((0,e._)`${h} <= ${a.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(p,c)){const w=i.var("valid",(0,e._)`${h} <= ${a.length}`);i.if((0,e.not)(w),()=>v(w)),s.ok(w)}function v(w){i.forRange("i",a.length,h,y=>{s.subschema({keyword:u,dataProp:y,dataPropType:t.Type.Num},w),p.allErrors||i.if((0,e.not)(w),()=>i.break())})}}return kr.validateAdditionalItems=o,kr.default=n,kr}var po={},xr={},cu;function lu(){if(cu)return xr;cu=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.validateTuple=void 0;const e=pe(),t=Se(),r=pt(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:a,it:i}=s;if(Array.isArray(a))return o(s,"additionalItems",a);i.items=!0,!(0,t.alwaysValidSchema)(i,a)&&s.ok((0,r.validateArray)(s))}};function o(s,a,i=s.schema){const{gen:c,parentSchema:l,data:u,keyword:p,it:h}=s;y(l),h.opts.unevaluated&&i.length&&h.items!==!0&&(h.items=t.mergeEvaluated.items(c,i.length,h.items));const v=c.name("valid"),w=c.const("len",(0,e._)`${u}.length`);i.forEach((m,_)=>{(0,t.alwaysValidSchema)(h,m)||(c.if((0,e._)`${w} > ${_}`,()=>s.subschema({keyword:p,schemaProp:_,dataProp:_},v)),s.ok(v))});function y(m){const{opts:_,errSchemaPath:f}=h,b=i.length,$=b===m.minItems&&(b===m.maxItems||m[a]===!1);if(_.strictTuples&&!$){const g=`"${p}" is ${b}-tuple, but minItems or maxItems/${a} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(h,g,_.strictTuples)}}}return xr.validateTuple=o,xr.default=n,xr}var uu;function z_(){if(uu)return po;uu=1,Object.defineProperty(po,"__esModule",{value:!0});const e=lu(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return po.default=t,po}var ho={},du;function j_(){if(du)return ho;du=1,Object.defineProperty(ho,"__esModule",{value:!0});const e=pe(),t=Se(),r=pt(),n=iu(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{schema:i,parentSchema:c,it:l}=a,{prefixItems:u}=c;l.items=!0,!(0,t.alwaysValidSchema)(l,i)&&(u?(0,n.validateAdditionalItems)(a,u):a.ok((0,r.validateArray)(a)))}};return ho.default=s,ho}var mo={},fu;function F_(){if(fu)return mo;fu=1,Object.defineProperty(mo,"__esModule",{value:!0});const e=pe(),t=Se(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:o,max:s}})=>s===void 0?(0,e.str)`must contain at least ${o} valid item(s)`:(0,e.str)`must contain at least ${o} and no more than ${s} valid item(s)`,params:({params:{min:o,max:s}})=>s===void 0?(0,e._)`{minContains: ${o}}`:(0,e._)`{minContains: ${o}, maxContains: ${s}}`},code(o){const{gen:s,schema:a,parentSchema:i,data:c,it:l}=o;let u,p;const{minContains:h,maxContains:v}=i;l.opts.next?(u=h===void 0?1:h,p=v):u=1;const w=s.const("len",(0,e._)`${c}.length`);if(o.setParams({min:u,max:p}),p===void 0&&u===0){(0,t.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&u>p){(0,t.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,t.alwaysValidSchema)(l,a)){let b=(0,e._)`${w} >= ${u}`;p!==void 0&&(b=(0,e._)`${b} && ${w} <= ${p}`),o.pass(b);return}l.items=!0;const y=s.name("valid");p===void 0&&u===1?_(y,()=>s.if(y,()=>s.break())):u===0?(s.let(y,!0),p!==void 0&&s.if((0,e._)`${c}.length > 0`,m)):(s.let(y,!1),m()),o.result(y,()=>o.reset());function m(){const b=s.name("_valid"),$=s.let("count",0);_(b,()=>s.if(b,()=>f($)))}function _(b,$){s.forRange("i",0,w,g=>{o.subschema({keyword:"contains",dataProp:g,dataPropType:t.Type.Num,compositeRule:!0},b),$()})}function f(b){s.code((0,e._)`${b}++`),p===void 0?s.if((0,e._)`${b} >= ${u}`,()=>s.assign(y,!0).break()):(s.if((0,e._)`${b} > ${p}`,()=>s.assign(y,!1).break()),u===1?s.assign(y,!0):s.if((0,e._)`${b} >= ${u}`,()=>s.assign(y,!0)))}}};return mo.default=n,mo}var _a={},pu;function wa(){return pu||(pu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=pe(),r=Se(),n=pt();e.error={message:({params:{property:c,depsCount:l,deps:u}})=>{const p=l===1?"property":"properties";return(0,t.str)`must have ${p} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:u,missingProperty:p}})=>(0,t._)`{property: ${c},
25
+ missingProperty: ${p},
26
+ depsCount: ${l},
27
+ deps: ${u}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[l,u]=s(c);a(c,l),i(c,u)}};function s({schema:c}){const l={},u={};for(const p in c){if(p==="__proto__")continue;const h=Array.isArray(c[p])?l:u;h[p]=c[p]}return[l,u]}function a(c,l=c.schema){const{gen:u,data:p,it:h}=c;if(Object.keys(l).length===0)return;const v=u.let("missing");for(const w in l){const y=l[w];if(y.length===0)continue;const m=(0,n.propertyInData)(u,p,w,h.opts.ownProperties);c.setParams({property:w,depsCount:y.length,deps:y.join(", ")}),h.allErrors?u.if(m,()=>{for(const _ of y)(0,n.checkReportMissingProp)(c,_)}):(u.if((0,t._)`${m} && (${(0,n.checkMissingProp)(c,y,v)})`),(0,n.reportMissingProp)(c,v),u.else())}}e.validatePropertyDeps=a;function i(c,l=c.schema){const{gen:u,data:p,keyword:h,it:v}=c,w=u.name("valid");for(const y in l)(0,r.alwaysValidSchema)(v,l[y])||(u.if((0,n.propertyInData)(u,p,y,v.opts.ownProperties),()=>{const m=c.subschema({keyword:h,schemaProp:y},w);c.mergeValidEvaluated(m,w)},()=>u.var(w,!0)),c.ok(w))}e.validateSchemaDeps=i,e.default=o})(_a)),_a}var go={},hu;function V_(){if(hu)return go;hu=1,Object.defineProperty(go,"__esModule",{value:!0});const e=pe(),t=Se(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},code(o){const{gen:s,schema:a,data:i,it:c}=o;if((0,t.alwaysValidSchema)(c,a))return;const l=s.name("valid");s.forIn("key",i,u=>{o.setParams({propertyName:u}),o.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},l),s.if((0,e.not)(l),()=>{o.error(!0),c.allErrors||s.break()})}),o.ok(l)}};return go.default=n,go}var vo={},mu;function gu(){if(mu)return vo;mu=1,Object.defineProperty(vo,"__esModule",{value:!0});const e=pt(),t=pe(),r=dt(),n=Se(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,t._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:i,schema:c,parentSchema:l,data:u,errsCount:p,it:h}=a;if(!p)throw new Error("ajv implementation error");const{allErrors:v,opts:w}=h;if(h.props=!0,w.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(h,c))return;const y=(0,e.allSchemaProperties)(l.properties),m=(0,e.allSchemaProperties)(l.patternProperties);_(),a.ok((0,t._)`${p} === ${r.default.errors}`);function _(){i.forIn("key",u,E=>{!y.length&&!m.length?$(E):i.if(f(E),()=>$(E))})}function f(E){let k;if(y.length>8){const C=(0,n.schemaRefOrVal)(h,l.properties,"properties");k=(0,e.isOwnProperty)(i,C,E)}else y.length?k=(0,t.or)(...y.map(C=>(0,t._)`${E} === ${C}`)):k=t.nil;return m.length&&(k=(0,t.or)(k,...m.map(C=>(0,t._)`${(0,e.usePattern)(a,C)}.test(${E})`))),(0,t.not)(k)}function b(E){i.code((0,t._)`delete ${u}[${E}]`)}function $(E){if(w.removeAdditional==="all"||w.removeAdditional&&c===!1){b(E);return}if(c===!1){a.setParams({additionalProperty:E}),a.error(),v||i.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(h,c)){const k=i.name("valid");w.removeAdditional==="failing"?(g(E,k,!1),i.if((0,t.not)(k),()=>{a.reset(),b(E)})):(g(E,k),v||i.if((0,t.not)(k),()=>i.break()))}}function g(E,k,C){const O={keyword:"additionalProperties",dataProp:E,dataPropType:n.Type.Str};C===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(O,k)}}};return vo.default=s,vo}var yo={},vu;function L_(){if(vu)return yo;vu=1,Object.defineProperty(yo,"__esModule",{value:!0});const e=Qr(),t=pt(),r=Se(),n=gu(),o={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:a,schema:i,parentSchema:c,data:l,it:u}=s;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(i);for(const m of p)u.definedProperties.add(m);u.opts.unevaluated&&p.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(a,(0,r.toHash)(p),u.props));const h=p.filter(m=>!(0,r.alwaysValidSchema)(u,i[m]));if(h.length===0)return;const v=a.name("valid");for(const m of h)w(m)?y(m):(a.if((0,t.propertyInData)(a,l,m,u.opts.ownProperties)),y(m),u.allErrors||a.else().var(v,!0),a.endIf()),s.it.definedProperties.add(m),s.ok(v);function w(m){return u.opts.useDefaults&&!u.compositeRule&&i[m].default!==void 0}function y(m){s.subschema({keyword:"properties",schemaProp:m,dataProp:m},v)}}};return yo.default=o,yo}var bo={},yu;function R_(){if(yu)return bo;yu=1,Object.defineProperty(bo,"__esModule",{value:!0});const e=pt(),t=pe(),r=Se(),n=Se(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:a,schema:i,data:c,parentSchema:l,it:u}=s,{opts:p}=u,h=(0,e.allSchemaProperties)(i),v=h.filter($=>(0,r.alwaysValidSchema)(u,i[$]));if(h.length===0||v.length===h.length&&(!u.opts.unevaluated||u.props===!0))return;const w=p.strictSchema&&!p.allowMatchingProperties&&l.properties,y=a.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,n.evaluatedPropsToName)(a,u.props));const{props:m}=u;_();function _(){for(const $ of h)w&&f($),u.allErrors?b($):(a.var(y,!0),b($),a.if(y))}function f($){for(const g in w)new RegExp($).test(g)&&(0,r.checkStrictMode)(u,`property ${g} matches pattern ${$} (use allowMatchingProperties)`)}function b($){a.forIn("key",c,g=>{a.if((0,t._)`${(0,e.usePattern)(s,$)}.test(${g})`,()=>{const E=v.includes($);E||s.subschema({keyword:"patternProperties",schemaProp:$,dataProp:g,dataPropType:n.Type.Str},y),u.opts.unevaluated&&m!==!0?a.assign((0,t._)`${m}[${g}]`,!0):!E&&!u.allErrors&&a.if((0,t.not)(y),()=>a.break())})})}}};return bo.default=o,bo}var _o={},bu;function q_(){if(bu)return _o;bu=1,Object.defineProperty(_o,"__esModule",{value:!0});const e=Se(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:o,it:s}=r;if((0,e.alwaysValidSchema)(s,o)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return _o.default=t,_o}var wo={},_u;function U_(){if(_u)return wo;_u=1,Object.defineProperty(wo,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:pt().validateUnion,error:{message:"must match a schema in anyOf"}};return wo.default=t,wo}var $o={},wu;function Z_(){if(wu)return $o;wu=1,Object.defineProperty($o,"__esModule",{value:!0});const e=pe(),t=Se(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},code(o){const{gen:s,schema:a,parentSchema:i,it:c}=o;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&i.discriminator)return;const l=a,u=s.let("valid",!1),p=s.let("passing",null),h=s.name("_valid");o.setParams({passing:p}),s.block(v),o.result(u,()=>o.reset(),()=>o.error(!0));function v(){l.forEach((w,y)=>{let m;(0,t.alwaysValidSchema)(c,w)?s.var(h,!0):m=o.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},h),y>0&&s.if((0,e._)`${h} && ${u}`).assign(u,!1).assign(p,(0,e._)`[${p}, ${y}]`).else(),s.if(h,()=>{s.assign(u,!0),s.assign(p,y),m&&o.mergeEvaluated(m,e.Name)})})}}};return $o.default=n,$o}var So={},$u;function B_(){if($u)return So;$u=1,Object.defineProperty(So,"__esModule",{value:!0});const e=Se(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:o,it:s}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");const a=n.name("valid");o.forEach((i,c)=>{if((0,e.alwaysValidSchema)(s,i))return;const l=r.subschema({keyword:"allOf",schemaProp:c},a);r.ok(a),r.mergeEvaluated(l)})}};return So.default=t,So}var Eo={},Su;function W_(){if(Su)return Eo;Su=1,Object.defineProperty(Eo,"__esModule",{value:!0});const e=pe(),t=Se(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:a,parentSchema:i,it:c}=s;i.then===void 0&&i.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const l=o(c,"then"),u=o(c,"else");if(!l&&!u)return;const p=a.let("valid",!0),h=a.name("_valid");if(v(),s.reset(),l&&u){const y=a.let("ifClause");s.setParams({ifClause:y}),a.if(h,w("then",y),w("else",y))}else l?a.if(h,w("then")):a.if((0,e.not)(h),w("else"));s.pass(p,()=>s.error(!0));function v(){const y=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},h);s.mergeEvaluated(y)}function w(y,m){return()=>{const _=s.subschema({keyword:y},h);a.assign(p,h),s.mergeValidEvaluated(_,p),m?a.assign(m,(0,e._)`${y}`):s.setParams({ifClause:y})}}}};function o(s,a){const i=s.schema[a];return i!==void 0&&!(0,t.alwaysValidSchema)(s,i)}return Eo.default=n,Eo}var ko={},Eu;function H_(){if(Eu)return ko;Eu=1,Object.defineProperty(ko,"__esModule",{value:!0});const e=Se(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:o}){n.if===void 0&&(0,e.checkStrictMode)(o,`"${r}" without "if" is ignored`)}};return ko.default=t,ko}var ku;function xu(){if(ku)return fo;ku=1,Object.defineProperty(fo,"__esModule",{value:!0});const e=iu(),t=z_(),r=lu(),n=j_(),o=F_(),s=wa(),a=V_(),i=gu(),c=L_(),l=R_(),u=q_(),p=U_(),h=Z_(),v=B_(),w=W_(),y=H_();function m(_=!1){const f=[u.default,p.default,h.default,v.default,w.default,y.default,a.default,i.default,s.default,c.default,l.default];return _?f.push(t.default,n.default):f.push(e.default,r.default),f.push(o.default),f}return fo.default=m,fo}var xo={},Cr={},Cu;function Pu(){if(Cu)return Cr;Cu=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.dynamicAnchor=void 0;const e=pe(),t=dt(),r=Hn(),n=ya(),o={keyword:"$dynamicAnchor",schemaType:"string",code:i=>s(i,i.schema)};function s(i,c){const{gen:l,it:u}=i;u.schemaEnv.root.dynamicAnchors[c]=!0;const p=(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(c)}`,h=u.errSchemaPath==="#"?u.validateName:a(i);l.if((0,e._)`!${p}`,()=>l.assign(p,h))}Cr.dynamicAnchor=s;function a(i){const{schemaEnv:c,schema:l,self:u}=i.it,{root:p,baseId:h,localRefs:v,meta:w}=c.root,{schemaId:y}=u.opts,m=new r.SchemaEnv({schema:l,schemaId:y,root:p,baseId:h,localRefs:v,meta:w});return r.compileSchema.call(u,m),(0,n.getValidate)(i,m)}return Cr.default=o,Cr}var Pr={},Nu;function Au(){if(Nu)return Pr;Nu=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.dynamicRef=void 0;const e=pe(),t=dt(),r=ya(),n={keyword:"$dynamicRef",schemaType:"string",code:s=>o(s,s.schema)};function o(s,a){const{gen:i,keyword:c,it:l}=s;if(a[0]!=="#")throw new Error(`"${c}" only supports hash fragment reference`);const u=a.slice(1);if(l.allErrors)p();else{const v=i.let("valid",!1);p(v),s.ok(v)}function p(v){if(l.schemaEnv.root.dynamicAnchors[u]){const w=i.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(u)}`);i.if(w,h(w,v),h(l.validateName,v))}else h(l.validateName,v)()}function h(v,w){return w?()=>i.block(()=>{(0,r.callRef)(s,v),i.let(w,!0)}):()=>(0,r.callRef)(s,v)}}return Pr.dynamicRef=o,Pr.default=n,Pr}var Co={},Tu;function K_(){if(Tu)return Co;Tu=1,Object.defineProperty(Co,"__esModule",{value:!0});const e=Pu(),t=Se(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,e.dynamicAnchor)(n,""):(0,t.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return Co.default=r,Co}var Po={},Iu;function G_(){if(Iu)return Po;Iu=1,Object.defineProperty(Po,"__esModule",{value:!0});const e=Au(),t={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,e.dynamicRef)(r,r.schema)};return Po.default=t,Po}var Ou;function J_(){if(Ou)return xo;Ou=1,Object.defineProperty(xo,"__esModule",{value:!0});const e=Pu(),t=Au(),r=K_(),n=G_(),o=[e.default,t.default,r.default,n.default];return xo.default=o,xo}var No={},Ao={},Du;function Y_(){if(Du)return Ao;Du=1,Object.defineProperty(Ao,"__esModule",{value:!0});const e=wa(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:r=>(0,e.validatePropertyDeps)(r)};return Ao.default=t,Ao}var To={},Mu;function X_(){if(Mu)return To;Mu=1,Object.defineProperty(To,"__esModule",{value:!0});const e=wa(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,e.validateSchemaDeps)(r)};return To.default=t,To}var Io={},zu;function Q_(){if(zu)return Io;zu=1,Object.defineProperty(Io,"__esModule",{value:!0});const e=Se(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:o}){n.contains===void 0&&(0,e.checkStrictMode)(o,`"${r}" without "contains" is ignored`)}};return Io.default=t,Io}var ju;function e0(){if(ju)return No;ju=1,Object.defineProperty(No,"__esModule",{value:!0});const e=Y_(),t=X_(),r=Q_(),n=[e.default,t.default,r.default];return No.default=n,No}var Oo={},Do={},Fu;function t0(){if(Fu)return Do;Fu=1,Object.defineProperty(Do,"__esModule",{value:!0});const e=pe(),t=Se(),r=dt(),o={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:s})=>(0,e._)`{unevaluatedProperty: ${s.unevaluatedProperty}}`},code(s){const{gen:a,schema:i,data:c,errsCount:l,it:u}=s;if(!l)throw new Error("ajv implementation error");const{allErrors:p,props:h}=u;h instanceof e.Name?a.if((0,e._)`${h} !== true`,()=>a.forIn("key",c,m=>a.if(w(h,m),()=>v(m)))):h!==!0&&a.forIn("key",c,m=>h===void 0?v(m):a.if(y(h,m),()=>v(m))),u.props=!0,s.ok((0,e._)`${l} === ${r.default.errors}`);function v(m){if(i===!1){s.setParams({unevaluatedProperty:m}),s.error(),p||a.break();return}if(!(0,t.alwaysValidSchema)(u,i)){const _=a.name("valid");s.subschema({keyword:"unevaluatedProperties",dataProp:m,dataPropType:t.Type.Str},_),p||a.if((0,e.not)(_),()=>a.break())}}function w(m,_){return(0,e._)`!${m} || !${m}[${_}]`}function y(m,_){const f=[];for(const b in m)m[b]===!0&&f.push((0,e._)`${_} !== ${b}`);return(0,e.and)(...f)}}};return Do.default=o,Do}var Mo={},Vu;function r0(){if(Vu)return Mo;Vu=1,Object.defineProperty(Mo,"__esModule",{value:!0});const e=pe(),t=Se(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{gen:s,schema:a,data:i,it:c}=o,l=c.items||0;if(l===!0)return;const u=s.const("len",(0,e._)`${i}.length`);if(a===!1)o.setParams({len:l}),o.fail((0,e._)`${u} > ${l}`);else if(typeof a=="object"&&!(0,t.alwaysValidSchema)(c,a)){const h=s.var("valid",(0,e._)`${u} <= ${l}`);s.if((0,e.not)(h),()=>p(h,l)),o.ok(h)}c.items=!0;function p(h,v){s.forRange("i",v,u,w=>{o.subschema({keyword:"unevaluatedItems",dataProp:w,dataPropType:t.Type.Num},h),c.allErrors||s.if((0,e.not)(h),()=>s.break())})}}};return Mo.default=n,Mo}var Lu;function n0(){if(Lu)return Oo;Lu=1,Object.defineProperty(Oo,"__esModule",{value:!0});const e=t0(),t=r0(),r=[e.default,t.default];return Oo.default=r,Oo}var zo={},jo={},Ru;function o0(){if(Ru)return jo;Ru=1,Object.defineProperty(jo,"__esModule",{value:!0});const e=pe(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,o){const{gen:s,data:a,$data:i,schema:c,schemaCode:l,it:u}=n,{opts:p,errSchemaPath:h,schemaEnv:v,self:w}=u;if(!p.validateFormats)return;i?y():m();function y(){const _=s.scopeValue("formats",{ref:w.formats,code:p.code.formats}),f=s.const("fDef",(0,e._)`${_}[${l}]`),b=s.let("fType"),$=s.let("format");s.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>s.assign(b,(0,e._)`${f}.type || "string"`).assign($,(0,e._)`${f}.validate`),()=>s.assign(b,(0,e._)`"string"`).assign($,f)),n.fail$data((0,e.or)(g(),E()));function g(){return p.strictSchema===!1?e.nil:(0,e._)`${l} && !${$}`}function E(){const k=v.$async?(0,e._)`(${f}.async ? await ${$}(${a}) : ${$}(${a}))`:(0,e._)`${$}(${a})`,C=(0,e._)`(typeof ${$} == "function" ? ${k} : ${$}.test(${a}))`;return(0,e._)`${$} && ${$} !== true && ${b} === ${o} && !${C}`}}function m(){const _=w.formats[c];if(!_){g();return}if(_===!0)return;const[f,b,$]=E(_);f===o&&n.pass(k());function g(){if(p.strictSchema===!1){w.logger.warn(C());return}throw new Error(C());function C(){return`unknown format "${c}" ignored in schema at path "${h}"`}}function E(C){const O=C instanceof RegExp?(0,e.regexpCode)(C):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(c)}`:void 0,V=s.scopeValue("formats",{key:c,ref:C,code:O});return typeof C=="object"&&!(C instanceof RegExp)?[C.type||"string",C.validate,(0,e._)`${V}.validate`]:["string",C,V]}function k(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${$}(${a})`}return typeof b=="function"?(0,e._)`${$}(${a})`:(0,e._)`${$}.test(${a})`}}}};return jo.default=r,jo}var qu;function Uu(){if(qu)return zo;qu=1,Object.defineProperty(zo,"__esModule",{value:!0});const t=[o0().default];return zo.default=t,zo}var sr={},Zu;function Bu(){return Zu||(Zu=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.contentVocabulary=sr.metadataVocabulary=void 0,sr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],sr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),sr}var Wu;function s0(){if(Wu)return Gn;Wu=1,Object.defineProperty(Gn,"__esModule",{value:!0});const e=Bl(),t=su(),r=xu(),n=J_(),o=e0(),s=n0(),a=Uu(),i=Bu(),c=[n.default,e.default,t.default,(0,r.default)(!0),a.default,i.metadataVocabulary,i.contentVocabulary,o.default,s.default];return Gn.default=c,Gn}var Fo={},rn={},Hu;function a0(){if(Hu)return rn;Hu=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(rn.DiscrError=e={})),rn}var Ku;function Gu(){if(Ku)return Fo;Ku=1,Object.defineProperty(Fo,"__esModule",{value:!0});const e=pe(),t=a0(),r=Hn(),n=en(),o=Se(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:i,tagName:c}})=>i===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:i,tag:c,tagName:l}})=>(0,e._)`{error: ${i}, tag: ${l}, tagValue: ${c}}`},code(i){const{gen:c,data:l,schema:u,parentSchema:p,it:h}=i,{oneOf:v}=p;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");const w=u.propertyName;if(typeof w!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const y=c.let("valid",!1),m=c.const("tag",(0,e._)`${l}${(0,e.getProperty)(w)}`);c.if((0,e._)`typeof ${m} == "string"`,()=>_(),()=>i.error(!1,{discrError:t.DiscrError.Tag,tag:m,tagName:w})),i.ok(y);function _(){const $=b();c.if(!1);for(const g in $)c.elseIf((0,e._)`${m} === ${g}`),c.assign(y,f($[g]));c.else(),i.error(!1,{discrError:t.DiscrError.Mapping,tag:m,tagName:w}),c.endIf()}function f($){const g=c.name("valid"),E=i.subschema({keyword:"oneOf",schemaProp:$},g);return i.mergeEvaluated(E,e.Name),g}function b(){var $;const g={},E=C(p);let k=!0;for(let z=0;z<v.length;z++){let j=v[z];if(j?.$ref&&!(0,o.schemaHasRulesButRef)(j,h.self.RULES)){const Z=j.$ref;if(j=r.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,Z),j instanceof r.SchemaEnv&&(j=j.schema),j===void 0)throw new n.default(h.opts.uriResolver,h.baseId,Z)}const R=($=j?.properties)===null||$===void 0?void 0:$[w];if(typeof R!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${w}"`);k=k&&(E||C(j)),O(R,z)}if(!k)throw new Error(`discriminator: "${w}" must be required`);return g;function C({required:z}){return Array.isArray(z)&&z.includes(w)}function O(z,j){if(z.const)V(z.const,j);else if(z.enum)for(const R of z.enum)V(R,j);else throw new Error(`discriminator: "properties/${w}" must have "const" or "enum"`)}function V(z,j){if(typeof z!="string"||z in g)throw new Error(`discriminator: "${w}" values must be unique strings`);g[z]=j}}}};return Fo.default=a,Fo}var Vo={};const i0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}},c0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},l0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},u0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},d0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},f0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},p0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},h0={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};var Ju;function m0(){if(Ju)return Vo;Ju=1,Object.defineProperty(Vo,"__esModule",{value:!0});const e=i0,t=c0,r=l0,n=u0,o=d0,s=f0,a=p0,i=h0,c=["/properties"];function l(u){return[e,t,r,n,o,p(this,s),a,p(this,i)].forEach(h=>this.addMetaSchema(h,void 0,!1)),this;function p(h,v){return u?h.$dataMetaSchema(v,c):v}}return Vo.default=l,Vo}var Yu;function g0(){return Yu||(Yu=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=Rl(),n=s0(),o=Gu(),s=m0(),a="https://json-schema.org/draft/2020-12/schema";class i extends r.default{constructor(v={}){super({...v,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(v=>this.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:v,meta:w}=this.opts;w&&(s.default.call(this,v),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=i,e.exports=t=i,e.exports.Ajv2020=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var c=Qr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=pe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=Bn();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var p=en();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})(Fn,Fn.exports)),Fn.exports}var v0=g0();const y0=ll(v0);var Lo={exports:{}},$a={},Xu;function b0(){return Xu||(Xu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(z,j){return{validate:z,compare:j}}e.fullFormats={date:t(s,a),time:t(c(!0),l),"date-time":t(h(!0),v),"iso-time":t(c(),u),"iso-date-time":t(h(),w),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:V,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:b,int32:{type:"number",validate:E},int64:{type:"number",validate:k},float:{type:"number",validate:C},double:{type:"number",validate:C},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,w),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(z){return z%4===0&&(z%100!==0||z%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(z){const j=n.exec(z);if(!j)return!1;const R=+j[1],Z=+j[2],ne=+j[3];return Z>=1&&Z<=12&&ne>=1&&ne<=(Z===2&&r(R)?29:o[Z])}function a(z,j){if(z&&j)return z>j?1:z<j?-1:0}const i=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(z){return function(R){const Z=i.exec(R);if(!Z)return!1;const ne=+Z[1],G=+Z[2],oe=+Z[3],F=Z[4],fe=Z[5]==="-"?-1:1,H=+(Z[6]||0),I=+(Z[7]||0);if(H>23||I>59||z&&!F)return!1;if(ne<=23&&G<=59&&oe<60)return!0;const K=G-I*fe,D=ne-H*fe-(K<0?1:0);return(D===23||D===-1)&&(K===59||K===-1)&&oe<61}}function l(z,j){if(!(z&&j))return;const R=new Date("2020-01-01T"+z).valueOf(),Z=new Date("2020-01-01T"+j).valueOf();if(R&&Z)return R-Z}function u(z,j){if(!(z&&j))return;const R=i.exec(z),Z=i.exec(j);if(R&&Z)return z=R[1]+R[2]+R[3],j=Z[1]+Z[2]+Z[3],z>j?1:z<j?-1:0}const p=/t|\s/i;function h(z){const j=c(z);return function(Z){const ne=Z.split(p);return ne.length===2&&s(ne[0])&&j(ne[1])}}function v(z,j){if(!(z&&j))return;const R=new Date(z).valueOf(),Z=new Date(j).valueOf();if(R&&Z)return R-Z}function w(z,j){if(!(z&&j))return;const[R,Z]=z.split(p),[ne,G]=j.split(p),oe=a(R,ne);if(oe!==void 0)return oe||l(Z,G)}const y=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function _(z){return y.test(z)&&m.test(z)}const f=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function b(z){return f.lastIndex=0,f.test(z)}const $=-2147483648,g=2**31-1;function E(z){return Number.isInteger(z)&&z<=g&&z>=$}function k(z){return Number.isInteger(z)}function C(){return!0}const O=/[^\\]\\Z/;function V(z){if(O.test(z))return!1;try{return new RegExp(z),!0}catch{return!1}}})($a)),$a}var Sa={},Ro={exports:{}},qo={},Qu;function _0(){if(Qu)return qo;Qu=1,Object.defineProperty(qo,"__esModule",{value:!0});const e=Bl(),t=su(),r=xu(),n=Uu(),o=Bu(),s=[e.default,t.default,(0,r.default)(),n.default,o.metadataVocabulary,o.contentVocabulary];return qo.default=s,qo}const w0={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var ed;function $0(){return ed||(ed=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=Rl(),n=_0(),o=Gu(),s=w0,a=["/properties"],i="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const w=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(w,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=Qr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=pe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var p=Bn();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var h=en();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})(Ro,Ro.exports)),Ro.exports}var td;function S0(){return td||(td=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=$0(),r=pe(),n=r.operators,o={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:i,schemaCode:c})=>(0,r.str)`should be ${o[i].okStr} ${c}`,params:({keyword:i,schemaCode:c})=>(0,r._)`{comparison: ${o[i].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(i){const{gen:c,data:l,schemaCode:u,keyword:p,it:h}=i,{opts:v,self:w}=h;if(!v.validateFormats)return;const y=new t.KeywordCxt(h,w.RULES.all.format.definition,"format");y.$data?m():_();function m(){const b=c.scopeValue("formats",{ref:w.formats,code:v.code.formats}),$=c.const("fmt",(0,r._)`${b}[${y.schemaCode}]`);i.fail$data((0,r.or)((0,r._)`typeof ${$} != "object"`,(0,r._)`${$} instanceof RegExp`,(0,r._)`typeof ${$}.compare != "function"`,f($)))}function _(){const b=y.schema,$=w.formats[b];if(!$||$===!0)return;if(typeof $!="object"||$ instanceof RegExp||typeof $.compare!="function")throw new Error(`"${p}": format "${b}" does not define "compare" function`);const g=c.scopeValue("formats",{key:b,ref:$,code:v.code.formats?(0,r._)`${v.code.formats}${(0,r.getProperty)(b)}`:void 0});i.fail$data(f(g))}function f(b){return(0,r._)`${b}.compare(${l}, ${u}) ${o[p].fail} 0`}},dependencies:["format"]};const a=i=>(i.addKeyword(e.formatLimitDefinition),i);e.default=a})(Sa)),Sa}var rd;function E0(){return rd||(rd=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=b0(),n=S0(),o=pe(),s=new o.Name("fullFormats"),a=new o.Name("fastFormats"),i=(l,u={keywords:!0})=>{if(Array.isArray(u))return c(l,u,r.fullFormats,s),l;const[p,h]=u.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,s],v=u.formats||r.formatNames;return c(l,v,p,h),u.keywords&&(0,n.default)(l),l};i.get=(l,u="full")=>{const h=(u==="fast"?r.fastFormats:r.fullFormats)[l];if(!h)throw new Error(`Unknown format "${l}"`);return h};function c(l,u,p,h){var v,w;(v=(w=l.opts.code).formats)!==null&&v!==void 0||(w.formats=(0,o._)`require("ajv-formats/dist/formats").${h}`);for(const y of u)l.addFormat(y,p[y])}e.exports=t=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i})(Lo,Lo.exports)),Lo.exports}var k0=E0();const x0=ll(k0),C0="https://json-schema.org/draft/2020-12/schema",Ea=new y0;x0(Ea);function nd(e){return Ea.validate(C0,e)?null:Ea.errors||[]}const P0=({textAreaRef:e,triggerAutoSize:t,maxHeight:r=Number.MAX_SAFE_INTEGER,minHeight:n=0})=>{const[o,s]=S.useState(!0);S.useEffect(()=>{const i=e.current;if(i){o&&(i.style.minHeight=`${n+6}px`,r>n&&(i.style.maxHeight=`${r}px`),s(!1)),i.style.height=`${n+6}px`;const c=i.scrollHeight;c>r?i.style.height=`${r}px`:i.style.height=`${c+6}px`}},[e.current,t])},od=S.forwardRef(({maxHeight:e=Number.MAX_SAFE_INTEGER,minHeight:t=52,className:r,onChange:n,value:o,...s},a)=>{const i=S.useRef(null),[c,l]=S.useState("");return P0({textAreaRef:i,triggerAutoSize:c,maxHeight:e,minHeight:t}),J.useImperativeHandle(a,()=>({textArea:i.current,focus:()=>i?.current?.focus(),maxHeight:e,minHeight:t})),S.useEffect(()=>{l(o)},[s?.defaultValue,o]),d.jsx("textarea",{...s,value:o,ref:i,className:ge("flex w-full rounded-md border border-input bg-transparent dark:bg-input/30 px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),onChange:u=>{l(u.target.value),n?.(u)}})});od.displayName="AutosizeTextarea";function sd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nr(...e){return t=>{let r=!1;const n=e.map(o=>{const s=sd(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():sd(e[o],null)}}}}function Ae(...e){return S.useCallback(Nr(...e),e)}var N0=Symbol.for("react.lazy"),Uo=S[" use ".trim().toString()];function A0(e){return typeof e=="object"&&e!==null&&"then"in e}function ad(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===N0&&"_payload"in e&&A0(e._payload)}function ka(e){const t=T0(e),r=S.forwardRef((n,o)=>{let{children:s,...a}=n;ad(s)&&typeof Uo=="function"&&(s=Uo(s._payload));const i=S.Children.toArray(s),c=i.find(O0);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var xa=ka("Slot");function T0(e){const t=S.forwardRef((r,n)=>{let{children:o,...s}=r;if(ad(o)&&typeof Uo=="function"&&(o=Uo(o._payload)),S.isValidElement(o)){const a=M0(o),i=D0(s,o.props);return o.type!==S.Fragment&&(i.ref=n?Nr(n,a):a),S.cloneElement(o,i)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var I0=Symbol("radix.slottable");function O0(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===I0}function D0(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function M0(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const id=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cd=Bc,ld=(e,t)=>r=>{var n;if(t?.variants==null)return cd(e,r?.class,r?.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(l=>{const u=r?.[l],p=s?.[l];if(u===null)return null;const h=id(u)||id(p);return o[l][h]}),i=r&&Object.entries(r).reduce((l,u)=>{let[p,h]=u;return h===void 0||(l[p]=h),l},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,u)=>{let{class:p,className:h,...v}=u;return Object.entries(v).every(w=>{let[y,m]=w;return Array.isArray(m)?m.includes({...s,...i}[y]):{...s,...i}[y]===m})?[...l,p,h]:l},[]);return cd(e,a,c,r?.class,r?.className)},z0=ld("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function ud({className:e,variant:t,asChild:r=!1,...n}){const o=r?xa:"span";return d.jsx(o,{"data-slot":"badge",className:ge(z0({variant:t}),e),...n})}const j0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),F0=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),dd=e=>{const t=F0(e);return t.charAt(0).toUpperCase()+t.slice(1)},fd=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),V0=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var L0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const R0=J.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:a,...i},c)=>J.createElement("svg",{ref:c,...L0,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:fd("lucide",o),...!s&&!V0(i)&&{"aria-hidden":"true"},...i},[...a.map(([l,u])=>J.createElement(l,u)),...Array.isArray(s)?s:[s]]));const Tt=(e,t)=>{const r=J.forwardRef(({className:n,...o},s)=>J.createElement(R0,{ref:s,iconNode:t,className:fd(`lucide-${j0(dd(e))}`,`lucide-${e}`,n),...o}));return r.displayName=dd(e),r};const pd=Tt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const hd=Tt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const q0=Tt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const md=Tt("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);const U0=Tt("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const gd=Tt("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Z0=Tt("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const vd=Tt("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const yd=Tt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ca=ld("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),qt=J.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const a=n?xa:"button";return d.jsx(a,{"data-slot":"button",ref:s,className:ge(Ca({variant:t,size:r,className:e})),...o})});function B0(e,t){const r=S.createContext(t),n=s=>{const{children:a,...i}=s,c=S.useMemo(()=>i,Object.values(i));return d.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function o(s){const a=S.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function yt(e,t=[]){let r=[];function n(s,a){const i=S.createContext(a),c=r.length;r=[...r,a];const l=p=>{const{scope:h,children:v,...w}=p,y=h?.[e]?.[c]||i,m=S.useMemo(()=>w,Object.values(w));return d.jsx(y.Provider,{value:m,children:v})};l.displayName=s+"Provider";function u(p,h){const v=h?.[e]?.[c]||i,w=S.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[l,u]}const o=()=>{const s=r.map(a=>S.createContext(a));return function(i){const c=i?.[e]||s;return S.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,W0(o,...t)]}function W0(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=n.reduce((i,{useScope:c,scopeName:l})=>{const p=c(s)[`__scope${l}`];return{...i,...p}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function me(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var He=globalThis?.document?S.useLayoutEffect:()=>{},H0=S[" useId ".trim().toString()]||(()=>{}),K0=0;function Ut(e){const[t,r]=S.useState(H0());return He(()=>{r(n=>n??String(K0++))},[e]),e||(t?`radix-${t}`:"")}var G0=S[" useInsertionEffect ".trim().toString()]||He;function ar({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,a]=J0({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:o;{const u=S.useRef(e!==void 0);S.useEffect(()=>{const p=u.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,n])}const l=S.useCallback(u=>{if(i){const p=Y0(u)?u(e):u;p!==e&&a.current?.(p)}else s(u)},[i,e,s,a]);return[c,l]}function J0({defaultProp:e,onChange:t}){const[r,n]=S.useState(e),o=S.useRef(r),s=S.useRef(t);return G0(()=>{s.current=t},[t]),S.useEffect(()=>{o.current!==r&&(s.current?.(r),o.current=r)},[r,o]),[r,n,s]}function Y0(e){return typeof e=="function"}function X0(e){const t=Q0(e),r=S.forwardRef((n,o)=>{const{children:s,...a}=n,i=S.Children.toArray(s),c=i.find(tw);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function Q0(e){const t=S.forwardRef((r,n)=>{const{children:o,...s}=r;if(S.isValidElement(o)){const a=nw(o),i=rw(s,o.props);return o.type!==S.Fragment&&(i.ref=n?Nr(n,a):a),S.cloneElement(o,i)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ew=Symbol("radix.slottable");function tw(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ew}function rw(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function nw(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ow=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ee=ow.reduce((e,t)=>{const r=X0(`Primitive.${t}`),n=S.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function sw(e,t){e&&fn.flushSync(()=>e.dispatchEvent(t))}function Zt(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...r)=>t.current?.(...r),[])}function aw(e,t=globalThis?.document){const r=Zt(e);S.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var iw="DismissableLayer",Pa="dismissableLayer.update",cw="dismissableLayer.pointerDownOutside",lw="dismissableLayer.focusOutside",bd,_d=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zo=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,l=S.useContext(_d),[u,p]=S.useState(null),h=u?.ownerDocument??globalThis?.document,[,v]=S.useState({}),w=Ae(t,k=>p(k)),y=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=y.indexOf(m),f=u?y.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,$=f>=_,g=fw(k=>{const C=k.target,O=[...l.branches].some(V=>V.contains(C));!$||O||(o?.(k),a?.(k),k.defaultPrevented||i?.())},h),E=pw(k=>{const C=k.target;[...l.branches].some(V=>V.contains(C))||(s?.(k),a?.(k),k.defaultPrevented||i?.())},h);return aw(k=>{f===l.layers.size-1&&(n?.(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},h),S.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(bd=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),wd(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=bd)}},[u,h,r,l]),S.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),wd())},[u,l]),S.useEffect(()=>{const k=()=>v({});return document.addEventListener(Pa,k),()=>document.removeEventListener(Pa,k)},[]),d.jsx(Ee.div,{...c,ref:w,style:{pointerEvents:b?$?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,E.onFocusCapture),onBlurCapture:me(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,g.onPointerDownCapture)})});Zo.displayName=iw;var uw="DismissableLayerBranch",dw=S.forwardRef((e,t)=>{const r=S.useContext(_d),n=S.useRef(null),o=Ae(t,n);return S.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),d.jsx(Ee.div,{...e,ref:o})});dw.displayName=uw;function fw(e,t=globalThis?.document){const r=Zt(e),n=S.useRef(!1),o=S.useRef(()=>{});return S.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let c=function(){$d(cw,r,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function pw(e,t=globalThis?.document){const r=Zt(e),n=S.useRef(!1);return S.useEffect(()=>{const o=s=>{s.target&&!n.current&&$d(lw,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function wd(){const e=new CustomEvent(Pa);document.dispatchEvent(e)}function $d(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?sw(o,s):o.dispatchEvent(s)}var Na="focusScope.autoFocusOnMount",Aa="focusScope.autoFocusOnUnmount",Sd={bubbles:!1,cancelable:!0},hw="FocusScope",Ta=S.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=S.useState(null),l=Zt(o),u=Zt(s),p=S.useRef(null),h=Ae(t,y=>c(y)),v=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(n){let y=function(b){if(v.paused||!i)return;const $=b.target;i.contains($)?p.current=$:Bt(p.current,{select:!0})},m=function(b){if(v.paused||!i)return;const $=b.relatedTarget;$!==null&&(i.contains($)||Bt(p.current,{select:!0}))},_=function(b){if(document.activeElement===document.body)for(const g of b)g.removedNodes.length>0&&Bt(i)};document.addEventListener("focusin",y),document.addEventListener("focusout",m);const f=new MutationObserver(_);return i&&f.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",m),f.disconnect()}}},[n,i,v.paused]),S.useEffect(()=>{if(i){xd.add(v);const y=document.activeElement;if(!i.contains(y)){const _=new CustomEvent(Na,Sd);i.addEventListener(Na,l),i.dispatchEvent(_),_.defaultPrevented||(mw(_w(Ed(i)),{select:!0}),document.activeElement===y&&Bt(i))}return()=>{i.removeEventListener(Na,l),setTimeout(()=>{const _=new CustomEvent(Aa,Sd);i.addEventListener(Aa,u),i.dispatchEvent(_),_.defaultPrevented||Bt(y??document.body,{select:!0}),i.removeEventListener(Aa,u),xd.remove(v)},0)}}},[i,l,u,v]);const w=S.useCallback(y=>{if(!r&&!n||v.paused)return;const m=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(m&&_){const f=y.currentTarget,[b,$]=gw(f);b&&$?!y.shiftKey&&_===$?(y.preventDefault(),r&&Bt(b,{select:!0})):y.shiftKey&&_===b&&(y.preventDefault(),r&&Bt($,{select:!0})):_===f&&y.preventDefault()}},[r,n,v.paused]);return d.jsx(Ee.div,{tabIndex:-1,...a,ref:h,onKeyDown:w})});Ta.displayName=hw;function mw(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Bt(n,{select:t}),document.activeElement!==r)return}function gw(e){const t=Ed(e),r=kd(t,e),n=kd(t.reverse(),e);return[r,n]}function Ed(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function kd(e,t){for(const r of e)if(!vw(r,{upTo:t}))return r}function vw(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function yw(e){return e instanceof HTMLInputElement&&"select"in e}function Bt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&yw(e)&&t&&e.select()}}var xd=bw();function bw(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Cd(e,t),e.unshift(t)},remove(t){e=Cd(e,t),e[0]?.resume()}}}function Cd(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function _w(e){return e.filter(t=>t.tagName!=="A")}var ww="Portal",Bo=S.forwardRef((e,t)=>{const{container:r,...n}=e,[o,s]=S.useState(!1);He(()=>s(!0),[]);const a=r||o&&globalThis?.document?.body;return a?Si.createPortal(d.jsx(Ee.div,{...n,ref:t}),a):null});Bo.displayName=ww;function $w(e,t){return S.useReducer((r,n)=>t[r][n]??r,e)}var Wt=e=>{const{present:t,children:r}=e,n=Sw(t),o=typeof r=="function"?r({present:n.isPresent}):S.Children.only(r),s=Ae(n.ref,Ew(o));return typeof r=="function"||n.isPresent?S.cloneElement(o,{ref:s}):null};Wt.displayName="Presence";function Sw(e){const[t,r]=S.useState(),n=S.useRef(null),o=S.useRef(e),s=S.useRef("none"),a=e?"mounted":"unmounted",[i,c]=$w(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const l=Wo(n.current);s.current=i==="mounted"?l:"none"},[i]),He(()=>{const l=n.current,u=o.current;if(u!==e){const h=s.current,v=Wo(l);e?c("MOUNT"):v==="none"||l?.display==="none"?c("UNMOUNT"):c(u&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),He(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,p=v=>{const y=Wo(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&y&&(c("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=v=>{v.target===t&&(s.current=Wo(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:S.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function Wo(e){return e?.animationName||"none"}function Ew(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ia=0;function Pd(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Nd()),document.body.insertAdjacentElement("beforeend",e[1]??Nd()),Ia++,()=>{Ia===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ia--}},[])}function Nd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var bt=function(){return bt=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},bt.apply(this,arguments)};function Ad(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function kw(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ho="right-scroll-bar-position",Ko="width-before-scroll-bar",xw="with-scroll-bars-hidden",Cw="--removed-body-scroll-bar-size";function Oa(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Pw(e,t){var r=J.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Nw=typeof window<"u"?S.useLayoutEffect:S.useEffect,Td=new WeakMap;function Aw(e,t){var r=Pw(null,function(n){return e.forEach(function(o){return Oa(o,n)})});return Nw(function(){var n=Td.get(r);if(n){var o=new Set(n),s=new Set(e),a=r.current;o.forEach(function(i){s.has(i)||Oa(i,null)}),s.forEach(function(i){o.has(i)||Oa(i,a)})}Td.set(r,e)},[e]),r}function Tw(e){return e}function Iw(e,t){t===void 0&&(t=Tw);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=t(s,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(i){return s(i)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(s),a=r}var c=function(){var u=a;a=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),r}}}};return o}function Ow(e){e===void 0&&(e={});var t=Iw(null);return t.options=bt({async:!0,ssr:!1},e),t}var Id=function(e){var t=e.sideCar,r=Ad(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return S.createElement(n,bt({},r))};Id.isSideCarExport=!0;function Dw(e,t){return e.useMedium(t),Id}var Od=Ow(),Da=function(){},Go=S.forwardRef(function(e,t){var r=S.useRef(null),n=S.useState({onScrollCapture:Da,onWheelCapture:Da,onTouchMoveCapture:Da}),o=n[0],s=n[1],a=e.forwardProps,i=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,p=e.shards,h=e.sideCar,v=e.noRelative,w=e.noIsolation,y=e.inert,m=e.allowPinchZoom,_=e.as,f=_===void 0?"div":_,b=e.gapMode,$=Ad(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),g=h,E=Aw([r,t]),k=bt(bt({},$),o);return S.createElement(S.Fragment,null,u&&S.createElement(g,{sideCar:Od,removeScrollBar:l,shards:p,noRelative:v,noIsolation:w,inert:y,setCallbacks:s,allowPinchZoom:!!m,lockRef:r,gapMode:b}),a?S.cloneElement(S.Children.only(i),bt(bt({},k),{ref:E})):S.createElement(f,bt({},k,{className:c,ref:E}),i))});Go.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Go.classNames={fullWidth:Ko,zeroRight:Ho};var Mw=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zw(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Mw();return t&&e.setAttribute("nonce",t),e}function jw(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Fw(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vw=function(){var e=0,t=null;return{add:function(r){e==0&&(t=zw())&&(jw(t,r),Fw(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Lw=function(){var e=Vw();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Dd=function(){var e=Lw(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Rw={left:0,top:0,right:0,gap:0},Ma=function(e){return parseInt(e||"",10)||0},qw=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ma(r),Ma(n),Ma(o)]},Uw=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Rw;var t=qw(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Zw=Dd(),Ar="data-scroll-locked",Bw=function(e,t,r,n){var o=e.left,s=e.top,a=e.right,i=e.gap;return r===void 0&&(r="margin"),`
28
+ .`.concat(xw,` {
32
29
  overflow: hidden `).concat(n,`;
33
30
  padding-right: `).concat(i,"px ").concat(n,`;
34
31
  }
35
- body[`).concat(qr,`] {
32
+ body[`).concat(Ar,`] {
36
33
  overflow: hidden `).concat(n,`;
37
34
  overscroll-behavior: contain;
38
35
  `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
39
- padding-left: `.concat(s,`px;
40
- padding-top: `).concat(o,`px;
36
+ padding-left: `.concat(o,`px;
37
+ padding-top: `).concat(s,`px;
41
38
  padding-right: `).concat(a,`px;
42
39
  margin-left:0;
43
40
  margin-top:0;
@@ -45,109 +42,37 @@ React keys must be passed directly to JSX without using spread:
45
42
  `),r==="padding"&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),`
46
43
  }
47
44
 
48
- .`).concat(ds,` {
45
+ .`).concat(Ho,` {
49
46
  right: `).concat(i,"px ").concat(n,`;
50
47
  }
51
48
 
52
- .`).concat(fs,` {
49
+ .`).concat(Ko,` {
53
50
  margin-right: `).concat(i,"px ").concat(n,`;
54
51
  }
55
52
 
56
- .`).concat(ds," .").concat(ds,` {
53
+ .`).concat(Ho," .").concat(Ho,` {
57
54
  right: 0 `).concat(n,`;
58
55
  }
59
56
 
60
- .`).concat(fs," .").concat(fs,` {
57
+ .`).concat(Ko," .").concat(Ko,` {
61
58
  margin-right: 0 `).concat(n,`;
62
59
  }
63
60
 
64
- body[`).concat(qr,`] {
65
- `).concat(kv,": ").concat(i,`px;
61
+ body[`).concat(Ar,`] {
62
+ `).concat(Cw,": ").concat(i,`px;
66
63
  }
67
- `)},Pl=function(){var e=parseInt(document.body.getAttribute(qr)||"0",10);return isFinite(e)?e:0},Hv=function(){S.useEffect(function(){return document.body.setAttribute(qr,(Pl()+1).toString()),function(){var e=Pl()-1;e<=0?document.body.removeAttribute(qr):document.body.setAttribute(qr,e.toString())}},[])},Gv=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;Hv();var o=S.useMemo(function(){return Uv(s)},[s]);return S.createElement(Bv,{styles:Wv(o,!t,s,r?"":"!important")})},Fa=!1;if(typeof window<"u")try{var hs=Object.defineProperty({},"passive",{get:function(){return Fa=!0,!0}});window.addEventListener("test",hs,hs),window.removeEventListener("test",hs,hs)}catch{Fa=!1}var Ur=Fa?{passive:!1}:!1,Kv=function(e){return e.tagName==="TEXTAREA"},Nl=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Kv(e)&&r[t]==="visible")},Zv=function(e){return Nl(e,"overflowY")},Yv=function(e){return Nl(e,"overflowX")},Al=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=Tl(e,n);if(s){var o=Ol(e,n),a=o[1],i=o[2];if(a>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Jv=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Xv=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Tl=function(e,t){return e==="v"?Zv(t):Yv(t)},Ol=function(e,t){return e==="v"?Jv(t):Xv(t)},Qv=function(e,t){return e==="h"&&t==="rtl"?-1:1},ey=function(e,t,r,n,s){var o=Qv(e,window.getComputedStyle(t).direction),a=o*n,i=r.target,c=t.contains(i),l=!1,u=a>0,p=0,m=0;do{if(!i)break;var v=Ol(e,i),x=v[0],y=v[1],h=v[2],_=y-h-o*x;(x||_)&&Tl(e,i)&&(p+=_,m+=x);var f=i.parentNode;i=f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?f.host:f}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(u&&Math.abs(p)<1||!u&&Math.abs(m)<1)&&(l=!0),l},ps=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Il=function(e){return[e.deltaX,e.deltaY]},Dl=function(e){return e&&"current"in e?e.current:e},ty=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ry=function(e){return`
64
+ `)},Md=function(){var e=parseInt(document.body.getAttribute(Ar)||"0",10);return isFinite(e)?e:0},Ww=function(){S.useEffect(function(){return document.body.setAttribute(Ar,(Md()+1).toString()),function(){var e=Md()-1;e<=0?document.body.removeAttribute(Ar):document.body.setAttribute(Ar,e.toString())}},[])},Hw=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Ww();var s=S.useMemo(function(){return Uw(o)},[o]);return S.createElement(Zw,{styles:Bw(s,!t,o,r?"":"!important")})},za=!1;if(typeof window<"u")try{var Jo=Object.defineProperty({},"passive",{get:function(){return za=!0,!0}});window.addEventListener("test",Jo,Jo),window.removeEventListener("test",Jo,Jo)}catch{za=!1}var Tr=za?{passive:!1}:!1,Kw=function(e){return e.tagName==="TEXTAREA"},zd=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Kw(e)&&r[t]==="visible")},Gw=function(e){return zd(e,"overflowY")},Jw=function(e){return zd(e,"overflowX")},jd=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Fd(e,n);if(o){var s=Vd(e,n),a=s[1],i=s[2];if(a>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Yw=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Xw=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Fd=function(e,t){return e==="v"?Gw(t):Jw(t)},Vd=function(e,t){return e==="v"?Yw(t):Xw(t)},Qw=function(e,t){return e==="h"&&t==="rtl"?-1:1},e$=function(e,t,r,n,o){var s=Qw(e,window.getComputedStyle(t).direction),a=s*n,i=r.target,c=t.contains(i),l=!1,u=a>0,p=0,h=0;do{if(!i)break;var v=Vd(e,i),w=v[0],y=v[1],m=v[2],_=y-m-s*w;(w||_)&&Fd(e,i)&&(p+=_,h+=w);var f=i.parentNode;i=f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?f.host:f}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(u&&Math.abs(p)<1||!u&&Math.abs(h)<1)&&(l=!0),l},Yo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ld=function(e){return[e.deltaX,e.deltaY]},Rd=function(e){return e&&"current"in e?e.current:e},t$=function(e,t){return e[0]===t[0]&&e[1]===t[1]},r$=function(e){return`
68
65
  .block-interactivity-`.concat(e,` {pointer-events: none;}
69
66
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
70
- `)},ny=0,Br=[];function sy(e){var t=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),s=S.useState(ny++)[0],o=S.useState(Rl)[0],a=S.useRef(e);S.useEffect(function(){a.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var y=Ev([e.lockRef.current],(e.shards||[]).map(Dl),!0).filter(Boolean);return y.forEach(function(h){return h.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var i=S.useCallback(function(y,h){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var _=ps(y),f=r.current,b="deltaX"in y?y.deltaX:f[0]-_[0],w="deltaY"in y?y.deltaY:f[1]-_[1],g,$=y.target,E=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in y&&E==="h"&&$.type==="range")return!1;var k=Al(E,$);if(!k)return!0;if(k?g=E:(g=E==="v"?"h":"v",k=Al(E,$)),!k)return!1;if(!n.current&&"changedTouches"in y&&(b||w)&&(n.current=g),!g)return!0;var I=n.current||g;return ey(I,h,y,I==="h"?b:w)},[]),c=S.useCallback(function(y){var h=y;if(!(!Br.length||Br[Br.length-1]!==o)){var _="deltaY"in h?Il(h):ps(h),f=t.current.filter(function(g){return g.name===h.type&&(g.target===h.target||h.target===g.shadowParent)&&ty(g.delta,_)})[0];if(f&&f.should){h.cancelable&&h.preventDefault();return}if(!f){var b=(a.current.shards||[]).map(Dl).filter(Boolean).filter(function(g){return g.contains(h.target)}),w=b.length>0?i(h,b[0]):!a.current.noIsolation;w&&h.cancelable&&h.preventDefault()}}},[]),l=S.useCallback(function(y,h,_,f){var b={name:y,delta:h,target:_,should:f,shadowParent:oy(_)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(w){return w!==b})},1)},[]),u=S.useCallback(function(y){r.current=ps(y),n.current=void 0},[]),p=S.useCallback(function(y){l(y.type,Il(y),y.target,i(y,e.lockRef.current))},[]),m=S.useCallback(function(y){l(y.type,ps(y),y.target,i(y,e.lockRef.current))},[]);S.useEffect(function(){return Br.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Ur),document.addEventListener("touchmove",c,Ur),document.addEventListener("touchstart",u,Ur),function(){Br=Br.filter(function(y){return y!==o}),document.removeEventListener("wheel",c,Ur),document.removeEventListener("touchmove",c,Ur),document.removeEventListener("touchstart",u,Ur)}},[]);var v=e.removeScrollBar,x=e.inert;return S.createElement(S.Fragment,null,x?S.createElement(o,{styles:ry(s)}):null,v?S.createElement(Gv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function oy(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ay=Ov(jl,sy);var La=S.forwardRef(function(e,t){return S.createElement(ms,Ft({},e,{ref:t,sideCar:ay}))});La.classNames=ms.classNames;var iy=[" ","Enter","ArrowUp","ArrowDown"],cy=[" ","Enter"],$r="Select",[gs,vs,ly]=kc($r),[Wr]=Ot($r,[ly,is]),ys=is(),[uy,ur]=Wr($r),[dy,fy]=Wr($r),Ml=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:o,value:a,defaultValue:i,onValueChange:c,dir:l,name:u,autoComplete:p,disabled:m,required:v,form:x}=e,y=ys(t),[h,_]=S.useState(null),[f,b]=S.useState(null),[w,g]=S.useState(!1),$=ha(l),[E,k]=wr({prop:n,defaultProp:s??!1,onChange:o,caller:$r}),[I,z]=wr({prop:a,defaultProp:i,onChange:c,caller:$r}),M=S.useRef(null),V=h?x||!!h.closest("form"):!0,[F,W]=S.useState(new Set),re=Array.from(F).map(Y=>Y.props.value).join(";");return d.jsx(vl,{...y,children:d.jsxs(uy,{required:v,scope:t,trigger:h,onTriggerChange:_,valueNode:f,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:g,contentId:ir(),value:I,onValueChange:z,open:E,onOpenChange:k,dir:$,triggerPointerDownPosRef:M,disabled:m,children:[d.jsx(gs.Provider,{scope:t,children:d.jsx(dy,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(Y=>{W(ae=>new Set(ae).add(Y))},[]),onNativeOptionRemove:S.useCallback(Y=>{W(ae=>{const L=new Set(ae);return L.delete(Y),L})},[]),children:r})}),V?d.jsxs(ou,{"aria-hidden":!0,required:v,tabIndex:-1,name:u,autoComplete:p,value:I,onChange:Y=>z(Y.target.value),disabled:m,form:x,children:[I===void 0?d.jsx("option",{value:""}):null,Array.from(F)]},re):null]})})};Ml.displayName=$r;var Vl="SelectTrigger",Fl=S.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=ys(r),a=ur(Vl,r),i=a.disabled||n,c=qe(t,a.onTriggerChange),l=vs(r),u=S.useRef("touch"),[p,m,v]=iu(y=>{const h=l().filter(b=>!b.disabled),_=h.find(b=>b.value===a.value),f=cu(h,y,_);f!==void 0&&a.onValueChange(f.value)}),x=y=>{i||(a.onOpenChange(!0),v()),y&&(a.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return d.jsx(yl,{asChild:!0,...o,children:d.jsx(Ae.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":au(a.value)?"":void 0,...s,ref:c,onClick:$e(s.onClick,y=>{y.currentTarget.focus(),u.current!=="mouse"&&x(y)}),onPointerDown:$e(s.onPointerDown,y=>{u.current=y.pointerType;const h=y.target;h.hasPointerCapture(y.pointerId)&&h.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(x(y),y.preventDefault())}),onKeyDown:$e(s.onKeyDown,y=>{const h=p.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&m(y.key),!(h&&y.key===" ")&&iy.includes(y.key)&&(x(),y.preventDefault())})})})});Fl.displayName=Vl;var Ll="SelectValue",zl=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:a="",...i}=e,c=ur(Ll,r),{onValueNodeHasChildrenChange:l}=c,u=o!==void 0,p=qe(t,c.onValueNodeChange);return ct(()=>{l(u)},[l,u]),d.jsx(Ae.span,{...i,ref:p,style:{pointerEvents:"none"},children:au(c.value)?d.jsx(d.Fragment,{children:a}):o})});zl.displayName=Ll;var my="SelectIcon",ql=S.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return d.jsx(Ae.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});ql.displayName=my;var hy="SelectPortal",Ul=e=>d.jsx(cs,{asChild:!0,...e});Ul.displayName=hy;var Sr="SelectContent",Bl=S.forwardRef((e,t)=>{const r=ur(Sr,e.__scopeSelect),[n,s]=S.useState();if(ct(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?qn.createPortal(d.jsx(Wl,{scope:e.__scopeSelect,children:d.jsx(gs.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),o):null}return d.jsx(Hl,{...e,ref:t})});Bl.displayName=Sr;var jt=10,[Wl,dr]=Wr(Sr),py="SelectContentImpl",gy=dv("SelectContent.RemoveScroll"),Hl=S.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:a,side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:p,collisionBoundary:m,collisionPadding:v,sticky:x,hideWhenDetached:y,avoidCollisions:h,..._}=e,f=ur(Sr,r),[b,w]=S.useState(null),[g,$]=S.useState(null),E=qe(t,B=>w(B)),[k,I]=S.useState(null),[z,M]=S.useState(null),V=vs(r),[F,W]=S.useState(!1),re=S.useRef(!1);S.useEffect(()=>{if(b)return Sl(b)},[b]),Ac();const Y=S.useCallback(B=>{const[Q,...pe]=V().map(A=>A.ref.current),[ie]=pe.slice(-1),N=document.activeElement;for(const A of B)if(A===N||(A==null||A.scrollIntoView({block:"nearest"}),A===Q&&g&&(g.scrollTop=0),A===ie&&g&&(g.scrollTop=g.scrollHeight),A==null||A.focus(),document.activeElement!==N))return},[V,g]),ae=S.useCallback(()=>Y([k,b]),[Y,k,b]);S.useEffect(()=>{F&&ae()},[F,ae]);const{onOpenChange:L,triggerPointerDownPosRef:ve}=f;S.useEffect(()=>{if(b){let B={x:0,y:0};const Q=ie=>{var N,A;B={x:Math.abs(Math.round(ie.pageX)-(((N=ve.current)==null?void 0:N.x)??0)),y:Math.abs(Math.round(ie.pageY)-(((A=ve.current)==null?void 0:A.y)??0))}},pe=ie=>{B.x<=10&&B.y<=10?ie.preventDefault():b.contains(ie.target)||L(!1),document.removeEventListener("pointermove",Q),ve.current=null};return ve.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",pe,{capture:!0})}}},[b,L,ve]),S.useEffect(()=>{const B=()=>L(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[L]);const[G,T]=iu(B=>{const Q=V().filter(N=>!N.disabled),pe=Q.find(N=>N.ref.current===document.activeElement),ie=cu(Q,B,pe);ie&&setTimeout(()=>ie.ref.current.focus())}),K=S.useCallback((B,Q,pe)=>{const ie=!re.current&&!pe;(f.value!==void 0&&f.value===Q||ie)&&(I(B),ie&&(re.current=!0))},[f.value]),O=S.useCallback(()=>b==null?void 0:b.focus(),[b]),C=S.useCallback((B,Q,pe)=>{const ie=!re.current&&!pe;(f.value!==void 0&&f.value===Q||ie)&&M(B)},[f.value]),R=n==="popper"?za:Gl,q=R===za?{side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:p,collisionBoundary:m,collisionPadding:v,sticky:x,hideWhenDetached:y,avoidCollisions:h}:{};return d.jsx(Wl,{scope:r,content:b,viewport:g,onViewportChange:$,itemRefCallback:K,selectedItem:k,onItemLeave:O,itemTextRefCallback:C,focusSelectedItem:ae,selectedItemText:z,position:n,isPositioned:F,searchRef:G,children:d.jsx(La,{as:gy,allowPinchZoom:!0,children:d.jsx(ba,{asChild:!0,trapped:f.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:$e(s,B=>{var Q;(Q=f.trigger)==null||Q.focus({preventScroll:!0}),B.preventDefault()}),children:d.jsx(Yn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>f.onOpenChange(!1),children:d.jsx(R,{role:"listbox",id:f.contentId,"data-state":f.open?"open":"closed",dir:f.dir,onContextMenu:B=>B.preventDefault(),..._,...q,onPlaced:()=>W(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:$e(_.onKeyDown,B=>{const Q=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!Q&&B.key.length===1&&T(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let ie=V().filter(N=>!N.disabled).map(N=>N.ref.current);if(["ArrowUp","End"].includes(B.key)&&(ie=ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const N=B.target,A=ie.indexOf(N);ie=ie.slice(A+1)}setTimeout(()=>Y(ie)),B.preventDefault()}})})})})})})});Hl.displayName=py;var vy="SelectItemAlignedPosition",Gl=S.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=ur(Sr,r),a=dr(Sr,r),[i,c]=S.useState(null),[l,u]=S.useState(null),p=qe(t,E=>u(E)),m=vs(r),v=S.useRef(!1),x=S.useRef(!0),{viewport:y,selectedItem:h,selectedItemText:_,focusSelectedItem:f}=a,b=S.useCallback(()=>{if(o.trigger&&o.valueNode&&i&&l&&y&&h&&_){const E=o.trigger.getBoundingClientRect(),k=l.getBoundingClientRect(),I=o.valueNode.getBoundingClientRect(),z=_.getBoundingClientRect();if(o.dir!=="rtl"){const N=z.left-k.left,A=I.left-N,H=E.left-A,J=E.width+H,le=Math.max(J,k.width),ye=window.innerWidth-jt,He=Sc(A,[jt,Math.max(jt,ye-le)]);i.style.minWidth=J+"px",i.style.left=He+"px"}else{const N=k.right-z.right,A=window.innerWidth-I.right-N,H=window.innerWidth-E.right-A,J=E.width+H,le=Math.max(J,k.width),ye=window.innerWidth-jt,He=Sc(A,[jt,Math.max(jt,ye-le)]);i.style.minWidth=J+"px",i.style.right=He+"px"}const M=m(),V=window.innerHeight-jt*2,F=y.scrollHeight,W=window.getComputedStyle(l),re=parseInt(W.borderTopWidth,10),Y=parseInt(W.paddingTop,10),ae=parseInt(W.borderBottomWidth,10),L=parseInt(W.paddingBottom,10),ve=re+Y+F+L+ae,G=Math.min(h.offsetHeight*5,ve),T=window.getComputedStyle(y),K=parseInt(T.paddingTop,10),O=parseInt(T.paddingBottom,10),C=E.top+E.height/2-jt,R=V-C,q=h.offsetHeight/2,B=h.offsetTop+q,Q=re+Y+B,pe=ve-Q;if(Q<=C){const N=M.length>0&&h===M[M.length-1].ref.current;i.style.bottom="0px";const A=l.clientHeight-y.offsetTop-y.offsetHeight,H=Math.max(R,q+(N?O:0)+A+ae),J=Q+H;i.style.height=J+"px"}else{const N=M.length>0&&h===M[0].ref.current;i.style.top="0px";const H=Math.max(C,re+y.offsetTop+(N?K:0)+q)+pe;i.style.height=H+"px",y.scrollTop=Q-C+y.offsetTop}i.style.margin=`${jt}px 0`,i.style.minHeight=G+"px",i.style.maxHeight=V+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[m,o.trigger,o.valueNode,i,l,y,h,_,o.dir,n]);ct(()=>b(),[b]);const[w,g]=S.useState();ct(()=>{l&&g(window.getComputedStyle(l).zIndex)},[l]);const $=S.useCallback(E=>{E&&x.current===!0&&(b(),f==null||f(),x.current=!1)},[b,f]);return d.jsx(by,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:v,onScrollButtonChange:$,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:d.jsx(Ae.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Gl.displayName=vy;var yy="SelectPopperPosition",za=S.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=jt,...o}=e,a=ys(r);return d.jsx(bl,{...a,...o,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});za.displayName=yy;var[by,qa]=Wr(Sr,{}),Ua="SelectViewport",Kl=S.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=dr(Ua,r),a=qa(Ua,r),i=qe(t,o.onViewportChange),c=S.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),d.jsx(gs.Slot,{scope:r,children:d.jsx(Ae.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:$e(s.onScroll,l=>{const u=l.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:m}=a;if(m!=null&&m.current&&p){const v=Math.abs(c.current-u.scrollTop);if(v>0){const x=window.innerHeight-jt*2,y=parseFloat(p.style.minHeight),h=parseFloat(p.style.height),_=Math.max(y,h);if(_<x){const f=_+v,b=Math.min(x,f),w=f-b;p.style.height=b+"px",p.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,p.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});Kl.displayName=Ua;var Zl="SelectGroup",[_y,xy]=Wr(Zl),wy=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=ir();return d.jsx(_y,{scope:r,id:s,children:d.jsx(Ae.div,{role:"group","aria-labelledby":s,...n,ref:t})})});wy.displayName=Zl;var Yl="SelectLabel",$y=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=xy(Yl,r);return d.jsx(Ae.div,{id:s.id,...n,ref:t})});$y.displayName=Yl;var bs="SelectItem",[Sy,Jl]=Wr(bs),Xl=S.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...a}=e,i=ur(bs,r),c=dr(bs,r),l=i.value===n,[u,p]=S.useState(o??""),[m,v]=S.useState(!1),x=qe(t,f=>{var b;return(b=c.itemRefCallback)==null?void 0:b.call(c,f,n,s)}),y=ir(),h=S.useRef("touch"),_=()=>{s||(i.onValueChange(n),i.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Sy,{scope:r,value:n,disabled:s,textId:y,isSelected:l,onItemTextChange:S.useCallback(f=>{p(b=>b||((f==null?void 0:f.textContent)??"").trim())},[]),children:d.jsx(gs.ItemSlot,{scope:r,value:n,disabled:s,textValue:u,children:d.jsx(Ae.div,{role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":l&&m,"data-state":l?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:x,onFocus:$e(a.onFocus,()=>v(!0)),onBlur:$e(a.onBlur,()=>v(!1)),onClick:$e(a.onClick,()=>{h.current!=="mouse"&&_()}),onPointerUp:$e(a.onPointerUp,()=>{h.current==="mouse"&&_()}),onPointerDown:$e(a.onPointerDown,f=>{h.current=f.pointerType}),onPointerMove:$e(a.onPointerMove,f=>{var b;h.current=f.pointerType,s?(b=c.onItemLeave)==null||b.call(c):h.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:$e(a.onPointerLeave,f=>{var b;f.currentTarget===document.activeElement&&((b=c.onItemLeave)==null||b.call(c))}),onKeyDown:$e(a.onKeyDown,f=>{var w;((w=c.searchRef)==null?void 0:w.current)!==""&&f.key===" "||(cy.includes(f.key)&&_(),f.key===" "&&f.preventDefault())})})})})});Xl.displayName=bs;var En="SelectItemText",Ql=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,a=ur(En,r),i=dr(En,r),c=Jl(En,r),l=fy(En,r),[u,p]=S.useState(null),m=qe(t,_=>p(_),c.onItemTextChange,_=>{var f;return(f=i.itemTextRefCallback)==null?void 0:f.call(i,_,c.value,c.disabled)}),v=u==null?void 0:u.textContent,x=S.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:h}=l;return ct(()=>(y(x),()=>h(x)),[y,h,x]),d.jsxs(d.Fragment,{children:[d.jsx(Ae.span,{id:c.textId,...o,ref:m}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?qn.createPortal(o.children,a.valueNode):null]})});Ql.displayName=En;var eu="SelectItemIndicator",tu=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return Jl(eu,r).isSelected?d.jsx(Ae.span,{"aria-hidden":!0,...n,ref:t}):null});tu.displayName=eu;var Ba="SelectScrollUpButton",ru=S.forwardRef((e,t)=>{const r=dr(Ba,e.__scopeSelect),n=qa(Ba,e.__scopeSelect),[s,o]=S.useState(!1),a=qe(t,n.onScrollButtonChange);return ct(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollTop>0;o(l)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),s?d.jsx(su,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});ru.displayName=Ba;var Wa="SelectScrollDownButton",nu=S.forwardRef((e,t)=>{const r=dr(Wa,e.__scopeSelect),n=qa(Wa,e.__scopeSelect),[s,o]=S.useState(!1),a=qe(t,n.onScrollButtonChange);return ct(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;o(u)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),s?d.jsx(su,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});nu.displayName=Wa;var su=S.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=dr("SelectScrollButton",r),a=S.useRef(null),i=vs(r),c=S.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),ct(()=>{var u;const l=i().find(p=>p.ref.current===document.activeElement);(u=l==null?void 0:l.ref.current)==null||u.scrollIntoView({block:"nearest"})},[i]),d.jsx(Ae.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:$e(s.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:$e(s.onPointerMove,()=>{var l;(l=o.onItemLeave)==null||l.call(o),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:$e(s.onPointerLeave,()=>{c()})})}),Ey="SelectSeparator",Cy=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return d.jsx(Ae.div,{"aria-hidden":!0,...n,ref:t})});Cy.displayName=Ey;var Ha="SelectArrow",ky=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=ys(r),o=ur(Ha,r),a=dr(Ha,r);return o.open&&a.position==="popper"?d.jsx(_l,{...s,...n,ref:t}):null});ky.displayName=Ha;var jy="SelectBubbleInput",ou=S.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const s=S.useRef(null),o=qe(n,s),a=Oa(t);return S.useEffect(()=>{const i=s.current;if(!i)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&u){const p=new Event("change",{bubbles:!0});u.call(i,t),i.dispatchEvent(p)}},[a,t]),d.jsx(Ae.select,{...r,style:{...xl,...r.style},ref:o,defaultValue:t})});ou.displayName=jy;function au(e){return e===""||e===void 0}function iu(e){const t=or(e),r=S.useRef(""),n=S.useRef(0),s=S.useCallback(a=>{const i=r.current+a;t(i),(function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))})(i)},[t]),o=S.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function cu(e,t,r){const s=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let a=Ry(e,Math.max(o,0));s.length===1&&(a=a.filter(l=>l!==r));const c=a.find(l=>l.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function Ry(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Py=Ml,Ny=Fl,Ay=zl,Ty=ql,Oy=Ul,Iy=Bl,Dy=Kl,My=Xl,Vy=Ql,Fy=tu,Ly=ru,zy=nu;/**
71
- * @license lucide-react v0.525.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */const qy=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Uy=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),lu=e=>{const t=Uy(e);return t.charAt(0).toUpperCase()+t.slice(1)},uu=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),By=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
76
- * @license lucide-react v0.525.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */var Wy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
81
- * @license lucide-react v0.525.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */const Hy=Z.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:a,...i},c)=>Z.createElement("svg",{ref:c,...Wy,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:uu("lucide",s),...!o&&!By(i)&&{"aria-hidden":"true"},...i},[...a.map(([l,u])=>Z.createElement(l,u)),...Array.isArray(o)?o:[o]]));/**
86
- * @license lucide-react v0.525.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const Gt=(e,t)=>{const r=Z.forwardRef(({className:n,...s},o)=>Z.createElement(Hy,{ref:o,iconNode:t,className:uu(`lucide-${qy(lu(e))}`,`lucide-${e}`,n),...s}));return r.displayName=lu(e),r};/**
91
- * @license lucide-react v0.525.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const du=Gt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
96
- * @license lucide-react v0.525.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */const fu=Gt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
101
- * @license lucide-react v0.525.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const Gy=Gt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
106
- * @license lucide-react v0.525.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const mu=Gt("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
111
- * @license lucide-react v0.525.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const Ky=Gt("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
116
- * @license lucide-react v0.525.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const hu=Gt("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
121
- * @license lucide-react v0.525.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const Zy=Gt("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
126
- * @license lucide-react v0.525.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const pu=Gt("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
131
- * @license lucide-react v0.525.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const gu=Gt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function vu(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=vu(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function yu(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=vu(e))&&(n&&(n+=" "),n+=t);return n}const Yy=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Jy=(e,t)=>({classGroupId:e,validator:t}),bu=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),_s="-",_u=[],Xy="arbitrary..",Qy=e=>{const t=tb(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return eb(a);const i=a.split(_s),c=i[0]===""&&i.length>1?1:0;return xu(i,c,t)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=n[a],l=r[a];return c?l?Yy(l,c):c:l||_u}return r[a]||_u}}},xu=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const s=e[t],o=r.nextPart.get(s);if(o){const l=xu(e,t+1,o);if(l)return l}const a=r.validators;if(a===null)return;const i=t===0?e.join(_s):e.slice(t).join(_s),c=a.length;for(let l=0;l<c;l++){const u=a[l];if(u.validator(i))return u.classGroupId}},eb=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Xy+n:void 0})(),tb=e=>{const{theme:t,classGroups:r}=e;return rb(r,t)},rb=(e,t)=>{const r=bu();for(const n in e){const s=e[n];Ga(s,r,n,t)}return r},Ga=(e,t,r,n)=>{const s=e.length;for(let o=0;o<s;o++){const a=e[o];nb(a,t,r,n)}},nb=(e,t,r,n)=>{if(typeof e=="string"){sb(e,t,r);return}if(typeof e=="function"){ob(e,t,r,n);return}ab(e,t,r,n)},sb=(e,t,r)=>{const n=e===""?t:wu(t,e);n.classGroupId=r},ob=(e,t,r,n)=>{if(ib(e)){Ga(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Jy(r,e))},ab=(e,t,r,n)=>{const s=Object.entries(e),o=s.length;for(let a=0;a<o;a++){const[i,c]=s[a];Ga(c,wu(t,i),r,n)}},wu=(e,t)=>{let r=e;const n=t.split(_s),s=n.length;for(let o=0;o<s;o++){const a=n[o];let i=r.nextPart.get(a);i||(i=bu(),r.nextPart.set(a,i)),r=i}return r},ib=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,cb=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const s=(o,a)=>{r[o]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(o){let a=r[o];if(a!==void 0)return a;if((a=n[o])!==void 0)return s(o,a),a},set(o,a){o in r?r[o]=a:s(o,a)}}},Ka="!",$u=":",lb=[],Su=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),ub=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const o=[];let a=0,i=0,c=0,l;const u=s.length;for(let y=0;y<u;y++){const h=s[y];if(a===0&&i===0){if(h===$u){o.push(s.slice(c,y)),c=y+1;continue}if(h==="/"){l=y;continue}}h==="["?a++:h==="]"?a--:h==="("?i++:h===")"&&i--}const p=o.length===0?s:s.slice(c);let m=p,v=!1;p.endsWith(Ka)?(m=p.slice(0,-1),v=!0):p.startsWith(Ka)&&(m=p.slice(1),v=!0);const x=l&&l>c?l-c:void 0;return Su(o,v,m,x)};if(t){const s=t+$u,o=n;n=a=>a.startsWith(s)?o(a.slice(s.length)):Su(lb,!1,a,void 0,!0)}if(r){const s=n;n=o=>r({className:o,parseClassName:s})}return n},db=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let s=[];for(let o=0;o<r.length;o++){const a=r[o],i=a[0]==="[",c=t.has(a);i||c?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(a)):s.push(a)}return s.length>0&&(s.sort(),n.push(...s)),n}},fb=e=>({cache:cb(e.cacheSize),parseClassName:ub(e),sortModifiers:db(e),...Qy(e)}),mb=/\s+/,hb=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:o}=t,a=[],i=e.trim().split(mb);let c="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{isExternal:p,modifiers:m,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:y}=r(u);if(p){c=u+(c.length>0?" "+c:c);continue}let h=!!y,_=n(h?x.substring(0,y):x);if(!_){if(!h){c=u+(c.length>0?" "+c:c);continue}if(_=n(x),!_){c=u+(c.length>0?" "+c:c);continue}h=!1}const f=m.length===0?"":m.length===1?m[0]:o(m).join(":"),b=v?f+Ka:f,w=b+_;if(a.indexOf(w)>-1)continue;a.push(w);const g=s(_,h);for(let $=0;$<g.length;++$){const E=g[$];a.push(b+E)}c=u+(c.length>0?" "+c:c)}return c},pb=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=Eu(r))&&(s&&(s+=" "),s+=n);return s},Eu=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Eu(e[n]))&&(r&&(r+=" "),r+=t);return r},gb=(e,...t)=>{let r,n,s,o;const a=c=>{const l=t.reduce((u,p)=>p(u),e());return r=fb(l),n=r.cache.get,s=r.cache.set,o=i,i(c)},i=c=>{const l=n(c);if(l)return l;const u=hb(c,r);return s(c,u),u};return o=a,(...c)=>o(pb(...c))},vb=[],rt=e=>{const t=r=>r[e]||vb;return t.isThemeGetter=!0,t},Cu=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ku=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yb=/^\d+\/\d+$/,bb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_b=/\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$/,xb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$b=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hr=e=>yb.test(e),je=e=>!!e&&!Number.isNaN(Number(e)),fr=e=>!!e&&Number.isInteger(Number(e)),Za=e=>e.endsWith("%")&&je(e.slice(0,-1)),Kt=e=>bb.test(e),Sb=()=>!0,Eb=e=>_b.test(e)&&!xb.test(e),ju=()=>!1,Cb=e=>wb.test(e),kb=e=>$b.test(e),jb=e=>!de(e)&&!fe(e),Rb=e=>Gr(e,Tu,ju),de=e=>Cu.test(e),Er=e=>Gr(e,Ou,Eb),Ya=e=>Gr(e,Ob,je),Ru=e=>Gr(e,Nu,ju),Pb=e=>Gr(e,Au,kb),xs=e=>Gr(e,Iu,Cb),fe=e=>ku.test(e),Cn=e=>Kr(e,Ou),Nb=e=>Kr(e,Ib),Pu=e=>Kr(e,Nu),Ab=e=>Kr(e,Tu),Tb=e=>Kr(e,Au),ws=e=>Kr(e,Iu,!0),Gr=(e,t,r)=>{const n=Cu.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Kr=(e,t,r=!1)=>{const n=ku.exec(e);return n?n[1]?t(n[1]):r:!1},Nu=e=>e==="position"||e==="percentage",Au=e=>e==="image"||e==="url",Tu=e=>e==="length"||e==="size"||e==="bg-size",Ou=e=>e==="length",Ob=e=>e==="number",Ib=e=>e==="family-name",Iu=e=>e==="shadow",Db=gb(()=>{const e=rt("color"),t=rt("font"),r=rt("text"),n=rt("font-weight"),s=rt("tracking"),o=rt("leading"),a=rt("breakpoint"),i=rt("container"),c=rt("spacing"),l=rt("radius"),u=rt("shadow"),p=rt("inset-shadow"),m=rt("text-shadow"),v=rt("drop-shadow"),x=rt("blur"),y=rt("perspective"),h=rt("aspect"),_=rt("ease"),f=rt("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],g=()=>[...w(),fe,de],$=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],k=()=>[fe,de,c],I=()=>[Hr,"full","auto",...k()],z=()=>[fr,"none","subgrid",fe,de],M=()=>["auto",{span:["full",fr,fe,de]},fr,fe,de],V=()=>[fr,"auto",fe,de],F=()=>["auto","min","max","fr",fe,de],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...k()],ae=()=>[Hr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],L=()=>[e,fe,de],ve=()=>[...w(),Pu,Ru,{position:[fe,de]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",Ab,Rb,{size:[fe,de]}],K=()=>[Za,Cn,Er],O=()=>["","none","full",l,fe,de],C=()=>["",je,Cn,Er],R=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>[je,Za,Pu,Ru],Q=()=>["","none",x,fe,de],pe=()=>["none",je,fe,de],ie=()=>["none",je,fe,de],N=()=>[je,fe,de],A=()=>[Hr,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Kt],breakpoint:[Kt],color:[Sb],container:[Kt],"drop-shadow":[Kt],ease:["in","out","in-out"],font:[jb],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Kt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Kt],shadow:[Kt],spacing:["px",je],text:[Kt],"text-shadow":[Kt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Hr,de,fe,h]}],container:["container"],columns:[{columns:[je,de,fe,i]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"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"],sr:["sr-only","not-sr-only"],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:g()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[fr,"auto",fe,de]}],basis:[{basis:[Hr,"full","auto",i,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,Hr,"auto","initial","none",de]}],grow:[{grow:["",je,fe,de]}],shrink:[{shrink:["",je,fe,de]}],order:[{order:[fr,"first","last","none",fe,de]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:ae()}],w:[{w:[i,"screen",...ae()]}],"min-w":[{"min-w":[i,"screen","none",...ae()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...ae()]}],h:[{h:["screen","lh",...ae()]}],"min-h":[{"min-h":["screen","lh","none",...ae()]}],"max-h":[{"max-h":["screen","lh",...ae()]}],"font-size":[{text:["base",r,Cn,Er]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,fe,Ya]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Za,de]}],"font-family":[{font:[Nb,de,t]}],"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:[s,fe,de]}],"line-clamp":[{"line-clamp":[je,"none",fe,Ya]}],leading:[{leading:[o,...k()]}],"list-image":[{"list-image":["none",fe,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",fe,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",fe,Er]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[je,"auto",fe,de]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe,de]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",fe,de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ve()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fr,fe,de],radial:["",fe,de],conic:[fr,fe,de]},Tb,Pb]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:O()}],"rounded-s":[{"rounded-s":O()}],"rounded-e":[{"rounded-e":O()}],"rounded-t":[{"rounded-t":O()}],"rounded-r":[{"rounded-r":O()}],"rounded-b":[{"rounded-b":O()}],"rounded-l":[{"rounded-l":O()}],"rounded-ss":[{"rounded-ss":O()}],"rounded-se":[{"rounded-se":O()}],"rounded-ee":[{"rounded-ee":O()}],"rounded-es":[{"rounded-es":O()}],"rounded-tl":[{"rounded-tl":O()}],"rounded-tr":[{"rounded-tr":O()}],"rounded-br":[{"rounded-br":O()}],"rounded-bl":[{"rounded-bl":O()}],"border-w":[{border:C()}],"border-w-x":[{"border-x":C()}],"border-w-y":[{"border-y":C()}],"border-w-s":[{"border-s":C()}],"border-w-e":[{"border-e":C()}],"border-w-t":[{"border-t":C()}],"border-w-r":[{"border-r":C()}],"border-w-b":[{"border-b":C()}],"border-w-l":[{"border-l":C()}],"divide-x":[{"divide-x":C()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":C()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...R(),"hidden","none"]}],"divide-style":[{divide:[...R(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...R(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,fe,de]}],"outline-w":[{outline:["",je,Cn,Er]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",u,ws,xs]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",p,ws,xs]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:C()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[je,Er]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":C()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",m,ws,xs]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[je,fe,de]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":B()}],"mask-image-linear-to-pos":[{"mask-linear-to":B()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":B()}],"mask-image-t-to-pos":[{"mask-t-to":B()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":B()}],"mask-image-r-to-pos":[{"mask-r-to":B()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":B()}],"mask-image-b-to-pos":[{"mask-b-to":B()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":B()}],"mask-image-l-to-pos":[{"mask-l-to":B()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":B()}],"mask-image-x-to-pos":[{"mask-x-to":B()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":B()}],"mask-image-y-to-pos":[{"mask-y-to":B()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[fe,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":B()}],"mask-image-radial-to-pos":[{"mask-radial-to":B()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":B()}],"mask-image-conic-to-pos":[{"mask-conic-to":B()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ve()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",fe,de]}],filter:[{filter:["","none",fe,de]}],blur:[{blur:Q()}],brightness:[{brightness:[je,fe,de]}],contrast:[{contrast:[je,fe,de]}],"drop-shadow":[{"drop-shadow":["","none",v,ws,xs]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",je,fe,de]}],"hue-rotate":[{"hue-rotate":[je,fe,de]}],invert:[{invert:["",je,fe,de]}],saturate:[{saturate:[je,fe,de]}],sepia:[{sepia:["",je,fe,de]}],"backdrop-filter":[{"backdrop-filter":["","none",fe,de]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[je,fe,de]}],"backdrop-contrast":[{"backdrop-contrast":[je,fe,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,fe,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,fe,de]}],"backdrop-invert":[{"backdrop-invert":["",je,fe,de]}],"backdrop-opacity":[{"backdrop-opacity":[je,fe,de]}],"backdrop-saturate":[{"backdrop-saturate":[je,fe,de]}],"backdrop-sepia":[{"backdrop-sepia":["",je,fe,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",fe,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",fe,de]}],ease:[{ease:["linear","initial",_,fe,de]}],delay:[{delay:[je,fe,de]}],animate:[{animate:["none",f,fe,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,fe,de]}],"perspective-origin":[{"perspective-origin":g()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:N()}],"skew-x":[{"skew-x":N()}],"skew-y":[{"skew-y":N()}],transform:[{transform:[fe,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:g()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:A()}],"translate-x":[{"translate-x":A()}],"translate-y":[{"translate-y":A()}],"translate-z":[{"translate-z":A()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",fe,de]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",fe,de]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[je,Cn,Er,Ya]}],stroke:[{stroke:["none",...L()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Se(...e){return Db(yu(e))}function Zr({...e}){return d.jsx(Py,{"data-slot":"select",...e})}function Yr({...e}){return d.jsx(Ay,{"data-slot":"select-value",...e})}function Jr({className:e,size:t="default",children:r,...n}){return d.jsxs(Ny,{"data-slot":"select-trigger","data-size":t,className:Se("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,d.jsx(Ty,{asChild:!0,children:d.jsx(fu,{className:"size-4 opacity-50"})})]})}function Xr({className:e,children:t,position:r="popper",...n}){return d.jsx(Oy,{children:d.jsxs(Iy,{"data-slot":"select-content",className:Se("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[d.jsx(Mb,{}),d.jsx(Dy,{className:Se("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(Vb,{})]})})}function Lt({className:e,children:t,...r}){return d.jsxs(My,{"data-slot":"select-item",className:Se("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(Fy,{children:d.jsx(du,{className:"size-4"})})}),d.jsx(Vy,{children:t})]})}function Mb({className:e,...t}){return d.jsx(Ly,{"data-slot":"select-scroll-up-button",className:Se("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Gy,{className:"size-4"})})}function Vb({className:e,...t}){return d.jsx(zy,{"data-slot":"select-scroll-down-button",className:Se("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(fu,{className:"size-4"})})}const Fe=Z.forwardRef(({className:e,type:t,...r},n)=>d.jsx("input",{type:t,"data-slot":"input",className:Se("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r}));Fe.displayName="Input";var Fb=Symbol.for("react.lazy"),$s=S[" use ".trim().toString()];function Lb(e){return typeof e=="object"&&e!==null&&"then"in e}function Du(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Fb&&"_payload"in e&&Lb(e._payload)}function Ja(e){const t=zb(e),r=S.forwardRef((n,s)=>{let{children:o,...a}=n;Du(o)&&typeof $s=="function"&&(o=$s(o._payload));const i=S.Children.toArray(o),c=i.find(Ub);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var Xa=Ja("Slot");function zb(e){const t=S.forwardRef((r,n)=>{let{children:s,...o}=r;if(Du(s)&&typeof $s=="function"&&(s=$s(s._payload)),S.isValidElement(s)){const a=Wb(s),i=Bb(o,s.props);return s.type!==S.Fragment&&(i.ref=n?Dr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qb=Symbol("radix.slottable");function Ub(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qb}function Bb(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function Wb(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const Mu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Vu=yu,Fu=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Vu(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,a=Object.keys(s).map(l=>{const u=r==null?void 0:r[l],p=o==null?void 0:o[l];if(u===null)return null;const m=Mu(u)||Mu(p);return s[l][m]}),i=r&&Object.entries(r).reduce((l,u)=>{let[p,m]=u;return m===void 0||(l[p]=m),l},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,u)=>{let{class:p,className:m,...v}=u;return Object.entries(v).every(x=>{let[y,h]=x;return Array.isArray(h)?h.includes({...o,...i}[y]):{...o,...i}[y]===h})?[...l,p,m]:l},[]);return Vu(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)},Qa=Fu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),mr=Z.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const a=n?Xa:"button";return d.jsx(a,{"data-slot":"button",ref:o,className:Se(Qa({variant:t,size:r,className:e})),...s})});function Hb(e,t){return S.useReducer((r,n)=>t[r][n]??r,e)}var hr=e=>{const{present:t,children:r}=e,n=Gb(t),s=typeof r=="function"?r({present:n.isPresent}):S.Children.only(r),o=qe(n.ref,Kb(s));return typeof r=="function"||n.isPresent?S.cloneElement(s,{ref:o}):null};hr.displayName="Presence";function Gb(e){const[t,r]=S.useState(),n=S.useRef(null),s=S.useRef(e),o=S.useRef("none"),a=e?"mounted":"unmounted",[i,c]=Hb(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const l=Ss(n.current);o.current=i==="mounted"?l:"none"},[i]),ct(()=>{const l=n.current,u=s.current;if(u!==e){const m=o.current,v=Ss(l);e?c("MOUNT"):v==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&m!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),ct(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,p=v=>{const y=Ss(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&y&&(c("ANIMATION_END"),!s.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},m=v=>{v.target===t&&(o.current=Ss(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:S.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function Ss(e){return(e==null?void 0:e.animationName)||"none"}function Kb(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Zb=Symbol("radix.slottable");function Yb(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Zb,t}var[Es]=Ot("Tooltip",[is]),Cs=is(),Lu="TooltipProvider",Jb=700,ei="tooltip.open",[Xb,ti]=Es(Lu),zu=e=>{const{__scopeTooltip:t,delayDuration:r=Jb,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,a=S.useRef(!0),i=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),d.jsx(Xb,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:S.useCallback(l=>{i.current=l},[]),disableHoverableContent:s,children:o})};zu.displayName=Lu;var kn="Tooltip",[Qb,jn]=Es(kn),qu=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s,onOpenChange:o,disableHoverableContent:a,delayDuration:i}=e,c=ti(kn,e.__scopeTooltip),l=Cs(t),[u,p]=S.useState(null),m=ir(),v=S.useRef(0),x=a??c.disableHoverableContent,y=i??c.delayDuration,h=S.useRef(!1),[_,f]=wr({prop:n,defaultProp:s??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(ei))):c.onClose(),o==null||o(E)},caller:kn}),b=S.useMemo(()=>_?h.current?"delayed-open":"instant-open":"closed",[_]),w=S.useCallback(()=>{window.clearTimeout(v.current),v.current=0,h.current=!1,f(!0)},[f]),g=S.useCallback(()=>{window.clearTimeout(v.current),v.current=0,f(!1)},[f]),$=S.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{h.current=!0,f(!0),v.current=0},y)},[y,f]);return S.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),d.jsx(vl,{...l,children:d.jsx(Qb,{scope:t,contentId:m,open:_,stateAttribute:b,trigger:u,onTriggerChange:p,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?$():w()},[c.isOpenDelayedRef,$,w]),onTriggerLeave:S.useCallback(()=>{x?g():(window.clearTimeout(v.current),v.current=0)},[g,x]),onOpen:w,onClose:g,disableHoverableContent:x,children:r})})};qu.displayName=kn;var ri="TooltipTrigger",Uu=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=jn(ri,r),o=ti(ri,r),a=Cs(r),i=S.useRef(null),c=qe(t,i,s.onTriggerChange),l=S.useRef(!1),u=S.useRef(!1),p=S.useCallback(()=>l.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),d.jsx(yl,{asChild:!0,...a,children:d.jsx(Ae.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:$e(e.onPointerMove,m=>{m.pointerType!=="touch"&&!u.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:$e(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:$e(e.onPointerDown,()=>{s.open&&s.onClose(),l.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:$e(e.onFocus,()=>{l.current||s.onOpen()}),onBlur:$e(e.onBlur,s.onClose),onClick:$e(e.onClick,s.onClose)})})});Uu.displayName=ri;var ni="TooltipPortal",[e_,t_]=Es(ni,{forceMount:void 0}),Bu=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:s}=e,o=jn(ni,t);return d.jsx(e_,{scope:t,forceMount:r,children:d.jsx(hr,{present:r||o.open,children:d.jsx(cs,{asChild:!0,container:s,children:n})})})};Bu.displayName=ni;var Qr="TooltipContent",Wu=S.forwardRef((e,t)=>{const r=t_(Qr,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,a=jn(Qr,e.__scopeTooltip);return d.jsx(hr,{present:n||a.open,children:a.disableHoverableContent?d.jsx(Hu,{side:s,...o,ref:t}):d.jsx(r_,{side:s,...o,ref:t})})}),r_=S.forwardRef((e,t)=>{const r=jn(Qr,e.__scopeTooltip),n=ti(Qr,e.__scopeTooltip),s=S.useRef(null),o=qe(t,s),[a,i]=S.useState(null),{trigger:c,onClose:l}=r,u=s.current,{onPointerInTransitChange:p}=n,m=S.useCallback(()=>{i(null),p(!1)},[p]),v=S.useCallback((x,y)=>{const h=x.currentTarget,_={x:x.clientX,y:x.clientY},f=a_(_,h.getBoundingClientRect()),b=i_(_,f),w=c_(y.getBoundingClientRect()),g=u_([...b,...w]);i(g),p(!0)},[p]);return S.useEffect(()=>()=>m(),[m]),S.useEffect(()=>{if(c&&u){const x=h=>v(h,u),y=h=>v(h,c);return c.addEventListener("pointerleave",x),u.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",x),u.removeEventListener("pointerleave",y)}}},[c,u,v,m]),S.useEffect(()=>{if(a){const x=y=>{const h=y.target,_={x:y.clientX,y:y.clientY},f=(c==null?void 0:c.contains(h))||(u==null?void 0:u.contains(h)),b=!l_(_,a);f?m():b&&(m(),l())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,u,a,l,m]),d.jsx(Hu,{...e,ref:o})}),[n_,s_]=Es(kn,{isInside:!1}),o_=Yb("TooltipContent"),Hu=S.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:a,...i}=e,c=jn(Qr,r),l=Cs(r),{onClose:u}=c;return S.useEffect(()=>(document.addEventListener(ei,u),()=>document.removeEventListener(ei,u)),[u]),S.useEffect(()=>{if(c.trigger){const p=m=>{const v=m.target;v!=null&&v.contains(c.trigger)&&u()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,u]),d.jsx(Yn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:u,children:d.jsxs(bl,{"data-state":c.stateAttribute,...l,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(o_,{children:n}),d.jsx(n_,{scope:r,isInside:!0,children:d.jsx(xv,{id:c.contentId,role:"tooltip",children:s||n})})]})})});Wu.displayName=Qr;var Gu="TooltipArrow",Ku=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Cs(r);return s_(Gu,r).isInside?null:d.jsx(_l,{...s,...n,ref:t})});Ku.displayName=Gu;function a_(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function i_(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function c_(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function l_(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const i=t[o],c=t[a],l=i.x,u=i.y,p=c.x,m=c.y;u>n!=m>n&&r<(p-l)*(n-u)/(m-u)+l&&(s=!s)}return s}function u_(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),d_(t)}function d_(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],a=r[r.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var f_=zu,m_=qu,h_=Uu,p_=Bu,g_=Wu,v_=Ku;function y_({delayDuration:e=0,...t}){return d.jsx(f_,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Zu({...e}){return d.jsx(y_,{children:d.jsx(m_,{"data-slot":"tooltip",...e})})}function Yu({...e}){return d.jsx(h_,{"data-slot":"tooltip-trigger",...e})}function Ju({className:e,sideOffset:t=0,children:r,...n}){return d.jsx(p_,{children:d.jsxs(g_,{"data-slot":"tooltip-content",sideOffset:t,className:Se("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...n,children:[r,d.jsx(v_,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const b_=({theme:e,readOnly:t,rootType:r,onAddField:n,onOpenSettings:s})=>{const{control:o}=at();return d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Fe,{value:"root",disabled:!0,className:"w-40"}),d.jsxs(Zr,{disabled:!0,value:r,children:[d.jsx(Jr,{className:"w-40",children:d.jsx(Yr,{})}),d.jsx(Xr,{className:`${e} max-h-52 bg-background text-foreground border-input`,children:d.jsx(Lt,{value:r,children:r})})]}),d.jsx(nr,{control:o,name:"root.title",render:({field:a})=>d.jsx(Fe,{placeholder:"Title",disabled:t,className:"flex-1",...a})}),d.jsx(nr,{control:o,name:"root.description",render:({field:a})=>d.jsx(Fe,{placeholder:"Description",disabled:t,className:"flex-1",...a})}),d.jsxs(Zu,{children:[d.jsx(Yu,{asChild:!0,children:d.jsx(mr,{disabled:!0,size:"icon",children:d.jsx(pu,{})})}),d.jsx(Ju,{children:d.jsx("p",{children:"Required"})})]}),d.jsx("div",{className:"border-l-2 border-input"}),d.jsx(mr,{size:"icon",variant:"ghost","data-testid":"root-settings-button",onClick:()=>s("root"),children:d.jsx(hu,{className:"text-blue-500"})}),r==="object"&&d.jsx(mr,{size:"icon",variant:"ghost","data-testid":"root-add-button",disabled:t,onClick:n,children:d.jsx(mu,{className:"text-green-500"})}),d.jsx("div",{})]})},ks={form:{width:"full",height:"md"},output:{position:"bottom",showJson:!0,width:"full",height:"md"},settings:{width:"md"},spacing:"md"},Xu={sm:"max-h-[300px]",md:"max-h-[500px]",lg:"max-h-[800px]",full:"max-h-full"},__={sm:300,md:500,lg:800,full:void 0},si={sm:"w-full max-w-[600px]",md:"w-full max-w-[800px]",lg:"w-full max-w-[1200px]",full:"w-full"},x_={sm:"sm:max-w-[500px]",md:"sm:max-w-[700px]",lg:"sm:max-w-[1000px]",full:"w-full sm:max-w-full"},w_={top:"flex-col-reverse",bottom:"flex-col",left:"flex-row-reverse",right:"flex-row"},Qu={sm:"gap-2",md:"gap-4",lg:"gap-6"},$_=["string","integer","number","boolean","object","array"],S_=["int-32","int-64"],E_=["float","double","big-decimal"],C_=["date","date-time","local-date-time","time","duration","email","hostname","ipv4","ipv6","password","html","json","json-path","uri","uri-refrence","uri-template","relative-json-pointer","json-pointer","regex","uuid"];function k_(e){const t=j_(e),r=S.forwardRef((n,s)=>{const{children:o,...a}=n,i=S.Children.toArray(o),c=i.find(P_);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:s,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function j_(e){const t=S.forwardRef((r,n)=>{const{children:s,...o}=r;if(S.isValidElement(s)){const a=A_(s),i=N_(o,s.props);return s.type!==S.Fragment&&(i.ref=n?Dr(n,a):a),S.cloneElement(s,i)}return S.Children.count(s)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var R_=Symbol("radix.slottable");function P_(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===R_}function N_(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...i)=>{const c=o(...i);return s(...i),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function A_(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var js="Dialog",[ed,td]=Ot(js),[T_,Rt]=ed(js),rd=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:a=!0}=e,i=S.useRef(null),c=S.useRef(null),[l,u]=wr({prop:n,defaultProp:s??!1,onChange:o,caller:js});return d.jsx(T_,{scope:t,triggerRef:i,contentRef:c,contentId:ir(),titleId:ir(),descriptionId:ir(),open:l,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(p=>!p),[u]),modal:a,children:r})};rd.displayName=js;var nd="DialogTrigger",sd=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Rt(nd,r),o=qe(t,s.triggerRef);return d.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":ii(s.open),...n,ref:o,onClick:$e(e.onClick,s.onOpenToggle)})});sd.displayName=nd;var oi="DialogPortal",[O_,od]=ed(oi,{forceMount:void 0}),ad=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=Rt(oi,t);return d.jsx(O_,{scope:t,forceMount:r,children:S.Children.map(n,a=>d.jsx(hr,{present:r||o.open,children:d.jsx(cs,{asChild:!0,container:s,children:a})}))})};ad.displayName=oi;var Rs="DialogOverlay",id=S.forwardRef((e,t)=>{const r=od(Rs,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Rt(Rs,e.__scopeDialog);return o.modal?d.jsx(hr,{present:n||o.open,children:d.jsx(D_,{...s,ref:t})}):null});id.displayName=Rs;var I_=k_("DialogOverlay.RemoveScroll"),D_=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Rt(Rs,r);return d.jsx(La,{as:I_,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(Ae.div,{"data-state":ii(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Cr="DialogContent",cd=S.forwardRef((e,t)=>{const r=od(Cr,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Rt(Cr,e.__scopeDialog);return d.jsx(hr,{present:n||o.open,children:o.modal?d.jsx(M_,{...s,ref:t}):d.jsx(V_,{...s,ref:t})})});cd.displayName=Cr;var M_=S.forwardRef((e,t)=>{const r=Rt(Cr,e.__scopeDialog),n=S.useRef(null),s=qe(t,r.contentRef,n);return S.useEffect(()=>{const o=n.current;if(o)return Sl(o)},[]),d.jsx(ld,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$e(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:$e(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&o.preventDefault()}),onFocusOutside:$e(e.onFocusOutside,o=>o.preventDefault())})}),V_=S.forwardRef((e,t)=>{const r=Rt(Cr,e.__scopeDialog),n=S.useRef(!1),s=S.useRef(!1);return d.jsx(ld,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,i;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=o.target;((l=r.triggerRef.current)==null?void 0:l.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),ld=S.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...a}=e,i=Rt(Cr,r),c=S.useRef(null),l=qe(t,c);return Ac(),d.jsxs(d.Fragment,{children:[d.jsx(ba,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:d.jsx(Yn,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":ii(i.open),...a,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(L_,{titleId:i.titleId}),d.jsx(q_,{contentRef:c,descriptionId:i.descriptionId})]})]})}),ai="DialogTitle",ud=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Rt(ai,r);return d.jsx(Ae.h2,{id:s.titleId,...n,ref:t})});ud.displayName=ai;var dd="DialogDescription",fd=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Rt(dd,r);return d.jsx(Ae.p,{id:s.descriptionId,...n,ref:t})});fd.displayName=dd;var md="DialogClose",hd=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Rt(md,r);return d.jsx(Ae.button,{type:"button",...n,ref:t,onClick:$e(e.onClick,()=>s.onOpenChange(!1))})});hd.displayName=md;function ii(e){return e?"open":"closed"}var pd="DialogTitleWarning",[F_,gd]=mp(pd,{contentName:Cr,titleName:ai,docsSlug:"dialog"}),L_=({titleId:e})=>{const t=gd(pd),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
67
+ `)},n$=0,Ir=[];function o$(e){var t=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),o=S.useState(n$++)[0],s=S.useState(Dd)[0],a=S.useRef(e);S.useEffect(function(){a.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=kw([e.lockRef.current],(e.shards||[]).map(Rd),!0).filter(Boolean);return y.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=S.useCallback(function(y,m){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var _=Yo(y),f=r.current,b="deltaX"in y?y.deltaX:f[0]-_[0],$="deltaY"in y?y.deltaY:f[1]-_[1],g,E=y.target,k=Math.abs(b)>Math.abs($)?"h":"v";if("touches"in y&&k==="h"&&E.type==="range")return!1;var C=window.getSelection(),O=C&&C.anchorNode,V=O?O===E||O.contains(E):!1;if(V)return!1;var z=jd(k,E);if(!z)return!0;if(z?g=k:(g=k==="v"?"h":"v",z=jd(k,E)),!z)return!1;if(!n.current&&"changedTouches"in y&&(b||$)&&(n.current=g),!g)return!0;var j=n.current||g;return e$(j,m,y,j==="h"?b:$)},[]),c=S.useCallback(function(y){var m=y;if(!(!Ir.length||Ir[Ir.length-1]!==s)){var _="deltaY"in m?Ld(m):Yo(m),f=t.current.filter(function(g){return g.name===m.type&&(g.target===m.target||m.target===g.shadowParent)&&t$(g.delta,_)})[0];if(f&&f.should){m.cancelable&&m.preventDefault();return}if(!f){var b=(a.current.shards||[]).map(Rd).filter(Boolean).filter(function(g){return g.contains(m.target)}),$=b.length>0?i(m,b[0]):!a.current.noIsolation;$&&m.cancelable&&m.preventDefault()}}},[]),l=S.useCallback(function(y,m,_,f){var b={name:y,delta:m,target:_,should:f,shadowParent:s$(_)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function($){return $!==b})},1)},[]),u=S.useCallback(function(y){r.current=Yo(y),n.current=void 0},[]),p=S.useCallback(function(y){l(y.type,Ld(y),y.target,i(y,e.lockRef.current))},[]),h=S.useCallback(function(y){l(y.type,Yo(y),y.target,i(y,e.lockRef.current))},[]);S.useEffect(function(){return Ir.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Tr),document.addEventListener("touchmove",c,Tr),document.addEventListener("touchstart",u,Tr),function(){Ir=Ir.filter(function(y){return y!==s}),document.removeEventListener("wheel",c,Tr),document.removeEventListener("touchmove",c,Tr),document.removeEventListener("touchstart",u,Tr)}},[]);var v=e.removeScrollBar,w=e.inert;return S.createElement(S.Fragment,null,w?S.createElement(s,{styles:r$(o)}):null,v?S.createElement(Hw,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function s$(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const a$=Dw(Od,o$);var ja=S.forwardRef(function(e,t){return S.createElement(Go,bt({},e,{ref:t,sideCar:a$}))});ja.classNames=Go.classNames;var i$=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Or=new WeakMap,Xo=new WeakMap,Qo={},Fa=0,qd=function(e){return e&&(e.host||qd(e.parentNode))},c$=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=qd(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},l$=function(e,t,r,n){var o=c$(t,Array.isArray(e)?e:[e]);Qo[r]||(Qo[r]=new WeakMap);var s=Qo[r],a=[],i=new Set,c=new Set(o),l=function(p){!p||i.has(p)||(i.add(p),l(p.parentNode))};o.forEach(l);var u=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(h){if(i.has(h))u(h);else try{var v=h.getAttribute(n),w=v!==null&&v!=="false",y=(Or.get(h)||0)+1,m=(s.get(h)||0)+1;Or.set(h,y),s.set(h,m),a.push(h),y===1&&w&&Xo.set(h,!0),m===1&&h.setAttribute(r,"true"),w||h.setAttribute(n,"true")}catch(_){console.error("aria-hidden: cannot operate on ",h,_)}})};return u(t),i.clear(),Fa++,function(){a.forEach(function(p){var h=Or.get(p)-1,v=s.get(p)-1;Or.set(p,h),s.set(p,v),h||(Xo.has(p)||p.removeAttribute(n),Xo.delete(p)),v||p.removeAttribute(r)}),Fa--,Fa||(Or=new WeakMap,Or=new WeakMap,Xo=new WeakMap,Qo={})}},Ud=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=i$(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),l$(n,o,r,"aria-hidden")):function(){return null}};function u$(e){const t=d$(e),r=S.forwardRef((n,o)=>{const{children:s,...a}=n,i=S.Children.toArray(s),c=i.find(p$);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function d$(e){const t=S.forwardRef((r,n)=>{const{children:o,...s}=r;if(S.isValidElement(o)){const a=m$(o),i=h$(s,o.props);return o.type!==S.Fragment&&(i.ref=n?Nr(n,a):a),S.cloneElement(o,i)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var f$=Symbol("radix.slottable");function p$(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===f$}function h$(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function m$(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var es="Dialog",[Zd,Bd]=yt(es),[g$,ht]=Zd(es),Wd=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=S.useRef(null),c=S.useRef(null),[l,u]=ar({prop:n,defaultProp:o??!1,onChange:s,caller:es});return d.jsx(g$,{scope:t,triggerRef:i,contentRef:c,contentId:Ut(),titleId:Ut(),descriptionId:Ut(),open:l,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(p=>!p),[u]),modal:a,children:r})};Wd.displayName=es;var Hd="DialogTrigger",Kd=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ht(Hd,r),s=Ae(t,o.triggerRef);return d.jsx(Ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ra(o.open),...n,ref:s,onClick:me(e.onClick,o.onOpenToggle)})});Kd.displayName=Hd;var Va="DialogPortal",[v$,Gd]=Zd(Va,{forceMount:void 0}),Jd=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,s=ht(Va,t);return d.jsx(v$,{scope:t,forceMount:r,children:S.Children.map(n,a=>d.jsx(Wt,{present:r||s.open,children:d.jsx(Bo,{asChild:!0,container:o,children:a})}))})};Jd.displayName=Va;var ts="DialogOverlay",Yd=S.forwardRef((e,t)=>{const r=Gd(ts,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=ht(ts,e.__scopeDialog);return s.modal?d.jsx(Wt,{present:n||s.open,children:d.jsx(b$,{...o,ref:t})}):null});Yd.displayName=ts;var y$=u$("DialogOverlay.RemoveScroll"),b$=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ht(ts,r);return d.jsx(ja,{as:y$,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(Ee.div,{"data-state":Ra(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),ir="DialogContent",Xd=S.forwardRef((e,t)=>{const r=Gd(ir,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=ht(ir,e.__scopeDialog);return d.jsx(Wt,{present:n||s.open,children:s.modal?d.jsx(_$,{...o,ref:t}):d.jsx(w$,{...o,ref:t})})});Xd.displayName=ir;var _$=S.forwardRef((e,t)=>{const r=ht(ir,e.__scopeDialog),n=S.useRef(null),o=Ae(t,r.contentRef,n);return S.useEffect(()=>{const s=n.current;if(s)return Ud(s)},[]),d.jsx(Qd,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(e.onCloseAutoFocus,s=>{s.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:me(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:me(e.onFocusOutside,s=>s.preventDefault())})}),w$=S.forwardRef((e,t)=>{const r=ht(ir,e.__scopeDialog),n=S.useRef(!1),o=S.useRef(!1);return d.jsx(Qd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(n.current||r.triggerRef.current?.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;r.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Qd=S.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=ht(ir,r),c=S.useRef(null),l=Ae(t,c);return Pd(),d.jsxs(d.Fragment,{children:[d.jsx(Ta,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:d.jsx(Zo,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Ra(i.open),...a,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(S$,{titleId:i.titleId}),d.jsx(k$,{contentRef:c,descriptionId:i.descriptionId})]})]})}),La="DialogTitle",ef=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ht(La,r);return d.jsx(Ee.h2,{id:o.titleId,...n,ref:t})});ef.displayName=La;var tf="DialogDescription",rf=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ht(tf,r);return d.jsx(Ee.p,{id:o.descriptionId,...n,ref:t})});rf.displayName=tf;var nf="DialogClose",of=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ht(nf,r);return d.jsx(Ee.button,{type:"button",...n,ref:t,onClick:me(e.onClick,()=>o.onOpenChange(!1))})});of.displayName=nf;function Ra(e){return e?"open":"closed"}var sf="DialogTitleWarning",[$$,af]=B0(sf,{contentName:ir,titleName:La,docsSlug:"dialog"}),S$=({titleId:e})=>{const t=af(sf),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
136
68
 
137
69
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
138
70
 
139
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return S.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},z_="DialogDescriptionWarning",q_=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gd(z_).contentName}}.`;return S.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},vd=rd,U_=sd,yd=ad,bd=id,_d=cd,xd=ud,B_=fd,ci=hd,W_=Symbol("radix.slottable");function H_(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=W_,t}var wd="AlertDialog",[G_]=Ot(wd,[td]),Zt=td(),$d=e=>{const{__scopeAlertDialog:t,...r}=e,n=Zt(t);return d.jsx(vd,{...n,...r,modal:!0})};$d.displayName=wd;var K_="AlertDialogTrigger",Sd=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Zt(r);return d.jsx(U_,{...s,...n,ref:t})});Sd.displayName=K_;var Z_="AlertDialogPortal",Ed=e=>{const{__scopeAlertDialog:t,...r}=e,n=Zt(t);return d.jsx(yd,{...n,...r})};Ed.displayName=Z_;var Y_="AlertDialogOverlay",Cd=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Zt(r);return d.jsx(bd,{...s,...n,ref:t})});Cd.displayName=Y_;var en="AlertDialogContent",[J_,X_]=G_(en),Q_=H_("AlertDialogContent"),kd=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,o=Zt(r),a=S.useRef(null),i=qe(t,a),c=S.useRef(null);return d.jsx(F_,{contentName:en,titleName:jd,docsSlug:"alert-dialog",children:d.jsx(J_,{scope:r,cancelRef:c,children:d.jsxs(_d,{role:"alertdialog",...o,...s,ref:i,onOpenAutoFocus:$e(s.onOpenAutoFocus,l=>{var u;l.preventDefault(),(u=c.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[d.jsx(Q_,{children:n}),d.jsx(t0,{contentRef:a})]})})})});kd.displayName=en;var jd="AlertDialogTitle",Rd=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Zt(r);return d.jsx(xd,{...s,...n,ref:t})});Rd.displayName=jd;var Pd="AlertDialogDescription",Nd=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Zt(r);return d.jsx(B_,{...s,...n,ref:t})});Nd.displayName=Pd;var e0="AlertDialogAction",Ad=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Zt(r);return d.jsx(ci,{...s,...n,ref:t})});Ad.displayName=e0;var Td="AlertDialogCancel",Od=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=X_(Td,r),o=Zt(r),a=qe(t,s);return d.jsx(ci,{...o,...n,ref:a})});Od.displayName=Td;var t0=({contentRef:e})=>{const t=`\`${en}\` requires a description for the component to be accessible for screen reader users.
71
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return S.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},E$="DialogDescriptionWarning",k$=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${af(E$).contentName}}.`;return S.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},cf=Wd,x$=Kd,lf=Jd,uf=Yd,df=Xd,ff=ef,C$=rf,qa=of,P$=Symbol("radix.slottable");function N$(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=P$,t}var pf="AlertDialog",[A$]=yt(pf,[Bd]),It=Bd(),hf=e=>{const{__scopeAlertDialog:t,...r}=e,n=It(t);return d.jsx(cf,{...n,...r,modal:!0})};hf.displayName=pf;var T$="AlertDialogTrigger",mf=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=It(r);return d.jsx(x$,{...o,...n,ref:t})});mf.displayName=T$;var I$="AlertDialogPortal",gf=e=>{const{__scopeAlertDialog:t,...r}=e,n=It(t);return d.jsx(lf,{...n,...r})};gf.displayName=I$;var O$="AlertDialogOverlay",vf=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=It(r);return d.jsx(uf,{...o,...n,ref:t})});vf.displayName=O$;var Dr="AlertDialogContent",[D$,M$]=A$(Dr),z$=N$("AlertDialogContent"),yf=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,s=It(r),a=S.useRef(null),i=Ae(t,a),c=S.useRef(null);return d.jsx($$,{contentName:Dr,titleName:bf,docsSlug:"alert-dialog",children:d.jsx(D$,{scope:r,cancelRef:c,children:d.jsxs(df,{role:"alertdialog",...s,...o,ref:i,onOpenAutoFocus:me(o.onOpenAutoFocus,l=>{l.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[d.jsx(z$,{children:n}),d.jsx(F$,{contentRef:a})]})})})});yf.displayName=Dr;var bf="AlertDialogTitle",_f=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=It(r);return d.jsx(ff,{...o,...n,ref:t})});_f.displayName=bf;var wf="AlertDialogDescription",$f=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=It(r);return d.jsx(C$,{...o,...n,ref:t})});$f.displayName=wf;var j$="AlertDialogAction",Sf=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=It(r);return d.jsx(qa,{...o,...n,ref:t})});Sf.displayName=j$;var Ef="AlertDialogCancel",kf=S.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=M$(Ef,r),s=It(r),a=Ae(t,o);return d.jsx(qa,{...s,...n,ref:a})});kf.displayName=Ef;var F$=({contentRef:e})=>{const t=`\`${Dr}\` requires a description for the component to be accessible for screen reader users.
140
72
 
141
- You can add a description to the \`${en}\` by passing a \`${Pd}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
73
+ You can add a description to the \`${Dr}\` by passing a \`${wf}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
142
74
 
143
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${en}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
75
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Dr}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
144
76
 
145
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return S.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},r0=$d,n0=Sd,s0=Ed,o0=Cd,a0=kd,i0=Ad,c0=Od,l0=Rd,u0=Nd;function d0({...e}){return d.jsx(r0,{"data-slot":"alert-dialog",...e})}function f0({...e}){return d.jsx(n0,{"data-slot":"alert-dialog-trigger",...e})}function m0({...e}){return d.jsx(s0,{"data-slot":"alert-dialog-portal",...e})}function h0({className:e,...t}){return d.jsx(o0,{"data-slot":"alert-dialog-overlay",className:Se("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function p0({className:e,...t}){return d.jsxs(m0,{children:[d.jsx(h0,{}),d.jsx(a0,{"data-slot":"alert-dialog-content",className:Se("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function g0({className:e,...t}){return d.jsx("div",{"data-slot":"alert-dialog-header",className:Se("flex flex-col gap-2 text-center sm:text-left",e),...t})}function v0({className:e,...t}){return d.jsx("div",{"data-slot":"alert-dialog-footer",className:Se("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function y0({className:e,...t}){return d.jsx(l0,{"data-slot":"alert-dialog-title",className:Se("text-lg font-semibold",e),...t})}function b0({className:e,...t}){return d.jsx(u0,{"data-slot":"alert-dialog-description",className:Se("text-muted-foreground text-sm",e),...t})}function _0({className:e,...t}){return d.jsx(i0,{className:Se(Qa(),e),...t})}function x0({className:e,...t}){return d.jsx(c0,{className:Se(Qa({variant:"outline"}),e),...t})}const w0=({theme:e,readOnly:t,control:r,fieldPath:n,isSimpleType:s,isRootLevel:o,onRemove:a,onOpenSettings:i,onTypeChange:c})=>{const l=bn({control:r,name:`${n}.key`});return d.jsxs("div",{className:"p-2 flex gap-2","data-testid":"field",children:[s&&d.jsx(nr,{control:r,name:`${n}.key`,render:({field:u})=>d.jsx(Fe,{placeholder:"field_name",disabled:t,className:"w-40",...u})}),d.jsx(nr,{control:r,name:`${n}.schema.type`,render:({field:u})=>d.jsxs(Zr,{disabled:t,onValueChange:p=>{u.onChange(p),c(p)},value:u.value,children:[d.jsx(Jr,{className:"w-40",children:d.jsx(Yr,{})}),d.jsx(Xr,{className:`${e} max-h-52 bg-background text-foreground border-input`,children:$_.map(p=>d.jsx(Lt,{value:p,children:p},p))})]})}),d.jsx(nr,{control:r,name:`${n}.schema.title`,render:({field:u})=>d.jsx(Fe,{placeholder:"Title",disabled:t,className:"flex-1",...u})}),d.jsx(nr,{control:r,name:`${n}.schema.description`,render:({field:u})=>d.jsx(Fe,{placeholder:"Description",disabled:t,className:"flex-1",...u})}),s&&d.jsxs("div",{className:"flex gap-2",children:[d.jsx(nr,{control:r,name:`${n}.isRequired`,render:({field:u})=>d.jsxs(Zu,{children:[d.jsx(Yu,{asChild:!0,children:d.jsx(mr,{"data-testid":"required",disabled:t,size:"icon",variant:u.value?"default":"outline",onClick:()=>{u.onChange(!u.value)},children:d.jsx(pu,{})})}),d.jsx(Ju,{children:d.jsx("p",{children:"Required"})})]})}),d.jsx("div",{className:"border-l-2 border-input"})]}),d.jsx(mr,{size:"icon",variant:"ghost",onClick:()=>i(`${n}.schema`),children:d.jsx(hu,{className:"text-blue-500"})}),o&&d.jsxs(d0,{children:[d.jsx(f0,{asChild:!0,children:d.jsx(mr,{size:"icon",variant:"ghost","data-testid":"delete-button",disabled:t,children:d.jsx(Zy,{className:"text-red-500"})})}),d.jsxs(p0,{className:Se("border-input",e),children:[d.jsxs(g0,{children:[d.jsx(y0,{className:"text-foreground",children:"Are you absolutely sure?"}),d.jsxs(b0,{children:["This action cannot be undone. This will permanently delete field"," ",l,"."]})]}),d.jsxs(v0,{children:[d.jsx(x0,{className:"text-foreground",children:"Cancel"}),d.jsx(_0,{onClick:a,children:"Delete"})]})]})]})]})},Ps=({theme:e,readOnly:t,fieldPath:r,onRemove:n,onOpenSettings:s,isSimpleType:o=!0,isRootLevel:a=!1})=>{const{control:i,setValue:c}=at(),l=bn({control:i,name:`${r}.schema.type`}),{fields:u,append:p,remove:m}=$c({control:i,name:`${r}.schema.properties`}),v=()=>{const y=xn(6);p({id:y,key:`field_${y}`,isRequired:!1,schema:{type:"string"}})},x=y=>{let h={};y==="object"?h={type:"object",properties:[],additionalProperties:!0}:y==="array"?h={type:"array"}:h={type:y},c(`${r}.schema`,h)};return d.jsxs("div",{children:[d.jsx(w0,{theme:e,readOnly:t,control:i,fieldPath:r,isSimpleType:o,isRootLevel:a,onRemove:n,onOpenSettings:s,onTypeChange:x}),l==="object"&&d.jsxs("div",{className:"ml-2 pl-2 border-l-2 border-input",children:[u.map((y,h)=>d.jsx(Ps,{readOnly:t,theme:e,fieldPath:`${r}.schema.properties.${h}`,onRemove:()=>m(h),onOpenSettings:s,isRootLevel:!0},y.id)),d.jsxs(mr,{disabled:t,size:"sm",variant:"outline",onClick:v,className:"ml-2 mt-2 mb-4 flex gap-2 text-green-500",children:[d.jsx(mu,{})," Add Field"]})]}),l==="array"&&d.jsx("div",{className:"ml-2 pl-2 border-l-2 border-input mr-11","data-testid":"field-array",children:d.jsx(Ps,{theme:e,readOnly:t,fieldPath:`${r}.schema.items`,onRemove:()=>{},onOpenSettings:s,isSimpleType:!1})})]},`${r}-${l}`)};function $0({theme:e,readOnly:t,fields:r,onRemove:n,onOpenSettings:s}){return d.jsx("div",{className:"pl-2 border-l-2 border-input",children:r.map((o,a)=>d.jsx(Ps,{readOnly:t,theme:e,fieldPath:`properties.${a}`,onRemove:()=>n(a),onOpenSettings:s,isRootLevel:!0},o.fieldId))})}var S0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],E0=S0.reduce((e,t)=>{const r=Ja(`Primitive.${t}`),n=S.forwardRef((s,o)=>{const{asChild:a,...i}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),C0="Label",Id=S.forwardRef((e,t)=>d.jsx(E0.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Id.displayName=C0;var k0=Id;function j0({className:e,...t}){return d.jsx(k0,{"data-slot":"label",className:Se("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const Dd=Z.createContext({}),Te=({...e})=>d.jsx(Dd.Provider,{value:{name:e.name},children:d.jsx(nr,{...e})}),li=()=>{const e=Z.useContext(Dd),t=Z.useContext(Md),{getFieldState:r}=at(),n=ac({name:e.name}),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},Md=Z.createContext({});function Ee({className:e,...t}){const r=Z.useId();return d.jsx(Md.Provider,{value:{id:r},children:d.jsx("div",{"data-slot":"form-item",className:Se("grid gap-2",e),...t})})}function Ce({className:e,...t}){const{error:r,formItemId:n}=li();return d.jsx(j0,{"data-slot":"form-label","data-error":!!r,className:Se("data-[error=true]:text-destructive",e),htmlFor:n,...t})}function Pe({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:s}=li();return d.jsx(Xa,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${s}`:`${n}`,"aria-invalid":!!t,...e})}function Ne({className:e,...t}){const{error:r,formMessageId:n}=li(),s=r?String((r==null?void 0:r.message)??""):t.children;return s?d.jsx("p",{"data-slot":"form-message",id:n,className:Se("text-destructive text-sm",e),...t,children:s}):null}var Ns="Checkbox",[R0]=Ot(Ns),[P0,ui]=R0(Ns);function N0(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:s,disabled:o,form:a,name:i,onCheckedChange:c,required:l,value:u="on",internal_do_not_use_render:p}=e,[m,v]=wr({prop:r,defaultProp:s??!1,onChange:c,caller:Ns}),[x,y]=S.useState(null),[h,_]=S.useState(null),f=S.useRef(!1),b=x?!!a||!!x.closest("form"):!0,w={checked:m,disabled:o,setChecked:v,control:x,setControl:y,name:i,form:a,value:u,hasConsumerStoppedPropagationRef:f,required:l,defaultChecked:pr(s)?!1:s,isFormControl:b,bubbleInput:h,setBubbleInput:_};return d.jsx(P0,{scope:t,...w,children:A0(p)?p(w):n})}var Vd="CheckboxTrigger",Fd=S.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},s)=>{const{control:o,value:a,disabled:i,checked:c,required:l,setControl:u,setChecked:p,hasConsumerStoppedPropagationRef:m,isFormControl:v,bubbleInput:x}=ui(Vd,e),y=qe(s,u),h=S.useRef(c);return S.useEffect(()=>{const _=o==null?void 0:o.form;if(_){const f=()=>p(h.current);return _.addEventListener("reset",f),()=>_.removeEventListener("reset",f)}},[o,p]),d.jsx(Ae.button,{type:"button",role:"checkbox","aria-checked":pr(c)?"mixed":c,"aria-required":l,"data-state":Wd(c),"data-disabled":i?"":void 0,disabled:i,value:a,...n,ref:y,onKeyDown:$e(t,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:$e(r,_=>{p(f=>pr(f)?!0:!f),x&&v&&(m.current=_.isPropagationStopped(),m.current||_.stopPropagation())})})});Fd.displayName=Vd;var Ld=S.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:o,required:a,disabled:i,value:c,onCheckedChange:l,form:u,...p}=e;return d.jsx(N0,{__scopeCheckbox:r,checked:s,defaultChecked:o,disabled:i,required:a,onCheckedChange:l,name:n,form:u,value:c,internal_do_not_use_render:({isFormControl:m})=>d.jsxs(d.Fragment,{children:[d.jsx(Fd,{...p,ref:t,__scopeCheckbox:r}),m&&d.jsx(Bd,{__scopeCheckbox:r})]})})});Ld.displayName=Ns;var zd="CheckboxIndicator",qd=S.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...s}=e,o=ui(zd,r);return d.jsx(hr,{present:n||pr(o.checked)||o.checked===!0,children:d.jsx(Ae.span,{"data-state":Wd(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});qd.displayName=zd;var Ud="CheckboxBubbleInput",Bd=S.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:a,required:i,disabled:c,name:l,value:u,form:p,bubbleInput:m,setBubbleInput:v}=ui(Ud,e),x=qe(r,v),y=Oa(o),h=Na(n);S.useEffect(()=>{const f=m;if(!f)return;const b=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(b,"checked").set,$=!s.current;if(y!==o&&g){const E=new Event("click",{bubbles:$});f.indeterminate=pr(o),g.call(f,pr(o)?!1:o),f.dispatchEvent(E)}},[m,y,o,s]);const _=S.useRef(pr(o)?!1:o);return d.jsx(Ae.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??_.current,required:i,disabled:c,name:l,value:u,form:p,...t,tabIndex:-1,ref:x,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Bd.displayName=Ud;function A0(e){return typeof e=="function"}function pr(e){return e==="indeterminate"}function Wd(e){return pr(e)?"indeterminate":e?"checked":"unchecked"}function As({className:e,...t}){return d.jsx(Ld,{"data-slot":"checkbox",className:Se("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(qd,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:d.jsx(du,{className:"size-3.5"})})})}const T0=Fu("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Hd({className:e,variant:t,asChild:r=!1,...n}){const s=r?Xa:"span";return d.jsx(s,{"data-slot":"badge",className:Se(T0({variant:t}),e),...n})}const O0=/[\n#?=&\t,./-]+/,I0=/^[^a-zA-Z0-9]*|[^a-zA-Z0-9]*$/g,D0=Z.createContext(null),Rn=Z.forwardRef(({children:e,value:t,onValueChange:r,placeholder:n,maxItems:s,minItems:o,className:a,disabled:i=!1,dir:c,...l},u)=>{const[p,m]=Z.useState(-1),[v,x]=Z.useState(""),[y,h]=Z.useState(i),[_,f]=Z.useState(i),[b,w]=Z.useState(!1),[g,$]=Z.useState(""),E=o??0,k=s??1/0,I=Z.useCallback(Y=>{!t.includes(Y)&&t.length<k&&r([...t,Y])},[t]),z=Z.useCallback(Y=>{t.includes(Y)&&t.length>E&&r(t.filter(ae=>ae!==Y))},[t]),M=Z.useCallback(Y=>{Y.preventDefault();const ae=Y.clipboardData.getData("text").split(O0),L=[...t];ae.forEach(ve=>{const G=ve.replaceAll(I0,"").trim();G.length>0&&!L.includes(G)&&L.length<k&&L.push(G)}),r(L),x("")},[t]),V=Z.useCallback(Y=>{const ae=Y.currentTarget,L=ae.value.substring(ae.selectionStart??0,ae.selectionEnd??0);$(L),w(L===v)},[v]);Z.useEffect(()=>{(()=>{i==!1&&(t.length-1>=E?f(!1):f(!0),t.length+1<=k?h(!1):h(!0))})()},[t]);const F=Z.useCallback(async Y=>{Y.stopPropagation();const ae=()=>{const T=p+1>t.length-1?-1:p+1;m(T)},L=()=>{const T=p-1<0?t.length-1:p-1;m(T)},ve=()=>{const T=p-1<=0?t.length-1===0?-1:0:p-1;m(T)},G=Y.currentTarget;switch(Y.key){case"ArrowLeft":c==="rtl"?t.length>0&&p!==-1&&ae():t.length>0&&G.selectionStart===0&&L();break;case"ArrowRight":c==="rtl"?t.length>0&&G.selectionStart===0&&L():t.length>0&&p!==-1&&ae();break;case"Backspace":case"Delete":t.length>0&&(p!==-1&&p<t.length?(z(t[p]),ve()):G.selectionStart===0&&(g===v||b)&&z(t[t.length-1]));break;case"Escape":const T=p===-1?t.length-1:-1;m(T);break;case"Enter":v.trim()!==""&&(Y.preventDefault(),I(v),x(""));break}},[p,t,v,z]),W=Z.useCallback(Y=>{Y.preventDefault(),Y.stopPropagation()},[]),re=Z.useCallback(Y=>{x(Y.currentTarget.value)},[]);return d.jsx(D0.Provider,{value:{value:t,onValueChange:r,inputValue:v,setInputValue:x,activeIndex:p,setActiveIndex:m},children:d.jsxs("div",{...l,ref:u,dir:c,className:Se("flex items-center flex-wrap gap-1 rounded-lg bg-background overflow-hidden",{"focus-within:ring-ring":p===-1},a),children:[t.map((Y,ae)=>d.jsxs(Hd,{tabIndex:p!==-1?0:p,"aria-disabled":_,"data-active":p===ae,className:Se("relative px-1 rounded flex items-center gap-1 data-[active='true']:ring-2 data-[active='true']:ring-muted-foreground truncate aria-disabled:opacity-50 aria-disabled:cursor-not-allowed"),variant:"secondary",children:[d.jsx("span",{className:"text-xs",children:Y}),d.jsxs("button",{type:"button","aria-label":`Remove ${Y} option`,"aria-roledescription":"button to remove option",disabled:_,onMouseDown:W,onClick:()=>z(Y),className:"disabled:cursor-not-allowed",children:[d.jsxs("span",{className:"sr-only",children:["Remove ",Y," option"]}),d.jsx(gu,{className:"h-4 w-4 hover:stroke-destructive"})]})]},Y)),d.jsx(Fe,{tabIndex:0,"aria-label":"input tag",disabled:y,onKeyDown:F,onPaste:M,value:v,onSelect:V,onChange:p===-1?re:void 0,placeholder:n,onClick:()=>m(-1),className:Se("border border-input h-9 min-w-fit flex-1 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0 placeholder:text-muted-foreground px-2",p!==-1&&"caret-transparent")})]})})});Rn.displayName="TagsInput";const M0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:s}=at(),o=s(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Te,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"Default Value"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Te,{control:n,name:`${t}.minimum`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Minimum Value"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Maximum Value"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Te,{control:n,name:`${t}.exclusiveMin`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Exclusive Minimum"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Exclusive Maximum"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})})]}),d.jsx(Te,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"Multiple Of"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"Format"}),d.jsx(Pe,{children:d.jsxs(Zr,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Jr,{children:d.jsx(Yr,{placeholder:"Choose data type"})}),d.jsxs(Xr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Lt,{value:"none",children:"none"}),E_.map(i=>d.jsx(Lt,{value:i,children:i},i))]})]})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(Ee,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(Pe,{children:d.jsx(As,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(Ce,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ne,{})]})}),o&&d.jsx(Te,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"Enum Values"}),d.jsx(Pe,{children:d.jsx(Rn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ne,{})]})})]})},V0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:s}=at(),o=s(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Te,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"Default Value"}),d.jsx(Pe,{children:d.jsx(Fe,{disabled:r,...a})}),d.jsx(Ne,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Te,{control:n,name:`${t}.minLength`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Minimum Length"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:n,name:`${t}.maxLength`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Maximum Length"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})})]}),d.jsx(Te,{control:n,name:`${t}.pattern`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"Pattern (Regular Expression)"}),d.jsx(Pe,{children:d.jsx(Fe,{disabled:r,...a})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"Format"}),d.jsxs(Zr,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Pe,{children:d.jsx(Jr,{children:d.jsx(Yr,{placeholder:"Choose data type"})})}),d.jsxs(Xr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Lt,{value:"none",children:"none"}),C_.map(i=>d.jsx(Lt,{value:i,children:i},i))]})]}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(Ee,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(Pe,{children:d.jsx(As,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(Ce,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ne,{})]})}),o&&d.jsx(Te,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"Enum Values"}),d.jsx(Pe,{children:d.jsx(Rn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ne,{})]})})]})},F0=({theme:e,basePath:t,readOnly:r})=>{const{control:n}=at();return d.jsx("form",{children:d.jsx(Te,{control:n,name:`${t}.default`,render:({field:s})=>d.jsxs(Ee,{className:"flex gap-2",children:[d.jsx(Ce,{children:"Default Value"}),d.jsxs(Zr,{onValueChange:s.onChange,defaultValue:s.value,disabled:r,children:[d.jsx(Pe,{children:d.jsx(Jr,{children:d.jsx(Yr,{placeholder:"False"})})}),d.jsxs(Xr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Lt,{value:"true","data-testid":"true",children:"True"}),d.jsx(Lt,{value:"false",children:"False"})]})]}),d.jsx(Ne,{})]})})})},L0=({basePath:e,readOnly:t})=>{const{control:r}=at();return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Te,{control:r,name:`${e}.minItems`,render:({field:n})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Minimum Items"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:r,name:`${e}.maxItems`,render:({field:n})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Maximum Items"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ne,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Te,{control:r,name:`${e}.minContains`,render:({field:n})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Minimum Contains"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:r,name:`${e}.maxContains`,render:({field:n})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Maximum Contains"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ne,{})]})})]}),d.jsx(Te,{control:r,name:`${e}.uniqueItems`,render:({field:n})=>d.jsxs(Ee,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(Pe,{children:d.jsx(As,{checked:n.value,onCheckedChange:n.onChange,disabled:t})}),d.jsx(Ce,{className:"ml-2",children:"Unique Items"}),d.jsx(Ne,{})]})})]})},z0=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:s}=at(),o=s(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(Te,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"Default Value"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Te,{control:n,name:`${t}.minimum`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Minimum Value"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Maximum Value"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(Te,{control:n,name:`${t}.exclusiveMin`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Exclusive Minimum"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Exclusive Maximum"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})})]}),d.jsx(Te,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"Multiple Of"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"Format"}),d.jsx(Pe,{children:d.jsxs(Zr,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Jr,{children:d.jsx(Yr,{placeholder:"Choose data type"})}),d.jsxs(Xr,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Lt,{value:"none",children:"none"}),S_.map(i=>d.jsx(Lt,{value:i,children:i},i))]})]})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(Ee,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(Pe,{children:d.jsx(As,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange,defaultValue:0})}),d.jsx(Ce,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ne,{})]})}),o&&d.jsx(Te,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"Enum Values"}),d.jsx(Pe,{children:d.jsx(Rn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ne,{})]})})]})};var Ts={exports:{}},di={},Yt={},kr={},fi={},mi={},hi={},Gd;function Os(){return Gd||(Gd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((b,w)=>`${b}${w}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((b,w)=>(w instanceof r&&(b[w.str]=(b[w.str]||0)+1),b),{})}}e._Code=n,e.nil=new n("");function s(_,...f){const b=[_[0]];let w=0;for(;w<f.length;)i(b,f[w]),b.push(_[++w]);return new n(b)}e._=s;const o=new n("+");function a(_,...f){const b=[v(_[0])];let w=0;for(;w<f.length;)b.push(o),i(b,f[w]),b.push(o,v(_[++w]));return c(b),new n(b)}e.str=a;function i(_,f){f instanceof n?_.push(...f._items):f instanceof r?_.push(f):_.push(p(f))}e.addCodeArg=i;function c(_){let f=1;for(;f<_.length-1;){if(_[f]===o){const b=l(_[f-1],_[f+1]);if(b!==void 0){_.splice(f-1,3,b);continue}_[f++]="+"}f++}}function l(_,f){if(f==='""')return _;if(_==='""')return f;if(typeof _=="string")return f instanceof r||_[_.length-1]!=='"'?void 0:typeof f!="string"?`${_.slice(0,-1)}${f}"`:f[0]==='"'?_.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(_ instanceof r))return`"${_}${f.slice(1)}`}function u(_,f){return f.emptyStr()?_:_.emptyStr()?f:a`${_}${f}`}e.strConcat=u;function p(_){return typeof _=="number"||typeof _=="boolean"||_===null?_:v(Array.isArray(_)?_.join(","):_)}function m(_){return new n(v(_))}e.stringify=m;function v(_){return JSON.stringify(_).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function x(_){return typeof _=="string"&&e.IDENTIFIER.test(_)?new n(`.${_}`):s`[${_}]`}e.getProperty=x;function y(_){if(typeof _=="string"&&e.IDENTIFIER.test(_))return new n(`${_}`);throw new Error(`CodeGen: invalid export name: ${_}, use explicit $id name mapping`)}e.getEsmExportName=y;function h(_){return new n(_.toString())}e.regexpCode=h})(hi)),hi}var pi={},Kd;function Zd(){return Kd||(Kd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Os();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:l,parent:u}={}){this._names={},this._prefixes=l,this._parent=u}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,p;if(!((p=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||p===void 0)&&p.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=s;class o extends t.Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:p}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(u)}[${p}]`}}e.ValueScopeName=o;const a=(0,t._)`\n`;class i extends s{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?a:t.nil}}get(){return this._scope}name(l){return new o(l,this._newName(l))}value(l,u){var p;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(l),{prefix:v}=m,x=(p=u.key)!==null&&p!==void 0?p:u.ref;let y=this._values[v];if(y){const f=y.get(x);if(f)return f}else y=this._values[v]=new Map;y.set(x,m);const h=this._scope[v]||(this._scope[v]=[]),_=h.length;return h[_]=u.ref,m.setValue(u,{property:v,itemIndex:_}),m}getValue(l,u){const p=this._values[l];if(p)return p.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${l}${p.scopePath}`})}scopeCode(l=this._values,u,p){return this._reduceValues(l,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},u,p)}_reduceValues(l,u,p={},m){let v=t.nil;for(const x in l){const y=l[x];if(!y)continue;const h=p[x]=p[x]||new Map;y.forEach(_=>{if(h.has(_))return;h.set(_,n.Started);let f=u(_);if(f){const b=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${b} ${_} = ${f};${this.opts._n}`}else if(f=m==null?void 0:m(_))v=(0,t._)`${v}${f}${this.opts._n}`;else throw new r(_);h.set(_,n.Completed)})}return v}}e.ValueScope=i})(pi)),pi}var Yd;function we(){return Yd||(Yd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Os(),r=Zd();var n=Os();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var s=Zd();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(C,R){return this}}class a extends o{constructor(C,R,q){super(),this.varKind=C,this.name=R,this.rhs=q}render({es5:C,_n:R}){const q=C?r.varKinds.var:this.varKind,B=this.rhs===void 0?"":` = ${this.rhs}`;return`${q} ${this.name}${B};`+R}optimizeNames(C,R){if(C[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,C,R)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends o{constructor(C,R,q){super(),this.lhs=C,this.rhs=R,this.sideEffects=q}render({_n:C}){return`${this.lhs} = ${this.rhs};`+C}optimizeNames(C,R){if(!(this.lhs instanceof t.Name&&!C[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,C,R),this}get names(){const C=this.lhs instanceof t.Name?{}:{...this.lhs.names};return F(C,this.rhs)}}class c extends i{constructor(C,R,q,B){super(C,q,B),this.op=R}render({_n:C}){return`${this.lhs} ${this.op}= ${this.rhs};`+C}}class l extends o{constructor(C){super(),this.label=C,this.names={}}render({_n:C}){return`${this.label}:`+C}}class u extends o{constructor(C){super(),this.label=C,this.names={}}render({_n:C}){return`break${this.label?` ${this.label}`:""};`+C}}class p extends o{constructor(C){super(),this.error=C}render({_n:C}){return`throw ${this.error};`+C}get names(){return this.error.names}}class m extends o{constructor(C){super(),this.code=C}render({_n:C}){return`${this.code};`+C}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(C,R){return this.code=W(this.code,C,R),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends o{constructor(C=[]){super(),this.nodes=C}render(C){return this.nodes.reduce((R,q)=>R+q.render(C),"")}optimizeNodes(){const{nodes:C}=this;let R=C.length;for(;R--;){const q=C[R].optimizeNodes();Array.isArray(q)?C.splice(R,1,...q):q?C[R]=q:C.splice(R,1)}return C.length>0?this:void 0}optimizeNames(C,R){const{nodes:q}=this;let B=q.length;for(;B--;){const Q=q[B];Q.optimizeNames(C,R)||(re(C,Q.names),q.splice(B,1))}return q.length>0?this:void 0}get names(){return this.nodes.reduce((C,R)=>V(C,R.names),{})}}class x extends v{render(C){return"{"+C._n+super.render(C)+"}"+C._n}}class y extends v{}class h extends x{}h.kind="else";class _ extends x{constructor(C,R){super(R),this.condition=C}render(C){let R=`if(${this.condition})`+super.render(C);return this.else&&(R+="else "+this.else.render(C)),R}optimizeNodes(){super.optimizeNodes();const C=this.condition;if(C===!0)return this.nodes;let R=this.else;if(R){const q=R.optimizeNodes();R=this.else=Array.isArray(q)?new h(q):q}if(R)return C===!1?R instanceof _?R:R.nodes:this.nodes.length?this:new _(Y(C),R instanceof _?[R]:R.nodes);if(!(C===!1||!this.nodes.length))return this}optimizeNames(C,R){var q;if(this.else=(q=this.else)===null||q===void 0?void 0:q.optimizeNames(C,R),!!(super.optimizeNames(C,R)||this.else))return this.condition=W(this.condition,C,R),this}get names(){const C=super.names;return F(C,this.condition),this.else&&V(C,this.else.names),C}}_.kind="if";class f extends x{}f.kind="for";class b extends f{constructor(C){super(),this.iteration=C}render(C){return`for(${this.iteration})`+super.render(C)}optimizeNames(C,R){if(super.optimizeNames(C,R))return this.iteration=W(this.iteration,C,R),this}get names(){return V(super.names,this.iteration.names)}}class w extends f{constructor(C,R,q,B){super(),this.varKind=C,this.name=R,this.from=q,this.to=B}render(C){const R=C.es5?r.varKinds.var:this.varKind,{name:q,from:B,to:Q}=this;return`for(${R} ${q}=${B}; ${q}<${Q}; ${q}++)`+super.render(C)}get names(){const C=F(super.names,this.from);return F(C,this.to)}}class g extends f{constructor(C,R,q,B){super(),this.loop=C,this.varKind=R,this.name=q,this.iterable=B}render(C){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(C)}optimizeNames(C,R){if(super.optimizeNames(C,R))return this.iterable=W(this.iterable,C,R),this}get names(){return V(super.names,this.iterable.names)}}class $ extends x{constructor(C,R,q){super(),this.name=C,this.args=R,this.async=q}render(C){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(C)}}$.kind="func";class E extends v{render(C){return"return "+super.render(C)}}E.kind="return";class k extends x{render(C){let R="try"+super.render(C);return this.catch&&(R+=this.catch.render(C)),this.finally&&(R+=this.finally.render(C)),R}optimizeNodes(){var C,R;return super.optimizeNodes(),(C=this.catch)===null||C===void 0||C.optimizeNodes(),(R=this.finally)===null||R===void 0||R.optimizeNodes(),this}optimizeNames(C,R){var q,B;return super.optimizeNames(C,R),(q=this.catch)===null||q===void 0||q.optimizeNames(C,R),(B=this.finally)===null||B===void 0||B.optimizeNames(C,R),this}get names(){const C=super.names;return this.catch&&V(C,this.catch.names),this.finally&&V(C,this.finally.names),C}}class I extends x{constructor(C){super(),this.error=C}render(C){return`catch(${this.error})`+super.render(C)}}I.kind="catch";class z extends x{render(C){return"finally"+super.render(C)}}z.kind="finally";class M{constructor(C,R={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...R,_n:R.lines?`
146
- `:""},this._extScope=C,this._scope=new r.Scope({parent:C}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(C){return this._scope.name(C)}scopeName(C){return this._extScope.name(C)}scopeValue(C,R){const q=this._extScope.value(C,R);return(this._values[q.prefix]||(this._values[q.prefix]=new Set)).add(q),q}getScopeValue(C,R){return this._extScope.getValue(C,R)}scopeRefs(C){return this._extScope.scopeRefs(C,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(C,R,q,B){const Q=this._scope.toName(R);return q!==void 0&&B&&(this._constants[Q.str]=q),this._leafNode(new a(C,Q,q)),Q}const(C,R,q){return this._def(r.varKinds.const,C,R,q)}let(C,R,q){return this._def(r.varKinds.let,C,R,q)}var(C,R,q){return this._def(r.varKinds.var,C,R,q)}assign(C,R,q){return this._leafNode(new i(C,R,q))}add(C,R){return this._leafNode(new c(C,e.operators.ADD,R))}code(C){return typeof C=="function"?C():C!==t.nil&&this._leafNode(new m(C)),this}object(...C){const R=["{"];for(const[q,B]of C)R.length>1&&R.push(","),R.push(q),(q!==B||this.opts.es5)&&(R.push(":"),(0,t.addCodeArg)(R,B));return R.push("}"),new t._Code(R)}if(C,R,q){if(this._blockNode(new _(C)),R&&q)this.code(R).else().code(q).endIf();else if(R)this.code(R).endIf();else if(q)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(C){return this._elseNode(new _(C))}else(){return this._elseNode(new h)}endIf(){return this._endBlockNode(_,h)}_for(C,R){return this._blockNode(C),R&&this.code(R).endFor(),this}for(C,R){return this._for(new b(C),R)}forRange(C,R,q,B,Q=this.opts.es5?r.varKinds.var:r.varKinds.let){const pe=this._scope.toName(C);return this._for(new w(Q,pe,R,q),()=>B(pe))}forOf(C,R,q,B=r.varKinds.const){const Q=this._scope.toName(C);if(this.opts.es5){const pe=R instanceof t.Name?R:this.var("_arr",R);return this.forRange("_i",0,(0,t._)`${pe}.length`,ie=>{this.var(Q,(0,t._)`${pe}[${ie}]`),q(Q)})}return this._for(new g("of",B,Q,R),()=>q(Q))}forIn(C,R,q,B=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(C,(0,t._)`Object.keys(${R})`,q);const Q=this._scope.toName(C);return this._for(new g("in",B,Q,R),()=>q(Q))}endFor(){return this._endBlockNode(f)}label(C){return this._leafNode(new l(C))}break(C){return this._leafNode(new u(C))}return(C){const R=new E;if(this._blockNode(R),this.code(C),R.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(C,R,q){if(!R&&!q)throw new Error('CodeGen: "try" without "catch" and "finally"');const B=new k;if(this._blockNode(B),this.code(C),R){const Q=this.name("e");this._currNode=B.catch=new I(Q),R(Q)}return q&&(this._currNode=B.finally=new z,this.code(q)),this._endBlockNode(I,z)}throw(C){return this._leafNode(new p(C))}block(C,R){return this._blockStarts.push(this._nodes.length),C&&this.code(C).endBlock(R),this}endBlock(C){const R=this._blockStarts.pop();if(R===void 0)throw new Error("CodeGen: not in self-balancing block");const q=this._nodes.length-R;if(q<0||C!==void 0&&q!==C)throw new Error(`CodeGen: wrong number of nodes: ${q} vs ${C} expected`);return this._nodes.length=R,this}func(C,R=t.nil,q,B){return this._blockNode(new $(C,R,q)),B&&this.code(B).endFunc(),this}endFunc(){return this._endBlockNode($)}optimize(C=1){for(;C-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(C){return this._currNode.nodes.push(C),this}_blockNode(C){this._currNode.nodes.push(C),this._nodes.push(C)}_endBlockNode(C,R){const q=this._currNode;if(q instanceof C||R&&q instanceof R)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${R?`${C.kind}/${R.kind}`:C.kind}"`)}_elseNode(C){const R=this._currNode;if(!(R instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=R.else=C,this}get _root(){return this._nodes[0]}get _currNode(){const C=this._nodes;return C[C.length-1]}set _currNode(C){const R=this._nodes;R[R.length-1]=C}}e.CodeGen=M;function V(O,C){for(const R in C)O[R]=(O[R]||0)+(C[R]||0);return O}function F(O,C){return C instanceof t._CodeOrName?V(O,C.names):O}function W(O,C,R){if(O instanceof t.Name)return q(O);if(!B(O))return O;return new t._Code(O._items.reduce((Q,pe)=>(pe instanceof t.Name&&(pe=q(pe)),pe instanceof t._Code?Q.push(...pe._items):Q.push(pe),Q),[]));function q(Q){const pe=R[Q.str];return pe===void 0||C[Q.str]!==1?Q:(delete C[Q.str],pe)}function B(Q){return Q instanceof t._Code&&Q._items.some(pe=>pe instanceof t.Name&&C[pe.str]===1&&R[pe.str]!==void 0)}}function re(O,C){for(const R in C)O[R]=(O[R]||0)-(C[R]||0)}function Y(O){return typeof O=="boolean"||typeof O=="number"||O===null?!O:(0,t._)`!${K(O)}`}e.not=Y;const ae=T(e.operators.AND);function L(...O){return O.reduce(ae)}e.and=L;const ve=T(e.operators.OR);function G(...O){return O.reduce(ve)}e.or=G;function T(O){return(C,R)=>C===t.nil?R:R===t.nil?C:(0,t._)`${K(C)} ${O} ${K(R)}`}function K(O){return O instanceof t.Name?O:(0,t._)`(${O})`}})(mi)),mi}var Re={},Jd;function Oe(){if(Jd)return Re;Jd=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkStrictMode=Re.getErrorPath=Re.Type=Re.useFunc=Re.setEvaluated=Re.evaluatedPropsToName=Re.mergeEvaluated=Re.eachItem=Re.unescapeJsonPointer=Re.escapeJsonPointer=Re.escapeFragment=Re.unescapeFragment=Re.schemaRefOrVal=Re.schemaHasRulesButRef=Re.schemaHasRules=Re.checkUnknownRules=Re.alwaysValidSchema=Re.toHash=void 0;const e=we(),t=Os();function r(g){const $={};for(const E of g)$[E]=!0;return $}Re.toHash=r;function n(g,$){return typeof $=="boolean"?$:Object.keys($).length===0?!0:(s(g,$),!o($,g.self.RULES.all))}Re.alwaysValidSchema=n;function s(g,$=g.schema){const{opts:E,self:k}=g;if(!E.strictSchema||typeof $=="boolean")return;const I=k.RULES.keywords;for(const z in $)I[z]||w(g,`unknown keyword: "${z}"`)}Re.checkUnknownRules=s;function o(g,$){if(typeof g=="boolean")return!g;for(const E in g)if($[E])return!0;return!1}Re.schemaHasRules=o;function a(g,$){if(typeof g=="boolean")return!g;for(const E in g)if(E!=="$ref"&&$.all[E])return!0;return!1}Re.schemaHasRulesButRef=a;function i({topSchemaRef:g,schemaPath:$},E,k,I){if(!I){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${g}${$}${(0,e.getProperty)(k)}`}Re.schemaRefOrVal=i;function c(g){return p(decodeURIComponent(g))}Re.unescapeFragment=c;function l(g){return encodeURIComponent(u(g))}Re.escapeFragment=l;function u(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}Re.escapeJsonPointer=u;function p(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}Re.unescapeJsonPointer=p;function m(g,$){if(Array.isArray(g))for(const E of g)$(E);else $(g)}Re.eachItem=m;function v({mergeNames:g,mergeToName:$,mergeValues:E,resultToName:k}){return(I,z,M,V)=>{const F=M===void 0?z:M instanceof e.Name?(z instanceof e.Name?g(I,z,M):$(I,z,M),M):z instanceof e.Name?($(I,M,z),z):E(z,M);return V===e.Name&&!(F instanceof e.Name)?k(I,F):F}}Re.mergeEvaluated={props:v({mergeNames:(g,$,E)=>g.if((0,e._)`${E} !== true && ${$} !== undefined`,()=>{g.if((0,e._)`${$} === true`,()=>g.assign(E,!0),()=>g.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${$})`))}),mergeToName:(g,$,E)=>g.if((0,e._)`${E} !== true`,()=>{$===!0?g.assign(E,!0):(g.assign(E,(0,e._)`${E} || {}`),y(g,E,$))}),mergeValues:(g,$)=>g===!0?!0:{...g,...$},resultToName:x}),items:v({mergeNames:(g,$,E)=>g.if((0,e._)`${E} !== true && ${$} !== undefined`,()=>g.assign(E,(0,e._)`${$} === true ? true : ${E} > ${$} ? ${E} : ${$}`)),mergeToName:(g,$,E)=>g.if((0,e._)`${E} !== true`,()=>g.assign(E,$===!0?!0:(0,e._)`${E} > ${$} ? ${E} : ${$}`)),mergeValues:(g,$)=>g===!0?!0:Math.max(g,$),resultToName:(g,$)=>g.var("items",$)})};function x(g,$){if($===!0)return g.var("props",!0);const E=g.var("props",(0,e._)`{}`);return $!==void 0&&y(g,E,$),E}Re.evaluatedPropsToName=x;function y(g,$,E){Object.keys(E).forEach(k=>g.assign((0,e._)`${$}${(0,e.getProperty)(k)}`,!0))}Re.setEvaluated=y;const h={};function _(g,$){return g.scopeValue("func",{ref:$,code:h[$.code]||(h[$.code]=new t._Code($.code))})}Re.useFunc=_;var f;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(f||(Re.Type=f={}));function b(g,$,E){if(g instanceof e.Name){const k=$===f.Num;return E?k?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:k?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(g).toString():"/"+u(g)}Re.getErrorPath=b;function w(g,$,E=g.opts.strictSchema){if(E){if($=`strict mode: ${$}`,E===!0)throw new Error($);g.self.logger.warn($)}}return Re.checkStrictMode=w,Re}var Is={},Xd;function Pt(){if(Xd)return Is;Xd=1,Object.defineProperty(Is,"__esModule",{value:!0});const e=we(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Is.default=t,Is}var Qd;function Ds(){return Qd||(Qd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=we(),r=Oe(),n=Pt();e.keywordError={message:({keyword:h})=>(0,t.str)`must pass "${h}" keyword validation`},e.keyword$DataError={message:({keyword:h,schemaType:_})=>_?(0,t.str)`"${h}" keyword must be ${_} ($data)`:(0,t.str)`"${h}" keyword is invalid ($data)`};function s(h,_=e.keywordError,f,b){const{it:w}=h,{gen:g,compositeRule:$,allErrors:E}=w,k=p(h,_,f);b??($||E)?c(g,k):l(w,(0,t._)`[${k}]`)}e.reportError=s;function o(h,_=e.keywordError,f){const{it:b}=h,{gen:w,compositeRule:g,allErrors:$}=b,E=p(h,_,f);c(w,E),g||$||l(b,n.default.vErrors)}e.reportExtraError=o;function a(h,_){h.assign(n.default.errors,_),h.if((0,t._)`${n.default.vErrors} !== null`,()=>h.if(_,()=>h.assign((0,t._)`${n.default.vErrors}.length`,_),()=>h.assign(n.default.vErrors,null)))}e.resetErrorsCount=a;function i({gen:h,keyword:_,schemaValue:f,data:b,errsCount:w,it:g}){if(w===void 0)throw new Error("ajv implementation error");const $=h.name("err");h.forRange("i",w,n.default.errors,E=>{h.const($,(0,t._)`${n.default.vErrors}[${E}]`),h.if((0,t._)`${$}.instancePath === undefined`,()=>h.assign((0,t._)`${$}.instancePath`,(0,t.strConcat)(n.default.instancePath,g.errorPath))),h.assign((0,t._)`${$}.schemaPath`,(0,t.str)`${g.errSchemaPath}/${_}`),g.opts.verbose&&(h.assign((0,t._)`${$}.schema`,f),h.assign((0,t._)`${$}.data`,b))})}e.extendErrors=i;function c(h,_){const f=h.const("err",_);h.if((0,t._)`${n.default.vErrors} === null`,()=>h.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),h.code((0,t._)`${n.default.errors}++`)}function l(h,_){const{gen:f,validateName:b,schemaEnv:w}=h;w.$async?f.throw((0,t._)`new ${h.ValidationError}(${_})`):(f.assign((0,t._)`${b}.errors`,_),f.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(h,_,f){const{createErrors:b}=h.it;return b===!1?(0,t._)`{}`:m(h,_,f)}function m(h,_,f={}){const{gen:b,it:w}=h,g=[v(w,f),x(h,f)];return y(h,_,g),b.object(...g)}function v({errorPath:h},{instancePath:_}){const f=_?(0,t.str)`${h}${(0,r.getErrorPath)(_,r.Type.Str)}`:h;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function x({keyword:h,it:{errSchemaPath:_}},{schemaPath:f,parentSchema:b}){let w=b?_:(0,t.str)`${_}/${h}`;return f&&(w=(0,t.str)`${w}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,w]}function y(h,{params:_,message:f},b){const{keyword:w,data:g,schemaValue:$,it:E}=h,{opts:k,propertyName:I,topSchemaRef:z,schemaPath:M}=E;b.push([u.keyword,w],[u.params,typeof _=="function"?_(h):_||(0,t._)`{}`]),k.messages&&b.push([u.message,typeof f=="function"?f(h):f]),k.verbose&&b.push([u.schema,$],[u.parentSchema,(0,t._)`${z}${M}`],[n.default.data,g]),I&&b.push([u.propertyName,I])}})(fi)),fi}var ef;function q0(){if(ef)return kr;ef=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.boolOrEmptySchema=kr.topBoolOrEmptySchema=void 0;const e=Ds(),t=we(),r=Pt(),n={message:"boolean schema is false"};function s(i){const{gen:c,schema:l,validateName:u}=i;l===!1?a(i,!1):typeof l=="object"&&l.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}kr.topBoolOrEmptySchema=s;function o(i,c){const{gen:l,schema:u}=i;u===!1?(l.var(c,!1),a(i)):l.var(c,!0)}kr.boolOrEmptySchema=o;function a(i,c){const{gen:l,data:u}=i,p={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:i};(0,e.reportError)(p,n,void 0,c)}return kr}var st={},jr={},tf;function rf(){if(tf)return jr;tf=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.getRules=jr.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(s){return typeof s=="string"&&t.has(s)}jr.isJSONType=r;function n(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return jr.getRules=n,jr}var Jt={},nf;function sf(){if(nf)return Jt;nf=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.shouldUseRule=Jt.shouldUseGroup=Jt.schemaHasRulesForType=void 0;function e({schema:n,self:s},o){const a=s.RULES.types[o];return a&&a!==!0&&t(n,a)}Jt.schemaHasRulesForType=e;function t(n,s){return s.rules.some(o=>r(n,o))}Jt.shouldUseGroup=t;function r(n,s){var o;return n[s.keyword]!==void 0||((o=s.definition.implements)===null||o===void 0?void 0:o.some(a=>n[a]!==void 0))}return Jt.shouldUseRule=r,Jt}var of;function Ms(){if(of)return st;of=1,Object.defineProperty(st,"__esModule",{value:!0}),st.reportTypeError=st.checkDataTypes=st.checkDataType=st.coerceAndCheckDataType=st.getJSONTypes=st.getSchemaTypes=st.DataType=void 0;const e=rf(),t=sf(),r=Ds(),n=we(),s=Oe();var o;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(o||(st.DataType=o={}));function a(f){const b=i(f.type);if(b.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!b.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&b.push("null")}return b}st.getSchemaTypes=a;function i(f){const b=Array.isArray(f)?f:f?[f]:[];if(b.every(e.isJSONType))return b;throw new Error("type must be JSONType or JSONType[]: "+b.join(","))}st.getJSONTypes=i;function c(f,b){const{gen:w,data:g,opts:$}=f,E=u(b,$.coerceTypes),k=b.length>0&&!(E.length===0&&b.length===1&&(0,t.schemaHasRulesForType)(f,b[0]));if(k){const I=x(b,g,$.strictNumbers,o.Wrong);w.if(I,()=>{E.length?p(f,b,E):h(f)})}return k}st.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function u(f,b){return b?f.filter(w=>l.has(w)||b==="array"&&w==="array"):[]}function p(f,b,w){const{gen:g,data:$,opts:E}=f,k=g.let("dataType",(0,n._)`typeof ${$}`),I=g.let("coerced",(0,n._)`undefined`);E.coerceTypes==="array"&&g.if((0,n._)`${k} == 'object' && Array.isArray(${$}) && ${$}.length == 1`,()=>g.assign($,(0,n._)`${$}[0]`).assign(k,(0,n._)`typeof ${$}`).if(x(b,$,E.strictNumbers),()=>g.assign(I,$))),g.if((0,n._)`${I} !== undefined`);for(const M of w)(l.has(M)||M==="array"&&E.coerceTypes==="array")&&z(M);g.else(),h(f),g.endIf(),g.if((0,n._)`${I} !== undefined`,()=>{g.assign($,I),m(f,I)});function z(M){switch(M){case"string":g.elseIf((0,n._)`${k} == "number" || ${k} == "boolean"`).assign(I,(0,n._)`"" + ${$}`).elseIf((0,n._)`${$} === null`).assign(I,(0,n._)`""`);return;case"number":g.elseIf((0,n._)`${k} == "boolean" || ${$} === null
147
- || (${k} == "string" && ${$} && ${$} == +${$})`).assign(I,(0,n._)`+${$}`);return;case"integer":g.elseIf((0,n._)`${k} === "boolean" || ${$} === null
148
- || (${k} === "string" && ${$} && ${$} == +${$} && !(${$} % 1))`).assign(I,(0,n._)`+${$}`);return;case"boolean":g.elseIf((0,n._)`${$} === "false" || ${$} === 0 || ${$} === null`).assign(I,!1).elseIf((0,n._)`${$} === "true" || ${$} === 1`).assign(I,!0);return;case"null":g.elseIf((0,n._)`${$} === "" || ${$} === 0 || ${$} === false`),g.assign(I,null);return;case"array":g.elseIf((0,n._)`${k} === "string" || ${k} === "number"
149
- || ${k} === "boolean" || ${$} === null`).assign(I,(0,n._)`[${$}]`)}}}function m({gen:f,parentData:b,parentDataProperty:w},g){f.if((0,n._)`${b} !== undefined`,()=>f.assign((0,n._)`${b}[${w}]`,g))}function v(f,b,w,g=o.Correct){const $=g===o.Correct?n.operators.EQ:n.operators.NEQ;let E;switch(f){case"null":return(0,n._)`${b} ${$} null`;case"array":E=(0,n._)`Array.isArray(${b})`;break;case"object":E=(0,n._)`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":E=k((0,n._)`!(${b} % 1) && !isNaN(${b})`);break;case"number":E=k();break;default:return(0,n._)`typeof ${b} ${$} ${f}`}return g===o.Correct?E:(0,n.not)(E);function k(I=n.nil){return(0,n.and)((0,n._)`typeof ${b} == "number"`,I,w?(0,n._)`isFinite(${b})`:n.nil)}}st.checkDataType=v;function x(f,b,w,g){if(f.length===1)return v(f[0],b,w,g);let $;const E=(0,s.toHash)(f);if(E.array&&E.object){const k=(0,n._)`typeof ${b} != "object"`;$=E.null?k:(0,n._)`!${b} || ${k}`,delete E.null,delete E.array,delete E.object}else $=n.nil;E.number&&delete E.integer;for(const k in E)$=(0,n.and)($,v(k,b,w,g));return $}st.checkDataTypes=x;const y={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:b})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${b}}`};function h(f){const b=_(f);(0,r.reportError)(b,y)}st.reportTypeError=h;function _(f){const{gen:b,data:w,schema:g}=f,$=(0,s.schemaRefOrVal)(f,g,"type");return{gen:b,keyword:"type",data:w,schema:g.type,schemaCode:$,schemaValue:$,parentSchema:g,params:{},it:f}}return st}var Pn={},af;function U0(){if(af)return Pn;af=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.assignDefaults=void 0;const e=we(),t=Oe();function r(s,o){const{properties:a,items:i}=s.schema;if(o==="object"&&a)for(const c in a)n(s,c,a[c].default);else o==="array"&&Array.isArray(i)&&i.forEach((c,l)=>n(s,l,c.default))}Pn.assignDefaults=r;function n(s,o,a){const{gen:i,compositeRule:c,data:l,opts:u}=s;if(a===void 0)return;const p=(0,e._)`${l}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(s,`default is ignored for: ${p}`);return}let m=(0,e._)`${p} === undefined`;u.useDefaults==="empty"&&(m=(0,e._)`${m} || ${p} === null || ${p} === ""`),i.if(m,(0,e._)`${p} = ${(0,e.stringify)(a)}`)}return Pn}var Nt={},We={},cf;function At(){if(cf)return We;cf=1,Object.defineProperty(We,"__esModule",{value:!0}),We.validateUnion=We.validateArray=We.usePattern=We.callValidateCode=We.schemaProperties=We.allSchemaProperties=We.noPropertyInData=We.propertyInData=We.isOwnProperty=We.hasPropFunc=We.reportMissingProp=We.checkMissingProp=We.checkReportMissingProp=void 0;const e=we(),t=Oe(),r=Pt(),n=Oe();function s(f,b){const{gen:w,data:g,it:$}=f;w.if(u(w,g,b,$.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${b}`},!0),f.error()})}We.checkReportMissingProp=s;function o({gen:f,data:b,it:{opts:w}},g,$){return(0,e.or)(...g.map(E=>(0,e.and)(u(f,b,E,w.ownProperties),(0,e._)`${$} = ${E}`)))}We.checkMissingProp=o;function a(f,b){f.setParams({missingProperty:b},!0),f.error()}We.reportMissingProp=a;function i(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}We.hasPropFunc=i;function c(f,b,w){return(0,e._)`${i(f)}.call(${b}, ${w})`}We.isOwnProperty=c;function l(f,b,w,g){const $=(0,e._)`${b}${(0,e.getProperty)(w)} !== undefined`;return g?(0,e._)`${$} && ${c(f,b,w)}`:$}We.propertyInData=l;function u(f,b,w,g){const $=(0,e._)`${b}${(0,e.getProperty)(w)} === undefined`;return g?(0,e.or)($,(0,e.not)(c(f,b,w))):$}We.noPropertyInData=u;function p(f){return f?Object.keys(f).filter(b=>b!=="__proto__"):[]}We.allSchemaProperties=p;function m(f,b){return p(b).filter(w=>!(0,t.alwaysValidSchema)(f,b[w]))}We.schemaProperties=m;function v({schemaCode:f,data:b,it:{gen:w,topSchemaRef:g,schemaPath:$,errorPath:E},it:k},I,z,M){const V=M?(0,e._)`${f}, ${b}, ${g}${$}`:b,F=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,E)],[r.default.parentData,k.parentData],[r.default.parentDataProperty,k.parentDataProperty],[r.default.rootData,r.default.rootData]];k.opts.dynamicRef&&F.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const W=(0,e._)`${V}, ${w.object(...F)}`;return z!==e.nil?(0,e._)`${I}.call(${z}, ${W})`:(0,e._)`${I}(${W})`}We.callValidateCode=v;const x=(0,e._)`new RegExp`;function y({gen:f,it:{opts:b}},w){const g=b.unicodeRegExp?"u":"",{regExp:$}=b.code,E=$(w,g);return f.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,e._)`${$.code==="new RegExp"?x:(0,n.useFunc)(f,$)}(${w}, ${g})`})}We.usePattern=y;function h(f){const{gen:b,data:w,keyword:g,it:$}=f,E=b.name("valid");if($.allErrors){const I=b.let("valid",!0);return k(()=>b.assign(I,!1)),I}return b.var(E,!0),k(()=>b.break()),E;function k(I){const z=b.const("len",(0,e._)`${w}.length`);b.forRange("i",0,z,M=>{f.subschema({keyword:g,dataProp:M,dataPropType:t.Type.Num},E),b.if((0,e.not)(E),I)})}}We.validateArray=h;function _(f){const{gen:b,schema:w,keyword:g,it:$}=f;if(!Array.isArray(w))throw new Error("ajv implementation error");if(w.some(z=>(0,t.alwaysValidSchema)($,z))&&!$.opts.unevaluated)return;const k=b.let("valid",!1),I=b.name("_valid");b.block(()=>w.forEach((z,M)=>{const V=f.subschema({keyword:g,schemaProp:M,compositeRule:!0},I);b.assign(k,(0,e._)`${k} || ${I}`),f.mergeValidEvaluated(V,I)||b.if((0,e.not)(k))})),f.result(k,()=>f.reset(),()=>f.error(!0))}return We.validateUnion=_,We}var lf;function B0(){if(lf)return Nt;lf=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.validateKeywordUsage=Nt.validSchemaType=Nt.funcKeywordCode=Nt.macroKeywordCode=void 0;const e=we(),t=Pt(),r=At(),n=Ds();function s(m,v){const{gen:x,keyword:y,schema:h,parentSchema:_,it:f}=m,b=v.macro.call(f.self,h,_,f),w=l(x,y,b);f.opts.validateSchema!==!1&&f.self.validateSchema(b,!0);const g=x.name("valid");m.subschema({schema:b,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${y}`,topSchemaRef:w,compositeRule:!0},g),m.pass(g,()=>m.error(!0))}Nt.macroKeywordCode=s;function o(m,v){var x;const{gen:y,keyword:h,schema:_,parentSchema:f,$data:b,it:w}=m;c(w,v);const g=!b&&v.compile?v.compile.call(w.self,_,f,w):v.validate,$=l(y,h,g),E=y.let("valid");m.block$data(E,k),m.ok((x=v.valid)!==null&&x!==void 0?x:E);function k(){if(v.errors===!1)M(),v.modifying&&a(m),V(()=>m.error());else{const F=v.async?I():z();v.modifying&&a(m),V(()=>i(m,F))}}function I(){const F=y.let("ruleErrs",null);return y.try(()=>M((0,e._)`await `),W=>y.assign(E,!1).if((0,e._)`${W} instanceof ${w.ValidationError}`,()=>y.assign(F,(0,e._)`${W}.errors`),()=>y.throw(W))),F}function z(){const F=(0,e._)`${$}.errors`;return y.assign(F,null),M(e.nil),F}function M(F=v.async?(0,e._)`await `:e.nil){const W=w.opts.passContext?t.default.this:t.default.self,re=!("compile"in v&&!b||v.schema===!1);y.assign(E,(0,e._)`${F}${(0,r.callValidateCode)(m,$,W,re)}`,v.modifying)}function V(F){var W;y.if((0,e.not)((W=v.valid)!==null&&W!==void 0?W:E),F)}}Nt.funcKeywordCode=o;function a(m){const{gen:v,data:x,it:y}=m;v.if(y.parentData,()=>v.assign(x,(0,e._)`${y.parentData}[${y.parentDataProperty}]`))}function i(m,v){const{gen:x}=m;x.if((0,e._)`Array.isArray(${v})`,()=>{x.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(m)},()=>m.error())}function c({schemaEnv:m},v){if(v.async&&!m.$async)throw new Error("async keyword in sync schema")}function l(m,v,x){if(x===void 0)throw new Error(`keyword "${v}" failed to compile`);return m.scopeValue("keyword",typeof x=="function"?{ref:x}:{ref:x,code:(0,e.stringify)(x)})}function u(m,v,x=!1){return!v.length||v.some(y=>y==="array"?Array.isArray(m):y==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==y||x&&typeof m>"u")}Nt.validSchemaType=u;function p({schema:m,opts:v,self:x,errSchemaPath:y},h,_){if(Array.isArray(h.keyword)?!h.keyword.includes(_):h.keyword!==_)throw new Error("ajv implementation error");const f=h.dependencies;if(f!=null&&f.some(b=>!Object.prototype.hasOwnProperty.call(m,b)))throw new Error(`parent schema must have dependencies of ${_}: ${f.join(",")}`);if(h.validateSchema&&!h.validateSchema(m[_])){const w=`keyword "${_}" value is invalid at path "${y}": `+x.errorsText(h.validateSchema.errors);if(v.validateSchema==="log")x.logger.error(w);else throw new Error(w)}}return Nt.validateKeywordUsage=p,Nt}var Xt={},uf;function W0(){if(uf)return Xt;uf=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.extendSubschemaMode=Xt.extendSubschemaData=Xt.getSubschema=void 0;const e=we(),t=Oe();function r(o,{keyword:a,schemaProp:i,schema:c,schemaPath:l,errSchemaPath:u,topSchemaRef:p}){if(a!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const m=o.schema[a];return i===void 0?{schema:m,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${a}`}:{schema:m[i],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(i)}`,errSchemaPath:`${o.errSchemaPath}/${a}/${(0,t.escapeFragment)(i)}`}}if(c!==void 0){if(l===void 0||u===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:l,topSchemaRef:p,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}Xt.getSubschema=r;function n(o,a,{dataProp:i,dataPropType:c,data:l,dataTypes:u,propertyName:p}){if(l!==void 0&&i!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=a;if(i!==void 0){const{errorPath:x,dataPathArr:y,opts:h}=a,_=m.let("data",(0,e._)`${a.data}${(0,e.getProperty)(i)}`,!0);v(_),o.errorPath=(0,e.str)`${x}${(0,t.getErrorPath)(i,c,h.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${i}`,o.dataPathArr=[...y,o.parentDataProperty]}if(l!==void 0){const x=l instanceof e.Name?l:m.let("data",l,!0);v(x),p!==void 0&&(o.propertyName=p)}u&&(o.dataTypes=u);function v(x){o.data=x,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,x]}}Xt.extendSubschemaData=n;function s(o,{jtdDiscriminator:a,jtdMetadata:i,compositeRule:c,createErrors:l,allErrors:u}){c!==void 0&&(o.compositeRule=c),l!==void 0&&(o.createErrors=l),u!==void 0&&(o.allErrors=u),o.jtdDiscriminator=a,o.jtdMetadata=i}return Xt.extendSubschemaMode=s,Xt}var lt={},gi,df;function ff(){return df||(df=1,gi=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var a=o[s];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),gi}var vi={exports:{}},mf;function H0(){if(mf)return vi.exports;mf=1;var e=vi.exports=function(n,s,o){typeof s=="function"&&(o=s,s={}),o=s.cb||o;var a=typeof o=="function"?o:o.pre||function(){},i=o.post||function(){};t(s,a,i,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,s,o,a,i,c,l,u,p,m){if(a&&typeof a=="object"&&!Array.isArray(a)){s(a,i,c,l,u,p,m);for(var v in a){var x=a[v];if(Array.isArray(x)){if(v in e.arrayKeywords)for(var y=0;y<x.length;y++)t(n,s,o,x[y],i+"/"+v+"/"+y,c,i,v,a,y)}else if(v in e.propsKeywords){if(x&&typeof x=="object")for(var h in x)t(n,s,o,x[h],i+"/"+v+"/"+r(h),c,i,v,a,h)}else(v in e.keywords||n.allKeys&&!(v in e.skipKeywords))&&t(n,s,o,x,i+"/"+v,c,i,v,a)}o(a,i,c,l,u,p,m)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return vi.exports}var hf;function Vs(){if(hf)return lt;hf=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.getSchemaRefs=lt.resolveUrl=lt.normalizeId=lt._getFullPath=lt.getFullPath=lt.inlineRef=void 0;const e=Oe(),t=ff(),r=H0(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(y,h=!0){return typeof y=="boolean"?!0:h===!0?!a(y):h?i(y)<=h:!1}lt.inlineRef=s;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(y){for(const h in y){if(o.has(h))return!0;const _=y[h];if(Array.isArray(_)&&_.some(a)||typeof _=="object"&&a(_))return!0}return!1}function i(y){let h=0;for(const _ in y){if(_==="$ref")return 1/0;if(h++,!n.has(_)&&(typeof y[_]=="object"&&(0,e.eachItem)(y[_],f=>h+=i(f)),h===1/0))return 1/0}return h}function c(y,h="",_){_!==!1&&(h=p(h));const f=y.parse(h);return l(y,f)}lt.getFullPath=c;function l(y,h){return y.serialize(h).split("#")[0]+"#"}lt._getFullPath=l;const u=/#\/?$/;function p(y){return y?y.replace(u,""):""}lt.normalizeId=p;function m(y,h,_){return _=p(_),y.resolve(h,_)}lt.resolveUrl=m;const v=/^[a-z_][-a-z0-9._]*$/i;function x(y,h){if(typeof y=="boolean")return{};const{schemaId:_,uriResolver:f}=this.opts,b=p(y[_]||h),w={"":b},g=c(f,b,!1),$={},E=new Set;return r(y,{allKeys:!0},(z,M,V,F)=>{if(F===void 0)return;const W=g+M;let re=w[F];typeof z[_]=="string"&&(re=Y.call(this,z[_])),ae.call(this,z.$anchor),ae.call(this,z.$dynamicAnchor),w[M]=re;function Y(L){const ve=this.opts.uriResolver.resolve;if(L=p(re?ve(re,L):L),E.has(L))throw I(L);E.add(L);let G=this.refs[L];return typeof G=="string"&&(G=this.refs[G]),typeof G=="object"?k(z,G.schema,L):L!==p(W)&&(L[0]==="#"?(k(z,$[L],L),$[L]=z):this.refs[L]=W),L}function ae(L){if(typeof L=="string"){if(!v.test(L))throw new Error(`invalid anchor "${L}"`);Y.call(this,`#${L}`)}}}),$;function k(z,M,V){if(M!==void 0&&!t(z,M))throw I(V)}function I(z){return new Error(`reference "${z}" resolves to more than one schema`)}}return lt.getSchemaRefs=x,lt}var pf;function Nn(){if(pf)return Yt;pf=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.getData=Yt.KeywordCxt=Yt.validateFunctionCode=void 0;const e=q0(),t=Ms(),r=sf(),n=Ms(),s=U0(),o=B0(),a=W0(),i=we(),c=Pt(),l=Vs(),u=Oe(),p=Ds();function m(N){if(g(N)&&(E(N),w(N))){h(N);return}v(N,()=>(0,e.topBoolOrEmptySchema)(N))}Yt.validateFunctionCode=m;function v({gen:N,validateName:A,schema:H,schemaEnv:J,opts:le},ye){le.code.es5?N.func(A,(0,i._)`${c.default.data}, ${c.default.valCxt}`,J.$async,()=>{N.code((0,i._)`"use strict"; ${f(H,le)}`),y(N,le),N.code(ye)}):N.func(A,(0,i._)`${c.default.data}, ${x(le)}`,J.$async,()=>N.code(f(H,le)).code(ye))}function x(N){return(0,i._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${N.dynamicRef?(0,i._)`, ${c.default.dynamicAnchors}={}`:i.nil}}={}`}function y(N,A){N.if(c.default.valCxt,()=>{N.var(c.default.instancePath,(0,i._)`${c.default.valCxt}.${c.default.instancePath}`),N.var(c.default.parentData,(0,i._)`${c.default.valCxt}.${c.default.parentData}`),N.var(c.default.parentDataProperty,(0,i._)`${c.default.valCxt}.${c.default.parentDataProperty}`),N.var(c.default.rootData,(0,i._)`${c.default.valCxt}.${c.default.rootData}`),A.dynamicRef&&N.var(c.default.dynamicAnchors,(0,i._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{N.var(c.default.instancePath,(0,i._)`""`),N.var(c.default.parentData,(0,i._)`undefined`),N.var(c.default.parentDataProperty,(0,i._)`undefined`),N.var(c.default.rootData,c.default.data),A.dynamicRef&&N.var(c.default.dynamicAnchors,(0,i._)`{}`)})}function h(N){const{schema:A,opts:H,gen:J}=N;v(N,()=>{H.$comment&&A.$comment&&F(N),z(N),J.let(c.default.vErrors,null),J.let(c.default.errors,0),H.unevaluated&&_(N),k(N),W(N)})}function _(N){const{gen:A,validateName:H}=N;N.evaluated=A.const("evaluated",(0,i._)`${H}.evaluated`),A.if((0,i._)`${N.evaluated}.dynamicProps`,()=>A.assign((0,i._)`${N.evaluated}.props`,(0,i._)`undefined`)),A.if((0,i._)`${N.evaluated}.dynamicItems`,()=>A.assign((0,i._)`${N.evaluated}.items`,(0,i._)`undefined`))}function f(N,A){const H=typeof N=="object"&&N[A.schemaId];return H&&(A.code.source||A.code.process)?(0,i._)`/*# sourceURL=${H} */`:i.nil}function b(N,A){if(g(N)&&(E(N),w(N))){$(N,A);return}(0,e.boolOrEmptySchema)(N,A)}function w({schema:N,self:A}){if(typeof N=="boolean")return!N;for(const H in N)if(A.RULES.all[H])return!0;return!1}function g(N){return typeof N.schema!="boolean"}function $(N,A){const{schema:H,gen:J,opts:le}=N;le.$comment&&H.$comment&&F(N),M(N),V(N);const ye=J.const("_errs",c.default.errors);k(N,ye),J.var(A,(0,i._)`${ye} === ${c.default.errors}`)}function E(N){(0,u.checkUnknownRules)(N),I(N)}function k(N,A){if(N.opts.jtd)return Y(N,[],!1,A);const H=(0,t.getSchemaTypes)(N.schema),J=(0,t.coerceAndCheckDataType)(N,H);Y(N,H,!J,A)}function I(N){const{schema:A,errSchemaPath:H,opts:J,self:le}=N;A.$ref&&J.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(A,le.RULES)&&le.logger.warn(`$ref: keywords ignored in schema at path "${H}"`)}function z(N){const{schema:A,opts:H}=N;A.default!==void 0&&H.useDefaults&&H.strictSchema&&(0,u.checkStrictMode)(N,"default is ignored in the schema root")}function M(N){const A=N.schema[N.opts.schemaId];A&&(N.baseId=(0,l.resolveUrl)(N.opts.uriResolver,N.baseId,A))}function V(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function F({gen:N,schemaEnv:A,schema:H,errSchemaPath:J,opts:le}){const ye=H.$comment;if(le.$comment===!0)N.code((0,i._)`${c.default.self}.logger.log(${ye})`);else if(typeof le.$comment=="function"){const He=(0,i.str)`${J}/$comment`,ot=N.scopeValue("root",{ref:A.root});N.code((0,i._)`${c.default.self}.opts.$comment(${ye}, ${He}, ${ot}.schema)`)}}function W(N){const{gen:A,schemaEnv:H,validateName:J,ValidationError:le,opts:ye}=N;H.$async?A.if((0,i._)`${c.default.errors} === 0`,()=>A.return(c.default.data),()=>A.throw((0,i._)`new ${le}(${c.default.vErrors})`)):(A.assign((0,i._)`${J}.errors`,c.default.vErrors),ye.unevaluated&&re(N),A.return((0,i._)`${c.default.errors} === 0`))}function re({gen:N,evaluated:A,props:H,items:J}){H instanceof i.Name&&N.assign((0,i._)`${A}.props`,H),J instanceof i.Name&&N.assign((0,i._)`${A}.items`,J)}function Y(N,A,H,J){const{gen:le,schema:ye,data:He,allErrors:ot,opts:Ge,self:j}=N,{RULES:D}=j;if(ye.$ref&&(Ge.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(ye,D))){le.block(()=>B(N,"$ref",D.all.$ref.definition));return}Ge.jtd||L(N,A),le.block(()=>{for(const ne of D.rules)U(ne);U(D.post)});function U(ne){(0,r.shouldUseGroup)(ye,ne)&&(ne.type?(le.if((0,n.checkDataType)(ne.type,He,Ge.strictNumbers)),ae(N,ne),A.length===1&&A[0]===ne.type&&H&&(le.else(),(0,n.reportTypeError)(N)),le.endIf()):ae(N,ne),ot||le.if((0,i._)`${c.default.errors} === ${J||0}`))}}function ae(N,A){const{gen:H,schema:J,opts:{useDefaults:le}}=N;le&&(0,s.assignDefaults)(N,A.type),H.block(()=>{for(const ye of A.rules)(0,r.shouldUseRule)(J,ye)&&B(N,ye.keyword,ye.definition,A.type)})}function L(N,A){N.schemaEnv.meta||!N.opts.strictTypes||(ve(N,A),N.opts.allowUnionTypes||G(N,A),T(N,N.dataTypes))}function ve(N,A){if(A.length){if(!N.dataTypes.length){N.dataTypes=A;return}A.forEach(H=>{O(N.dataTypes,H)||R(N,`type "${H}" not allowed by context "${N.dataTypes.join(",")}"`)}),C(N,A)}}function G(N,A){A.length>1&&!(A.length===2&&A.includes("null"))&&R(N,"use allowUnionTypes to allow union type keyword")}function T(N,A){const H=N.self.RULES.all;for(const J in H){const le=H[J];if(typeof le=="object"&&(0,r.shouldUseRule)(N.schema,le)){const{type:ye}=le.definition;ye.length&&!ye.some(He=>K(A,He))&&R(N,`missing type "${ye.join(",")}" for keyword "${J}"`)}}}function K(N,A){return N.includes(A)||A==="number"&&N.includes("integer")}function O(N,A){return N.includes(A)||A==="integer"&&N.includes("number")}function C(N,A){const H=[];for(const J of N.dataTypes)O(A,J)?H.push(J):A.includes("integer")&&J==="number"&&H.push("integer");N.dataTypes=H}function R(N,A){const H=N.schemaEnv.baseId+N.errSchemaPath;A+=` at "${H}" (strictTypes)`,(0,u.checkStrictMode)(N,A,N.opts.strictTypes)}class q{constructor(A,H,J){if((0,o.validateKeywordUsage)(A,H,J),this.gen=A.gen,this.allErrors=A.allErrors,this.keyword=J,this.data=A.data,this.schema=A.schema[J],this.$data=H.$data&&A.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(A,this.schema,J,this.$data),this.schemaType=H.schemaType,this.parentSchema=A.schema,this.params={},this.it=A,this.def=H,this.$data)this.schemaCode=A.gen.const("vSchema",ie(this.$data,A));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,H.schemaType,H.allowUndefined))throw new Error(`${J} value must be ${JSON.stringify(H.schemaType)}`);("code"in H?H.trackErrors:H.errors!==!1)&&(this.errsCount=A.gen.const("_errs",c.default.errors))}result(A,H,J){this.failResult((0,i.not)(A),H,J)}failResult(A,H,J){this.gen.if(A),J?J():this.error(),H?(this.gen.else(),H(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(A,H){this.failResult((0,i.not)(A),void 0,H)}fail(A){if(A===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(A),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(A){if(!this.$data)return this.fail(A);const{schemaCode:H}=this;this.fail((0,i._)`${H} !== undefined && (${(0,i.or)(this.invalid$data(),A)})`)}error(A,H,J){if(H){this.setParams(H),this._error(A,J),this.setParams({});return}this._error(A,J)}_error(A,H){(A?p.reportExtraError:p.reportError)(this,this.def.error,H)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(A){this.allErrors||this.gen.if(A)}setParams(A,H){H?Object.assign(this.params,A):this.params=A}block$data(A,H,J=i.nil){this.gen.block(()=>{this.check$data(A,J),H()})}check$data(A=i.nil,H=i.nil){if(!this.$data)return;const{gen:J,schemaCode:le,schemaType:ye,def:He}=this;J.if((0,i.or)((0,i._)`${le} === undefined`,H)),A!==i.nil&&J.assign(A,!0),(ye.length||He.validateSchema)&&(J.elseIf(this.invalid$data()),this.$dataError(),A!==i.nil&&J.assign(A,!1)),J.else()}invalid$data(){const{gen:A,schemaCode:H,schemaType:J,def:le,it:ye}=this;return(0,i.or)(He(),ot());function He(){if(J.length){if(!(H instanceof i.Name))throw new Error("ajv implementation error");const Ge=Array.isArray(J)?J:[J];return(0,i._)`${(0,n.checkDataTypes)(Ge,H,ye.opts.strictNumbers,n.DataType.Wrong)}`}return i.nil}function ot(){if(le.validateSchema){const Ge=A.scopeValue("validate$data",{ref:le.validateSchema});return(0,i._)`!${Ge}(${H})`}return i.nil}}subschema(A,H){const J=(0,a.getSubschema)(this.it,A);(0,a.extendSubschemaData)(J,this.it,A),(0,a.extendSubschemaMode)(J,A);const le={...this.it,...J,items:void 0,props:void 0};return b(le,H),le}mergeEvaluated(A,H){const{it:J,gen:le}=this;J.opts.unevaluated&&(J.props!==!0&&A.props!==void 0&&(J.props=u.mergeEvaluated.props(le,A.props,J.props,H)),J.items!==!0&&A.items!==void 0&&(J.items=u.mergeEvaluated.items(le,A.items,J.items,H)))}mergeValidEvaluated(A,H){const{it:J,gen:le}=this;if(J.opts.unevaluated&&(J.props!==!0||J.items!==!0))return le.if(H,()=>this.mergeEvaluated(A,i.Name)),!0}}Yt.KeywordCxt=q;function B(N,A,H,J){const le=new q(N,H,A);"code"in H?H.code(le,J):le.$data&&H.validate?(0,o.funcKeywordCode)(le,H):"macro"in H?(0,o.macroKeywordCode)(le,H):(H.compile||H.validate)&&(0,o.funcKeywordCode)(le,H)}const Q=/^\/(?:[^~]|~0|~1)*$/,pe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ie(N,{dataLevel:A,dataNames:H,dataPathArr:J}){let le,ye;if(N==="")return c.default.rootData;if(N[0]==="/"){if(!Q.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);le=N,ye=c.default.rootData}else{const j=pe.exec(N);if(!j)throw new Error(`Invalid JSON-pointer: ${N}`);const D=+j[1];if(le=j[2],le==="#"){if(D>=A)throw new Error(Ge("property/index",D));return J[A-D]}if(D>A)throw new Error(Ge("data",D));if(ye=H[A-D],!le)return ye}let He=ye;const ot=le.split("/");for(const j of ot)j&&(ye=(0,i._)`${ye}${(0,i.getProperty)((0,u.unescapeJsonPointer)(j))}`,He=(0,i._)`${He} && ${ye}`);return He;function Ge(j,D){return`Cannot access ${j} ${D} levels up, current level is ${A}`}}return Yt.getData=ie,Yt}var Fs={},gf;function Ls(){if(gf)return Fs;gf=1,Object.defineProperty(Fs,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Fs.default=e,Fs}var zs={},vf;function An(){if(vf)return zs;vf=1,Object.defineProperty(zs,"__esModule",{value:!0});const e=Vs();class t extends Error{constructor(n,s,o,a){super(a||`can't resolve reference ${o} from id ${s}`),this.missingRef=(0,e.resolveUrl)(n,s,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return zs.default=t,zs}var bt={},yf;function qs(){if(yf)return bt;yf=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.resolveSchema=bt.getCompilingSchema=bt.resolveRef=bt.compileSchema=bt.SchemaEnv=void 0;const e=we(),t=Ls(),r=Pt(),n=Vs(),s=Oe(),o=Nn();class a{constructor(_){var f;this.refs={},this.dynamicAnchors={};let b;typeof _.schema=="object"&&(b=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(f=_.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(b==null?void 0:b[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=b==null?void 0:b.$async,this.refs={}}}bt.SchemaEnv=a;function i(h){const _=u.call(this,h);if(_)return _;const f=(0,n.getFullPath)(this.opts.uriResolver,h.root.baseId),{es5:b,lines:w}=this.opts.code,{ownProperties:g}=this.opts,$=new e.CodeGen(this.scope,{es5:b,lines:w,ownProperties:g});let E;h.$async&&(E=$.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const k=$.scopeName("validate");h.validateName=k;const I={gen:$,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:$.scopeValue("schema",this.opts.code.source===!0?{ref:h.schema,code:(0,e.stringify)(h.schema)}:{ref:h.schema}),validateName:k,ValidationError:E,schema:h.schema,schemaEnv:h,rootId:f,baseId:h.baseId||f,schemaPath:e.nil,errSchemaPath:h.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let z;try{this._compilations.add(h),(0,o.validateFunctionCode)(I),$.optimize(this.opts.code.optimize);const M=$.toString();z=`${$.scopeRefs(r.default.scope)}return ${M}`,this.opts.code.process&&(z=this.opts.code.process(z,h));const F=new Function(`${r.default.self}`,`${r.default.scope}`,z)(this,this.scope.get());if(this.scope.value(k,{ref:F}),F.errors=null,F.schema=h.schema,F.schemaEnv=h,h.$async&&(F.$async=!0),this.opts.code.source===!0&&(F.source={validateName:k,validateCode:M,scopeValues:$._values}),this.opts.unevaluated){const{props:W,items:re}=I;F.evaluated={props:W instanceof e.Name?void 0:W,items:re instanceof e.Name?void 0:re,dynamicProps:W instanceof e.Name,dynamicItems:re instanceof e.Name},F.source&&(F.source.evaluated=(0,e.stringify)(F.evaluated))}return h.validate=F,h}catch(M){throw delete h.validate,delete h.validateName,z&&this.logger.error("Error compiling schema, function code:",z),M}finally{this._compilations.delete(h)}}bt.compileSchema=i;function c(h,_,f){var b;f=(0,n.resolveUrl)(this.opts.uriResolver,_,f);const w=h.refs[f];if(w)return w;let g=m.call(this,h,f);if(g===void 0){const $=(b=h.localRefs)===null||b===void 0?void 0:b[f],{schemaId:E}=this.opts;$&&(g=new a({schema:$,schemaId:E,root:h,baseId:_}))}if(g!==void 0)return h.refs[f]=l.call(this,g)}bt.resolveRef=c;function l(h){return(0,n.inlineRef)(h.schema,this.opts.inlineRefs)?h.schema:h.validate?h:i.call(this,h)}function u(h){for(const _ of this._compilations)if(p(_,h))return _}bt.getCompilingSchema=u;function p(h,_){return h.schema===_.schema&&h.root===_.root&&h.baseId===_.baseId}function m(h,_){let f;for(;typeof(f=this.refs[_])=="string";)_=f;return f||this.schemas[_]||v.call(this,h,_)}function v(h,_){const f=this.opts.uriResolver.parse(_),b=(0,n._getFullPath)(this.opts.uriResolver,f);let w=(0,n.getFullPath)(this.opts.uriResolver,h.baseId,void 0);if(Object.keys(h.schema).length>0&&b===w)return y.call(this,f,h);const g=(0,n.normalizeId)(b),$=this.refs[g]||this.schemas[g];if(typeof $=="string"){const E=v.call(this,h,$);return typeof(E==null?void 0:E.schema)!="object"?void 0:y.call(this,f,E)}if(typeof($==null?void 0:$.schema)=="object"){if($.validate||i.call(this,$),g===(0,n.normalizeId)(_)){const{schema:E}=$,{schemaId:k}=this.opts,I=E[k];return I&&(w=(0,n.resolveUrl)(this.opts.uriResolver,w,I)),new a({schema:E,schemaId:k,root:h,baseId:w})}return y.call(this,f,$)}}bt.resolveSchema=v;const x=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(h,{baseId:_,schema:f,root:b}){var w;if(((w=h.fragment)===null||w===void 0?void 0:w[0])!=="/")return;for(const E of h.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const k=f[(0,s.unescapeFragment)(E)];if(k===void 0)return;f=k;const I=typeof f=="object"&&f[this.opts.schemaId];!x.has(E)&&I&&(_=(0,n.resolveUrl)(this.opts.uriResolver,_,I))}let g;if(typeof f!="boolean"&&f.$ref&&!(0,s.schemaHasRulesButRef)(f,this.RULES)){const E=(0,n.resolveUrl)(this.opts.uriResolver,_,f.$ref);g=v.call(this,b,E)}const{schemaId:$}=this.opts;if(g=g||new a({schema:f,schemaId:$,root:b,baseId:_}),g.schema!==g.root.schema)return g}return bt}const G0={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Us={},Tn={exports:{}},yi,bf;function _f(){if(bf)return yi;bf=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(m){let v="",x=0,y=0;for(y=0;y<m.length;y++)if(x=m[y].charCodeAt(0),x!==48){if(!(x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102))return"";v+=m[y];break}for(y+=1;y<m.length;y++){if(x=m[y].charCodeAt(0),!(x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102))return"";v+=m[y]}return v}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(m){return m.length=0,!0}function o(m,v,x){if(m.length){const y=r(m);if(y!=="")v.push(y);else return x.error=!0,!1;m.length=0}return!0}function a(m){let v=0;const x={error:!1,address:"",zone:""},y=[],h=[];let _=!1,f=!1,b=o;for(let w=0;w<m.length;w++){const g=m[w];if(!(g==="["||g==="]"))if(g===":"){if(_===!0&&(f=!0),!b(h,y,x))break;if(++v>7){x.error=!0;break}w>0&&m[w-1]===":"&&(_=!0),y.push(":");continue}else if(g==="%"){if(!b(h,y,x))break;b=s}else{h.push(g);continue}}return h.length&&(b===s?x.zone=h.join(""):f?y.push(h.join("")):y.push(r(h))),x.address=y.join(""),x}function i(m){if(c(m,":")<2)return{host:m,isIPV6:!1};const v=a(m);if(v.error)return{host:m,isIPV6:!1};{let x=v.address,y=v.address;return v.zone&&(x+="%"+v.zone,y+="%25"+v.zone),{host:x,isIPV6:!0,escapedHost:y}}}function c(m,v){let x=0;for(let y=0;y<m.length;y++)m[y]===v&&x++;return x}function l(m){let v=m;const x=[];let y=-1,h=0;for(;h=v.length;){if(h===1){if(v===".")break;if(v==="/"){x.push("/");break}else{x.push(v);break}}else if(h===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){x.push("/");break}}else if(h===3&&v==="/.."){x.length!==0&&x.pop(),x.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),x.length!==0&&x.pop();continue}}if((y=v.indexOf("/",1))===-1){x.push(v);break}else x.push(v.slice(0,y)),v=v.slice(y)}return x.join("")}function u(m,v){const x=v!==!0?escape:unescape;return m.scheme!==void 0&&(m.scheme=x(m.scheme)),m.userinfo!==void 0&&(m.userinfo=x(m.userinfo)),m.host!==void 0&&(m.host=x(m.host)),m.path!==void 0&&(m.path=x(m.path)),m.query!==void 0&&(m.query=x(m.query)),m.fragment!==void 0&&(m.fragment=x(m.fragment)),m}function p(m){const v=[];if(m.userinfo!==void 0&&(v.push(m.userinfo),v.push("@")),m.host!==void 0){let x=unescape(m.host);if(!t(x)){const y=i(x);y.isIPV6===!0?x=`[${y.escapedHost}]`:x=m.host}v.push(x)}return(typeof m.port=="number"||typeof m.port=="string")&&(v.push(":"),v.push(String(m.port))),v.length?v.join(""):void 0}return yi={nonSimpleDomain:n,recomposeAuthority:p,normalizeComponentEncoding:u,removeDotSegments:l,isIPv4:t,isUUID:e,normalizeIPv6:i,stringArrayToHexStripped:r},yi}var bi,xf;function K0(){if(xf)return bi;xf=1;const{isUUID:e}=_f(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(g){return r.indexOf(g)!==-1}function s(g){return g.secure===!0?!0:g.secure===!1?!1:g.scheme?g.scheme.length===3&&(g.scheme[0]==="w"||g.scheme[0]==="W")&&(g.scheme[1]==="s"||g.scheme[1]==="S")&&(g.scheme[2]==="s"||g.scheme[2]==="S"):!1}function o(g){return g.host||(g.error=g.error||"HTTP URIs must have a host."),g}function a(g){const $=String(g.scheme).toLowerCase()==="https";return(g.port===($?443:80)||g.port==="")&&(g.port=void 0),g.path||(g.path="/"),g}function i(g){return g.secure=s(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g}function c(g){if((g.port===(s(g)?443:80)||g.port==="")&&(g.port=void 0),typeof g.secure=="boolean"&&(g.scheme=g.secure?"wss":"ws",g.secure=void 0),g.resourceName){const[$,E]=g.resourceName.split("?");g.path=$&&$!=="/"?$:void 0,g.query=E,g.resourceName=void 0}return g.fragment=void 0,g}function l(g,$){if(!g.path)return g.error="URN can not be parsed",g;const E=g.path.match(t);if(E){const k=$.scheme||g.scheme||"urn";g.nid=E[1].toLowerCase(),g.nss=E[2];const I=`${k}:${$.nid||g.nid}`,z=w(I);g.path=void 0,z&&(g=z.parse(g,$))}else g.error=g.error||"URN can not be parsed.";return g}function u(g,$){if(g.nid===void 0)throw new Error("URN without nid cannot be serialized");const E=$.scheme||g.scheme||"urn",k=g.nid.toLowerCase(),I=`${E}:${$.nid||k}`,z=w(I);z&&(g=z.serialize(g,$));const M=g,V=g.nss;return M.path=`${k||$.nid}:${V}`,$.skipEscape=!0,M}function p(g,$){const E=g;return E.uuid=E.nss,E.nss=void 0,!$.tolerant&&(!E.uuid||!e(E.uuid))&&(E.error=E.error||"UUID is not valid."),E}function m(g){const $=g;return $.nss=(g.uuid||"").toLowerCase(),$}const v={scheme:"http",domainHost:!0,parse:o,serialize:a},x={scheme:"https",domainHost:v.domainHost,parse:o,serialize:a},y={scheme:"ws",domainHost:!0,parse:i,serialize:c},h={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},b={http:v,https:x,ws:y,wss:h,urn:{scheme:"urn",parse:l,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(b,null);function w(g){return g&&(b[g]||b[g.toLowerCase()])||void 0}return bi={wsIsSecure:s,SCHEMES:b,isValidSchemeName:n,getSchemeHandler:w},bi}var wf;function Z0(){if(wf)return Tn.exports;wf=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:s,nonSimpleDomain:o}=_f(),{SCHEMES:a,getSchemeHandler:i}=K0();function c(h,_){return typeof h=="string"?h=m(x(h,_),_):typeof h=="object"&&(h=x(m(h,_),_)),h}function l(h,_,f){const b=f?Object.assign({scheme:"null"},f):{scheme:"null"},w=u(x(h,b),x(_,b),b,!0);return b.skipEscape=!0,m(w,b)}function u(h,_,f,b){const w={};return b||(h=x(m(h,f),f),_=x(m(_,f),f)),f=f||{},!f.tolerant&&_.scheme?(w.scheme=_.scheme,w.userinfo=_.userinfo,w.host=_.host,w.port=_.port,w.path=t(_.path||""),w.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?(w.userinfo=_.userinfo,w.host=_.host,w.port=_.port,w.path=t(_.path||""),w.query=_.query):(_.path?(_.path[0]==="/"?w.path=t(_.path):((h.userinfo!==void 0||h.host!==void 0||h.port!==void 0)&&!h.path?w.path="/"+_.path:h.path?w.path=h.path.slice(0,h.path.lastIndexOf("/")+1)+_.path:w.path=_.path,w.path=t(w.path)),w.query=_.query):(w.path=h.path,_.query!==void 0?w.query=_.query:w.query=h.query),w.userinfo=h.userinfo,w.host=h.host,w.port=h.port),w.scheme=h.scheme),w.fragment=_.fragment,w}function p(h,_,f){return typeof h=="string"?(h=unescape(h),h=m(n(x(h,f),!0),{...f,skipEscape:!0})):typeof h=="object"&&(h=m(n(h,!0),{...f,skipEscape:!0})),typeof _=="string"?(_=unescape(_),_=m(n(x(_,f),!0),{...f,skipEscape:!0})):typeof _=="object"&&(_=m(n(_,!0),{...f,skipEscape:!0})),h.toLowerCase()===_.toLowerCase()}function m(h,_){const f={host:h.host,scheme:h.scheme,userinfo:h.userinfo,port:h.port,path:h.path,query:h.query,nid:h.nid,nss:h.nss,uuid:h.uuid,fragment:h.fragment,reference:h.reference,resourceName:h.resourceName,secure:h.secure,error:""},b=Object.assign({},_),w=[],g=i(b.scheme||f.scheme);g&&g.serialize&&g.serialize(f,b),f.path!==void 0&&(b.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),b.reference!=="suffix"&&f.scheme&&w.push(f.scheme,":");const $=r(f);if($!==void 0&&(b.reference!=="suffix"&&w.push("//"),w.push($),f.path&&f.path[0]!=="/"&&w.push("/")),f.path!==void 0){let E=f.path;!b.absolutePath&&(!g||!g.absolutePath)&&(E=t(E)),$===void 0&&E[0]==="/"&&E[1]==="/"&&(E="/%2F"+E.slice(2)),w.push(E)}return f.query!==void 0&&w.push("?",f.query),f.fragment!==void 0&&w.push("#",f.fragment),w.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function x(h,_){const f=Object.assign({},_),b={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let w=!1;f.reference==="suffix"&&(f.scheme?h=f.scheme+":"+h:h="//"+h);const g=h.match(v);if(g){if(b.scheme=g[1],b.userinfo=g[3],b.host=g[4],b.port=parseInt(g[5],10),b.path=g[6]||"",b.query=g[7],b.fragment=g[8],isNaN(b.port)&&(b.port=g[5]),b.host)if(s(b.host)===!1){const k=e(b.host);b.host=k.host.toLowerCase(),w=k.isIPV6}else w=!0;b.scheme===void 0&&b.userinfo===void 0&&b.host===void 0&&b.port===void 0&&b.query===void 0&&!b.path?b.reference="same-document":b.scheme===void 0?b.reference="relative":b.fragment===void 0?b.reference="absolute":b.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==b.reference&&(b.error=b.error||"URI is not a "+f.reference+" reference.");const $=i(f.scheme||b.scheme);if(!f.unicodeSupport&&(!$||!$.unicodeSupport)&&b.host&&(f.domainHost||$&&$.domainHost)&&w===!1&&o(b.host))try{b.host=URL.domainToASCII(b.host.toLowerCase())}catch(E){b.error=b.error||"Host's domain name can not be converted to ASCII: "+E}(!$||$&&!$.skipNormalize)&&(h.indexOf("%")!==-1&&(b.scheme!==void 0&&(b.scheme=unescape(b.scheme)),b.host!==void 0&&(b.host=unescape(b.host))),b.path&&(b.path=escape(unescape(b.path))),b.fragment&&(b.fragment=encodeURI(decodeURIComponent(b.fragment)))),$&&$.parse&&$.parse(b,f)}else b.error=b.error||"URI can not be parsed.";return b}const y={SCHEMES:a,normalize:c,resolve:l,resolveComponent:u,equal:p,serialize:m,parse:x};return Tn.exports=y,Tn.exports.default=y,Tn.exports.fastUri=y,Tn.exports}var $f;function Y0(){if($f)return Us;$f=1,Object.defineProperty(Us,"__esModule",{value:!0});const e=Z0();return e.code='require("ajv/dist/runtime/uri").default',Us.default=e,Us}var Sf;function Ef(){return Sf||(Sf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Nn();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=we();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Ls(),s=An(),o=rf(),a=qs(),i=we(),c=Vs(),l=Ms(),u=Oe(),p=G0,m=Y0(),v=(G,T)=>new RegExp(G,T);v.code="new RegExp";const x=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),h={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function b(G){var T,K,O,C,R,q,B,Q,pe,ie,N,A,H,J,le,ye,He,ot,Ge,j,D,U,ne,se,ee;const he=G.strict,Ie=(T=G.code)===null||T===void 0?void 0:T.optimize,Ue=Ie===!0||Ie===void 0?1:Ie||0,nt=(O=(K=G.code)===null||K===void 0?void 0:K.regExp)!==null&&O!==void 0?O:v,tr=(C=G.uriResolver)!==null&&C!==void 0?C:m.default;return{strictSchema:(q=(R=G.strictSchema)!==null&&R!==void 0?R:he)!==null&&q!==void 0?q:!0,strictNumbers:(Q=(B=G.strictNumbers)!==null&&B!==void 0?B:he)!==null&&Q!==void 0?Q:!0,strictTypes:(ie=(pe=G.strictTypes)!==null&&pe!==void 0?pe:he)!==null&&ie!==void 0?ie:"log",strictTuples:(A=(N=G.strictTuples)!==null&&N!==void 0?N:he)!==null&&A!==void 0?A:"log",strictRequired:(J=(H=G.strictRequired)!==null&&H!==void 0?H:he)!==null&&J!==void 0?J:!1,code:G.code?{...G.code,optimize:Ue,regExp:nt}:{optimize:Ue,regExp:nt},loopRequired:(le=G.loopRequired)!==null&&le!==void 0?le:f,loopEnum:(ye=G.loopEnum)!==null&&ye!==void 0?ye:f,meta:(He=G.meta)!==null&&He!==void 0?He:!0,messages:(ot=G.messages)!==null&&ot!==void 0?ot:!0,inlineRefs:(Ge=G.inlineRefs)!==null&&Ge!==void 0?Ge:!0,schemaId:(j=G.schemaId)!==null&&j!==void 0?j:"$id",addUsedSchema:(D=G.addUsedSchema)!==null&&D!==void 0?D:!0,validateSchema:(U=G.validateSchema)!==null&&U!==void 0?U:!0,validateFormats:(ne=G.validateFormats)!==null&&ne!==void 0?ne:!0,unicodeRegExp:(se=G.unicodeRegExp)!==null&&se!==void 0?se:!0,int32range:(ee=G.int32range)!==null&&ee!==void 0?ee:!0,uriResolver:tr}}class w{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...b(T)};const{es5:K,lines:O}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:y,es5:K,lines:O}),this.logger=V(T.logger);const C=T.validateFormats;T.validateFormats=!1,this.RULES=(0,o.getRules)(),g.call(this,h,T,"NOT SUPPORTED"),g.call(this,_,T,"DEPRECATED","warn"),this._metaOpts=z.call(this),T.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&I.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),E.call(this),T.validateFormats=C}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:K,schemaId:O}=this.opts;let C=p;O==="id"&&(C={...p},C.id=C.$id,delete C.$id),K&&T&&this.addMetaSchema(C,C[O],!1)}defaultMeta(){const{meta:T,schemaId:K}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[K]||T:void 0}validate(T,K){let O;if(typeof T=="string"){if(O=this.getSchema(T),!O)throw new Error(`no schema with key or ref "${T}"`)}else O=this.compile(T);const C=O(K);return"$async"in O||(this.errors=O.errors),C}compile(T,K){const O=this._addSchema(T,K);return O.validate||this._compileSchemaEnv(O)}compileAsync(T,K){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:O}=this.opts;return C.call(this,T,K);async function C(ie,N){await R.call(this,ie.$schema);const A=this._addSchema(ie,N);return A.validate||q.call(this,A)}async function R(ie){ie&&!this.getSchema(ie)&&await C.call(this,{$ref:ie},!0)}async function q(ie){try{return this._compileSchemaEnv(ie)}catch(N){if(!(N instanceof s.default))throw N;return B.call(this,N),await Q.call(this,N.missingSchema),q.call(this,ie)}}function B({missingSchema:ie,missingRef:N}){if(this.refs[ie])throw new Error(`AnySchema ${ie} is loaded but ${N} cannot be resolved`)}async function Q(ie){const N=await pe.call(this,ie);this.refs[ie]||await R.call(this,N.$schema),this.refs[ie]||this.addSchema(N,ie,K)}async function pe(ie){const N=this._loading[ie];if(N)return N;try{return await(this._loading[ie]=O(ie))}finally{delete this._loading[ie]}}}addSchema(T,K,O,C=this.opts.validateSchema){if(Array.isArray(T)){for(const q of T)this.addSchema(q,void 0,O,C);return this}let R;if(typeof T=="object"){const{schemaId:q}=this.opts;if(R=T[q],R!==void 0&&typeof R!="string")throw new Error(`schema ${q} must be string`)}return K=(0,c.normalizeId)(K||R),this._checkUnique(K),this.schemas[K]=this._addSchema(T,O,K,C,!0),this}addMetaSchema(T,K,O=this.opts.validateSchema){return this.addSchema(T,K,!0,O),this}validateSchema(T,K){if(typeof T=="boolean")return!0;let O;if(O=T.$schema,O!==void 0&&typeof O!="string")throw new Error("$schema must be a string");if(O=O||this.opts.defaultMeta||this.defaultMeta(),!O)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const C=this.validate(O,T);if(!C&&K){const R="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(R);else throw new Error(R)}return C}getSchema(T){let K;for(;typeof(K=$.call(this,T))=="string";)T=K;if(K===void 0){const{schemaId:O}=this.opts,C=new a.SchemaEnv({schema:{},schemaId:O});if(K=a.resolveSchema.call(this,C,T),!K)return;this.refs[T]=K}return K.validate||this._compileSchemaEnv(K)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const K=$.call(this,T);return typeof K=="object"&&this._cache.delete(K.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const K=T;this._cache.delete(K);let O=T[this.opts.schemaId];return O&&(O=(0,c.normalizeId)(O),delete this.schemas[O],delete this.refs[O]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const K of T)this.addKeyword(K);return this}addKeyword(T,K){let O;if(typeof T=="string")O=T,typeof K=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),K.keyword=O);else if(typeof T=="object"&&K===void 0){if(K=T,O=K.keyword,Array.isArray(O)&&!O.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,O,K),!K)return(0,u.eachItem)(O,R=>re.call(this,R)),this;ae.call(this,K);const C={...K,type:(0,l.getJSONTypes)(K.type),schemaType:(0,l.getJSONTypes)(K.schemaType)};return(0,u.eachItem)(O,C.type.length===0?R=>re.call(this,R,C):R=>C.type.forEach(q=>re.call(this,R,C,q))),this}getKeyword(T){const K=this.RULES.all[T];return typeof K=="object"?K.definition:!!K}removeKeyword(T){const{RULES:K}=this;delete K.keywords[T],delete K.all[T];for(const O of K.rules){const C=O.rules.findIndex(R=>R.keyword===T);C>=0&&O.rules.splice(C,1)}return this}addFormat(T,K){return typeof K=="string"&&(K=new RegExp(K)),this.formats[T]=K,this}errorsText(T=this.errors,{separator:K=", ",dataVar:O="data"}={}){return!T||T.length===0?"No errors":T.map(C=>`${O}${C.instancePath} ${C.message}`).reduce((C,R)=>C+K+R)}$dataMetaSchema(T,K){const O=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const C of K){const R=C.split("/").slice(1);let q=T;for(const B of R)q=q[B];for(const B in O){const Q=O[B];if(typeof Q!="object")continue;const{$data:pe}=Q.definition,ie=q[B];pe&&ie&&(q[B]=ve(ie))}}return T}_removeAllSchemas(T,K){for(const O in T){const C=T[O];(!K||K.test(O))&&(typeof C=="string"?delete T[O]:C&&!C.meta&&(this._cache.delete(C.schema),delete T[O]))}}_addSchema(T,K,O,C=this.opts.validateSchema,R=this.opts.addUsedSchema){let q;const{schemaId:B}=this.opts;if(typeof T=="object")q=T[B];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let Q=this._cache.get(T);if(Q!==void 0)return Q;O=(0,c.normalizeId)(q||O);const pe=c.getSchemaRefs.call(this,T,O);return Q=new a.SchemaEnv({schema:T,schemaId:B,meta:K,baseId:O,localRefs:pe}),this._cache.set(Q.schema,Q),R&&!O.startsWith("#")&&(O&&this._checkUnique(O),this.refs[O]=Q),C&&this.validateSchema(T,!0),Q}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):a.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const K=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,T)}finally{this.opts=K}}}w.ValidationError=n.default,w.MissingRefError=s.default,e.default=w;function g(G,T,K,O="error"){for(const C in G){const R=C;R in T&&this.logger[O](`${K}: option ${C}. ${G[R]}`)}}function $(G){return G=(0,c.normalizeId)(G),this.schemas[G]||this.refs[G]}function E(){const G=this.opts.schemas;if(G)if(Array.isArray(G))this.addSchema(G);else for(const T in G)this.addSchema(G[T],T)}function k(){for(const G in this.opts.formats){const T=this.opts.formats[G];T&&this.addFormat(G,T)}}function I(G){if(Array.isArray(G)){this.addVocabulary(G);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in G){const K=G[T];K.keyword||(K.keyword=T),this.addKeyword(K)}}function z(){const G={...this.opts};for(const T of x)delete G[T];return G}const M={log(){},warn(){},error(){}};function V(G){if(G===!1)return M;if(G===void 0)return console;if(G.log&&G.warn&&G.error)return G;throw new Error("logger must implement log, warn and error methods")}const F=/^[a-z_$][a-z0-9_$:-]*$/i;function W(G,T){const{RULES:K}=this;if((0,u.eachItem)(G,O=>{if(K.keywords[O])throw new Error(`Keyword ${O} is already defined`);if(!F.test(O))throw new Error(`Keyword ${O} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function re(G,T,K){var O;const C=T==null?void 0:T.post;if(K&&C)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:R}=this;let q=C?R.post:R.rules.find(({type:Q})=>Q===K);if(q||(q={type:K,rules:[]},R.rules.push(q)),R.keywords[G]=!0,!T)return;const B={keyword:G,definition:{...T,type:(0,l.getJSONTypes)(T.type),schemaType:(0,l.getJSONTypes)(T.schemaType)}};T.before?Y.call(this,q,B,T.before):q.rules.push(B),R.all[G]=B,(O=T.implements)===null||O===void 0||O.forEach(Q=>this.addKeyword(Q))}function Y(G,T,K){const O=G.rules.findIndex(C=>C.keyword===K);O>=0?G.rules.splice(O,0,T):(G.rules.push(T),this.logger.warn(`rule ${K} is not defined`))}function ae(G){let{metaSchema:T}=G;T!==void 0&&(G.$data&&this.opts.$data&&(T=ve(T)),G.validateSchema=this.compile(T,!0))}const L={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ve(G){return{anyOf:[G,L]}}})(di)),di}var Bs={},Ws={},Hs={},Cf;function J0(){if(Cf)return Hs;Cf=1,Object.defineProperty(Hs,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Hs.default=e,Hs}var gr={},kf;function _i(){if(kf)return gr;kf=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.callRef=gr.getValidate=void 0;const e=An(),t=At(),r=we(),n=Pt(),s=qs(),o=Oe(),a={keyword:"$ref",schemaType:"string",code(l){const{gen:u,schema:p,it:m}=l,{baseId:v,schemaEnv:x,validateName:y,opts:h,self:_}=m,{root:f}=x;if((p==="#"||p==="#/")&&v===f.baseId)return w();const b=s.resolveRef.call(_,f,v,p);if(b===void 0)throw new e.default(m.opts.uriResolver,v,p);if(b instanceof s.SchemaEnv)return g(b);return $(b);function w(){if(x===f)return c(l,y,x,x.$async);const E=u.scopeValue("root",{ref:f});return c(l,(0,r._)`${E}.validate`,f,f.$async)}function g(E){const k=i(l,E);c(l,k,E,E.$async)}function $(E){const k=u.scopeValue("schema",h.code.source===!0?{ref:E,code:(0,r.stringify)(E)}:{ref:E}),I=u.name("valid"),z=l.subschema({schema:E,dataTypes:[],schemaPath:r.nil,topSchemaRef:k,errSchemaPath:p},I);l.mergeEvaluated(z),l.ok(I)}}};function i(l,u){const{gen:p}=l;return u.validate?p.scopeValue("validate",{ref:u.validate}):(0,r._)`${p.scopeValue("wrapper",{ref:u})}.validate`}gr.getValidate=i;function c(l,u,p,m){const{gen:v,it:x}=l,{allErrors:y,schemaEnv:h,opts:_}=x,f=_.passContext?n.default.this:r.nil;m?b():w();function b(){if(!h.$async)throw new Error("async schema referenced by sync schema");const E=v.let("valid");v.try(()=>{v.code((0,r._)`await ${(0,t.callValidateCode)(l,u,f)}`),$(u),y||v.assign(E,!0)},k=>{v.if((0,r._)`!(${k} instanceof ${x.ValidationError})`,()=>v.throw(k)),g(k),y||v.assign(E,!1)}),l.ok(E)}function w(){l.result((0,t.callValidateCode)(l,u,f),()=>$(u),()=>g(u))}function g(E){const k=(0,r._)`${E}.errors`;v.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${k} : ${n.default.vErrors}.concat(${k})`),v.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function $(E){var k;if(!x.opts.unevaluated)return;const I=(k=p==null?void 0:p.validate)===null||k===void 0?void 0:k.evaluated;if(x.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(x.props=o.mergeEvaluated.props(v,I.props,x.props));else{const z=v.var("props",(0,r._)`${E}.evaluated.props`);x.props=o.mergeEvaluated.props(v,z,x.props,r.Name)}if(x.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(x.items=o.mergeEvaluated.items(v,I.items,x.items));else{const z=v.var("items",(0,r._)`${E}.evaluated.items`);x.items=o.mergeEvaluated.items(v,z,x.items,r.Name)}}}return gr.callRef=c,gr.default=a,gr}var jf;function Rf(){if(jf)return Ws;jf=1,Object.defineProperty(Ws,"__esModule",{value:!0});const e=J0(),t=_i(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Ws.default=r,Ws}var Gs={},Ks={},Pf;function X0(){if(Pf)return Ks;Pf=1,Object.defineProperty(Ks,"__esModule",{value:!0});const e=we(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:o,schemaCode:a})=>(0,e.str)`must be ${r[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,e._)`{comparison: ${r[o].okStr}, limit: ${a}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(o){const{keyword:a,data:i,schemaCode:c}=o;o.fail$data((0,e._)`${i} ${r[a].fail} ${c} || isNaN(${i})`)}};return Ks.default=s,Ks}var Zs={},Nf;function Q0(){if(Nf)return Zs;Nf=1,Object.defineProperty(Zs,"__esModule",{value:!0});const e=we(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:s,data:o,schemaCode:a,it:i}=n,c=i.opts.multipleOfPrecision,l=s.let("res"),u=c?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:(0,e._)`${l} !== parseInt(${l})`;n.fail$data((0,e._)`(${a} === 0 || (${l} = ${o}/${a}, ${u}))`)}};return Zs.default=r,Zs}var Ys={},Js={},Af;function ex(){if(Af)return Js;Af=1,Object.defineProperty(Js,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,s=0,o;for(;s<r;)n++,o=t.charCodeAt(s++),o>=55296&&o<=56319&&s<r&&(o=t.charCodeAt(s),(o&64512)===56320&&s++);return n}return Js.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Js}var Tf;function tx(){if(Tf)return Ys;Tf=1,Object.defineProperty(Ys,"__esModule",{value:!0});const e=we(),t=Oe(),r=ex(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){const i=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:a,data:i,schemaCode:c,it:l}=o,u=a==="maxLength"?e.operators.GT:e.operators.LT,p=l.opts.unicode===!1?(0,e._)`${i}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${i})`;o.fail$data((0,e._)`${p} ${u} ${c}`)}};return Ys.default=s,Ys}var Xs={},Of;function rx(){if(Of)return Xs;Of=1,Object.defineProperty(Xs,"__esModule",{value:!0});const e=At(),t=we(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,t.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,t._)`{pattern: ${s}}`},code(s){const{data:o,$data:a,schema:i,schemaCode:c,it:l}=s,u=l.opts.unicodeRegExp?"u":"",p=a?(0,t._)`(new RegExp(${c}, ${u}))`:(0,e.usePattern)(s,i);s.fail$data((0,t._)`!${p}.test(${o})`)}};return Xs.default=n,Xs}var Qs={},If;function nx(){if(If)return Qs;If=1,Object.defineProperty(Qs,"__esModule",{value:!0});const e=we(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const o=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${s} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:s,data:o,schemaCode:a}=n,i=s==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${o}).length ${i} ${a}`)}};return Qs.default=r,Qs}var eo={},Df;function sx(){if(Df)return eo;Df=1,Object.defineProperty(eo,"__esModule",{value:!0});const e=At(),t=we(),r=Oe(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:a,schema:i,schemaCode:c,data:l,$data:u,it:p}=o,{opts:m}=p;if(!u&&i.length===0)return;const v=i.length>=m.loopRequired;if(p.allErrors?x():y(),m.strictRequired){const f=o.parentSchema.properties,{definedProperties:b}=o.it;for(const w of i)if((f==null?void 0:f[w])===void 0&&!b.has(w)){const g=p.schemaEnv.baseId+p.errSchemaPath,$=`required property "${w}" is not defined at "${g}" (strictRequired)`;(0,r.checkStrictMode)(p,$,p.opts.strictRequired)}}function x(){if(v||u)o.block$data(t.nil,h);else for(const f of i)(0,e.checkReportMissingProp)(o,f)}function y(){const f=a.let("missing");if(v||u){const b=a.let("valid",!0);o.block$data(b,()=>_(f,b)),o.ok(b)}else a.if((0,e.checkMissingProp)(o,i,f)),(0,e.reportMissingProp)(o,f),a.else()}function h(){a.forOf("prop",c,f=>{o.setParams({missingProperty:f}),a.if((0,e.noPropertyInData)(a,l,f,m.ownProperties),()=>o.error())})}function _(f,b){o.setParams({missingProperty:f}),a.forOf(f,c,()=>{a.assign(b,(0,e.propertyInData)(a,l,f,m.ownProperties)),a.if((0,t.not)(b),()=>{o.error(),a.break()})},t.nil)}}};return eo.default=s,eo}var to={},Mf;function ox(){if(Mf)return to;Mf=1,Object.defineProperty(to,"__esModule",{value:!0});const e=we(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const o=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${s} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:s,data:o,schemaCode:a}=n,i=s==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${o}.length ${i} ${a}`)}};return to.default=r,to}var ro={},no={},Vf;function xi(){if(Vf)return no;Vf=1,Object.defineProperty(no,"__esModule",{value:!0});const e=ff();return e.code='require("ajv/dist/runtime/equal").default',no.default=e,no}var Ff;function ax(){if(Ff)return ro;Ff=1,Object.defineProperty(ro,"__esModule",{value:!0});const e=Ms(),t=we(),r=Oe(),n=xi(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:i}})=>(0,t.str)`must NOT have duplicate items (items ## ${i} and ${a} are identical)`,params:({params:{i:a,j:i}})=>(0,t._)`{i: ${a}, j: ${i}}`},code(a){const{gen:i,data:c,$data:l,schema:u,parentSchema:p,schemaCode:m,it:v}=a;if(!l&&!u)return;const x=i.let("valid"),y=p.items?(0,e.getSchemaTypes)(p.items):[];a.block$data(x,h,(0,t._)`${m} === false`),a.ok(x);function h(){const w=i.let("i",(0,t._)`${c}.length`),g=i.let("j");a.setParams({i:w,j:g}),i.assign(x,!0),i.if((0,t._)`${w} > 1`,()=>(_()?f:b)(w,g))}function _(){return y.length>0&&!y.some(w=>w==="object"||w==="array")}function f(w,g){const $=i.name("item"),E=(0,e.checkDataTypes)(y,$,v.opts.strictNumbers,e.DataType.Wrong),k=i.const("indices",(0,t._)`{}`);i.for((0,t._)`;${w}--;`,()=>{i.let($,(0,t._)`${c}[${w}]`),i.if(E,(0,t._)`continue`),y.length>1&&i.if((0,t._)`typeof ${$} == "string"`,(0,t._)`${$} += "_"`),i.if((0,t._)`typeof ${k}[${$}] == "number"`,()=>{i.assign(g,(0,t._)`${k}[${$}]`),a.error(),i.assign(x,!1).break()}).code((0,t._)`${k}[${$}] = ${w}`)})}function b(w,g){const $=(0,r.useFunc)(i,n.default),E=i.name("outer");i.label(E).for((0,t._)`;${w}--;`,()=>i.for((0,t._)`${g} = ${w}; ${g}--;`,()=>i.if((0,t._)`${$}(${c}[${w}], ${c}[${g}])`,()=>{a.error(),i.assign(x,!1).break(E)})))}}};return ro.default=o,ro}var so={},Lf;function ix(){if(Lf)return so;Lf=1,Object.defineProperty(so,"__esModule",{value:!0});const e=we(),t=Oe(),r=xi(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:a,data:i,$data:c,schemaCode:l,schema:u}=o;c||u&&typeof u=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(a,r.default)}(${i}, ${l})`):o.fail((0,e._)`${u} !== ${i}`)}};return so.default=s,so}var oo={},zf;function cx(){if(zf)return oo;zf=1,Object.defineProperty(oo,"__esModule",{value:!0});const e=we(),t=Oe(),r=xi(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:a,data:i,$data:c,schema:l,schemaCode:u,it:p}=o;if(!c&&l.length===0)throw new Error("enum must have non-empty array");const m=l.length>=p.opts.loopEnum;let v;const x=()=>v??(v=(0,t.useFunc)(a,r.default));let y;if(m||c)y=a.let("valid"),o.block$data(y,h);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const f=a.const("vSchema",u);y=(0,e.or)(...l.map((b,w)=>_(f,w)))}o.pass(y);function h(){a.assign(y,!1),a.forOf("v",u,f=>a.if((0,e._)`${x()}(${i}, ${f})`,()=>a.assign(y,!0).break()))}function _(f,b){const w=l[b];return typeof w=="object"&&w!==null?(0,e._)`${x()}(${i}, ${f}[${b}])`:(0,e._)`${i} === ${w}`}}};return oo.default=s,oo}var qf;function Uf(){if(qf)return Gs;qf=1,Object.defineProperty(Gs,"__esModule",{value:!0});const e=X0(),t=Q0(),r=tx(),n=rx(),s=nx(),o=sx(),a=ox(),i=ax(),c=ix(),l=cx(),u=[e.default,t.default,r.default,n.default,s.default,o.default,a.default,i.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default];return Gs.default=u,Gs}var ao={},tn={},Bf;function Wf(){if(Bf)return tn;Bf=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.validateAdditionalItems=void 0;const e=we(),t=Oe(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:a,it:i}=o,{items:c}=a;if(!Array.isArray(c)){(0,t.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(o,c)}};function s(o,a){const{gen:i,schema:c,data:l,keyword:u,it:p}=o;p.items=!0;const m=i.const("len",(0,e._)`${l}.length`);if(c===!1)o.setParams({len:a.length}),o.pass((0,e._)`${m} <= ${a.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(p,c)){const x=i.var("valid",(0,e._)`${m} <= ${a.length}`);i.if((0,e.not)(x),()=>v(x)),o.ok(x)}function v(x){i.forRange("i",a.length,m,y=>{o.subschema({keyword:u,dataProp:y,dataPropType:t.Type.Num},x),p.allErrors||i.if((0,e.not)(x),()=>i.break())})}}return tn.validateAdditionalItems=s,tn.default=n,tn}var io={},rn={},Hf;function Gf(){if(Hf)return rn;Hf=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.validateTuple=void 0;const e=we(),t=Oe(),r=At(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:a,it:i}=o;if(Array.isArray(a))return s(o,"additionalItems",a);i.items=!0,!(0,t.alwaysValidSchema)(i,a)&&o.ok((0,r.validateArray)(o))}};function s(o,a,i=o.schema){const{gen:c,parentSchema:l,data:u,keyword:p,it:m}=o;y(l),m.opts.unevaluated&&i.length&&m.items!==!0&&(m.items=t.mergeEvaluated.items(c,i.length,m.items));const v=c.name("valid"),x=c.const("len",(0,e._)`${u}.length`);i.forEach((h,_)=>{(0,t.alwaysValidSchema)(m,h)||(c.if((0,e._)`${x} > ${_}`,()=>o.subschema({keyword:p,schemaProp:_,dataProp:_},v)),o.ok(v))});function y(h){const{opts:_,errSchemaPath:f}=m,b=i.length,w=b===h.minItems&&(b===h.maxItems||h[a]===!1);if(_.strictTuples&&!w){const g=`"${p}" is ${b}-tuple, but minItems or maxItems/${a} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(m,g,_.strictTuples)}}}return rn.validateTuple=s,rn.default=n,rn}var Kf;function lx(){if(Kf)return io;Kf=1,Object.defineProperty(io,"__esModule",{value:!0});const e=Gf(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return io.default=t,io}var co={},Zf;function ux(){if(Zf)return co;Zf=1,Object.defineProperty(co,"__esModule",{value:!0});const e=we(),t=Oe(),r=At(),n=Wf(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{schema:i,parentSchema:c,it:l}=a,{prefixItems:u}=c;l.items=!0,!(0,t.alwaysValidSchema)(l,i)&&(u?(0,n.validateAdditionalItems)(a,u):a.ok((0,r.validateArray)(a)))}};return co.default=o,co}var lo={},Yf;function dx(){if(Yf)return lo;Yf=1,Object.defineProperty(lo,"__esModule",{value:!0});const e=we(),t=Oe(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:o}})=>o===void 0?(0,e.str)`must contain at least ${s} valid item(s)`:(0,e.str)`must contain at least ${s} and no more than ${o} valid item(s)`,params:({params:{min:s,max:o}})=>o===void 0?(0,e._)`{minContains: ${s}}`:(0,e._)`{minContains: ${s}, maxContains: ${o}}`},code(s){const{gen:o,schema:a,parentSchema:i,data:c,it:l}=s;let u,p;const{minContains:m,maxContains:v}=i;l.opts.next?(u=m===void 0?1:m,p=v):u=1;const x=o.const("len",(0,e._)`${c}.length`);if(s.setParams({min:u,max:p}),p===void 0&&u===0){(0,t.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&u>p){(0,t.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,t.alwaysValidSchema)(l,a)){let b=(0,e._)`${x} >= ${u}`;p!==void 0&&(b=(0,e._)`${b} && ${x} <= ${p}`),s.pass(b);return}l.items=!0;const y=o.name("valid");p===void 0&&u===1?_(y,()=>o.if(y,()=>o.break())):u===0?(o.let(y,!0),p!==void 0&&o.if((0,e._)`${c}.length > 0`,h)):(o.let(y,!1),h()),s.result(y,()=>s.reset());function h(){const b=o.name("_valid"),w=o.let("count",0);_(b,()=>o.if(b,()=>f(w)))}function _(b,w){o.forRange("i",0,x,g=>{s.subschema({keyword:"contains",dataProp:g,dataPropType:t.Type.Num,compositeRule:!0},b),w()})}function f(b){o.code((0,e._)`${b}++`),p===void 0?o.if((0,e._)`${b} >= ${u}`,()=>o.assign(y,!0).break()):(o.if((0,e._)`${b} > ${p}`,()=>o.assign(y,!1).break()),u===1?o.assign(y,!0):o.if((0,e._)`${b} >= ${u}`,()=>o.assign(y,!0)))}}};return lo.default=n,lo}var wi={},Jf;function $i(){return Jf||(Jf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=we(),r=Oe(),n=At();e.error={message:({params:{property:c,depsCount:l,deps:u}})=>{const p=l===1?"property":"properties";return(0,t.str)`must have ${p} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:u,missingProperty:p}})=>(0,t._)`{property: ${c},
150
- missingProperty: ${p},
151
- depsCount: ${l},
152
- deps: ${u}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[l,u]=o(c);a(c,l),i(c,u)}};function o({schema:c}){const l={},u={};for(const p in c){if(p==="__proto__")continue;const m=Array.isArray(c[p])?l:u;m[p]=c[p]}return[l,u]}function a(c,l=c.schema){const{gen:u,data:p,it:m}=c;if(Object.keys(l).length===0)return;const v=u.let("missing");for(const x in l){const y=l[x];if(y.length===0)continue;const h=(0,n.propertyInData)(u,p,x,m.opts.ownProperties);c.setParams({property:x,depsCount:y.length,deps:y.join(", ")}),m.allErrors?u.if(h,()=>{for(const _ of y)(0,n.checkReportMissingProp)(c,_)}):(u.if((0,t._)`${h} && (${(0,n.checkMissingProp)(c,y,v)})`),(0,n.reportMissingProp)(c,v),u.else())}}e.validatePropertyDeps=a;function i(c,l=c.schema){const{gen:u,data:p,keyword:m,it:v}=c,x=u.name("valid");for(const y in l)(0,r.alwaysValidSchema)(v,l[y])||(u.if((0,n.propertyInData)(u,p,y,v.opts.ownProperties),()=>{const h=c.subschema({keyword:m,schemaProp:y},x);c.mergeValidEvaluated(h,x)},()=>u.var(x,!0)),c.ok(x))}e.validateSchemaDeps=i,e.default=s})(wi)),wi}var uo={},Xf;function fx(){if(Xf)return uo;Xf=1,Object.defineProperty(uo,"__esModule",{value:!0});const e=we(),t=Oe(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,e._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:o,schema:a,data:i,it:c}=s;if((0,t.alwaysValidSchema)(c,a))return;const l=o.name("valid");o.forIn("key",i,u=>{s.setParams({propertyName:u}),s.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},l),o.if((0,e.not)(l),()=>{s.error(!0),c.allErrors||o.break()})}),s.ok(l)}};return uo.default=n,uo}var fo={},Qf;function em(){if(Qf)return fo;Qf=1,Object.defineProperty(fo,"__esModule",{value:!0});const e=At(),t=we(),r=Pt(),n=Oe(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,t._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:i,schema:c,parentSchema:l,data:u,errsCount:p,it:m}=a;if(!p)throw new Error("ajv implementation error");const{allErrors:v,opts:x}=m;if(m.props=!0,x.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(m,c))return;const y=(0,e.allSchemaProperties)(l.properties),h=(0,e.allSchemaProperties)(l.patternProperties);_(),a.ok((0,t._)`${p} === ${r.default.errors}`);function _(){i.forIn("key",u,$=>{!y.length&&!h.length?w($):i.if(f($),()=>w($))})}function f($){let E;if(y.length>8){const k=(0,n.schemaRefOrVal)(m,l.properties,"properties");E=(0,e.isOwnProperty)(i,k,$)}else y.length?E=(0,t.or)(...y.map(k=>(0,t._)`${$} === ${k}`)):E=t.nil;return h.length&&(E=(0,t.or)(E,...h.map(k=>(0,t._)`${(0,e.usePattern)(a,k)}.test(${$})`))),(0,t.not)(E)}function b($){i.code((0,t._)`delete ${u}[${$}]`)}function w($){if(x.removeAdditional==="all"||x.removeAdditional&&c===!1){b($);return}if(c===!1){a.setParams({additionalProperty:$}),a.error(),v||i.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(m,c)){const E=i.name("valid");x.removeAdditional==="failing"?(g($,E,!1),i.if((0,t.not)(E),()=>{a.reset(),b($)})):(g($,E),v||i.if((0,t.not)(E),()=>i.break()))}}function g($,E,k){const I={keyword:"additionalProperties",dataProp:$,dataPropType:n.Type.Str};k===!1&&Object.assign(I,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(I,E)}}};return fo.default=o,fo}var mo={},tm;function mx(){if(tm)return mo;tm=1,Object.defineProperty(mo,"__esModule",{value:!0});const e=Nn(),t=At(),r=Oe(),n=em(),s={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:a,schema:i,parentSchema:c,data:l,it:u}=o;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(i);for(const h of p)u.definedProperties.add(h);u.opts.unevaluated&&p.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(a,(0,r.toHash)(p),u.props));const m=p.filter(h=>!(0,r.alwaysValidSchema)(u,i[h]));if(m.length===0)return;const v=a.name("valid");for(const h of m)x(h)?y(h):(a.if((0,t.propertyInData)(a,l,h,u.opts.ownProperties)),y(h),u.allErrors||a.else().var(v,!0),a.endIf()),o.it.definedProperties.add(h),o.ok(v);function x(h){return u.opts.useDefaults&&!u.compositeRule&&i[h].default!==void 0}function y(h){o.subschema({keyword:"properties",schemaProp:h,dataProp:h},v)}}};return mo.default=s,mo}var ho={},rm;function hx(){if(rm)return ho;rm=1,Object.defineProperty(ho,"__esModule",{value:!0});const e=At(),t=we(),r=Oe(),n=Oe(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:a,schema:i,data:c,parentSchema:l,it:u}=o,{opts:p}=u,m=(0,e.allSchemaProperties)(i),v=m.filter(w=>(0,r.alwaysValidSchema)(u,i[w]));if(m.length===0||v.length===m.length&&(!u.opts.unevaluated||u.props===!0))return;const x=p.strictSchema&&!p.allowMatchingProperties&&l.properties,y=a.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,n.evaluatedPropsToName)(a,u.props));const{props:h}=u;_();function _(){for(const w of m)x&&f(w),u.allErrors?b(w):(a.var(y,!0),b(w),a.if(y))}function f(w){for(const g in x)new RegExp(w).test(g)&&(0,r.checkStrictMode)(u,`property ${g} matches pattern ${w} (use allowMatchingProperties)`)}function b(w){a.forIn("key",c,g=>{a.if((0,t._)`${(0,e.usePattern)(o,w)}.test(${g})`,()=>{const $=v.includes(w);$||o.subschema({keyword:"patternProperties",schemaProp:w,dataProp:g,dataPropType:n.Type.Str},y),u.opts.unevaluated&&h!==!0?a.assign((0,t._)`${h}[${g}]`,!0):!$&&!u.allErrors&&a.if((0,t.not)(y),()=>a.break())})})}}};return ho.default=s,ho}var po={},nm;function px(){if(nm)return po;nm=1,Object.defineProperty(po,"__esModule",{value:!0});const e=Oe(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:s,it:o}=r;if((0,e.alwaysValidSchema)(o,s)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return po.default=t,po}var go={},sm;function gx(){if(sm)return go;sm=1,Object.defineProperty(go,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:At().validateUnion,error:{message:"must match a schema in anyOf"}};return go.default=t,go}var vo={},om;function vx(){if(om)return vo;om=1,Object.defineProperty(vo,"__esModule",{value:!0});const e=we(),t=Oe(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,e._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:o,schema:a,parentSchema:i,it:c}=s;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&i.discriminator)return;const l=a,u=o.let("valid",!1),p=o.let("passing",null),m=o.name("_valid");s.setParams({passing:p}),o.block(v),s.result(u,()=>s.reset(),()=>s.error(!0));function v(){l.forEach((x,y)=>{let h;(0,t.alwaysValidSchema)(c,x)?o.var(m,!0):h=s.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},m),y>0&&o.if((0,e._)`${m} && ${u}`).assign(u,!1).assign(p,(0,e._)`[${p}, ${y}]`).else(),o.if(m,()=>{o.assign(u,!0),o.assign(p,y),h&&s.mergeEvaluated(h,e.Name)})})}}};return vo.default=n,vo}var yo={},am;function yx(){if(am)return yo;am=1,Object.defineProperty(yo,"__esModule",{value:!0});const e=Oe(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:s,it:o}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");const a=n.name("valid");s.forEach((i,c)=>{if((0,e.alwaysValidSchema)(o,i))return;const l=r.subschema({keyword:"allOf",schemaProp:c},a);r.ok(a),r.mergeEvaluated(l)})}};return yo.default=t,yo}var bo={},im;function bx(){if(im)return bo;im=1,Object.defineProperty(bo,"__esModule",{value:!0});const e=we(),t=Oe(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:a,parentSchema:i,it:c}=o;i.then===void 0&&i.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const l=s(c,"then"),u=s(c,"else");if(!l&&!u)return;const p=a.let("valid",!0),m=a.name("_valid");if(v(),o.reset(),l&&u){const y=a.let("ifClause");o.setParams({ifClause:y}),a.if(m,x("then",y),x("else",y))}else l?a.if(m,x("then")):a.if((0,e.not)(m),x("else"));o.pass(p,()=>o.error(!0));function v(){const y=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},m);o.mergeEvaluated(y)}function x(y,h){return()=>{const _=o.subschema({keyword:y},m);a.assign(p,m),o.mergeValidEvaluated(_,p),h?a.assign(h,(0,e._)`${y}`):o.setParams({ifClause:y})}}}};function s(o,a){const i=o.schema[a];return i!==void 0&&!(0,t.alwaysValidSchema)(o,i)}return bo.default=n,bo}var _o={},cm;function _x(){if(cm)return _o;cm=1,Object.defineProperty(_o,"__esModule",{value:!0});const e=Oe(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:s}){n.if===void 0&&(0,e.checkStrictMode)(s,`"${r}" without "if" is ignored`)}};return _o.default=t,_o}var lm;function um(){if(lm)return ao;lm=1,Object.defineProperty(ao,"__esModule",{value:!0});const e=Wf(),t=lx(),r=Gf(),n=ux(),s=dx(),o=$i(),a=fx(),i=em(),c=mx(),l=hx(),u=px(),p=gx(),m=vx(),v=yx(),x=bx(),y=_x();function h(_=!1){const f=[u.default,p.default,m.default,v.default,x.default,y.default,a.default,i.default,o.default,c.default,l.default];return _?f.push(t.default,n.default):f.push(e.default,r.default),f.push(s.default),f}return ao.default=h,ao}var xo={},nn={},dm;function fm(){if(dm)return nn;dm=1,Object.defineProperty(nn,"__esModule",{value:!0}),nn.dynamicAnchor=void 0;const e=we(),t=Pt(),r=qs(),n=_i(),s={keyword:"$dynamicAnchor",schemaType:"string",code:i=>o(i,i.schema)};function o(i,c){const{gen:l,it:u}=i;u.schemaEnv.root.dynamicAnchors[c]=!0;const p=(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(c)}`,m=u.errSchemaPath==="#"?u.validateName:a(i);l.if((0,e._)`!${p}`,()=>l.assign(p,m))}nn.dynamicAnchor=o;function a(i){const{schemaEnv:c,schema:l,self:u}=i.it,{root:p,baseId:m,localRefs:v,meta:x}=c.root,{schemaId:y}=u.opts,h=new r.SchemaEnv({schema:l,schemaId:y,root:p,baseId:m,localRefs:v,meta:x});return r.compileSchema.call(u,h),(0,n.getValidate)(i,h)}return nn.default=s,nn}var sn={},mm;function hm(){if(mm)return sn;mm=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.dynamicRef=void 0;const e=we(),t=Pt(),r=_i(),n={keyword:"$dynamicRef",schemaType:"string",code:o=>s(o,o.schema)};function s(o,a){const{gen:i,keyword:c,it:l}=o;if(a[0]!=="#")throw new Error(`"${c}" only supports hash fragment reference`);const u=a.slice(1);if(l.allErrors)p();else{const v=i.let("valid",!1);p(v),o.ok(v)}function p(v){if(l.schemaEnv.root.dynamicAnchors[u]){const x=i.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(u)}`);i.if(x,m(x,v),m(l.validateName,v))}else m(l.validateName,v)()}function m(v,x){return x?()=>i.block(()=>{(0,r.callRef)(o,v),i.let(x,!0)}):()=>(0,r.callRef)(o,v)}}return sn.dynamicRef=s,sn.default=n,sn}var wo={},pm;function xx(){if(pm)return wo;pm=1,Object.defineProperty(wo,"__esModule",{value:!0});const e=fm(),t=Oe(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,e.dynamicAnchor)(n,""):(0,t.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return wo.default=r,wo}var $o={},gm;function wx(){if(gm)return $o;gm=1,Object.defineProperty($o,"__esModule",{value:!0});const e=hm(),t={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,e.dynamicRef)(r,r.schema)};return $o.default=t,$o}var vm;function $x(){if(vm)return xo;vm=1,Object.defineProperty(xo,"__esModule",{value:!0});const e=fm(),t=hm(),r=xx(),n=wx(),s=[e.default,t.default,r.default,n.default];return xo.default=s,xo}var So={},Eo={},ym;function Sx(){if(ym)return Eo;ym=1,Object.defineProperty(Eo,"__esModule",{value:!0});const e=$i(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:r=>(0,e.validatePropertyDeps)(r)};return Eo.default=t,Eo}var Co={},bm;function Ex(){if(bm)return Co;bm=1,Object.defineProperty(Co,"__esModule",{value:!0});const e=$i(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,e.validateSchemaDeps)(r)};return Co.default=t,Co}var ko={},_m;function Cx(){if(_m)return ko;_m=1,Object.defineProperty(ko,"__esModule",{value:!0});const e=Oe(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:s}){n.contains===void 0&&(0,e.checkStrictMode)(s,`"${r}" without "contains" is ignored`)}};return ko.default=t,ko}var xm;function kx(){if(xm)return So;xm=1,Object.defineProperty(So,"__esModule",{value:!0});const e=Sx(),t=Ex(),r=Cx(),n=[e.default,t.default,r.default];return So.default=n,So}var jo={},Ro={},wm;function jx(){if(wm)return Ro;wm=1,Object.defineProperty(Ro,"__esModule",{value:!0});const e=we(),t=Oe(),r=Pt(),s={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,e._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){const{gen:a,schema:i,data:c,errsCount:l,it:u}=o;if(!l)throw new Error("ajv implementation error");const{allErrors:p,props:m}=u;m instanceof e.Name?a.if((0,e._)`${m} !== true`,()=>a.forIn("key",c,h=>a.if(x(m,h),()=>v(h)))):m!==!0&&a.forIn("key",c,h=>m===void 0?v(h):a.if(y(m,h),()=>v(h))),u.props=!0,o.ok((0,e._)`${l} === ${r.default.errors}`);function v(h){if(i===!1){o.setParams({unevaluatedProperty:h}),o.error(),p||a.break();return}if(!(0,t.alwaysValidSchema)(u,i)){const _=a.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:h,dataPropType:t.Type.Str},_),p||a.if((0,e.not)(_),()=>a.break())}}function x(h,_){return(0,e._)`!${h} || !${h}[${_}]`}function y(h,_){const f=[];for(const b in h)h[b]===!0&&f.push((0,e._)`${_} !== ${b}`);return(0,e.and)(...f)}}};return Ro.default=s,Ro}var Po={},$m;function Rx(){if($m)return Po;$m=1,Object.defineProperty(Po,"__esModule",{value:!0});const e=we(),t=Oe(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{gen:o,schema:a,data:i,it:c}=s,l=c.items||0;if(l===!0)return;const u=o.const("len",(0,e._)`${i}.length`);if(a===!1)s.setParams({len:l}),s.fail((0,e._)`${u} > ${l}`);else if(typeof a=="object"&&!(0,t.alwaysValidSchema)(c,a)){const m=o.var("valid",(0,e._)`${u} <= ${l}`);o.if((0,e.not)(m),()=>p(m,l)),s.ok(m)}c.items=!0;function p(m,v){o.forRange("i",v,u,x=>{s.subschema({keyword:"unevaluatedItems",dataProp:x,dataPropType:t.Type.Num},m),c.allErrors||o.if((0,e.not)(m),()=>o.break())})}}};return Po.default=n,Po}var Sm;function Px(){if(Sm)return jo;Sm=1,Object.defineProperty(jo,"__esModule",{value:!0});const e=jx(),t=Rx(),r=[e.default,t.default];return jo.default=r,jo}var No={},Ao={},Em;function Nx(){if(Em)return Ao;Em=1,Object.defineProperty(Ao,"__esModule",{value:!0});const e=we(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,s){const{gen:o,data:a,$data:i,schema:c,schemaCode:l,it:u}=n,{opts:p,errSchemaPath:m,schemaEnv:v,self:x}=u;if(!p.validateFormats)return;i?y():h();function y(){const _=o.scopeValue("formats",{ref:x.formats,code:p.code.formats}),f=o.const("fDef",(0,e._)`${_}[${l}]`),b=o.let("fType"),w=o.let("format");o.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>o.assign(b,(0,e._)`${f}.type || "string"`).assign(w,(0,e._)`${f}.validate`),()=>o.assign(b,(0,e._)`"string"`).assign(w,f)),n.fail$data((0,e.or)(g(),$()));function g(){return p.strictSchema===!1?e.nil:(0,e._)`${l} && !${w}`}function $(){const E=v.$async?(0,e._)`(${f}.async ? await ${w}(${a}) : ${w}(${a}))`:(0,e._)`${w}(${a})`,k=(0,e._)`(typeof ${w} == "function" ? ${E} : ${w}.test(${a}))`;return(0,e._)`${w} && ${w} !== true && ${b} === ${s} && !${k}`}}function h(){const _=x.formats[c];if(!_){g();return}if(_===!0)return;const[f,b,w]=$(_);f===s&&n.pass(E());function g(){if(p.strictSchema===!1){x.logger.warn(k());return}throw new Error(k());function k(){return`unknown format "${c}" ignored in schema at path "${m}"`}}function $(k){const I=k instanceof RegExp?(0,e.regexpCode)(k):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(c)}`:void 0,z=o.scopeValue("formats",{key:c,ref:k,code:I});return typeof k=="object"&&!(k instanceof RegExp)?[k.type||"string",k.validate,(0,e._)`${z}.validate`]:["string",k,z]}function E(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${w}(${a})`}return typeof b=="function"?(0,e._)`${w}(${a})`:(0,e._)`${w}.test(${a})`}}}};return Ao.default=r,Ao}var Cm;function km(){if(Cm)return No;Cm=1,Object.defineProperty(No,"__esModule",{value:!0});const t=[Nx().default];return No.default=t,No}var Rr={},jm;function Rm(){return jm||(jm=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.contentVocabulary=Rr.metadataVocabulary=void 0,Rr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Rr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Rr}var Pm;function Ax(){if(Pm)return Bs;Pm=1,Object.defineProperty(Bs,"__esModule",{value:!0});const e=Rf(),t=Uf(),r=um(),n=$x(),s=kx(),o=Px(),a=km(),i=Rm(),c=[n.default,e.default,t.default,(0,r.default)(!0),a.default,i.metadataVocabulary,i.contentVocabulary,s.default,o.default];return Bs.default=c,Bs}var To={},On={},Nm;function Tx(){if(Nm)return On;Nm=1,Object.defineProperty(On,"__esModule",{value:!0}),On.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(On.DiscrError=e={})),On}var Am;function Tm(){if(Am)return To;Am=1,Object.defineProperty(To,"__esModule",{value:!0});const e=we(),t=Tx(),r=qs(),n=An(),s=Oe(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:i,tagName:c}})=>i===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:i,tag:c,tagName:l}})=>(0,e._)`{error: ${i}, tag: ${l}, tagValue: ${c}}`},code(i){const{gen:c,data:l,schema:u,parentSchema:p,it:m}=i,{oneOf:v}=p;if(!m.opts.discriminator)throw new Error("discriminator: requires discriminator option");const x=u.propertyName;if(typeof x!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const y=c.let("valid",!1),h=c.const("tag",(0,e._)`${l}${(0,e.getProperty)(x)}`);c.if((0,e._)`typeof ${h} == "string"`,()=>_(),()=>i.error(!1,{discrError:t.DiscrError.Tag,tag:h,tagName:x})),i.ok(y);function _(){const w=b();c.if(!1);for(const g in w)c.elseIf((0,e._)`${h} === ${g}`),c.assign(y,f(w[g]));c.else(),i.error(!1,{discrError:t.DiscrError.Mapping,tag:h,tagName:x}),c.endIf()}function f(w){const g=c.name("valid"),$=i.subschema({keyword:"oneOf",schemaProp:w},g);return i.mergeEvaluated($,e.Name),g}function b(){var w;const g={},$=k(p);let E=!0;for(let M=0;M<v.length;M++){let V=v[M];if(V!=null&&V.$ref&&!(0,s.schemaHasRulesButRef)(V,m.self.RULES)){const W=V.$ref;if(V=r.resolveRef.call(m.self,m.schemaEnv.root,m.baseId,W),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new n.default(m.opts.uriResolver,m.baseId,W)}const F=(w=V==null?void 0:V.properties)===null||w===void 0?void 0:w[x];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${x}"`);E=E&&($||k(V)),I(F,M)}if(!E)throw new Error(`discriminator: "${x}" must be required`);return g;function k({required:M}){return Array.isArray(M)&&M.includes(x)}function I(M,V){if(M.const)z(M.const,V);else if(M.enum)for(const F of M.enum)z(F,V);else throw new Error(`discriminator: "properties/${x}" must have "const" or "enum"`)}function z(M,V){if(typeof M!="string"||M in g)throw new Error(`discriminator: "${x}" values must be unique strings`);g[M]=V}}}};return To.default=a,To}var Oo={};const Ox={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}},Ix={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},Dx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},Mx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},Vx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},Fx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},Lx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},zx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};var Om;function qx(){if(Om)return Oo;Om=1,Object.defineProperty(Oo,"__esModule",{value:!0});const e=Ox,t=Ix,r=Dx,n=Mx,s=Vx,o=Fx,a=Lx,i=zx,c=["/properties"];function l(u){return[e,t,r,n,s,p(this,o),a,p(this,i)].forEach(m=>this.addMetaSchema(m,void 0,!1)),this;function p(m,v){return u?m.$dataMetaSchema(v,c):v}}return Oo.default=l,Oo}var Im;function Ux(){return Im||(Im=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=Ef(),n=Ax(),s=Tm(),o=qx(),a="https://json-schema.org/draft/2020-12/schema";class i extends r.default{constructor(v={}){super({...v,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(v=>this.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:v,meta:x}=this.opts;x&&(o.default.call(this,v),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=i,e.exports=t=i,e.exports.Ajv2020=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var c=Nn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=we();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=Ls();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var p=An();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})(Ts,Ts.exports)),Ts.exports}var Bx=Ux();const Wx=Xi(Bx);var Io={exports:{}},Si={},Dm;function Hx(){return Dm||(Dm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(M,V){return{validate:M,compare:V}}e.fullFormats={date:t(o,a),time:t(c(!0),l),"date-time":t(m(!0),v),"iso-time":t(c(),u),"iso-date-time":t(m(),x),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:z,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:b,int32:{type:"number",validate:$},int64:{type:"number",validate:E},float:{type:"number",validate:k},double:{type:"number",validate:k},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,x),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(M){return M%4===0&&(M%100!==0||M%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(M){const V=n.exec(M);if(!V)return!1;const F=+V[1],W=+V[2],re=+V[3];return W>=1&&W<=12&&re>=1&&re<=(W===2&&r(F)?29:s[W])}function a(M,V){if(M&&V)return M>V?1:M<V?-1:0}const i=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(M){return function(F){const W=i.exec(F);if(!W)return!1;const re=+W[1],Y=+W[2],ae=+W[3],L=W[4],ve=W[5]==="-"?-1:1,G=+(W[6]||0),T=+(W[7]||0);if(G>23||T>59||M&&!L)return!1;if(re<=23&&Y<=59&&ae<60)return!0;const K=Y-T*ve,O=re-G*ve-(K<0?1:0);return(O===23||O===-1)&&(K===59||K===-1)&&ae<61}}function l(M,V){if(!(M&&V))return;const F=new Date("2020-01-01T"+M).valueOf(),W=new Date("2020-01-01T"+V).valueOf();if(F&&W)return F-W}function u(M,V){if(!(M&&V))return;const F=i.exec(M),W=i.exec(V);if(F&&W)return M=F[1]+F[2]+F[3],V=W[1]+W[2]+W[3],M>V?1:M<V?-1:0}const p=/t|\s/i;function m(M){const V=c(M);return function(W){const re=W.split(p);return re.length===2&&o(re[0])&&V(re[1])}}function v(M,V){if(!(M&&V))return;const F=new Date(M).valueOf(),W=new Date(V).valueOf();if(F&&W)return F-W}function x(M,V){if(!(M&&V))return;const[F,W]=M.split(p),[re,Y]=V.split(p),ae=a(F,re);if(ae!==void 0)return ae||l(W,Y)}const y=/\/|:/,h=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function _(M){return y.test(M)&&h.test(M)}const f=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function b(M){return f.lastIndex=0,f.test(M)}const w=-2147483648,g=2**31-1;function $(M){return Number.isInteger(M)&&M<=g&&M>=w}function E(M){return Number.isInteger(M)}function k(){return!0}const I=/[^\\]\\Z/;function z(M){if(I.test(M))return!1;try{return new RegExp(M),!0}catch{return!1}}})(Si)),Si}var Ei={},Do={exports:{}},Mo={},Mm;function Gx(){if(Mm)return Mo;Mm=1,Object.defineProperty(Mo,"__esModule",{value:!0});const e=Rf(),t=Uf(),r=um(),n=km(),s=Rm(),o=[e.default,t.default,(0,r.default)(),n.default,s.metadataVocabulary,s.contentVocabulary];return Mo.default=o,Mo}const Kx={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var Vm;function Zx(){return Vm||(Vm=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=Ef(),n=Gx(),s=Tm(),o=Kx,a=["/properties"],i="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(x=>this.addVocabulary(x)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const x=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(x,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=Nn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=we();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var p=Ls();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var m=An();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(Do,Do.exports)),Do.exports}var Fm;function Yx(){return Fm||(Fm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=Zx(),r=we(),n=r.operators,s={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},o={message:({keyword:i,schemaCode:c})=>(0,r.str)`should be ${s[i].okStr} ${c}`,params:({keyword:i,schemaCode:c})=>(0,r._)`{comparison: ${s[i].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:o,code(i){const{gen:c,data:l,schemaCode:u,keyword:p,it:m}=i,{opts:v,self:x}=m;if(!v.validateFormats)return;const y=new t.KeywordCxt(m,x.RULES.all.format.definition,"format");y.$data?h():_();function h(){const b=c.scopeValue("formats",{ref:x.formats,code:v.code.formats}),w=c.const("fmt",(0,r._)`${b}[${y.schemaCode}]`);i.fail$data((0,r.or)((0,r._)`typeof ${w} != "object"`,(0,r._)`${w} instanceof RegExp`,(0,r._)`typeof ${w}.compare != "function"`,f(w)))}function _(){const b=y.schema,w=x.formats[b];if(!w||w===!0)return;if(typeof w!="object"||w instanceof RegExp||typeof w.compare!="function")throw new Error(`"${p}": format "${b}" does not define "compare" function`);const g=c.scopeValue("formats",{key:b,ref:w,code:v.code.formats?(0,r._)`${v.code.formats}${(0,r.getProperty)(b)}`:void 0});i.fail$data(f(g))}function f(b){return(0,r._)`${b}.compare(${l}, ${u}) ${s[p].fail} 0`}},dependencies:["format"]};const a=i=>(i.addKeyword(e.formatLimitDefinition),i);e.default=a})(Ei)),Ei}var Lm;function Jx(){return Lm||(Lm=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Hx(),n=Yx(),s=we(),o=new s.Name("fullFormats"),a=new s.Name("fastFormats"),i=(l,u={keywords:!0})=>{if(Array.isArray(u))return c(l,u,r.fullFormats,o),l;const[p,m]=u.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,o],v=u.formats||r.formatNames;return c(l,v,p,m),u.keywords&&(0,n.default)(l),l};i.get=(l,u="full")=>{const m=(u==="fast"?r.fastFormats:r.fullFormats)[l];if(!m)throw new Error(`Unknown format "${l}"`);return m};function c(l,u,p,m){var v,x;(v=(x=l.opts.code).formats)!==null&&v!==void 0||(x.formats=(0,s._)`require("ajv-formats/dist/formats").${m}`);for(const y of u)l.addFormat(y,p[y])}e.exports=t=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i})(Io,Io.exports)),Io.exports}var Xx=Jx();const Qx=Xi(Xx),ew="https://json-schema.org/draft/2020-12/schema",Ci=new Wx;Qx(Ci);function zm(e){return Ci.validate(ew,e)?null:Ci.errors||[]}function tw({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:Se("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var ki="rovingFocusGroup.onEntryFocus",rw={bubbles:!1,cancelable:!0},In="RovingFocusGroup",[ji,qm,nw]=kc(In),[sw,Um]=Ot(In,[nw]),[ow,aw]=sw(In),Bm=S.forwardRef((e,t)=>d.jsx(ji.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(ji.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(iw,{...e,ref:t})})}));Bm.displayName=In;var iw=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...p}=e,m=S.useRef(null),v=qe(t,m),x=ha(o),[y,h]=wr({prop:a,defaultProp:i??null,onChange:c,caller:In}),[_,f]=S.useState(!1),b=or(l),w=qm(r),g=S.useRef(!1),[$,E]=S.useState(0);return S.useEffect(()=>{const k=m.current;if(k)return k.addEventListener(ki,b),()=>k.removeEventListener(ki,b)},[b]),d.jsx(ow,{scope:r,orientation:n,dir:x,loop:s,currentTabStopId:y,onItemFocus:S.useCallback(k=>h(k),[h]),onItemShiftTab:S.useCallback(()=>f(!0),[]),onFocusableItemAdd:S.useCallback(()=>E(k=>k+1),[]),onFocusableItemRemove:S.useCallback(()=>E(k=>k-1),[]),children:d.jsx(Ae.div,{tabIndex:_||$===0?-1:0,"data-orientation":n,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:$e(e.onMouseDown,()=>{g.current=!0}),onFocus:$e(e.onFocus,k=>{const I=!g.current;if(k.target===k.currentTarget&&I&&!_){const z=new CustomEvent(ki,rw);if(k.currentTarget.dispatchEvent(z),!z.defaultPrevented){const M=w().filter(Y=>Y.focusable),V=M.find(Y=>Y.active),F=M.find(Y=>Y.id===y),re=[V,F,...M].filter(Boolean).map(Y=>Y.ref.current);Gm(re,u)}}g.current=!1}),onBlur:$e(e.onBlur,()=>f(!1))})})}),Wm="RovingFocusGroupItem",Hm=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,children:a,...i}=e,c=ir(),l=o||c,u=aw(Wm,r),p=u.currentTabStopId===l,m=qm(r),{onFocusableItemAdd:v,onFocusableItemRemove:x,currentTabStopId:y}=u;return S.useEffect(()=>{if(n)return v(),()=>x()},[n,v,x]),d.jsx(ji.ItemSlot,{scope:r,id:l,focusable:n,active:s,children:d.jsx(Ae.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:$e(e.onMouseDown,h=>{n?u.onItemFocus(l):h.preventDefault()}),onFocus:$e(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:$e(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){u.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const _=uw(h,u.orientation,u.dir);if(_!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let b=m().filter(w=>w.focusable).map(w=>w.ref.current);if(_==="last")b.reverse();else if(_==="prev"||_==="next"){_==="prev"&&b.reverse();const w=b.indexOf(h.currentTarget);b=u.loop?dw(b,w+1):b.slice(w+1)}setTimeout(()=>Gm(b))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:y!=null}):a})})});Hm.displayName=Wm;var cw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function lw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function uw(e,t,r){const n=lw(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return cw[n]}function Gm(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function dw(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var fw=Bm,mw=Hm,Ri="Radio",[hw,Km]=Ot(Ri),[pw,gw]=hw(Ri),Zm=S.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:o,disabled:a,value:i="on",onCheck:c,form:l,...u}=e,[p,m]=S.useState(null),v=qe(t,h=>m(h)),x=S.useRef(!1),y=p?l||!!p.closest("form"):!0;return d.jsxs(pw,{scope:r,checked:s,disabled:a,children:[d.jsx(Ae.button,{type:"button",role:"radio","aria-checked":s,"data-state":Qm(s),"data-disabled":a?"":void 0,disabled:a,value:i,...u,ref:v,onClick:$e(e.onClick,h=>{s||c==null||c(),y&&(x.current=h.isPropagationStopped(),x.current||h.stopPropagation())})}),y&&d.jsx(Xm,{control:p,bubbles:!x.current,name:n,value:i,checked:s,required:o,disabled:a,form:l,style:{transform:"translateX(-100%)"}})]})});Zm.displayName=Ri;var Ym="RadioIndicator",Jm=S.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...s}=e,o=gw(Ym,r);return d.jsx(hr,{present:n||o.checked,children:d.jsx(Ae.span,{"data-state":Qm(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});Jm.displayName=Ym;var vw="RadioBubbleInput",Xm=S.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...s},o)=>{const a=S.useRef(null),i=qe(a,o),c=Oa(r),l=Na(t);return S.useEffect(()=>{const u=a.current;if(!u)return;const p=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&v){const x=new Event("click",{bubbles:n});v.call(u,r),u.dispatchEvent(x)}},[c,r,n]),d.jsx(Ae.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...s.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Xm.displayName=vw;function Qm(e){return e?"checked":"unchecked"}var yw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Vo="RadioGroup",[bw]=Ot(Vo,[Um,Km]),eh=Um(),th=Km(),[_w,xw]=bw(Vo),rh=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:o,required:a=!1,disabled:i=!1,orientation:c,dir:l,loop:u=!0,onValueChange:p,...m}=e,v=eh(r),x=ha(l),[y,h]=wr({prop:o,defaultProp:s??null,onChange:p,caller:Vo});return d.jsx(_w,{scope:r,name:n,required:a,disabled:i,value:y,onValueChange:h,children:d.jsx(fw,{asChild:!0,...v,orientation:c,dir:x,loop:u,children:d.jsx(Ae.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":i?"":void 0,dir:x,...m,ref:t})})})});rh.displayName=Vo;var nh="RadioGroupItem",sh=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...s}=e,o=xw(nh,r),a=o.disabled||n,i=eh(r),c=th(r),l=S.useRef(null),u=qe(t,l),p=o.value===s.value,m=S.useRef(!1);return S.useEffect(()=>{const v=y=>{yw.includes(y.key)&&(m.current=!0)},x=()=>m.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",x)}},[]),d.jsx(mw,{asChild:!0,...i,focusable:!a,active:p,children:d.jsx(Zm,{disabled:a,required:o.required,checked:p,...c,...s,name:o.name,ref:u,onCheck:()=>o.onValueChange(s.value),onKeyDown:$e(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:$e(s.onFocus,()=>{var v;m.current&&((v=l.current)==null||v.click())})})})});sh.displayName=nh;var ww="RadioGroupIndicator",oh=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,s=th(r);return d.jsx(Jm,{...s,...n,ref:t})});oh.displayName=ww;var $w=rh,Sw=sh,Ew=oh;function Cw({className:e,...t}){return d.jsx($w,{"data-slot":"radio-group",className:Se("grid gap-3",e),...t})}function Pi({className:e,...t}){return d.jsx(Sw,{"data-slot":"radio-group-item",className:Se("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(Ew,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(Ky,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const kw=({basePath:e,readOnly:t})=>{const{control:r,setValue:n,getValues:s}=at(),[o,a]=Z.useState(JSON.stringify(s(`${e}.additionalProperties`),null,2)),[i,c]=Z.useState(null);bn({control:r,name:`${e}.isModifiable`});const l=bn({control:r,name:`${e}.additionalProperties`});Z.useEffect(()=>{c(null),a(JSON.stringify(l,null,2))},[l]);let u;typeof l=="boolean"?u=l?"true":"false":typeof l=="object"&&l!==null?u="schema":u="true";const p=m=>{const v=`${e}.additionalProperties`;if(m==="true")n(v,!0);else if(m==="false")n(v,!1);else{const x={type:"string"};n(v,x),a(JSON.stringify(x,null,2))}};return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(Te,{control:r,name:`${e}.minProperties`,render:({field:m})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Minimum Properties"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:t,value:m.value??"",onChange:v=>m.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:r,name:`${e}.maxProperties`,render:({field:m})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(Ce,{children:"Maximum Properties"}),d.jsx(Pe,{children:d.jsx(Fe,{type:"number",disabled:t,value:m.value??"",onChange:v=>m.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx(Ne,{})]})})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ce,{children:"Additional Properties"}),d.jsxs(Cw,{value:u,onValueChange:p,className:"flex space-x-4 pt-2",disabled:t,children:[d.jsxs(Ee,{className:"flex items-center space-x-2",children:[d.jsx(Pi,{value:"true",id:"ap-true"}),d.jsx(Ce,{htmlFor:"ap-true",className:"font-normal",children:"Allow (true)"})]}),d.jsxs(Ee,{className:"flex items-center space-x-2",children:[d.jsx(Pi,{value:"false",id:"ap-false"}),d.jsx(Ce,{htmlFor:"ap-false",className:"font-normal",children:"Disallow (false)"})]}),d.jsxs(Ee,{className:"flex items-center space-x-2",children:[d.jsx(Pi,{value:"schema",id:"ap-schema"}),d.jsx(Ce,{htmlFor:"ap-schema",className:"font-normal",children:"Specify Schema"})]})]}),d.jsx(Ne,{})]}),u==="schema"&&d.jsxs(Ee,{children:[d.jsx(Pe,{children:d.jsx(tw,{"data-testid":"schema-textarea",rows:6,disabled:t,className:"font-mono",value:o,onChange:m=>{const v=m.target.value;a(v);try{const x=JSON.parse(v),y=zm(x);if(y){const h=y.map(_=>`${_.instancePath} - ${_.message}`);c(h)}else n(`${e}.additionalProperties`,x)}catch{c(["Invalid schema structure."])}}})}),i&&i.length>0&&d.jsx("div",{className:"mt-2 text-sm font-medium text-destructive",children:i.map((m,v)=>d.jsx("p",{children:m},v))})]}),d.jsx(Te,{control:r,name:`${e}."x-modifiable"`,render:({field:m})=>d.jsxs(Ee,{className:"mt-2",children:[d.jsx(Ce,{children:"Modifiable Properties"}),d.jsx(Pe,{children:d.jsx(Rn,{disabled:t,value:m.value||[],onValueChange:m.onChange,placeholder:"Enter your modifiable properties"})}),d.jsx(Ne,{})]})})]})},jw=({basePath:e,readOnly:t})=>{const{control:r}=at();return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(Te,{control:r,name:`${e}["$schema"]`,render:({field:n})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"$schema"}),d.jsx(Pe,{children:d.jsx(Fe,{placeholder:"e.g., http://json-schema.org/draft/2020-12/schema",disabled:t,...n,value:n.value??"http://json-schema.org/draft/2020-12/schema"})}),d.jsx(Ne,{})]})}),d.jsx(Te,{control:r,name:`${e}["$id"]`,render:({field:n})=>d.jsxs(Ee,{children:[d.jsx(Ce,{children:"$id"}),d.jsx(Pe,{children:d.jsx(Fe,{disabled:t,...n,value:n.value??""})}),d.jsx(Ne,{})]})})]})};var Rw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pw=Rw.reduce((e,t)=>{const r=Ja(`Primitive.${t}`),n=S.forwardRef((s,o)=>{const{asChild:a,...i}=s,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Nw="Separator",ah="horizontal",Aw=["horizontal","vertical"],ih=S.forwardRef((e,t)=>{const{decorative:r,orientation:n=ah,...s}=e,o=Tw(n)?n:ah,i=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return d.jsx(Pw.div,{"data-orientation":o,...i,...s,ref:t})});ih.displayName=Nw;function Tw(e){return Aw.includes(e)}var Ow=ih;function Iw({className:e,orientation:t="horizontal",decorative:r=!0,...n}){return d.jsx(Ow,{"data-slot":"separator",decorative:r,orientation:t,className:Se("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}const Dw=({theme:e,basePath:t,readOnly:r})=>{const{watch:n}=at(),s=n(`${t}.type`),o=()=>{switch(s){case"number":return d.jsx(M0,{theme:e,basePath:t,readOnly:r});case"integer":return d.jsx(z0,{theme:e,basePath:t,readOnly:r});case"string":return d.jsx(V0,{theme:e,basePath:t,readOnly:r});case"boolean":return d.jsx(F0,{theme:e,basePath:t,readOnly:r});case"array":return d.jsx(L0,{theme:e,basePath:t,readOnly:r});case"object":return d.jsx(kw,{theme:e,basePath:t,readOnly:r});default:return d.jsx(d.Fragment,{children:`Settings for type ${s} are not yet implemented.`})}};return d.jsxs("div",{children:[t==="root"&&d.jsxs(d.Fragment,{children:[d.jsx(jw,{theme:e,basePath:t,readOnly:r}),d.jsx(Iw,{className:"my-4"})]}),o()]})};function Mw({...e}){return d.jsx(vd,{"data-slot":"dialog",...e})}function Vw({...e}){return d.jsx(yd,{"data-slot":"dialog-portal",...e})}function Fw({className:e,...t}){return d.jsx(bd,{"data-slot":"dialog-overlay",className:Se("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Lw({className:e,children:t,showCloseButton:r=!0,...n}){return d.jsxs(Vw,{"data-slot":"dialog-portal",children:[d.jsx(Fw,{}),d.jsxs(_d,{"data-slot":"dialog-content",className:Se("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,r&&d.jsxs(ci,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[d.jsx(gu,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function zw({className:e,...t}){return d.jsx("div",{"data-slot":"dialog-header",className:Se("flex flex-col gap-2 text-center sm:text-left",e),...t})}function qw({className:e,...t}){return d.jsx(xd,{"data-slot":"dialog-title",className:Se("text-lg leading-none font-semibold",e),...t})}const Uw=({theme:e,readOnly:t,className:r,isOpen:n,fieldPath:s,onClose:o})=>{const{getValues:a}=at(),i=s?a(s):null;return d.jsx(Mw,{open:n,onOpenChange:c=>!c&&o(),children:d.jsxs(Lw,{className:Se("bg-background text-foreground border-input",e,r),children:[d.jsx(zw,{children:d.jsxs(qw,{className:"capitalize",children:[i==null?void 0:i.type," Schema Settings"]})}),s&&d.jsx(Dw,{basePath:s,theme:e,readOnly:t}),d.jsx(mr,{onClick:o,variant:"default",children:"Close"})]})})},ch=(e,t,r)=>{if(e&&"reportValidity"in e){const n=oe(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Ni=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?ch(n.ref,r,e):n&&n.refs&&n.refs.forEach(s=>ch(s,r,e))}},lh=(e,t)=>{t.shouldUseNativeValidation&&Ni(e,t);const r={};for(const n in e){const s=oe(t.fields,n),o=Object.assign(e[n]||{},{ref:s&&s.ref});if(Bw(t.names||Object.keys(e),n)){const a=Object.assign({},oe(r,n));ze(a,"root",o),ze(r,n,a)}else ze(r,n,o)}return r},Bw=(e,t)=>{const r=uh(t);return e.some(n=>uh(n).match(`^${r}\\.\\d+`))};function uh(e){return e.replace(/\]|\[/g,"")}function dh(e,t,r){function n(i,c){var l;Object.defineProperty(i,"_zod",{value:i._zod??{},enumerable:!1}),(l=i._zod).traits??(l.traits=new Set),i._zod.traits.add(e),t(i,c);for(const u in a.prototype)u in i||Object.defineProperty(i,u,{value:a.prototype[u].bind(i)});i._zod.constr=a,i._zod.def=c}const s=(r==null?void 0:r.Parent)??Object;class o extends s{}Object.defineProperty(o,"name",{value:e});function a(i){var c;const l=r!=null&&r.Parent?new o:this;n(l,i),(c=l._zod).deferred??(c.deferred=[]);for(const u of l._zod.deferred)u();return l}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:i=>{var c,l;return r!=null&&r.Parent&&i instanceof r.Parent?!0:(l=(c=i==null?void 0:i._zod)==null?void 0:c.traits)==null?void 0:l.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class Ww extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const Hw={};function fh(e){return Hw}function Gw(e,t){return typeof t=="bigint"?t.toString():t}const mh=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Fo(e){return typeof e=="string"?e:e==null?void 0:e.message}function hh(e,t,r){var s,o,a,i,c,l;const n={...e,path:e.path??[]};if(!e.message){const u=Fo((a=(o=(s=e.inst)==null?void 0:s._zod.def)==null?void 0:o.error)==null?void 0:a.call(o,e))??Fo((i=t==null?void 0:t.error)==null?void 0:i.call(t,e))??Fo((c=r.customError)==null?void 0:c.call(r,e))??Fo((l=r.localeError)==null?void 0:l.call(r,e))??"Invalid input";n.message=u}return delete n.inst,delete n.continue,t!=null&&t.reportInput||delete n.input,n}const ph=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,Gw,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Kw=dh("$ZodError",ph),gh=dh("$ZodError",ph,{Parent:Error}),Zw=(e=>(t,r,n,s)=>{const o=n?Object.assign(n,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Ww;if(a.issues.length){const i=new((s==null?void 0:s.Err)??e)(a.issues.map(c=>hh(c,o,fh())));throw mh(i,s==null?void 0:s.callee),i}return a.value})(gh),Yw=(e=>async(t,r,n,s)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const i=new((s==null?void 0:s.Err)??e)(a.issues.map(c=>hh(c,o,fh())));throw mh(i,s==null?void 0:s.callee),i}return a.value})(gh);function vh(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function Jw(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,a=n.path.join(".");if(!r[a])if("unionErrors"in n){var i=n.unionErrors[0].errors[0];r[a]={message:i.message,type:i.code}}else r[a]={message:o,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(u){return u.errors.forEach(function(p){return e.push(p)})}),t){var c=r[a].types,l=c&&c[n.code];r[a]=Qo(a,t,r,s,l?[].concat(l,n.message):n.message)}e.shift()}return r}function Xw(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,a=n.path.join(".");if(!r[a])if(n.code==="invalid_union"&&n.errors.length>0){var i=n.errors[0][0];r[a]={message:i.message,type:i.code}}else r[a]={message:o,type:s};if(n.code==="invalid_union"&&n.errors.forEach(function(u){return u.forEach(function(p){return e.push(p)})}),t){var c=r[a].types,l=c&&c[n.code];r[a]=Qo(a,t,r,s,l?[].concat(l,n.message):n.message)}e.shift()}return r}function Qw(e,t,r){if(r===void 0&&(r={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,s,o){try{return Promise.resolve(vh(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(a){return o.shouldUseNativeValidation&&Ni({},o),{errors:{},values:r.raw?Object.assign({},n):a}})},function(a){if((function(i){return Array.isArray(i==null?void 0:i.issues)})(a))return{values:{},errors:lh(Jw(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,s,o){try{return Promise.resolve(vh(function(){return Promise.resolve((r.mode==="sync"?Zw:Yw)(e,n,t)).then(function(a){return o.shouldUseNativeValidation&&Ni({},o),{errors:{},values:r.raw?Object.assign({},n):a}})},function(a){if((function(i){return i instanceof Kw})(a))return{values:{},errors:lh(Xw(a.issues,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}var Le;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const o={};for(const a of s)o[a]=a;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(i=>typeof s[s[i]]!="number"),a={};for(const i of o)a[i]=s[i];return e.objectValues(a)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&o.push(a);return o},e.find=(s,o)=>{for(const a of s)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Le||(Le={}));var yh;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(yh||(yh={}));const me=Le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),vr=e=>{switch(typeof e){case"undefined":return me.undefined;case"string":return me.string;case"number":return Number.isNaN(e)?me.nan:me.number;case"boolean":return me.boolean;case"function":return me.function;case"bigint":return me.bigint;case"symbol":return me.symbol;case"object":return Array.isArray(e)?me.array:e===null?me.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?me.promise:typeof Map<"u"&&e instanceof Map?me.map:typeof Set<"u"&&e instanceof Set?me.set:typeof Date<"u"&&e instanceof Date?me.date:me.object;default:return me.unknown}},te=Le.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Qt extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let i=n,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(i[l]=i[l]||{_errors:[]},i[l]._errors.push(r(a))):i[l]=i[l]||{_errors:[]},i=i[l],c++}}};return s(this),n}static assert(t){if(!(t instanceof Qt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];r[o]=r[o]||[],r[o].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Qt.create=e=>new Qt(e);const Ai=(e,t)=>{let r;switch(e.code){case te.invalid_type:e.received===me.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case te.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Le.jsonStringifyReplacer)}`;break;case te.unrecognized_keys:r=`Unrecognized key(s) in object: ${Le.joinValues(e.keys,", ")}`;break;case te.invalid_union:r="Invalid input";break;case te.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Le.joinValues(e.options)}`;break;case te.invalid_enum_value:r=`Invalid enum value. Expected ${Le.joinValues(e.options)}, received '${e.received}'`;break;case te.invalid_arguments:r="Invalid function arguments";break;case te.invalid_return_type:r="Invalid function return type";break;case te.invalid_date:r="Invalid date";break;case te.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Le.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case te.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case te.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case te.custom:r="Invalid input";break;case te.invalid_intersection_types:r="Intersection results could not be merged";break;case te.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case te.not_finite:r="Number must be finite";break;default:r=t.defaultError,Le.assertNever(e)}return{message:r}};let e$=Ai;function t$(){return e$}const r$=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],a={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let i="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)i=l(a,{data:t,defaultError:i}).message;return{...s,path:o,message:i}};function ce(e,t){const r=t$(),n=r$({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Ai?void 0:Ai].filter(s=>!!s)});e.common.issues.push(n)}class ut{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return xe;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const o=await s.key,a=await s.value;n.push({key:o,value:a})}return ut.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:o,value:a}=s;if(o.status==="aborted"||a.status==="aborted")return xe;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(n[o.value]=a.value)}return{status:t.value,value:n}}}const xe=Object.freeze({status:"aborted"}),Dn=e=>({status:"dirty",value:e}),wt=e=>({status:"valid",value:e}),bh=e=>e.status==="aborted",_h=e=>e.status==="dirty",on=e=>e.status==="valid",Lo=e=>typeof Promise<"u"&&e instanceof Promise;var ge;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ge||(ge={}));class zt{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const xh=(e,t)=>{if(on(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Qt(e.common.issues);return this._error=r,this._error}}};function ke(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(a,i)=>{const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??i.defaultError}:typeof i.data>"u"?{message:c??n??i.defaultError}:a.code!=="invalid_type"?{message:i.defaultError}:{message:c??r??i.defaultError}},description:s}}class Me{get description(){return this._def.description}_getType(t){return vr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:vr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ut,ctx:{common:t.parent.common,data:t.data,parsedType:vr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Lo(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:vr(t)},s=this._parseSync({data:t,path:n.path,parent:n});return xh(n,s)}"~validate"(t){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:vr(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:r});return on(o)?{value:o.value}:{issues:r.common.issues}}catch(o){(s=(n=o==null?void 0:o.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>on(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:vr(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(Lo(s)?s:Promise.resolve(s));return xh(n,o)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{const a=t(s),i=()=>o.addIssue({code:te.custom,...n(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(i(),!1)):a?!0:(i(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new un({schema:this,typeName:be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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:r=>this["~validate"](r)}}optional(){return br.create(this,this._def)}nullable(){return dn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qt.create(this)}promise(){return Wo.create(this,this._def)}or(t){return qo.create([this,t],this._def)}and(t){return Uo.create(this,t,this._def)}transform(t){return new un({...ke(this._def),schema:this,typeName:be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Vi({...ke(this._def),innerType:this,defaultValue:r,typeName:be.ZodDefault})}brand(){return new E$({typeName:be.ZodBranded,type:this,...ke(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Fi({...ke(this._def),innerType:this,catchValue:r,typeName:be.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Li.create(this,t)}readonly(){return zi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const n$=/^c[^\s-]{8,}$/i,s$=/^[0-9a-z]+$/,o$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,a$=/^[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,i$=/^[a-z0-9_-]{21}$/i,c$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,l$=/^[-+]?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)?)??$/,u$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,d$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ti;const f$=/^(?:(?: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])$/,m$=/^(?:(?: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])$/,h$=/^(([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]))$/,p$=/^(([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])$/,g$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,v$=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wh="((\\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])))",y$=new RegExp(`^${wh}$`);function $h(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function b$(e){return new RegExp(`^${$h(e)}$`)}function _$(e){let t=`${wh}T${$h(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function x$(e,t){return!!((t==="v4"||!t)&&f$.test(e)||(t==="v6"||!t)&&h$.test(e))}function w$(e,t){if(!c$.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function $$(e,t){return!!((t==="v4"||!t)&&m$.test(e)||(t==="v6"||!t)&&p$.test(e))}class er extends Me{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==me.string){const o=this._getOrReturnCtx(t);return ce(o,{code:te.invalid_type,expected:me.string,received:o.parsedType}),xe}const n=new ut;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),ce(s,{code:te.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),ce(s,{code:te.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,i=t.data.length<o.value;(a||i)&&(s=this._getOrReturnCtx(t,s),a?ce(s,{code:te.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&ce(s,{code:te.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")u$.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"email",code:te.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")Ti||(Ti=new RegExp(d$,"u")),Ti.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"emoji",code:te.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")a$.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"uuid",code:te.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")i$.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"nanoid",code:te.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")n$.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"cuid",code:te.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")s$.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"cuid2",code:te.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")o$.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"ulid",code:te.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ce(s,{validation:"url",code:te.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"regex",code:te.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),ce(s,{code:te.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),ce(s,{code:te.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),ce(s,{code:te.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?_$(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{code:te.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?y$.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{code:te.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?b$(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{code:te.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?l$.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"duration",code:te.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?x$(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"ip",code:te.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?w$(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"jwt",code:te.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?$$(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"cidr",code:te.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?g$.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"base64",code:te.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?v$.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"base64url",code:te.invalid_string,message:o.message}),n.dirty()):Le.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:te.invalid_string,...ge.errToObj(n)})}_addCheck(t){return new er({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ge.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ge.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ge.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ge.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ge.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ge.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ge.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ge.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ge.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ge.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ge.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ge.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ge.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...ge.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ge.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ge.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...ge.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...ge.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...ge.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...ge.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...ge.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...ge.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...ge.errToObj(r)})}nonempty(t){return this.min(1,ge.errToObj(t))}trim(){return new er({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new er({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new er({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}er.create=e=>new er({checks:[],typeName:be.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...ke(e)});function S$(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return o%a/10**s}class an extends Me{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==me.number){const o=this._getOrReturnCtx(t);return ce(o,{code:te.invalid_type,expected:me.number,received:o.parsedType}),xe}let n;const s=new ut;for(const o of this._def.checks)o.kind==="int"?Le.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ce(n,{code:te.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),ce(n,{code:te.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),ce(n,{code:te.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?S$(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),ce(n,{code:te.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ce(n,{code:te.not_finite,message:o.message}),s.dirty()):Le.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ge.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ge.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ge.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ge.toString(r))}setLimit(t,r,n,s){return new an({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ge.toString(s)}]})}_addCheck(t){return new an({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ge.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ge.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ge.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:ge.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ge.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ge.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Le.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}an.create=e=>new an({checks:[],typeName:be.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ke(e)});class Mn extends Me{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==me.bigint)return this._getInvalidInput(t);let n;const s=new ut;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),ce(n,{code:te.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),ce(n,{code:te.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ce(n,{code:te.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Le.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return ce(r,{code:te.invalid_type,expected:me.bigint,received:r.parsedType}),xe}gte(t,r){return this.setLimit("min",t,!0,ge.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ge.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ge.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ge.toString(r))}setLimit(t,r,n,s){return new Mn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ge.toString(s)}]})}_addCheck(t){return new Mn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ge.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ge.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Mn.create=e=>new Mn({checks:[],typeName:be.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...ke(e)});class Oi extends Me{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==me.boolean){const n=this._getOrReturnCtx(t);return ce(n,{code:te.invalid_type,expected:me.boolean,received:n.parsedType}),xe}return wt(t.data)}}Oi.create=e=>new Oi({typeName:be.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ke(e)});class zo extends Me{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==me.date){const o=this._getOrReturnCtx(t);return ce(o,{code:te.invalid_type,expected:me.date,received:o.parsedType}),xe}if(Number.isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ce(o,{code:te.invalid_date}),xe}const n=new ut;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),ce(s,{code:te.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),ce(s,{code:te.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):Le.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new zo({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:ge.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:ge.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}zo.create=e=>new zo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:be.ZodDate,...ke(e)});class Sh extends Me{_parse(t){if(this._getType(t)!==me.symbol){const n=this._getOrReturnCtx(t);return ce(n,{code:te.invalid_type,expected:me.symbol,received:n.parsedType}),xe}return wt(t.data)}}Sh.create=e=>new Sh({typeName:be.ZodSymbol,...ke(e)});class Eh extends Me{_parse(t){if(this._getType(t)!==me.undefined){const n=this._getOrReturnCtx(t);return ce(n,{code:te.invalid_type,expected:me.undefined,received:n.parsedType}),xe}return wt(t.data)}}Eh.create=e=>new Eh({typeName:be.ZodUndefined,...ke(e)});class Ch extends Me{_parse(t){if(this._getType(t)!==me.null){const n=this._getOrReturnCtx(t);return ce(n,{code:te.invalid_type,expected:me.null,received:n.parsedType}),xe}return wt(t.data)}}Ch.create=e=>new Ch({typeName:be.ZodNull,...ke(e)});class Ii extends Me{constructor(){super(...arguments),this._any=!0}_parse(t){return wt(t.data)}}Ii.create=e=>new Ii({typeName:be.ZodAny,...ke(e)});class kh extends Me{constructor(){super(...arguments),this._unknown=!0}_parse(t){return wt(t.data)}}kh.create=e=>new kh({typeName:be.ZodUnknown,...ke(e)});class yr extends Me{_parse(t){const r=this._getOrReturnCtx(t);return ce(r,{code:te.invalid_type,expected:me.never,received:r.parsedType}),xe}}yr.create=e=>new yr({typeName:be.ZodNever,...ke(e)});class jh extends Me{_parse(t){if(this._getType(t)!==me.undefined){const n=this._getOrReturnCtx(t);return ce(n,{code:te.invalid_type,expected:me.void,received:n.parsedType}),xe}return wt(t.data)}}jh.create=e=>new jh({typeName:be.ZodVoid,...ke(e)});class qt extends Me{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==me.array)return ce(r,{code:te.invalid_type,expected:me.array,received:r.parsedType}),xe;if(s.exactLength!==null){const a=r.data.length>s.exactLength.value,i=r.data.length<s.exactLength.value;(a||i)&&(ce(r,{code:a?te.too_big:te.too_small,minimum:i?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(ce(r,{code:te.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(ce(r,{code:te.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,i)=>s.type._parseAsync(new zt(r,a,r.path,i)))).then(a=>ut.mergeArray(n,a));const o=[...r.data].map((a,i)=>s.type._parseSync(new zt(r,a,r.path,i)));return ut.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new qt({...this._def,minLength:{value:t,message:ge.toString(r)}})}max(t,r){return new qt({...this._def,maxLength:{value:t,message:ge.toString(r)}})}length(t,r){return new qt({...this._def,exactLength:{value:t,message:ge.toString(r)}})}nonempty(t){return this.min(1,t)}}qt.create=(e,t)=>new qt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:be.ZodArray,...ke(t)});function cn(e){if(e instanceof et){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=br.create(cn(n))}return new et({...e._def,shape:()=>t})}else return e instanceof qt?new qt({...e._def,type:cn(e.element)}):e instanceof br?br.create(cn(e.unwrap())):e instanceof dn?dn.create(cn(e.unwrap())):e instanceof Pr?Pr.create(e.items.map(t=>cn(t))):e}class et extends Me{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Le.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==me.object){const l=this._getOrReturnCtx(t);return ce(l,{code:te.invalid_type,expected:me.object,received:l.parsedType}),xe}const{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),i=[];if(!(this._def.catchall instanceof yr&&this._def.unknownKeys==="strip"))for(const l in s.data)a.includes(l)||i.push(l);const c=[];for(const l of a){const u=o[l],p=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new zt(s,p,s.path,l)),alwaysSet:l in s.data})}if(this._def.catchall instanceof yr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of i)c.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(l==="strict")i.length>0&&(ce(s,{code:te.unrecognized_keys,keys:i}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of i){const p=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new zt(s,p,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const p=await u.key,m=await u.value;l.push({key:p,value:m,alwaysSet:u.alwaysSet})}return l}).then(l=>ut.mergeObjectSync(n,l)):ut.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return ge.errToObj,new et({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,a;const s=((a=(o=this._def).errorMap)==null?void 0:a.call(o,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:ge.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new et({...this._def,unknownKeys:"strip"})}passthrough(){return new et({...this._def,unknownKeys:"passthrough"})}extend(t){return new et({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new et({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:be.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new et({...this._def,catchall:t})}pick(t){const r={};for(const n of Le.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new et({...this._def,shape:()=>r})}omit(t){const r={};for(const n of Le.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new et({...this._def,shape:()=>r})}deepPartial(){return cn(this)}partial(t){const r={};for(const n of Le.objectKeys(this.shape)){const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new et({...this._def,shape:()=>r})}required(t){const r={};for(const n of Le.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof br;)o=o._def.innerType;r[n]=o}return new et({...this._def,shape:()=>r})}keyof(){return Nh(Le.objectKeys(this.shape))}}et.create=(e,t)=>new et({shape:()=>e,unknownKeys:"strip",catchall:yr.create(),typeName:be.ZodObject,...ke(t)}),et.strictCreate=(e,t)=>new et({shape:()=>e,unknownKeys:"strict",catchall:yr.create(),typeName:be.ZodObject,...ke(t)}),et.lazycreate=(e,t)=>new et({shape:e,unknownKeys:"strip",catchall:yr.create(),typeName:be.ZodObject,...ke(t)});class qo extends Me{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(const i of o)if(i.result.status==="valid")return i.result;for(const i of o)if(i.result.status==="dirty")return r.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(i=>new Qt(i.ctx.common.issues));return ce(r,{code:te.invalid_union,unionErrors:a}),xe}if(r.common.async)return Promise.all(n.map(async o=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(s);{let o;const a=[];for(const c of n){const l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(c=>new Qt(c));return ce(r,{code:te.invalid_union,unionErrors:i}),xe}}get options(){return this._def.options}}qo.create=(e,t)=>new qo({options:e,typeName:be.ZodUnion,...ke(t)});function Di(e,t){const r=vr(e),n=vr(t);if(e===t)return{valid:!0,data:e};if(r===me.object&&n===me.object){const s=Le.objectKeys(t),o=Le.objectKeys(e).filter(i=>s.indexOf(i)!==-1),a={...e,...t};for(const i of o){const c=Di(e[i],t[i]);if(!c.valid)return{valid:!1};a[i]=c.data}return{valid:!0,data:a}}else if(r===me.array&&n===me.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const a=e[o],i=t[o],c=Di(a,i);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===me.date&&n===me.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Uo extends Me{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(o,a)=>{if(bh(o)||bh(a))return xe;const i=Di(o.value,a.value);return i.valid?((_h(o)||_h(a))&&r.dirty(),{status:r.value,value:i.data}):(ce(n,{code:te.invalid_intersection_types}),xe)};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(([o,a])=>s(o,a)):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}))}}Uo.create=(e,t,r)=>new Uo({left:e,right:t,typeName:be.ZodIntersection,...ke(r)});class Pr extends Me{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==me.array)return ce(n,{code:te.invalid_type,expected:me.array,received:n.parsedType}),xe;if(n.data.length<this._def.items.length)return ce(n,{code:te.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&n.data.length>this._def.items.length&&(ce(n,{code:te.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((a,i)=>{const c=this._def.items[i]||this._def.rest;return c?c._parse(new zt(n,a,n.path,i)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>ut.mergeArray(r,a)):ut.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new Pr({...this._def,rest:t})}}Pr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pr({items:e,typeName:be.ZodTuple,rest:null,...ke(t)})};class Bo extends Me{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==me.object)return ce(n,{code:te.invalid_type,expected:me.object,received:n.parsedType}),xe;const s=[],o=this._def.keyType,a=this._def.valueType;for(const i in n.data)s.push({key:o._parse(new zt(n,i,n.path,i)),value:a._parse(new zt(n,n.data[i],n.path,i)),alwaysSet:i in n.data});return n.common.async?ut.mergeObjectAsync(r,s):ut.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Me?new Bo({keyType:t,valueType:r,typeName:be.ZodRecord,...ke(n)}):new Bo({keyType:er.create(),valueType:t,typeName:be.ZodRecord,...ke(r)})}}class Rh extends Me{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==me.map)return ce(n,{code:te.invalid_type,expected:me.map,received:n.parsedType}),xe;const s=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([i,c],l)=>({key:s._parse(new zt(n,i,n.path,[l,"key"])),value:o._parse(new zt(n,c,n.path,[l,"value"]))}));if(n.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return xe;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),i.set(l.value,u.value)}return{status:r.value,value:i}})}else{const i=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return xe;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),i.set(l.value,u.value)}return{status:r.value,value:i}}}}Rh.create=(e,t,r)=>new Rh({valueType:t,keyType:e,typeName:be.ZodMap,...ke(r)});class Vn extends Me{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==me.set)return ce(n,{code:te.invalid_type,expected:me.set,received:n.parsedType}),xe;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(ce(n,{code:te.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(ce(n,{code:te.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const o=this._def.valueType;function a(c){const l=new Set;for(const u of c){if(u.status==="aborted")return xe;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}const i=[...n.data.values()].map((c,l)=>o._parse(new zt(n,c,n.path,l)));return n.common.async?Promise.all(i).then(c=>a(c)):a(i)}min(t,r){return new Vn({...this._def,minSize:{value:t,message:ge.toString(r)}})}max(t,r){return new Vn({...this._def,maxSize:{value:t,message:ge.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Vn.create=(e,t)=>new Vn({valueType:e,minSize:null,maxSize:null,typeName:be.ZodSet,...ke(t)});class Mi extends Me{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Mi.create=(e,t)=>new Mi({getter:e,typeName:be.ZodLazy,...ke(t)});class Ph extends Me{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ce(r,{received:r.data,code:te.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ph.create=(e,t)=>new Ph({value:e,typeName:be.ZodLiteral,...ke(t)});function Nh(e,t){return new ln({values:e,typeName:be.ZodEnum,...ke(t)})}class ln extends Me{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return ce(r,{expected:Le.joinValues(n),received:r.parsedType,code:te.invalid_type}),xe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return ce(r,{received:r.data,code:te.invalid_enum_value,options:n}),xe}return wt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return ln.create(t,{...this._def,...r})}exclude(t,r=this._def){return ln.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}ln.create=Nh;class Ah extends Me{_parse(t){const r=Le.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==me.string&&n.parsedType!==me.number){const s=Le.objectValues(r);return ce(n,{expected:Le.joinValues(s),received:n.parsedType,code:te.invalid_type}),xe}if(this._cache||(this._cache=new Set(Le.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=Le.objectValues(r);return ce(n,{received:n.data,code:te.invalid_enum_value,options:s}),xe}return wt(t.data)}get enum(){return this._def.values}}Ah.create=(e,t)=>new Ah({values:e,typeName:be.ZodNativeEnum,...ke(t)});class Wo extends Me{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==me.promise&&r.common.async===!1)return ce(r,{code:te.invalid_type,expected:me.promise,received:r.parsedType}),xe;const n=r.parsedType===me.promise?r.data:Promise.resolve(r.data);return wt(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Wo.create=(e,t)=>new Wo({type:e,typeName:be.ZodPromise,...ke(t)});class un extends Me{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:a=>{ce(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const a=s.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async i=>{if(r.value==="aborted")return xe;const c=await this._def.schema._parseAsync({data:i,path:n.path,parent:n});return c.status==="aborted"?xe:c.status==="dirty"||r.value==="dirty"?Dn(c.value):c});{if(r.value==="aborted")return xe;const i=this._def.schema._parseSync({data:a,path:n.path,parent:n});return i.status==="aborted"?xe:i.status==="dirty"||r.value==="dirty"?Dn(i.value):i}}if(s.type==="refinement"){const a=i=>{const c=s.refinement(i,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?xe:(i.status==="dirty"&&r.dirty(),a(i.value),{status:r.value,value:i.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>i.status==="aborted"?xe:(i.status==="dirty"&&r.dirty(),a(i.value).then(()=>({status:r.value,value:i.value}))))}if(s.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!on(a))return xe;const i=s.transform(a.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:i}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>on(a)?Promise.resolve(s.transform(a.value,o)).then(i=>({status:r.value,value:i})):xe);Le.assertNever(s)}}un.create=(e,t,r)=>new un({schema:e,typeName:be.ZodEffects,effect:t,...ke(r)}),un.createWithPreprocess=(e,t,r)=>new un({schema:t,effect:{type:"preprocess",transform:e},typeName:be.ZodEffects,...ke(r)});class br extends Me{_parse(t){return this._getType(t)===me.undefined?wt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}br.create=(e,t)=>new br({innerType:e,typeName:be.ZodOptional,...ke(t)});class dn extends Me{_parse(t){return this._getType(t)===me.null?wt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}dn.create=(e,t)=>new dn({innerType:e,typeName:be.ZodNullable,...ke(t)});class Vi extends Me{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===me.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Vi.create=(e,t)=>new Vi({innerType:e,typeName:be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ke(t)});class Fi extends Me{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Lo(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Qt(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Qt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Fi.create=(e,t)=>new Fi({innerType:e,typeName:be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ke(t)});class Th extends Me{_parse(t){if(this._getType(t)!==me.nan){const n=this._getOrReturnCtx(t);return ce(n,{code:te.invalid_type,expected:me.nan,received:n.parsedType}),xe}return{status:"valid",value:t.data}}}Th.create=e=>new Th({typeName:be.ZodNaN,...ke(e)});class E$ extends Me{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Li extends Me{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?xe:o.status==="dirty"?(r.dirty(),Dn(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?xe:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new Li({in:t,out:r,typeName:be.ZodPipeline})}}class zi extends Me{_parse(t){const r=this._def.innerType._parse(t),n=s=>(on(s)&&(s.value=Object.freeze(s.value)),s);return Lo(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}zi.create=(e,t)=>new zi({innerType:e,typeName:be.ZodReadonly,...ke(t)});var be;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(be||(be={}));const Tt=er.create,_t=an.create,Ho=Oi.create,Oh=Ii.create;yr.create;const Fn=qt.create,qi=et.create,Ih=qo.create;Uo.create,Pr.create;const C$=Bo.create,Ui=Mi.create,k$=ln.create;Wo.create,br.create,dn.create;const fn=qi({type:k$(["string","number","integer","boolean","object","array"]).optional(),title:Tt().optional(),description:Tt().optional(),default:Oh().optional(),minimum:_t().optional(),maximum:_t().optional(),exclusiveMin:_t().optional(),exclusiveMax:_t().optional(),multipleOf:_t().optional(),minLength:_t().optional(),maxLength:_t().optional(),minContains:_t().optional(),maxContains:_t().optional(),minProperties:_t().optional(),maxProperties:_t().optional(),isModifiable:Ho().optional(),"x-modifiable":Fn(Tt()).optional(),pattern:Tt().optional(),format:Tt().optional(),minItems:_t().optional(),maxItems:_t().optional(),uniqueItems:Ho().optional(),enum:Fn(Oh()).optional(),$id:Tt().optional(),$schema:Tt().optional()}).extend({properties:Ui(()=>C$(Tt(),fn)).optional(),items:Ui(()=>Ih([fn,Fn(fn)])).optional(),required:Fn(Tt()).optional(),additionalProperties:Ui(()=>Ih([Ho(),fn])).optional()}),j$=qi({root:fn,properties:Fn(qi({id:Tt(),key:Tt().min(1),isRequired:Ho(),schema:fn}))}),R$=e=>{const t=o=>{const a={...o};if(Array.isArray(a.properties)){const i={},c=[];a.properties.forEach(l=>{l.key&&(i[l.key]=t(l.schema),l.isRequired&&c.push(l.key))}),a.properties=i,c.length>0&&(a.required=c)}return typeof a.items=="object"&&a.items!==null&&!Array.isArray(a.items)?a.items=t(a.items):Array.isArray(a.items)&&(a.items=a.items.map(i=>t(i))),a},r={...t(e.root)},n={},s=[];return e.properties.forEach(o=>{o.key&&(n[o.key]=t(o.schema),o.isRequired&&s.push(o.key))}),Object.keys(n).length>0&&(r.properties=n),s.length>0&&(r.required=s),r},P$=e=>{const t=i=>{const c={...i};if(typeof c.properties=="object"&&!Array.isArray(c.properties)){const l=[];Object.keys(c.properties).forEach(u=>{var m;const p=c.properties[u];l.push({id:xn(6),key:u,isRequired:((m=c.required)==null?void 0:m.includes(u))||!1,schema:t(p)})}),c.properties=l}return typeof c.items=="object"&&c.items!==null&&!Array.isArray(c.items)?c.items=t(c.items):Array.isArray(c.items)&&(c.items=c.items.map(l=>t(l))),c},{properties:r,required:n,...s}=e,a=t({properties:r,required:n});return{root:{...s,...a.root},properties:a.properties||[]}},N$=({rootType:e="object",defaultValue:t})=>{const r=xn(6),n=dp({resolver:Qw(j$),defaultValues:t?P$(t):{root:{type:e,$schema:"http://json-schema.org/draft/2020-12/schema",...e==="object"&&{additionalProperties:!0},...e==="array"&&{items:{type:"string"}}},properties:e==="object"?[{id:r,key:`field_${r}`,isRequired:!1,schema:{type:"number"}}]:[]}}),s=n.watch(),o=Z.useMemo(()=>R$(s),[s]);return{methods:n,jsonSchema:o}},A$=({textAreaRef:e,triggerAutoSize:t,maxHeight:r=Number.MAX_SAFE_INTEGER,minHeight:n=0})=>{const[s,o]=S.useState(!0);S.useEffect(()=>{const i=e.current;if(i){s&&(i.style.minHeight=`${n+6}px`,r>n&&(i.style.maxHeight=`${r}px`),o(!1)),i.style.height=`${n+6}px`;const c=i.scrollHeight;c>r?i.style.height=`${r}px`:i.style.height=`${c+6}px`}},[e.current,t])},Dh=S.forwardRef(({maxHeight:e=Number.MAX_SAFE_INTEGER,minHeight:t=52,className:r,onChange:n,value:s,...o},a)=>{const i=S.useRef(null),[c,l]=S.useState("");return A$({textAreaRef:i,triggerAutoSize:c,maxHeight:e,minHeight:t}),Z.useImperativeHandle(a,()=>({textArea:i.current,focus:()=>{var u;return(u=i==null?void 0:i.current)==null?void 0:u.focus()},maxHeight:e,minHeight:t})),S.useEffect(()=>{l(s)},[o==null?void 0:o.defaultValue,s]),d.jsx("textarea",{...o,value:s,ref:i,className:Se("flex w-full rounded-md border border-input bg-transparent dark:bg-input/30 px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),onChange:u=>{l(u.target.value),n==null||n(u)}})});Dh.displayName="AutosizeTextarea";const T$=({rootType:e="object",readOnly:t=!1,theme:r="light",styles:n,onChange:s,defaultValue:o})=>{const{methods:a,jsonSchema:i}=N$({rootType:e,defaultValue:o}),{setError:c,clearErrors:l,watch:u}=a,p=u("properties"),[m,v]=Z.useState(null);Z.useEffect(()=>{s&&s(i)},[i,s]),Z.useEffect(()=>{const I=zm(i);JSON.stringify(I)!==JSON.stringify(m)&&v(I)},[i,m]),Z.useEffect(()=>{l(),m&&m.forEach(I=>{const z=I.instancePath.split("/").filter(Boolean);if(z[0]==="properties"&&z.length>=3){const M=(p==null?void 0:p.findIndex(V=>V.key===z[1]))??-1;M!==-1&&c(`properties.${M}.schema.${z[2]}`,{type:"ajv",message:I.message})}else z.length>0&&c(`root.${z[0]}`,{type:"ajv",message:I.message})})},[m,p,c,l]),Z.useEffect(()=>{if(!o){const I=xn(6),z={root:{type:e,$schema:"http://json-schema.org/draft/2020-12/schema",...e==="object"&&{additionalProperties:!0},...e==="array"&&{items:{type:"string"}}},properties:e==="object"?[{id:I,key:`field_${I}`,isRequired:!1,schema:{type:"number"}}]:[]};a.reset(z)}},[e,a,o]);const{fields:x,append:y,remove:h}=$c({control:a.control,name:"properties",keyName:"fieldId"}),_=()=>{const I=xn(6);y({id:I,key:`field_${I}`,isRequired:!1,schema:{type:"string"}})},[f,b]=Z.useState({isOpen:!1,fieldPath:null}),w=I=>{b({isOpen:!0,fieldPath:I})},g={...ks,...n,output:{...ks.output,...n==null?void 0:n.output},form:{...ks.form,...n==null?void 0:n.form},settings:{...ks.settings,...n==null?void 0:n.settings}},$=Z.useRef(null),[E,k]=Z.useState("overflow-hidden");return Z.useEffect(()=>{var z;const I=(z=$.current)==null?void 0:z.textArea;I&&(I.scrollHeight>I.clientHeight?k("overflow-y-auto"):k("overflow-hidden"))},[i]),d.jsxs(Zh,{...a,children:[d.jsx("div",{className:Se("bg-background text-foreground flex flex-col",r,Qu[g.spacing]),children:d.jsxs("div",{className:Se("bg-background text-foreground flex",r,w_[g.output.position],Qu[g.spacing]),children:[d.jsxs("div",{className:Se("p-4 pr-2 flex flex-col gap-2 border border-input rounded-lg overflow-y-auto",si[g.form.width],Xu[g.form.height]),children:[d.jsx(b_,{theme:r,readOnly:t,rootType:e,onAddField:_,onOpenSettings:w}),e==="object"&&d.jsx($0,{theme:r,readOnly:t,fields:x,onRemove:h,onOpenSettings:w}),e==="array"&&d.jsx("div",{className:"ml-2 pl-2 border-l-2 border-input",children:d.jsx(Ps,{theme:r,readOnly:t,fieldPath:"root.items",onRemove:()=>{},onOpenSettings:w,isSimpleType:!1,isRootLevel:!1})})]}),m?d.jsxs("div",{className:Se("p-6 bg-background text-foreground border border-input rounded-lg overflow-y-auto overflow-x-auto",si[g.output.width],Xu[g.output.height]),children:[d.jsx("p",{className:"text-lg",children:"JSON Schema Errors"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:`The generated JSON Schema has ${m==null?void 0:m.length}
153
- ${(m==null?void 0:m.length)>1?"errors.":"error."}`}),d.jsx("ul",{className:"mt-4 flex flex-col gap-2",children:m==null?void 0:m.map((I,z)=>d.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[d.jsxs(Hd,{variant:"destructive",className:"font-mono",children:["root",I.instancePath]}),d.jsx("span",{children:I.message})]},z))})]}):g.output.showJson&&d.jsx(Dh,{ref:$,readOnly:!0,maxHeight:__[g.output.height],value:JSON.stringify(i,null,2),className:Se("font-mono",si[g.output.width],E)})]})}),d.jsx(Uw,{theme:r,readOnly:t,isOpen:f.isOpen,fieldPath:f.fieldPath,className:x_[g.settings.width],onClose:()=>b({isOpen:!1,fieldPath:null})})]})};rr.JsonSchemaEditor=T$,Object.defineProperty(rr,Symbol.toStringTag,{value:"Module"})}));
77
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return S.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},V$=hf,L$=mf,R$=gf,q$=vf,U$=yf,Z$=Sf,B$=kf,W$=_f,H$=$f;function K$({...e}){return d.jsx(V$,{"data-slot":"alert-dialog",...e})}function G$({...e}){return d.jsx(L$,{"data-slot":"alert-dialog-trigger",...e})}function J$({...e}){return d.jsx(R$,{"data-slot":"alert-dialog-portal",...e})}function Y$({className:e,...t}){return d.jsx(q$,{"data-slot":"alert-dialog-overlay",className:ge("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function X$({className:e,...t}){return d.jsxs(J$,{children:[d.jsx(Y$,{}),d.jsx(U$,{"data-slot":"alert-dialog-content",className:ge("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function Q$({className:e,...t}){return d.jsx("div",{"data-slot":"alert-dialog-header",className:ge("flex flex-col gap-2 text-center sm:text-left",e),...t})}function eS({className:e,...t}){return d.jsx("div",{"data-slot":"alert-dialog-footer",className:ge("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function tS({className:e,...t}){return d.jsx(W$,{"data-slot":"alert-dialog-title",className:ge("text-lg font-semibold",e),...t})}function rS({className:e,...t}){return d.jsx(H$,{"data-slot":"alert-dialog-description",className:ge("text-muted-foreground text-sm",e),...t})}function nS({className:e,...t}){return d.jsx(Z$,{className:ge(Ca(),e),...t})}function oS({className:e,...t}){return d.jsx(B$,{className:ge(Ca({variant:"outline"}),e),...t})}const Ce=J.forwardRef(({className:e,type:t,...r},n)=>d.jsx("input",{type:t,"data-slot":"input",className:ge("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r}));Ce.displayName="Input";function xf(e,[t,r]){return Math.min(r,Math.max(t,e))}function Cf(e){const t=sS(e),r=S.forwardRef((n,o)=>{const{children:s,...a}=n,i=S.Children.toArray(s),c=i.find(iS);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function sS(e){const t=S.forwardRef((r,n)=>{const{children:o,...s}=r;if(S.isValidElement(o)){const a=lS(o),i=cS(s,o.props);return o.type!==S.Fragment&&(i.ref=n?Nr(n,a):a),S.cloneElement(o,i)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var aS=Symbol("radix.slottable");function iS(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===aS}function cS(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function lS(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Pf(e){const t=e+"CollectionProvider",[r,n]=yt(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:m,children:_}=y,f=J.useRef(null),b=J.useRef(new Map).current;return d.jsx(o,{scope:m,itemMap:b,collectionRef:f,children:_})};a.displayName=t;const i=e+"CollectionSlot",c=Cf(i),l=J.forwardRef((y,m)=>{const{scope:_,children:f}=y,b=s(i,_),$=Ae(m,b.collectionRef);return d.jsx(c,{ref:$,children:f})});l.displayName=i;const u=e+"CollectionItemSlot",p="data-radix-collection-item",h=Cf(u),v=J.forwardRef((y,m)=>{const{scope:_,children:f,...b}=y,$=J.useRef(null),g=Ae(m,$),E=s(u,_);return J.useEffect(()=>(E.itemMap.set($,{ref:$,...b}),()=>void E.itemMap.delete($))),d.jsx(h,{[p]:"",ref:g,children:f})});v.displayName=u;function w(y){const m=s(e+"CollectionConsumer",y);return J.useCallback(()=>{const f=m.collectionRef.current;if(!f)return[];const b=Array.from(f.querySelectorAll(`[${p}]`));return Array.from(m.itemMap.values()).sort((E,k)=>b.indexOf(E.ref.current)-b.indexOf(k.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:v},w,n]}var uS=S.createContext(void 0);function Ua(e){const t=S.useContext(uS);return e||t||"ltr"}const dS=["top","right","bottom","left"],Ht=Math.min,nt=Math.max,rs=Math.round,ns=Math.floor,_t=e=>({x:e,y:e}),fS={left:"right",right:"left",bottom:"top",top:"bottom"},pS={start:"end",end:"start"};function Za(e,t,r){return nt(e,Ht(t,r))}function Ot(e,t){return typeof e=="function"?e(t):e}function Dt(e){return e.split("-")[0]}function Mr(e){return e.split("-")[1]}function Ba(e){return e==="x"?"y":"x"}function Wa(e){return e==="y"?"height":"width"}const hS=new Set(["top","bottom"]);function wt(e){return hS.has(Dt(e))?"y":"x"}function Ha(e){return Ba(wt(e))}function mS(e,t,r){r===void 0&&(r=!1);const n=Mr(e),o=Ha(e),s=Wa(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=os(a)),[a,os(a)]}function gS(e){const t=os(e);return[Ka(e),t,Ka(t)]}function Ka(e){return e.replace(/start|end/g,t=>pS[t])}const Nf=["left","right"],Af=["right","left"],vS=["top","bottom"],yS=["bottom","top"];function bS(e,t,r){switch(e){case"top":case"bottom":return r?t?Af:Nf:t?Nf:Af;case"left":case"right":return t?vS:yS;default:return[]}}function _S(e,t,r,n){const o=Mr(e);let s=bS(Dt(e),r==="start",n);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Ka)))),s}function os(e){return e.replace(/left|right|bottom|top/g,t=>fS[t])}function wS(e){return{top:0,right:0,bottom:0,left:0,...e}}function Tf(e){return typeof e!="number"?wS(e):{top:e,right:e,bottom:e,left:e}}function ss(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function If(e,t,r){let{reference:n,floating:o}=e;const s=wt(t),a=Ha(t),i=Wa(a),c=Dt(t),l=s==="y",u=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,h=n[i]/2-o[i]/2;let v;switch(c){case"top":v={x:u,y:n.y-o.height};break;case"bottom":v={x:u,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:p};break;case"left":v={x:n.x-o.width,y:p};break;default:v={x:n.x,y:n.y}}switch(Mr(t)){case"start":v[a]-=h*(r&&l?-1:1);break;case"end":v[a]+=h*(r&&l?-1:1);break}return v}const $S=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=r,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:p}=If(l,n,c),h=n,v={},w=0;for(let y=0;y<i.length;y++){const{name:m,fn:_}=i[y],{x:f,y:b,data:$,reset:g}=await _({x:u,y:p,initialPlacement:n,placement:h,strategy:o,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});u=f??u,p=b??p,v={...v,[m]:{...v[m],...$}},g&&w<=50&&(w++,typeof g=="object"&&(g.placement&&(h=g.placement),g.rects&&(l=g.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):g.rects),{x:u,y:p}=If(l,h,c)),y=-1)}return{x:u,y:p,placement:h,strategy:o,middlewareData:v}};async function nn(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:h=!1,padding:v=0}=Ot(t,e),w=Tf(v),m=i[h?p==="floating"?"reference":"floating":p],_=ss(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(m)))==null||r?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:l,rootBoundary:u,strategy:c})),f=p==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),$=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},g=ss(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:f,offsetParent:b,strategy:c}):f);return{top:(_.top-g.top+w.top)/$.y,bottom:(g.bottom-_.bottom+w.bottom)/$.y,left:(_.left-g.left+w.left)/$.x,right:(g.right-_.right+w.right)/$.x}}const SS=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:l,padding:u=0}=Ot(e,t)||{};if(l==null)return{};const p=Tf(u),h={x:r,y:n},v=Ha(o),w=Wa(v),y=await a.getDimensions(l),m=v==="y",_=m?"top":"left",f=m?"bottom":"right",b=m?"clientHeight":"clientWidth",$=s.reference[w]+s.reference[v]-h[v]-s.floating[w],g=h[v]-s.reference[v],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let k=E?E[b]:0;(!k||!await(a.isElement==null?void 0:a.isElement(E)))&&(k=i.floating[b]||s.floating[w]);const C=$/2-g/2,O=k/2-y[w]/2-1,V=Ht(p[_],O),z=Ht(p[f],O),j=V,R=k-y[w]-z,Z=k/2-y[w]/2+C,ne=Za(j,Z,R),G=!c.arrow&&Mr(o)!=null&&Z!==ne&&s.reference[w]/2-(Z<j?V:z)-y[w]/2<0,oe=G?Z<j?Z-j:Z-R:0;return{[v]:h[v]+oe,data:{[v]:ne,centerOffset:Z-ne-oe,...G&&{alignmentOffset:oe}},reset:G}}}),ES=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...m}=Ot(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const _=Dt(o),f=wt(i),b=Dt(i)===i,$=await(c.isRTL==null?void 0:c.isRTL(l.floating)),g=h||(b||!y?[os(i)]:gS(i)),E=w!=="none";!h&&E&&g.push(..._S(i,y,w,$));const k=[i,...g],C=await nn(t,m),O=[];let V=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&O.push(C[_]),p){const Z=mS(o,a,$);O.push(C[Z[0]],C[Z[1]])}if(V=[...V,{placement:o,overflows:O}],!O.every(Z=>Z<=0)){var z,j;const Z=(((z=s.flip)==null?void 0:z.index)||0)+1,ne=k[Z];if(ne&&(!(p==="alignment"?f!==wt(ne):!1)||V.every(F=>wt(F.placement)===f?F.overflows[0]>0:!0)))return{data:{index:Z,overflows:V},reset:{placement:ne}};let G=(j=V.filter(oe=>oe.overflows[0]<=0).sort((oe,F)=>oe.overflows[1]-F.overflows[1])[0])==null?void 0:j.placement;if(!G)switch(v){case"bestFit":{var R;const oe=(R=V.filter(F=>{if(E){const fe=wt(F.placement);return fe===f||fe==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(fe=>fe>0).reduce((fe,H)=>fe+H,0)]).sort((F,fe)=>F[1]-fe[1])[0])==null?void 0:R[0];oe&&(G=oe);break}case"initialPlacement":G=i;break}if(o!==G)return{reset:{placement:G}}}return{}}}};function Of(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Df(e){return dS.some(t=>e[t]>=0)}const kS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Ot(e,t);switch(n){case"referenceHidden":{const s=await nn(t,{...o,elementContext:"reference"}),a=Of(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Df(a)}}}case"escaped":{const s=await nn(t,{...o,altBoundary:!0}),a=Of(s,r.floating);return{data:{escapedOffsets:a,escaped:Df(a)}}}default:return{}}}}},Mf=new Set(["left","top"]);async function xS(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Dt(r),i=Mr(r),c=wt(r)==="y",l=Mf.has(a)?-1:1,u=s&&c?-1:1,p=Ot(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof w=="number"&&(v=i==="end"?w*-1:w),c?{x:v*u,y:h*l}:{x:h*l,y:v*u}}const CS=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await xS(t,e);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},PS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:m=>{let{x:_,y:f}=m;return{x:_,y:f}}},...c}=Ot(e,t),l={x:r,y:n},u=await nn(t,c),p=wt(Dt(o)),h=Ba(p);let v=l[h],w=l[p];if(s){const m=h==="y"?"top":"left",_=h==="y"?"bottom":"right",f=v+u[m],b=v-u[_];v=Za(f,v,b)}if(a){const m=p==="y"?"top":"left",_=p==="y"?"bottom":"right",f=w+u[m],b=w-u[_];w=Za(f,w,b)}const y=i.fn({...t,[h]:v,[p]:w});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[h]:s,[p]:a}}}}}},NS=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:l=!0}=Ot(e,t),u={x:r,y:n},p=wt(o),h=Ba(p);let v=u[h],w=u[p];const y=Ot(i,t),m=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const b=h==="y"?"height":"width",$=s.reference[h]-s.floating[b]+m.mainAxis,g=s.reference[h]+s.reference[b]-m.mainAxis;v<$?v=$:v>g&&(v=g)}if(l){var _,f;const b=h==="y"?"width":"height",$=Mf.has(Dt(o)),g=s.reference[p]-s.floating[b]+($&&((_=a.offset)==null?void 0:_[p])||0)+($?0:m.crossAxis),E=s.reference[p]+s.reference[b]+($?0:((f=a.offset)==null?void 0:f[p])||0)-($?m.crossAxis:0);w<g?w=g:w>E&&(w=E)}return{[h]:v,[p]:w}}}},AS=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...l}=Ot(e,t),u=await nn(t,l),p=Dt(o),h=Mr(o),v=wt(o)==="y",{width:w,height:y}=s.floating;let m,_;p==="top"||p==="bottom"?(m=p,_=h===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(_=p,m=h==="end"?"top":"bottom");const f=y-u.top-u.bottom,b=w-u.left-u.right,$=Ht(y-u[m],f),g=Ht(w-u[_],b),E=!t.middlewareData.shift;let k=$,C=g;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(C=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=f),E&&!h){const V=nt(u.left,0),z=nt(u.right,0),j=nt(u.top,0),R=nt(u.bottom,0);v?C=w-2*(V!==0||z!==0?V+z:nt(u.left,u.right)):k=y-2*(j!==0||R!==0?j+R:nt(u.top,u.bottom))}await c({...t,availableWidth:C,availableHeight:k});const O=await a.getDimensions(i.floating);return w!==O.width||y!==O.height?{reset:{rects:!0}}:{}}}};function as(){return typeof window<"u"}function zr(e){return zf(e)?(e.nodeName||"").toLowerCase():"#document"}function ot(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $t(e){var t;return(t=(zf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zf(e){return as()?e instanceof Node||e instanceof ot(e).Node:!1}function mt(e){return as()?e instanceof Element||e instanceof ot(e).Element:!1}function St(e){return as()?e instanceof HTMLElement||e instanceof ot(e).HTMLElement:!1}function jf(e){return!as()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ot(e).ShadowRoot}const TS=new Set(["inline","contents"]);function on(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!TS.has(o)}const IS=new Set(["table","td","th"]);function OS(e){return IS.has(zr(e))}const DS=[":popover-open",":modal"];function is(e){return DS.some(t=>{try{return e.matches(t)}catch{return!1}})}const MS=["transform","translate","scale","rotate","perspective"],zS=["transform","translate","scale","rotate","perspective","filter"],jS=["paint","layout","strict","content"];function Ga(e){const t=Ja(),r=mt(e)?gt(e):e;return MS.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||zS.some(n=>(r.willChange||"").includes(n))||jS.some(n=>(r.contain||"").includes(n))}function FS(e){let t=Kt(e);for(;St(t)&&!jr(t);){if(Ga(t))return t;if(is(t))return null;t=Kt(t)}return null}function Ja(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const VS=new Set(["html","body","#document"]);function jr(e){return VS.has(zr(e))}function gt(e){return ot(e).getComputedStyle(e)}function cs(e){return mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kt(e){if(zr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jf(e)&&e.host||$t(e);return jf(t)?t.host:t}function Ff(e){const t=Kt(e);return jr(t)?e.ownerDocument?e.ownerDocument.body:e.body:St(t)&&on(t)?t:Ff(t)}function sn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Ff(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),a=ot(o);if(s){const i=Ya(a);return t.concat(a,a.visualViewport||[],on(o)?o:[],i&&r?sn(i):[])}return t.concat(o,sn(o,[],r))}function Ya(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vf(e){const t=gt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=St(e),s=o?e.offsetWidth:r,a=o?e.offsetHeight:n,i=rs(r)!==s||rs(n)!==a;return i&&(r=s,n=a),{width:r,height:n,$:i}}function Xa(e){return mt(e)?e:e.contextElement}function Fr(e){const t=Xa(e);if(!St(t))return _t(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=Vf(t);let a=(s?rs(r.width):r.width)/n,i=(s?rs(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const LS=_t(0);function Lf(e){const t=ot(e);return!Ja()||!t.visualViewport?LS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function RS(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ot(e)?!1:t}function cr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Xa(e);let a=_t(1);t&&(n?mt(n)&&(a=Fr(n)):a=Fr(e));const i=RS(s,r,n)?Lf(s):_t(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,u=o.width/a.x,p=o.height/a.y;if(s){const h=ot(s),v=n&&mt(n)?ot(n):n;let w=h,y=Ya(w);for(;y&&n&&v!==w;){const m=Fr(y),_=y.getBoundingClientRect(),f=gt(y),b=_.left+(y.clientLeft+parseFloat(f.paddingLeft))*m.x,$=_.top+(y.clientTop+parseFloat(f.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,p*=m.y,c+=b,l+=$,w=ot(y),y=Ya(w)}}return ss({width:u,height:p,x:c,y:l})}function ls(e,t){const r=cs(e).scrollLeft;return t?t.left+r:cr($t(e)).left+r}function Rf(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-ls(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function qS(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",a=$t(n),i=t?is(t.floating):!1;if(n===a||i&&s)return r;let c={scrollLeft:0,scrollTop:0},l=_t(1);const u=_t(0),p=St(n);if((p||!p&&!s)&&((zr(n)!=="body"||on(a))&&(c=cs(n)),St(n))){const v=cr(n);l=Fr(n),u.x=v.x+n.clientLeft,u.y=v.y+n.clientTop}const h=a&&!p&&!s?Rf(a,c):_t(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+h.x,y:r.y*l.y-c.scrollTop*l.y+u.y+h.y}}function US(e){return Array.from(e.getClientRects())}function ZS(e){const t=$t(e),r=cs(e),n=e.ownerDocument.body,o=nt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=nt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+ls(e);const i=-r.scrollTop;return gt(n).direction==="rtl"&&(a+=nt(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:i}}const qf=25;function BS(e,t){const r=ot(e),n=$t(e),o=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const u=Ja();(!u||u&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const l=ls(n);if(l<=0){const u=n.ownerDocument,p=u.body,h=getComputedStyle(p),v=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(n.clientWidth-p.clientWidth-v);w<=qf&&(s-=w)}else l<=qf&&(s+=l);return{width:s,height:a,x:i,y:c}}const WS=new Set(["absolute","fixed"]);function HS(e,t){const r=cr(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=St(e)?Fr(e):_t(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,l=n*s.y;return{width:a,height:i,x:c,y:l}}function Uf(e,t,r){let n;if(t==="viewport")n=BS(e,r);else if(t==="document")n=ZS($t(e));else if(mt(t))n=HS(t,r);else{const o=Lf(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ss(n)}function Zf(e,t){const r=Kt(e);return r===t||!mt(r)||jr(r)?!1:gt(r).position==="fixed"||Zf(r,t)}function KS(e,t){const r=t.get(e);if(r)return r;let n=sn(e,[],!1).filter(i=>mt(i)&&zr(i)!=="body"),o=null;const s=gt(e).position==="fixed";let a=s?Kt(e):e;for(;mt(a)&&!jr(a);){const i=gt(a),c=Ga(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&WS.has(o.position)||on(a)&&!c&&Zf(e,a))?n=n.filter(u=>u!==a):o=i,a=Kt(a)}return t.set(e,n),n}function GS(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?is(t)?[]:KS(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((l,u)=>{const p=Uf(t,u,o);return l.top=nt(p.top,l.top),l.right=Ht(p.right,l.right),l.bottom=Ht(p.bottom,l.bottom),l.left=nt(p.left,l.left),l},Uf(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function JS(e){const{width:t,height:r}=Vf(e);return{width:t,height:r}}function YS(e,t,r){const n=St(t),o=$t(t),s=r==="fixed",a=cr(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=_t(0);function l(){c.x=ls(o)}if(n||!n&&!s)if((zr(t)!=="body"||on(o))&&(i=cs(t)),n){const v=cr(t,!0,s,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&l();s&&!n&&o&&l();const u=o&&!n&&!s?Rf(o,i):_t(0),p=a.left+i.scrollLeft-c.x-u.x,h=a.top+i.scrollTop-c.y-u.y;return{x:p,y:h,width:a.width,height:a.height}}function Qa(e){return gt(e).position==="static"}function Bf(e,t){if(!St(e)||gt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return $t(e)===r&&(r=r.ownerDocument.body),r}function Wf(e,t){const r=ot(e);if(is(e))return r;if(!St(e)){let o=Kt(e);for(;o&&!jr(o);){if(mt(o)&&!Qa(o))return o;o=Kt(o)}return r}let n=Bf(e,t);for(;n&&OS(n)&&Qa(n);)n=Bf(n,t);return n&&jr(n)&&Qa(n)&&!Ga(n)?r:n||FS(e)||r}const XS=async function(e){const t=this.getOffsetParent||Wf,r=this.getDimensions,n=await r(e.floating);return{reference:YS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function QS(e){return gt(e).direction==="rtl"}const eE={convertOffsetParentRelativeRectToViewportRelativeRect:qS,getDocumentElement:$t,getClippingRect:GS,getOffsetParent:Wf,getElementRects:XS,getClientRects:US,getDimensions:JS,getScale:Fr,isElement:mt,isRTL:QS};function Hf(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tE(e,t){let r=null,n;const o=$t(e);function s(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:u,top:p,width:h,height:v}=l;if(i||t(),!h||!v)return;const w=ns(p),y=ns(o.clientWidth-(u+h)),m=ns(o.clientHeight-(p+v)),_=ns(u),b={rootMargin:-w+"px "+-y+"px "+-m+"px "+-_+"px",threshold:nt(0,Ht(1,c))||1};let $=!0;function g(E){const k=E[0].intersectionRatio;if(k!==c){if(!$)return a();k?a(!1,k):n=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!Hf(l,e.getBoundingClientRect())&&a(),$=!1}try{r=new IntersectionObserver(g,{...b,root:o.ownerDocument})}catch{r=new IntersectionObserver(g,b)}r.observe(e)}return a(!0),s}function rE(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=Xa(e),u=o||s?[...l?sn(l):[],...sn(t)]:[];u.forEach(_=>{o&&_.addEventListener("scroll",r,{passive:!0}),s&&_.addEventListener("resize",r)});const p=l&&i?tE(l,r):null;let h=-1,v=null;a&&(v=new ResizeObserver(_=>{let[f]=_;f&&f.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),r()}),l&&!c&&v.observe(l),v.observe(t));let w,y=c?cr(e):null;c&&m();function m(){const _=cr(e);y&&!Hf(y,_)&&r(),y=_,w=requestAnimationFrame(m)}return r(),()=>{var _;u.forEach(f=>{o&&f.removeEventListener("scroll",r),s&&f.removeEventListener("resize",r)}),p?.(),(_=v)==null||_.disconnect(),v=null,c&&cancelAnimationFrame(w)}}const nE=CS,oE=PS,sE=ES,aE=AS,iE=kS,Kf=SS,cE=NS,lE=(e,t,r)=>{const n=new Map,o={platform:eE,...r},s={...o.platform,_c:n};return $S(e,t,{...o,platform:s})};var uE=typeof document<"u",dE=function(){},us=uE?J.useLayoutEffect:dE;function ds(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ds(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!ds(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Gf(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jf(e,t){const r=Gf(e);return Math.round(t*r)/r}function ei(e){const t=S.useRef(e);return us(()=>{t.current=e}),t}function fE(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:l}=e,[u,p]=S.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=S.useState(n);ds(h,n)||v(n);const[w,y]=S.useState(null),[m,_]=S.useState(null),f=S.useCallback(F=>{F!==E.current&&(E.current=F,y(F))},[]),b=S.useCallback(F=>{F!==k.current&&(k.current=F,_(F))},[]),$=s||w,g=a||m,E=S.useRef(null),k=S.useRef(null),C=S.useRef(u),O=c!=null,V=ei(c),z=ei(o),j=ei(l),R=S.useCallback(()=>{if(!E.current||!k.current)return;const F={placement:t,strategy:r,middleware:h};z.current&&(F.platform=z.current),lE(E.current,k.current,F).then(fe=>{const H={...fe,isPositioned:j.current!==!1};Z.current&&!ds(C.current,H)&&(C.current=H,fn.flushSync(()=>{p(H)}))})},[h,t,r,z,j]);us(()=>{l===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,p(F=>({...F,isPositioned:!1})))},[l]);const Z=S.useRef(!1);us(()=>(Z.current=!0,()=>{Z.current=!1}),[]),us(()=>{if($&&(E.current=$),g&&(k.current=g),$&&g){if(V.current)return V.current($,g,R);R()}},[$,g,R,V,O]);const ne=S.useMemo(()=>({reference:E,floating:k,setReference:f,setFloating:b}),[f,b]),G=S.useMemo(()=>({reference:$,floating:g}),[$,g]),oe=S.useMemo(()=>{const F={position:r,left:0,top:0};if(!G.floating)return F;const fe=Jf(G.floating,u.x),H=Jf(G.floating,u.y);return i?{...F,transform:"translate("+fe+"px, "+H+"px)",...Gf(G.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:fe,top:H}},[r,i,G.floating,u.x,u.y]);return S.useMemo(()=>({...u,update:R,refs:ne,elements:G,floatingStyles:oe}),[u,R,ne,G,oe])}const pE=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Kf({element:n.current,padding:o}).fn(r):{}:n?Kf({element:n,padding:o}).fn(r):{}}}},hE=(e,t)=>({...nE(e),options:[e,t]}),mE=(e,t)=>({...oE(e),options:[e,t]}),gE=(e,t)=>({...cE(e),options:[e,t]}),vE=(e,t)=>({...sE(e),options:[e,t]}),yE=(e,t)=>({...aE(e),options:[e,t]}),bE=(e,t)=>({...iE(e),options:[e,t]}),_E=(e,t)=>({...pE(e),options:[e,t]});var wE="Arrow",Yf=S.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return d.jsx(Ee.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Yf.displayName=wE;var $E=Yf;function ti(e){const[t,r]=S.useState(void 0);return He(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;r({width:a,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var ri="Popper",[Xf,fs]=yt(ri),[SE,Qf]=Xf(ri),ep=e=>{const{__scopePopper:t,children:r}=e,[n,o]=S.useState(null);return d.jsx(SE,{scope:t,anchor:n,onAnchorChange:o,children:r})};ep.displayName=ri;var tp="PopperAnchor",rp=S.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=Qf(tp,r),a=S.useRef(null),i=Ae(t,a),c=S.useRef(null);return S.useEffect(()=>{const l=c.current;c.current=n?.current||a.current,l!==c.current&&s.onAnchorChange(c.current)}),n?null:d.jsx(Ee.div,{...o,ref:i})});rp.displayName=tp;var ni="PopperContent",[EE,kE]=Xf(ni),np=S.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:w,...y}=e,m=Qf(ni,r),[_,f]=S.useState(null),b=Ae(t,q=>f(q)),[$,g]=S.useState(null),E=ti($),k=E?.width??0,C=E?.height??0,O=n+(s!=="center"?"-"+s:""),V=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},z=Array.isArray(l)?l:[l],j=z.length>0,R={padding:V,boundary:z.filter(CE),altBoundary:j},{refs:Z,floatingStyles:ne,placement:G,isPositioned:oe,middlewareData:F}=fE({strategy:"fixed",placement:O,whileElementsMounted:(...q)=>rE(...q,{animationFrame:v==="always"}),elements:{reference:m.anchor},middleware:[hE({mainAxis:o+C,alignmentAxis:a}),c&&mE({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?gE():void 0,...R}),c&&vE({...R}),yE({...R,apply:({elements:q,rects:Q,availableWidth:ue,availableHeight:se})=>{const{width:A,height:T}=Q.reference,W=q.floating.style;W.setProperty("--radix-popper-available-width",`${ue}px`),W.setProperty("--radix-popper-available-height",`${se}px`),W.setProperty("--radix-popper-anchor-width",`${A}px`),W.setProperty("--radix-popper-anchor-height",`${T}px`)}}),$&&_E({element:$,padding:i}),PE({arrowWidth:k,arrowHeight:C}),h&&bE({strategy:"referenceHidden",...R})]}),[fe,H]=ap(G),I=Zt(w);He(()=>{oe&&I?.()},[oe,I]);const K=F.arrow?.x,D=F.arrow?.y,x=F.arrow?.centerOffset!==0,[N,L]=S.useState();return He(()=>{_&&L(window.getComputedStyle(_).zIndex)},[_]),d.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:oe?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:N,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(EE,{scope:r,placedSide:fe,onArrowChange:g,arrowX:K,arrowY:D,shouldHideArrow:x,children:d.jsx(Ee.div,{"data-side":fe,"data-align":H,...y,ref:b,style:{...y.style,animation:oe?void 0:"none"}})})})});np.displayName=ni;var op="PopperArrow",xE={top:"bottom",right:"left",bottom:"top",left:"right"},sp=S.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=kE(op,n),a=xE[s.placedSide];return d.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:d.jsx($E,{...o,ref:r,style:{...o.style,display:"block"}})})});sp.displayName=op;function CE(e){return e!==null}var PE=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[l,u]=ap(r),p={start:"0%",center:"50%",end:"100%"}[u],h=(o.arrow?.x??0)+i/2,v=(o.arrow?.y??0)+c/2;let w="",y="";return l==="bottom"?(w=a?p:`${h}px`,y=`${-c}px`):l==="top"?(w=a?p:`${h}px`,y=`${n.floating.height+c}px`):l==="right"?(w=`${-c}px`,y=a?p:`${v}px`):l==="left"&&(w=`${n.floating.width+c}px`,y=a?p:`${v}px`),{data:{x:w,y}}}});function ap(e){const[t,r="center"]=e.split("-");return[t,r]}var ip=ep,cp=rp,lp=np,up=sp;function NE(e){const t=AE(e),r=S.forwardRef((n,o)=>{const{children:s,...a}=n,i=S.Children.toArray(s),c=i.find(IE);if(c){const l=c.props.children,u=i.map(p=>p===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function AE(e){const t=S.forwardRef((r,n)=>{const{children:o,...s}=r;if(S.isValidElement(o)){const a=DE(o),i=OE(s,o.props);return o.type!==S.Fragment&&(i.ref=n?Nr(n,a):a),S.cloneElement(o,i)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var TE=Symbol("radix.slottable");function IE(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===TE}function OE(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function DE(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function oi(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var dp=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ME="VisuallyHidden",fp=S.forwardRef((e,t)=>d.jsx(Ee.span,{...e,ref:t,style:{...dp,...e.style}}));fp.displayName=ME;var zE=fp,jE=[" ","Enter","ArrowUp","ArrowDown"],FE=[" ","Enter"],lr="Select",[ps,hs,VE]=Pf(lr),[Vr]=yt(lr,[VE,fs]),ms=fs(),[LE,Gt]=Vr(lr),[RE,qE]=Vr(lr),pp=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:s,value:a,defaultValue:i,onValueChange:c,dir:l,name:u,autoComplete:p,disabled:h,required:v,form:w}=e,y=ms(t),[m,_]=S.useState(null),[f,b]=S.useState(null),[$,g]=S.useState(!1),E=Ua(l),[k,C]=ar({prop:n,defaultProp:o??!1,onChange:s,caller:lr}),[O,V]=ar({prop:a,defaultProp:i,onChange:c,caller:lr}),z=S.useRef(null),j=m?w||!!m.closest("form"):!0,[R,Z]=S.useState(new Set),ne=Array.from(R).map(G=>G.props.value).join(";");return d.jsx(ip,{...y,children:d.jsxs(LE,{required:v,scope:t,trigger:m,onTriggerChange:_,valueNode:f,onValueNodeChange:b,valueNodeHasChildren:$,onValueNodeHasChildrenChange:g,contentId:Ut(),value:O,onValueChange:V,open:k,onOpenChange:C,dir:E,triggerPointerDownPosRef:z,disabled:h,children:[d.jsx(ps.Provider,{scope:t,children:d.jsx(RE,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(G=>{Z(oe=>new Set(oe).add(G))},[]),onNativeOptionRemove:S.useCallback(G=>{Z(oe=>{const F=new Set(oe);return F.delete(G),F})},[]),children:r})}),j?d.jsxs(Mp,{"aria-hidden":!0,required:v,tabIndex:-1,name:u,autoComplete:p,value:O,onChange:G=>V(G.target.value),disabled:h,form:w,children:[O===void 0?d.jsx("option",{value:""}):null,Array.from(R)]},ne):null]})})};pp.displayName=lr;var hp="SelectTrigger",mp=S.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,s=ms(r),a=Gt(hp,r),i=a.disabled||n,c=Ae(t,a.onTriggerChange),l=hs(r),u=S.useRef("touch"),[p,h,v]=jp(y=>{const m=l().filter(b=>!b.disabled),_=m.find(b=>b.value===a.value),f=Fp(m,y,_);f!==void 0&&a.onValueChange(f.value)}),w=y=>{i||(a.onOpenChange(!0),v()),y&&(a.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return d.jsx(cp,{asChild:!0,...s,children:d.jsx(Ee.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":zp(a.value)?"":void 0,...o,ref:c,onClick:me(o.onClick,y=>{y.currentTarget.focus(),u.current!=="mouse"&&w(y)}),onPointerDown:me(o.onPointerDown,y=>{u.current=y.pointerType;const m=y.target;m.hasPointerCapture(y.pointerId)&&m.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(w(y),y.preventDefault())}),onKeyDown:me(o.onKeyDown,y=>{const m=p.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&h(y.key),!(m&&y.key===" ")&&jE.includes(y.key)&&(w(),y.preventDefault())})})})});mp.displayName=hp;var gp="SelectValue",vp=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:s,placeholder:a="",...i}=e,c=Gt(gp,r),{onValueNodeHasChildrenChange:l}=c,u=s!==void 0,p=Ae(t,c.onValueNodeChange);return He(()=>{l(u)},[l,u]),d.jsx(Ee.span,{...i,ref:p,style:{pointerEvents:"none"},children:zp(c.value)?d.jsx(d.Fragment,{children:a}):s})});vp.displayName=gp;var UE="SelectIcon",yp=S.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return d.jsx(Ee.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});yp.displayName=UE;var ZE="SelectPortal",bp=e=>d.jsx(Bo,{asChild:!0,...e});bp.displayName=ZE;var ur="SelectContent",_p=S.forwardRef((e,t)=>{const r=Gt(ur,e.__scopeSelect),[n,o]=S.useState();if(He(()=>{o(new DocumentFragment)},[]),!r.open){const s=n;return s?fn.createPortal(d.jsx(wp,{scope:e.__scopeSelect,children:d.jsx(ps.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),s):null}return d.jsx($p,{...e,ref:t})});_p.displayName=ur;var vt=10,[wp,Jt]=Vr(ur),BE="SelectContentImpl",WE=NE("SelectContent.RemoveScroll"),$p=S.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:p,collisionBoundary:h,collisionPadding:v,sticky:w,hideWhenDetached:y,avoidCollisions:m,..._}=e,f=Gt(ur,r),[b,$]=S.useState(null),[g,E]=S.useState(null),k=Ae(t,q=>$(q)),[C,O]=S.useState(null),[V,z]=S.useState(null),j=hs(r),[R,Z]=S.useState(!1),ne=S.useRef(!1);S.useEffect(()=>{if(b)return Ud(b)},[b]),Pd();const G=S.useCallback(q=>{const[Q,...ue]=j().map(T=>T.ref.current),[se]=ue.slice(-1),A=document.activeElement;for(const T of q)if(T===A||(T?.scrollIntoView({block:"nearest"}),T===Q&&g&&(g.scrollTop=0),T===se&&g&&(g.scrollTop=g.scrollHeight),T?.focus(),document.activeElement!==A))return},[j,g]),oe=S.useCallback(()=>G([C,b]),[G,C,b]);S.useEffect(()=>{R&&oe()},[R,oe]);const{onOpenChange:F,triggerPointerDownPosRef:fe}=f;S.useEffect(()=>{if(b){let q={x:0,y:0};const Q=se=>{q={x:Math.abs(Math.round(se.pageX)-(fe.current?.x??0)),y:Math.abs(Math.round(se.pageY)-(fe.current?.y??0))}},ue=se=>{q.x<=10&&q.y<=10?se.preventDefault():b.contains(se.target)||F(!1),document.removeEventListener("pointermove",Q),fe.current=null};return fe.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",ue,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",ue,{capture:!0})}}},[b,F,fe]),S.useEffect(()=>{const q=()=>F(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[F]);const[H,I]=jp(q=>{const Q=j().filter(A=>!A.disabled),ue=Q.find(A=>A.ref.current===document.activeElement),se=Fp(Q,q,ue);se&&setTimeout(()=>se.ref.current.focus())}),K=S.useCallback((q,Q,ue)=>{const se=!ne.current&&!ue;(f.value!==void 0&&f.value===Q||se)&&(O(q),se&&(ne.current=!0))},[f.value]),D=S.useCallback(()=>b?.focus(),[b]),x=S.useCallback((q,Q,ue)=>{const se=!ne.current&&!ue;(f.value!==void 0&&f.value===Q||se)&&z(q)},[f.value]),N=n==="popper"?si:Sp,L=N===si?{side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:p,collisionBoundary:h,collisionPadding:v,sticky:w,hideWhenDetached:y,avoidCollisions:m}:{};return d.jsx(wp,{scope:r,content:b,viewport:g,onViewportChange:E,itemRefCallback:K,selectedItem:C,onItemLeave:D,itemTextRefCallback:x,focusSelectedItem:oe,selectedItemText:V,position:n,isPositioned:R,searchRef:H,children:d.jsx(ja,{as:WE,allowPinchZoom:!0,children:d.jsx(Ta,{asChild:!0,trapped:f.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:me(o,q=>{f.trigger?.focus({preventScroll:!0}),q.preventDefault()}),children:d.jsx(Zo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>f.onOpenChange(!1),children:d.jsx(N,{role:"listbox",id:f.contentId,"data-state":f.open?"open":"closed",dir:f.dir,onContextMenu:q=>q.preventDefault(),..._,...L,onPlaced:()=>Z(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:me(_.onKeyDown,q=>{const Q=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!Q&&q.key.length===1&&I(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let se=j().filter(A=>!A.disabled).map(A=>A.ref.current);if(["ArrowUp","End"].includes(q.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const A=q.target,T=se.indexOf(A);se=se.slice(T+1)}setTimeout(()=>G(se)),q.preventDefault()}})})})})})})});$p.displayName=BE;var HE="SelectItemAlignedPosition",Sp=S.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,s=Gt(ur,r),a=Jt(ur,r),[i,c]=S.useState(null),[l,u]=S.useState(null),p=Ae(t,k=>u(k)),h=hs(r),v=S.useRef(!1),w=S.useRef(!0),{viewport:y,selectedItem:m,selectedItemText:_,focusSelectedItem:f}=a,b=S.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&l&&y&&m&&_){const k=s.trigger.getBoundingClientRect(),C=l.getBoundingClientRect(),O=s.valueNode.getBoundingClientRect(),V=_.getBoundingClientRect();if(s.dir!=="rtl"){const A=V.left-C.left,T=O.left-A,W=k.left-T,Y=k.width+W,ce=Math.max(Y,C.width),he=window.innerWidth-vt,Ve=xf(T,[vt,Math.max(vt,he-ce)]);i.style.minWidth=Y+"px",i.style.left=Ve+"px"}else{const A=C.right-V.right,T=window.innerWidth-O.right-A,W=window.innerWidth-k.right-T,Y=k.width+W,ce=Math.max(Y,C.width),he=window.innerWidth-vt,Ve=xf(T,[vt,Math.max(vt,he-ce)]);i.style.minWidth=Y+"px",i.style.right=Ve+"px"}const z=h(),j=window.innerHeight-vt*2,R=y.scrollHeight,Z=window.getComputedStyle(l),ne=parseInt(Z.borderTopWidth,10),G=parseInt(Z.paddingTop,10),oe=parseInt(Z.borderBottomWidth,10),F=parseInt(Z.paddingBottom,10),fe=ne+G+R+F+oe,H=Math.min(m.offsetHeight*5,fe),I=window.getComputedStyle(y),K=parseInt(I.paddingTop,10),D=parseInt(I.paddingBottom,10),x=k.top+k.height/2-vt,N=j-x,L=m.offsetHeight/2,q=m.offsetTop+L,Q=ne+G+q,ue=fe-Q;if(Q<=x){const A=z.length>0&&m===z[z.length-1].ref.current;i.style.bottom="0px";const T=l.clientHeight-y.offsetTop-y.offsetHeight,W=Math.max(N,L+(A?D:0)+T+oe),Y=Q+W;i.style.height=Y+"px"}else{const A=z.length>0&&m===z[0].ref.current;i.style.top="0px";const W=Math.max(x,ne+y.offsetTop+(A?K:0)+L)+ue;i.style.height=W+"px",y.scrollTop=Q-x+y.offsetTop}i.style.margin=`${vt}px 0`,i.style.minHeight=H+"px",i.style.maxHeight=j+"px",n?.(),requestAnimationFrame(()=>v.current=!0)}},[h,s.trigger,s.valueNode,i,l,y,m,_,s.dir,n]);He(()=>b(),[b]);const[$,g]=S.useState();He(()=>{l&&g(window.getComputedStyle(l).zIndex)},[l]);const E=S.useCallback(k=>{k&&w.current===!0&&(b(),f?.(),w.current=!1)},[b,f]);return d.jsx(GE,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:v,onScrollButtonChange:E,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:$},children:d.jsx(Ee.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Sp.displayName=HE;var KE="SelectPopperPosition",si=S.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=vt,...s}=e,a=ms(r);return d.jsx(lp,{...a,...s,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});si.displayName=KE;var[GE,ai]=Vr(ur,{}),ii="SelectViewport",Ep=S.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,s=Jt(ii,r),a=ai(ii,r),i=Ae(t,s.onViewportChange),c=S.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),d.jsx(ps.Slot,{scope:r,children:d.jsx(Ee.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:me(o.onScroll,l=>{const u=l.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:h}=a;if(h?.current&&p){const v=Math.abs(c.current-u.scrollTop);if(v>0){const w=window.innerHeight-vt*2,y=parseFloat(p.style.minHeight),m=parseFloat(p.style.height),_=Math.max(y,m);if(_<w){const f=_+v,b=Math.min(w,f),$=f-b;p.style.height=b+"px",p.style.bottom==="0px"&&(u.scrollTop=$>0?$:0,p.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});Ep.displayName=ii;var kp="SelectGroup",[JE,YE]=Vr(kp),XE=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Ut();return d.jsx(JE,{scope:r,id:o,children:d.jsx(Ee.div,{role:"group","aria-labelledby":o,...n,ref:t})})});XE.displayName=kp;var xp="SelectLabel",QE=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=YE(xp,r);return d.jsx(Ee.div,{id:o.id,...n,ref:t})});QE.displayName=xp;var gs="SelectItem",[ek,Cp]=Vr(gs),Pp=S.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:s,...a}=e,i=Gt(gs,r),c=Jt(gs,r),l=i.value===n,[u,p]=S.useState(s??""),[h,v]=S.useState(!1),w=Ae(t,f=>c.itemRefCallback?.(f,n,o)),y=Ut(),m=S.useRef("touch"),_=()=>{o||(i.onValueChange(n),i.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(ek,{scope:r,value:n,disabled:o,textId:y,isSelected:l,onItemTextChange:S.useCallback(f=>{p(b=>b||(f?.textContent??"").trim())},[]),children:d.jsx(ps.ItemSlot,{scope:r,value:n,disabled:o,textValue:u,children:d.jsx(Ee.div,{role:"option","aria-labelledby":y,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:w,onFocus:me(a.onFocus,()=>v(!0)),onBlur:me(a.onBlur,()=>v(!1)),onClick:me(a.onClick,()=>{m.current!=="mouse"&&_()}),onPointerUp:me(a.onPointerUp,()=>{m.current==="mouse"&&_()}),onPointerDown:me(a.onPointerDown,f=>{m.current=f.pointerType}),onPointerMove:me(a.onPointerMove,f=>{m.current=f.pointerType,o?c.onItemLeave?.():m.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:me(a.onPointerLeave,f=>{f.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:me(a.onKeyDown,f=>{c.searchRef?.current!==""&&f.key===" "||(FE.includes(f.key)&&_(),f.key===" "&&f.preventDefault())})})})})});Pp.displayName=gs;var an="SelectItemText",Np=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...s}=e,a=Gt(an,r),i=Jt(an,r),c=Cp(an,r),l=qE(an,r),[u,p]=S.useState(null),h=Ae(t,_=>p(_),c.onItemTextChange,_=>i.itemTextRefCallback?.(_,c.value,c.disabled)),v=u?.textContent,w=S.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:m}=l;return He(()=>(y(w),()=>m(w)),[y,m,w]),d.jsxs(d.Fragment,{children:[d.jsx(Ee.span,{id:c.textId,...s,ref:h}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?fn.createPortal(s.children,a.valueNode):null]})});Np.displayName=an;var Ap="SelectItemIndicator",Tp=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return Cp(Ap,r).isSelected?d.jsx(Ee.span,{"aria-hidden":!0,...n,ref:t}):null});Tp.displayName=Ap;var ci="SelectScrollUpButton",Ip=S.forwardRef((e,t)=>{const r=Jt(ci,e.__scopeSelect),n=ai(ci,e.__scopeSelect),[o,s]=S.useState(!1),a=Ae(t,n.onScrollButtonChange);return He(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollTop>0;s(l)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),o?d.jsx(Dp,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});Ip.displayName=ci;var li="SelectScrollDownButton",Op=S.forwardRef((e,t)=>{const r=Jt(li,e.__scopeSelect),n=ai(li,e.__scopeSelect),[o,s]=S.useState(!1),a=Ae(t,n.onScrollButtonChange);return He(()=>{if(r.viewport&&r.isPositioned){let i=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;s(u)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),o?d.jsx(Dp,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});Op.displayName=li;var Dp=S.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,s=Jt("SelectScrollButton",r),a=S.useRef(null),i=hs(r),c=S.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),He(()=>{i().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),d.jsx(Ee.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:me(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:me(o.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:me(o.onPointerLeave,()=>{c()})})}),tk="SelectSeparator",rk=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return d.jsx(Ee.div,{"aria-hidden":!0,...n,ref:t})});rk.displayName=tk;var ui="SelectArrow",nk=S.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=ms(r),s=Gt(ui,r),a=Jt(ui,r);return s.open&&a.position==="popper"?d.jsx(up,{...o,...n,ref:t}):null});nk.displayName=ui;var ok="SelectBubbleInput",Mp=S.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=S.useRef(null),s=Ae(n,o),a=oi(t);return S.useEffect(()=>{const i=o.current;if(!i)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&u){const p=new Event("change",{bubbles:!0});u.call(i,t),i.dispatchEvent(p)}},[a,t]),d.jsx(Ee.select,{...r,style:{...dp,...r.style},ref:s,defaultValue:t})});Mp.displayName=ok;function zp(e){return e===""||e===void 0}function jp(e){const t=Zt(e),r=S.useRef(""),n=S.useRef(0),o=S.useCallback(a=>{const i=r.current+a;t(i),(function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))})(i)},[t]),s=S.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,s]}function Fp(e,t,r){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let a=sk(e,Math.max(s,0));o.length===1&&(a=a.filter(l=>l!==r));const c=a.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function sk(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var ak=pp,ik=mp,ck=vp,lk=yp,uk=bp,dk=_p,fk=Ep,pk=Pp,hk=Np,mk=Tp,gk=Ip,vk=Op;function Lr({...e}){return d.jsx(ak,{"data-slot":"select",...e})}function Rr({...e}){return d.jsx(ck,{"data-slot":"select-value",...e})}function qr({className:e,size:t="default",children:r,...n}){return d.jsxs(ik,{"data-slot":"select-trigger","data-size":t,className:ge("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,d.jsx(lk,{asChild:!0,children:d.jsx(hd,{className:"size-4 opacity-50"})})]})}function Ur({className:e,children:t,position:r="popper",...n}){return d.jsx(uk,{children:d.jsxs(dk,{"data-slot":"select-content",className:ge("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[d.jsx(yk,{}),d.jsx(fk,{className:ge("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(bk,{})]})})}function Et({className:e,children:t,...r}){return d.jsxs(pk,{"data-slot":"select-item",className:ge("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(mk,{children:d.jsx(pd,{className:"size-4"})})}),d.jsx(hk,{children:t})]})}function yk({className:e,...t}){return d.jsx(gk,{"data-slot":"select-scroll-up-button",className:ge("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(q0,{className:"size-4"})})}function bk({className:e,...t}){return d.jsx(vk,{"data-slot":"select-scroll-down-button",className:ge("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(hd,{className:"size-4"})})}var _k=Symbol("radix.slottable");function wk(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=_k,t}var[vs]=yt("Tooltip",[fs]),ys=fs(),Vp="TooltipProvider",$k=700,di="tooltip.open",[Sk,fi]=vs(Vp),Lp=e=>{const{__scopeTooltip:t,delayDuration:r=$k,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:s}=e,a=S.useRef(!0),i=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),d.jsx(Sk,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:S.useCallback(l=>{i.current=l},[]),disableHoverableContent:o,children:s})};Lp.displayName=Vp;var cn="Tooltip",[Ek,ln]=vs(cn),Rp=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,c=fi(cn,e.__scopeTooltip),l=ys(t),[u,p]=S.useState(null),h=Ut(),v=S.useRef(0),w=a??c.disableHoverableContent,y=i??c.delayDuration,m=S.useRef(!1),[_,f]=ar({prop:n,defaultProp:o??!1,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(di))):c.onClose(),s?.(k)},caller:cn}),b=S.useMemo(()=>_?m.current?"delayed-open":"instant-open":"closed",[_]),$=S.useCallback(()=>{window.clearTimeout(v.current),v.current=0,m.current=!1,f(!0)},[f]),g=S.useCallback(()=>{window.clearTimeout(v.current),v.current=0,f(!1)},[f]),E=S.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{m.current=!0,f(!0),v.current=0},y)},[y,f]);return S.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),d.jsx(ip,{...l,children:d.jsx(Ek,{scope:t,contentId:h,open:_,stateAttribute:b,trigger:u,onTriggerChange:p,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?E():$()},[c.isOpenDelayedRef,E,$]),onTriggerLeave:S.useCallback(()=>{w?g():(window.clearTimeout(v.current),v.current=0)},[g,w]),onOpen:$,onClose:g,disableHoverableContent:w,children:r})})};Rp.displayName=cn;var pi="TooltipTrigger",qp=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=ln(pi,r),s=fi(pi,r),a=ys(r),i=S.useRef(null),c=Ae(t,i,o.onTriggerChange),l=S.useRef(!1),u=S.useRef(!1),p=S.useCallback(()=>l.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),d.jsx(cp,{asChild:!0,...a,children:d.jsx(Ee.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:me(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:me(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:me(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:me(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:me(e.onBlur,o.onClose),onClick:me(e.onClick,o.onClose)})})});qp.displayName=pi;var hi="TooltipPortal",[kk,xk]=vs(hi,{forceMount:void 0}),Up=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,s=ln(hi,t);return d.jsx(kk,{scope:t,forceMount:r,children:d.jsx(Wt,{present:r||s.open,children:d.jsx(Bo,{asChild:!0,container:o,children:n})})})};Up.displayName=hi;var Zr="TooltipContent",Zp=S.forwardRef((e,t)=>{const r=xk(Zr,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=e,a=ln(Zr,e.__scopeTooltip);return d.jsx(Wt,{present:n||a.open,children:a.disableHoverableContent?d.jsx(Bp,{side:o,...s,ref:t}):d.jsx(Ck,{side:o,...s,ref:t})})}),Ck=S.forwardRef((e,t)=>{const r=ln(Zr,e.__scopeTooltip),n=fi(Zr,e.__scopeTooltip),o=S.useRef(null),s=Ae(t,o),[a,i]=S.useState(null),{trigger:c,onClose:l}=r,u=o.current,{onPointerInTransitChange:p}=n,h=S.useCallback(()=>{i(null),p(!1)},[p]),v=S.useCallback((w,y)=>{const m=w.currentTarget,_={x:w.clientX,y:w.clientY},f=Tk(_,m.getBoundingClientRect()),b=Ik(_,f),$=Ok(y.getBoundingClientRect()),g=Mk([...b,...$]);i(g),p(!0)},[p]);return S.useEffect(()=>()=>h(),[h]),S.useEffect(()=>{if(c&&u){const w=m=>v(m,u),y=m=>v(m,c);return c.addEventListener("pointerleave",w),u.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",y)}}},[c,u,v,h]),S.useEffect(()=>{if(a){const w=y=>{const m=y.target,_={x:y.clientX,y:y.clientY},f=c?.contains(m)||u?.contains(m),b=!Dk(_,a);f?h():b&&(h(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,u,a,l,h]),d.jsx(Bp,{...e,ref:s})}),[Pk,Nk]=vs(cn,{isInside:!1}),Ak=wk("TooltipContent"),Bp=S.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,c=ln(Zr,r),l=ys(r),{onClose:u}=c;return S.useEffect(()=>(document.addEventListener(di,u),()=>document.removeEventListener(di,u)),[u]),S.useEffect(()=>{if(c.trigger){const p=h=>{h.target?.contains(c.trigger)&&u()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,u]),d.jsx(Zo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:u,children:d.jsxs(lp,{"data-state":c.stateAttribute,...l,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(Ak,{children:n}),d.jsx(Pk,{scope:r,isInside:!0,children:d.jsx(zE,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Zp.displayName=Zr;var Wp="TooltipArrow",Hp=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=ys(r);return Nk(Wp,r).isInside?null:d.jsx(up,{...o,...n,ref:t})});Hp.displayName=Wp;function Tk(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Ik(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Ok(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Dk(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],l=i.x,u=i.y,p=c.x,h=c.y;u>n!=h>n&&r<(p-l)*(n-u)/(h-u)+l&&(o=!o)}return o}function Mk(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),zk(t)}function zk(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var jk=Lp,Fk=Rp,Vk=qp,Lk=Up,Rk=Zp,qk=Hp;function Uk({delayDuration:e=0,...t}){return d.jsx(jk,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Kp({...e}){return d.jsx(Uk,{children:d.jsx(Fk,{"data-slot":"tooltip",...e})})}function Gp({...e}){return d.jsx(Vk,{"data-slot":"tooltip-trigger",...e})}function Jp({className:e,sideOffset:t=0,children:r,...n}){return d.jsx(Lk,{children:d.jsxs(Rk,{"data-slot":"tooltip-content",sideOffset:t,className:ge("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...n,children:[r,d.jsx(qk,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const Zk=({theme:e,readOnly:t,control:r,fieldPath:n,isSimpleType:o,isRootLevel:s,onRemove:a,onOpenSettings:i,onTypeChange:c})=>{const l=Kr({control:r,name:`${n}.key`});return d.jsxs("div",{className:"p-2 flex gap-2","data-testid":"field",children:[o&&d.jsx(Mt,{control:r,name:`${n}.key`,render:({field:u})=>d.jsx(Ce,{placeholder:"field_name",disabled:t,className:"w-40",...u})}),d.jsx(Mt,{control:r,name:`${n}.schema.type`,render:({field:u})=>d.jsxs(Lr,{disabled:t,onValueChange:p=>{u.onChange(p),c(p)},value:u.value,children:[d.jsx(qr,{className:"w-40",children:d.jsx(Rr,{})}),d.jsx(Ur,{className:`${e} max-h-52 bg-background text-foreground border-input`,children:Qh.map(p=>d.jsx(Et,{value:p,children:p},p))})]})}),d.jsx(Mt,{control:r,name:`${n}.schema.title`,render:({field:u})=>d.jsx(Ce,{placeholder:"Title",disabled:t,className:"flex-1",...u})}),d.jsx(Mt,{control:r,name:`${n}.schema.description`,render:({field:u})=>d.jsx(Ce,{placeholder:"Description",disabled:t,className:"flex-1",...u})}),o&&d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Mt,{control:r,name:`${n}.isRequired`,render:({field:u})=>d.jsxs(Kp,{children:[d.jsx(Gp,{asChild:!0,children:d.jsx(qt,{type:"button","data-testid":"required",disabled:t,size:"icon",variant:u.value?"default":"outline",onClick:()=>{u.onChange(!u.value)},children:d.jsx(vd,{})})}),d.jsx(Jp,{children:d.jsx("p",{children:"Required"})})]})}),d.jsx("div",{className:"border-l-2 border-input"})]}),d.jsx(qt,{type:"button",size:"icon",variant:"ghost",onClick:()=>i(`${n}.schema`),children:d.jsx(gd,{className:"text-blue-500"})}),s&&d.jsxs(K$,{children:[d.jsx(G$,{asChild:!0,children:d.jsx(qt,{type:"button",size:"icon",variant:"ghost","data-testid":"delete-button",disabled:t,children:d.jsx(Z0,{className:"text-red-500"})})}),d.jsxs(X$,{className:ge("border-input",e),children:[d.jsxs(Q$,{children:[d.jsx(tS,{className:"text-foreground",children:"Are you absolutely sure?"}),d.jsxs(rS,{children:["This action cannot be undone. This will permanently delete field"," ",l,"."]})]}),d.jsxs(eS,{children:[d.jsx(oS,{className:"text-foreground",children:"Cancel"}),d.jsx(nS,{onClick:a,children:"Delete"})]})]})]})]})},bs=({theme:e,readOnly:t,fieldPath:r,onRemove:n,onOpenSettings:o,isSimpleType:s=!0,isRootLevel:a=!1})=>{const{control:i,setValue:c}=Be(),l=Kr({control:i,name:`${r}.schema.type`}),{fields:u,append:p,remove:h}=Wi({control:i,name:`${r}.schema.properties`}),v=()=>{const y=Wr(6);p({id:y,key:`field_${y}`,isRequired:!1,schema:{type:"string"}})},w=y=>{let m={};y==="object"?m={type:"object",properties:[],additionalProperties:!0}:y==="array"?m={type:"array"}:m={type:y},c(`${r}.schema`,m)};return d.jsxs("div",{children:[d.jsx(Zk,{theme:e,readOnly:t,control:i,fieldPath:r,isSimpleType:s,isRootLevel:a,onRemove:n,onOpenSettings:o,onTypeChange:w}),l==="object"&&d.jsxs("div",{className:"ml-2 pl-2 border-l-2 border-input",children:[u.map((y,m)=>d.jsx(bs,{readOnly:t,theme:e,fieldPath:`${r}.schema.properties.${m}`,onRemove:()=>h(m),onOpenSettings:o,isRootLevel:!0},y.id)),d.jsxs(qt,{type:"button",disabled:t,size:"sm",variant:"outline",onClick:v,className:"ml-2 mt-2 mb-4 flex gap-2 text-green-500",children:[d.jsx(md,{})," Add Field"]})]}),l==="array"&&d.jsx("div",{className:"ml-2 pl-2 border-l-2 border-input mr-11","data-testid":"field-array",children:d.jsx(bs,{theme:e,readOnly:t,fieldPath:`${r}.schema.items`,onRemove:()=>{},onOpenSettings:o,isSimpleType:!1})})]},`${r}-${l}`)};function Bk({theme:e,readOnly:t,fields:r,onRemove:n,onOpenSettings:o}){return d.jsx("div",{className:"pl-2 border-l-2 border-input",children:r.map((s,a)=>d.jsx(bs,{readOnly:t,theme:e,fieldPath:`properties.${a}`,onRemove:()=>n(a),onOpenSettings:o,isRootLevel:!0},s.fieldId))})}const Wk=({theme:e,readOnly:t,rootType:r,onAddField:n,onOpenSettings:o})=>{const{control:s}=Be();return d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Ce,{value:"root",disabled:!0,className:"w-40"}),d.jsxs(Lr,{disabled:!0,value:r,children:[d.jsx(qr,{className:"w-40",children:d.jsx(Rr,{})}),d.jsx(Ur,{className:`${e} max-h-52 bg-background text-foreground border-input`,children:d.jsx(Et,{value:r,children:r})})]}),d.jsx(Mt,{control:s,name:"root.title",render:({field:a})=>d.jsx(Ce,{placeholder:"Title",disabled:t,className:"flex-1",...a})}),d.jsx(Mt,{control:s,name:"root.description",render:({field:a})=>d.jsx(Ce,{placeholder:"Description",disabled:t,className:"flex-1",...a})}),d.jsxs(Kp,{children:[d.jsx(Gp,{asChild:!0,children:d.jsx(qt,{type:"button",disabled:!0,size:"icon",children:d.jsx(vd,{})})}),d.jsx(Jp,{children:d.jsx("p",{children:"Required"})})]}),d.jsx("div",{className:"border-l-2 border-input"}),d.jsx(qt,{type:"button",size:"icon",variant:"ghost","data-testid":"root-settings-button",onClick:()=>o("root"),children:d.jsx(gd,{className:"text-blue-500"})}),r==="object"&&d.jsx(qt,{type:"button",size:"icon",variant:"ghost","data-testid":"root-add-button",disabled:t,onClick:n,children:d.jsx(md,{className:"text-green-500"})}),d.jsx("div",{})]})};function Hk({...e}){return d.jsx(cf,{"data-slot":"dialog",...e})}function Kk({...e}){return d.jsx(lf,{"data-slot":"dialog-portal",...e})}function Gk({className:e,...t}){return d.jsx(uf,{"data-slot":"dialog-overlay",className:ge("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Jk({className:e,children:t,showCloseButton:r=!0,...n}){return d.jsxs(Kk,{"data-slot":"dialog-portal",children:[d.jsx(Gk,{}),d.jsxs(df,{"data-slot":"dialog-content",className:ge("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,r&&d.jsxs(qa,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[d.jsx(yd,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Yk({className:e,...t}){return d.jsx("div",{"data-slot":"dialog-header",className:ge("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Xk({className:e,...t}){return d.jsx(ff,{"data-slot":"dialog-title",className:ge("text-lg leading-none font-semibold",e),...t})}var _s="Checkbox",[Qk]=yt(_s),[ex,mi]=Qk(_s);function tx(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:s,form:a,name:i,onCheckedChange:c,required:l,value:u="on",internal_do_not_use_render:p}=e,[h,v]=ar({prop:r,defaultProp:o??!1,onChange:c,caller:_s}),[w,y]=S.useState(null),[m,_]=S.useState(null),f=S.useRef(!1),b=w?!!a||!!w.closest("form"):!0,$={checked:h,disabled:s,setChecked:v,control:w,setControl:y,name:i,form:a,value:u,hasConsumerStoppedPropagationRef:f,required:l,defaultChecked:Yt(o)?!1:o,isFormControl:b,bubbleInput:m,setBubbleInput:_};return d.jsx(ex,{scope:t,...$,children:rx(p)?p($):n})}var Yp="CheckboxTrigger",Xp=S.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:s,value:a,disabled:i,checked:c,required:l,setControl:u,setChecked:p,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:w}=mi(Yp,e),y=Ae(o,u),m=S.useRef(c);return S.useEffect(()=>{const _=s?.form;if(_){const f=()=>p(m.current);return _.addEventListener("reset",f),()=>_.removeEventListener("reset",f)}},[s,p]),d.jsx(Ee.button,{type:"button",role:"checkbox","aria-checked":Yt(c)?"mixed":c,"aria-required":l,"data-state":oh(c),"data-disabled":i?"":void 0,disabled:i,value:a,...n,ref:y,onKeyDown:me(t,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:me(r,_=>{p(f=>Yt(f)?!0:!f),w&&v&&(h.current=_.isPropagationStopped(),h.current||_.stopPropagation())})})});Xp.displayName=Yp;var Qp=S.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:s,required:a,disabled:i,value:c,onCheckedChange:l,form:u,...p}=e;return d.jsx(tx,{__scopeCheckbox:r,checked:o,defaultChecked:s,disabled:i,required:a,onCheckedChange:l,name:n,form:u,value:c,internal_do_not_use_render:({isFormControl:h})=>d.jsxs(d.Fragment,{children:[d.jsx(Xp,{...p,ref:t,__scopeCheckbox:r}),h&&d.jsx(nh,{__scopeCheckbox:r})]})})});Qp.displayName=_s;var eh="CheckboxIndicator",th=S.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,s=mi(eh,r);return d.jsx(Wt,{present:n||Yt(s.checked)||s.checked===!0,children:d.jsx(Ee.span,{"data-state":oh(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});th.displayName=eh;var rh="CheckboxBubbleInput",nh=S.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:a,required:i,disabled:c,name:l,value:u,form:p,bubbleInput:h,setBubbleInput:v}=mi(rh,e),w=Ae(r,v),y=oi(s),m=ti(n);S.useEffect(()=>{const f=h;if(!f)return;const b=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(b,"checked").set,E=!o.current;if(y!==s&&g){const k=new Event("click",{bubbles:E});f.indeterminate=Yt(s),g.call(f,Yt(s)?!1:s),f.dispatchEvent(k)}},[h,y,s,o]);const _=S.useRef(Yt(s)?!1:s);return d.jsx(Ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??_.current,required:i,disabled:c,name:l,value:u,form:p,...t,tabIndex:-1,ref:w,style:{...t.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});nh.displayName=rh;function rx(e){return typeof e=="function"}function Yt(e){return e==="indeterminate"}function oh(e){return Yt(e)?"indeterminate":e?"checked":"unchecked"}function ws({className:e,...t}){return d.jsx(Qp,{"data-slot":"checkbox",className:ge("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(th,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:d.jsx(pd,{className:"size-3.5"})})})}var nx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ox=nx.reduce((e,t)=>{const r=ka(`Primitive.${t}`),n=S.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),sx="Label",sh=S.forwardRef((e,t)=>d.jsx(ox.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));sh.displayName=sx;var ax=sh;function ix({className:e,...t}){return d.jsx(ax,{"data-slot":"label",className:ge("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const ah=J.createContext({}),ke=({...e})=>d.jsx(ah.Provider,{value:{name:e.name},children:d.jsx(Mt,{...e})}),gi=()=>{const e=J.useContext(ah),t=J.useContext(ih),{getFieldState:r}=Be(),n=Ni({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...o}},ih=J.createContext({});function ve({className:e,...t}){const r=J.useId();return d.jsx(ih.Provider,{value:{id:r},children:d.jsx("div",{"data-slot":"form-item",className:ge("grid gap-2",e),...t})})}function ye({className:e,...t}){const{error:r,formItemId:n}=gi();return d.jsx(ix,{"data-slot":"form-label","data-error":!!r,className:ge("data-[error=true]:text-destructive",e),htmlFor:n,...t})}function we({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=gi();return d.jsx(xa,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function $e({className:e,...t}){const{error:r,formMessageId:n}=gi(),o=r?String(r?.message??""):t.children;return o?d.jsx("p",{"data-slot":"form-message",id:n,className:ge("text-destructive text-sm",e),...t,children:o}):null}const cx=({basePath:e,readOnly:t})=>{const{control:r}=Be();return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(ke,{control:r,name:`${e}.minItems`,render:({field:n})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Minimum Items"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:t,...n,value:n.value??"",onChange:o=>n.onChange(o.target.value===""?null:Number(o.target.value))})}),d.jsx($e,{})]})}),d.jsx(ke,{control:r,name:`${e}.maxItems`,render:({field:n})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Maximum Items"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:t,...n,value:n.value??"",onChange:o=>n.onChange(o.target.value===""?null:Number(o.target.value))})}),d.jsx($e,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(ke,{control:r,name:`${e}.minContains`,render:({field:n})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Minimum Contains"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:t,...n,value:n.value??"",onChange:o=>n.onChange(o.target.value===""?null:Number(o.target.value))})}),d.jsx($e,{})]})}),d.jsx(ke,{control:r,name:`${e}.maxContains`,render:({field:n})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Maximum Contains"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:t,...n,value:n.value??"",onChange:o=>n.onChange(o.target.value===""?null:Number(o.target.value))})}),d.jsx($e,{})]})})]}),d.jsx(ke,{control:r,name:`${e}.uniqueItems`,render:({field:n})=>d.jsxs(ve,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(we,{children:d.jsx(ws,{checked:n.value,onCheckedChange:n.onChange,disabled:t})}),d.jsx(ye,{className:"ml-2",children:"Unique Items"}),d.jsx($e,{})]})})]})},lx=({theme:e,basePath:t,readOnly:r})=>{const{control:n}=Be();return d.jsx("form",{children:d.jsx(ke,{control:n,name:`${t}.default`,render:({field:o})=>d.jsxs(ve,{className:"flex gap-2",children:[d.jsx(ye,{children:"Default Value"}),d.jsxs(Lr,{onValueChange:o.onChange,defaultValue:o.value,disabled:r,children:[d.jsx(we,{children:d.jsx(qr,{children:d.jsx(Rr,{placeholder:"False"})})}),d.jsxs(Ur,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Et,{value:"true","data-testid":"true",children:"True"}),d.jsx(Et,{value:"false",children:"False"})]})]}),d.jsx($e,{})]})})})},ux=/[\n#?=&\t,./-]+/,dx=/^[^a-zA-Z0-9]*|[^a-zA-Z0-9]*$/g,fx=J.createContext(null),un=J.forwardRef(({children:e,value:t,onValueChange:r,placeholder:n,maxItems:o,minItems:s,className:a,disabled:i=!1,dir:c,...l},u)=>{const[p,h]=J.useState(-1),[v,w]=J.useState(""),[y,m]=J.useState(i),[_,f]=J.useState(i),[b,$]=J.useState(!1),[g,E]=J.useState(""),k=s??0,C=o??1/0,O=J.useCallback(G=>{!t.includes(G)&&t.length<C&&r([...t,G])},[t]),V=J.useCallback(G=>{t.includes(G)&&t.length>k&&r(t.filter(oe=>oe!==G))},[t]),z=J.useCallback(G=>{G.preventDefault();const oe=G.clipboardData.getData("text").split(ux),F=[...t];oe.forEach(fe=>{const H=fe.replaceAll(dx,"").trim();H.length>0&&!F.includes(H)&&F.length<C&&F.push(H)}),r(F),w("")},[t]),j=J.useCallback(G=>{const oe=G.currentTarget,F=oe.value.substring(oe.selectionStart??0,oe.selectionEnd??0);E(F),$(F===v)},[v]);J.useEffect(()=>{(()=>{i==!1&&(t.length-1>=k?f(!1):f(!0),t.length+1<=C?m(!1):m(!0))})()},[t]);const R=J.useCallback(async G=>{G.stopPropagation();const oe=()=>{const I=p+1>t.length-1?-1:p+1;h(I)},F=()=>{const I=p-1<0?t.length-1:p-1;h(I)},fe=()=>{const I=p-1<=0?t.length-1===0?-1:0:p-1;h(I)},H=G.currentTarget;switch(G.key){case"ArrowLeft":c==="rtl"?t.length>0&&p!==-1&&oe():t.length>0&&H.selectionStart===0&&F();break;case"ArrowRight":c==="rtl"?t.length>0&&H.selectionStart===0&&F():t.length>0&&p!==-1&&oe();break;case"Backspace":case"Delete":t.length>0&&(p!==-1&&p<t.length?(V(t[p]),fe()):H.selectionStart===0&&(g===v||b)&&V(t[t.length-1]));break;case"Escape":{const I=p===-1?t.length-1:-1;h(I);break}case"Enter":v.trim()!==""&&(G.preventDefault(),O(v),w(""));break}},[p,t,v,V]),Z=J.useCallback(G=>{G.preventDefault(),G.stopPropagation()},[]),ne=J.useCallback(G=>{w(G.currentTarget.value)},[]);return d.jsx(fx.Provider,{value:{value:t,onValueChange:r,inputValue:v,setInputValue:w,activeIndex:p,setActiveIndex:h},children:d.jsxs("div",{...l,ref:u,dir:c,className:ge("flex items-center flex-wrap gap-1 rounded-lg bg-background overflow-hidden",{"focus-within:ring-ring":p===-1},a),children:[t.map((G,oe)=>d.jsxs(ud,{tabIndex:p!==-1?0:p,"aria-disabled":_,"data-active":p===oe,className:ge("relative px-1 rounded flex items-center gap-1 data-[active='true']:ring-2 data-[active='true']:ring-muted-foreground truncate aria-disabled:opacity-50 aria-disabled:cursor-not-allowed"),variant:"secondary",children:[d.jsx("span",{className:"text-xs",children:G}),d.jsxs("button",{type:"button","aria-label":`Remove ${G} option`,"aria-roledescription":"button to remove option",disabled:_,onMouseDown:Z,onClick:()=>V(G),className:"disabled:cursor-not-allowed",children:[d.jsxs("span",{className:"sr-only",children:["Remove ",G," option"]}),d.jsx(yd,{className:"h-4 w-4 hover:stroke-destructive"})]})]},G)),d.jsx(Ce,{tabIndex:0,"aria-label":"input tag",disabled:y,onKeyDown:R,onPaste:z,value:v,onSelect:j,onChange:p===-1?ne:void 0,placeholder:n,onClick:()=>h(-1),className:ge("border border-input h-9 min-w-fit flex-1 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0 placeholder:text-muted-foreground px-2",p!==-1&&"caret-transparent")})]})})});un.displayName="TagsInput";const px=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:o}=Be(),s=o(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(ke,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Default Value"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(ke,{control:n,name:`${t}.minimum`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Minimum Value"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(ke,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Maximum Value"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(ke,{control:n,name:`${t}.exclusiveMin`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Exclusive Minimum"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(ke,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Exclusive Maximum"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})})]}),d.jsx(ke,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Multiple Of"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(ke,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Format"}),d.jsx(we,{children:d.jsxs(Lr,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(qr,{children:d.jsx(Rr,{placeholder:"Choose data type"})}),d.jsxs(Ur,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Et,{value:"none",children:"none"}),em.map(i=>d.jsx(Et,{value:i,children:i},i))]})]})}),d.jsx($e,{})]})}),d.jsx(ke,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(ve,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(we,{children:d.jsx(ws,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange,defaultValue:0})}),d.jsx(ye,{className:"ml-2",children:"Enable Enum"}),d.jsx($e,{})]})}),s&&d.jsx(ke,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Enum Values"}),d.jsx(we,{children:d.jsx(un,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx($e,{})]})})]})},hx=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:o}=Be(),s=o(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(ke,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Default Value"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(ke,{control:n,name:`${t}.minimum`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Minimum Value"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(ke,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Maximum Value"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx(ke,{control:n,name:`${t}.exclusiveMin`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Exclusive Minimum"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(ke,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Exclusive Maximum"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})})]}),d.jsx(ke,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Multiple Of"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(ke,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Format"}),d.jsx(we,{children:d.jsxs(Lr,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(qr,{children:d.jsx(Rr,{placeholder:"Choose data type"})}),d.jsxs(Ur,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Et,{value:"none",children:"none"}),tm.map(i=>d.jsx(Et,{value:i,children:i},i))]})]})}),d.jsx($e,{})]})}),d.jsx(ke,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(ve,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(we,{children:d.jsx(ws,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(ye,{className:"ml-2",children:"Enable Enum"}),d.jsx($e,{})]})}),s&&d.jsx(ke,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Enum Values"}),d.jsx(we,{children:d.jsx(un,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx($e,{})]})})]})};var vi="rovingFocusGroup.onEntryFocus",mx={bubbles:!1,cancelable:!0},dn="RovingFocusGroup",[yi,ch,gx]=Pf(dn),[vx,lh]=yt(dn,[gx]),[yx,bx]=vx(dn),uh=S.forwardRef((e,t)=>d.jsx(yi.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(yi.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(_x,{...e,ref:t})})}));uh.displayName=dn;var _x=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...p}=e,h=S.useRef(null),v=Ae(t,h),w=Ua(s),[y,m]=ar({prop:a,defaultProp:i??null,onChange:c,caller:dn}),[_,f]=S.useState(!1),b=Zt(l),$=ch(r),g=S.useRef(!1),[E,k]=S.useState(0);return S.useEffect(()=>{const C=h.current;if(C)return C.addEventListener(vi,b),()=>C.removeEventListener(vi,b)},[b]),d.jsx(yx,{scope:r,orientation:n,dir:w,loop:o,currentTabStopId:y,onItemFocus:S.useCallback(C=>m(C),[m]),onItemShiftTab:S.useCallback(()=>f(!0),[]),onFocusableItemAdd:S.useCallback(()=>k(C=>C+1),[]),onFocusableItemRemove:S.useCallback(()=>k(C=>C-1),[]),children:d.jsx(Ee.div,{tabIndex:_||E===0?-1:0,"data-orientation":n,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:me(e.onMouseDown,()=>{g.current=!0}),onFocus:me(e.onFocus,C=>{const O=!g.current;if(C.target===C.currentTarget&&O&&!_){const V=new CustomEvent(vi,mx);if(C.currentTarget.dispatchEvent(V),!V.defaultPrevented){const z=$().filter(G=>G.focusable),j=z.find(G=>G.active),R=z.find(G=>G.id===y),ne=[j,R,...z].filter(Boolean).map(G=>G.ref.current);ph(ne,u)}}g.current=!1}),onBlur:me(e.onBlur,()=>f(!1))})})}),dh="RovingFocusGroupItem",fh=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:a,...i}=e,c=Ut(),l=s||c,u=bx(dh,r),p=u.currentTabStopId===l,h=ch(r),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:y}=u;return S.useEffect(()=>{if(n)return v(),()=>w()},[n,v,w]),d.jsx(yi.ItemSlot,{scope:r,id:l,focusable:n,active:o,children:d.jsx(Ee.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:me(e.onMouseDown,m=>{n?u.onItemFocus(l):m.preventDefault()}),onFocus:me(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:me(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){u.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const _=Sx(m,u.orientation,u.dir);if(_!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let b=h().filter($=>$.focusable).map($=>$.ref.current);if(_==="last")b.reverse();else if(_==="prev"||_==="next"){_==="prev"&&b.reverse();const $=b.indexOf(m.currentTarget);b=u.loop?Ex(b,$+1):b.slice($+1)}setTimeout(()=>ph(b))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:y!=null}):a})})});fh.displayName=dh;var wx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $x(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sx(e,t,r){const n=$x(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return wx[n]}function ph(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Ex(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var kx=uh,xx=fh,bi="Radio",[Cx,hh]=yt(bi),[Px,Nx]=Cx(bi),mh=S.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:s,disabled:a,value:i="on",onCheck:c,form:l,...u}=e,[p,h]=S.useState(null),v=Ae(t,m=>h(m)),w=S.useRef(!1),y=p?l||!!p.closest("form"):!0;return d.jsxs(Px,{scope:r,checked:o,disabled:a,children:[d.jsx(Ee.button,{type:"button",role:"radio","aria-checked":o,"data-state":bh(o),"data-disabled":a?"":void 0,disabled:a,value:i,...u,ref:v,onClick:me(e.onClick,m=>{o||c?.(),y&&(w.current=m.isPropagationStopped(),w.current||m.stopPropagation())})}),y&&d.jsx(yh,{control:p,bubbles:!w.current,name:n,value:i,checked:o,required:s,disabled:a,form:l,style:{transform:"translateX(-100%)"}})]})});mh.displayName=bi;var gh="RadioIndicator",vh=S.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,s=Nx(gh,r);return d.jsx(Wt,{present:n||s.checked,children:d.jsx(Ee.span,{"data-state":bh(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});vh.displayName=gh;var Ax="RadioBubbleInput",yh=S.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const a=S.useRef(null),i=Ae(a,s),c=oi(r),l=ti(t);return S.useEffect(()=>{const u=a.current;if(!u)return;const p=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&v){const w=new Event("click",{bubbles:n});v.call(u,r),u.dispatchEvent(w)}},[c,r,n]),d.jsx(Ee.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:i,style:{...o.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});yh.displayName=Ax;function bh(e){return e?"checked":"unchecked"}var Tx=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],$s="RadioGroup",[Ix]=yt($s,[lh,hh]),_h=lh(),wh=hh(),[Ox,Dx]=Ix($s),$h=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:s,required:a=!1,disabled:i=!1,orientation:c,dir:l,loop:u=!0,onValueChange:p,...h}=e,v=_h(r),w=Ua(l),[y,m]=ar({prop:s,defaultProp:o??null,onChange:p,caller:$s});return d.jsx(Ox,{scope:r,name:n,required:a,disabled:i,value:y,onValueChange:m,children:d.jsx(kx,{asChild:!0,...v,orientation:c,dir:w,loop:u,children:d.jsx(Ee.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":i?"":void 0,dir:w,...h,ref:t})})})});$h.displayName=$s;var Sh="RadioGroupItem",Eh=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,s=Dx(Sh,r),a=s.disabled||n,i=_h(r),c=wh(r),l=S.useRef(null),u=Ae(t,l),p=s.value===o.value,h=S.useRef(!1);return S.useEffect(()=>{const v=y=>{Tx.includes(y.key)&&(h.current=!0)},w=()=>h.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",w),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",w)}},[]),d.jsx(xx,{asChild:!0,...i,focusable:!a,active:p,children:d.jsx(mh,{disabled:a,required:s.required,checked:p,...c,...o,name:s.name,ref:u,onCheck:()=>s.onValueChange(o.value),onKeyDown:me(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:me(o.onFocus,()=>{h.current&&l.current?.click()})})})});Eh.displayName=Sh;var Mx="RadioGroupIndicator",kh=S.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=wh(r);return d.jsx(vh,{...o,...n,ref:t})});kh.displayName=Mx;var zx=$h,jx=Eh,Fx=kh;function Vx({className:e,...t}){return d.jsx(zx,{"data-slot":"radio-group",className:ge("grid gap-3",e),...t})}function _i({className:e,...t}){return d.jsx(jx,{"data-slot":"radio-group-item",className:ge("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(Fx,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(U0,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function Lx({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:ge("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const Rx=({basePath:e,readOnly:t})=>{const{control:r,setValue:n,getValues:o}=Be(),[s,a]=J.useState(JSON.stringify(o(`${e}.additionalProperties`),null,2)),[i,c]=J.useState(null);Kr({control:r,name:`${e}.isModifiable`});const l=Kr({control:r,name:`${e}.additionalProperties`});J.useEffect(()=>{c(null),a(JSON.stringify(l,null,2))},[l]);let u;typeof l=="boolean"?u=l?"true":"false":typeof l=="object"&&l!==null?u="schema":u="true";const p=h=>{const v=`${e}.additionalProperties`;if(h==="true")n(v,!0);else if(h==="false")n(v,!1);else{const w={type:"string"};n(v,w),a(JSON.stringify(w,null,2))}};return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(ke,{control:r,name:`${e}.minProperties`,render:({field:h})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Minimum Properties"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:t,value:h.value??"",onChange:v=>h.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx($e,{})]})}),d.jsx(ke,{control:r,name:`${e}.maxProperties`,render:({field:h})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Maximum Properties"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:t,value:h.value??"",onChange:v=>h.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx($e,{})]})})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(ye,{children:"Additional Properties"}),d.jsxs(Vx,{value:u,onValueChange:p,className:"flex space-x-4 pt-2",disabled:t,children:[d.jsxs(ve,{className:"flex items-center space-x-2",children:[d.jsx(_i,{value:"true",id:"ap-true"}),d.jsx(ye,{htmlFor:"ap-true",className:"font-normal",children:"Allow (true)"})]}),d.jsxs(ve,{className:"flex items-center space-x-2",children:[d.jsx(_i,{value:"false",id:"ap-false"}),d.jsx(ye,{htmlFor:"ap-false",className:"font-normal",children:"Disallow (false)"})]}),d.jsxs(ve,{className:"flex items-center space-x-2",children:[d.jsx(_i,{value:"schema",id:"ap-schema"}),d.jsx(ye,{htmlFor:"ap-schema",className:"font-normal",children:"Specify Schema"})]})]}),d.jsx($e,{})]}),u==="schema"&&d.jsxs(ve,{children:[d.jsx(we,{children:d.jsx(Lx,{"data-testid":"schema-textarea",rows:6,disabled:t,className:"font-mono",value:s,onChange:h=>{const v=h.target.value;a(v);try{const w=JSON.parse(v),y=nd(w);if(y){const m=y.map(_=>`${_.instancePath} - ${_.message}`);c(m)}else n(`${e}.additionalProperties`,w)}catch{c(["Invalid schema structure."])}}})}),i&&i.length>0&&d.jsx("div",{className:"mt-2 text-sm font-medium text-destructive",children:i.map((h,v)=>d.jsx("p",{children:h},v))})]}),d.jsx(ke,{control:r,name:`${e}."x-modifiable"`,render:({field:h})=>d.jsxs(ve,{className:"mt-2",children:[d.jsx(ye,{children:"Modifiable Properties"}),d.jsx(we,{children:d.jsx(un,{disabled:t,value:h.value||[],onValueChange:h.onChange,placeholder:"Enter your modifiable properties"})}),d.jsx($e,{})]})})]})},qx=({theme:e,basePath:t,readOnly:r})=>{const{control:n,watch:o}=Be(),s=o(`${t}.enumEnabled`);return d.jsxs("form",{className:"flex flex-col gap-4",children:[d.jsx(ke,{control:n,name:`${t}.default`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Default Value"}),d.jsx(we,{children:d.jsx(Ce,{disabled:r,...a})}),d.jsx($e,{})]})}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsx(ke,{control:n,name:`${t}.minLength`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Minimum Length"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})}),d.jsx(ke,{control:n,name:`${t}.maxLength`,render:({field:a})=>d.jsxs(ve,{className:"flex-1",children:[d.jsx(ye,{children:"Maximum Length"}),d.jsx(we,{children:d.jsx(Ce,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx($e,{})]})})]}),d.jsx(ke,{control:n,name:`${t}.pattern`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Pattern (Regular Expression)"}),d.jsx(we,{children:d.jsx(Ce,{disabled:r,...a})}),d.jsx($e,{})]})}),d.jsx(ke,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Format"}),d.jsxs(Lr,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(we,{children:d.jsx(qr,{children:d.jsx(Rr,{placeholder:"Choose data type"})})}),d.jsxs(Ur,{className:`${e} max-h-48 bg-background text-foreground border-input`,children:[d.jsx(Et,{value:"none",children:"none"}),rm.map(i=>d.jsx(Et,{value:i,children:i},i))]})]}),d.jsx($e,{})]})}),d.jsx(ke,{control:n,name:`${t}.enumEnabled`,render:({field:a})=>d.jsxs(ve,{className:"p-4 flex border border-input rounded-md",children:[d.jsx(we,{children:d.jsx(ws,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(ye,{className:"ml-2",children:"Enable Enum"}),d.jsx($e,{})]})}),s&&d.jsx(ke,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"Enum Values"}),d.jsx(we,{children:d.jsx(un,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx($e,{})]})})]})};var Ux=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zx=Ux.reduce((e,t)=>{const r=ka(`Primitive.${t}`),n=S.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Bx="Separator",xh="horizontal",Wx=["horizontal","vertical"],Ch=S.forwardRef((e,t)=>{const{decorative:r,orientation:n=xh,...o}=e,s=Hx(n)?n:xh,i=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return d.jsx(Zx.div,{"data-orientation":s,...i,...o,ref:t})});Ch.displayName=Bx;function Hx(e){return Wx.includes(e)}var Kx=Ch;function Gx({className:e,orientation:t="horizontal",decorative:r=!0,...n}){return d.jsx(Kx,{"data-slot":"separator",decorative:r,orientation:t,className:ge("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}const Jx=({basePath:e,readOnly:t})=>{const{control:r}=Be();return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(ke,{control:r,name:`${e}["$schema"]`,render:({field:n})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"$schema"}),d.jsx(we,{children:d.jsx(Ce,{placeholder:"e.g., http://json-schema.org/draft/2020-12/schema",disabled:t,...n,value:n.value??"http://json-schema.org/draft/2020-12/schema"})}),d.jsx($e,{})]})}),d.jsx(ke,{control:r,name:`${e}["$id"]`,render:({field:n})=>d.jsxs(ve,{children:[d.jsx(ye,{children:"$id"}),d.jsx(we,{children:d.jsx(Ce,{disabled:t,...n,value:n.value??""})}),d.jsx($e,{})]})})]})},Yx=({theme:e,basePath:t,readOnly:r})=>{const{watch:n}=Be(),o=n(`${t}.type`),s=()=>{switch(o){case"number":return d.jsx(hx,{theme:e,basePath:t,readOnly:r});case"integer":return d.jsx(px,{theme:e,basePath:t,readOnly:r});case"string":return d.jsx(qx,{theme:e,basePath:t,readOnly:r});case"boolean":return d.jsx(lx,{theme:e,basePath:t,readOnly:r});case"array":return d.jsx(cx,{theme:e,basePath:t,readOnly:r});case"object":return d.jsx(Rx,{theme:e,basePath:t,readOnly:r});default:return d.jsx(d.Fragment,{children:`Settings for type ${o} are not yet implemented.`})}};return d.jsxs("div",{children:[t==="root"&&d.jsxs(d.Fragment,{children:[d.jsx(Jx,{theme:e,basePath:t,readOnly:r}),d.jsx(Gx,{className:"my-4"})]}),s()]})},Xx=({theme:e,readOnly:t,className:r,isOpen:n,fieldPath:o,onClose:s})=>{const{getValues:a}=Be(),i=o?a(o):null;return d.jsx(Hk,{open:n,onOpenChange:c=>!c&&s(),children:d.jsxs(Jk,{className:ge("bg-background text-foreground border-input",e,r),children:[d.jsx(Yk,{children:d.jsxs(Xk,{className:"capitalize",children:[i?.type," Schema Settings"]})}),o&&d.jsx(Yx,{basePath:o,theme:e,readOnly:t}),d.jsx(qt,{type:"button",onClick:s,variant:"default",children:"Close"})]})})},Qx=({rootType:e="object",readOnly:t=!1,theme:r="light",styles:n,onChange:o,defaultValue:s})=>{const{methods:a,jsonSchema:i}=Cb({rootType:e,defaultValue:s}),{setError:c,clearErrors:l,watch:u}=a,p=u("properties"),[h,v]=J.useState(null);J.useEffect(()=>{o&&o(i)},[i,o]),J.useEffect(()=>{const O=nd(i);JSON.stringify(O)!==JSON.stringify(h)&&v(O)},[i,h]),J.useEffect(()=>{l(),h&&h.forEach(O=>{const V=O.instancePath.split("/").filter(Boolean);if(V[0]==="properties"&&V.length>=3){const z=p?.findIndex(j=>j.key===V[1])??-1;z!==-1&&c(`properties.${z}.schema.${V[2]}`,{type:"ajv",message:O.message})}else V.length>0&&c(`root.${V[0]}`,{type:"ajv",message:O.message})})},[h,p,c,l]),J.useEffect(()=>{if(!s){const O=Wr(6),V={root:{type:e,$schema:"http://json-schema.org/draft/2020-12/schema",...e==="object"&&{additionalProperties:!0},...e==="array"&&{items:{type:"string"}}},properties:e==="object"?[{id:O,key:`field_${O}`,isRequired:!1,schema:{type:"number"}}]:[]};a.reset(V)}},[e,a,s]);const{fields:w,append:y,remove:m}=Wi({control:a.control,name:"properties",keyName:"fieldId"}),_=()=>{const O=Wr(6);y({id:O,key:`field_${O}`,isRequired:!1,schema:{type:"string"}})},[f,b]=J.useState({isOpen:!1,fieldPath:null}),$=O=>{b({isOpen:!0,fieldPath:O})},g={...bn,...n,output:{...bn.output,...n?.output},form:{...bn.form,...n?.form},settings:{...bn.settings,...n?.settings}},E=J.useRef(null),[k,C]=J.useState("overflow-hidden");return J.useEffect(()=>{const O=E.current?.textArea;O&&(O.scrollHeight>O.clientHeight?C("overflow-y-auto"):C("overflow-hidden"))},[i]),d.jsxs(Oh,{...a,children:[d.jsx("div",{className:ge("bg-background text-foreground flex flex-col",r,Ki[g.spacing]),children:d.jsxs("div",{className:ge("bg-background text-foreground flex",r,Xh[g.output.position],Ki[g.spacing]),children:[d.jsxs("div",{className:ge("p-4 pr-2 flex flex-col gap-2 border border-input rounded-lg overflow-y-auto",Us[g.form.width],Hi[g.form.height]),children:[d.jsx(Wk,{theme:r,readOnly:t,rootType:e,onAddField:_,onOpenSettings:$}),e==="object"&&d.jsx(Bk,{theme:r,readOnly:t,fields:w,onRemove:m,onOpenSettings:$}),e==="array"&&d.jsx("div",{className:"ml-2 pl-2 border-l-2 border-input",children:d.jsx(bs,{theme:r,readOnly:t,fieldPath:"root.items",onRemove:()=>{},onOpenSettings:$,isSimpleType:!1,isRootLevel:!1})})]}),h?d.jsxs("div",{className:ge("p-6 bg-background text-foreground border border-input rounded-lg overflow-y-auto overflow-x-auto",Us[g.output.width],Hi[g.output.height]),children:[d.jsx("p",{className:"text-lg",children:"JSON Schema Errors"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:`The generated JSON Schema has ${h?.length}
78
+ ${h?.length>1?"errors.":"error."}`}),d.jsx("ul",{className:"mt-4 flex flex-col gap-2",children:h?.map((O,V)=>d.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[d.jsxs(ud,{variant:"destructive",className:"font-mono",children:["root",O.instancePath]}),d.jsx("span",{children:O.message})]},V))})]}):g.output.showJson&&d.jsx(od,{ref:E,readOnly:!0,maxHeight:Jh[g.output.height],value:JSON.stringify(i,null,2),className:ge("font-mono",Us[g.output.width],k)})]})}),d.jsx(Xx,{theme:r,readOnly:t,isOpen:f.isOpen,fieldPath:f.fieldPath,className:Yh[g.settings.width],onClose:()=>b({isOpen:!1,fieldPath:null})})]})};kt.JsonSchemaEditor=Qx,Object.defineProperty(kt,Symbol.toStringTag,{value:"Module"})}));