@ht-rnd/json-schema-editor 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json-schema-editor.css +1 -1
- package/dist/lib/main.es.js +4172 -3864
- package/dist/lib/main.umd.js +37 -37
- package/dist/types/index.d.ts +1 -0
- package/package.json +13 -3
package/dist/lib/main.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(rr,
|
|
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
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
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
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,25 +14,25 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
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,
|
|
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
19
|
`),dt=_e.stack.split(`
|
|
20
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
|
|
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
22
|
|
|
23
|
-
Check the render method of \``+P+"`."}return""}}function
|
|
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
24
|
|
|
25
|
-
Check the top-level render call using <`+ue+">.")}return X}}function
|
|
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
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Gi,Nr,Jw,Nr),Vh[Nr+Gi]=!0}}return P===n?Hw(tt):Ww(tt),tt}}function Gw(P,X,ue){return Lh(P,X,ue,!0)}function Kw(P,X,ue){return Lh(P,X,ue,!1)}var Zw=Kw,Yw=Gw;yn.Fragment=n,yn.jsx=Zw,yn.jsxs=Yw})()),yn}var Qi;function Uh(){return Qi||(Qi=1,process.env.NODE_ENV==="production"?Un.exports=zh():Un.exports=qh()),Un.exports}var d=Uh(),bn=e=>e.type==="checkbox",_r=e=>e instanceof Date,ft=e=>e==null;const ec=e=>typeof e=="object";var Qe=e=>!ft(e)&&!Array.isArray(e)&&ec(e)&&!_r(e),tc=e=>Qe(e)&&e.target?bn(e.target)?e.target.checked:e.target.value:e,Bh=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rc=(e,t)=>e.has(Bh(t)),Wh=e=>{const t=e.constructor&&e.constructor.prototype;return Qe(t)&&t.hasOwnProperty("isPrototypeOf")},Ho=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(!(Ho&&(e instanceof Blob||n))&&(r||Qe(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!Wh(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):[],Go=e=>Wn(e.replace(/["|']|\]/g,"").split(/\.|\[/)),oe=(e,t,r)=>{if(!t||!Qe(e))return r;const n=(Bn(t)?[t]:Go(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]:Go(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"},Ut={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ko=Y.createContext(null);Ko.displayName="HookFormContext";const at=()=>Y.useContext(Ko),Hh=e=>{const{children:t,...r}=e;return Y.createElement(Ko.Provider,{value:r},t)};var nc=(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"?Y.useLayoutEffect:Y.useEffect;function sc(e){const t=at(),{control:r=t.control,disabled:n,name:s,exact:o}=e||{},[a,i]=Y.useState(r._formState),c=Y.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]),Y.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),Y.useMemo(()=>nc(a,r,c.current,!1),[a,r])}var gt=e=>typeof e=="string",oc=(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),Zo=e=>ft(e)||!ec(e);function Bt(e,t,r=new WeakSet){if(Zo(e)||Zo(t))return 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)?!Bt(a,i,r):a!==i)return!1}}return!0}function Ar(e){const t=at(),{control:r=t.control,name:n,defaultValue:s,disabled:o,exact:a,compute:i}=e||{},c=Y.useRef(s),l=Y.useRef(i),u=Y.useRef(void 0);l.current=i;const p=Y.useMemo(()=>r._getWatch(n,c.current),[r,n]),[m,v]=Y.useState(l.current?l.current(p):p);return Gn(()=>r._subscribe({name:n,formState:{values:!0},exact:a,callback:x=>{if(!o){const y=oc(n,r._names,x.values||r._formValues,!1,c.current);if(l.current){const h=l.current(y);Bt(h,u.current)||(v(h),u.current=h)}else v(y)}}}),[r,o,n,a]),Y.useEffect(()=>r._removeUnmounted()),m}function Gh(e){const t=at(),{name:r,disabled:n,control:s=t.control,shouldUnregister:o,defaultValue:a}=e,i=rc(s._names.array,r),c=Y.useMemo(()=>oe(s._formValues,r,oe(s._defaultValues,r,a)),[s,r,a]),l=Ar({control:s,name:r,defaultValue:c,exact:!0}),u=sc({control:s,name:r,exact:!0}),p=Y.useRef(e),m=Y.useRef(void 0),v=Y.useRef(s.register(r,{...e.rules,value:l,...pt(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const x=Y.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=Y.useCallback(b=>v.current.onChange({target:{value:tc(b),name:r},type:Hn.CHANGE}),[r]),h=Y.useCallback(()=>v.current.onBlur({target:{value:oe(s._formValues,r),name:r},type:Hn.BLUR}),[r,s._formValues]),_=Y.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=Y.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 Y.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=($,S)=>{const j=oe(s._fields,$);j&&j._f&&(j._f.mount=S)};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]),Y.useEffect(()=>{s._setDisabledField({disabled:n,name:r})},[n,r,s]),Y.useMemo(()=>({field:f,formState:u,fieldState:x}),[f,u,x])}const nr=e=>e.render(Gh(e));var Yo=(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],ac=()=>{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 ic(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=ic(s,o);Qe(a)&&(r[n]=a)}else e[n]&&(r[n]=o)}return r}var ct=e=>Qe(e)&&!Object.keys(e).length,Jo=e=>e.type==="file",St=e=>typeof e=="function",Kn=e=>{if(!Ho)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},cc=e=>e.type==="select-multiple",Xo=e=>e.type==="radio",Kh=e=>Xo(e)||bn(e),Qo=e=>Kn(e)&&e.isConnected;function Zh(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 Yh(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]:Go(t),n=r.length===1?e:Zh(e,r),s=r.length-1,o=r[s];return n&&delete n[o],s!==0&&(Qe(n)&&ct(n)||Array.isArray(n)&&Yh(n))&&Je(e,r.slice(0,-1)),e}var Jh=e=>{for(const t in e)if(St(e[t]))return!0;return!1};function lc(e){return Array.isArray(e)||Qe(e)&&!Jh(e)}function ea(e,t={}){for(const r in e)lc(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ea(e[r],t[r])):Ze(e[r])||(t[r]=!0);return t}function Tr(e,t,r){r||(r=ea(t));for(const n in e)lc(e[n])?Ze(t)||Zo(r[n])?r[n]=ea(e[n],Array.isArray(e[n])?[]:{}):Tr(e[n],ft(t)?{}:t[n],r[n]):r[n]=!Bt(e[n],t[n]);return r}const uc={value:!1,isValid:!1},dc={value:!0,isValid:!0};var fc=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===""?dc:{value:e[0].value,isValid:!0}:dc:uc}return uc},mc=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ze(e)?e:t?e===""?NaN:e&&+e:r&>(e)?new Date(e):n?n(e):e;const hc={isValid:!1,value:null};var pc=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,hc):hc;function gc(e){const t=e.ref;return Jo(t)?t.files:Xo(t)?pc(e.refs).value:cc(t)?[...t.selectedOptions].map(({value:r})=>r):bn(t)?fc(e.refs).value:mc(Ze(t.value)?e.ref.value:t.value,e)}var Xh=(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,Or=e=>({isOnSubmit:!e||e===xt.onSubmit,isOnBlur:e===xt.onBlur,isOnChange:e===xt.onChange,isOnAll:e===xt.all,isOnTouch:e===xt.onTouched});const vc="AsyncFunction";var Qh=e=>!!e&&!!e.validate&&!!(St(e.validate)&&e.validate.constructor.name===vc||Qe(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===vc)),ep=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ta=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Ir=(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(Ir(i,t))break}else if(Qe(i)&&Ir(i,t))break}}};function yc(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 tp=(e,t,r,n)=>{r(e);const{name:s,...o}=e;return ct(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!n||xt.all))},rp=(e,t,r)=>!e||!t||e===t||mt(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),np=(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,sp=(e,t)=>!Wn(oe(e,t)).length&&Je(e,t),bc=(e,t,r)=>{const n=mt(oe(e,r));return ze(n,"root",t[r]),ze(e,r,n),e};function _c(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 Dr=e=>Qe(e)&&!Zn(e)?e:{value:e,message:""},ra=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=F=>{s&&b.reportValidity&&(b.setCustomValidity(pt(F)?"":F||""),b.reportValidity())},g={},$=Xo(a),S=bn(a),j=$||S,I=(h||Jo(a))&&Ze(a.value)&&Ze(f)||Kn(a)&&a.value===""||f===""||Array.isArray(f)&&!f.length,z=Yo.bind(null,y,n,g),M=(F,V,W,re=Ut.maxLength,Z=Ut.minLength)=>{const ae=F?V:W;g[y]={type:F?re:Z,message:ae,ref:a,...z(F?re:Z,ae)}};if(o?!Array.isArray(f)||!f.length:c&&(!j&&(I||ft(f))||pt(f)&&!f||S&&!fc(i).isValid||$&&!pc(i).isValid)){const{value:F,message:V}=gt(c)?{value:!!c,message:c}:Dr(c);if(F&&(g[y]={type:Ut.required,message:V,ref:b,...z(Ut.required,V)},!n))return w(V),g}if(!I&&(!ft(p)||!ft(m))){let F,V;const W=Dr(m),re=Dr(p);if(!ft(f)&&!isNaN(f)){const Z=a.valueAsNumber||f&&+f;ft(W.value)||(F=Z>W.value),ft(re.value)||(V=Z<re.value)}else{const Z=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&&(F=L?ae(f)>ae(W.value):ve?f>W.value:Z>new Date(W.value)),gt(re.value)&&f&&(V=L?ae(f)<ae(re.value):ve?f<re.value:Z<new Date(re.value))}if((F||V)&&(M(!!F,W.message,re.message,Ut.max,Ut.min),!n))return w(g[y].message),g}if((l||u)&&!I&&(gt(f)||o&&Array.isArray(f))){const F=Dr(l),V=Dr(u),W=!ft(F.value)&&f.length>+F.value,re=!ft(V.value)&&f.length<+V.value;if((W||re)&&(M(W,F.message,V.message),!n))return w(g[y].message),g}if(v&&!I&>(f)){const{value:F,message:V}=Dr(v);if(Zn(F)&&!f.match(F)&&(g[y]={type:Ut.pattern,message:V,ref:a,...z(Ut.pattern,V)},!n))return w(V),g}if(x){if(St(x)){const F=await x(f,r),V=_c(F,b);if(V&&(g[y]={...V,...z(Ut.validate,V.message)},!n))return w(V.message),g}else if(Qe(x)){let F={};for(const V in x){if(!ct(F)&&!n)break;const W=_c(await x[V](f,r),b,V);W&&(F={...W,...z(V,W.message)},w(W.message),n&&(g[y]=F))}if(!ct(F)&&(g[y]={ref:b,...F},!n))return g}}return w(!0),g};const op={mode:xt.onSubmit,reValidateMode:xt.onChange,shouldFocusError:!0};function ap(e={}){let t={...op,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:St(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:ac(),state:ac()},v=t.criteriaMode===xt.all,x=C=>D=>{clearTimeout(l),l=setTimeout(C,D)},y=async C=>{if(!t.disabled&&(u.isValid||p.isValid||C)){const D=t.resolver?ct((await S()).errors):await I(n,!0);D!==r.isValid&&m.state.next({isValid:D})}},h=(C,D)=>{!t.disabled&&(u.isValidating||u.validatingFields||p.isValidating||p.validatingFields)&&((C||Array.from(i.mount)).forEach(U=>{U&&(D?ze(r.validatingFields,U,D):Je(r.validatingFields,U))}),m.state.next({validatingFields:r.validatingFields,isValidating:!ct(r.validatingFields)}))},_=(C,D=[],U,ne,se=!0,ee=!0)=>{if(ne&&U&&!t.disabled){if(a.action=!0,ee&&Array.isArray(oe(n,C))){const he=U(oe(n,C),ne.argA,ne.argB);se&&ze(n,C,he)}if(ee&&Array.isArray(oe(r.errors,C))){const he=U(oe(r.errors,C),ne.argA,ne.argB);se&&ze(r.errors,C,he),sp(r.errors,C)}if((u.touchedFields||p.touchedFields)&&ee&&Array.isArray(oe(r.touchedFields,C))){const he=U(oe(r.touchedFields,C),ne.argA,ne.argB);se&&ze(r.touchedFields,C,he)}(u.dirtyFields||p.dirtyFields)&&(r.dirtyFields=Tr(s,o)),m.state.next({name:C,isDirty:M(C,D),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ze(o,C,D)},f=(C,D)=>{ze(r.errors,C,D),m.state.next({errors:r.errors})},b=C=>{r.errors=C,m.state.next({errors:r.errors,isValid:!1})},w=(C,D,U,ne)=>{const se=oe(n,C);if(se){const ee=oe(o,C,Ze(U)?oe(s,C):U);Ze(ee)||ne&&ne.defaultChecked||D?ze(o,C,D?ee:gc(se._f)):W(C,ee),a.mount&&y()}},g=(C,D,U,ne,se)=>{let ee=!1,he=!1;const Ie={name:C};if(!t.disabled){if(!U||ne){(u.isDirty||p.isDirty)&&(he=r.isDirty,r.isDirty=Ie.isDirty=M(),ee=he!==Ie.isDirty);const Ue=Bt(oe(s,C),D);he=!!oe(r.dirtyFields,C),Ue?Je(r.dirtyFields,C):ze(r.dirtyFields,C,!0),Ie.dirtyFields=r.dirtyFields,ee=ee||(u.dirtyFields||p.dirtyFields)&&he!==!Ue}if(U){const Ue=oe(r.touchedFields,C);Ue||(ze(r.touchedFields,C,U),Ie.touchedFields=r.touchedFields,ee=ee||(u.touchedFields||p.touchedFields)&&Ue!==U)}ee&&se&&m.state.next(Ie)}return ee?Ie:{}},$=(C,D,U,ne)=>{const se=oe(r.errors,C),ee=(u.isValid||p.isValid)&&pt(D)&&r.isValid!==D;if(t.delayError&&U?(c=x(()=>f(C,U)),c(t.delayError)):(clearTimeout(l),c=null,U?ze(r.errors,C,U):Je(r.errors,C)),(U?!Bt(se,U):se)||!ct(ne)||ee){const he={...ne,...ee&&pt(D)?{isValid:D}:{},errors:r.errors,name:C};r={...r,...he},m.state.next(he)}},S=async C=>{h(C,!0);const D=await t.resolver(o,t.context,Xh(C||i.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return h(C),D},j=async C=>{const{errors:D}=await S(C);if(C)for(const U of C){const ne=oe(D,U);ne?ze(r.errors,U,ne):Je(r.errors,U)}else r.errors=D;return D},I=async(C,D,U={valid:!0})=>{for(const ne in C){const se=C[ne];if(se){const{_f:ee,...he}=se;if(ee){const Ie=i.array.has(ee.name),Ue=se._f&&Qh(se._f);Ue&&u.validatingFields&&h([ee.name],!0);const nt=await ra(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?bc(r.errors,nt,ee.name):ze(r.errors,ee.name,nt[ee.name]):Je(r.errors,ee.name))}!ct(he)&&await I(he,D,U)}}return U.valid},z=()=>{for(const C of i.unMount){const D=oe(n,C);D&&(D._f.refs?D._f.refs.every(U=>!Qo(U)):!Qo(D._f.ref))&&B(C)}i.unMount=new Set},M=(C,D)=>!t.disabled&&(C&&D&&ze(o,C,D),!Bt(G(),s)),F=(C,D,U)=>oc(C,i,{...a.mount?o:Ze(D)?s:gt(C)?{[C]:D}:D},U,D),V=C=>Wn(oe(a.mount?o:s,C,t.shouldUnregister?oe(s,C,[]):[])),W=(C,D,U={})=>{const ne=oe(n,C);let se=D;if(ne){const ee=ne._f;ee&&(!ee.disabled&&ze(o,C,mc(D,ee)),se=Kn(ee.ref)&&ft(D)?"":D,cc(ee.ref)?[...ee.ref.options].forEach(he=>he.selected=se.includes(he.value)):ee.refs?bn(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):Jo(ee.ref)?ee.ref.value="":(ee.ref.value=se,ee.ref.type||m.state.next({name:C,values:Ye(o)})))}(U.shouldDirty||U.shouldTouch)&&g(C,se,U.shouldTouch,U.shouldDirty,!0),U.shouldValidate&&ve(C)},re=(C,D,U)=>{for(const ne in D){if(!D.hasOwnProperty(ne))return;const se=D[ne],ee=C+"."+ne,he=oe(n,ee);(i.array.has(C)||Qe(se)||he&&!he._f)&&!_r(se)?re(ee,se,U):W(ee,se,U)}},Z=(C,D,U={})=>{const ne=oe(n,C),se=i.array.has(C),ee=Ye(D);ze(o,C,ee),se?(m.array.next({name:C,values:Ye(o)}),(u.isDirty||u.dirtyFields||p.isDirty||p.dirtyFields)&&U.shouldDirty&&m.state.next({name:C,dirtyFields:Tr(s,o),isDirty:M(C,ee)})):ne&&!ne._f&&!ft(ee)?re(C,ee,U):W(C,ee,U),ta(C,i)&&m.state.next({...r,name:C}),m.state.next({name:a.mount?C:void 0,values:Ye(o)})},ae=async C=>{a.mount=!0;const D=C.target;let U=D.name,ne=!0;const se=oe(n,U),ee=Ue=>{ne=Number.isNaN(Ue)||_r(Ue)&&isNaN(Ue.getTime())||Bt(Ue,oe(o,U,Ue))},he=Or(t.mode),Ie=Or(t.reValidateMode);if(se){let Ue,nt;const tr=D.type?gc(se._f):tc(C),qt=C.type===Hn.BLUR||C.type===Hn.FOCUS_OUT,qi=!ep(se._f)&&!t.resolver&&!oe(r.errors,U)&&!se._f.deps||np(qt,oe(r.touchedFields,U),r.isSubmitted,Ie,he),Ln=ta(U,i,qt);ze(o,U,tr),qt?(!D||!D.readOnly)&&(se._f.onBlur&&se._f.onBlur(C),c&&c(0)):se._f.onChange&&se._f.onChange(C);const zn=g(U,tr,qt),Ui=!ct(zn)||Ln;if(!qt&&m.state.next({name:U,type:C.type,values:Ye(o)}),qi)return(u.isValid||p.isValid)&&(t.mode==="onBlur"?qt&&y():qt||y()),Ui&&m.state.next({name:U,...Ln?{}:zn});if(!qt&&Ln&&m.state.next({...r}),t.resolver){const{errors:Wo}=await S([U]);if(ee(tr),ne){const Bi=yc(r.errors,n,U),hn=yc(Wo,n,Bi.name||U);Ue=hn.error,U=hn.name,nt=ct(Wo)}}else h([U],!0),Ue=(await ra(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=(C,D)=>{if(oe(r.errors,D)&&C.focus)return C.focus(),1},ve=async(C,D={})=>{let U,ne;const se=mt(C);if(t.resolver){const ee=await j(Ze(C)?C:se);U=ct(ee),ne=C?!se.some(he=>oe(ee,he)):U}else C?(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(C)||(u.isValid||p.isValid)&&U!==r.isValid?{}:{name:C},...t.resolver||!C?{isValid:U}:{},errors:r.errors}),D.shouldFocus&&!ne&&Ir(n,L,C?se:i.mount),ne},G=(C,D)=>{let U={...a.mount?o:s};return D&&(U=ic(D.dirtyFields?r.dirtyFields:r.touchedFields,U)),Ze(C)?U:gt(C)?oe(U,C):C.map(ne=>oe(U,ne))},T=(C,D)=>({invalid:!!oe((D||r).errors,C),isDirty:!!oe((D||r).dirtyFields,C),error:oe((D||r).errors,C),isValidating:!!oe(r.validatingFields,C),isTouched:!!oe((D||r).touchedFields,C)}),K=C=>{C&&mt(C).forEach(D=>Je(r.errors,D)),m.state.next({errors:C?r.errors:{}})},O=(C,D,U)=>{const ne=(oe(n,C,{_f:{}})._f||{}).ref,se=oe(r.errors,C)||{},{ref:ee,message:he,type:Ie,...Ue}=se;ze(r.errors,C,{...Ue,...D,ref:ne}),m.state.next({name:C,errors:r.errors,isValid:!1}),U&&U.shouldFocus&&ne&&ne.focus&&ne.focus()},k=(C,D)=>St(C)?m.state.subscribe({next:U=>"values"in U&&C(F(void 0,D),U)}):F(C,D,!0),R=C=>m.state.subscribe({next:D=>{rp(C.name,D.name,C.exact)&&tp(D,C.formState||u,He,C.reRenderRoot)&&C.callback({values:{...o},...r,...D,defaultValues:s})}}).unsubscribe,q=C=>(a.mount=!0,p={...p,...C.formState},R({...C,formState:p})),B=(C,D={})=>{for(const U of C?mt(C):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:C,name:D})=>{(pt(C)&&a.mount||C||i.disabled.has(D))&&(C?i.disabled.add(D):i.disabled.delete(D))},pe=(C,D={})=>{let U=oe(n,C);const ne=pt(D.disabled)||pt(t.disabled);return ze(n,C,{...U||{},_f:{...U&&U._f?U._f:{ref:{name:C}},name:C,mount:!0,...D}}),i.mount.add(C),U?Q({disabled:pt(D.disabled)?D.disabled:t.disabled,name:C}):w(C,!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:C,onChange:ae,onBlur:ae,ref:se=>{if(se){pe(C,D),U=oe(n,C);const ee=Ze(se.value)&&se.querySelectorAll&&se.querySelectorAll("input,select,textarea")[0]||se,he=Kh(ee),Ie=U._f.refs||[];if(he?Ie.find(Ue=>Ue===ee):ee===U._f.ref)return;ze(n,C,{_f:{...U._f,...he?{refs:[...Ie.filter(Qo),ee,...Array.isArray(oe(s,C))?[{}]:[]],ref:{type:ee.type,name:C}}:{ref:ee}}}),w(C,!1,void 0,ee)}else U=oe(n,C,{}),U._f&&(U._f.mount=!1),(t.shouldUnregister||D.shouldUnregister)&&!(rc(i.array,C)&&a.action)&&i.unMount.add(C)}}},ie=()=>t.shouldFocusError&&Ir(n,L,i.mount),N=C=>{pt(C)&&(m.state.next({disabled:C}),Ir(n,(D,U)=>{const ne=oe(n,U);ne&&(D.disabled=ne._f.disabled||C,Array.isArray(ne._f.refs)&&ne._f.refs.forEach(se=>{se.disabled=ne._f.disabled||C}))},0,!1))},A=(C,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 S();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"),ct(r.errors)){m.state.next({errors:{}});try{await C(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:ct(r.errors)&&!ne,submitCount:r.submitCount+1,errors:r.errors}),ne)throw ne},H=(C,D={})=>{oe(n,C)&&(Ze(D.defaultValue)?Z(C,Ye(oe(s,C))):(Z(C,D.defaultValue),ze(s,C,Ye(D.defaultValue))),D.keepTouched||Je(r.touchedFields,C),D.keepDirty||(Je(r.dirtyFields,C),r.isDirty=D.defaultValue?M(C,Ye(oe(s,C))):M()),D.keepError||(Je(r.errors,C),u.isValid&&y()),m.state.next({...r}))},J=(C,D={})=>{const U=C?Ye(C):s,ne=Ye(U),se=ct(C),ee=se?s:ne;if(D.keepDefaultValues||(s=U),!D.keepValues){if(D.keepDirtyValues){const he=new Set([...i.mount,...Object.keys(Tr(s,o))]);for(const Ie of Array.from(he))oe(r.dirtyFields,Ie)?ze(ee,Ie,oe(o,Ie)):Z(Ie,oe(ee,Ie))}else{if(Ho&&Ze(C))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)Z(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,a.watch=!!t.shouldUnregister,m.state.next({submitCount:D.keepSubmitCount?r.submitCount:0,isDirty:se?!1:D.keepDirty?r.isDirty:!!(D.keepDefaultValues&&!Bt(C,s)),isSubmitted:D.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:se?{}:D.keepDirtyValues?D.keepDefaultValues&&o?Tr(s,o):r.dirtyFields:D.keepDefaultValues&&C?Tr(s,C):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=(C,D)=>J(St(C)?C(o):C,D),ye=(C,D={})=>{const U=oe(n,C),ne=U&&U._f;if(ne){const se=ne.refs?ne.refs[0]:ne.ref;se.focus&&(se.focus(),D.shouldSelect&&St(se.select)&&se.select())}},He=C=>{r={...r,...C}},Ge={control:{register:pe,unregister:B,getFieldState:T,handleSubmit:A,setError:O,_subscribe:R,_runSchema:S,_focusError:ie,_getWatch:F,_getDirty:M,_setValid:y,_setFieldArray:_,_setDisabledField:Q,_setErrors:b,_getFieldArray:V,_reset:J,_resetDefaultValues:()=>St(t.defaultValues)&&t.defaultValues().then(C=>{le(C,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(C){a=C},get _defaultValues(){return s},get _names(){return i},set _names(C){i=C},get _formState(){return r},get _options(){return t},set _options(C){t={...t,...C}}},subscribe:q,trigger:ve,register:pe,handleSubmit:A,watch:k,setValue:Z,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)})},na=(e,t,r={})=>r.shouldFocus||Ze(r.shouldFocus)?r.focusName||`${e}.${Ze(r.focusIndex)?t:r.focusIndex}.`:"",sa=(e,t)=>[...e,...mt(t)],oa=e=>Array.isArray(e)?e.map(()=>{}):void 0;function aa(e,t,r){return[...e.slice(0,t),...mt(r),...e.slice(t)]}var ia=(e,t,r)=>Array.isArray(e)?(Ze(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],ca=(e,t)=>[...mt(t),...mt(e)];function ip(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 la=(e,t)=>Ze(t)?[]:ip(e,mt(t).sort((r,n)=>r-n)),ua=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},xc=(e,t,r)=>(e[t]=r,e);function wc(e){const t=at(),{control:r=t.control,name:n,keyName:s="id",shouldUnregister:o,rules:a}=e,[i,c]=Y.useState(r._getFieldArray(n)),l=Y.useRef(r._getFieldArray(n).map(sr)),u=Y.useRef(!1);r._names.array.add(n),Y.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=Y.useCallback(w=>{u.current=!0,r._setFieldArray(n,w)},[r,n]),m=(w,g)=>{const $=mt(Ye(w)),S=sa(r._getFieldArray(n),$);r._names.focus=na(n,S.length-1,g),l.current=sa(l.current,$.map(sr)),p(S),c(S),r._setFieldArray(n,S,sa,{argA:oa(w)})},v=(w,g)=>{const $=mt(Ye(w)),S=ca(r._getFieldArray(n),$);r._names.focus=na(n,0,g),l.current=ca(l.current,$.map(sr)),p(S),c(S),r._setFieldArray(n,S,ca,{argA:oa(w)})},x=w=>{const g=la(r._getFieldArray(n),w);l.current=la(l.current,w),p(g),c(g),!Array.isArray(oe(r._fields,n))&&ze(r._fields,n,void 0),r._setFieldArray(n,g,la,{argA:w})},y=(w,g,$)=>{const S=mt(Ye(g)),j=aa(r._getFieldArray(n),w,S);r._names.focus=na(n,w,$),l.current=aa(l.current,w,S.map(sr)),p(j),c(j),r._setFieldArray(n,j,aa,{argA:w,argB:oa(g)})},h=(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)},_=(w,g)=>{const $=r._getFieldArray(n);ia($,w,g),ia(l.current,w,g),p($),c($),r._setFieldArray(n,$,ia,{argA:w,argB:g},!1)},f=(w,g)=>{const $=Ye(g),S=xc(r._getFieldArray(n),w,$);l.current=[...S].map((j,I)=>!j||I===w?sr():l.current[I]),p(S),c([...S]),r._setFieldArray(n,S,xc,{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 Y.useEffect(()=>{if(r._state.action=!1,ta(n,r._names)&&r._subjects.state.next({...r._formState}),u.current&&(!Or(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Or(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&&!(Or(r._options.reValidateMode).isOnSubmit&&Or(r._options.mode).isOnSubmit)&&ra(w,r._names.disabled,r._formValues,r._options.criteriaMode===xt.all,r._options.shouldUseNativeValidation,!0).then(g=>!ct(g)&&r._subjects.state.next({errors:bc(r._formState.errors,g,n)}))}r._subjects.state.next({name:n,values:Ye(r._formValues)}),r._names.focus&&Ir(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]),Y.useEffect(()=>(!oe(r._formValues,n)&&r._setFieldArray(n),()=>{const w=(g,$)=>{const S=oe(r._fields,g);S&&S._f&&(S._f.mount=$)};r._options.shouldUnregister||o?r.unregister(n):w(n,!1)}),[n,r,s,o]),{swap:Y.useCallback(h,[p,n,r]),move:Y.useCallback(_,[p,n,r]),prepend:Y.useCallback(v,[p,n,r]),append:Y.useCallback(m,[p,n,r]),remove:Y.useCallback(x,[p,n,r]),insert:Y.useCallback(y,[p,n,r]),update:Y.useCallback(f,[p,n,r]),replace:Y.useCallback(b,[p,n,r]),fields:Y.useMemo(()=>i.map((w,g)=>({...w,[s]:l.current[g]||sr()})),[i,s])}}function cp(e={}){const t=Y.useRef(void 0),r=Y.useRef(void 0),[n,s]=Y.useState({isDirty:!1,isValidating:!1,isLoading:St(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:St(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!St(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...i}=ap(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]),Y.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Y.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),Y.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),Y.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),Y.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==n.isDirty&&o._subjects.state.next({isDirty:a})}},[o,n.isDirty]),Y.useEffect(()=>{e.values&&!Bt(e.values,r.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),r.current=e.values,s(a=>({...a}))):o._resetDefaultValues()},[o,e.values]),Y.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=nc(n,o),t.current}const lp="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let xn=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=lp[r[e]&63];return t};function $c(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 up(e,t){const r=E.createContext(t),n=o=>{const{children:a,...i}=o,c=E.useMemo(()=>i,Object.values(i));return d.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function s(o){const a=E.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 Tt(e,t=[]){let r=[];function n(o,a){const i=E.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=E.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=E.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=>E.createContext(a));return function(i){const c=(i==null?void 0:i[e])||o;return E.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return s.scopeName=e,[n,dp(s,...t)]}function dp(...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 E.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function Sc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ec(...e){return t=>{let r=!1;const n=e.map(s=>{const o=Sc(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():Sc(e[s],null)}}}}function qe(...e){return E.useCallback(Ec(...e),e)}function Mr(e){const t=fp(e),r=E.forwardRef((n,s)=>{const{children:o,...a}=n,i=E.Children.toArray(o),c=i.find(mp);if(c){const l=c.props.children,u=i.map(p=>p===c?E.Children.count(l)>1?E.Children.only(null):E.isValidElement(l)?l.props.children:null:p);return d.jsx(t,{...a,ref:s,children:E.isValidElement(l)?E.cloneElement(l,void 0,u):null})}return d.jsx(t,{...a,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var da=Mr("Slot");function fp(e){const t=E.forwardRef((r,n)=>{const{children:s,...o}=r;if(E.isValidElement(s)){const a=pp(s),i=hp(o,s.props);return s.type!==E.Fragment&&(i.ref=n?Ec(n,a):a),E.cloneElement(s,i)}return E.Children.count(s)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kc=Symbol("radix.slottable");function jc(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=kc,t}function mp(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kc}function hp(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 pp(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 Cc(e){const t=e+"CollectionProvider",[r,n]=Tt(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:h,children:_}=y,f=Y.useRef(null),b=Y.useRef(new Map).current;return d.jsx(s,{scope:h,itemMap:b,collectionRef:f,children:_})};a.displayName=t;const i=e+"CollectionSlot",c=Mr(i),l=Y.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=Mr(u),v=Y.forwardRef((y,h)=>{const{scope:_,children:f,...b}=y,w=Y.useRef(null),g=qe(h,w),$=o(u,_);return Y.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 Y.useCallback(()=>{const f=h.collectionRef.current;if(!f)return[];const b=Array.from(f.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort(($,S)=>b.indexOf($.ref.current)-b.indexOf(S.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:v},x,n]}var gp=E.createContext(void 0);function fa(e){const t=E.useContext(gp);return e||t||"ltr"}var vp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pe=vp.reduce((e,t)=>{const r=Mr(`Primitive.${t}`),n=E.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 yp(e,t){e&&qn.flushSync(()=>e.dispatchEvent(t))}function or(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function bp(e,t=globalThis==null?void 0:globalThis.document){const r=or(e);E.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 _p="DismissableLayer",ma="dismissableLayer.update",xp="dismissableLayer.pointerDownOutside",wp="dismissableLayer.focusOutside",Rc,Pc=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yn=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:i,...c}=e,l=E.useContext(Pc),[u,p]=E.useState(null),m=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=E.useState({}),x=qe(t,S=>p(S)),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=Ep(S=>{const j=S.target,I=[...l.branches].some(z=>z.contains(j));!w||I||(s==null||s(S),a==null||a(S),S.defaultPrevented||i==null||i())},m),$=kp(S=>{const j=S.target;[...l.branches].some(z=>z.contains(j))||(o==null||o(S),a==null||a(S),S.defaultPrevented||i==null||i())},m);return bp(S=>{f===l.layers.size-1&&(n==null||n(S),!S.defaultPrevented&&i&&(S.preventDefault(),i()))},m),E.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Rc=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Nc(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Rc)}},[u,m,r,l]),E.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Nc())},[u,l]),E.useEffect(()=>{const S=()=>v({});return document.addEventListener(ma,S),()=>document.removeEventListener(ma,S)},[]),d.jsx(Pe.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=_p;var $p="DismissableLayerBranch",Sp=E.forwardRef((e,t)=>{const r=E.useContext(Pc),n=E.useRef(null),s=qe(t,n);return E.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),d.jsx(Pe.div,{...e,ref:s})});Sp.displayName=$p;function Ep(e,t=globalThis==null?void 0:globalThis.document){const r=or(e),n=E.useRef(!1),s=E.useRef(()=>{});return E.useEffect(()=>{const o=i=>{if(i.target&&!n.current){let c=function(){Ac(xp,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 kp(e,t=globalThis==null?void 0:globalThis.document){const r=or(e),n=E.useRef(!1);return E.useEffect(()=>{const s=o=>{o.target&&!n.current&&Ac(wp,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 Nc(){const e=new CustomEvent(ma);document.dispatchEvent(e)}function Ac(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?yp(s,o):s.dispatchEvent(o)}var ha=0;function Tc(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Oc()),document.body.insertAdjacentElement("beforeend",e[1]??Oc()),ha++,()=>{ha===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ha--}},[])}function Oc(){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 pa="focusScope.autoFocusOnMount",ga="focusScope.autoFocusOnUnmount",Ic={bubbles:!1,cancelable:!0},jp="FocusScope",va=E.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...a}=e,[i,c]=E.useState(null),l=or(s),u=or(o),p=E.useRef(null),m=qe(t,y=>c(y)),v=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.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]),E.useEffect(()=>{if(i){Fc.add(v);const y=document.activeElement;if(!i.contains(y)){const _=new CustomEvent(pa,Ic);i.addEventListener(pa,l),i.dispatchEvent(_),_.defaultPrevented||(Cp(Tp(Dc(i)),{select:!0}),document.activeElement===y&&ar(i))}return()=>{i.removeEventListener(pa,l),setTimeout(()=>{const _=new CustomEvent(ga,Ic);i.addEventListener(ga,u),i.dispatchEvent(_),_.defaultPrevented||ar(y??document.body,{select:!0}),i.removeEventListener(ga,u),Fc.remove(v)},0)}}},[i,l,u,v]);const x=E.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]=Rp(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(Pe.div,{tabIndex:-1,...a,ref:m,onKeyDown:x})});va.displayName=jp;function Cp(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ar(n,{select:t}),document.activeElement!==r)return}function Rp(e){const t=Dc(e),r=Mc(t,e),n=Mc(t.reverse(),e);return[r,n]}function Dc(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 Mc(e,t){for(const r of e)if(!Pp(r,{upTo:t}))return r}function Pp(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 Np(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&&Np(e)&&t&&e.select()}}var Fc=Ap();function Ap(){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 Tp(e){return e.filter(t=>t.tagName!=="A")}var it=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},Op=E[" useId ".trim().toString()]||(()=>{}),Ip=0;function ir(e){const[t,r]=E.useState(Op());return it(()=>{r(n=>n??String(Ip++))},[e]),e||(t?`radix-${t}`:"")}const Dp=["top","right","bottom","left"],cr=Math.min,vt=Math.max,Jn=Math.round,Xn=Math.floor,Ot=e=>({x:e,y:e}),Mp={left:"right",right:"left",bottom:"top",top:"bottom"},Fp={start:"end",end:"start"};function ya(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 Fr(e){return e.split("-")[1]}function ba(e){return e==="x"?"y":"x"}function _a(e){return e==="y"?"height":"width"}const Vp=new Set(["top","bottom"]);function It(e){return Vp.has(Ht(e))?"y":"x"}function xa(e){return ba(It(e))}function Lp(e,t,r){r===void 0&&(r=!1);const n=Fr(e),s=xa(e),o=_a(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 zp(e){const t=Qn(e);return[wa(e),t,wa(t)]}function wa(e){return e.replace(/start|end/g,t=>Fp[t])}const Lc=["left","right"],zc=["right","left"],qp=["top","bottom"],Up=["bottom","top"];function Bp(e,t,r){switch(e){case"top":case"bottom":return r?t?zc:Lc:t?Lc:zc;case"left":case"right":return t?qp:Up;default:return[]}}function Wp(e,t,r,n){const s=Fr(e);let o=Bp(Ht(e),r==="start",n);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(wa)))),o}function Qn(e){return e.replace(/left|right|bottom|top/g,t=>Mp[t])}function Hp(e){return{top:0,right:0,bottom:0,left:0,...e}}function qc(e){return typeof e!="number"?Hp(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 Uc(e,t,r){let{reference:n,floating:s}=e;const o=It(t),a=xa(t),i=_a(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(Fr(t)){case"start":v[a]-=m*(r&&l?-1:1);break;case"end":v[a]+=m*(r&&l?-1:1);break}return v}const Gp=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}=Uc(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}=Uc(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=qc(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 Kp=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=qc(u),m={x:r,y:n},v=xa(s),x=_a(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 S=$?$[b]:0;(!S||!await(a.isElement==null?void 0:a.isElement($)))&&(S=i.floating[b]||o.floating[x]);const j=w/2-g/2,I=S/2-y[x]/2-1,z=cr(p[_],I),M=cr(p[f],I),F=z,V=S-y[x]-M,W=S/2-y[x]/2+j,re=ya(F,W,V),Z=!c.arrow&&Fr(s)!=null&&W!==re&&o.reference[x]/2-(W<F?z:M)-y[x]/2<0,ae=Z?W<F?W-F:W-V:0;return{[v]:m[v]+ae,data:{[v]:re,centerOffset:W-re-ae,...Z&&{alignmentOffset:ae}},reset:Z}}}),Zp=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=It(i),b=Ht(i)===i,w=await(c.isRTL==null?void 0:c.isRTL(l.floating)),g=m||(b||!y?[Qn(i)]:zp(i)),$=x!=="none";!m&&$&&g.push(...Wp(i,y,x,w));const S=[i,...g],j=await wn(t,h),I=[];let z=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&I.push(j[_]),p){const W=Lp(s,a,w);I.push(j[W[0]],j[W[1]])}if(z=[...z,{placement:s,overflows:I}],!I.every(W=>W<=0)){var M,F;const W=(((M=o.flip)==null?void 0:M.index)||0)+1,re=S[W];if(re&&(!(p==="alignment"?f!==It(re):!1)||z.every(L=>It(L.placement)===f?L.overflows[0]>0:!0)))return{data:{index:W,overflows:z},reset:{placement:re}};let Z=(F=z.filter(ae=>ae.overflows[0]<=0).sort((ae,L)=>ae.overflows[1]-L.overflows[1])[0])==null?void 0:F.placement;if(!Z)switch(v){case"bestFit":{var V;const ae=(V=z.filter(L=>{if($){const ve=It(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:V[0];ae&&(Z=ae);break}case"initialPlacement":Z=i;break}if(s!==Z)return{reset:{placement:Z}}}return{}}}};function Bc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wc(e){return Dp.some(t=>e[t]>=0)}const Yp=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=Bc(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Wc(a)}}}case"escaped":{const o=await wn(t,{...s,altBoundary:!0}),a=Bc(o,r.floating);return{data:{escapedOffsets:a,escaped:Wc(a)}}}default:return{}}}}},Hc=new Set(["left","top"]);async function Jp(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=Fr(r),c=It(r)==="y",l=Hc.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 Xp=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 Jp(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}}}}},Qp=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=It(Ht(s)),m=ba(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=ya(f,v,b)}if(a){const h=p==="y"?"top":"left",_=p==="y"?"bottom":"right",f=x+u[h],b=x-u[_];x=ya(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}}}}}},eg=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=It(s),m=ba(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=Hc.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}}}},tg=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=Fr(s),v=It(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 S=w,j=g;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(j=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(S=f),$&&!m){const z=vt(u.left,0),M=vt(u.right,0),F=vt(u.top,0),V=vt(u.bottom,0);v?j=x-2*(z!==0||M!==0?z+M:vt(u.left,u.right)):S=y-2*(F!==0||V!==0?F+V:vt(u.top,u.bottom))}await c({...t,availableWidth:j,availableHeight:S});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 Gc(e)?(e.nodeName||"").toLowerCase():"#document"}function yt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Dt(e){var t;return(t=(Gc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Gc(e){return ts()?e instanceof Node||e instanceof yt(e).Node:!1}function Et(e){return ts()?e instanceof Element||e instanceof yt(e).Element:!1}function Mt(e){return ts()?e instanceof HTMLElement||e instanceof yt(e).HTMLElement:!1}function Kc(e){return!ts()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yt(e).ShadowRoot}const rg=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)&&!rg.has(s)}const ng=new Set(["table","td","th"]);function sg(e){return ng.has(Vr(e))}const og=[":popover-open",":modal"];function rs(e){return og.some(t=>{try{return e.matches(t)}catch{return!1}})}const ag=["transform","translate","scale","rotate","perspective"],ig=["transform","translate","scale","rotate","perspective","filter"],cg=["paint","layout","strict","content"];function $a(e){const t=Sa(),r=Et(e)?kt(e):e;return ag.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)||ig.some(n=>(r.willChange||"").includes(n))||cg.some(n=>(r.contain||"").includes(n))}function lg(e){let t=lr(e);for(;Mt(t)&&!Lr(t);){if($a(t))return t;if(rs(t))return null;t=lr(t)}return null}function Sa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ug=new Set(["html","body","#document"]);function Lr(e){return ug.has(Vr(e))}function kt(e){return yt(e).getComputedStyle(e)}function ns(e){return Et(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||Kc(e)&&e.host||Dt(e);return Kc(t)?t.host:t}function Zc(e){const t=lr(e);return Lr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mt(t)&&$n(t)?t:Zc(t)}function Sn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Zc(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),a=yt(s);if(o){const i=Ea(a);return t.concat(a,a.visualViewport||[],$n(s)?s:[],i&&r?Sn(i):[])}return t.concat(s,Sn(s,[],r))}function Ea(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yc(e){const t=kt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Mt(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 ka(e){return Et(e)?e:e.contextElement}function zr(e){const t=ka(e);if(!Mt(t))return Ot(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=Yc(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 dg=Ot(0);function Jc(e){const t=yt(e);return!Sa()||!t.visualViewport?dg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fg(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=ka(e);let a=Ot(1);t&&(n?Et(n)&&(a=zr(n)):a=zr(e));const i=fg(o,r,n)?Jc(o):Ot(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&&Et(n)?yt(n):n;let x=m,y=Ea(x);for(;y&&n&&v!==x;){const h=zr(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=Ea(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(Dt(e)).left+r}function Xc(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 mg(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",a=Dt(n),i=t?rs(t.floating):!1;if(n===a||i&&o)return r;let c={scrollLeft:0,scrollTop:0},l=Ot(1);const u=Ot(0),p=Mt(n);if((p||!p&&!o)&&((Vr(n)!=="body"||$n(a))&&(c=ns(n)),Mt(n))){const v=xr(n);l=zr(n),u.x=v.x+n.clientLeft,u.y=v.y+n.clientTop}const m=a&&!p&&!o?Xc(a,c):Ot(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 hg(e){return Array.from(e.getClientRects())}function pg(e){const t=Dt(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 Qc=25;function gg(e,t){const r=yt(e),n=Dt(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=Sa();(!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<=Qc&&(o-=x)}else l<=Qc&&(o+=l);return{width:o,height:a,x:i,y:c}}const vg=new Set(["absolute","fixed"]);function yg(e,t){const r=xr(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=Mt(e)?zr(e):Ot(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 el(e,t,r){let n;if(t==="viewport")n=gg(e,r);else if(t==="document")n=pg(Dt(e));else if(Et(t))n=yg(t,r);else{const s=Jc(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return es(n)}function tl(e,t){const r=lr(e);return r===t||!Et(r)||Lr(r)?!1:kt(r).position==="fixed"||tl(r,t)}function bg(e,t){const r=t.get(e);if(r)return r;let n=Sn(e,[],!1).filter(i=>Et(i)&&Vr(i)!=="body"),s=null;const o=kt(e).position==="fixed";let a=o?lr(e):e;for(;Et(a)&&!Lr(a);){const i=kt(a),c=$a(a);!c&&i.position==="fixed"&&(s=null),(o?!c&&!s:!c&&i.position==="static"&&!!s&&vg.has(s.position)||$n(a)&&!c&&tl(e,a))?n=n.filter(u=>u!==a):s=i,a=lr(a)}return t.set(e,n),n}function _g(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const a=[...r==="clippingAncestors"?rs(t)?[]:bg(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((l,u)=>{const p=el(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},el(t,i,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function xg(e){const{width:t,height:r}=Yc(e);return{width:t,height:r}}function wg(e,t,r){const n=Mt(t),s=Dt(t),o=r==="fixed",a=xr(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const c=Ot(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?Xc(s,i):Ot(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 ja(e){return kt(e).position==="static"}function rl(e,t){if(!Mt(e)||kt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Dt(e)===r&&(r=r.ownerDocument.body),r}function nl(e,t){const r=yt(e);if(rs(e))return r;if(!Mt(e)){let s=lr(e);for(;s&&!Lr(s);){if(Et(s)&&!ja(s))return s;s=lr(s)}return r}let n=rl(e,t);for(;n&&sg(n)&&ja(n);)n=rl(n,t);return n&&Lr(n)&&ja(n)&&!$a(n)?r:n||lg(e)||r}const $g=async function(e){const t=this.getOffsetParent||nl,r=this.getDimensions,n=await r(e.floating);return{reference:wg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Sg(e){return kt(e).direction==="rtl"}const Eg={convertOffsetParentRelativeRectToViewportRelativeRect:mg,getDocumentElement:Dt,getClippingRect:_g,getOffsetParent:nl,getElementRects:$g,getClientRects:hg,getDimensions:xg,getScale:zr,isElement:Et,isRTL:Sg};function sl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kg(e,t){let r=null,n;const s=Dt(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 S=$[0].intersectionRatio;if(S!==c){if(!w)return a();S?a(!1,S):n=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!sl(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 jg(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=ka(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?kg(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&&!sl(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 Cg=Xp,Rg=Qp,Pg=Zp,Ng=tg,Ag=Yp,ol=Kp,Tg=eg,Og=(e,t,r)=>{const n=new Map,s={platform:Eg,...r},o={...s.platform,_c:n};return Gp(e,t,{...s,platform:o})};var Ig=typeof document<"u",Dg=function(){},os=Ig?Y.useLayoutEffect:Dg;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 al(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function il(e,t){const r=al(e);return Math.round(t*r)/r}function Ca(e){const t=E.useRef(e);return os(()=>{t.current=e}),t}function Mg(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]=E.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=E.useState(n);as(m,n)||v(n);const[x,y]=E.useState(null),[h,_]=E.useState(null),f=E.useCallback(L=>{L!==$.current&&($.current=L,y(L))},[]),b=E.useCallback(L=>{L!==S.current&&(S.current=L,_(L))},[]),w=o||x,g=a||h,$=E.useRef(null),S=E.useRef(null),j=E.useRef(u),I=c!=null,z=Ca(c),M=Ca(s),F=Ca(l),V=E.useCallback(()=>{if(!$.current||!S.current)return;const L={placement:t,strategy:r,middleware:m};M.current&&(L.platform=M.current),Og($.current,S.current,L).then(ve=>{const G={...ve,isPositioned:F.current!==!1};W.current&&!as(j.current,G)&&(j.current=G,qn.flushSync(()=>{p(G)}))})},[m,t,r,M,F]);os(()=>{l===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,p(L=>({...L,isPositioned:!1})))},[l]);const W=E.useRef(!1);os(()=>(W.current=!0,()=>{W.current=!1}),[]),os(()=>{if(w&&($.current=w),g&&(S.current=g),w&&g){if(z.current)return z.current(w,g,V);V()}},[w,g,V,z,I]);const re=E.useMemo(()=>({reference:$,floating:S,setReference:f,setFloating:b}),[f,b]),Z=E.useMemo(()=>({reference:w,floating:g}),[w,g]),ae=E.useMemo(()=>{const L={position:r,left:0,top:0};if(!Z.floating)return L;const ve=il(Z.floating,u.x),G=il(Z.floating,u.y);return i?{...L,transform:"translate("+ve+"px, "+G+"px)",...al(Z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ve,top:G}},[r,i,Z.floating,u.x,u.y]);return E.useMemo(()=>({...u,update:V,refs:re,elements:Z,floatingStyles:ae}),[u,V,re,Z,ae])}const Fg=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?ol({element:n.current,padding:s}).fn(r):{}:n?ol({element:n,padding:s}).fn(r):{}}}},Vg=(e,t)=>({...Cg(e),options:[e,t]}),Lg=(e,t)=>({...Rg(e),options:[e,t]}),zg=(e,t)=>({...Tg(e),options:[e,t]}),qg=(e,t)=>({...Pg(e),options:[e,t]}),Ug=(e,t)=>({...Ng(e),options:[e,t]}),Bg=(e,t)=>({...Ag(e),options:[e,t]}),Wg=(e,t)=>({...Fg(e),options:[e,t]});var Hg="Arrow",cl=E.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return d.jsx(Pe.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"})})});cl.displayName=Hg;var Gg=cl;function Ra(e){const[t,r]=E.useState(void 0);return it(()=>{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 Pa="Popper",[ll,is]=Tt(Pa),[Kg,ul]=ll(Pa),dl=e=>{const{__scopePopper:t,children:r}=e,[n,s]=E.useState(null);return d.jsx(Kg,{scope:t,anchor:n,onAnchorChange:s,children:r})};dl.displayName=Pa;var fl="PopperAnchor",ml=E.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=ul(fl,r),a=E.useRef(null),i=qe(t,a),c=E.useRef(null);return E.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(Pe.div,{...s,ref:i})});ml.displayName=fl;var Na="PopperContent",[Zg,Yg]=ll(Na),hl=E.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=ul(Na,r),[_,f]=E.useState(null),b=qe(t,H=>f(H)),[w,g]=E.useState(null),$=Ra(w),S=($==null?void 0:$.width)??0,j=($==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],F=M.length>0,V={padding:z,boundary:M.filter(Xg),altBoundary:F},{refs:W,floatingStyles:re,placement:Z,isPositioned:ae,middlewareData:L}=Mg({strategy:"fixed",placement:I,whileElementsMounted:(...H)=>jg(...H,{animationFrame:v==="always"}),elements:{reference:h.anchor},middleware:[Vg({mainAxis:s+j,alignmentAxis:a}),c&&Lg({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?zg():void 0,...V}),c&&qg({...V}),Ug({...V,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&&Wg({element:w,padding:i}),Qg({arrowWidth:S,arrowHeight:j}),m&&Bg({strategy:"referenceHidden",...V})]}),[ve,G]=vl(Z),T=or(x);it(()=>{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,k=((pe=L.arrow)==null?void 0:pe.centerOffset)!==0,[R,q]=E.useState();return it(()=>{_&&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(Zg,{scope:r,placedSide:ve,onArrowChange:g,arrowX:K,arrowY:O,shouldHideArrow:k,children:d.jsx(Pe.div,{"data-side":ve,"data-align":G,...y,ref:b,style:{...y.style,animation:ae?void 0:"none"}})})})});hl.displayName=Na;var pl="PopperArrow",Jg={top:"bottom",right:"left",bottom:"top",left:"right"},gl=E.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=Yg(pl,n),a=Jg[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(Gg,{...s,ref:r,style:{...s.style,display:"block"}})})});gl.displayName=pl;function Xg(e){return e!==null}var Qg=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]=vl(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 vl(e){const[t,r="center"]=e.split("-");return[t,r]}var yl=dl,bl=ml,_l=hl,xl=gl,ev="Portal",cs=E.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[s,o]=E.useState(!1);it(()=>o(!0),[]);const a=r||s&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Ki.createPortal(d.jsx(Pe.div,{...n,ref:t}),a):null});cs.displayName=ev;var tv=E[" useInsertionEffect ".trim().toString()]||it;function wr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,a]=rv({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:s;{const u=E.useRef(e!==void 0);E.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=E.useCallback(u=>{var p;if(i){const m=nv(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 rv({defaultProp:e,onChange:t}){const[r,n]=E.useState(e),s=E.useRef(r),o=E.useRef(t);return tv(()=>{o.current=t},[t]),E.useEffect(()=>{var a;s.current!==r&&((a=o.current)==null||a.call(o,r),s.current=r)},[r,s]),[r,n,o]}function nv(e){return typeof e=="function"}function Aa(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var wl=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"}),sv="VisuallyHidden",$l=E.forwardRef((e,t)=>d.jsx(Pe.span,{...e,ref:t,style:{...wl,...e.style}}));$l.displayName=sv;var ov=$l,av=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},qr=new WeakMap,ls=new WeakMap,us={},Ta=0,Sl=function(e){return e&&(e.host||Sl(e.parentNode))},iv=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Sl(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})},cv=function(e,t,r,n){var s=iv(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=(qr.get(m)||0)+1,h=(o.get(m)||0)+1;qr.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(),Ta++,function(){a.forEach(function(p){var m=qr.get(p)-1,v=o.get(p)-1;qr.set(p,m),o.set(p,v),m||(ls.has(p)||p.removeAttribute(n),ls.delete(p)),v||p.removeAttribute(r)}),Ta--,Ta||(qr=new WeakMap,qr=new WeakMap,ls=new WeakMap,us={})}},El=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=av(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),cv(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 kl(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 lv(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",uv="with-scroll-bars-hidden",dv="--removed-body-scroll-bar-size";function Oa(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fv(e,t){var r=Y.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 mv=typeof window<"u"?E.useLayoutEffect:E.useEffect,jl=new WeakMap;function hv(e,t){var r=fv(null,function(n){return e.forEach(function(s){return Oa(s,n)})});return mv(function(){var n=jl.get(r);if(n){var s=new Set(n),o=new Set(e),a=r.current;s.forEach(function(i){o.has(i)||Oa(i,null)}),o.forEach(function(i){s.has(i)||Oa(i,a)})}jl.set(r,e)},[e]),r}function pv(e){return e}function gv(e,t){t===void 0&&(t=pv);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 vv(e){e===void 0&&(e={});var t=gv(null);return t.options=Ft({async:!0,ssr:!1},e),t}var Cl=function(e){var t=e.sideCar,r=kl(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 E.createElement(n,Ft({},r))};Cl.isSideCarExport=!0;function yv(e,t){return e.useMedium(t),Cl}var Rl=vv(),Ia=function(){},ms=E.forwardRef(function(e,t){var r=E.useRef(null),n=E.useState({onScrollCapture:Ia,onWheelCapture:Ia,onTouchMoveCapture:Ia}),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=kl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),g=m,$=hv([r,t]),S=Ft(Ft({},w),s);return E.createElement(E.Fragment,null,u&&E.createElement(g,{sideCar:Rl,removeScrollBar:l,shards:p,noRelative:v,noIsolation:x,inert:y,setCallbacks:o,allowPinchZoom:!!h,lockRef:r,gapMode:b}),a?E.cloneElement(E.Children.only(i),Ft(Ft({},S),{ref:$})):E.createElement(f,Ft({},S,{className:c,ref:$}),i))});ms.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ms.classNames={fullWidth:fs,zeroRight:ds};var bv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _v(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=bv();return t&&e.setAttribute("nonce",t),e}function xv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $v=function(){var e=0,t=null;return{add:function(r){e==0&&(t=_v())&&(xv(t,r),wv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sv=function(){var e=$v();return function(t,r){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Pl=function(){var e=Sv(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},Ev={left:0,top:0,right:0,gap:0},Da=function(e){return parseInt(e||"",10)||0},kv=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[Da(r),Da(n),Da(s)]},jv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ev;var t=kv(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])}},Cv=Pl(),Ur="data-scroll-locked",Rv=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(
|
|
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 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):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)uc(e[r])?(t[r]=Array.isArray(e[r])?[]:{},na(e[r],t[r])):Ze(e[r])||(t[r]=!0);return t}function Ar(e,t,r){r||(r=na(t));for(const n in e)uc(e[n])?Ze(t)||Xo(r[n])?r[n]=na(e[n],Array.isArray(e[n])?[]:{}):Ar(e[n],ft(t)?{}:t[n],r[n]):r[n]=!St(e[n],t[n]);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&>(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&>(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&&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(()=>{e.values&&!St(e.values,r.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),r.current=e.values,s(a=>({...a}))):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,` {
|
|
32
32
|
overflow: hidden `).concat(n,`;
|
|
33
33
|
padding-right: `).concat(i,"px ").concat(n,`;
|
|
34
34
|
}
|
|
35
|
-
body[`).concat(
|
|
35
|
+
body[`).concat(qr,`] {
|
|
36
36
|
overflow: hidden `).concat(n,`;
|
|
37
37
|
overscroll-behavior: contain;
|
|
38
38
|
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
@@ -61,93 +61,93 @@ React keys must be passed directly to JSX without using spread:
|
|
|
61
61
|
margin-right: 0 `).concat(n,`;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
body[`).concat(
|
|
65
|
-
`).concat(
|
|
64
|
+
body[`).concat(qr,`] {
|
|
65
|
+
`).concat(kv,": ").concat(i,`px;
|
|
66
66
|
}
|
|
67
|
-
`)},
|
|
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`
|
|
68
68
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
69
69
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
70
|
-
`)},zv=0,Wr=[];function qv(e){var t=E.useRef([]),r=E.useRef([0,0]),n=E.useRef(),s=E.useState(zv++)[0],o=E.useState(Pl)[0],a=E.useRef(e);E.useEffect(function(){a.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var y=lv([e.lockRef.current],(e.shards||[]).map(Ml),!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=E.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,S=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in y&&S==="h"&&$.type==="range")return!1;var j=Tl(S,$);if(!j)return!0;if(j?g=S:(g=S==="v"?"h":"v",j=Tl(S,$)),!j)return!1;if(!n.current&&"changedTouches"in y&&(b||w)&&(n.current=g),!g)return!0;var I=n.current||g;return Fv(I,h,y,I==="h"?b:w)},[]),c=E.useCallback(function(y){var h=y;if(!(!Wr.length||Wr[Wr.length-1]!==o)){var _="deltaY"in h?Dl(h):ps(h),f=t.current.filter(function(g){return g.name===h.type&&(g.target===h.target||h.target===g.shadowParent)&&Vv(g.delta,_)})[0];if(f&&f.should){h.cancelable&&h.preventDefault();return}if(!f){var b=(a.current.shards||[]).map(Ml).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=E.useCallback(function(y,h,_,f){var b={name:y,delta:h,target:_,should:f,shadowParent:Uv(_)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(w){return w!==b})},1)},[]),u=E.useCallback(function(y){r.current=ps(y),n.current=void 0},[]),p=E.useCallback(function(y){l(y.type,Dl(y),y.target,i(y,e.lockRef.current))},[]),m=E.useCallback(function(y){l(y.type,ps(y),y.target,i(y,e.lockRef.current))},[]);E.useEffect(function(){return Wr.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Br),document.addEventListener("touchmove",c,Br),document.addEventListener("touchstart",u,Br),function(){Wr=Wr.filter(function(y){return y!==o}),document.removeEventListener("wheel",c,Br),document.removeEventListener("touchmove",c,Br),document.removeEventListener("touchstart",u,Br)}},[]);var v=e.removeScrollBar,x=e.inert;return E.createElement(E.Fragment,null,x?E.createElement(o,{styles:Lv(s)}):null,v?E.createElement(Nv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Uv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Bv=yv(Rl,qv);var Fa=E.forwardRef(function(e,t){return E.createElement(ms,Ft({},e,{ref:t,sideCar:Bv}))});Fa.classNames=ms.classNames;var Wv=[" ","Enter","ArrowUp","ArrowDown"],Hv=[" ","Enter"],$r="Select",[gs,vs,Gv]=Cc($r),[Hr]=Tt($r,[Gv,is]),ys=is(),[Kv,ur]=Hr($r),[Zv,Yv]=Hr($r),Fl=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,_]=E.useState(null),[f,b]=E.useState(null),[w,g]=E.useState(!1),$=fa(l),[S,j]=wr({prop:n,defaultProp:s??!1,onChange:o,caller:$r}),[I,z]=wr({prop:a,defaultProp:i,onChange:c,caller:$r}),M=E.useRef(null),F=h?x||!!h.closest("form"):!0,[V,W]=E.useState(new Set),re=Array.from(V).map(Z=>Z.props.value).join(";");return d.jsx(yl,{...y,children:d.jsxs(Kv,{required:v,scope:t,trigger:h,onTriggerChange:_,valueNode:f,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:g,contentId:ir(),value:I,onValueChange:z,open:S,onOpenChange:j,dir:$,triggerPointerDownPosRef:M,disabled:m,children:[d.jsx(gs.Provider,{scope:t,children:d.jsx(Zv,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(Z=>{W(ae=>new Set(ae).add(Z))},[]),onNativeOptionRemove:E.useCallback(Z=>{W(ae=>{const L=new Set(ae);return L.delete(Z),L})},[]),children:r})}),F?d.jsxs(au,{"aria-hidden":!0,required:v,tabIndex:-1,name:u,autoComplete:p,value:I,onChange:Z=>z(Z.target.value),disabled:m,form:x,children:[I===void 0?d.jsx("option",{value:""}):null,Array.from(V)]},re):null]})})};Fl.displayName=$r;var Vl="SelectTrigger",Ll=E.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=E.useRef("touch"),[p,m,v]=cu(y=>{const h=l().filter(b=>!b.disabled),_=h.find(b=>b.value===a.value),f=lu(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(bl,{asChild:!0,...o,children:d.jsx(Pe.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":iu(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===" ")&&Wv.includes(y.key)&&(x(),y.preventDefault())})})})});Ll.displayName=Vl;var zl="SelectValue",ql=E.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:a="",...i}=e,c=ur(zl,r),{onValueNodeHasChildrenChange:l}=c,u=o!==void 0,p=qe(t,c.onValueNodeChange);return it(()=>{l(u)},[l,u]),d.jsx(Pe.span,{...i,ref:p,style:{pointerEvents:"none"},children:iu(c.value)?d.jsx(d.Fragment,{children:a}):o})});ql.displayName=zl;var Jv="SelectIcon",Ul=E.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return d.jsx(Pe.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});Ul.displayName=Jv;var Xv="SelectPortal",Bl=e=>d.jsx(cs,{asChild:!0,...e});Bl.displayName=Xv;var Sr="SelectContent",Wl=E.forwardRef((e,t)=>{const r=ur(Sr,e.__scopeSelect),[n,s]=E.useState();if(it(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?qn.createPortal(d.jsx(Hl,{scope:e.__scopeSelect,children:d.jsx(gs.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),o):null}return d.jsx(Gl,{...e,ref:t})});Wl.displayName=Sr;var jt=10,[Hl,dr]=Hr(Sr),Qv="SelectContentImpl",ey=Mr("SelectContent.RemoveScroll"),Gl=E.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]=E.useState(null),[g,$]=E.useState(null),S=qe(t,B=>w(B)),[j,I]=E.useState(null),[z,M]=E.useState(null),F=vs(r),[V,W]=E.useState(!1),re=E.useRef(!1);E.useEffect(()=>{if(b)return El(b)},[b]),Tc();const Z=E.useCallback(B=>{const[Q,...pe]=F().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},[F,g]),ae=E.useCallback(()=>Z([j,b]),[Z,j,b]);E.useEffect(()=>{V&&ae()},[V,ae]);const{onOpenChange:L,triggerPointerDownPosRef:ve}=f;E.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]),E.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]=cu(B=>{const Q=F().filter(N=>!N.disabled),pe=Q.find(N=>N.ref.current===document.activeElement),ie=lu(Q,B,pe);ie&&setTimeout(()=>ie.ref.current.focus())}),K=E.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=E.useCallback(()=>b==null?void 0:b.focus(),[b]),k=E.useCallback((B,Q,pe)=>{const ie=!re.current&&!pe;(f.value!==void 0&&f.value===Q||ie)&&M(B)},[f.value]),R=n==="popper"?Va:Kl,q=R===Va?{side:i,sideOffset:c,align:l,alignOffset:u,arrowPadding:p,collisionBoundary:m,collisionPadding:v,sticky:x,hideWhenDetached:y,avoidCollisions:h}:{};return d.jsx(Hl,{scope:r,content:b,viewport:g,onViewportChange:$,itemRefCallback:K,selectedItem:j,onItemLeave:O,itemTextRefCallback:k,focusSelectedItem:ae,selectedItemText:z,position:n,isPositioned:V,searchRef:G,children:d.jsx(Fa,{as:ey,allowPinchZoom:!0,children:d.jsx(va,{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:S,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=F().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(()=>Z(ie)),B.preventDefault()}})})})})})})});Gl.displayName=Qv;var ty="SelectItemAlignedPosition",Kl=E.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=ur(Sr,r),a=dr(Sr,r),[i,c]=E.useState(null),[l,u]=E.useState(null),p=qe(t,S=>u(S)),m=vs(r),v=E.useRef(!1),x=E.useRef(!0),{viewport:y,selectedItem:h,selectedItemText:_,focusSelectedItem:f}=a,b=E.useCallback(()=>{if(o.trigger&&o.valueNode&&i&&l&&y&&h&&_){const S=o.trigger.getBoundingClientRect(),j=l.getBoundingClientRect(),I=o.valueNode.getBoundingClientRect(),z=_.getBoundingClientRect();if(o.dir!=="rtl"){const N=z.left-j.left,A=I.left-N,H=S.left-A,J=S.width+H,le=Math.max(J,j.width),ye=window.innerWidth-jt,He=$c(A,[jt,Math.max(jt,ye-le)]);i.style.minWidth=J+"px",i.style.left=He+"px"}else{const N=j.right-z.right,A=window.innerWidth-I.right-N,H=window.innerWidth-S.right-A,J=S.width+H,le=Math.max(J,j.width),ye=window.innerWidth-jt,He=$c(A,[jt,Math.max(jt,ye-le)]);i.style.minWidth=J+"px",i.style.right=He+"px"}const M=m(),F=window.innerHeight-jt*2,V=y.scrollHeight,W=window.getComputedStyle(l),re=parseInt(W.borderTopWidth,10),Z=parseInt(W.paddingTop,10),ae=parseInt(W.borderBottomWidth,10),L=parseInt(W.paddingBottom,10),ve=re+Z+V+L+ae,G=Math.min(h.offsetHeight*5,ve),T=window.getComputedStyle(y),K=parseInt(T.paddingTop,10),O=parseInt(T.paddingBottom,10),k=S.top+S.height/2-jt,R=F-k,q=h.offsetHeight/2,B=h.offsetTop+q,Q=re+Z+B,pe=ve-Q;if(Q<=k){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(k,re+y.offsetTop+(N?K:0)+q)+pe;i.style.height=H+"px",y.scrollTop=Q-k+y.offsetTop}i.style.margin=`${jt}px 0`,i.style.minHeight=G+"px",i.style.maxHeight=F+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[m,o.trigger,o.valueNode,i,l,y,h,_,o.dir,n]);it(()=>b(),[b]);const[w,g]=E.useState();it(()=>{l&&g(window.getComputedStyle(l).zIndex)},[l]);const $=E.useCallback(S=>{S&&x.current===!0&&(b(),f==null||f(),x.current=!1)},[b,f]);return d.jsx(ny,{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(Pe.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Kl.displayName=ty;var ry="SelectPopperPosition",Va=E.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=jt,...o}=e,a=ys(r);return d.jsx(_l,{...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)"}})});Va.displayName=ry;var[ny,La]=Hr(Sr,{}),za="SelectViewport",Zl=E.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=dr(za,r),a=La(za,r),i=qe(t,o.onViewportChange),c=E.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(Pe.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})})})]})});Zl.displayName=za;var Yl="SelectGroup",[sy,oy]=Hr(Yl),ay=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=ir();return d.jsx(sy,{scope:r,id:s,children:d.jsx(Pe.div,{role:"group","aria-labelledby":s,...n,ref:t})})});ay.displayName=Yl;var Jl="SelectLabel",iy=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=oy(Jl,r);return d.jsx(Pe.div,{id:s.id,...n,ref:t})});iy.displayName=Jl;var bs="SelectItem",[cy,Xl]=Hr(bs),Ql=E.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]=E.useState(o??""),[m,v]=E.useState(!1),x=qe(t,f=>{var b;return(b=c.itemRefCallback)==null?void 0:b.call(c,f,n,s)}),y=ir(),h=E.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(cy,{scope:r,value:n,disabled:s,textId:y,isSelected:l,onItemTextChange:E.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(Pe.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===" "||(Hv.includes(f.key)&&_(),f.key===" "&&f.preventDefault())})})})})});Ql.displayName=bs;var En="SelectItemText",eu=E.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,a=ur(En,r),i=dr(En,r),c=Xl(En,r),l=Yv(En,r),[u,p]=E.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=E.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 it(()=>(y(x),()=>h(x)),[y,h,x]),d.jsxs(d.Fragment,{children:[d.jsx(Pe.span,{id:c.textId,...o,ref:m}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?qn.createPortal(o.children,a.valueNode):null]})});eu.displayName=En;var tu="SelectItemIndicator",ru=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return Xl(tu,r).isSelected?d.jsx(Pe.span,{"aria-hidden":!0,...n,ref:t}):null});ru.displayName=tu;var qa="SelectScrollUpButton",nu=E.forwardRef((e,t)=>{const r=dr(qa,e.__scopeSelect),n=La(qa,e.__scopeSelect),[s,o]=E.useState(!1),a=qe(t,n.onScrollButtonChange);return it(()=>{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(ou,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});nu.displayName=qa;var Ua="SelectScrollDownButton",su=E.forwardRef((e,t)=>{const r=dr(Ua,e.__scopeSelect),n=La(Ua,e.__scopeSelect),[s,o]=E.useState(!1),a=qe(t,n.onScrollButtonChange);return it(()=>{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(ou,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});su.displayName=Ua;var ou=E.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=dr("SelectScrollButton",r),a=E.useRef(null),i=vs(r),c=E.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return E.useEffect(()=>()=>c(),[c]),it(()=>{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(Pe.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()})})}),ly="SelectSeparator",uy=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return d.jsx(Pe.div,{"aria-hidden":!0,...n,ref:t})});uy.displayName=ly;var Ba="SelectArrow",dy=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=ys(r),o=ur(Ba,r),a=dr(Ba,r);return o.open&&a.position==="popper"?d.jsx(xl,{...s,...n,ref:t}):null});dy.displayName=Ba;var fy="SelectBubbleInput",au=E.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const s=E.useRef(null),o=qe(n,s),a=Aa(t);return E.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(Pe.select,{...r,style:{...wl,...r.style},ref:o,defaultValue:t})});au.displayName=fy;function iu(e){return e===""||e===void 0}function cu(e){const t=or(e),r=E.useRef(""),n=E.useRef(0),s=E.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=E.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function lu(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=my(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 my(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var hy=Fl,py=Ll,gy=ql,vy=Ul,yy=Bl,by=Wl,_y=Zl,xy=Ql,wy=eu,$y=ru,Sy=nu,Ey=su;/**
|
|
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
71
|
* @license lucide-react v0.525.0 - ISC
|
|
72
72
|
*
|
|
73
73
|
* This source code is licensed under the ISC license.
|
|
74
74
|
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const
|
|
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
76
|
* @license lucide-react v0.525.0 - ISC
|
|
77
77
|
*
|
|
78
78
|
* This source code is licensed under the ISC license.
|
|
79
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/var
|
|
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
81
|
* @license lucide-react v0.525.0 - ISC
|
|
82
82
|
*
|
|
83
83
|
* This source code is licensed under the ISC license.
|
|
84
84
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const
|
|
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
86
|
* @license lucide-react v0.525.0 - ISC
|
|
87
87
|
*
|
|
88
88
|
* This source code is licensed under the ISC license.
|
|
89
89
|
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const Gt=(e,t)=>{const r=
|
|
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
91
|
* @license lucide-react v0.525.0 - ISC
|
|
92
92
|
*
|
|
93
93
|
* This source code is licensed under the ISC license.
|
|
94
94
|
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const
|
|
95
|
+
*/const du=Gt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
96
96
|
* @license lucide-react v0.525.0 - ISC
|
|
97
97
|
*
|
|
98
98
|
* This source code is licensed under the ISC license.
|
|
99
99
|
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const
|
|
100
|
+
*/const fu=Gt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
101
101
|
* @license lucide-react v0.525.0 - ISC
|
|
102
102
|
*
|
|
103
103
|
* This source code is licensed under the ISC license.
|
|
104
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const
|
|
105
|
+
*/const Gy=Gt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
106
106
|
* @license lucide-react v0.525.0 - ISC
|
|
107
107
|
*
|
|
108
108
|
* This source code is licensed under the ISC license.
|
|
109
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const
|
|
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
111
|
* @license lucide-react v0.525.0 - ISC
|
|
112
112
|
*
|
|
113
113
|
* This source code is licensed under the ISC license.
|
|
114
114
|
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const
|
|
115
|
+
*/const Ky=Gt("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
116
116
|
* @license lucide-react v0.525.0 - ISC
|
|
117
117
|
*
|
|
118
118
|
* This source code is licensed under the ISC license.
|
|
119
119
|
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const
|
|
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
121
|
* @license lucide-react v0.525.0 - ISC
|
|
122
122
|
*
|
|
123
123
|
* This source code is licensed under the ISC license.
|
|
124
124
|
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const
|
|
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
126
|
* @license lucide-react v0.525.0 - ISC
|
|
127
127
|
*
|
|
128
128
|
* This source code is licensed under the ISC license.
|
|
129
129
|
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const
|
|
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
131
|
* @license lucide-react v0.525.0 - ISC
|
|
132
132
|
*
|
|
133
133
|
* This source code is licensed under the ISC license.
|
|
134
134
|
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const vu=Gt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function yu(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=yu(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function bu(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=yu(e))&&(n&&(n+=" "),n+=t);return n}const Wa="-",Oy=e=>{const t=Dy(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const i=a.split(Wa);return i[0]===""&&i.length!==1&&i.shift(),_u(i,t)||Iy(a)},getConflictingClassGroupIds:(a,i)=>{const c=r[a]||[];return i&&n[a]?[...c,...n[a]]:c}}},_u=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?_u(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Wa);return(a=t.validators.find(({validator:i})=>i(o)))==null?void 0:a.classGroupId},xu=/^\[(.+)\]$/,Iy=e=>{if(xu.test(e)){const t=xu.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Dy=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const s in r)Ha(r[s],n,s,t);return n},Ha=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:wu(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(My(s)){Ha(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,a])=>{Ha(a,wu(t,o),r,n)})})},wu=(e,t)=>{let r=e;return t.split(Wa).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},My=e=>e.isThemeGetter,Fy=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(o,a)=>{r.set(o,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let a=r.get(o);if(a!==void 0)return a;if((a=n.get(o))!==void 0)return s(o,a),a},set(o,a){r.has(o)?r.set(o,a):s(o,a)}}},Ga="!",Ka=":",Vy=Ka.length,Ly=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const o=[];let a=0,i=0,c=0,l;for(let x=0;x<s.length;x++){let y=s[x];if(a===0&&i===0){if(y===Ka){o.push(s.slice(c,x)),c=x+Vy;continue}if(y==="/"){l=x;continue}}y==="["?a++:y==="]"?a--:y==="("?i++:y===")"&&i--}const u=o.length===0?s:s.substring(c),p=zy(u),m=p!==u,v=l&&l>c?l-c:void 0;return{modifiers:o,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:v}};if(t){const s=t+Ka,o=n;n=a=>a.startsWith(s)?o(a.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(r){const s=n;n=o=>r({className:o,parseClassName:s})}return n},zy=e=>e.endsWith(Ga)?e.substring(0,e.length-1):e.startsWith(Ga)?e.substring(1):e,qy=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const s=[];let o=[];return n.forEach(a=>{a[0]==="["||t[a]?(s.push(...o.sort(),a),o=[]):o.push(a)}),s.push(...o.sort()),s}},Uy=e=>({cache:Fy(e.cacheSize),parseClassName:Ly(e),sortModifiers:qy(e),...Oy(e)}),By=/\s+/,Wy=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:o}=t,a=[],i=e.trim().split(By);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=o(m).join(":"),b=v?f+Ga:f,w=b+_;if(a.includes(w))continue;a.push(w);const g=s(_,h);for(let $=0;$<g.length;++$){const S=g[$];a.push(b+S)}c=u+(c.length>0?" "+c:c)}return c};function Hy(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=$u(t))&&(n&&(n+=" "),n+=r);return n}const $u=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=$u(e[n]))&&(r&&(r+=" "),r+=t);return r};function Gy(e,...t){let r,n,s,o=a;function a(c){const l=t.reduce((u,p)=>p(u),e());return r=Uy(l),n=r.cache.get,s=r.cache.set,o=i,i(c)}function i(c){const l=n(c);if(l)return l;const u=Wy(c,r);return s(c,u),u}return function(){return o(Hy.apply(null,arguments))}}const rt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Su=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Eu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ky=/^\d+\/\d+$/,Zy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Yy=/\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$/,Jy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gr=e=>Ky.test(e),Ce=e=>!!e&&!Number.isNaN(Number(e)),fr=e=>!!e&&Number.isInteger(Number(e)),Za=e=>e.endsWith("%")&&Ce(e.slice(0,-1)),Kt=e=>Zy.test(e),eb=()=>!0,tb=e=>Yy.test(e)&&!Jy.test(e),ku=()=>!1,rb=e=>Xy.test(e),nb=e=>Qy.test(e),sb=e=>!de(e)&&!fe(e),ob=e=>Kr(e,Nu,ku),de=e=>Su.test(e),Er=e=>Kr(e,Au,tb),Ya=e=>Kr(e,ub,Ce),ju=e=>Kr(e,Ru,ku),ab=e=>Kr(e,Pu,nb),_s=e=>Kr(e,Tu,rb),fe=e=>Eu.test(e),kn=e=>Zr(e,Au),ib=e=>Zr(e,db),Cu=e=>Zr(e,Ru),cb=e=>Zr(e,Nu),lb=e=>Zr(e,Pu),xs=e=>Zr(e,Tu,!0),Kr=(e,t,r)=>{const n=Su.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Zr=(e,t,r=!1)=>{const n=Eu.exec(e);return n?n[1]?t(n[1]):r:!1},Ru=e=>e==="position"||e==="percentage",Pu=e=>e==="image"||e==="url",Nu=e=>e==="length"||e==="size"||e==="bg-size",Au=e=>e==="length",ub=e=>e==="number",db=e=>e==="family-name",Tu=e=>e==="shadow",fb=Gy(()=>{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"],S=()=>["auto","contain","none"],j=()=>[fe,de,c],I=()=>[Gr,"full","auto",...j()],z=()=>[fr,"none","subgrid",fe,de],M=()=>["auto",{span:["full",fr,fe,de]},fr,fe,de],F=()=>[fr,"auto",fe,de],V=()=>["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"],Z=()=>["auto",...j()],ae=()=>[Gr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],L=()=>[e,fe,de],ve=()=>[...w(),Cu,ju,{position:[fe,de]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",cb,ob,{size:[fe,de]}],K=()=>[Za,kn,Er],O=()=>["","none","full",l,fe,de],k=()=>["",Ce,kn,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=()=>[Ce,Za,Cu,ju],Q=()=>["","none",x,fe,de],pe=()=>["none",Ce,fe,de],ie=()=>["none",Ce,fe,de],N=()=>[Ce,fe,de],A=()=>[Gr,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Kt],breakpoint:[Kt],color:[eb],container:[Kt],"drop-shadow":[Kt],ease:["in","out","in-out"],font:[sb],"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",Ce],text:[Kt],"text-shadow":[Kt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gr,de,fe,h]}],container:["container"],columns:[{columns:[Ce,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:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],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:[Gr,"full","auto",i,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ce,Gr,"auto","initial","none",de]}],grow:[{grow:["",Ce,fe,de]}],shrink:[{shrink:["",Ce,fe,de]}],order:[{order:[fr,"first","last","none",fe,de]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"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:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"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,kn,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:[ib,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":[Ce,"none",fe,Ya]}],leading:[{leading:[o,...j()]}],"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:[Ce,"from-font","auto",fe,Er]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Ce,"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:j()}],"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]},lb,ab]}],"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:k()}],"border-w-x":[{"border-x":k()}],"border-w-y":[{"border-y":k()}],"border-w-s":[{"border-s":k()}],"border-w-e":[{"border-e":k()}],"border-w-t":[{"border-t":k()}],"border-w-r":[{"border-r":k()}],"border-w-b":[{"border-b":k()}],"border-w-l":[{"border-l":k()}],"divide-x":[{"divide-x":k()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":k()}],"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":[Ce,fe,de]}],"outline-w":[{outline:["",Ce,kn,Er]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",u,xs,_s]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",p,xs,_s]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Ce,Er]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":k()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",m,xs,_s]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Ce,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":[Ce]}],"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":[Ce]}],"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:[Ce,fe,de]}],contrast:[{contrast:[Ce,fe,de]}],"drop-shadow":[{"drop-shadow":["","none",v,xs,_s]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Ce,fe,de]}],"hue-rotate":[{"hue-rotate":[Ce,fe,de]}],invert:[{invert:["",Ce,fe,de]}],saturate:[{saturate:[Ce,fe,de]}],sepia:[{sepia:["",Ce,fe,de]}],"backdrop-filter":[{"backdrop-filter":["","none",fe,de]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[Ce,fe,de]}],"backdrop-contrast":[{"backdrop-contrast":[Ce,fe,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ce,fe,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ce,fe,de]}],"backdrop-invert":[{"backdrop-invert":["",Ce,fe,de]}],"backdrop-opacity":[{"backdrop-opacity":[Ce,fe,de]}],"backdrop-saturate":[{"backdrop-saturate":[Ce,fe,de]}],"backdrop-sepia":[{"backdrop-sepia":["",Ce,fe,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"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:[Ce,"initial",fe,de]}],ease:[{ease:["linear","initial",_,fe,de]}],delay:[{delay:[Ce,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":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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:[Ce,kn,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 fb(bu(e))}function Yr({...e}){return d.jsx(hy,{"data-slot":"select",...e})}function Jr({...e}){return d.jsx(gy,{"data-slot":"select-value",...e})}function Xr({className:e,size:t="default",children:r,...n}){return d.jsxs(py,{"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(vy,{asChild:!0,children:d.jsx(mu,{className:"size-4 opacity-50"})})]})}function Qr({className:e,children:t,position:r="popper",...n}){return d.jsx(yy,{children:d.jsxs(by,{"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(_y,{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(hb,{})]})})}function Vt({className:e,children:t,...r}){return d.jsxs(xy,{"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($y,{children:d.jsx(fu,{className:"size-4"})})}),d.jsx(wy,{children:t})]})}function mb({className:e,...t}){return d.jsx(Sy,{"data-slot":"select-scroll-up-button",className:Se("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Ny,{className:"size-4"})})}function hb({className:e,...t}){return d.jsx(Ey,{"data-slot":"select-scroll-down-button",className:Se("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(mu,{className:"size-4"})})}const Ve=Y.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}));Ve.displayName="Input";const Ou=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Iu=bu,Du=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Iu(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=Ou(u)||Ou(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 Iu(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)},Ja=Du("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=Y.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const a=n?da:"button";return d.jsx(a,{"data-slot":"button",ref:o,className:Se(Ja({variant:t,size:r,className:e})),...s})});function pb(e,t){return E.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}):E.Children.only(r),o=qe(n.ref,vb(s));return typeof r=="function"||n.isPresent?E.cloneElement(s,{ref:o}):null};hr.displayName="Presence";function gb(e){const[t,r]=E.useState(),n=E.useRef(null),s=E.useRef(e),o=E.useRef("none"),a=e?"mounted":"unmounted",[i,c]=pb(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const l=ws(n.current);o.current=i==="mounted"?l:"none"},[i]),it(()=>{const l=n.current,u=s.current;if(u!==e){const m=o.current,v=ws(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]),it(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,p=v=>{const y=ws(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=ws(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:E.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function ws(e){return(e==null?void 0:e.animationName)||"none"}function vb(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[$s]=Tt("Tooltip",[is]),Ss=is(),Mu="TooltipProvider",yb=700,Xa="tooltip.open",[bb,Qa]=$s(Mu),Fu=e=>{const{__scopeTooltip:t,delayDuration:r=yb,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,a=E.useRef(!0),i=E.useRef(!1),c=E.useRef(0);return E.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),d.jsx(bb,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:E.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:E.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:E.useCallback(l=>{i.current=l},[]),disableHoverableContent:s,children:o})};Fu.displayName=Mu;var jn="Tooltip",[_b,Cn]=$s(jn),Vu=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s,onOpenChange:o,disableHoverableContent:a,delayDuration:i}=e,c=Qa(jn,e.__scopeTooltip),l=Ss(t),[u,p]=E.useState(null),m=ir(),v=E.useRef(0),x=a??c.disableHoverableContent,y=i??c.delayDuration,h=E.useRef(!1),[_,f]=wr({prop:n,defaultProp:s??!1,onChange:S=>{S?(c.onOpen(),document.dispatchEvent(new CustomEvent(Xa))):c.onClose(),o==null||o(S)},caller:jn}),b=E.useMemo(()=>_?h.current?"delayed-open":"instant-open":"closed",[_]),w=E.useCallback(()=>{window.clearTimeout(v.current),v.current=0,h.current=!1,f(!0)},[f]),g=E.useCallback(()=>{window.clearTimeout(v.current),v.current=0,f(!1)},[f]),$=E.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{h.current=!0,f(!0),v.current=0},y)},[y,f]);return E.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),d.jsx(yl,{...l,children:d.jsx(_b,{scope:t,contentId:m,open:_,stateAttribute:b,trigger:u,onTriggerChange:p,onTriggerEnter:E.useCallback(()=>{c.isOpenDelayedRef.current?$():w()},[c.isOpenDelayedRef,$,w]),onTriggerLeave:E.useCallback(()=>{x?g():(window.clearTimeout(v.current),v.current=0)},[g,x]),onOpen:w,onClose:g,disableHoverableContent:x,children:r})})};Vu.displayName=jn;var ei="TooltipTrigger",Lu=E.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Cn(ei,r),o=Qa(ei,r),a=Ss(r),i=E.useRef(null),c=qe(t,i,s.onTriggerChange),l=E.useRef(!1),u=E.useRef(!1),p=E.useCallback(()=>l.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),d.jsx(bl,{asChild:!0,...a,children:d.jsx(Pe.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)})})});Lu.displayName=ei;var ti="TooltipPortal",[xb,wb]=$s(ti,{forceMount:void 0}),zu=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:s}=e,o=Cn(ti,t);return d.jsx(xb,{scope:t,forceMount:r,children:d.jsx(hr,{present:r||o.open,children:d.jsx(cs,{asChild:!0,container:s,children:n})})})};zu.displayName=ti;var en="TooltipContent",qu=E.forwardRef((e,t)=>{const r=wb(en,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,a=Cn(en,e.__scopeTooltip);return d.jsx(hr,{present:n||a.open,children:a.disableHoverableContent?d.jsx(Uu,{side:s,...o,ref:t}):d.jsx($b,{side:s,...o,ref:t})})}),$b=E.forwardRef((e,t)=>{const r=Cn(en,e.__scopeTooltip),n=Qa(en,e.__scopeTooltip),s=E.useRef(null),o=qe(t,s),[a,i]=E.useState(null),{trigger:c,onClose:l}=r,u=s.current,{onPointerInTransitChange:p}=n,m=E.useCallback(()=>{i(null),p(!1)},[p]),v=E.useCallback((x,y)=>{const h=x.currentTarget,_={x:x.clientX,y:x.clientY},f=jb(_,h.getBoundingClientRect()),b=Cb(_,f),w=Rb(y.getBoundingClientRect()),g=Nb([...b,...w]);i(g),p(!0)},[p]);return E.useEffect(()=>()=>m(),[m]),E.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]),E.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=!Pb(_,a);f?m():b&&(m(),l())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,u,a,l,m]),d.jsx(Uu,{...e,ref:o})}),[Sb,Eb]=$s(jn,{isInside:!1}),kb=jc("TooltipContent"),Uu=E.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:a,...i}=e,c=Cn(en,r),l=Ss(r),{onClose:u}=c;return E.useEffect(()=>(document.addEventListener(Xa,u),()=>document.removeEventListener(Xa,u)),[u]),E.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(_l,{"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(kb,{children:n}),d.jsx(Sb,{scope:r,isInside:!0,children:d.jsx(ov,{id:c.contentId,role:"tooltip",children:s||n})})]})})});qu.displayName=en;var Bu="TooltipArrow",Wu=E.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Ss(r);return Eb(Bu,r).isInside?null:d.jsx(xl,{...s,...n,ref:t})});Wu.displayName=Bu;function jb(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 Cb(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 Rb(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 Pb(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 Nb(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),Ab(t)}function Ab(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 Tb=Fu,Ob=Vu,Ib=Lu,Db=zu,Mb=qu,Fb=Wu;function Vb({delayDuration:e=0,...t}){return d.jsx(Tb,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Hu({...e}){return d.jsx(Vb,{children:d.jsx(Ob,{"data-slot":"tooltip",...e})})}function Gu({...e}){return d.jsx(Ib,{"data-slot":"tooltip-trigger",...e})}function Ku({className:e,sideOffset:t=0,children:r,...n}){return d.jsx(Db,{children:d.jsxs(Mb,{"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(Fb,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const Lb=({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(Ve,{value:"root",disabled:!0,className:"w-40"}),d.jsxs(Yr,{disabled:!0,value:r,children:[d.jsx(Xr,{className:"w-40",children:d.jsx(Jr,{})}),d.jsx(Qr,{className:`${e} bg-background text-foreground border-input`,children:d.jsx(Vt,{value:r,children:r})})]}),d.jsx(nr,{control:o,name:"root.title",render:({field:a})=>d.jsx(Ve,{placeholder:"Title",disabled:t,className:"flex-1",...a})}),d.jsx(nr,{control:o,name:"root.description",render:({field:a})=>d.jsx(Ve,{placeholder:"Description",disabled:t,className:"flex-1",...a})}),d.jsxs(Hu,{children:[d.jsx(Gu,{asChild:!0,children:d.jsx(mr,{disabled:!0,size:"icon",children:d.jsx(gu,{})})}),d.jsx(Ku,{children:d.jsx("p",{children:"Required"})})]}),d.jsx("div",{className:"border-l-2 border-input"}),d.jsx(mr,{size:"icon",variant:"ghost",onClick:()=>s("root"),children:d.jsx(pu,{className:"text-blue-500"})}),r==="object"&&d.jsx(mr,{size:"icon",variant:"ghost",disabled:t,onClick:n,children:d.jsx(hu,{className:"text-green-500"})}),d.jsx("div",{})]})},Es={form:{width:"full",height:"md"},output:{position:"bottom",showJson:!0,width:"full",height:"md"},settings:{width:"md"},spacing:"md"},Zu={sm:"max-h-[300px]",md:"max-h-[500px]",lg:"max-h-[800px]",full:"max-h-full"},zb={sm:300,md:500,lg:800,full:void 0},ri={sm:"w-full max-w-[600px]",md:"w-full max-w-[800px]",lg:"w-full max-w-[1200px]",full:"w-full"},qb={sm:"sm:max-w-[500px]",md:"sm:max-w-[700px]",lg:"sm:max-w-[1000px]",full:"w-full sm:max-w-full"},Ub={top:"flex-col-reverse",bottom:"flex-col",left:"flex-row-reverse",right:"flex-row"},Yu={sm:"gap-2",md:"gap-4",lg:"gap-6"},Bb=["string","integer","number","boolean","object","array"],Wb=["int-32","int-64"],Hb=["float","double","big-decimal"],Gb=["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"];var ks="Dialog",[Ju,Xu]=Tt(ks),[Kb,Ct]=Ju(ks),Qu=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:a=!0}=e,i=E.useRef(null),c=E.useRef(null),[l,u]=wr({prop:n,defaultProp:s??!1,onChange:o,caller:ks});return d.jsx(Kb,{scope:t,triggerRef:i,contentRef:c,contentId:ir(),titleId:ir(),descriptionId:ir(),open:l,onOpenChange:u,onOpenToggle:E.useCallback(()=>u(p=>!p),[u]),modal:a,children:r})};Qu.displayName=ks;var ed="DialogTrigger",td=E.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ct(ed,r),o=qe(t,s.triggerRef);return d.jsx(Pe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":oi(s.open),...n,ref:o,onClick:$e(e.onClick,s.onOpenToggle)})});td.displayName=ed;var ni="DialogPortal",[Zb,rd]=Ju(ni,{forceMount:void 0}),nd=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=Ct(ni,t);return d.jsx(Zb,{scope:t,forceMount:r,children:E.Children.map(n,a=>d.jsx(hr,{present:r||o.open,children:d.jsx(cs,{asChild:!0,container:s,children:a})}))})};nd.displayName=ni;var js="DialogOverlay",sd=E.forwardRef((e,t)=>{const r=rd(js,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Ct(js,e.__scopeDialog);return o.modal?d.jsx(hr,{present:n||o.open,children:d.jsx(Jb,{...s,ref:t})}):null});sd.displayName=js;var Yb=Mr("DialogOverlay.RemoveScroll"),Jb=E.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ct(js,r);return d.jsx(Fa,{as:Yb,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(Pe.div,{"data-state":oi(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),kr="DialogContent",od=E.forwardRef((e,t)=>{const r=rd(kr,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Ct(kr,e.__scopeDialog);return d.jsx(hr,{present:n||o.open,children:o.modal?d.jsx(Xb,{...s,ref:t}):d.jsx(Qb,{...s,ref:t})})});od.displayName=kr;var Xb=E.forwardRef((e,t)=>{const r=Ct(kr,e.__scopeDialog),n=E.useRef(null),s=qe(t,r.contentRef,n);return E.useEffect(()=>{const o=n.current;if(o)return El(o)},[]),d.jsx(ad,{...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())})}),Qb=E.forwardRef((e,t)=>{const r=Ct(kr,e.__scopeDialog),n=E.useRef(!1),s=E.useRef(!1);return d.jsx(ad,{...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()}})}),ad=E.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...a}=e,i=Ct(kr,r),c=E.useRef(null),l=qe(t,c);return Tc(),d.jsxs(d.Fragment,{children:[d.jsx(va,{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":oi(i.open),...a,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(t_,{titleId:i.titleId}),d.jsx(n_,{contentRef:c,descriptionId:i.descriptionId})]})]})}),si="DialogTitle",id=E.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ct(si,r);return d.jsx(Pe.h2,{id:s.titleId,...n,ref:t})});id.displayName=si;var cd="DialogDescription",ld=E.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ct(cd,r);return d.jsx(Pe.p,{id:s.descriptionId,...n,ref:t})});ld.displayName=cd;var ud="DialogClose",dd=E.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ct(ud,r);return d.jsx(Pe.button,{type:"button",...n,ref:t,onClick:$e(e.onClick,()=>s.onOpenChange(!1))})});dd.displayName=ud;function oi(e){return e?"open":"closed"}var fd="DialogTitleWarning",[e_,md]=up(fd,{contentName:kr,titleName:si,docsSlug:"dialog"}),t_=({titleId:e})=>{const t=md(fd),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
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.
|
|
136
136
|
|
|
137
137
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
138
138
|
|
|
139
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return
|
|
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.
|
|
140
140
|
|
|
141
|
-
You can add a description to the \`${
|
|
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.
|
|
142
142
|
|
|
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 \`${
|
|
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.
|
|
144
144
|
|
|
145
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return E.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},p_=_d,g_=xd,v_=wd,y_=$d,b_=Sd,__=Rd,x_=Nd,w_=kd,$_=Cd;function S_({...e}){return d.jsx(p_,{"data-slot":"alert-dialog",...e})}function E_({...e}){return d.jsx(g_,{"data-slot":"alert-dialog-trigger",...e})}function k_({...e}){return d.jsx(v_,{"data-slot":"alert-dialog-portal",...e})}function j_({className:e,...t}){return d.jsx(y_,{"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 C_({className:e,...t}){return d.jsxs(k_,{children:[d.jsx(j_,{}),d.jsx(b_,{"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 R_({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 P_({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 N_({className:e,...t}){return d.jsx(w_,{"data-slot":"alert-dialog-title",className:Se("text-lg font-semibold",e),...t})}function A_({className:e,...t}){return d.jsx($_,{"data-slot":"alert-dialog-description",className:Se("text-muted-foreground text-sm",e),...t})}function T_({className:e,...t}){return d.jsx(__,{className:Se(Ja(),e),...t})}function O_({className:e,...t}){return d.jsx(x_,{className:Se(Ja({variant:"outline"}),e),...t})}const I_=({theme:e,readOnly:t,control:r,fieldPath:n,isSimpleType:s,isRootLevel:o,onRemove:a,onOpenSettings:i,onTypeChange:c})=>{Ar({control:r,name:`${n}.schema.type`});const l=Ar({control:r,name:`${n}.key`});return d.jsxs("div",{className:"p-2 flex gap-2",children:[s&&d.jsx(nr,{control:r,name:`${n}.key`,render:({field:u})=>d.jsx(Ve,{placeholder:"field_name",disabled:t,className:"w-40",...u})}),d.jsx(nr,{control:r,name:`${n}.schema.type`,render:({field:u})=>d.jsxs(Yr,{disabled:t,onValueChange:p=>{u.onChange(p),c(p)},value:u.value,children:[d.jsx(Xr,{className:"w-40",children:d.jsx(Jr,{})}),d.jsx(Qr,{className:`${e} bg-background text-foreground border-input`,children:Bb.map(p=>d.jsx(Vt,{value:p,children:p},p))})]})}),d.jsx(nr,{control:r,name:`${n}.schema.title`,render:({field:u})=>d.jsx(Ve,{placeholder:"Title",disabled:t,className:"flex-1",...u})}),d.jsx(nr,{control:r,name:`${n}.schema.description`,render:({field:u})=>d.jsx(Ve,{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(Hu,{children:[d.jsx(Gu,{asChild:!0,children:d.jsx(mr,{disabled:t,size:"icon",variant:u.value?"default":"outline",onClick:()=>{u.onChange(!u.value)},children:d.jsx(gu,{})})}),d.jsx(Ku,{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(pu,{className:"text-blue-500"})}),o&&d.jsxs(S_,{children:[d.jsx(E_,{asChild:!0,children:d.jsx(mr,{size:"icon",variant:"ghost",disabled:t,children:d.jsx(Ty,{className:"text-red-500"})})}),d.jsxs(C_,{className:Se("border-input",e),children:[d.jsxs(R_,{children:[d.jsx(N_,{className:"text-foreground",children:"Are you absolutely sure?"}),d.jsxs(A_,{children:["This action cannot be undone. This will permanently delete field"," ",l,"."]})]}),d.jsxs(P_,{children:[d.jsx(O_,{className:"text-foreground",children:"Cancel"}),d.jsx(T_,{onClick:a,children:"Delete"})]})]})]})]})},Cs=({theme:e,readOnly:t,fieldPath:r,onRemove:n,onOpenSettings:s,isSimpleType:o=!0,isRootLevel:a=!1})=>{const{control:i,setValue:c}=at(),l=Ar({control:i,name:`${r}.schema.type`}),{fields:u,append:p,remove:m}=wc({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(I_,{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(Cs,{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(hu,{})," Add Field"]})]}),l==="array"&&d.jsx("div",{className:"ml-2 pl-2 border-l-2 border-input mr-11",children:d.jsx(Cs,{theme:e,readOnly:t,fieldPath:`${r}.schema.items`,onRemove:()=>{},onOpenSettings:s,isSimpleType:!1})})]},`${r}-${l}`)};function D_({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(Cs,{readOnly:t,theme:e,fieldPath:`properties.${a}`,onRemove:()=>n(a),onOpenSettings:s,isRootLevel:!0},o.fieldId))})}var M_="Label",Ad=E.forwardRef((e,t)=>d.jsx(Pe.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())}}));Ad.displayName=M_;var F_=Ad;function V_({className:e,...t}){return d.jsx(F_,{"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 Td=Y.createContext({}),Te=({...e})=>d.jsx(Td.Provider,{value:{name:e.name},children:d.jsx(nr,{...e})}),ii=()=>{const e=Y.useContext(Td),t=Y.useContext(Od),{getFieldState:r}=at(),n=sc({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}},Od=Y.createContext({});function Ee({className:e,...t}){const r=Y.useId();return d.jsx(Od.Provider,{value:{id:r},children:d.jsx("div",{"data-slot":"form-item",className:Se("grid gap-2",e),...t})})}function ke({className:e,...t}){const{error:r,formItemId:n}=ii();return d.jsx(V_,{"data-slot":"form-label","data-error":!!r,className:Se("data-[error=true]:text-destructive",e),htmlFor:n,...t})}function Ne({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:s}=ii();return d.jsx(da,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${s}`:`${n}`,"aria-invalid":!!t,...e})}function Ae({className:e,...t}){const{error:r,formMessageId:n}=ii(),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 Rs="Checkbox",[L_]=Tt(Rs),[z_,ci]=L_(Rs);function q_(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:Rs}),[x,y]=E.useState(null),[h,_]=E.useState(null),f=E.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(z_,{scope:t,...w,children:U_(p)?p(w):n})}var Id="CheckboxTrigger",Dd=E.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}=ci(Id,e),y=qe(s,u),h=E.useRef(c);return E.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(Pe.button,{type:"button",role:"checkbox","aria-checked":pr(c)?"mixed":c,"aria-required":l,"data-state":qd(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())})})});Dd.displayName=Id;var Md=E.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(q_,{__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(Dd,{...p,ref:t,__scopeCheckbox:r}),m&&d.jsx(zd,{__scopeCheckbox:r})]})})});Md.displayName=Rs;var Fd="CheckboxIndicator",Vd=E.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...s}=e,o=ci(Fd,r);return d.jsx(hr,{present:n||pr(o.checked)||o.checked===!0,children:d.jsx(Pe.span,{"data-state":qd(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});Vd.displayName=Fd;var Ld="CheckboxBubbleInput",zd=E.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}=ci(Ld,e),x=qe(r,v),y=Aa(o),h=Ra(n);E.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 S=new Event("click",{bubbles:$});f.indeterminate=pr(o),g.call(f,pr(o)?!1:o),f.dispatchEvent(S)}},[m,y,o,s]);const _=E.useRef(pr(o)?!1:o);return d.jsx(Pe.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%)"}})});zd.displayName=Ld;function U_(e){return typeof e=="function"}function pr(e){return e==="indeterminate"}function qd(e){return pr(e)?"indeterminate":e?"checked":"unchecked"}function Ps({className:e,...t}){return d.jsx(Md,{"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(Vd,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:d.jsx(fu,{className:"size-3.5"})})})}const B_=Du("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 s=r?da:"span";return d.jsx(s,{"data-slot":"badge",className:Se(B_({variant:t}),e),...n})}const W_=/[\n#?=&\t,./-]+/,H_=/^[^a-zA-Z0-9]*|[^a-zA-Z0-9]*$/g,G_=Y.createContext(null),Rn=Y.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]=Y.useState(-1),[v,x]=Y.useState(""),[y,h]=Y.useState(i),[_,f]=Y.useState(i),[b,w]=Y.useState(!1),[g,$]=Y.useState(""),S=o??0,j=s??1/0,I=Y.useCallback(Z=>{!t.includes(Z)&&t.length<j&&r([...t,Z])},[t]),z=Y.useCallback(Z=>{t.includes(Z)&&t.length>S&&r(t.filter(ae=>ae!==Z))},[t]),M=Y.useCallback(Z=>{Z.preventDefault();const ae=Z.clipboardData.getData("text").split(W_),L=[...t];ae.forEach(ve=>{const G=ve.replaceAll(H_,"").trim();G.length>0&&!L.includes(G)&&L.length<j&&L.push(G)}),r(L),x("")},[t]),F=Y.useCallback(Z=>{const ae=Z.currentTarget,L=ae.value.substring(ae.selectionStart??0,ae.selectionEnd??0);$(L),w(L===v)},[v]);Y.useEffect(()=>{(()=>{i==!1&&(t.length-1>=S?f(!1):f(!0),t.length+1<=j?h(!1):h(!0))})()},[t]);const V=Y.useCallback(async Z=>{Z.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=Z.currentTarget;switch(Z.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()!==""&&(Z.preventDefault(),I(v),x(""));break}},[p,t,v,z]),W=Y.useCallback(Z=>{Z.preventDefault(),Z.stopPropagation()},[]),re=Y.useCallback(Z=>{x(Z.currentTarget.value)},[]);return d.jsx(G_.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((Z,ae)=>d.jsxs(Ud,{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:Z}),d.jsxs("button",{type:"button","aria-label":`Remove ${Z} option`,"aria-roledescription":"button to remove option",disabled:_,onMouseDown:W,onClick:()=>z(Z),className:"disabled:cursor-not-allowed",children:[d.jsxs("span",{className:"sr-only",children:["Remove ",Z," option"]}),d.jsx(vu,{className:"h-4 w-4 hover:stroke-destructive"})]})]},Z)),d.jsx(Ve,{tabIndex:0,"aria-label":"input tag",disabled:y,onKeyDown:V,onPaste:M,value:v,onSelect:F,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 K_=({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(ke,{children:"Default Value"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})}),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(ke,{children:"Minimum Value"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})}),d.jsx(Te,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(ke,{children:"Maximum Value"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})})]}),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(ke,{children:"Exclusive Minimum"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})}),d.jsx(Te,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(ke,{children:"Exclusive Maximum"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})})]}),d.jsx(Te,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(ke,{children:"Multiple Of"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})}),d.jsx(Te,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(ke,{children:"Format"}),d.jsxs(Yr,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Ne,{children:d.jsx(Xr,{children:d.jsx(Jr,{placeholder:"Choose data type"})})}),d.jsxs(Qr,{className:`${e} bg-background text-foreground border-input`,children:[d.jsx(Vt,{value:"none",children:"none"}),Hb.map(i=>d.jsx(Vt,{value:i,children:i},i))]})]}),d.jsx(Ae,{})]})}),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(Ne,{children:d.jsx(Ps,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(ke,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ae,{})]})}),o&&d.jsx(Te,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(ke,{children:"Enum Values"}),d.jsx(Ne,{children:d.jsx(Rn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ae,{})]})})]})},Z_=({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(ke,{children:"Default Value"}),d.jsx(Ne,{children:d.jsx(Ve,{disabled:r,...a})}),d.jsx(Ae,{})]})}),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(ke,{children:"Minimum Length"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})}),d.jsx(Te,{control:n,name:`${t}.maxLength`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(ke,{children:"Maximum Length"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})})]}),d.jsx(Te,{control:n,name:`${t}.pattern`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(ke,{children:"Pattern (Regular Expression)"}),d.jsx(Ne,{children:d.jsx(Ve,{disabled:r,...a})}),d.jsx(Ae,{})]})}),d.jsx(Te,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(ke,{children:"Format"}),d.jsxs(Yr,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Ne,{children:d.jsx(Xr,{children:d.jsx(Jr,{placeholder:"Choose data type"})})}),d.jsxs(Qr,{className:`${e} bg-background text-foreground border-input`,children:[d.jsx(Vt,{value:"none",children:"none"}),Gb.map(i=>d.jsx(Vt,{value:i,children:i},i))]})]}),d.jsx(Ae,{})]})}),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(Ne,{children:d.jsx(Ps,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(ke,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ae,{})]})}),o&&d.jsx(Te,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(ke,{children:"Enum Values"}),d.jsx(Ne,{children:d.jsx(Rn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ae,{})]})})]})},Y_=({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(ke,{children:"Default Value"}),d.jsxs(Yr,{onValueChange:s.onChange,defaultValue:s.value,disabled:r,children:[d.jsx(Ne,{children:d.jsx(Xr,{children:d.jsx(Jr,{placeholder:"False"})})}),d.jsxs(Qr,{className:`${e} bg-background text-foreground border-input`,children:[d.jsx(Vt,{value:"true",children:"True"}),d.jsx(Vt,{value:"false",children:"False"})]})]}),d.jsx(Ae,{})]})})})},J_=({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(ke,{children:"Minimum Items"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ae,{})]})}),d.jsx(Te,{control:r,name:`${e}.maxItems`,render:({field:n})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(ke,{children:"Maximum Items"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ae,{})]})})]}),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(ke,{children:"Minimum Contains"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ae,{})]})}),d.jsx(Te,{control:r,name:`${e}.maxContains`,render:({field:n})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(ke,{children:"Maximum Contains"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:t,...n,value:n.value??"",onChange:s=>n.onChange(s.target.value===""?null:Number(s.target.value))})}),d.jsx(Ae,{})]})})]}),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(Ne,{children:d.jsx(Ps,{checked:n.value,onCheckedChange:n.onChange,disabled:t})}),d.jsx(ke,{className:"ml-2",children:"Unique Items"}),d.jsx(Ae,{})]})})]})},X_=({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(ke,{children:"Default Value"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})}),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(ke,{children:"Minimum Value"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})}),d.jsx(Te,{control:n,name:`${t}.maximum`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(ke,{children:"Maximum Value"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})})]}),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(ke,{children:"Exclusive Minimum"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})}),d.jsx(Te,{control:n,name:`${t}.exclusiveMax`,render:({field:a})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(ke,{children:"Exclusive Maximum"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})})]}),d.jsx(Te,{control:n,name:`${t}.multipleOf`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(ke,{children:"Multiple Of"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:r,...a,onChange:i=>a.onChange(i.target.value===""?null:Number(i.target.value))})}),d.jsx(Ae,{})]})}),d.jsx(Te,{control:n,name:`${t}.format`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(ke,{children:"Format"}),d.jsxs(Yr,{onValueChange:a.onChange,defaultValue:a.value,disabled:r,children:[d.jsx(Ne,{children:d.jsx(Xr,{children:d.jsx(Jr,{placeholder:"Choose data type"})})}),d.jsxs(Qr,{className:`${e} bg-background text-foreground border-input`,children:[d.jsx(Vt,{value:"none",children:"none"}),Wb.map(i=>d.jsx(Vt,{value:i,children:i},i))]})]}),d.jsx(Ae,{})]})}),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(Ne,{children:d.jsx(Ps,{disabled:r,...a,checked:a.value,onCheckedChange:a.onChange})}),d.jsx(ke,{className:"ml-2",children:"Enable Enum"}),d.jsx(Ae,{})]})}),o&&d.jsx(Te,{control:n,name:`${t}.enumInput`,render:({field:a})=>d.jsxs(Ee,{children:[d.jsx(ke,{children:"Enum Values"}),d.jsx(Ne,{children:d.jsx(Rn,{disabled:r,value:a.value||[],onValueChange:a.onChange,placeholder:"Enter your enums"})}),d.jsx(Ae,{})]})})]})};var Ns={exports:{}},li={},Yt={},jr={},ui={},di={},fi={},Bd;function As(){return Bd||(Bd=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})(fi)),fi}var mi={},Wd;function Hd(){return Wd||(Wd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=As();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})(mi)),mi}var Gd;function we(){return Gd||(Gd=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=As(),r=Hd();var n=As();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=Hd();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(k,R){return this}}class a extends o{constructor(k,R,q){super(),this.varKind=k,this.name=R,this.rhs=q}render({es5:k,_n:R}){const q=k?r.varKinds.var:this.varKind,B=this.rhs===void 0?"":` = ${this.rhs}`;return`${q} ${this.name}${B};`+R}optimizeNames(k,R){if(k[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,k,R)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends o{constructor(k,R,q){super(),this.lhs=k,this.rhs=R,this.sideEffects=q}render({_n:k}){return`${this.lhs} = ${this.rhs};`+k}optimizeNames(k,R){if(!(this.lhs instanceof t.Name&&!k[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,k,R),this}get names(){const k=this.lhs instanceof t.Name?{}:{...this.lhs.names};return V(k,this.rhs)}}class c extends i{constructor(k,R,q,B){super(k,q,B),this.op=R}render({_n:k}){return`${this.lhs} ${this.op}= ${this.rhs};`+k}}class l extends o{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`${this.label}:`+k}}class u extends o{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`break${this.label?` ${this.label}`:""};`+k}}class p extends o{constructor(k){super(),this.error=k}render({_n:k}){return`throw ${this.error};`+k}get names(){return this.error.names}}class m extends o{constructor(k){super(),this.code=k}render({_n:k}){return`${this.code};`+k}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(k,R){return this.code=W(this.code,k,R),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends o{constructor(k=[]){super(),this.nodes=k}render(k){return this.nodes.reduce((R,q)=>R+q.render(k),"")}optimizeNodes(){const{nodes:k}=this;let R=k.length;for(;R--;){const q=k[R].optimizeNodes();Array.isArray(q)?k.splice(R,1,...q):q?k[R]=q:k.splice(R,1)}return k.length>0?this:void 0}optimizeNames(k,R){const{nodes:q}=this;let B=q.length;for(;B--;){const Q=q[B];Q.optimizeNames(k,R)||(re(k,Q.names),q.splice(B,1))}return q.length>0?this:void 0}get names(){return this.nodes.reduce((k,R)=>F(k,R.names),{})}}class x extends v{render(k){return"{"+k._n+super.render(k)+"}"+k._n}}class y extends v{}class h extends x{}h.kind="else";class _ extends x{constructor(k,R){super(R),this.condition=k}render(k){let R=`if(${this.condition})`+super.render(k);return this.else&&(R+="else "+this.else.render(k)),R}optimizeNodes(){super.optimizeNodes();const k=this.condition;if(k===!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 k===!1?R instanceof _?R:R.nodes:this.nodes.length?this:new _(Z(k),R instanceof _?[R]:R.nodes);if(!(k===!1||!this.nodes.length))return this}optimizeNames(k,R){var q;if(this.else=(q=this.else)===null||q===void 0?void 0:q.optimizeNames(k,R),!!(super.optimizeNames(k,R)||this.else))return this.condition=W(this.condition,k,R),this}get names(){const k=super.names;return V(k,this.condition),this.else&&F(k,this.else.names),k}}_.kind="if";class f extends x{}f.kind="for";class b extends f{constructor(k){super(),this.iteration=k}render(k){return`for(${this.iteration})`+super.render(k)}optimizeNames(k,R){if(super.optimizeNames(k,R))return this.iteration=W(this.iteration,k,R),this}get names(){return F(super.names,this.iteration.names)}}class w extends f{constructor(k,R,q,B){super(),this.varKind=k,this.name=R,this.from=q,this.to=B}render(k){const R=k.es5?r.varKinds.var:this.varKind,{name:q,from:B,to:Q}=this;return`for(${R} ${q}=${B}; ${q}<${Q}; ${q}++)`+super.render(k)}get names(){const k=V(super.names,this.from);return V(k,this.to)}}class g extends f{constructor(k,R,q,B){super(),this.loop=k,this.varKind=R,this.name=q,this.iterable=B}render(k){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(k)}optimizeNames(k,R){if(super.optimizeNames(k,R))return this.iterable=W(this.iterable,k,R),this}get names(){return F(super.names,this.iterable.names)}}class $ extends x{constructor(k,R,q){super(),this.name=k,this.args=R,this.async=q}render(k){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(k)}}$.kind="func";class S extends v{render(k){return"return "+super.render(k)}}S.kind="return";class j extends x{render(k){let R="try"+super.render(k);return this.catch&&(R+=this.catch.render(k)),this.finally&&(R+=this.finally.render(k)),R}optimizeNodes(){var k,R;return super.optimizeNodes(),(k=this.catch)===null||k===void 0||k.optimizeNodes(),(R=this.finally)===null||R===void 0||R.optimizeNodes(),this}optimizeNames(k,R){var q,B;return super.optimizeNames(k,R),(q=this.catch)===null||q===void 0||q.optimizeNames(k,R),(B=this.finally)===null||B===void 0||B.optimizeNames(k,R),this}get names(){const k=super.names;return this.catch&&F(k,this.catch.names),this.finally&&F(k,this.finally.names),k}}class I extends x{constructor(k){super(),this.error=k}render(k){return`catch(${this.error})`+super.render(k)}}I.kind="catch";class z extends x{render(k){return"finally"+super.render(k)}}z.kind="finally";class M{constructor(k,R={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...R,_n:R.lines?`
|
|
146
|
-
`:""},this._extScope=k,this._scope=new r.Scope({parent:k}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(k){return this._scope.name(k)}scopeName(k){return this._extScope.name(k)}scopeValue(k,R){const q=this._extScope.value(k,R);return(this._values[q.prefix]||(this._values[q.prefix]=new Set)).add(q),q}getScopeValue(k,R){return this._extScope.getValue(k,R)}scopeRefs(k){return this._extScope.scopeRefs(k,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(k,R,q,B){const Q=this._scope.toName(R);return q!==void 0&&B&&(this._constants[Q.str]=q),this._leafNode(new a(k,Q,q)),Q}const(k,R,q){return this._def(r.varKinds.const,k,R,q)}let(k,R,q){return this._def(r.varKinds.let,k,R,q)}var(k,R,q){return this._def(r.varKinds.var,k,R,q)}assign(k,R,q){return this._leafNode(new i(k,R,q))}add(k,R){return this._leafNode(new c(k,e.operators.ADD,R))}code(k){return typeof k=="function"?k():k!==t.nil&&this._leafNode(new m(k)),this}object(...k){const R=["{"];for(const[q,B]of k)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(k,R,q){if(this._blockNode(new _(k)),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(k){return this._elseNode(new _(k))}else(){return this._elseNode(new h)}endIf(){return this._endBlockNode(_,h)}_for(k,R){return this._blockNode(k),R&&this.code(R).endFor(),this}for(k,R){return this._for(new b(k),R)}forRange(k,R,q,B,Q=this.opts.es5?r.varKinds.var:r.varKinds.let){const pe=this._scope.toName(k);return this._for(new w(Q,pe,R,q),()=>B(pe))}forOf(k,R,q,B=r.varKinds.const){const Q=this._scope.toName(k);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(k,R,q,B=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(k,(0,t._)`Object.keys(${R})`,q);const Q=this._scope.toName(k);return this._for(new g("in",B,Q,R),()=>q(Q))}endFor(){return this._endBlockNode(f)}label(k){return this._leafNode(new l(k))}break(k){return this._leafNode(new u(k))}return(k){const R=new S;if(this._blockNode(R),this.code(k),R.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(k,R,q){if(!R&&!q)throw new Error('CodeGen: "try" without "catch" and "finally"');const B=new j;if(this._blockNode(B),this.code(k),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(k){return this._leafNode(new p(k))}block(k,R){return this._blockStarts.push(this._nodes.length),k&&this.code(k).endBlock(R),this}endBlock(k){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||k!==void 0&&q!==k)throw new Error(`CodeGen: wrong number of nodes: ${q} vs ${k} expected`);return this._nodes.length=R,this}func(k,R=t.nil,q,B){return this._blockNode(new $(k,R,q)),B&&this.code(B).endFunc(),this}endFunc(){return this._endBlockNode($)}optimize(k=1){for(;k-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(k){return this._currNode.nodes.push(k),this}_blockNode(k){this._currNode.nodes.push(k),this._nodes.push(k)}_endBlockNode(k,R){const q=this._currNode;if(q instanceof k||R&&q instanceof R)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${R?`${k.kind}/${R.kind}`:k.kind}"`)}_elseNode(k){const R=this._currNode;if(!(R instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=R.else=k,this}get _root(){return this._nodes[0]}get _currNode(){const k=this._nodes;return k[k.length-1]}set _currNode(k){const R=this._nodes;R[R.length-1]=k}}e.CodeGen=M;function F(O,k){for(const R in k)O[R]=(O[R]||0)+(k[R]||0);return O}function V(O,k){return k instanceof t._CodeOrName?F(O,k.names):O}function W(O,k,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||k[Q.str]!==1?Q:(delete k[Q.str],pe)}function B(Q){return Q instanceof t._Code&&Q._items.some(pe=>pe instanceof t.Name&&k[pe.str]===1&&R[pe.str]!==void 0)}}function re(O,k){for(const R in k)O[R]=(O[R]||0)-(k[R]||0)}function Z(O){return typeof O=="boolean"||typeof O=="number"||O===null?!O:(0,t._)`!${K(O)}`}e.not=Z;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(k,R)=>k===t.nil?R:R===t.nil?k:(0,t._)`${K(k)} ${O} ${K(R)}`}function K(O){return O instanceof t.Name?O:(0,t._)`(${O})`}})(di)),di}var Re={},Kd;function Oe(){if(Kd)return Re;Kd=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=As();function r(g){const $={};for(const S of g)$[S]=!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:S,self:j}=g;if(!S.strictSchema||typeof $=="boolean")return;const I=j.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 S in g)if($[S])return!0;return!1}Re.schemaHasRules=o;function a(g,$){if(typeof g=="boolean")return!g;for(const S in g)if(S!=="$ref"&&$.all[S])return!0;return!1}Re.schemaHasRulesButRef=a;function i({topSchemaRef:g,schemaPath:$},S,j,I){if(!I){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,e._)`${S}`}return(0,e._)`${g}${$}${(0,e.getProperty)(j)}`}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 S of g)$(S);else $(g)}Re.eachItem=m;function v({mergeNames:g,mergeToName:$,mergeValues:S,resultToName:j}){return(I,z,M,F)=>{const V=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):S(z,M);return F===e.Name&&!(V instanceof e.Name)?j(I,V):V}}Re.mergeEvaluated={props:v({mergeNames:(g,$,S)=>g.if((0,e._)`${S} !== true && ${$} !== undefined`,()=>{g.if((0,e._)`${$} === true`,()=>g.assign(S,!0),()=>g.assign(S,(0,e._)`${S} || {}`).code((0,e._)`Object.assign(${S}, ${$})`))}),mergeToName:(g,$,S)=>g.if((0,e._)`${S} !== true`,()=>{$===!0?g.assign(S,!0):(g.assign(S,(0,e._)`${S} || {}`),y(g,S,$))}),mergeValues:(g,$)=>g===!0?!0:{...g,...$},resultToName:x}),items:v({mergeNames:(g,$,S)=>g.if((0,e._)`${S} !== true && ${$} !== undefined`,()=>g.assign(S,(0,e._)`${$} === true ? true : ${S} > ${$} ? ${S} : ${$}`)),mergeToName:(g,$,S)=>g.if((0,e._)`${S} !== true`,()=>g.assign(S,$===!0?!0:(0,e._)`${S} > ${$} ? ${S} : ${$}`)),mergeValues:(g,$)=>g===!0?!0:Math.max(g,$),resultToName:(g,$)=>g.var("items",$)})};function x(g,$){if($===!0)return g.var("props",!0);const S=g.var("props",(0,e._)`{}`);return $!==void 0&&y(g,S,$),S}Re.evaluatedPropsToName=x;function y(g,$,S){Object.keys(S).forEach(j=>g.assign((0,e._)`${$}${(0,e.getProperty)(j)}`,!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,$,S){if(g instanceof e.Name){const j=$===f.Num;return S?j?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:j?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,e.getProperty)(g).toString():"/"+u(g)}Re.getErrorPath=b;function w(g,$,S=g.opts.strictSchema){if(S){if($=`strict mode: ${$}`,S===!0)throw new Error($);g.self.logger.warn($)}}return Re.checkStrictMode=w,Re}var Ts={},Zd;function Rt(){if(Zd)return Ts;Zd=1,Object.defineProperty(Ts,"__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 Ts.default=t,Ts}var Yd;function Os(){return Yd||(Yd=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=Rt();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:S}=w,j=p(h,_,f);b??($||S)?c(g,j):l(w,(0,t._)`[${j}]`)}e.reportError=s;function o(h,_=e.keywordError,f){const{it:b}=h,{gen:w,compositeRule:g,allErrors:$}=b,S=p(h,_,f);c(w,S),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,S=>{h.const($,(0,t._)`${n.default.vErrors}[${S}]`),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:S}=h,{opts:j,propertyName:I,topSchemaRef:z,schemaPath:M}=S;b.push([u.keyword,w],[u.params,typeof _=="function"?_(h):_||(0,t._)`{}`]),j.messages&&b.push([u.message,typeof f=="function"?f(h):f]),j.verbose&&b.push([u.schema,$],[u.parentSchema,(0,t._)`${z}${M}`],[n.default.data,g]),I&&b.push([u.propertyName,I])}})(ui)),ui}var Jd;function Q_(){if(Jd)return jr;Jd=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.boolOrEmptySchema=jr.topBoolOrEmptySchema=void 0;const e=Os(),t=we(),r=Rt(),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))}jr.topBoolOrEmptySchema=s;function o(i,c){const{gen:l,schema:u}=i;u===!1?(l.var(c,!1),a(i)):l.var(c,!0)}jr.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 jr}var st={},Cr={},Xd;function Qd(){if(Xd)return Cr;Xd=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.getRules=Cr.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)}Cr.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 Cr.getRules=n,Cr}var Jt={},ef;function tf(){if(ef)return Jt;ef=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 rf;function Is(){if(rf)return st;rf=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=Qd(),t=tf(),r=Os(),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,S=u(b,$.coerceTypes),j=b.length>0&&!(S.length===0&&b.length===1&&(0,t.schemaHasRulesForType)(f,b[0]));if(j){const I=x(b,g,$.strictNumbers,o.Wrong);w.if(I,()=>{S.length?p(f,b,S):h(f)})}return j}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:S}=f,j=g.let("dataType",(0,n._)`typeof ${$}`),I=g.let("coerced",(0,n._)`undefined`);S.coerceTypes==="array"&&g.if((0,n._)`${j} == 'object' && Array.isArray(${$}) && ${$}.length == 1`,()=>g.assign($,(0,n._)`${$}[0]`).assign(j,(0,n._)`typeof ${$}`).if(x(b,$,S.strictNumbers),()=>g.assign(I,$))),g.if((0,n._)`${I} !== undefined`);for(const M of w)(l.has(M)||M==="array"&&S.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._)`${j} == "number" || ${j} == "boolean"`).assign(I,(0,n._)`"" + ${$}`).elseIf((0,n._)`${$} === null`).assign(I,(0,n._)`""`);return;case"number":g.elseIf((0,n._)`${j} == "boolean" || ${$} === null
|
|
147
|
-
|| (${
|
|
148
|
-
|| (${
|
|
149
|
-
|| ${j} === "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 S;switch(f){case"null":return(0,n._)`${b} ${$} null`;case"array":S=(0,n._)`Array.isArray(${b})`;break;case"object":S=(0,n._)`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":S=j((0,n._)`!(${b} % 1) && !isNaN(${b})`);break;case"number":S=j();break;default:return(0,n._)`typeof ${b} ${$} ${f}`}return g===o.Correct?S:(0,n.not)(S);function j(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 S=(0,s.toHash)(f);if(S.array&&S.object){const j=(0,n._)`typeof ${b} != "object"`;$=S.null?j:(0,n._)`!${b} || ${j}`,delete S.null,delete S.array,delete S.object}else $=n.nil;S.number&&delete S.integer;for(const j in S)$=(0,n.and)($,v(j,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={},nf;function e0(){if(nf)return Pn;nf=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 Pt={},We={},sf;function Nt(){if(sf)return We;sf=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=Rt(),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(S=>(0,e.and)(u(f,b,S,w.ownProperties),(0,e._)`${$} = ${S}`)))}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:S},it:j},I,z,M){const F=M?(0,e._)`${f}, ${b}, ${g}${$}`:b,V=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,S)],[r.default.parentData,j.parentData],[r.default.parentDataProperty,j.parentDataProperty],[r.default.rootData,r.default.rootData]];j.opts.dynamicRef&&V.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const W=(0,e._)`${F}, ${w.object(...V)}`;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,S=$(w,g);return f.scopeValue("pattern",{key:S.toString(),ref:S,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,S=b.name("valid");if($.allErrors){const I=b.let("valid",!0);return j(()=>b.assign(I,!1)),I}return b.var(S,!0),j(()=>b.break()),S;function j(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},S),b.if((0,e.not)(S),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 j=b.let("valid",!1),I=b.name("_valid");b.block(()=>w.forEach((z,M)=>{const F=f.subschema({keyword:g,schemaProp:M,compositeRule:!0},I);b.assign(j,(0,e._)`${j} || ${I}`),f.mergeValidEvaluated(F,I)||b.if((0,e.not)(j))})),f.result(j,()=>f.reset(),()=>f.error(!0))}return We.validateUnion=_,We}var of;function t0(){if(of)return Pt;of=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.validateKeywordUsage=Pt.validSchemaType=Pt.funcKeywordCode=Pt.macroKeywordCode=void 0;const e=we(),t=Rt(),r=Nt(),n=Os();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))}Pt.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),S=y.let("valid");m.block$data(S,j),m.ok((x=v.valid)!==null&&x!==void 0?x:S);function j(){if(v.errors===!1)M(),v.modifying&&a(m),F(()=>m.error());else{const V=v.async?I():z();v.modifying&&a(m),F(()=>i(m,V))}}function I(){const V=y.let("ruleErrs",null);return y.try(()=>M((0,e._)`await `),W=>y.assign(S,!1).if((0,e._)`${W} instanceof ${w.ValidationError}`,()=>y.assign(V,(0,e._)`${W}.errors`),()=>y.throw(W))),V}function z(){const V=(0,e._)`${$}.errors`;return y.assign(V,null),M(e.nil),V}function M(V=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(S,(0,e._)`${V}${(0,r.callValidateCode)(m,$,W,re)}`,v.modifying)}function F(V){var W;y.if((0,e.not)((W=v.valid)!==null&&W!==void 0?W:S),V)}}Pt.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")}Pt.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 Pt.validateKeywordUsage=p,Pt}var Xt={},af;function r0(){if(af)return Xt;af=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={},hi,cf;function lf(){return cf||(cf=1,hi=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}),hi}var pi={exports:{}},uf;function n0(){if(uf)return pi.exports;uf=1;var e=pi.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 pi.exports}var df;function Ds(){if(df)return lt;df=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=lf(),r=n0(),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),$={},S=new Set;return r(y,{allKeys:!0},(z,M,F,V)=>{if(V===void 0)return;const W=g+M;let re=w[V];typeof z[_]=="string"&&(re=Z.call(this,z[_])),ae.call(this,z.$anchor),ae.call(this,z.$dynamicAnchor),w[M]=re;function Z(L){const ve=this.opts.uriResolver.resolve;if(L=p(re?ve(re,L):L),S.has(L))throw I(L);S.add(L);let G=this.refs[L];return typeof G=="string"&&(G=this.refs[G]),typeof G=="object"?j(z,G.schema,L):L!==p(W)&&(L[0]==="#"?(j(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}"`);Z.call(this,`#${L}`)}}}),$;function j(z,M,F){if(M!==void 0&&!t(z,M))throw I(F)}function I(z){return new Error(`reference "${z}" resolves to more than one schema`)}}return lt.getSchemaRefs=x,lt}var ff;function Nn(){if(ff)return Yt;ff=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.getData=Yt.KeywordCxt=Yt.validateFunctionCode=void 0;const e=Q_(),t=Is(),r=tf(),n=Is(),s=e0(),o=t0(),a=r0(),i=we(),c=Rt(),l=Ds(),u=Oe(),p=Os();function m(N){if(g(N)&&(S(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&&V(N),z(N),J.let(c.default.vErrors,null),J.let(c.default.errors,0),H.unevaluated&&_(N),j(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)&&(S(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&&V(N),M(N),F(N);const ye=J.const("_errs",c.default.errors);j(N,ye),J.var(A,(0,i._)`${ye} === ${c.default.errors}`)}function S(N){(0,u.checkUnknownRules)(N),I(N)}function j(N,A){if(N.opts.jtd)return Z(N,[],!1,A);const H=(0,t.getSchemaTypes)(N.schema),J=(0,t.coerceAndCheckDataType)(N,H);Z(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 F(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function V({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 Z(N,A,H,J){const{gen:le,schema:ye,data:He,allErrors:ot,opts:Ge,self:C}=N,{RULES:D}=C;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(",")}"`)}),k(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 k(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 C=pe.exec(N);if(!C)throw new Error(`Invalid JSON-pointer: ${N}`);const D=+C[1];if(le=C[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 C of ot)C&&(ye=(0,i._)`${ye}${(0,i.getProperty)((0,u.unescapeJsonPointer)(C))}`,He=(0,i._)`${He} && ${ye}`);return He;function Ge(C,D){return`Cannot access ${C} ${D} levels up, current level is ${A}`}}return Yt.getData=ie,Yt}var Ms={},mf;function Fs(){if(mf)return Ms;mf=1,Object.defineProperty(Ms,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Ms.default=e,Ms}var Vs={},hf;function An(){if(hf)return Vs;hf=1,Object.defineProperty(Vs,"__esModule",{value:!0});const e=Ds();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 Vs.default=t,Vs}var bt={},pf;function Ls(){if(pf)return bt;pf=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.resolveSchema=bt.getCompilingSchema=bt.resolveRef=bt.compileSchema=bt.SchemaEnv=void 0;const e=we(),t=Fs(),r=Rt(),n=Ds(),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 S;h.$async&&(S=$.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=$.scopeName("validate");h.validateName=j;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:j,ValidationError:S,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 V=new Function(`${r.default.self}`,`${r.default.scope}`,z)(this,this.scope.get());if(this.scope.value(j,{ref:V}),V.errors=null,V.schema=h.schema,V.schemaEnv=h,h.$async&&(V.$async=!0),this.opts.code.source===!0&&(V.source={validateName:j,validateCode:M,scopeValues:$._values}),this.opts.unevaluated){const{props:W,items:re}=I;V.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},V.source&&(V.source.evaluated=(0,e.stringify)(V.evaluated))}return h.validate=V,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:S}=this.opts;$&&(g=new a({schema:$,schemaId:S,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 S=v.call(this,h,$);return typeof(S==null?void 0:S.schema)!="object"?void 0:y.call(this,f,S)}if(typeof($==null?void 0:$.schema)=="object"){if($.validate||i.call(this,$),g===(0,n.normalizeId)(_)){const{schema:S}=$,{schemaId:j}=this.opts,I=S[j];return I&&(w=(0,n.resolveUrl)(this.opts.uriResolver,w,I)),new a({schema:S,schemaId:j,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 S of h.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const j=f[(0,s.unescapeFragment)(S)];if(j===void 0)return;f=j;const I=typeof f=="object"&&f[this.opts.schemaId];!x.has(S)&&I&&(_=(0,n.resolveUrl)(this.opts.uriResolver,_,I))}let g;if(typeof f!="boolean"&&f.$ref&&!(0,s.schemaHasRulesButRef)(f,this.RULES)){const S=(0,n.resolveUrl)(this.opts.uriResolver,_,f.$ref);g=v.call(this,b,S)}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 s0={$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 zs={},Tn={exports:{}},gi,gf;function vf(){if(gf)return gi;gf=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 gi={nonSimpleDomain:n,recomposeAuthority:p,normalizeComponentEncoding:u,removeDotSegments:l,isIPv4:t,isUUID:e,normalizeIPv6:i,stringArrayToHexStripped:r},gi}var vi,yf;function o0(){if(yf)return vi;yf=1;const{isUUID:e}=vf(),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[$,S]=g.resourceName.split("?");g.path=$&&$!=="/"?$:void 0,g.query=S,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 S=g.path.match(t);if(S){const j=$.scheme||g.scheme||"urn";g.nid=S[1].toLowerCase(),g.nss=S[2];const I=`${j}:${$.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 S=$.scheme||g.scheme||"urn",j=g.nid.toLowerCase(),I=`${S}:${$.nid||j}`,z=w(I);z&&(g=z.serialize(g,$));const M=g,F=g.nss;return M.path=`${j||$.nid}:${F}`,$.skipEscape=!0,M}function p(g,$){const S=g;return S.uuid=S.nss,S.nss=void 0,!$.tolerant&&(!S.uuid||!e(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}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 vi={wsIsSecure:s,SCHEMES:b,isValidSchemeName:n,getSchemeHandler:w},vi}var bf;function a0(){if(bf)return Tn.exports;bf=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:s,nonSimpleDomain:o}=vf(),{SCHEMES:a,getSchemeHandler:i}=o0();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 S=f.path;!b.absolutePath&&(!g||!g.absolutePath)&&(S=t(S)),$===void 0&&S[0]==="/"&&S[1]==="/"&&(S="/%2F"+S.slice(2)),w.push(S)}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 j=e(b.host);b.host=j.host.toLowerCase(),w=j.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(S){b.error=b.error||"Host's domain name can not be converted to ASCII: "+S}(!$||$&&!$.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 i0(){if(_f)return zs;_f=1,Object.defineProperty(zs,"__esModule",{value:!0});const e=a0();return e.code='require("ajv/dist/runtime/uri").default',zs.default=e,zs}var xf;function wf(){return xf||(xf=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=Fs(),s=An(),o=Qd(),a=Ls(),i=we(),c=Ds(),l=Is(),u=Oe(),p=s0,m=i0(),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,k,R,q,B,Q,pe,ie,N,A,H,J,le,ye,He,ot,Ge,C,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=(k=G.uriResolver)!==null&&k!==void 0?k: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:(C=G.schemaId)!==null&&C!==void 0?C:"$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=F(T.logger);const k=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&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&I.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),S.call(this),T.validateFormats=k}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:K,schemaId:O}=this.opts;let k=p;O==="id"&&(k={...p},k.id=k.$id,delete k.$id),K&&T&&this.addMetaSchema(k,k[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 k=O(K);return"$async"in O||(this.errors=O.errors),k}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 k.call(this,T,K);async function k(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 k.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,k=this.opts.validateSchema){if(Array.isArray(T)){for(const q of T)this.addSchema(q,void 0,O,k);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,k,!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 k=this.validate(O,T);if(!k&&K){const R="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(R);else throw new Error(R)}return k}getSchema(T){let K;for(;typeof(K=$.call(this,T))=="string";)T=K;if(K===void 0){const{schemaId:O}=this.opts,k=new a.SchemaEnv({schema:{},schemaId:O});if(K=a.resolveSchema.call(this,k,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 k={...K,type:(0,l.getJSONTypes)(K.type),schemaType:(0,l.getJSONTypes)(K.schemaType)};return(0,u.eachItem)(O,k.type.length===0?R=>re.call(this,R,k):R=>k.type.forEach(q=>re.call(this,R,k,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 k=O.rules.findIndex(R=>R.keyword===T);k>=0&&O.rules.splice(k,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(k=>`${O}${k.instancePath} ${k.message}`).reduce((k,R)=>k+K+R)}$dataMetaSchema(T,K){const O=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const k of K){const R=k.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 k=T[O];(!K||K.test(O))&&(typeof k=="string"?delete T[O]:k&&!k.meta&&(this._cache.delete(k.schema),delete T[O]))}}_addSchema(T,K,O,k=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),k&&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 k in G){const R=k;R in T&&this.logger[O](`${K}: option ${k}. ${G[R]}`)}}function $(G){return G=(0,c.normalizeId)(G),this.schemas[G]||this.refs[G]}function S(){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 j(){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 F(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 V=/^[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(!V.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 k=T==null?void 0:T.post;if(K&&k)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:R}=this;let q=k?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?Z.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 Z(G,T,K){const O=G.rules.findIndex(k=>k.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]}}})(li)),li}var qs={},Us={},Bs={},$f;function c0(){if($f)return Bs;$f=1,Object.defineProperty(Bs,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Bs.default=e,Bs}var gr={},Sf;function yi(){if(Sf)return gr;Sf=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.callRef=gr.getValidate=void 0;const e=An(),t=Nt(),r=we(),n=Rt(),s=Ls(),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 S=u.scopeValue("root",{ref:f});return c(l,(0,r._)`${S}.validate`,f,f.$async)}function g(S){const j=i(l,S);c(l,j,S,S.$async)}function $(S){const j=u.scopeValue("schema",h.code.source===!0?{ref:S,code:(0,r.stringify)(S)}:{ref:S}),I=u.name("valid"),z=l.subschema({schema:S,dataTypes:[],schemaPath:r.nil,topSchemaRef:j,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 S=v.let("valid");v.try(()=>{v.code((0,r._)`await ${(0,t.callValidateCode)(l,u,f)}`),$(u),y||v.assign(S,!0)},j=>{v.if((0,r._)`!(${j} instanceof ${x.ValidationError})`,()=>v.throw(j)),g(j),y||v.assign(S,!1)}),l.ok(S)}function w(){l.result((0,t.callValidateCode)(l,u,f),()=>$(u),()=>g(u))}function g(S){const j=(0,r._)`${S}.errors`;v.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${j} : ${n.default.vErrors}.concat(${j})`),v.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function $(S){var j;if(!x.opts.unevaluated)return;const I=(j=p==null?void 0:p.validate)===null||j===void 0?void 0:j.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._)`${S}.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._)`${S}.evaluated.items`);x.items=o.mergeEvaluated.items(v,z,x.items,r.Name)}}}return gr.callRef=c,gr.default=a,gr}var Ef;function kf(){if(Ef)return Us;Ef=1,Object.defineProperty(Us,"__esModule",{value:!0});const e=c0(),t=yi(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Us.default=r,Us}var Ws={},Hs={},jf;function l0(){if(jf)return Hs;jf=1,Object.defineProperty(Hs,"__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 Hs.default=s,Hs}var Gs={},Cf;function u0(){if(Cf)return Gs;Cf=1,Object.defineProperty(Gs,"__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 Gs.default=r,Gs}var Ks={},Zs={},Rf;function d0(){if(Rf)return Zs;Rf=1,Object.defineProperty(Zs,"__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 Zs.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Zs}var Pf;function f0(){if(Pf)return Ks;Pf=1,Object.defineProperty(Ks,"__esModule",{value:!0});const e=we(),t=Oe(),r=d0(),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 Ks.default=s,Ks}var Ys={},Nf;function m0(){if(Nf)return Ys;Nf=1,Object.defineProperty(Ys,"__esModule",{value:!0});const e=Nt(),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 Ys.default=n,Ys}var Js={},Af;function h0(){if(Af)return Js;Af=1,Object.defineProperty(Js,"__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 Js.default=r,Js}var Xs={},Tf;function p0(){if(Tf)return Xs;Tf=1,Object.defineProperty(Xs,"__esModule",{value:!0});const e=Nt(),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 Xs.default=s,Xs}var Qs={},Of;function g0(){if(Of)return Qs;Of=1,Object.defineProperty(Qs,"__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 Qs.default=r,Qs}var eo={},to={},If;function bi(){if(If)return to;If=1,Object.defineProperty(to,"__esModule",{value:!0});const e=lf();return e.code='require("ajv/dist/runtime/equal").default',to.default=e,to}var Df;function v0(){if(Df)return eo;Df=1,Object.defineProperty(eo,"__esModule",{value:!0});const e=Is(),t=we(),r=Oe(),n=bi(),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"),S=(0,e.checkDataTypes)(y,$,v.opts.strictNumbers,e.DataType.Wrong),j=i.const("indices",(0,t._)`{}`);i.for((0,t._)`;${w}--;`,()=>{i.let($,(0,t._)`${c}[${w}]`),i.if(S,(0,t._)`continue`),y.length>1&&i.if((0,t._)`typeof ${$} == "string"`,(0,t._)`${$} += "_"`),i.if((0,t._)`typeof ${j}[${$}] == "number"`,()=>{i.assign(g,(0,t._)`${j}[${$}]`),a.error(),i.assign(x,!1).break()}).code((0,t._)`${j}[${$}] = ${w}`)})}function b(w,g){const $=(0,r.useFunc)(i,n.default),S=i.name("outer");i.label(S).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(S)})))}}};return eo.default=o,eo}var ro={},Mf;function y0(){if(Mf)return ro;Mf=1,Object.defineProperty(ro,"__esModule",{value:!0});const e=we(),t=Oe(),r=bi(),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 ro.default=s,ro}var no={},Ff;function b0(){if(Ff)return no;Ff=1,Object.defineProperty(no,"__esModule",{value:!0});const e=we(),t=Oe(),r=bi(),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 no.default=s,no}var Vf;function Lf(){if(Vf)return Ws;Vf=1,Object.defineProperty(Ws,"__esModule",{value:!0});const e=l0(),t=u0(),r=f0(),n=m0(),s=h0(),o=p0(),a=g0(),i=v0(),c=y0(),l=b0(),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 Ws.default=u,Ws}var so={},rn={},zf;function qf(){if(zf)return rn;zf=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.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 rn.validateAdditionalItems=s,rn.default=n,rn}var oo={},nn={},Uf;function Bf(){if(Uf)return nn;Uf=1,Object.defineProperty(nn,"__esModule",{value:!0}),nn.validateTuple=void 0;const e=we(),t=Oe(),r=Nt(),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 nn.validateTuple=s,nn.default=n,nn}var Wf;function _0(){if(Wf)return oo;Wf=1,Object.defineProperty(oo,"__esModule",{value:!0});const e=Bf(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return oo.default=t,oo}var ao={},Hf;function x0(){if(Hf)return ao;Hf=1,Object.defineProperty(ao,"__esModule",{value:!0});const e=we(),t=Oe(),r=Nt(),n=qf(),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 ao.default=o,ao}var io={},Gf;function w0(){if(Gf)return io;Gf=1,Object.defineProperty(io,"__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 io.default=n,io}var _i={},Kf;function xi(){return Kf||(Kf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=we(),r=Oe(),n=Nt();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},
|
|
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
150
|
missingProperty: ${p},
|
|
151
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})(_i)),_i}var co={},Zf;function $0(){if(Zf)return co;Zf=1,Object.defineProperty(co,"__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 co.default=n,co}var lo={},Yf;function Jf(){if(Yf)return lo;Yf=1,Object.defineProperty(lo,"__esModule",{value:!0});const e=Nt(),t=we(),r=Rt(),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 S;if(y.length>8){const j=(0,n.schemaRefOrVal)(m,l.properties,"properties");S=(0,e.isOwnProperty)(i,j,$)}else y.length?S=(0,t.or)(...y.map(j=>(0,t._)`${$} === ${j}`)):S=t.nil;return h.length&&(S=(0,t.or)(S,...h.map(j=>(0,t._)`${(0,e.usePattern)(a,j)}.test(${$})`))),(0,t.not)(S)}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 S=i.name("valid");x.removeAdditional==="failing"?(g($,S,!1),i.if((0,t.not)(S),()=>{a.reset(),b($)})):(g($,S),v||i.if((0,t.not)(S),()=>i.break()))}}function g($,S,j){const I={keyword:"additionalProperties",dataProp:$,dataPropType:n.Type.Str};j===!1&&Object.assign(I,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(I,S)}}};return lo.default=o,lo}var uo={},Xf;function S0(){if(Xf)return uo;Xf=1,Object.defineProperty(uo,"__esModule",{value:!0});const e=Nn(),t=Nt(),r=Oe(),n=Jf(),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 uo.default=s,uo}var fo={},Qf;function E0(){if(Qf)return fo;Qf=1,Object.defineProperty(fo,"__esModule",{value:!0});const e=Nt(),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 fo.default=s,fo}var mo={},em;function k0(){if(em)return mo;em=1,Object.defineProperty(mo,"__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 mo.default=t,mo}var ho={},tm;function j0(){if(tm)return ho;tm=1,Object.defineProperty(ho,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Nt().validateUnion,error:{message:"must match a schema in anyOf"}};return ho.default=t,ho}var po={},rm;function C0(){if(rm)return po;rm=1,Object.defineProperty(po,"__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 po.default=n,po}var go={},nm;function R0(){if(nm)return go;nm=1,Object.defineProperty(go,"__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 go.default=t,go}var vo={},sm;function P0(){if(sm)return vo;sm=1,Object.defineProperty(vo,"__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 vo.default=n,vo}var yo={},om;function N0(){if(om)return yo;om=1,Object.defineProperty(yo,"__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 yo.default=t,yo}var am;function im(){if(am)return so;am=1,Object.defineProperty(so,"__esModule",{value:!0});const e=qf(),t=_0(),r=Bf(),n=x0(),s=w0(),o=xi(),a=$0(),i=Jf(),c=S0(),l=E0(),u=k0(),p=j0(),m=C0(),v=R0(),x=P0(),y=N0();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 so.default=h,so}var bo={},sn={},cm;function lm(){if(cm)return sn;cm=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.dynamicAnchor=void 0;const e=we(),t=Rt(),r=Ls(),n=yi(),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))}sn.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 sn.default=s,sn}var on={},um;function dm(){if(um)return on;um=1,Object.defineProperty(on,"__esModule",{value:!0}),on.dynamicRef=void 0;const e=we(),t=Rt(),r=yi(),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 on.dynamicRef=s,on.default=n,on}var _o={},fm;function A0(){if(fm)return _o;fm=1,Object.defineProperty(_o,"__esModule",{value:!0});const e=lm(),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 _o.default=r,_o}var xo={},mm;function T0(){if(mm)return xo;mm=1,Object.defineProperty(xo,"__esModule",{value:!0});const e=dm(),t={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,e.dynamicRef)(r,r.schema)};return xo.default=t,xo}var hm;function O0(){if(hm)return bo;hm=1,Object.defineProperty(bo,"__esModule",{value:!0});const e=lm(),t=dm(),r=A0(),n=T0(),s=[e.default,t.default,r.default,n.default];return bo.default=s,bo}var wo={},$o={},pm;function I0(){if(pm)return $o;pm=1,Object.defineProperty($o,"__esModule",{value:!0});const e=xi(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:r=>(0,e.validatePropertyDeps)(r)};return $o.default=t,$o}var So={},gm;function D0(){if(gm)return So;gm=1,Object.defineProperty(So,"__esModule",{value:!0});const e=xi(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,e.validateSchemaDeps)(r)};return So.default=t,So}var Eo={},vm;function M0(){if(vm)return Eo;vm=1,Object.defineProperty(Eo,"__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 Eo.default=t,Eo}var ym;function F0(){if(ym)return wo;ym=1,Object.defineProperty(wo,"__esModule",{value:!0});const e=I0(),t=D0(),r=M0(),n=[e.default,t.default,r.default];return wo.default=n,wo}var ko={},jo={},bm;function V0(){if(bm)return jo;bm=1,Object.defineProperty(jo,"__esModule",{value:!0});const e=we(),t=Oe(),r=Rt(),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 jo.default=s,jo}var Co={},_m;function L0(){if(_m)return Co;_m=1,Object.defineProperty(Co,"__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 Co.default=n,Co}var xm;function z0(){if(xm)return ko;xm=1,Object.defineProperty(ko,"__esModule",{value:!0});const e=V0(),t=L0(),r=[e.default,t.default];return ko.default=r,ko}var Ro={},Po={},wm;function q0(){if(wm)return Po;wm=1,Object.defineProperty(Po,"__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 S=v.$async?(0,e._)`(${f}.async ? await ${w}(${a}) : ${w}(${a}))`:(0,e._)`${w}(${a})`,j=(0,e._)`(typeof ${w} == "function" ? ${S} : ${w}.test(${a}))`;return(0,e._)`${w} && ${w} !== true && ${b} === ${s} && !${j}`}}function h(){const _=x.formats[c];if(!_){g();return}if(_===!0)return;const[f,b,w]=$(_);f===s&&n.pass(S());function g(){if(p.strictSchema===!1){x.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${c}" ignored in schema at path "${m}"`}}function $(j){const I=j instanceof RegExp?(0,e.regexpCode)(j):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(c)}`:void 0,z=o.scopeValue("formats",{key:c,ref:j,code:I});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${z}.validate`]:["string",j,z]}function S(){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 Po.default=r,Po}var $m;function Sm(){if($m)return Ro;$m=1,Object.defineProperty(Ro,"__esModule",{value:!0});const t=[q0().default];return Ro.default=t,Ro}var Rr={},Em;function km(){return Em||(Em=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 jm;function U0(){if(jm)return qs;jm=1,Object.defineProperty(qs,"__esModule",{value:!0});const e=kf(),t=Lf(),r=im(),n=O0(),s=F0(),o=z0(),a=Sm(),i=km(),c=[n.default,e.default,t.default,(0,r.default)(!0),a.default,i.metadataVocabulary,i.contentVocabulary,s.default,o.default];return qs.default=c,qs}var No={},On={},Cm;function B0(){if(Cm)return On;Cm=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 Rm;function Pm(){if(Rm)return No;Rm=1,Object.defineProperty(No,"__esModule",{value:!0});const e=we(),t=B0(),r=Ls(),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={},$=j(p);let S=!0;for(let M=0;M<v.length;M++){let F=v[M];if(F!=null&&F.$ref&&!(0,s.schemaHasRulesButRef)(F,m.self.RULES)){const W=F.$ref;if(F=r.resolveRef.call(m.self,m.schemaEnv.root,m.baseId,W),F instanceof r.SchemaEnv&&(F=F.schema),F===void 0)throw new n.default(m.opts.uriResolver,m.baseId,W)}const V=(w=F==null?void 0:F.properties)===null||w===void 0?void 0:w[x];if(typeof V!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${x}"`);S=S&&($||j(F)),I(V,M)}if(!S)throw new Error(`discriminator: "${x}" must be required`);return g;function j({required:M}){return Array.isArray(M)&&M.includes(x)}function I(M,F){if(M.const)z(M.const,F);else if(M.enum)for(const V of M.enum)z(V,F);else throw new Error(`discriminator: "properties/${x}" must have "const" or "enum"`)}function z(M,F){if(typeof M!="string"||M in g)throw new Error(`discriminator: "${x}" values must be unique strings`);g[M]=F}}}};return No.default=a,No}var Ao={};const W0={$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}}},H0={$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"}}}},G0={$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"}}},K0={$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"}}},Z0={$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"}}},Y0={$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"}}},J0={$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}}},X0={$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 Nm;function Q0(){if(Nm)return Ao;Nm=1,Object.defineProperty(Ao,"__esModule",{value:!0});const e=W0,t=H0,r=G0,n=K0,s=Z0,o=Y0,a=J0,i=X0,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 Ao.default=l,Ao}var Am;function ex(){return Am||(Am=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=wf(),n=U0(),s=Pm(),o=Q0(),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=Fs();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}})})(Ns,Ns.exports)),Ns.exports}var tx=ex();const rx=Yi(tx);var To={exports:{}},wi={},Tm;function nx(){return Tm||(Tm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(M,F){return{validate:M,compare:F}}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:S},float:{type:"number",validate:j},double:{type:"number",validate:j},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 F=n.exec(M);if(!F)return!1;const V=+F[1],W=+F[2],re=+F[3];return W>=1&&W<=12&&re>=1&&re<=(W===2&&r(V)?29:s[W])}function a(M,F){if(M&&F)return M>F?1:M<F?-1:0}const i=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(M){return function(V){const W=i.exec(V);if(!W)return!1;const re=+W[1],Z=+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&&Z<=59&&ae<60)return!0;const K=Z-T*ve,O=re-G*ve-(K<0?1:0);return(O===23||O===-1)&&(K===59||K===-1)&&ae<61}}function l(M,F){if(!(M&&F))return;const V=new Date("2020-01-01T"+M).valueOf(),W=new Date("2020-01-01T"+F).valueOf();if(V&&W)return V-W}function u(M,F){if(!(M&&F))return;const V=i.exec(M),W=i.exec(F);if(V&&W)return M=V[1]+V[2]+V[3],F=W[1]+W[2]+W[3],M>F?1:M<F?-1:0}const p=/t|\s/i;function m(M){const F=c(M);return function(W){const re=W.split(p);return re.length===2&&o(re[0])&&F(re[1])}}function v(M,F){if(!(M&&F))return;const V=new Date(M).valueOf(),W=new Date(F).valueOf();if(V&&W)return V-W}function x(M,F){if(!(M&&F))return;const[V,W]=M.split(p),[re,Z]=F.split(p),ae=a(V,re);if(ae!==void 0)return ae||l(W,Z)}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 S(M){return Number.isInteger(M)}function j(){return!0}const I=/[^\\]\\Z/;function z(M){if(I.test(M))return!1;try{return new RegExp(M),!0}catch{return!1}}})(wi)),wi}var $i={},Oo={exports:{}},Io={},Om;function sx(){if(Om)return Io;Om=1,Object.defineProperty(Io,"__esModule",{value:!0});const e=kf(),t=Lf(),r=im(),n=Sm(),s=km(),o=[e.default,t.default,(0,r.default)(),n.default,s.metadataVocabulary,s.contentVocabulary];return Io.default=o,Io}const ox={$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 Im;function ax(){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.Ajv=void 0;const r=wf(),n=sx(),s=Pm(),o=ox,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=Fs();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}})})(Oo,Oo.exports)),Oo.exports}var Dm;function ix(){return Dm||(Dm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=ax(),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})($i)),$i}var Mm;function cx(){return Mm||(Mm=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=nx(),n=ix(),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})(To,To.exports)),To.exports}var lx=cx();const ux=Yi(lx),dx="https://json-schema.org/draft/2020-12/schema",Si=new rx;ux(Si);function Fm(e){return Si.validate(dx,e)?null:Si.errors||[]}function fx({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 Ei="rovingFocusGroup.onEntryFocus",mx={bubbles:!1,cancelable:!0},In="RovingFocusGroup",[ki,Vm,hx]=Cc(In),[px,Lm]=Tt(In,[hx]),[gx,vx]=px(In),zm=E.forwardRef((e,t)=>d.jsx(ki.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(ki.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(yx,{...e,ref:t})})}));zm.displayName=In;var yx=E.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=E.useRef(null),v=qe(t,m),x=fa(o),[y,h]=wr({prop:a,defaultProp:i??null,onChange:c,caller:In}),[_,f]=E.useState(!1),b=or(l),w=Vm(r),g=E.useRef(!1),[$,S]=E.useState(0);return E.useEffect(()=>{const j=m.current;if(j)return j.addEventListener(Ei,b),()=>j.removeEventListener(Ei,b)},[b]),d.jsx(gx,{scope:r,orientation:n,dir:x,loop:s,currentTabStopId:y,onItemFocus:E.useCallback(j=>h(j),[h]),onItemShiftTab:E.useCallback(()=>f(!0),[]),onFocusableItemAdd:E.useCallback(()=>S(j=>j+1),[]),onFocusableItemRemove:E.useCallback(()=>S(j=>j-1),[]),children:d.jsx(Pe.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,j=>{const I=!g.current;if(j.target===j.currentTarget&&I&&!_){const z=new CustomEvent(Ei,mx);if(j.currentTarget.dispatchEvent(z),!z.defaultPrevented){const M=w().filter(Z=>Z.focusable),F=M.find(Z=>Z.active),V=M.find(Z=>Z.id===y),re=[F,V,...M].filter(Boolean).map(Z=>Z.ref.current);Bm(re,u)}}g.current=!1}),onBlur:$e(e.onBlur,()=>f(!1))})})}),qm="RovingFocusGroupItem",Um=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,children:a,...i}=e,c=ir(),l=o||c,u=vx(qm,r),p=u.currentTabStopId===l,m=Vm(r),{onFocusableItemAdd:v,onFocusableItemRemove:x,currentTabStopId:y}=u;return E.useEffect(()=>{if(n)return v(),()=>x()},[n,v,x]),d.jsx(ki.ItemSlot,{scope:r,id:l,focusable:n,active:s,children:d.jsx(Pe.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 _=xx(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?wx(b,w+1):b.slice(w+1)}setTimeout(()=>Bm(b))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:y!=null}):a})})});Um.displayName=qm;var bx={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 xx(e,t,r){const n=_x(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return bx[n]}function Bm(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function wx(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var $x=zm,Sx=Um,ji="Radio",[Ex,Wm]=Tt(ji),[kx,jx]=Ex(ji),Hm=E.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]=E.useState(null),v=qe(t,h=>m(h)),x=E.useRef(!1),y=p?l||!!p.closest("form"):!0;return d.jsxs(kx,{scope:r,checked:s,disabled:a,children:[d.jsx(Pe.button,{type:"button",role:"radio","aria-checked":s,"data-state":Ym(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(Zm,{control:p,bubbles:!x.current,name:n,value:i,checked:s,required:o,disabled:a,form:l,style:{transform:"translateX(-100%)"}})]})});Hm.displayName=ji;var Gm="RadioIndicator",Km=E.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...s}=e,o=jx(Gm,r);return d.jsx(hr,{present:n||o.checked,children:d.jsx(Pe.span,{"data-state":Ym(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});Km.displayName=Gm;var Cx="RadioBubbleInput",Zm=E.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...s},o)=>{const a=E.useRef(null),i=qe(a,o),c=Aa(r),l=Ra(t);return E.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(Pe.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}})});Zm.displayName=Cx;function Ym(e){return e?"checked":"unchecked"}var Rx=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Do="RadioGroup",[Px]=Tt(Do,[Lm,Wm]),Jm=Lm(),Xm=Wm(),[Nx,Ax]=Px(Do),Qm=E.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=Jm(r),x=fa(l),[y,h]=wr({prop:o,defaultProp:s??null,onChange:p,caller:Do});return d.jsx(Nx,{scope:r,name:n,required:a,disabled:i,value:y,onValueChange:h,children:d.jsx($x,{asChild:!0,...v,orientation:c,dir:x,loop:u,children:d.jsx(Pe.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":i?"":void 0,dir:x,...m,ref:t})})})});Qm.displayName=Do;var eh="RadioGroupItem",th=E.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...s}=e,o=Ax(eh,r),a=o.disabled||n,i=Jm(r),c=Xm(r),l=E.useRef(null),u=qe(t,l),p=o.value===s.value,m=E.useRef(!1);return E.useEffect(()=>{const v=y=>{Rx.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(Sx,{asChild:!0,...i,focusable:!a,active:p,children:d.jsx(Hm,{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())})})})});th.displayName=eh;var Tx="RadioGroupIndicator",rh=E.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,s=Xm(r);return d.jsx(Km,{...s,...n,ref:t})});rh.displayName=Tx;var Ox=Qm,Ix=th,Dx=rh;function Mx({className:e,...t}){return d.jsx(Ox,{"data-slot":"radio-group",className:Se("grid gap-3",e),...t})}function Ci({className:e,...t}){return d.jsx(Ix,{"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(Dx,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(Ay,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const Fx=({basePath:e,readOnly:t})=>{const{control:r,setValue:n,getValues:s}=at(),[o,a]=Y.useState(JSON.stringify(s(`${e}.additionalProperties`),null,2)),[i,c]=Y.useState(null);Ar({control:r,name:`${e}.isModifiable`});const l=Ar({control:r,name:`${e}.additionalProperties`});Y.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(ke,{children:"Minimum Properties"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:t,value:m.value??"",onChange:v=>m.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx(Ae,{})]})}),d.jsx(Te,{control:r,name:`${e}.maxProperties`,render:({field:m})=>d.jsxs(Ee,{className:"flex-1",children:[d.jsx(ke,{children:"Maximum Properties"}),d.jsx(Ne,{children:d.jsx(Ve,{type:"number",disabled:t,value:m.value??"",onChange:v=>m.onChange(v.target.value===""?null:Number(v.target.value))})}),d.jsx(Ae,{})]})})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(ke,{children:"Additional Properties"}),d.jsxs(Mx,{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(Ci,{value:"true",id:"ap-true"}),d.jsx(ke,{htmlFor:"ap-true",className:"font-normal",children:"Allow (true)"})]}),d.jsxs(Ee,{className:"flex items-center space-x-2",children:[d.jsx(Ci,{value:"false",id:"ap-false"}),d.jsx(ke,{htmlFor:"ap-false",className:"font-normal",children:"Disallow (false)"})]}),d.jsxs(Ee,{className:"flex items-center space-x-2",children:[d.jsx(Ci,{value:"schema",id:"ap-schema"}),d.jsx(ke,{htmlFor:"ap-schema",className:"font-normal",children:"Specify Schema"})]})]}),d.jsx(Ae,{})]}),u==="schema"&&d.jsxs(Ee,{children:[d.jsx(Ne,{children:d.jsx(fx,{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=Fm(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(ke,{children:"Modifiable Properties"}),d.jsx(Ne,{children:d.jsx(Rn,{disabled:t,value:m.value||[],onValueChange:m.onChange,placeholder:"Enter your modifiable properties"})}),d.jsx(Ae,{})]})})]})},Vx=({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(ke,{children:"$schema"}),d.jsx(Ne,{children:d.jsx(Ve,{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(Ae,{})]})}),d.jsx(Te,{control:r,name:`${e}["$id"]`,render:({field:n})=>d.jsxs(Ee,{children:[d.jsx(ke,{children:"$id"}),d.jsx(Ne,{children:d.jsx(Ve,{disabled:t,...n,value:n.value??""})}),d.jsx(Ae,{})]})})]})};var Lx="Separator",nh="horizontal",zx=["horizontal","vertical"],sh=E.forwardRef((e,t)=>{const{decorative:r,orientation:n=nh,...s}=e,o=qx(n)?n:nh,i=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return d.jsx(Pe.div,{"data-orientation":o,...i,...s,ref:t})});sh.displayName=Lx;function qx(e){return zx.includes(e)}var Ux=sh;function Bx({className:e,orientation:t="horizontal",decorative:r=!0,...n}){return d.jsx(Ux,{"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 Wx=({theme:e,basePath:t,readOnly:r})=>{const{watch:n}=at(),s=n(`${t}.type`),o=()=>{switch(s){case"number":return d.jsx(K_,{theme:e,basePath:t,readOnly:r});case"integer":return d.jsx(X_,{theme:e,basePath:t,readOnly:r});case"string":return d.jsx(Z_,{theme:e,basePath:t,readOnly:r});case"boolean":return d.jsx(Y_,{theme:e,basePath:t,readOnly:r});case"array":return d.jsx(J_,{theme:e,basePath:t,readOnly:r});case"object":return d.jsx(Fx,{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(Vx,{theme:e,basePath:t,readOnly:r}),d.jsx(Bx,{className:"my-4"})]}),o()]})};function Hx({...e}){return d.jsx(hd,{"data-slot":"dialog",...e})}function Gx({...e}){return d.jsx(pd,{"data-slot":"dialog-portal",...e})}function Kx({className:e,...t}){return d.jsx(gd,{"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 Zx({className:e,children:t,showCloseButton:r=!0,...n}){return d.jsxs(Gx,{"data-slot":"dialog-portal",children:[d.jsx(Kx,{}),d.jsxs(vd,{"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(ai,{"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(vu,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Yx({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 Jx({className:e,...t}){return d.jsx(yd,{"data-slot":"dialog-title",className:Se("text-lg leading-none font-semibold",e),...t})}const Xx=({theme:e,readOnly:t,className:r,isOpen:n,fieldPath:s,onClose:o})=>{const{getValues:a}=at(),i=s?a(s):null;return d.jsx(Hx,{open:n,onOpenChange:c=>!c&&o(),children:d.jsxs(Zx,{className:Se("bg-background text-foreground border-input",e,r),children:[d.jsx(Yx,{children:d.jsxs(Jx,{className:"capitalize",children:[i==null?void 0:i.type," Schema Settings"]})}),s&&d.jsx(Wx,{basePath:s,theme:e,readOnly:t}),d.jsx(mr,{onClick:o,variant:"default",children:"Close"})]})})},oh=(e,t,r)=>{if(e&&"reportValidity"in e){const n=oe(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Ri=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?oh(n.ref,r,e):n&&n.refs&&n.refs.forEach(s=>oh(s,r,e))}},ah=(e,t)=>{t.shouldUseNativeValidation&&Ri(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(Qx(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},Qx=(e,t)=>{const r=ih(t);return e.some(n=>ih(n).match(`^${r}\\.\\d+`))};function ih(e){return e.replace(/\]|\[/g,"")}function ch(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 ew extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const tw={};function lh(e){return tw}function rw(e,t){return typeof t=="bigint"?t.toString():t}const uh=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Mo(e){return typeof e=="string"?e:e==null?void 0:e.message}function dh(e,t,r){var s,o,a,i,c,l;const n={...e,path:e.path??[]};if(!e.message){const u=Mo((a=(o=(s=e.inst)==null?void 0:s._zod.def)==null?void 0:o.error)==null?void 0:a.call(o,e))??Mo((i=t==null?void 0:t.error)==null?void 0:i.call(t,e))??Mo((c=r.customError)==null?void 0:c.call(r,e))??Mo((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 fh=(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,rw,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},nw=ch("$ZodError",fh),mh=ch("$ZodError",fh,{Parent:Error}),sw=(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 ew;if(a.issues.length){const i=new((s==null?void 0:s.Err)??e)(a.issues.map(c=>dh(c,o,lh())));throw uh(i,s==null?void 0:s.callee),i}return a.value})(mh),ow=(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=>dh(c,o,lh())));throw uh(i,s==null?void 0:s.callee),i}return a.value})(mh);function hh(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function aw(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]=Yo(a,t,r,s,l?[].concat(l,n.message):n.message)}e.shift()}return r}function iw(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]=Yo(a,t,r,s,l?[].concat(l,n.message):n.message)}e.shift()}return r}function cw(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(hh(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(a){return o.shouldUseNativeValidation&&Ri({},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:ah(aw(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(hh(function(){return Promise.resolve((r.mode==="sync"?sw:ow)(e,n,t)).then(function(a){return o.shouldUseNativeValidation&&Ri({},o),{errors:{},values:r.raw?Object.assign({},n):a}})},function(a){if((function(i){return i instanceof nw})(a))return{values:{},errors:ah(iw(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 ph;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(ph||(ph={}));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 Pi=(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 lw=Pi;function uw(){return lw}const dw=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=uw(),n=dw({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Pi?void 0:Pi].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}),gh=e=>e.status==="aborted",vh=e=>e.status==="dirty",an=e=>e.status==="valid",Fo=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 Lt{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 yh=(e,t)=>{if(an(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 je(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(Fo(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 yh(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 an(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=>an(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(Fo(s)?s:Promise.resolve(s));return yh(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 dn({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 fn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return zt.create(this)}promise(){return Uo.create(this,this._def)}or(t){return Lo.create([this,t],this._def)}and(t){return zo.create(this,t,this._def)}transform(t){return new dn({...je(this._def),schema:this,typeName:be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Di({...je(this._def),innerType:this,defaultValue:r,typeName:be.ZodDefault})}brand(){return new Ow({typeName:be.ZodBranded,type:this,...je(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Mi({...je(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 Fi.create(this,t)}readonly(){return Vi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const fw=/^c[^\s-]{8,}$/i,mw=/^[0-9a-z]+$/,hw=/^[0-9A-HJKMNP-TV-Z]{26}$/i,pw=/^[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,gw=/^[a-z0-9_-]{21}$/i,vw=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,yw=/^[-+]?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)?)??$/,bw=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_w="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ni;const xw=/^(?:(?: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])$/,ww=/^(?:(?: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])$/,$w=/^(([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]))$/,Sw=/^(([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])$/,Ew=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kw=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,bh="((\\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])))",jw=new RegExp(`^${bh}$`);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 Cw(e){return new RegExp(`^${_h(e)}$`)}function Rw(e){let t=`${bh}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 Pw(e,t){return!!((t==="v4"||!t)&&xw.test(e)||(t==="v6"||!t)&&$w.test(e))}function Nw(e,t){if(!vw.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 Aw(e,t){return!!((t==="v4"||!t)&&ww.test(e)||(t==="v6"||!t)&&Sw.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")bw.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")Ni||(Ni=new RegExp(_w,"u")),Ni.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")pw.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")gw.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")fw.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")mw.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")hw.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"?Rw(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"?jw.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{code:te.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?Cw(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"?yw.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"duration",code:te.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Pw(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"?Nw(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"?Aw(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"?Ew.test(t.data)||(s=this._getOrReturnCtx(t,s),ce(s,{validation:"base64",code:te.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?kw.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,...je(e)});function Tw(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 cn 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"?Tw(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 cn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ge.toString(s)}]})}_addCheck(t){return new cn({...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)}}cn.create=e=>new cn({checks:[],typeName:be.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...je(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,...je(e)});class Ai 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)}}Ai.create=e=>new Ai({typeName:be.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...je(e)});class Vo 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 Vo({...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}}Vo.create=e=>new Vo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:be.ZodDate,...je(e)});class xh 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)}}xh.create=e=>new xh({typeName:be.ZodSymbol,...je(e)});class wh 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)}}wh.create=e=>new wh({typeName:be.ZodUndefined,...je(e)});class $h 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)}}$h.create=e=>new $h({typeName:be.ZodNull,...je(e)});class Ti extends Me{constructor(){super(...arguments),this._any=!0}_parse(t){return wt(t.data)}}Ti.create=e=>new Ti({typeName:be.ZodAny,...je(e)});class Sh extends Me{constructor(){super(...arguments),this._unknown=!0}_parse(t){return wt(t.data)}}Sh.create=e=>new Sh({typeName:be.ZodUnknown,...je(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,...je(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.void,received:n.parsedType}),xe}return wt(t.data)}}Eh.create=e=>new Eh({typeName:be.ZodVoid,...je(e)});class zt 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 Lt(r,a,r.path,i)))).then(a=>ut.mergeArray(n,a));const o=[...r.data].map((a,i)=>s.type._parseSync(new Lt(r,a,r.path,i)));return ut.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new zt({...this._def,minLength:{value:t,message:ge.toString(r)}})}max(t,r){return new zt({...this._def,maxLength:{value:t,message:ge.toString(r)}})}length(t,r){return new zt({...this._def,exactLength:{value:t,message:ge.toString(r)}})}nonempty(t){return this.min(1,t)}}zt.create=(e,t)=>new zt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:be.ZodArray,...je(t)});function ln(e){if(e instanceof et){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=br.create(ln(n))}return new et({...e._def,shape:()=>t})}else return e instanceof zt?new zt({...e._def,type:ln(e.element)}):e instanceof br?br.create(ln(e.unwrap())):e instanceof fn?fn.create(ln(e.unwrap())):e instanceof Pr?Pr.create(e.items.map(t=>ln(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 Lt(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 Lt(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 ln(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 Ch(Le.objectKeys(this.shape))}}et.create=(e,t)=>new et({shape:()=>e,unknownKeys:"strip",catchall:yr.create(),typeName:be.ZodObject,...je(t)}),et.strictCreate=(e,t)=>new et({shape:()=>e,unknownKeys:"strict",catchall:yr.create(),typeName:be.ZodObject,...je(t)}),et.lazycreate=(e,t)=>new et({shape:e,unknownKeys:"strip",catchall:yr.create(),typeName:be.ZodObject,...je(t)});class Lo 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}}Lo.create=(e,t)=>new Lo({options:e,typeName:be.ZodUnion,...je(t)});function Oi(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=Oi(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=Oi(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 zo extends Me{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(o,a)=>{if(gh(o)||gh(a))return xe;const i=Oi(o.value,a.value);return i.valid?((vh(o)||vh(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}))}}zo.create=(e,t,r)=>new zo({left:e,right:t,typeName:be.ZodIntersection,...je(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 Lt(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,...je(t)})};class qo 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 Lt(n,i,n.path,i)),value:a._parse(new Lt(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 qo({keyType:t,valueType:r,typeName:be.ZodRecord,...je(n)}):new qo({keyType:er.create(),valueType:t,typeName:be.ZodRecord,...je(r)})}}class kh 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 Lt(n,i,n.path,[l,"key"])),value:o._parse(new Lt(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}}}}kh.create=(e,t,r)=>new kh({valueType:t,keyType:e,typeName:be.ZodMap,...je(r)});class Fn 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 Lt(n,c,n.path,l)));return n.common.async?Promise.all(i).then(c=>a(c)):a(i)}min(t,r){return new Fn({...this._def,minSize:{value:t,message:ge.toString(r)}})}max(t,r){return new Fn({...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)}}Fn.create=(e,t)=>new Fn({valueType:e,minSize:null,maxSize:null,typeName:be.ZodSet,...je(t)});class Ii 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})}}Ii.create=(e,t)=>new Ii({getter:e,typeName:be.ZodLazy,...je(t)});class jh 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}}jh.create=(e,t)=>new jh({value:e,typeName:be.ZodLiteral,...je(t)});function Ch(e,t){return new un({values:e,typeName:be.ZodEnum,...je(t)})}class un 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 un.create(t,{...this._def,...r})}exclude(t,r=this._def){return un.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}un.create=Ch;class Rh 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}}Rh.create=(e,t)=>new Rh({values:e,typeName:be.ZodNativeEnum,...je(t)});class Uo 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})))}}Uo.create=(e,t)=>new Uo({type:e,typeName:be.ZodPromise,...je(t)});class dn 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(!an(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=>an(a)?Promise.resolve(s.transform(a.value,o)).then(i=>({status:r.value,value:i})):xe);Le.assertNever(s)}}dn.create=(e,t,r)=>new dn({schema:e,typeName:be.ZodEffects,effect:t,...je(r)}),dn.createWithPreprocess=(e,t,r)=>new dn({schema:t,effect:{type:"preprocess",transform:e},typeName:be.ZodEffects,...je(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,...je(t)});class fn extends Me{_parse(t){return this._getType(t)===me.null?wt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}fn.create=(e,t)=>new fn({innerType:e,typeName:be.ZodNullable,...je(t)});class Di 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}}Di.create=(e,t)=>new Di({innerType:e,typeName:be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...je(t)});class Mi 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 Fo(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}}Mi.create=(e,t)=>new Mi({innerType:e,typeName:be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...je(t)});class Ph 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}}}Ph.create=e=>new Ph({typeName:be.ZodNaN,...je(e)});class Ow 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 Fi 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 Fi({in:t,out:r,typeName:be.ZodPipeline})}}class Vi extends Me{_parse(t){const r=this._def.innerType._parse(t),n=s=>(an(s)&&(s.value=Object.freeze(s.value)),s);return Fo(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Vi.create=(e,t)=>new Vi({innerType:e,typeName:be.ZodReadonly,...je(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 At=er.create,_t=cn.create,Bo=Ai.create,Nh=Ti.create;yr.create;const Vn=zt.create,Li=et.create,Ah=Lo.create;zo.create,Pr.create;const Iw=qo.create,zi=Ii.create,Dw=un.create;Uo.create,br.create,fn.create;const mn=Li({type:Dw(["string","number","integer","boolean","object","array"]).optional(),title:At().optional(),description:At().optional(),default:Nh().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:Bo().optional(),"x-modifiable":Vn(At()).optional(),pattern:At().optional(),format:At().optional(),minItems:_t().optional(),maxItems:_t().optional(),uniqueItems:Bo().optional(),enum:Vn(Nh()).optional(),$id:At().optional(),$schema:At().optional()}).extend({properties:zi(()=>Iw(At(),mn)).optional(),items:zi(()=>Ah([mn,Vn(mn)])).optional(),required:Vn(At()).optional(),additionalProperties:zi(()=>Ah([Bo(),mn])).optional()}),Mw=Li({root:mn,properties:Vn(Li({id:At(),key:At().min(1),isRequired:Bo(),schema:mn}))}),Fw=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)),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},Vw=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)),c},{properties:r,required:n,...s}=e,a=t({properties:r,required:n});return{root:{...s,...a.root},properties:a.properties||[]}},Lw=({rootType:e="object",defaultValue:t})=>{const r=xn(6),n=cp({resolver:cw(Mw),defaultValues:t?Vw(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=Y.useMemo(()=>Fw(s),[s]);return{methods:n,jsonSchema:o}},zw=({textAreaRef:e,triggerAutoSize:t,maxHeight:r=Number.MAX_SAFE_INTEGER,minHeight:n=0})=>{const[s,o]=E.useState(!0);E.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])},Th=E.forwardRef(({maxHeight:e=Number.MAX_SAFE_INTEGER,minHeight:t=52,className:r,onChange:n,value:s,...o},a)=>{const i=E.useRef(null),[c,l]=E.useState("");return zw({textAreaRef:i,triggerAutoSize:c,maxHeight:e,minHeight:t}),Y.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})),E.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)}})});Th.displayName="AutosizeTextarea";const qw=({rootType:e="object",readOnly:t=!1,theme:r="light",styles:n,onChange:s,defaultValue:o})=>{const{methods:a,jsonSchema:i}=Lw({rootType:e,defaultValue:o}),{setError:c,clearErrors:l,watch:u}=a,p=u("properties"),[m,v]=Y.useState(null);Y.useEffect(()=>{s&&s(i)},[i,s]),Y.useEffect(()=>{const I=Fm(i);JSON.stringify(I)!==JSON.stringify(m)&&v(I)},[i,m]),Y.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(F=>F.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]),Y.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}=wc({control:a.control,name:"properties",keyName:"fieldId"}),_=()=>{const I=xn(6);y({id:I,key:`field_${I}`,isRequired:!1,schema:{type:"string"}})},[f,b]=Y.useState({isOpen:!1,fieldPath:null}),w=I=>{b({isOpen:!0,fieldPath:I})},g={...Es,...n,output:{...Es.output,...n==null?void 0:n.output},form:{...Es.form,...n==null?void 0:n.form},settings:{...Es.settings,...n==null?void 0:n.settings}},$=Y.useRef(null),[S,j]=Y.useState("overflow-hidden");return Y.useEffect(()=>{var z;const I=(z=$.current)==null?void 0:z.textArea;I&&(I.scrollHeight>I.clientHeight?j("overflow-y-auto"):j("overflow-hidden"))},[i]),d.jsxs(Hh,{...a,children:[d.jsx("div",{className:Se("bg-background text-foreground flex flex-col",r,Yu[g.spacing]),children:d.jsxs("div",{className:Se("bg-background text-foreground flex",r,Ub[g.output.position],Yu[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",ri[g.form.width],Zu[g.form.height]),children:[d.jsx(Lb,{theme:r,readOnly:t,rootType:e,onAddField:_,onOpenSettings:w}),e==="object"&&d.jsx(D_,{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(Cs,{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",ri[g.output.width],Zu[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(
|
|
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"})}));
|