brave-search-mcp
Version:
MCP Server that uses Brave Search API to search for images, general web search, video, news and points of interest.
8 lines • 535 kB
HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="light dark" />
<title>Brave Local Search</title>
<script type="module" crossorigin>!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var e,t,n,i,r,o,a,s,u,l,c,d,p={},m=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,h=Array.isArray;function v(e,t){for(var n in t)e[n]=t[n];return e}function g(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _(t,n,i){var r,o,a,s={};for(a in n)"key"==a?r=n[a]:"ref"==a?o=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):i),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===s[a]&&(s[a]=t.defaultProps[a]);return y(t,s,r,o,null)}function y(e,i,r,o,a){var s={type:e,props:i,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++n:a,__i:-1,__u:0};return null==a&&null!=t.vnode&&t.vnode(s),s}function b(){return{current:null}}function $(e){return e.children}function k(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?w(e):null}function x(e){if(e.__P&&e.__d){var n=e.__v,i=n.__e,r=[],o=[],a=v({},n);a.__v=n.__v+1,t.vnode&&t.vnode(a),j(e.__P,a,n,e.__n,e.__P.namespaceURI,32&n.__u?[i]:null,r,null==i?w(n):i,!!(32&n.__u),o),a.__v=n.__v,a.__.__k[a.__i]=a,D(r,a,o),n.__e=n.__=null,a.__e!=i&&z(a)}}function z(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),z(e)}function I(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!S.__r++||r!=t.debounceRendering)&&((r=t.debounceRendering)||o)(S)}function S(){for(var e,t=1;i.length;)i.length>t&&i.sort(a),e=i.shift(),t=i.length,x(e);S.__r=0}function O(e,t,n,i,r,o,a,s,u,l,c){var d,f,v,g,_,b,k,x=i&&i.__k||m,z=t.length;for(u=function(e,t,n,i,r){var o,a,s,u,l,c=n.length,d=c,p=0;for(e.__k=new Array(r),o=0;o<r;o++)null!=(a=t[o])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[o]=y(null,a,null,null,null):h(a)?a=e.__k[o]=y($,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[o]=y(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[o]=a,u=o+p,a.__=e,a.__b=e.__b+1,s=null,-1!=(l=a.__i=E(a,n,u,d))&&(d--,(s=n[l])&&(s.__u|=2)),null==s||null==s.__v?(-1==l&&(r>c?p--:r<c&&p++),"function"!=typeof a.type&&(a.__u|=4)):l!=u&&(l==u-1?p--:l==u+1?p++:(l>u?p--:p++,a.__u|=4))):e.__k[o]=null;if(d)for(o=0;o<c;o++)null!=(s=n[o])&&!(2&s.__u)&&(s.__e==i&&(i=w(s)),R(s,s));return i}(n,t,x,u,z),d=0;d<z;d++)null!=(v=n.__k[d])&&(f=-1!=v.__i&&x[v.__i]||p,v.__i=d,b=j(e,v,f,r,o,a,s,u,l,c),g=v.__e,v.ref&&f.ref!=v.ref&&(f.ref&&A(f.ref,null,v),c.push(v.ref,v.__c||g,v)),null==_&&null!=g&&(_=g),(k=!!(4&v.__u))||f.__k===v.__k?u=T(v,u,e,k):"function"==typeof v.type&&void 0!==b?u=b:g&&(u=g.nextSibling),v.__u&=-7);return n.__e=_,u}function T(e,t,n,i){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=T(r[o],t,n,i));return t}e.__e!=t&&(i&&(t&&e.type&&!t.parentNode&&(t=w(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function N(e,t){return t=t||[],null==e||"boolean"==typeof e||(h(e)?e.some(function(e){N(e,t)}):t.push(e)),t}function E(e,t,n,i){var r,o,a,s=e.key,u=e.type,l=t[n],c=null!=l&&!(2&l.__u);if(null===l&&null==s||c&&s==l.key&&u==l.type)return n;if(i>(c?1:0))for(r=n-1,o=n+1;r>=0||o<t.length;)if(null!=(l=t[a=r>=0?r--:o++])&&!(2&l.__u)&&s==l.key&&u==l.type)return a;return-1}function P(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||f.test(t)?n:n+"px"}function Z(e,t,n,i,r){var o,a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||P(e.style,t,"");if(n)for(t in n)i&&n[t]==i[t]||P(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(s,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i?n.u=i.u:(n.u=u,e.addEventListener(t,o?c:l,o)):e.removeEventListener(t,o?c:l,o);else{if("http://www.w3.org/2000/svg"==r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(d){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function U(e){return function(n){if(this.l){var i=this.l[n.type+e];if(null==n.t)n.t=u++;else if(n.t<i.u)return;return i(t.event?t.event(n):n)}}}function j(n,i,r,o,a,s,u,l,c,d){var f,_,y,b,x,z,I,S,T,N,E,P,U,j,D,A=i.type;if(void 0!==i.constructor)return null;128&r.__u&&(c=!!(32&r.__u),s=[l=i.__e=r.__e]),(f=t.__b)&&f(i);e:if("function"==typeof A)try{if(S=i.props,T="prototype"in A&&A.prototype.render,N=(f=A.contextType)&&o[f.__c],E=f?N?N.props.value:f.__:o,r.__c?I=(_=i.__c=r.__c).__=_.__E:(T?i.__c=_=new A(S,E):(i.__c=_=new k(S,E),_.constructor=A,_.render=L),N&&N.sub(_),_.state||(_.state={}),_.__n=o,y=_.__d=!0,_.__h=[],_._sb=[]),T&&null==_.__s&&(_.__s=_.state),T&&null!=A.getDerivedStateFromProps&&(_.__s==_.state&&(_.__s=v({},_.__s)),v(_.__s,A.getDerivedStateFromProps(S,_.__s))),b=_.props,x=_.state,_.__v=i,y)T&&null==A.getDerivedStateFromProps&&null!=_.componentWillMount&&_.componentWillMount(),T&&null!=_.componentDidMount&&_.__h.push(_.componentDidMount);else{if(T&&null==A.getDerivedStateFromProps&&S!==b&&null!=_.componentWillReceiveProps&&_.componentWillReceiveProps(S,E),i.__v==r.__v||!_.__e&&null!=_.shouldComponentUpdate&&!1===_.shouldComponentUpdate(S,_.__s,E)){i.__v!=r.__v&&(_.props=S,_.state=_.__s,_.__d=!1),i.__e=r.__e,i.__k=r.__k,i.__k.some(function(e){e&&(e.__=i)}),m.push.apply(_.__h,_._sb),_._sb=[],_.__h.length&&u.push(_);break e}null!=_.componentWillUpdate&&_.componentWillUpdate(S,_.__s,E),T&&null!=_.componentDidUpdate&&_.__h.push(function(){_.componentDidUpdate(b,x,z)})}if(_.context=E,_.props=S,_.__P=n,_.__e=!1,P=t.__r,U=0,T)_.state=_.__s,_.__d=!1,P&&P(i),f=_.render(_.props,_.state,_.context),m.push.apply(_.__h,_._sb),_._sb=[];else do{_.__d=!1,P&&P(i),f=_.render(_.props,_.state,_.context),_.state=_.__s}while(_.__d&&++U<25);_.state=_.__s,null!=_.getChildContext&&(o=v(v({},o),_.getChildContext())),T&&!y&&null!=_.getSnapshotBeforeUpdate&&(z=_.getSnapshotBeforeUpdate(b,x)),j=null!=f&&f.type===$&&null==f.key?M(f.props.children):f,l=O(n,h(j)?j:[j],i,r,o,a,s,u,l,c,d),_.base=i.__e,i.__u&=-161,_.__h.length&&u.push(_),I&&(_.__E=_.__=null)}catch(R){if(i.__v=null,c||null!=s)if(R.then){for(i.__u|=c?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;s[s.indexOf(l)]=null,i.__e=l}else{for(D=s.length;D--;)g(s[D]);C(i)}else i.__e=r.__e,i.__k=r.__k,R.then||C(i);t.__e(R,i,r)}else null==s&&i.__v==r.__v?(i.__k=r.__k,i.__e=r.__e):l=i.__e=function(n,i,r,o,a,s,u,l,c){var d,m,f,v,_,y,b,$=r.props||p,k=i.props,x=i.type;if("svg"==x?a="http://www.w3.org/2000/svg":"math"==x?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=s)for(d=0;d<s.length;d++)if((_=s[d])&&"setAttribute"in _==!!x&&(x?_.localName==x:3==_.nodeType)){n=_,s[d]=null;break}if(null==n){if(null==x)return document.createTextNode(k);n=document.createElementNS(a,x,k.is&&k),l&&(t.__m&&t.__m(i,s),l=!1),s=null}if(null==x)$===k||l&&n.data==k||(n.data=k);else{if(s=s&&e.call(n.childNodes),!l&&null!=s)for($={},d=0;d<n.attributes.length;d++)$[(_=n.attributes[d]).name]=_.value;for(d in $)_=$[d],"dangerouslySetInnerHTML"==d?f=_:"children"==d||d in k||"value"==d&&"defaultValue"in k||"checked"==d&&"defaultChecked"in k||Z(n,d,null,_,a);for(d in k)_=k[d],"children"==d?v=_:"dangerouslySetInnerHTML"==d?m=_:"value"==d?y=_:"checked"==d?b=_:l&&"function"!=typeof _||$[d]===_||Z(n,d,_,$[d],a);if(m)l||f&&(m.__html==f.__html||m.__html==n.innerHTML)||(n.innerHTML=m.__html),i.__k=[];else if(f&&(n.innerHTML=""),O("template"==i.type?n.content:n,h(v)?v:[v],i,r,o,"foreignObject"==x?"http://www.w3.org/1999/xhtml":a,s,u,s?s[0]:r.__k&&w(r,0),l,c),null!=s)for(d=s.length;d--;)g(s[d]);l||(d="value","progress"==x&&null==y?n.removeAttribute("value"):null!=y&&(y!==n[d]||"progress"==x&&!y||"option"==x&&y!=$[d])&&Z(n,d,y,$[d],a),d="checked",null!=b&&b!=n[d]&&Z(n,d,b,$[d],a))}return n}(r.__e,i,r,o,a,s,u,c,d);return(f=t.diffed)&&f(i),128&i.__u?void 0:l}function C(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(C))}function D(e,n,i){for(var r=0;r<i.length;r++)A(i[r],i[++r],i[++r]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(i){t.__e(i,n.__v)}})}function M(e){return"object"!=typeof e||null==e||e.__b>0?e:h(e)?e.map(M):v({},e)}function A(e,n,i){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==n||(e.__u=e(n))}else e.current=n}catch(o){t.__e(o,i)}}function R(e,n,i){var r,o;if(t.unmount&&t.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||A(r,null,n)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){t.__e(a,n)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&R(r[o],n,i||"function"!=typeof e.type);i||g(e.__e),e.__c=e.__=e.__e=void 0}function L(e,t,n){return this.constructor(e,n)}function F(n,i,r){var o,a,s,u;i==document&&(i=document.documentElement),t.__&&t.__(n,i),a=(o="function"==typeof r)?null:r&&r.__k||i.__k,s=[],u=[],j(i,n=(!o&&r||i).__k=_($,null,[n]),a||p,p,i.namespaceURI,!o&&r?[r]:a?null:i.firstChild?e.call(i.childNodes):null,s,!o&&r?r:a?a.__e:i.firstChild,o,u),D(s,n,u)}function J(e,t){F(e,t,J)}function q(t,n,i){var r,o,a,s,u=v({},t.props);for(a in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),n)"key"==a?r=n[a]:"ref"==a?o=n[a]:u[a]=void 0===n[a]&&null!=s?s[a]:n[a];return arguments.length>2&&(u.children=arguments.length>3?e.call(arguments,2):i),y(t.type,u,r||t.key,o||t.ref,null)}function W(e){function t(e){var n,i;return this.getChildContext||(n=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,I(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+d++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}e=m.slice,t={__e:function(e,t,n,i){for(var r,o,a;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),a=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),a=r.__d),a)return r.__E=r}catch(s){e=s}throw e}},n=0,k.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},n),this.props)),e&&v(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),I(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),I(this))},k.prototype.render=$,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,a=function(e,t){return e.__v.__b-t.__v.__b},S.__r=0,s=/(PointerCapture)$|Capture$/i,u=0,l=U(!1),c=U(!0),d=0;var H=0;function V(e,n,i,r,o,a){n||(n={});var s,u,l=n;if("ref"in l)for(u in l={},n)"ref"==u?s=n[u]:l[u]=n[u];var c={type:e,props:l,key:i,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--H,__i:-1,__u:0,__source:o,__self:a};if("function"==typeof e&&(s=e.defaultProps))for(u in s)void 0===l[u]&&(l[u]=s[u]);return t.vnode&&t.vnode(c),c}var B,K,G,X,Y=0,Q=[],ee=t,te=ee.__b,ne=ee.__r,ie=ee.diffed,re=ee.__c,oe=ee.unmount,ae=ee.__;function se(e,t){ee.__h&&ee.__h(K,e,Y||t),Y=0;var n=K.__H||(K.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ue(e){return Y=1,le(ze,e)}function le(e,t,n){var i=se(B++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):ze(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=K,!K.__f)){var r=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter(function(e){return e.__c});if(r.every(function(e){return!e.__N}))return!o||o.call(this,e,t,n);var a=i.__c.props!==e;return r.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}}),o&&o.call(this,e,t,n)||a};K.__f=!0;var o=K.shouldComponentUpdate,a=K.componentWillUpdate;K.componentWillUpdate=function(e,t,n){if(this.__e){var i=o;o=void 0,r(e,t,n),o=i}a&&a.call(this,e,t,n)},K.shouldComponentUpdate=r}return i.__N||i.__}function ce(e,t){var n=se(B++,3);!ee.__s&&xe(n.__H,t)&&(n.__=e,n.u=t,K.__H.__h.push(n))}function de(e,t){var n=se(B++,4);!ee.__s&&xe(n.__H,t)&&(n.__=e,n.u=t,K.__h.push(n))}function pe(e){return Y=5,fe(function(){return{current:e}},[])}function me(e,t,n){Y=6,de(function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))}function fe(e,t){var n=se(B++,7);return xe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function he(e,t){return Y=8,fe(function(){return e},t)}function ve(e){var t=K.context[e.__c],n=se(B++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(K)),t.props.value):e.__}function ge(e,t){ee.useDebugValue&&ee.useDebugValue(t?t(e):e)}function _e(){var e=se(B++,11);if(!e.__){for(var t=K.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ye(){for(var e;e=Q.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ke),t.__h.some(we),t.__h=[]}catch(n){t.__h=[],ee.__e(n,e.__v)}}}ee.__b=function(e){K=null,te&&te(e)},ee.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ae&&ae(e,t)},ee.__r=function(e){ne&&ne(e),B=0;var t=(K=e.__c).__H;t&&(G===K?(t.__h=[],K.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(ke),t.__h.some(we),t.__h=[],B=0)),G=K},ee.diffed=function(e){ie&&ie(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Q.push(t)&&X===ee.requestAnimationFrame||((X=ee.requestAnimationFrame)||$e)(ye)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),G=K=null},ee.__c=function(e,t){t.some(function(e){try{e.__h.some(ke),e.__h=e.__h.filter(function(e){return!e.__||we(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],ee.__e(n,e.__v)}}),re&&re(e,t)},ee.unmount=function(e){oe&&oe(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{ke(e)}catch(n){t=n}}),n.__H=void 0,t&&ee.__e(t,n.__v))};var be="function"==typeof requestAnimationFrame;function $e(e){var t,n=function(){clearTimeout(i),be&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,35);be&&(t=requestAnimationFrame(n))}function ke(e){var t=K,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),K=t}function we(e){var t=K;e.__c=e.__(),K=t}function xe(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function ze(e,t){return"function"==typeof t?t(e):t}function Ie(e,t){for(var n in t)e[n]=t[n];return e}function Se(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var i in t)if("__source"!==i&&e[i]!==t[i])return!0;return!1}function Oe(e,t){var n=t(),i=ue({t:{__:n,u:t}}),r=i[0].t,o=i[1];return de(function(){r.__=n,r.u=t,Te(r)&&o({t:r})},[e,n,t]),ce(function(){return Te(r)&&o({t:r}),e(function(){Te(r)&&o({t:r})})},[e]),n}function Te(e){try{return!((t=e.__)===(n=e.u())&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(i){return!0}var t,n}function Ne(e){e()}function Ee(e){return e}function Pe(){return[!1,Ne]}var Ze=de;function Ue(e,t){this.props=e,this.context=t}function je(e,t){function n(e){var n=this.props.ref,i=n==e.ref;return!i&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!i:Se(this.props,e)}function i(t){return this.shouldComponentUpdate=n,_(e,t)}return i.displayName="Memo("+(e.displayName||e.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i.type=e,i}(Ue.prototype=new k).isPureReactComponent=!0,Ue.prototype.shouldComponentUpdate=function(e,t){return Se(this.props,e)||Se(this.state,t)};var Ce=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ce&&Ce(e)};var De="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Me(e){function t(t){var n=Ie({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=De,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ae=function(e,t){return null==e?null:N(N(e).map(t))},Re={map:Ae,forEach:Ae,count:function(e){return e?N(e).length:0},only:function(e){var t=N(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:N},Le=t.__e;t.__e=function(e,t,n,i){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);Le(e,t,n,i)};var Fe=t.unmount;function Je(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=Ie({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Je(e,t,n)})),e}function qe(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return qe(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function We(){this.__u=0,this.o=null,this.__b=null}function He(e){if(!e.__)return null;var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ve(e){var t,n,i,r=null;function o(o){if(t||(t=e()).then(function(e){e&&(r=e.default||e),i=!0},function(e){n=e,i=!0}),n)throw n;if(!i)throw t;return r?_(r,o):null}return o.displayName="Lazy",o.__f=!0,o}function Be(){this.i=null,this.l=null}t.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Fe&&Fe(e)},(We.prototype=new k).__c=function(e,t){var n=t.__c,i=this;null==i.o&&(i.o=[]),i.o.push(n);var r=He(i.__v),o=!1,a=function(){o||i.__z||(o=!0,n.__R=null,r?r(u):u())};n.__R=a;var s=n.__P;n.__P=null;var u=function(){if(! --i.__u){if(i.state.__a){var e=i.state.__a;i.__v.__k[0]=qe(e,e.__c.__P,e.__c.__O)}var t;for(i.setState({__a:i.__b=null});t=i.o.pop();)t.__P=s,t.forceUpdate()}};i.__u++||32&t.__u||i.setState({__a:i.__b=i.__v.__k[0]}),e.then(a,a)},We.prototype.componentWillUnmount=function(){this.o=[]},We.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Je(this.__b,n,i.__O=i.__P)}this.__b=null}var r=t.__a&&_($,null,e.fallback);return r&&(r.__u&=-33),[_($,null,t.__a?null:e.children),r]};var Ke=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function Ge(e){return this.getChildContext=function(){return e.context},e.children}function Xe(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){F(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var i=t.__v;null!==i&&!i.__m&&null!==i.__;)i=i.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:i.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}F(_(Ge,{context:t.context},e.__v),t.v)}function Ye(e,t){var n=_(Xe,{__v:e,h:t});return n.containerInfo=t,n}(Be.prototype=new k).__a=function(e){var t=this,n=He(t.__v),i=t.l.get(e);return i[0]++,function(r){var o=function(){t.props.revealOrder?(i.push(r),Ke(t,e,i)):r()};n?n(o):o()}},Be.prototype.render=function(e){this.i=null,this.l=new Map;var t=N(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Be.prototype.componentDidUpdate=Be.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Ke(e,n,t)})};var Qe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,et=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,tt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,nt=/[A-Z0-9]/g,it="undefined"!=typeof document,rt=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ot(e,t,n){return null==t.__k&&(t.textContent=""),F(e,t),"function"==typeof n&&n(),e?e.__c:null}function at(e,t,n){return J(e,t),"function"==typeof n&&n(),e?e.__c:null}k.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(k.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var st=t.event;function ut(){}function lt(){return this.cancelBubble}function ct(){return this.defaultPrevented}t.event=function(e){return st&&(e=st(e)),e.persist=ut,e.isPropagationStopped=lt,e.isDefaultPrevented=ct,e.nativeEvent=e};var dt,pt={enumerable:!1,configurable:!0,get:function(){return this.class}},mt=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,i={},r=-1===n.indexOf("-");for(var o in t){var a=t[o];if(!("value"===o&&"defaultValue"in t&&null==a||it&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var s=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===a?a="":"translate"===s&&"no"===a?a=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?o="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||rt(t.type)?"onfocus"===s?o="onfocusin":"onblur"===s?o="onfocusout":tt.test(o)&&(o=s):s=o="oninput":r&&et.test(o)?o=o.replace(nt,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===s&&i[o=s]&&(o="oninputCapture"),i[o]=a}}"select"==n&&i.multiple&&Array.isArray(i.value)&&(i.value=N(t.children).forEach(function(e){e.props.selected=-1!=i.value.indexOf(e.props.value)})),"select"==n&&null!=i.defaultValue&&(i.value=N(t.children).forEach(function(e){e.props.selected=i.multiple?-1!=i.defaultValue.indexOf(e.props.value):i.defaultValue==e.props.value})),t.class&&!t.className?(i.class=t.class,Object.defineProperty(i,"className",pt)):t.className&&(i.class=i.className=t.className),e.props=i}(e),e.$$typeof=Qe,mt&&mt(e)};var ft=t.__r;t.__r=function(e){ft&&ft(e),dt=e.__c};var ht=t.diffed;t.diffed=function(e){ht&&ht(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),dt=null};var vt={ReactCurrentDispatcher:{current:{readContext:function(e){return dt.__n[e.__c].props.value},useCallback:he,useContext:ve,useDebugValue:ge,useDeferredValue:Ee,useEffect:ce,useId:_e,useImperativeHandle:me,useInsertionEffect:Ze,useLayoutEffect:de,useMemo:fe,useReducer:le,useRef:pe,useState:ue,useSyncExternalStore:Oe,useTransition:Pe}}};function gt(e){return _.bind(null,e)}function _t(e){return!!e&&e.$$typeof===Qe}function yt(e){return _t(e)&&e.type===$}function bt(e){return!!e&&"string"==typeof e.displayName&&e.displayName.startsWith("Memo(")}function $t(e){return _t(e)?q.apply(null,arguments):e}function kt(e){return!!e.__k&&(F(null,e),!0)}function wt(e){return e&&(e.base||1===e.nodeType&&e)||null}var xt=function(e,t){return e(t)},zt=function(e,t){return e(t)},It=$,St=_t,Ot={useState:ue,useId:_e,useReducer:le,useEffect:ce,useLayoutEffect:de,useInsertionEffect:Ze,useTransition:Pe,useDeferredValue:Ee,useSyncExternalStore:Oe,startTransition:Ne,useRef:pe,useImperativeHandle:me,useMemo:fe,useCallback:he,useContext:ve,useDebugValue:ge,version:"18.3.1",Children:Re,render:ot,hydrate:at,unmountComponentAtNode:kt,createPortal:Ye,createElement:_,createContext:W,createFactory:gt,cloneElement:$t,createRef:b,Fragment:$,isValidElement:_t,isElement:St,isFragment:yt,isMemo:bt,findDOMNode:wt,Component:k,PureComponent:Ue,memo:je,forwardRef:Me,flushSync:zt,unstable_batchedUpdates:xt,StrictMode:It,Suspense:We,SuspenseList:Be,lazy:Ve,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:vt};const Tt=Object.freeze(Object.defineProperty({__proto__:null,Children:Re,Component:k,Fragment:$,PureComponent:Ue,StrictMode:It,Suspense:We,SuspenseList:Be,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:vt,cloneElement:$t,createContext:W,createElement:_,createFactory:gt,createPortal:Ye,createRef:b,default:Ot,findDOMNode:wt,flushSync:zt,forwardRef:Me,hydrate:at,isElement:St,isFragment:yt,isMemo:bt,isValidElement:_t,lazy:Ve,memo:je,render:ot,startTransition:Ne,unmountComponentAtNode:kt,unstable_batchedUpdates:xt,useCallback:he,useContext:ve,useDebugValue:ge,useDeferredValue:Ee,useEffect:ce,useErrorBoundary:function(e){var t=se(B++,10),n=ue();return t.__=e,K.componentDidCatch||(K.componentDidCatch=function(e,i){t.__&&t.__(e,i),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:_e,useImperativeHandle:me,useInsertionEffect:Ze,useLayoutEffect:de,useMemo:fe,useReducer:le,useRef:pe,useState:ue,useSyncExternalStore:Oe,useTransition:Pe,version:"18.3.1"},Symbol.toStringTag,{value:"Module"}));function Nt(e,t,n){function i(n,i){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:i,constr:a,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,i);const r=a.prototype,o=Object.keys(r);for(let e=0;e<o.length;e++){const t=o[e];t in n||(n[t]=r[t].bind(n))}}const r=n?.Parent??Object;class o extends r{}function a(e){var t;const r=n?.Parent?new o:this;i(r,e),(t=r._zod).deferred??(t.deferred=[]);for(const n of r._zod.deferred)n();return r}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class Et extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Pt extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const Zt={};function Ut(e){return Zt}function jt(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function Ct(e,t){return"bigint"==typeof t?t.toString():t}function Dt(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Mt(e){return null==e}function At(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Rt=Symbol("evaluating");function Lt(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==Rt)return void 0===i&&(i=Rt,i=n()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ft(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Jt(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function qt(e){return JSON.stringify(e)}const Wt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ht(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Vt=Dt(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Bt(e){if(!1===Ht(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==Ht(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function Kt(e){return Bt(e)?{...e}:Array.isArray(e)?[...e]:e}const Gt=new Set(["string","number","symbol"]);function Xt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Yt(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function Qt(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const en={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function tn(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function nn(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function rn(e){return"string"==typeof e?e:e?.message}function on(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const r=rn(e.inst?._zod.def?.error?.(e))??rn(t?.error?.(e))??rn(n.customError?.(e))??rn(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function an(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function sn(...e){const[t,n,i]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:i}:{...t}}const un=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ct,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ln=Nt("$ZodError",un),cn=Nt("$ZodError",un,{Parent:Error}),dn=e=>(t,n,i,r)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new Et;if(a.issues.length){const t=new(r?.Err??e)(a.issues.map(e=>on(e,o,Ut())));throw Wt(t,r?.callee),t}return a.value},pn=e=>async(t,n,i,r)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const t=new(r?.Err??e)(a.issues.map(e=>on(e,o,Ut())));throw Wt(t,r?.callee),t}return a.value},mn=e=>(t,n,i)=>{const r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Et;return o.issues.length?{success:!1,error:new(e??ln)(o.issues.map(e=>on(e,r,Ut())))}:{success:!0,data:o.value}},fn=mn(cn),hn=e=>async(t,n,i)=>{const r=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>on(e,r,Ut())))}:{success:!0,data:o.value}},vn=hn(cn),gn=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return dn(e)(t,n,r)},_n=e=>(t,n,i)=>dn(e)(t,n,i),yn=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return pn(e)(t,n,r)},bn=e=>async(t,n,i)=>pn(e)(t,n,i),$n=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return mn(e)(t,n,r)},kn=e=>(t,n,i)=>mn(e)(t,n,i),wn=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return hn(e)(t,n,r)},xn=e=>async(t,n,i)=>hn(e)(t,n,i),zn=/^[cC][^\s-]{8,}$/,In=/^[0-9a-z]+$/,Sn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,On=/^[0-9a-vA-V]{20}$/,Tn=/^[A-Za-z0-9]{27}$/,Nn=/^[a-zA-Z0-9_-]{21}$/,En=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Pn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Zn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Un=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jn=/^(?:(?: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])$/,Cn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Dn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Mn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,An=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Rn=/^[A-Za-z0-9_-]*$/,Ln=/^\+[1-9]\d{6,14}$/,Fn="(?:(?:\\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])))",Jn=new RegExp(`^${Fn}$`);function qn(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const Wn=/^-?\d+$/,Hn=/^-?\d+(?:\.\d+)?$/,Vn=/^(?:true|false)$/i,Bn=/^null$/i,Kn=/^[^A-Z]*$/,Gn=/^[^a-z]*$/,Xn=Nt("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Yn={number:"number",bigint:"bigint",object:"date"},Qn=Nt("$ZodCheckLessThan",(e,t)=>{Xn.init(e,t);const n=Yn[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ei=Nt("$ZodCheckGreaterThan",(e,t)=>{Xn.init(e,t);const n=Yn[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ti=Nt("$ZodCheckMultipleOf",(e,t)=>{Xn.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let r=(i.split(".")[1]||"").length;if(0===r&&/\d?e-\d?/.test(i)){const e=i.match(/\d?e-(\d?)/);e?.[1]&&(r=Number.parseInt(e[1]))}const o=n>r?n:r;return Number.parseInt(e.toFixed(o).replace(".",""))%Number.parseInt(t.toFixed(o).replace(".",""))/10**o}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ni=Nt("$ZodCheckNumberFormat",(e,t)=>{Xn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[r,o]=en[t.format];e._zod.onattach.push(e=>{const i=e._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o,n&&(i.pattern=Wn)}),e._zod.check=a=>{const s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}))}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),ii=Nt("$ZodCheckMaxLength",(e,t)=>{var n;Xn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Mt(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const r=an(i);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),ri=Nt("$ZodCheckMinLength",(e,t)=>{var n;Xn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Mt(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const r=an(i);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),oi=Nt("$ZodCheckLengthEquals",(e,t)=>{var n;Xn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Mt(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const i=n.value,r=i.length;if(r===t.length)return;const o=an(i),a=r>t.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ai=Nt("$ZodCheckStringFormat",(e,t)=>{var n,i;Xn.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),si=Nt("$ZodCheckRegex",(e,t)=>{ai.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ui=Nt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Kn),ai.init(e,t)}),li=Nt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Gn),ai.init(e,t)}),ci=Nt("$ZodCheckIncludes",(e,t)=>{Xn.init(e,t);const n=Xt(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),di=Nt("$ZodCheckStartsWith",(e,t)=>{Xn.init(e,t);const n=new RegExp(`^${Xt(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),pi=Nt("$ZodCheckEndsWith",(e,t)=>{Xn.init(e,t);const n=new RegExp(`.*${Xt(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),mi=Nt("$ZodCheckOverwrite",(e,t)=>{Xn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class fi{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),i=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const r of i)this.content.push(r)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const hi={major:4,minor:3,patch:6},vi=Nt("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=hi;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const r of i)for(const t of r._zod.onattach)t(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let i,r=tn(e);for(const o of t){if(o._zod.def.when){if(!o._zod.def.when(e))continue}else if(r)continue;const t=e.issues.length,a=o._zod.check(e);if(a instanceof Promise&&!1===n?.async)throw new Et;if(i||a instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await a,e.issues.length!==t&&(r||(r=tn(e,t)))});else{if(e.issues.length===t)continue;r||(r=tn(e,t))}}return i?i.then(()=>e):e},n=(n,r,o)=>{if(tn(n))return n.aborted=!0,n;const a=t(r,i,o);if(a instanceof Promise){if(!1===o.async)throw new Et;return a.then(t=>e._zod.parse(t,o))}return e._zod.parse(a,o)};e._zod.run=(r,o)=>{if(o.skipChecks)return e._zod.parse(r,o);if("backward"===o.direction){const t=e._zod.parse({value:r.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,o)):n(t,r,o)}const a=e._zod.parse(r,o);if(a instanceof Promise){if(!1===o.async)throw new Et;return a.then(e=>t(e,i,o))}return t(a,i,o)}}Lt(e,"~standard",()=>({validate:t=>{try{const n=fn(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return vn(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),gi=Nt("$ZodString",(e,t)=>{var n;vi.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),_i=Nt("$ZodStringFormat",(e,t)=>{ai.init(e,t),gi.init(e,t)}),yi=Nt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Pn),_i.init(e,t)}),bi=Nt("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Zn(e))}else t.pattern??(t.pattern=Zn());_i.init(e,t)}),$i=Nt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Un),_i.init(e,t)}),ki=Nt("$ZodURL",(e,t)=>{_i.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),r=new URL(i);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=r.href:n.value=i)}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),wi=Nt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),_i.init(e,t)}),xi=Nt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Nn),_i.init(e,t)}),zi=Nt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=zn),_i.init(e,t)}),Ii=Nt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=In),_i.init(e,t)}),Si=Nt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Sn),_i.init(e,t)}),Oi=Nt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=On),_i.init(e,t)}),Ti=Nt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Tn),_i.init(e,t)}),Ni=Nt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=qn({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${Fn}T(?:${i})$`)}(t)),_i.init(e,t)}),Ei=Nt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Jn),_i.init(e,t)}),Pi=Nt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${qn(t)}$`)),_i.init(e,t)}),Zi=Nt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=En),_i.init(e,t)}),Ui=Nt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=jn),_i.init(e,t),e._zod.bag.format="ipv4"}),ji=Nt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Cn),_i.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Ci=Nt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Dn),_i.init(e,t)}),Di=Nt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Mn),_i.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(2!==i.length)throw new Error;const[e,t]=i;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Mi(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Ai=Nt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=An),_i.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Mi(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),Ri=Nt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Rn),_i.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!Rn.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Mi(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Li=Nt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ln),_i.init(e,t)}),Fi=Nt("$ZodJWT",(e,t)=>{_i.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[i]=n;if(!i)return!1;const r=JSON.parse(atob(i));return!("typ"in r&&"JWT"!==r?.typ||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Ji=Nt("$ZodNumber",(e,t)=>{vi.init(e,t),e._zod.pattern=e._zod.bag.pattern??Hn,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch(a){}const r=n.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return n;const o="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),qi=Nt("$ZodNumberFormat",(e,t)=>{ni.init(e,t),Ji.init(e,t)}),Wi=Nt("$ZodBoolean",(e,t)=>{vi.init(e,t),e._zod.pattern=Vn,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(o){}const r=n.value;return"boolean"==typeof r||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Hi=Nt("$ZodNull",(e,t)=>{vi.init(e,t),e._zod.pattern=Bn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{const i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}}),Vi=Nt("$ZodUnknown",(e,t)=>{vi.init(e,t),e._zod.parse=e=>e}),Bi=Nt("$ZodNever",(e,t)=>{vi.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Ki(e,t,n){e.issues.length&&t.issues.push(...nn(n,e.issues)),t.value[n]=e.value}const Gi=Nt("$ZodArray",(e,t)=>{vi.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const o=[];for(let e=0;e<r.length;e++){const a=r[e],s=t.element._zod.run({value:a,issues:[]},i);s instanceof Promise?o.push(s.then(t=>Ki(t,n,e))):Ki(s,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function Xi(e,t,n,i,r){if(e.issues.length){if(r&&!(n in i))return;t.issues.push(...nn(n,e.issues))}void 0===e.value?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function Yi(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=(i=e.shape,Object.keys(i).filter(e=>"optional"===i[e]._zod.optin&&"optional"===i[e]._zod.optout));var i;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Qi(e,t,n,i,r,o){const a=[],s=r.keySet,u=r.catchall._zod,l=u.def.type,c="optional"===u.optout;for(const d in t){if(s.has(d))continue;if("never"===l){a.push(d);continue}const r=u.run({value:t[d],issues:[]},i);r instanceof Promise?e.push(r.then(e=>Xi(e,n,d,t,c))):Xi(r,n,d,t,c)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const er=Nt("$ZodObject",(e,t)=>{vi.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.definePro