@docsearch/js 4.0.0 → 4.0.1
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/esm/index.d.ts +0 -5
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/umd/index.js +2 -2
- package/dist/umd/index.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! @docsearch/js 4.0.
|
|
2
|
-
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n(e,t,n,r,u,a,i){try{var o=e[a](i),s=o.value}catch(e){return void n(e)}o.done?t(s):Promise.resolve(s).then(r,u)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(u,a){var i=e.apply(t,r);function o(e){n(i,u,a,o,s,"next",e)}function s(e){n(i,u,a,o,s,"throw",e)}o(void 0)}))}}function u(e,n,r){return n=f(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return t(e)}(e,p()?Reflect.construct(n,r||[],f(e).constructor):n.apply(e,r))}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E(r.key),r)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=b(e))||t){n&&(e=n);var r=0,u=function(){};return{s:u,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw a}}}}function c(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function D(){D=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,u=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),o=new O(r||[]);return u(i,"_invoke",{value:w(e,n,o)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",p="suspendedYield",h="executing",v="completed",m={};function y(){}function g(){}function F(){}var E={};c(E,i,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(I([])));b&&b!==n&&r.call(b,i)&&(E=b);var k=F.prototype=y.prototype=Object.create(E);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(u,a,i,o){var s=f(e[u],e,a);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,i,o)}),(function(e){n("throw",e,i,o)})):t.resolve(l).then((function(e){c.value=e,i(c)}),(function(e){return n("throw",e,i,o)}))}o(s.arg)}var a;u(this,"_invoke",{value:function(e,r){function u(){return new t((function(t,u){n(e,r,t,u)}))}return a=a?a.then(u,u):u()}})}function w(t,n,r){var u=d;return function(a,i){if(u===h)throw Error("Generator is already running");if(u===v){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=x(o,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(u===d)throw u=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);u=h;var c=f(t,n,r);if("normal"===c.type){if(u=r.done?v:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(u=v,r.method="throw",r.arg=c.arg)}}}function x(t,n){var r=n.method,u=t.iterator[r];if(u===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=f(u,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var u=-1,a=function n(){for(;++u<t.length;)if(r.call(t,u))return n.value=t[u],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=F,u(k,"constructor",{value:F,configurable:!0}),u(F,"constructor",{value:g,configurable:!0}),g.displayName=c(F,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,F):(e.__proto__=F,c(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},C(A.prototype),c(A.prototype,o,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,u,a){void 0===a&&(a=Promise);var i=new A(l(e,n,r,u),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},C(k),c(k,s,"Generator"),c(k,i,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(B),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function u(r,u){return o.type="throw",o.arg=t,n.next=r,u&&(n.method="next",n.arg=e),!!u}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return u("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return u(i.catchLoc,!0);if(this.prev<i.finallyLoc)return u(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return u(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return u(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var u=this.tryEntries[n];if(u.tryLoc<=this.prev&&r.call(u,"finallyLoc")&&this.prev<u.finallyLoc){var a=u;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),B(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var u=r.arg;B(n)}return u}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,a,i,o=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(s=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);s=!0);}catch(e){c=!0,u=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw u}}return o}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||b(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function b(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}function k(e){var t="function"==typeof Map?new Map:void 0;return k=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(p())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var u=new(e.bind.apply(e,r));return n&&y(u,n.prototype),u}(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,e)},k(e)}var C,A,w,x,S,B,O,I,T,P,j,N,z={},R=[],M=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Z=Array.isArray;function L(e,t){for(var n in t)e[n]=t[n];return e}function $(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function q(e,t,n){var r,u,a,i={};for(a in t)"key"==a?r=t[a]:"ref"==a?u=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?C.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===i[a]&&(i[a]=e.defaultProps[a]);return U(e,i,r,u,null)}function U(e,t,n,r,u){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==u?++w:u,__i:-1,__u:0};return null==u&&null!=A.vnode&&A.vnode(a),a}function H(e){return e.children}function V(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 K(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return K(e)}}function J(e){(!e.__d&&(e.__d=!0)&&x.push(e)&&!G.__r++||S!==A.debounceRendering)&&((S=A.debounceRendering)||B)(G)}function G(){var e,t,n,r,u,a,i,o;for(x.sort(O);e=x.shift();)e.__d&&(t=x.length,r=void 0,a=(u=(n=e).__v).__e,i=[],o=[],n.__P&&((r=L({},u)).__v=u.__v+1,A.vnode&&A.vnode(r),ue(n.__P,r,u,n.__n,n.__P.namespaceURI,32&u.__u?[a]:null,i,null==a?W(u):a,!!(32&u.__u),o),r.__v=u.__v,r.__.__k[r.__i]=r,ae(i,r,o),r.__e!=a&&K(r)),x.length>t&&x.sort(O));G.__r=0}function Q(e,t,n,r,u,a,i,o,s,c,l){var f,d,p,h,v,m,D=r&&r.__k||R,y=t.length;for(s=function(e,t,n,r,u){var a,i,o,s,c,l=n.length,f=l,d=0;for(e.__k=new Array(u),a=0;a<u;a++)null!=(i=t[a])&&"boolean"!=typeof i&&"function"!=typeof i?(s=a+d,(i=e.__k[a]="string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?U(null,i,null,null,null):Z(i)?U(H,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?U(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,o=null,-1!==(c=i.__i=ee(i,n,s,f))&&(f--,(o=n[c])&&(o.__u|=2)),null==o||null===o.__v?(-1==c&&d--,"function"!=typeof i.type&&(i.__u|=4)):c!=s&&(c==s-1?d--:c==s+1?d++:(c>s?d--:d++,i.__u|=4))):e.__k[a]=null;if(f)for(a=0;a<l;a++)null!=(o=n[a])&&!(2&o.__u)&&(o.__e==r&&(r=W(o)),se(o,o));return r}(n,t,D,s,y),f=0;f<y;f++)null!=(p=n.__k[f])&&(d=-1===p.__i?z:D[p.__i]||z,p.__i=f,m=ue(e,p,d,u,a,i,o,s,c,l),h=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&oe(d.ref,null,p),l.push(p.ref,p.__c||h,p)),null==v&&null!=h&&(v=h),4&p.__u||d.__k===p.__k?s=Y(p,s,e):"function"==typeof p.type&&void 0!==m?s=m:h&&(s=h.nextSibling),p.__u&=-7);return n.__e=v,s}function Y(e,t,n){var r,u;if("function"==typeof e.type){for(r=e.__k,u=0;r&&u<r.length;u++)r[u]&&(r[u].__=e,t=Y(r[u],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(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 X(e,t){return t=t||[],null==e||"boolean"==typeof e||(Z(e)?e.some((function(e){X(e,t)})):t.push(e)),t}function ee(e,t,n,r){var u,a,i=e.key,o=e.type,s=t[n];if(null===s||s&&i==s.key&&o===s.type&&!(2&s.__u))return n;if(r>(null==s||2&s.__u?0:1))for(u=n-1,a=n+1;u>=0||a<t.length;){if(u>=0){if((s=t[u])&&!(2&s.__u)&&i==s.key&&o===s.type)return u;u--}if(a<t.length){if((s=t[a])&&!(2&s.__u)&&i==s.key&&o===s.type)return a;a++}}return-1}function te(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||M.test(t)?n:n+"px"}function ne(e,t,n,r,u){var a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||te(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||te(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])a=t!=(t=t.replace(I,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.u=r.u:(n.u=T,e.addEventListener(t,a?j:P,a)):e.removeEventListener(t,a?j:P,a);else{if("http://www.w3.org/2000/svg"==u)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(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function re(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=T++;else if(t.t<n.u)return;return n(A.event?A.event(t):t)}}}function ue(e,t,n,r,u,a,i,o,s,c){var l,f,d,p,h,v,m,D,y,g,F,E,_,b,k,C,w,x=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(s=!!(32&n.__u),a=[o=t.__e=n.__e]),(l=A.__b)&&l(t);e:if("function"==typeof x)try{if(D=t.props,y="prototype"in x&&x.prototype.render,g=(l=x.contextType)&&r[l.__c],F=l?g?g.props.value:l.__:r,n.__c?m=(f=t.__c=n.__c).__=f.__E:(y?t.__c=f=new x(D,F):(t.__c=f=new V(D,F),f.constructor=x,f.render=ce),g&&g.sub(f),f.props=D,f.state||(f.state={}),f.context=F,f.__n=r,d=f.__d=!0,f.__h=[],f._sb=[]),y&&null==f.__s&&(f.__s=f.state),y&&null!=x.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=L({},f.__s)),L(f.__s,x.getDerivedStateFromProps(D,f.__s))),p=f.props,h=f.state,f.__v=t,d)y&&null==x.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),y&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(y&&null==x.getDerivedStateFromProps&&D!==p&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(D,F),!f.__e&&(null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(D,f.__s,F)||t.__v==n.__v)){for(t.__v!=n.__v&&(f.props=D,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),E=0;E<f._sb.length;E++)f.__h.push(f._sb[E]);f._sb=[],f.__h.length&&i.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(D,f.__s,F),y&&null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(p,h,v)}))}if(f.context=F,f.props=D,f.__P=e,f.__e=!1,_=A.__r,b=0,y){for(f.state=f.__s,f.__d=!1,_&&_(t),l=f.render(f.props,f.state,f.context),k=0;k<f._sb.length;k++)f.__h.push(f._sb[k]);f._sb=[]}else do{f.__d=!1,_&&_(t),l=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++b<25);f.state=f.__s,null!=f.getChildContext&&(r=L(L({},r),f.getChildContext())),y&&!d&&null!=f.getSnapshotBeforeUpdate&&(v=f.getSnapshotBeforeUpdate(p,h)),o=Q(e,Z(C=null!=l&&l.type===H&&null==l.key?l.props.children:l)?C:[C],t,n,r,u,a,i,o,s,c),f.base=t.__e,t.__u&=-161,f.__h.length&&i.push(f),m&&(f.__E=f.__=null)}catch(e){if(t.__v=null,s||null!=a)if(e.then){for(t.__u|=s?160:128;o&&8==o.nodeType&&o.nextSibling;)o=o.nextSibling;a[a.indexOf(o)]=null,t.__e=o}else for(w=a.length;w--;)$(a[w]);else t.__e=n.__e,t.__k=n.__k;A.__e(e,t,n)}else null==a&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):o=t.__e=ie(n.__e,t,n,r,u,a,i,s,c);return(l=A.diffed)&&l(t),128&t.__u?void 0:o}function ae(e,t,n){for(var r=0;r<n.length;r++)oe(n[r],n[++r],n[++r]);A.__c&&A.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){A.__e(e,t.__v)}}))}function ie(e,t,n,r,u,a,i,o,s){var c,l,f,d,p,h,v,m=n.props,D=t.props,y=t.type;if("svg"==y?u="http://www.w3.org/2000/svg":"math"==y?u="http://www.w3.org/1998/Math/MathML":u||(u="http://www.w3.org/1999/xhtml"),null!=a)for(c=0;c<a.length;c++)if((p=a[c])&&"setAttribute"in p==!!y&&(y?p.localName==y:3==p.nodeType)){e=p,a[c]=null;break}if(null==e){if(null==y)return document.createTextNode(D);e=document.createElementNS(u,y,D.is&&D),o&&(A.__m&&A.__m(t,a),o=!1),a=null}if(null===y)m===D||o&&e.data===D||(e.data=D);else{if(a=a&&C.call(e.childNodes),m=n.props||z,!o&&null!=a)for(m={},c=0;c<e.attributes.length;c++)m[(p=e.attributes[c]).name]=p.value;for(c in m)if(p=m[c],"children"==c);else if("dangerouslySetInnerHTML"==c)f=p;else if(!(c in D)){if("value"==c&&"defaultValue"in D||"checked"==c&&"defaultChecked"in D)continue;ne(e,c,null,p,u)}for(c in D)p=D[c],"children"==c?d=p:"dangerouslySetInnerHTML"==c?l=p:"value"==c?h=p:"checked"==c?v=p:o&&"function"!=typeof p||m[c]===p||ne(e,c,p,m[c],u);if(l)o||f&&(l.__html===f.__html||l.__html===e.innerHTML)||(e.innerHTML=l.__html),t.__k=[];else if(f&&(e.innerHTML=""),Q(e,Z(d)?d:[d],t,n,r,"foreignObject"==y?"http://www.w3.org/1999/xhtml":u,a,i,a?a[0]:n.__k&&W(n,0),o,s),null!=a)for(c=a.length;c--;)$(a[c]);o||(c="value","progress"==y&&null==h?e.removeAttribute("value"):void 0!==h&&(h!==e[c]||"progress"==y&&!h||"option"==y&&h!==m[c])&&ne(e,c,h,m[c],u),c="checked",void 0!==v&&v!==e[c]&&ne(e,c,v,m[c],u))}return e}function oe(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){A.__e(e,n)}}function se(e,t,n){var r,u;if(A.unmount&&A.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||oe(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){A.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(u=0;u<r.length;u++)r[u]&&se(r[u],t,n||"function"!=typeof e.type);n||$(e.__e),e.__c=e.__=e.__e=void 0}function ce(e,t,n){return this.constructor(e,n)}function le(e,t,n){var r,u,a,i;t==document&&(t=document.documentElement),A.__&&A.__(e,t),u=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],i=[],ue(t,e=(!r&&n||t).__k=q(H,null,[e]),u||z,z,t.namespaceURI,!r&&n?[n]:u?null:t.firstChild?C.call(t.childNodes):null,a,!r&&n?n:u?u.__e:t.firstChild,r,i),ae(a,e,i)}function fe(e,t){le(e,t,fe)}function de(e,t,n){var r,u,a,i,o=L({},e.props);for(a in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)"key"==a?r=t[a]:"ref"==a?u=t[a]:o[a]=void 0===t[a]&&void 0!==i?i[a]:t[a];return arguments.length>2&&(o.children=arguments.length>3?C.call(arguments,2):n),U(e.type,o,r||e.key,u||e.ref,null)}C=R.slice,A={__e:function(e,t,n,r){for(var u,a,i;t=t.__;)if((u=t.__c)&&!u.__)try{if((a=u.constructor)&&null!=a.getDerivedStateFromError&&(u.setState(a.getDerivedStateFromError(e)),i=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(e,r||{}),i=u.__d),i)return u.__E=u}catch(t){e=t}throw e}},w=0,V.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=L({},this.state),"function"==typeof e&&(e=e(L({},n),this.props)),e&&L(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),J(this))},V.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),J(this))},V.prototype.render=H,x=[],B="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,O=function(e,t){return e.__v.__b-t.__v.__b},G.__r=0,I=/(PointerCapture)$|Capture$/i,T=0,P=re(!1),j=re(!0),N=0;var pe,he,ve,me,De=0,ye=[],ge=A,Fe=ge.__b,Ee=ge.__r,_e=ge.diffed,be=ge.__c,ke=ge.unmount,Ce=ge.__;function Ae(e,t){ge.__h&&ge.__h(he,e,De||t),De=0;var n=he.__H||(he.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function we(e){return De=1,xe(Ue,e)}function xe(e,t,n){var r=Ae(pe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ue(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=he,!he.u)){var u=function(e,t,n){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter((function(e){return!!e.__c}));if(u.every((function(e){return!e.__N})))return!a||a.call(this,e,t,n);var i=r.__c.props!==e;return u.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),a&&a.call(this,e,t,n)||i};he.u=!0;var a=he.shouldComponentUpdate,i=he.componentWillUpdate;he.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,u(e,t,n),a=r}i&&i.call(this,e,t,n)},he.shouldComponentUpdate=u}return r.__N||r.__}function Se(e,t){var n=Ae(pe++,3);!ge.__s&&qe(n.__H,t)&&(n.__=e,n.i=t,he.__H.__h.push(n))}function Be(e,t){var n=Ae(pe++,4);!ge.__s&&qe(n.__H,t)&&(n.__=e,n.i=t,he.__h.push(n))}function Oe(e){return De=5,Te((function(){return{current:e}}),[])}function Ie(e,t,n){De=6,Be((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function Te(e,t){var n=Ae(pe++,7);return qe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Pe(e,t){return De=8,Te((function(){return e}),t)}function je(e){var t=he.context[e.__c],n=Ae(pe++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(he)),t.props.value):e.__}function Ne(e,t){ge.useDebugValue&&ge.useDebugValue(t?t(e):e)}function ze(){var e=Ae(pe++,11);if(!e.__){for(var t=he.__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 Re(){for(var e;e=ye.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Le),e.__H.__h.forEach($e),e.__H.__h=[]}catch(t){e.__H.__h=[],ge.__e(t,e.__v)}}ge.__b=function(e){he=null,Fe&&Fe(e)},ge.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ce&&Ce(e,t)},ge.__r=function(e){Ee&&Ee(e),pe=0;var t=(he=e.__c).__H;t&&(ve===he?(t.__h=[],he.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(Le),t.__h.forEach($e),t.__h=[],pe=0)),ve=he},ge.diffed=function(e){_e&&_e(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ye.push(t)&&me===ge.requestAnimationFrame||((me=ge.requestAnimationFrame)||Ze)(Re)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),ve=he=null},ge.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Le),e.__h=e.__h.filter((function(e){return!e.__||$e(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],ge.__e(n,e.__v)}})),be&&be(e,t)},ge.unmount=function(e){ke&&ke(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Le(e)}catch(e){t=e}})),n.__H=void 0,t&&ge.__e(t,n.__v))};var Me="function"==typeof requestAnimationFrame;function Ze(e){var t,n=function(){clearTimeout(r),Me&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Me&&(t=requestAnimationFrame(n))}function Le(e){var t=he,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),he=t}function $e(e){var t=he;e.__c=e.__(),he=t}function qe(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ue(e,t){return"function"==typeof t?t(e):t}function He(e,t){for(var n in t)e[n]=t[n];return e}function Ve(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function We(e,t){var n=t(),r=we({t:{__:n,u:t}}),u=r[0].t,a=r[1];return Be((function(){u.__=n,u.u=t,Ke(u)&&a({t:u})}),[e,n,t]),Se((function(){return Ke(u)&&a({t:u}),e((function(){Ke(u)&&a({t:u})}))}),[e]),n}function Ke(e){var t,n,r=e.u,u=e.__;try{var a=r();return!((t=u)===(n=a)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}function Je(e){e()}function Ge(e){return e}function Qe(){return[!1,Je]}var Ye=Be;function Xe(e,t){this.props=e,this.context=t}function et(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Ve(this.props,e)}function r(t){return this.shouldComponentUpdate=n,q(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Xe.prototype=new V).isPureReactComponent=!0,Xe.prototype.shouldComponentUpdate=function(e,t){return Ve(this.props,e)||Ve(this.state,t)};var tt=A.__b;A.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),tt&&tt(e)};var nt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var rt=function(e,t){return null==e?null:X(X(e).map(t))},ut={map:rt,forEach:rt,count:function(e){return e?X(e).length:0},only:function(e){var t=X(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:X},at=A.__e;A.__e=function(e,t,n,r){if(e.then)for(var u,a=t;a=a.__;)if((u=a.__c)&&u.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),u.__c(e,t);at(e,t,n,r)};var it=A.unmount;function ot(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=He({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return ot(e,t,n)}))),e}function st(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return st(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 ct(){this.__u=0,this.o=null,this.__b=null}function lt(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ft(){this.i=null,this.l=null}A.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),it&&it(e)},(ct.prototype=new V).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var u=lt(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,u?u(o):o())};n.__R=i;var o=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=st(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},ct.prototype.componentWillUnmount=function(){this.o=[]},ct.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=ot(this.__b,n,r.__O=r.__P)}this.__b=null}var u=t.__a&&q(H,null,e.fallback);return u&&(u.__u&=-33),[q(H,null,t.__a?null:e.children),u]};var dt=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 pt(e){return this.getChildContext=function(){return e.context},e.children}function ht(e){var t=this,n=e.h;t.componentWillUnmount=function(){le(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),t.v||(t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.h.appendChild(e)},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)}}),le(q(pt,{context:t.context},e.__v),t.v)}function vt(e,t){var n=q(ht,{__v:e,h:t});return n.containerInfo=t,n}(ft.prototype=new V).__a=function(e){var t=this,n=lt(t.__v),r=t.l.get(e);return r[0]++,function(u){var a=function(){t.props.revealOrder?(r.push(u),dt(t,e,r)):u()};n?n(a):a()}},ft.prototype.render=function(e){this.i=null,this.l=new Map;var t=X(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},ft.prototype.componentDidUpdate=ft.prototype.componentDidMount=function(){var e=this;this.l.forEach((function(t,n){dt(e,n,t)}))};var mt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Dt=/^(?: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]/,yt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,gt=/[A-Z0-9]/g,Ft="undefined"!=typeof document,Et=function(e){return("undefined"!=typeof Symbol&&"symbol"==_(Symbol())?/fil|che|rad/:/fil|che|ra/).test(e)};function _t(e,t,n){return null==t.__k&&(t.textContent=""),le(e,t),"function"==typeof n&&n(),e?e.__c:null}V.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(V.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var bt=A.event;function kt(){}function Ct(){return this.cancelBubble}function At(){return this.defaultPrevented}A.event=function(e){return bt&&(e=bt(e)),e.persist=kt,e.isPropagationStopped=Ct,e.isDefaultPrevented=At,e.nativeEvent=e};var wt,xt={enumerable:!1,configurable:!0,get:function(){return this.class}},St=A.vnode;A.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},u=-1===n.indexOf("-");for(var a in t){var i=t[a];if(!("value"===a&&"defaultValue"in t&&null==i||Ft&&"children"===a&&"noscript"===n||"class"===a||"className"===a)){var o=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===i?i="":"translate"===o&&"no"===i?i=!1:"o"===o[0]&&"n"===o[1]?"ondoubleclick"===o?a="ondblclick":"onchange"!==o||"input"!==n&&"textarea"!==n||Et(t.type)?"onfocus"===o?a="onfocusin":"onblur"===o?a="onfocusout":yt.test(a)&&(a=o):o=a="oninput":u&&Dt.test(a)?a=a.replace(gt,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===o&&r[a=o]&&(a="oninputCapture"),r[a]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=X(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=X(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",xt)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=mt,St&&St(e)};var Bt=A.__r;A.__r=function(e){Bt&&Bt(e),wt=e.__c};var Ot=A.diffed;A.diffed=function(e){Ot&&Ot(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),wt=null};var It={ReactCurrentDispatcher:{current:{readContext:function(e){return wt.__n[e.__c].props.value},useCallback:Pe,useContext:je,useDebugValue:Ne,useDeferredValue:Ge,useEffect:Se,useId:ze,useImperativeHandle:Ie,useInsertionEffect:Ye,useLayoutEffect:Be,useMemo:Te,useReducer:xe,useRef:Oe,useState:we,useSyncExternalStore:We,useTransition:Qe}}};function Tt(e){return!!e&&e.$$typeof===mt}function Pt(e){return!!e.__k&&(le(null,e),!0)}var jt={useState:we,useId:ze,useReducer:xe,useEffect:Se,useLayoutEffect:Be,useInsertionEffect:Ye,useTransition:Qe,useDeferredValue:Ge,useSyncExternalStore:We,startTransition:Je,useRef:Oe,useImperativeHandle:Ie,useMemo:Te,useCallback:Pe,useContext:je,useDebugValue:Ne,version:"18.3.1",Children:ut,render:_t,hydrate:function(e,t,n){return fe(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:Pt,createPortal:vt,createElement:q,createContext:function(e,t){var n={__c:t="__cC"+N++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.forEach((function(e){e.__e=!0,J(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 n.Provider.__=n.Consumer.contextType=n},createFactory:function(e){return q.bind(null,e)},cloneElement:function(e){return Tt(e)?de.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:H,isValidElement:Tt,isElement:Tt,isFragment:function(e){return Tt(e)&&e.type===H},isMemo:function(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")},findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:V,PureComponent:Xe,memo:et,forwardRef:function(e){function t(t){var n=He({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=nt,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:H,Suspense:ct,SuspenseList:ft,lazy:function(e){var t,n,r;function u(u){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return q(n,u)}return u.displayName="Lazy",u.__f=!0,u},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:It},Nt=["type"],zt=["type"],Rt=["additionalProperties"],Mt=["abortSignal"],Zt=["messageId"],Lt=["messages"],$t=["experimental_throttle","resume"];function qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ut(e,t,n,r,u,a,i){try{var o=e[a](i),s=o.value}catch(e){return void n(e)}o.done?t(s):Promise.resolve(s).then(r,u)}function Ht(e){return function(){var t=this,n=arguments;return new Promise((function(r,u){var a=e.apply(t,n);function i(e){Ut(a,r,u,i,o,"next",e)}function o(e){Ut(a,r,u,i,o,"throw",e)}i(void 0)}))}}function Vt(e,t,n){return t=en(t),function(e,t){if(t&&("object"==_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,nn()?Reflect.construct(t,n||[],en(e).constructor):t.apply(e,n))}function Wt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kt(e,t,n){if(nn())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var u=new(e.bind.apply(e,r));return n&&sn(u,n.prototype),u}function Jt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fn(r.key),r)}}function Gt(e,t,n){return t&&Jt(e.prototype,t),n&&Jt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=pn(e))||t){n&&(e=n);var r=0,u=function(){};return{s:u,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw a}}}}function Yt(e,t,n){return(t=fn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xt(){return Xt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xt.apply(null,arguments)}function en(e){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},en(e)}function tn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sn(e,t)}function nn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(nn=function(){return!!e})()}function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rn(Object(n),!0).forEach((function(t){Yt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function an(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function on(){on=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,u=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var a=t&&t.prototype instanceof D?t:D,i=Object.create(a.prototype),o=new O(r||[]);return u(i,"_invoke",{value:w(e,n,o)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",p="suspendedYield",h="executing",v="completed",m={};function D(){}function y(){}function g(){}var F={};c(F,i,(function(){return this}));var E=Object.getPrototypeOf,b=E&&E(E(I([])));b&&b!==n&&r.call(b,i)&&(F=b);var k=g.prototype=D.prototype=Object.create(F);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(u,a,i,o){var s=f(e[u],e,a);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==_(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,i,o)}),(function(e){n("throw",e,i,o)})):t.resolve(l).then((function(e){c.value=e,i(c)}),(function(e){return n("throw",e,i,o)}))}o(s.arg)}var a;u(this,"_invoke",{value:function(e,r){function u(){return new t((function(t,u){n(e,r,t,u)}))}return a=a?a.then(u,u):u()}})}function w(t,n,r){var u=d;return function(a,i){if(u===h)throw Error("Generator is already running");if(u===v){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=x(o,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(u===d)throw u=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);u=h;var c=f(t,n,r);if("normal"===c.type){if(u=r.done?v:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(u=v,r.method="throw",r.arg=c.arg)}}}function x(t,n){var r=n.method,u=t.iterator[r];if(u===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=f(u,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var u=-1,a=function n(){for(;++u<t.length;)if(r.call(t,u))return n.value=t[u],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(_(t)+" is not iterable")}return y.prototype=g,u(k,"constructor",{value:g,configurable:!0}),u(g,"constructor",{value:y,configurable:!0}),y.displayName=c(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},C(A.prototype),c(A.prototype,o,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,u,a){void 0===a&&(a=Promise);var i=new A(l(e,n,r,u),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},C(k),c(k,s,"Generator"),c(k,i,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(B),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function u(r,u){return o.type="throw",o.arg=t,n.next=r,u&&(n.method="next",n.arg=e),!!u}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return u("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return u(i.catchLoc,!0);if(this.prev<i.finallyLoc)return u(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return u(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return u(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var u=this.tryEntries[n];if(u.tryLoc<=this.prev&&r.call(u,"finallyLoc")&&this.prev<u.finallyLoc){var a=u;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),B(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var u=r.arg;B(n)}return u}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function sn(e,t){return sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sn(e,t)}function cn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,a,i,o=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);s=!0);}catch(e){c=!0,u=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw u}}return o}}(e,t)||pn(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ln(e){return function(e){if(Array.isArray(e))return qt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fn(e){var t=function(e){if("object"!=_(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_(t)?t:t+""}function dn(e){return dn="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},dn(e)}function pn(e,t){if(e){if("string"==typeof e)return qt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qt(e,t):void 0}}function hn(e){var t="function"==typeof Map?new Map:void 0;return hn=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Kt(e,arguments,en(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),sn(n,e)},hn(e)}var vn={"Ctrl/Cmd+K":!0,"/":!0};function mn(e){return un(un({},vn),e)}function Dn(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jt.createElement("path",{d:"M8.19531 8.76758H7.33398C7.02539 8.76758 6.74414 8.69531 6.49023 8.55078C6.23633 8.40234 6.0332 8.20312 5.88086 7.95312C5.73242 7.70312 5.6582 7.42188 5.6582 7.10938C5.6582 6.80078 5.73242 6.51953 5.88086 6.26562C6.0332 6.01172 6.23633 5.80859 6.49023 5.65625C6.74414 5.50391 7.02539 5.42773 7.33398 5.42773C7.64258 5.42773 7.92383 5.50391 8.17773 5.65625C8.43164 5.80859 8.63281 6.01172 8.78125 6.26562C8.93359 6.51953 9.00977 6.80078 9.00977 7.10938V7.96484H10.9902V7.10938C10.9902 6.80078 11.0664 6.51953 11.2188 6.26562C11.3711 6.01172 11.5723 5.80859 11.8223 5.65625C12.0762 5.50391 12.3574 5.42773 12.666 5.42773C12.9746 5.42773 13.2559 5.50391 13.5098 5.65625C13.7637 5.80859 13.9648 6.01172 14.1133 6.26562C14.2656 6.51953 14.3418 6.80078 14.3418 7.10938C14.3418 7.42188 14.2656 7.70312 14.1133 7.95312C13.9648 8.20312 13.7637 8.40234 13.5098 8.55078C13.2559 8.69531 12.9746 8.76758 12.666 8.76758H11.8105V10.7773H12.666C12.9746 10.7773 13.2559 10.8516 13.5098 11C13.7637 11.1445 13.9648 11.3418 14.1133 11.5918C14.2656 11.8418 14.3418 12.123 14.3418 12.4355C14.3418 12.7441 14.2656 13.0254 14.1133 13.2793C13.9648 13.5332 13.7637 13.7363 13.5098 13.8887C13.2559 14.041 12.9746 14.1172 12.666 14.1172C12.3574 14.1172 12.0762 14.041 11.8223 13.8887C11.5723 13.7363 11.3711 13.5332 11.2188 13.2793C11.0664 13.0254 10.9902 12.7441 10.9902 12.4355V11.5801H9.00977V12.4355C9.00977 12.7441 8.93359 13.0254 8.78125 13.2793C8.63281 13.5332 8.43164 13.7363 8.17773 13.8887C7.92383 14.041 7.64258 14.1172 7.33398 14.1172C7.02539 14.1172 6.74414 14.041 6.49023 13.8887C6.23633 13.7363 6.0332 13.5332 5.88086 13.2793C5.73242 13.0254 5.6582 12.7441 5.6582 12.4355C5.6582 12.123 5.73242 11.8418 5.88086 11.5918C6.0332 11.3418 6.23633 11.1445 6.49023 11C6.74414 10.8516 7.02539 10.7773 7.33398 10.7773H8.19531V8.76758ZM7.33398 7.97656H8.19531V7.10938C8.19531 6.875 8.10938 6.67383 7.9375 6.50586C7.76953 6.33398 7.56836 6.24805 7.33398 6.24805C7.09961 6.24805 6.89648 6.33398 6.72461 6.50586C6.55664 6.67383 6.47266 6.875 6.47266 7.10938C6.47266 7.34766 6.55664 7.55273 6.72461 7.72461C6.89648 7.89258 7.09961 7.97656 7.33398 7.97656ZM12.666 7.97656C12.9004 7.97656 13.1016 7.89258 13.2695 7.72461C13.4414 7.55273 13.5273 7.34766 13.5273 7.10938C13.5273 6.875 13.4414 6.67383 13.2695 6.50586C13.1016 6.33398 12.9004 6.24805 12.666 6.24805C12.4316 6.24805 12.2305 6.33398 12.0625 6.50586C11.8945 6.67383 11.8105 6.875 11.8105 7.10938V7.97656H12.666ZM9.00977 10.7773H10.9902V8.76758H9.00977V10.7773ZM7.33398 11.5625C7.09961 11.5625 6.89648 11.6484 6.72461 11.8203C6.55664 11.9883 6.47266 12.1914 6.47266 12.4297C6.47266 12.6641 6.55664 12.8672 6.72461 13.0391C6.89648 13.207 7.09961 13.291 7.33398 13.291C7.56836 13.291 7.76953 13.207 7.9375 13.0391C8.10938 12.8672 8.19531 12.6641 8.19531 12.4297V11.5625H7.33398ZM12.666 11.5625H11.8105V12.4297C11.8105 12.6641 11.8945 12.8672 12.0625 13.0391C12.2305 13.207 12.4316 13.291 12.666 13.291C12.9004 13.291 13.1016 13.207 13.2695 13.0391C13.4414 12.8672 13.5273 12.6641 13.5273 12.4297C13.5273 12.1914 13.4414 11.9883 13.2695 11.8203C13.1016 11.6484 12.9004 11.5625 12.666 11.5625Z",fill:"currentColor"}))}function yn(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jt.createElement("path",{d:"M8.01562 11.1758L7.95703 9.65234H8.22656L11.9297 5.54492H13.2539L9.75586 9.32422L9.26367 9.79883L8.01562 11.1758ZM7.07812 14V5.54492H8.13281V14H7.07812ZM12.1992 14L9.04102 9.78711L9.76758 9.05469L13.5645 14H12.1992Z",fill:"currentColor"}))}function gn(){return jt.createElement("svg",{width:"33",height:"20",viewBox:"0 0 33 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jt.createElement("path",{d:"M10.4824 14.1992C9.7168 14.1992 9.05469 14.0195 8.49609 13.6602C7.9375 13.3008 7.50586 12.791 7.20117 12.1309C6.90039 11.4707 6.75 10.6875 6.75 9.78125V9.76953C6.75 8.85938 6.90039 8.07422 7.20117 7.41406C7.50586 6.75391 7.93555 6.24414 8.49023 5.88477C9.04883 5.52539 9.71094 5.3457 10.4766 5.3457C11.0703 5.3457 11.6094 5.46289 12.0938 5.69727C12.582 5.92773 12.9844 6.25 13.3008 6.66406C13.6172 7.07422 13.8164 7.54883 13.8984 8.08789L13.8926 8.09961H12.832L12.8262 8.08789C12.7324 7.72461 12.5742 7.41211 12.3516 7.15039C12.1289 6.88477 11.8574 6.67969 11.5371 6.53516C11.2207 6.39062 10.8672 6.31836 10.4766 6.31836C9.9375 6.31836 9.46875 6.45898 9.07031 6.74023C8.67578 7.02148 8.37109 7.41992 8.15625 7.93555C7.94141 8.45117 7.83398 9.0625 7.83398 9.76953V9.78125C7.83398 10.4844 7.94141 11.0938 8.15625 11.6094C8.37109 12.125 8.67578 12.5234 9.07031 12.8047C9.46875 13.0859 9.93945 13.2266 10.4824 13.2266C10.877 13.2266 11.2344 13.1641 11.5547 13.0391C11.875 12.9102 12.1445 12.7285 12.3633 12.4941C12.582 12.2559 12.7344 11.9746 12.8203 11.6504L12.832 11.6387H13.8984V11.6504C13.8047 12.166 13.6016 12.6152 13.2891 12.998C12.9766 13.377 12.5801 13.6719 12.0996 13.8828C11.623 14.0938 11.084 14.1992 10.4824 14.1992ZM17.7832 14.0469C17.1348 14.0469 16.6641 13.916 16.3711 13.6543C16.082 13.3926 15.9375 12.9609 15.9375 12.3594V8.52734H14.9414V7.68359H15.9375V6.04883H16.9922V7.68359H18.375V8.52734H16.9922V12.1016C16.9922 12.4727 17.0625 12.7402 17.2031 12.9043C17.3438 13.0645 17.5781 13.1445 17.9062 13.1445C17.9961 13.1445 18.0723 13.1426 18.1348 13.1387C18.2012 13.1348 18.2812 13.1289 18.375 13.1211V13.9883C18.2773 14.0039 18.1797 14.0176 18.082 14.0293C17.9844 14.041 17.8848 14.0469 17.7832 14.0469ZM19.8984 14V7.68359H20.918V8.62109H21.0117C21.1328 8.28906 21.3379 8.03125 21.627 7.84766C21.916 7.66406 22.2734 7.57227 22.6992 7.57227C22.7969 7.57227 22.8926 7.57812 22.9863 7.58984C23.084 7.59766 23.1582 7.60547 23.209 7.61328V8.60352C23.1035 8.58398 23 8.57031 22.8984 8.5625C22.8008 8.55078 22.6953 8.54492 22.582 8.54492C22.2578 8.54492 21.9707 8.60938 21.7207 8.73828C21.4707 8.86719 21.2734 9.04688 21.1289 9.27734C20.9883 9.50781 20.918 9.77734 20.918 10.0859V14H19.8984ZM24.5273 14V5.17578H25.5469V14H24.5273Z",fill:"currentColor"}))}function Fn(e){var t=e.size,n=void 0===t?20:t,r=e.color,u=void 0===r?"currentColor":r;return jt.createElement("svg",{width:n,height:n,className:"DocSearch-Search-Icon",viewBox:"0 0 24 24","aria-hidden":"true"},jt.createElement("circle",{cx:"11",cy:"11",r:"8",stroke:u,fill:"none",strokeWidth:"1.4"}),jt.createElement("path",{d:"m21 21-4.3-4.3",stroke:u,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}))}var En=function(e){var t=e.theme;Se((function(){if(t){var e=document.documentElement.dataset.theme;if(t!==e)return document.documentElement.dataset.theme=t,function(){void 0===e?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=e}}}),[t])},_n=["translations","keyboardShortcuts"],bn="Ctrl",kn=jt.forwardRef((function(e,t){var n=e.translations,r=void 0===n?{}:n,u=e.keyboardShortcuts,a=an(e,_n),i=r.buttonText,o=void 0===i?"Search":i,s=r.buttonAriaLabel,c=void 0===s?"Search":s,l=mn(u),f=cn(we(null),2),d=f[0],p=f[1];En({theme:a.theme}),Se((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?p("⌘"):p(bn))}),[]);var h=cn(d===bn?[bn,"Control",jt.createElement(gn,null)]:["Meta","Meta",jt.createElement(Dn,null)],3),v=h[0],m=h[1],D=h[2],y=l["Ctrl/Cmd+K"],g="".concat(m,"+k");return jt.createElement("button",Xt({type:"button",className:"DocSearch DocSearch-Button","aria-label":y?"".concat(c," (").concat(g,")"):c,"aria-keyshortcuts":y?g:void 0},a,{ref:t}),jt.createElement("span",{className:"DocSearch-Button-Container"},jt.createElement(Fn,null),jt.createElement("span",{className:"DocSearch-Button-Placeholder"},o)),jt.createElement("span",{className:"DocSearch-Button-Keys"},null!==d&&y&&jt.createElement(jt.Fragment,null,jt.createElement(Cn,{reactsToKey:v},D),jt.createElement(Cn,{reactsToKey:"k"},jt.createElement(yn,null)))))}));function Cn(e){var t=e.reactsToKey,n=e.children,r=cn(we(!1),2),u=r[0],a=r[1];return Se((function(){if(t)return window.addEventListener("keydown",e),window.addEventListener("keyup",n),function(){window.removeEventListener("keydown",e),window.removeEventListener("keyup",n)};function e(e){e.key===t&&a(!0)}function n(e){e.key!==t&&"Meta"!==e.key||a(!1)}}),[t]),jt.createElement("kbd",{className:u?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"+("Ctrl"===t?" DocSearch-Button-Key--ctrl":"")},n)}var An,wn="vercel.ai.error",xn=Symbol.for(wn),Sn=function(){function e(t){var n,r=t.name,i=t.message,o=t.cause;return a(this,e),(n=u(this,e,[i]))[An]=!0,n.name=r,n.cause=o,n}return d(e,k(Error)),o(e,null,[{key:"isInstance",value:function(t){return e.hasMarker(t,wn)}},{key:"hasMarker",value:function(e,t){var n=Symbol.for(t);return null!=e&&"object"==_(e)&&n in e&&"boolean"==typeof e[n]&&!0===e[n]}}])}();An=xn;var Bn=Sn;function On(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}var In,Tn="AI_InvalidArgumentError",Pn="vercel.ai.error.".concat(Tn),jn=Symbol.for(Pn),Nn=function(){function e(t){var n,r=t.message,i=t.cause,o=t.argument;return a(this,e),(n=u(this,e,[{name:Tn,message:r,cause:i}]))[In]=!0,n.argument=o,n}return d(e,Bn),o(e,null,[{key:"isInstance",value:function(e){return Bn.hasMarker(e,Pn)}}])}();In=jn;var zn,Rn="AI_JSONParseError",Mn="vercel.ai.error.".concat(Rn),Zn=Symbol.for(Mn),Ln=function(){function e(t){var n,r=t.text,i=t.cause;return a(this,e),(n=u(this,e,[{name:Rn,message:"JSON parsing failed: Text: ".concat(r,".\nError message: ").concat(On(i)),cause:i}]))[zn]=!0,n.text=r,n}return d(e,Bn),o(e,null,[{key:"isInstance",value:function(e){return Bn.hasMarker(e,Mn)}}])}();zn=Zn;var $n,qn="AI_TypeValidationError",Un="vercel.ai.error.".concat(qn),Hn=Symbol.for(Un);$n=Hn;var Vn=function(){function e(t){var n,r=t.value,i=t.cause;return a(this,e),(n=u(this,e,[{name:qn,message:"Type validation failed: Value: ".concat(JSON.stringify(r),".\nError message: ").concat(On(i)),cause:i}]))[$n]=!0,n.value=r,n}return d(e,Bn),o(e,null,[{key:"isInstance",value:function(e){return Bn.hasMarker(e,Un)}},{key:"wrap",value:function(t){var n=t.value,r=t.cause;return e.isInstance(r)&&r.value===n?r:new e({value:n,cause:r})}}])}(),Wn=function(){function e(t,n){var r;return Wt(this,e),(r=Vt(this,e,[t])).name="ParseError",r.type=n.type,r.field=n.field,r.value=n.value,r.line=n.line,r}return tn(e,hn(Error)),Gt(e)}();function Kn(e){}var Jn=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.onError,u=n.onRetry,a=n.onComment;return Wt(this,e),Vt(this,e,[{start:function(e){t=function(e){if("function"==typeof e)throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");var t,n=e.onEvent,r=void 0===n?Kn:n,u=e.onError,a=void 0===u?Kn:u,i=e.onRetry,o=void 0===i?Kn:i,s=e.onComment,c="",l=!0,f="",d="";function p(e){if(""===e)return f.length>0&&r({id:t,event:d||void 0,data:f.endsWith("\n")?f.slice(0,-1):f}),t=void 0,f="",void(d="");if(e.startsWith(":"))s&&s(e.slice(e.startsWith(": ")?2:1));else{var n=e.indexOf(":");if(-1===n)h(e,"",e);else{var u=e.slice(0,n),a=" "===e[n+1]?2:1;h(u,e.slice(n+a),e)}}}function h(e,n,r){switch(e){case"event":d=n;break;case"data":f="".concat(f).concat(n,"\n");break;case"id":t=n.includes("\0")?void 0:n;break;case"retry":/^\d+$/.test(n)?o(parseInt(n,10)):a(new Wn('Invalid `retry` value: "'.concat(n,'"'),{type:"invalid-retry",value:n,line:r}));break;default:a(new Wn('Unknown field "'.concat(e.length>20?"".concat(e.slice(0,20),"…"):e,'"'),{type:"unknown-field",field:e,value:n,line:r}))}}return{feed:function(e){var t,n=l?e.replace(/^\xEF\xBB\xBF/,""):e,r=function(e){for(var t=[],n="",r=0;r<e.length;){var u=e.indexOf("\r",r),a=e.indexOf("\n",r),i=-1;if(-1!==u&&-1!==a?i=Math.min(u,a):-1!==u?i=u===e.length-1?-1:u:-1!==a&&(i=a),-1===i){n=e.slice(r);break}var o=e.slice(r,i);t.push(o),"\r"===e[(r=i+1)-1]&&"\n"===e[r]&&r++}return[t,n]}("".concat(c).concat(n)),u=cn(r,2),a=u[0],i=u[1],o=Qt(a);try{for(o.s();!(t=o.n()).done;)p(t.value)}catch(e){o.e(e)}finally{o.f()}c=i,l=!1},reset:function(){c&&(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).consume&&p(c),l=!0,t=void 0,f="",d="",c=""}}}({onEvent:function(t){e.enqueue(t)},onError:function(t){"terminate"===r?e.error(t):"function"==typeof r&&r(t)},onRetry:u,onComment:a})},transform:function(e){t.feed(e)}}])}return tn(e,TransformStream),Gt(e)}();function Gn(e,t,n){var r;function u(n,r){var u,a,o;for(var s in Object.defineProperty(n,"_zod",{value:null!==(u=n._zod)&&void 0!==u?u:{},enumerable:!1}),null!==(a=(o=n._zod).traits)&&void 0!==a||(o.traits=new Set),n._zod.traits.add(e),t(n,r),i.prototype)s in n||Object.defineProperty(n,s,{value:i.prototype[s].bind(n)});n._zod.constr=i,n._zod.def=r}var a=function(e){function t(){return Wt(this,t),Vt(this,t,arguments)}return tn(t,e),Gt(t)}(null!==(r=null==n?void 0:n.Parent)&&void 0!==r?r:Object);function i(e){var t,r,i=null!=n&&n.Parent?new a:this;u(i,e),null!==(t=(r=i._zod).deferred)&&void 0!==t||(r.deferred=[]);var o,s=Qt(i._zod.deferred);try{for(s.s();!(o=s.n()).done;)(0,o.value)()}catch(e){s.e(e)}finally{s.f()}return i}return Object.defineProperty(a,"name",{value:e}),Object.defineProperty(i,"init",{value:u}),Object.defineProperty(i,Symbol.hasInstance,{value:function(t){var r;return!!(null!=n&&n.Parent&&t instanceof n.Parent)||(null==t||null===(r=t._zod)||void 0===r||null===(r=r.traits)||void 0===r?void 0:r.has(e))}}),Object.defineProperty(i,"name",{value:e}),i}var Qn=function(){function e(){return Wt(this,e),Vt(this,e,["Encountered Promise during synchronous parse. Use .parseAsync() instead."])}return tn(e,hn(Error)),Gt(e)}(),Yn={};function Xn(e){return Yn}function er(e){var t=Object.values(e).filter((function(e){return"number"==typeof e}));return Object.entries(e).filter((function(e){var n=cn(e,2),r=n[0];return n[1],-1===t.indexOf(+r)})).map((function(e){var t=cn(e,2);return t[0],t[1]}))}function tr(e,t){return"bigint"==typeof t?t.toString():t}function nr(e){return{get value(){var t=e();return Object.defineProperty(this,"value",{value:t}),t}}}function rr(e){return null==e}function ur(e){var t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function ar(e,t,n){Object.defineProperty(e,t,{get:function(){var r=n();return e[t]=r,r},set:function(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ir(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function or(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t="",n=0;n<e;n++)t+="abcdefghijklmnopqrstuvwxyz"[Math.floor(26*Math.random())];return t}function sr(e){return JSON.stringify(e)}var cr=Error.captureStackTrace?Error.captureStackTrace:function(){};function lr(e){return"object"===dn(e)&&null!==e&&!Array.isArray(e)}var fr=nr((function(){var e;if("undefined"!=typeof navigator&&null!==(e=navigator)&&void 0!==e&&null!==(e=e.userAgent)&&void 0!==e&&e.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}}));function dr(e){if(!1===lr(e))return!1;var t=e.constructor;if(void 0===t)return!0;var n=t.prototype;return!1!==lr(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}var pr=new Set(["string","number","symbol"]);function hr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vr(e,t,n){var r=new e._zod.constr(null!=t?t:e._zod.def);return(!t||null!=n&&n.parent)&&(r._zod.parent=e),r}function mr(e){var t=e;if(!t)return{};if("string"==typeof t)return{error:function(){return t}};if(void 0!==(null==t?void 0:t.message)){if(void 0!==(null==t?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?un(un({},t),{},{error:function(){return t.error}}):t}var Dr={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 yr(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t<e.issues.length;t++)if(!0!==e.issues[t].continue)return!0;return!1}function gr(e,t){return t.map((function(t){var n,r;return null!==(n=(r=t).path)&&void 0!==n||(r.path=[]),t.path.unshift(e),t}))}function Fr(e){return"string"==typeof e?e:null==e?void 0:e.message}function Er(e,t,n){var r,u=un(un({},e),{},{path:null!==(r=e.path)&&void 0!==r?r:[]});if(!e.message){var a,i,o,s,c,l,f,d,p,h=null!==(a=null!==(i=null!==(o=null!==(s=Fr(null===(c=e.inst)||void 0===c||null===(c=c._zod.def)||void 0===c||null===(l=c.error)||void 0===l?void 0:l.call(c,e)))&&void 0!==s?s:Fr(null==t||null===(f=t.error)||void 0===f?void 0:f.call(t,e)))&&void 0!==o?o:Fr(null===(d=n.customError)||void 0===d?void 0:d.call(n,e)))&&void 0!==i?i:Fr(null===(p=n.localeError)||void 0===p?void 0:p.call(n,e)))&&void 0!==a?a:"Invalid input";u.message=h}return delete u.inst,delete u.continue,null!=t&&t.reportInput||delete u.input,u}function _r(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function br(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function kr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],u=t[1],a=t[2];return"string"==typeof r?{message:r,code:"custom",input:u,inst:a}:un({},r)}var Cr=function(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:function(){return JSON.stringify(t,tr,2)},enumerable:!0})},Ar=Gn("$ZodError",Cr),wr=Gn("$ZodError",Cr,{Parent:Error}),xr=function(e){return function(t,n,r){var u=r?un(un({},r),{},{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},u);if(a instanceof Promise)throw new Qn;return a.issues.length?{success:!1,error:new(null!=e?e:Ar)(a.issues.map((function(e){return Er(e,u,Xn())})))}:{success:!0,data:a.value}}},Sr=xr(wr),Br=function(e){return function(){var t=Ht(on().mark((function t(n,r,u){var a,i;return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=u?Object.assign(u,{async:!0}):{async:!0},!((i=n._zod.run({value:r,issues:[]},a))instanceof Promise)){t.next=6;break}return t.next=5,i;case 5:i=t.sent;case 6:return t.abrupt("return",i.issues.length?{success:!1,error:new e(i.issues.map((function(e){return Er(e,a,Xn())})))}:{success:!0,data:i.value});case 7:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()},Or=Br(wr),Ir=/^[cC][^\s-]{8,}$/,Tr=/^[0-9a-z]+$/,Pr=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,jr=/^[0-9a-vA-V]{20}$/,Nr=/^[A-Za-z0-9]{27}$/,zr=/^[a-zA-Z0-9_-]{21}$/,Rr=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Mr=/^([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})$/,Zr=function(e){return e?new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-".concat(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)$/},Lr=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$r=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qr=/^(([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})$/,Ur=/^((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])$/,Hr=/^(([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])$/,Vr=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Wr=/^[A-Za-z0-9_-]*$/,Kr=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Jr=/^\+(?:[0-9]){6,14}[0-9]$/,Gr="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Qr=new RegExp("^".concat(Gr,"$"));function Yr(e){var t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?"".concat(t):0===e.precision?"".concat(t,":[0-5]\\d"):"".concat(t,":[0-5]\\d\\.\\d{").concat(e.precision,"}"):"".concat(t,"(?::[0-5]\\d(?:\\.\\d+)?)?")}var Xr=/^\d+$/,eu=/^-?\d+(?:\.\d+)?/i,tu=/true|false/i,nu=/null/i,ru=/^[^A-Z]*$/,uu=/^[^a-z]*$/,au=Gn("$ZodCheck",(function(e,t){var n,r,u;null!==(n=e._zod)&&void 0!==n||(e._zod={}),e._zod.def=t,null!==(r=(u=e._zod).onattach)&&void 0!==r||(u.onattach=[])})),iu={number:"number",bigint:"bigint",object:"date"},ou=Gn("$ZodCheckLessThan",(function(e,t){au.init(e,t);var n=iu[dn(t.value)];e._zod.onattach.push((function(e){var n,r=e._zod.bag,u=null!==(n=t.inclusive?r.maximum:r.exclusiveMaximum)&&void 0!==n?n:Number.POSITIVE_INFINITY;t.value<u&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)})),e._zod.check=function(r){(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),su=Gn("$ZodCheckGreaterThan",(function(e,t){au.init(e,t);var n=iu[dn(t.value)];e._zod.onattach.push((function(e){var n,r=e._zod.bag,u=null!==(n=t.inclusive?r.minimum:r.exclusiveMinimum)&&void 0!==n?n:Number.NEGATIVE_INFINITY;t.value>u&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)})),e._zod.check=function(r){(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),cu=Gn("$ZodCheckMultipleOf",(function(e,t){au.init(e,t),e._zod.onattach.push((function(e){var n,r;null!==(n=(r=e._zod.bag).multipleOf)&&void 0!==n||(r.multipleOf=t.value)})),e._zod.check=function(n){if(dn(n.value)!==dn(t.value))throw new Error("Cannot mix number and bigint in multiple_of check.");var r,u,a,i,o;("bigint"==typeof n.value?n.value%t.value===BigInt(0):0==(r=n.value,u=t.value,o=(a=(r.toString().split(".")[1]||"").length)>(i=(u.toString().split(".")[1]||"").length)?a:i,Number.parseInt(r.toFixed(o).replace(".",""))%Number.parseInt(u.toFixed(o).replace(".",""))/Math.pow(10,o)))||n.issues.push({origin:dn(n.value),code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}})),lu=Gn("$ZodCheckNumberFormat",(function(e,t){var n;au.init(e,t),t.format=t.format||"float64";var r=null===(n=t.format)||void 0===n?void 0:n.includes("int"),u=r?"int":"number",a=cn(Dr[t.format],2),i=a[0],o=a[1];e._zod.onattach.push((function(e){var n=e._zod.bag;n.format=t.format,n.minimum=i,n.maximum=o,r&&(n.pattern=Xr)})),e._zod.check=function(n){var a=n.value;if(r){if(!Number.isInteger(a))return void n.issues.push({expected:u,format:t.format,code:"invalid_type",input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?n.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:u,continue:!t.abort}):n.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:u,continue:!t.abort}))}a<i&&n.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),a>o&&n.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}})),fu=Gn("$ZodCheckMaxSize",(function(e,t){au.init(e,t),e._zod.when=function(e){var t=e.value;return!rr(t)&&void 0!==t.size},e._zod.onattach.push((function(e){var n,r=null!==(n=e._zod.bag.maximum)&&void 0!==n?n:Number.POSITIVE_INFINITY;t.maximum<r&&(e._zod.bag.maximum=t.maximum)})),e._zod.check=function(n){var r=n.value;r.size<=t.maximum||n.issues.push({origin:_r(r),code:"too_big",maximum:t.maximum,input:r,inst:e,continue:!t.abort})}})),du=Gn("$ZodCheckMinSize",(function(e,t){au.init(e,t),e._zod.when=function(e){var t=e.value;return!rr(t)&&void 0!==t.size},e._zod.onattach.push((function(e){var n,r=null!==(n=e._zod.bag.minimum)&&void 0!==n?n:Number.NEGATIVE_INFINITY;t.minimum>r&&(e._zod.bag.minimum=t.minimum)})),e._zod.check=function(n){var r=n.value;r.size>=t.minimum||n.issues.push({origin:_r(r),code:"too_small",minimum:t.minimum,input:r,inst:e,continue:!t.abort})}})),pu=Gn("$ZodCheckSizeEquals",(function(e,t){au.init(e,t),e._zod.when=function(e){var t=e.value;return!rr(t)&&void 0!==t.size},e._zod.onattach.push((function(e){var n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size})),e._zod.check=function(n){var r=n.value,u=r.size;if(u!==t.size){var a=u>t.size;n.issues.push(un(un({origin:_r(r)},a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size}),{},{input:n.value,inst:e,continue:!t.abort}))}}})),hu=Gn("$ZodCheckMaxLength",(function(e,t){au.init(e,t),e._zod.when=function(e){var t=e.value;return!rr(t)&&void 0!==t.length},e._zod.onattach.push((function(e){var n,r=null!==(n=e._zod.bag.maximum)&&void 0!==n?n:Number.POSITIVE_INFINITY;t.maximum<r&&(e._zod.bag.maximum=t.maximum)})),e._zod.check=function(n){var r=n.value;if(!(r.length<=t.maximum)){var u=br(r);n.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}})),vu=Gn("$ZodCheckMinLength",(function(e,t){au.init(e,t),e._zod.when=function(e){var t=e.value;return!rr(t)&&void 0!==t.length},e._zod.onattach.push((function(e){var n,r=null!==(n=e._zod.bag.minimum)&&void 0!==n?n:Number.NEGATIVE_INFINITY;t.minimum>r&&(e._zod.bag.minimum=t.minimum)})),e._zod.check=function(n){var r=n.value;if(!(r.length>=t.minimum)){var u=br(r);n.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}})),mu=Gn("$ZodCheckLengthEquals",(function(e,t){au.init(e,t),e._zod.when=function(e){var t=e.value;return!rr(t)&&void 0!==t.length},e._zod.onattach.push((function(e){var n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length})),e._zod.check=function(n){var r=n.value,u=r.length;if(u!==t.length){var a=br(r),i=u>t.length;n.issues.push(un(un({origin:a},i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length}),{},{input:n.value,inst:e,continue:!t.abort}))}}})),Du=Gn("$ZodCheckStringFormat",(function(e,t){var n,r;au.init(e,t),e._zod.onattach.push((function(e){var n,r=e._zod.bag;r.format=t.format,t.pattern&&(null!==(n=r.patterns)&&void 0!==n||(r.patterns=new Set),r.patterns.add(t.pattern))})),null!==(n=(r=e._zod).check)&&void 0!==n||(r.check=function(n){if(!t.pattern)throw new Error("Not implemented.");t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push(un(un({origin:"string",code:"invalid_format",format:t.format,input:n.value},t.pattern?{pattern:t.pattern.toString()}:{}),{},{inst:e,continue:!t.abort}))})})),yu=Gn("$ZodCheckRegex",(function(e,t){Du.init(e,t),e._zod.check=function(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})}})),gu=Gn("$ZodCheckLowerCase",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=ru),Du.init(e,t)})),Fu=Gn("$ZodCheckUpperCase",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=uu),Du.init(e,t)})),Eu=Gn("$ZodCheckIncludes",(function(e,t){au.init(e,t);var n=hr(t.includes),r=new RegExp("number"==typeof t.position?"^.{".concat(t.position,"}").concat(n):n);t.pattern=r,e._zod.onattach.push((function(e){var t,n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)})),e._zod.check=function(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})}})),_u=Gn("$ZodCheckStartsWith",(function(e,t){var n;au.init(e,t);var r=new RegExp("^".concat(hr(t.prefix),".*"));null!==(n=t.pattern)&&void 0!==n||(t.pattern=r),e._zod.onattach.push((function(e){var t,n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)})),e._zod.check=function(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})}})),bu=Gn("$ZodCheckEndsWith",(function(e,t){var n;au.init(e,t);var r=new RegExp(".*".concat(hr(t.suffix),"$"));null!==(n=t.pattern)&&void 0!==n||(t.pattern=r),e._zod.onattach.push((function(e){var t,n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)})),e._zod.check=function(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})}}));function ku(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,ln(gr(n,e.issues)))}var Cu=Gn("$ZodCheckProperty",(function(e,t){au.init(e,t),e._zod.check=function(e){var n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then((function(n){return ku(n,e,t.property)}));ku(n,e,t.property)}})),Au=Gn("$ZodCheckMimeType",(function(e,t){au.init(e,t);var n=new Set(t.mime);e._zod.onattach.push((function(e){e._zod.bag.mime=t.mime})),e._zod.check=function(r){n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e})}})),wu=Gn("$ZodCheckOverwrite",(function(e,t){au.init(e,t),e._zod.check=function(e){e.value=t.tx(e.value)}})),xu=Gt((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Wt(this,e),this.content=[],this.indent=0,this&&(this.args=t)}),[{key:"indented",value:function(e){this.indent+=1,e(this),this.indent-=1}},{key:"write",value:function(e){var t=this;if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});var n,r=e.split("\n").filter((function(e){return e})),u=Math.min.apply(Math,ln(r.map((function(e){return e.length-e.trimStart().length})))),a=Qt(r.map((function(e){return e.slice(u)})).map((function(e){return" ".repeat(2*t.indent)+e})));try{for(a.s();!(n=a.n()).done;){var i=n.value;this.content.push(i)}}catch(e){a.e(e)}finally{a.f()}}},{key:"compile",value:function(){var e,t=Function,n=null==this?void 0:this.args,r=ln((null!==(e=null==this?void 0:this.content)&&void 0!==e?e:[""]).map((function(e){return" ".concat(e)})));return Kt(t,ln(n).concat([r.join("\n")]))}}]),Su={major:4,minor:0,patch:0},Bu=Gn("$ZodType",(function(e,t){var n,r;null!=e||(e={}),ar(e._zod,"id",(function(){return t.type+"_"+or(10)})),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Su;var u=ln(null!==(n=e._zod.def.checks)&&void 0!==n?n:[]);e._zod.traits.has("$ZodCheck")&&u.unshift(e);var a,i=Qt(u);try{for(i.s();!(a=i.n()).done;){var o,s=Qt(a.value._zod.onattach);try{for(s.s();!(o=s.n()).done;)(0,o.value)(e)}catch(e){s.e(e)}finally{s.f()}}}catch(e){i.e(e)}finally{i.f()}if(0===u.length){var c,l;null!==(c=(r=e._zod).deferred)&&void 0!==c||(r.deferred=[]),null===(l=e._zod.deferred)||void 0===l||l.push((function(){e._zod.run=e._zod.parse}))}else{var f=function(e,t,n){var r,u,a=yr(e),i=Qt(t);try{var o=function(){var t=u.value;if(t._zod.when){if(!t._zod.when(e))return 0}else if(a)return 0;var i=e.issues.length,o=t._zod.check(e);if(o instanceof Promise&&!1===(null==n?void 0:n.async))throw new Qn;if(r||o instanceof Promise)r=(null!=r?r:Promise.resolve()).then(Ht(on().mark((function t(){return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o;case 2:if(e.issues.length!==i){t.next=5;break}return t.abrupt("return");case 5:a||(a=yr(e,i));case 6:case"end":return t.stop()}}),t)}))));else{if(e.issues.length===i)return 0;a||(a=yr(e,i))}};for(i.s();!(u=i.n()).done;)o()}catch(e){i.e(e)}finally{i.f()}return r?r.then((function(){return e})):e};e._zod.run=function(t,n){var r=e._zod.parse(t,n);if(r instanceof Promise){if(!1===n.async)throw new Qn;return r.then((function(e){return f(e,u,n)}))}return f(r,u,n)}}e["~standard"]={validate:function(t){try{var n,r=Sr(e,t);return r.success?{value:r.data}:{issues:null===(n=r.error)||void 0===n?void 0:n.issues}}catch(n){return Or(e,t).then((function(e){var t;return e.success?{value:e.data}:{issues:null===(t=e.error)||void 0===t?void 0:t.issues}}))}},vendor:"zod",version:1}})),Ou=Gn("$ZodString",(function(e,t){var n,r,u;Bu.init(e,t),e._zod.pattern=null!==(n=ln(null!==(r=null==e||null===(u=e._zod.bag)||void 0===u?void 0:u.patterns)&&void 0!==r?r:[]).pop())&&void 0!==n?n:function(e){var t,n,r=e?"[\\s\\S]{".concat(null!==(t=null==e?void 0:e.minimum)&&void 0!==t?t:0,",").concat(null!==(n=null==e?void 0:e.maximum)&&void 0!==n?n:"","}"):"[\\s\\S]*";return new RegExp("^".concat(r,"$"))}(e._zod.bag),e._zod.parse=function(n,r){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}})),Iu=Gn("$ZodStringFormat",(function(e,t){Du.init(e,t),Ou.init(e,t)})),Tu=Gn("$ZodGUID",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Mr),Iu.init(e,t)})),Pu=Gn("$ZodUUID",(function(e,t){var n;if(t.version){var r,u={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===u)throw new Error('Invalid UUID version: "'.concat(t.version,'"'));null!==(r=t.pattern)&&void 0!==r||(t.pattern=Zr(u))}else null!==(n=t.pattern)&&void 0!==n||(t.pattern=Zr());Iu.init(e,t)})),ju=Gn("$ZodEmail",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Lr),Iu.init(e,t)})),Nu=Gn("$ZodURL",(function(e,t){Iu.init(e,t),e._zod.check=function(n){try{var r=new URL(n.value);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Kr.source,input:n.value,inst:e,continue:!t.abort})),void(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})))}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}})),zu=Gn("$ZodEmoji",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Iu.init(e,t)})),Ru=Gn("$ZodNanoID",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=zr),Iu.init(e,t)})),Mu=Gn("$ZodCUID",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Ir),Iu.init(e,t)})),Zu=Gn("$ZodCUID2",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Tr),Iu.init(e,t)})),Lu=Gn("$ZodULID",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Pr),Iu.init(e,t)})),$u=Gn("$ZodXID",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=jr),Iu.init(e,t)})),qu=Gn("$ZodKSUID",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Nr),Iu.init(e,t)})),Uu=Gn("$ZodISODateTime",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=function(e){var t=Yr({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-]\\d{2}:\\d{2})");var r="".concat(t,"(?:").concat(n.join("|"),")");return new RegExp("^".concat(Gr,"T(?:").concat(r,")$"))}(t)),Iu.init(e,t),e._zod.check})),Hu=Gn("$ZodISODate",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Qr),Iu.init(e,t)})),Vu=Gn("$ZodISOTime",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=new RegExp("^".concat(Yr(t),"$"))),Iu.init(e,t),e._zod.check})),Wu=Gn("$ZodISODuration",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Rr),Iu.init(e,t)})),Ku=Gn("$ZodIPv4",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=$r),Iu.init(e,t),e._zod.onattach.push((function(e){e._zod.bag.format="ipv4"}))})),Ju=Gn("$ZodIPv6",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=qr),Iu.init(e,t),e._zod.onattach.push((function(e){e._zod.bag.format="ipv6"})),e._zod.check=function(n){try{new URL("http://[".concat(n.value,"]"))}catch(r){n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}})),Gu=Gn("$ZodCIDRv4",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Ur),Iu.init(e,t)})),Qu=Gn("$ZodCIDRv6",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Hr),Iu.init(e,t),e._zod.check=function(n){var r=cn(n.value.split("/"),2),u=r[0],a=r[1];try{if(!a)throw new Error;var i=Number(a);if("".concat(i)!==a)throw new Error;if(i<0||i>128)throw new Error;new URL("http://[".concat(u,"]"))}catch(r){n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}}));function Yu(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch(e){return!1}}var Xu=Gn("$ZodBase64",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Vr),Iu.init(e,t),e._zod.onattach.push((function(e){e._zod.bag.contentEncoding="base64"})),e._zod.check=function(n){Yu(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}})),ea=Gn("$ZodBase64URL",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Wr),Iu.init(e,t),e._zod.onattach.push((function(e){e._zod.bag.contentEncoding="base64url"})),e._zod.check=function(n){(function(e){if(!Wr.test(e))return!1;var t=e.replace(/[-_]/g,(function(e){return"-"===e?"+":"/"}));return Yu(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})}})),ta=Gn("$ZodE164",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Jr),Iu.init(e,t)})),na=Gn("$ZodJWT",(function(e,t){Iu.init(e,t),e._zod.check=function(n){(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=e.split(".");if(3!==n.length)return!1;var r=cn(n,1)[0],u=JSON.parse(atob(r));return!("typ"in u&&"JWT"!==(null==u?void 0:u.typ)||!u.alg||t&&(!("alg"in u)||u.alg!==t))}catch(e){return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}})),ra=Gn("$ZodNumber",(function(e,t){var n;Bu.init(e,t),e._zod.pattern=null!==(n=e._zod.bag.pattern)&&void 0!==n?n:eu,e._zod.parse=function(n,r){if(t.coerce)try{n.value=Number(n.value)}catch(e){}var u=n.value;if("number"==typeof u&&!Number.isNaN(u)&&Number.isFinite(u))return n;var a="number"==typeof u?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return n.issues.push(un({expected:"number",code:"invalid_type",input:u,inst:e},a?{received:a}:{})),n}})),ua=Gn("$ZodNumber",(function(e,t){lu.init(e,t),ra.init(e,t)})),aa=Gn("$ZodBoolean",(function(e,t){Bu.init(e,t),e._zod.pattern=tu,e._zod.parse=function(n,r){if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}var u=n.value;return"boolean"==typeof u||n.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),n}})),ia=Gn("$ZodNull",(function(e,t){Bu.init(e,t),e._zod.pattern=nu,e._zod.values=new Set([null]),e._zod.parse=function(t,n){var r=t.value;return null===r||t.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),t}})),oa=Gn("$ZodUnknown",(function(e,t){Bu.init(e,t),e._zod.parse=function(e){return e}})),sa=Gn("$ZodNever",(function(e,t){Bu.init(e,t),e._zod.parse=function(t,n){return t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t}}));function ca(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,ln(gr(n,e.issues))),t.value[n]=e.value}var la=Gn("$ZodArray",(function(e,t){Bu.init(e,t),e._zod.parse=function(n,r){var u=n.value;if(!Array.isArray(u))return n.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),n;n.value=Array(u.length);for(var a=[],i=function(e){var i=u[e],o=t.element._zod.run({value:i,issues:[]},r);o instanceof Promise?a.push(o.then((function(t){return ca(t,n,e)}))):ca(o,n,e)},o=0;o<u.length;o++)i(o);return a.length?Promise.all(a).then((function(){return n})):n}}));function fa(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,ln(gr(n,e.issues))),t.value[n]=e.value}function da(e,t,n,r){var u;e.issues.length?void 0===r[n]?t.value[n]=n in r?void 0:e.value:(u=t.issues).push.apply(u,ln(gr(n,e.issues))):void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}var pa=Gn("$ZodObject",(function(e,t){Bu.init(e,t);var n=nr((function(){for(var e=Object.keys(t.shape),n=0,r=e;n<r.length;n++){var u=r[n];if(!(t.shape[u]instanceof Bu))throw new Error('Invalid element at key "'.concat(u,'": expected a Zod schema'))}var a,i=(a=t.shape,Object.keys(a).filter((function(e){return"optional"===a[e]._zod.optin&&"optional"===a[e]._zod.optout})));return{shape:t.shape,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(i)}}));ar(e._zod,"propValues",(function(){var e=t.shape,n={};for(var r in e){var u=e[r]._zod;if(u.values){var a;null!==(a=n[r])&&void 0!==a||(n[r]=new Set);var i,o=Qt(u.values);try{for(o.s();!(i=o.n()).done;){var s=i.value;n[r].add(s)}}catch(e){o.e(e)}finally{o.f()}}}return n}));var r,u,a=lr,i=!Yn.jitless,o=i&&fr.value,s=t.catchall;e._zod.parse=function(c,l){null!=u||(u=n.value);var f=c.value;if(!a(f))return c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c;var d=[];if(i&&o&&!1===(null==l?void 0:l.async)&&!0!==l.jitless)r||(r=function(e){var t=new xu(["shape","payload","ctx"]),r=n.value,u=r.keys,a=r.optionalKeys,i=function(e){var t=sr(e);return"shape[".concat(t,"]._zod.run({ value: input[").concat(t,"], issues: [] }, ctx)")};t.write("const input = payload.value;");var o,s=Object.create(null),c=Qt(u);try{for(c.s();!(o=c.n()).done;)s[o.value]=or(15)}catch(e){c.e(e)}finally{c.f()}t.write("const newResult = {}");var l,f=Qt(u);try{for(f.s();!(l=f.n()).done;){var d=l.value;if(a.has(d)){var p=s[d];t.write("const ".concat(p," = ").concat(i(d),";"));var h=sr(d);t.write("\n if (".concat(p,".issues.length) {\n if (input[").concat(h,"] === undefined) {\n if (").concat(h," in input) {\n newResult[").concat(h,"] = undefined;\n }\n } else {\n payload.issues = payload.issues.concat(\n ").concat(p,".issues.map((iss) => ({\n ...iss,\n path: iss.path ? [").concat(h,", ...iss.path] : [").concat(h,"],\n }))\n );\n }\n } else if (").concat(p,".value === undefined) {\n if (").concat(h," in input) newResult[").concat(h,"] = undefined;\n } else {\n newResult[").concat(h,"] = ").concat(p,".value;\n }\n "))}else{var v=s[d];t.write("const ".concat(v," = ").concat(i(d),";")),t.write("\n if (".concat(v,".issues.length) payload.issues = payload.issues.concat(").concat(v,".issues.map(iss => ({\n ...iss,\n path: iss.path ? [").concat(sr(d),", ...iss.path] : [").concat(sr(d),"]\n })));")),t.write("newResult[".concat(sr(d),"] = ").concat(v,".value"))}}}catch(e){f.e(e)}finally{f.f()}t.write("payload.value = newResult;"),t.write("return payload;");var m=t.compile();return function(t,n){return m(e,t,n)}}(t.shape)),c=r(c,l);else{c.value={};var p,h=u.shape,v=Qt(u.keys);try{var m=function(){var e=p.value,t=h[e],n=t._zod.run({value:f[e],issues:[]},l),r="optional"===t._zod.optin&&"optional"===t._zod.optout;n instanceof Promise?d.push(n.then((function(t){return r?da(t,c,e,f):fa(t,c,e)}))):r?da(n,c,e,f):fa(n,c,e)};for(v.s();!(p=v.n()).done;)m()}catch(e){v.e(e)}finally{v.f()}}if(!s)return d.length?Promise.all(d).then((function(){return c})):c;for(var D=[],y=u.keySet,g=s._zod,F=g.def.type,E=function(){var e=b[_];if(y.has(e))return 0;if("never"===F)return D.push(e),0;var t=g.run({value:f[e],issues:[]},l);t instanceof Promise?d.push(t.then((function(t){return fa(t,c,e)}))):fa(t,c,e)},_=0,b=Object.keys(f);_<b.length;_++)E();return D.length&&c.issues.push({code:"unrecognized_keys",keys:D,input:f,inst:e}),d.length?Promise.all(d).then((function(){return c})):c}}));function ha(e,t,n,r){var u,a=Qt(e);try{for(a.s();!(u=a.n()).done;){var i=u.value;if(0===i.issues.length)return t.value=i.value,t}}catch(e){a.e(e)}finally{a.f()}return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map((function(e){return e.issues.map((function(e){return Er(e,r,Xn())}))}))}),t}var va=Gn("$ZodUnion",(function(e,t){Bu.init(e,t),ar(e._zod,"values",(function(){if(t.options.every((function(e){return e._zod.values})))return new Set(t.options.flatMap((function(e){return Array.from(e._zod.values)})))})),ar(e._zod,"pattern",(function(){if(t.options.every((function(e){return e._zod.pattern}))){var e=t.options.map((function(e){return e._zod.pattern}));return new RegExp("^(".concat(e.map((function(e){return ur(e.source)})).join("|"),")$"))}})),e._zod.parse=function(n,r){var u,a=!1,i=[],o=Qt(t.options);try{for(o.s();!(u=o.n()).done;){var s=u.value._zod.run({value:n.value,issues:[]},r);if(s instanceof Promise)i.push(s),a=!0;else{if(0===s.issues.length)return s;i.push(s)}}}catch(e){o.e(e)}finally{o.f()}return a?Promise.all(i).then((function(t){return ha(t,n,e,r)})):ha(i,n,e,r)}})),ma=Gn("$ZodDiscriminatedUnion",(function(e,t){va.init(e,t);var n=e._zod.parse;ar(e._zod,"propValues",(function(){var e,n={},r=Qt(t.options);try{for(r.s();!(e=r.n()).done;){var u=e.value,a=u._zod.propValues;if(!a||0===Object.keys(a).length)throw new Error('Invalid discriminated union option at index "'.concat(t.options.indexOf(u),'"'));for(var i=0,o=Object.entries(a);i<o.length;i++){var s=cn(o[i],2),c=s[0],l=s[1];n[c]||(n[c]=new Set);var f,d=Qt(l);try{for(d.s();!(f=d.n()).done;){var p=f.value;n[c].add(p)}}catch(e){d.e(e)}finally{d.f()}}}}catch(e){r.e(e)}finally{r.f()}return n}));var r=nr((function(){var e,n=t.options,r=new Map,u=Qt(n);try{for(u.s();!(e=u.n()).done;){var a=e.value,i=a._zod.propValues[t.discriminator];if(!i||0===i.size)throw new Error('Invalid discriminated union option at index "'.concat(t.options.indexOf(a),'"'));var o,s=Qt(i);try{for(s.s();!(o=s.n()).done;){var c=o.value;if(r.has(c))throw new Error('Duplicate discriminator value "'.concat(String(c),'"'));r.set(c,a)}}catch(e){s.e(e)}finally{s.f()}}}catch(e){u.e(e)}finally{u.f()}return r}));e._zod.parse=function(u,a){var i=u.value;if(!lr(i))return u.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),u;var o=r.value.get(null==i?void 0:i[t.discriminator]);return o?o._zod.run(u,a):t.unionFallback?n(u,a):(u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:i,path:[t.discriminator],inst:e}),u)}})),Da=Gn("$ZodIntersection",(function(e,t){Bu.init(e,t),e._zod.parse=function(e,n){var r=e.value,u=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return u instanceof Promise||a instanceof Promise?Promise.all([u,a]).then((function(t){var n=cn(t,2),r=n[0],u=n[1];return ga(e,r,u)})):ga(e,u,a)}}));function ya(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(dr(e)&&dr(t)){var n,r=Object.keys(t),u=Object.keys(e).filter((function(e){return-1!==r.indexOf(e)})),a=un(un({},e),t),i=Qt(u);try{for(i.s();!(n=i.n()).done;){var o=n.value,s=ya(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o].concat(ln(s.mergeErrorPath))};a[o]=s.data}}catch(e){i.e(e)}finally{i.f()}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};for(var c=[],l=0;l<e.length;l++){var f=ya(e[l],t[l]);if(!f.valid)return{valid:!1,mergeErrorPath:[l].concat(ln(f.mergeErrorPath))};c.push(f.data)}return{valid:!0,data:c}}return{valid:!1,mergeErrorPath:[]}}function ga(e,t,n){var r,u;if(t.issues.length&&(r=e.issues).push.apply(r,ln(t.issues)),n.issues.length&&(u=e.issues).push.apply(u,ln(n.issues)),yr(e))return e;var a=ya(t.value,n.value);if(!a.valid)throw new Error("Unmergable intersection. Error path: "+"".concat(JSON.stringify(a.mergeErrorPath)));return e.value=a.data,e}var Fa=Gn("$ZodRecord",(function(e,t){Bu.init(e,t),e._zod.parse=function(n,r){var u=n.value;if(!dr(u))return n.issues.push({expected:"record",code:"invalid_type",input:u,inst:e}),n;var a=[];if(t.keyType._zod.values){var i=t.keyType._zod.values;n.value={};var o,s,c=Qt(i);try{var l=function(){var e=o.value;if("string"==typeof e||"number"==typeof e||"symbol"===dn(e)){var i,s=t.valueType._zod.run({value:u[e],issues:[]},r);if(s instanceof Promise)a.push(s.then((function(t){var r;t.issues.length&&(r=n.issues).push.apply(r,ln(gr(e,t.issues))),n.value[e]=t.value})));else s.issues.length&&(i=n.issues).push.apply(i,ln(gr(e,s.issues))),n.value[e]=s.value}};for(c.s();!(o=c.n()).done;)l()}catch(e){c.e(e)}finally{c.f()}for(var f in u)i.has(f)||(s=null!=s?s:[]).push(f);s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:s})}else{n.value={};var d,p=Qt(Reflect.ownKeys(u));try{var h=function(){var i=d.value;if("__proto__"===i)return 0;var o=t.keyType._zod.run({value:i,issues:[]},r);if(o instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(o.issues.length)return n.issues.push({origin:"record",code:"invalid_key",issues:o.issues.map((function(e){return Er(e,r,Xn())})),input:i,path:[i],inst:e}),n.value[o.value]=o.value,0;var s,c=t.valueType._zod.run({value:u[i],issues:[]},r);c instanceof Promise?a.push(c.then((function(e){var t;e.issues.length&&(t=n.issues).push.apply(t,ln(gr(i,e.issues))),n.value[o.value]=e.value}))):(c.issues.length&&(s=n.issues).push.apply(s,ln(gr(i,c.issues))),n.value[o.value]=c.value)};for(p.s();!(d=p.n()).done;)h()}catch(e){p.e(e)}finally{p.f()}}return a.length?Promise.all(a).then((function(){return n})):n}})),Ea=Gn("$ZodEnum",(function(e,t){Bu.init(e,t);var n=er(t.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp("^(".concat(n.filter((function(e){return pr.has(dn(e))})).map((function(e){return"string"==typeof e?hr(e):e.toString()})).join("|"),")$")),e._zod.parse=function(t,r){var u=t.value;return e._zod.values.has(u)||t.issues.push({code:"invalid_value",values:n,input:u,inst:e}),t}})),_a=Gn("$ZodLiteral",(function(e,t){Bu.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp("^(".concat(t.values.map((function(e){return"string"==typeof e?hr(e):e?e.toString():String(e)})).join("|"),")$")),e._zod.parse=function(n,r){var u=n.value;return e._zod.values.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}})),ba=Gn("$ZodTransform",(function(e,t){Bu.init(e,t),e._zod.parse=function(e,n){var r=t.transform(e.value,e);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then((function(t){return e.value=t,e}));if(r instanceof Promise)throw new Qn;return e.value=r,e}})),ka=Gn("$ZodOptional",(function(e,t){Bu.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ar(e._zod,"values",(function(){return t.innerType._zod.values?new Set([].concat(ln(t.innerType._zod.values),[void 0])):void 0})),ar(e._zod,"pattern",(function(){var e=t.innerType._zod.pattern;return e?new RegExp("^(".concat(ur(e.source),")?$")):void 0})),e._zod.parse=function(e,n){return void 0===e.value?e:t.innerType._zod.run(e,n)}})),Ca=Gn("$ZodNullable",(function(e,t){Bu.init(e,t),ar(e._zod,"optin",(function(){return t.innerType._zod.optin})),ar(e._zod,"optout",(function(){return t.innerType._zod.optout})),ar(e._zod,"pattern",(function(){var e=t.innerType._zod.pattern;return e?new RegExp("^(".concat(ur(e.source),"|null)$")):void 0})),ar(e._zod,"values",(function(){return t.innerType._zod.values?new Set([].concat(ln(t.innerType._zod.values),[null])):void 0})),e._zod.parse=function(e,n){return null===e.value?e:t.innerType._zod.run(e,n)}})),Aa=Gn("$ZodDefault",(function(e,t){Bu.init(e,t),e._zod.optin="optional",ar(e._zod,"values",(function(){return t.innerType._zod.values})),e._zod.parse=function(e,n){if(void 0===e.value)return e.value=t.defaultValue,e;var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((function(e){return wa(e,t)})):wa(r,t)}}));function wa(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}var xa=Gn("$ZodPrefault",(function(e,t){Bu.init(e,t),e._zod.optin="optional",ar(e._zod,"values",(function(){return t.innerType._zod.values})),e._zod.parse=function(e,n){return void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n)}})),Sa=Gn("$ZodNonOptional",(function(e,t){Bu.init(e,t),ar(e._zod,"values",(function(){var e=t.innerType._zod.values;return e?new Set(ln(e).filter((function(e){return void 0!==e}))):void 0})),e._zod.parse=function(n,r){var u=t.innerType._zod.run(n,r);return u instanceof Promise?u.then((function(t){return Ba(t,e)})):Ba(u,e)}}));function Ba(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Oa=Gn("$ZodCatch",(function(e,t){Bu.init(e,t),ar(e._zod,"optin",(function(){return t.innerType._zod.optin})),ar(e._zod,"optout",(function(){return t.innerType._zod.optout})),ar(e._zod,"values",(function(){return t.innerType._zod.values})),e._zod.parse=function(e,n){var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((function(r){return e.value=r.value,r.issues.length&&(e.value=t.catchValue(un(un({},e),{},{error:{issues:r.issues.map((function(e){return Er(e,n,Xn())}))},input:e.value})),e.issues=[]),e})):(e.value=r.value,r.issues.length&&(e.value=t.catchValue(un(un({},e),{},{error:{issues:r.issues.map((function(e){return Er(e,n,Xn())}))},input:e.value})),e.issues=[]),e)}})),Ia=Gn("$ZodPipe",(function(e,t){Bu.init(e,t),ar(e._zod,"values",(function(){return t.in._zod.values})),ar(e._zod,"optin",(function(){return t.in._zod.optin})),ar(e._zod,"optout",(function(){return t.out._zod.optout})),e._zod.parse=function(e,n){var r=t.in._zod.run(e,n);return r instanceof Promise?r.then((function(e){return Ta(e,t,n)})):Ta(r,t,n)}}));function Ta(e,t,n){return yr(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}var Pa=Gn("$ZodReadonly",(function(e,t){Bu.init(e,t),ar(e._zod,"propValues",(function(){return t.innerType._zod.propValues})),ar(e._zod,"optin",(function(){return t.innerType._zod.optin})),ar(e._zod,"optout",(function(){return t.innerType._zod.optout})),e._zod.parse=function(e,n){var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(ja):ja(r)}}));function ja(e){return e.value=Object.freeze(e.value),e}var Na=Gn("$ZodLazy",(function(e,t){Bu.init(e,t),ar(e._zod,"innerType",(function(){return t.getter()})),ar(e._zod,"pattern",(function(){return e._zod.innerType._zod.pattern})),ar(e._zod,"propValues",(function(){return e._zod.innerType._zod.propValues})),ar(e._zod,"optin",(function(){return e._zod.innerType._zod.optin})),ar(e._zod,"optout",(function(){return e._zod.innerType._zod.optout})),e._zod.parse=function(t,n){return e._zod.innerType._zod.run(t,n)}})),za=Gn("$ZodCustom",(function(e,t){au.init(e,t),Bu.init(e,t),e._zod.parse=function(e,t){return e},e._zod.check=function(n){var r=n.value,u=t.fn(r);if(u instanceof Promise)return u.then((function(t){return Ra(t,n,r,e)}));Ra(u,n,r,e)}}));function Ra(e,t,n,r){if(!e){var u,a={code:"custom",input:n,inst:r,path:ln(null!==(u=r._zod.def.path)&&void 0!==u?u:[]),continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(kr(a))}}var Ma=Gt((function e(){Wt(this,e),this._map=new WeakMap,this._idmap=new Map}),[{key:"add",value:function(e){var t=arguments.length<=1?void 0:arguments[1];if(this._map.set(e,t),t&&"object"===dn(t)&&"id"in t){if(this._idmap.has(t.id))throw new Error("ID ".concat(t.id," already exists in the registry"));this._idmap.set(t.id,e)}return this}},{key:"remove",value:function(e){return this._map.delete(e),this}},{key:"get",value:function(e){var t=e._zod.parent;if(t){var n,r=un({},null!==(n=this.get(t))&&void 0!==n?n:{});return delete r.id,un(un({},r),this._map.get(e))}return this._map.get(e)}},{key:"has",value:function(e){return this._map.has(e)}}]);var Za=new Ma;function La(e,t){return new e(un({type:"string",format:"guid",check:"string_format",abort:!1},mr(t)))}function $a(e,t){return new e(un({type:"string",format:"base64",check:"string_format",abort:!1},mr(t)))}function qa(e,t){return new ou(un(un({check:"less_than"},mr(t)),{},{value:e,inclusive:!1}))}function Ua(e,t){return new ou(un(un({check:"less_than"},mr(t)),{},{value:e,inclusive:!0}))}function Ha(e,t){return new su(un(un({check:"greater_than"},mr(t)),{},{value:e,inclusive:!1}))}function Va(e,t){return new su(un(un({check:"greater_than"},mr(t)),{},{value:e,inclusive:!0}))}function Wa(e,t){return new cu(un(un({check:"multiple_of"},mr(t)),{},{value:e}))}function Ka(e,t){return new hu(un(un({check:"max_length"},mr(t)),{},{maximum:e}))}function Ja(e,t){return new vu(un(un({check:"min_length"},mr(t)),{},{minimum:e}))}function Ga(e,t){return new mu(un(un({check:"length_equals"},mr(t)),{},{length:e}))}function Qa(e,t){return new yu(un(un({check:"string_format",format:"regex"},mr(t)),{},{pattern:e}))}function Ya(e){return new gu(un({check:"string_format",format:"lowercase"},mr(e)))}function Xa(e){return new Fu(un({check:"string_format",format:"uppercase"},mr(e)))}function ei(e,t){return new Eu(un(un({check:"string_format",format:"includes"},mr(t)),{},{includes:e}))}function ti(e,t){return new _u(un(un({check:"string_format",format:"starts_with"},mr(t)),{},{prefix:e}))}function ni(e,t){return new bu(un(un({check:"string_format",format:"ends_with"},mr(t)),{},{suffix:e}))}function ri(e){return new wu({check:"overwrite",tx:e})}function ui(e){return ri((function(t){return t.normalize(e)}))}function ai(){return ri((function(e){return e.trim()}))}function ii(){return ri((function(e){return e.toLowerCase()}))}function oi(){return ri((function(e){return e.toUpperCase()}))}var si=Gt((function e(t){var n,r,u,a,i;Wt(this,e),this.counter=0,this.metadataRegistry=null!==(n=null==t?void 0:t.metadata)&&void 0!==n?n:Za,this.target=null!==(r=null==t?void 0:t.target)&&void 0!==r?r:"draft-2020-12",this.unrepresentable=null!==(u=null==t?void 0:t.unrepresentable)&&void 0!==u?u:"throw",this.override=null!==(a=null==t?void 0:t.override)&&void 0!==a?a:function(){},this.io=null!==(i=null==t?void 0:t.io)&&void 0!==i?i:"output",this.seen=new Map}),[{key:"process",value:function(e){var t,n,r,u,a=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{path:[],schemaPath:[]},o=e._zod.def,s=this.seen.get(e);if(s)return s.count++,i.schemaPath.includes(e)&&(s.cycle=i.path),s.schema;var c={schema:{},count:1,cycle:void 0};this.seen.set(e,c);var l=null===(t=(n=e._zod).toJSONSchema)||void 0===t?void 0:t.call(n);if(l)c.schema=l;else{var f=un(un({},i),{},{schemaPath:[].concat(ln(i.schemaPath),[e]),path:i.path}),d=e._zod.parent;if(d)c.ref=d,this.process(d,f),this.seen.get(d).isParent=!0;else{var p=c.schema;switch(o.type){case"string":var h=p;h.type="string";var v,m=e._zod.bag,D=m.minimum,y=m.maximum,g=m.format,F=m.patterns,E=m.contentEncoding;if("number"==typeof D&&(h.minLength=D),"number"==typeof y&&(h.maxLength=y),g&&(h.format=null!==(v={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""}[g])&&void 0!==v?v:g,""===h.format&&delete h.format),E&&(h.contentEncoding=E),F&&F.size>0){var _=ln(F);1===_.length?h.pattern=_[0].source:_.length>1&&(c.schema.allOf=ln(_.map((function(e){return un(un({},"draft-7"===a.target?{type:"string"}:{}),{},{pattern:e.source})}))))}break;case"number":var b=p,k=e._zod.bag,C=k.minimum,A=k.maximum,w=k.format,x=k.multipleOf,S=k.exclusiveMaximum,B=k.exclusiveMinimum;"string"==typeof w&&w.includes("int")?b.type="integer":b.type="number","number"==typeof B&&(b.exclusiveMinimum=B),"number"==typeof C&&(b.minimum=C,"number"==typeof B&&(B>=C?delete b.minimum:delete b.exclusiveMinimum)),"number"==typeof S&&(b.exclusiveMaximum=S),"number"==typeof A&&(b.maximum=A,"number"==typeof S&&(S<=A?delete b.maximum:delete b.exclusiveMaximum)),"number"==typeof x&&(b.multipleOf=x);break;case"boolean":case"success":p.type="boolean";break;case"bigint":if("throw"===this.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema");break;case"symbol":if("throw"===this.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema");break;case"undefined":case"null":p.type="null";break;case"any":case"unknown":break;case"never":p.not={};break;case"void":if("throw"===this.unrepresentable)throw new Error("Void cannot be represented in JSON Schema");break;case"date":if("throw"===this.unrepresentable)throw new Error("Date cannot be represented in JSON Schema");break;case"array":var O=p,I=e._zod.bag,T=I.minimum,P=I.maximum;"number"==typeof T&&(O.minItems=T),"number"==typeof P&&(O.maxItems=P),O.type="array",O.items=this.process(o.element,un(un({},f),{},{path:[].concat(ln(f.path),["items"])}));break;case"object":var j,N=p;N.type="object",N.properties={};var z=o.shape;for(var R in z)N.properties[R]=this.process(z[R],un(un({},f),{},{path:[].concat(ln(f.path),["properties",R])}));var M=new Set(Object.keys(z)),Z=new Set(ln(M).filter((function(e){var t=o.shape[e]._zod;return"input"===a.io?void 0===t.optin:void 0===t.optout})));Z.size>0&&(N.required=Array.from(Z)),"never"===(null===(j=o.catchall)||void 0===j?void 0:j._zod.def.type)?N.additionalProperties=!1:o.catchall?o.catchall&&(N.additionalProperties=this.process(o.catchall,un(un({},f),{},{path:[].concat(ln(f.path),["additionalProperties"])}))):"output"===this.io&&(N.additionalProperties=!1);break;case"union":p.anyOf=o.options.map((function(e,t){return a.process(e,un(un({},f),{},{path:[].concat(ln(f.path),["anyOf",t])}))}));break;case"intersection":var L=p,$=this.process(o.left,un(un({},f),{},{path:[].concat(ln(f.path),["allOf",0])})),q=this.process(o.right,un(un({},f),{},{path:[].concat(ln(f.path),["allOf",1])})),U=function(e){return"allOf"in e&&1===Object.keys(e).length},H=[].concat(ln(U($)?$.allOf:[$]),ln(U(q)?q.allOf:[q]));L.allOf=H;break;case"tuple":var V=p;V.type="array";var W=o.items.map((function(e,t){return a.process(e,un(un({},f),{},{path:[].concat(ln(f.path),["prefixItems",t])}))}));if("draft-2020-12"===this.target?V.prefixItems=W:V.items=W,o.rest){var K=this.process(o.rest,un(un({},f),{},{path:[].concat(ln(f.path),["items"])}));"draft-2020-12"===this.target?V.items=K:V.additionalItems=K}o.rest&&(V.items=this.process(o.rest,un(un({},f),{},{path:[].concat(ln(f.path),["items"])})));var J=e._zod.bag,G=J.minimum,Q=J.maximum;"number"==typeof G&&(V.minItems=G),"number"==typeof Q&&(V.maxItems=Q);break;case"record":var Y=p;Y.type="object",Y.propertyNames=this.process(o.keyType,un(un({},f),{},{path:[].concat(ln(f.path),["propertyNames"])})),Y.additionalProperties=this.process(o.valueType,un(un({},f),{},{path:[].concat(ln(f.path),["additionalProperties"])}));break;case"map":if("throw"===this.unrepresentable)throw new Error("Map cannot be represented in JSON Schema");break;case"set":if("throw"===this.unrepresentable)throw new Error("Set cannot be represented in JSON Schema");break;case"enum":var X=p,ee=er(o.entries);ee.every((function(e){return"number"==typeof e}))&&(X.type="number"),ee.every((function(e){return"string"==typeof e}))&&(X.type="string"),X.enum=ee;break;case"literal":var te,ne=p,re=[],ue=Qt(o.values);try{for(ue.s();!(te=ue.n()).done;){var ae=te.value;if(void 0===ae){if("throw"===this.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof ae){if("throw"===this.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");re.push(Number(ae))}else re.push(ae)}}catch(e){ue.e(e)}finally{ue.f()}if(0===re.length);else if(1===re.length){var ie=re[0];ne.type=null===ie?"null":dn(ie),ne.const=ie}else re.every((function(e){return"number"==typeof e}))&&(ne.type="number"),re.every((function(e){return"string"==typeof e}))&&(ne.type="string"),re.every((function(e){return"boolean"==typeof e}))&&(ne.type="string"),re.every((function(e){return null===e}))&&(ne.type="null"),ne.enum=re;break;case"file":var oe=p,se={type:"string",format:"binary",contentEncoding:"binary"},ce=e._zod.bag,le=ce.minimum,fe=ce.maximum,de=ce.mime;void 0!==le&&(se.minLength=le),void 0!==fe&&(se.maxLength=fe),de?1===de.length?(se.contentMediaType=de[0],Object.assign(oe,se)):oe.anyOf=de.map((function(e){return un(un({},se),{},{contentMediaType:e})})):Object.assign(oe,se);break;case"transform":if("throw"===this.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema");break;case"nullable":var pe=this.process(o.innerType,f);p.anyOf=[pe,{type:"null"}];break;case"nonoptional":case"promise":case"optional":this.process(o.innerType,f),c.ref=o.innerType;break;case"default":this.process(o.innerType,f),c.ref=o.innerType,p.default=JSON.parse(JSON.stringify(o.defaultValue));break;case"prefault":this.process(o.innerType,f),c.ref=o.innerType,"input"===this.io&&(p._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break;case"catch":var he;this.process(o.innerType,f),c.ref=o.innerType;try{he=o.catchValue(void 0)}catch(e){throw new Error("Dynamic catch values are not supported in JSON Schema")}p.default=he;break;case"nan":if("throw"===this.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema");break;case"template_literal":var ve=p,me=e._zod.pattern;if(!me)throw new Error("Pattern not found in template literal");ve.type="string",ve.pattern=me.source;break;case"pipe":var De="input"===this.io?"transform"===o.in._zod.def.type?o.out:o.in:o.out;this.process(De,f),c.ref=De;break;case"readonly":this.process(o.innerType,f),c.ref=o.innerType,p.readOnly=!0;break;case"lazy":var ye=e._zod.innerType;this.process(ye,f),c.ref=ye;break;case"custom":if("throw"===this.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")}}}var ge=this.metadataRegistry.get(e);return ge&&Object.assign(c.schema,ge),"input"===this.io&&ci(e)&&(delete c.schema.examples,delete c.schema.default),"input"===this.io&&c.schema._prefault&&(null!==(r=(u=c.schema).default)&&void 0!==r||(u.default=c.schema._prefault)),delete c.schema._prefault,this.seen.get(e).schema}},{key:"emit",value:function(e,t){var n,r,u,a,i,o=this,s={cycles:null!==(n=null==t?void 0:t.cycles)&&void 0!==n?n:"ref",reused:null!==(r=null==t?void 0:t.reused)&&void 0!==r?r:"inline",external:null!==(u=null==t?void 0:t.external)&&void 0!==u?u:void 0},c=this.seen.get(e);if(!c)throw new Error("Unprocessed schema. This is a bug in Zod.");var l,f=function(e){if(!e[1].schema.$ref){var t=e[1],n=function(e){var t,n="draft-2020-12"===o.target?"$defs":"definitions";if(s.external){var r,u,a,i=null===(r=s.external.registry.get(e[0]))||void 0===r?void 0:r.id;if(i)return{ref:s.external.uri(i)};var l=null!==(u=null!==(a=e[1].defId)&&void 0!==a?a:e[1].schema.id)&&void 0!==u?u:"schema".concat(o.counter++);return e[1].defId=l,{defId:l,ref:"".concat(s.external.uri("__shared"),"#/").concat(n,"/").concat(l)}}if(e[1]===c)return{ref:"#"};var f="".concat("#","/").concat(n,"/"),d=null!==(t=e[1].schema.id)&&void 0!==t?t:"__schema".concat(o.counter++);return{defId:d,ref:f+d}}(e),r=n.ref,u=n.defId;t.def=un({},t.schema),u&&(t.defId=u);var a=t.schema;for(var i in a)delete a[i];a.$ref=r}},d=Qt(this.seen.entries());try{for(d.s();!(l=d.n()).done;){var p,h=l.value,v=h[1];if(e!==h[0]){if(s.external){var m,D=null===(m=s.external.registry.get(h[0]))||void 0===m?void 0:m.id;if(e!==h[0]&&D){f(h);continue}}if(null===(p=this.metadataRegistry.get(h[0]))||void 0===p?void 0:p.id)f(h);else if(v.cycle){var y;if("throw"===s.cycles)throw new Error("Cycle detected: "+"#/".concat(null===(y=v.cycle)||void 0===y?void 0:y.join("/"),"/<root>")+'\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.');"ref"===s.cycles&&f(h)}else v.count>1&&"ref"===s.reused&&f(h)}else f(h)}}catch(e){d.e(e)}finally{d.f()}var g,F=function(e,t){var n,r=o.seen.get(e),u=null!==(n=r.def)&&void 0!==n?n:r.schema,a=un({},u);if(null!==r.ref){var i=r.ref;if(r.ref=null,i){F(i,t);var s,c=o.seen.get(i).schema;c.$ref&&"draft-7"===t.target?(u.allOf=null!==(s=u.allOf)&&void 0!==s?s:[],u.allOf.push(c)):(Object.assign(u,c),Object.assign(u,a))}r.isParent||o.override({zodSchema:e,jsonSchema:u})}},E=Qt(ln(this.seen.entries()).reverse());try{for(E.s();!(g=E.n()).done;){var _=g.value;F(_[0],{target:this.target})}}catch(e){E.e(e)}finally{E.f()}var b={};"draft-2020-12"===this.target?b.$schema="https://json-schema.org/draft/2020-12/schema":"draft-7"===this.target?b.$schema="http://json-schema.org/draft-07/schema#":console.warn("Invalid target: ".concat(this.target)),Object.assign(b,c.def);var k,C=null!==(a=null===(i=s.external)||void 0===i?void 0:i.defs)&&void 0!==a?a:{},A=Qt(this.seen.entries());try{for(A.s();!(k=A.n()).done;){var w=k.value[1];w.def&&w.defId&&(C[w.defId]=w.def)}}catch(e){A.e(e)}finally{A.f()}!s.external&&Object.keys(C).length>0&&("draft-2020-12"===this.target?b.$defs=C:b.definitions=C);try{return JSON.parse(JSON.stringify(b))}catch(e){throw new Error("Error converting schema to JSON.")}}}]);function ci(e,t){var n=null!=t?t:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);var r=e._zod.def;switch(r.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":case"custom":case"success":case"catch":return!1;case"array":return ci(r.element,n);case"object":for(var u in r.shape)if(ci(r.shape[u],n))return!0;return!1;case"union":var a,i=Qt(r.options);try{for(i.s();!(a=i.n()).done;)if(ci(a.value,n))return!0}catch(e){i.e(e)}finally{i.f()}return!1;case"intersection":return ci(r.left,n)||ci(r.right,n);case"tuple":var o,s=Qt(r.items);try{for(s.s();!(o=s.n()).done;)if(ci(o.value,n))return!0}catch(e){s.e(e)}finally{s.f()}return!(!r.rest||!ci(r.rest,n));case"record":case"map":return ci(r.keyType,n)||ci(r.valueType,n);case"set":return ci(r.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":case"default":case"prefault":return ci(r.innerType,n);case"lazy":return ci(r.getter(),n);case"transform":return!0;case"pipe":return ci(r.in,n)||ci(r.out,n)}throw new Error("Unknown schema type: ".concat(r.type))}var li=Object.freeze({__proto__:null,endsWith:ni,gt:Ha,gte:Va,includes:ei,length:Ga,lowercase:Ya,lt:qa,lte:Ua,maxLength:Ka,maxSize:function(e,t){return new fu(un(un({check:"max_size"},mr(t)),{},{maximum:e}))},mime:function(e,t){return new Au(un({check:"mime_type",mime:e},mr(t)))},minLength:Ja,minSize:function(e,t){return new du(un(un({check:"min_size"},mr(t)),{},{minimum:e}))},multipleOf:Wa,negative:function(e){return qa(0,e)},nonnegative:function(e){return Va(0,e)},nonpositive:function(e){return Ua(0,e)},normalize:ui,overwrite:ri,positive:function(e){return Ha(0,e)},property:function(e,t,n){return new Cu(un({check:"property",property:e,schema:t},mr(n)))},regex:Qa,size:function(e,t){return new pu(un(un({check:"size_equals"},mr(t)),{},{size:e}))},startsWith:ti,toLowerCase:ii,toUpperCase:oi,trim:ai,uppercase:Xa}),fi=Gn("ZodISODateTime",(function(e,t){Uu.init(e,t),ki.init(e,t)}));var di=Gn("ZodISODate",(function(e,t){Hu.init(e,t),ki.init(e,t)}));var pi=Gn("ZodISOTime",(function(e,t){Vu.init(e,t),ki.init(e,t)}));var hi=Gn("ZodISODuration",(function(e,t){Wu.init(e,t),ki.init(e,t)}));var vi=Gn("ZodError",(function(e,t){Ar.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:function(t){return function(e,t){var n=t||function(e){return e.message},r={_errors:[]},u=function(e){var t,a=Qt(e.issues);try{for(a.s();!(t=a.n()).done;){var i=t.value;if("invalid_union"===i.code&&i.errors.length)i.errors.map((function(e){return u({issues:e})}));else if("invalid_key"===i.code)u({issues:i.issues});else if("invalid_element"===i.code)u({issues:i.issues});else if(0===i.path.length)r._errors.push(n(i));else for(var o=r,s=0;s<i.path.length;){var c=i.path[s];s===i.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(i))):o[c]=o[c]||{_errors:[]},o=o[c],s++}}}catch(e){a.e(e)}finally{a.f()}};return u(e),r}(e,t)}},flatten:{value:function(t){return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e.message},r={},u=[],a=Qt(e.issues);try{for(a.s();!(t=a.n()).done;){var i=t.value;i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(n(i))):u.push(n(i))}}catch(e){a.e(e)}finally{a.f()}return{formErrors:u,fieldErrors:r}}(e,t)}},addIssue:{value:function(t){return e.issues.push(t)}},addIssues:{value:function(t){var n;return(n=e.issues).push.apply(n,ln(t))}},isEmpty:{get:function(){return 0===e.issues.length}}})}),{Parent:Error}),mi=function(e){return function(t,n,r,u){var a=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise)throw new Qn;if(i.issues.length){var o,s=new(null!==(o=null==u?void 0:u.Err)&&void 0!==o?o:e)(i.issues.map((function(e){return Er(e,a,Xn())})));throw cr(s,null==u?void 0:u.callee),s}return i.value}}(vi),Di=function(e){return function(){var t=Ht(on().mark((function t(n,r,u,a){var i,o,s,c;return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=u?Object.assign(u,{async:!0}):{async:!0},!((o=n._zod.run({value:r,issues:[]},i))instanceof Promise)){t.next=6;break}return t.next=5,o;case 5:o=t.sent;case 6:if(!o.issues.length){t.next=10;break}throw c=new(null!==(s=null==a?void 0:a.Err)&&void 0!==s?s:e)(o.issues.map((function(e){return Er(e,i,Xn())}))),cr(c,null==a?void 0:a.callee),c;case 10:return t.abrupt("return",o.value);case 11:case"end":return t.stop()}}),t)})));return function(e,n,r,u){return t.apply(this,arguments)}}()}(vi),yi=xr(vi),gi=Br(vi),Fi=Gn("ZodType",(function(e,t){return Bu.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=function(){for(var n,r=arguments.length,u=new Array(r),a=0;a<r;a++)u[a]=arguments[a];return e.clone(un(un({},t),{},{checks:[].concat(ln(null!==(n=t.checks)&&void 0!==n?n:[]),ln(u.map((function(e){return"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e}))))}))},e.clone=function(t,n){return vr(e,t,n)},e.brand=function(){return e},e.register=function(t,n){return t.add(e,n),e},e.parse=function(t,n){return mi(e,t,n,{callee:e.parse})},e.safeParse=function(t,n){return yi(e,t,n)},e.parseAsync=function(){var t=Ht(on().mark((function t(n,r){return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Di(e,n,r,{callee:e.parseAsync}));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e.safeParseAsync=function(){var t=Ht(on().mark((function t(n,r){return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",gi(e,n,r));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e.spa=e.safeParseAsync,e.refine=function(t,n){return e.check(function(e){return function(e,t,n){return new jo(un({type:"custom",check:"custom",fn:t},mr(n)))}(0,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(t,n))},e.superRefine=function(t){return e.check((n=t,r=function(e,t){var n=new au(un({check:"custom"},mr(t)));return n._zod.check=e,n}((function(e){return e.addIssue=function(t){if("string"==typeof t)e.issues.push(kr(t,e.value,r._zod.def));else{var n,u,a,i,o=t;o.fatal&&(o.continue=!1),null!==(n=o.code)&&void 0!==n||(o.code="custom"),null!==(u=o.input)&&void 0!==u||(o.input=e.value),null!==(a=o.inst)&&void 0!==a||(o.inst=r),null!==(i=o.continue)&&void 0!==i||(o.continue=!r._zod.def.abort),e.issues.push(kr(o))}},n(e.value,e)}),undefined),r));var n,r},e.overwrite=function(t){return e.check(ri(t))},e.optional=function(){return _o(e)},e.nullable=function(){return ko(e)},e.nullish=function(){return _o(ko(e))},e.nonoptional=function(t){return function(e,t){return new wo(un({type:"nonoptional",innerType:e},mr(t)))}(e,t)},e.array=function(){return uo(e)},e.or=function(t){return lo([e,t])},e.and=function(t){return new po({type:"intersection",left:e,right:t})},e.transform=function(t){return Bo(e,new Fo({type:"transform",transform:t}))},e.default=function(t){return n=t,new Co({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():n}});var n},e.prefault=function(t){return n=t,new Ao({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():n}});var n},e.catch=function(t){return new xo({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:function(){return n}});var n},e.pipe=function(t){return Bo(e,t)},e.readonly=function(){return new To({type:"readonly",innerType:e})},e.describe=function(t){var n=e.clone();return Za.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:function(){var t;return null===(t=Za.get(e))||void 0===t?void 0:t.description},configurable:!0}),e.meta=function(){if(0===arguments.length)return Za.get(e);var t=e.clone();return Za.add(t,arguments.length<=0?void 0:arguments[0]),t},e.isOptional=function(){return e.safeParse(void 0).success},e.isNullable=function(){return e.safeParse(null).success},e})),Ei=Gn("_ZodString",(function(e,t){var n,r,u;Ou.init(e,t),Fi.init(e,t);var a=e._zod.bag;e.format=null!==(n=a.format)&&void 0!==n?n:null,e.minLength=null!==(r=a.minimum)&&void 0!==r?r:null,e.maxLength=null!==(u=a.maximum)&&void 0!==u?u:null,e.regex=function(){return e.check(Qa.apply(li,arguments))},e.includes=function(){return e.check(ei.apply(li,arguments))},e.startsWith=function(){return e.check(ti.apply(li,arguments))},e.endsWith=function(){return e.check(ni.apply(li,arguments))},e.min=function(){return e.check(Ja.apply(li,arguments))},e.max=function(){return e.check(Ka.apply(li,arguments))},e.length=function(){return e.check(Ga.apply(li,arguments))},e.nonempty=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.check(Ja.apply(li,[1].concat(n)))},e.lowercase=function(t){return e.check(Ya(t))},e.uppercase=function(t){return e.check(Xa(t))},e.trim=function(){return e.check(ai())},e.normalize=function(){return e.check(ui.apply(li,arguments))},e.toLowerCase=function(){return e.check(ii())},e.toUpperCase=function(){return e.check(oi())}})),_i=Gn("ZodString",(function(e,t){Ou.init(e,t),Ei.init(e,t),e.email=function(t){return e.check(function(e,t){return new Ci(un({type:"string",format:"email",check:"string_format",abort:!1},mr(t)))}(0,t))},e.url=function(t){return e.check(function(e,t){return new xi(un({type:"string",format:"url",check:"string_format",abort:!1},mr(t)))}(0,t))},e.jwt=function(t){return e.check(function(e,t){return new Ui(un({type:"string",format:"jwt",check:"string_format",abort:!1},mr(t)))}(0,t))},e.emoji=function(t){return e.check(function(e,t){return new Si(un({type:"string",format:"emoji",check:"string_format",abort:!1},mr(t)))}(0,t))},e.guid=function(t){return e.check(La(Ai,t))},e.uuid=function(t){return e.check(function(e,t){return new wi(un({type:"string",format:"uuid",check:"string_format",abort:!1},mr(t)))}(0,t))},e.uuidv4=function(t){return e.check(function(e,t){return new wi(un({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4"},mr(t)))}(0,t))},e.uuidv6=function(t){return e.check(function(e,t){return new wi(un({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6"},mr(t)))}(0,t))},e.uuidv7=function(t){return e.check(function(e,t){return new wi(un({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7"},mr(t)))}(0,t))},e.nanoid=function(t){return e.check(function(e,t){return new Bi(un({type:"string",format:"nanoid",check:"string_format",abort:!1},mr(t)))}(0,t))},e.guid=function(t){return e.check(La(Ai,t))},e.cuid=function(t){return e.check(function(e,t){return new Oi(un({type:"string",format:"cuid",check:"string_format",abort:!1},mr(t)))}(0,t))},e.cuid2=function(t){return e.check(function(e,t){return new Ii(un({type:"string",format:"cuid2",check:"string_format",abort:!1},mr(t)))}(0,t))},e.ulid=function(t){return e.check(function(e,t){return new Ti(un({type:"string",format:"ulid",check:"string_format",abort:!1},mr(t)))}(0,t))},e.base64=function(t){return e.check($a(Zi,t))},e.base64url=function(t){return e.check(function(e,t){return new $i(un({type:"string",format:"base64url",check:"string_format",abort:!1},mr(t)))}(0,t))},e.xid=function(t){return e.check(function(e,t){return new Pi(un({type:"string",format:"xid",check:"string_format",abort:!1},mr(t)))}(0,t))},e.ksuid=function(t){return e.check(function(e,t){return new ji(un({type:"string",format:"ksuid",check:"string_format",abort:!1},mr(t)))}(0,t))},e.ipv4=function(t){return e.check(function(e,t){return new Ni(un({type:"string",format:"ipv4",check:"string_format",abort:!1},mr(t)))}(0,t))},e.ipv6=function(t){return e.check(function(e,t){return new zi(un({type:"string",format:"ipv6",check:"string_format",abort:!1},mr(t)))}(0,t))},e.cidrv4=function(t){return e.check(function(e,t){return new Ri(un({type:"string",format:"cidrv4",check:"string_format",abort:!1},mr(t)))}(0,t))},e.cidrv6=function(t){return e.check(function(e,t){return new Mi(un({type:"string",format:"cidrv6",check:"string_format",abort:!1},mr(t)))}(0,t))},e.e164=function(t){return e.check(function(e,t){return new qi(un({type:"string",format:"e164",check:"string_format",abort:!1},mr(t)))}(0,t))},e.datetime=function(t){return e.check(function(e){return function(e,t){return new fi(un({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null},mr(t)))}(0,e)}(t))},e.date=function(t){return e.check(function(e){return function(e,t){return new di(un({type:"string",format:"date",check:"string_format"},mr(t)))}(0,e)}(t))},e.time=function(t){return e.check(function(e){return function(e,t){return new pi(un({type:"string",format:"time",check:"string_format",precision:null},mr(t)))}(0,e)}(t))},e.duration=function(t){return e.check(function(e){return function(e,t){return new hi(un({type:"string",format:"duration",check:"string_format"},mr(t)))}(0,e)}(t))}}));function bi(e){return function(e,t){return new _i(un({type:"string"},mr(t)))}(0,e)}var ki=Gn("ZodStringFormat",(function(e,t){Iu.init(e,t),Ei.init(e,t)})),Ci=Gn("ZodEmail",(function(e,t){ju.init(e,t),ki.init(e,t)})),Ai=Gn("ZodGUID",(function(e,t){Tu.init(e,t),ki.init(e,t)})),wi=Gn("ZodUUID",(function(e,t){Pu.init(e,t),ki.init(e,t)})),xi=Gn("ZodURL",(function(e,t){Nu.init(e,t),ki.init(e,t)})),Si=Gn("ZodEmoji",(function(e,t){zu.init(e,t),ki.init(e,t)})),Bi=Gn("ZodNanoID",(function(e,t){Ru.init(e,t),ki.init(e,t)})),Oi=Gn("ZodCUID",(function(e,t){Mu.init(e,t),ki.init(e,t)})),Ii=Gn("ZodCUID2",(function(e,t){Zu.init(e,t),ki.init(e,t)})),Ti=Gn("ZodULID",(function(e,t){Lu.init(e,t),ki.init(e,t)})),Pi=Gn("ZodXID",(function(e,t){$u.init(e,t),ki.init(e,t)})),ji=Gn("ZodKSUID",(function(e,t){qu.init(e,t),ki.init(e,t)})),Ni=Gn("ZodIPv4",(function(e,t){Ku.init(e,t),ki.init(e,t)})),zi=Gn("ZodIPv6",(function(e,t){Ju.init(e,t),ki.init(e,t)})),Ri=Gn("ZodCIDRv4",(function(e,t){Gu.init(e,t),ki.init(e,t)})),Mi=Gn("ZodCIDRv6",(function(e,t){Qu.init(e,t),ki.init(e,t)})),Zi=Gn("ZodBase64",(function(e,t){Xu.init(e,t),ki.init(e,t)}));function Li(e){return $a(Zi,e)}var $i=Gn("ZodBase64URL",(function(e,t){ea.init(e,t),ki.init(e,t)})),qi=Gn("ZodE164",(function(e,t){ta.init(e,t),ki.init(e,t)})),Ui=Gn("ZodJWT",(function(e,t){na.init(e,t),ki.init(e,t)})),Hi=Gn("ZodNumber",(function(e,t){var n,r,u,a,i,o,s,c,l;ra.init(e,t),Fi.init(e,t),e.gt=function(t,n){return e.check(Ha(t,n))},e.gte=function(t,n){return e.check(Va(t,n))},e.min=function(t,n){return e.check(Va(t,n))},e.lt=function(t,n){return e.check(qa(t,n))},e.lte=function(t,n){return e.check(Ua(t,n))},e.max=function(t,n){return e.check(Ua(t,n))},e.int=function(t){return e.check(Ki(t))},e.safe=function(t){return e.check(Ki(t))},e.positive=function(t){return e.check(Ha(0,t))},e.nonnegative=function(t){return e.check(Va(0,t))},e.negative=function(t){return e.check(qa(0,t))},e.nonpositive=function(t){return e.check(Ua(0,t))},e.multipleOf=function(t,n){return e.check(Wa(t,n))},e.step=function(t,n){return e.check(Wa(t,n))},e.finite=function(){return e};var f=e._zod.bag;e.minValue=null!==(n=Math.max(null!==(r=f.minimum)&&void 0!==r?r:Number.NEGATIVE_INFINITY,null!==(u=f.exclusiveMinimum)&&void 0!==u?u:Number.NEGATIVE_INFINITY))&&void 0!==n?n:null,e.maxValue=null!==(a=Math.min(null!==(i=f.maximum)&&void 0!==i?i:Number.POSITIVE_INFINITY,null!==(o=f.exclusiveMaximum)&&void 0!==o?o:Number.POSITIVE_INFINITY))&&void 0!==a?a:null,e.isInt=(null!==(s=f.format)&&void 0!==s?s:"").includes("int")||Number.isSafeInteger(null!==(c=f.multipleOf)&&void 0!==c?c:.5),e.isFinite=!0,e.format=null!==(l=f.format)&&void 0!==l?l:null}));function Vi(e){return function(e,t){return new Hi(un({type:"number",checks:[]},mr(t)))}(0,e)}var Wi=Gn("ZodNumberFormat",(function(e,t){ua.init(e,t),Hi.init(e,t)}));function Ki(e){return function(e,t){return new Wi(un({type:"number",check:"number_format",abort:!1,format:"safeint"},mr(t)))}(0,e)}var Ji=Gn("ZodBoolean",(function(e,t){aa.init(e,t),Fi.init(e,t)}));function Gi(e){return function(e,t){return new Ji(un({type:"boolean"},mr(t)))}(0,e)}var Qi=Gn("ZodNull",(function(e,t){ia.init(e,t),Fi.init(e,t)}));function Yi(e){return function(e,t){return new Qi(un({type:"null"},mr(t)))}(0,e)}var Xi=Gn("ZodUnknown",(function(e,t){oa.init(e,t),Fi.init(e,t)}));function eo(){return new Xi({type:"unknown"})}var to=Gn("ZodNever",(function(e,t){sa.init(e,t),Fi.init(e,t)}));function no(e){return function(e,t){return new to(un({type:"never"},mr(t)))}(0,e)}var ro=Gn("ZodArray",(function(e,t){la.init(e,t),Fi.init(e,t),e.element=t.element,e.min=function(t,n){return e.check(Ja(t,n))},e.nonempty=function(t){return e.check(Ja(1,t))},e.max=function(t,n){return e.check(Ka(t,n))},e.length=function(t,n){return e.check(Ga(t,n))},e.unwrap=function(){return e.element}}));function uo(e,t){return function(e,t,n){return new ro(un({type:"array",element:t},mr(n)))}(0,e,t)}var ao=Gn("ZodObject",(function(e,t){pa.init(e,t),Fi.init(e,t),ar(e,"shape",(function(){return t.shape})),e.keyof=function(){return Do(Object.keys(e._zod.def.shape))},e.catchall=function(t){return e.clone(un(un({},e._zod.def),{},{catchall:t}))},e.passthrough=function(){return e.clone(un(un({},e._zod.def),{},{catchall:eo()}))},e.loose=function(){return e.clone(un(un({},e._zod.def),{},{catchall:eo()}))},e.strict=function(){return e.clone(un(un({},e._zod.def),{},{catchall:no()}))},e.strip=function(){return e.clone(un(un({},e._zod.def),{},{catchall:void 0}))},e.extend=function(t){return function(e,t){var n=un(un({},e._zod.def),{},{get shape(){var n=un(un({},e._zod.def.shape),t);return ir(this,"shape",n),n},checks:[]});return vr(e,n)}(e,t)},e.merge=function(t){return r=t,vr(n=e,un(un({},n._zod.def),{},{get shape(){var e=un(un({},n._zod.def.shape),r._zod.def.shape);return ir(this,"shape",e),e},catchall:r._zod.def.catchall,checks:[]}));var n,r},e.pick=function(t){return function(e,t){var n={},r=e._zod.def;for(var u in t){if(!(u in r.shape))throw new Error('Unrecognized key: "'.concat(u,'"'));t[u]&&(n[u]=r.shape[u])}return vr(e,un(un({},e._zod.def),{},{shape:n,checks:[]}))}(e,t)},e.omit=function(t){return function(e,t){var n=un({},e._zod.def.shape),r=e._zod.def;for(var u in t){if(!(u in r.shape))throw new Error('Unrecognized key: "'.concat(u,'"'));t[u]&&delete n[u]}return vr(e,un(un({},e._zod.def),{},{shape:n,checks:[]}))}(e,t)},e.partial=function(){return function(e,t,n){var r=t._zod.def.shape,u=un({},r);if(n)for(var a in n){if(!(a in r))throw new Error('Unrecognized key: "'.concat(a,'"'));n[a]&&(u[a]=new e({type:"optional",innerType:r[a]}))}else for(var i in r)u[i]=new e({type:"optional",innerType:r[i]});return vr(t,un(un({},t._zod.def),{},{shape:u,checks:[]}))}(Eo,e,arguments.length<=0?void 0:arguments[0])},e.required=function(){return function(e,t,n){var r=t._zod.def.shape,u=un({},r);if(n)for(var a in n){if(!(a in u))throw new Error('Unrecognized key: "'.concat(a,'"'));n[a]&&(u[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(var i in r)u[i]=new e({type:"nonoptional",innerType:r[i]});return vr(t,un(un({},t._zod.def),{},{shape:u,checks:[]}))}(wo,e,arguments.length<=0?void 0:arguments[0])}}));function io(e,t){var n=un({type:"object",get shape(){return ir(this,"shape",un({},e)),this.shape}},mr(t));return new ao(n)}function oo(e,t){return new ao(un({type:"object",get shape(){return ir(this,"shape",un({},e)),this.shape},catchall:no()},mr(t)))}function so(e,t){return new ao(un({type:"object",get shape(){return ir(this,"shape",un({},e)),this.shape},catchall:eo()},mr(t)))}var co=Gn("ZodUnion",(function(e,t){va.init(e,t),Fi.init(e,t),e.options=t.options}));function lo(e,t){return new co(un({type:"union",options:e},mr(t)))}var fo=Gn("ZodDiscriminatedUnion",(function(e,t){co.init(e,t),ma.init(e,t)})),po=Gn("ZodIntersection",(function(e,t){Da.init(e,t),Fi.init(e,t)})),ho=Gn("ZodRecord",(function(e,t){Fa.init(e,t),Fi.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}));function vo(e,t,n){return new ho(un({type:"record",keyType:e,valueType:t},mr(n)))}var mo=Gn("ZodEnum",(function(e,t){Ea.init(e,t),Fi.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);var n=new Set(Object.keys(t.entries));e.extract=function(e,r){var u,a={},i=Qt(e);try{for(i.s();!(u=i.n()).done;){var o=u.value;if(!n.has(o))throw new Error("Key ".concat(o," not found in enum"));a[o]=t.entries[o]}}catch(e){i.e(e)}finally{i.f()}return new mo(un(un(un({},t),{},{checks:[]},mr(r)),{},{entries:a}))},e.exclude=function(e,r){var u,a=un({},t.entries),i=Qt(e);try{for(i.s();!(u=i.n()).done;){var o=u.value;if(!n.has(o))throw new Error("Key ".concat(o," not found in enum"));delete a[o]}}catch(e){i.e(e)}finally{i.f()}return new mo(un(un(un({},t),{},{checks:[]},mr(r)),{},{entries:a}))}}));function Do(e,t){var n=Array.isArray(e)?Object.fromEntries(e.map((function(e){return[e,e]}))):e;return new mo(un({type:"enum",entries:n},mr(t)))}var yo=Gn("ZodLiteral",(function(e,t){_a.init(e,t),Fi.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get:function(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}));function go(e,t){return new yo(un({type:"literal",values:Array.isArray(e)?e:[e]},mr(t)))}var Fo=Gn("ZodTransform",(function(e,t){ba.init(e,t),Fi.init(e,t),e._zod.parse=function(n,r){n.addIssue=function(r){if("string"==typeof r)n.issues.push(kr(r,n.value,t));else{var u,a,i,o,s=r;s.fatal&&(s.continue=!1),null!==(u=s.code)&&void 0!==u||(s.code="custom"),null!==(a=s.input)&&void 0!==a||(s.input=n.value),null!==(i=s.inst)&&void 0!==i||(s.inst=e),null!==(o=s.continue)&&void 0!==o||(s.continue=!0),n.issues.push(kr(s))}};var u=t.transform(n.value,n);return u instanceof Promise?u.then((function(e){return n.value=e,n})):(n.value=u,n)}})),Eo=Gn("ZodOptional",(function(e,t){ka.init(e,t),Fi.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}));function _o(e){return new Eo({type:"optional",innerType:e})}var bo=Gn("ZodNullable",(function(e,t){Ca.init(e,t),Fi.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}));function ko(e){return new bo({type:"nullable",innerType:e})}var Co=Gn("ZodDefault",(function(e,t){Aa.init(e,t),Fi.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeDefault=e.unwrap})),Ao=Gn("ZodPrefault",(function(e,t){xa.init(e,t),Fi.init(e,t),e.unwrap=function(){return e._zod.def.innerType}})),wo=Gn("ZodNonOptional",(function(e,t){Sa.init(e,t),Fi.init(e,t),e.unwrap=function(){return e._zod.def.innerType}})),xo=Gn("ZodCatch",(function(e,t){Oa.init(e,t),Fi.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeCatch=e.unwrap})),So=Gn("ZodPipe",(function(e,t){Ia.init(e,t),Fi.init(e,t),e.in=t.in,e.out=t.out}));function Bo(e,t){return new So({type:"pipe",in:e,out:t})}var Oo,Io,To=Gn("ZodReadonly",(function(e,t){Pa.init(e,t),Fi.init(e,t)})),Po=Gn("ZodLazy",(function(e,t){Na.init(e,t),Fi.init(e,t),e.unwrap=function(){return e._zod.def.getter()}})),jo=Gn("ZodCustom",(function(e,t){za.init(e,t),Fi.init(e,t)}));function No(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{error:"Input not instance of ".concat(e.name)},n=new jo(un({type:"custom",check:"custom",fn:function(t){return t instanceof e},abort:!0},mr(t)));return n._zod.bag.Class=e,n}!function(e){e.assertEqual=function(e){},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=function(e){var t,n={},r=Qt(e);try{for(r.s();!(t=r.n()).done;){var u=t.value;n[u]=u}}catch(e){r.e(e)}finally{r.f()}return n},e.getValidEnumValues=function(t){var n,r={},u=Qt(e.objectKeys(t).filter((function(e){return"number"!=typeof t[t[e]]})));try{for(u.s();!(n=u.n()).done;){var a=n.value;r[a]=t[a]}}catch(e){u.e(e)}finally{u.f()}return e.objectValues(r)},e.objectValues=function(t){return e.objectKeys(t).map((function(e){return t[e]}))},e.objectKeys="function"==typeof Object.keys?function(e){return Object.keys(e)}:function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=function(e,t){var n,r=Qt(e);try{for(r.s();!(n=r.n()).done;){var u=n.value;if(t(u))return u}}catch(e){r.e(e)}finally{r.f()}},e.isInteger="function"==typeof Number.isInteger?function(e){return Number.isInteger(e)}:function(e){return"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e},e.joinValues=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" | ";return e.map((function(e){return"string"==typeof e?"'".concat(e,"'"):e})).join(t)},e.jsonStringifyReplacer=function(e,t){return"bigint"==typeof t?t.toString():t}}(Oo||(Oo={})),(Io||(Io={})).mergeShapes=function(e,t){return un(un({},e),t)};var zo=Oo.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ro=function(e){switch(dn(e)){case"undefined":return zo.undefined;case"string":return zo.string;case"number":return Number.isNaN(e)?zo.nan:zo.number;case"boolean":return zo.boolean;case"function":return zo.function;case"bigint":return zo.bigint;case"symbol":return zo.symbol;case"object":return Array.isArray(e)?zo.array:null===e?zo.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?zo.promise:"undefined"!=typeof Map&&e instanceof Map?zo.map:"undefined"!=typeof Set&&e instanceof Set?zo.set:"undefined"!=typeof Date&&e instanceof Date?zo.date:zo.object;default:return zo.unknown}},Mo=Oo.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"]),Zo=function(){function e(t){var n;Wt(this,e),(n=Vt(this,e)).issues=[],n.addIssue=function(e){n.issues=[].concat(ln(n.issues),[e])},n.addIssues=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];n.issues=[].concat(ln(n.issues),ln(e))};var r=(this instanceof e?this.constructor:void 0).prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,r):n.__proto__=r,n.name="ZodError",n.issues=t,n}return tn(e,hn(Error)),Gt(e,[{key:"errors",get:function(){return this.issues}},{key:"format",value:function(e){var t=e||function(e){return e.message},n={_errors:[]},r=function(e){var u,a=Qt(e.issues);try{for(a.s();!(u=a.n()).done;){var i=u.value;if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else for(var o=n,s=0;s<i.path.length;){var c=i.path[s];s===i.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(i))):o[c]=o[c]||{_errors:[]},o=o[c],s++}}}catch(e){a.e(e)}finally{a.f()}};return r(this),n}},{key:"toString",value:function(){return this.message}},{key:"message",get:function(){return JSON.stringify(this.issues,Oo.jsonStringifyReplacer,2)}},{key:"isEmpty",get:function(){return 0===this.issues.length}},{key:"flatten",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.message},n={},r=[],u=Qt(this.issues);try{for(u.s();!(e=u.n()).done;){var a=e.value;a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a))}}catch(e){u.e(e)}finally{u.f()}return{formErrors:r,fieldErrors:n}}},{key:"formErrors",get:function(){return this.flatten()}}],[{key:"assert",value:function(t){if(!(t instanceof e))throw new Error("Not a ZodError: ".concat(t))}}])}();Zo.create=function(e){return new Zo(e)};var Lo=function(e,t){var n;switch(e.code){case Mo.invalid_type:n=e.received===zo.undefined?"Required":"Expected ".concat(e.expected,", received ").concat(e.received);break;case Mo.invalid_literal:n="Invalid literal value, expected ".concat(JSON.stringify(e.expected,Oo.jsonStringifyReplacer));break;case Mo.unrecognized_keys:n="Unrecognized key(s) in object: ".concat(Oo.joinValues(e.keys,", "));break;case Mo.invalid_union:n="Invalid input";break;case Mo.invalid_union_discriminator:n="Invalid discriminator value. Expected ".concat(Oo.joinValues(e.options));break;case Mo.invalid_enum_value:n="Invalid enum value. Expected ".concat(Oo.joinValues(e.options),", received '").concat(e.received,"'");break;case Mo.invalid_arguments:n="Invalid function arguments";break;case Mo.invalid_return_type:n="Invalid function return type";break;case Mo.invalid_date:n="Invalid date";break;case Mo.invalid_string:"object"===dn(e.validation)?"includes"in e.validation?(n='Invalid input: must include "'.concat(e.validation.includes,'"'),"number"==typeof e.validation.position&&(n="".concat(n," at one or more positions greater than or equal to ").concat(e.validation.position))):"startsWith"in e.validation?n='Invalid input: must start with "'.concat(e.validation.startsWith,'"'):"endsWith"in e.validation?n='Invalid input: must end with "'.concat(e.validation.endsWith,'"'):Oo.assertNever(e.validation):n="regex"!==e.validation?"Invalid ".concat(e.validation):"Invalid";break;case Mo.too_small:n="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)"):"number"===e.type?"Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum):"date"===e.type?"Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum))):"Invalid input";break;case Mo.too_big:n="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)"):"number"===e.type?"Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"bigint"===e.type?"BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"date"===e.type?"Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum))):"Invalid input";break;case Mo.custom:n="Invalid input";break;case Mo.invalid_intersection_types:n="Intersection results could not be merged";break;case Mo.not_multiple_of:n="Number must be a multiple of ".concat(e.multipleOf);break;case Mo.not_finite:n="Number must be finite";break;default:n=t.defaultError,Oo.assertNever(e)}return{message:n}},$o=Lo;function qo(){return $o}var Uo=function(e){var t=e.data,n=e.path,r=e.errorMaps,u=e.issueData,a=[].concat(ln(n),ln(u.path||[])),i=un(un({},u),{},{path:a});if(void 0!==u.message)return un(un({},u),{},{path:a,message:u.message});var o,s="",c=r.filter((function(e){return!!e})).slice().reverse(),l=Qt(c);try{for(l.s();!(o=l.n()).done;)s=(0,o.value)(i,{data:t,defaultError:s}).message}catch(e){l.e(e)}finally{l.f()}return un(un({},u),{},{path:a,message:s})};function Ho(e,t){var n=qo(),r=Uo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Lo?void 0:Lo].filter((function(e){return!!e}))});e.common.issues.push(r)}var Vo,Wo=function(){function e(){Wt(this,e),this.value="valid"}return Gt(e,[{key:"dirty",value:function(){"valid"===this.value&&(this.value="dirty")}},{key:"abort",value:function(){"aborted"!==this.value&&(this.value="aborted")}}],[{key:"mergeArray",value:function(e,t){var n,r=[],u=Qt(t);try{for(u.s();!(n=u.n()).done;){var a=n.value;if("aborted"===a.status)return Ko;"dirty"===a.status&&e.dirty(),r.push(a.value)}}catch(e){u.e(e)}finally{u.f()}return{status:e.value,value:r}}},{key:"mergeObjectAsync",value:(t=Ht(on().mark((function t(n,r){var u,a,i,o,s,c;return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:u=[],a=Qt(r),t.prev=2,a.s();case 4:if((i=a.n()).done){t.next=15;break}return o=i.value,t.next=8,o.key;case 8:return s=t.sent,t.next=11,o.value;case 11:c=t.sent,u.push({key:s,value:c});case 13:t.next=4;break;case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(2),a.e(t.t0);case 20:return t.prev=20,a.f(),t.finish(20);case 23:return t.abrupt("return",e.mergeObjectSync(n,u));case 24:case"end":return t.stop()}}),t,null,[[2,17,20,23]])}))),function(e,n){return t.apply(this,arguments)})},{key:"mergeObjectSync",value:function(e,t){var n,r={},u=Qt(t);try{for(u.s();!(n=u.n()).done;){var a=n.value,i=a.key,o=a.value;if("aborted"===i.status)return Ko;if("aborted"===o.status)return Ko;"dirty"===i.status&&e.dirty(),"dirty"===o.status&&e.dirty(),"__proto__"===i.value||void 0===o.value&&!a.alwaysSet||(r[i.value]=o.value)}}catch(e){u.e(e)}finally{u.f()}return{status:e.value,value:r}}}]);var t}(),Ko=Object.freeze({status:"aborted"}),Jo=function(e){return{status:"dirty",value:e}},Go=function(e){return{status:"valid",value:e}},Qo=function(e){return"aborted"===e.status},Yo=function(e){return"dirty"===e.status},Xo=function(e){return"valid"===e.status},es=function(e){return"undefined"!=typeof Promise&&e instanceof Promise};!function(e){e.errToObj=function(e){return"string"==typeof e?{message:e}:e||{}},e.toString=function(e){return"string"==typeof e?e:null==e?void 0:e.message}}(Vo||(Vo={}));var ts=Gt((function e(t,n,r,u){Wt(this,e),this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=u}),[{key:"path",get:function(){var e,t;return this._cachedPath.length||(Array.isArray(this._key)?(e=this._cachedPath).push.apply(e,ln(this._path).concat(ln(this._key))):(t=this._cachedPath).push.apply(t,ln(this._path).concat([this._key]))),this._cachedPath}}]),ns=function(e,t){if(Xo(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;var t=new Zo(e.common.issues);return this._error=t,this._error}}};function rs(e){if(!e)return{};var t=e.errorMap,n=e.invalid_type_error,r=e.required_error,u=e.description;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:u}:{errorMap:function(t,u){var a,i,o=e.message;return"invalid_enum_value"===t.code?{message:null!=o?o:u.defaultError}:void 0===u.data?{message:null!==(i=null!=o?o:r)&&void 0!==i?i:u.defaultError}:"invalid_type"!==t.code?{message:u.defaultError}:{message:null!==(a=null!=o?o:n)&&void 0!==a?a:u.defaultError}},description:u}}var us,as=function(){return Gt((function e(t){var n=this;Wt(this,e),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:function(e){return n["~validate"](e)}}}),[{key:"description",get:function(){return this._def.description}},{key:"_getType",value:function(e){return Ro(e.data)}},{key:"_getOrReturnCtx",value:function(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Ro(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}},{key:"_processInputParams",value:function(e){return{status:new Wo,ctx:{common:e.parent.common,data:e.data,parsedType:Ro(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}},{key:"_parseSync",value:function(e){var t=this._parse(e);if(es(t))throw new Error("Synchronous parse encountered promise.");return t}},{key:"_parseAsync",value:function(e){var t=this._parse(e);return Promise.resolve(t)}},{key:"parse",value:function(e,t){var n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}},{key:"safeParse",value:function(e,t){var n,r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ro(e)},u=this._parseSync({data:e,path:r.path,parent:r});return ns(r,u)}},{key:"~validate",value:function(e){var t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ro(e)};if(!this["~standard"].async)try{var n=this._parseSync({data:e,path:[],parent:t});return Xo(n)?{value:n.value}:{issues:t.common.issues}}catch(e){var r;null!=e&&null!==(r=e.message)&&void 0!==r&&null!==(r=r.toLowerCase())&&void 0!==r&&r.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((function(e){return Xo(e)?{value:e.value}:{issues:t.common.issues}}))}},{key:"parseAsync",value:(e=Ht(on().mark((function e(t,n){var r;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.safeParseAsync(t,n);case 2:if(!(r=e.sent).success){e.next=5;break}return e.abrupt("return",r.data);case 5:throw r.error;case 6:case"end":return e.stop()}}),e,this)}))),function(t,n){return e.apply(this,arguments)})},{key:"safeParseAsync",value:function(){var e=Ht(on().mark((function e(t,n){var r,u,a;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={common:{issues:[],contextualErrorMap:null==n?void 0:n.errorMap,async:!0},path:(null==n?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ro(t)},u=this._parse({data:t,path:r.path,parent:r}),e.next=4,es(u)?u:Promise.resolve(u);case 4:return a=e.sent,e.abrupt("return",ns(r,a));case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"refine",value:function(e,t){return this._refinement((function(n,r){var u=e(n),a=function(){return r.addIssue(un({code:Mo.custom},function(e){return"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t}(n)))};return"undefined"!=typeof Promise&&u instanceof Promise?u.then((function(e){return!!e||(a(),!1)})):!!u||(a(),!1)}))}},{key:"refinement",value:function(e,t){return this._refinement((function(n,r){return!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)}))}},{key:"_refinement",value:function(e){return new uc({schema:this,typeName:lc.ZodEffects,effect:{type:"refinement",refinement:e}})}},{key:"superRefine",value:function(e){return this._refinement(e)}},{key:"optional",value:function(){return ac.create(this,this._def)}},{key:"nullable",value:function(){return ic.create(this,this._def)}},{key:"nullish",value:function(){return this.nullable().optional()}},{key:"array",value:function(){return Ms.create(this)}},{key:"promise",value:function(){return rc.create(this,this._def)}},{key:"or",value:function(e){return $s.create([this,e],this._def)}},{key:"and",value:function(e){return Vs.create(this,e,this._def)}},{key:"transform",value:function(e){return new uc(un(un({},rs(this._def)),{},{schema:this,typeName:lc.ZodEffects,effect:{type:"transform",transform:e}}))}},{key:"default",value:function(e){var t="function"==typeof e?e:function(){return e};return new oc(un(un({},rs(this._def)),{},{innerType:this,defaultValue:t,typeName:lc.ZodDefault}))}},{key:"brand",value:function(){return new fc(un({typeName:lc.ZodBranded,type:this},rs(this._def)))}},{key:"catch",value:function(e){var t="function"==typeof e?e:function(){return e};return new sc(un(un({},rs(this._def)),{},{innerType:this,catchValue:t,typeName:lc.ZodCatch}))}},{key:"describe",value:function(e){return new this.constructor(un(un({},this._def),{},{description:e}))}},{key:"pipe",value:function(e){return dc.create(this,e)}},{key:"readonly",value:function(){return pc.create(this)}},{key:"isOptional",value:function(){return this.safeParse(void 0).success}},{key:"isNullable",value:function(){return this.safeParse(null).success}}]);var e}(),is=/^c[^\s-]{8,}$/i,os=/^[0-9a-z]+$/,ss=/^[0-9A-HJKMNP-TV-Z]{26}$/i,cs=/^[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,ls=/^[a-z0-9_-]{21}$/i,fs=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ds=/^[-+]?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)?)??$/,ps=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,hs=/^(?:(?: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])$/,vs=/^(?:(?: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])$/,ms=/^(([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]))$/,Ds=/^(([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])$/,ys=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,gs=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Fs="((\\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])))",Es=new RegExp("^".concat(Fs,"$"));function _s(e){var t="[0-5]\\d";e.precision?t="".concat(t,"\\.\\d{").concat(e.precision,"}"):null==e.precision&&(t="".concat(t,"(\\.\\d+)?"));var n=e.precision?"+":"?";return"([01]\\d|2[0-3]):[0-5]\\d(:".concat(t,")").concat(n)}function bs(e){var t="".concat(Fs,"T").concat(_s(e)),n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t="".concat(t,"(").concat(n.join("|"),")"),new RegExp("^".concat(t,"$"))}function ks(e,t){return!("v4"!==t&&t||!hs.test(e))||!("v6"!==t&&t||!ms.test(e))}function Cs(e,t){if(!fs.test(e))return!1;try{var n=cn(e.split("."),1)[0],r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),u=JSON.parse(atob(r));return!("object"!==dn(u)||null===u||"typ"in u&&"JWT"!==(null==u?void 0:u.typ)||!u.alg||t&&u.alg!==t)}catch(e){return!1}}function As(e,t){return!("v4"!==t&&t||!vs.test(e))||!("v6"!==t&&t||!Ds.test(e))}var ws=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==zo.string){var t=this._getOrReturnCtx(e);return Ho(t,{code:Mo.invalid_type,expected:zo.string,received:t.parsedType}),Ko}var n,r=new Wo,u=void 0,a=Qt(this._def.checks);try{for(a.s();!(n=a.n()).done;){var i=n.value;if("min"===i.kind)e.data.length<i.value&&(Ho(u=this._getOrReturnCtx(e,u),{code:Mo.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if("max"===i.kind)e.data.length>i.value&&(Ho(u=this._getOrReturnCtx(e,u),{code:Mo.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if("length"===i.kind){var o=e.data.length>i.value,s=e.data.length<i.value;(o||s)&&(u=this._getOrReturnCtx(e,u),o?Ho(u,{code:Mo.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&Ho(u,{code:Mo.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if("email"===i.kind)ps.test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"email",code:Mo.invalid_string,message:i.message}),r.dirty());else if("emoji"===i.kind)us||(us=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),us.test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"emoji",code:Mo.invalid_string,message:i.message}),r.dirty());else if("uuid"===i.kind)cs.test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"uuid",code:Mo.invalid_string,message:i.message}),r.dirty());else if("nanoid"===i.kind)ls.test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"nanoid",code:Mo.invalid_string,message:i.message}),r.dirty());else if("cuid"===i.kind)is.test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"cuid",code:Mo.invalid_string,message:i.message}),r.dirty());else if("cuid2"===i.kind)os.test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"cuid2",code:Mo.invalid_string,message:i.message}),r.dirty());else if("ulid"===i.kind)ss.test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"ulid",code:Mo.invalid_string,message:i.message}),r.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(t){Ho(u=this._getOrReturnCtx(e,u),{validation:"url",code:Mo.invalid_string,message:i.message}),r.dirty()}else"regex"===i.kind?(i.regex.lastIndex=0,i.regex.test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"regex",code:Mo.invalid_string,message:i.message}),r.dirty())):"trim"===i.kind?e.data=e.data.trim():"includes"===i.kind?e.data.includes(i.value,i.position)||(Ho(u=this._getOrReturnCtx(e,u),{code:Mo.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):"toLowerCase"===i.kind?e.data=e.data.toLowerCase():"toUpperCase"===i.kind?e.data=e.data.toUpperCase():"startsWith"===i.kind?e.data.startsWith(i.value)||(Ho(u=this._getOrReturnCtx(e,u),{code:Mo.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):"endsWith"===i.kind?e.data.endsWith(i.value)||(Ho(u=this._getOrReturnCtx(e,u),{code:Mo.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):"datetime"===i.kind?bs(i).test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{code:Mo.invalid_string,validation:"datetime",message:i.message}),r.dirty()):"date"===i.kind?Es.test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{code:Mo.invalid_string,validation:"date",message:i.message}),r.dirty()):"time"===i.kind?new RegExp("^".concat(_s(i),"$")).test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{code:Mo.invalid_string,validation:"time",message:i.message}),r.dirty()):"duration"===i.kind?ds.test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"duration",code:Mo.invalid_string,message:i.message}),r.dirty()):"ip"===i.kind?ks(e.data,i.version)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"ip",code:Mo.invalid_string,message:i.message}),r.dirty()):"jwt"===i.kind?Cs(e.data,i.alg)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"jwt",code:Mo.invalid_string,message:i.message}),r.dirty()):"cidr"===i.kind?As(e.data,i.version)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"cidr",code:Mo.invalid_string,message:i.message}),r.dirty()):"base64"===i.kind?ys.test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"base64",code:Mo.invalid_string,message:i.message}),r.dirty()):"base64url"===i.kind?gs.test(e.data)||(Ho(u=this._getOrReturnCtx(e,u),{validation:"base64url",code:Mo.invalid_string,message:i.message}),r.dirty()):Oo.assertNever(i)}}catch(e){a.e(e)}finally{a.f()}return{status:r.value,value:e.data}}},{key:"_regex",value:function(e,t,n){return this.refinement((function(t){return e.test(t)}),un({validation:t,code:Mo.invalid_string},Vo.errToObj(n)))}},{key:"_addCheck",value:function(t){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[t])}))}},{key:"email",value:function(e){return this._addCheck(un({kind:"email"},Vo.errToObj(e)))}},{key:"url",value:function(e){return this._addCheck(un({kind:"url"},Vo.errToObj(e)))}},{key:"emoji",value:function(e){return this._addCheck(un({kind:"emoji"},Vo.errToObj(e)))}},{key:"uuid",value:function(e){return this._addCheck(un({kind:"uuid"},Vo.errToObj(e)))}},{key:"nanoid",value:function(e){return this._addCheck(un({kind:"nanoid"},Vo.errToObj(e)))}},{key:"cuid",value:function(e){return this._addCheck(un({kind:"cuid"},Vo.errToObj(e)))}},{key:"cuid2",value:function(e){return this._addCheck(un({kind:"cuid2"},Vo.errToObj(e)))}},{key:"ulid",value:function(e){return this._addCheck(un({kind:"ulid"},Vo.errToObj(e)))}},{key:"base64",value:function(e){return this._addCheck(un({kind:"base64"},Vo.errToObj(e)))}},{key:"base64url",value:function(e){return this._addCheck(un({kind:"base64url"},Vo.errToObj(e)))}},{key:"jwt",value:function(e){return this._addCheck(un({kind:"jwt"},Vo.errToObj(e)))}},{key:"ip",value:function(e){return this._addCheck(un({kind:"ip"},Vo.errToObj(e)))}},{key:"cidr",value:function(e){return this._addCheck(un({kind:"cidr"},Vo.errToObj(e)))}},{key:"datetime",value:function(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck(un({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n},Vo.errToObj(null==e?void 0:e.message)))}},{key:"date",value:function(e){return this._addCheck({kind:"date",message:e})}},{key:"time",value:function(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck(un({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision},Vo.errToObj(null==e?void 0:e.message)))}},{key:"duration",value:function(e){return this._addCheck(un({kind:"duration"},Vo.errToObj(e)))}},{key:"regex",value:function(e,t){return this._addCheck(un({kind:"regex",regex:e},Vo.errToObj(t)))}},{key:"includes",value:function(e,t){return this._addCheck(un({kind:"includes",value:e,position:null==t?void 0:t.position},Vo.errToObj(null==t?void 0:t.message)))}},{key:"startsWith",value:function(e,t){return this._addCheck(un({kind:"startsWith",value:e},Vo.errToObj(t)))}},{key:"endsWith",value:function(e,t){return this._addCheck(un({kind:"endsWith",value:e},Vo.errToObj(t)))}},{key:"min",value:function(e,t){return this._addCheck(un({kind:"min",value:e},Vo.errToObj(t)))}},{key:"max",value:function(e,t){return this._addCheck(un({kind:"max",value:e},Vo.errToObj(t)))}},{key:"length",value:function(e,t){return this._addCheck(un({kind:"length",value:e},Vo.errToObj(t)))}},{key:"nonempty",value:function(e){return this.min(1,Vo.errToObj(e))}},{key:"trim",value:function(){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[{kind:"trim"}])}))}},{key:"toLowerCase",value:function(){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[{kind:"toLowerCase"}])}))}},{key:"toUpperCase",value:function(){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[{kind:"toUpperCase"}])}))}},{key:"isDatetime",get:function(){return!!this._def.checks.find((function(e){return"datetime"===e.kind}))}},{key:"isDate",get:function(){return!!this._def.checks.find((function(e){return"date"===e.kind}))}},{key:"isTime",get:function(){return!!this._def.checks.find((function(e){return"time"===e.kind}))}},{key:"isDuration",get:function(){return!!this._def.checks.find((function(e){return"duration"===e.kind}))}},{key:"isEmail",get:function(){return!!this._def.checks.find((function(e){return"email"===e.kind}))}},{key:"isURL",get:function(){return!!this._def.checks.find((function(e){return"url"===e.kind}))}},{key:"isEmoji",get:function(){return!!this._def.checks.find((function(e){return"emoji"===e.kind}))}},{key:"isUUID",get:function(){return!!this._def.checks.find((function(e){return"uuid"===e.kind}))}},{key:"isNANOID",get:function(){return!!this._def.checks.find((function(e){return"nanoid"===e.kind}))}},{key:"isCUID",get:function(){return!!this._def.checks.find((function(e){return"cuid"===e.kind}))}},{key:"isCUID2",get:function(){return!!this._def.checks.find((function(e){return"cuid2"===e.kind}))}},{key:"isULID",get:function(){return!!this._def.checks.find((function(e){return"ulid"===e.kind}))}},{key:"isIP",get:function(){return!!this._def.checks.find((function(e){return"ip"===e.kind}))}},{key:"isCIDR",get:function(){return!!this._def.checks.find((function(e){return"cidr"===e.kind}))}},{key:"isBase64",get:function(){return!!this._def.checks.find((function(e){return"base64"===e.kind}))}},{key:"isBase64url",get:function(){return!!this._def.checks.find((function(e){return"base64url"===e.kind}))}},{key:"minLength",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"maxLength",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.value<t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}}])}();ws.create=function(e){var t;return new ws(un({checks:[],typeName:lc.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},rs(e)))};var xs=function(){function e(){var t;return Wt(this,e),(t=Vt(this,e,arguments)).min=t.gte,t.max=t.lte,t.step=t.multipleOf,t}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==zo.number){var t=this._getOrReturnCtx(e);return Ho(t,{code:Mo.invalid_type,expected:zo.number,received:t.parsedType}),Ko}var n,r,u,a,i,o,s=void 0,c=new Wo,l=Qt(this._def.checks);try{for(l.s();!(n=l.n()).done;){var f=n.value;"int"===f.kind?Oo.isInteger(e.data)||(Ho(s=this._getOrReturnCtx(e,s),{code:Mo.invalid_type,expected:"integer",received:"float",message:f.message}),c.dirty()):"min"===f.kind?(f.inclusive?e.data<f.value:e.data<=f.value)&&(Ho(s=this._getOrReturnCtx(e,s),{code:Mo.too_small,minimum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),c.dirty()):"max"===f.kind?(f.inclusive?e.data>f.value:e.data>=f.value)&&(Ho(s=this._getOrReturnCtx(e,s),{code:Mo.too_big,maximum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),c.dirty()):"multipleOf"===f.kind?0!=(r=e.data,u=f.value,void 0,void 0,void 0,o=(a=(r.toString().split(".")[1]||"").length)>(i=(u.toString().split(".")[1]||"").length)?a:i,Number.parseInt(r.toFixed(o).replace(".",""))%Number.parseInt(u.toFixed(o).replace(".",""))/Math.pow(10,o))&&(Ho(s=this._getOrReturnCtx(e,s),{code:Mo.not_multiple_of,multipleOf:f.value,message:f.message}),c.dirty()):"finite"===f.kind?Number.isFinite(e.data)||(Ho(s=this._getOrReturnCtx(e,s),{code:Mo.not_finite,message:f.message}),c.dirty()):Oo.assertNever(f)}}catch(e){l.e(e)}finally{l.f()}return{status:c.value,value:e.data}}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,Vo.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,Vo.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,Vo.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,Vo.toString(t))}},{key:"setLimit",value:function(t,n,r,u){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[{kind:t,value:n,inclusive:r,message:Vo.toString(u)}])}))}},{key:"_addCheck",value:function(t){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[t])}))}},{key:"int",value:function(e){return this._addCheck({kind:"int",message:Vo.toString(e)})}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Vo.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Vo.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Vo.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Vo.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Vo.toString(t)})}},{key:"finite",value:function(e){return this._addCheck({kind:"finite",message:Vo.toString(e)})}},{key:"safe",value:function(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Vo.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Vo.toString(e)})}},{key:"minValue",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"maxValue",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.value<t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"isInt",get:function(){return!!this._def.checks.find((function(e){return"int"===e.kind||"multipleOf"===e.kind&&Oo.isInteger(e.value)}))}},{key:"isFinite",get:function(){var e,t=null,n=null,r=Qt(this._def.checks);try{for(r.s();!(e=r.n()).done;){var u=e.value;if("finite"===u.kind||"int"===u.kind||"multipleOf"===u.kind)return!0;"min"===u.kind?(null===n||u.value>n)&&(n=u.value):"max"===u.kind&&(null===t||u.value<t)&&(t=u.value)}}catch(e){r.e(e)}finally{r.f()}return Number.isFinite(n)&&Number.isFinite(t)}}])}();xs.create=function(e){return new xs(un({checks:[],typeName:lc.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1},rs(e)))};var Ss=function(){function e(){var t;return Wt(this,e),(t=Vt(this,e,arguments)).min=t.gte,t.max=t.lte,t}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==zo.bigint)return this._getInvalidInput(e);var t,n=void 0,r=new Wo,u=Qt(this._def.checks);try{for(u.s();!(t=u.n()).done;){var a=t.value;"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(Ho(n=this._getOrReturnCtx(e,n),{code:Mo.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(Ho(n=this._getOrReturnCtx(e,n),{code:Mo.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):"multipleOf"===a.kind?e.data%a.value!==BigInt(0)&&(Ho(n=this._getOrReturnCtx(e,n),{code:Mo.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):Oo.assertNever(a)}}catch(e){u.e(e)}finally{u.f()}return{status:r.value,value:e.data}}},{key:"_getInvalidInput",value:function(e){var t=this._getOrReturnCtx(e);return Ho(t,{code:Mo.invalid_type,expected:zo.bigint,received:t.parsedType}),Ko}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,Vo.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,Vo.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,Vo.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,Vo.toString(t))}},{key:"setLimit",value:function(t,n,r,u){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[{kind:t,value:n,inclusive:r,message:Vo.toString(u)}])}))}},{key:"_addCheck",value:function(t){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[t])}))}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Vo.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Vo.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Vo.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Vo.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Vo.toString(t)})}},{key:"minValue",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"maxValue",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.value<t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}}])}();Ss.create=function(e){var t;return new Ss(un({checks:[],typeName:lc.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},rs(e)))};var Bs=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==zo.boolean){var t=this._getOrReturnCtx(e);return Ho(t,{code:Mo.invalid_type,expected:zo.boolean,received:t.parsedType}),Ko}return Go(e.data)}}])}();Bs.create=function(e){return new Bs(un({typeName:lc.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1},rs(e)))};var Os=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==zo.date){var t=this._getOrReturnCtx(e);return Ho(t,{code:Mo.invalid_type,expected:zo.date,received:t.parsedType}),Ko}if(Number.isNaN(e.data.getTime()))return Ho(this._getOrReturnCtx(e),{code:Mo.invalid_date}),Ko;var n,r=new Wo,u=void 0,a=Qt(this._def.checks);try{for(a.s();!(n=a.n()).done;){var i=n.value;"min"===i.kind?e.data.getTime()<i.value&&(Ho(u=this._getOrReturnCtx(e,u),{code:Mo.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(Ho(u=this._getOrReturnCtx(e,u),{code:Mo.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Oo.assertNever(i)}}catch(e){a.e(e)}finally{a.f()}return{status:r.value,value:new Date(e.data.getTime())}}},{key:"_addCheck",value:function(t){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[t])}))}},{key:"min",value:function(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Vo.toString(t)})}},{key:"max",value:function(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Vo.toString(t)})}},{key:"minDate",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return null!=t?new Date(t):null}},{key:"maxDate",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.value<t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return null!=t?new Date(t):null}}])}();Os.create=function(e){return new Os(un({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:lc.ZodDate},rs(e)))};var Is=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){if(this._getType(e)!==zo.symbol){var t=this._getOrReturnCtx(e);return Ho(t,{code:Mo.invalid_type,expected:zo.symbol,received:t.parsedType}),Ko}return Go(e.data)}}])}();Is.create=function(e){return new Is(un({typeName:lc.ZodSymbol},rs(e)))};var Ts=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){if(this._getType(e)!==zo.undefined){var t=this._getOrReturnCtx(e);return Ho(t,{code:Mo.invalid_type,expected:zo.undefined,received:t.parsedType}),Ko}return Go(e.data)}}])}();Ts.create=function(e){return new Ts(un({typeName:lc.ZodUndefined},rs(e)))};var Ps=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){if(this._getType(e)!==zo.null){var t=this._getOrReturnCtx(e);return Ho(t,{code:Mo.invalid_type,expected:zo.null,received:t.parsedType}),Ko}return Go(e.data)}}])}();Ps.create=function(e){return new Ps(un({typeName:lc.ZodNull},rs(e)))};var js=function(){function e(){var t;return Wt(this,e),(t=Vt(this,e,arguments))._any=!0,t}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){return Go(e.data)}}])}();js.create=function(e){return new js(un({typeName:lc.ZodAny},rs(e)))};var Ns=function(){function e(){var t;return Wt(this,e),(t=Vt(this,e,arguments))._unknown=!0,t}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){return Go(e.data)}}])}();Ns.create=function(e){return new Ns(un({typeName:lc.ZodUnknown},rs(e)))};var zs=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=this._getOrReturnCtx(e);return Ho(t,{code:Mo.invalid_type,expected:zo.never,received:t.parsedType}),Ko}}])}();zs.create=function(e){return new zs(un({typeName:lc.ZodNever},rs(e)))};var Rs=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){if(this._getType(e)!==zo.undefined){var t=this._getOrReturnCtx(e);return Ho(t,{code:Mo.invalid_type,expected:zo.void,received:t.parsedType}),Ko}return Go(e.data)}}])}();Rs.create=function(e){return new Rs(un({typeName:lc.ZodVoid},rs(e)))};var Ms=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.ctx,r=t.status,u=this._def;if(n.parsedType!==zo.array)return Ho(n,{code:Mo.invalid_type,expected:zo.array,received:n.parsedType}),Ko;if(null!==u.exactLength){var a=n.data.length>u.exactLength.value,i=n.data.length<u.exactLength.value;(a||i)&&(Ho(n,{code:a?Mo.too_big:Mo.too_small,minimum:i?u.exactLength.value:void 0,maximum:a?u.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:u.exactLength.message}),r.dirty())}if(null!==u.minLength&&n.data.length<u.minLength.value&&(Ho(n,{code:Mo.too_small,minimum:u.minLength.value,type:"array",inclusive:!0,exact:!1,message:u.minLength.message}),r.dirty()),null!==u.maxLength&&n.data.length>u.maxLength.value&&(Ho(n,{code:Mo.too_big,maximum:u.maxLength.value,type:"array",inclusive:!0,exact:!1,message:u.maxLength.message}),r.dirty()),n.common.async)return Promise.all(ln(n.data).map((function(e,t){return u.type._parseAsync(new ts(n,e,n.path,t))}))).then((function(e){return Wo.mergeArray(r,e)}));var o=ln(n.data).map((function(e,t){return u.type._parseSync(new ts(n,e,n.path,t))}));return Wo.mergeArray(r,o)}},{key:"element",get:function(){return this._def.type}},{key:"min",value:function(t,n){return new e(un(un({},this._def),{},{minLength:{value:t,message:Vo.toString(n)}}))}},{key:"max",value:function(t,n){return new e(un(un({},this._def),{},{maxLength:{value:t,message:Vo.toString(n)}}))}},{key:"length",value:function(t,n){return new e(un(un({},this._def),{},{exactLength:{value:t,message:Vo.toString(n)}}))}},{key:"nonempty",value:function(e){return this.min(1,e)}}])}();function Zs(e){if(e instanceof Ls){var t={};for(var n in e.shape){var r=e.shape[n];t[n]=ac.create(Zs(r))}return new Ls(un(un({},e._def),{},{shape:function(){return t}}))}return e instanceof Ms?new Ms(un(un({},e._def),{},{type:Zs(e.element)})):e instanceof ac?ac.create(Zs(e.unwrap())):e instanceof ic?ic.create(Zs(e.unwrap())):e instanceof Ws?Ws.create(e.items.map((function(e){return Zs(e)}))):e}Ms.create=function(e,t){return new Ms(un({type:e,minLength:null,maxLength:null,exactLength:null,typeName:lc.ZodArray},rs(t)))};var Ls=function(){function e(){var t;return Wt(this,e),(t=Vt(this,e,arguments))._cached=null,t.nonstrict=t.passthrough,t.augment=t.extend,t}return tn(e,as),Gt(e,[{key:"_getCached",value:function(){if(null!==this._cached)return this._cached;var e=this._def.shape(),t=Oo.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}},{key:"_parse",value:function(e){if(this._getType(e)!==zo.object){var t=this._getOrReturnCtx(e);return Ho(t,{code:Mo.invalid_type,expected:zo.object,received:t.parsedType}),Ko}var n=this._processInputParams(e),r=n.status,u=n.ctx,a=this._getCached(),i=a.shape,o=a.keys,s=[];if(!(this._def.catchall instanceof zs&&"strip"===this._def.unknownKeys))for(var c in u.data)o.includes(c)||s.push(c);var l,f=[],d=Qt(o);try{for(d.s();!(l=d.n()).done;){var p=l.value,h=i[p],v=u.data[p];f.push({key:{status:"valid",value:p},value:h._parse(new ts(u,v,u.path,p)),alwaysSet:p in u.data})}}catch(e){d.e(e)}finally{d.f()}if(this._def.catchall instanceof zs){var m=this._def.unknownKeys;if("passthrough"===m){var D,y=Qt(s);try{for(y.s();!(D=y.n()).done;){var g=D.value;f.push({key:{status:"valid",value:g},value:{status:"valid",value:u.data[g]}})}}catch(e){y.e(e)}finally{y.f()}}else if("strict"===m)s.length>0&&(Ho(u,{code:Mo.unrecognized_keys,keys:s}),r.dirty());else if("strip"!==m)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{var F,E=this._def.catchall,_=Qt(s);try{for(_.s();!(F=_.n()).done;){var b=F.value,k=u.data[b];f.push({key:{status:"valid",value:b},value:E._parse(new ts(u,k,u.path,b)),alwaysSet:b in u.data})}}catch(e){_.e(e)}finally{_.f()}}return u.common.async?Promise.resolve().then(Ht(on().mark((function e(){var t,n,r,u,a,i;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],n=Qt(f),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=15;break}return u=r.value,e.next=8,u.key;case 8:return a=e.sent,e.next=11,u.value;case 11:i=e.sent,t.push({key:a,value:i,alwaysSet:u.alwaysSet});case 13:e.next=4;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(2),n.e(e.t0);case 20:return e.prev=20,n.f(),e.finish(20);case 23:return e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,null,[[2,17,20,23]])})))).then((function(e){return Wo.mergeObjectSync(r,e)})):Wo.mergeObjectSync(r,f)}},{key:"shape",get:function(){return this._def.shape()}},{key:"strict",value:function(t){var n=this;return Vo.errToObj,new e(un(un({},this._def),{},{unknownKeys:"strict"},void 0!==t?{errorMap:function(e,r){var u,a,i,o,s=null!==(u=null===(a=(i=n._def).errorMap)||void 0===a?void 0:a.call(i,e,r).message)&&void 0!==u?u:r.defaultError;return"unrecognized_keys"===e.code?{message:null!==(o=Vo.errToObj(t).message)&&void 0!==o?o:s}:{message:s}}}:{}))}},{key:"strip",value:function(){return new e(un(un({},this._def),{},{unknownKeys:"strip"}))}},{key:"passthrough",value:function(){return new e(un(un({},this._def),{},{unknownKeys:"passthrough"}))}},{key:"extend",value:function(t){var n=this;return new e(un(un({},this._def),{},{shape:function(){return un(un({},n._def.shape()),t)}}))}},{key:"merge",value:function(t){var n=this;return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:function(){return un(un({},n._def.shape()),t._def.shape())},typeName:lc.ZodObject})}},{key:"setKey",value:function(e,t){return this.augment(Yt({},e,t))}},{key:"catchall",value:function(t){return new e(un(un({},this._def),{},{catchall:t}))}},{key:"pick",value:function(t){var n,r={},u=Qt(Oo.objectKeys(t));try{for(u.s();!(n=u.n()).done;){var a=n.value;t[a]&&this.shape[a]&&(r[a]=this.shape[a])}}catch(e){u.e(e)}finally{u.f()}return new e(un(un({},this._def),{},{shape:function(){return r}}))}},{key:"omit",value:function(t){var n,r={},u=Qt(Oo.objectKeys(this.shape));try{for(u.s();!(n=u.n()).done;){var a=n.value;t[a]||(r[a]=this.shape[a])}}catch(e){u.e(e)}finally{u.f()}return new e(un(un({},this._def),{},{shape:function(){return r}}))}},{key:"deepPartial",value:function(){return Zs(this)}},{key:"partial",value:function(t){var n,r={},u=Qt(Oo.objectKeys(this.shape));try{for(u.s();!(n=u.n()).done;){var a=n.value,i=this.shape[a];t&&!t[a]?r[a]=i:r[a]=i.optional()}}catch(e){u.e(e)}finally{u.f()}return new e(un(un({},this._def),{},{shape:function(){return r}}))}},{key:"required",value:function(t){var n,r={},u=Qt(Oo.objectKeys(this.shape));try{for(u.s();!(n=u.n()).done;){var a=n.value;if(t&&!t[a])r[a]=this.shape[a];else{for(var i=this.shape[a];i instanceof ac;)i=i._def.innerType;r[a]=i}}}catch(e){u.e(e)}finally{u.f()}return new e(un(un({},this._def),{},{shape:function(){return r}}))}},{key:"keyof",value:function(){return ec(Oo.objectKeys(this.shape))}}])}();Ls.create=function(e,t){return new Ls(un({shape:function(){return e},unknownKeys:"strip",catchall:zs.create(),typeName:lc.ZodObject},rs(t)))},Ls.strictCreate=function(e,t){return new Ls(un({shape:function(){return e},unknownKeys:"strict",catchall:zs.create(),typeName:lc.ZodObject},rs(t)))},Ls.lazycreate=function(e,t){return new Ls(un({shape:e,unknownKeys:"strip",catchall:zs.create(),typeName:lc.ZodObject},rs(t)))};var $s=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=this._def.options;if(t.common.async)return Promise.all(n.map(function(){var e=Ht(on().mark((function e(n){var r;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=un(un({},t),{},{common:un(un({},t.common),{},{issues:[]}),parent:null}),e.next=3,n._parseAsync({data:t.data,path:t.path,parent:r});case 3:return e.t0=e.sent,e.t1=r,e.abrupt("return",{result:e.t0,ctx:e.t1});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then((function(e){var n,r=Qt(e);try{for(r.s();!(n=r.n()).done;){var u=n.value;if("valid"===u.result.status)return u.result}}catch(e){r.e(e)}finally{r.f()}var a,i=Qt(e);try{for(i.s();!(a=i.n()).done;){var o,s=a.value;if("dirty"===s.result.status)return(o=t.common.issues).push.apply(o,ln(s.ctx.common.issues)),s.result}}catch(e){i.e(e)}finally{i.f()}var c=e.map((function(e){return new Zo(e.ctx.common.issues)}));return Ho(t,{code:Mo.invalid_union,unionErrors:c}),Ko}));var r,u,a=void 0,i=[],o=Qt(n);try{for(o.s();!(r=o.n()).done;){var s=r.value,c=un(un({},t),{},{common:un(un({},t.common),{},{issues:[]}),parent:null}),l=s._parseSync({data:t.data,path:t.path,parent:c});if("valid"===l.status)return l;"dirty"!==l.status||a||(a={result:l,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}}catch(e){o.e(e)}finally{o.f()}if(a)return(u=t.common.issues).push.apply(u,ln(a.ctx.common.issues)),a.result;var f=i.map((function(e){return new Zo(e)}));return Ho(t,{code:Mo.invalid_union,unionErrors:f}),Ko}},{key:"options",get:function(){return this._def.options}}])}();$s.create=function(e,t){return new $s(un({options:e,typeName:lc.ZodUnion},rs(t)))};var qs=function(e){return e instanceof Ys?qs(e.schema):e instanceof uc?qs(e.innerType()):e instanceof Xs?[e.value]:e instanceof tc?e.options:e instanceof nc?Oo.objectValues(e.enum):e instanceof oc?qs(e._def.innerType):e instanceof Ts?[void 0]:e instanceof Ps?[null]:e instanceof ac?[void 0].concat(ln(qs(e.unwrap()))):e instanceof ic?[null].concat(ln(qs(e.unwrap()))):e instanceof fc||e instanceof pc?qs(e.unwrap()):e instanceof sc?qs(e._def.innerType):[]},Us=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==zo.object)return Ho(t,{code:Mo.invalid_type,expected:zo.object,received:t.parsedType}),Ko;var n=this.discriminator,r=t.data[n],u=this.optionsMap.get(r);return u?t.common.async?u._parseAsync({data:t.data,path:t.path,parent:t}):u._parseSync({data:t.data,path:t.path,parent:t}):(Ho(t,{code:Mo.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ko)}},{key:"discriminator",get:function(){return this._def.discriminator}},{key:"options",get:function(){return this._def.options}},{key:"optionsMap",get:function(){return this._def.optionsMap}}],[{key:"create",value:function(t,n,r){var u,a=new Map,i=Qt(n);try{for(i.s();!(u=i.n()).done;){var o=u.value,s=qs(o.shape[t]);if(!s.length)throw new Error("A discriminator value for key `".concat(t,"` could not be extracted from all schema options"));var c,l=Qt(s);try{for(l.s();!(c=l.n()).done;){var f=c.value;if(a.has(f))throw new Error("Discriminator property ".concat(String(t)," has duplicate value ").concat(String(f)));a.set(f,o)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}return new e(un({typeName:lc.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a},rs(r)))}}])}();function Hs(e,t){var n=Ro(e),r=Ro(t);if(e===t)return{valid:!0,data:e};if(n===zo.object&&r===zo.object){var u,a=Oo.objectKeys(t),i=Oo.objectKeys(e).filter((function(e){return-1!==a.indexOf(e)})),o=un(un({},e),t),s=Qt(i);try{for(s.s();!(u=s.n()).done;){var c=u.value,l=Hs(e[c],t[c]);if(!l.valid)return{valid:!1};o[c]=l.data}}catch(e){s.e(e)}finally{s.f()}return{valid:!0,data:o}}if(n===zo.array&&r===zo.array){if(e.length!==t.length)return{valid:!1};for(var f=[],d=0;d<e.length;d++){var p=Hs(e[d],t[d]);if(!p.valid)return{valid:!1};f.push(p.data)}return{valid:!0,data:f}}return n===zo.date&&r===zo.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Vs=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx,u=function(e,t){if(Qo(e)||Qo(t))return Ko;var u=Hs(e.value,t.value);return u.valid?((Yo(e)||Yo(t))&&n.dirty(),{status:n.value,value:u.data}):(Ho(r,{code:Mo.invalid_intersection_types}),Ko)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((function(e){var t=cn(e,2),n=t[0],r=t[1];return u(n,r)})):u(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}])}();Vs.create=function(e,t,n){return new Vs(un({left:e,right:t,typeName:lc.ZodIntersection},rs(n)))};var Ws=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e),r=n.status,u=n.ctx;if(u.parsedType!==zo.array)return Ho(u,{code:Mo.invalid_type,expected:zo.array,received:u.parsedType}),Ko;if(u.data.length<this._def.items.length)return Ho(u,{code:Mo.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ko;!this._def.rest&&u.data.length>this._def.items.length&&(Ho(u,{code:Mo.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());var a=ln(u.data).map((function(e,n){var r=t._def.items[n]||t._def.rest;return r?r._parse(new ts(u,e,u.path,n)):null})).filter((function(e){return!!e}));return u.common.async?Promise.all(a).then((function(e){return Wo.mergeArray(r,e)})):Wo.mergeArray(r,a)}},{key:"items",get:function(){return this._def.items}},{key:"rest",value:function(t){return new e(un(un({},this._def),{},{rest:t}))}}])}();Ws.create=function(e,t){if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ws(un({items:e,typeName:lc.ZodTuple,rest:null},rs(t)))};var Ks=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==zo.object)return Ho(r,{code:Mo.invalid_type,expected:zo.object,received:r.parsedType}),Ko;var u=[],a=this._def.keyType,i=this._def.valueType;for(var o in r.data)u.push({key:a._parse(new ts(r,o,r.path,o)),value:i._parse(new ts(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?Wo.mergeObjectAsync(n,u):Wo.mergeObjectSync(n,u)}},{key:"element",get:function(){return this._def.valueType}}],[{key:"create",value:function(t,n,r){return new e(n instanceof as?un({keyType:t,valueType:n,typeName:lc.ZodRecord},rs(r)):un({keyType:ws.create(),valueType:t,typeName:lc.ZodRecord},rs(n)))}}])}(),Js=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==zo.map)return Ho(r,{code:Mo.invalid_type,expected:zo.map,received:r.parsedType}),Ko;var u=this._def.keyType,a=this._def.valueType,i=ln(r.data.entries()).map((function(e,t){var n=cn(e,2),i=n[0],o=n[1];return{key:u._parse(new ts(r,i,r.path,[t,"key"])),value:a._parse(new ts(r,o,r.path,[t,"value"]))}}));if(r.common.async){var o=new Map;return Promise.resolve().then(Ht(on().mark((function e(){var t,r,u,a,s;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Qt(i),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=17;break}return u=r.value,e.next=7,u.key;case 7:return a=e.sent,e.next=10,u.value;case 10:if(s=e.sent,"aborted"!==a.status&&"aborted"!==s.status){e.next=13;break}return e.abrupt("return",Ko);case 13:"dirty"!==a.status&&"dirty"!==s.status||n.dirty(),o.set(a.value,s.value);case 15:e.next=3;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(1),t.e(e.t0);case 22:return e.prev=22,t.f(),e.finish(22);case 25:return e.abrupt("return",{status:n.value,value:o});case 26:case"end":return e.stop()}}),e,null,[[1,19,22,25]])}))))}var s,c=new Map,l=Qt(i);try{for(l.s();!(s=l.n()).done;){var f=s.value,d=f.key,p=f.value;if("aborted"===d.status||"aborted"===p.status)return Ko;"dirty"!==d.status&&"dirty"!==p.status||n.dirty(),c.set(d.value,p.value)}}catch(e){l.e(e)}finally{l.f()}return{status:n.value,value:c}}}])}();Js.create=function(e,t,n){return new Js(un({valueType:t,keyType:e,typeName:lc.ZodMap},rs(n)))};var Gs=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==zo.set)return Ho(r,{code:Mo.invalid_type,expected:zo.set,received:r.parsedType}),Ko;var u=this._def;null!==u.minSize&&r.data.size<u.minSize.value&&(Ho(r,{code:Mo.too_small,minimum:u.minSize.value,type:"set",inclusive:!0,exact:!1,message:u.minSize.message}),n.dirty()),null!==u.maxSize&&r.data.size>u.maxSize.value&&(Ho(r,{code:Mo.too_big,maximum:u.maxSize.value,type:"set",inclusive:!0,exact:!1,message:u.maxSize.message}),n.dirty());var a=this._def.valueType;function i(e){var t,r=new Set,u=Qt(e);try{for(u.s();!(t=u.n()).done;){var a=t.value;if("aborted"===a.status)return Ko;"dirty"===a.status&&n.dirty(),r.add(a.value)}}catch(e){u.e(e)}finally{u.f()}return{status:n.value,value:r}}var o=ln(r.data.values()).map((function(e,t){return a._parse(new ts(r,e,r.path,t))}));return r.common.async?Promise.all(o).then((function(e){return i(e)})):i(o)}},{key:"min",value:function(t,n){return new e(un(un({},this._def),{},{minSize:{value:t,message:Vo.toString(n)}}))}},{key:"max",value:function(t,n){return new e(un(un({},this._def),{},{maxSize:{value:t,message:Vo.toString(n)}}))}},{key:"size",value:function(e,t){return this.min(e,t).max(e,t)}},{key:"nonempty",value:function(e){return this.min(1,e)}}])}();Gs.create=function(e,t){return new Gs(un({valueType:e,minSize:null,maxSize:null,typeName:lc.ZodSet},rs(t)))};var Qs=function(){function e(){var t;return Wt(this,e),(t=Vt(this,e,arguments)).validate=t.implement,t}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==zo.function)return Ho(t,{code:Mo.invalid_type,expected:zo.function,received:t.parsedType}),Ko;function n(e,n){return Uo({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,qo(),Lo].filter((function(e){return!!e})),issueData:{code:Mo.invalid_arguments,argumentsError:n}})}function r(e,n){return Uo({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,qo(),Lo].filter((function(e){return!!e})),issueData:{code:Mo.invalid_return_type,returnTypeError:n}})}var u={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof rc){var i=this;return Go(Ht(on().mark((function e(){var t,o,s,c,l,f,d,p=arguments;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=p.length,o=new Array(t),s=0;s<t;s++)o[s]=p[s];return c=new Zo([]),e.next=4,i._def.args.parseAsync(o,u).catch((function(e){throw c.addIssue(n(o,e)),c}));case 4:return l=e.sent,e.next=7,Reflect.apply(a,this,l);case 7:return f=e.sent,e.next=10,i._def.returns._def.type.parseAsync(f,u).catch((function(e){throw c.addIssue(r(f,e)),c}));case 10:return d=e.sent,e.abrupt("return",d);case 12:case"end":return e.stop()}}),e,this)}))))}var o=this;return Go((function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var s=o._def.args.safeParse(t,u);if(!s.success)throw new Zo([n(t,s.error)]);var c=Reflect.apply(a,this,s.data),l=o._def.returns.safeParse(c,u);if(!l.success)throw new Zo([r(c,l.error)]);return l.data}))}},{key:"parameters",value:function(){return this._def.args}},{key:"returnType",value:function(){return this._def.returns}},{key:"args",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new e(un(un({},this._def),{},{args:Ws.create(n).rest(Ns.create())}))}},{key:"returns",value:function(t){return new e(un(un({},this._def),{},{returns:t}))}},{key:"implement",value:function(e){return this.parse(e)}},{key:"strictImplement",value:function(e){return this.parse(e)}}],[{key:"create",value:function(t,n,r){return new e(un({args:t||Ws.create([]).rest(Ns.create()),returns:n||Ns.create(),typeName:lc.ZodFunction},rs(r)))}}])}(),Ys=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"schema",get:function(){return this._def.getter()}},{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}])}();Ys.create=function(e,t){return new Ys(un({getter:e,typeName:lc.ZodLazy},rs(t)))};var Xs=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){if(e.data!==this._def.value){var t=this._getOrReturnCtx(e);return Ho(t,{received:t.data,code:Mo.invalid_literal,expected:this._def.value}),Ko}return{status:"valid",value:e.data}}},{key:"value",get:function(){return this._def.value}}])}();function ec(e,t){return new tc(un({values:e,typeName:lc.ZodEnum},rs(t)))}Xs.create=function(e,t){return new Xs(un({value:e,typeName:lc.ZodLiteral},rs(t)))};var tc=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){if("string"!=typeof e.data){var t=this._getOrReturnCtx(e),n=this._def.values;return Ho(t,{expected:Oo.joinValues(n),received:t.parsedType,code:Mo.invalid_type}),Ko}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){var r=this._getOrReturnCtx(e),u=this._def.values;return Ho(r,{received:r.data,code:Mo.invalid_enum_value,options:u}),Ko}return Go(e.data)}},{key:"options",get:function(){return this._def.values}},{key:"enum",get:function(){var e,t={},n=Qt(this._def.values);try{for(n.s();!(e=n.n()).done;){var r=e.value;t[r]=r}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"Values",get:function(){var e,t={},n=Qt(this._def.values);try{for(n.s();!(e=n.n()).done;){var r=e.value;t[r]=r}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"Enum",get:function(){var e,t={},n=Qt(this._def.values);try{for(n.s();!(e=n.n()).done;){var r=e.value;t[r]=r}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"extract",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return e.create(t,un(un({},this._def),n))}},{key:"exclude",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return e.create(this.options.filter((function(e){return!t.includes(e)})),un(un({},this._def),n))}}])}();tc.create=ec;var nc=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=Oo.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==zo.string&&n.parsedType!==zo.number){var r=Oo.objectValues(t);return Ho(n,{expected:Oo.joinValues(r),received:n.parsedType,code:Mo.invalid_type}),Ko}if(this._cache||(this._cache=new Set(Oo.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){var u=Oo.objectValues(t);return Ho(n,{received:n.data,code:Mo.invalid_enum_value,options:u}),Ko}return Go(e.data)}},{key:"enum",get:function(){return this._def.values}}])}();nc.create=function(e,t){return new nc(un({values:e,typeName:lc.ZodNativeEnum},rs(t)))};var rc=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"unwrap",value:function(){return this._def.type}},{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e).ctx;if(n.parsedType!==zo.promise&&!1===n.common.async)return Ho(n,{code:Mo.invalid_type,expected:zo.promise,received:n.parsedType}),Ko;var r=n.parsedType===zo.promise?n.data:Promise.resolve(n.data);return Go(r.then((function(e){return t._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})})))}}])}();rc.create=function(e,t){return new rc(un({type:e,typeName:lc.ZodPromise},rs(t)))};var uc=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"innerType",value:function(){return this._def.schema}},{key:"sourceType",value:function(){return this._def.schema._def.typeName===lc.ZodEffects?this._def.schema.sourceType():this._def.schema}},{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e),r=n.status,u=n.ctx,a=this._def.effect||null,i={addIssue:function(e){Ho(u,e),e.fatal?r.abort():r.dirty()},get path(){return u.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===a.type){var o=a.transform(u.data,i);if(u.common.async)return Promise.resolve(o).then(function(){var e=Ht(on().mark((function e(n){var a;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("aborted"!==r.value){e.next=2;break}return e.abrupt("return",Ko);case 2:return e.next=4,t._def.schema._parseAsync({data:n,path:u.path,parent:u});case 4:if("aborted"!==(a=e.sent).status){e.next=7;break}return e.abrupt("return",Ko);case 7:if("dirty"!==a.status){e.next=9;break}return e.abrupt("return",Jo(a.value));case 9:if("dirty"!==r.value){e.next=11;break}return e.abrupt("return",Jo(a.value));case 11:return e.abrupt("return",a);case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());if("aborted"===r.value)return Ko;var s=this._def.schema._parseSync({data:o,path:u.path,parent:u});return"aborted"===s.status?Ko:"dirty"===s.status||"dirty"===r.value?Jo(s.value):s}if("refinement"===a.type){var c=function(e){var t=a.refinement(e,i);if(u.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===u.common.async){var l=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});return"aborted"===l.status?Ko:("dirty"===l.status&&r.dirty(),c(l.value),{status:r.value,value:l.value})}return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then((function(e){return"aborted"===e.status?Ko:("dirty"===e.status&&r.dirty(),c(e.value).then((function(){return{status:r.value,value:e.value}})))}))}if("transform"===a.type){if(!1===u.common.async){var f=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});if(!Xo(f))return Ko;var d=a.transform(f.value,i);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:d}}return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then((function(e){return Xo(e)?Promise.resolve(a.transform(e.value,i)).then((function(e){return{status:r.value,value:e}})):Ko}))}Oo.assertNever(a)}}])}();uc.create=function(e,t,n){return new uc(un({schema:e,typeName:lc.ZodEffects,effect:t},rs(n)))},uc.createWithPreprocess=function(e,t,n){return new uc(un({schema:t,effect:{type:"preprocess",transform:e},typeName:lc.ZodEffects},rs(n)))};var ac=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){return this._getType(e)===zo.undefined?Go(void 0):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}])}();ac.create=function(e,t){return new ac(un({innerType:e,typeName:lc.ZodOptional},rs(t)))};var ic=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){return this._getType(e)===zo.null?Go(null):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}])}();ic.create=function(e,t){return new ic(un({innerType:e,typeName:lc.ZodNullable},rs(t)))};var oc=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=t.data;return t.parsedType===zo.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}},{key:"removeDefault",value:function(){return this._def.innerType}}])}();oc.create=function(e,t){return new oc(un({innerType:e,typeName:lc.ZodDefault,defaultValue:"function"==typeof t.default?t.default:function(){return t.default}},rs(t)))};var sc=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e).ctx,r=un(un({},n),{},{common:un(un({},n.common),{},{issues:[]})}),u=this._def.innerType._parse({data:r.data,path:r.path,parent:un({},r)});return es(u)?u.then((function(e){return{status:"valid",value:"valid"===e.status?e.value:t._def.catchValue({get error(){return new Zo(r.common.issues)},input:r.data})}})):{status:"valid",value:"valid"===u.status?u.value:this._def.catchValue({get error(){return new Zo(r.common.issues)},input:r.data})}}},{key:"removeCatch",value:function(){return this._def.innerType}}])}();sc.create=function(e,t){return new sc(un({innerType:e,typeName:lc.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:function(){return t.catch}},rs(t)))};var cc=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){if(this._getType(e)!==zo.nan){var t=this._getOrReturnCtx(e);return Ho(t,{code:Mo.invalid_type,expected:zo.nan,received:t.parsedType}),Ko}return{status:"valid",value:e.data}}}])}();cc.create=function(e){return new cc(un({typeName:lc.ZodNaN},rs(e)))};var lc,fc=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}},{key:"unwrap",value:function(){return this._def.type}}])}(),dc=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e),r=n.status,u=n.ctx;if(u.common.async){var a=function(){var e=Ht(on().mark((function e(){var n;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._def.in._parseAsync({data:u.data,path:u.path,parent:u});case 2:if("aborted"!==(n=e.sent).status){e.next=5;break}return e.abrupt("return",Ko);case 5:if("dirty"!==n.status){e.next=10;break}return r.dirty(),e.abrupt("return",Jo(n.value));case 10:return e.abrupt("return",t._def.out._parseAsync({data:n.value,path:u.path,parent:u}));case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a()}var i=this._def.in._parseSync({data:u.data,path:u.path,parent:u});return"aborted"===i.status?Ko:"dirty"===i.status?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:u.path,parent:u})}}],[{key:"create",value:function(t,n){return new e({in:t,out:n,typeName:lc.ZodPipeline})}}])}(),pc=function(){function e(){return Wt(this,e),Vt(this,e,arguments)}return tn(e,as),Gt(e,[{key:"_parse",value:function(e){var t=this._def.innerType._parse(e),n=function(e){return Xo(e)&&(e.value=Object.freeze(e.value)),e};return es(t)?t.then((function(e){return n(e)})):n(t)}},{key:"unwrap",value:function(){return this._def.innerType}}])}();pc.create=function(e,t){return new pc(un({innerType:e,typeName:lc.ZodReadonly},rs(t)))},Ls.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(lc||(lc={})),ws.create,xs.create,cc.create,Ss.create,Bs.create,Os.create,Is.create,Ts.create,Ps.create,js.create,Ns.create,zs.create,Rs.create,Ms.create,Ls.create,Ls.strictCreate,$s.create,Us.create,Vs.create,Ws.create,Ks.create,Js.create,Gs.create,Qs.create,Ys.create,Xs.create,tc.create,nc.create,rc.create,uc.create,ac.create,ic.create,uc.createWithPreprocess,dc.create;var hc=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.prefix,n=e.size,r=void 0===n?16:n,u=e.alphabet,a=void 0===u?"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz":u,i=e.separator,o=void 0===i?"-":i,s=function(){for(var e=a.length,t=new Array(r),n=0;n<r;n++)t[n]=a[Math.random()*e|0];return t.join("")};if(null==t)return s;if(a.includes(o))throw new Nn({argument:"separator",message:'The separator "'.concat(o,'" must not be part of the alphabet "').concat(a,'".')});return function(){return"".concat(t).concat(o).concat(s())}},vc=hc(),mc=/"__proto__"\s*:/,Dc=/"constructor"\s*:/;function yc(e){var t=JSON.parse(e);return null===t||"object"!=_(t)||!1===mc.test(e)&&!1===Dc.test(e)?t:function(e){for(var t=[e];t.length;){var n=t;t=[];var r,u=s(n);try{for(u.s();!(r=u.n()).done;){var a=r.value;if(Object.prototype.hasOwnProperty.call(a,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(a,"constructor")&&Object.prototype.hasOwnProperty.call(a.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(var i in a){var o=a[i];o&&"object"==_(o)&&t.push(o)}}}catch(e){u.e(e)}finally{u.f()}}return e}(t)}var gc=Symbol.for("vercel.ai.validator");function Fc(e){return function(e){return"object"==_(e)&&null!==e&&gc in e&&!0===e[gc]&&"validate"in e}(e)?e:(t=e,n=function(){var e=r(D().mark((function e(n){var r;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t["~standard"].validate(n);case 2:return r=e.sent,e.abrupt("return",null==r.issues?{success:!0,value:r.value}:{success:!1,error:new Vn({value:n,cause:r.issues})});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),c(c({},gc,!0),"validate",n));var t,n}function Ec(e){return _c.apply(this,arguments)}function _c(){return _c=r(D().mark((function e(t){var n,r,u;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.value,r=t.schema,e.next=3,bc({value:n,schema:r});case 3:if((u=e.sent).success){e.next=6;break}throw Vn.wrap({value:n,cause:u.error});case 6:return e.abrupt("return",u.value);case 7:case"end":return e.stop()}}),e)}))),_c.apply(this,arguments)}function bc(e){return kc.apply(this,arguments)}function kc(){return kc=r(D().mark((function e(t){var n,r,u,a;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.value,r=t.schema,u=Fc(r),e.prev=2,null!=u.validate){e.next=5;break}return e.abrupt("return",{success:!0,value:n,rawValue:n});case 5:return e.next=7,u.validate(n);case 7:return a=e.sent,e.abrupt("return",a.success?{success:!0,value:a.value,rawValue:n}:{success:!1,error:Vn.wrap({value:n,cause:a.error}),rawValue:n});case 11:return e.prev=11,e.t0=e.catch(2),e.abrupt("return",{success:!1,error:Vn.wrap({value:n,cause:e.t0}),rawValue:n});case 14:case"end":return e.stop()}}),e,null,[[2,11]])}))),kc.apply(this,arguments)}function Cc(e){return Ac.apply(this,arguments)}function Ac(){return Ac=r(D().mark((function e(t){var n,r,u;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.text,r=t.schema,e.prev=1,u=function(e){var t=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return yc(e)}finally{Error.stackTraceLimit=t}}(n),null!=r){e.next=7;break}e.t0={success:!0,value:u,rawValue:u},e.next=10;break;case 7:return e.next=9,bc({value:u,schema:r});case 9:e.t0=e.sent;case 10:return e.abrupt("return",e.t0);case 13:return e.prev=13,e.t1=e.catch(1),e.abrupt("return",{success:!1,error:Ln.isInstance(e.t1)?e.t1:new Ln({text:n,cause:e.t1}),rawValue:void 0});case 16:case"end":return e.stop()}}),e,null,[[1,13]])}))),Ac.apply(this,arguments)}function wc(e){return xc.apply(this,arguments)}function xc(){return xc=r(D().mark((function e(t){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",("function"==typeof t&&(t=t()),Promise.resolve(t)));case 1:case"end":return e.stop()}}),e)}))),xc.apply(this,arguments)}var Sc=function(e,t){for(var n=0;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString()].concat(F(t.slice(n))).join("/")},Bc=Symbol("Let zodToJsonSchema decide on which parser to use"),Oc={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"};function Ic(e,t){return nl(e.type._def,t)}function Tc(e,t,n){var r=null!=n?n:t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((function(n,r){return Tc(e,t,n)}))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Pc(e)}}var Pc=function(e){var t,n={type:"integer",format:"unix-time"},r=s(e.checks);try{for(r.s();!(t=r.n()).done;){var u=t.value;switch(u.kind){case"min":n.minimum=u.value;break;case"max":n.maximum=u.value}}}catch(e){r.e(e)}finally{r.f()}return n},jc=void 0,Nc=/^[cC][^\s-]{8,}$/,zc=/^[0-9a-z]+$/,Rc=/^[0-9A-HJKMNP-TV-Z]{26}$/,Mc=/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,Zc=/^(?:(?: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])$/,Lc=/^(([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])$/,$c=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,qc=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Uc=/^[a-zA-Z0-9_-]{21}$/,Hc=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;function Vc(e,t){var n={type:"string"};if(e.checks){var r,u=s(e.checks);try{for(u.s();!(r=u.n()).done;){var a=r.value;switch(a.kind){case"min":n.minLength="number"==typeof n.minLength?Math.max(n.minLength,a.value):a.value;break;case"max":n.maxLength="number"==typeof n.maxLength?Math.min(n.maxLength,a.value):a.value;break;case"email":switch(t.emailStrategy){case"format:email":Jc(n,"email",a.message,t);break;case"format:idn-email":Jc(n,"idn-email",a.message,t);break;case"pattern:zod":Gc(n,Mc,a.message,t)}break;case"url":Jc(n,"uri",a.message,t);break;case"uuid":Jc(n,"uuid",a.message,t);break;case"regex":Gc(n,a.regex,a.message,t);break;case"cuid":Gc(n,Nc,a.message,t);break;case"cuid2":Gc(n,zc,a.message,t);break;case"startsWith":Gc(n,RegExp("^".concat(Wc(a.value,t))),a.message,t);break;case"endsWith":Gc(n,RegExp("".concat(Wc(a.value,t),"$")),a.message,t);break;case"datetime":Jc(n,"date-time",a.message,t);break;case"date":Jc(n,"date",a.message,t);break;case"time":Jc(n,"time",a.message,t);break;case"duration":Jc(n,"duration",a.message,t);break;case"length":n.minLength="number"==typeof n.minLength?Math.max(n.minLength,a.value):a.value,n.maxLength="number"==typeof n.maxLength?Math.min(n.maxLength,a.value):a.value;break;case"includes":Gc(n,RegExp(Wc(a.value,t)),a.message,t);break;case"ip":"v6"!==a.version&&Jc(n,"ipv4",a.message,t),"v4"!==a.version&&Jc(n,"ipv6",a.message,t);break;case"base64url":Gc(n,qc,a.message,t);break;case"jwt":Gc(n,Hc,a.message,t);break;case"cidr":"v6"!==a.version&&Gc(n,Zc,a.message,t),"v4"!==a.version&&Gc(n,Lc,a.message,t);break;case"emoji":Gc(n,(void 0===jc&&(jc=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),jc),a.message,t);break;case"ulid":Gc(n,Rc,a.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":Jc(n,"binary",a.message,t);break;case"contentEncoding:base64":n.contentEncoding="base64";break;case"pattern:zod":Gc(n,$c,a.message,t)}break;case"nanoid":Gc(n,Uc,a.message,t)}}}catch(e){u.e(e)}finally{u.f()}}return n}function Wc(e,t){return"escape"===t.patternStrategy?function(e){for(var t="",n=0;n<e.length;n++)Kc.has(e[n])||(t+="\\"),t+=e[n];return t}(e):e}var Kc=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Jc(e,t,n,r){var u;e.format||(null==(u=e.anyOf)?void 0:u.some((function(e){return e.format})))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push(v({format:t},n&&r.errorMessages&&{errorMessage:{format:n}}))):e.format=t}function Gc(e,t,n,r){var u;e.pattern||(null==(u=e.allOf)?void 0:u.some((function(e){return e.pattern})))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push(v({pattern:Qc(t,r)},n&&r.errorMessages&&{errorMessage:{pattern:n}}))):e.pattern=Qc(t,r)}function Qc(e,t){var n;if(!t.applyRegexFlags||!e.flags)return e.source;for(var r=e.flags.includes("i"),u=e.flags.includes("m"),a=e.flags.includes("s"),i=r?e.source.toLowerCase():e.source,o="",s=!1,c=!1,l=!1,f=0;f<i.length;f++)if(s)o+=i[f],s=!1;else{if(r)if(c){if(i[f].match(/[a-z]/)){l?(o+=i[f],o+="".concat(i[f-2],"-").concat(i[f]).toUpperCase(),l=!1):"-"===i[f+1]&&(null==(n=i[f+2])?void 0:n.match(/[a-z]/))?(o+=i[f],l=!0):o+="".concat(i[f]).concat(i[f].toUpperCase());continue}}else if(i[f].match(/[a-z]/)){o+="[".concat(i[f]).concat(i[f].toUpperCase(),"]");continue}if(u){if("^"===i[f]){o+="(^|(?<=[\r\n]))";continue}if("$"===i[f]){o+="($|(?=[\r\n]))";continue}}a&&"."===i[f]?o+=c?"".concat(i[f],"\r\n"):"[".concat(i[f],"\r\n]"):(o+=i[f],"\\"===i[f]?s=!0:c&&"]"===i[f]?c=!1:c||"["!==i[f]||(c=!0))}try{new RegExp(o)}catch(n){return console.warn("Could not convert regex pattern at ".concat(t.currentPath.join("/")," to a flag-independent form! Falling back to the flag-ignorant source")),e.source}return o}function Yc(e,t){var n,r,u,a,i,o,s={type:"object",additionalProperties:null!=(n=nl(e.valueType._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["additionalProperties"])})))?n:t.allowedAdditionalProperties};if((null==(r=e.keyType)?void 0:r._def.typeName)===lc.ZodString&&(null==(u=e.keyType._def.checks)?void 0:u.length)){var c=Vc(e.keyType._def,t);c.type;var l=m(c,Nt);return v(v({},s),{},{propertyNames:l})}if((null==(a=e.keyType)?void 0:a._def.typeName)===lc.ZodEnum)return v(v({},s),{},{propertyNames:{enum:e.keyType._def.values}});if((null==(i=e.keyType)?void 0:i._def.typeName)===lc.ZodBranded&&e.keyType._def.type._def.typeName===lc.ZodString&&(null==(o=e.keyType._def.type._def.checks)?void 0:o.length)){var f=Ic(e.keyType._def,t);f.type;var d=m(f,zt);return v(v({},s),{},{propertyNames:d})}return s}var Xc={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function el(e){try{return e.isOptional()}catch(e){return!0}}var tl=function(e,t,n){switch(t){case lc.ZodString:return Vc(e,n);case lc.ZodNumber:return function(e){var t={type:"number"};if(!e.checks)return t;var n,r=s(e.checks);try{for(r.s();!(n=r.n()).done;){var u=n.value;switch(u.kind){case"int":t.type="integer";break;case"min":u.inclusive?t.minimum=u.value:t.exclusiveMinimum=u.value;break;case"max":u.inclusive?t.maximum=u.value:t.exclusiveMaximum=u.value;break;case"multipleOf":t.multipleOf=u.value}}}catch(e){r.e(e)}finally{r.f()}return t}(e);case lc.ZodObject:return function(e,t){var n={type:"object",properties:{}},r=[],u=e.shape();for(var a in u){var i=u[a];if(void 0!==i&&void 0!==i._def){var o=el(i),s=nl(i._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["properties",a]),propertyPath:[].concat(F(t.currentPath),["properties",a])}));void 0!==s&&(n.properties[a]=s,o||r.push(a))}}r.length&&(n.required=r);var c=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return nl(e.catchall._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["additionalProperties"])}));switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==c&&(n.additionalProperties=c),n}(e,n);case lc.ZodBigInt:return function(e){var t={type:"integer",format:"int64"};if(!e.checks)return t;var n,r=s(e.checks);try{for(r.s();!(n=r.n()).done;){var u=n.value;switch(u.kind){case"min":u.inclusive?t.minimum=u.value:t.exclusiveMinimum=u.value;break;case"max":u.inclusive?t.maximum=u.value:t.exclusiveMaximum=u.value;break;case"multipleOf":t.multipleOf=u.value}}}catch(e){r.e(e)}finally{r.f()}return t}(e);case lc.ZodBoolean:return{type:"boolean"};case lc.ZodDate:return Tc(e,n);case lc.ZodUndefined:return{not:{}};case lc.ZodNull:return{type:"null"};case lc.ZodArray:return function(e,t){var n,r,u,a={type:"array"};return(null==(n=e.type)?void 0:n._def)&&(null==(u=null==(r=e.type)?void 0:r._def)?void 0:u.typeName)!==lc.ZodAny&&(a.items=nl(e.type._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["items"])}))),e.minLength&&(a.minItems=e.minLength.value),e.maxLength&&(a.maxItems=e.maxLength.value),e.exactLength&&(a.minItems=e.exactLength.value,a.maxItems=e.exactLength.value),a}(e,n);case lc.ZodUnion:case lc.ZodDiscriminatedUnion:return function(e,t){var n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every((function(e){return e._def.typeName in Xc&&(!e._def.checks||!e._def.checks.length)}))){var r=n.reduce((function(e,t){var n=Xc[t._def.typeName];return n&&!e.includes(n)?[].concat(F(e),[n]):e}),[]);return{type:r.length>1?r:r[0]}}if(n.every((function(e){return"ZodLiteral"===e._def.typeName&&!e.description}))){var u=n.reduce((function(e,t){var n=_(t._def.value);switch(n){case"string":case"number":case"boolean":return[].concat(F(e),[n]);case"bigint":return[].concat(F(e),["integer"]);case"object":if(null===t._def.value)return[].concat(F(e),["null"]);default:return e}}),[]);if(u.length===n.length){var a=u.filter((function(e,t,n){return n.indexOf(e)===t}));return{type:a.length>1?a:a[0],enum:n.reduce((function(e,t){return e.includes(t._def.value)?e:[].concat(F(e),[t._def.value])}),[])}}}else if(n.every((function(e){return"ZodEnum"===e._def.typeName})))return{type:"string",enum:n.reduce((function(e,t){return[].concat(F(e),F(t._def.values.filter((function(t){return!e.includes(t)}))))}),[])};return function(e,t){var n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((function(e,n){return nl(e._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["anyOf","".concat(n)])}))})).filter((function(e){return!!e&&(!t.strictUnions||"object"==_(e)&&Object.keys(e).length>0)}));return n.length?{anyOf:n}:void 0}(e,t)}(e,n);case lc.ZodIntersection:return function(e,t){var n=[nl(e.left._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["allOf","0"])})),nl(e.right._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["allOf","1"])}))].filter((function(e){return!!e})),r=[];return n.forEach((function(e){if("type"in(n=e)&&"string"===n.type||!("allOf"in n)){var t=e;if("additionalProperties"in e&&!1===e.additionalProperties)e.additionalProperties,t=m(e,Rt);r.push(t)}else r.push.apply(r,F(e.allOf));var n})),r.length?{allOf:r}:void 0}(e,n);case lc.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((function(e,n){return nl(e._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["items","".concat(n)])}))})).reduce((function(e,t){return void 0===t?e:[].concat(F(e),[t])}),[]),additionalItems:nl(e.rest._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["additionalItems"])}))}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((function(e,n){return nl(e._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["items","".concat(n)])}))})).reduce((function(e,t){return void 0===t?e:[].concat(F(e),[t])}),[])}}(e,n);case lc.ZodRecord:return Yc(e,n);case lc.ZodLiteral:return function(e){var t=_(e.value);return"bigint"!==t&&"number"!==t&&"boolean"!==t&&"string"!==t?{type:Array.isArray(e.value)?"array":"object"}:{type:"bigint"===t?"integer":t,const:e.value}}(e);case lc.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case lc.ZodNativeEnum:return function(e){var t=e.values,n=Object.keys(e.values).filter((function(e){return"number"!=typeof t[t[e]]})).map((function(e){return t[e]})),r=Array.from(new Set(n.map((function(e){return _(e)}))));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:n}}(e);case lc.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[Xc[e.innerType._def.typeName],"null"]};var n=nl(e.innerType._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["anyOf","0"])}));return n&&{anyOf:[n,{type:"null"}]}}(e,n);case lc.ZodOptional:return function(e,t){var n;if(t.currentPath.toString()===(null==(n=t.propertyPath)?void 0:n.toString()))return nl(e.innerType._def,t);var r=nl(e.innerType._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["anyOf","1"])}));return r?{anyOf:[{not:{}},r]}:{}}(e,n);case lc.ZodMap:return function(e,t){return"record"===t.mapStrategy?Yc(e,t):{type:"array",maxItems:125,items:{type:"array",items:[nl(e.keyType._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["items","items","0"])}))||{},nl(e.valueType._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["items","items","1"])}))||{}],minItems:2,maxItems:2}}}(e,n);case lc.ZodSet:return function(e,t){var n={type:"array",uniqueItems:!0,items:nl(e.valueType._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["items"])}))};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}(e,n);case lc.ZodLazy:return function(){return e.getter()._def};case lc.ZodPromise:return function(e,t){return nl(e.type._def,t)}(e,n);case lc.ZodNaN:case lc.ZodNever:return{not:{}};case lc.ZodEffects:return function(e,t){return"input"===t.effectStrategy?nl(e.schema._def,t):{}}(e,n);case lc.ZodAny:case lc.ZodUnknown:return{};case lc.ZodDefault:return function(e,t){return v(v({},nl(e.innerType._def,t)),{},{default:e.defaultValue()})}(e,n);case lc.ZodBranded:return Ic(e,n);case lc.ZodReadonly:case lc.ZodCatch:return function(e,t){return nl(e.innerType._def,t)}(e,n);case lc.ZodPipeline:return function(e,t){if("input"===t.pipeStrategy)return nl(e.in._def,t);if("output"===t.pipeStrategy)return nl(e.out._def,t);var n=nl(e.in._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["allOf","0"])}));return{allOf:[n,nl(e.out._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["allOf",n?"1":"0"])}))].filter((function(e){return void 0!==e}))}}(e,n);case lc.ZodFunction:case lc.ZodVoid:case lc.ZodSymbol:default:return}};function nl(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],u=t.seen.get(e);if(t.override){var a=null==(n=t.override)?void 0:n.call(t,e,t,u,r);if(a!==Bc)return a}if(u&&!r){var i=rl(u,t);if(void 0!==i)return i}var o={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,o);var s=tl(e,e.typeName,t),c="function"==typeof s?nl(s(),t):s;if(c&&ul(e,t,c),t.postProcess){var l=t.postProcess(c,e,t);return o.jsonSchema=c,l}return o.jsonSchema=c,c}var rl=function(e,t){switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Sc(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((function(e,n){return t.currentPath[n]===e}))?(console.warn("Recursive reference detected at ".concat(t.currentPath.join("/"),"! Defaulting to any")),{}):"seen"===t.$refStrategy?{}:void 0}},ul=function(e,t,n){return e.description&&(n.description=e.description),n},al=function(e,t){var n,r=function(e){var t=function(e){return"string"==typeof e?v(v({},Oc),{},{name:e}):v(v({},Oc),e)}(e),n=void 0!==t.name?[].concat(F(t.basePath),[t.definitionPath,t.name]):t.basePath;return v(v({},t),{},{currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map((function(e){var n=g(e,2),r=n[0],u=n[1];return[u._def,{def:u._def,path:[].concat(F(t.basePath),[t.definitionPath,r]),jsonSchema:void 0}]})))})}(t),u="object"==_(t)&&t.definitions?Object.entries(t.definitions).reduce((function(e,t){var n,u=g(t,2),a=u[0],i=u[1];return v(v({},e),{},c({},a,null!=(n=nl(i._def,v(v({},r),{},{currentPath:[].concat(F(r.basePath),[r.definitionPath,a])}),!0))?n:{}))}),{}):void 0,a="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,i=null!=(n=nl(e._def,void 0===a?r:v(v({},r),{},{currentPath:[].concat(F(r.basePath),[r.definitionPath,a])}),!1))?n:{},o="object"==_(t)&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==o&&(i.title=o);var s=void 0===a?u?v(v({},i),{},c({},r.definitionPath,u)):i:c({$ref:[].concat(F("relative"===r.$refStrategy?[]:r.basePath),[r.definitionPath,a]).join("/")},r.definitionPath,v(v({},u),{},c({},a,i)));return s.$schema="http://json-schema.org/draft-07/schema#",s};function il(e,t){return function(e){return"_zod"in e}(e)?function(e){return sl(function(e,t){if(e instanceof Ma){var n,r=new si(t),u={},a=Qt(e._idmap.entries());try{for(a.s();!(n=a.n()).done;){var i=cn(n.value,2),o=(i[0],i[1]);r.process(o)}}catch(e){a.e(e)}finally{a.f()}var s,c={},l={registry:e,uri:(null==t?void 0:t.uri)||function(e){return e},defs:u},f=Qt(e._idmap.entries());try{for(f.s();!(s=f.n()).done;){var d=cn(s.value,2),p=d[0],h=d[1];c[p]=r.emit(h,un(un({},t),{},{external:l}))}}catch(e){f.e(e)}finally{f.f()}if(Object.keys(u).length>0){var v="draft-2020-12"===r.target?"$defs":"definitions";c.__shared=Yt({},v,u)}return{schemas:c}}var m=new si(t);return m.process(e),m.emit(e,t)}(e,{target:"draft-7",io:"output",reused:"inline"}),{validate:(t=r(D().mark((function t(n){var r;return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,gi(e,n);case 2:return r=t.sent,t.abrupt("return",r.success?{success:!0,value:r.data}:{success:!1,error:r.error});case 4:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})});var t}(e):function(e){return sl(al(e,{$refStrategy:"none"}),{validate:(t=r(D().mark((function t(n){var r;return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.safeParseAsync(n);case 2:return r=t.sent,t.abrupt("return",r.success?{success:!0,value:r.data}:{success:!1,error:r.error});case 4:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})});var t}(e)}var ol=Symbol.for("vercel.ai.schema");function sl(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).validate;return c(c(c(c(c({},ol,!0),"_type",void 0),gc,!0),"jsonSchema",e),"validate",t)}var cl,ll=Object.defineProperty,fl="AI_NoObjectGeneratedError",dl="vercel.ai.error.".concat(fl),pl=Symbol.for(dl),hl=function(){function e(t){var n,r=t.message,i=void 0===r?"No object generated.":r,o=t.cause,s=t.text,c=t.response,l=t.usage,f=t.finishReason;return a(this,e),(n=u(this,e,[{name:fl,message:i,cause:o}]))[cl]=!0,n.text=s,n.response=c,n.usage=l,n.finishReason=f,n}return d(e,Bn),o(e,null,[{key:"isInstance",value:function(e){return Bn.hasMarker(e,dl)}}])}();cl=pl;var vl,ml,Dl=lo([bi(),No(Uint8Array),No(ArrayBuffer),(vl=function(e){var t,n;return null!=(n=null==(t=globalThis.Buffer)?void 0:t.isBuffer(e))&&n},ml={message:"Must be a Buffer"},function(e,t){var n,r=mr(ml);return null!==(n=r.abort)&&void 0!==n||(r.abort=!0),new e(un({type:"custom",check:"custom",fn:t},r))}(jo,null!=vl?vl:function(){return!0}))]),yl=new Po({type:"lazy",getter:function(){return lo([Yi(),bi(),Vi(),Gi(),vo(bi(),yl),uo(yl)])}}),gl=vo(bi(),vo(bi(),yl)),Fl=io({type:go("text"),text:bi(),providerOptions:gl.optional()}),El=io({type:go("image"),image:lo([Dl,No(URL)]),mediaType:bi().optional(),providerOptions:gl.optional()}),_l=io({type:go("file"),data:lo([Dl,No(URL)]),filename:bi().optional(),mediaType:bi(),providerOptions:gl.optional()}),bl=io({type:go("reasoning"),text:bi(),providerOptions:gl.optional()}),kl=io({type:go("tool-call"),toolCallId:bi(),toolName:bi(),input:eo(),providerOptions:gl.optional(),providerExecuted:Gi().optional()}),Cl=new fo(un({type:"union",options:[io({type:go("text"),value:bi()}),io({type:go("json"),value:yl}),io({type:go("error-text"),value:bi()}),io({type:go("error-json"),value:yl}),io({type:go("content"),value:uo(lo([io({type:go("text"),text:bi()}),io({type:go("media"),data:bi(),mediaType:bi()})]))})],discriminator:"type"},mr(undefined))),Al=io({type:go("tool-result"),toolCallId:bi(),toolName:bi(),output:Cl,providerOptions:gl.optional()}),wl=io({role:go("system"),content:bi(),providerOptions:gl.optional()}),xl=io({role:go("user"),content:lo([bi(),uo(lo([Fl,El,_l]))]),providerOptions:gl.optional()}),Sl=io({role:go("assistant"),content:lo([bi(),uo(lo([Fl,_l,bl,kl,Al]))]),providerOptions:gl.optional()});lo([wl,xl,Sl,io({role:go("tool"),content:uo(Al),providerOptions:gl.optional()})]),hc({prefix:"aitxt",size:24}),TransformStream;var Bl=lo([oo({type:go("text-start"),id:bi(),providerMetadata:gl.optional()}),oo({type:go("text-delta"),id:bi(),delta:bi(),providerMetadata:gl.optional()}),oo({type:go("text-end"),id:bi(),providerMetadata:gl.optional()}),oo({type:go("error"),errorText:bi()}),oo({type:go("tool-input-start"),toolCallId:bi(),toolName:bi(),providerExecuted:Gi().optional(),dynamic:Gi().optional()}),oo({type:go("tool-input-delta"),toolCallId:bi(),inputTextDelta:bi()}),oo({type:go("tool-input-available"),toolCallId:bi(),toolName:bi(),input:eo(),providerExecuted:Gi().optional(),providerMetadata:gl.optional(),dynamic:Gi().optional()}),oo({type:go("tool-input-error"),toolCallId:bi(),toolName:bi(),input:eo(),providerExecuted:Gi().optional(),providerMetadata:gl.optional(),dynamic:Gi().optional(),errorText:bi()}),oo({type:go("tool-output-available"),toolCallId:bi(),output:eo(),providerExecuted:Gi().optional(),dynamic:Gi().optional(),preliminary:Gi().optional()}),oo({type:go("tool-output-error"),toolCallId:bi(),errorText:bi(),providerExecuted:Gi().optional(),dynamic:Gi().optional()}),oo({type:go("reasoning"),text:bi(),providerMetadata:gl.optional()}),oo({type:go("reasoning-start"),id:bi(),providerMetadata:gl.optional()}),oo({type:go("reasoning-delta"),id:bi(),delta:bi(),providerMetadata:gl.optional()}),oo({type:go("reasoning-end"),id:bi(),providerMetadata:gl.optional()}),oo({type:go("reasoning-part-finish")}),oo({type:go("source-url"),sourceId:bi(),url:bi(),title:bi().optional(),providerMetadata:gl.optional()}),oo({type:go("source-document"),sourceId:bi(),mediaType:bi(),title:bi(),filename:bi().optional(),providerMetadata:gl.optional()}),oo({type:go("file"),url:bi(),mediaType:bi(),providerMetadata:gl.optional()}),oo({type:bi().startsWith("data-"),id:bi().optional(),data:eo(),transient:Gi().optional()}),oo({type:go("start-step")}),oo({type:go("finish-step")}),oo({type:go("start"),messageId:bi().optional(),messageMetadata:eo().optional()}),oo({type:go("finish"),messageMetadata:eo().optional()}),oo({type:go("abort")}),oo({type:go("message-metadata"),messageMetadata:eo()})]);function Ol(e,t){if(void 0!==e||void 0!==t){if(void 0===e)return t;if(void 0===t)return e;var n=v({},e);for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var u=t[r];if(void 0===u)continue;var a=r in e?e[r]:void 0,i=!(null===u||"object"!=_(u)||Array.isArray(u)||u instanceof Date||u instanceof RegExp),o=!(null==a||"object"!=_(a)||Array.isArray(a)||a instanceof Date||a instanceof RegExp);n[r]=i&&o?Ol(a,u):u}return n}}function Il(e){var t=["ROOT"],n=-1,r=null;function u(e,u,a){switch(e){case'"':n=u,t.pop(),t.push(a),t.push("INSIDE_STRING");break;case"f":case"t":case"n":n=u,r=u,t.pop(),t.push(a),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(a),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n=u,t.pop(),t.push(a),t.push("INSIDE_NUMBER");break;case"{":n=u,t.pop(),t.push(a),t.push("INSIDE_OBJECT_START");break;case"[":n=u,t.pop(),t.push(a),t.push("INSIDE_ARRAY_START")}}function a(e,r){switch(e){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":n=r,t.pop()}}function i(e,r){switch(e){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=r,t.pop()}}for(var o=0;o<e.length;o++){var s=e[o];switch(t[t.length-1]){case"ROOT":u(s,o,"FINISH");break;case"INSIDE_OBJECT_START":switch(s){case'"':t.pop(),t.push("INSIDE_OBJECT_KEY");break;case"}":n=o,t.pop()}break;case"INSIDE_OBJECT_AFTER_COMMA":'"'===s&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break;case"INSIDE_OBJECT_KEY":'"'===s&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break;case"INSIDE_OBJECT_AFTER_KEY":":"===s&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break;case"INSIDE_OBJECT_BEFORE_VALUE":u(s,o,"INSIDE_OBJECT_AFTER_VALUE");break;case"INSIDE_OBJECT_AFTER_VALUE":a(s,o);break;case"INSIDE_STRING":switch(s){case'"':t.pop(),n=o;break;case"\\":t.push("INSIDE_STRING_ESCAPE");break;default:n=o}break;case"INSIDE_ARRAY_START":"]"===s?(n=o,t.pop()):(n=o,u(s,o,"INSIDE_ARRAY_AFTER_VALUE"));break;case"INSIDE_ARRAY_AFTER_VALUE":switch(s){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=o,t.pop();break;default:n=o}break;case"INSIDE_ARRAY_AFTER_COMMA":u(s,o,"INSIDE_ARRAY_AFTER_VALUE");break;case"INSIDE_STRING_ESCAPE":t.pop(),n=o;break;case"INSIDE_NUMBER":switch(s){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n=o;break;case"e":case"E":case"-":case".":break;case",":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(s,o),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&a(s,o);break;case"}":t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&a(s,o);break;case"]":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(s,o);break;default:t.pop()}break;case"INSIDE_LITERAL":var c=e.substring(r,o+1);"false".startsWith(c)||"true".startsWith(c)||"null".startsWith(c)?n=o:(t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]?a(s,o):"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(s,o))}}for(var l=e.slice(0,n+1),f=t.length-1;f>=0;f--)switch(t[f]){case"INSIDE_STRING":l+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":l+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":l+="]";break;case"INSIDE_LITERAL":var d=e.substring(r,e.length);"true".startsWith(d)?l+="true".slice(d.length):"false".startsWith(d)?l+="false".slice(d.length):"null".startsWith(d)&&(l+="null".slice(d.length))}return l}function Tl(e){return Pl.apply(this,arguments)}function Pl(){return Pl=r(D().mark((function e(t){var n;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==t){e.next=2;break}return e.abrupt("return",{value:void 0,state:"undefined-input"});case 2:return e.next=4,Cc({text:t});case 4:if(!(n=e.sent).success){e.next=9;break}e.t0={value:n.value,state:"successful-parse"},e.next=13;break;case 9:return e.next=11,Cc({text:Il(t)});case 11:n=e.sent,e.t0=n.success?{value:n.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"};case 13:return e.abrupt("return",e.t0);case 14:case"end":return e.stop()}}),e)}))),Pl.apply(this,arguments)}function jl(e){return e.type.startsWith("tool-")}function Nl(e){return jl(e)||function(e){return"dynamic-tool"===e.type}(e)}function zl(e){return e.type.split("-").slice(1).join("-")}function Rl(e){var t=e.lastMessage,n=e.messageId;return{message:"assistant"===(null==t?void 0:t.role)?t:{id:n,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function Ml(e){var t=e.stream,n=e.messageMetadataSchema,u=e.dataPartSchemas,a=e.runUpdateMessageJob,i=e.onError,o=e.onToolCall,s=e.onData;return t.pipeThrough(new TransformStream({transform:function(e,t){return r(D().mark((function c(){return D().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,a(function(){var a=r(D().mark((function a(c){var l,f,d,p,h,m,y,g,F,E,_,b,k,C,A,w,x,S,B,O,I,T,P,j,N,z,R,M;return D().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:b=function(){return b=r(D().mark((function e(t){var r;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==t){e.next=7;break}if(r=null!=l.message.metadata?Ol(l.message.metadata,t):t,e.t0=null!=n,!e.t0){e.next=6;break}return e.next=6,Ec({value:r,schema:n});case 6:l.message.metadata=r;case 7:case"end":return e.stop()}}),e)}))),b.apply(this,arguments)},_=function(e){return b.apply(this,arguments)},E=function(e){var t,n=l.message.parts.find((function(t){return"dynamic-tool"===t.type&&t.toolCallId===e.toolCallId})),r=e,u=n;null!=n?(n.state=e.state,u.toolName=e.toolName,u.input=r.input,u.output=r.output,u.errorText=r.errorText,u.rawInput=null!=(t=r.rawInput)?t:u.rawInput,u.preliminary=r.preliminary,null!=r.providerMetadata&&"input-available"===n.state&&(n.callProviderMetadata=r.providerMetadata)):l.message.parts.push(v({type:"dynamic-tool",toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:r.input,output:r.output,errorText:r.errorText,preliminary:r.preliminary},null!=r.providerMetadata?{callProviderMetadata:r.providerMetadata}:{}))},F=function(e){var t,n=l.message.parts.find((function(t){return jl(t)&&t.toolCallId===e.toolCallId})),r=e,u=n;null!=n?(n.state=e.state,u.input=r.input,u.output=r.output,u.errorText=r.errorText,u.rawInput=r.rawInput,u.preliminary=r.preliminary,u.providerExecuted=null!=(t=r.providerExecuted)?t:n.providerExecuted,null!=r.providerMetadata&&"input-available"===n.state&&(n.callProviderMetadata=r.providerMetadata)):l.message.parts.push(v({type:"tool-".concat(e.toolName),toolCallId:e.toolCallId,state:e.state,input:r.input,output:r.output,rawInput:r.rawInput,errorText:r.errorText,providerExecuted:r.providerExecuted,preliminary:r.preliminary},null!=r.providerMetadata?{callProviderMetadata:r.providerMetadata}:{}))},g=function(e){var t=l.message.parts.filter((function(e){return"dynamic-tool"===e.type})).find((function(t){return t.toolCallId===e}));if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t},y=function(e){var t=l.message.parts.filter(jl).find((function(t){return t.toolCallId===e}));if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t},l=c.state,f=c.write,a.t0=e.type,a.next="text-start"===a.t0?10:"text-delta"===a.t0?13:"text-end"===a.t0?16:"reasoning-start"===a.t0?19:"reasoning-delta"===a.t0?22:"reasoning-end"===a.t0?25:"file"===a.t0?28:"source-url"===a.t0?30:"source-document"===a.t0?32:"tool-input-start"===a.t0?34:"tool-input-delta"===a.t0?37:"tool-input-available"===a.t0?45:"tool-input-error"===a.t0?52:"tool-output-available"===a.t0?54:"tool-output-error"===a.t0?57:"start-step"===a.t0?60:"finish-step"===a.t0?62:"start"===a.t0?64:"finish"===a.t0||"message-metadata"===a.t0?69:"error"===a.t0?73:75;break;case 10:return k={type:"text",text:"",providerMetadata:e.providerMetadata,state:"streaming"},l.activeTextParts[e.id]=k,l.message.parts.push(k),f(),a.abrupt("break",86);case 13:return(C=l.activeTextParts[e.id]).text+=e.delta,C.providerMetadata=null!=(d=e.providerMetadata)?d:C.providerMetadata,f(),a.abrupt("break",86);case 16:return(A=l.activeTextParts[e.id]).state="done",A.providerMetadata=null!=(p=e.providerMetadata)?p:A.providerMetadata,delete l.activeTextParts[e.id],f(),a.abrupt("break",86);case 19:return w={type:"reasoning",text:"",providerMetadata:e.providerMetadata,state:"streaming"},l.activeReasoningParts[e.id]=w,l.message.parts.push(w),f(),a.abrupt("break",86);case 22:return(x=l.activeReasoningParts[e.id]).text+=e.delta,x.providerMetadata=null!=(h=e.providerMetadata)?h:x.providerMetadata,f(),a.abrupt("break",86);case 25:return(S=l.activeReasoningParts[e.id]).providerMetadata=null!=(m=e.providerMetadata)?m:S.providerMetadata,S.state="done",delete l.activeReasoningParts[e.id],f(),a.abrupt("break",86);case 28:return l.message.parts.push({type:"file",mediaType:e.mediaType,url:e.url}),f(),a.abrupt("break",86);case 30:return l.message.parts.push({type:"source-url",sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),f(),a.abrupt("break",86);case 32:return l.message.parts.push({type:"source-document",sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),f(),a.abrupt("break",86);case 34:return B=l.message.parts.filter(jl),l.partialToolCalls[e.toolCallId]={text:"",toolName:e.toolName,index:B.length,dynamic:e.dynamic},e.dynamic?E({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0}):F({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted}),f(),a.abrupt("break",86);case 37:return(O=l.partialToolCalls[e.toolCallId]).text+=e.inputTextDelta,a.next=41,Tl(O.text);case 41:return I=a.sent,T=I.value,O.dynamic?E({toolCallId:e.toolCallId,toolName:O.toolName,state:"input-streaming",input:T}):F({toolCallId:e.toolCallId,toolName:O.toolName,state:"input-streaming",input:T}),f(),a.abrupt("break",86);case 45:if(e.dynamic?E({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerMetadata:e.providerMetadata}):F({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),f(),a.t1=o&&!e.providerExecuted,!a.t1){a.next=51;break}return a.next=51,o({toolCall:e});case 51:return a.abrupt("break",86);case 52:return e.dynamic?E({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:e.input,errorText:e.errorText,providerMetadata:e.providerMetadata}):F({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),f(),a.abrupt("break",86);case 54:return e.dynamic?(P=g(e.toolCallId),E({toolCallId:e.toolCallId,toolName:P.toolName,state:"output-available",input:P.input,output:e.output,preliminary:e.preliminary})):(j=y(e.toolCallId),F({toolCallId:e.toolCallId,toolName:zl(j),state:"output-available",input:j.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary})),f(),a.abrupt("break",86);case 57:return e.dynamic?(N=g(e.toolCallId),E({toolCallId:e.toolCallId,toolName:N.toolName,state:"output-error",input:N.input,errorText:e.errorText})):(z=y(e.toolCallId),F({toolCallId:e.toolCallId,toolName:zl(z),state:"output-error",input:z.input,rawInput:z.rawInput,errorText:e.errorText})),f(),a.abrupt("break",86);case 60:return l.message.parts.push({type:"step-start"}),a.abrupt("break",86);case 62:return l.activeTextParts={},l.activeReasoningParts={},a.abrupt("break",86);case 64:return null!=e.messageId&&(l.message.id=e.messageId),a.next=67,_(e.messageMetadata);case 67:return null==e.messageId&&null==e.messageMetadata||f(),a.abrupt("break",86);case 69:return a.next=71,_(e.messageMetadata);case 71:return null!=e.messageMetadata&&f(),a.abrupt("break",86);case 73:return null==i||i(new Error(e.errorText)),a.abrupt("break",86);case 75:if(!function(e){return e.type.startsWith("data-")}(e)){a.next=86;break}if(a.t2=null!=(null==u?void 0:u[e.type]),!a.t2){a.next=80;break}return a.next=80,Ec({value:e.data,schema:u[e.type]});case 80:if(!(R=e).transient){a.next=84;break}return null==s||s(R),a.abrupt("break",86);case 84:M=null!=R.id?l.message.parts.find((function(e){return R.type===e.type&&R.id===e.id})):void 0,null!=M?M.data=R.data:l.message.parts.push(R),null==s||s(R),f();case 86:t.enqueue(e);case 87:case"end":return a.stop()}}),a)})));return function(e){return a.apply(this,arguments)}}());case 2:case"end":return c.stop()}}),c)})))()}}))}hc({prefix:"aitxt",size:24}),hc({prefix:"aiobj",size:24});var Zl=function(){return o((function e(){a(this,e),this.queue=[],this.isProcessing=!1}),[{key:"processQueue",value:(t=r(D().mark((function e(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isProcessing){e.next=9;break}this.isProcessing=!0;case 2:if(!(this.queue.length>0)){e.next=8;break}return e.next=5,this.queue[0]();case 5:this.queue.shift();case 6:e.next=2;break;case 8:this.isProcessing=!1;case 9:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"run",value:(e=r(D().mark((function e(t){var n=this;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,u){n.queue.push(r(D().mark((function n(){return D().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t();case 3:e(),n.next=9;break;case 6:n.prev=6,n.t0=n.catch(0),u(n.t0);case 9:case"end":return n.stop()}}),n,null,[[0,6]])})))),n.processQueue()})));case 1:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})}]);var e,t}();hc({prefix:"aiobj",size:24}),function(e,t){for(var n in t)ll(e,n,{get:t[n],enumerable:!0})}({},{object:function(){return $l},text:function(){return Ll}});var Ll=function(){return{type:"text",responseFormat:{type:"text"},parsePartial:(t=r(D().mark((function e(t){var n;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.text,e.abrupt("return",{partial:n});case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)}),parseOutput:(e=r(D().mark((function e(t){var n;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.text,e.abrupt("return",n);case 2:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};var e,t},$l=function(e){var t=function(e){return null==e?sl({properties:{},additionalProperties:!1}):"object"==_(t=e)&&null!==t&&ol in t&&!0===t[ol]&&"jsonSchema"in t&&"validate"in t?e:il(e);var t}(e.schema);return{type:"object",responseFormat:{type:"json",schema:t.jsonSchema},parsePartial:function(e){return r(D().mark((function t(){var n,r,u;return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.text,t.next=3,Tl(n);case 3:r=t.sent,t.t0=r.state,t.next="failed-parse"===t.t0||"undefined-input"===t.t0?7:"repaired-parse"===t.t0||"successful-parse"===t.t0?8:9;break;case 7:return t.abrupt("return");case 8:return t.abrupt("return",{partial:r.value});case 9:throw u=r.state,new Error("Unsupported parse state: ".concat(u));case 11:case"end":return t.stop()}}),t)})))()},parseOutput:function(e,n){return r(D().mark((function r(){var u,a,i;return D().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=e.text,r.next=3,Cc({text:u});case 3:if((a=r.sent).success){r.next=6;break}throw new hl({message:"No object generated: could not parse the response.",cause:a.error,text:u,response:n.response,usage:n.usage,finishReason:n.finishReason});case 6:return r.next=8,bc({value:a.value,schema:t});case 8:if((i=r.sent).success){r.next=11;break}throw new hl({message:"No object generated: response did not match schema.",cause:i.error,text:u,response:n.response,usage:n.usage,finishReason:n.finishReason});case 11:return r.abrupt("return",i.value);case 12:case"end":return r.stop()}}),r)})))()}}},ql=so({name:bi(),version:bi()}),Ul=so({_meta:_o(io({}).loose())}),Hl=Ul,Vl=io({method:bi(),params:_o(Ul)}),Wl=so({experimental:_o(io({}).loose()),logging:_o(io({}).loose()),prompts:_o(so({listChanged:_o(Gi())})),resources:_o(so({subscribe:_o(Gi()),listChanged:_o(Gi())})),tools:_o(so({listChanged:_o(Gi())}))});Hl.extend({protocolVersion:bi(),capabilities:Wl,serverInfo:ql,instructions:_o(bi())});var Kl=Hl.extend({nextCursor:_o(bi())}),Jl=io({name:bi(),description:_o(bi()),inputSchema:io({type:go("object"),properties:_o(io({}).loose())}).loose()}).loose();Kl.extend({tools:uo(Jl)});var Gl=io({type:go("text"),text:bi()}).loose(),Ql=io({type:go("image"),data:Li(),mimeType:bi()}).loose(),Yl=io({uri:bi(),mimeType:_o(bi())}).loose(),Xl=Yl.extend({text:bi()}),ef=Yl.extend({blob:Li()}),tf=io({type:go("resource"),resource:lo([Xl,ef])}).loose();Hl.extend({content:uo(lo([Gl,Ql,tf])),isError:Gi().default(!1).optional()}).or(Hl.extend({toolResult:eo()}));var nf="2.0",rf=io({jsonrpc:go(nf),id:lo([bi(),Vi().int()])}).merge(Vl).strict(),uf=io({jsonrpc:go(nf),id:lo([bi(),Vi().int()]),result:Hl}).strict(),af=io({jsonrpc:go(nf),id:lo([bi(),Vi().int()]),error:io({code:Vi().int(),message:bi(),data:_o(eo())})}).strict();lo([rf,io({jsonrpc:go(nf)}).merge(io({method:bi(),params:_o(Ul)})).strict(),uf,af]);var of=function(){return o((function e(t){var n=t.api,r=void 0===n?"/api/chat":n,u=t.credentials,i=t.headers,o=t.body,s=t.fetch,c=t.prepareSendMessagesRequest,l=t.prepareReconnectToStreamRequest;a(this,e),this.api=r,this.credentials=u,this.headers=i,this.body=o,this.fetch=s,this.prepareSendMessagesRequest=c,this.prepareReconnectToStreamRequest=l}),[{key:"sendMessages",value:(t=r(D().mark((function e(t){var n,r,u,a,i,o,s,c,l,f,d,p,h,y,g,F,E;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.abortSignal,r=m(t,Mt),e.next=3,wc(this.body);case 3:return c=e.sent,e.next=6,wc(this.headers);case 6:return l=e.sent,e.next=9,wc(this.credentials);case 9:return f=e.sent,e.next=12,null==(u=this.prepareSendMessagesRequest)?void 0:u.call(this,{api:this.api,id:r.chatId,messages:r.messages,body:v(v({},c),r.body),headers:v(v({},l),r.headers),credentials:f,requestMetadata:r.metadata,trigger:r.trigger,messageId:r.messageId});case 12:return d=e.sent,p=null!=(a=null==d?void 0:d.api)?a:this.api,h=void 0!==(null==d?void 0:d.headers)?d.headers:v(v({},l),r.headers),y=void 0!==(null==d?void 0:d.body)?d.body:v(v(v({},c),r.body),{},{id:r.chatId,messages:r.messages,trigger:r.trigger,messageId:r.messageId}),g=null!=(i=null==d?void 0:d.credentials)?i:f,F=null!=(o=this.fetch)?o:globalThis.fetch,e.next=20,F(p,{method:"POST",headers:v({"Content-Type":"application/json"},h),body:JSON.stringify(y),credentials:g,signal:n});case 20:if((E=e.sent).ok){e.next=33;break}return e.t0=Error,e.next=25,E.text();case 25:if(e.t1=s=e.sent,null==e.t1){e.next=30;break}e.t2=s,e.next=31;break;case 30:e.t2="Failed to fetch the chat response.";case 31:throw e.t3=e.t2,new e.t0(e.t3);case 33:if(E.body){e.next=35;break}throw new Error("The response body is empty.");case 35:return e.abrupt("return",this.processResponseStream(E.body));case 36:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"reconnectToStream",value:(e=r(D().mark((function e(t){var n,r,u,a,i,o,s,c,l,f,d,p,h,m;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wc(this.body);case 2:return o=e.sent,e.next=5,wc(this.headers);case 5:return s=e.sent,e.next=8,wc(this.credentials);case 8:return c=e.sent,e.next=11,null==(n=this.prepareReconnectToStreamRequest)?void 0:n.call(this,{api:this.api,id:t.chatId,body:v(v({},o),t.body),headers:v(v({},s),t.headers),credentials:c,requestMetadata:t.metadata});case 11:return l=e.sent,f=null!=(r=null==l?void 0:l.api)?r:"".concat(this.api,"/").concat(t.chatId,"/stream"),d=void 0!==(null==l?void 0:l.headers)?l.headers:v(v({},s),t.headers),p=null!=(u=null==l?void 0:l.credentials)?u:c,h=null!=(a=this.fetch)?a:globalThis.fetch,e.next=18,h(f,{method:"GET",headers:d,credentials:p});case 18:if(204!==(m=e.sent).status){e.next=21;break}return e.abrupt("return",null);case 21:if(m.ok){e.next=33;break}return e.t0=Error,e.next=25,m.text();case 25:if(e.t1=i=e.sent,null==e.t1){e.next=30;break}e.t2=i,e.next=31;break;case 30:e.t2="Failed to fetch the chat response.";case 31:throw e.t3=e.t2,new e.t0(e.t3);case 33:if(m.body){e.next=35;break}throw new Error("The response body is empty.");case 35:return e.abrupt("return",this.processResponseStream(m.body));case 36:case"end":return e.stop()}}),e,this)}))),function(t){return e.apply(this,arguments)})}]);var e,t}(),sf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,e),u(this,e,[t])}return d(e,of),o(e,[{key:"processResponseStream",value:function(e){return function(e){var t=e.schema;return e.stream.pipeThrough(new TextDecoderStream).pipeThrough(new Jn).pipeThrough(new TransformStream({transform:function(e,n){return r(D().mark((function r(){var u;return D().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(u=e.data,r.t0="[DONE]"!==u,!r.t0){r.next=8;break}return r.t1=n,r.next=6,Cc({text:u,schema:t});case 6:r.t2=r.sent,r.t1.enqueue.call(r.t1,r.t2);case 8:case"end":return r.stop()}}),r)})))()}}))}({stream:e,schema:Bl}).pipeThrough(new TransformStream({transform:function(e,t){return r(D().mark((function n(){return D().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.success){n.next=2;break}throw e.error;case 2:t.enqueue(e.value);case 3:case"end":return n.stop()}}),n)})))()}}))}}])}(),cf=function(){return o((function e(t){var n=this,u=t.generateId,i=void 0===u?vc:u,o=t.id,s=void 0===o?i():o,c=t.transport,l=void 0===c?new sf:c,f=t.messageMetadataSchema,d=t.dataPartSchemas,p=t.state,h=t.onError,y=t.onToolCall,g=t.onFinish,E=t.onData,_=t.sendAutomaticallyWhen;a(this,e),this.activeResponse=void 0,this.jobExecutor=new Zl,this.sendMessage=function(){var e=r(D().mark((function e(t,u){var a,i,o,s,c,l,f;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=4;break}return e.next=3,n.makeRequest(v({trigger:"submit-message",messageId:null==(a=n.lastMessage)?void 0:a.id},u));case 3:return e.abrupt("return",void e.sent);case 4:if(!("text"in t)&&!("files"in t)){e.next=16;break}if(!Array.isArray(t.files)){e.next=9;break}e.t0=t.files,e.next=12;break;case 9:return e.next=11,function(){var e=r(D().mark((function e(t){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return",[]);case 2:if(globalThis.FileList&&t instanceof globalThis.FileList){e.next=4;break}throw new Error("FileList is not supported in the current environment");case 4:return e.abrupt("return",Promise.all(Array.from(t).map(function(){var e=r(D().mark((function e(t){var n,r;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.name,r=t.type,e.t0=r,e.t1=n,e.next=5,new Promise((function(e,n){var r=new FileReader;r.onload=function(t){var n;e(null==(n=t.target)?void 0:n.result)},r.onerror=function(e){return n(e)},r.readAsDataURL(t)}));case 5:return e.t2=e.sent,e.abrupt("return",{type:"file",mediaType:e.t0,filename:e.t1,url:e.t2});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(t.files);case 11:e.t0=e.sent;case 12:l=e.t0,c={parts:[].concat(F(l),F("text"in t&&null!=t.text?[{type:"text",text:t.text}]:[]))},e.next=17;break;case 16:c=t;case 17:if(null==t.messageId){e.next=26;break}if(f=n.state.messages.findIndex((function(e){return e.id===t.messageId})),-1!==f){e.next=21;break}throw new Error("message with id ".concat(t.messageId," not found"));case 21:if("user"===n.state.messages[f].role){e.next=23;break}throw new Error("message with id ".concat(t.messageId," is not a user message"));case 23:n.state.messages=n.state.messages.slice(0,f+1),n.state.replaceMessage(f,v(v({},c),{},{id:t.messageId,role:null!=(i=c.role)?i:"user",metadata:t.metadata})),e.next=27;break;case 26:n.state.pushMessage(v(v({},c),{},{id:null!=(o=c.id)?o:n.generateId(),role:null!=(s=c.role)?s:"user",metadata:t.metadata}));case 27:return e.next=29,n.makeRequest(v({trigger:"submit-message",messageId:t.messageId},u));case 29:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),this.regenerate=r(D().mark((function e(){var t,r,u,a,i=arguments;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(t=i.length>0&&void 0!==i[0]?i[0]:{}).messageId,u=m(t,Zt),a=null==r?n.state.messages.length-1:n.state.messages.findIndex((function(e){return e.id===r})),-1!==a){e.next=4;break}throw new Error("message ".concat(r," not found"));case 4:return n.state.messages=n.state.messages.slice(0,"assistant"===n.messages[a].role?a:a+1),e.next=7,n.makeRequest(v({trigger:"regenerate-message",messageId:r},u));case 7:case"end":return e.stop()}}),e)}))),this.resumeStream=r(D().mark((function e(){var t,r=arguments;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,n.makeRequest(v({trigger:"resume-stream"},t));case 3:case"end":return e.stop()}}),e)}))),this.clearError=function(){"error"===n.status&&(n.state.error=void 0,n.setStatus({status:"ready"}))},this.addToolResult=function(){var e=r(D().mark((function e(t){var u,a;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.tool,u=t.toolCallId,a=t.output,e.abrupt("return",n.jobExecutor.run(r(D().mark((function e(){var t,r,i,o;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=n.state.messages,o=i[i.length-1],n.state.replaceMessage(i.length-1,v(v({},o),{},{parts:o.parts.map((function(e){return Nl(e)&&e.toolCallId===u?v(v({},e),{},{state:"output-available",output:a}):e}))})),n.activeResponse&&(n.activeResponse.state.message.parts=n.activeResponse.state.message.parts.map((function(e){return Nl(e)&&e.toolCallId===u?v(v({},e),{},{state:"output-available",output:a,errorText:void 0}):e}))),"streaming"!==n.status&&"submitted"!==n.status&&(null==(t=n.sendAutomaticallyWhen)?void 0:t.call(n,{messages:n.state.messages}))&&n.makeRequest({trigger:"submit-message",messageId:null==(r=n.lastMessage)?void 0:r.id});case 2:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.stop=r(D().mark((function e(){var t;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"streaming"!==n.status&&"submitted"!==n.status||(null==(t=n.activeResponse)?void 0:t.abortController)&&n.activeResponse.abortController.abort();case 1:case"end":return e.stop()}}),e)}))),this.id=s,this.transport=l,this.generateId=i,this.messageMetadataSchema=f,this.dataPartSchemas=d,this.state=p,this.onError=h,this.onToolCall=y,this.onFinish=g,this.onData=E,this.sendAutomaticallyWhen=_}),[{key:"status",get:function(){return this.state.status}},{key:"setStatus",value:function(e){var t=e.status,n=e.error;this.status!==t&&(this.state.status=t,this.state.error=n)}},{key:"error",get:function(){return this.state.error}},{key:"messages",get:function(){return this.state.messages},set:function(e){this.state.messages=e}},{key:"lastMessage",get:function(){return this.state.messages[this.state.messages.length-1]}},{key:"makeRequest",value:(e=r(D().mark((function e(t){var n,u,a,i,o,s,c,l,f,d,p,h,v,m,y,g,F=this;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.trigger,u=t.metadata,a=t.headers,i=t.body,o=t.messageId,this.setStatus({status:"submitted",error:void 0}),f=this.lastMessage,d=!1,p=!1,h=!1,e.prev=4,(v={state:Rl({lastMessage:this.state.snapshot(f),messageId:this.generateId()}),abortController:new AbortController}).abortController.signal.addEventListener("abort",(function(){d=!0})),this.activeResponse=v,"resume-stream"!==n){e.next=15;break}return e.next=9,this.transport.reconnectToStream({chatId:this.id,metadata:u,headers:a,body:i});case 9:if(null!=(y=e.sent)){e.next=12;break}return e.abrupt("return",void this.setStatus({status:"ready"}));case 12:m=y,e.next=18;break;case 15:return e.next=17,this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:v.abortController.signal,metadata:u,headers:a,body:i,trigger:n,messageId:o});case 17:m=e.sent;case 18:return g=function(e){return F.jobExecutor.run((function(){return e({state:v.state,write:function(){var e;F.setStatus({status:"streaming"}),v.state.message.id===(null==(e=F.lastMessage)?void 0:e.id)?F.state.replaceMessage(F.state.messages.length-1,v.state.message):F.state.pushMessage(v.state.message)}})}))},e.next=21,function(){var e=r(D().mark((function e(t){var n,r,u;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.stream,r=t.onError,u=n.getReader(),e.prev=2;case 3:return e.next=5,u.read();case 5:if(!e.sent.done){e.next=9;break}return e.abrupt("break",11);case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),null==r||r(e.t0);case 16:return e.prev=16,u.releaseLock(),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[2,13,16,19]])})));return function(t){return e.apply(this,arguments)}}()({stream:Ml({stream:m,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:g,onError:function(e){throw e}}),onError:function(e){throw e}});case 21:this.setStatus({status:"ready"}),e.next=29;break;case 24:if(e.prev=24,e.t0=e.catch(4),!d&&"AbortError"!==e.t0.name){e.next=28;break}return e.abrupt("return",(d=!0,this.setStatus({status:"ready"}),null));case 28:h=!0,e.t0 instanceof TypeError&&(e.t0.message.toLowerCase().includes("fetch")||e.t0.message.toLowerCase().includes("network"))&&(p=!0),this.onError&&e.t0 instanceof Error&&this.onError(e.t0),this.setStatus({status:"error",error:e.t0});case 29:e.prev=29;try{null==(s=this.onFinish)||s.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:d,isDisconnect:p,isError:h})}catch(e){console.error(e)}return this.activeResponse=void 0,e.finish(29);case 33:if(e.t1=null==(c=this.sendAutomaticallyWhen)?void 0:c.call(this,{messages:this.state.messages}),!e.t1){e.next=37;break}return e.next=37,this.makeRequest({trigger:"submit-message",messageId:null==(l=this.lastMessage)?void 0:l.id,metadata:u,headers:a,body:i});case 37:case"end":return e.stop()}}),e,this,[[4,24,29,33]])}))),function(t){return e.apply(this,arguments)})}]);var e}();function lf(e){var t=e.messages,n=t[t.length-1];if(!n)return!1;if("assistant"!==n.role)return!1;var r=n.parts.reduce((function(e,t,n){return"step-start"===t.type?n:e}),-1),u=n.parts.slice(r+1).filter(Nl);return u.length>0&&u.every((function(e){return"output-available"===e.state}))}var ff,df,pf=io({type:go("text"),text:bi(),state:Do(["streaming","done"]).optional(),providerMetadata:gl.optional()}),hf=io({type:go("reasoning"),text:bi(),state:Do(["streaming","done"]).optional(),providerMetadata:gl.optional()}),vf=io({type:go("source-url"),sourceId:bi(),url:bi(),title:bi().optional(),providerMetadata:gl.optional()}),mf=io({type:go("source-document"),sourceId:bi(),mediaType:bi(),title:bi(),filename:bi().optional(),providerMetadata:gl.optional()}),Df=io({type:go("file"),mediaType:bi(),filename:bi().optional(),url:bi(),providerMetadata:gl.optional()}),yf=io({type:go("step-start")}),gf=io({type:bi().startsWith("data-"),id:bi().optional(),data:eo()}),Ff=[io({type:go("dynamic-tool"),toolName:bi(),toolCallId:bi(),state:go("input-streaming"),input:eo().optional(),output:no().optional(),errorText:no().optional()}),io({type:go("dynamic-tool"),toolName:bi(),toolCallId:bi(),state:go("input-available"),input:eo(),output:no().optional(),errorText:no().optional(),callProviderMetadata:gl.optional()}),io({type:go("dynamic-tool"),toolName:bi(),toolCallId:bi(),state:go("output-available"),input:eo(),output:eo(),errorText:no().optional(),callProviderMetadata:gl.optional(),preliminary:Gi().optional()}),io({type:go("dynamic-tool"),toolName:bi(),toolCallId:bi(),state:go("output-error"),input:eo(),output:no().optional(),errorText:bi(),callProviderMetadata:gl.optional()})],Ef=[io({type:bi().startsWith("tool-"),toolCallId:bi(),state:go("input-streaming"),input:eo().optional(),output:no().optional(),errorText:no().optional()}),io({type:bi().startsWith("tool-"),toolCallId:bi(),state:go("input-available"),input:eo(),output:no().optional(),errorText:no().optional(),callProviderMetadata:gl.optional()}),io({type:bi().startsWith("tool-"),toolCallId:bi(),state:go("output-available"),input:eo(),output:eo(),errorText:no().optional(),callProviderMetadata:gl.optional(),preliminary:Gi().optional()}),io({type:bi().startsWith("tool-"),toolCallId:bi(),state:go("output-error"),input:eo(),output:no().optional(),errorText:bi(),callProviderMetadata:gl.optional()})];io({id:bi(),role:Do(["system","user","assistant"]),metadata:eo().optional(),parts:uo(lo([pf,hf,vf,mf,Df,yf,gf].concat(Ff,Ef)))});var _f,bf,kf,Cf,Af,wf,xf,Sf,Bf,Of,If=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((df||(df=1,ff=function(e,t){if("function"!=typeof e)throw new TypeError("Expected the first argument to be a `function`, got `".concat(dn(e),"`."));var n,r=0;return function(){for(var u=this,a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];clearTimeout(n);var s=Date.now(),c=t-(s-r);c<=0?(r=s,e.apply(this,i)):n=setTimeout((function(){r=Date.now(),e.apply(u,i)}),c)}}),ff)),Tf=function(e,t,n){if(!t.has(e))throw TypeError("Cannot "+n)},Pf=function(e,t,n){return Tf(e,t,"read from private field"),n?n.call(e):t.get(e)},jf=function(e,t,n){if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Nf=function(e,t,n,r){return Tf(e,t,"write to private field"),t.set(e,n),n},zf=function(){return o((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];a(this,e),jf(this,_f,void 0),jf(this,bf,"ready"),jf(this,kf,void 0),jf(this,Cf,new Set),jf(this,Af,new Set),jf(this,wf,new Set),this.pushMessage=function(e){Nf(t,_f,Pf(t,_f).concat(e)),Pf(t,xf).call(t)},this.popMessage=function(){Nf(t,_f,Pf(t,_f).slice(0,-1)),Pf(t,xf).call(t)},this.replaceMessage=function(e,n){Nf(t,_f,[].concat(F(Pf(t,_f).slice(0,e)),[t.snapshot(n)],F(Pf(t,_f).slice(e+1)))),Pf(t,xf).call(t)},this.snapshot=function(e){return structuredClone(e)},this["~registerMessagesCallback"]=function(e,n){var r=n?function(e,t){return null!=t?If(e,t):e}(e,n):e;return Pf(t,Cf).add(r),function(){Pf(t,Cf).delete(r)}},this["~registerStatusCallback"]=function(e){return Pf(t,Af).add(e),function(){Pf(t,Af).delete(e)}},this["~registerErrorCallback"]=function(e){return Pf(t,wf).add(e),function(){Pf(t,wf).delete(e)}},jf(this,xf,(function(){Pf(t,Cf).forEach((function(e){return e()}))})),jf(this,Sf,(function(){Pf(t,Af).forEach((function(e){return e()}))})),jf(this,Bf,(function(){Pf(t,wf).forEach((function(e){return e()}))})),Nf(this,_f,n)}),[{key:"status",get:function(){return Pf(this,bf)},set:function(e){Nf(this,bf,e),Pf(this,Sf).call(this)}},{key:"error",get:function(){return Pf(this,kf)},set:function(e){Nf(this,kf,e),Pf(this,Bf).call(this)}},{key:"messages",get:function(){return Pf(this,_f)},set:function(e){Nf(this,_f,F(e)),Pf(this,xf).call(this)}}])}();_f=new WeakMap,bf=new WeakMap,kf=new WeakMap,Cf=new WeakMap,Af=new WeakMap,wf=new WeakMap,xf=new WeakMap,Sf=new WeakMap,Bf=new WeakMap;var Rf=function(){function e(n){var r,i=n.messages,o=m(n,Lt);a(this,e);var s=new zf(i);return r=u(this,e,[v(v({},o),{},{state:s})]),jf(t(r),Of,void 0),r["~registerMessagesCallback"]=function(e,n){return Pf(t(r),Of)["~registerMessagesCallback"](e,n)},r["~registerStatusCallback"]=function(e){return Pf(t(r),Of)["~registerStatusCallback"](e)},r["~registerErrorCallback"]=function(e){return Pf(t(r),Of)["~registerErrorCallback"](e)},Nf(t(r),Of,s),r}return d(e,cf),o(e)}();function Mf(e,t){var n=void 0;return function(){for(var r=arguments.length,u=new Array(r),a=0;a<r;a++)u[a]=arguments[a];n&&clearTimeout(n),n=setTimeout((function(){return e.apply(void 0,u)}),t)}}function Zf(e){return e.reduce((function(e,t){return e.concat(t)}),[])}Of=new WeakMap;var Lf=0;function $f(e){return 0===e.collections.length?0:e.collections.reduce((function(e,t){return e+t.items.length}),0)}function qf(e){return e!==Object(e)}function Uf(e,t){if(e===t)return!0;if(qf(e)||qf(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var u=r[n];if(!(u in t))return!1;if(!Uf(e[u],t[u]))return!1}return!0}var Hf=function(){},Vf=[{segment:"autocomplete-core",version:"1.19.2"}];function Wf(e){var t=e.item,n=e.items,r=void 0===n?[]:n;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex((function(e){return e.objectID===t.objectID}))],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function Kf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Jf=["items"],Gf=["items"];function Qf(e){return Qf="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},Qf(e)}function Yf(e){return function(e){if(Array.isArray(e))return Xf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Xf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xf(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ed(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n,r,u={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function td(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?td(Object(n),!0).forEach((function(t){rd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):td(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rd(e,t,n){return(t=function(e){var t=function(e){if("object"!==Qf(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Qf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Qf(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ud(e){return e.map((function(e){var t=e.items,n=ed(e,Jf);return nd(nd({},n),{},{objectIDs:(null==t?void 0:t.map((function(e){return e.objectID})))||n.objectIDs})}))}function ad(e){var t,n,r,u=(t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,a,i,o=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(s=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);s=!0);}catch(e){c=!0,u=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw u}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Kf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kf(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((e.version||"").split(".").map(Number),2),n=t[0],r=t[1],n>=3||2===n&&r>=4||1===n&&r>=10);function a(t,n,r){if(u&&void 0!==r){var a=r[0].__autocomplete_algoliaCredentials,i={"X-Algolia-Application-Id":a.appId,"X-Algolia-API-Key":a.apiKey};e.apply(void 0,[t].concat(Yf(n),[{headers:i}]))}else e.apply(void 0,[t].concat(Yf(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e("setAuthenticatedUserToken",t)},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("clickedObjectIDsAfterSearch",ud(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("clickedObjectIDs",ud(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("convertedObjectIDsAfterSearch",ud(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("convertedObjectIDs",ud(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&t.reduce((function(e,t){var n=t.items,r=ed(t,Gf);return[].concat(Yf(e),Yf(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r<e.objectIDs.length;r+=t)n.push(nd(nd({},e),{},{objectIDs:e.objectIDs.slice(r,r+t)}));return n}(nd(nd({},r),{},{objectIDs:(null==n?void 0:n.map((function(e){return e.objectID})))||r.objectIDs})).map((function(e){return{items:n,payload:e}}))))}),[]).forEach((function(e){var t=e.items;return a("viewedObjectIDs",[e.payload],t)}))},viewedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function id(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function od(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function sd(e){return sd="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},sd(e)}function cd(e){return function(e){if(Array.isArray(e))return ld(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ld(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ld(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ld(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fd(Object(n),!0).forEach((function(t){pd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pd(e,t,n){return(t=function(e){var t=function(e){if("object"!==sd(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==sd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===sd(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hd="2.15.0",vd="https://cdn.jsdelivr.net/npm/search-insights@".concat(hd,"/dist/search-insights.min.js"),md=Mf((function(e){var t=e.onItemsChange,n=e.items,r=e.insights,u=e.state;t({insights:r,insightsEvents:id({items:n}).map((function(e){return dd({eventName:"Items Viewed"},e)})),state:u})}),400);function Dd(e){var t=function(e){return dd({onItemsChange:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.viewedObjectIDs.apply(t,cd(n.map((function(e){return dd(dd({},e),{},{algoliaSource:yd(e.algoliaSource,r.context)})}))))},onSelect:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.clickedObjectIDsAfterSearch.apply(t,cd(n.map((function(e){return dd(dd({},e),{},{algoliaSource:yd(e.algoliaSource,r.context)})}))))},onActive:Hf,__autocomplete_clickAnalytics:!0},e)}(e),n=t.insightsClient,r=t.insightsInitParams,u=t.onItemsChange,a=t.onSelect,i=t.onActive,o=t.__autocomplete_clickAnalytics,s=n;if(n||"undefined"!=typeof window&&function(e){var t=e.window,n=t.AlgoliaAnalyticsObject||"aa";"string"==typeof n&&(s=t[n]),s||(t.AlgoliaAnalyticsObject=n,t[n]||(t[n]=function(){t[n].queue||(t[n].queue=[]);for(var e=arguments.length,r=new Array(e),u=0;u<e;u++)r[u]=arguments[u];t[n].queue.push(r)}),t[n].version=hd,s=t[n],function(e){var t="[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete";try{var n=e.document.createElement("script");n.async=!0,n.src=vd,n.onerror=function(){console.error(t)},document.body.appendChild(n)}catch(e){console.error(t)}}(t))}({window:window}),!s)return{};r&&s("init",dd({partial:!0},r));var c=ad(s),l={current:[]},f=Mf((function(e){var t=e.state;if(t.isOpen){var n=t.collections.reduce((function(e,t){return[].concat(cd(e),cd(t.items))}),[]).filter(od);Uf(l.current.map((function(e){return e.objectID})),n.map((function(e){return e.objectID})))||(l.current=n,n.length>0&&md({onItemsChange:u,items:n,insights:c,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive;function u(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:dd(dd({},o?{clickAnalytics:!0}:{}),e?{userToken:gd(e)}:{}),insights:c}})}s("addAlgoliaAgent","insights-plugin"),u(),s("onUserTokenChange",(function(e){u(e)})),s("getUserToken",null,(function(e,t){u(t)})),n((function(e){var t=e.item,n=e.state,r=e.event,u=e.source;od(t)&&a({state:n,event:r,insights:c,item:t,insightsEvents:[dd({eventName:"Item Selected"},Wf({item:t,items:u.getItems().filter(od)}))]})})),r((function(e){var t=e.item,n=e.source,r=e.state,u=e.event;od(t)&&i({state:r,event:u,insights:c,item:t,insightsEvents:[dd({eventName:"Item Active"},Wf({item:t,items:n.getItems().filter(od)}))]})}))},onStateChange:function(e){var t=e.state;f({state:t})},__autocomplete_pluginOptions:e}}function yd(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(cd(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),["autocomplete-internal"],cd(null!==(e=t.algoliaInsightsPlugin)&&void 0!==e&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function gd(e){return"number"==typeof e?e.toString():e}function Fd(e,t){var n=t;return{then:function(t,r){return Fd(e.then(_d(t,n,e),_d(r,n,e)),n)},catch:function(t){return Fd(e.catch(_d(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),Fd(e.finally(_d(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach((function(e){e()}))},isCanceled:function(){return!0===n.isCanceled}}}function Ed(e){return Fd(e,{isCanceled:!1,onCancelList:[]})}function _d(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}var bd,kd=!0;function Cd(){var e=[];return{add:function(t){return e.push(t),t.finally((function(){e=e.filter((function(e){return e!==t}))}))},cancelAll:function(){e.forEach((function(e){return e.cancel()}))},isEmpty:function(){return 0===e.length},wait:function(t){return kd?(kd=!1,(bd=t?Promise.race([Promise.all(e),new Promise((function(e){return setTimeout(e,t)}))]):Promise.all(e)).then((function(){kd=!0}))):bd}}}function Ad(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var u=(null===t?-1:t)+e;return u<=-1||u>=n?null===r?null:0:u}function wd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wd(Object(n),!0).forEach((function(t){Sd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sd(e,t,n){return(t=function(e){var t=function(e){if("object"!==Bd(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Bd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Bd(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bd(e){return Bd="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},Bd(e)}function Od(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Id=function(e,t){var n,r=!1,u=[],a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Od(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Od(e,t):void 0}}(e))||t){n&&(e=n);var r=0,u=function(){};return{s:u,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw a}}}}(e);try{for(a.s();!(n=a.n()).done;){var i,o,s,c=null===(i=n.value.__autocomplete_pluginOptions)||void 0===i||null===(o=(s=i).awaitSubmit)||void 0===o?void 0:o.call(s);if("number"==typeof c)u.push(c);else if(!0===c){r=!0;break}}}catch(e){a.e(e)}finally{a.f()}return r?t.wait():u.length>0?t.wait(Math.max.apply(Math,u)):void 0};function Td(e){var t=function(e){var t=e.collections.map((function(e){return e.items.length})).reduce((function(e,t,n){var r=(e[n-1]||0)+t;return e.push(r),e}),[]).reduce((function(t,n){return n<=e.activeItemId?t+1:t}),0);return e.collections[t]}(e);if(!t)return null;var n=t.items[function(e){for(var t=e.state,n=e.collection,r=!1,u=0,a=0;!1===r;){var i=t.collections[u];if(i===n){r=!0;break}a+=i.items.length,u++}return t.activeItemId-a}({state:e,collection:t})],r=t.source;return{item:n,itemInputValue:r.getItemInputValue({item:n,state:e}),itemUrl:r.getItemUrl({item:n,state:e}),source:r}}function Pd(e,t,n){return[e,null==n?void 0:n.sourceId,t].filter(Boolean).join("-").replace(/\s/g,"")}var jd=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function Nd(e){return e.nativeEvent||e}function zd(e){return zd="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},zd(e)}function Rd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Md(e,t,n){return(t=function(e){var t=function(e){if("object"!==zd(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==zd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===zd(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zd(e){return Zd="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},Zd(e)}function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ld(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ld(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qd(e,t,n){return(t=function(e){var t=function(e){if("object"!==Zd(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Zd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Zd(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ud(e){return Ud="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},Ud(e)}function Hd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vd(Object(n),!0).forEach((function(t){Kd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kd(e,t,n){return(t=function(e){var t=function(e){if("object"!==Ud(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Ud(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ud(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jd(e,t){var n,r="undefined"!=typeof window?window:{},u=e.plugins||[];return Wd(Wd({debug:!1,openOnFocus:!1,enterKeyHint:void 0,ignoreCompositionEvents:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:void 0,environment:r,shouldPanelOpen:function(e){return $f(e.state)>0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:"autocomplete-".concat(Lf++),plugins:u,initialState:Wd({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),u.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),u.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),u.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(function(e){return function(e){if(Array.isArray(e))return Hd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Hd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hd(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(u.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:Hf,onResolve:Hf};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=xd(xd({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return Zf(e)})).then((function(e){return e.map((function(e){return Wd(Wd({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:Wd({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function Gd(e){return Gd="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},Gd(e)}function Qd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qd(Object(n),!0).forEach((function(t){Xd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xd(e,t,n){return(t=function(e){var t=function(e){if("object"!==Gd(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Gd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Gd(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ep(e){return ep="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},ep(e)}function tp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function np(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tp(Object(n),!0).forEach((function(t){rp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rp(e,t,n){return(t=function(e){var t=function(e){if("object"!==ep(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==ep(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ep(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function up(e){return function(e){if(Array.isArray(e))return ap(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ap(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ap(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ap(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ip(e){return Boolean(e.execute)}function op(e){var t=e.reduce((function(e,t){if(!ip(t))return e.push(t),e;var n=t.searchClient,r=t.execute,u=t.requesterId,a=t.requests,i=e.find((function(e){return ip(t)&&ip(e)&&e.searchClient===n&&Boolean(u)&&e.requesterId===u}));if(i){var o;(o=i.items).push.apply(o,up(a))}else{var s={execute:r,requesterId:u,items:a,searchClient:n};e.push(s)}return e}),[]).map((function(e){if(!ip(e))return Promise.resolve(e);var t=e,n=t.execute,r=t.items;return n({searchClient:t.searchClient,requests:r})}));return Promise.all(t).then((function(e){return Zf(e)}))}function sp(e){return sp="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},sp(e)}var cp=["event","nextState","props","query","refresh","store"];function lp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lp(Object(n),!0).forEach((function(t){dp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dp(e,t,n){return(t=function(e){var t=function(e){if("object"!==sp(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==sp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===sp(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pp,hp,vp,mp=null,Dp=(pp=-1,hp=-1,vp=void 0,function(e){var t=++pp;return Promise.resolve(e).then((function(e){return vp&&t<hp?vp:(hp=t,vp=e,e)}))});function yp(e){var t=e.event,n=e.nextState,r=void 0===n?{}:n,u=e.props,a=e.query,i=e.refresh,o=e.store,s=function(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n,r,u={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}(e,cp);mp&&u.environment.clearTimeout(mp);var c=s.setCollections,l=s.setIsOpen,f=s.setQuery,d=s.setActiveItemId,p=s.setStatus,h=s.setContext;if(f(a),d(u.defaultActiveItemId),!a&&!1===u.openOnFocus){var v,m=o.getState().collections.map((function(e){return fp(fp({},e),{},{items:[]})}));p("idle"),c(m),l(null!==(v=r.isOpen)&&void 0!==v?v:u.shouldPanelOpen({state:o.getState()}));var D=Ed(Dp(m).then((function(){return Promise.resolve()})));return o.pendingRequests.add(D)}p("loading"),mp=u.environment.setTimeout((function(){p("stalled")}),u.stallThreshold);var y=Ed(Dp(u.getSources(fp({query:a,refresh:i,state:o.getState()},s)).then((function(e){return Promise.all(e.map((function(e){return Promise.resolve(e.getItems(fp({query:a,refresh:i,state:o.getState()},s))).then((function(t){return function(e,t,n){if(u=e,Boolean(null==u?void 0:u.execute)){var r="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(up(Object.keys(n.context).map((function(e){var t;return null===(t=n.context[e])||void 0===t?void 0:t.__algoliaSearchParameters}))))):{};return np(np({},e),{},{requests:e.queries.map((function(n){return{query:"algolia"===e.requesterId?np(np({},n),{},{params:np(np({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}}))})}var u;return{items:e,sourceId:t}}(t,e.sourceId,o.getState())}))}))).then(op).then((function(t){var n,r=t.some((function(e){return function(e){return!Array.isArray(e)&&Boolean(null==e?void 0:e._automaticInsights)}(e.items)}));return r&&h({algoliaInsightsPlugin:fp(fp({},(null===(n=o.getState().context)||void 0===n?void 0:n.algoliaInsightsPlugin)||{}),{},{__automaticInsights:r})}),function(e,t,n){return t.map((function(t){var r,u=e.filter((function(e){return e.sourceId===t.sourceId})),a=u.map((function(e){return e.items})),i=u[0].transformResponse,o=i?i({results:r=a,hits:r.map((function(e){return e.hits})).filter(Boolean),facetHits:r.map((function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map((function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}}))})).filter(Boolean)}):a;return t.onResolve({source:t,results:a,items:o,state:n.getState()}),o.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:o}}))}(t,e,o)})).then((function(e){return function(e){var t=e.props,n=e.state,r=e.collections.reduce((function(e,t){return Yd(Yd({},e),{},Xd({},t.source.sourceId,Yd(Yd({},t.source),{},{getItems:function(){return Zf(t.items)}})))}),{}),u=t.plugins.reduce((function(e,t){return t.reshape?t.reshape(e):e}),{sourcesBySourceId:r,state:n}).sourcesBySourceId;return Zf(t.reshape({sourcesBySourceId:u,sources:Object.values(u),state:n})).filter(Boolean).map((function(e){return{source:e,items:e.getItems()}}))}({collections:e,props:u,state:o.getState()})}))})))).then((function(e){var n;p("idle"),c(e);var f=u.shouldPanelOpen({state:o.getState()});l(null!==(n=r.isOpen)&&void 0!==n?n:u.openOnFocus&&!a&&f||f);var d=Td(o.getState());if(null!==o.getState().activeItemId&&d){var h=d.item,v=d.itemInputValue,m=d.itemUrl,D=d.source;D.onActive(fp({event:t,item:h,itemInputValue:v,itemUrl:m,refresh:i,source:D,state:o.getState()},s))}})).finally((function(){p("idle"),mp&&u.environment.clearTimeout(mp)}));return o.pendingRequests.add(y)}function gp(e){return gp="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},gp(e)}var Fp=["event","props","refresh","store"];function Ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ep(Object(n),!0).forEach((function(t){bp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ep(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bp(e,t,n){return(t=function(e){var t=function(e){if("object"!==gp(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==gp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===gp(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kp(e){return kp="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},kp(e)}var Cp=["props","refresh","store"],Ap=["inputElement","formElement","panelElement"],wp=["inputElement"],xp=["inputElement","maxLength"],Sp=["source"],Bp=["item","source"];function Op(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ip(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Op(Object(n),!0).forEach((function(t){Tp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Op(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tp(e,t,n){return(t=function(e){var t=function(e){if("object"!==kp(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==kp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===kp(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pp(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n,r,u={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function jp(e){var t=e.props,n=e.refresh,r=e.store,u=Pp(e,Cp);return{getEnvironmentProps:function(e){var n=e.inputElement,u=e.formElement,a=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[u,a].some((function(t){return(n=t)===(r=e.target)||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return Ip({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},Pp(e,Ap))},getRootProps:function(e){return Ip({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-controls":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return Pd(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":Pd(t.id,"label")},e)},getFormProps:function(e){e.inputElement;var a=Pp(e,wp),i=function(a){var i;t.onSubmit(Ip({event:a,refresh:n,state:r.getState()},u)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()};return Ip({action:"",noValidate:!0,role:"search",onSubmit:function(e){e.preventDefault();var n=Id(t.plugins,r.pendingRequests);void 0!==n?n.then((function(){return i(e)})):i(e)},onReset:function(a){var i;a.preventDefault(),t.onReset(Ip({event:a,refresh:n,state:r.getState()},u)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},a)},getLabelProps:function(e){return Ip({htmlFor:Pd(t.id,"input"),id:Pd(t.id,"label")},e)},getInputProps:function(e){var a;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&yp(Ip({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},u)),r.dispatch("focus",null)}var o=e||{};o.inputElement;var s=o.maxLength,c=void 0===s?512:s,l=Pp(o,xp),f=Td(r.getState()),d=function(e){return Boolean(e&&e.match(jd))}((null===(a=t.environment.navigator)||void 0===a?void 0:a.userAgent)||""),p=t.enterKeyHint||(null!=f&&f.itemUrl&&!d?"go":"search");return Ip({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?Pd(t.id,"item-".concat(r.getState().activeItemId),null==f?void 0:f.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.filter((function(e){return e.items.length>0})).map((function(e){var n=e.source;return Pd(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":Pd(t.id,"label"),value:r.getState().completion||r.getState().query,id:Pd(t.id,"input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:p,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:"search",onChange:function(e){var a=e.currentTarget.value;t.ignoreCompositionEvents&&Nd(e).isComposing?u.setQuery(a):yp(Ip({event:e,props:t,query:a.slice(0,c),refresh:n,store:r},u))},onCompositionEnd:function(e){yp(Ip({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},u))},onKeyDown:function(e){Nd(e).isComposing||function(e){var t=e.event,n=e.props,r=e.refresh,u=e.store,a=function(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n,r,u={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}(e,Fp);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=Td(u.getState()),t=n.environment.document.getElementById(Pd(n.id,"item-".concat(u.getState().activeItemId),null==e?void 0:e.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},o=function(){var e=Td(u.getState());if(null!==u.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,o=e.itemUrl,s=e.source;s.onActive(_p({event:t,item:n,itemInputValue:i,itemUrl:o,refresh:r,source:s,state:u.getState()},a))}};t.preventDefault(),!1===u.getState().isOpen&&(n.openOnFocus||Boolean(u.getState().query))?yp(_p({event:t,props:n,query:u.getState().query,refresh:r,store:u},a)).then((function(){u.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),o(),setTimeout(i,0)})):(u.dispatch(t.key,{}),o(),i())}else if("Escape"===t.key)t.preventDefault(),u.dispatch(t.key,null),u.pendingRequests.cancelAll();else if("Tab"===t.key)u.dispatch("blur",null),u.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===u.getState().activeItemId||u.getState().collections.every((function(e){return 0===e.items.length}))){var s=Id(n.plugins,u.pendingRequests);return void(void 0!==s?s.then(u.pendingRequests.cancelAll):n.debug||u.pendingRequests.cancelAll())}t.preventDefault();var c=Td(u.getState()),l=c.item,f=c.itemInputValue,d=c.itemUrl,p=c.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(p.onSelect(_p({event:t,item:l,itemInputValue:f,itemUrl:d,refresh:r,source:p,state:u.getState()},a)),n.navigator.navigateNewTab({itemUrl:d,item:l,state:u.getState()}));else if(t.shiftKey)void 0!==d&&(p.onSelect(_p({event:t,item:l,itemInputValue:f,itemUrl:d,refresh:r,source:p,state:u.getState()},a)),n.navigator.navigateNewWindow({itemUrl:d,item:l,state:u.getState()}));else if(t.altKey);else{if(void 0!==d)return p.onSelect(_p({event:t,item:l,itemInputValue:f,itemUrl:d,refresh:r,source:p,state:u.getState()},a)),void n.navigator.navigate({itemUrl:d,item:l,state:u.getState()});yp(_p({event:t,nextState:{isOpen:!1},props:n,query:f,refresh:r,store:u},a)).then((function(){p.onSelect(_p({event:t,item:l,itemInputValue:f,itemUrl:d,refresh:r,source:p,state:u.getState()},a))}))}}}(Ip({event:e,props:t,refresh:n,store:r},u))},onFocus:i,onBlur:Hf,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},l)},getPanelProps:function(e){return Ip({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.source,u=Pp(n,Sp);return Ip({role:"listbox","aria-labelledby":Pd(t.id,"label"),id:Pd(t.id,"list",r)},u)},getItemProps:function(e){var a=e.item,i=e.source,o=Pp(e,Bp);return Ip({id:Pd(t.id,"item-".concat(a.__autocomplete_id),i),role:"option","aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",a.__autocomplete_id);var t=Td(r.getState());if(null!==r.getState().activeItemId&&t){var i=t.item,o=t.itemInputValue,s=t.itemUrl,c=t.source;c.onActive(Ip({event:e,item:i,itemInputValue:o,itemUrl:s,refresh:n,source:c,state:r.getState()},u))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var o=i.getItemInputValue({item:a,state:r.getState()}),s=i.getItemUrl({item:a,state:r.getState()});(s?Promise.resolve():yp(Ip({event:e,nextState:{isOpen:!1},props:t,query:o,refresh:n,store:r},u))).then((function(){i.onSelect(Ip({event:e,item:a,itemInputValue:o,itemUrl:s,refresh:n,source:i,state:r.getState()},u))}))}},o)}}}function Np(e){return Np="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},Np(e)}function zp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zp(Object(n),!0).forEach((function(t){Mp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mp(e,t,n){return(t=function(e){var t=function(e){if("object"!==Np(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Np(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Np(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zp(e){var t,n,r,u,a=e.plugins,i=e.options,o=null===(t=((null===(n=i.__autocomplete_metadata)||void 0===n?void 0:n.userAgents)||[])[0])||void 0===t?void 0:t.segment,s=o?Mp({},o,Object.keys((null===(r=i.__autocomplete_metadata)||void 0===r?void 0:r.options)||{})):{};return{plugins:a.map((function(e){return{name:e.name,options:Object.keys(e.__autocomplete_pluginOptions||[])}})),options:Rp({"autocomplete-core":Object.keys(i)},s),ua:Vf.concat((null===(u=i.__autocomplete_metadata)||void 0===u?void 0:u.userAgents)||[])}}function Lp(e){var t,n=e.state;return!1===n.isOpen||null===n.activeItemId?null:(null===(t=Td(n))||void 0===t?void 0:t.itemInputValue)||null}function $p(e){return $p="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},$p(e)}function qp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Up(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qp(Object(n),!0).forEach((function(t){Hp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Hp(e,t,n){return(t=function(e){var t=function(e){if("object"!==$p(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==$p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===$p(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vp=function(e,t){switch(t.type){case"setActiveItemId":case"mousemove":return Up(Up({},e),{},{activeItemId:t.payload});case"setQuery":return Up(Up({},e),{},{query:t.payload,completion:null});case"setCollections":return Up(Up({},e),{},{collections:t.payload});case"setIsOpen":return Up(Up({},e),{},{isOpen:t.payload});case"setStatus":return Up(Up({},e),{},{status:t.payload});case"setContext":return Up(Up({},e),{},{context:Up(Up({},e.context),t.payload)});case"ArrowDown":var n=Up(Up({},e),{},{activeItemId:t.payload.hasOwnProperty("nextActiveItemId")?t.payload.nextActiveItemId:Ad(1,e.activeItemId,$f(e),t.props.defaultActiveItemId)});return Up(Up({},n),{},{completion:Lp({state:n})});case"ArrowUp":var r=Up(Up({},e),{},{activeItemId:Ad(-1,e.activeItemId,$f(e),t.props.defaultActiveItemId)});return Up(Up({},r),{},{completion:Lp({state:r})});case"Escape":return e.isOpen?Up(Up({},e),{},{activeItemId:null,isOpen:!1,completion:null}):Up(Up({},e),{},{activeItemId:null,query:"",status:"idle",collections:[]});case"submit":return Up(Up({},e),{},{activeItemId:null,isOpen:!1,status:"idle"});case"reset":return Up(Up({},e),{},{activeItemId:!0===t.props.openOnFocus?t.props.defaultActiveItemId:null,status:"idle",completion:null,query:""});case"focus":return Up(Up({},e),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||Boolean(e.query))&&t.props.shouldPanelOpen({state:e})});case"blur":return t.props.debug?e:Up(Up({},e),{},{isOpen:!1,activeItemId:null});case"mouseleave":return Up(Up({},e),{},{activeItemId:t.props.defaultActiveItemId});default:return"The reducer action ".concat(JSON.stringify(t.type)," is not supported."),e}};function Wp(e){return Wp="function"==typeof Symbol&&"symbol"==_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},Wp(e)}function Kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kp(Object(n),!0).forEach((function(t){Gp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gp(e,t,n){return(t=function(e){var t=function(e){if("object"!==Wp(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Wp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Wp(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qp(e){var t=[],n=Jd(e,t),r=function(e,t,n){var r=t.initialState;return{getState:function(){return r},dispatch:function(u,a){var i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rd(Object(n),!0).forEach((function(t){Md(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},r);r=e(r,{type:u,props:t,payload:a}),n({state:r,prevState:i})},pendingRequests:Cd()}}(Vp,n,(function(e){var t,r,a=e.prevState,c=e.state;if(n.onStateChange(Jp({prevState:a,state:c,refresh:i,navigator:n.navigator},u)),!s()&&null!==(t=c.context)&&void 0!==t&&null!==(r=t.algoliaInsightsPlugin)&&void 0!==r&&r.__automaticInsights&&!1!==n.insights){var l=Dd({__autocomplete_clickAnalytics:!1});n.plugins.push(l),o([l])}})),u=function(e){var t=e.store;return{setActiveItemId:function(e){t.dispatch("setActiveItemId",e)},setQuery:function(e){t.dispatch("setQuery",e)},setCollections:function(e){var n=0,r=e.map((function(e){return $d($d({},e),{},{items:Zf(e.items).map((function(e){return $d($d({},e),{},{__autocomplete_id:n++})}))})}));t.dispatch("setCollections",r)},setIsOpen:function(e){t.dispatch("setIsOpen",e)},setStatus:function(e){t.dispatch("setStatus",e)},setContext:function(e){t.dispatch("setContext",e)}}}({store:r}),a=jp(Jp({props:n,refresh:i,store:r,navigator:n.navigator},u));function i(){return yp(Jp({event:new Event("input"),nextState:{isOpen:r.getState().isOpen},props:n,navigator:n.navigator,query:r.getState().query,refresh:i,store:r},u))}function o(e){e.forEach((function(e){var r;return null===(r=e.subscribe)||void 0===r?void 0:r.call(e,Jp(Jp({},u),{},{navigator:n.navigator,refresh:i,onSelect:function(e){t.push({onSelect:e})},onActive:function(e){t.push({onActive:e})},onResolve:function(e){t.push({onResolve:e})}}))}))}function s(){return n.plugins.some((function(e){return"aa.algoliaInsightsPlugin"===e.name}))}if(n.insights&&!s()){var c="boolean"==typeof n.insights?{}:n.insights;n.plugins.push(Dd(c))}return o(n.plugins),function(e){var t,n,r=e.metadata,u=e.environment;if(null===(t=u.navigator)||void 0===t||null===(n=t.userAgent)||void 0===n?void 0:n.includes("Algolia Crawler")){var a=u.document.createElement("meta"),i=u.document.querySelector("head");a.name="algolia:metadata",setTimeout((function(){a.content=JSON.stringify(r),i.appendChild(a)}),0)}}({metadata:Zp({plugins:n.plugins,options:e}),environment:n.environment}),Jp(Jp({refresh:i,navigator:n.navigator},a),u)}var Yp="https://askai.algolia.com/chat",Xp="askai_token",eh=function(e){if(!e)return!0;try{var t=function(e){var t=cn(e.split("."),1)[0];return JSON.parse(atob(t))}(e),n=t.exp;return Date.now()/1e3>n-30}catch(e){return!0}},th=null,nh=function(){var e=Ht(on().mark((function e(t){var n,r;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.assistantId,r=sessionStorage.getItem(Xp),eh(r)){e.next=4;break}return e.abrupt("return",r);case 4:return th||(th=fetch("".concat(Yp,"/token"),{method:"POST",headers:{"x-algolia-assistant-id":n,"content-type":"application/json"}}).then((function(e){return e.json()})).then((function(e){var t=e.token;return sessionStorage.setItem(Xp,t),t})).finally((function(){return th=null}))),e.abrupt("return",th);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),rh=function(){var e=Ht(on().mark((function e(t){var n,r,u,a,i,o;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.assistantId,r=t.thumbs,u=t.messageId,a=t.appId,(i=new Headers).set("x-algolia-assistant-id",n),i.set("content-type","application/json"),e.next=7,nh({assistantId:n});case 7:o=e.sent,i.set("authorization","TOKEN ".concat(o));case 9:return e.abrupt("return",fetch("".concat(Yp,"/feedback"),{method:"POST",body:JSON.stringify({appId:a,messageId:u,thumbs:r}),headers:i}));case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function uh(e){var t=e.translations,n=(void 0===t?{}:t).poweredByText,r=void 0===n?"Powered by":n;return jt.createElement("a",{href:"https://www.algolia.com/ref/docsearch/?utm_source=".concat(window.location.hostname,"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"),target:"_blank",rel:"noopener noreferrer"},jt.createElement("span",{className:"DocSearch-Label"},r),jt.createElement("svg",{width:"80",height:"24","aria-label":"Algolia",role:"img",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2196.2 500"},jt.createElement("defs",null,jt.createElement("style",null,".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}")),jt.createElement("path",{className:"cls-2",d:"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),jt.createElement("rect",{className:"cls-1",x:"1845.88",y:"104.73",width:"62.58",height:"277.9",rx:"5.9",ry:"5.9"}),jt.createElement("path",{className:"cls-2",d:"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"}),jt.createElement("path",{className:"cls-2",d:"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),jt.createElement("path",{className:"cls-2",d:"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"}),jt.createElement("path",{className:"cls-2",d:"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),jt.createElement("path",{className:"cls-2",d:"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),jt.createElement("path",{className:"cls-2",d:"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"}),jt.createElement("path",{className:"cls-1",d:"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"})))}function ah(e){return jt.createElement("svg",{width:"20",height:"20","aria-label":e.ariaLabel,viewBox:"0 0 24 24",role:"img"},jt.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.4"},e.children))}function ih(e){var t=e.translations,n=void 0===t?{}:t,r=e.isAskAiActive,u=void 0!==r&&r,a=n.selectText,i=void 0===a?"Select":a,o=n.selectKeyAriaLabel,s=void 0===o?"Enter key":o,c=n.submitQuestionText,l=void 0===c?"Submit question":c,f=n.navigateText,d=void 0===f?"Navigate":f,p=n.navigateUpKeyAriaLabel,h=void 0===p?"Arrow up":p,v=n.navigateDownKeyAriaLabel,m=void 0===v?"Arrow down":v,D=n.closeText,y=void 0===D?"Close":D,g=n.backToSearchText,F=void 0===g?"Back to search":g,E=n.closeKeyAriaLabel,_=void 0===E?"Escape key":E,b=n.poweredByText,k=void 0===b?"Powered by":b;return jt.createElement(jt.Fragment,null,jt.createElement("div",{className:"DocSearch-Logo"},jt.createElement(uh,{translations:{poweredByText:k}})),jt.createElement("ul",{className:"DocSearch-Commands"},jt.createElement("li",null,jt.createElement("kbd",{className:"DocSearch-Commands-Key"},jt.createElement(ah,{ariaLabel:m},jt.createElement("path",{d:"M12 5v14"}),jt.createElement("path",{d:"m19 12-7 7-7-7"}))),jt.createElement("kbd",{className:"DocSearch-Commands-Key"},jt.createElement(ah,{ariaLabel:h},jt.createElement("path",{d:"m5 12 7-7 7 7"}),jt.createElement("path",{d:"M12 19V5"}))),jt.createElement("span",{className:"DocSearch-Label"},d)),jt.createElement("li",null,jt.createElement("kbd",{className:"DocSearch-Commands-Key"},jt.createElement(ah,{ariaLabel:s},jt.createElement("polyline",{points:"9 10 4 15 9 20"}),jt.createElement("path",{d:"M20 4v7a4 4 0 0 1-4 4H4"}))),jt.createElement("span",{className:"DocSearch-Label"},u?l:i)),jt.createElement("li",null,jt.createElement("kbd",{className:"DocSearch-Commands-Key"},jt.createElement("span",{className:"DocSearch-Escape-Key"},"ESC")),jt.createElement("span",{className:"DocSearch-Label","aria-label":_},u?F:y))))}function oh(e){var t=e.hit,n=e.children;return jt.createElement("a",{href:t.url},n)}function sh(e){var t=e.className;return jt.createElement("svg",{viewBox:"0 0 38 38",className:t,stroke:"currentColor",strokeOpacity:".5"},jt.createElement("g",{fill:"none",fillRule:"evenodd"},jt.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},jt.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),jt.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},jt.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}function ch(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",className:"DocSearch-Hit-icon-sparkles"},jt.createElement("path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}),jt.createElement("path",{d:"M20 3v4"}),jt.createElement("path",{d:"M22 5h-4"}),jt.createElement("path",{d:"M4 17v2"}),jt.createElement("path",{d:"M5 18H3"}))}function lh(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},jt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("path",{d:"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0"}),jt.createElement("path",{d:"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13"})))}function fh(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},jt.createElement("path",{d:"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function dh(){return jt.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",className:"lucide lucide-triangle-alert-icon lucide-triangle-alert"},jt.createElement("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"}),jt.createElement("path",{d:"M12 9v4"}),jt.createElement("path",{d:"M12 17h.01"}))}function ph(){return jt.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},jt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),jt.createElement("path",{d:"M8 17l-6-6 6-6"})))}var hh=function(){return jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),jt.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),jt.createElement("path",{d:"M10 9H8"}),jt.createElement("path",{d:"M16 13H8"}),jt.createElement("path",{d:"M16 17H8"}))};function vh(e){switch(e.type){case"lvl1":return jt.createElement(hh,null);case"content":return jt.createElement(Dh,null);default:return jt.createElement(mh,null)}}function mh(){return jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("line",{x1:"4",x2:"20",y1:"9",y2:"9"}),jt.createElement("line",{x1:"4",x2:"20",y1:"15",y2:"15"}),jt.createElement("line",{x1:"10",x2:"8",y1:"3",y2:"21"}),jt.createElement("line",{x1:"16",x2:"14",y1:"3",y2:"21"}))}function Dh(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},jt.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function yh(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},jt.createElement("path",{d:"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function gh(){return jt.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("path",{d:"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0"}))}function Fh(){return jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 24 24",fill:"none",stroke:"#5a5e9a",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("path",{d:"m13.5 8.5-5 5"}),jt.createElement("path",{d:"m8.5 8.5 5 5"}),jt.createElement("circle",{cx:"11",cy:"11",r:"8"}),jt.createElement("path",{d:"m21 21-4.3-4.3"}))}var Eh,_h={before:"Searched for ",separator:", ",lastSeparator:" and ",after:""};function bh(e){var t=e.queries,n=e.translations,r=e.onSearchQueryClick;if(0===t.length)return null;if("function"==typeof n.aggregatedToolCallNode)return jt.createElement(jt.Fragment,null,n.aggregatedToolCallNode(t,r));var u=(n.aggregatedToolCallText?n.aggregatedToolCallText(t):_h)||{},a=u.before,i=void 0===a?"":a,o=u.separator,s=void 0===o?", ":o,c=u.lastSeparator,l=void 0===c?" and ":c,f=u.after,d=void 0===f?"":f;return jt.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--AggregatedResult"},jt.createElement(Fn,{size:18}),jt.createElement("span",null,i&&jt.createElement("span",null,i),t.map((function(e,n){return jt.createElement(H,{key:e+n},jt.createElement("span",{role:"button",tabIndex:0,className:"DocSearch-AskAiScreen-MessageContent-Tool-Query",onKeyDown:function(t){"enter"!==t.key&&" "!==t.key||(t.preventDefault(),r(e))},onClick:function(){return r(e)}},'"',e,'"'),n<t.length-2&&s,n===t.length-2&&l)})),d&&jt.createElement("span",null,d)))}var kh={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Ch(e){kh=e}var Ah={exec:function(){return null}};function wh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="string"==typeof e?e:e.source,r={replace:function(e,t){var u="string"==typeof t?t:t.source;return u=u.replace(xh.caret,"$1"),n=n.replace(e,u),r},getRegex:function(){return new RegExp(n,t)}};return r}var xh={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDD40-\uDD65\uDD6F-\uDD85\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC4\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDED0-\uDEE3\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0\uDFF0-\uDFF9]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D\uDD30-\uDD39]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDD70-\uDD79\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD833[\uDCF0-\uDCF9]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDDD0-\uDDED\uDDF0-\uDDFA\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:function(e){return new RegExp("^( {0,3}".concat(e,")((?:[\t ][^\\n]*)?(?:\\n|$))"))},nextBulletRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))"))},hrRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"))},fencesBeginRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}(?:```|~~~)"))},headingBeginRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}#"))},htmlBeginRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}<(?:[a-z].*>|!--)"),"i")}},Sh=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Bh=/(?:[*+-]|\d{1,9}[.)])/,Oh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ih=wh(Oh).replace(/bull/g,Bh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Th=wh(Oh).replace(/bull/g,Bh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ph=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,jh=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Nh=wh(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",jh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zh=wh(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Bh).getRegex(),Rh="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Mh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zh=wh("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Mh).replace("tag",Rh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Lh=wh(Ph).replace("hr",Sh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rh).getRegex(),$h={blockquote:wh(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Lh).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Nh,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Sh,html:Zh,lheading:Ih,list:zh,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Lh,table:Ah,text:/^[^\n]+/},qh=wh("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Sh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rh).getRegex(),Uh=un(un({},$h),{},{lheading:Th,table:qh,paragraph:wh(Ph).replace("hr",Sh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",qh).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rh).getRegex()}),Hh=un(un({},$h),{},{html:wh("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Mh).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ah,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:wh(Ph).replace("hr",Sh).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Ih).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Vh=/^( {2,}|\\)\n(?!\s*$)/,Wh=/(?:[!-\/:-@\[-`\{-~\xA1-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2010-\u2027\u2030-\u205E\u207A-\u207E\u208A-\u208E\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBC2\uFD3E-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDD00-\uDEB3\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF])/,Kh=/(?:[\t-\r -\/:-@\[-`\{-~\xA0-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2000-\u200A\u2010-\u2029\u202F-\u205F\u207A-\u207E\u208A-\u208E\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBC2\uFD3E-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDD00-\uDEB3\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF])/,Jh=/(?:[\0-\x08\x0E-\x1F0-9A-Za-z\x7F-\x9F\xAA\xAD\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u037D\u037F-\u0383\u0386\u0388-\u03F5\u03F7-\u0481\u0483-\u0559\u0560-\u0588\u058B\u058C\u0590-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05F2\u05F5-\u0605\u0610-\u061A\u061C\u0620-\u0669\u066E-\u06D3\u06D5-\u06DD\u06DF-\u06E8\u06EA-\u06FC\u06FF\u070E-\u07F5\u07FA-\u07FD\u0800-\u082F\u083F-\u085D\u085F-\u0887\u0889-\u0963\u0966-\u096F\u0971-\u09F1\u09F4-\u09F9\u09FC\u09FE-\u0A75\u0A77-\u0AEF\u0AF2-\u0B6F\u0B71-\u0BF2\u0BFB-\u0C76\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0D4E\u0D50-\u0D78\u0D7A-\u0DF3\u0DF5-\u0E3E\u0E40-\u0E4E\u0E50-\u0E59\u0E5C-\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F84\u0F86-\u0FBD\u0FC6\u0FCD\u0FDB-\u1049\u1050-\u109D\u10A0-\u10FA\u10FC-\u135F\u1369-\u138F\u139A-\u13FF\u1401-\u166C\u166F-\u167F\u1681-\u169A\u169D-\u16EA\u16EE-\u1734\u1737-\u17D3\u17D7\u17DC-\u17FF\u180B-\u193F\u1941-\u1943\u1946-\u19DD\u1A00-\u1A1D\u1A20-\u1A9F\u1AA7\u1AAE-\u1B4D\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BFB\u1C00-\u1C3A\u1C40-\u1C7D\u1C80-\u1CBF\u1CC8-\u1CD2\u1CD4-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDC\u1FE0-\u1FEC\u1FF0-\u1FFC\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u2079\u207F-\u2089\u208F-\u209F\u20C1-\u20FF\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u218C-\u218F\u242A-\u243F\u244B-\u249B\u24EA-\u24FF\u2776-\u2793\u2B74\u2B75\u2B96\u2C00-\u2CE4\u2CEB-\u2CF8\u2CFD\u2D00-\u2D6F\u2D71-\u2DFF\u2E2F\u2E5E-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3040-\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u318F\u3192-\u3195\u31A0-\u31BF\u31E6-\u31EE\u31F0-\u31FF\u321F-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48F\uA4C7-\uA4FD\uA500-\uA60C\uA610-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA6F8-\uA6FF\uA717-\uA71F\uA722-\uA788\uA78B-\uA827\uA82C-\uA835\uA83A-\uA873\uA878-\uA8CD\uA8D0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA95E\uA960-\uA9C0\uA9CE-\uA9DD\uA9E0-\uAA5B\uAA60-\uAA76\uAA7A-\uAADD\uAAE0-\uAAEF\uAAF2-\uAB5A\uAB5C-\uAB69\uAB6C-\uABEA\uABEC-\uD7FF\uE000-\uFB28\uFB2A-\uFBB1\uFBC3-\uFD3D\uFD50-\uFDCE\uFDD0-\uFDFB\uFE00-\uFE0F\uFE1A-\uFE2F\uFE53\uFE67\uFE6C-\uFEFE\uFF00\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]|\uD800[\uDC00-\uDCFF\uDD03-\uDD36\uDD40-\uDD78\uDD8A\uDD8B\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFD-\uDF9E\uDFA0-\uDFCF\uDFD1-\uDFFF]|\uD801[\uDC00-\uDD6E\uDD70-\uDFFF]|\uD802[\uDC00-\uDC56\uDC58-\uDC76\uDC79-\uDD1E\uDD20-\uDD3E\uDD40-\uDE4F\uDE59-\uDE7E\uDE80-\uDEC7\uDEC9-\uDEEF\uDEF7-\uDF38\uDF40-\uDF98\uDF9D-\uDFFF]|\uD803[\uDC00-\uDD6D\uDD6F-\uDD8D\uDD90-\uDEAC\uDEAE-\uDF54\uDF5A-\uDF85\uDF8A-\uDFFF]|\uD804[\uDC00-\uDC46\uDC4E-\uDCBA\uDCBD\uDCC2-\uDD3F\uDD44-\uDD73\uDD76-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE0-\uDE37\uDE3E-\uDEA8\uDEAA-\uDFD3\uDFD6\uDFD9-\uDFFF]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5C\uDC5E-\uDCC5\uDCC7-\uDDC0\uDDD8-\uDE40\uDE44-\uDE5F\uDE6D-\uDEB8\uDEBA-\uDF3B\uDF40-\uDFFF]|\uD806[\uDC00-\uDC3A\uDC3C-\uDD43\uDD47-\uDDE1\uDDE3-\uDE3E\uDE47-\uDE99\uDE9D\uDEA3-\uDEFF\uDF0A-\uDFE0\uDFE2-\uDFFF]|\uD807[\uDC00-\uDC40\uDC46-\uDC6F\uDC72-\uDEF6\uDEF9-\uDF42\uDF50-\uDFD4\uDFF2-\uDFFE]|[\uD808\uD80A\uD80C-\uD819\uD81C-\uD82E\uD830-\uD832\uD837\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD809[\uDC00-\uDC6F\uDC75-\uDFFF]|\uD80B[\uDC00-\uDFF0\uDFF3-\uDFFF]|\uD81A[\uDC00-\uDE6D\uDE70-\uDEF4\uDEF6-\uDF36\uDF40-\uDF43\uDF46-\uDFFF]|\uD81B[\uDC00-\uDD6C\uDD70-\uDE96\uDE9B-\uDFE1\uDFE3-\uDFFF]|\uD82F[\uDC00-\uDC9B\uDC9D\uDC9E\uDCA0-\uDFFF]|\uD833[\uDCF0-\uDCFF\uDEB4-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDDEB-\uDDFF\uDE42-\uDE44\uDE46-\uDEFF\uDF57-\uDFFF]|\uD835[\uDC00-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE8C-\uDFFF]|\uD838[\uDC00-\uDD4E\uDD50-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDDFE\uDE00-\uDFFF]|\uD83A[\uDC00-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDD2D\uDD2F-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDD0C\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDB\uDEED-\uDEEF\uDEFD-\uDEFF\uDF77-\uDF7A\uDFDA-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCFF\uDE54-\uDE5F\uDE6E\uDE6F\uDE7D-\uDE7F\uDE8A-\uDE8E\uDEC7-\uDECD\uDEDD\uDEDE\uDEEA-\uDEEF\uDEF9-\uDEFF\uDF93\uDFF0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Gh=wh(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Kh).getRegex(),Qh=/(?!~)(?:[!-\/:-@\[-`\{-~\xA1-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2010-\u2027\u2030-\u205E\u207A-\u207E\u208A-\u208E\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBC2\uFD3E-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDD00-\uDEB3\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF])/,Yh=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Xh=wh(Yh,"u").replace(/punct/g,Wh).getRegex(),ev=wh(Yh,"u").replace(/punct/g,Qh).getRegex(),tv="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nv=wh(tv,"gu").replace(/notPunctSpace/g,Jh).replace(/punctSpace/g,Kh).replace(/punct/g,Wh).getRegex(),rv=wh(tv,"gu").replace(/notPunctSpace/g,/(?:(?:[\0-\x08\x0E-\x1F0-9A-Za-z\x7F-\x9F\xAA\xAD\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u037D\u037F-\u0383\u0386\u0388-\u03F5\u03F7-\u0481\u0483-\u0559\u0560-\u0588\u058B\u058C\u0590-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05F2\u05F5-\u0605\u0610-\u061A\u061C\u0620-\u0669\u066E-\u06D3\u06D5-\u06DD\u06DF-\u06E8\u06EA-\u06FC\u06FF\u070E-\u07F5\u07FA-\u07FD\u0800-\u082F\u083F-\u085D\u085F-\u0887\u0889-\u0963\u0966-\u096F\u0971-\u09F1\u09F4-\u09F9\u09FC\u09FE-\u0A75\u0A77-\u0AEF\u0AF2-\u0B6F\u0B71-\u0BF2\u0BFB-\u0C76\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0D4E\u0D50-\u0D78\u0D7A-\u0DF3\u0DF5-\u0E3E\u0E40-\u0E4E\u0E50-\u0E59\u0E5C-\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F84\u0F86-\u0FBD\u0FC6\u0FCD\u0FDB-\u1049\u1050-\u109D\u10A0-\u10FA\u10FC-\u135F\u1369-\u138F\u139A-\u13FF\u1401-\u166C\u166F-\u167F\u1681-\u169A\u169D-\u16EA\u16EE-\u1734\u1737-\u17D3\u17D7\u17DC-\u17FF\u180B-\u193F\u1941-\u1943\u1946-\u19DD\u1A00-\u1A1D\u1A20-\u1A9F\u1AA7\u1AAE-\u1B4D\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BFB\u1C00-\u1C3A\u1C40-\u1C7D\u1C80-\u1CBF\u1CC8-\u1CD2\u1CD4-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDC\u1FE0-\u1FEC\u1FF0-\u1FFC\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u2079\u207F-\u2089\u208F-\u209F\u20C1-\u20FF\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u218C-\u218F\u242A-\u243F\u244B-\u249B\u24EA-\u24FF\u2776-\u2793\u2B74\u2B75\u2B96\u2C00-\u2CE4\u2CEB-\u2CF8\u2CFD\u2D00-\u2D6F\u2D71-\u2DFF\u2E2F\u2E5E-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3040-\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u318F\u3192-\u3195\u31A0-\u31BF\u31E6-\u31EE\u31F0-\u31FF\u321F-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48F\uA4C7-\uA4FD\uA500-\uA60C\uA610-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA6F8-\uA6FF\uA717-\uA71F\uA722-\uA788\uA78B-\uA827\uA82C-\uA835\uA83A-\uA873\uA878-\uA8CD\uA8D0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA95E\uA960-\uA9C0\uA9CE-\uA9DD\uA9E0-\uAA5B\uAA60-\uAA76\uAA7A-\uAADD\uAAE0-\uAAEF\uAAF2-\uAB5A\uAB5C-\uAB69\uAB6C-\uABEA\uABEC-\uD7FF\uE000-\uFB28\uFB2A-\uFBB1\uFBC3-\uFD3D\uFD50-\uFDCE\uFDD0-\uFDFB\uFE00-\uFE0F\uFE1A-\uFE2F\uFE53\uFE67\uFE6C-\uFEFE\uFF00\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]|\uD800[\uDC00-\uDCFF\uDD03-\uDD36\uDD40-\uDD78\uDD8A\uDD8B\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFD-\uDF9E\uDFA0-\uDFCF\uDFD1-\uDFFF]|\uD801[\uDC00-\uDD6E\uDD70-\uDFFF]|\uD802[\uDC00-\uDC56\uDC58-\uDC76\uDC79-\uDD1E\uDD20-\uDD3E\uDD40-\uDE4F\uDE59-\uDE7E\uDE80-\uDEC7\uDEC9-\uDEEF\uDEF7-\uDF38\uDF40-\uDF98\uDF9D-\uDFFF]|\uD803[\uDC00-\uDD6D\uDD6F-\uDD8D\uDD90-\uDEAC\uDEAE-\uDF54\uDF5A-\uDF85\uDF8A-\uDFFF]|\uD804[\uDC00-\uDC46\uDC4E-\uDCBA\uDCBD\uDCC2-\uDD3F\uDD44-\uDD73\uDD76-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE0-\uDE37\uDE3E-\uDEA8\uDEAA-\uDFD3\uDFD6\uDFD9-\uDFFF]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5C\uDC5E-\uDCC5\uDCC7-\uDDC0\uDDD8-\uDE40\uDE44-\uDE5F\uDE6D-\uDEB8\uDEBA-\uDF3B\uDF40-\uDFFF]|\uD806[\uDC00-\uDC3A\uDC3C-\uDD43\uDD47-\uDDE1\uDDE3-\uDE3E\uDE47-\uDE99\uDE9D\uDEA3-\uDEFF\uDF0A-\uDFE0\uDFE2-\uDFFF]|\uD807[\uDC00-\uDC40\uDC46-\uDC6F\uDC72-\uDEF6\uDEF9-\uDF42\uDF50-\uDFD4\uDFF2-\uDFFE]|[\uD808\uD80A\uD80C-\uD819\uD81C-\uD82E\uD830-\uD832\uD837\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD809[\uDC00-\uDC6F\uDC75-\uDFFF]|\uD80B[\uDC00-\uDFF0\uDFF3-\uDFFF]|\uD81A[\uDC00-\uDE6D\uDE70-\uDEF4\uDEF6-\uDF36\uDF40-\uDF43\uDF46-\uDFFF]|\uD81B[\uDC00-\uDD6C\uDD70-\uDE96\uDE9B-\uDFE1\uDFE3-\uDFFF]|\uD82F[\uDC00-\uDC9B\uDC9D\uDC9E\uDCA0-\uDFFF]|\uD833[\uDCF0-\uDCFF\uDEB4-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDDEB-\uDDFF\uDE42-\uDE44\uDE46-\uDEFF\uDF57-\uDFFF]|\uD835[\uDC00-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE8C-\uDFFF]|\uD838[\uDC00-\uDD4E\uDD50-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDDFE\uDE00-\uDFFF]|\uD83A[\uDC00-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDD2D\uDD2F-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDD0C\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDB\uDEED-\uDEEF\uDEFD-\uDEFF\uDF77-\uDF7A\uDFDA-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCFF\uDE54-\uDE5F\uDE6E\uDE6F\uDE7D-\uDE7F\uDE8A-\uDE8E\uDEC7-\uDECD\uDEDD\uDEDE\uDEEA-\uDEEF\uDEF9-\uDEFF\uDF93\uDFF0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|~)/).replace(/punctSpace/g,/(?!~)(?:[\t-\r -\/:-@\[-`\{-~\xA0-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2000-\u200A\u2010-\u2029\u202F-\u205F\u207A-\u207E\u208A-\u208E\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBC2\uFD3E-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDD00-\uDEB3\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF])/).replace(/punct/g,Qh).getRegex(),uv=wh("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Jh).replace(/punctSpace/g,Kh).replace(/punct/g,Wh).getRegex(),av=wh(/\\(punct)/,"gu").replace(/punct/g,Wh).getRegex(),iv=wh(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ov=wh(Mh).replace("(?:--\x3e|$)","--\x3e").getRegex(),sv=wh("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ov).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),cv=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,lv=wh(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",cv).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fv=wh(/^!?\[(label)\]\[(ref)\]/).replace("label",cv).replace("ref",jh).getRegex(),dv=wh(/^!?\[(ref)\](?:\[\])?/).replace("ref",jh).getRegex(),pv={_backpedal:Ah,anyPunctuation:av,autolink:iv,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:Vh,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Ah,emStrongLDelim:Xh,emStrongRDelimAst:nv,emStrongRDelimUnd:uv,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:lv,nolink:dv,punctuation:Gh,reflink:fv,reflinkSearch:wh("reflink|nolink(?!\\()","g").replace("reflink",fv).replace("nolink",dv).getRegex(),tag:sv,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:Ah},hv=un(un({},pv),{},{link:wh(/^!?\[(label)\]\((.*?)\)/).replace("label",cv).getRegex(),reflink:wh(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",cv).getRegex()}),vv=un(un({},pv),{},{emStrongRDelimAst:rv,emStrongLDelim:ev,url:wh(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),mv=un(un({},vv),{},{br:wh(Vh).replace("{2,}","*").getRegex(),text:wh(vv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Dv={normal:$h,gfm:Uh,pedantic:Hh},yv={normal:pv,gfm:vv,breaks:mv,pedantic:hv},gv={"&":"&","<":"<",">":">",'"':""","'":"'"},Fv=function(e){return gv[e]};function Ev(e,t){if(t){if(xh.escapeTest.test(e))return e.replace(xh.escapeReplace,Fv)}else if(xh.escapeTestNoEncode.test(e))return e.replace(xh.escapeReplaceNoEncode,Fv);return e}function _v(e){try{e=encodeURI(e).replace(xh.percentDecode,"%")}catch(e){return null}return e}function bv(e,t){var n,r=e.replace(xh.findPipe,(function(e,t,n){for(var r=!1,u=t;--u>=0&&"\\"===n[u];)r=!r;return r?"|":" |"})).split(xh.splitPipe),u=0;if(r[0].trim()||r.shift(),r.length>0&&(null===(n=r.at(-1))||void 0===n||!n.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;u<r.length;u++)r[u]=r[u].trim().replace(xh.slashPipe,"|");return r}function kv(e,t,n){var r=e.length;if(0===r)return"";for(var u=0;u<r&&e.charAt(r-u-1)===t;)u++;return e.slice(0,r-u)}function Cv(e,t,n,r,u){var a=t.href,i=t.title||null,o=e[1].replace(u.other.outputLinkReplace,"$1");r.state.inLink=!0;var s={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:a,title:i,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,s}var Av=Gt((function e(t){Wt(this,e),Yt(this,"options",void 0),Yt(this,"rules",void 0),Yt(this,"lexer",void 0),this.options=t||kh}),[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:kv(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t,n){var r=e.match(n.other.indentCodeCompensation);if(null===r)return t;var u=r[1];return t.split("\n").map((function(e){var t=e.match(n.other.beginningSpace);return null===t?e:cn(t,1)[0].length>=u.length?e.slice(u.length):e})).join("\n")}(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(this.rules.other.endingHash.test(n)){var r=kv(n,"#");this.options.pedantic?n=r.trim():r&&!this.rules.other.endingSpaceChar.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:kv(t[0],"\n")}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){for(var n=kv(t[0],"\n").split("\n"),r="",u="",a=[];n.length>0;){var i=!1,o=[],s=void 0;for(s=0;s<n.length;s++)if(this.rules.other.blockquoteStart.test(n[s]))o.push(n[s]),i=!0;else{if(i)break;o.push(n[s])}n=n.slice(s);var c=o.join("\n"),l=c.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?"".concat(r,"\n").concat(c):c,u=u?"".concat(u,"\n").concat(l):l;var f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,a,!0),this.lexer.state.top=f,0===n.length)break;var d=a.at(-1);if("code"===(null==d?void 0:d.type))break;if("blockquote"===(null==d?void 0:d.type)){var p=d,h=p.raw+"\n"+n.join("\n"),v=this.blockquote(h);a[a.length-1]=v,r=r.substring(0,r.length-p.raw.length)+v.raw,u=u.substring(0,u.length-p.text.length)+v.text;break}if("list"!==(null==d?void 0:d.type));else{var m=d,D=m.raw+"\n"+n.join("\n"),y=this.list(D);a[a.length-1]=y,r=r.substring(0,r.length-d.raw.length)+y.raw,u=u.substring(0,u.length-m.raw.length)+y.raw,n=D.substring(a.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:a,text:u}}}},{key:"list",value:function(e){var t=this,n=this.rules.block.list.exec(e);if(n){var r=n[1].trim(),u=r.length>1,a={type:"list",raw:"",ordered:u,start:u?+r.slice(0,-1):"",loose:!1,items:[]};r=u?"\\d{1,9}\\".concat(r.slice(-1)):"\\".concat(r),this.options.pedantic&&(r=u?r:"[*+-]");for(var i=this.rules.other.listItemRegex(r),o=!1;e;){var s=!1,c="",l="";if(!(n=i.exec(e)))break;if(this.rules.block.hr.test(e))break;c=n[0],e=e.substring(c.length);var f=n[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(function(e){return" ".repeat(3*e.length)})),d=e.split("\n",1)[0],p=!f.trim(),h=0;if(this.options.pedantic?(h=2,l=f.trimStart()):p?h=n[1].length+1:(h=(h=n[2].search(this.rules.other.nonSpaceChar))>4?1:h,l=f.slice(h),h+=n[1].length),p&&this.rules.other.blankLine.test(d)&&(c+=d+"\n",e=e.substring(d.length+1),s=!0),!s)for(var v=this.rules.other.nextBulletRegex(h),m=this.rules.other.hrRegex(h),D=this.rules.other.fencesBeginRegex(h),y=this.rules.other.headingBeginRegex(h),g=this.rules.other.htmlBeginRegex(h);e;){var F=e.split("\n",1)[0],E=void 0;if(d=F,E=this.options.pedantic?d=d.replace(this.rules.other.listReplaceNesting," "):d.replace(this.rules.other.tabCharGlobal," "),D.test(d))break;if(y.test(d))break;if(g.test(d))break;if(v.test(d))break;if(m.test(d))break;if(E.search(this.rules.other.nonSpaceChar)>=h||!d.trim())l+="\n"+E.slice(h);else{if(p)break;if(f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(D.test(f))break;if(y.test(f))break;if(m.test(f))break;l+="\n"+d}p||d.trim()||(p=!0),c+=F+"\n",e=e.substring(F.length+1),f=E.slice(h)}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));var _=null,b=void 0;this.options.gfm&&(_=this.rules.other.listIsTask.exec(l))&&(b="[ ] "!==_[0],l=l.replace(this.rules.other.listReplaceTask,"")),a.items.push({type:"list_item",raw:c,task:!!_,checked:b,loose:!1,text:l,tokens:[]}),a.raw+=c}var k=a.items.at(-1);if(!k)return;k.raw=k.raw.trimEnd(),k.text=k.text.trimEnd(),a.raw=a.raw.trimEnd();for(var C=0;C<a.items.length;C++)if(this.lexer.state.top=!1,a.items[C].tokens=this.lexer.blockTokens(a.items[C].text,[]),!a.loose){var A=a.items[C].tokens.filter((function(e){return"space"===e.type})),w=A.length>0&&A.some((function(e){return t.rules.other.anyLine.test(e.raw)}));a.loose=w}if(a.loose)for(var x=0;x<a.items.length;x++)a.items[x].loose=!0;return a}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t){var n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",u=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:u}}}},{key:"table",value:function(e){var t,n=this,r=this.rules.block.table.exec(e);if(r&&this.rules.other.tableDelimiter.test(r[2])){var u=bv(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=null!==(t=r[3])&&void 0!==t&&t.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(u.length===a.length){var s,c=Qt(a);try{for(c.s();!(s=c.n()).done;){var l=s.value;this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null)}}catch(e){c.e(e)}finally{c.f()}for(var f=0;f<u.length;f++)o.header.push({text:u[f],tokens:this.lexer.inline(u[f]),header:!0,align:o.align[f]});var d,p=Qt(i);try{for(p.s();!(d=p.n()).done;){var h=d.value;o.rows.push(bv(h,o.header.length).map((function(e,t){return{text:e,tokens:n.lexer.inline(e),header:!1,align:o.align[t]}})))}}catch(e){p.e(e)}finally{p.f()}return o}}}},{key:"lheading",value:function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}},{key:"paragraph",value:function(e){var t=this.rules.block.paragraph.exec(e);if(t){var n="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}},{key:"text",value:function(e){var t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}},{key:"escape",value:function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}},{key:"tag",value:function(e){var t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;var r=kv(n.slice(0,-1),"\\");if((n.length-r.length)%2==0)return}else{var u=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=0,r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&--n<0)return r;return n>0?-2:-1}(t[2],"()");if(-2===u)return;if(u>-1){var a=(0===t[0].indexOf("!")?5:4)+t[1].length+u;t[2]=t[2].substring(0,u),t[0]=t[0].substring(0,a).trim(),t[3]=""}}var i=t[2],o="";if(this.options.pedantic){var s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],o=s[3])}else o=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i.slice(1):i.slice(1,-1)),Cv(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:o?o.replace(this.rules.inline.anyPunctuation,"$1"):o},t[0],this.lexer,this.rules)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!r){var u=n[0].charAt(0);return{type:"text",raw:u,text:u}}return Cv(n,r,n[0],this.lexer,this.rules)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(!r[3]||!n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){var u,a,i=ln(r[0]).length-1,o=i,s=0,c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);null!=(r=c.exec(t));)if(u=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=ln(u).length,r[3]||r[4])o+=a;else if(!((r[5]||r[6])&&i%3)||(i+a)%3){if(!((o-=a)>0)){a=Math.min(a,a+o+s);var l=ln(r[0])[0].length,f=e.slice(0,i+r.index+l+a);if(Math.min(i,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}else s+=a}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),u=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&u&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e){var t,n,r=this.rules.inline.autolink.exec(e);if(r)return n="@"===r[2]?"mailto:"+(t=r[1]):t=r[1],{type:"link",raw:r[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}},{key:"url",value:function(e){var t;if(t=this.rules.inline.url.exec(e)){var n,r;if("@"===t[2])r="mailto:"+(n=t[0]);else{var u;do{var a,i;u=t[0],t[0]=null!==(a=null===(i=this.rules.inline._backpedal.exec(t[0]))||void 0===i?void 0:i[0])&&void 0!==a?a:""}while(u!==t[0]);n=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}},{key:"inlineText",value:function(e){var t=this.rules.inline.text.exec(e);if(t){var n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}}]),wv=function(){function e(t){Wt(this,e),Yt(this,"tokens",void 0),Yt(this,"options",void 0),Yt(this,"state",void 0),Yt(this,"tokenizer",void 0),Yt(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||kh,this.options.tokenizer=this.options.tokenizer||new Av,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var n={other:xh,block:Dv.normal,inline:yv.normal};this.options.pedantic?(n.block=Dv.pedantic,n.inline=yv.pedantic):this.options.gfm&&(n.block=Dv.gfm,this.options.breaks?n.inline=yv.breaks:n.inline=yv.gfm),this.tokenizer.rules=n}return Gt(e,[{key:"lex",value:function(e){e=e.replace(xh.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(var t=0;t<this.inlineQueue.length;t++){var n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}},{key:"blockTokens",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.options.pedantic&&(e=e.replace(xh.tabCharGlobal," ").replace(xh.spaceLine,""));for(var u,a=function(){var u,a,i;if(null!==(u=t.options.extensions)&&void 0!==u&&null!==(u=u.block)&&void 0!==u&&u.some((function(r){return!!(i=r.call({lexer:t},e,n))&&(e=e.substring(i.raw.length),n.push(i),!0)})))return 0;if(i=t.tokenizer.space(e)){e=e.substring(i.raw.length);var o=n.at(-1);return 1===i.raw.length&&void 0!==o?o.raw+="\n":n.push(i),0}if(i=t.tokenizer.code(e)){e=e.substring(i.raw.length);var s=n.at(-1);return"paragraph"===(null==s?void 0:s.type)||"text"===(null==s?void 0:s.type)?(s.raw+="\n"+i.raw,s.text+="\n"+i.text,t.inlineQueue.at(-1).src=s.text):n.push(i),0}if(i=t.tokenizer.fences(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.heading(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.hr(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.blockquote(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.list(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.html(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.def(e)){e=e.substring(i.raw.length);var c=n.at(-1);return"paragraph"===(null==c?void 0:c.type)||"text"===(null==c?void 0:c.type)?(c.raw+="\n"+i.raw,c.text+="\n"+i.raw,t.inlineQueue.at(-1).src=c.text):t.tokens.links[i.tag]||(t.tokens.links[i.tag]={href:i.href,title:i.title}),0}if(i=t.tokenizer.table(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.lheading(e))return e=e.substring(i.raw.length),n.push(i),0;var l=e;if(null!==(a=t.options.extensions)&&void 0!==a&&a.startBlock){var f,d=1/0,p=e.slice(1);t.options.extensions.startBlock.forEach((function(e){"number"==typeof(f=e.call({lexer:t},p))&&f>=0&&(d=Math.min(d,f))})),d<1/0&&d>=0&&(l=e.substring(0,d+1))}if(t.state.top&&(i=t.tokenizer.paragraph(l))){var h=n.at(-1);return r&&"paragraph"===(null==h?void 0:h.type)?(h.raw+="\n"+i.raw,h.text+="\n"+i.text,t.inlineQueue.pop(),t.inlineQueue.at(-1).src=h.text):n.push(i),r=l.length!==e.length,e=e.substring(i.raw.length),0}if(i=t.tokenizer.text(e)){e=e.substring(i.raw.length);var v=n.at(-1);return"text"===(null==v?void 0:v.type)?(v.raw+="\n"+i.raw,v.text+="\n"+i.text,t.inlineQueue.pop(),t.inlineQueue.at(-1).src=v.text):n.push(i),0}if(e){var m="Infinite loop on byte: "+e.charCodeAt(0);if(t.options.silent)return console.error(m),1;throw new Error(m)}};e&&(0===(u=a())||1!==u););return this.state.top=!0,n}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=e,u=null;if(this.tokens.links){var a=Object.keys(this.tokens.links);if(a.length>0)for(;null!=(u=this.tokenizer.rules.inline.reflinkSearch.exec(r));)a.includes(u[0].slice(u[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(u=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,u.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(u=this.tokenizer.rules.inline.blockSkip.exec(r));)r=r.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(var i,o=!1,s="",c=function(){var u,a,i;if(o||(s=""),o=!1,null!==(u=t.options.extensions)&&void 0!==u&&null!==(u=u.inline)&&void 0!==u&&u.some((function(r){return!!(i=r.call({lexer:t},e,n))&&(e=e.substring(i.raw.length),n.push(i),!0)})))return 0;if(i=t.tokenizer.escape(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.tag(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.link(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.reflink(e,t.tokens.links)){e=e.substring(i.raw.length);var c=n.at(-1);return"text"===i.type&&"text"===(null==c?void 0:c.type)?(c.raw+=i.raw,c.text+=i.text):n.push(i),0}if(i=t.tokenizer.emStrong(e,r,s))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.codespan(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.br(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.del(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.autolink(e))return e=e.substring(i.raw.length),n.push(i),0;if(!t.state.inLink&&(i=t.tokenizer.url(e)))return e=e.substring(i.raw.length),n.push(i),0;var l=e;if(null!==(a=t.options.extensions)&&void 0!==a&&a.startInline){var f,d=1/0,p=e.slice(1);t.options.extensions.startInline.forEach((function(e){"number"==typeof(f=e.call({lexer:t},p))&&f>=0&&(d=Math.min(d,f))})),d<1/0&&d>=0&&(l=e.substring(0,d+1))}if(i=t.tokenizer.inlineText(l)){e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(s=i.raw.slice(-1)),o=!0;var h=n.at(-1);return"text"===(null==h?void 0:h.type)?(h.raw+=i.raw,h.text+=i.text):n.push(i),0}if(e){var v="Infinite loop on byte: "+e.charCodeAt(0);if(t.options.silent)return console.error(v),1;throw new Error(v)}};e&&(0===(i=c())||1!==i););return n}}],[{key:"rules",get:function(){return{block:Dv,inline:yv}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}])}(),xv=Gt((function e(t){Wt(this,e),Yt(this,"options",void 0),Yt(this,"parser",void 0),this.options=t||kh}),[{key:"space",value:function(e){return""}},{key:"code",value:function(e){var t,n=e.text,r=e.lang,u=e.escaped,a=null===(t=(r||"").match(xh.notSpaceStart))||void 0===t?void 0:t[0],i=n.replace(xh.endingNewline,"")+"\n";return a?'<pre><code class="language-'+Ev(a)+'">'+(u?i:Ev(i,!0))+"</code></pre>\n":"<pre><code>"+(u?i:Ev(i,!0))+"</code></pre>\n"}},{key:"blockquote",value:function(e){var t=e.tokens,n=this.parser.parse(t);return"<blockquote>\n".concat(n,"</blockquote>\n")}},{key:"html",value:function(e){return e.text}},{key:"heading",value:function(e){var t=e.tokens,n=e.depth;return"<h".concat(n,">").concat(this.parser.parseInline(t),"</h").concat(n,">\n")}},{key:"hr",value:function(e){return"<hr>\n"}},{key:"list",value:function(e){for(var t=e.ordered,n=e.start,r="",u=0;u<e.items.length;u++){var a=e.items[u];r+=this.listitem(a)}var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+i+">\n"}},{key:"listitem",value:function(e){var t="";if(e.task){var n,r=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===(null===(n=e.tokens[0])||void 0===n?void 0:n.type)?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=r+" "+Ev(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),"<li>".concat(t,"</li>\n")}},{key:"checkbox",value:function(e){return"<input "+(e.checked?'checked="" ':"")+'disabled="" type="checkbox">'}},{key:"paragraph",value:function(e){var t=e.tokens;return"<p>".concat(this.parser.parseInline(t),"</p>\n")}},{key:"table",value:function(e){for(var t="",n="",r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});for(var u="",a=0;a<e.rows.length;a++){var i=e.rows[a];n="";for(var o=0;o<i.length;o++)n+=this.tablecell(i[o]);u+=this.tablerow({text:n})}return u&&(u="<tbody>".concat(u,"</tbody>")),"<table>\n<thead>\n"+t+"</thead>\n"+u+"</table>\n"}},{key:"tablerow",value:function(e){var t=e.text;return"<tr>\n".concat(t,"</tr>\n")}},{key:"tablecell",value:function(e){var t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?"<".concat(n,' align="').concat(e.align,'">'):"<".concat(n,">"))+t+"</".concat(n,">\n")}},{key:"strong",value:function(e){var t=e.tokens;return"<strong>".concat(this.parser.parseInline(t),"</strong>")}},{key:"em",value:function(e){var t=e.tokens;return"<em>".concat(this.parser.parseInline(t),"</em>")}},{key:"codespan",value:function(e){var t=e.text;return"<code>".concat(Ev(t,!0),"</code>")}},{key:"br",value:function(e){return"<br>"}},{key:"del",value:function(e){var t=e.tokens;return"<del>".concat(this.parser.parseInline(t),"</del>")}},{key:"link",value:function(e){var t=e.href,n=e.title,r=e.tokens,u=this.parser.parseInline(r),a=_v(t);if(null===a)return u;var i='<a href="'+(t=a)+'"';return n&&(i+=' title="'+Ev(n)+'"'),i+">"+u+"</a>"}},{key:"image",value:function(e){var t=e.href,n=e.title,r=e.text,u=e.tokens;u&&(r=this.parser.parseInline(u,this.parser.textRenderer));var a=_v(t);if(null===a)return Ev(r);var i='<img src="'.concat(t=a,'" alt="').concat(r,'"');return n&&(i+=' title="'.concat(Ev(n),'"')),i+">"}},{key:"text",value:function(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ev(e.text)}}]),Sv=Gt((function e(){Wt(this,e)}),[{key:"strong",value:function(e){return e.text}},{key:"em",value:function(e){return e.text}},{key:"codespan",value:function(e){return e.text}},{key:"del",value:function(e){return e.text}},{key:"html",value:function(e){return e.text}},{key:"text",value:function(e){return e.text}},{key:"link",value:function(e){return""+e.text}},{key:"image",value:function(e){return""+e.text}},{key:"br",value:function(){return""}}]),Bv=function(){function e(t){Wt(this,e),Yt(this,"options",void 0),Yt(this,"renderer",void 0),Yt(this,"textRenderer",void 0),this.options=t||kh,this.options.renderer=this.options.renderer||new xv,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Sv}return Gt(e,[{key:"parse",value:function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="",r=0;r<e.length;r++){var u,a=e[r];if(null!==(u=this.options.extensions)&&void 0!==u&&null!==(u=u.renderers)&&void 0!==u&&u[a.type]){var i=a,o=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==o||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(i.type)){n+=o||"";continue}}var s=a;switch(s.type){case"space":n+=this.renderer.space(s);continue;case"hr":n+=this.renderer.hr(s);continue;case"heading":n+=this.renderer.heading(s);continue;case"code":n+=this.renderer.code(s);continue;case"table":n+=this.renderer.table(s);continue;case"blockquote":n+=this.renderer.blockquote(s);continue;case"list":n+=this.renderer.list(s);continue;case"html":n+=this.renderer.html(s);continue;case"paragraph":n+=this.renderer.paragraph(s);continue;case"text":for(var c=s,l=this.renderer.text(c);r+1<e.length&&"text"===e[r+1].type;)c=e[++r],l+="\n"+this.renderer.text(c);n+=t?this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):l;continue;default:var f='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}return n}},{key:"parseInline",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.renderer,n="",r=0;r<e.length;r++){var u,a=e[r];if(null!==(u=this.options.extensions)&&void 0!==u&&null!==(u=u.renderers)&&void 0!==u&&u[a.type]){var i=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==i||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=i||"";continue}}var o=a;switch(o.type){case"escape":case"text":n+=t.text(o);break;case"html":n+=t.html(o);break;case"link":n+=t.link(o);break;case"image":n+=t.image(o);break;case"strong":n+=t.strong(o);break;case"em":n+=t.em(o);break;case"codespan":n+=t.codespan(o);break;case"br":n+=t.br(o);break;case"del":n+=t.del(o);break;default:var s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}return n}}],[{key:"parse",value:function(t,n){return new e(n).parse(t)}},{key:"parseInline",value:function(t,n){return new e(n).parseInline(t)}}])}(),Ov=(Eh=Gt((function e(t){Wt(this,e),Yt(this,"options",void 0),Yt(this,"block",void 0),this.options=t||kh}),[{key:"preprocess",value:function(e){return e}},{key:"postprocess",value:function(e){return e}},{key:"processAllTokens",value:function(e){return e}},{key:"provideLexer",value:function(){return this.block?wv.lex:wv.lexInline}},{key:"provideParser",value:function(){return this.block?Bv.parse:Bv.parseInline}}]),Yt(Eh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Eh),Iv=Gt((function e(){Wt(this,e),Yt(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),Yt(this,"options",this.setOptions),Yt(this,"parse",this.parseMarkdown(!0)),Yt(this,"parseInline",this.parseMarkdown(!1)),Yt(this,"Parser",Bv),Yt(this,"Renderer",xv),Yt(this,"TextRenderer",Sv),Yt(this,"Lexer",wv),Yt(this,"Tokenizer",Av),Yt(this,"Hooks",Ov),this.use.apply(this,arguments)}),[{key:"walkTokens",value:function(e,t){var n,r=this,u=[],a=Qt(e);try{var i=function(){var e=n.value;switch(u=u.concat(t.call(r,e)),e.type){case"table":var a,i=e,o=Qt(i.header);try{for(o.s();!(a=o.n()).done;){var s=a.value;u=u.concat(r.walkTokens(s.tokens,t))}}catch(e){o.e(e)}finally{o.f()}var c,l=Qt(i.rows);try{for(l.s();!(c=l.n()).done;){var f,d=Qt(c.value);try{for(d.s();!(f=d.n()).done;){var p=f.value;u=u.concat(r.walkTokens(p.tokens,t))}}catch(e){d.e(e)}finally{d.f()}}}catch(e){l.e(e)}finally{l.f()}break;case"list":var h=e;u=u.concat(r.walkTokens(h.items,t));break;default:var v,m=e;null!==(v=r.defaults.extensions)&&void 0!==v&&null!==(v=v.childTokens)&&void 0!==v&&v[m.type]?r.defaults.extensions.childTokens[m.type].forEach((function(e){var n=m[e].flat(1/0);u=u.concat(r.walkTokens(n,t))})):m.tokens&&(u=u.concat(r.walkTokens(m.tokens,t)))}};for(a.s();!(n=a.n()).done;)i()}catch(e){a.e(e)}finally{a.f()}return u}},{key:"use",value:function(){for(var e=this,t=this.defaults.extensions||{renderers:{},childTokens:{}},n=arguments.length,r=new Array(n),u=0;u<n;u++)r[u]=arguments[u];return r.forEach((function(n){var r=un({},n);if(r.async=e.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach((function(e){if(!e.name)throw new Error("extension name required");if("renderer"in e){var n=t.renderers[e.name];t.renderers[e.name]=n?function(){for(var t=arguments.length,r=new Array(t),u=0;u<t;u++)r[u]=arguments[u];var a=e.renderer.apply(this,r);return!1===a&&(a=n.apply(this,r)),a}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");var r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),n.renderer){var u=e.defaults.renderer||new xv(e.defaults),a=function(){if(!(i in u))throw new Error("renderer '".concat(i,"' does not exist"));if(["options","parser"].includes(i))return 1;var e=i,t=n.renderer[e],r=u[e];u[e]=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];var i=t.apply(u,n);return!1===i&&(i=r.apply(u,n)),i||""}};for(var i in n.renderer)a();r.renderer=u}if(n.tokenizer){var o=e.defaults.tokenizer||new Av(e.defaults),s=function(){if(!(c in o))throw new Error("tokenizer '".concat(c,"' does not exist"));if(["options","rules","lexer"].includes(c))return 1;var e=c,t=n.tokenizer[e],r=o[e];o[e]=function(){for(var e=arguments.length,n=new Array(e),u=0;u<e;u++)n[u]=arguments[u];var a=t.apply(o,n);return!1===a&&(a=r.apply(o,n)),a}};for(var c in n.tokenizer)s();r.tokenizer=o}if(n.hooks){var l=e.defaults.hooks||new Ov,f=function(){if(!(d in l))throw new Error("hook '".concat(d,"' does not exist"));if(["options","block"].includes(d))return 1;var t=d,r=n.hooks[t],u=l[t];Ov.passThroughHooks.has(d)?l[t]=function(t){if(e.defaults.async)return Promise.resolve(r.call(l,t)).then((function(e){return u.call(l,e)}));var n=r.call(l,t);return u.call(l,n)}:l[t]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var a=r.apply(l,t);return!1===a&&(a=u.apply(l,t)),a}};for(var d in n.hooks)f();r.hooks=l}if(n.walkTokens){var p=e.defaults.walkTokens,h=n.walkTokens;r.walkTokens=function(e){var t=[];return t.push(h.call(this,e)),p&&(t=t.concat(p.call(this,e))),t}}e.defaults=un(un({},e.defaults),r)})),this}},{key:"setOptions",value:function(e){return this.defaults=un(un({},this.defaults),e),this}},{key:"lexer",value:function(e,t){return wv.lex(e,null!=t?t:this.defaults)}},{key:"parser",value:function(e,t){return Bv.parse(e,null!=t?t:this.defaults)}},{key:"parseMarkdown",value:function(e){var t=this;return function(n,r){var u=un({},r),a=un(un({},t.defaults),u),i=t.onError(!!a.silent,!!a.async);if(!0===t.defaults.async&&!1===u.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==n)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);var o=a.hooks?a.hooks.provideLexer():e?wv.lex:wv.lexInline,s=a.hooks?a.hooks.provideParser():e?Bv.parse:Bv.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(n):n).then((function(e){return o(e,a)})).then((function(e){return a.hooks?a.hooks.processAllTokens(e):e})).then((function(e){return a.walkTokens?Promise.all(t.walkTokens(e,a.walkTokens)).then((function(){return e})):e})).then((function(e){return s(e,a)})).then((function(e){return a.hooks?a.hooks.postprocess(e):e})).catch(i);try{a.hooks&&(n=a.hooks.preprocess(n));var c=o(n,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&t.walkTokens(c,a.walkTokens);var l=s(c,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(e){return i(e)}}}},{key:"onError",value:function(e,t){return function(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){var r="<p>An error occurred:</p><pre>"+Ev(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}}]),Tv=new Iv;function Pv(e,t){return Tv.parse(e,t)}function jv(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}Pv.options=Pv.setOptions=function(e){return Tv.setOptions(e),Pv.defaults=Tv.defaults,Ch(Pv.defaults),Pv},Pv.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},Pv.defaults=kh,Pv.use=function(){return Tv.use.apply(Tv,arguments),Pv.defaults=Tv.defaults,Ch(Pv.defaults),Pv},Pv.walkTokens=function(e,t){return Tv.walkTokens(e,t)},Pv.parseInline=Tv.parseInline,Pv.Parser=Bv,Pv.parser=Bv.parse,Pv.Renderer=xv,Pv.TextRenderer=Sv,Pv.Lexer=wv,Pv.lexer=wv.lex,Pv.Tokenizer=Av,Pv.Hooks=Ov,Pv.parse=Pv,Pv.options,Pv.setOptions,Pv.use,Pv.walkTokens,Pv.parseInline,Bv.parse,wv.lex;var Nv=new Pv.Renderer;Nv.code=function(e){var t=e.text,n=e.lang,r=void 0===n?"":n,u=e.escaped,a=r?"language-".concat(r):"",i=u?t:jv(t),o=encodeURIComponent(t);return'\n <div class="DocSearch-CodeSnippet">\n <button class="DocSearch-CodeSnippet-CopyButton" data-code="'.concat(o,'" aria-label="copy code">').concat('<svg class="DocSearch-CodeSnippet-CopyIcon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2" /><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" /></svg>').concat('<svg class="DocSearch-CodeSnippet-CheckIcon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5" /></svg>','<span class="DocSearch-CodeSnippet-CopyButton-Label"></span></button>\n <pre><code class="').concat(a,'">').concat(i,"</code></pre>\n </div>\n ")},Nv.link=function(e){var t=e.href,n=e.title,r=e.text,u=n?' title="'.concat(jv(n),'"'):"",a=t?jv(t):"",i=jv(r);return'<a href="'.concat(a,'"').concat(u,' target="_blank" rel="noopener noreferrer">').concat(i,"</a>")};var zv=et((function(e){var t=e.content,n=e.copyButtonText,r=e.copyButtonCopiedText,u=e.isStreaming,a=Te((function(){return Pv.parse(t,{gfm:!0,breaks:!0,renderer:Nv})}),[t]),i=Oe(null);return Se((function(){var e=i.current;if(e)return Array.from(e.querySelectorAll(".DocSearch-CodeSnippet-CopyButton")).forEach((function(e){var t=e.querySelector(".DocSearch-CodeSnippet-CopyButton-Label");t&&(t.textContent=n),e.classList.remove("DocSearch-CodeSnippet-CopyButton--copied")})),e.addEventListener("click",t),function(){e.removeEventListener("click",t)};function t(e){var t,u=e.target.closest(".DocSearch-CodeSnippet-CopyButton");if(u){var a=null!==(t=u.getAttribute("data-code"))&&void 0!==t?t:"";navigator.clipboard.writeText(decodeURIComponent(a)).catch((function(){}));var i=u.querySelector(".DocSearch-CodeSnippet-CopyButton-Label");if(i){u.classList.add("DocSearch-CodeSnippet-CopyButton--copied");var o=n;i.textContent=r,setTimeout((function(){u.classList.remove("DocSearch-CodeSnippet-CopyButton--copied"),i.textContent=o}),1500)}}}}),[a,n,r]),jt.createElement("div",{ref:i,className:"DocSearch-Markdown-Content ".concat(u?"DocSearch-Markdown-Content--streaming":""),dangerouslySetInnerHTML:{__html:a}})}));zv.displayName="MemoizedMarkdown";var Rv=function(e,t){var n,r,u=t[0].parts.find((function(e){return"text"===e.type}));return{query:e,objectID:null!==(n=null==u?void 0:u.text)&&void 0!==n?n:"",messages:t,type:"askAI",anchor:"stored",content:null,hierarchy:{lvl0:"askAI",lvl1:null!==(r=null==u?void 0:u.text)&&void 0!==r?r:"",lvl2:null,lvl3:null,lvl4:null,lvl5:null,lvl6:null},url:"",url_without_anchor:""}},Mv=function(e){return null==e?void 0:e.parts.find((function(e){return"text"===e.type}))},Zv=["translations"];function Lv(e){var t=e.disclaimerText;return jt.createElement("p",{className:"DocSearch-AskAiScreen-Disclaimer"},t)}function $v(e){var t,n=e.exchange,r=e.askAiStreamError,u=e.isLastExchange,a=e.loadingStatus,i=e.onSearchQueryClick,o=e.translations,s=e.conversations,c=e.onFeedback,l=n.userMessage,f=n.assistantMessage,d=!u||u&&"ready"===a&&Boolean(f),p=Te((function(){return Mv(f)}),[f]),h=Te((function(){return Mv(l)}),[l]),v=jt.useMemo((function(){return e=f,t=[],n=new Set,e?(e.parts.forEach((function(e){if("text"===e.type&&0!==e.text.length){var r,u=e.text.replace(/```[\s\S]*?```/g,"").replace(/`[^`]*`/g,""),a=Qt(u.matchAll(/\[([^\]]*)\]\(([^)]+)\)/g));try{for(a.s();!(r=a.n()).done;){var i=r.value,o=i[1].trim(),s=i[2];n.has(s)||(n.add(s),t.push({url:s,title:o||void 0}))}}catch(e){a.e(e)}finally{a.f()}var c,l=Qt(u.matchAll(/(?<!\]\()https?:\/\/[^\s<>"{}|\\^`[\]]+/g));try{for(l.s();!(c=l.n()).done;){var f=c.value[0].replace(/[.,;:!?]+$/,"");n.has(f)||(n.add(f),t.push({url:f}))}}catch(e){l.e(e)}finally{l.f()}}})),t):[];var e,t,n}),[f]),m=jt.useMemo((function(){return function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if("tool-searchIndex"===r.type&&"output-available"===r.state){for(var u=[],a=n;a<e.length;){var i=e[a];if("tool-searchIndex"!==i.type||"output-available"!==i.state)break;var o,s,c=(null!==(o=null===(s=i.output)||void 0===s?void 0:s.query)&&void 0!==o?o:"").trim();c&&c.length>0&&u.push(c),a++}u.length>1?t.push({type:"aggregated-tool-call",queries:u}):1===u.length&&t.push(r),n=a-1}else t.push(r)}return t}((null==f?void 0:f.parts)||[])}),[f]),D=["submitted","streaming"].includes(a)&&u&&!m.some((function(e){return"step-start"!==e.type}));return jt.createElement("div",{className:"DocSearch-AskAiScreen-Response-Container"},jt.createElement("div",{className:"DocSearch-AskAiScreen-Response"},jt.createElement("div",{className:"DocSearch-AskAiScreen-Message DocSearch-AskAiScreen-Message--user"},jt.createElement("p",{className:"DocSearch-AskAiScreen-Query"},null!==(t=null==h?void 0:h.text)&&void 0!==t?t:"")),jt.createElement("div",{className:"DocSearch-AskAiScreen-Message DocSearch-AskAiScreen-Message--assistant"},jt.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent"},"error"===a&&r&&u&&jt.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent DocSearch-AskAiScreen-Error"},jt.createElement(dh,null),jt.createElement(zv,{content:r.message,copyButtonText:"",copyButtonCopiedText:"",isStreaming:!1})),D&&jt.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Reasoning"},jt.createElement("span",{className:"shimmer"},o.thinkingText||"Thinking...")),m.map((function(e,t){var n,r=t;if("string"==typeof e)return jt.createElement(zv,{key:r,content:e,copyButtonText:o.copyButtonText||"Copy",copyButtonCopiedText:o.copyButtonCopiedText||"Copied!",isStreaming:"streaming"===a});if("aggregated-tool-call"===e.type)return jt.createElement(bh,{key:r,queries:e.queries,translations:o,onSearchQueryClick:i});if("reasoning"===e.type&&"streaming"===e.state)return jt.createElement("div",{key:r,className:"DocSearch-AskAiScreen-MessageContent-Reasoning shimmer"},jt.createElement(sh,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),jt.createElement("span",{className:"shimmer"},"Reasoning..."));if("text"===e.type)return jt.createElement(zv,{key:r,content:e.text,copyButtonText:o.copyButtonText||"Copy",copyButtonCopiedText:o.copyButtonCopiedText||"Copied!",isStreaming:"streaming"===e.state});if("tool-searchIndex"===e.type)switch(e.state){case"input-streaming":return jt.createElement("div",{key:r,className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--PartialCall shimmer"},jt.createElement(sh,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),jt.createElement("span",null,o.preToolCallText||"Searching..."));case"input-available":return jt.createElement("div",{key:r,className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--Call shimmer"},jt.createElement(sh,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),jt.createElement("span",null,"".concat(o.duringToolCallText||"Searching for ",' "').concat(e.input.query||"",'" ...')));case"output-available":return jt.createElement("div",{key:r,className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--Result"},jt.createElement(Fn,null),jt.createElement("span",null,"".concat(o.afterToolCallText||"Searched for")," ",jt.createElement("span",{role:"button",tabIndex:0,className:"DocSearch-AskAiScreen-MessageContent-Tool-Query",onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),i(e.output.query||""))},onClick:function(){return i(e.output.query||"")}}," ",'"',e.output.query||"",'"')," ","found ",(null===(n=e.output.hits)||void 0===n?void 0:n.length)||0," results"))}return null})))),jt.createElement("div",{className:"DocSearch-AskAiScreen-Answer-Footer"},jt.createElement(qv,{id:(null==l?void 0:l.id)||n.id,showActions:d,latestAssistantMessageContent:(null==p?void 0:p.text)||null,translations:o,conversations:s,onFeedback:c}))),v.length>0?jt.createElement(Uv,{urlsToDisplay:v,relatedSourcesText:o.relatedSourcesText}):null)}function qv(e){var t=e.id,n=e.showActions,r=e.latestAssistantMessageContent,u=e.translations,a=e.conversations,i=e.onFeedback,o=jt.useMemo((function(){var e,n,r=null===(e=a.getOne)||void 0===e?void 0:e.call(a,t);return null!==(n=null==r?void 0:r.feedback)&&void 0!==n?n:null}),[a,t]),s=cn(jt.useState(o),2),c=s[0],l=s[1],f=cn(jt.useState(!1),2),d=f[0],p=f[1],h=cn(jt.useState(null),2),v=h[0],m=h[1],D=function(){var e=Ht(on().mark((function e(n){return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!d){e.next=2;break}return e.abrupt("return");case 2:return m(null),p(!0),e.prev=4,e.next=7,null==i?void 0:i(t,"like"===n?1:0);case 7:l(n),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),m(e.t0);case 13:return e.prev=13,p(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[4,10,13,16]])})));return function(t){return e.apply(this,arguments)}}(),y=u.likeButtonTitle,g=void 0===y?"Like":y,F=u.dislikeButtonTitle,E=void 0===F?"Dislike":F,_=u.thanksForFeedbackText,b=void 0===_?"Thanks for your feedback!":_;return n&&r?jt.createElement("div",{className:"DocSearch-AskAiScreen-Actions"},null===c?jt.createElement(jt.Fragment,null,d?jt.createElement(sh,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}):jt.createElement(jt.Fragment,null,jt.createElement(Kv,{title:g,onClick:function(){return D("like")}}),jt.createElement(Jv,{title:E,onClick:function(){return D("dislike")}})),v&&jt.createElement("p",{className:"DocSearch-AskAiScreen-FeedbackText"},v.message||"An error occured")):jt.createElement("p",{className:"DocSearch-AskAiScreen-FeedbackText DocSearch-AskAiScreen-FeedbackText--visible"},b),jt.createElement(Wv,{translations:u,onClick:function(){return navigator.clipboard.writeText(r)}})):null}function Uv(e){var t=e.urlsToDisplay,n=e.relatedSourcesText;return jt.createElement("div",{className:"DocSearch-AskAiScreen-RelatedSources"},jt.createElement("p",{className:"DocSearch-AskAiScreen-RelatedSources-Title"},n||"Related sources"),jt.createElement("div",{className:"DocSearch-AskAiScreen-RelatedSources-List"},t.length>0&&t.map((function(e){return jt.createElement("a",{key:e.url,href:e.url,className:"DocSearch-AskAiScreen-RelatedSources-Item-Link",target:"_blank",rel:"noopener noreferrer"},jt.createElement(Vv,null),jt.createElement("span",null,e.title||e.url))}))))}function Hv(e){var t=e.translations,n=void 0===t?{}:t,r=an(e,Zv),u=n.disclaimerText,a=void 0===u?"Answers are generated with AI which can make mistakes. Verify responses.":u,i=r.messages,o=Te((function(){for(var e=[],t=0;t<i.length;t++)if("user"===i[t].role){var n,r=i[t],u="assistant"===(null===(n=i[t+1])||void 0===n?void 0:n.role)?i[t+1]:null;e.push({id:r.id,userMessage:r,assistantMessage:u}),u&&t++}return e}),[i]),s=function(e){r.onAskAiToggle(!1),r.setQuery(e)};return jt.createElement("div",{className:"DocSearch-AskAiScreen DocSearch-AskAiScreen-Container"},jt.createElement(Lv,{disclaimerText:a}),jt.createElement("div",{className:"DocSearch-AskAiScreen-Body"},jt.createElement("div",{className:"DocSearch-AskAiScreen-ExchangesList"},o.slice().reverse().map((function(e,t){return jt.createElement($v,{key:e.id,exchange:e,askAiStreamError:r.askAiStreamError,isLastExchange:0===t,loadingStatus:r.status,translations:n,conversations:r.conversations,onSearchQueryClick:s,onFeedback:r.onFeedback})})))))}function Vv(){return jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("line",{x1:"4",x2:"20",y1:"9",y2:"9"}),jt.createElement("line",{x1:"4",x2:"20",y1:"15",y2:"15"}),jt.createElement("line",{x1:"10",x2:"8",y1:"3",y2:"21"}),jt.createElement("line",{x1:"16",x2:"14",y1:"3",y2:"21"}))}function Wv(e){var t=e.onClick,n=e.translations,r=n.copyButtonTitle,u=void 0===r?"Copy":r,a=n.copyButtonCopiedText,i=void 0===a?"Copied!":a,o=cn(we(!1),2),s=o[0],c=o[1];return Se((function(){if(s){var e=setTimeout((function(){c(!1)}),1500);return function(){return clearTimeout(e)}}}),[s]),jt.createElement("button",{type:"button",className:"DocSearch-AskAiScreen-ActionButton DocSearch-AskAiScreen-CopyButton ".concat(s?"DocSearch-AskAiScreen-CopyButton--copied":""),disabled:s,title:s?i:u,onClick:function(){t(),c(!0)}},s?jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-check-icon lucide-check"},jt.createElement("path",{d:"M20 6 9 17l-5-5"})):jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-copy-icon lucide-copy"},jt.createElement("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),jt.createElement("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})))}function Kv(e){var t=e.title,n=e.onClick;return jt.createElement("button",{type:"button",className:"DocSearch-AskAiScreen-ActionButton DocSearch-AskAiScreen-LikeButton",title:t,onClick:n},jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-thumbs-up-icon lucide-thumbs-up"},jt.createElement("path",{d:"M7 10v12"}),jt.createElement("path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"})))}function Jv(e){var t=e.title,n=e.onClick;return jt.createElement("button",{type:"button",className:"DocSearch-AskAiScreen-ActionButton DocSearch-AskAiScreen-DislikeButton",title:t,onClick:n},jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-thumbs-down-icon lucide-thumbs-down"},jt.createElement("path",{d:"M17 14V2"}),jt.createElement("path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z"})))}function Gv(e){var t=e.translations,n=void 0===t?{}:t,r=n.titleText,u=void 0===r?"Unable to fetch results":r,a=n.helpText,i=void 0===a?"You might want to check your network connection.":a;return jt.createElement("div",{className:"DocSearch-ErrorScreen"},jt.createElement("div",{className:"DocSearch-Screen-Icon"},jt.createElement(gh,null)),jt.createElement("p",{className:"DocSearch-Title"},u),jt.createElement("p",{className:"DocSearch-Help"},i))}var Qv=["translations"];function Yv(e){var t=e.translations,n=void 0===t?{}:t,r=an(e,Qv),u=n.noResultsText,a=void 0===u?"No results found for":u,i=n.suggestedQueryText,o=void 0===i?"Try searching for":i,s=n.reportMissingResultsText,c=void 0===s?"Believe this query should return results?":s,l=n.reportMissingResultsLinkText,f=void 0===l?"Let us know.":l,d=r.state.context.searchSuggestions;return jt.createElement("div",{className:"DocSearch-NoResults ".concat(r.canHandleAskAi?"DocSearch-NoResults--withAskAi":"")},jt.createElement("div",{className:"DocSearch-Screen-Icon"},jt.createElement(Fh,null)),jt.createElement("p",{className:"DocSearch-Title"},a,' "',jt.createElement("strong",null,r.state.query),'"'),d&&d.length>0&&jt.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},jt.createElement("p",{className:"DocSearch-Help"},o,":"),jt.createElement("div",{className:"DocSearch-NoResults-Prefill-List-Items"},d.slice(0,3).reduce((function(e,t){return[].concat(ln(e),[jt.createElement("p",{key:t},jt.createElement(Fn,{size:16}),jt.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){r.setQuery(t.toLowerCase()+" "),r.refresh(),r.inputRef.current.focus()}},t))])}),[]))),r.getMissingResultsUrl&&jt.createElement("p",{className:"DocSearch-Help"},"".concat(c," "),jt.createElement("a",{href:r.getMissingResultsUrl({query:r.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var Xv=["hit","attribute","tagName"];function em(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function tm(e){var t=e.hit,n=e.attribute,r=e.tagName;return q(void 0===r?"span":r,un(un({},an(e,Xv)),{},{dangerouslySetInnerHTML:{__html:em(t,"_snippetResult.".concat(n,".value"))||em(t,n)}}))}function nm(e){return e.collection&&0!==e.collection.items.length?"askAI"===e.collection.source.sourceId?jt.createElement("section",{className:"DocSearch-AskAi-Section"},jt.createElement("ul",e.getListProps({source:e.collection.source}),jt.createElement(um,Xt({item:e.collection.items[0],translations:e.translations},e)))):(e.collection.source.sourceId,jt.createElement("section",{className:"DocSearch-Hits"},jt.createElement("div",{className:"DocSearch-Hit-source"},e.title),jt.createElement("ul",e.getListProps({source:e.collection.source}),e.collection.items.map((function(t,n){return jt.createElement(rm,Xt({key:[e.title,t.objectID].join(":"),item:t,index:n},e))}))))):null}function rm(e){var t=e.item,n=e.index,r=e.renderIcon,u=e.renderAction,a=e.getItemProps,i=e.onItemClick,o=e.collection,s=e.hitComponent,c=cn(jt.useState("idle"),2),l=c[0],f=c[1],d=jt.useRef(null),p=s;return jt.createElement("li",Xt({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child","favoriting"===l&&"DocSearch-Hit--favoriting","deleting"===l&&"DocSearch-Hit--deleting"].filter(Boolean).join(" "),onAnimationEnd:function(){var e;null===(e=d.current)||void 0===e||e.call(d),d.current=null}},a({item:t,source:o.source,onClick:function(e){i(t,e)}})),jt.createElement(p,{hit:t},jt.createElement("div",{className:"DocSearch-Hit-Container"},r({item:t,index:n}),t.hierarchy[t.type]&&"lvl1"===t.type&&jt.createElement("div",{className:"DocSearch-Hit-content-wrapper"},jt.createElement(tm,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&jt.createElement(tm,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),"askAI"===t.type&&jt.createElement("div",{className:"DocSearch-Hit-content-wrapper"},jt.createElement(tm,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"})),t.hierarchy[t.type]&&("lvl2"===t.type||"lvl3"===t.type||"lvl4"===t.type||"lvl5"===t.type||"lvl6"===t.type)&&jt.createElement("div",{className:"DocSearch-Hit-content-wrapper"},jt.createElement(tm,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),jt.createElement(tm,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),"content"===t.type&&jt.createElement("div",{className:"DocSearch-Hit-content-wrapper"},jt.createElement(tm,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),jt.createElement(tm,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),u({item:t,runDeleteTransition:function(e){f("deleting"),d.current=e},runFavoriteTransition:function(e){f("favoriting"),d.current=e}}))))}function um(e){var t=e.item,n=e.getItemProps,r=e.onItemClick,u=e.translations,a=e.collection,i=(u||{}).askAiPlaceholder,o=void 0===i?"Ask AI: ":i;return jt.createElement("li",Xt({className:"DocSearch-Hit"},n({item:t,source:a.source,onClick:function(e){r(t,e)}})),jt.createElement("div",{className:"DocSearch-Hit--AskAI"},jt.createElement("div",{className:"DocSearch-Hit-AskAIButton DocSearch-Hit-Container"},jt.createElement("div",{className:" DocSearch-Hit-AskAIButton-icon DocSearch-Hit-icon"},jt.createElement(ch,null)),jt.createElement("div",{className:"DocSearch-Hit-AskAIButton-title"},jt.createElement("span",{className:"DocSearch-Hit-AskAIButton-title-highlight"},o),jt.createElement("mark",{className:"DocSearch-Hit-AskAIButton-title-query"},t.query||"")))))}function am(e,t,n){return e.reduce((function(e,r){var u=t(r);return e.hasOwnProperty(u)||(e[u]=[]),e[u].length<(n||5)&&e[u].push(r),e}),{})}function im(e){return e}function om(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function sm(){}var cm=/(<mark>|<\/mark>)/g,lm=RegExp(cm.source);function fm(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var u=r.__docsearch_parent?null===(t=r.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(n=e._highlightResult)||void 0===n||null===(n=n.hierarchy)||void 0===n?void 0:n.lvl0;return u?u.value&&lm.test(u.value)?u.value.replace(cm,""):u.value:e.hierarchy.lvl0}var dm=["translations"];function pm(e){var t=e.translations,n=void 0===t?{}:t,r=an(e,dm);return jt.createElement("div",{className:"DocSearch-Dropdown-Container"},r.state.collections.map((function(e){if(0===e.items.length)return null;var t=fm(e.items[0]);return jt.createElement(nm,Xt({},r,{key:e.source.sourceId,translations:n,title:t,collection:e,renderIcon:function(t){var n,r=t.item,u=t.index;return jt.createElement(jt.Fragment,null,r.__docsearch_parent&&jt.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},jt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.__docsearch_parent!==(null===(n=e.items[u+1])||void 0===n?void 0:n.__docsearch_parent)?jt.createElement("path",{d:"M8 6v21M20 27H8.3"}):jt.createElement("path",{d:"M8 6v42M20 27H8.3"}))),jt.createElement("div",{className:"DocSearch-Hit-icon"},jt.createElement(vh,{type:r.type})))},renderAction:function(){return jt.createElement("div",{className:"DocSearch-Hit-action"},jt.createElement(ph,null))}}))})),r.resultsFooterComponent&&jt.createElement("section",{className:"DocSearch-HitsFooter"},jt.createElement(r.resultsFooterComponent,{state:r.state})))}var hm=["translations"];function vm(e){var t=e.translations,n=void 0===t?{}:t,r=an(e,hm),u=n.recentSearchesTitle,a=void 0===u?"Recent":u,i=n.saveRecentSearchButtonTitle,o=void 0===i?"Save this search":i,s=n.removeRecentSearchButtonTitle,c=void 0===s?"Remove this search from history":s,l=n.favoriteSearchesTitle,f=void 0===l?"Favorite":l,d=n.removeFavoriteSearchButtonTitle,p=void 0===d?"Remove this search from favorites":d,h=n.recentConversationsTitle,v=void 0===h?"Recent conversations":h,m=n.removeRecentConversationButtonTitle,D=void 0===m?"Remove this conversation from history":m;return jt.createElement("div",{className:"DocSearch-Dropdown-Container"},jt.createElement(nm,Xt({},r,{title:a,collection:r.state.collections[0],renderIcon:function(){return jt.createElement("div",{className:"DocSearch-Hit-icon"},jt.createElement(lh,null))},renderAction:function(e){var t=e.item,n=e.runFavoriteTransition,u=e.runDeleteTransition;return jt.createElement(jt.Fragment,null,jt.createElement("div",{className:"DocSearch-Hit-action"},jt.createElement("button",{className:"DocSearch-Hit-action-button",title:o,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){r.favoriteSearches.add(t),r.recentSearches.remove(t),r.refresh()}))}},jt.createElement(yh,null))),jt.createElement("div",{className:"DocSearch-Hit-action"},jt.createElement("button",{className:"DocSearch-Hit-action-button",title:c,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),u((function(){r.recentSearches.remove(t),r.refresh()}))}},jt.createElement(fh,null))))}})),jt.createElement(nm,Xt({},r,{title:f,collection:r.state.collections[1],renderIcon:function(){return jt.createElement("div",{className:"DocSearch-Hit-icon"},jt.createElement(yh,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return jt.createElement("div",{className:"DocSearch-Hit-action"},jt.createElement("button",{className:"DocSearch-Hit-action-button",title:p,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){r.favoriteSearches.remove(t),r.refresh()}))}},jt.createElement(fh,null)))}})),jt.createElement(nm,Xt({},r,{title:v,collection:r.state.collections[2],renderIcon:function(){return jt.createElement("div",{className:"DocSearch-Hit-icon"},jt.createElement(ch,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return jt.createElement("div",{className:"DocSearch-Hit-action"},jt.createElement("button",{className:"DocSearch-Hit-action-button",title:D,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){r.conversations.remove(t),r.refresh()}))}},jt.createElement(fh,null)))}})))}var mm=["translations"],Dm=jt.memo((function(e){var t,n=e.translations,r=void 0===n?{}:n,u=an(e,mm);return u.isAskAiActive&&u.canHandleAskAi?jt.createElement(Hv,Xt({},u,{messages:u.messages,status:u.status,askAiStreamError:u.askAiStreamError,askAiFetchError:u.askAiFetchError,translations:null==r?void 0:r.askAiScreen})):"error"===(null===(t=u.state)||void 0===t?void 0:t.status)?jt.createElement(Gv,{translations:null==r?void 0:r.errorScreen}):u.state.query?u.hasCollections||u.canHandleAskAi?jt.createElement(jt.Fragment,null,jt.createElement(pm,Xt({},u,{translations:null==r?void 0:r.resultsScreen})),u.canHandleAskAi&&1===u.state.collections.length&&jt.createElement(Yv,Xt({},u,{translations:null==r?void 0:r.noResultsScreen}))):jt.createElement(Yv,Xt({},u,{translations:null==r?void 0:r.noResultsScreen})):jt.createElement(vm,Xt({},u,{hasCollections:u.hasCollections,translations:null==r?void 0:r.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function ym(e){var t=e.size,n=void 0===t?20:t,r=e.color,u=void 0===r?"currentColor":r;return jt.createElement("svg",{width:n,height:n,className:"DocSearch-Back-Icon",viewBox:"0 0 24 24",fill:"none",stroke:u,strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},jt.createElement("path",{d:"m12 19-7-7 7-7"}),jt.createElement("path",{d:"M19 12H5"}))}var gm=["translations"];function Fm(e){var t=e.translations,n=void 0===t?{}:t,r=an(e,gm),u=n.clearButtonTitle,a=void 0===u?"Clear":u,i=n.clearButtonAriaLabel,o=void 0===i?"Clear the query":i,s=n.closeButtonText,c=void 0===s?"Close":s,l=n.closeButtonAriaLabel,f=void 0===l?"Close":l,d=n.searchInputLabel,p=void 0===d?"Search":d,h=n.backToKeywordSearchButtonText,v=void 0===h?"Back to keyword search":h,m=n.backToKeywordSearchButtonAriaLabel,D=void 0===m?"Back to keyword search":m,y=n.placeholderTextAskAiStreaming,g=void 0===y?"Answering...":y,F=r.getFormProps({inputElement:r.inputRef.current}).onReset;jt.useEffect((function(){r.autoFocus&&r.inputRef.current&&r.inputRef.current.focus()}),[r.autoFocus,r.inputRef]),jt.useEffect((function(){r.isFromSelection&&r.inputRef.current&&r.inputRef.current.select()}),[r.isFromSelection,r.inputRef]);var E=r.getInputProps({inputElement:r.inputRef.current,autoFocus:r.autoFocus,maxLength:512}),_=new Set(["ArrowUp","ArrowDown","Enter"]),b=E.onKeyDown,k=E.onChange,C="streaming"===r.askAiStatus||"submitted"===r.askAiStatus,A="stalled"===r.state.status;jt.useEffect((function(){"streaming"!==r.askAiStatus&&"submitted"!==r.askAiStatus&&r.inputRef.current&&r.inputRef.current.focus()}),[r.askAiStatus,r.inputRef]);var w=un(un({},E),{},{enterKeyHint:r.isAskAiActive?"enter":"search",onKeyDown:function(e){if(r.isAskAiActive&&_.has(e.key))return"Enter"===e.key&&!C&&r.state.query&&r.onAskAgain(r.state.query),e.preventDefault(),void e.stopPropagation();null==b||b(e)},onChange:function(e){if(r.isAskAiActive)return r.setQuery(e.currentTarget.value),e.preventDefault(),void e.stopPropagation();null==k||k(e)},disabled:C});return jt.createElement(jt.Fragment,null,jt.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:F},r.isAskAiActive?jt.createElement(jt.Fragment,null,jt.createElement("button",{type:"button",tabIndex:0,className:"DocSearch-AskAi-Return",title:v,"aria-label":D,onClick:function(){return r.onAskAiToggle(!1)}},jt.createElement(ym,null))):jt.createElement(jt.Fragment,null,A&&jt.createElement("div",{className:"DocSearch-LoadingIndicator"},jt.createElement(sh,null)),!A&&jt.createElement("label",Xt({className:"DocSearch-MagnifierLabel"},r.getLabelProps()),jt.createElement(Fn,null),jt.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},p))),jt.createElement("input",Xt({className:"DocSearch-Input",ref:r.inputRef},w,{placeholder:C?g:r.placeholder})),jt.createElement("div",{className:"DocSearch-Actions"},C&&jt.createElement("button",{type:"button",className:"DocSearch-StreamingIndicator",onClick:function(){return r.onAskAiToggle(!0)}},jt.createElement(ch,null)),jt.createElement("button",{className:"DocSearch-Clear",type:"reset","aria-label":o,hidden:!r.state.query,tabIndex:r.state.query?0:-1,"aria-hidden":r.state.query?"false":"true"},a),(C||r.state.query)&&jt.createElement("div",{className:"DocSearch-Divider"}),jt.createElement("button",{type:"button",title:c,className:"DocSearch-Close","aria-label":f,onClick:r.onClose},jt.createElement(fh,null)))))}function Em(){if("undefined"!=typeof window&&window.localStorage){var e=[];for(var t in window.localStorage)if(t.includes("__DOCSEARCH_")){var n=window.localStorage[t];e.push({key:t,size:n.length+t.length})}e.sort((function(e,t){return t.size-e.size}));for(var r=Math.ceil(e.length/2),u=0;u<r&&u<e.length;u++)try{window.localStorage.removeItem(e[u].key)}catch(e){}}}function _m(e){return!1===function(){if("undefined"==typeof window||!("localStorage"in window))return!1;var e="__TEST_KEY__";try{return window.localStorage.setItem(e,""),window.localStorage.removeItem(e),!0}catch(e){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){!function(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(n){if(n instanceof DOMException&&"QuotaExceededError"===n.name)try{Em(),window.localStorage.setItem(e,JSON.stringify(t))}catch(e){}}}(e,t)},getItem:function(){var t=window.localStorage.getItem(e);if(null===t)return[];try{var n=JSON.parse(t);return Array.isArray(n)?n:[]}catch(t){return window.localStorage.removeItem(e),[]}}}}var bm=["_highlightResult","_snippetResult"];function km(e){var t=e.key,n=e.limit,r=void 0===n?5:n,u=_m(t),a=u.getItem().slice(0,r);return{add:function(e){var t=e;t._highlightResult,t._snippetResult;var n=an(t,bm),i=a.findIndex((function(e){return e.objectID===n.objectID}));i>-1&&a.splice(i,1),a.unshift(n),a=a.slice(0,r),u.setItem(a)},remove:function(e){a=a.filter((function(t){return t.objectID!==e.objectID})),u.setItem(a)},getAll:function(){return a}}}function Cm(e){var t,n="algolia-client-js-".concat(e.key);function r(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function u(){return JSON.parse(r().getItem(n)||"{}")}function a(e){r().setItem(n,JSON.stringify(e))}return{get:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var n,r,i;return n=e.timeToLive?1e3*e.timeToLive:null,r=u(),a(i=Object.fromEntries(Object.entries(r).filter((function(e){return void 0!==cn(e,2)[1].timestamp})))),n&&a(Object.fromEntries(Object.entries(i).filter((function(e){var t=cn(e,2)[1],r=(new Date).getTime();return!(t.timestamp+n<r)})))),u()[JSON.stringify(t)]})).then((function(e){return Promise.all([e?e.value:n(),void 0!==e])})).then((function(e){var t=cn(e,2),n=t[0],u=t[1];return Promise.all([n,u||r.miss(n)])})).then((function(e){return cn(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var a=u();return a[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},r().setItem(n,JSON.stringify(a)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=u();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){r().removeItem(n)}))}}}function Am(e){var t=ln(e.caches),n=t.shift();return void 0===n?{get:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return cn(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,u).catch((function(){return Am({caches:t}).get(e,r,u)}))},set:function(e,r){return n.set(e,r).catch((function(){return Am({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return Am({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return Am({caches:t}).clear()}))}}}function wm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var i=r();return i.then((function(e){return u.miss(e)})).then((function(){return i}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function xm(e){var t=e.algoliaAgents,n=e.client,r=e.version,u=function(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var n="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(n)&&(t.value="".concat(t.value).concat(n)),t}};return t}(r).add({segment:n,version:r});return t.forEach((function(e){return u.add(e)})),u}var Sm=12e4;function Bm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"up",n=Date.now();return un(un({},e),{},{status:t,lastUpdate:n,isUp:function(){return"up"===t||Date.now()-n>Sm},isTimedOut:function(){return"timed out"===t&&Date.now()-n<=Sm}})}var Om=function(){function e(t,n){var r;return Wt(this,e),Yt(r=Vt(this,e,[t]),"name","AlgoliaError"),n&&(r.name=n),r}return tn(e,hn(Error)),Gt(e)}(),Im=function(){function e(t,n,r){var u;return Wt(this,e),Yt(u=Vt(this,e,[t,r]),"stackTrace",void 0),u.stackTrace=n,u}return tn(e,Om),Gt(e)}(),Tm=function(){function e(t){return Wt(this,e),Vt(this,e,["Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",t,"RetryError"])}return tn(e,Im),Gt(e)}(),Pm=function(){function e(t,n,r){var u,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ApiError";return Wt(this,e),Yt(u=Vt(this,e,[t,r,a]),"status",void 0),u.status=n,u}return tn(e,Im),Gt(e)}(),jm=function(){function e(t,n){var r;return Wt(this,e),Yt(r=Vt(this,e,[t,"DeserializationError"]),"response",void 0),r.response=n,r}return tn(e,Om),Gt(e)}(),Nm=function(){function e(t,n,r,u){var a;return Wt(this,e),Yt(a=Vt(this,e,[t,n,u,"DetailedApiError"]),"error",void 0),a.error=r,a}return tn(e,Pm),Gt(e)}();function zm(e,t,n){var r,u=(r=n,Object.keys(r).filter((function(e){return void 0!==r[e]})).sort().map((function(e){return"".concat(e,"=").concat(encodeURIComponent("[object Array]"===Object.prototype.toString.call(r[e])?r[e].join(","):r[e]).replace(/\+/g,"%20"))})).join("&")),a="".concat(e.protocol,"://").concat(e.url).concat(e.port?":".concat(e.port):"","/").concat("/"===t.charAt(0)?t.substring(1):t);return u.length&&(a+="?".concat(u)),a}function Rm(e,t){if("GET"!==e.method&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:un(un({},e.data),t.data);return JSON.stringify(n)}}function Mm(e,t,n){var r=un(un(un({Accept:"application/json"},e),t),n),u={};return Object.keys(r).forEach((function(e){var t=r[e];u[e.toLowerCase()]=t})),u}function Zm(e){try{return JSON.parse(e.content)}catch(t){throw new jm(t.message,e)}}function Lm(e,t){var n=e.content,r=e.status;try{var u=JSON.parse(n);return"error"in u?new Nm(u.message,r,u.error,t):new Pm(u.message,r,t)}catch(e){}return new Pm(n,r,t)}function $m(e){return e.map((function(e){return qm(e)}))}function qm(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return un(un({},e),{},{request:un(un({},e.request),{},{headers:un(un({},e.request.headers),t)})})}var Um=["appId","apiKey","authMode","algoliaAgents"],Hm=["params"],Vm="5.28.0";function Wm(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){for(var t=e,n=e.length-1;n>0;n--){var r=Math.floor(Math.random()*(n+1)),u=e[n];t[n]=e[r],t[r]=u}return t}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}var Km="4.0.0";function Jm(e,t,n){var r=jt.useMemo((function(){var r=function(e,t){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");return function(e){var t=e.appId,n=e.apiKey,r=e.authMode,u=e.algoliaAgents,a=an(e,Um),i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"WithinHeaders",r={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:function(){return"WithinHeaders"===n?r:{}},queryParameters:function(){return"WithinQueryParameters"===n?r:{}}}}(t,n,r),o=function(e){var t=e.hosts,n=e.hostsCache,r=e.baseHeaders,u=e.logger,a=e.baseQueryParameters,i=e.algoliaAgent,o=e.timeouts,s=e.requester,c=e.requestsCache,l=e.responsesCache;function f(e){return d.apply(this,arguments)}function d(){return(d=Ht(on().mark((function e(t){var r,u,a,i,o;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return n.get(e,(function(){return Promise.resolve(Bm(e))}))})));case 2:return r=e.sent,u=r.filter((function(e){return e.isUp()})),a=r.filter((function(e){return e.isTimedOut()})),i=[].concat(ln(u),ln(a)),o=i.length>0?i:t,e.abrupt("return",{hosts:o,getTimeout:function(e,t){return(0===a.length&&0===e?1:a.length+3+e)*t}});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e,t){return h.apply(this,arguments)}function h(){return h=Ht(on().mark((function e(c,l){var d,p,h,v,m,D,y,g,F,E,_,b,k,C=arguments;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d=!(C.length>2&&void 0!==C[2])||C[2],p=[],h=Rm(c,l),v=Mm(r,c.headers,l.headers),m="GET"===c.method?un(un({},c.data),l.data):{},D=un(un(un({},a),c.queryParameters),m),i.value&&(D["x-algolia-agent"]=i.value),l&&l.queryParameters)for(y=0,g=Object.keys(l.queryParameters);y<g.length;y++)F=g[y],l.queryParameters[F]&&"[object Object]"!==Object.prototype.toString.call(l.queryParameters[F])?D[F]=l.queryParameters[F].toString():D[F]=l.queryParameters[F];return E=0,_=function(){var e=Ht(on().mark((function e(t,r){var a,i,f,m,y,g;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==(a=t.pop())){e.next=3;break}throw new Tm($m(p));case 3:return i=un(un({},o),l.timeouts),f={data:h,headers:v,method:c.method,url:zm(a,c.path,D),connectTimeout:r(E,i.connect),responseTimeout:r(E,d?i.read:i.write)},m=function(e){var n={request:f,response:e,host:a,triesLeft:t.length};return p.push(n),n},e.next=8,s.send(f);case 8:if(b=(F=y=e.sent).isTimedOut,k=F.status,!(b||function(e){return!e.isTimedOut&&!~~e.status}({isTimedOut:b,status:k})||2!=~~(k/100)&&4!=~~(k/100))){e.next=16;break}return g=m(y),y.isTimedOut&&E++,u.info("Retryable failure",qm(g)),e.next=15,n.set(a,Bm(a,y.isTimedOut?"timed out":"down"));case 15:return e.abrupt("return",_(t,r));case 16:if(2!=~~(y.status/100)){e.next=18;break}return e.abrupt("return",Zm(y));case 18:throw m(y),Lm(y,p);case 20:case"end":return e.stop()}var F,b,k}),e)})));return function(t,n){return e.apply(this,arguments)}}(),b=t.filter((function(e){return"readWrite"===e.accept||(d?"read"===e.accept:"write"===e.accept)})),e.next=13,f(b);case 13:return k=e.sent,e.abrupt("return",_(ln(k.hosts).reverse(),k.getTimeout));case 15:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}return{hostsCache:n,requester:s,timeouts:o,logger:u,algoliaAgent:i,baseHeaders:r,baseQueryParameters:a,hosts:t,request:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.useReadTransporter||"GET"===e.method;if(!n)return p(e,t,n);var u=function(){return p(e,t)};if(!0!==(t.cacheable||e.cacheable))return u();var i={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return l.get(i,(function(){return c.get(i,(function(){return c.set(i,u()).then((function(e){return Promise.all([c.delete(i),e])}),(function(e){return Promise.all([c.delete(i),Promise.reject(e)])})).then((function(e){var t=cn(e,2);return t[0],t[1]}))}))}),{miss:function(e){return l.set(i,e)}})},requestsCache:c,responsesCache:l}}(un(un({hosts:Wm(t)},a),{},{algoliaAgent:xm({algoliaAgents:u,client:"Lite",version:Vm}),baseHeaders:un(un({"content-type":"text/plain"},i.headers()),a.baseHeaders),baseQueryParameters:un(un({},i.queryParameters()),a.baseQueryParameters)}));return{transporter:o,appId:t,apiKey:n,clearCache:function(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((function(){}))},get _ua(){return o.algoliaAgent.value},addAlgoliaAgent:function(e,t){o.algoliaAgent.add({segment:e,version:t})},setClientApiKey:function(e){var t=e.apiKey;r&&"WithinHeaders"!==r?o.baseQueryParameters["x-algolia-api-key"]=t:o.baseHeaders["x-algolia-api-key"]=t},searchForHits:function(e,t){return this.search(e,t)},searchForFacets:function(e,t){return this.search(e,t)},customPost:function(e,t){var n=e.path,r=e.parameters,u=e.body;if(!n)throw new Error("Parameter `path` is required when calling `customPost`.");var a={method:"POST",path:"/{path}".replace("{path}",n),queryParameters:r||{},headers:{},data:u||{}};return o.request(a,t)},getRecommendations:function(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var n={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return o.request(n,t)},search:function(e,t){if(e&&Array.isArray(e)){var n={requests:e.map((function(e){var t=e.params,n=an(e,Hm);return"facet"===n.type?un(un(un({},n),t),{},{type:"facet"}):un(un(un({},n),t),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}))};e=n}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return o.request(r,t)}}}(un({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:function(e,t){return Promise.resolve()},info:function(e,t){return Promise.resolve()},error:function(e,t){return Promise.resolve()}},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,u=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),e)},a=u(e.connectTimeout,"Connection timeout");n.onreadystatechange=function(){n.readyState>n.OPENED&&void 0===r&&(clearTimeout(a),r=u(e.responseTimeout,"Socket timeout"))},n.onerror=function(){0===n.status&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:wm(),requestsCache:wm({serializable:!1}),hostsCache:Am({caches:[Cm({key:"".concat(Vm,"-").concat(e)}),wm()]})},void 0))}(e,t);return r.addAlgoliaAgent("docsearch",Km),!1===/docsearch.js \(.*\)/.test(r.transporter.algoliaAgent.value)&&r.addAlgoliaAgent("docsearch-react",Km),n(r)}),[e,t,n]);return r}var Gm=["footer","searchBox"],Qm=function(){var e=Ht(on().mark((function e(t){var n,r,u,a,i,o,s,c,l,f,d,p,h,v,m,D,y,g;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.query,r=t.state,u=t.setContext,a=t.setStatus,i=t.searchClient,o=t.indexes,s=t.snippetLength,c=t.insights,l=t.appId,f=t.apiKey,d=t.maxResultsPerGroup,p=t.transformItems,h=void 0===p?im:p,v=t.saveRecentSearch,m=t.onClose,D=c,e.prev=2,e.next=5,i.search({requests:o.map((function(e){var t,r,u,a,i,o,c,l="string"==typeof e?e:e.name,f="string"==typeof e?{}:e.searchParameters;return un({query:n,indexName:l,attributesToRetrieve:null!==(t=null==f?void 0:f.attributesToRetrieve)&&void 0!==t?t:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:null!==(r=null==f?void 0:f.attributesToSnippet)&&void 0!==r?r:["hierarchy.lvl1:".concat(s.current),"hierarchy.lvl2:".concat(s.current),"hierarchy.lvl3:".concat(s.current),"hierarchy.lvl4:".concat(s.current),"hierarchy.lvl5:".concat(s.current),"hierarchy.lvl6:".concat(s.current),"content:".concat(s.current)],snippetEllipsisText:null!==(u=null==f?void 0:f.snippetEllipsisText)&&void 0!==u?u:"…",highlightPreTag:null!==(a=null==f?void 0:f.highlightPreTag)&&void 0!==a?a:"<mark>",highlightPostTag:null!==(i=null==f?void 0:f.highlightPostTag)&&void 0!==i?i:"</mark>",hitsPerPage:null!==(o=null==f?void 0:f.hitsPerPage)&&void 0!==o?o:20,clickAnalytics:null!==(c=null==f?void 0:f.clickAnalytics)&&void 0!==c?c:D},null!=f?f:{})}))});case 5:return y=e.sent,g=y.results,e.abrupt("return",g.flatMap((function(e){var t,n=e,a=n.hits,i=n.nbHits,o=am(h(a),(function(e){return fm(e)}),d);if(r.context.searchSuggestions.length<Object.keys(o).length&&u({searchSuggestions:un(un({},null!==(t=r.context.searchSuggestions)&&void 0!==t?t:[]),Object.keys(o))}),i){var s=r.context.nbHits;u({nbHits:(null!=s?s:0)+i})}var c={};return D&&(c={__autocomplete_indexName:n.index,__autocomplete_queryID:n.queryID,__autocomplete_algoliaCredentials:{appId:l,apiKey:f}}),Object.values(o).map((function(e,t){return{sourceId:"hits_".concat(n.index,"_").concat(t),onSelect:function(e){var t=e.item,n=e.event;v(t),om(n)||m()},getItemUrl:function(e){return e.item.url},getItems:function(){return Object.values(am(e,(function(e){return e.hierarchy.lvl1}),d)).map((function(e){return e.map((function(t){var n=null,r=e.find((function(e){return"lvl1"===e.type&&e.hierarchy.lvl1===t.hierarchy.lvl1}));return"lvl1"!==t.type&&r&&(n=r),un(un({},t),{},{__docsearch_parent:n},c)}))})).flat()}}}))})));case 10:throw e.prev=10,e.t0=e.catch(2),"RetryError"===e.t0.name&&a("error"),e.t0;case 14:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}();function Ym(e){var t,n,r,u,a,i,o,s=e.appId,c=e.apiKey,l=e.placeholder,f=e.askAi,d=e.maxResultsPerGroup,p=e.theme,h=e.onClose,v=void 0===h?sm:h,D=e.transformItems,y=void 0===D?im:D,g=e.hitComponent,F=void 0===g?oh:g,E=e.resultsFooterComponent,_=void 0===E?function(){return null}:E,b=e.navigator,k=e.initialScrollY,C=void 0===k?0:k,A=e.transformSearchClient,w=void 0===A?im:A,x=e.disableUserPersonalization,S=void 0!==x&&x,B=e.initialQuery,O=void 0===B?"":B,I=e.translations,T=void 0===I?{}:I,P=e.getMissingResultsUrl,j=e.insights,N=void 0!==j&&j,z=e.onAskAiToggle,R=e.isAskAiActive,M=void 0!==R&&R,Z=e.canHandleAskAi,L=void 0!==Z&&Z,$=e.recentSearchesLimit,q=void 0===$?7:$,U=e.recentSearchesWithFavoritesLimit,H=void 0===U?4:U,V=e.indexes,W=T.footer,K=T.searchBox,J=an(T,Gm),G=cn(jt.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),Q=G[0],Y=G[1],X=jt.useRef(null),ee=jt.useRef(null),te=jt.useRef(null),ne=jt.useRef(null),re=jt.useRef(null),ue=jt.useRef(15),ae=jt.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,512):"").current,ie=jt.useRef(O||ae).current,oe=Jm(s,c,w),se="object"===dn(f)?f:null,ce="string"==typeof f?f:(null==se?void 0:se.assistantId)||null,le=null==se?void 0:se.searchParameters,fe=V[0].name,de=jt.useRef((t={key:"__DOCSEARCH_ASKAI_CONVERSATIONS__".concat((null==se?void 0:se.indexName)||fe),limit:10},n=t.key,r=t.limit,u=void 0===r?5:r,a=_m(n),i=a.getItem().slice(0,u),{add:function(e){var t=e.objectID,n=e.query,r=i.findIndex((function(e){return e.objectID===t||e.query===n}));r>-1?i[r]=e:(i.unshift(e),i=i.slice(0,u)),a.setItem(i)},addFeedback:function(e,t){var n=i.find((function(t){var n;return null===(n=t.messages)||void 0===n?void 0:n.some((function(t){return t.id===e}))}));if(n&&n.messages){var r=n.messages.find((function(t){return t.id===e}));r&&(r.feedback=t,a.setItem(i))}},getOne:function(e){var t,n=i.find((function(t){var n;return null===(n=t.messages)||void 0===n?void 0:n.some((function(t){return t.id===e}))}));return null==n||null===(t=n.messages)||void 0===t?void 0:t.find((function(t){return t.id===e}))},getAll:function(){return i},remove:function(e){i=i.filter((function(t){return t.objectID!==e.objectID})),a.setItem(i)}})).current,pe=jt.useRef(km({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(fe),limit:10})).current,he=jt.useRef(km({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(fe),limit:0===pe.getAll().length?q:H})).current,ve=cn(jt.useState(null),2),me=ve[0],De=ve[1],ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.experimental_throttle,n=e.resume,r=void 0!==n&&n,u=m(e,$t),a=Oe("chat"in u?u.chat:new Rf(u));("chat"in u&&u.chat!==a.current||"id"in u&&a.current.id!==u.id)&&(a.current="chat"in u?u.chat:new Rf(u));var i="id"in u?u.id:null,o=Pe((function(e){return a.current["~registerMessagesCallback"](e,t)}),[t,i]),s=We(o,(function(){return a.current.messages})),c=We(a.current["~registerStatusCallback"],(function(){return a.current.status})),l=We(a.current["~registerErrorCallback"],(function(){return a.current.error})),f=Pe((function(e){"function"==typeof e&&(e=e(a.current.messages)),a.current.messages=e}),[a]);return Se((function(){r&&a.current.resumeStream()}),[r,a]),{id:a.current.id,messages:s,setMessages:f,sendMessage:a.current.sendMessage,regenerate:a.current.regenerate,clearError:a.current.clearError,stop:a.current.stop,error:l,resumeStream:a.current.resumeStream,status:c,addToolResult:a.current.addToolResult}}({sendAutomaticallyWhen:lf,transport:new sf({api:Yp,headers:(o=Ht(on().mark((function e(){var t;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ce){e.next=2;break}throw new Error("Ask AI assistant ID is required");case 2:return t=null,e.next=6,nh({assistantId:ce});case 6:t=e.sent;case 7:return e.abrupt("return",un(un({},t?{authorization:"TOKEN ".concat(t)}:{}),{},{"X-Algolia-API-Key":(null==se?void 0:se.apiKey)||c,"X-Algolia-Application-Id":(null==se?void 0:se.appId)||s,"X-Algolia-Index-Name":(null==se?void 0:se.indexName)||fe,"X-Algolia-Assistant-Id":ce||"","X-AI-SDK-Version":"v5"}));case 8:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)}),body:le?{searchParameters:le}:{}}),onError:function(e){De(e)}}),ge=ye.messages,Fe=ye.sendMessage,Ee=ye.status,_e=ye.setMessages,be=ye.error,ke=jt.useRef(Ee);jt.useEffect((function(){if(!S){if("streaming"===ke.current&&"ready"===Ee){var e,t=Qt(ge[0].parts);try{for(t.s();!(e=t.n()).done;){var n=e.value;"text"===n.type&&de.add(Rv(n.text,ge))}}catch(e){t.e(e)}finally{t.f()}}ke.current=Ee}}),[Ee,ge,de,S]);var Ce=jt.useCallback((function(e){var t=e.hierarchy,n=["lvl6","lvl5","lvl4","lvl3","lvl2","lvl1","lvl0"].find((function(e){return t[e]}));return un(un({},e),{},{type:n||"lvl0",content:null})}),[]),Ae=jt.useCallback((function(e){if(!S){var t="content"===e.type?e.__docsearch_parent||Ce(e):e;t&&-1===pe.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&he.add(t)}}),[pe,he,S,Ce]),we=jt.useCallback((function(e){if(Q.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,n={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};Q.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(n)}}),[Q.context.algoliaInsightsPlugin]),xe=jt.useRef(void 0),Be=jt.useCallback((function(e,t){if(z(e),Fe({role:"user",parts:[{type:"text",text:t}]}),ne.current){var n=ne.current;"function"==typeof n.scrollTo?n.scrollTo({top:0,behavior:"smooth"}):n.scrollTop=0}xe.current&&xe.current.setQuery("")}),[z,Fe]),Ie=jt.useCallback(function(){var e=Ht(on().mark((function e(t,n){var r;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ce&&s){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,rh({assistantId:ce,thumbs:n,messageId:t,appId:s});case 4:if(!(e.sent.status>=300)){e.next=7;break}throw new Error("Failed, try again later");case 7:null===(r=de.addFeedback)||void 0===r||r.call(de,t,1===n?"like":"dislike");case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[ce,s,de]);xe.current||(xe.current=Qp({id:"docsearch",defaultActiveItemId:0,openOnFocus:!0,initialState:{query:ie,context:{searchSuggestions:[]}},insights:Boolean(N),navigator:b,onStateChange:function(e){Y(e.state)},getSources:function(e){var t=e.query,n=e.state,r=e.setContext,u=e.setStatus;if(!t){var a=function(e){var t=e.recentSearches,n=e.favoriteSearches,r=e.saveRecentSearch,u=e.onClose;return e.disableUserPersonalization?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,n=e.event;r(t),om(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return t.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,n=e.event;r(t),om(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return n.getAll()}}]}({recentSearches:he,favoriteSearches:pe,saveRecentSearch:Ae,onClose:v,disableUserPersonalization:S,canHandleAskAi:L}),i=L?[{sourceId:"recentConversations",getItems:function(){return S?[]:de.getAll()},onSelect:function(e){var t=e.item;t.messages&&(_e(t.messages),z(!0))}}]:[];return[].concat(ln(a),i)}var o={context:n.context},l=Qm({query:t,state:o,setContext:r,setStatus:u,searchClient:oe,indexes:V,snippetLength:ue,insights:Boolean(N),appId:s,apiKey:c,maxResultsPerGroup:d,transformItems:y,saveRecentSearch:Ae,onClose:v}),f=L?[{sourceId:"askAI",getItems:function(){return[{type:"askAI",query:t,url_without_anchor:"",objectID:"ask-ai-button",content:null,url:"",anchor:null,hierarchy:{lvl0:"Ask AI",lvl1:t,lvl2:null,lvl3:null,lvl4:null,lvl5:null,lvl6:null},_highlightResult:{},_snippetResult:{},__docsearch_parent:null}]},onSelect:function(e){var t=e.item;"askAI"===t.type&&t.query&&Be(!0,t.query)}}]:[];return l.then((function(e){return[].concat(f,ln(e))}))}}));var Te,je,Ne=xe.current,ze=Ne.getEnvironmentProps,Re=Ne.getRootProps,Me=Ne.refresh;!function(e){var t=e.getEnvironmentProps,n=e.panelElement,r=e.formElement,u=e.inputElement;jt.useEffect((function(){if(n&&r&&u){var e=t({panelElement:n,formElement:r,inputElement:u}),a=e.onTouchStart,i=e.onTouchMove;return window.addEventListener("touchstart",a),window.addEventListener("touchmove",i),function(){window.removeEventListener("touchstart",a),window.removeEventListener("touchmove",i)}}}),[t,n,r,u])}({getEnvironmentProps:ze,panelElement:ne.current,formElement:te.current,inputElement:re.current}),Te={container:X.current},je=Te.container,jt.useEffect((function(){if(je){var e=je.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), input:not([disabled])"),t=e[0],n=e[e.length-1];return je.addEventListener("keydown",r),function(){je.removeEventListener("keydown",r)}}function r(e){"Tab"===e.key&&(e.shiftKey?document.activeElement===t&&(e.preventDefault(),n.focus()):document.activeElement===n&&(e.preventDefault(),t.focus()))}}),[je]),En({theme:p}),jt.useEffect((function(){return document.body.classList.add("DocSearch--active"),function(){var e,t;document.body.classList.remove("DocSearch--active"),null===(e=(t=window).scrollTo)||void 0===e||e.call(t,0,C)}}),[]),jt.useEffect((function(){"undefined"!=typeof window&&window.localStorage&&function(){if("undefined"==typeof window||!window.localStorage)return 0;var e=0;for(var t in window.localStorage)window.localStorage.hasOwnProperty(t)&&(e+=window.localStorage[t].length+t.length);return e}()>4194304&&Em()}),[]),jt.useLayoutEffect((function(){var e=window.innerWidth-document.body.clientWidth;return document.body.style.marginRight="".concat(e,"px"),function(){document.body.style.marginRight="0px"}}),[]),jt.useEffect((function(){window.matchMedia("(max-width: 768px)").matches&&(ue.current=5)}),[]),jt.useEffect((function(){var e;ne.current&&!M&&("function"==typeof(e=ne.current).scrollTo?e.scrollTo({top:0,behavior:"smooth"}):e.scrollTop=0)}),[Q.query,M]),jt.useEffect((function(){ie.length>0&&(Me(),re.current&&re.current.focus())}),[ie,Me]),jt.useEffect((function(){function e(){if(ee.current){var e=.01*window.innerHeight;ee.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),jt.useEffect((function(){M||(Ne.refresh(),_e([]))}),[M,Ne,_e]);var Ze=!0,Le=Q.collections.some((function(e){return e.items.length>0}));return"idle"!==Q.status||!1!==Le||0!==Q.query.length||M||(Ze=!1),jt.createElement("div",Xt({ref:X},Re({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===Q.status&&"DocSearch-Container--Stalled","error"===Q.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&v()}}),jt.createElement("div",{className:"DocSearch-Modal",ref:ee},jt.createElement("header",{className:"DocSearch-SearchBar",ref:te},jt.createElement(Fm,Xt({},Ne,{state:Q,placeholder:l||"Search docs",autoFocus:0===ie.length,inputRef:re,isFromSelection:Boolean(ie)&&ie===ae,translations:K,isAskAiActive:M,askAiStatus:Ee,onClose:v,onAskAiToggle:z,onAskAgain:function(e){Be(!0,e)}}))),Ze&&jt.createElement("div",{className:"DocSearch-Dropdown",ref:ne},jt.createElement(Dm,Xt({},Ne,{indexName:fe,state:Q,hitComponent:F,resultsFooterComponent:_,disableUserPersonalization:S,recentSearches:he,favoriteSearches:pe,conversations:de,inputRef:re,translations:J,getMissingResultsUrl:P,isAskAiActive:M,canHandleAskAi:L,messages:ge,askAiStreamError:me,askAiFetchError:be,status:Ee,hasCollections:Le,onAskAiToggle:z,onItemClick:function(e,t){if("askAI"===e.type&&e.query)return"stored"===e.anchor&&"messages"in e?(_e(e.messages),z(!0)):Be(!0,e.query),void t.preventDefault();we(e),Ae(e),om(t)||v()},onFeedback:Ie}))),jt.createElement("footer",{className:"DocSearch-Footer"},jt.createElement(ih,{translations:W,isAskAiActive:M}))))}var Xm=["indexName","searchParameters","indices"];function eD(e){var t,n,r,u,a,i,o=e.indexName,s=e.searchParameters,c=e.indices,l=void 0===c?[]:c,f=an(e,Xm),d=jt.useRef(null),p=cn(jt.useState(!1),2),h=p[0],v=p[1],m=cn(jt.useState((null==f?void 0:f.initialQuery)||void 0),2),D=m[0],y=m[1],g=cn(jt.useState(!1),2),F=g[0],E=g[1],_=(null==f||null===(t=f.translations)||void 0===t||null===(t=t.modal)||void 0===t||null===(t=t.searchBox)||void 0===t?void 0:t.placeholderText)||(null==f?void 0:f.placeholder)||"Search docs",b=Boolean(null==f?void 0:f.askAi);b&&(_=(null==f||null===(a=f.translations)||void 0===a||null===(a=a.modal)||void 0===a||null===(a=a.searchBox)||void 0===a?void 0:a.placeholderText)||"Search docs or ask AI a question"),F&&(_=(null==f||null===(i=f.translations)||void 0===i||null===(i=i.modal)||void 0===i||null===(i=i.searchBox)||void 0===i?void 0:i.placeholderTextAskAi)||"Ask another question...");var k=jt.useCallback((function(e){E(e)}),[E]),C=jt.useCallback((function(){v(!0)}),[v]),A=jt.useCallback((function(){v(!1),y(null==f?void 0:f.initialQuery),F&&E(!1)}),[v,f.initialQuery,F,E]);(function(e){var t=e.isOpen,n=e.onOpen,r=e.onClose,u=e.onInput,a=e.isAskAiActive,i=e.onAskAiToggle,o=e.searchButtonRef,s=mn(e.keyboardShortcuts);jt.useEffect((function(){function e(e){var c;if(t&&"Escape"===e.code&&a)i(!1);else{var l=s["Ctrl/Cmd+K"]&&"k"===(null===(c=e.key)||void 0===c?void 0:c.toLowerCase())&&(e.metaKey||e.ctrlKey),f=s["/"]&&"/"===e.key;if("Escape"===e.code&&t||l||!function(e){var t=e.composedPath()[0],n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&f&&!t)return e.preventDefault(),void(t?r():document.body.classList.contains("DocSearch--active")||n());o&&o.current===document.activeElement&&u&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&u(e)}}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,r,u,o,a,i,s])})({isOpen:h,onOpen:C,onClose:A,onInput:jt.useCallback((function(e){v(!0),y(e.key)}),[v,y]),isAskAiActive:F,onAskAiToggle:k,searchButtonRef:d,keyboardShortcuts:f.keyboardShortcuts}),En({theme:f.theme});var w=[];if(o&&""!==o&&w.push({name:o,searchParameters:s}),l.length>0&&l.forEach((function(e){w.push("string"==typeof e?{name:e}:e)})),w.length<1)throw new Error("Must supply either `indexName` or `indices` for DocSearch to work");return jt.createElement(jt.Fragment,null,jt.createElement(kn,{ref:d,translations:null==f||null===(n=f.translations)||void 0===n?void 0:n.button,keyboardShortcuts:f.keyboardShortcuts,onClick:C}),h&&vt(jt.createElement(Ym,Xt({},f,{placeholder:_,initialScrollY:window.scrollY,initialQuery:D,translations:null==f||null===(r=f.translations)||void 0===r?void 0:r.modal,isAskAiActive:F,canHandleAskAi:b,indexes:w,onAskAiToggle:k,onClose:A})),null!==(u=f.portalContainer)&&void 0!==u?u:document.body))}function tD(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return"string"==typeof e?t.document.querySelector(e):e}(e.container,e.environment);return _t(jt.createElement(eD,l({},e,{transformSearchClient:function(t){return t.addAlgoliaAgent("docsearch.js",Km),e.transformSearchClient?e.transformSearchClient(t):t}})),t),function(){Pt(t)}}export{tD as default};
|
|
1
|
+
/*! @docsearch/js 4.0.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */
|
|
2
|
+
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n(e,t,n,r,u,a,i){try{var o=e[a](i),s=o.value}catch(e){return void n(e)}o.done?t(s):Promise.resolve(s).then(r,u)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(u,a){var i=e.apply(t,r);function o(e){n(i,u,a,o,s,"next",e)}function s(e){n(i,u,a,o,s,"throw",e)}o(void 0)}))}}function u(e,n,r){return n=f(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return t(e)}(e,p()?Reflect.construct(n,r||[],f(e).constructor):n.apply(e,r))}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E(r.key),r)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_(e))||t){n&&(e=n);var r=0,u=function(){};return{s:u,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw a}}}}function c(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function D(){D=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,u=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),o=new O(r||[]);return u(i,"_invoke",{value:w(e,n,o)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",p="suspendedYield",h="executing",v="completed",m={};function y(){}function g(){}function F(){}var E={};c(E,i,(function(){return this}));var b=Object.getPrototypeOf,_=b&&b(b(I([])));_&&_!==n&&r.call(_,i)&&(E=_);var k=F.prototype=y.prototype=Object.create(E);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(u,a,i,o){var s=f(e[u],e,a);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,i,o)}),(function(e){n("throw",e,i,o)})):t.resolve(l).then((function(e){c.value=e,i(c)}),(function(e){return n("throw",e,i,o)}))}o(s.arg)}var a;u(this,"_invoke",{value:function(e,r){function u(){return new t((function(t,u){n(e,r,t,u)}))}return a=a?a.then(u,u):u()}})}function w(t,n,r){var u=d;return function(a,i){if(u===h)throw Error("Generator is already running");if(u===v){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=x(o,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(u===d)throw u=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);u=h;var c=f(t,n,r);if("normal"===c.type){if(u=r.done?v:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(u=v,r.method="throw",r.arg=c.arg)}}}function x(t,n){var r=n.method,u=t.iterator[r];if(u===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=f(u,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var u=-1,a=function n(){for(;++u<t.length;)if(r.call(t,u))return n.value=t[u],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=F,u(k,"constructor",{value:F,configurable:!0}),u(F,"constructor",{value:g,configurable:!0}),g.displayName=c(F,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,F):(e.__proto__=F,c(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},C(A.prototype),c(A.prototype,o,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,u,a){void 0===a&&(a=Promise);var i=new A(l(e,n,r,u),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},C(k),c(k,s,"Generator"),c(k,i,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(B),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function u(r,u){return o.type="throw",o.arg=t,n.next=r,u&&(n.method="next",n.arg=e),!!u}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return u("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return u(i.catchLoc,!0);if(this.prev<i.finallyLoc)return u(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return u(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return u(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var u=this.tryEntries[n];if(u.tryLoc<=this.prev&&r.call(u,"finallyLoc")&&this.prev<u.finallyLoc){var a=u;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),B(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var u=r.arg;B(n)}return u}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,a,i,o=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(s=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);s=!0);}catch(e){c=!0,u=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw u}}return o}}(e,t)||_(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||_(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function _(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}function k(e){var t="function"==typeof Map?new Map:void 0;return k=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(p())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var u=new(e.bind.apply(e,r));return n&&y(u,n.prototype),u}(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,e)},k(e)}var C,A,w,x,S,B,O,I,T,P,j,N,z={},R=[],M=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Z=Array.isArray;function L(e,t){for(var n in t)e[n]=t[n];return e}function $(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function q(e,t,n){var r,u,a,i={};for(a in t)"key"==a?r=t[a]:"ref"==a?u=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?C.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===i[a]&&(i[a]=e.defaultProps[a]);return U(e,i,r,u,null)}function U(e,t,n,r,u){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==u?++w:u,__i:-1,__u:0};return null==u&&null!=A.vnode&&A.vnode(a),a}function V(e){return e.children}function H(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 K(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return K(e)}}function J(e){(!e.__d&&(e.__d=!0)&&x.push(e)&&!G.__r++||S!==A.debounceRendering)&&((S=A.debounceRendering)||B)(G)}function G(){var e,t,n,r,u,a,i,o;for(x.sort(O);e=x.shift();)e.__d&&(t=x.length,r=void 0,a=(u=(n=e).__v).__e,i=[],o=[],n.__P&&((r=L({},u)).__v=u.__v+1,A.vnode&&A.vnode(r),ue(n.__P,r,u,n.__n,n.__P.namespaceURI,32&u.__u?[a]:null,i,null==a?W(u):a,!!(32&u.__u),o),r.__v=u.__v,r.__.__k[r.__i]=r,ae(i,r,o),r.__e!=a&&K(r)),x.length>t&&x.sort(O));G.__r=0}function Q(e,t,n,r,u,a,i,o,s,c,l){var f,d,p,h,v,m,D=r&&r.__k||R,y=t.length;for(s=function(e,t,n,r,u){var a,i,o,s,c,l=n.length,f=l,d=0;for(e.__k=new Array(u),a=0;a<u;a++)null!=(i=t[a])&&"boolean"!=typeof i&&"function"!=typeof i?(s=a+d,(i=e.__k[a]="string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?U(null,i,null,null,null):Z(i)?U(V,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?U(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,o=null,-1!==(c=i.__i=ee(i,n,s,f))&&(f--,(o=n[c])&&(o.__u|=2)),null==o||null===o.__v?(-1==c&&d--,"function"!=typeof i.type&&(i.__u|=4)):c!=s&&(c==s-1?d--:c==s+1?d++:(c>s?d--:d++,i.__u|=4))):e.__k[a]=null;if(f)for(a=0;a<l;a++)null!=(o=n[a])&&!(2&o.__u)&&(o.__e==r&&(r=W(o)),se(o,o));return r}(n,t,D,s,y),f=0;f<y;f++)null!=(p=n.__k[f])&&(d=-1===p.__i?z:D[p.__i]||z,p.__i=f,m=ue(e,p,d,u,a,i,o,s,c,l),h=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&oe(d.ref,null,p),l.push(p.ref,p.__c||h,p)),null==v&&null!=h&&(v=h),4&p.__u||d.__k===p.__k?s=Y(p,s,e):"function"==typeof p.type&&void 0!==m?s=m:h&&(s=h.nextSibling),p.__u&=-7);return n.__e=v,s}function Y(e,t,n){var r,u;if("function"==typeof e.type){for(r=e.__k,u=0;r&&u<r.length;u++)r[u]&&(r[u].__=e,t=Y(r[u],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(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 X(e,t){return t=t||[],null==e||"boolean"==typeof e||(Z(e)?e.some((function(e){X(e,t)})):t.push(e)),t}function ee(e,t,n,r){var u,a,i=e.key,o=e.type,s=t[n];if(null===s||s&&i==s.key&&o===s.type&&!(2&s.__u))return n;if(r>(null==s||2&s.__u?0:1))for(u=n-1,a=n+1;u>=0||a<t.length;){if(u>=0){if((s=t[u])&&!(2&s.__u)&&i==s.key&&o===s.type)return u;u--}if(a<t.length){if((s=t[a])&&!(2&s.__u)&&i==s.key&&o===s.type)return a;a++}}return-1}function te(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||M.test(t)?n:n+"px"}function ne(e,t,n,r,u){var a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||te(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||te(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])a=t!=(t=t.replace(I,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.u=r.u:(n.u=T,e.addEventListener(t,a?j:P,a)):e.removeEventListener(t,a?j:P,a);else{if("http://www.w3.org/2000/svg"==u)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(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function re(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=T++;else if(t.t<n.u)return;return n(A.event?A.event(t):t)}}}function ue(e,t,n,r,u,a,i,o,s,c){var l,f,d,p,h,v,m,D,y,g,F,E,b,_,k,C,w,x=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(s=!!(32&n.__u),a=[o=t.__e=n.__e]),(l=A.__b)&&l(t);e:if("function"==typeof x)try{if(D=t.props,y="prototype"in x&&x.prototype.render,g=(l=x.contextType)&&r[l.__c],F=l?g?g.props.value:l.__:r,n.__c?m=(f=t.__c=n.__c).__=f.__E:(y?t.__c=f=new x(D,F):(t.__c=f=new H(D,F),f.constructor=x,f.render=ce),g&&g.sub(f),f.props=D,f.state||(f.state={}),f.context=F,f.__n=r,d=f.__d=!0,f.__h=[],f._sb=[]),y&&null==f.__s&&(f.__s=f.state),y&&null!=x.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=L({},f.__s)),L(f.__s,x.getDerivedStateFromProps(D,f.__s))),p=f.props,h=f.state,f.__v=t,d)y&&null==x.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),y&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(y&&null==x.getDerivedStateFromProps&&D!==p&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(D,F),!f.__e&&(null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(D,f.__s,F)||t.__v==n.__v)){for(t.__v!=n.__v&&(f.props=D,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),E=0;E<f._sb.length;E++)f.__h.push(f._sb[E]);f._sb=[],f.__h.length&&i.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(D,f.__s,F),y&&null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(p,h,v)}))}if(f.context=F,f.props=D,f.__P=e,f.__e=!1,b=A.__r,_=0,y){for(f.state=f.__s,f.__d=!1,b&&b(t),l=f.render(f.props,f.state,f.context),k=0;k<f._sb.length;k++)f.__h.push(f._sb[k]);f._sb=[]}else do{f.__d=!1,b&&b(t),l=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++_<25);f.state=f.__s,null!=f.getChildContext&&(r=L(L({},r),f.getChildContext())),y&&!d&&null!=f.getSnapshotBeforeUpdate&&(v=f.getSnapshotBeforeUpdate(p,h)),o=Q(e,Z(C=null!=l&&l.type===V&&null==l.key?l.props.children:l)?C:[C],t,n,r,u,a,i,o,s,c),f.base=t.__e,t.__u&=-161,f.__h.length&&i.push(f),m&&(f.__E=f.__=null)}catch(e){if(t.__v=null,s||null!=a)if(e.then){for(t.__u|=s?160:128;o&&8==o.nodeType&&o.nextSibling;)o=o.nextSibling;a[a.indexOf(o)]=null,t.__e=o}else for(w=a.length;w--;)$(a[w]);else t.__e=n.__e,t.__k=n.__k;A.__e(e,t,n)}else null==a&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):o=t.__e=ie(n.__e,t,n,r,u,a,i,s,c);return(l=A.diffed)&&l(t),128&t.__u?void 0:o}function ae(e,t,n){for(var r=0;r<n.length;r++)oe(n[r],n[++r],n[++r]);A.__c&&A.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){A.__e(e,t.__v)}}))}function ie(e,t,n,r,u,a,i,o,s){var c,l,f,d,p,h,v,m=n.props,D=t.props,y=t.type;if("svg"==y?u="http://www.w3.org/2000/svg":"math"==y?u="http://www.w3.org/1998/Math/MathML":u||(u="http://www.w3.org/1999/xhtml"),null!=a)for(c=0;c<a.length;c++)if((p=a[c])&&"setAttribute"in p==!!y&&(y?p.localName==y:3==p.nodeType)){e=p,a[c]=null;break}if(null==e){if(null==y)return document.createTextNode(D);e=document.createElementNS(u,y,D.is&&D),o&&(A.__m&&A.__m(t,a),o=!1),a=null}if(null===y)m===D||o&&e.data===D||(e.data=D);else{if(a=a&&C.call(e.childNodes),m=n.props||z,!o&&null!=a)for(m={},c=0;c<e.attributes.length;c++)m[(p=e.attributes[c]).name]=p.value;for(c in m)if(p=m[c],"children"==c);else if("dangerouslySetInnerHTML"==c)f=p;else if(!(c in D)){if("value"==c&&"defaultValue"in D||"checked"==c&&"defaultChecked"in D)continue;ne(e,c,null,p,u)}for(c in D)p=D[c],"children"==c?d=p:"dangerouslySetInnerHTML"==c?l=p:"value"==c?h=p:"checked"==c?v=p:o&&"function"!=typeof p||m[c]===p||ne(e,c,p,m[c],u);if(l)o||f&&(l.__html===f.__html||l.__html===e.innerHTML)||(e.innerHTML=l.__html),t.__k=[];else if(f&&(e.innerHTML=""),Q(e,Z(d)?d:[d],t,n,r,"foreignObject"==y?"http://www.w3.org/1999/xhtml":u,a,i,a?a[0]:n.__k&&W(n,0),o,s),null!=a)for(c=a.length;c--;)$(a[c]);o||(c="value","progress"==y&&null==h?e.removeAttribute("value"):void 0!==h&&(h!==e[c]||"progress"==y&&!h||"option"==y&&h!==m[c])&&ne(e,c,h,m[c],u),c="checked",void 0!==v&&v!==e[c]&&ne(e,c,v,m[c],u))}return e}function oe(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){A.__e(e,n)}}function se(e,t,n){var r,u;if(A.unmount&&A.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||oe(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){A.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(u=0;u<r.length;u++)r[u]&&se(r[u],t,n||"function"!=typeof e.type);n||$(e.__e),e.__c=e.__=e.__e=void 0}function ce(e,t,n){return this.constructor(e,n)}function le(e,t,n){var r,u,a,i;t==document&&(t=document.documentElement),A.__&&A.__(e,t),u=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],i=[],ue(t,e=(!r&&n||t).__k=q(V,null,[e]),u||z,z,t.namespaceURI,!r&&n?[n]:u?null:t.firstChild?C.call(t.childNodes):null,a,!r&&n?n:u?u.__e:t.firstChild,r,i),ae(a,e,i)}function fe(e,t){le(e,t,fe)}function de(e,t,n){var r,u,a,i,o=L({},e.props);for(a in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)"key"==a?r=t[a]:"ref"==a?u=t[a]:o[a]=void 0===t[a]&&void 0!==i?i[a]:t[a];return arguments.length>2&&(o.children=arguments.length>3?C.call(arguments,2):n),U(e.type,o,r||e.key,u||e.ref,null)}C=R.slice,A={__e:function(e,t,n,r){for(var u,a,i;t=t.__;)if((u=t.__c)&&!u.__)try{if((a=u.constructor)&&null!=a.getDerivedStateFromError&&(u.setState(a.getDerivedStateFromError(e)),i=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(e,r||{}),i=u.__d),i)return u.__E=u}catch(t){e=t}throw e}},w=0,H.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=L({},this.state),"function"==typeof e&&(e=e(L({},n),this.props)),e&&L(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),J(this))},H.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),J(this))},H.prototype.render=V,x=[],B="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,O=function(e,t){return e.__v.__b-t.__v.__b},G.__r=0,I=/(PointerCapture)$|Capture$/i,T=0,P=re(!1),j=re(!0),N=0;var pe,he,ve,me,De=0,ye=[],ge=A,Fe=ge.__b,Ee=ge.__r,be=ge.diffed,_e=ge.__c,ke=ge.unmount,Ce=ge.__;function Ae(e,t){ge.__h&&ge.__h(he,e,De||t),De=0;var n=he.__H||(he.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function we(e){return De=1,xe(Ue,e)}function xe(e,t,n){var r=Ae(pe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ue(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=he,!he.u)){var u=function(e,t,n){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter((function(e){return!!e.__c}));if(u.every((function(e){return!e.__N})))return!a||a.call(this,e,t,n);var i=r.__c.props!==e;return u.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),a&&a.call(this,e,t,n)||i};he.u=!0;var a=he.shouldComponentUpdate,i=he.componentWillUpdate;he.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,u(e,t,n),a=r}i&&i.call(this,e,t,n)},he.shouldComponentUpdate=u}return r.__N||r.__}function Se(e,t){var n=Ae(pe++,3);!ge.__s&&qe(n.__H,t)&&(n.__=e,n.i=t,he.__H.__h.push(n))}function Be(e,t){var n=Ae(pe++,4);!ge.__s&&qe(n.__H,t)&&(n.__=e,n.i=t,he.__h.push(n))}function Oe(e){return De=5,Te((function(){return{current:e}}),[])}function Ie(e,t,n){De=6,Be((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function Te(e,t){var n=Ae(pe++,7);return qe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Pe(e,t){return De=8,Te((function(){return e}),t)}function je(e){var t=he.context[e.__c],n=Ae(pe++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(he)),t.props.value):e.__}function Ne(e,t){ge.useDebugValue&&ge.useDebugValue(t?t(e):e)}function ze(){var e=Ae(pe++,11);if(!e.__){for(var t=he.__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 Re(){for(var e;e=ye.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Le),e.__H.__h.forEach($e),e.__H.__h=[]}catch(t){e.__H.__h=[],ge.__e(t,e.__v)}}ge.__b=function(e){he=null,Fe&&Fe(e)},ge.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ce&&Ce(e,t)},ge.__r=function(e){Ee&&Ee(e),pe=0;var t=(he=e.__c).__H;t&&(ve===he?(t.__h=[],he.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(Le),t.__h.forEach($e),t.__h=[],pe=0)),ve=he},ge.diffed=function(e){be&&be(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ye.push(t)&&me===ge.requestAnimationFrame||((me=ge.requestAnimationFrame)||Ze)(Re)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),ve=he=null},ge.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Le),e.__h=e.__h.filter((function(e){return!e.__||$e(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],ge.__e(n,e.__v)}})),_e&&_e(e,t)},ge.unmount=function(e){ke&&ke(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Le(e)}catch(e){t=e}})),n.__H=void 0,t&&ge.__e(t,n.__v))};var Me="function"==typeof requestAnimationFrame;function Ze(e){var t,n=function(){clearTimeout(r),Me&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Me&&(t=requestAnimationFrame(n))}function Le(e){var t=he,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),he=t}function $e(e){var t=he;e.__c=e.__(),he=t}function qe(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ue(e,t){return"function"==typeof t?t(e):t}function Ve(e,t){for(var n in t)e[n]=t[n];return e}function He(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function We(e,t){var n=t(),r=we({t:{__:n,u:t}}),u=r[0].t,a=r[1];return Be((function(){u.__=n,u.u=t,Ke(u)&&a({t:u})}),[e,n,t]),Se((function(){return Ke(u)&&a({t:u}),e((function(){Ke(u)&&a({t:u})}))}),[e]),n}function Ke(e){var t,n,r=e.u,u=e.__;try{var a=r();return!((t=u)===(n=a)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}function Je(e){e()}function Ge(e){return e}function Qe(){return[!1,Je]}var Ye=Be;function Xe(e,t){this.props=e,this.context=t}function et(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:He(this.props,e)}function r(t){return this.shouldComponentUpdate=n,q(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Xe.prototype=new H).isPureReactComponent=!0,Xe.prototype.shouldComponentUpdate=function(e,t){return He(this.props,e)||He(this.state,t)};var tt=A.__b;A.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),tt&&tt(e)};var nt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var rt=function(e,t){return null==e?null:X(X(e).map(t))},ut={map:rt,forEach:rt,count:function(e){return e?X(e).length:0},only:function(e){var t=X(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:X},at=A.__e;A.__e=function(e,t,n,r){if(e.then)for(var u,a=t;a=a.__;)if((u=a.__c)&&u.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),u.__c(e,t);at(e,t,n,r)};var it=A.unmount;function ot(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=Ve({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return ot(e,t,n)}))),e}function st(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return st(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 ct(){this.__u=0,this.o=null,this.__b=null}function lt(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ft(){this.i=null,this.l=null}A.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),it&&it(e)},(ct.prototype=new H).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var u=lt(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,u?u(o):o())};n.__R=i;var o=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=st(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},ct.prototype.componentWillUnmount=function(){this.o=[]},ct.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=ot(this.__b,n,r.__O=r.__P)}this.__b=null}var u=t.__a&&q(V,null,e.fallback);return u&&(u.__u&=-33),[q(V,null,t.__a?null:e.children),u]};var dt=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 pt(e){return this.getChildContext=function(){return e.context},e.children}function ht(e){var t=this,n=e.h;t.componentWillUnmount=function(){le(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),t.v||(t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.h.appendChild(e)},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)}}),le(q(pt,{context:t.context},e.__v),t.v)}function vt(e,t){var n=q(ht,{__v:e,h:t});return n.containerInfo=t,n}(ft.prototype=new H).__a=function(e){var t=this,n=lt(t.__v),r=t.l.get(e);return r[0]++,function(u){var a=function(){t.props.revealOrder?(r.push(u),dt(t,e,r)):u()};n?n(a):a()}},ft.prototype.render=function(e){this.i=null,this.l=new Map;var t=X(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},ft.prototype.componentDidUpdate=ft.prototype.componentDidMount=function(){var e=this;this.l.forEach((function(t,n){dt(e,n,t)}))};var mt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Dt=/^(?: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]/,yt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,gt=/[A-Z0-9]/g,Ft="undefined"!=typeof document,Et=function(e){return("undefined"!=typeof Symbol&&"symbol"==b(Symbol())?/fil|che|rad/:/fil|che|ra/).test(e)};function bt(e,t,n){return null==t.__k&&(t.textContent=""),le(e,t),"function"==typeof n&&n(),e?e.__c:null}H.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(H.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var _t=A.event;function kt(){}function Ct(){return this.cancelBubble}function At(){return this.defaultPrevented}A.event=function(e){return _t&&(e=_t(e)),e.persist=kt,e.isPropagationStopped=Ct,e.isDefaultPrevented=At,e.nativeEvent=e};var wt,xt={enumerable:!1,configurable:!0,get:function(){return this.class}},St=A.vnode;A.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},u=-1===n.indexOf("-");for(var a in t){var i=t[a];if(!("value"===a&&"defaultValue"in t&&null==i||Ft&&"children"===a&&"noscript"===n||"class"===a||"className"===a)){var o=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===i?i="":"translate"===o&&"no"===i?i=!1:"o"===o[0]&&"n"===o[1]?"ondoubleclick"===o?a="ondblclick":"onchange"!==o||"input"!==n&&"textarea"!==n||Et(t.type)?"onfocus"===o?a="onfocusin":"onblur"===o?a="onfocusout":yt.test(a)&&(a=o):o=a="oninput":u&&Dt.test(a)?a=a.replace(gt,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===o&&r[a=o]&&(a="oninputCapture"),r[a]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=X(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=X(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",xt)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=mt,St&&St(e)};var Bt=A.__r;A.__r=function(e){Bt&&Bt(e),wt=e.__c};var Ot=A.diffed;A.diffed=function(e){Ot&&Ot(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),wt=null};var It={ReactCurrentDispatcher:{current:{readContext:function(e){return wt.__n[e.__c].props.value},useCallback:Pe,useContext:je,useDebugValue:Ne,useDeferredValue:Ge,useEffect:Se,useId:ze,useImperativeHandle:Ie,useInsertionEffect:Ye,useLayoutEffect:Be,useMemo:Te,useReducer:xe,useRef:Oe,useState:we,useSyncExternalStore:We,useTransition:Qe}}};function Tt(e){return!!e&&e.$$typeof===mt}function Pt(e){return!!e.__k&&(le(null,e),!0)}var jt={useState:we,useId:ze,useReducer:xe,useEffect:Se,useLayoutEffect:Be,useInsertionEffect:Ye,useTransition:Qe,useDeferredValue:Ge,useSyncExternalStore:We,startTransition:Je,useRef:Oe,useImperativeHandle:Ie,useMemo:Te,useCallback:Pe,useContext:je,useDebugValue:Ne,version:"18.3.1",Children:ut,render:bt,hydrate:function(e,t,n){return fe(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:Pt,createPortal:vt,createElement:q,createContext:function(e,t){var n={__c:t="__cC"+N++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.forEach((function(e){e.__e=!0,J(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 n.Provider.__=n.Consumer.contextType=n},createFactory:function(e){return q.bind(null,e)},cloneElement:function(e){return Tt(e)?de.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:V,isValidElement:Tt,isElement:Tt,isFragment:function(e){return Tt(e)&&e.type===V},isMemo:function(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")},findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:H,PureComponent:Xe,memo:et,forwardRef:function(e){function t(t){var n=Ve({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=nt,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:V,Suspense:ct,SuspenseList:ft,lazy:function(e){var t,n,r;function u(u){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return q(n,u)}return u.displayName="Lazy",u.__f=!0,u},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:It},Nt=["type"],zt=["type"],Rt=["additionalProperties"],Mt=["abortSignal"],Zt=["messageId"],Lt=["messages"],$t=["experimental_throttle","resume"];function qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ut(e,t,n,r,u,a,i){try{var o=e[a](i),s=o.value}catch(e){return void n(e)}o.done?t(s):Promise.resolve(s).then(r,u)}function Vt(e){return function(){var t=this,n=arguments;return new Promise((function(r,u){var a=e.apply(t,n);function i(e){Ut(a,r,u,i,o,"next",e)}function o(e){Ut(a,r,u,i,o,"throw",e)}i(void 0)}))}}function Ht(e,t,n){return t=en(t),function(e,t){if(t&&("object"==b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,nn()?Reflect.construct(t,n||[],en(e).constructor):t.apply(e,n))}function Wt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kt(e,t,n){if(nn())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var u=new(e.bind.apply(e,r));return n&&sn(u,n.prototype),u}function Jt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fn(r.key),r)}}function Gt(e,t,n){return t&&Jt(e.prototype,t),n&&Jt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=pn(e))||t){n&&(e=n);var r=0,u=function(){};return{s:u,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw a}}}}function Yt(e,t,n){return(t=fn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xt(){return Xt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xt.apply(null,arguments)}function en(e){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},en(e)}function tn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sn(e,t)}function nn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(nn=function(){return!!e})()}function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rn(Object(n),!0).forEach((function(t){Yt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function an(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function on(){on=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,u=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var a=t&&t.prototype instanceof D?t:D,i=Object.create(a.prototype),o=new O(r||[]);return u(i,"_invoke",{value:w(e,n,o)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",p="suspendedYield",h="executing",v="completed",m={};function D(){}function y(){}function g(){}var F={};c(F,i,(function(){return this}));var E=Object.getPrototypeOf,_=E&&E(E(I([])));_&&_!==n&&r.call(_,i)&&(F=_);var k=g.prototype=D.prototype=Object.create(F);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(u,a,i,o){var s=f(e[u],e,a);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==b(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,i,o)}),(function(e){n("throw",e,i,o)})):t.resolve(l).then((function(e){c.value=e,i(c)}),(function(e){return n("throw",e,i,o)}))}o(s.arg)}var a;u(this,"_invoke",{value:function(e,r){function u(){return new t((function(t,u){n(e,r,t,u)}))}return a=a?a.then(u,u):u()}})}function w(t,n,r){var u=d;return function(a,i){if(u===h)throw Error("Generator is already running");if(u===v){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=x(o,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(u===d)throw u=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);u=h;var c=f(t,n,r);if("normal"===c.type){if(u=r.done?v:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(u=v,r.method="throw",r.arg=c.arg)}}}function x(t,n){var r=n.method,u=t.iterator[r];if(u===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=f(u,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var u=-1,a=function n(){for(;++u<t.length;)if(r.call(t,u))return n.value=t[u],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(b(t)+" is not iterable")}return y.prototype=g,u(k,"constructor",{value:g,configurable:!0}),u(g,"constructor",{value:y,configurable:!0}),y.displayName=c(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},C(A.prototype),c(A.prototype,o,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,u,a){void 0===a&&(a=Promise);var i=new A(l(e,n,r,u),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},C(k),c(k,s,"Generator"),c(k,i,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(B),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function u(r,u){return o.type="throw",o.arg=t,n.next=r,u&&(n.method="next",n.arg=e),!!u}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return u("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return u(i.catchLoc,!0);if(this.prev<i.finallyLoc)return u(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return u(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return u(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var u=this.tryEntries[n];if(u.tryLoc<=this.prev&&r.call(u,"finallyLoc")&&this.prev<u.finallyLoc){var a=u;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),B(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var u=r.arg;B(n)}return u}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function sn(e,t){return sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sn(e,t)}function cn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,a,i,o=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);s=!0);}catch(e){c=!0,u=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw u}}return o}}(e,t)||pn(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ln(e){return function(e){if(Array.isArray(e))return qt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fn(e){var t=function(e){if("object"!=b(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}function dn(e){return dn="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},dn(e)}function pn(e,t){if(e){if("string"==typeof e)return qt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qt(e,t):void 0}}function hn(e){var t="function"==typeof Map?new Map:void 0;return hn=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Kt(e,arguments,en(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),sn(n,e)},hn(e)}var vn={"Ctrl/Cmd+K":!0,"/":!0};function mn(e){return un(un({},vn),e)}function Dn(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jt.createElement("path",{d:"M8.19531 8.76758H7.33398C7.02539 8.76758 6.74414 8.69531 6.49023 8.55078C6.23633 8.40234 6.0332 8.20312 5.88086 7.95312C5.73242 7.70312 5.6582 7.42188 5.6582 7.10938C5.6582 6.80078 5.73242 6.51953 5.88086 6.26562C6.0332 6.01172 6.23633 5.80859 6.49023 5.65625C6.74414 5.50391 7.02539 5.42773 7.33398 5.42773C7.64258 5.42773 7.92383 5.50391 8.17773 5.65625C8.43164 5.80859 8.63281 6.01172 8.78125 6.26562C8.93359 6.51953 9.00977 6.80078 9.00977 7.10938V7.96484H10.9902V7.10938C10.9902 6.80078 11.0664 6.51953 11.2188 6.26562C11.3711 6.01172 11.5723 5.80859 11.8223 5.65625C12.0762 5.50391 12.3574 5.42773 12.666 5.42773C12.9746 5.42773 13.2559 5.50391 13.5098 5.65625C13.7637 5.80859 13.9648 6.01172 14.1133 6.26562C14.2656 6.51953 14.3418 6.80078 14.3418 7.10938C14.3418 7.42188 14.2656 7.70312 14.1133 7.95312C13.9648 8.20312 13.7637 8.40234 13.5098 8.55078C13.2559 8.69531 12.9746 8.76758 12.666 8.76758H11.8105V10.7773H12.666C12.9746 10.7773 13.2559 10.8516 13.5098 11C13.7637 11.1445 13.9648 11.3418 14.1133 11.5918C14.2656 11.8418 14.3418 12.123 14.3418 12.4355C14.3418 12.7441 14.2656 13.0254 14.1133 13.2793C13.9648 13.5332 13.7637 13.7363 13.5098 13.8887C13.2559 14.041 12.9746 14.1172 12.666 14.1172C12.3574 14.1172 12.0762 14.041 11.8223 13.8887C11.5723 13.7363 11.3711 13.5332 11.2188 13.2793C11.0664 13.0254 10.9902 12.7441 10.9902 12.4355V11.5801H9.00977V12.4355C9.00977 12.7441 8.93359 13.0254 8.78125 13.2793C8.63281 13.5332 8.43164 13.7363 8.17773 13.8887C7.92383 14.041 7.64258 14.1172 7.33398 14.1172C7.02539 14.1172 6.74414 14.041 6.49023 13.8887C6.23633 13.7363 6.0332 13.5332 5.88086 13.2793C5.73242 13.0254 5.6582 12.7441 5.6582 12.4355C5.6582 12.123 5.73242 11.8418 5.88086 11.5918C6.0332 11.3418 6.23633 11.1445 6.49023 11C6.74414 10.8516 7.02539 10.7773 7.33398 10.7773H8.19531V8.76758ZM7.33398 7.97656H8.19531V7.10938C8.19531 6.875 8.10938 6.67383 7.9375 6.50586C7.76953 6.33398 7.56836 6.24805 7.33398 6.24805C7.09961 6.24805 6.89648 6.33398 6.72461 6.50586C6.55664 6.67383 6.47266 6.875 6.47266 7.10938C6.47266 7.34766 6.55664 7.55273 6.72461 7.72461C6.89648 7.89258 7.09961 7.97656 7.33398 7.97656ZM12.666 7.97656C12.9004 7.97656 13.1016 7.89258 13.2695 7.72461C13.4414 7.55273 13.5273 7.34766 13.5273 7.10938C13.5273 6.875 13.4414 6.67383 13.2695 6.50586C13.1016 6.33398 12.9004 6.24805 12.666 6.24805C12.4316 6.24805 12.2305 6.33398 12.0625 6.50586C11.8945 6.67383 11.8105 6.875 11.8105 7.10938V7.97656H12.666ZM9.00977 10.7773H10.9902V8.76758H9.00977V10.7773ZM7.33398 11.5625C7.09961 11.5625 6.89648 11.6484 6.72461 11.8203C6.55664 11.9883 6.47266 12.1914 6.47266 12.4297C6.47266 12.6641 6.55664 12.8672 6.72461 13.0391C6.89648 13.207 7.09961 13.291 7.33398 13.291C7.56836 13.291 7.76953 13.207 7.9375 13.0391C8.10938 12.8672 8.19531 12.6641 8.19531 12.4297V11.5625H7.33398ZM12.666 11.5625H11.8105V12.4297C11.8105 12.6641 11.8945 12.8672 12.0625 13.0391C12.2305 13.207 12.4316 13.291 12.666 13.291C12.9004 13.291 13.1016 13.207 13.2695 13.0391C13.4414 12.8672 13.5273 12.6641 13.5273 12.4297C13.5273 12.1914 13.4414 11.9883 13.2695 11.8203C13.1016 11.6484 12.9004 11.5625 12.666 11.5625Z",fill:"currentColor"}))}function yn(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jt.createElement("path",{d:"M8.01562 11.1758L7.95703 9.65234H8.22656L11.9297 5.54492H13.2539L9.75586 9.32422L9.26367 9.79883L8.01562 11.1758ZM7.07812 14V5.54492H8.13281V14H7.07812ZM12.1992 14L9.04102 9.78711L9.76758 9.05469L13.5645 14H12.1992Z",fill:"currentColor"}))}function gn(){return jt.createElement("svg",{width:"33",height:"20",viewBox:"0 0 33 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jt.createElement("path",{d:"M10.4824 14.1992C9.7168 14.1992 9.05469 14.0195 8.49609 13.6602C7.9375 13.3008 7.50586 12.791 7.20117 12.1309C6.90039 11.4707 6.75 10.6875 6.75 9.78125V9.76953C6.75 8.85938 6.90039 8.07422 7.20117 7.41406C7.50586 6.75391 7.93555 6.24414 8.49023 5.88477C9.04883 5.52539 9.71094 5.3457 10.4766 5.3457C11.0703 5.3457 11.6094 5.46289 12.0938 5.69727C12.582 5.92773 12.9844 6.25 13.3008 6.66406C13.6172 7.07422 13.8164 7.54883 13.8984 8.08789L13.8926 8.09961H12.832L12.8262 8.08789C12.7324 7.72461 12.5742 7.41211 12.3516 7.15039C12.1289 6.88477 11.8574 6.67969 11.5371 6.53516C11.2207 6.39062 10.8672 6.31836 10.4766 6.31836C9.9375 6.31836 9.46875 6.45898 9.07031 6.74023C8.67578 7.02148 8.37109 7.41992 8.15625 7.93555C7.94141 8.45117 7.83398 9.0625 7.83398 9.76953V9.78125C7.83398 10.4844 7.94141 11.0938 8.15625 11.6094C8.37109 12.125 8.67578 12.5234 9.07031 12.8047C9.46875 13.0859 9.93945 13.2266 10.4824 13.2266C10.877 13.2266 11.2344 13.1641 11.5547 13.0391C11.875 12.9102 12.1445 12.7285 12.3633 12.4941C12.582 12.2559 12.7344 11.9746 12.8203 11.6504L12.832 11.6387H13.8984V11.6504C13.8047 12.166 13.6016 12.6152 13.2891 12.998C12.9766 13.377 12.5801 13.6719 12.0996 13.8828C11.623 14.0938 11.084 14.1992 10.4824 14.1992ZM17.7832 14.0469C17.1348 14.0469 16.6641 13.916 16.3711 13.6543C16.082 13.3926 15.9375 12.9609 15.9375 12.3594V8.52734H14.9414V7.68359H15.9375V6.04883H16.9922V7.68359H18.375V8.52734H16.9922V12.1016C16.9922 12.4727 17.0625 12.7402 17.2031 12.9043C17.3438 13.0645 17.5781 13.1445 17.9062 13.1445C17.9961 13.1445 18.0723 13.1426 18.1348 13.1387C18.2012 13.1348 18.2812 13.1289 18.375 13.1211V13.9883C18.2773 14.0039 18.1797 14.0176 18.082 14.0293C17.9844 14.041 17.8848 14.0469 17.7832 14.0469ZM19.8984 14V7.68359H20.918V8.62109H21.0117C21.1328 8.28906 21.3379 8.03125 21.627 7.84766C21.916 7.66406 22.2734 7.57227 22.6992 7.57227C22.7969 7.57227 22.8926 7.57812 22.9863 7.58984C23.084 7.59766 23.1582 7.60547 23.209 7.61328V8.60352C23.1035 8.58398 23 8.57031 22.8984 8.5625C22.8008 8.55078 22.6953 8.54492 22.582 8.54492C22.2578 8.54492 21.9707 8.60938 21.7207 8.73828C21.4707 8.86719 21.2734 9.04688 21.1289 9.27734C20.9883 9.50781 20.918 9.77734 20.918 10.0859V14H19.8984ZM24.5273 14V5.17578H25.5469V14H24.5273Z",fill:"currentColor"}))}function Fn(e){var t=e.size,n=void 0===t?20:t,r=e.color,u=void 0===r?"currentColor":r;return jt.createElement("svg",{width:n,height:n,className:"DocSearch-Search-Icon",viewBox:"0 0 24 24","aria-hidden":"true"},jt.createElement("circle",{cx:"11",cy:"11",r:"8",stroke:u,fill:"none",strokeWidth:"1.4"}),jt.createElement("path",{d:"m21 21-4.3-4.3",stroke:u,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}))}var En=function(e){var t=e.theme;Se((function(){if(t){var e=document.documentElement.dataset.theme;if(t!==e)return document.documentElement.dataset.theme=t,function(){void 0===e?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=e}}}),[t])},bn=["translations","keyboardShortcuts"],_n="Ctrl",kn=jt.forwardRef((function(e,t){var n=e.translations,r=void 0===n?{}:n,u=e.keyboardShortcuts,a=an(e,bn),i=r.buttonText,o=void 0===i?"Search":i,s=r.buttonAriaLabel,c=void 0===s?"Search":s,l=mn(u),f=cn(we(null),2),d=f[0],p=f[1];En({theme:a.theme}),Se((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?p("⌘"):p(_n))}),[]);var h=cn(d===_n?[_n,"Control",jt.createElement(gn,null)]:["Meta","Meta",jt.createElement(Dn,null)],3),v=h[0],m=h[1],D=h[2],y=l["Ctrl/Cmd+K"],g="".concat(m,"+k");return jt.createElement("button",Xt({type:"button",className:"DocSearch DocSearch-Button","aria-label":y?"".concat(c," (").concat(g,")"):c,"aria-keyshortcuts":y?g:void 0},a,{ref:t}),jt.createElement("span",{className:"DocSearch-Button-Container"},jt.createElement(Fn,null),jt.createElement("span",{className:"DocSearch-Button-Placeholder"},o)),jt.createElement("span",{className:"DocSearch-Button-Keys"},null!==d&&y&&jt.createElement(jt.Fragment,null,jt.createElement(Cn,{reactsToKey:v},D),jt.createElement(Cn,{reactsToKey:"k"},jt.createElement(yn,null)))))}));function Cn(e){var t=e.reactsToKey,n=e.children,r=cn(we(!1),2),u=r[0],a=r[1];return Se((function(){if(t)return window.addEventListener("keydown",e),window.addEventListener("keyup",n),function(){window.removeEventListener("keydown",e),window.removeEventListener("keyup",n)};function e(e){e.key===t&&a(!0)}function n(e){e.key!==t&&"Meta"!==e.key||a(!1)}}),[t]),jt.createElement("kbd",{className:u?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"+("Ctrl"===t?" DocSearch-Button-Key--ctrl":"")},n)}var An,wn="vercel.ai.error",xn=Symbol.for(wn),Sn=function(){function e(t){var n,r=t.name,i=t.message,o=t.cause;return a(this,e),(n=u(this,e,[i]))[An]=!0,n.name=r,n.cause=o,n}return d(e,k(Error)),o(e,null,[{key:"isInstance",value:function(t){return e.hasMarker(t,wn)}},{key:"hasMarker",value:function(e,t){var n=Symbol.for(t);return null!=e&&"object"==b(e)&&n in e&&"boolean"==typeof e[n]&&!0===e[n]}}])}();An=xn;var Bn=Sn;function On(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}var In,Tn="AI_InvalidArgumentError",Pn="vercel.ai.error.".concat(Tn),jn=Symbol.for(Pn),Nn=function(){function e(t){var n,r=t.message,i=t.cause,o=t.argument;return a(this,e),(n=u(this,e,[{name:Tn,message:r,cause:i}]))[In]=!0,n.argument=o,n}return d(e,Bn),o(e,null,[{key:"isInstance",value:function(e){return Bn.hasMarker(e,Pn)}}])}();In=jn;var zn,Rn="AI_JSONParseError",Mn="vercel.ai.error.".concat(Rn),Zn=Symbol.for(Mn),Ln=function(){function e(t){var n,r=t.text,i=t.cause;return a(this,e),(n=u(this,e,[{name:Rn,message:"JSON parsing failed: Text: ".concat(r,".\nError message: ").concat(On(i)),cause:i}]))[zn]=!0,n.text=r,n}return d(e,Bn),o(e,null,[{key:"isInstance",value:function(e){return Bn.hasMarker(e,Mn)}}])}();zn=Zn;var $n,qn="AI_TypeValidationError",Un="vercel.ai.error.".concat(qn),Vn=Symbol.for(Un);$n=Vn;var Hn=function(){function e(t){var n,r=t.value,i=t.cause;return a(this,e),(n=u(this,e,[{name:qn,message:"Type validation failed: Value: ".concat(JSON.stringify(r),".\nError message: ").concat(On(i)),cause:i}]))[$n]=!0,n.value=r,n}return d(e,Bn),o(e,null,[{key:"isInstance",value:function(e){return Bn.hasMarker(e,Un)}},{key:"wrap",value:function(t){var n=t.value,r=t.cause;return e.isInstance(r)&&r.value===n?r:new e({value:n,cause:r})}}])}(),Wn=function(){function e(t,n){var r;return Wt(this,e),(r=Ht(this,e,[t])).name="ParseError",r.type=n.type,r.field=n.field,r.value=n.value,r.line=n.line,r}return tn(e,hn(Error)),Gt(e)}();function Kn(e){}var Jn=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.onError,u=n.onRetry,a=n.onComment;return Wt(this,e),Ht(this,e,[{start:function(e){t=function(e){if("function"==typeof e)throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");var t,n=e.onEvent,r=void 0===n?Kn:n,u=e.onError,a=void 0===u?Kn:u,i=e.onRetry,o=void 0===i?Kn:i,s=e.onComment,c="",l=!0,f="",d="";function p(e){if(""===e)return f.length>0&&r({id:t,event:d||void 0,data:f.endsWith("\n")?f.slice(0,-1):f}),t=void 0,f="",void(d="");if(e.startsWith(":"))s&&s(e.slice(e.startsWith(": ")?2:1));else{var n=e.indexOf(":");if(-1===n)h(e,"",e);else{var u=e.slice(0,n),a=" "===e[n+1]?2:1;h(u,e.slice(n+a),e)}}}function h(e,n,r){switch(e){case"event":d=n;break;case"data":f="".concat(f).concat(n,"\n");break;case"id":t=n.includes("\0")?void 0:n;break;case"retry":/^\d+$/.test(n)?o(parseInt(n,10)):a(new Wn('Invalid `retry` value: "'.concat(n,'"'),{type:"invalid-retry",value:n,line:r}));break;default:a(new Wn('Unknown field "'.concat(e.length>20?"".concat(e.slice(0,20),"…"):e,'"'),{type:"unknown-field",field:e,value:n,line:r}))}}return{feed:function(e){var t,n=l?e.replace(/^\xEF\xBB\xBF/,""):e,r=function(e){for(var t=[],n="",r=0;r<e.length;){var u=e.indexOf("\r",r),a=e.indexOf("\n",r),i=-1;if(-1!==u&&-1!==a?i=Math.min(u,a):-1!==u?i=u===e.length-1?-1:u:-1!==a&&(i=a),-1===i){n=e.slice(r);break}var o=e.slice(r,i);t.push(o),"\r"===e[(r=i+1)-1]&&"\n"===e[r]&&r++}return[t,n]}("".concat(c).concat(n)),u=cn(r,2),a=u[0],i=u[1],o=Qt(a);try{for(o.s();!(t=o.n()).done;)p(t.value)}catch(e){o.e(e)}finally{o.f()}c=i,l=!1},reset:function(){c&&(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).consume&&p(c),l=!0,t=void 0,f="",d="",c=""}}}({onEvent:function(t){e.enqueue(t)},onError:function(t){"terminate"===r?e.error(t):"function"==typeof r&&r(t)},onRetry:u,onComment:a})},transform:function(e){t.feed(e)}}])}return tn(e,TransformStream),Gt(e)}();function Gn(e,t,n){var r;function u(n,r){var u,a,o;for(var s in Object.defineProperty(n,"_zod",{value:null!==(u=n._zod)&&void 0!==u?u:{},enumerable:!1}),null!==(a=(o=n._zod).traits)&&void 0!==a||(o.traits=new Set),n._zod.traits.add(e),t(n,r),i.prototype)s in n||Object.defineProperty(n,s,{value:i.prototype[s].bind(n)});n._zod.constr=i,n._zod.def=r}var a=function(e){function t(){return Wt(this,t),Ht(this,t,arguments)}return tn(t,e),Gt(t)}(null!==(r=null==n?void 0:n.Parent)&&void 0!==r?r:Object);function i(e){var t,r,i=null!=n&&n.Parent?new a:this;u(i,e),null!==(t=(r=i._zod).deferred)&&void 0!==t||(r.deferred=[]);var o,s=Qt(i._zod.deferred);try{for(s.s();!(o=s.n()).done;)(0,o.value)()}catch(e){s.e(e)}finally{s.f()}return i}return Object.defineProperty(a,"name",{value:e}),Object.defineProperty(i,"init",{value:u}),Object.defineProperty(i,Symbol.hasInstance,{value:function(t){var r;return!!(null!=n&&n.Parent&&t instanceof n.Parent)||(null==t||null===(r=t._zod)||void 0===r||null===(r=r.traits)||void 0===r?void 0:r.has(e))}}),Object.defineProperty(i,"name",{value:e}),i}var Qn=function(){function e(){return Wt(this,e),Ht(this,e,["Encountered Promise during synchronous parse. Use .parseAsync() instead."])}return tn(e,hn(Error)),Gt(e)}(),Yn=function(){function e(t){var n;return Wt(this,e),(n=Ht(this,e,["Encountered unidirectional transform during encode: ".concat(t)])).name="ZodEncodeError",n}return tn(e,hn(Error)),Gt(e)}(),Xn={};function er(e){return Xn}function tr(e){var t=Object.values(e).filter((function(e){return"number"==typeof e}));return Object.entries(e).filter((function(e){var n=cn(e,2),r=n[0];return n[1],-1===t.indexOf(+r)})).map((function(e){var t=cn(e,2);return t[0],t[1]}))}function nr(e,t){return"bigint"==typeof t?t.toString():t}function rr(e){return{get value(){var t=e();return Object.defineProperty(this,"value",{value:t}),t}}}function ur(e){return null==e}function ar(e){var t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}var ir=Symbol("evaluating");function or(e,t,n){var r=void 0;Object.defineProperty(e,t,{get:function(){if(r!==ir)return void 0===r&&(r=ir,r=n()),r},set:function(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function sr(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function cr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function lr(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var u=0,a=n;u<a.length;u++){var i=a[u],o=Object.getOwnPropertyDescriptors(i);Object.assign(e,o)}return Object.defineProperties({},e)}function fr(e){return JSON.stringify(e)}var dr="captureStackTrace"in Error?Error.captureStackTrace:function(){};function pr(e){return"object"===dn(e)&&null!==e&&!Array.isArray(e)}var hr=rr((function(){var e;if("undefined"!=typeof navigator&&null!==(e=navigator)&&void 0!==e&&null!==(e=e.userAgent)&&void 0!==e&&e.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}}));function vr(e){if(!1===pr(e))return!1;var t=e.constructor;if(void 0===t)return!0;var n=t.prototype;return!1!==pr(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function mr(e){return vr(e)?un({},e):Array.isArray(e)?ln(e):e}var Dr=new Set(["string","number","symbol"]);function yr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gr(e,t,n){var r=new e._zod.constr(null!=t?t:e._zod.def);return(!t||null!=n&&n.parent)&&(r._zod.parent=e),r}function Fr(e){var t=e;if(!t)return{};if("string"==typeof t)return{error:function(){return t}};if(void 0!==(null==t?void 0:t.message)){if(void 0!==(null==t?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?un(un({},t),{},{error:function(){return t.error}}):t}var Er={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 br(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!0===e.aborted)return!0;for(var n=t;n<e.issues.length;n++){var r;if(!0!==(null===(r=e.issues[n])||void 0===r?void 0:r.continue))return!0}return!1}function _r(e,t){return t.map((function(t){var n,r;return null!==(n=(r=t).path)&&void 0!==n||(r.path=[]),t.path.unshift(e),t}))}function kr(e){return"string"==typeof e?e:null==e?void 0:e.message}function Cr(e,t,n){var r,u=un(un({},e),{},{path:null!==(r=e.path)&&void 0!==r?r:[]});if(!e.message){var a,i,o,s,c,l,f,d,p,h=null!==(a=null!==(i=null!==(o=null!==(s=kr(null===(c=e.inst)||void 0===c||null===(c=c._zod.def)||void 0===c||null===(l=c.error)||void 0===l?void 0:l.call(c,e)))&&void 0!==s?s:kr(null==t||null===(f=t.error)||void 0===f?void 0:f.call(t,e)))&&void 0!==o?o:kr(null===(d=n.customError)||void 0===d?void 0:d.call(n,e)))&&void 0!==i?i:kr(null===(p=n.localeError)||void 0===p?void 0:p.call(n,e)))&&void 0!==a?a:"Invalid input";u.message=h}return delete u.inst,delete u.continue,null!=t&&t.reportInput||delete u.input,u}function Ar(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function wr(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function xr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],u=t[1],a=t[2];return"string"==typeof r?{message:r,code:"custom",input:u,inst:a}:un({},r)}var Sr=function(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,nr,2),Object.defineProperty(e,"toString",{value:function(){return e.message},enumerable:!1})},Br=Gn("$ZodError",Sr),Or=Gn("$ZodError",Sr,{Parent:Error}),Ir=function(e){return function(t,n,r,u){var a=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise)throw new Qn;if(i.issues.length){var o,s=new(null!==(o=null==u?void 0:u.Err)&&void 0!==o?o:e)(i.issues.map((function(e){return Cr(e,a,er())})));throw dr(s,null==u?void 0:u.callee),s}return i.value}},Tr=function(e){return function(){var t=Vt(on().mark((function t(n,r,u,a){var i,o,s,c;return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=u?Object.assign(u,{async:!0}):{async:!0},!((o=n._zod.run({value:r,issues:[]},i))instanceof Promise)){t.next=6;break}return t.next=5,o;case 5:o=t.sent;case 6:if(!o.issues.length){t.next=10;break}throw c=new(null!==(s=null==a?void 0:a.Err)&&void 0!==s?s:e)(o.issues.map((function(e){return Cr(e,i,er())}))),dr(c,null==a?void 0:a.callee),c;case 10:return t.abrupt("return",o.value);case 11:case"end":return t.stop()}}),t)})));return function(e,n,r,u){return t.apply(this,arguments)}}()},Pr=function(e){return function(t,n,r){var u=r?un(un({},r),{},{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},u);if(a instanceof Promise)throw new Qn;return a.issues.length?{success:!1,error:new(null!=e?e:Br)(a.issues.map((function(e){return Cr(e,u,er())})))}:{success:!0,data:a.value}}},jr=Pr(Or),Nr=function(e){return function(){var t=Vt(on().mark((function t(n,r,u){var a,i;return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=u?Object.assign(u,{async:!0}):{async:!0},!((i=n._zod.run({value:r,issues:[]},a))instanceof Promise)){t.next=6;break}return t.next=5,i;case 5:i=t.sent;case 6:return t.abrupt("return",i.issues.length?{success:!1,error:new e(i.issues.map((function(e){return Cr(e,a,er())})))}:{success:!0,data:i.value});case 7:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()},zr=Nr(Or),Rr=/^[cC][^\s-]{8,}$/,Mr=/^[0-9a-z]+$/,Zr=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Lr=/^[0-9a-vA-V]{20}$/,$r=/^[A-Za-z0-9]{27}$/,qr=/^[a-zA-Z0-9_-]{21}$/,Ur=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Vr=/^([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})$/,Hr=function(e){return e?new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-".concat(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)$/},Wr=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Kr=/^(?:(?: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])$/,Jr=/^(([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}|:))$/,Gr=/^((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])$/,Qr=/^(([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])$/,Yr=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Xr=/^[A-Za-z0-9_-]*$/,eu=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,tu=/^\+(?:[0-9]){6,14}[0-9]$/,nu="(?:(?:\\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])))",ru=new RegExp("^".concat(nu,"$"));function uu(e){var t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?"".concat(t):0===e.precision?"".concat(t,":[0-5]\\d"):"".concat(t,":[0-5]\\d\\.\\d{").concat(e.precision,"}"):"".concat(t,"(?::[0-5]\\d(?:\\.\\d+)?)?")}var au=/^-?\d+$/,iu=/^-?\d+(?:\.\d+)?/,ou=/^(?:true|false)$/i,su=/^null$/i,cu=/^[^A-Z]*$/,lu=/^[^a-z]*$/,fu=Gn("$ZodCheck",(function(e,t){var n,r,u;null!==(n=e._zod)&&void 0!==n||(e._zod={}),e._zod.def=t,null!==(r=(u=e._zod).onattach)&&void 0!==r||(u.onattach=[])})),du={number:"number",bigint:"bigint",object:"date"},pu=Gn("$ZodCheckLessThan",(function(e,t){fu.init(e,t);var n=du[dn(t.value)];e._zod.onattach.push((function(e){var n,r=e._zod.bag,u=null!==(n=t.inclusive?r.maximum:r.exclusiveMaximum)&&void 0!==n?n:Number.POSITIVE_INFINITY;t.value<u&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)})),e._zod.check=function(r){(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),hu=Gn("$ZodCheckGreaterThan",(function(e,t){fu.init(e,t);var n=du[dn(t.value)];e._zod.onattach.push((function(e){var n,r=e._zod.bag,u=null!==(n=t.inclusive?r.minimum:r.exclusiveMinimum)&&void 0!==n?n:Number.NEGATIVE_INFINITY;t.value>u&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)})),e._zod.check=function(r){(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),vu=Gn("$ZodCheckMultipleOf",(function(e,t){fu.init(e,t),e._zod.onattach.push((function(e){var n,r;null!==(n=(r=e._zod.bag).multipleOf)&&void 0!==n||(r.multipleOf=t.value)})),e._zod.check=function(n){if(dn(n.value)!==dn(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){var n=(e.toString().split(".")[1]||"").length,r=t.toString(),u=(r.split(".")[1]||"").length;if(0===u&&/\d?e-\d?/.test(r)){var a=r.match(/\d?e-(\d?)/);null!=a&&a[1]&&(u=Number.parseInt(a[1]))}var i=n>u?n:u;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(n.value,t.value))||n.issues.push({origin:dn(n.value),code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}})),mu=Gn("$ZodCheckNumberFormat",(function(e,t){var n;fu.init(e,t),t.format=t.format||"float64";var r=null===(n=t.format)||void 0===n?void 0:n.includes("int"),u=r?"int":"number",a=cn(Er[t.format],2),i=a[0],o=a[1];e._zod.onattach.push((function(e){var n=e._zod.bag;n.format=t.format,n.minimum=i,n.maximum=o,r&&(n.pattern=au)})),e._zod.check=function(n){var a=n.value;if(r){if(!Number.isInteger(a))return void n.issues.push({expected:u,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?n.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:u,continue:!t.abort}):n.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:u,continue:!t.abort}))}a<i&&n.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),a>o&&n.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}})),Du=Gn("$ZodCheckMaxSize",(function(e,t){var n,r;fu.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!ur(t)&&void 0!==t.size}),e._zod.onattach.push((function(e){var n,r=null!==(n=e._zod.bag.maximum)&&void 0!==n?n:Number.POSITIVE_INFINITY;t.maximum<r&&(e._zod.bag.maximum=t.maximum)})),e._zod.check=function(n){var r=n.value;r.size<=t.maximum||n.issues.push({origin:Ar(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}})),yu=Gn("$ZodCheckMinSize",(function(e,t){var n,r;fu.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!ur(t)&&void 0!==t.size}),e._zod.onattach.push((function(e){var n,r=null!==(n=e._zod.bag.minimum)&&void 0!==n?n:Number.NEGATIVE_INFINITY;t.minimum>r&&(e._zod.bag.minimum=t.minimum)})),e._zod.check=function(n){var r=n.value;r.size>=t.minimum||n.issues.push({origin:Ar(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}})),gu=Gn("$ZodCheckSizeEquals",(function(e,t){var n,r;fu.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!ur(t)&&void 0!==t.size}),e._zod.onattach.push((function(e){var n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size})),e._zod.check=function(n){var r=n.value,u=r.size;if(u!==t.size){var a=u>t.size;n.issues.push(un(un({origin:Ar(r)},a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size}),{},{inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort}))}}})),Fu=Gn("$ZodCheckMaxLength",(function(e,t){var n,r;fu.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!ur(t)&&void 0!==t.length}),e._zod.onattach.push((function(e){var n,r=null!==(n=e._zod.bag.maximum)&&void 0!==n?n:Number.POSITIVE_INFINITY;t.maximum<r&&(e._zod.bag.maximum=t.maximum)})),e._zod.check=function(n){var r=n.value;if(!(r.length<=t.maximum)){var u=wr(r);n.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}})),Eu=Gn("$ZodCheckMinLength",(function(e,t){var n,r;fu.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!ur(t)&&void 0!==t.length}),e._zod.onattach.push((function(e){var n,r=null!==(n=e._zod.bag.minimum)&&void 0!==n?n:Number.NEGATIVE_INFINITY;t.minimum>r&&(e._zod.bag.minimum=t.minimum)})),e._zod.check=function(n){var r=n.value;if(!(r.length>=t.minimum)){var u=wr(r);n.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}})),bu=Gn("$ZodCheckLengthEquals",(function(e,t){var n,r;fu.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!ur(t)&&void 0!==t.length}),e._zod.onattach.push((function(e){var n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length})),e._zod.check=function(n){var r=n.value,u=r.length;if(u!==t.length){var a=wr(r),i=u>t.length;n.issues.push(un(un({origin:a},i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length}),{},{inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort}))}}})),_u=Gn("$ZodCheckStringFormat",(function(e,t){var n,r,u,a;fu.init(e,t),e._zod.onattach.push((function(e){var n,r=e._zod.bag;r.format=t.format,t.pattern&&(null!==(n=r.patterns)&&void 0!==n||(r.patterns=new Set),r.patterns.add(t.pattern))})),t.pattern?null!==(n=(u=e._zod).check)&&void 0!==n||(u.check=function(n){t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push(un(un({origin:"string",code:"invalid_format",format:t.format,input:n.value},t.pattern?{pattern:t.pattern.toString()}:{}),{},{inst:e,continue:!t.abort}))}):null!==(r=(a=e._zod).check)&&void 0!==r||(a.check=function(){})})),ku=Gn("$ZodCheckRegex",(function(e,t){_u.init(e,t),e._zod.check=function(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})}})),Cu=Gn("$ZodCheckLowerCase",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=cu),_u.init(e,t)})),Au=Gn("$ZodCheckUpperCase",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=lu),_u.init(e,t)})),wu=Gn("$ZodCheckIncludes",(function(e,t){fu.init(e,t);var n=yr(t.includes),r=new RegExp("number"==typeof t.position?"^.{".concat(t.position,"}").concat(n):n);t.pattern=r,e._zod.onattach.push((function(e){var t,n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)})),e._zod.check=function(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})}})),xu=Gn("$ZodCheckStartsWith",(function(e,t){var n;fu.init(e,t);var r=new RegExp("^".concat(yr(t.prefix),".*"));null!==(n=t.pattern)&&void 0!==n||(t.pattern=r),e._zod.onattach.push((function(e){var t,n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)})),e._zod.check=function(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})}})),Su=Gn("$ZodCheckEndsWith",(function(e,t){var n;fu.init(e,t);var r=new RegExp(".*".concat(yr(t.suffix),"$"));null!==(n=t.pattern)&&void 0!==n||(t.pattern=r),e._zod.onattach.push((function(e){var t,n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)})),e._zod.check=function(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})}}));function Bu(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,ln(_r(n,e.issues)))}var Ou=Gn("$ZodCheckProperty",(function(e,t){fu.init(e,t),e._zod.check=function(e){var n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then((function(n){return Bu(n,e,t.property)}));Bu(n,e,t.property)}})),Iu=Gn("$ZodCheckMimeType",(function(e,t){fu.init(e,t);var n=new Set(t.mime);e._zod.onattach.push((function(e){e._zod.bag.mime=t.mime})),e._zod.check=function(r){n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}})),Tu=Gn("$ZodCheckOverwrite",(function(e,t){fu.init(e,t),e._zod.check=function(e){e.value=t.tx(e.value)}})),Pu=Gt((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Wt(this,e),this.content=[],this.indent=0,this&&(this.args=t)}),[{key:"indented",value:function(e){this.indent+=1,e(this),this.indent-=1}},{key:"write",value:function(e){var t=this;if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});var n,r=e.split("\n").filter((function(e){return e})),u=Math.min.apply(Math,ln(r.map((function(e){return e.length-e.trimStart().length})))),a=Qt(r.map((function(e){return e.slice(u)})).map((function(e){return" ".repeat(2*t.indent)+e})));try{for(a.s();!(n=a.n()).done;){var i=n.value;this.content.push(i)}}catch(e){a.e(e)}finally{a.f()}}},{key:"compile",value:function(){var e,t=Function,n=null==this?void 0:this.args,r=ln((null!==(e=null==this?void 0:this.content)&&void 0!==e?e:[""]).map((function(e){return" ".concat(e)})));return Kt(t,ln(n).concat([r.join("\n")]))}}]),ju={major:4,minor:1,patch:8},Nu=Gn("$ZodType",(function(e,t){var n,r;null!=e||(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ju;var u=ln(null!==(n=e._zod.def.checks)&&void 0!==n?n:[]);e._zod.traits.has("$ZodCheck")&&u.unshift(e);var a,i=Qt(u);try{for(i.s();!(a=i.n()).done;){var o,s=Qt(a.value._zod.onattach);try{for(s.s();!(o=s.n()).done;)(0,o.value)(e)}catch(e){s.e(e)}finally{s.f()}}}catch(e){i.e(e)}finally{i.f()}if(0===u.length){var c,l;null!==(c=(r=e._zod).deferred)&&void 0!==c||(r.deferred=[]),null===(l=e._zod.deferred)||void 0===l||l.push((function(){e._zod.run=e._zod.parse}))}else{var f=function(e,t,n){var r,u,a=br(e),i=Qt(t);try{var o=function(){var t=u.value;if(t._zod.def.when){if(!t._zod.def.when(e))return 0}else if(a)return 0;var i=e.issues.length,o=t._zod.check(e);if(o instanceof Promise&&!1===(null==n?void 0:n.async))throw new Qn;if(r||o instanceof Promise)r=(null!=r?r:Promise.resolve()).then(Vt(on().mark((function t(){return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o;case 2:if(e.issues.length!==i){t.next=5;break}return t.abrupt("return");case 5:a||(a=br(e,i));case 6:case"end":return t.stop()}}),t)}))));else{if(e.issues.length===i)return 0;a||(a=br(e,i))}};for(i.s();!(u=i.n()).done;)o()}catch(e){i.e(e)}finally{i.f()}return r?r.then((function(){return e})):e},d=function(t,n,r){if(br(t))return t.aborted=!0,t;var a=f(n,u,r);if(a instanceof Promise){if(!1===r.async)throw new Qn;return a.then((function(t){return e._zod.parse(t,r)}))}return e._zod.parse(a,r)};e._zod.run=function(t,n){if(n.skipChecks)return e._zod.parse(t,n);if("backward"===n.direction){var r=e._zod.parse({value:t.value,issues:[]},un(un({},n),{},{skipChecks:!0}));return r instanceof Promise?r.then((function(e){return d(e,t,n)})):d(r,t,n)}var a=e._zod.parse(t,n);if(a instanceof Promise){if(!1===n.async)throw new Qn;return a.then((function(e){return f(e,u,n)}))}return f(a,u,n)}}e["~standard"]={validate:function(t){try{var n,r=jr(e,t);return r.success?{value:r.data}:{issues:null===(n=r.error)||void 0===n?void 0:n.issues}}catch(n){return zr(e,t).then((function(e){var t;return e.success?{value:e.data}:{issues:null===(t=e.error)||void 0===t?void 0:t.issues}}))}},vendor:"zod",version:1}})),zu=Gn("$ZodString",(function(e,t){var n,r,u;Nu.init(e,t),e._zod.pattern=null!==(n=ln(null!==(r=null==e||null===(u=e._zod.bag)||void 0===u?void 0:u.patterns)&&void 0!==r?r:[]).pop())&&void 0!==n?n:function(e){var t,n,r=e?"[\\s\\S]{".concat(null!==(t=null==e?void 0:e.minimum)&&void 0!==t?t:0,",").concat(null!==(n=null==e?void 0:e.maximum)&&void 0!==n?n:"","}"):"[\\s\\S]*";return new RegExp("^".concat(r,"$"))}(e._zod.bag),e._zod.parse=function(n,r){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}})),Ru=Gn("$ZodStringFormat",(function(e,t){_u.init(e,t),zu.init(e,t)})),Mu=Gn("$ZodGUID",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Vr),Ru.init(e,t)})),Zu=Gn("$ZodUUID",(function(e,t){var n;if(t.version){var r,u={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===u)throw new Error('Invalid UUID version: "'.concat(t.version,'"'));null!==(r=t.pattern)&&void 0!==r||(t.pattern=Hr(u))}else null!==(n=t.pattern)&&void 0!==n||(t.pattern=Hr());Ru.init(e,t)})),Lu=Gn("$ZodEmail",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Wr),Ru.init(e,t)})),$u=Gn("$ZodURL",(function(e,t){Ru.init(e,t),e._zod.check=function(n){try{var r=n.value.trim(),u=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(u.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:eu.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.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=u.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}})),qu=Gn("$ZodEmoji",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Ru.init(e,t)})),Uu=Gn("$ZodNanoID",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=qr),Ru.init(e,t)})),Vu=Gn("$ZodCUID",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Rr),Ru.init(e,t)})),Hu=Gn("$ZodCUID2",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Mr),Ru.init(e,t)})),Wu=Gn("$ZodULID",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Zr),Ru.init(e,t)})),Ku=Gn("$ZodXID",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Lr),Ru.init(e,t)})),Ju=Gn("$ZodKSUID",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=$r),Ru.init(e,t)})),Gu=Gn("$ZodISODateTime",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=function(e){var t=uu({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");var r="".concat(t,"(?:").concat(n.join("|"),")");return new RegExp("^".concat(nu,"T(?:").concat(r,")$"))}(t)),Ru.init(e,t)})),Qu=Gn("$ZodISODate",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=ru),Ru.init(e,t)})),Yu=Gn("$ZodISOTime",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=new RegExp("^".concat(uu(t),"$"))),Ru.init(e,t)})),Xu=Gn("$ZodISODuration",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Ur),Ru.init(e,t)})),ea=Gn("$ZodIPv4",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Kr),Ru.init(e,t),e._zod.onattach.push((function(e){e._zod.bag.format="ipv4"}))})),ta=Gn("$ZodIPv6",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Jr),Ru.init(e,t),e._zod.onattach.push((function(e){e._zod.bag.format="ipv6"})),e._zod.check=function(n){try{new URL("http://[".concat(n.value,"]"))}catch(r){n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}})),na=Gn("$ZodCIDRv4",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Gr),Ru.init(e,t)})),ra=Gn("$ZodCIDRv6",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Qr),Ru.init(e,t),e._zod.check=function(n){var r=n.value.split("/");try{if(2!==r.length)throw new Error;var u=cn(r,2),a=u[0],i=u[1];if(!i)throw new Error;var o=Number(i);if("".concat(o)!==i)throw new Error;if(o<0||o>128)throw new Error;new URL("http://[".concat(a,"]"))}catch(r){n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}}));function ua(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch(e){return!1}}var aa=Gn("$ZodBase64",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Yr),Ru.init(e,t),e._zod.onattach.push((function(e){e._zod.bag.contentEncoding="base64"})),e._zod.check=function(n){ua(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}})),ia=Gn("$ZodBase64URL",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Xr),Ru.init(e,t),e._zod.onattach.push((function(e){e._zod.bag.contentEncoding="base64url"})),e._zod.check=function(n){(function(e){if(!Xr.test(e))return!1;var t=e.replace(/[-_]/g,(function(e){return"-"===e?"+":"/"}));return ua(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})}})),oa=Gn("$ZodE164",(function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=tu),Ru.init(e,t)})),sa=Gn("$ZodJWT",(function(e,t){Ru.init(e,t),e._zod.check=function(n){(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=e.split(".");if(3!==n.length)return!1;var r=cn(n,1)[0];if(!r)return!1;var u=JSON.parse(atob(r));return!("typ"in u&&"JWT"!==(null==u?void 0:u.typ)||!u.alg||t&&(!("alg"in u)||u.alg!==t))}catch(e){return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}})),ca=Gn("$ZodNumber",(function(e,t){var n;Nu.init(e,t),e._zod.pattern=null!==(n=e._zod.bag.pattern)&&void 0!==n?n:iu,e._zod.parse=function(n,r){if(t.coerce)try{n.value=Number(n.value)}catch(e){}var u=n.value;if("number"==typeof u&&!Number.isNaN(u)&&Number.isFinite(u))return n;var a="number"==typeof u?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return n.issues.push(un({expected:"number",code:"invalid_type",input:u,inst:e},a?{received:a}:{})),n}})),la=Gn("$ZodNumber",(function(e,t){mu.init(e,t),ca.init(e,t)})),fa=Gn("$ZodBoolean",(function(e,t){Nu.init(e,t),e._zod.pattern=ou,e._zod.parse=function(n,r){if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}var u=n.value;return"boolean"==typeof u||n.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),n}})),da=Gn("$ZodNull",(function(e,t){Nu.init(e,t),e._zod.pattern=su,e._zod.values=new Set([null]),e._zod.parse=function(t,n){var r=t.value;return null===r||t.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),t}})),pa=Gn("$ZodUnknown",(function(e,t){Nu.init(e,t),e._zod.parse=function(e){return e}})),ha=Gn("$ZodNever",(function(e,t){Nu.init(e,t),e._zod.parse=function(t,n){return t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t}}));function va(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,ln(_r(n,e.issues))),t.value[n]=e.value}var ma=Gn("$ZodArray",(function(e,t){Nu.init(e,t),e._zod.parse=function(n,r){var u=n.value;if(!Array.isArray(u))return n.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),n;n.value=Array(u.length);for(var a=[],i=function(e){var i=u[e],o=t.element._zod.run({value:i,issues:[]},r);o instanceof Promise?a.push(o.then((function(t){return va(t,n,e)}))):va(o,n,e)},o=0;o<u.length;o++)i(o);return a.length?Promise.all(a).then((function(){return n})):n}}));function Da(e,t,n,r){var u;e.issues.length&&(u=t.issues).push.apply(u,ln(_r(n,e.issues))),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function ya(e){for(var t=Object.keys(e.shape),n=0,r=t;n<r.length;n++){var u,a=r[n];if(null===(u=e.shape)||void 0===u||null===(u=u[a])||void 0===u||null===(u=u._zod)||void 0===u||null===(u=u.traits)||void 0===u||!u.has("$ZodType"))throw new Error('Invalid element at key "'.concat(a,'": expected a Zod schema'))}var i,o=(i=e.shape,Object.keys(i).filter((function(e){return"optional"===i[e]._zod.optin&&"optional"===i[e]._zod.optout})));return un(un({},e),{},{keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)})}function ga(e,t,n,r,u,a){for(var i=[],o=u.keySet,s=u.catchall._zod,c=s.def.type,l=function(){var u=d[f];if(o.has(u))return 0;if("never"===c)return i.push(u),0;var a=s.run({value:t[u],issues:[]},r);a instanceof Promise?e.push(a.then((function(e){return Da(e,n,u,t)}))):Da(a,n,u,t)},f=0,d=Object.keys(t);f<d.length;f++)l();return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:a}),e.length?Promise.all(e).then((function(){return n})):n}var Fa=Gn("$ZodObject",(function(e,t){Nu.init(e,t);var n=rr((function(){return ya(t)}));or(e._zod,"propValues",(function(){var e=t.shape,n={};for(var r in e){var u=e[r]._zod;if(u.values){var a;null!==(a=n[r])&&void 0!==a||(n[r]=new Set);var i,o=Qt(u.values);try{for(o.s();!(i=o.n()).done;){var s=i.value;n[r].add(s)}}catch(e){o.e(e)}finally{o.f()}}}return n}));var r,u=pr,a=t.catchall;e._zod.parse=function(t,i){null!=r||(r=n.value);var o=t.value;if(!u(o))return t.issues.push({expected:"object",code:"invalid_type",input:o,inst:e}),t;t.value={};var s,c=[],l=r.shape,f=Qt(r.keys);try{var d=function(){var e=s.value,n=l[e]._zod.run({value:o[e],issues:[]},i);n instanceof Promise?c.push(n.then((function(n){return Da(n,t,e,o)}))):Da(n,t,e,o)};for(f.s();!(s=f.n()).done;)d()}catch(e){f.e(e)}finally{f.f()}return a?ga(c,o,t,i,n.value,e):c.length?Promise.all(c).then((function(){return t})):t}})),Ea=Gn("$ZodObjectJIT",(function(e,t){Fa.init(e,t);var n,r,u=e._zod.parse,a=rr((function(){return ya(t)})),i=pr,o=!Xn.jitless,s=o&&hr.value,c=t.catchall;e._zod.parse=function(l,f){null!=r||(r=a.value);var d=l.value;return i(d)?o&&s&&!1===(null==f?void 0:f.async)&&!0!==f.jitless?(n||(n=function(e){var t=new Pu(["shape","payload","ctx"]),n=a.value,r=function(e){var t=fr(e);return"shape[".concat(t,"]._zod.run({ value: input[").concat(t,"], issues: [] }, ctx)")};t.write("const input = payload.value;");var u,i=Object.create(null),o=0,s=Qt(n.keys);try{for(s.s();!(u=s.n()).done;)i[u.value]="key_".concat(o++)}catch(e){s.e(e)}finally{s.f()}t.write("const newResult = {};");var c,l=Qt(n.keys);try{for(l.s();!(c=l.n()).done;){var f=c.value,d=i[f],p=fr(f);t.write("const ".concat(d," = ").concat(r(f),";")),t.write("\n if (".concat(d,".issues.length) {\n payload.issues = payload.issues.concat(").concat(d,".issues.map(iss => ({\n ...iss,\n path: iss.path ? [").concat(p,", ...iss.path] : [").concat(p,"]\n })));\n }\n \n \n if (").concat(d,".value === undefined) {\n if (").concat(p," in input) {\n newResult[").concat(p,"] = undefined;\n }\n } else {\n newResult[").concat(p,"] = ").concat(d,".value;\n }\n \n "))}}catch(e){l.e(e)}finally{l.f()}t.write("payload.value = newResult;"),t.write("return payload;");var h=t.compile();return function(t,n){return h(e,t,n)}}(t.shape)),l=n(l,f),c?ga([],d,l,f,r,e):l):u(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),l)}}));function ba(e,t,n,r){var u,a=Qt(e);try{for(a.s();!(u=a.n()).done;){var i=u.value;if(0===i.issues.length)return t.value=i.value,t}}catch(e){a.e(e)}finally{a.f()}var o=e.filter((function(e){return!br(e)}));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map((function(e){return e.issues.map((function(e){return Cr(e,r,er())}))}))}),t)}var _a=Gn("$ZodUnion",(function(e,t){Nu.init(e,t),or(e._zod,"optin",(function(){return t.options.some((function(e){return"optional"===e._zod.optin}))?"optional":void 0})),or(e._zod,"optout",(function(){return t.options.some((function(e){return"optional"===e._zod.optout}))?"optional":void 0})),or(e._zod,"values",(function(){if(t.options.every((function(e){return e._zod.values})))return new Set(t.options.flatMap((function(e){return Array.from(e._zod.values)})))})),or(e._zod,"pattern",(function(){if(t.options.every((function(e){return e._zod.pattern}))){var e=t.options.map((function(e){return e._zod.pattern}));return new RegExp("^(".concat(e.map((function(e){return ar(e.source)})).join("|"),")$"))}}));var n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=function(u,a){if(n)return r(u,a);var i,o=!1,s=[],c=Qt(t.options);try{for(c.s();!(i=c.n()).done;){var l=i.value._zod.run({value:u.value,issues:[]},a);if(l instanceof Promise)s.push(l),o=!0;else{if(0===l.issues.length)return l;s.push(l)}}}catch(e){c.e(e)}finally{c.f()}return o?Promise.all(s).then((function(t){return ba(t,u,e,a)})):ba(s,u,e,a)}})),ka=Gn("$ZodDiscriminatedUnion",(function(e,t){_a.init(e,t);var n=e._zod.parse;or(e._zod,"propValues",(function(){var e,n={},r=Qt(t.options);try{for(r.s();!(e=r.n()).done;){var u=e.value,a=u._zod.propValues;if(!a||0===Object.keys(a).length)throw new Error('Invalid discriminated union option at index "'.concat(t.options.indexOf(u),'"'));for(var i=0,o=Object.entries(a);i<o.length;i++){var s=cn(o[i],2),c=s[0],l=s[1];n[c]||(n[c]=new Set);var f,d=Qt(l);try{for(d.s();!(f=d.n()).done;){var p=f.value;n[c].add(p)}}catch(e){d.e(e)}finally{d.f()}}}}catch(e){r.e(e)}finally{r.f()}return n}));var r=rr((function(){var e,n=t.options,r=new Map,u=Qt(n);try{for(u.s();!(e=u.n()).done;){var a,i=e.value,o=null===(a=i._zod.propValues)||void 0===a?void 0:a[t.discriminator];if(!o||0===o.size)throw new Error('Invalid discriminated union option at index "'.concat(t.options.indexOf(i),'"'));var s,c=Qt(o);try{for(c.s();!(s=c.n()).done;){var l=s.value;if(r.has(l))throw new Error('Duplicate discriminator value "'.concat(String(l),'"'));r.set(l,i)}}catch(e){c.e(e)}finally{c.f()}}}catch(e){u.e(e)}finally{u.f()}return r}));e._zod.parse=function(u,a){var i=u.value;if(!pr(i))return u.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),u;var o=r.value.get(null==i?void 0:i[t.discriminator]);return o?o._zod.run(u,a):t.unionFallback?n(u,a):(u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:i,path:[t.discriminator],inst:e}),u)}})),Ca=Gn("$ZodIntersection",(function(e,t){Nu.init(e,t),e._zod.parse=function(e,n){var r=e.value,u=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return u instanceof Promise||a instanceof Promise?Promise.all([u,a]).then((function(t){var n=cn(t,2),r=n[0],u=n[1];return wa(e,r,u)})):wa(e,u,a)}}));function Aa(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(vr(e)&&vr(t)){var n,r=Object.keys(t),u=Object.keys(e).filter((function(e){return-1!==r.indexOf(e)})),a=un(un({},e),t),i=Qt(u);try{for(i.s();!(n=i.n()).done;){var o=n.value,s=Aa(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o].concat(ln(s.mergeErrorPath))};a[o]=s.data}}catch(e){i.e(e)}finally{i.f()}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};for(var c=[],l=0;l<e.length;l++){var f=Aa(e[l],t[l]);if(!f.valid)return{valid:!1,mergeErrorPath:[l].concat(ln(f.mergeErrorPath))};c.push(f.data)}return{valid:!0,data:c}}return{valid:!1,mergeErrorPath:[]}}function wa(e,t,n){var r,u;if(t.issues.length&&(r=e.issues).push.apply(r,ln(t.issues)),n.issues.length&&(u=e.issues).push.apply(u,ln(n.issues)),br(e))return e;var a=Aa(t.value,n.value);if(!a.valid)throw new Error("Unmergable intersection. Error path: "+"".concat(JSON.stringify(a.mergeErrorPath)));return e.value=a.data,e}var xa=Gn("$ZodRecord",(function(e,t){Nu.init(e,t),e._zod.parse=function(n,r){var u=n.value;if(!vr(u))return n.issues.push({expected:"record",code:"invalid_type",input:u,inst:e}),n;var a=[];if(t.keyType._zod.values){var i=t.keyType._zod.values;n.value={};var o,s,c=Qt(i);try{var l=function(){var e=o.value;if("string"==typeof e||"number"==typeof e||"symbol"===dn(e)){var i,s=t.valueType._zod.run({value:u[e],issues:[]},r);if(s instanceof Promise)a.push(s.then((function(t){var r;t.issues.length&&(r=n.issues).push.apply(r,ln(_r(e,t.issues))),n.value[e]=t.value})));else s.issues.length&&(i=n.issues).push.apply(i,ln(_r(e,s.issues))),n.value[e]=s.value}};for(c.s();!(o=c.n()).done;)l()}catch(e){c.e(e)}finally{c.f()}for(var f in u)i.has(f)||(s=null!=s?s:[]).push(f);s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:s})}else{n.value={};var d,p=Qt(Reflect.ownKeys(u));try{var h=function(){var i=d.value;if("__proto__"===i)return 0;var o=t.keyType._zod.run({value:i,issues:[]},r);if(o instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(o.issues.length)return n.issues.push({code:"invalid_key",origin:"record",issues:o.issues.map((function(e){return Cr(e,r,er())})),input:i,path:[i],inst:e}),n.value[o.value]=o.value,0;var s,c=t.valueType._zod.run({value:u[i],issues:[]},r);c instanceof Promise?a.push(c.then((function(e){var t;e.issues.length&&(t=n.issues).push.apply(t,ln(_r(i,e.issues))),n.value[o.value]=e.value}))):(c.issues.length&&(s=n.issues).push.apply(s,ln(_r(i,c.issues))),n.value[o.value]=c.value)};for(p.s();!(d=p.n()).done;)h()}catch(e){p.e(e)}finally{p.f()}}return a.length?Promise.all(a).then((function(){return n})):n}})),Sa=Gn("$ZodEnum",(function(e,t){Nu.init(e,t);var n=tr(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp("^(".concat(n.filter((function(e){return Dr.has(dn(e))})).map((function(e){return"string"==typeof e?yr(e):e.toString()})).join("|"),")$")),e._zod.parse=function(t,u){var a=t.value;return r.has(a)||t.issues.push({code:"invalid_value",values:n,input:a,inst:e}),t}})),Ba=Gn("$ZodLiteral",(function(e,t){if(Nu.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp("^(".concat(t.values.map((function(e){return"string"==typeof e?yr(e):e?yr(e.toString()):String(e)})).join("|"),")$")),e._zod.parse=function(n,r){var u=n.value;return e._zod.values.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}})),Oa=Gn("$ZodTransform",(function(e,t){Nu.init(e,t),e._zod.parse=function(n,r){if("backward"===r.direction)throw new Yn(e.constructor.name);var u=t.transform(n.value,n);if(r.async)return(u instanceof Promise?u:Promise.resolve(u)).then((function(e){return n.value=e,n}));if(u instanceof Promise)throw new Qn;return n.value=u,n}}));function Ia(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}var Ta=Gn("$ZodOptional",(function(e,t){Nu.init(e,t),e._zod.optin="optional",e._zod.optout="optional",or(e._zod,"values",(function(){return t.innerType._zod.values?new Set([].concat(ln(t.innerType._zod.values),[void 0])):void 0})),or(e._zod,"pattern",(function(){var e=t.innerType._zod.pattern;return e?new RegExp("^(".concat(ar(e.source),")?$")):void 0})),e._zod.parse=function(e,n){if("optional"===t.innerType._zod.optin){var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((function(t){return Ia(t,e.value)})):Ia(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}})),Pa=Gn("$ZodNullable",(function(e,t){Nu.init(e,t),or(e._zod,"optin",(function(){return t.innerType._zod.optin})),or(e._zod,"optout",(function(){return t.innerType._zod.optout})),or(e._zod,"pattern",(function(){var e=t.innerType._zod.pattern;return e?new RegExp("^(".concat(ar(e.source),"|null)$")):void 0})),or(e._zod,"values",(function(){return t.innerType._zod.values?new Set([].concat(ln(t.innerType._zod.values),[null])):void 0})),e._zod.parse=function(e,n){return null===e.value?e:t.innerType._zod.run(e,n)}})),ja=Gn("$ZodDefault",(function(e,t){Nu.init(e,t),e._zod.optin="optional",or(e._zod,"values",(function(){return t.innerType._zod.values})),e._zod.parse=function(e,n){if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((function(e){return Na(e,t)})):Na(r,t)}}));function Na(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}var za=Gn("$ZodPrefault",(function(e,t){Nu.init(e,t),e._zod.optin="optional",or(e._zod,"values",(function(){return t.innerType._zod.values})),e._zod.parse=function(e,n){return"backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n)}})),Ra=Gn("$ZodNonOptional",(function(e,t){Nu.init(e,t),or(e._zod,"values",(function(){var e=t.innerType._zod.values;return e?new Set(ln(e).filter((function(e){return void 0!==e}))):void 0})),e._zod.parse=function(n,r){var u=t.innerType._zod.run(n,r);return u instanceof Promise?u.then((function(t){return Ma(t,e)})):Ma(u,e)}}));function Ma(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Za=Gn("$ZodCatch",(function(e,t){Nu.init(e,t),or(e._zod,"optin",(function(){return t.innerType._zod.optin})),or(e._zod,"optout",(function(){return t.innerType._zod.optout})),or(e._zod,"values",(function(){return t.innerType._zod.values})),e._zod.parse=function(e,n){if("backward"===n.direction)return t.innerType._zod.run(e,n);var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((function(r){return e.value=r.value,r.issues.length&&(e.value=t.catchValue(un(un({},e),{},{error:{issues:r.issues.map((function(e){return Cr(e,n,er())}))},input:e.value})),e.issues=[]),e})):(e.value=r.value,r.issues.length&&(e.value=t.catchValue(un(un({},e),{},{error:{issues:r.issues.map((function(e){return Cr(e,n,er())}))},input:e.value})),e.issues=[]),e)}})),La=Gn("$ZodPipe",(function(e,t){Nu.init(e,t),or(e._zod,"values",(function(){return t.in._zod.values})),or(e._zod,"optin",(function(){return t.in._zod.optin})),or(e._zod,"optout",(function(){return t.out._zod.optout})),or(e._zod,"propValues",(function(){return t.in._zod.propValues})),e._zod.parse=function(e,n){if("backward"===n.direction){var r=t.out._zod.run(e,n);return r instanceof Promise?r.then((function(e){return $a(e,t.in,n)})):$a(r,t.in,n)}var u=t.in._zod.run(e,n);return u instanceof Promise?u.then((function(e){return $a(e,t.out,n)})):$a(u,t.out,n)}}));function $a(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var qa=Gn("$ZodReadonly",(function(e,t){Nu.init(e,t),or(e._zod,"propValues",(function(){return t.innerType._zod.propValues})),or(e._zod,"values",(function(){return t.innerType._zod.values})),or(e._zod,"optin",(function(){return t.innerType._zod.optin})),or(e._zod,"optout",(function(){return t.innerType._zod.optout})),e._zod.parse=function(e,n){if("backward"===n.direction)return t.innerType._zod.run(e,n);var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Ua):Ua(r)}}));function Ua(e){return e.value=Object.freeze(e.value),e}var Va=Gn("$ZodLazy",(function(e,t){Nu.init(e,t),or(e._zod,"innerType",(function(){return t.getter()})),or(e._zod,"pattern",(function(){return e._zod.innerType._zod.pattern})),or(e._zod,"propValues",(function(){return e._zod.innerType._zod.propValues})),or(e._zod,"optin",(function(){var t;return null!==(t=e._zod.innerType._zod.optin)&&void 0!==t?t:void 0})),or(e._zod,"optout",(function(){var t;return null!==(t=e._zod.innerType._zod.optout)&&void 0!==t?t:void 0})),e._zod.parse=function(t,n){return e._zod.innerType._zod.run(t,n)}})),Ha=Gn("$ZodCustom",(function(e,t){fu.init(e,t),Nu.init(e,t),e._zod.parse=function(e,t){return e},e._zod.check=function(n){var r=n.value,u=t.fn(r);if(u instanceof Promise)return u.then((function(t){return Wa(t,n,r,e)}));Wa(u,n,r,e)}}));function Wa(e,t,n,r){if(!e){var u,a={code:"custom",input:n,inst:r,path:ln(null!==(u=r._zod.def.path)&&void 0!==u?u:[]),continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(xr(a))}}var Ka=Gt((function e(){Wt(this,e),this._map=new WeakMap,this._idmap=new Map}),[{key:"add",value:function(e){var t=arguments.length<=1?void 0:arguments[1];if(this._map.set(e,t),t&&"object"===dn(t)&&"id"in t){if(this._idmap.has(t.id))throw new Error("ID ".concat(t.id," already exists in the registry"));this._idmap.set(t.id,e)}return this}},{key:"clear",value:function(){return this._map=new WeakMap,this._idmap=new Map,this}},{key:"remove",value:function(e){var t=this._map.get(e);return t&&"object"===dn(t)&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}},{key:"get",value:function(e){var t=e._zod.parent;if(t){var n,r=un({},null!==(n=this.get(t))&&void 0!==n?n:{});delete r.id;var u=un(un({},r),this._map.get(e));return Object.keys(u).length?u:void 0}return this._map.get(e)}},{key:"has",value:function(e){return this._map.has(e)}}]);var Ja=new Ka;function Ga(e,t){return new e(un({type:"string",format:"guid",check:"string_format",abort:!1},Fr(t)))}function Qa(e,t){return new e(un({type:"string",format:"base64",check:"string_format",abort:!1},Fr(t)))}function Ya(e,t){return new pu(un(un({check:"less_than"},Fr(t)),{},{value:e,inclusive:!1}))}function Xa(e,t){return new pu(un(un({check:"less_than"},Fr(t)),{},{value:e,inclusive:!0}))}function ei(e,t){return new hu(un(un({check:"greater_than"},Fr(t)),{},{value:e,inclusive:!1}))}function ti(e,t){return new hu(un(un({check:"greater_than"},Fr(t)),{},{value:e,inclusive:!0}))}function ni(e,t){return new vu(un(un({check:"multiple_of"},Fr(t)),{},{value:e}))}function ri(e,t){return new Fu(un(un({check:"max_length"},Fr(t)),{},{maximum:e}))}function ui(e,t){return new Eu(un(un({check:"min_length"},Fr(t)),{},{minimum:e}))}function ai(e,t){return new bu(un(un({check:"length_equals"},Fr(t)),{},{length:e}))}function ii(e,t){return new ku(un(un({check:"string_format",format:"regex"},Fr(t)),{},{pattern:e}))}function oi(e){return new Cu(un({check:"string_format",format:"lowercase"},Fr(e)))}function si(e){return new Au(un({check:"string_format",format:"uppercase"},Fr(e)))}function ci(e,t){return new wu(un(un({check:"string_format",format:"includes"},Fr(t)),{},{includes:e}))}function li(e,t){return new xu(un(un({check:"string_format",format:"starts_with"},Fr(t)),{},{prefix:e}))}function fi(e,t){return new Su(un(un({check:"string_format",format:"ends_with"},Fr(t)),{},{suffix:e}))}function di(e){return new Tu({check:"overwrite",tx:e})}function pi(e){return di((function(t){return t.normalize(e)}))}function hi(){return di((function(e){return e.trim()}))}function vi(){return di((function(e){return e.toLowerCase()}))}function mi(){return di((function(e){return e.toUpperCase()}))}var Di=Gt((function e(t){var n,r,u,a,i;Wt(this,e),this.counter=0,this.metadataRegistry=null!==(n=null==t?void 0:t.metadata)&&void 0!==n?n:Ja,this.target=null!==(r=null==t?void 0:t.target)&&void 0!==r?r:"draft-2020-12",this.unrepresentable=null!==(u=null==t?void 0:t.unrepresentable)&&void 0!==u?u:"throw",this.override=null!==(a=null==t?void 0:t.override)&&void 0!==a?a:function(){},this.io=null!==(i=null==t?void 0:t.io)&&void 0!==i?i:"output",this.seen=new Map}),[{key:"process",value:function(e){var t,n,r,u,a=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{path:[],schemaPath:[]},o=e._zod.def,s=this.seen.get(e);if(s)return s.count++,i.schemaPath.includes(e)&&(s.cycle=i.path),s.schema;var c={schema:{},count:1,cycle:void 0,path:i.path};this.seen.set(e,c);var l=null===(t=(n=e._zod).toJSONSchema)||void 0===t?void 0:t.call(n);if(l)c.schema=l;else{var f=un(un({},i),{},{schemaPath:[].concat(ln(i.schemaPath),[e]),path:i.path}),d=e._zod.parent;if(d)c.ref=d,this.process(d,f),this.seen.get(d).isParent=!0;else{var p=c.schema;switch(o.type){case"string":var h=p;h.type="string";var v,m=e._zod.bag,D=m.minimum,y=m.maximum,g=m.format,F=m.patterns,E=m.contentEncoding;if("number"==typeof D&&(h.minLength=D),"number"==typeof y&&(h.maxLength=y),g&&(h.format=null!==(v={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""}[g])&&void 0!==v?v:g,""===h.format&&delete h.format),E&&(h.contentEncoding=E),F&&F.size>0){var b=ln(F);1===b.length?h.pattern=b[0].source:b.length>1&&(c.schema.allOf=ln(b.map((function(e){return un(un({},"draft-7"===a.target||"draft-4"===a.target||"openapi-3.0"===a.target?{type:"string"}:{}),{},{pattern:e.source})}))))}break;case"number":var _=p,k=e._zod.bag,C=k.minimum,A=k.maximum,w=k.format,x=k.multipleOf,S=k.exclusiveMaximum,B=k.exclusiveMinimum;"string"==typeof w&&w.includes("int")?_.type="integer":_.type="number","number"==typeof B&&("draft-4"===this.target||"openapi-3.0"===this.target?(_.minimum=B,_.exclusiveMinimum=!0):_.exclusiveMinimum=B),"number"==typeof C&&(_.minimum=C,"number"==typeof B&&"draft-4"!==this.target&&(B>=C?delete _.minimum:delete _.exclusiveMinimum)),"number"==typeof S&&("draft-4"===this.target||"openapi-3.0"===this.target?(_.maximum=S,_.exclusiveMaximum=!0):_.exclusiveMaximum=S),"number"==typeof A&&(_.maximum=A,"number"==typeof S&&"draft-4"!==this.target&&(S<=A?delete _.maximum:delete _.exclusiveMaximum)),"number"==typeof x&&(_.multipleOf=x);break;case"boolean":case"success":p.type="boolean";break;case"bigint":if("throw"===this.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema");break;case"symbol":if("throw"===this.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema");break;case"null":"openapi-3.0"===this.target?(p.type="string",p.nullable=!0,p.enum=[null]):p.type="null";break;case"any":case"unknown":break;case"undefined":if("throw"===this.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema");break;case"void":if("throw"===this.unrepresentable)throw new Error("Void cannot be represented in JSON Schema");break;case"never":p.not={};break;case"date":if("throw"===this.unrepresentable)throw new Error("Date cannot be represented in JSON Schema");break;case"array":var O=p,I=e._zod.bag,T=I.minimum,P=I.maximum;"number"==typeof T&&(O.minItems=T),"number"==typeof P&&(O.maxItems=P),O.type="array",O.items=this.process(o.element,un(un({},f),{},{path:[].concat(ln(f.path),["items"])}));break;case"object":var j,N=p;N.type="object",N.properties={};var z=o.shape;for(var R in z)N.properties[R]=this.process(z[R],un(un({},f),{},{path:[].concat(ln(f.path),["properties",R])}));var M=new Set(Object.keys(z)),Z=new Set(ln(M).filter((function(e){var t=o.shape[e]._zod;return"input"===a.io?void 0===t.optin:void 0===t.optout})));Z.size>0&&(N.required=Array.from(Z)),"never"===(null===(j=o.catchall)||void 0===j?void 0:j._zod.def.type)?N.additionalProperties=!1:o.catchall?o.catchall&&(N.additionalProperties=this.process(o.catchall,un(un({},f),{},{path:[].concat(ln(f.path),["additionalProperties"])}))):"output"===this.io&&(N.additionalProperties=!1);break;case"union":var L=p,$=o.options.map((function(e,t){return a.process(e,un(un({},f),{},{path:[].concat(ln(f.path),["anyOf",t])}))}));L.anyOf=$;break;case"intersection":var q=p,U=this.process(o.left,un(un({},f),{},{path:[].concat(ln(f.path),["allOf",0])})),V=this.process(o.right,un(un({},f),{},{path:[].concat(ln(f.path),["allOf",1])})),H=function(e){return"allOf"in e&&1===Object.keys(e).length},W=[].concat(ln(H(U)?U.allOf:[U]),ln(H(V)?V.allOf:[V]));q.allOf=W;break;case"tuple":var K=p;K.type="array";var J="draft-2020-12"===this.target?"prefixItems":"items",G="draft-2020-12"===this.target||"openapi-3.0"===this.target?"items":"additionalItems",Q=o.items.map((function(e,t){return a.process(e,un(un({},f),{},{path:[].concat(ln(f.path),[J,t])}))})),Y=o.rest?this.process(o.rest,un(un({},f),{},{path:[].concat(ln(f.path),[G],ln("openapi-3.0"===this.target?[o.items.length]:[]))})):null;"draft-2020-12"===this.target?(K.prefixItems=Q,Y&&(K.items=Y)):"openapi-3.0"===this.target?(K.items={anyOf:Q},Y&&K.items.anyOf.push(Y),K.minItems=Q.length,Y||(K.maxItems=Q.length)):(K.items=Q,Y&&(K.additionalItems=Y));var X=e._zod.bag,ee=X.minimum,te=X.maximum;"number"==typeof ee&&(K.minItems=ee),"number"==typeof te&&(K.maxItems=te);break;case"record":var ne=p;ne.type="object","draft-7"!==this.target&&"draft-2020-12"!==this.target||(ne.propertyNames=this.process(o.keyType,un(un({},f),{},{path:[].concat(ln(f.path),["propertyNames"])}))),ne.additionalProperties=this.process(o.valueType,un(un({},f),{},{path:[].concat(ln(f.path),["additionalProperties"])}));break;case"map":if("throw"===this.unrepresentable)throw new Error("Map cannot be represented in JSON Schema");break;case"set":if("throw"===this.unrepresentable)throw new Error("Set cannot be represented in JSON Schema");break;case"enum":var re=p,ue=tr(o.entries);ue.every((function(e){return"number"==typeof e}))&&(re.type="number"),ue.every((function(e){return"string"==typeof e}))&&(re.type="string"),re.enum=ue;break;case"literal":var ae,ie=p,oe=[],se=Qt(o.values);try{for(se.s();!(ae=se.n()).done;){var ce=ae.value;if(void 0===ce){if("throw"===this.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof ce){if("throw"===this.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");oe.push(Number(ce))}else oe.push(ce)}}catch(e){se.e(e)}finally{se.f()}if(0===oe.length);else if(1===oe.length){var le=oe[0];ie.type=null===le?"null":dn(le),"draft-4"===this.target||"openapi-3.0"===this.target?ie.enum=[le]:ie.const=le}else oe.every((function(e){return"number"==typeof e}))&&(ie.type="number"),oe.every((function(e){return"string"==typeof e}))&&(ie.type="string"),oe.every((function(e){return"boolean"==typeof e}))&&(ie.type="string"),oe.every((function(e){return null===e}))&&(ie.type="null"),ie.enum=oe;break;case"file":var fe=p,de={type:"string",format:"binary",contentEncoding:"binary"},pe=e._zod.bag,he=pe.minimum,ve=pe.maximum,me=pe.mime;void 0!==he&&(de.minLength=he),void 0!==ve&&(de.maxLength=ve),me?1===me.length?(de.contentMediaType=me[0],Object.assign(fe,de)):fe.anyOf=me.map((function(e){return un(un({},de),{},{contentMediaType:e})})):Object.assign(fe,de);break;case"transform":if("throw"===this.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema");break;case"nullable":var De=this.process(o.innerType,f);"openapi-3.0"===this.target?(c.ref=o.innerType,p.nullable=!0):p.anyOf=[De,{type:"null"}];break;case"nonoptional":case"promise":case"optional":this.process(o.innerType,f),c.ref=o.innerType;break;case"default":this.process(o.innerType,f),c.ref=o.innerType,p.default=JSON.parse(JSON.stringify(o.defaultValue));break;case"prefault":this.process(o.innerType,f),c.ref=o.innerType,"input"===this.io&&(p._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break;case"catch":var ye;this.process(o.innerType,f),c.ref=o.innerType;try{ye=o.catchValue(void 0)}catch(e){throw new Error("Dynamic catch values are not supported in JSON Schema")}p.default=ye;break;case"nan":if("throw"===this.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema");break;case"template_literal":var ge=p,Fe=e._zod.pattern;if(!Fe)throw new Error("Pattern not found in template literal");ge.type="string",ge.pattern=Fe.source;break;case"pipe":var Ee="input"===this.io?"transform"===o.in._zod.def.type?o.out:o.in:o.out;this.process(Ee,f),c.ref=Ee;break;case"readonly":this.process(o.innerType,f),c.ref=o.innerType,p.readOnly=!0;break;case"lazy":var be=e._zod.innerType;this.process(be,f),c.ref=be;break;case"custom":if("throw"===this.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema");break;case"function":if("throw"===this.unrepresentable)throw new Error("Function types cannot be represented in JSON Schema")}}}var _e=this.metadataRegistry.get(e);return _e&&Object.assign(c.schema,_e),"input"===this.io&&yi(e)&&(delete c.schema.examples,delete c.schema.default),"input"===this.io&&c.schema._prefault&&(null!==(r=(u=c.schema).default)&&void 0!==r||(u.default=c.schema._prefault)),delete c.schema._prefault,this.seen.get(e).schema}},{key:"emit",value:function(e,t){var n,r,u,a,i,o,s=this,c={cycles:null!==(n=null==t?void 0:t.cycles)&&void 0!==n?n:"ref",reused:null!==(r=null==t?void 0:t.reused)&&void 0!==r?r:"inline",external:null!==(u=null==t?void 0:t.external)&&void 0!==u?u:void 0},l=this.seen.get(e);if(!l)throw new Error("Unprocessed schema. This is a bug in Zod.");var f=function(e){if(!e[1].schema.$ref){var t=e[1],n=function(e){var t,n="draft-2020-12"===s.target?"$defs":"definitions";if(c.external){var r,u,a,i,o=null===(r=c.external.registry.get(e[0]))||void 0===r?void 0:r.id,f=null!==(u=c.external.uri)&&void 0!==u?u:function(e){return e};if(o)return{ref:f(o)};var d=null!==(a=null!==(i=e[1].defId)&&void 0!==i?i:e[1].schema.id)&&void 0!==a?a:"schema".concat(s.counter++);return e[1].defId=d,{defId:d,ref:"".concat(f("__shared"),"#/").concat(n,"/").concat(d)}}if(e[1]===l)return{ref:"#"};var p="".concat("#","/").concat(n,"/"),h=null!==(t=e[1].schema.id)&&void 0!==t?t:"__schema".concat(s.counter++);return{defId:h,ref:p+h}}(e),r=n.ref,u=n.defId;t.def=un({},t.schema),u&&(t.defId=u);var a=t.schema;for(var i in a)delete a[i];a.$ref=r}};if("throw"===c.cycles){var d,p=Qt(this.seen.entries());try{for(p.s();!(d=p.n()).done;){var h,v=d.value[1];if(v.cycle)throw new Error("Cycle detected: "+"#/".concat(null===(h=v.cycle)||void 0===h?void 0:h.join("/"),"/<root>")+'\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.')}}catch(e){p.e(e)}finally{p.f()}}var m,D=Qt(this.seen.entries());try{for(D.s();!(m=D.n()).done;){var y,g=m.value,F=g[1];if(e!==g[0]){if(c.external){var E,b=null===(E=c.external.registry.get(g[0]))||void 0===E?void 0:E.id;if(e!==g[0]&&b){f(g);continue}}((null===(y=this.metadataRegistry.get(g[0]))||void 0===y?void 0:y.id)||F.cycle||F.count>1&&"ref"===c.reused)&&f(g)}else f(g)}}catch(e){D.e(e)}finally{D.f()}var _,k=function(e,t){var n,r,u=s.seen.get(e),a=null!==(n=u.def)&&void 0!==n?n:u.schema,i=un({},a);if(null!==u.ref){var o=u.ref;if(u.ref=null,o){k(o,t);var c,l=s.seen.get(o).schema;!l.$ref||"draft-7"!==t.target&&"draft-4"!==t.target&&"openapi-3.0"!==t.target?(Object.assign(a,l),Object.assign(a,i)):(a.allOf=null!==(c=a.allOf)&&void 0!==c?c:[],a.allOf.push(l))}u.isParent||s.override({zodSchema:e,jsonSchema:a,path:null!==(r=u.path)&&void 0!==r?r:[]})}},C=Qt(ln(this.seen.entries()).reverse());try{for(C.s();!(_=C.n()).done;){var A=_.value;k(A[0],{target:this.target})}}catch(e){C.e(e)}finally{C.f()}var w={};if("draft-2020-12"===this.target?w.$schema="https://json-schema.org/draft/2020-12/schema":"draft-7"===this.target?w.$schema="http://json-schema.org/draft-07/schema#":"draft-4"===this.target?w.$schema="http://json-schema.org/draft-04/schema#":"openapi-3.0"===this.target||console.warn("Invalid target: ".concat(this.target)),null!==(a=c.external)&&void 0!==a&&a.uri){var x,S=null===(x=c.external.registry.get(e))||void 0===x?void 0:x.id;if(!S)throw new Error("Schema is missing an `id` property");w.$id=c.external.uri(S)}Object.assign(w,l.def);var B,O=null!==(i=null===(o=c.external)||void 0===o?void 0:o.defs)&&void 0!==i?i:{},I=Qt(this.seen.entries());try{for(I.s();!(B=I.n()).done;){var T=B.value[1];T.def&&T.defId&&(O[T.defId]=T.def)}}catch(e){I.e(e)}finally{I.f()}c.external||Object.keys(O).length>0&&("draft-2020-12"===this.target?w.$defs=O:w.definitions=O);try{return JSON.parse(JSON.stringify(w))}catch(e){throw new Error("Error converting schema to JSON.")}}}]);function yi(e,t){var n=null!=t?t:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);var r=e._zod.def;switch(r.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":case"custom":case"success":case"catch":case"function":return!1;case"array":return yi(r.element,n);case"object":for(var u in r.shape)if(yi(r.shape[u],n))return!0;return!1;case"union":var a,i=Qt(r.options);try{for(i.s();!(a=i.n()).done;)if(yi(a.value,n))return!0}catch(e){i.e(e)}finally{i.f()}return!1;case"intersection":return yi(r.left,n)||yi(r.right,n);case"tuple":var o,s=Qt(r.items);try{for(s.s();!(o=s.n()).done;)if(yi(o.value,n))return!0}catch(e){s.e(e)}finally{s.f()}return!(!r.rest||!yi(r.rest,n));case"record":case"map":return yi(r.keyType,n)||yi(r.valueType,n);case"set":return yi(r.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":case"default":case"prefault":return yi(r.innerType,n);case"lazy":return yi(r.getter(),n);case"transform":return!0;case"pipe":return yi(r.in,n)||yi(r.out,n)}throw new Error("Unknown schema type: ".concat(r.type))}var gi=Object.freeze({__proto__:null,endsWith:fi,gt:ei,gte:ti,includes:ci,length:ai,lowercase:oi,lt:Ya,lte:Xa,maxLength:ri,maxSize:function(e,t){return new Du(un(un({check:"max_size"},Fr(t)),{},{maximum:e}))},mime:function(e,t){return new Iu(un({check:"mime_type",mime:e},Fr(t)))},minLength:ui,minSize:function(e,t){return new yu(un(un({check:"min_size"},Fr(t)),{},{minimum:e}))},multipleOf:ni,negative:function(e){return Ya(0,e)},nonnegative:function(e){return ti(0,e)},nonpositive:function(e){return Xa(0,e)},normalize:pi,overwrite:di,positive:function(e){return ei(0,e)},property:function(e,t,n){return new Ou(un({check:"property",property:e,schema:t},Fr(n)))},regex:ii,size:function(e,t){return new gu(un(un({check:"size_equals"},Fr(t)),{},{size:e}))},startsWith:li,toLowerCase:vi,toUpperCase:mi,trim:hi,uppercase:si}),Fi=Gn("ZodISODateTime",(function(e,t){Gu.init(e,t),Li.init(e,t)}));var Ei=Gn("ZodISODate",(function(e,t){Qu.init(e,t),Li.init(e,t)}));var bi=Gn("ZodISOTime",(function(e,t){Yu.init(e,t),Li.init(e,t)}));var _i=Gn("ZodISODuration",(function(e,t){Xu.init(e,t),Li.init(e,t)}));var ki=Gn("ZodError",(function(e,t){Br.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:function(t){return function(e,t){var n=t||function(e){return e.message},r={_errors:[]},u=function(e){var t,a=Qt(e.issues);try{for(a.s();!(t=a.n()).done;){var i=t.value;if("invalid_union"===i.code&&i.errors.length)i.errors.map((function(e){return u({issues:e})}));else if("invalid_key"===i.code)u({issues:i.issues});else if("invalid_element"===i.code)u({issues:i.issues});else if(0===i.path.length)r._errors.push(n(i));else for(var o=r,s=0;s<i.path.length;){var c=i.path[s];s===i.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(i))):o[c]=o[c]||{_errors:[]},o=o[c],s++}}}catch(e){a.e(e)}finally{a.f()}};return u(e),r}(e,t)}},flatten:{value:function(t){return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e.message},r={},u=[],a=Qt(e.issues);try{for(a.s();!(t=a.n()).done;){var i=t.value;i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(n(i))):u.push(n(i))}}catch(e){a.e(e)}finally{a.f()}return{formErrors:u,fieldErrors:r}}(e,t)}},addIssue:{value:function(t){e.issues.push(t),e.message=JSON.stringify(e.issues,nr,2)}},addIssues:{value:function(t){var n;(n=e.issues).push.apply(n,ln(t)),e.message=JSON.stringify(e.issues,nr,2)}},isEmpty:{get:function(){return 0===e.issues.length}}})}),{Parent:Error}),Ci=Ir(ki),Ai=Tr(ki),wi=Pr(ki),xi=Nr(ki),Si=function(e){return function(t,n,r){var u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ir(e)(t,n,u)}}(ki),Bi=function(e){return function(t,n,r){return Ir(e)(t,n,r)}}(ki),Oi=function(e){return function(){var t=Vt(on().mark((function t(n,r,u){var a;return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=u?Object.assign(u,{direction:"backward"}):{direction:"backward"},t.abrupt("return",Tr(e)(n,r,a));case 2:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()}(ki),Ii=function(e){return function(){var t=Vt(on().mark((function t(n,r,u){return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Tr(e)(n,r,u));case 1:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()}(ki),Ti=function(e){return function(t,n,r){var u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Pr(e)(t,n,u)}}(ki),Pi=function(e){return function(t,n,r){return Pr(e)(t,n,r)}}(ki),ji=function(e){return function(){var t=Vt(on().mark((function t(n,r,u){var a;return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=u?Object.assign(u,{direction:"backward"}):{direction:"backward"},t.abrupt("return",Nr(e)(n,r,a));case 2:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()}(ki),Ni=function(e){return function(){var t=Vt(on().mark((function t(n,r,u){return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Nr(e)(n,r,u));case 1:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()}(ki),zi=Gn("ZodType",(function(e,t){return Nu.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=function(){for(var n,r=arguments.length,u=new Array(r),a=0;a<r;a++)u[a]=arguments[a];return e.clone(un(un({},t),{},{checks:[].concat(ln(null!==(n=t.checks)&&void 0!==n?n:[]),ln(u.map((function(e){return"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e}))))}))},e.clone=function(t,n){return gr(e,t,n)},e.brand=function(){return e},e.register=function(t,n){return t.add(e,n),e},e.parse=function(t,n){return Ci(e,t,n,{callee:e.parse})},e.safeParse=function(t,n){return wi(e,t,n)},e.parseAsync=function(){var t=Vt(on().mark((function t(n,r){return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Ai(e,n,r,{callee:e.parseAsync}));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e.safeParseAsync=function(){var t=Vt(on().mark((function t(n,r){return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",xi(e,n,r));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e.spa=e.safeParseAsync,e.encode=function(t,n){return Si(e,t,n)},e.decode=function(t,n){return Bi(e,t,n)},e.encodeAsync=function(){var t=Vt(on().mark((function t(n,r){return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Oi(e,n,r));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e.decodeAsync=function(){var t=Vt(on().mark((function t(n,r){return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Ii(e,n,r));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e.safeEncode=function(t,n){return Ti(e,t,n)},e.safeDecode=function(t,n){return Pi(e,t,n)},e.safeEncodeAsync=function(){var t=Vt(on().mark((function t(n,r){return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",ji(e,n,r));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e.safeDecodeAsync=function(){var t=Vt(on().mark((function t(n,r){return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Ni(e,n,r));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e.refine=function(t,n){return e.check(function(e){return function(e,t,n){return new Yo(un({type:"custom",check:"custom",fn:t},Fr(n)))}(0,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(t,n))},e.superRefine=function(t){return e.check(function(e){var t=function(e){var t=new fu(un({check:"custom"},Fr(void 0)));return t._zod.check=e,t}((function(n){return n.addIssue=function(e){if("string"==typeof e)n.issues.push(xr(e,n.value,t._zod.def));else{var r,u,a,i,o=e;o.fatal&&(o.continue=!1),null!==(r=o.code)&&void 0!==r||(o.code="custom"),null!==(u=o.input)&&void 0!==u||(o.input=n.value),null!==(a=o.inst)&&void 0!==a||(o.inst=t),null!==(i=o.continue)&&void 0!==i||(o.continue=!t._zod.def.abort),n.issues.push(xr(o))}},e(n.value,n)}));return t}(t))},e.overwrite=function(t){return e.check(di(t))},e.optional=function(){return Mo(e)},e.nullable=function(){return Lo(e)},e.nullish=function(){return Mo(Lo(e))},e.nonoptional=function(t){return function(e,t){return new Uo(un({type:"nonoptional",innerType:e},Fr(t)))}(e,t)},e.array=function(){return bo(e)},e.or=function(t){return xo([e,t])},e.and=function(t){return new Bo({type:"intersection",left:e,right:t})},e.transform=function(t){return Wo(e,new zo({type:"transform",transform:t}))},e.default=function(t){return n=t,new $o({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():mr(n)}});var n},e.prefault=function(t){return n=t,new qo({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():mr(n)}});var n},e.catch=function(t){return new Vo({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:function(){return n}});var n},e.pipe=function(t){return Wo(e,t)},e.readonly=function(){return new Go({type:"readonly",innerType:e})},e.describe=function(t){var n=e.clone();return Ja.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:function(){var t;return null===(t=Ja.get(e))||void 0===t?void 0:t.description},configurable:!0}),e.meta=function(){if(0===arguments.length)return Ja.get(e);var t=e.clone();return Ja.add(t,arguments.length<=0?void 0:arguments[0]),t},e.isOptional=function(){return e.safeParse(void 0).success},e.isNullable=function(){return e.safeParse(null).success},e})),Ri=Gn("_ZodString",(function(e,t){var n,r,u;zu.init(e,t),zi.init(e,t);var a=e._zod.bag;e.format=null!==(n=a.format)&&void 0!==n?n:null,e.minLength=null!==(r=a.minimum)&&void 0!==r?r:null,e.maxLength=null!==(u=a.maximum)&&void 0!==u?u:null,e.regex=function(){return e.check(ii.apply(gi,arguments))},e.includes=function(){return e.check(ci.apply(gi,arguments))},e.startsWith=function(){return e.check(li.apply(gi,arguments))},e.endsWith=function(){return e.check(fi.apply(gi,arguments))},e.min=function(){return e.check(ui.apply(gi,arguments))},e.max=function(){return e.check(ri.apply(gi,arguments))},e.length=function(){return e.check(ai.apply(gi,arguments))},e.nonempty=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.check(ui.apply(gi,[1].concat(n)))},e.lowercase=function(t){return e.check(oi(t))},e.uppercase=function(t){return e.check(si(t))},e.trim=function(){return e.check(hi())},e.normalize=function(){return e.check(pi.apply(gi,arguments))},e.toLowerCase=function(){return e.check(vi())},e.toUpperCase=function(){return e.check(mi())}})),Mi=Gn("ZodString",(function(e,t){zu.init(e,t),Ri.init(e,t),e.email=function(t){return e.check(function(e,t){return new $i(un({type:"string",format:"email",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.url=function(t){return e.check(function(e,t){return new Vi(un({type:"string",format:"url",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.jwt=function(t){return e.check(function(e,t){return new oo(un({type:"string",format:"jwt",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.emoji=function(t){return e.check(function(e,t){return new Hi(un({type:"string",format:"emoji",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.guid=function(t){return e.check(Ga(qi,t))},e.uuid=function(t){return e.check(function(e,t){return new Ui(un({type:"string",format:"uuid",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.uuidv4=function(t){return e.check(function(e,t){return new Ui(un({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4"},Fr(t)))}(0,t))},e.uuidv6=function(t){return e.check(function(e,t){return new Ui(un({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6"},Fr(t)))}(0,t))},e.uuidv7=function(t){return e.check(function(e,t){return new Ui(un({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7"},Fr(t)))}(0,t))},e.nanoid=function(t){return e.check(function(e,t){return new Wi(un({type:"string",format:"nanoid",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.guid=function(t){return e.check(Ga(qi,t))},e.cuid=function(t){return e.check(function(e,t){return new Ki(un({type:"string",format:"cuid",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.cuid2=function(t){return e.check(function(e,t){return new Ji(un({type:"string",format:"cuid2",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.ulid=function(t){return e.check(function(e,t){return new Gi(un({type:"string",format:"ulid",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.base64=function(t){return e.check(Qa(ro,t))},e.base64url=function(t){return e.check(function(e,t){return new ao(un({type:"string",format:"base64url",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.xid=function(t){return e.check(function(e,t){return new Qi(un({type:"string",format:"xid",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.ksuid=function(t){return e.check(function(e,t){return new Yi(un({type:"string",format:"ksuid",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.ipv4=function(t){return e.check(function(e,t){return new Xi(un({type:"string",format:"ipv4",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.ipv6=function(t){return e.check(function(e,t){return new eo(un({type:"string",format:"ipv6",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.cidrv4=function(t){return e.check(function(e,t){return new to(un({type:"string",format:"cidrv4",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.cidrv6=function(t){return e.check(function(e,t){return new no(un({type:"string",format:"cidrv6",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.e164=function(t){return e.check(function(e,t){return new io(un({type:"string",format:"e164",check:"string_format",abort:!1},Fr(t)))}(0,t))},e.datetime=function(t){return e.check(function(e){return function(e,t){return new Fi(un({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null},Fr(t)))}(0,e)}(t))},e.date=function(t){return e.check(function(e){return function(e,t){return new Ei(un({type:"string",format:"date",check:"string_format"},Fr(t)))}(0,e)}(t))},e.time=function(t){return e.check(function(e){return function(e,t){return new bi(un({type:"string",format:"time",check:"string_format",precision:null},Fr(t)))}(0,e)}(t))},e.duration=function(t){return e.check(function(e){return function(e,t){return new _i(un({type:"string",format:"duration",check:"string_format"},Fr(t)))}(0,e)}(t))}}));function Zi(e){return function(e,t){return new Mi(un({type:"string"},Fr(t)))}(0,e)}var Li=Gn("ZodStringFormat",(function(e,t){Ru.init(e,t),Ri.init(e,t)})),$i=Gn("ZodEmail",(function(e,t){Lu.init(e,t),Li.init(e,t)})),qi=Gn("ZodGUID",(function(e,t){Mu.init(e,t),Li.init(e,t)})),Ui=Gn("ZodUUID",(function(e,t){Zu.init(e,t),Li.init(e,t)})),Vi=Gn("ZodURL",(function(e,t){$u.init(e,t),Li.init(e,t)})),Hi=Gn("ZodEmoji",(function(e,t){qu.init(e,t),Li.init(e,t)})),Wi=Gn("ZodNanoID",(function(e,t){Uu.init(e,t),Li.init(e,t)})),Ki=Gn("ZodCUID",(function(e,t){Vu.init(e,t),Li.init(e,t)})),Ji=Gn("ZodCUID2",(function(e,t){Hu.init(e,t),Li.init(e,t)})),Gi=Gn("ZodULID",(function(e,t){Wu.init(e,t),Li.init(e,t)})),Qi=Gn("ZodXID",(function(e,t){Ku.init(e,t),Li.init(e,t)})),Yi=Gn("ZodKSUID",(function(e,t){Ju.init(e,t),Li.init(e,t)})),Xi=Gn("ZodIPv4",(function(e,t){ea.init(e,t),Li.init(e,t)})),eo=Gn("ZodIPv6",(function(e,t){ta.init(e,t),Li.init(e,t)})),to=Gn("ZodCIDRv4",(function(e,t){na.init(e,t),Li.init(e,t)})),no=Gn("ZodCIDRv6",(function(e,t){ra.init(e,t),Li.init(e,t)})),ro=Gn("ZodBase64",(function(e,t){aa.init(e,t),Li.init(e,t)}));function uo(e){return Qa(ro,e)}var ao=Gn("ZodBase64URL",(function(e,t){ia.init(e,t),Li.init(e,t)})),io=Gn("ZodE164",(function(e,t){oa.init(e,t),Li.init(e,t)})),oo=Gn("ZodJWT",(function(e,t){sa.init(e,t),Li.init(e,t)})),so=Gn("ZodNumber",(function(e,t){var n,r,u,a,i,o,s,c,l;ca.init(e,t),zi.init(e,t),e.gt=function(t,n){return e.check(ei(t,n))},e.gte=function(t,n){return e.check(ti(t,n))},e.min=function(t,n){return e.check(ti(t,n))},e.lt=function(t,n){return e.check(Ya(t,n))},e.lte=function(t,n){return e.check(Xa(t,n))},e.max=function(t,n){return e.check(Xa(t,n))},e.int=function(t){return e.check(fo(t))},e.safe=function(t){return e.check(fo(t))},e.positive=function(t){return e.check(ei(0,t))},e.nonnegative=function(t){return e.check(ti(0,t))},e.negative=function(t){return e.check(Ya(0,t))},e.nonpositive=function(t){return e.check(Xa(0,t))},e.multipleOf=function(t,n){return e.check(ni(t,n))},e.step=function(t,n){return e.check(ni(t,n))},e.finite=function(){return e};var f=e._zod.bag;e.minValue=null!==(n=Math.max(null!==(r=f.minimum)&&void 0!==r?r:Number.NEGATIVE_INFINITY,null!==(u=f.exclusiveMinimum)&&void 0!==u?u:Number.NEGATIVE_INFINITY))&&void 0!==n?n:null,e.maxValue=null!==(a=Math.min(null!==(i=f.maximum)&&void 0!==i?i:Number.POSITIVE_INFINITY,null!==(o=f.exclusiveMaximum)&&void 0!==o?o:Number.POSITIVE_INFINITY))&&void 0!==a?a:null,e.isInt=(null!==(s=f.format)&&void 0!==s?s:"").includes("int")||Number.isSafeInteger(null!==(c=f.multipleOf)&&void 0!==c?c:.5),e.isFinite=!0,e.format=null!==(l=f.format)&&void 0!==l?l:null}));function co(e){return function(e,t){return new so(un({type:"number",checks:[]},Fr(t)))}(0,e)}var lo=Gn("ZodNumberFormat",(function(e,t){la.init(e,t),so.init(e,t)}));function fo(e){return function(e,t){return new lo(un({type:"number",check:"number_format",abort:!1,format:"safeint"},Fr(t)))}(0,e)}var po=Gn("ZodBoolean",(function(e,t){fa.init(e,t),zi.init(e,t)}));function ho(e){return function(e,t){return new po(un({type:"boolean"},Fr(t)))}(0,e)}var vo=Gn("ZodNull",(function(e,t){da.init(e,t),zi.init(e,t)}));function mo(e){return function(e,t){return new vo(un({type:"null"},Fr(t)))}(0,e)}var Do=Gn("ZodUnknown",(function(e,t){pa.init(e,t),zi.init(e,t)}));function yo(){return new Do({type:"unknown"})}var go=Gn("ZodNever",(function(e,t){ha.init(e,t),zi.init(e,t)}));function Fo(e){return function(e,t){return new go(un({type:"never"},Fr(t)))}(0,e)}var Eo=Gn("ZodArray",(function(e,t){ma.init(e,t),zi.init(e,t),e.element=t.element,e.min=function(t,n){return e.check(ui(t,n))},e.nonempty=function(t){return e.check(ui(1,t))},e.max=function(t,n){return e.check(ri(t,n))},e.length=function(t,n){return e.check(ai(t,n))},e.unwrap=function(){return e.element}}));function bo(e,t){return function(e,t,n){return new Eo(un({type:"array",element:t},Fr(n)))}(0,e,t)}var _o=Gn("ZodObject",(function(e,t){Ea.init(e,t),zi.init(e,t),or(e,"shape",(function(){return t.shape})),e.keyof=function(){return Po(Object.keys(e._zod.def.shape))},e.catchall=function(t){return e.clone(un(un({},e._zod.def),{},{catchall:t}))},e.passthrough=function(){return e.clone(un(un({},e._zod.def),{},{catchall:yo()}))},e.loose=function(){return e.clone(un(un({},e._zod.def),{},{catchall:yo()}))},e.strict=function(){return e.clone(un(un({},e._zod.def),{},{catchall:Fo()}))},e.strip=function(){return e.clone(un(un({},e._zod.def),{},{catchall:void 0}))},e.extend=function(t){return function(e,t){if(!vr(t))throw new Error("Invalid input to extend: expected a plain object");var n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");var r=lr(e._zod.def,{get shape(){var n=un(un({},e._zod.def.shape),t);return cr(this,"shape",n),n},checks:[]});return gr(e,r)}(e,t)},e.safeExtend=function(t){return function(e,t){if(!vr(t))throw new Error("Invalid input to safeExtend: expected a plain object");var n=un(un({},e._zod.def),{},{get shape(){var n=un(un({},e._zod.def.shape),t);return cr(this,"shape",n),n},checks:e._zod.def.checks});return gr(e,n)}(e,t)},e.merge=function(t){return function(e,t){var n=lr(e._zod.def,{get shape(){var n=un(un({},e._zod.def.shape),t._zod.def.shape);return cr(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return gr(e,n)}(e,t)},e.pick=function(t){return function(e,t){var n=e._zod.def;return gr(e,lr(e._zod.def,{get shape(){var e={};for(var r in t){if(!(r in n.shape))throw new Error('Unrecognized key: "'.concat(r,'"'));t[r]&&(e[r]=n.shape[r])}return cr(this,"shape",e),e},checks:[]}))}(e,t)},e.omit=function(t){return function(e,t){var n=e._zod.def,r=lr(e._zod.def,{get shape(){var r=un({},e._zod.def.shape);for(var u in t){if(!(u in n.shape))throw new Error('Unrecognized key: "'.concat(u,'"'));t[u]&&delete r[u]}return cr(this,"shape",r),r},checks:[]});return gr(e,r)}(e,t)},e.partial=function(){return function(e,t,n){var r=lr(t._zod.def,{get shape(){var r=t._zod.def.shape,u=un({},r);if(n)for(var a in n){if(!(a in r))throw new Error('Unrecognized key: "'.concat(a,'"'));n[a]&&(u[a]=new e({type:"optional",innerType:r[a]}))}else for(var i in r)u[i]=new e({type:"optional",innerType:r[i]});return cr(this,"shape",u),u},checks:[]});return gr(t,r)}(Ro,e,arguments.length<=0?void 0:arguments[0])},e.required=function(){return function(e,t,n){var r=lr(t._zod.def,{get shape(){var r=t._zod.def.shape,u=un({},r);if(n)for(var a in n){if(!(a in u))throw new Error('Unrecognized key: "'.concat(a,'"'));n[a]&&(u[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(var i in r)u[i]=new e({type:"nonoptional",innerType:r[i]});return cr(this,"shape",u),u},checks:[]});return gr(t,r)}(Uo,e,arguments.length<=0?void 0:arguments[0])}}));function ko(e,t){var n=un({type:"object",get shape(){return cr(this,"shape",e?sr(e):{}),this.shape}},Fr(t));return new _o(n)}function Co(e,t){return new _o(un({type:"object",get shape(){return cr(this,"shape",sr(e)),this.shape},catchall:Fo()},Fr(t)))}function Ao(e,t){return new _o(un({type:"object",get shape(){return cr(this,"shape",sr(e)),this.shape},catchall:yo()},Fr(t)))}var wo=Gn("ZodUnion",(function(e,t){_a.init(e,t),zi.init(e,t),e.options=t.options}));function xo(e,t){return new wo(un({type:"union",options:e},Fr(t)))}var So=Gn("ZodDiscriminatedUnion",(function(e,t){wo.init(e,t),ka.init(e,t)})),Bo=Gn("ZodIntersection",(function(e,t){Ca.init(e,t),zi.init(e,t)})),Oo=Gn("ZodRecord",(function(e,t){xa.init(e,t),zi.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}));function Io(e,t,n){return new Oo(un({type:"record",keyType:e,valueType:t},Fr(n)))}var To=Gn("ZodEnum",(function(e,t){Sa.init(e,t),zi.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);var n=new Set(Object.keys(t.entries));e.extract=function(e,r){var u,a={},i=Qt(e);try{for(i.s();!(u=i.n()).done;){var o=u.value;if(!n.has(o))throw new Error("Key ".concat(o," not found in enum"));a[o]=t.entries[o]}}catch(e){i.e(e)}finally{i.f()}return new To(un(un(un({},t),{},{checks:[]},Fr(r)),{},{entries:a}))},e.exclude=function(e,r){var u,a=un({},t.entries),i=Qt(e);try{for(i.s();!(u=i.n()).done;){var o=u.value;if(!n.has(o))throw new Error("Key ".concat(o," not found in enum"));delete a[o]}}catch(e){i.e(e)}finally{i.f()}return new To(un(un(un({},t),{},{checks:[]},Fr(r)),{},{entries:a}))}}));function Po(e,t){var n=Array.isArray(e)?Object.fromEntries(e.map((function(e){return[e,e]}))):e;return new To(un({type:"enum",entries:n},Fr(t)))}var jo=Gn("ZodLiteral",(function(e,t){Ba.init(e,t),zi.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get:function(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}));function No(e,t){return new jo(un({type:"literal",values:Array.isArray(e)?e:[e]},Fr(t)))}var zo=Gn("ZodTransform",(function(e,t){Oa.init(e,t),zi.init(e,t),e._zod.parse=function(n,r){if("backward"===r.direction)throw new Yn(e.constructor.name);n.addIssue=function(r){if("string"==typeof r)n.issues.push(xr(r,n.value,t));else{var u,a,i,o=r;o.fatal&&(o.continue=!1),null!==(u=o.code)&&void 0!==u||(o.code="custom"),null!==(a=o.input)&&void 0!==a||(o.input=n.value),null!==(i=o.inst)&&void 0!==i||(o.inst=e),n.issues.push(xr(o))}};var u=t.transform(n.value,n);return u instanceof Promise?u.then((function(e){return n.value=e,n})):(n.value=u,n)}})),Ro=Gn("ZodOptional",(function(e,t){Ta.init(e,t),zi.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}));function Mo(e){return new Ro({type:"optional",innerType:e})}var Zo=Gn("ZodNullable",(function(e,t){Pa.init(e,t),zi.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}));function Lo(e){return new Zo({type:"nullable",innerType:e})}var $o=Gn("ZodDefault",(function(e,t){ja.init(e,t),zi.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeDefault=e.unwrap})),qo=Gn("ZodPrefault",(function(e,t){za.init(e,t),zi.init(e,t),e.unwrap=function(){return e._zod.def.innerType}})),Uo=Gn("ZodNonOptional",(function(e,t){Ra.init(e,t),zi.init(e,t),e.unwrap=function(){return e._zod.def.innerType}})),Vo=Gn("ZodCatch",(function(e,t){Za.init(e,t),zi.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeCatch=e.unwrap})),Ho=Gn("ZodPipe",(function(e,t){La.init(e,t),zi.init(e,t),e.in=t.in,e.out=t.out}));function Wo(e,t){return new Ho({type:"pipe",in:e,out:t})}var Ko,Jo,Go=Gn("ZodReadonly",(function(e,t){qa.init(e,t),zi.init(e,t),e.unwrap=function(){return e._zod.def.innerType}})),Qo=Gn("ZodLazy",(function(e,t){Va.init(e,t),zi.init(e,t),e.unwrap=function(){return e._zod.def.getter()}})),Yo=Gn("ZodCustom",(function(e,t){Ha.init(e,t),zi.init(e,t)}));function Xo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{error:"Input not instance of ".concat(e.name)},n=new Yo(un({type:"custom",check:"custom",fn:function(t){return t instanceof e},abort:!0},Fr(t)));return n._zod.bag.Class=e,n}!function(e){e.assertEqual=function(e){},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=function(e){var t,n={},r=Qt(e);try{for(r.s();!(t=r.n()).done;){var u=t.value;n[u]=u}}catch(e){r.e(e)}finally{r.f()}return n},e.getValidEnumValues=function(t){var n,r={},u=Qt(e.objectKeys(t).filter((function(e){return"number"!=typeof t[t[e]]})));try{for(u.s();!(n=u.n()).done;){var a=n.value;r[a]=t[a]}}catch(e){u.e(e)}finally{u.f()}return e.objectValues(r)},e.objectValues=function(t){return e.objectKeys(t).map((function(e){return t[e]}))},e.objectKeys="function"==typeof Object.keys?function(e){return Object.keys(e)}:function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=function(e,t){var n,r=Qt(e);try{for(r.s();!(n=r.n()).done;){var u=n.value;if(t(u))return u}}catch(e){r.e(e)}finally{r.f()}},e.isInteger="function"==typeof Number.isInteger?function(e){return Number.isInteger(e)}:function(e){return"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e},e.joinValues=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" | ";return e.map((function(e){return"string"==typeof e?"'".concat(e,"'"):e})).join(t)},e.jsonStringifyReplacer=function(e,t){return"bigint"==typeof t?t.toString():t}}(Ko||(Ko={})),(Jo||(Jo={})).mergeShapes=function(e,t){return un(un({},e),t)};var es=Ko.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ts=function(e){switch(dn(e)){case"undefined":return es.undefined;case"string":return es.string;case"number":return Number.isNaN(e)?es.nan:es.number;case"boolean":return es.boolean;case"function":return es.function;case"bigint":return es.bigint;case"symbol":return es.symbol;case"object":return Array.isArray(e)?es.array:null===e?es.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?es.promise:"undefined"!=typeof Map&&e instanceof Map?es.map:"undefined"!=typeof Set&&e instanceof Set?es.set:"undefined"!=typeof Date&&e instanceof Date?es.date:es.object;default:return es.unknown}},ns=Ko.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"]),rs=function(){function e(t){var n;Wt(this,e),(n=Ht(this,e)).issues=[],n.addIssue=function(e){n.issues=[].concat(ln(n.issues),[e])},n.addIssues=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];n.issues=[].concat(ln(n.issues),ln(e))};var r=(this instanceof e?this.constructor:void 0).prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,r):n.__proto__=r,n.name="ZodError",n.issues=t,n}return tn(e,hn(Error)),Gt(e,[{key:"errors",get:function(){return this.issues}},{key:"format",value:function(e){var t=e||function(e){return e.message},n={_errors:[]},r=function(e){var u,a=Qt(e.issues);try{for(a.s();!(u=a.n()).done;){var i=u.value;if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else for(var o=n,s=0;s<i.path.length;){var c=i.path[s];s===i.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(i))):o[c]=o[c]||{_errors:[]},o=o[c],s++}}}catch(e){a.e(e)}finally{a.f()}};return r(this),n}},{key:"toString",value:function(){return this.message}},{key:"message",get:function(){return JSON.stringify(this.issues,Ko.jsonStringifyReplacer,2)}},{key:"isEmpty",get:function(){return 0===this.issues.length}},{key:"flatten",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.message},n={},r=[],u=Qt(this.issues);try{for(u.s();!(e=u.n()).done;){var a=e.value;if(a.path.length>0){var i=a.path[0];n[i]=n[i]||[],n[i].push(t(a))}else r.push(t(a))}}catch(e){u.e(e)}finally{u.f()}return{formErrors:r,fieldErrors:n}}},{key:"formErrors",get:function(){return this.flatten()}}],[{key:"assert",value:function(t){if(!(t instanceof e))throw new Error("Not a ZodError: ".concat(t))}}])}();rs.create=function(e){return new rs(e)};var us=function(e,t){var n;switch(e.code){case ns.invalid_type:n=e.received===es.undefined?"Required":"Expected ".concat(e.expected,", received ").concat(e.received);break;case ns.invalid_literal:n="Invalid literal value, expected ".concat(JSON.stringify(e.expected,Ko.jsonStringifyReplacer));break;case ns.unrecognized_keys:n="Unrecognized key(s) in object: ".concat(Ko.joinValues(e.keys,", "));break;case ns.invalid_union:n="Invalid input";break;case ns.invalid_union_discriminator:n="Invalid discriminator value. Expected ".concat(Ko.joinValues(e.options));break;case ns.invalid_enum_value:n="Invalid enum value. Expected ".concat(Ko.joinValues(e.options),", received '").concat(e.received,"'");break;case ns.invalid_arguments:n="Invalid function arguments";break;case ns.invalid_return_type:n="Invalid function return type";break;case ns.invalid_date:n="Invalid date";break;case ns.invalid_string:"object"===dn(e.validation)?"includes"in e.validation?(n='Invalid input: must include "'.concat(e.validation.includes,'"'),"number"==typeof e.validation.position&&(n="".concat(n," at one or more positions greater than or equal to ").concat(e.validation.position))):"startsWith"in e.validation?n='Invalid input: must start with "'.concat(e.validation.startsWith,'"'):"endsWith"in e.validation?n='Invalid input: must end with "'.concat(e.validation.endsWith,'"'):Ko.assertNever(e.validation):n="regex"!==e.validation?"Invalid ".concat(e.validation):"Invalid";break;case ns.too_small:n="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)"):"number"===e.type||"bigint"===e.type?"Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum):"date"===e.type?"Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum))):"Invalid input";break;case ns.too_big:n="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)"):"number"===e.type?"Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"bigint"===e.type?"BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"date"===e.type?"Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum))):"Invalid input";break;case ns.custom:n="Invalid input";break;case ns.invalid_intersection_types:n="Intersection results could not be merged";break;case ns.not_multiple_of:n="Number must be a multiple of ".concat(e.multipleOf);break;case ns.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ko.assertNever(e)}return{message:n}},as=us;function is(){return as}var os=function(e){var t=e.data,n=e.path,r=e.errorMaps,u=e.issueData,a=[].concat(ln(n),ln(u.path||[])),i=un(un({},u),{},{path:a});if(void 0!==u.message)return un(un({},u),{},{path:a,message:u.message});var o,s="",c=r.filter((function(e){return!!e})).slice().reverse(),l=Qt(c);try{for(l.s();!(o=l.n()).done;)s=(0,o.value)(i,{data:t,defaultError:s}).message}catch(e){l.e(e)}finally{l.f()}return un(un({},u),{},{path:a,message:s})};function ss(e,t){var n=is(),r=os({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===us?void 0:us].filter((function(e){return!!e}))});e.common.issues.push(r)}var cs,ls=function(){function e(){Wt(this,e),this.value="valid"}return Gt(e,[{key:"dirty",value:function(){"valid"===this.value&&(this.value="dirty")}},{key:"abort",value:function(){"aborted"!==this.value&&(this.value="aborted")}}],[{key:"mergeArray",value:function(e,t){var n,r=[],u=Qt(t);try{for(u.s();!(n=u.n()).done;){var a=n.value;if("aborted"===a.status)return fs;"dirty"===a.status&&e.dirty(),r.push(a.value)}}catch(e){u.e(e)}finally{u.f()}return{status:e.value,value:r}}},{key:"mergeObjectAsync",value:(t=Vt(on().mark((function t(n,r){var u,a,i,o,s,c;return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:u=[],a=Qt(r),t.prev=2,a.s();case 4:if((i=a.n()).done){t.next=15;break}return o=i.value,t.next=8,o.key;case 8:return s=t.sent,t.next=11,o.value;case 11:c=t.sent,u.push({key:s,value:c});case 13:t.next=4;break;case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(2),a.e(t.t0);case 20:return t.prev=20,a.f(),t.finish(20);case 23:return t.abrupt("return",e.mergeObjectSync(n,u));case 24:case"end":return t.stop()}}),t,null,[[2,17,20,23]])}))),function(e,n){return t.apply(this,arguments)})},{key:"mergeObjectSync",value:function(e,t){var n,r={},u=Qt(t);try{for(u.s();!(n=u.n()).done;){var a=n.value,i=a.key,o=a.value;if("aborted"===i.status)return fs;if("aborted"===o.status)return fs;"dirty"===i.status&&e.dirty(),"dirty"===o.status&&e.dirty(),"__proto__"===i.value||void 0===o.value&&!a.alwaysSet||(r[i.value]=o.value)}}catch(e){u.e(e)}finally{u.f()}return{status:e.value,value:r}}}]);var t}(),fs=Object.freeze({status:"aborted"}),ds=function(e){return{status:"dirty",value:e}},ps=function(e){return{status:"valid",value:e}},hs=function(e){return"aborted"===e.status},vs=function(e){return"dirty"===e.status},ms=function(e){return"valid"===e.status},Ds=function(e){return"undefined"!=typeof Promise&&e instanceof Promise};!function(e){e.errToObj=function(e){return"string"==typeof e?{message:e}:e||{}},e.toString=function(e){return"string"==typeof e?e:null==e?void 0:e.message}}(cs||(cs={}));var ys=Gt((function e(t,n,r,u){Wt(this,e),this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=u}),[{key:"path",get:function(){var e,t;return this._cachedPath.length||(Array.isArray(this._key)?(e=this._cachedPath).push.apply(e,ln(this._path).concat(ln(this._key))):(t=this._cachedPath).push.apply(t,ln(this._path).concat([this._key]))),this._cachedPath}}]),gs=function(e,t){if(ms(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;var t=new rs(e.common.issues);return this._error=t,this._error}}};function Fs(e){if(!e)return{};var t=e.errorMap,n=e.invalid_type_error,r=e.required_error,u=e.description;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:u}:{errorMap:function(t,u){var a,i,o=e.message;return"invalid_enum_value"===t.code?{message:null!=o?o:u.defaultError}:void 0===u.data?{message:null!==(i=null!=o?o:r)&&void 0!==i?i:u.defaultError}:"invalid_type"!==t.code?{message:u.defaultError}:{message:null!==(a=null!=o?o:n)&&void 0!==a?a:u.defaultError}},description:u}}var Es,bs=function(){return Gt((function e(t){var n=this;Wt(this,e),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:function(e){return n["~validate"](e)}}}),[{key:"description",get:function(){return this._def.description}},{key:"_getType",value:function(e){return ts(e.data)}},{key:"_getOrReturnCtx",value:function(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ts(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}},{key:"_processInputParams",value:function(e){return{status:new ls,ctx:{common:e.parent.common,data:e.data,parsedType:ts(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}},{key:"_parseSync",value:function(e){var t=this._parse(e);if(Ds(t))throw new Error("Synchronous parse encountered promise.");return t}},{key:"_parseAsync",value:function(e){var t=this._parse(e);return Promise.resolve(t)}},{key:"parse",value:function(e,t){var n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}},{key:"safeParse",value:function(e,t){var n,r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ts(e)},u=this._parseSync({data:e,path:r.path,parent:r});return gs(r,u)}},{key:"~validate",value:function(e){var t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ts(e)};if(!this["~standard"].async)try{var n=this._parseSync({data:e,path:[],parent:t});return ms(n)?{value:n.value}:{issues:t.common.issues}}catch(e){var r;null!=e&&null!==(r=e.message)&&void 0!==r&&null!==(r=r.toLowerCase())&&void 0!==r&&r.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((function(e){return ms(e)?{value:e.value}:{issues:t.common.issues}}))}},{key:"parseAsync",value:(e=Vt(on().mark((function e(t,n){var r;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.safeParseAsync(t,n);case 2:if(!(r=e.sent).success){e.next=5;break}return e.abrupt("return",r.data);case 5:throw r.error;case 6:case"end":return e.stop()}}),e,this)}))),function(t,n){return e.apply(this,arguments)})},{key:"safeParseAsync",value:function(){var e=Vt(on().mark((function e(t,n){var r,u,a;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={common:{issues:[],contextualErrorMap:null==n?void 0:n.errorMap,async:!0},path:(null==n?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ts(t)},u=this._parse({data:t,path:r.path,parent:r}),e.next=4,Ds(u)?u:Promise.resolve(u);case 4:return a=e.sent,e.abrupt("return",gs(r,a));case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"refine",value:function(e,t){return this._refinement((function(n,r){var u=e(n),a=function(){return r.addIssue(un({code:ns.custom},function(e){return"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t}(n)))};return"undefined"!=typeof Promise&&u instanceof Promise?u.then((function(e){return!!e||(a(),!1)})):!!u||(a(),!1)}))}},{key:"refinement",value:function(e,t){return this._refinement((function(n,r){return!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)}))}},{key:"_refinement",value:function(e){return new Ec({schema:this,typeName:wc.ZodEffects,effect:{type:"refinement",refinement:e}})}},{key:"superRefine",value:function(e){return this._refinement(e)}},{key:"optional",value:function(){return bc.create(this,this._def)}},{key:"nullable",value:function(){return _c.create(this,this._def)}},{key:"nullish",value:function(){return this.nullable().optional()}},{key:"array",value:function(){return nc.create(this)}},{key:"promise",value:function(){return Fc.create(this,this._def)}},{key:"or",value:function(e){return ac.create([this,e],this._def)}},{key:"and",value:function(e){return cc.create(this,e,this._def)}},{key:"transform",value:function(e){return new Ec(un(un({},Fs(this._def)),{},{schema:this,typeName:wc.ZodEffects,effect:{type:"transform",transform:e}}))}},{key:"default",value:function(e){var t="function"==typeof e?e:function(){return e};return new kc(un(un({},Fs(this._def)),{},{innerType:this,defaultValue:t,typeName:wc.ZodDefault}))}},{key:"brand",value:function(){return new xc(un({typeName:wc.ZodBranded,type:this},Fs(this._def)))}},{key:"catch",value:function(e){var t="function"==typeof e?e:function(){return e};return new Cc(un(un({},Fs(this._def)),{},{innerType:this,catchValue:t,typeName:wc.ZodCatch}))}},{key:"describe",value:function(e){return new this.constructor(un(un({},this._def),{},{description:e}))}},{key:"pipe",value:function(e){return Sc.create(this,e)}},{key:"readonly",value:function(){return Bc.create(this)}},{key:"isOptional",value:function(){return this.safeParse(void 0).success}},{key:"isNullable",value:function(){return this.safeParse(null).success}}]);var e}(),_s=/^c[^\s-]{8,}$/i,ks=/^[0-9a-z]+$/,Cs=/^[0-9A-HJKMNP-TV-Z]{26}$/i,As=/^[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,ws=/^[a-z0-9_-]{21}$/i,xs=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ss=/^[-+]?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)?)??$/,Bs=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Os=/^(?:(?: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])$/,Is=/^(?:(?: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])$/,Ts=/^(([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]))$/,Ps=/^(([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])$/,js=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ns=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,zs="((\\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])))",Rs=new RegExp("^".concat(zs,"$"));function Ms(e){var t="[0-5]\\d";e.precision?t="".concat(t,"\\.\\d{").concat(e.precision,"}"):null==e.precision&&(t="".concat(t,"(\\.\\d+)?"));var n=e.precision?"+":"?";return"([01]\\d|2[0-3]):[0-5]\\d(:".concat(t,")").concat(n)}function Zs(e){var t="".concat(zs,"T").concat(Ms(e)),n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t="".concat(t,"(").concat(n.join("|"),")"),new RegExp("^".concat(t,"$"))}function Ls(e,t){return!("v4"!==t&&t||!Os.test(e))||!("v6"!==t&&t||!Ts.test(e))}function $s(e,t){if(!xs.test(e))return!1;try{var n=cn(e.split("."),1)[0];if(!n)return!1;var r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),u=JSON.parse(atob(r));return!("object"!==dn(u)||null===u||"typ"in u&&"JWT"!==(null==u?void 0:u.typ)||!u.alg||t&&u.alg!==t)}catch(e){return!1}}function qs(e,t){return!("v4"!==t&&t||!Is.test(e))||!("v6"!==t&&t||!Ps.test(e))}var Us=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==es.string){var t=this._getOrReturnCtx(e);return ss(t,{code:ns.invalid_type,expected:es.string,received:t.parsedType}),fs}var n,r=new ls,u=void 0,a=Qt(this._def.checks);try{for(a.s();!(n=a.n()).done;){var i=n.value;if("min"===i.kind)e.data.length<i.value&&(ss(u=this._getOrReturnCtx(e,u),{code:ns.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if("max"===i.kind)e.data.length>i.value&&(ss(u=this._getOrReturnCtx(e,u),{code:ns.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if("length"===i.kind){var o=e.data.length>i.value,s=e.data.length<i.value;(o||s)&&(u=this._getOrReturnCtx(e,u),o?ss(u,{code:ns.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ss(u,{code:ns.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if("email"===i.kind)Bs.test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{validation:"email",code:ns.invalid_string,message:i.message}),r.dirty());else if("emoji"===i.kind)Es||(Es=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Es.test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{validation:"emoji",code:ns.invalid_string,message:i.message}),r.dirty());else if("uuid"===i.kind)As.test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{validation:"uuid",code:ns.invalid_string,message:i.message}),r.dirty());else if("nanoid"===i.kind)ws.test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{validation:"nanoid",code:ns.invalid_string,message:i.message}),r.dirty());else if("cuid"===i.kind)_s.test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{validation:"cuid",code:ns.invalid_string,message:i.message}),r.dirty());else if("cuid2"===i.kind)ks.test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{validation:"cuid2",code:ns.invalid_string,message:i.message}),r.dirty());else if("ulid"===i.kind)Cs.test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{validation:"ulid",code:ns.invalid_string,message:i.message}),r.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(t){ss(u=this._getOrReturnCtx(e,u),{validation:"url",code:ns.invalid_string,message:i.message}),r.dirty()}else"regex"===i.kind?(i.regex.lastIndex=0,i.regex.test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{validation:"regex",code:ns.invalid_string,message:i.message}),r.dirty())):"trim"===i.kind?e.data=e.data.trim():"includes"===i.kind?e.data.includes(i.value,i.position)||(ss(u=this._getOrReturnCtx(e,u),{code:ns.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):"toLowerCase"===i.kind?e.data=e.data.toLowerCase():"toUpperCase"===i.kind?e.data=e.data.toUpperCase():"startsWith"===i.kind?e.data.startsWith(i.value)||(ss(u=this._getOrReturnCtx(e,u),{code:ns.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):"endsWith"===i.kind?e.data.endsWith(i.value)||(ss(u=this._getOrReturnCtx(e,u),{code:ns.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):"datetime"===i.kind?Zs(i).test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{code:ns.invalid_string,validation:"datetime",message:i.message}),r.dirty()):"date"===i.kind?Rs.test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{code:ns.invalid_string,validation:"date",message:i.message}),r.dirty()):"time"===i.kind?new RegExp("^".concat(Ms(i),"$")).test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{code:ns.invalid_string,validation:"time",message:i.message}),r.dirty()):"duration"===i.kind?Ss.test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{validation:"duration",code:ns.invalid_string,message:i.message}),r.dirty()):"ip"===i.kind?Ls(e.data,i.version)||(ss(u=this._getOrReturnCtx(e,u),{validation:"ip",code:ns.invalid_string,message:i.message}),r.dirty()):"jwt"===i.kind?$s(e.data,i.alg)||(ss(u=this._getOrReturnCtx(e,u),{validation:"jwt",code:ns.invalid_string,message:i.message}),r.dirty()):"cidr"===i.kind?qs(e.data,i.version)||(ss(u=this._getOrReturnCtx(e,u),{validation:"cidr",code:ns.invalid_string,message:i.message}),r.dirty()):"base64"===i.kind?js.test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{validation:"base64",code:ns.invalid_string,message:i.message}),r.dirty()):"base64url"===i.kind?Ns.test(e.data)||(ss(u=this._getOrReturnCtx(e,u),{validation:"base64url",code:ns.invalid_string,message:i.message}),r.dirty()):Ko.assertNever(i)}}catch(e){a.e(e)}finally{a.f()}return{status:r.value,value:e.data}}},{key:"_regex",value:function(e,t,n){return this.refinement((function(t){return e.test(t)}),un({validation:t,code:ns.invalid_string},cs.errToObj(n)))}},{key:"_addCheck",value:function(t){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[t])}))}},{key:"email",value:function(e){return this._addCheck(un({kind:"email"},cs.errToObj(e)))}},{key:"url",value:function(e){return this._addCheck(un({kind:"url"},cs.errToObj(e)))}},{key:"emoji",value:function(e){return this._addCheck(un({kind:"emoji"},cs.errToObj(e)))}},{key:"uuid",value:function(e){return this._addCheck(un({kind:"uuid"},cs.errToObj(e)))}},{key:"nanoid",value:function(e){return this._addCheck(un({kind:"nanoid"},cs.errToObj(e)))}},{key:"cuid",value:function(e){return this._addCheck(un({kind:"cuid"},cs.errToObj(e)))}},{key:"cuid2",value:function(e){return this._addCheck(un({kind:"cuid2"},cs.errToObj(e)))}},{key:"ulid",value:function(e){return this._addCheck(un({kind:"ulid"},cs.errToObj(e)))}},{key:"base64",value:function(e){return this._addCheck(un({kind:"base64"},cs.errToObj(e)))}},{key:"base64url",value:function(e){return this._addCheck(un({kind:"base64url"},cs.errToObj(e)))}},{key:"jwt",value:function(e){return this._addCheck(un({kind:"jwt"},cs.errToObj(e)))}},{key:"ip",value:function(e){return this._addCheck(un({kind:"ip"},cs.errToObj(e)))}},{key:"cidr",value:function(e){return this._addCheck(un({kind:"cidr"},cs.errToObj(e)))}},{key:"datetime",value:function(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck(un({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n},cs.errToObj(null==e?void 0:e.message)))}},{key:"date",value:function(e){return this._addCheck({kind:"date",message:e})}},{key:"time",value:function(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck(un({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision},cs.errToObj(null==e?void 0:e.message)))}},{key:"duration",value:function(e){return this._addCheck(un({kind:"duration"},cs.errToObj(e)))}},{key:"regex",value:function(e,t){return this._addCheck(un({kind:"regex",regex:e},cs.errToObj(t)))}},{key:"includes",value:function(e,t){return this._addCheck(un({kind:"includes",value:e,position:null==t?void 0:t.position},cs.errToObj(null==t?void 0:t.message)))}},{key:"startsWith",value:function(e,t){return this._addCheck(un({kind:"startsWith",value:e},cs.errToObj(t)))}},{key:"endsWith",value:function(e,t){return this._addCheck(un({kind:"endsWith",value:e},cs.errToObj(t)))}},{key:"min",value:function(e,t){return this._addCheck(un({kind:"min",value:e},cs.errToObj(t)))}},{key:"max",value:function(e,t){return this._addCheck(un({kind:"max",value:e},cs.errToObj(t)))}},{key:"length",value:function(e,t){return this._addCheck(un({kind:"length",value:e},cs.errToObj(t)))}},{key:"nonempty",value:function(e){return this.min(1,cs.errToObj(e))}},{key:"trim",value:function(){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[{kind:"trim"}])}))}},{key:"toLowerCase",value:function(){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[{kind:"toLowerCase"}])}))}},{key:"toUpperCase",value:function(){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[{kind:"toUpperCase"}])}))}},{key:"isDatetime",get:function(){return!!this._def.checks.find((function(e){return"datetime"===e.kind}))}},{key:"isDate",get:function(){return!!this._def.checks.find((function(e){return"date"===e.kind}))}},{key:"isTime",get:function(){return!!this._def.checks.find((function(e){return"time"===e.kind}))}},{key:"isDuration",get:function(){return!!this._def.checks.find((function(e){return"duration"===e.kind}))}},{key:"isEmail",get:function(){return!!this._def.checks.find((function(e){return"email"===e.kind}))}},{key:"isURL",get:function(){return!!this._def.checks.find((function(e){return"url"===e.kind}))}},{key:"isEmoji",get:function(){return!!this._def.checks.find((function(e){return"emoji"===e.kind}))}},{key:"isUUID",get:function(){return!!this._def.checks.find((function(e){return"uuid"===e.kind}))}},{key:"isNANOID",get:function(){return!!this._def.checks.find((function(e){return"nanoid"===e.kind}))}},{key:"isCUID",get:function(){return!!this._def.checks.find((function(e){return"cuid"===e.kind}))}},{key:"isCUID2",get:function(){return!!this._def.checks.find((function(e){return"cuid2"===e.kind}))}},{key:"isULID",get:function(){return!!this._def.checks.find((function(e){return"ulid"===e.kind}))}},{key:"isIP",get:function(){return!!this._def.checks.find((function(e){return"ip"===e.kind}))}},{key:"isCIDR",get:function(){return!!this._def.checks.find((function(e){return"cidr"===e.kind}))}},{key:"isBase64",get:function(){return!!this._def.checks.find((function(e){return"base64"===e.kind}))}},{key:"isBase64url",get:function(){return!!this._def.checks.find((function(e){return"base64url"===e.kind}))}},{key:"minLength",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"maxLength",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.value<t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}}])}();Us.create=function(e){var t;return new Us(un({checks:[],typeName:wc.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},Fs(e)))};var Vs=function(){function e(){var t;return Wt(this,e),(t=Ht(this,e,arguments)).min=t.gte,t.max=t.lte,t.step=t.multipleOf,t}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==es.number){var t=this._getOrReturnCtx(e);return ss(t,{code:ns.invalid_type,expected:es.number,received:t.parsedType}),fs}var n,r,u,a,i,o,s=void 0,c=new ls,l=Qt(this._def.checks);try{for(l.s();!(n=l.n()).done;){var f=n.value;"int"===f.kind?Ko.isInteger(e.data)||(ss(s=this._getOrReturnCtx(e,s),{code:ns.invalid_type,expected:"integer",received:"float",message:f.message}),c.dirty()):"min"===f.kind?(f.inclusive?e.data<f.value:e.data<=f.value)&&(ss(s=this._getOrReturnCtx(e,s),{code:ns.too_small,minimum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),c.dirty()):"max"===f.kind?(f.inclusive?e.data>f.value:e.data>=f.value)&&(ss(s=this._getOrReturnCtx(e,s),{code:ns.too_big,maximum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),c.dirty()):"multipleOf"===f.kind?0!=(r=e.data,u=f.value,void 0,void 0,void 0,o=(a=(r.toString().split(".")[1]||"").length)>(i=(u.toString().split(".")[1]||"").length)?a:i,Number.parseInt(r.toFixed(o).replace(".",""))%Number.parseInt(u.toFixed(o).replace(".",""))/Math.pow(10,o))&&(ss(s=this._getOrReturnCtx(e,s),{code:ns.not_multiple_of,multipleOf:f.value,message:f.message}),c.dirty()):"finite"===f.kind?Number.isFinite(e.data)||(ss(s=this._getOrReturnCtx(e,s),{code:ns.not_finite,message:f.message}),c.dirty()):Ko.assertNever(f)}}catch(e){l.e(e)}finally{l.f()}return{status:c.value,value:e.data}}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,cs.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,cs.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,cs.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,cs.toString(t))}},{key:"setLimit",value:function(t,n,r,u){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[{kind:t,value:n,inclusive:r,message:cs.toString(u)}])}))}},{key:"_addCheck",value:function(t){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[t])}))}},{key:"int",value:function(e){return this._addCheck({kind:"int",message:cs.toString(e)})}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:cs.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:cs.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:cs.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:cs.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:cs.toString(t)})}},{key:"finite",value:function(e){return this._addCheck({kind:"finite",message:cs.toString(e)})}},{key:"safe",value:function(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:cs.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:cs.toString(e)})}},{key:"minValue",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"maxValue",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.value<t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"isInt",get:function(){return!!this._def.checks.find((function(e){return"int"===e.kind||"multipleOf"===e.kind&&Ko.isInteger(e.value)}))}},{key:"isFinite",get:function(){var e,t=null,n=null,r=Qt(this._def.checks);try{for(r.s();!(e=r.n()).done;){var u=e.value;if("finite"===u.kind||"int"===u.kind||"multipleOf"===u.kind)return!0;"min"===u.kind?(null===n||u.value>n)&&(n=u.value):"max"===u.kind&&(null===t||u.value<t)&&(t=u.value)}}catch(e){r.e(e)}finally{r.f()}return Number.isFinite(n)&&Number.isFinite(t)}}])}();Vs.create=function(e){return new Vs(un({checks:[],typeName:wc.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1},Fs(e)))};var Hs=function(){function e(){var t;return Wt(this,e),(t=Ht(this,e,arguments)).min=t.gte,t.max=t.lte,t}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==es.bigint)return this._getInvalidInput(e);var t,n=void 0,r=new ls,u=Qt(this._def.checks);try{for(u.s();!(t=u.n()).done;){var a=t.value;"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(ss(n=this._getOrReturnCtx(e,n),{code:ns.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(ss(n=this._getOrReturnCtx(e,n),{code:ns.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):"multipleOf"===a.kind?e.data%a.value!==BigInt(0)&&(ss(n=this._getOrReturnCtx(e,n),{code:ns.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):Ko.assertNever(a)}}catch(e){u.e(e)}finally{u.f()}return{status:r.value,value:e.data}}},{key:"_getInvalidInput",value:function(e){var t=this._getOrReturnCtx(e);return ss(t,{code:ns.invalid_type,expected:es.bigint,received:t.parsedType}),fs}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,cs.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,cs.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,cs.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,cs.toString(t))}},{key:"setLimit",value:function(t,n,r,u){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[{kind:t,value:n,inclusive:r,message:cs.toString(u)}])}))}},{key:"_addCheck",value:function(t){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[t])}))}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:cs.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:cs.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:cs.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:cs.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:cs.toString(t)})}},{key:"minValue",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"maxValue",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.value<t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}}])}();Hs.create=function(e){var t;return new Hs(un({checks:[],typeName:wc.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},Fs(e)))};var Ws=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==es.boolean){var t=this._getOrReturnCtx(e);return ss(t,{code:ns.invalid_type,expected:es.boolean,received:t.parsedType}),fs}return ps(e.data)}}])}();Ws.create=function(e){return new Ws(un({typeName:wc.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1},Fs(e)))};var Ks=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==es.date){var t=this._getOrReturnCtx(e);return ss(t,{code:ns.invalid_type,expected:es.date,received:t.parsedType}),fs}if(Number.isNaN(e.data.getTime()))return ss(this._getOrReturnCtx(e),{code:ns.invalid_date}),fs;var n,r=new ls,u=void 0,a=Qt(this._def.checks);try{for(a.s();!(n=a.n()).done;){var i=n.value;"min"===i.kind?e.data.getTime()<i.value&&(ss(u=this._getOrReturnCtx(e,u),{code:ns.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(ss(u=this._getOrReturnCtx(e,u),{code:ns.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ko.assertNever(i)}}catch(e){a.e(e)}finally{a.f()}return{status:r.value,value:new Date(e.data.getTime())}}},{key:"_addCheck",value:function(t){return new e(un(un({},this._def),{},{checks:[].concat(ln(this._def.checks),[t])}))}},{key:"min",value:function(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:cs.toString(t)})}},{key:"max",value:function(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:cs.toString(t)})}},{key:"minDate",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return null!=t?new Date(t):null}},{key:"maxDate",get:function(){var e,t=null,n=Qt(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.value<t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return null!=t?new Date(t):null}}])}();Ks.create=function(e){return new Ks(un({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:wc.ZodDate},Fs(e)))};var Js=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){if(this._getType(e)!==es.symbol){var t=this._getOrReturnCtx(e);return ss(t,{code:ns.invalid_type,expected:es.symbol,received:t.parsedType}),fs}return ps(e.data)}}])}();Js.create=function(e){return new Js(un({typeName:wc.ZodSymbol},Fs(e)))};var Gs=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){if(this._getType(e)!==es.undefined){var t=this._getOrReturnCtx(e);return ss(t,{code:ns.invalid_type,expected:es.undefined,received:t.parsedType}),fs}return ps(e.data)}}])}();Gs.create=function(e){return new Gs(un({typeName:wc.ZodUndefined},Fs(e)))};var Qs=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){if(this._getType(e)!==es.null){var t=this._getOrReturnCtx(e);return ss(t,{code:ns.invalid_type,expected:es.null,received:t.parsedType}),fs}return ps(e.data)}}])}();Qs.create=function(e){return new Qs(un({typeName:wc.ZodNull},Fs(e)))};var Ys=function(){function e(){var t;return Wt(this,e),(t=Ht(this,e,arguments))._any=!0,t}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){return ps(e.data)}}])}();Ys.create=function(e){return new Ys(un({typeName:wc.ZodAny},Fs(e)))};var Xs=function(){function e(){var t;return Wt(this,e),(t=Ht(this,e,arguments))._unknown=!0,t}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){return ps(e.data)}}])}();Xs.create=function(e){return new Xs(un({typeName:wc.ZodUnknown},Fs(e)))};var ec=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=this._getOrReturnCtx(e);return ss(t,{code:ns.invalid_type,expected:es.never,received:t.parsedType}),fs}}])}();ec.create=function(e){return new ec(un({typeName:wc.ZodNever},Fs(e)))};var tc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){if(this._getType(e)!==es.undefined){var t=this._getOrReturnCtx(e);return ss(t,{code:ns.invalid_type,expected:es.void,received:t.parsedType}),fs}return ps(e.data)}}])}();tc.create=function(e){return new tc(un({typeName:wc.ZodVoid},Fs(e)))};var nc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.ctx,r=t.status,u=this._def;if(n.parsedType!==es.array)return ss(n,{code:ns.invalid_type,expected:es.array,received:n.parsedType}),fs;if(null!==u.exactLength){var a=n.data.length>u.exactLength.value,i=n.data.length<u.exactLength.value;(a||i)&&(ss(n,{code:a?ns.too_big:ns.too_small,minimum:i?u.exactLength.value:void 0,maximum:a?u.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:u.exactLength.message}),r.dirty())}if(null!==u.minLength&&n.data.length<u.minLength.value&&(ss(n,{code:ns.too_small,minimum:u.minLength.value,type:"array",inclusive:!0,exact:!1,message:u.minLength.message}),r.dirty()),null!==u.maxLength&&n.data.length>u.maxLength.value&&(ss(n,{code:ns.too_big,maximum:u.maxLength.value,type:"array",inclusive:!0,exact:!1,message:u.maxLength.message}),r.dirty()),n.common.async)return Promise.all(ln(n.data).map((function(e,t){return u.type._parseAsync(new ys(n,e,n.path,t))}))).then((function(e){return ls.mergeArray(r,e)}));var o=ln(n.data).map((function(e,t){return u.type._parseSync(new ys(n,e,n.path,t))}));return ls.mergeArray(r,o)}},{key:"element",get:function(){return this._def.type}},{key:"min",value:function(t,n){return new e(un(un({},this._def),{},{minLength:{value:t,message:cs.toString(n)}}))}},{key:"max",value:function(t,n){return new e(un(un({},this._def),{},{maxLength:{value:t,message:cs.toString(n)}}))}},{key:"length",value:function(t,n){return new e(un(un({},this._def),{},{exactLength:{value:t,message:cs.toString(n)}}))}},{key:"nonempty",value:function(e){return this.min(1,e)}}])}();function rc(e){if(e instanceof uc){var t={};for(var n in e.shape){var r=e.shape[n];t[n]=bc.create(rc(r))}return new uc(un(un({},e._def),{},{shape:function(){return t}}))}return e instanceof nc?new nc(un(un({},e._def),{},{type:rc(e.element)})):e instanceof bc?bc.create(rc(e.unwrap())):e instanceof _c?_c.create(rc(e.unwrap())):e instanceof lc?lc.create(e.items.map((function(e){return rc(e)}))):e}nc.create=function(e,t){return new nc(un({type:e,minLength:null,maxLength:null,exactLength:null,typeName:wc.ZodArray},Fs(t)))};var uc=function(){function e(){var t;return Wt(this,e),(t=Ht(this,e,arguments))._cached=null,t.nonstrict=t.passthrough,t.augment=t.extend,t}return tn(e,bs),Gt(e,[{key:"_getCached",value:function(){if(null!==this._cached)return this._cached;var e=this._def.shape(),t=Ko.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}},{key:"_parse",value:function(e){if(this._getType(e)!==es.object){var t=this._getOrReturnCtx(e);return ss(t,{code:ns.invalid_type,expected:es.object,received:t.parsedType}),fs}var n=this._processInputParams(e),r=n.status,u=n.ctx,a=this._getCached(),i=a.shape,o=a.keys,s=[];if(!(this._def.catchall instanceof ec&&"strip"===this._def.unknownKeys))for(var c in u.data)o.includes(c)||s.push(c);var l,f=[],d=Qt(o);try{for(d.s();!(l=d.n()).done;){var p=l.value,h=i[p],v=u.data[p];f.push({key:{status:"valid",value:p},value:h._parse(new ys(u,v,u.path,p)),alwaysSet:p in u.data})}}catch(e){d.e(e)}finally{d.f()}if(this._def.catchall instanceof ec){var m=this._def.unknownKeys;if("passthrough"===m){var D,y=Qt(s);try{for(y.s();!(D=y.n()).done;){var g=D.value;f.push({key:{status:"valid",value:g},value:{status:"valid",value:u.data[g]}})}}catch(e){y.e(e)}finally{y.f()}}else if("strict"===m)s.length>0&&(ss(u,{code:ns.unrecognized_keys,keys:s}),r.dirty());else if("strip"!==m)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{var F,E=this._def.catchall,b=Qt(s);try{for(b.s();!(F=b.n()).done;){var _=F.value,k=u.data[_];f.push({key:{status:"valid",value:_},value:E._parse(new ys(u,k,u.path,_)),alwaysSet:_ in u.data})}}catch(e){b.e(e)}finally{b.f()}}return u.common.async?Promise.resolve().then(Vt(on().mark((function e(){var t,n,r,u,a,i;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],n=Qt(f),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=15;break}return u=r.value,e.next=8,u.key;case 8:return a=e.sent,e.next=11,u.value;case 11:i=e.sent,t.push({key:a,value:i,alwaysSet:u.alwaysSet});case 13:e.next=4;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(2),n.e(e.t0);case 20:return e.prev=20,n.f(),e.finish(20);case 23:return e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,null,[[2,17,20,23]])})))).then((function(e){return ls.mergeObjectSync(r,e)})):ls.mergeObjectSync(r,f)}},{key:"shape",get:function(){return this._def.shape()}},{key:"strict",value:function(t){var n=this;return cs.errToObj,new e(un(un({},this._def),{},{unknownKeys:"strict"},void 0!==t?{errorMap:function(e,r){var u,a,i,o,s=null!==(u=null===(a=(i=n._def).errorMap)||void 0===a?void 0:a.call(i,e,r).message)&&void 0!==u?u:r.defaultError;return"unrecognized_keys"===e.code?{message:null!==(o=cs.errToObj(t).message)&&void 0!==o?o:s}:{message:s}}}:{}))}},{key:"strip",value:function(){return new e(un(un({},this._def),{},{unknownKeys:"strip"}))}},{key:"passthrough",value:function(){return new e(un(un({},this._def),{},{unknownKeys:"passthrough"}))}},{key:"extend",value:function(t){var n=this;return new e(un(un({},this._def),{},{shape:function(){return un(un({},n._def.shape()),t)}}))}},{key:"merge",value:function(t){var n=this;return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:function(){return un(un({},n._def.shape()),t._def.shape())},typeName:wc.ZodObject})}},{key:"setKey",value:function(e,t){return this.augment(Yt({},e,t))}},{key:"catchall",value:function(t){return new e(un(un({},this._def),{},{catchall:t}))}},{key:"pick",value:function(t){var n,r={},u=Qt(Ko.objectKeys(t));try{for(u.s();!(n=u.n()).done;){var a=n.value;t[a]&&this.shape[a]&&(r[a]=this.shape[a])}}catch(e){u.e(e)}finally{u.f()}return new e(un(un({},this._def),{},{shape:function(){return r}}))}},{key:"omit",value:function(t){var n,r={},u=Qt(Ko.objectKeys(this.shape));try{for(u.s();!(n=u.n()).done;){var a=n.value;t[a]||(r[a]=this.shape[a])}}catch(e){u.e(e)}finally{u.f()}return new e(un(un({},this._def),{},{shape:function(){return r}}))}},{key:"deepPartial",value:function(){return rc(this)}},{key:"partial",value:function(t){var n,r={},u=Qt(Ko.objectKeys(this.shape));try{for(u.s();!(n=u.n()).done;){var a=n.value,i=this.shape[a];t&&!t[a]?r[a]=i:r[a]=i.optional()}}catch(e){u.e(e)}finally{u.f()}return new e(un(un({},this._def),{},{shape:function(){return r}}))}},{key:"required",value:function(t){var n,r={},u=Qt(Ko.objectKeys(this.shape));try{for(u.s();!(n=u.n()).done;){var a=n.value;if(t&&!t[a])r[a]=this.shape[a];else{for(var i=this.shape[a];i instanceof bc;)i=i._def.innerType;r[a]=i}}}catch(e){u.e(e)}finally{u.f()}return new e(un(un({},this._def),{},{shape:function(){return r}}))}},{key:"keyof",value:function(){return Dc(Ko.objectKeys(this.shape))}}])}();uc.create=function(e,t){return new uc(un({shape:function(){return e},unknownKeys:"strip",catchall:ec.create(),typeName:wc.ZodObject},Fs(t)))},uc.strictCreate=function(e,t){return new uc(un({shape:function(){return e},unknownKeys:"strict",catchall:ec.create(),typeName:wc.ZodObject},Fs(t)))},uc.lazycreate=function(e,t){return new uc(un({shape:e,unknownKeys:"strip",catchall:ec.create(),typeName:wc.ZodObject},Fs(t)))};var ac=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=this._def.options;if(t.common.async)return Promise.all(n.map(function(){var e=Vt(on().mark((function e(n){var r;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=un(un({},t),{},{common:un(un({},t.common),{},{issues:[]}),parent:null}),e.next=3,n._parseAsync({data:t.data,path:t.path,parent:r});case 3:return e.t0=e.sent,e.t1=r,e.abrupt("return",{result:e.t0,ctx:e.t1});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then((function(e){var n,r=Qt(e);try{for(r.s();!(n=r.n()).done;){var u=n.value;if("valid"===u.result.status)return u.result}}catch(e){r.e(e)}finally{r.f()}var a,i=Qt(e);try{for(i.s();!(a=i.n()).done;){var o,s=a.value;if("dirty"===s.result.status)return(o=t.common.issues).push.apply(o,ln(s.ctx.common.issues)),s.result}}catch(e){i.e(e)}finally{i.f()}var c=e.map((function(e){return new rs(e.ctx.common.issues)}));return ss(t,{code:ns.invalid_union,unionErrors:c}),fs}));var r,u,a=void 0,i=[],o=Qt(n);try{for(o.s();!(r=o.n()).done;){var s=r.value,c=un(un({},t),{},{common:un(un({},t.common),{},{issues:[]}),parent:null}),l=s._parseSync({data:t.data,path:t.path,parent:c});if("valid"===l.status)return l;"dirty"!==l.status||a||(a={result:l,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}}catch(e){o.e(e)}finally{o.f()}if(a)return(u=t.common.issues).push.apply(u,ln(a.ctx.common.issues)),a.result;var f=i.map((function(e){return new rs(e)}));return ss(t,{code:ns.invalid_union,unionErrors:f}),fs}},{key:"options",get:function(){return this._def.options}}])}();ac.create=function(e,t){return new ac(un({options:e,typeName:wc.ZodUnion},Fs(t)))};var ic=function(e){return e instanceof vc?ic(e.schema):e instanceof Ec?ic(e.innerType()):e instanceof mc?[e.value]:e instanceof yc?e.options:e instanceof gc?Ko.objectValues(e.enum):e instanceof kc?ic(e._def.innerType):e instanceof Gs?[void 0]:e instanceof Qs?[null]:e instanceof bc?[void 0].concat(ln(ic(e.unwrap()))):e instanceof _c?[null].concat(ln(ic(e.unwrap()))):e instanceof xc||e instanceof Bc?ic(e.unwrap()):e instanceof Cc?ic(e._def.innerType):[]},oc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==es.object)return ss(t,{code:ns.invalid_type,expected:es.object,received:t.parsedType}),fs;var n=this.discriminator,r=t.data[n],u=this.optionsMap.get(r);return u?t.common.async?u._parseAsync({data:t.data,path:t.path,parent:t}):u._parseSync({data:t.data,path:t.path,parent:t}):(ss(t,{code:ns.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),fs)}},{key:"discriminator",get:function(){return this._def.discriminator}},{key:"options",get:function(){return this._def.options}},{key:"optionsMap",get:function(){return this._def.optionsMap}}],[{key:"create",value:function(t,n,r){var u,a=new Map,i=Qt(n);try{for(i.s();!(u=i.n()).done;){var o=u.value,s=ic(o.shape[t]);if(!s.length)throw new Error("A discriminator value for key `".concat(t,"` could not be extracted from all schema options"));var c,l=Qt(s);try{for(l.s();!(c=l.n()).done;){var f=c.value;if(a.has(f))throw new Error("Discriminator property ".concat(String(t)," has duplicate value ").concat(String(f)));a.set(f,o)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}return new e(un({typeName:wc.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a},Fs(r)))}}])}();function sc(e,t){var n=ts(e),r=ts(t);if(e===t)return{valid:!0,data:e};if(n===es.object&&r===es.object){var u,a=Ko.objectKeys(t),i=Ko.objectKeys(e).filter((function(e){return-1!==a.indexOf(e)})),o=un(un({},e),t),s=Qt(i);try{for(s.s();!(u=s.n()).done;){var c=u.value,l=sc(e[c],t[c]);if(!l.valid)return{valid:!1};o[c]=l.data}}catch(e){s.e(e)}finally{s.f()}return{valid:!0,data:o}}if(n===es.array&&r===es.array){if(e.length!==t.length)return{valid:!1};for(var f=[],d=0;d<e.length;d++){var p=sc(e[d],t[d]);if(!p.valid)return{valid:!1};f.push(p.data)}return{valid:!0,data:f}}return n===es.date&&r===es.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var cc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx,u=function(e,t){if(hs(e)||hs(t))return fs;var u=sc(e.value,t.value);return u.valid?((vs(e)||vs(t))&&n.dirty(),{status:n.value,value:u.data}):(ss(r,{code:ns.invalid_intersection_types}),fs)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((function(e){var t=cn(e,2),n=t[0],r=t[1];return u(n,r)})):u(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}])}();cc.create=function(e,t,n){return new cc(un({left:e,right:t,typeName:wc.ZodIntersection},Fs(n)))};var lc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e),r=n.status,u=n.ctx;if(u.parsedType!==es.array)return ss(u,{code:ns.invalid_type,expected:es.array,received:u.parsedType}),fs;if(u.data.length<this._def.items.length)return ss(u,{code:ns.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),fs;!this._def.rest&&u.data.length>this._def.items.length&&(ss(u,{code:ns.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());var a=ln(u.data).map((function(e,n){var r=t._def.items[n]||t._def.rest;return r?r._parse(new ys(u,e,u.path,n)):null})).filter((function(e){return!!e}));return u.common.async?Promise.all(a).then((function(e){return ls.mergeArray(r,e)})):ls.mergeArray(r,a)}},{key:"items",get:function(){return this._def.items}},{key:"rest",value:function(t){return new e(un(un({},this._def),{},{rest:t}))}}])}();lc.create=function(e,t){if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new lc(un({items:e,typeName:wc.ZodTuple,rest:null},Fs(t)))};var fc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==es.object)return ss(r,{code:ns.invalid_type,expected:es.object,received:r.parsedType}),fs;var u=[],a=this._def.keyType,i=this._def.valueType;for(var o in r.data)u.push({key:a._parse(new ys(r,o,r.path,o)),value:i._parse(new ys(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?ls.mergeObjectAsync(n,u):ls.mergeObjectSync(n,u)}},{key:"element",get:function(){return this._def.valueType}}],[{key:"create",value:function(t,n,r){return new e(n instanceof bs?un({keyType:t,valueType:n,typeName:wc.ZodRecord},Fs(r)):un({keyType:Us.create(),valueType:t,typeName:wc.ZodRecord},Fs(n)))}}])}(),dc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==es.map)return ss(r,{code:ns.invalid_type,expected:es.map,received:r.parsedType}),fs;var u=this._def.keyType,a=this._def.valueType,i=ln(r.data.entries()).map((function(e,t){var n=cn(e,2),i=n[0],o=n[1];return{key:u._parse(new ys(r,i,r.path,[t,"key"])),value:a._parse(new ys(r,o,r.path,[t,"value"]))}}));if(r.common.async){var o=new Map;return Promise.resolve().then(Vt(on().mark((function e(){var t,r,u,a,s;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Qt(i),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=17;break}return u=r.value,e.next=7,u.key;case 7:return a=e.sent,e.next=10,u.value;case 10:if(s=e.sent,"aborted"!==a.status&&"aborted"!==s.status){e.next=13;break}return e.abrupt("return",fs);case 13:"dirty"!==a.status&&"dirty"!==s.status||n.dirty(),o.set(a.value,s.value);case 15:e.next=3;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(1),t.e(e.t0);case 22:return e.prev=22,t.f(),e.finish(22);case 25:return e.abrupt("return",{status:n.value,value:o});case 26:case"end":return e.stop()}}),e,null,[[1,19,22,25]])}))))}var s,c=new Map,l=Qt(i);try{for(l.s();!(s=l.n()).done;){var f=s.value,d=f.key,p=f.value;if("aborted"===d.status||"aborted"===p.status)return fs;"dirty"!==d.status&&"dirty"!==p.status||n.dirty(),c.set(d.value,p.value)}}catch(e){l.e(e)}finally{l.f()}return{status:n.value,value:c}}}])}();dc.create=function(e,t,n){return new dc(un({valueType:t,keyType:e,typeName:wc.ZodMap},Fs(n)))};var pc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==es.set)return ss(r,{code:ns.invalid_type,expected:es.set,received:r.parsedType}),fs;var u=this._def;null!==u.minSize&&r.data.size<u.minSize.value&&(ss(r,{code:ns.too_small,minimum:u.minSize.value,type:"set",inclusive:!0,exact:!1,message:u.minSize.message}),n.dirty()),null!==u.maxSize&&r.data.size>u.maxSize.value&&(ss(r,{code:ns.too_big,maximum:u.maxSize.value,type:"set",inclusive:!0,exact:!1,message:u.maxSize.message}),n.dirty());var a=this._def.valueType;function i(e){var t,r=new Set,u=Qt(e);try{for(u.s();!(t=u.n()).done;){var a=t.value;if("aborted"===a.status)return fs;"dirty"===a.status&&n.dirty(),r.add(a.value)}}catch(e){u.e(e)}finally{u.f()}return{status:n.value,value:r}}var o=ln(r.data.values()).map((function(e,t){return a._parse(new ys(r,e,r.path,t))}));return r.common.async?Promise.all(o).then((function(e){return i(e)})):i(o)}},{key:"min",value:function(t,n){return new e(un(un({},this._def),{},{minSize:{value:t,message:cs.toString(n)}}))}},{key:"max",value:function(t,n){return new e(un(un({},this._def),{},{maxSize:{value:t,message:cs.toString(n)}}))}},{key:"size",value:function(e,t){return this.min(e,t).max(e,t)}},{key:"nonempty",value:function(e){return this.min(1,e)}}])}();pc.create=function(e,t){return new pc(un({valueType:e,minSize:null,maxSize:null,typeName:wc.ZodSet},Fs(t)))};var hc=function(){function e(){var t;return Wt(this,e),(t=Ht(this,e,arguments)).validate=t.implement,t}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==es.function)return ss(t,{code:ns.invalid_type,expected:es.function,received:t.parsedType}),fs;function n(e,n){return os({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,is(),us].filter((function(e){return!!e})),issueData:{code:ns.invalid_arguments,argumentsError:n}})}function r(e,n){return os({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,is(),us].filter((function(e){return!!e})),issueData:{code:ns.invalid_return_type,returnTypeError:n}})}var u={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof Fc){var i=this;return ps(Vt(on().mark((function e(){var t,o,s,c,l,f,d,p=arguments;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=p.length,o=new Array(t),s=0;s<t;s++)o[s]=p[s];return c=new rs([]),e.next=4,i._def.args.parseAsync(o,u).catch((function(e){throw c.addIssue(n(o,e)),c}));case 4:return l=e.sent,e.next=7,Reflect.apply(a,this,l);case 7:return f=e.sent,e.next=10,i._def.returns._def.type.parseAsync(f,u).catch((function(e){throw c.addIssue(r(f,e)),c}));case 10:return d=e.sent,e.abrupt("return",d);case 12:case"end":return e.stop()}}),e,this)}))))}var o=this;return ps((function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var s=o._def.args.safeParse(t,u);if(!s.success)throw new rs([n(t,s.error)]);var c=Reflect.apply(a,this,s.data),l=o._def.returns.safeParse(c,u);if(!l.success)throw new rs([r(c,l.error)]);return l.data}))}},{key:"parameters",value:function(){return this._def.args}},{key:"returnType",value:function(){return this._def.returns}},{key:"args",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new e(un(un({},this._def),{},{args:lc.create(n).rest(Xs.create())}))}},{key:"returns",value:function(t){return new e(un(un({},this._def),{},{returns:t}))}},{key:"implement",value:function(e){return this.parse(e)}},{key:"strictImplement",value:function(e){return this.parse(e)}}],[{key:"create",value:function(t,n,r){return new e(un({args:t||lc.create([]).rest(Xs.create()),returns:n||Xs.create(),typeName:wc.ZodFunction},Fs(r)))}}])}(),vc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"schema",get:function(){return this._def.getter()}},{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}])}();vc.create=function(e,t){return new vc(un({getter:e,typeName:wc.ZodLazy},Fs(t)))};var mc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){if(e.data!==this._def.value){var t=this._getOrReturnCtx(e);return ss(t,{received:t.data,code:ns.invalid_literal,expected:this._def.value}),fs}return{status:"valid",value:e.data}}},{key:"value",get:function(){return this._def.value}}])}();function Dc(e,t){return new yc(un({values:e,typeName:wc.ZodEnum},Fs(t)))}mc.create=function(e,t){return new mc(un({value:e,typeName:wc.ZodLiteral},Fs(t)))};var yc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){if("string"!=typeof e.data){var t=this._getOrReturnCtx(e),n=this._def.values;return ss(t,{expected:Ko.joinValues(n),received:t.parsedType,code:ns.invalid_type}),fs}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){var r=this._getOrReturnCtx(e),u=this._def.values;return ss(r,{received:r.data,code:ns.invalid_enum_value,options:u}),fs}return ps(e.data)}},{key:"options",get:function(){return this._def.values}},{key:"enum",get:function(){var e,t={},n=Qt(this._def.values);try{for(n.s();!(e=n.n()).done;){var r=e.value;t[r]=r}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"Values",get:function(){var e,t={},n=Qt(this._def.values);try{for(n.s();!(e=n.n()).done;){var r=e.value;t[r]=r}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"Enum",get:function(){var e,t={},n=Qt(this._def.values);try{for(n.s();!(e=n.n()).done;){var r=e.value;t[r]=r}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"extract",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return e.create(t,un(un({},this._def),n))}},{key:"exclude",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return e.create(this.options.filter((function(e){return!t.includes(e)})),un(un({},this._def),n))}}])}();yc.create=Dc;var gc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=Ko.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==es.string&&n.parsedType!==es.number){var r=Ko.objectValues(t);return ss(n,{expected:Ko.joinValues(r),received:n.parsedType,code:ns.invalid_type}),fs}if(this._cache||(this._cache=new Set(Ko.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){var u=Ko.objectValues(t);return ss(n,{received:n.data,code:ns.invalid_enum_value,options:u}),fs}return ps(e.data)}},{key:"enum",get:function(){return this._def.values}}])}();gc.create=function(e,t){return new gc(un({values:e,typeName:wc.ZodNativeEnum},Fs(t)))};var Fc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"unwrap",value:function(){return this._def.type}},{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e).ctx;if(n.parsedType!==es.promise&&!1===n.common.async)return ss(n,{code:ns.invalid_type,expected:es.promise,received:n.parsedType}),fs;var r=n.parsedType===es.promise?n.data:Promise.resolve(n.data);return ps(r.then((function(e){return t._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})})))}}])}();Fc.create=function(e,t){return new Fc(un({type:e,typeName:wc.ZodPromise},Fs(t)))};var Ec=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"innerType",value:function(){return this._def.schema}},{key:"sourceType",value:function(){return this._def.schema._def.typeName===wc.ZodEffects?this._def.schema.sourceType():this._def.schema}},{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e),r=n.status,u=n.ctx,a=this._def.effect||null,i={addIssue:function(e){ss(u,e),e.fatal?r.abort():r.dirty()},get path(){return u.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===a.type){var o=a.transform(u.data,i);if(u.common.async)return Promise.resolve(o).then(function(){var e=Vt(on().mark((function e(n){var a;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("aborted"!==r.value){e.next=2;break}return e.abrupt("return",fs);case 2:return e.next=4,t._def.schema._parseAsync({data:n,path:u.path,parent:u});case 4:if("aborted"!==(a=e.sent).status){e.next=7;break}return e.abrupt("return",fs);case 7:if("dirty"!==a.status){e.next=9;break}return e.abrupt("return",ds(a.value));case 9:if("dirty"!==r.value){e.next=11;break}return e.abrupt("return",ds(a.value));case 11:return e.abrupt("return",a);case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());if("aborted"===r.value)return fs;var s=this._def.schema._parseSync({data:o,path:u.path,parent:u});return"aborted"===s.status?fs:"dirty"===s.status||"dirty"===r.value?ds(s.value):s}if("refinement"===a.type){var c=function(e){var t=a.refinement(e,i);if(u.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===u.common.async){var l=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});return"aborted"===l.status?fs:("dirty"===l.status&&r.dirty(),c(l.value),{status:r.value,value:l.value})}return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then((function(e){return"aborted"===e.status?fs:("dirty"===e.status&&r.dirty(),c(e.value).then((function(){return{status:r.value,value:e.value}})))}))}if("transform"===a.type){if(!1===u.common.async){var f=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});if(!ms(f))return fs;var d=a.transform(f.value,i);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:d}}return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then((function(e){return ms(e)?Promise.resolve(a.transform(e.value,i)).then((function(e){return{status:r.value,value:e}})):fs}))}Ko.assertNever(a)}}])}();Ec.create=function(e,t,n){return new Ec(un({schema:e,typeName:wc.ZodEffects,effect:t},Fs(n)))},Ec.createWithPreprocess=function(e,t,n){return new Ec(un({schema:t,effect:{type:"preprocess",transform:e},typeName:wc.ZodEffects},Fs(n)))};var bc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){return this._getType(e)===es.undefined?ps(void 0):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}])}();bc.create=function(e,t){return new bc(un({innerType:e,typeName:wc.ZodOptional},Fs(t)))};var _c=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){return this._getType(e)===es.null?ps(null):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}])}();_c.create=function(e,t){return new _c(un({innerType:e,typeName:wc.ZodNullable},Fs(t)))};var kc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=t.data;return t.parsedType===es.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}},{key:"removeDefault",value:function(){return this._def.innerType}}])}();kc.create=function(e,t){return new kc(un({innerType:e,typeName:wc.ZodDefault,defaultValue:"function"==typeof t.default?t.default:function(){return t.default}},Fs(t)))};var Cc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e).ctx,r=un(un({},n),{},{common:un(un({},n.common),{},{issues:[]})}),u=this._def.innerType._parse({data:r.data,path:r.path,parent:un({},r)});return Ds(u)?u.then((function(e){return{status:"valid",value:"valid"===e.status?e.value:t._def.catchValue({get error(){return new rs(r.common.issues)},input:r.data})}})):{status:"valid",value:"valid"===u.status?u.value:this._def.catchValue({get error(){return new rs(r.common.issues)},input:r.data})}}},{key:"removeCatch",value:function(){return this._def.innerType}}])}();Cc.create=function(e,t){return new Cc(un({innerType:e,typeName:wc.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:function(){return t.catch}},Fs(t)))};var Ac=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){if(this._getType(e)!==es.nan){var t=this._getOrReturnCtx(e);return ss(t,{code:ns.invalid_type,expected:es.nan,received:t.parsedType}),fs}return{status:"valid",value:e.data}}}])}();Ac.create=function(e){return new Ac(un({typeName:wc.ZodNaN},Fs(e)))};var wc,xc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}},{key:"unwrap",value:function(){return this._def.type}}])}(),Sc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e),r=n.status,u=n.ctx;if(u.common.async){var a=function(){var e=Vt(on().mark((function e(){var n;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._def.in._parseAsync({data:u.data,path:u.path,parent:u});case 2:if("aborted"!==(n=e.sent).status){e.next=5;break}return e.abrupt("return",fs);case 5:if("dirty"!==n.status){e.next=10;break}return r.dirty(),e.abrupt("return",ds(n.value));case 10:return e.abrupt("return",t._def.out._parseAsync({data:n.value,path:u.path,parent:u}));case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a()}var i=this._def.in._parseSync({data:u.data,path:u.path,parent:u});return"aborted"===i.status?fs:"dirty"===i.status?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:u.path,parent:u})}}],[{key:"create",value:function(t,n){return new e({in:t,out:n,typeName:wc.ZodPipeline})}}])}(),Bc=function(){function e(){return Wt(this,e),Ht(this,e,arguments)}return tn(e,bs),Gt(e,[{key:"_parse",value:function(e){var t=this._def.innerType._parse(e),n=function(e){return ms(e)&&(e.value=Object.freeze(e.value)),e};return Ds(t)?t.then((function(e){return n(e)})):n(t)}},{key:"unwrap",value:function(){return this._def.innerType}}])}();Bc.create=function(e,t){return new Bc(un({innerType:e,typeName:wc.ZodReadonly},Fs(t)))},uc.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(wc||(wc={})),Us.create,Vs.create,Ac.create,Hs.create,Ws.create,Ks.create,Js.create,Gs.create,Qs.create,Ys.create,Xs.create,ec.create,tc.create,nc.create,uc.create,uc.strictCreate,ac.create,oc.create,cc.create,lc.create,fc.create,dc.create,pc.create,hc.create,vc.create,mc.create,yc.create,gc.create,Fc.create,Ec.create,bc.create,_c.create,Ec.createWithPreprocess,Sc.create;var Oc=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.prefix,n=e.size,r=void 0===n?16:n,u=e.alphabet,a=void 0===u?"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz":u,i=e.separator,o=void 0===i?"-":i,s=function(){for(var e=a.length,t=new Array(r),n=0;n<r;n++)t[n]=a[Math.random()*e|0];return t.join("")};if(null==t)return s;if(a.includes(o))throw new Nn({argument:"separator",message:'The separator "'.concat(o,'" must not be part of the alphabet "').concat(a,'".')});return function(){return"".concat(t).concat(o).concat(s())}},Ic=Oc(),Tc=/"__proto__"\s*:/,Pc=/"constructor"\s*:/;function jc(e){var t=JSON.parse(e);return null===t||"object"!=b(t)||!1===Tc.test(e)&&!1===Pc.test(e)?t:function(e){for(var t=[e];t.length;){var n=t;t=[];var r,u=s(n);try{for(u.s();!(r=u.n()).done;){var a=r.value;if(Object.prototype.hasOwnProperty.call(a,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(a,"constructor")&&Object.prototype.hasOwnProperty.call(a.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(var i in a){var o=a[i];o&&"object"==b(o)&&t.push(o)}}}catch(e){u.e(e)}finally{u.f()}}return e}(t)}var Nc=Symbol.for("vercel.ai.validator");function zc(e){return function(e){return"object"==b(e)&&null!==e&&Nc in e&&!0===e[Nc]&&"validate"in e}(e)?e:(t=e,n=function(){var e=r(D().mark((function e(n){var r;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t["~standard"].validate(n);case 2:return r=e.sent,e.abrupt("return",null==r.issues?{success:!0,value:r.value}:{success:!1,error:new Hn({value:n,cause:r.issues})});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),c(c({},Nc,!0),"validate",n));var t,n}function Rc(e){return Mc.apply(this,arguments)}function Mc(){return Mc=r(D().mark((function e(t){var n,r,u;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.value,r=t.schema,e.next=3,Zc({value:n,schema:r});case 3:if((u=e.sent).success){e.next=6;break}throw Hn.wrap({value:n,cause:u.error});case 6:return e.abrupt("return",u.value);case 7:case"end":return e.stop()}}),e)}))),Mc.apply(this,arguments)}function Zc(e){return Lc.apply(this,arguments)}function Lc(){return Lc=r(D().mark((function e(t){var n,r,u,a;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.value,r=t.schema,u=zc(r),e.prev=2,null!=u.validate){e.next=5;break}return e.abrupt("return",{success:!0,value:n,rawValue:n});case 5:return e.next=7,u.validate(n);case 7:return a=e.sent,e.abrupt("return",a.success?{success:!0,value:a.value,rawValue:n}:{success:!1,error:Hn.wrap({value:n,cause:a.error}),rawValue:n});case 11:return e.prev=11,e.t0=e.catch(2),e.abrupt("return",{success:!1,error:Hn.wrap({value:n,cause:e.t0}),rawValue:n});case 14:case"end":return e.stop()}}),e,null,[[2,11]])}))),Lc.apply(this,arguments)}function $c(e){return qc.apply(this,arguments)}function qc(){return qc=r(D().mark((function e(t){var n,r,u;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.text,r=t.schema,e.prev=1,u=function(e){var t=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return jc(e)}finally{Error.stackTraceLimit=t}}(n),null!=r){e.next=7;break}e.t0={success:!0,value:u,rawValue:u},e.next=10;break;case 7:return e.next=9,Zc({value:u,schema:r});case 9:e.t0=e.sent;case 10:return e.abrupt("return",e.t0);case 13:return e.prev=13,e.t1=e.catch(1),e.abrupt("return",{success:!1,error:Ln.isInstance(e.t1)?e.t1:new Ln({text:n,cause:e.t1}),rawValue:void 0});case 16:case"end":return e.stop()}}),e,null,[[1,13]])}))),qc.apply(this,arguments)}function Uc(e){return Vc.apply(this,arguments)}function Vc(){return Vc=r(D().mark((function e(t){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",("function"==typeof t&&(t=t()),Promise.resolve(t)));case 1:case"end":return e.stop()}}),e)}))),Vc.apply(this,arguments)}var Hc=function(e,t){for(var n=0;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString()].concat(F(t.slice(n))).join("/")},Wc=Symbol("Let zodToJsonSchema decide on which parser to use"),Kc={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"};function Jc(e,t){return gl(e.type._def,t)}function Gc(e,t,n){var r=null!=n?n:t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((function(n,r){return Gc(e,t,n)}))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Qc(e)}}var Qc=function(e){var t,n={type:"integer",format:"unix-time"},r=s(e.checks);try{for(r.s();!(t=r.n()).done;){var u=t.value;switch(u.kind){case"min":n.minimum=u.value;break;case"max":n.maximum=u.value}}}catch(e){r.e(e)}finally{r.f()}return n},Yc=void 0,Xc=/^[cC][^\s-]{8,}$/,el=/^[0-9a-z]+$/,tl=/^[0-9A-HJKMNP-TV-Z]{26}$/,nl=/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,rl=/^(?:(?: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])$/,ul=/^(([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])$/,al=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,il=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ol=/^[a-zA-Z0-9_-]{21}$/,sl=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;function cl(e,t){var n={type:"string"};if(e.checks){var r,u=s(e.checks);try{for(u.s();!(r=u.n()).done;){var a=r.value;switch(a.kind){case"min":n.minLength="number"==typeof n.minLength?Math.max(n.minLength,a.value):a.value;break;case"max":n.maxLength="number"==typeof n.maxLength?Math.min(n.maxLength,a.value):a.value;break;case"email":switch(t.emailStrategy){case"format:email":dl(n,"email",a.message,t);break;case"format:idn-email":dl(n,"idn-email",a.message,t);break;case"pattern:zod":pl(n,nl,a.message,t)}break;case"url":dl(n,"uri",a.message,t);break;case"uuid":dl(n,"uuid",a.message,t);break;case"regex":pl(n,a.regex,a.message,t);break;case"cuid":pl(n,Xc,a.message,t);break;case"cuid2":pl(n,el,a.message,t);break;case"startsWith":pl(n,RegExp("^".concat(ll(a.value,t))),a.message,t);break;case"endsWith":pl(n,RegExp("".concat(ll(a.value,t),"$")),a.message,t);break;case"datetime":dl(n,"date-time",a.message,t);break;case"date":dl(n,"date",a.message,t);break;case"time":dl(n,"time",a.message,t);break;case"duration":dl(n,"duration",a.message,t);break;case"length":n.minLength="number"==typeof n.minLength?Math.max(n.minLength,a.value):a.value,n.maxLength="number"==typeof n.maxLength?Math.min(n.maxLength,a.value):a.value;break;case"includes":pl(n,RegExp(ll(a.value,t)),a.message,t);break;case"ip":"v6"!==a.version&&dl(n,"ipv4",a.message,t),"v4"!==a.version&&dl(n,"ipv6",a.message,t);break;case"base64url":pl(n,il,a.message,t);break;case"jwt":pl(n,sl,a.message,t);break;case"cidr":"v6"!==a.version&&pl(n,rl,a.message,t),"v4"!==a.version&&pl(n,ul,a.message,t);break;case"emoji":pl(n,(void 0===Yc&&(Yc=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Yc),a.message,t);break;case"ulid":pl(n,tl,a.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":dl(n,"binary",a.message,t);break;case"contentEncoding:base64":n.contentEncoding="base64";break;case"pattern:zod":pl(n,al,a.message,t)}break;case"nanoid":pl(n,ol,a.message,t)}}}catch(e){u.e(e)}finally{u.f()}}return n}function ll(e,t){return"escape"===t.patternStrategy?function(e){for(var t="",n=0;n<e.length;n++)fl.has(e[n])||(t+="\\"),t+=e[n];return t}(e):e}var fl=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function dl(e,t,n,r){var u;e.format||(null==(u=e.anyOf)?void 0:u.some((function(e){return e.format})))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push(v({format:t},n&&r.errorMessages&&{errorMessage:{format:n}}))):e.format=t}function pl(e,t,n,r){var u;e.pattern||(null==(u=e.allOf)?void 0:u.some((function(e){return e.pattern})))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push(v({pattern:hl(t,r)},n&&r.errorMessages&&{errorMessage:{pattern:n}}))):e.pattern=hl(t,r)}function hl(e,t){var n;if(!t.applyRegexFlags||!e.flags)return e.source;for(var r=e.flags.includes("i"),u=e.flags.includes("m"),a=e.flags.includes("s"),i=r?e.source.toLowerCase():e.source,o="",s=!1,c=!1,l=!1,f=0;f<i.length;f++)if(s)o+=i[f],s=!1;else{if(r)if(c){if(i[f].match(/[a-z]/)){l?(o+=i[f],o+="".concat(i[f-2],"-").concat(i[f]).toUpperCase(),l=!1):"-"===i[f+1]&&(null==(n=i[f+2])?void 0:n.match(/[a-z]/))?(o+=i[f],l=!0):o+="".concat(i[f]).concat(i[f].toUpperCase());continue}}else if(i[f].match(/[a-z]/)){o+="[".concat(i[f]).concat(i[f].toUpperCase(),"]");continue}if(u){if("^"===i[f]){o+="(^|(?<=[\r\n]))";continue}if("$"===i[f]){o+="($|(?=[\r\n]))";continue}}a&&"."===i[f]?o+=c?"".concat(i[f],"\r\n"):"[".concat(i[f],"\r\n]"):(o+=i[f],"\\"===i[f]?s=!0:c&&"]"===i[f]?c=!1:c||"["!==i[f]||(c=!0))}try{new RegExp(o)}catch(n){return console.warn("Could not convert regex pattern at ".concat(t.currentPath.join("/")," to a flag-independent form! Falling back to the flag-ignorant source")),e.source}return o}function vl(e,t){var n,r,u,a,i,o,s={type:"object",additionalProperties:null!=(n=gl(e.valueType._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["additionalProperties"])})))?n:t.allowedAdditionalProperties};if((null==(r=e.keyType)?void 0:r._def.typeName)===wc.ZodString&&(null==(u=e.keyType._def.checks)?void 0:u.length)){var c=cl(e.keyType._def,t);c.type;var l=m(c,Nt);return v(v({},s),{},{propertyNames:l})}if((null==(a=e.keyType)?void 0:a._def.typeName)===wc.ZodEnum)return v(v({},s),{},{propertyNames:{enum:e.keyType._def.values}});if((null==(i=e.keyType)?void 0:i._def.typeName)===wc.ZodBranded&&e.keyType._def.type._def.typeName===wc.ZodString&&(null==(o=e.keyType._def.type._def.checks)?void 0:o.length)){var f=Jc(e.keyType._def,t);f.type;var d=m(f,zt);return v(v({},s),{},{propertyNames:d})}return s}var ml={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Dl(e){try{return e.isOptional()}catch(e){return!0}}var yl=function(e,t,n){switch(t){case wc.ZodString:return cl(e,n);case wc.ZodNumber:return function(e){var t={type:"number"};if(!e.checks)return t;var n,r=s(e.checks);try{for(r.s();!(n=r.n()).done;){var u=n.value;switch(u.kind){case"int":t.type="integer";break;case"min":u.inclusive?t.minimum=u.value:t.exclusiveMinimum=u.value;break;case"max":u.inclusive?t.maximum=u.value:t.exclusiveMaximum=u.value;break;case"multipleOf":t.multipleOf=u.value}}}catch(e){r.e(e)}finally{r.f()}return t}(e);case wc.ZodObject:return function(e,t){var n={type:"object",properties:{}},r=[],u=e.shape();for(var a in u){var i=u[a];if(void 0!==i&&void 0!==i._def){var o=Dl(i),s=gl(i._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["properties",a]),propertyPath:[].concat(F(t.currentPath),["properties",a])}));void 0!==s&&(n.properties[a]=s,o||r.push(a))}}r.length&&(n.required=r);var c=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return gl(e.catchall._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["additionalProperties"])}));switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==c&&(n.additionalProperties=c),n}(e,n);case wc.ZodBigInt:return function(e){var t={type:"integer",format:"int64"};if(!e.checks)return t;var n,r=s(e.checks);try{for(r.s();!(n=r.n()).done;){var u=n.value;switch(u.kind){case"min":u.inclusive?t.minimum=u.value:t.exclusiveMinimum=u.value;break;case"max":u.inclusive?t.maximum=u.value:t.exclusiveMaximum=u.value;break;case"multipleOf":t.multipleOf=u.value}}}catch(e){r.e(e)}finally{r.f()}return t}(e);case wc.ZodBoolean:return{type:"boolean"};case wc.ZodDate:return Gc(e,n);case wc.ZodUndefined:return{not:{}};case wc.ZodNull:return{type:"null"};case wc.ZodArray:return function(e,t){var n,r,u,a={type:"array"};return(null==(n=e.type)?void 0:n._def)&&(null==(u=null==(r=e.type)?void 0:r._def)?void 0:u.typeName)!==wc.ZodAny&&(a.items=gl(e.type._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["items"])}))),e.minLength&&(a.minItems=e.minLength.value),e.maxLength&&(a.maxItems=e.maxLength.value),e.exactLength&&(a.minItems=e.exactLength.value,a.maxItems=e.exactLength.value),a}(e,n);case wc.ZodUnion:case wc.ZodDiscriminatedUnion:return function(e,t){var n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every((function(e){return e._def.typeName in ml&&(!e._def.checks||!e._def.checks.length)}))){var r=n.reduce((function(e,t){var n=ml[t._def.typeName];return n&&!e.includes(n)?[].concat(F(e),[n]):e}),[]);return{type:r.length>1?r:r[0]}}if(n.every((function(e){return"ZodLiteral"===e._def.typeName&&!e.description}))){var u=n.reduce((function(e,t){var n=b(t._def.value);switch(n){case"string":case"number":case"boolean":return[].concat(F(e),[n]);case"bigint":return[].concat(F(e),["integer"]);case"object":if(null===t._def.value)return[].concat(F(e),["null"]);default:return e}}),[]);if(u.length===n.length){var a=u.filter((function(e,t,n){return n.indexOf(e)===t}));return{type:a.length>1?a:a[0],enum:n.reduce((function(e,t){return e.includes(t._def.value)?e:[].concat(F(e),[t._def.value])}),[])}}}else if(n.every((function(e){return"ZodEnum"===e._def.typeName})))return{type:"string",enum:n.reduce((function(e,t){return[].concat(F(e),F(t._def.values.filter((function(t){return!e.includes(t)}))))}),[])};return function(e,t){var n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((function(e,n){return gl(e._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["anyOf","".concat(n)])}))})).filter((function(e){return!!e&&(!t.strictUnions||"object"==b(e)&&Object.keys(e).length>0)}));return n.length?{anyOf:n}:void 0}(e,t)}(e,n);case wc.ZodIntersection:return function(e,t){var n=[gl(e.left._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["allOf","0"])})),gl(e.right._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["allOf","1"])}))].filter((function(e){return!!e})),r=[];return n.forEach((function(e){if("type"in(n=e)&&"string"===n.type||!("allOf"in n)){var t=e;if("additionalProperties"in e&&!1===e.additionalProperties)e.additionalProperties,t=m(e,Rt);r.push(t)}else r.push.apply(r,F(e.allOf));var n})),r.length?{allOf:r}:void 0}(e,n);case wc.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((function(e,n){return gl(e._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["items","".concat(n)])}))})).reduce((function(e,t){return void 0===t?e:[].concat(F(e),[t])}),[]),additionalItems:gl(e.rest._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["additionalItems"])}))}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((function(e,n){return gl(e._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["items","".concat(n)])}))})).reduce((function(e,t){return void 0===t?e:[].concat(F(e),[t])}),[])}}(e,n);case wc.ZodRecord:return vl(e,n);case wc.ZodLiteral:return function(e){var t=b(e.value);return"bigint"!==t&&"number"!==t&&"boolean"!==t&&"string"!==t?{type:Array.isArray(e.value)?"array":"object"}:{type:"bigint"===t?"integer":t,const:e.value}}(e);case wc.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case wc.ZodNativeEnum:return function(e){var t=e.values,n=Object.keys(e.values).filter((function(e){return"number"!=typeof t[t[e]]})).map((function(e){return t[e]})),r=Array.from(new Set(n.map((function(e){return b(e)}))));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:n}}(e);case wc.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[ml[e.innerType._def.typeName],"null"]};var n=gl(e.innerType._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["anyOf","0"])}));return n&&{anyOf:[n,{type:"null"}]}}(e,n);case wc.ZodOptional:return function(e,t){var n;if(t.currentPath.toString()===(null==(n=t.propertyPath)?void 0:n.toString()))return gl(e.innerType._def,t);var r=gl(e.innerType._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["anyOf","1"])}));return r?{anyOf:[{not:{}},r]}:{}}(e,n);case wc.ZodMap:return function(e,t){return"record"===t.mapStrategy?vl(e,t):{type:"array",maxItems:125,items:{type:"array",items:[gl(e.keyType._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["items","items","0"])}))||{},gl(e.valueType._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["items","items","1"])}))||{}],minItems:2,maxItems:2}}}(e,n);case wc.ZodSet:return function(e,t){var n={type:"array",uniqueItems:!0,items:gl(e.valueType._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["items"])}))};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}(e,n);case wc.ZodLazy:return function(){return e.getter()._def};case wc.ZodPromise:return function(e,t){return gl(e.type._def,t)}(e,n);case wc.ZodNaN:case wc.ZodNever:return{not:{}};case wc.ZodEffects:return function(e,t){return"input"===t.effectStrategy?gl(e.schema._def,t):{}}(e,n);case wc.ZodAny:case wc.ZodUnknown:return{};case wc.ZodDefault:return function(e,t){return v(v({},gl(e.innerType._def,t)),{},{default:e.defaultValue()})}(e,n);case wc.ZodBranded:return Jc(e,n);case wc.ZodReadonly:case wc.ZodCatch:return function(e,t){return gl(e.innerType._def,t)}(e,n);case wc.ZodPipeline:return function(e,t){if("input"===t.pipeStrategy)return gl(e.in._def,t);if("output"===t.pipeStrategy)return gl(e.out._def,t);var n=gl(e.in._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["allOf","0"])}));return{allOf:[n,gl(e.out._def,v(v({},t),{},{currentPath:[].concat(F(t.currentPath),["allOf",n?"1":"0"])}))].filter((function(e){return void 0!==e}))}}(e,n);case wc.ZodFunction:case wc.ZodVoid:case wc.ZodSymbol:default:return}};function gl(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],u=t.seen.get(e);if(t.override){var a=null==(n=t.override)?void 0:n.call(t,e,t,u,r);if(a!==Wc)return a}if(u&&!r){var i=Fl(u,t);if(void 0!==i)return i}var o={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,o);var s=yl(e,e.typeName,t),c="function"==typeof s?gl(s(),t):s;if(c&&El(e,t,c),t.postProcess){var l=t.postProcess(c,e,t);return o.jsonSchema=c,l}return o.jsonSchema=c,c}var Fl=function(e,t){switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Hc(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((function(e,n){return t.currentPath[n]===e}))?(console.warn("Recursive reference detected at ".concat(t.currentPath.join("/"),"! Defaulting to any")),{}):"seen"===t.$refStrategy?{}:void 0}},El=function(e,t,n){return e.description&&(n.description=e.description),n},bl=function(e,t){var n,r=function(e){var t=function(e){return"string"==typeof e?v(v({},Kc),{},{name:e}):v(v({},Kc),e)}(e),n=void 0!==t.name?[].concat(F(t.basePath),[t.definitionPath,t.name]):t.basePath;return v(v({},t),{},{currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map((function(e){var n=g(e,2),r=n[0],u=n[1];return[u._def,{def:u._def,path:[].concat(F(t.basePath),[t.definitionPath,r]),jsonSchema:void 0}]})))})}(t),u="object"==b(t)&&t.definitions?Object.entries(t.definitions).reduce((function(e,t){var n,u=g(t,2),a=u[0],i=u[1];return v(v({},e),{},c({},a,null!=(n=gl(i._def,v(v({},r),{},{currentPath:[].concat(F(r.basePath),[r.definitionPath,a])}),!0))?n:{}))}),{}):void 0,a="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,i=null!=(n=gl(e._def,void 0===a?r:v(v({},r),{},{currentPath:[].concat(F(r.basePath),[r.definitionPath,a])}),!1))?n:{},o="object"==b(t)&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==o&&(i.title=o);var s=void 0===a?u?v(v({},i),{},c({},r.definitionPath,u)):i:c({$ref:[].concat(F("relative"===r.$refStrategy?[]:r.basePath),[r.definitionPath,a]).join("/")},r.definitionPath,v(v({},u),{},c({},a,i)));return s.$schema="http://json-schema.org/draft-07/schema#",s};function _l(e,t){return function(e){return"_zod"in e}(e)?function(e){return Cl(function(e,t){if(e instanceof Ka){var n,r=new Di(t),u={},a=Qt(e._idmap.entries());try{for(a.s();!(n=a.n()).done;){var i=cn(n.value,2),o=(i[0],i[1]);r.process(o)}}catch(e){a.e(e)}finally{a.f()}var s,c={},l={registry:e,uri:null==t?void 0:t.uri,defs:u},f=Qt(e._idmap.entries());try{for(f.s();!(s=f.n()).done;){var d=cn(s.value,2),p=d[0],h=d[1];c[p]=r.emit(h,un(un({},t),{},{external:l}))}}catch(e){f.e(e)}finally{f.f()}if(Object.keys(u).length>0){var v="draft-2020-12"===r.target?"$defs":"definitions";c.__shared=Yt({},v,u)}return{schemas:c}}var m=new Di(t);return m.process(e),m.emit(e,t)}(e,{target:"draft-7",io:"output",reused:"inline"}),{validate:(t=r(D().mark((function t(n){var r;return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,xi(e,n);case 2:return r=t.sent,t.abrupt("return",r.success?{success:!0,value:r.data}:{success:!1,error:r.error});case 4:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})});var t}(e):function(e){return Cl(bl(e,{$refStrategy:"none"}),{validate:(t=r(D().mark((function t(n){var r;return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.safeParseAsync(n);case 2:return r=t.sent,t.abrupt("return",r.success?{success:!0,value:r.data}:{success:!1,error:r.error});case 4:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})});var t}(e)}var kl=Symbol.for("vercel.ai.schema");function Cl(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).validate;return c(c(c(c(c({},kl,!0),"_type",void 0),Nc,!0),"jsonSchema",e),"validate",t)}var Al,wl=Object.defineProperty,xl="AI_NoObjectGeneratedError",Sl="vercel.ai.error.".concat(xl),Bl=Symbol.for(Sl),Ol=function(){function e(t){var n,r=t.message,i=void 0===r?"No object generated.":r,o=t.cause,s=t.text,c=t.response,l=t.usage,f=t.finishReason;return a(this,e),(n=u(this,e,[{name:xl,message:i,cause:o}]))[Al]=!0,n.text=s,n.response=c,n.usage=l,n.finishReason=f,n}return d(e,Bn),o(e,null,[{key:"isInstance",value:function(e){return Bn.hasMarker(e,Sl)}}])}();Al=Bl;var Il,Tl,Pl=xo([Zi(),Xo(Uint8Array),Xo(ArrayBuffer),(Il=function(e){var t,n;return null!=(n=null==(t=globalThis.Buffer)?void 0:t.isBuffer(e))&&n},Tl={message:"Must be a Buffer"},function(e,t){var n,r=Fr(Tl);return null!==(n=r.abort)&&void 0!==n||(r.abort=!0),new e(un({type:"custom",check:"custom",fn:t},r))}(Yo,null!=Il?Il:function(){return!0}))]),jl=new Qo({type:"lazy",getter:function(){return xo([mo(),Zi(),co(),ho(),Io(Zi(),jl),bo(jl)])}}),Nl=Io(Zi(),Io(Zi(),jl)),zl=ko({type:No("text"),text:Zi(),providerOptions:Nl.optional()}),Rl=ko({type:No("image"),image:xo([Pl,Xo(URL)]),mediaType:Zi().optional(),providerOptions:Nl.optional()}),Ml=ko({type:No("file"),data:xo([Pl,Xo(URL)]),filename:Zi().optional(),mediaType:Zi(),providerOptions:Nl.optional()}),Zl=ko({type:No("reasoning"),text:Zi(),providerOptions:Nl.optional()}),Ll=ko({type:No("tool-call"),toolCallId:Zi(),toolName:Zi(),input:yo(),providerOptions:Nl.optional(),providerExecuted:ho().optional()}),$l=new So(un({type:"union",options:[ko({type:No("text"),value:Zi()}),ko({type:No("json"),value:jl}),ko({type:No("error-text"),value:Zi()}),ko({type:No("error-json"),value:jl}),ko({type:No("content"),value:bo(xo([ko({type:No("text"),text:Zi()}),ko({type:No("media"),data:Zi(),mediaType:Zi()})]))})],discriminator:"type"},Fr(undefined))),ql=ko({type:No("tool-result"),toolCallId:Zi(),toolName:Zi(),output:$l,providerOptions:Nl.optional()}),Ul=ko({role:No("system"),content:Zi(),providerOptions:Nl.optional()}),Vl=ko({role:No("user"),content:xo([Zi(),bo(xo([zl,Rl,Ml]))]),providerOptions:Nl.optional()}),Hl=ko({role:No("assistant"),content:xo([Zi(),bo(xo([zl,Ml,Zl,Ll,ql]))]),providerOptions:Nl.optional()});xo([Ul,Vl,Hl,ko({role:No("tool"),content:bo(ql),providerOptions:Nl.optional()})]),Oc({prefix:"aitxt",size:24}),TransformStream;var Wl=xo([Co({type:No("text-start"),id:Zi(),providerMetadata:Nl.optional()}),Co({type:No("text-delta"),id:Zi(),delta:Zi(),providerMetadata:Nl.optional()}),Co({type:No("text-end"),id:Zi(),providerMetadata:Nl.optional()}),Co({type:No("error"),errorText:Zi()}),Co({type:No("tool-input-start"),toolCallId:Zi(),toolName:Zi(),providerExecuted:ho().optional(),dynamic:ho().optional()}),Co({type:No("tool-input-delta"),toolCallId:Zi(),inputTextDelta:Zi()}),Co({type:No("tool-input-available"),toolCallId:Zi(),toolName:Zi(),input:yo(),providerExecuted:ho().optional(),providerMetadata:Nl.optional(),dynamic:ho().optional()}),Co({type:No("tool-input-error"),toolCallId:Zi(),toolName:Zi(),input:yo(),providerExecuted:ho().optional(),providerMetadata:Nl.optional(),dynamic:ho().optional(),errorText:Zi()}),Co({type:No("tool-output-available"),toolCallId:Zi(),output:yo(),providerExecuted:ho().optional(),dynamic:ho().optional(),preliminary:ho().optional()}),Co({type:No("tool-output-error"),toolCallId:Zi(),errorText:Zi(),providerExecuted:ho().optional(),dynamic:ho().optional()}),Co({type:No("reasoning"),text:Zi(),providerMetadata:Nl.optional()}),Co({type:No("reasoning-start"),id:Zi(),providerMetadata:Nl.optional()}),Co({type:No("reasoning-delta"),id:Zi(),delta:Zi(),providerMetadata:Nl.optional()}),Co({type:No("reasoning-end"),id:Zi(),providerMetadata:Nl.optional()}),Co({type:No("reasoning-part-finish")}),Co({type:No("source-url"),sourceId:Zi(),url:Zi(),title:Zi().optional(),providerMetadata:Nl.optional()}),Co({type:No("source-document"),sourceId:Zi(),mediaType:Zi(),title:Zi(),filename:Zi().optional(),providerMetadata:Nl.optional()}),Co({type:No("file"),url:Zi(),mediaType:Zi(),providerMetadata:Nl.optional()}),Co({type:Zi().startsWith("data-"),id:Zi().optional(),data:yo(),transient:ho().optional()}),Co({type:No("start-step")}),Co({type:No("finish-step")}),Co({type:No("start"),messageId:Zi().optional(),messageMetadata:yo().optional()}),Co({type:No("finish"),messageMetadata:yo().optional()}),Co({type:No("abort")}),Co({type:No("message-metadata"),messageMetadata:yo()})]);function Kl(e,t){if(void 0!==e||void 0!==t){if(void 0===e)return t;if(void 0===t)return e;var n=v({},e);for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var u=t[r];if(void 0===u)continue;var a=r in e?e[r]:void 0,i=!(null===u||"object"!=b(u)||Array.isArray(u)||u instanceof Date||u instanceof RegExp),o=!(null==a||"object"!=b(a)||Array.isArray(a)||a instanceof Date||a instanceof RegExp);n[r]=i&&o?Kl(a,u):u}return n}}function Jl(e){var t=["ROOT"],n=-1,r=null;function u(e,u,a){switch(e){case'"':n=u,t.pop(),t.push(a),t.push("INSIDE_STRING");break;case"f":case"t":case"n":n=u,r=u,t.pop(),t.push(a),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(a),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n=u,t.pop(),t.push(a),t.push("INSIDE_NUMBER");break;case"{":n=u,t.pop(),t.push(a),t.push("INSIDE_OBJECT_START");break;case"[":n=u,t.pop(),t.push(a),t.push("INSIDE_ARRAY_START")}}function a(e,r){switch(e){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":n=r,t.pop()}}function i(e,r){switch(e){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=r,t.pop()}}for(var o=0;o<e.length;o++){var s=e[o];switch(t[t.length-1]){case"ROOT":u(s,o,"FINISH");break;case"INSIDE_OBJECT_START":switch(s){case'"':t.pop(),t.push("INSIDE_OBJECT_KEY");break;case"}":n=o,t.pop()}break;case"INSIDE_OBJECT_AFTER_COMMA":'"'===s&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break;case"INSIDE_OBJECT_KEY":'"'===s&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break;case"INSIDE_OBJECT_AFTER_KEY":":"===s&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break;case"INSIDE_OBJECT_BEFORE_VALUE":u(s,o,"INSIDE_OBJECT_AFTER_VALUE");break;case"INSIDE_OBJECT_AFTER_VALUE":a(s,o);break;case"INSIDE_STRING":switch(s){case'"':t.pop(),n=o;break;case"\\":t.push("INSIDE_STRING_ESCAPE");break;default:n=o}break;case"INSIDE_ARRAY_START":"]"===s?(n=o,t.pop()):(n=o,u(s,o,"INSIDE_ARRAY_AFTER_VALUE"));break;case"INSIDE_ARRAY_AFTER_VALUE":switch(s){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=o,t.pop();break;default:n=o}break;case"INSIDE_ARRAY_AFTER_COMMA":u(s,o,"INSIDE_ARRAY_AFTER_VALUE");break;case"INSIDE_STRING_ESCAPE":t.pop(),n=o;break;case"INSIDE_NUMBER":switch(s){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n=o;break;case"e":case"E":case"-":case".":break;case",":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(s,o),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&a(s,o);break;case"}":t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&a(s,o);break;case"]":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(s,o);break;default:t.pop()}break;case"INSIDE_LITERAL":var c=e.substring(r,o+1);"false".startsWith(c)||"true".startsWith(c)||"null".startsWith(c)?n=o:(t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]?a(s,o):"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(s,o))}}for(var l=e.slice(0,n+1),f=t.length-1;f>=0;f--)switch(t[f]){case"INSIDE_STRING":l+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":l+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":l+="]";break;case"INSIDE_LITERAL":var d=e.substring(r,e.length);"true".startsWith(d)?l+="true".slice(d.length):"false".startsWith(d)?l+="false".slice(d.length):"null".startsWith(d)&&(l+="null".slice(d.length))}return l}function Gl(e){return Ql.apply(this,arguments)}function Ql(){return Ql=r(D().mark((function e(t){var n;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==t){e.next=2;break}return e.abrupt("return",{value:void 0,state:"undefined-input"});case 2:return e.next=4,$c({text:t});case 4:if(!(n=e.sent).success){e.next=9;break}e.t0={value:n.value,state:"successful-parse"},e.next=13;break;case 9:return e.next=11,$c({text:Jl(t)});case 11:n=e.sent,e.t0=n.success?{value:n.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"};case 13:return e.abrupt("return",e.t0);case 14:case"end":return e.stop()}}),e)}))),Ql.apply(this,arguments)}function Yl(e){return e.type.startsWith("tool-")}function Xl(e){return Yl(e)||function(e){return"dynamic-tool"===e.type}(e)}function ef(e){return e.type.split("-").slice(1).join("-")}function tf(e){var t=e.lastMessage,n=e.messageId;return{message:"assistant"===(null==t?void 0:t.role)?t:{id:n,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function nf(e){var t=e.stream,n=e.messageMetadataSchema,u=e.dataPartSchemas,a=e.runUpdateMessageJob,i=e.onError,o=e.onToolCall,s=e.onData;return t.pipeThrough(new TransformStream({transform:function(e,t){return r(D().mark((function c(){return D().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,a(function(){var a=r(D().mark((function a(c){var l,f,d,p,h,m,y,g,F,E,b,_,k,C,A,w,x,S,B,O,I,T,P,j,N,z,R,M;return D().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:_=function(){return _=r(D().mark((function e(t){var r;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==t){e.next=7;break}if(r=null!=l.message.metadata?Kl(l.message.metadata,t):t,e.t0=null!=n,!e.t0){e.next=6;break}return e.next=6,Rc({value:r,schema:n});case 6:l.message.metadata=r;case 7:case"end":return e.stop()}}),e)}))),_.apply(this,arguments)},b=function(e){return _.apply(this,arguments)},E=function(e){var t,n=l.message.parts.find((function(t){return"dynamic-tool"===t.type&&t.toolCallId===e.toolCallId})),r=e,u=n;null!=n?(n.state=e.state,u.toolName=e.toolName,u.input=r.input,u.output=r.output,u.errorText=r.errorText,u.rawInput=null!=(t=r.rawInput)?t:u.rawInput,u.preliminary=r.preliminary,null!=r.providerMetadata&&"input-available"===n.state&&(n.callProviderMetadata=r.providerMetadata)):l.message.parts.push(v({type:"dynamic-tool",toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:r.input,output:r.output,errorText:r.errorText,preliminary:r.preliminary},null!=r.providerMetadata?{callProviderMetadata:r.providerMetadata}:{}))},F=function(e){var t,n=l.message.parts.find((function(t){return Yl(t)&&t.toolCallId===e.toolCallId})),r=e,u=n;null!=n?(n.state=e.state,u.input=r.input,u.output=r.output,u.errorText=r.errorText,u.rawInput=r.rawInput,u.preliminary=r.preliminary,u.providerExecuted=null!=(t=r.providerExecuted)?t:n.providerExecuted,null!=r.providerMetadata&&"input-available"===n.state&&(n.callProviderMetadata=r.providerMetadata)):l.message.parts.push(v({type:"tool-".concat(e.toolName),toolCallId:e.toolCallId,state:e.state,input:r.input,output:r.output,rawInput:r.rawInput,errorText:r.errorText,providerExecuted:r.providerExecuted,preliminary:r.preliminary},null!=r.providerMetadata?{callProviderMetadata:r.providerMetadata}:{}))},g=function(e){var t=l.message.parts.filter((function(e){return"dynamic-tool"===e.type})).find((function(t){return t.toolCallId===e}));if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t},y=function(e){var t=l.message.parts.filter(Yl).find((function(t){return t.toolCallId===e}));if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t},l=c.state,f=c.write,a.t0=e.type,a.next="text-start"===a.t0?10:"text-delta"===a.t0?13:"text-end"===a.t0?16:"reasoning-start"===a.t0?19:"reasoning-delta"===a.t0?22:"reasoning-end"===a.t0?25:"file"===a.t0?28:"source-url"===a.t0?30:"source-document"===a.t0?32:"tool-input-start"===a.t0?34:"tool-input-delta"===a.t0?37:"tool-input-available"===a.t0?45:"tool-input-error"===a.t0?52:"tool-output-available"===a.t0?54:"tool-output-error"===a.t0?57:"start-step"===a.t0?60:"finish-step"===a.t0?62:"start"===a.t0?64:"finish"===a.t0||"message-metadata"===a.t0?69:"error"===a.t0?73:75;break;case 10:return k={type:"text",text:"",providerMetadata:e.providerMetadata,state:"streaming"},l.activeTextParts[e.id]=k,l.message.parts.push(k),f(),a.abrupt("break",86);case 13:return(C=l.activeTextParts[e.id]).text+=e.delta,C.providerMetadata=null!=(d=e.providerMetadata)?d:C.providerMetadata,f(),a.abrupt("break",86);case 16:return(A=l.activeTextParts[e.id]).state="done",A.providerMetadata=null!=(p=e.providerMetadata)?p:A.providerMetadata,delete l.activeTextParts[e.id],f(),a.abrupt("break",86);case 19:return w={type:"reasoning",text:"",providerMetadata:e.providerMetadata,state:"streaming"},l.activeReasoningParts[e.id]=w,l.message.parts.push(w),f(),a.abrupt("break",86);case 22:return(x=l.activeReasoningParts[e.id]).text+=e.delta,x.providerMetadata=null!=(h=e.providerMetadata)?h:x.providerMetadata,f(),a.abrupt("break",86);case 25:return(S=l.activeReasoningParts[e.id]).providerMetadata=null!=(m=e.providerMetadata)?m:S.providerMetadata,S.state="done",delete l.activeReasoningParts[e.id],f(),a.abrupt("break",86);case 28:return l.message.parts.push({type:"file",mediaType:e.mediaType,url:e.url}),f(),a.abrupt("break",86);case 30:return l.message.parts.push({type:"source-url",sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),f(),a.abrupt("break",86);case 32:return l.message.parts.push({type:"source-document",sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),f(),a.abrupt("break",86);case 34:return B=l.message.parts.filter(Yl),l.partialToolCalls[e.toolCallId]={text:"",toolName:e.toolName,index:B.length,dynamic:e.dynamic},e.dynamic?E({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0}):F({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted}),f(),a.abrupt("break",86);case 37:return(O=l.partialToolCalls[e.toolCallId]).text+=e.inputTextDelta,a.next=41,Gl(O.text);case 41:return I=a.sent,T=I.value,O.dynamic?E({toolCallId:e.toolCallId,toolName:O.toolName,state:"input-streaming",input:T}):F({toolCallId:e.toolCallId,toolName:O.toolName,state:"input-streaming",input:T}),f(),a.abrupt("break",86);case 45:if(e.dynamic?E({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerMetadata:e.providerMetadata}):F({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),f(),a.t1=o&&!e.providerExecuted,!a.t1){a.next=51;break}return a.next=51,o({toolCall:e});case 51:return a.abrupt("break",86);case 52:return e.dynamic?E({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:e.input,errorText:e.errorText,providerMetadata:e.providerMetadata}):F({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),f(),a.abrupt("break",86);case 54:return e.dynamic?(P=g(e.toolCallId),E({toolCallId:e.toolCallId,toolName:P.toolName,state:"output-available",input:P.input,output:e.output,preliminary:e.preliminary})):(j=y(e.toolCallId),F({toolCallId:e.toolCallId,toolName:ef(j),state:"output-available",input:j.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary})),f(),a.abrupt("break",86);case 57:return e.dynamic?(N=g(e.toolCallId),E({toolCallId:e.toolCallId,toolName:N.toolName,state:"output-error",input:N.input,errorText:e.errorText})):(z=y(e.toolCallId),F({toolCallId:e.toolCallId,toolName:ef(z),state:"output-error",input:z.input,rawInput:z.rawInput,errorText:e.errorText})),f(),a.abrupt("break",86);case 60:return l.message.parts.push({type:"step-start"}),a.abrupt("break",86);case 62:return l.activeTextParts={},l.activeReasoningParts={},a.abrupt("break",86);case 64:return null!=e.messageId&&(l.message.id=e.messageId),a.next=67,b(e.messageMetadata);case 67:return null==e.messageId&&null==e.messageMetadata||f(),a.abrupt("break",86);case 69:return a.next=71,b(e.messageMetadata);case 71:return null!=e.messageMetadata&&f(),a.abrupt("break",86);case 73:return null==i||i(new Error(e.errorText)),a.abrupt("break",86);case 75:if(!function(e){return e.type.startsWith("data-")}(e)){a.next=86;break}if(a.t2=null!=(null==u?void 0:u[e.type]),!a.t2){a.next=80;break}return a.next=80,Rc({value:e.data,schema:u[e.type]});case 80:if(!(R=e).transient){a.next=84;break}return null==s||s(R),a.abrupt("break",86);case 84:M=null!=R.id?l.message.parts.find((function(e){return R.type===e.type&&R.id===e.id})):void 0,null!=M?M.data=R.data:l.message.parts.push(R),null==s||s(R),f();case 86:t.enqueue(e);case 87:case"end":return a.stop()}}),a)})));return function(e){return a.apply(this,arguments)}}());case 2:case"end":return c.stop()}}),c)})))()}}))}Oc({prefix:"aitxt",size:24}),Oc({prefix:"aiobj",size:24});var rf=function(){return o((function e(){a(this,e),this.queue=[],this.isProcessing=!1}),[{key:"processQueue",value:(t=r(D().mark((function e(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isProcessing){e.next=9;break}this.isProcessing=!0;case 2:if(!(this.queue.length>0)){e.next=8;break}return e.next=5,this.queue[0]();case 5:this.queue.shift();case 6:e.next=2;break;case 8:this.isProcessing=!1;case 9:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"run",value:(e=r(D().mark((function e(t){var n=this;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,u){n.queue.push(r(D().mark((function n(){return D().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t();case 3:e(),n.next=9;break;case 6:n.prev=6,n.t0=n.catch(0),u(n.t0);case 9:case"end":return n.stop()}}),n,null,[[0,6]])})))),n.processQueue()})));case 1:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})}]);var e,t}();Oc({prefix:"aiobj",size:24}),function(e,t){for(var n in t)wl(e,n,{get:t[n],enumerable:!0})}({},{object:function(){return af},text:function(){return uf}});var uf=function(){return{type:"text",responseFormat:{type:"text"},parsePartial:(t=r(D().mark((function e(t){var n;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.text,e.abrupt("return",{partial:n});case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)}),parseOutput:(e=r(D().mark((function e(t){var n;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.text,e.abrupt("return",n);case 2:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};var e,t},af=function(e){var t=function(e){return null==e?Cl({properties:{},additionalProperties:!1}):"object"==b(t=e)&&null!==t&&kl in t&&!0===t[kl]&&"jsonSchema"in t&&"validate"in t?e:_l(e);var t}(e.schema);return{type:"object",responseFormat:{type:"json",schema:t.jsonSchema},parsePartial:function(e){return r(D().mark((function t(){var n,r,u;return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.text,t.next=3,Gl(n);case 3:r=t.sent,t.t0=r.state,t.next="failed-parse"===t.t0||"undefined-input"===t.t0?7:"repaired-parse"===t.t0||"successful-parse"===t.t0?8:9;break;case 7:return t.abrupt("return");case 8:return t.abrupt("return",{partial:r.value});case 9:throw u=r.state,new Error("Unsupported parse state: ".concat(u));case 11:case"end":return t.stop()}}),t)})))()},parseOutput:function(e,n){return r(D().mark((function r(){var u,a,i;return D().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=e.text,r.next=3,$c({text:u});case 3:if((a=r.sent).success){r.next=6;break}throw new Ol({message:"No object generated: could not parse the response.",cause:a.error,text:u,response:n.response,usage:n.usage,finishReason:n.finishReason});case 6:return r.next=8,Zc({value:a.value,schema:t});case 8:if((i=r.sent).success){r.next=11;break}throw new Ol({message:"No object generated: response did not match schema.",cause:i.error,text:u,response:n.response,usage:n.usage,finishReason:n.finishReason});case 11:return r.abrupt("return",i.value);case 12:case"end":return r.stop()}}),r)})))()}}},of=Ao({name:Zi(),version:Zi()}),sf=Ao({_meta:Mo(ko({}).loose())}),cf=sf,lf=ko({method:Zi(),params:Mo(sf)}),ff=Ao({experimental:Mo(ko({}).loose()),logging:Mo(ko({}).loose()),prompts:Mo(Ao({listChanged:Mo(ho())})),resources:Mo(Ao({subscribe:Mo(ho()),listChanged:Mo(ho())})),tools:Mo(Ao({listChanged:Mo(ho())}))});cf.extend({protocolVersion:Zi(),capabilities:ff,serverInfo:of,instructions:Mo(Zi())});var df=cf.extend({nextCursor:Mo(Zi())}),pf=ko({name:Zi(),description:Mo(Zi()),inputSchema:ko({type:No("object"),properties:Mo(ko({}).loose())}).loose()}).loose();df.extend({tools:bo(pf)});var hf=ko({type:No("text"),text:Zi()}).loose(),vf=ko({type:No("image"),data:uo(),mimeType:Zi()}).loose(),mf=ko({uri:Zi(),mimeType:Mo(Zi())}).loose(),Df=mf.extend({text:Zi()}),yf=mf.extend({blob:uo()}),gf=ko({type:No("resource"),resource:xo([Df,yf])}).loose();cf.extend({content:bo(xo([hf,vf,gf])),isError:ho().default(!1).optional()}).or(cf.extend({toolResult:yo()}));var Ff="2.0",Ef=ko({jsonrpc:No(Ff),id:xo([Zi(),co().int()])}).merge(lf).strict(),bf=ko({jsonrpc:No(Ff),id:xo([Zi(),co().int()]),result:cf}).strict(),_f=ko({jsonrpc:No(Ff),id:xo([Zi(),co().int()]),error:ko({code:co().int(),message:Zi(),data:Mo(yo())})}).strict();xo([Ef,ko({jsonrpc:No(Ff)}).merge(ko({method:Zi(),params:Mo(sf)})).strict(),bf,_f]);var kf=function(){return o((function e(t){var n=t.api,r=void 0===n?"/api/chat":n,u=t.credentials,i=t.headers,o=t.body,s=t.fetch,c=t.prepareSendMessagesRequest,l=t.prepareReconnectToStreamRequest;a(this,e),this.api=r,this.credentials=u,this.headers=i,this.body=o,this.fetch=s,this.prepareSendMessagesRequest=c,this.prepareReconnectToStreamRequest=l}),[{key:"sendMessages",value:(t=r(D().mark((function e(t){var n,r,u,a,i,o,s,c,l,f,d,p,h,y,g,F,E;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.abortSignal,r=m(t,Mt),e.next=3,Uc(this.body);case 3:return c=e.sent,e.next=6,Uc(this.headers);case 6:return l=e.sent,e.next=9,Uc(this.credentials);case 9:return f=e.sent,e.next=12,null==(u=this.prepareSendMessagesRequest)?void 0:u.call(this,{api:this.api,id:r.chatId,messages:r.messages,body:v(v({},c),r.body),headers:v(v({},l),r.headers),credentials:f,requestMetadata:r.metadata,trigger:r.trigger,messageId:r.messageId});case 12:return d=e.sent,p=null!=(a=null==d?void 0:d.api)?a:this.api,h=void 0!==(null==d?void 0:d.headers)?d.headers:v(v({},l),r.headers),y=void 0!==(null==d?void 0:d.body)?d.body:v(v(v({},c),r.body),{},{id:r.chatId,messages:r.messages,trigger:r.trigger,messageId:r.messageId}),g=null!=(i=null==d?void 0:d.credentials)?i:f,F=null!=(o=this.fetch)?o:globalThis.fetch,e.next=20,F(p,{method:"POST",headers:v({"Content-Type":"application/json"},h),body:JSON.stringify(y),credentials:g,signal:n});case 20:if((E=e.sent).ok){e.next=33;break}return e.t0=Error,e.next=25,E.text();case 25:if(e.t1=s=e.sent,null==e.t1){e.next=30;break}e.t2=s,e.next=31;break;case 30:e.t2="Failed to fetch the chat response.";case 31:throw e.t3=e.t2,new e.t0(e.t3);case 33:if(E.body){e.next=35;break}throw new Error("The response body is empty.");case 35:return e.abrupt("return",this.processResponseStream(E.body));case 36:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"reconnectToStream",value:(e=r(D().mark((function e(t){var n,r,u,a,i,o,s,c,l,f,d,p,h,m;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Uc(this.body);case 2:return o=e.sent,e.next=5,Uc(this.headers);case 5:return s=e.sent,e.next=8,Uc(this.credentials);case 8:return c=e.sent,e.next=11,null==(n=this.prepareReconnectToStreamRequest)?void 0:n.call(this,{api:this.api,id:t.chatId,body:v(v({},o),t.body),headers:v(v({},s),t.headers),credentials:c,requestMetadata:t.metadata});case 11:return l=e.sent,f=null!=(r=null==l?void 0:l.api)?r:"".concat(this.api,"/").concat(t.chatId,"/stream"),d=void 0!==(null==l?void 0:l.headers)?l.headers:v(v({},s),t.headers),p=null!=(u=null==l?void 0:l.credentials)?u:c,h=null!=(a=this.fetch)?a:globalThis.fetch,e.next=18,h(f,{method:"GET",headers:d,credentials:p});case 18:if(204!==(m=e.sent).status){e.next=21;break}return e.abrupt("return",null);case 21:if(m.ok){e.next=33;break}return e.t0=Error,e.next=25,m.text();case 25:if(e.t1=i=e.sent,null==e.t1){e.next=30;break}e.t2=i,e.next=31;break;case 30:e.t2="Failed to fetch the chat response.";case 31:throw e.t3=e.t2,new e.t0(e.t3);case 33:if(m.body){e.next=35;break}throw new Error("The response body is empty.");case 35:return e.abrupt("return",this.processResponseStream(m.body));case 36:case"end":return e.stop()}}),e,this)}))),function(t){return e.apply(this,arguments)})}]);var e,t}(),Cf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,e),u(this,e,[t])}return d(e,kf),o(e,[{key:"processResponseStream",value:function(e){return function(e){var t=e.schema;return e.stream.pipeThrough(new TextDecoderStream).pipeThrough(new Jn).pipeThrough(new TransformStream({transform:function(e,n){return r(D().mark((function r(){var u;return D().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(u=e.data,r.t0="[DONE]"!==u,!r.t0){r.next=8;break}return r.t1=n,r.next=6,$c({text:u,schema:t});case 6:r.t2=r.sent,r.t1.enqueue.call(r.t1,r.t2);case 8:case"end":return r.stop()}}),r)})))()}}))}({stream:e,schema:Wl}).pipeThrough(new TransformStream({transform:function(e,t){return r(D().mark((function n(){return D().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.success){n.next=2;break}throw e.error;case 2:t.enqueue(e.value);case 3:case"end":return n.stop()}}),n)})))()}}))}}])}(),Af=function(){return o((function e(t){var n=this,u=t.generateId,i=void 0===u?Ic:u,o=t.id,s=void 0===o?i():o,c=t.transport,l=void 0===c?new Cf:c,f=t.messageMetadataSchema,d=t.dataPartSchemas,p=t.state,h=t.onError,y=t.onToolCall,g=t.onFinish,E=t.onData,b=t.sendAutomaticallyWhen;a(this,e),this.activeResponse=void 0,this.jobExecutor=new rf,this.sendMessage=function(){var e=r(D().mark((function e(t,u){var a,i,o,s,c,l,f;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=4;break}return e.next=3,n.makeRequest(v({trigger:"submit-message",messageId:null==(a=n.lastMessage)?void 0:a.id},u));case 3:return e.abrupt("return",void e.sent);case 4:if(!("text"in t)&&!("files"in t)){e.next=16;break}if(!Array.isArray(t.files)){e.next=9;break}e.t0=t.files,e.next=12;break;case 9:return e.next=11,function(){var e=r(D().mark((function e(t){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return",[]);case 2:if(globalThis.FileList&&t instanceof globalThis.FileList){e.next=4;break}throw new Error("FileList is not supported in the current environment");case 4:return e.abrupt("return",Promise.all(Array.from(t).map(function(){var e=r(D().mark((function e(t){var n,r;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.name,r=t.type,e.t0=r,e.t1=n,e.next=5,new Promise((function(e,n){var r=new FileReader;r.onload=function(t){var n;e(null==(n=t.target)?void 0:n.result)},r.onerror=function(e){return n(e)},r.readAsDataURL(t)}));case 5:return e.t2=e.sent,e.abrupt("return",{type:"file",mediaType:e.t0,filename:e.t1,url:e.t2});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(t.files);case 11:e.t0=e.sent;case 12:l=e.t0,c={parts:[].concat(F(l),F("text"in t&&null!=t.text?[{type:"text",text:t.text}]:[]))},e.next=17;break;case 16:c=t;case 17:if(null==t.messageId){e.next=26;break}if(f=n.state.messages.findIndex((function(e){return e.id===t.messageId})),-1!==f){e.next=21;break}throw new Error("message with id ".concat(t.messageId," not found"));case 21:if("user"===n.state.messages[f].role){e.next=23;break}throw new Error("message with id ".concat(t.messageId," is not a user message"));case 23:n.state.messages=n.state.messages.slice(0,f+1),n.state.replaceMessage(f,v(v({},c),{},{id:t.messageId,role:null!=(i=c.role)?i:"user",metadata:t.metadata})),e.next=27;break;case 26:n.state.pushMessage(v(v({},c),{},{id:null!=(o=c.id)?o:n.generateId(),role:null!=(s=c.role)?s:"user",metadata:t.metadata}));case 27:return e.next=29,n.makeRequest(v({trigger:"submit-message",messageId:t.messageId},u));case 29:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),this.regenerate=r(D().mark((function e(){var t,r,u,a,i=arguments;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(t=i.length>0&&void 0!==i[0]?i[0]:{}).messageId,u=m(t,Zt),a=null==r?n.state.messages.length-1:n.state.messages.findIndex((function(e){return e.id===r})),-1!==a){e.next=4;break}throw new Error("message ".concat(r," not found"));case 4:return n.state.messages=n.state.messages.slice(0,"assistant"===n.messages[a].role?a:a+1),e.next=7,n.makeRequest(v({trigger:"regenerate-message",messageId:r},u));case 7:case"end":return e.stop()}}),e)}))),this.resumeStream=r(D().mark((function e(){var t,r=arguments;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,n.makeRequest(v({trigger:"resume-stream"},t));case 3:case"end":return e.stop()}}),e)}))),this.clearError=function(){"error"===n.status&&(n.state.error=void 0,n.setStatus({status:"ready"}))},this.addToolResult=function(){var e=r(D().mark((function e(t){var u,a;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.tool,u=t.toolCallId,a=t.output,e.abrupt("return",n.jobExecutor.run(r(D().mark((function e(){var t,r,i,o;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=n.state.messages,o=i[i.length-1],n.state.replaceMessage(i.length-1,v(v({},o),{},{parts:o.parts.map((function(e){return Xl(e)&&e.toolCallId===u?v(v({},e),{},{state:"output-available",output:a}):e}))})),n.activeResponse&&(n.activeResponse.state.message.parts=n.activeResponse.state.message.parts.map((function(e){return Xl(e)&&e.toolCallId===u?v(v({},e),{},{state:"output-available",output:a,errorText:void 0}):e}))),"streaming"!==n.status&&"submitted"!==n.status&&(null==(t=n.sendAutomaticallyWhen)?void 0:t.call(n,{messages:n.state.messages}))&&n.makeRequest({trigger:"submit-message",messageId:null==(r=n.lastMessage)?void 0:r.id});case 2:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.stop=r(D().mark((function e(){var t;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"streaming"!==n.status&&"submitted"!==n.status||(null==(t=n.activeResponse)?void 0:t.abortController)&&n.activeResponse.abortController.abort();case 1:case"end":return e.stop()}}),e)}))),this.id=s,this.transport=l,this.generateId=i,this.messageMetadataSchema=f,this.dataPartSchemas=d,this.state=p,this.onError=h,this.onToolCall=y,this.onFinish=g,this.onData=E,this.sendAutomaticallyWhen=b}),[{key:"status",get:function(){return this.state.status}},{key:"setStatus",value:function(e){var t=e.status,n=e.error;this.status!==t&&(this.state.status=t,this.state.error=n)}},{key:"error",get:function(){return this.state.error}},{key:"messages",get:function(){return this.state.messages},set:function(e){this.state.messages=e}},{key:"lastMessage",get:function(){return this.state.messages[this.state.messages.length-1]}},{key:"makeRequest",value:(e=r(D().mark((function e(t){var n,u,a,i,o,s,c,l,f,d,p,h,v,m,y,g,F=this;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.trigger,u=t.metadata,a=t.headers,i=t.body,o=t.messageId,this.setStatus({status:"submitted",error:void 0}),f=this.lastMessage,d=!1,p=!1,h=!1,e.prev=4,(v={state:tf({lastMessage:this.state.snapshot(f),messageId:this.generateId()}),abortController:new AbortController}).abortController.signal.addEventListener("abort",(function(){d=!0})),this.activeResponse=v,"resume-stream"!==n){e.next=15;break}return e.next=9,this.transport.reconnectToStream({chatId:this.id,metadata:u,headers:a,body:i});case 9:if(null!=(y=e.sent)){e.next=12;break}return e.abrupt("return",void this.setStatus({status:"ready"}));case 12:m=y,e.next=18;break;case 15:return e.next=17,this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:v.abortController.signal,metadata:u,headers:a,body:i,trigger:n,messageId:o});case 17:m=e.sent;case 18:return g=function(e){return F.jobExecutor.run((function(){return e({state:v.state,write:function(){var e;F.setStatus({status:"streaming"}),v.state.message.id===(null==(e=F.lastMessage)?void 0:e.id)?F.state.replaceMessage(F.state.messages.length-1,v.state.message):F.state.pushMessage(v.state.message)}})}))},e.next=21,function(){var e=r(D().mark((function e(t){var n,r,u;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.stream,r=t.onError,u=n.getReader(),e.prev=2;case 3:return e.next=5,u.read();case 5:if(!e.sent.done){e.next=9;break}return e.abrupt("break",11);case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),null==r||r(e.t0);case 16:return e.prev=16,u.releaseLock(),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[2,13,16,19]])})));return function(t){return e.apply(this,arguments)}}()({stream:nf({stream:m,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:g,onError:function(e){throw e}}),onError:function(e){throw e}});case 21:this.setStatus({status:"ready"}),e.next=29;break;case 24:if(e.prev=24,e.t0=e.catch(4),!d&&"AbortError"!==e.t0.name){e.next=28;break}return e.abrupt("return",(d=!0,this.setStatus({status:"ready"}),null));case 28:h=!0,e.t0 instanceof TypeError&&(e.t0.message.toLowerCase().includes("fetch")||e.t0.message.toLowerCase().includes("network"))&&(p=!0),this.onError&&e.t0 instanceof Error&&this.onError(e.t0),this.setStatus({status:"error",error:e.t0});case 29:e.prev=29;try{null==(s=this.onFinish)||s.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:d,isDisconnect:p,isError:h})}catch(e){console.error(e)}return this.activeResponse=void 0,e.finish(29);case 33:if(e.t1=null==(c=this.sendAutomaticallyWhen)?void 0:c.call(this,{messages:this.state.messages}),!e.t1){e.next=37;break}return e.next=37,this.makeRequest({trigger:"submit-message",messageId:null==(l=this.lastMessage)?void 0:l.id,metadata:u,headers:a,body:i});case 37:case"end":return e.stop()}}),e,this,[[4,24,29,33]])}))),function(t){return e.apply(this,arguments)})}]);var e}();function wf(e){var t=e.messages,n=t[t.length-1];if(!n)return!1;if("assistant"!==n.role)return!1;var r=n.parts.reduce((function(e,t,n){return"step-start"===t.type?n:e}),-1),u=n.parts.slice(r+1).filter(Xl);return u.length>0&&u.every((function(e){return"output-available"===e.state}))}var xf,Sf,Bf=ko({type:No("text"),text:Zi(),state:Po(["streaming","done"]).optional(),providerMetadata:Nl.optional()}),Of=ko({type:No("reasoning"),text:Zi(),state:Po(["streaming","done"]).optional(),providerMetadata:Nl.optional()}),If=ko({type:No("source-url"),sourceId:Zi(),url:Zi(),title:Zi().optional(),providerMetadata:Nl.optional()}),Tf=ko({type:No("source-document"),sourceId:Zi(),mediaType:Zi(),title:Zi(),filename:Zi().optional(),providerMetadata:Nl.optional()}),Pf=ko({type:No("file"),mediaType:Zi(),filename:Zi().optional(),url:Zi(),providerMetadata:Nl.optional()}),jf=ko({type:No("step-start")}),Nf=ko({type:Zi().startsWith("data-"),id:Zi().optional(),data:yo()}),zf=[ko({type:No("dynamic-tool"),toolName:Zi(),toolCallId:Zi(),state:No("input-streaming"),input:yo().optional(),output:Fo().optional(),errorText:Fo().optional()}),ko({type:No("dynamic-tool"),toolName:Zi(),toolCallId:Zi(),state:No("input-available"),input:yo(),output:Fo().optional(),errorText:Fo().optional(),callProviderMetadata:Nl.optional()}),ko({type:No("dynamic-tool"),toolName:Zi(),toolCallId:Zi(),state:No("output-available"),input:yo(),output:yo(),errorText:Fo().optional(),callProviderMetadata:Nl.optional(),preliminary:ho().optional()}),ko({type:No("dynamic-tool"),toolName:Zi(),toolCallId:Zi(),state:No("output-error"),input:yo(),output:Fo().optional(),errorText:Zi(),callProviderMetadata:Nl.optional()})],Rf=[ko({type:Zi().startsWith("tool-"),toolCallId:Zi(),state:No("input-streaming"),input:yo().optional(),output:Fo().optional(),errorText:Fo().optional()}),ko({type:Zi().startsWith("tool-"),toolCallId:Zi(),state:No("input-available"),input:yo(),output:Fo().optional(),errorText:Fo().optional(),callProviderMetadata:Nl.optional()}),ko({type:Zi().startsWith("tool-"),toolCallId:Zi(),state:No("output-available"),input:yo(),output:yo(),errorText:Fo().optional(),callProviderMetadata:Nl.optional(),preliminary:ho().optional()}),ko({type:Zi().startsWith("tool-"),toolCallId:Zi(),state:No("output-error"),input:yo(),output:Fo().optional(),errorText:Zi(),callProviderMetadata:Nl.optional()})];ko({id:Zi(),role:Po(["system","user","assistant"]),metadata:yo().optional(),parts:bo(xo([Bf,Of,If,Tf,Pf,jf,Nf].concat(zf,Rf)))});var Mf,Zf,Lf,$f,qf,Uf,Vf,Hf,Wf,Kf,Jf=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((Sf||(Sf=1,xf=function(e,t){if("function"!=typeof e)throw new TypeError("Expected the first argument to be a `function`, got `".concat(dn(e),"`."));var n,r=0;return function(){for(var u=this,a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];clearTimeout(n);var s=Date.now(),c=t-(s-r);c<=0?(r=s,e.apply(this,i)):n=setTimeout((function(){r=Date.now(),e.apply(u,i)}),c)}}),xf)),Gf=function(e,t,n){if(!t.has(e))throw TypeError("Cannot "+n)},Qf=function(e,t,n){return Gf(e,t,"read from private field"),n?n.call(e):t.get(e)},Yf=function(e,t,n){if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Xf=function(e,t,n,r){return Gf(e,t,"write to private field"),t.set(e,n),n},ed=function(){return o((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];a(this,e),Yf(this,Mf,void 0),Yf(this,Zf,"ready"),Yf(this,Lf,void 0),Yf(this,$f,new Set),Yf(this,qf,new Set),Yf(this,Uf,new Set),this.pushMessage=function(e){Xf(t,Mf,Qf(t,Mf).concat(e)),Qf(t,Vf).call(t)},this.popMessage=function(){Xf(t,Mf,Qf(t,Mf).slice(0,-1)),Qf(t,Vf).call(t)},this.replaceMessage=function(e,n){Xf(t,Mf,[].concat(F(Qf(t,Mf).slice(0,e)),[t.snapshot(n)],F(Qf(t,Mf).slice(e+1)))),Qf(t,Vf).call(t)},this.snapshot=function(e){return structuredClone(e)},this["~registerMessagesCallback"]=function(e,n){var r=n?function(e,t){return null!=t?Jf(e,t):e}(e,n):e;return Qf(t,$f).add(r),function(){Qf(t,$f).delete(r)}},this["~registerStatusCallback"]=function(e){return Qf(t,qf).add(e),function(){Qf(t,qf).delete(e)}},this["~registerErrorCallback"]=function(e){return Qf(t,Uf).add(e),function(){Qf(t,Uf).delete(e)}},Yf(this,Vf,(function(){Qf(t,$f).forEach((function(e){return e()}))})),Yf(this,Hf,(function(){Qf(t,qf).forEach((function(e){return e()}))})),Yf(this,Wf,(function(){Qf(t,Uf).forEach((function(e){return e()}))})),Xf(this,Mf,n)}),[{key:"status",get:function(){return Qf(this,Zf)},set:function(e){Xf(this,Zf,e),Qf(this,Hf).call(this)}},{key:"error",get:function(){return Qf(this,Lf)},set:function(e){Xf(this,Lf,e),Qf(this,Wf).call(this)}},{key:"messages",get:function(){return Qf(this,Mf)},set:function(e){Xf(this,Mf,F(e)),Qf(this,Vf).call(this)}}])}();Mf=new WeakMap,Zf=new WeakMap,Lf=new WeakMap,$f=new WeakMap,qf=new WeakMap,Uf=new WeakMap,Vf=new WeakMap,Hf=new WeakMap,Wf=new WeakMap;var td=function(){function e(n){var r,i=n.messages,o=m(n,Lt);a(this,e);var s=new ed(i);return r=u(this,e,[v(v({},o),{},{state:s})]),Yf(t(r),Kf,void 0),r["~registerMessagesCallback"]=function(e,n){return Qf(t(r),Kf)["~registerMessagesCallback"](e,n)},r["~registerStatusCallback"]=function(e){return Qf(t(r),Kf)["~registerStatusCallback"](e)},r["~registerErrorCallback"]=function(e){return Qf(t(r),Kf)["~registerErrorCallback"](e)},Xf(t(r),Kf,s),r}return d(e,Af),o(e)}();function nd(e,t){var n=void 0;return function(){for(var r=arguments.length,u=new Array(r),a=0;a<r;a++)u[a]=arguments[a];n&&clearTimeout(n),n=setTimeout((function(){return e.apply(void 0,u)}),t)}}function rd(e){return e.reduce((function(e,t){return e.concat(t)}),[])}Kf=new WeakMap;var ud=0;function ad(e){return 0===e.collections.length?0:e.collections.reduce((function(e,t){return e+t.items.length}),0)}function id(e){return e!==Object(e)}function od(e,t){if(e===t)return!0;if(id(e)||id(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var u=r[n];if(!(u in t))return!1;if(!od(e[u],t[u]))return!1}return!0}var sd=function(){},cd=[{segment:"autocomplete-core",version:"1.19.2"}];function ld(e){var t=e.item,n=e.items,r=void 0===n?[]:n;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex((function(e){return e.objectID===t.objectID}))],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function fd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dd=["items"],pd=["items"];function hd(e){return hd="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},hd(e)}function vd(e){return function(e){if(Array.isArray(e))return md(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return md(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?md(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function md(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dd(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n,r,u={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function yd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yd(Object(n),!0).forEach((function(t){Fd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fd(e,t,n){return(t=function(e){var t=function(e){if("object"!==hd(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==hd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===hd(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ed(e){return e.map((function(e){var t=e.items,n=Dd(e,dd);return gd(gd({},n),{},{objectIDs:(null==t?void 0:t.map((function(e){return e.objectID})))||n.objectIDs})}))}function bd(e){var t,n,r,u=(t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,a,i,o=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(s=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);s=!0);}catch(e){c=!0,u=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw u}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return fd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fd(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((e.version||"").split(".").map(Number),2),n=t[0],r=t[1],n>=3||2===n&&r>=4||1===n&&r>=10);function a(t,n,r){if(u&&void 0!==r){var a=r[0].__autocomplete_algoliaCredentials,i={"X-Algolia-Application-Id":a.appId,"X-Algolia-API-Key":a.apiKey};e.apply(void 0,[t].concat(vd(n),[{headers:i}]))}else e.apply(void 0,[t].concat(vd(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e("setAuthenticatedUserToken",t)},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("clickedObjectIDsAfterSearch",Ed(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("clickedObjectIDs",Ed(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("convertedObjectIDsAfterSearch",Ed(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&a("convertedObjectIDs",Ed(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&t.reduce((function(e,t){var n=t.items,r=Dd(t,pd);return[].concat(vd(e),vd(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r<e.objectIDs.length;r+=t)n.push(gd(gd({},e),{},{objectIDs:e.objectIDs.slice(r,r+t)}));return n}(gd(gd({},r),{},{objectIDs:(null==n?void 0:n.map((function(e){return e.objectID})))||r.objectIDs})).map((function(e){return{items:n,payload:e}}))))}),[]).forEach((function(e){var t=e.items;return a("viewedObjectIDs",[e.payload],t)}))},viewedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function _d(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function kd(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function Cd(e){return Cd="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},Cd(e)}function Ad(e){return function(e){if(Array.isArray(e))return wd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return wd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wd(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xd(Object(n),!0).forEach((function(t){Bd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bd(e,t,n){return(t=function(e){var t=function(e){if("object"!==Cd(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Cd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Cd(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Od="2.15.0",Id="https://cdn.jsdelivr.net/npm/search-insights@".concat(Od,"/dist/search-insights.min.js"),Td=nd((function(e){var t=e.onItemsChange,n=e.items,r=e.insights,u=e.state;t({insights:r,insightsEvents:_d({items:n}).map((function(e){return Sd({eventName:"Items Viewed"},e)})),state:u})}),400);function Pd(e){var t=function(e){return Sd({onItemsChange:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.viewedObjectIDs.apply(t,Ad(n.map((function(e){return Sd(Sd({},e),{},{algoliaSource:jd(e.algoliaSource,r.context)})}))))},onSelect:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.clickedObjectIDsAfterSearch.apply(t,Ad(n.map((function(e){return Sd(Sd({},e),{},{algoliaSource:jd(e.algoliaSource,r.context)})}))))},onActive:sd,__autocomplete_clickAnalytics:!0},e)}(e),n=t.insightsClient,r=t.insightsInitParams,u=t.onItemsChange,a=t.onSelect,i=t.onActive,o=t.__autocomplete_clickAnalytics,s=n;if(n||"undefined"!=typeof window&&function(e){var t=e.window,n=t.AlgoliaAnalyticsObject||"aa";"string"==typeof n&&(s=t[n]),s||(t.AlgoliaAnalyticsObject=n,t[n]||(t[n]=function(){t[n].queue||(t[n].queue=[]);for(var e=arguments.length,r=new Array(e),u=0;u<e;u++)r[u]=arguments[u];t[n].queue.push(r)}),t[n].version=Od,s=t[n],function(e){var t="[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete";try{var n=e.document.createElement("script");n.async=!0,n.src=Id,n.onerror=function(){console.error(t)},document.body.appendChild(n)}catch(e){console.error(t)}}(t))}({window:window}),!s)return{};r&&s("init",Sd({partial:!0},r));var c=bd(s),l={current:[]},f=nd((function(e){var t=e.state;if(t.isOpen){var n=t.collections.reduce((function(e,t){return[].concat(Ad(e),Ad(t.items))}),[]).filter(kd);od(l.current.map((function(e){return e.objectID})),n.map((function(e){return e.objectID})))||(l.current=n,n.length>0&&Td({onItemsChange:u,items:n,insights:c,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive;function u(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:Sd(Sd({},o?{clickAnalytics:!0}:{}),e?{userToken:Nd(e)}:{}),insights:c}})}s("addAlgoliaAgent","insights-plugin"),u(),s("onUserTokenChange",(function(e){u(e)})),s("getUserToken",null,(function(e,t){u(t)})),n((function(e){var t=e.item,n=e.state,r=e.event,u=e.source;kd(t)&&a({state:n,event:r,insights:c,item:t,insightsEvents:[Sd({eventName:"Item Selected"},ld({item:t,items:u.getItems().filter(kd)}))]})})),r((function(e){var t=e.item,n=e.source,r=e.state,u=e.event;kd(t)&&i({state:r,event:u,insights:c,item:t,insightsEvents:[Sd({eventName:"Item Active"},ld({item:t,items:n.getItems().filter(kd)}))]})}))},onStateChange:function(e){var t=e.state;f({state:t})},__autocomplete_pluginOptions:e}}function jd(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(Ad(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),["autocomplete-internal"],Ad(null!==(e=t.algoliaInsightsPlugin)&&void 0!==e&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function Nd(e){return"number"==typeof e?e.toString():e}function zd(e,t){var n=t;return{then:function(t,r){return zd(e.then(Md(t,n,e),Md(r,n,e)),n)},catch:function(t){return zd(e.catch(Md(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),zd(e.finally(Md(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach((function(e){e()}))},isCanceled:function(){return!0===n.isCanceled}}}function Rd(e){return zd(e,{isCanceled:!1,onCancelList:[]})}function Md(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}var Zd,Ld=!0;function $d(){var e=[];return{add:function(t){return e.push(t),t.finally((function(){e=e.filter((function(e){return e!==t}))}))},cancelAll:function(){e.forEach((function(e){return e.cancel()}))},isEmpty:function(){return 0===e.length},wait:function(t){return Ld?(Ld=!1,(Zd=t?Promise.race([Promise.all(e),new Promise((function(e){return setTimeout(e,t)}))]):Promise.all(e)).then((function(){Ld=!0}))):Zd}}}function qd(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var u=(null===t?-1:t)+e;return u<=-1||u>=n?null===r?null:0:u}function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ud(Object(n),!0).forEach((function(t){Hd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ud(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Hd(e,t,n){return(t=function(e){var t=function(e){if("object"!==Wd(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Wd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Wd(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wd(e){return Wd="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},Wd(e)}function Kd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Jd=function(e,t){var n,r=!1,u=[],a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Kd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kd(e,t):void 0}}(e))||t){n&&(e=n);var r=0,u=function(){};return{s:u,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw a}}}}(e);try{for(a.s();!(n=a.n()).done;){var i,o,s,c=null===(i=n.value.__autocomplete_pluginOptions)||void 0===i||null===(o=(s=i).awaitSubmit)||void 0===o?void 0:o.call(s);if("number"==typeof c)u.push(c);else if(!0===c){r=!0;break}}}catch(e){a.e(e)}finally{a.f()}return r?t.wait():u.length>0?t.wait(Math.max.apply(Math,u)):void 0};function Gd(e){var t=function(e){var t=e.collections.map((function(e){return e.items.length})).reduce((function(e,t,n){var r=(e[n-1]||0)+t;return e.push(r),e}),[]).reduce((function(t,n){return n<=e.activeItemId?t+1:t}),0);return e.collections[t]}(e);if(!t)return null;var n=t.items[function(e){for(var t=e.state,n=e.collection,r=!1,u=0,a=0;!1===r;){var i=t.collections[u];if(i===n){r=!0;break}a+=i.items.length,u++}return t.activeItemId-a}({state:e,collection:t})],r=t.source;return{item:n,itemInputValue:r.getItemInputValue({item:n,state:e}),itemUrl:r.getItemUrl({item:n,state:e}),source:r}}function Qd(e,t,n){return[e,null==n?void 0:n.sourceId,t].filter(Boolean).join("-").replace(/\s/g,"")}var Yd=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function Xd(e){return e.nativeEvent||e}function ep(e){return ep="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},ep(e)}function tp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function np(e,t,n){return(t=function(e){var t=function(e){if("object"!==ep(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==ep(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ep(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rp(e){return rp="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},rp(e)}function up(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ap(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?up(Object(n),!0).forEach((function(t){ip(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):up(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ip(e,t,n){return(t=function(e){var t=function(e){if("object"!==rp(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==rp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===rp(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function op(e){return op="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},op(e)}function sp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cp(Object(n),!0).forEach((function(t){fp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fp(e,t,n){return(t=function(e){var t=function(e){if("object"!==op(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==op(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===op(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dp(e,t){var n,r="undefined"!=typeof window?window:{},u=e.plugins||[];return lp(lp({debug:!1,openOnFocus:!1,enterKeyHint:void 0,ignoreCompositionEvents:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:void 0,environment:r,shouldPanelOpen:function(e){return ad(e.state)>0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:"autocomplete-".concat(ud++),plugins:u,initialState:lp({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),u.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),u.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),u.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(function(e){return function(e){if(Array.isArray(e))return sp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return sp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sp(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(u.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:sd,onResolve:sd};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=Vd(Vd({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return rd(e)})).then((function(e){return e.map((function(e){return lp(lp({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:lp({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function pp(e){return pp="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},pp(e)}function hp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hp(Object(n),!0).forEach((function(t){mp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mp(e,t,n){return(t=function(e){var t=function(e){if("object"!==pp(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==pp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===pp(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dp(e){return Dp="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},Dp(e)}function yp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yp(Object(n),!0).forEach((function(t){Fp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fp(e,t,n){return(t=function(e){var t=function(e){if("object"!==Dp(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Dp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Dp(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ep(e){return function(e){if(Array.isArray(e))return bp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return bp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bp(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _p(e){return Boolean(e.execute)}function kp(e){var t=e.reduce((function(e,t){if(!_p(t))return e.push(t),e;var n=t.searchClient,r=t.execute,u=t.requesterId,a=t.requests,i=e.find((function(e){return _p(t)&&_p(e)&&e.searchClient===n&&Boolean(u)&&e.requesterId===u}));if(i){var o;(o=i.items).push.apply(o,Ep(a))}else{var s={execute:r,requesterId:u,items:a,searchClient:n};e.push(s)}return e}),[]).map((function(e){if(!_p(e))return Promise.resolve(e);var t=e,n=t.execute,r=t.items;return n({searchClient:t.searchClient,requests:r})}));return Promise.all(t).then((function(e){return rd(e)}))}function Cp(e){return Cp="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},Cp(e)}var Ap=["event","nextState","props","query","refresh","store"];function wp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wp(Object(n),!0).forEach((function(t){Sp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sp(e,t,n){return(t=function(e){var t=function(e){if("object"!==Cp(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Cp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Cp(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bp,Op,Ip,Tp=null,Pp=(Bp=-1,Op=-1,Ip=void 0,function(e){var t=++Bp;return Promise.resolve(e).then((function(e){return Ip&&t<Op?Ip:(Op=t,Ip=e,e)}))});function jp(e){var t=e.event,n=e.nextState,r=void 0===n?{}:n,u=e.props,a=e.query,i=e.refresh,o=e.store,s=function(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n,r,u={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}(e,Ap);Tp&&u.environment.clearTimeout(Tp);var c=s.setCollections,l=s.setIsOpen,f=s.setQuery,d=s.setActiveItemId,p=s.setStatus,h=s.setContext;if(f(a),d(u.defaultActiveItemId),!a&&!1===u.openOnFocus){var v,m=o.getState().collections.map((function(e){return xp(xp({},e),{},{items:[]})}));p("idle"),c(m),l(null!==(v=r.isOpen)&&void 0!==v?v:u.shouldPanelOpen({state:o.getState()}));var D=Rd(Pp(m).then((function(){return Promise.resolve()})));return o.pendingRequests.add(D)}p("loading"),Tp=u.environment.setTimeout((function(){p("stalled")}),u.stallThreshold);var y=Rd(Pp(u.getSources(xp({query:a,refresh:i,state:o.getState()},s)).then((function(e){return Promise.all(e.map((function(e){return Promise.resolve(e.getItems(xp({query:a,refresh:i,state:o.getState()},s))).then((function(t){return function(e,t,n){if(u=e,Boolean(null==u?void 0:u.execute)){var r="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(Ep(Object.keys(n.context).map((function(e){var t;return null===(t=n.context[e])||void 0===t?void 0:t.__algoliaSearchParameters}))))):{};return gp(gp({},e),{},{requests:e.queries.map((function(n){return{query:"algolia"===e.requesterId?gp(gp({},n),{},{params:gp(gp({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}}))})}var u;return{items:e,sourceId:t}}(t,e.sourceId,o.getState())}))}))).then(kp).then((function(t){var n,r=t.some((function(e){return function(e){return!Array.isArray(e)&&Boolean(null==e?void 0:e._automaticInsights)}(e.items)}));return r&&h({algoliaInsightsPlugin:xp(xp({},(null===(n=o.getState().context)||void 0===n?void 0:n.algoliaInsightsPlugin)||{}),{},{__automaticInsights:r})}),function(e,t,n){return t.map((function(t){var r,u=e.filter((function(e){return e.sourceId===t.sourceId})),a=u.map((function(e){return e.items})),i=u[0].transformResponse,o=i?i({results:r=a,hits:r.map((function(e){return e.hits})).filter(Boolean),facetHits:r.map((function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map((function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}}))})).filter(Boolean)}):a;return t.onResolve({source:t,results:a,items:o,state:n.getState()}),o.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:o}}))}(t,e,o)})).then((function(e){return function(e){var t=e.props,n=e.state,r=e.collections.reduce((function(e,t){return vp(vp({},e),{},mp({},t.source.sourceId,vp(vp({},t.source),{},{getItems:function(){return rd(t.items)}})))}),{}),u=t.plugins.reduce((function(e,t){return t.reshape?t.reshape(e):e}),{sourcesBySourceId:r,state:n}).sourcesBySourceId;return rd(t.reshape({sourcesBySourceId:u,sources:Object.values(u),state:n})).filter(Boolean).map((function(e){return{source:e,items:e.getItems()}}))}({collections:e,props:u,state:o.getState()})}))})))).then((function(e){var n;p("idle"),c(e);var f=u.shouldPanelOpen({state:o.getState()});l(null!==(n=r.isOpen)&&void 0!==n?n:u.openOnFocus&&!a&&f||f);var d=Gd(o.getState());if(null!==o.getState().activeItemId&&d){var h=d.item,v=d.itemInputValue,m=d.itemUrl,D=d.source;D.onActive(xp({event:t,item:h,itemInputValue:v,itemUrl:m,refresh:i,source:D,state:o.getState()},s))}})).finally((function(){p("idle"),Tp&&u.environment.clearTimeout(Tp)}));return o.pendingRequests.add(y)}function Np(e){return Np="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},Np(e)}var zp=["event","props","refresh","store"];function Rp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rp(Object(n),!0).forEach((function(t){Zp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zp(e,t,n){return(t=function(e){var t=function(e){if("object"!==Np(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Np(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Np(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lp(e){return Lp="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},Lp(e)}var $p=["props","refresh","store"],qp=["inputElement","formElement","panelElement"],Up=["inputElement"],Vp=["inputElement","maxLength"],Hp=["source"],Wp=["item","source"];function Kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kp(Object(n),!0).forEach((function(t){Gp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gp(e,t,n){return(t=function(e){var t=function(e){if("object"!==Lp(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Lp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Lp(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qp(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n,r,u={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function Yp(e){var t=e.props,n=e.refresh,r=e.store,u=Qp(e,$p);return{getEnvironmentProps:function(e){var n=e.inputElement,u=e.formElement,a=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[u,a].some((function(t){return(n=t)===(r=e.target)||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return Jp({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},Qp(e,qp))},getRootProps:function(e){return Jp({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-controls":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return Qd(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":Qd(t.id,"label")},e)},getFormProps:function(e){e.inputElement;var a=Qp(e,Up),i=function(a){var i;t.onSubmit(Jp({event:a,refresh:n,state:r.getState()},u)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()};return Jp({action:"",noValidate:!0,role:"search",onSubmit:function(e){e.preventDefault();var n=Jd(t.plugins,r.pendingRequests);void 0!==n?n.then((function(){return i(e)})):i(e)},onReset:function(a){var i;a.preventDefault(),t.onReset(Jp({event:a,refresh:n,state:r.getState()},u)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},a)},getLabelProps:function(e){return Jp({htmlFor:Qd(t.id,"input"),id:Qd(t.id,"label")},e)},getInputProps:function(e){var a;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&jp(Jp({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},u)),r.dispatch("focus",null)}var o=e||{};o.inputElement;var s=o.maxLength,c=void 0===s?512:s,l=Qp(o,Vp),f=Gd(r.getState()),d=function(e){return Boolean(e&&e.match(Yd))}((null===(a=t.environment.navigator)||void 0===a?void 0:a.userAgent)||""),p=t.enterKeyHint||(null!=f&&f.itemUrl&&!d?"go":"search");return Jp({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?Qd(t.id,"item-".concat(r.getState().activeItemId),null==f?void 0:f.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.filter((function(e){return e.items.length>0})).map((function(e){var n=e.source;return Qd(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":Qd(t.id,"label"),value:r.getState().completion||r.getState().query,id:Qd(t.id,"input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:p,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:"search",onChange:function(e){var a=e.currentTarget.value;t.ignoreCompositionEvents&&Xd(e).isComposing?u.setQuery(a):jp(Jp({event:e,props:t,query:a.slice(0,c),refresh:n,store:r},u))},onCompositionEnd:function(e){jp(Jp({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},u))},onKeyDown:function(e){Xd(e).isComposing||function(e){var t=e.event,n=e.props,r=e.refresh,u=e.store,a=function(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n,r,u={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}(e,zp);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=Gd(u.getState()),t=n.environment.document.getElementById(Qd(n.id,"item-".concat(u.getState().activeItemId),null==e?void 0:e.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},o=function(){var e=Gd(u.getState());if(null!==u.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,o=e.itemUrl,s=e.source;s.onActive(Mp({event:t,item:n,itemInputValue:i,itemUrl:o,refresh:r,source:s,state:u.getState()},a))}};t.preventDefault(),!1===u.getState().isOpen&&(n.openOnFocus||Boolean(u.getState().query))?jp(Mp({event:t,props:n,query:u.getState().query,refresh:r,store:u},a)).then((function(){u.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),o(),setTimeout(i,0)})):(u.dispatch(t.key,{}),o(),i())}else if("Escape"===t.key)t.preventDefault(),u.dispatch(t.key,null),u.pendingRequests.cancelAll();else if("Tab"===t.key)u.dispatch("blur",null),u.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===u.getState().activeItemId||u.getState().collections.every((function(e){return 0===e.items.length}))){var s=Jd(n.plugins,u.pendingRequests);return void(void 0!==s?s.then(u.pendingRequests.cancelAll):n.debug||u.pendingRequests.cancelAll())}t.preventDefault();var c=Gd(u.getState()),l=c.item,f=c.itemInputValue,d=c.itemUrl,p=c.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(p.onSelect(Mp({event:t,item:l,itemInputValue:f,itemUrl:d,refresh:r,source:p,state:u.getState()},a)),n.navigator.navigateNewTab({itemUrl:d,item:l,state:u.getState()}));else if(t.shiftKey)void 0!==d&&(p.onSelect(Mp({event:t,item:l,itemInputValue:f,itemUrl:d,refresh:r,source:p,state:u.getState()},a)),n.navigator.navigateNewWindow({itemUrl:d,item:l,state:u.getState()}));else if(t.altKey);else{if(void 0!==d)return p.onSelect(Mp({event:t,item:l,itemInputValue:f,itemUrl:d,refresh:r,source:p,state:u.getState()},a)),void n.navigator.navigate({itemUrl:d,item:l,state:u.getState()});jp(Mp({event:t,nextState:{isOpen:!1},props:n,query:f,refresh:r,store:u},a)).then((function(){p.onSelect(Mp({event:t,item:l,itemInputValue:f,itemUrl:d,refresh:r,source:p,state:u.getState()},a))}))}}}(Jp({event:e,props:t,refresh:n,store:r},u))},onFocus:i,onBlur:sd,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},l)},getPanelProps:function(e){return Jp({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.source,u=Qp(n,Hp);return Jp({role:"listbox","aria-labelledby":Qd(t.id,"label"),id:Qd(t.id,"list",r)},u)},getItemProps:function(e){var a=e.item,i=e.source,o=Qp(e,Wp);return Jp({id:Qd(t.id,"item-".concat(a.__autocomplete_id),i),role:"option","aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",a.__autocomplete_id);var t=Gd(r.getState());if(null!==r.getState().activeItemId&&t){var i=t.item,o=t.itemInputValue,s=t.itemUrl,c=t.source;c.onActive(Jp({event:e,item:i,itemInputValue:o,itemUrl:s,refresh:n,source:c,state:r.getState()},u))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var o=i.getItemInputValue({item:a,state:r.getState()}),s=i.getItemUrl({item:a,state:r.getState()});(s?Promise.resolve():jp(Jp({event:e,nextState:{isOpen:!1},props:t,query:o,refresh:n,store:r},u))).then((function(){i.onSelect(Jp({event:e,item:a,itemInputValue:o,itemUrl:s,refresh:n,source:i,state:r.getState()},u))}))}},o)}}}function Xp(e){return Xp="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},Xp(e)}function eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function th(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eh(Object(n),!0).forEach((function(t){nh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nh(e,t,n){return(t=function(e){var t=function(e){if("object"!==Xp(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Xp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Xp(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rh(e){var t,n,r,u,a=e.plugins,i=e.options,o=null===(t=((null===(n=i.__autocomplete_metadata)||void 0===n?void 0:n.userAgents)||[])[0])||void 0===t?void 0:t.segment,s=o?nh({},o,Object.keys((null===(r=i.__autocomplete_metadata)||void 0===r?void 0:r.options)||{})):{};return{plugins:a.map((function(e){return{name:e.name,options:Object.keys(e.__autocomplete_pluginOptions||[])}})),options:th({"autocomplete-core":Object.keys(i)},s),ua:cd.concat((null===(u=i.__autocomplete_metadata)||void 0===u?void 0:u.userAgents)||[])}}function uh(e){var t,n=e.state;return!1===n.isOpen||null===n.activeItemId?null:(null===(t=Gd(n))||void 0===t?void 0:t.itemInputValue)||null}function ah(e){return ah="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},ah(e)}function ih(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ih(Object(n),!0).forEach((function(t){sh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ih(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sh(e,t,n){return(t=function(e){var t=function(e){if("object"!==ah(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==ah(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ah(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ch=function(e,t){switch(t.type){case"setActiveItemId":case"mousemove":return oh(oh({},e),{},{activeItemId:t.payload});case"setQuery":return oh(oh({},e),{},{query:t.payload,completion:null});case"setCollections":return oh(oh({},e),{},{collections:t.payload});case"setIsOpen":return oh(oh({},e),{},{isOpen:t.payload});case"setStatus":return oh(oh({},e),{},{status:t.payload});case"setContext":return oh(oh({},e),{},{context:oh(oh({},e.context),t.payload)});case"ArrowDown":var n=oh(oh({},e),{},{activeItemId:t.payload.hasOwnProperty("nextActiveItemId")?t.payload.nextActiveItemId:qd(1,e.activeItemId,ad(e),t.props.defaultActiveItemId)});return oh(oh({},n),{},{completion:uh({state:n})});case"ArrowUp":var r=oh(oh({},e),{},{activeItemId:qd(-1,e.activeItemId,ad(e),t.props.defaultActiveItemId)});return oh(oh({},r),{},{completion:uh({state:r})});case"Escape":return e.isOpen?oh(oh({},e),{},{activeItemId:null,isOpen:!1,completion:null}):oh(oh({},e),{},{activeItemId:null,query:"",status:"idle",collections:[]});case"submit":return oh(oh({},e),{},{activeItemId:null,isOpen:!1,status:"idle"});case"reset":return oh(oh({},e),{},{activeItemId:!0===t.props.openOnFocus?t.props.defaultActiveItemId:null,status:"idle",completion:null,query:""});case"focus":return oh(oh({},e),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||Boolean(e.query))&&t.props.shouldPanelOpen({state:e})});case"blur":return t.props.debug?e:oh(oh({},e),{},{isOpen:!1,activeItemId:null});case"mouseleave":return oh(oh({},e),{},{activeItemId:t.props.defaultActiveItemId});default:return"The reducer action ".concat(JSON.stringify(t.type)," is not supported."),e}};function lh(e){return lh="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},lh(e)}function fh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fh(Object(n),!0).forEach((function(t){ph(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ph(e,t,n){return(t=function(e){var t=function(e){if("object"!==lh(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==lh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===lh(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hh(e){var t=[],n=dp(e,t),r=function(e,t,n){var r=t.initialState;return{getState:function(){return r},dispatch:function(u,a){var i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tp(Object(n),!0).forEach((function(t){np(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},r);r=e(r,{type:u,props:t,payload:a}),n({state:r,prevState:i})},pendingRequests:$d()}}(ch,n,(function(e){var t,r,a=e.prevState,c=e.state;if(n.onStateChange(dh({prevState:a,state:c,refresh:i,navigator:n.navigator},u)),!s()&&null!==(t=c.context)&&void 0!==t&&null!==(r=t.algoliaInsightsPlugin)&&void 0!==r&&r.__automaticInsights&&!1!==n.insights){var l=Pd({__autocomplete_clickAnalytics:!1});n.plugins.push(l),o([l])}})),u=function(e){var t=e.store;return{setActiveItemId:function(e){t.dispatch("setActiveItemId",e)},setQuery:function(e){t.dispatch("setQuery",e)},setCollections:function(e){var n=0,r=e.map((function(e){return ap(ap({},e),{},{items:rd(e.items).map((function(e){return ap(ap({},e),{},{__autocomplete_id:n++})}))})}));t.dispatch("setCollections",r)},setIsOpen:function(e){t.dispatch("setIsOpen",e)},setStatus:function(e){t.dispatch("setStatus",e)},setContext:function(e){t.dispatch("setContext",e)}}}({store:r}),a=Yp(dh({props:n,refresh:i,store:r,navigator:n.navigator},u));function i(){return jp(dh({event:new Event("input"),nextState:{isOpen:r.getState().isOpen},props:n,navigator:n.navigator,query:r.getState().query,refresh:i,store:r},u))}function o(e){e.forEach((function(e){var r;return null===(r=e.subscribe)||void 0===r?void 0:r.call(e,dh(dh({},u),{},{navigator:n.navigator,refresh:i,onSelect:function(e){t.push({onSelect:e})},onActive:function(e){t.push({onActive:e})},onResolve:function(e){t.push({onResolve:e})}}))}))}function s(){return n.plugins.some((function(e){return"aa.algoliaInsightsPlugin"===e.name}))}if(n.insights&&!s()){var c="boolean"==typeof n.insights?{}:n.insights;n.plugins.push(Pd(c))}return o(n.plugins),function(e){var t,n,r=e.metadata,u=e.environment;if(null===(t=u.navigator)||void 0===t||null===(n=t.userAgent)||void 0===n?void 0:n.includes("Algolia Crawler")){var a=u.document.createElement("meta"),i=u.document.querySelector("head");a.name="algolia:metadata",setTimeout((function(){a.content=JSON.stringify(r),i.appendChild(a)}),0)}}({metadata:rh({plugins:n.plugins,options:e}),environment:n.environment}),dh(dh({refresh:i,navigator:n.navigator},a),u)}var vh="https://askai.algolia.com/chat",mh="askai_token",Dh=function(e){if(!e)return!0;try{var t=function(e){var t=cn(e.split("."),1)[0];return JSON.parse(atob(t))}(e),n=t.exp;return Date.now()/1e3>n-30}catch(e){return!0}},yh=null,gh=function(){var e=Vt(on().mark((function e(t){var n,r;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.assistantId,r=sessionStorage.getItem(mh),Dh(r)){e.next=4;break}return e.abrupt("return",r);case 4:return yh||(yh=fetch("".concat(vh,"/token"),{method:"POST",headers:{"x-algolia-assistant-id":n,"content-type":"application/json"}}).then((function(e){return e.json()})).then((function(e){var t=e.token;return sessionStorage.setItem(mh,t),t})).finally((function(){return yh=null}))),e.abrupt("return",yh);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Fh=function(){var e=Vt(on().mark((function e(t){var n,r,u,a,i,o;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.assistantId,r=t.thumbs,u=t.messageId,a=t.appId,(i=new Headers).set("x-algolia-assistant-id",n),i.set("content-type","application/json"),e.next=7,gh({assistantId:n});case 7:o=e.sent,i.set("authorization","TOKEN ".concat(o));case 9:return e.abrupt("return",fetch("".concat(vh,"/feedback"),{method:"POST",body:JSON.stringify({appId:a,messageId:u,thumbs:r}),headers:i}));case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function Eh(e){var t=e.translations,n=(void 0===t?{}:t).poweredByText,r=void 0===n?"Powered by":n;return jt.createElement("a",{href:"https://www.algolia.com/ref/docsearch/?utm_source=".concat(window.location.hostname,"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"),target:"_blank",rel:"noopener noreferrer"},jt.createElement("span",{className:"DocSearch-Label"},r),jt.createElement("svg",{width:"80",height:"24","aria-label":"Algolia",role:"img",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2196.2 500"},jt.createElement("defs",null,jt.createElement("style",null,".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}")),jt.createElement("path",{className:"cls-2",d:"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),jt.createElement("rect",{className:"cls-1",x:"1845.88",y:"104.73",width:"62.58",height:"277.9",rx:"5.9",ry:"5.9"}),jt.createElement("path",{className:"cls-2",d:"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"}),jt.createElement("path",{className:"cls-2",d:"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),jt.createElement("path",{className:"cls-2",d:"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"}),jt.createElement("path",{className:"cls-2",d:"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),jt.createElement("path",{className:"cls-2",d:"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),jt.createElement("path",{className:"cls-2",d:"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"}),jt.createElement("path",{className:"cls-1",d:"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"})))}function bh(e){return jt.createElement("svg",{width:"20",height:"20","aria-label":e.ariaLabel,viewBox:"0 0 24 24",role:"img"},jt.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.4"},e.children))}function _h(e){var t=e.translations,n=void 0===t?{}:t,r=e.isAskAiActive,u=void 0!==r&&r,a=n.selectText,i=void 0===a?"Select":a,o=n.selectKeyAriaLabel,s=void 0===o?"Enter key":o,c=n.submitQuestionText,l=void 0===c?"Submit question":c,f=n.navigateText,d=void 0===f?"Navigate":f,p=n.navigateUpKeyAriaLabel,h=void 0===p?"Arrow up":p,v=n.navigateDownKeyAriaLabel,m=void 0===v?"Arrow down":v,D=n.closeText,y=void 0===D?"Close":D,g=n.backToSearchText,F=void 0===g?"Back to search":g,E=n.closeKeyAriaLabel,b=void 0===E?"Escape key":E,_=n.poweredByText,k=void 0===_?"Powered by":_;return jt.createElement(jt.Fragment,null,jt.createElement("div",{className:"DocSearch-Logo"},jt.createElement(Eh,{translations:{poweredByText:k}})),jt.createElement("ul",{className:"DocSearch-Commands"},jt.createElement("li",null,jt.createElement("kbd",{className:"DocSearch-Commands-Key"},jt.createElement(bh,{ariaLabel:m},jt.createElement("path",{d:"M12 5v14"}),jt.createElement("path",{d:"m19 12-7 7-7-7"}))),jt.createElement("kbd",{className:"DocSearch-Commands-Key"},jt.createElement(bh,{ariaLabel:h},jt.createElement("path",{d:"m5 12 7-7 7 7"}),jt.createElement("path",{d:"M12 19V5"}))),jt.createElement("span",{className:"DocSearch-Label"},d)),jt.createElement("li",null,jt.createElement("kbd",{className:"DocSearch-Commands-Key"},jt.createElement(bh,{ariaLabel:s},jt.createElement("polyline",{points:"9 10 4 15 9 20"}),jt.createElement("path",{d:"M20 4v7a4 4 0 0 1-4 4H4"}))),jt.createElement("span",{className:"DocSearch-Label"},u?l:i)),jt.createElement("li",null,jt.createElement("kbd",{className:"DocSearch-Commands-Key"},jt.createElement("span",{className:"DocSearch-Escape-Key"},"ESC")),jt.createElement("span",{className:"DocSearch-Label","aria-label":b},u?F:y))))}function kh(e){var t=e.hit,n=e.children;return jt.createElement("a",{href:t.url},n)}function Ch(e){var t=e.className;return jt.createElement("svg",{viewBox:"0 0 38 38",className:t,stroke:"currentColor",strokeOpacity:".5"},jt.createElement("g",{fill:"none",fillRule:"evenodd"},jt.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},jt.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),jt.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},jt.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}function Ah(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",className:"DocSearch-Hit-icon-sparkles"},jt.createElement("path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}),jt.createElement("path",{d:"M20 3v4"}),jt.createElement("path",{d:"M22 5h-4"}),jt.createElement("path",{d:"M4 17v2"}),jt.createElement("path",{d:"M5 18H3"}))}function wh(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},jt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("path",{d:"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0"}),jt.createElement("path",{d:"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13"})))}function xh(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},jt.createElement("path",{d:"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Sh(){return jt.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",className:"lucide lucide-triangle-alert-icon lucide-triangle-alert"},jt.createElement("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"}),jt.createElement("path",{d:"M12 9v4"}),jt.createElement("path",{d:"M12 17h.01"}))}function Bh(){return jt.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},jt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),jt.createElement("path",{d:"M8 17l-6-6 6-6"})))}var Oh=function(){return jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),jt.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),jt.createElement("path",{d:"M10 9H8"}),jt.createElement("path",{d:"M16 13H8"}),jt.createElement("path",{d:"M16 17H8"}))};function Ih(e){switch(e.type){case"lvl1":return jt.createElement(Oh,null);case"content":return jt.createElement(Ph,null);default:return jt.createElement(Th,null)}}function Th(){return jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("line",{x1:"4",x2:"20",y1:"9",y2:"9"}),jt.createElement("line",{x1:"4",x2:"20",y1:"15",y2:"15"}),jt.createElement("line",{x1:"10",x2:"8",y1:"3",y2:"21"}),jt.createElement("line",{x1:"16",x2:"14",y1:"3",y2:"21"}))}function Ph(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},jt.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function jh(){return jt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},jt.createElement("path",{d:"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Nh(){return jt.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("path",{d:"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0"}))}function zh(){return jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 24 24",fill:"none",stroke:"#5a5e9a",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("path",{d:"m13.5 8.5-5 5"}),jt.createElement("path",{d:"m8.5 8.5 5 5"}),jt.createElement("circle",{cx:"11",cy:"11",r:"8"}),jt.createElement("path",{d:"m21 21-4.3-4.3"}))}var Rh,Mh={before:"Searched for ",separator:", ",lastSeparator:" and ",after:""};function Zh(e){var t=e.queries,n=e.translations,r=e.onSearchQueryClick;if(0===t.length)return null;if("function"==typeof n.aggregatedToolCallNode)return jt.createElement(jt.Fragment,null,n.aggregatedToolCallNode(t,r));var u=(n.aggregatedToolCallText?n.aggregatedToolCallText(t):Mh)||{},a=u.before,i=void 0===a?"":a,o=u.separator,s=void 0===o?", ":o,c=u.lastSeparator,l=void 0===c?" and ":c,f=u.after,d=void 0===f?"":f;return jt.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--AggregatedResult"},jt.createElement(Fn,{size:18}),jt.createElement("span",null,i&&jt.createElement("span",null,i),t.map((function(e,n){return jt.createElement(V,{key:e+n},jt.createElement("span",{role:"button",tabIndex:0,className:"DocSearch-AskAiScreen-MessageContent-Tool-Query",onKeyDown:function(t){"enter"!==t.key&&" "!==t.key||(t.preventDefault(),r(e))},onClick:function(){return r(e)}},'"',e,'"'),n<t.length-2&&s,n===t.length-2&&l)})),d&&jt.createElement("span",null,d)))}var Lh={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function $h(e){Lh=e}var qh={exec:function(){return null}};function Uh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="string"==typeof e?e:e.source,r={replace:function(e,t){var u="string"==typeof t?t:t.source;return u=u.replace(Vh.caret,"$1"),n=n.replace(e,u),r},getRegex:function(){return new RegExp(n,t)}};return r}var Vh={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDD40-\uDD65\uDD6F-\uDD85\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC4\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDED0-\uDEE3\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0\uDFF0-\uDFF9]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D\uDD30-\uDD39]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDD70-\uDD79\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD833[\uDCF0-\uDCF9]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDDD0-\uDDED\uDDF0-\uDDFA\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:function(e){return new RegExp("^( {0,3}".concat(e,")((?:[\t ][^\\n]*)?(?:\\n|$))"))},nextBulletRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))"))},hrRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"))},fencesBeginRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}(?:```|~~~)"))},headingBeginRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}#"))},htmlBeginRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}<(?:[a-z].*>|!--)"),"i")}},Hh=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Wh=/(?:[*+-]|\d{1,9}[.)])/,Kh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Jh=Uh(Kh).replace(/bull/g,Wh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Gh=Uh(Kh).replace(/bull/g,Wh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Qh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Yh=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Xh=Uh(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ev=Uh(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Wh).getRegex(),tv="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",nv=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,rv=Uh("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",nv).replace("tag",tv).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),uv=Uh(Qh).replace("hr",Hh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tv).getRegex(),av={blockquote:Uh(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",uv).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Xh,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Hh,html:rv,lheading:Jh,list:ev,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:uv,table:qh,text:/^[^\n]+/},iv=Uh("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Hh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tv).getRegex(),ov=un(un({},av),{},{lheading:Gh,table:iv,paragraph:Uh(Qh).replace("hr",Hh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",iv).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tv).getRegex()}),sv=un(un({},av),{},{html:Uh("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",nv).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:qh,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Uh(Qh).replace("hr",Hh).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Jh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),cv=/^( {2,}|\\)\n(?!\s*$)/,lv=/(?:[!-\/:-@\[-`\{-~\xA1-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2010-\u2027\u2030-\u205E\u207A-\u207E\u208A-\u208E\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBC2\uFD3E-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDD00-\uDEB3\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF])/,fv=/(?:[\t-\r -\/:-@\[-`\{-~\xA0-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2000-\u200A\u2010-\u2029\u202F-\u205F\u207A-\u207E\u208A-\u208E\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBC2\uFD3E-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDD00-\uDEB3\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF])/,dv=/(?:[\0-\x08\x0E-\x1F0-9A-Za-z\x7F-\x9F\xAA\xAD\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u037D\u037F-\u0383\u0386\u0388-\u03F5\u03F7-\u0481\u0483-\u0559\u0560-\u0588\u058B\u058C\u0590-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05F2\u05F5-\u0605\u0610-\u061A\u061C\u0620-\u0669\u066E-\u06D3\u06D5-\u06DD\u06DF-\u06E8\u06EA-\u06FC\u06FF\u070E-\u07F5\u07FA-\u07FD\u0800-\u082F\u083F-\u085D\u085F-\u0887\u0889-\u0963\u0966-\u096F\u0971-\u09F1\u09F4-\u09F9\u09FC\u09FE-\u0A75\u0A77-\u0AEF\u0AF2-\u0B6F\u0B71-\u0BF2\u0BFB-\u0C76\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0D4E\u0D50-\u0D78\u0D7A-\u0DF3\u0DF5-\u0E3E\u0E40-\u0E4E\u0E50-\u0E59\u0E5C-\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F84\u0F86-\u0FBD\u0FC6\u0FCD\u0FDB-\u1049\u1050-\u109D\u10A0-\u10FA\u10FC-\u135F\u1369-\u138F\u139A-\u13FF\u1401-\u166C\u166F-\u167F\u1681-\u169A\u169D-\u16EA\u16EE-\u1734\u1737-\u17D3\u17D7\u17DC-\u17FF\u180B-\u193F\u1941-\u1943\u1946-\u19DD\u1A00-\u1A1D\u1A20-\u1A9F\u1AA7\u1AAE-\u1B4D\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BFB\u1C00-\u1C3A\u1C40-\u1C7D\u1C80-\u1CBF\u1CC8-\u1CD2\u1CD4-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDC\u1FE0-\u1FEC\u1FF0-\u1FFC\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u2079\u207F-\u2089\u208F-\u209F\u20C1-\u20FF\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u218C-\u218F\u242A-\u243F\u244B-\u249B\u24EA-\u24FF\u2776-\u2793\u2B74\u2B75\u2B96\u2C00-\u2CE4\u2CEB-\u2CF8\u2CFD\u2D00-\u2D6F\u2D71-\u2DFF\u2E2F\u2E5E-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3040-\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u318F\u3192-\u3195\u31A0-\u31BF\u31E6-\u31EE\u31F0-\u31FF\u321F-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48F\uA4C7-\uA4FD\uA500-\uA60C\uA610-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA6F8-\uA6FF\uA717-\uA71F\uA722-\uA788\uA78B-\uA827\uA82C-\uA835\uA83A-\uA873\uA878-\uA8CD\uA8D0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA95E\uA960-\uA9C0\uA9CE-\uA9DD\uA9E0-\uAA5B\uAA60-\uAA76\uAA7A-\uAADD\uAAE0-\uAAEF\uAAF2-\uAB5A\uAB5C-\uAB69\uAB6C-\uABEA\uABEC-\uD7FF\uE000-\uFB28\uFB2A-\uFBB1\uFBC3-\uFD3D\uFD50-\uFDCE\uFDD0-\uFDFB\uFE00-\uFE0F\uFE1A-\uFE2F\uFE53\uFE67\uFE6C-\uFEFE\uFF00\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]|\uD800[\uDC00-\uDCFF\uDD03-\uDD36\uDD40-\uDD78\uDD8A\uDD8B\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFD-\uDF9E\uDFA0-\uDFCF\uDFD1-\uDFFF]|\uD801[\uDC00-\uDD6E\uDD70-\uDFFF]|\uD802[\uDC00-\uDC56\uDC58-\uDC76\uDC79-\uDD1E\uDD20-\uDD3E\uDD40-\uDE4F\uDE59-\uDE7E\uDE80-\uDEC7\uDEC9-\uDEEF\uDEF7-\uDF38\uDF40-\uDF98\uDF9D-\uDFFF]|\uD803[\uDC00-\uDD6D\uDD6F-\uDD8D\uDD90-\uDEAC\uDEAE-\uDF54\uDF5A-\uDF85\uDF8A-\uDFFF]|\uD804[\uDC00-\uDC46\uDC4E-\uDCBA\uDCBD\uDCC2-\uDD3F\uDD44-\uDD73\uDD76-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE0-\uDE37\uDE3E-\uDEA8\uDEAA-\uDFD3\uDFD6\uDFD9-\uDFFF]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5C\uDC5E-\uDCC5\uDCC7-\uDDC0\uDDD8-\uDE40\uDE44-\uDE5F\uDE6D-\uDEB8\uDEBA-\uDF3B\uDF40-\uDFFF]|\uD806[\uDC00-\uDC3A\uDC3C-\uDD43\uDD47-\uDDE1\uDDE3-\uDE3E\uDE47-\uDE99\uDE9D\uDEA3-\uDEFF\uDF0A-\uDFE0\uDFE2-\uDFFF]|\uD807[\uDC00-\uDC40\uDC46-\uDC6F\uDC72-\uDEF6\uDEF9-\uDF42\uDF50-\uDFD4\uDFF2-\uDFFE]|[\uD808\uD80A\uD80C-\uD819\uD81C-\uD82E\uD830-\uD832\uD837\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD809[\uDC00-\uDC6F\uDC75-\uDFFF]|\uD80B[\uDC00-\uDFF0\uDFF3-\uDFFF]|\uD81A[\uDC00-\uDE6D\uDE70-\uDEF4\uDEF6-\uDF36\uDF40-\uDF43\uDF46-\uDFFF]|\uD81B[\uDC00-\uDD6C\uDD70-\uDE96\uDE9B-\uDFE1\uDFE3-\uDFFF]|\uD82F[\uDC00-\uDC9B\uDC9D\uDC9E\uDCA0-\uDFFF]|\uD833[\uDCF0-\uDCFF\uDEB4-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDDEB-\uDDFF\uDE42-\uDE44\uDE46-\uDEFF\uDF57-\uDFFF]|\uD835[\uDC00-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE8C-\uDFFF]|\uD838[\uDC00-\uDD4E\uDD50-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDDFE\uDE00-\uDFFF]|\uD83A[\uDC00-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDD2D\uDD2F-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDD0C\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDB\uDEED-\uDEEF\uDEFD-\uDEFF\uDF77-\uDF7A\uDFDA-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCFF\uDE54-\uDE5F\uDE6E\uDE6F\uDE7D-\uDE7F\uDE8A-\uDE8E\uDEC7-\uDECD\uDEDD\uDEDE\uDEEA-\uDEEF\uDEF9-\uDEFF\uDF93\uDFF0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,pv=Uh(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,fv).getRegex(),hv=/(?!~)(?:[!-\/:-@\[-`\{-~\xA1-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2010-\u2027\u2030-\u205E\u207A-\u207E\u208A-\u208E\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBC2\uFD3E-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDD00-\uDEB3\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF])/,vv=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,mv=Uh(vv,"u").replace(/punct/g,lv).getRegex(),Dv=Uh(vv,"u").replace(/punct/g,hv).getRegex(),yv="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",gv=Uh(yv,"gu").replace(/notPunctSpace/g,dv).replace(/punctSpace/g,fv).replace(/punct/g,lv).getRegex(),Fv=Uh(yv,"gu").replace(/notPunctSpace/g,/(?:(?:[\0-\x08\x0E-\x1F0-9A-Za-z\x7F-\x9F\xAA\xAD\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u037D\u037F-\u0383\u0386\u0388-\u03F5\u03F7-\u0481\u0483-\u0559\u0560-\u0588\u058B\u058C\u0590-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05F2\u05F5-\u0605\u0610-\u061A\u061C\u0620-\u0669\u066E-\u06D3\u06D5-\u06DD\u06DF-\u06E8\u06EA-\u06FC\u06FF\u070E-\u07F5\u07FA-\u07FD\u0800-\u082F\u083F-\u085D\u085F-\u0887\u0889-\u0963\u0966-\u096F\u0971-\u09F1\u09F4-\u09F9\u09FC\u09FE-\u0A75\u0A77-\u0AEF\u0AF2-\u0B6F\u0B71-\u0BF2\u0BFB-\u0C76\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0D4E\u0D50-\u0D78\u0D7A-\u0DF3\u0DF5-\u0E3E\u0E40-\u0E4E\u0E50-\u0E59\u0E5C-\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F84\u0F86-\u0FBD\u0FC6\u0FCD\u0FDB-\u1049\u1050-\u109D\u10A0-\u10FA\u10FC-\u135F\u1369-\u138F\u139A-\u13FF\u1401-\u166C\u166F-\u167F\u1681-\u169A\u169D-\u16EA\u16EE-\u1734\u1737-\u17D3\u17D7\u17DC-\u17FF\u180B-\u193F\u1941-\u1943\u1946-\u19DD\u1A00-\u1A1D\u1A20-\u1A9F\u1AA7\u1AAE-\u1B4D\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BFB\u1C00-\u1C3A\u1C40-\u1C7D\u1C80-\u1CBF\u1CC8-\u1CD2\u1CD4-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDC\u1FE0-\u1FEC\u1FF0-\u1FFC\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u2079\u207F-\u2089\u208F-\u209F\u20C1-\u20FF\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u218C-\u218F\u242A-\u243F\u244B-\u249B\u24EA-\u24FF\u2776-\u2793\u2B74\u2B75\u2B96\u2C00-\u2CE4\u2CEB-\u2CF8\u2CFD\u2D00-\u2D6F\u2D71-\u2DFF\u2E2F\u2E5E-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3040-\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u318F\u3192-\u3195\u31A0-\u31BF\u31E6-\u31EE\u31F0-\u31FF\u321F-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48F\uA4C7-\uA4FD\uA500-\uA60C\uA610-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA6F8-\uA6FF\uA717-\uA71F\uA722-\uA788\uA78B-\uA827\uA82C-\uA835\uA83A-\uA873\uA878-\uA8CD\uA8D0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA95E\uA960-\uA9C0\uA9CE-\uA9DD\uA9E0-\uAA5B\uAA60-\uAA76\uAA7A-\uAADD\uAAE0-\uAAEF\uAAF2-\uAB5A\uAB5C-\uAB69\uAB6C-\uABEA\uABEC-\uD7FF\uE000-\uFB28\uFB2A-\uFBB1\uFBC3-\uFD3D\uFD50-\uFDCE\uFDD0-\uFDFB\uFE00-\uFE0F\uFE1A-\uFE2F\uFE53\uFE67\uFE6C-\uFEFE\uFF00\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]|\uD800[\uDC00-\uDCFF\uDD03-\uDD36\uDD40-\uDD78\uDD8A\uDD8B\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFD-\uDF9E\uDFA0-\uDFCF\uDFD1-\uDFFF]|\uD801[\uDC00-\uDD6E\uDD70-\uDFFF]|\uD802[\uDC00-\uDC56\uDC58-\uDC76\uDC79-\uDD1E\uDD20-\uDD3E\uDD40-\uDE4F\uDE59-\uDE7E\uDE80-\uDEC7\uDEC9-\uDEEF\uDEF7-\uDF38\uDF40-\uDF98\uDF9D-\uDFFF]|\uD803[\uDC00-\uDD6D\uDD6F-\uDD8D\uDD90-\uDEAC\uDEAE-\uDF54\uDF5A-\uDF85\uDF8A-\uDFFF]|\uD804[\uDC00-\uDC46\uDC4E-\uDCBA\uDCBD\uDCC2-\uDD3F\uDD44-\uDD73\uDD76-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE0-\uDE37\uDE3E-\uDEA8\uDEAA-\uDFD3\uDFD6\uDFD9-\uDFFF]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5C\uDC5E-\uDCC5\uDCC7-\uDDC0\uDDD8-\uDE40\uDE44-\uDE5F\uDE6D-\uDEB8\uDEBA-\uDF3B\uDF40-\uDFFF]|\uD806[\uDC00-\uDC3A\uDC3C-\uDD43\uDD47-\uDDE1\uDDE3-\uDE3E\uDE47-\uDE99\uDE9D\uDEA3-\uDEFF\uDF0A-\uDFE0\uDFE2-\uDFFF]|\uD807[\uDC00-\uDC40\uDC46-\uDC6F\uDC72-\uDEF6\uDEF9-\uDF42\uDF50-\uDFD4\uDFF2-\uDFFE]|[\uD808\uD80A\uD80C-\uD819\uD81C-\uD82E\uD830-\uD832\uD837\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD809[\uDC00-\uDC6F\uDC75-\uDFFF]|\uD80B[\uDC00-\uDFF0\uDFF3-\uDFFF]|\uD81A[\uDC00-\uDE6D\uDE70-\uDEF4\uDEF6-\uDF36\uDF40-\uDF43\uDF46-\uDFFF]|\uD81B[\uDC00-\uDD6C\uDD70-\uDE96\uDE9B-\uDFE1\uDFE3-\uDFFF]|\uD82F[\uDC00-\uDC9B\uDC9D\uDC9E\uDCA0-\uDFFF]|\uD833[\uDCF0-\uDCFF\uDEB4-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDDEB-\uDDFF\uDE42-\uDE44\uDE46-\uDEFF\uDF57-\uDFFF]|\uD835[\uDC00-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE8C-\uDFFF]|\uD838[\uDC00-\uDD4E\uDD50-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDDFE\uDE00-\uDFFF]|\uD83A[\uDC00-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDD2D\uDD2F-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDD0C\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDB\uDEED-\uDEEF\uDEFD-\uDEFF\uDF77-\uDF7A\uDFDA-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCFF\uDE54-\uDE5F\uDE6E\uDE6F\uDE7D-\uDE7F\uDE8A-\uDE8E\uDEC7-\uDECD\uDEDD\uDEDE\uDEEA-\uDEEF\uDEF9-\uDEFF\uDF93\uDFF0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|~)/).replace(/punctSpace/g,/(?!~)(?:[\t-\r -\/:-@\[-`\{-~\xA0-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2000-\u200A\u2010-\u2029\u202F-\u205F\u207A-\u207E\u208A-\u208E\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBC2\uFD3E-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDD00-\uDEB3\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF])/).replace(/punct/g,hv).getRegex(),Ev=Uh("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,dv).replace(/punctSpace/g,fv).replace(/punct/g,lv).getRegex(),bv=Uh(/\\(punct)/,"gu").replace(/punct/g,lv).getRegex(),_v=Uh(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),kv=Uh(nv).replace("(?:--\x3e|$)","--\x3e").getRegex(),Cv=Uh("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",kv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Av=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,wv=Uh(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Av).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xv=Uh(/^!?\[(label)\]\[(ref)\]/).replace("label",Av).replace("ref",Yh).getRegex(),Sv=Uh(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yh).getRegex(),Bv={_backpedal:qh,anyPunctuation:bv,autolink:_v,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:cv,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:qh,emStrongLDelim:mv,emStrongRDelimAst:gv,emStrongRDelimUnd:Ev,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:wv,nolink:Sv,punctuation:pv,reflink:xv,reflinkSearch:Uh("reflink|nolink(?!\\()","g").replace("reflink",xv).replace("nolink",Sv).getRegex(),tag:Cv,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:qh},Ov=un(un({},Bv),{},{link:Uh(/^!?\[(label)\]\((.*?)\)/).replace("label",Av).getRegex(),reflink:Uh(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Av).getRegex()}),Iv=un(un({},Bv),{},{emStrongRDelimAst:Fv,emStrongLDelim:Dv,url:Uh(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Tv=un(un({},Iv),{},{br:Uh(cv).replace("{2,}","*").getRegex(),text:Uh(Iv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Pv={normal:av,gfm:ov,pedantic:sv},jv={normal:Bv,gfm:Iv,breaks:Tv,pedantic:Ov},Nv={"&":"&","<":"<",">":">",'"':""","'":"'"},zv=function(e){return Nv[e]};function Rv(e,t){if(t){if(Vh.escapeTest.test(e))return e.replace(Vh.escapeReplace,zv)}else if(Vh.escapeTestNoEncode.test(e))return e.replace(Vh.escapeReplaceNoEncode,zv);return e}function Mv(e){try{e=encodeURI(e).replace(Vh.percentDecode,"%")}catch(e){return null}return e}function Zv(e,t){var n,r=e.replace(Vh.findPipe,(function(e,t,n){for(var r=!1,u=t;--u>=0&&"\\"===n[u];)r=!r;return r?"|":" |"})).split(Vh.splitPipe),u=0;if(r[0].trim()||r.shift(),r.length>0&&(null===(n=r.at(-1))||void 0===n||!n.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;u<r.length;u++)r[u]=r[u].trim().replace(Vh.slashPipe,"|");return r}function Lv(e,t,n){var r=e.length;if(0===r)return"";for(var u=0;u<r&&e.charAt(r-u-1)===t;)u++;return e.slice(0,r-u)}function $v(e,t,n,r,u){var a=t.href,i=t.title||null,o=e[1].replace(u.other.outputLinkReplace,"$1");r.state.inLink=!0;var s={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:a,title:i,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,s}var qv=Gt((function e(t){Wt(this,e),Yt(this,"options",void 0),Yt(this,"rules",void 0),Yt(this,"lexer",void 0),this.options=t||Lh}),[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Lv(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t,n){var r=e.match(n.other.indentCodeCompensation);if(null===r)return t;var u=r[1];return t.split("\n").map((function(e){var t=e.match(n.other.beginningSpace);return null===t?e:cn(t,1)[0].length>=u.length?e.slice(u.length):e})).join("\n")}(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(this.rules.other.endingHash.test(n)){var r=Lv(n,"#");this.options.pedantic?n=r.trim():r&&!this.rules.other.endingSpaceChar.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Lv(t[0],"\n")}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){for(var n=Lv(t[0],"\n").split("\n"),r="",u="",a=[];n.length>0;){var i=!1,o=[],s=void 0;for(s=0;s<n.length;s++)if(this.rules.other.blockquoteStart.test(n[s]))o.push(n[s]),i=!0;else{if(i)break;o.push(n[s])}n=n.slice(s);var c=o.join("\n"),l=c.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?"".concat(r,"\n").concat(c):c,u=u?"".concat(u,"\n").concat(l):l;var f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,a,!0),this.lexer.state.top=f,0===n.length)break;var d=a.at(-1);if("code"===(null==d?void 0:d.type))break;if("blockquote"===(null==d?void 0:d.type)){var p=d,h=p.raw+"\n"+n.join("\n"),v=this.blockquote(h);a[a.length-1]=v,r=r.substring(0,r.length-p.raw.length)+v.raw,u=u.substring(0,u.length-p.text.length)+v.text;break}if("list"!==(null==d?void 0:d.type));else{var m=d,D=m.raw+"\n"+n.join("\n"),y=this.list(D);a[a.length-1]=y,r=r.substring(0,r.length-d.raw.length)+y.raw,u=u.substring(0,u.length-m.raw.length)+y.raw,n=D.substring(a.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:a,text:u}}}},{key:"list",value:function(e){var t=this,n=this.rules.block.list.exec(e);if(n){var r=n[1].trim(),u=r.length>1,a={type:"list",raw:"",ordered:u,start:u?+r.slice(0,-1):"",loose:!1,items:[]};r=u?"\\d{1,9}\\".concat(r.slice(-1)):"\\".concat(r),this.options.pedantic&&(r=u?r:"[*+-]");for(var i=this.rules.other.listItemRegex(r),o=!1;e;){var s=!1,c="",l="";if(!(n=i.exec(e)))break;if(this.rules.block.hr.test(e))break;c=n[0],e=e.substring(c.length);var f=n[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(function(e){return" ".repeat(3*e.length)})),d=e.split("\n",1)[0],p=!f.trim(),h=0;if(this.options.pedantic?(h=2,l=f.trimStart()):p?h=n[1].length+1:(h=(h=n[2].search(this.rules.other.nonSpaceChar))>4?1:h,l=f.slice(h),h+=n[1].length),p&&this.rules.other.blankLine.test(d)&&(c+=d+"\n",e=e.substring(d.length+1),s=!0),!s)for(var v=this.rules.other.nextBulletRegex(h),m=this.rules.other.hrRegex(h),D=this.rules.other.fencesBeginRegex(h),y=this.rules.other.headingBeginRegex(h),g=this.rules.other.htmlBeginRegex(h);e;){var F=e.split("\n",1)[0],E=void 0;if(d=F,E=this.options.pedantic?d=d.replace(this.rules.other.listReplaceNesting," "):d.replace(this.rules.other.tabCharGlobal," "),D.test(d))break;if(y.test(d))break;if(g.test(d))break;if(v.test(d))break;if(m.test(d))break;if(E.search(this.rules.other.nonSpaceChar)>=h||!d.trim())l+="\n"+E.slice(h);else{if(p)break;if(f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(D.test(f))break;if(y.test(f))break;if(m.test(f))break;l+="\n"+d}p||d.trim()||(p=!0),c+=F+"\n",e=e.substring(F.length+1),f=E.slice(h)}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));var b=null,_=void 0;this.options.gfm&&(b=this.rules.other.listIsTask.exec(l))&&(_="[ ] "!==b[0],l=l.replace(this.rules.other.listReplaceTask,"")),a.items.push({type:"list_item",raw:c,task:!!b,checked:_,loose:!1,text:l,tokens:[]}),a.raw+=c}var k=a.items.at(-1);if(!k)return;k.raw=k.raw.trimEnd(),k.text=k.text.trimEnd(),a.raw=a.raw.trimEnd();for(var C=0;C<a.items.length;C++)if(this.lexer.state.top=!1,a.items[C].tokens=this.lexer.blockTokens(a.items[C].text,[]),!a.loose){var A=a.items[C].tokens.filter((function(e){return"space"===e.type})),w=A.length>0&&A.some((function(e){return t.rules.other.anyLine.test(e.raw)}));a.loose=w}if(a.loose)for(var x=0;x<a.items.length;x++)a.items[x].loose=!0;return a}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t){var n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",u=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:u}}}},{key:"table",value:function(e){var t,n=this,r=this.rules.block.table.exec(e);if(r&&this.rules.other.tableDelimiter.test(r[2])){var u=Zv(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=null!==(t=r[3])&&void 0!==t&&t.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(u.length===a.length){var s,c=Qt(a);try{for(c.s();!(s=c.n()).done;){var l=s.value;this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null)}}catch(e){c.e(e)}finally{c.f()}for(var f=0;f<u.length;f++)o.header.push({text:u[f],tokens:this.lexer.inline(u[f]),header:!0,align:o.align[f]});var d,p=Qt(i);try{for(p.s();!(d=p.n()).done;){var h=d.value;o.rows.push(Zv(h,o.header.length).map((function(e,t){return{text:e,tokens:n.lexer.inline(e),header:!1,align:o.align[t]}})))}}catch(e){p.e(e)}finally{p.f()}return o}}}},{key:"lheading",value:function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}},{key:"paragraph",value:function(e){var t=this.rules.block.paragraph.exec(e);if(t){var n="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}},{key:"text",value:function(e){var t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}},{key:"escape",value:function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}},{key:"tag",value:function(e){var t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;var r=Lv(n.slice(0,-1),"\\");if((n.length-r.length)%2==0)return}else{var u=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=0,r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&--n<0)return r;return n>0?-2:-1}(t[2],"()");if(-2===u)return;if(u>-1){var a=(0===t[0].indexOf("!")?5:4)+t[1].length+u;t[2]=t[2].substring(0,u),t[0]=t[0].substring(0,a).trim(),t[3]=""}}var i=t[2],o="";if(this.options.pedantic){var s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],o=s[3])}else o=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i.slice(1):i.slice(1,-1)),$v(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:o?o.replace(this.rules.inline.anyPunctuation,"$1"):o},t[0],this.lexer,this.rules)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!r){var u=n[0].charAt(0);return{type:"text",raw:u,text:u}}return $v(n,r,n[0],this.lexer,this.rules)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(!r[3]||!n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){var u,a,i=ln(r[0]).length-1,o=i,s=0,c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);null!=(r=c.exec(t));)if(u=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=ln(u).length,r[3]||r[4])o+=a;else if(!((r[5]||r[6])&&i%3)||(i+a)%3){if(!((o-=a)>0)){a=Math.min(a,a+o+s);var l=ln(r[0])[0].length,f=e.slice(0,i+r.index+l+a);if(Math.min(i,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}else s+=a}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),u=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&u&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e){var t,n,r=this.rules.inline.autolink.exec(e);if(r)return n="@"===r[2]?"mailto:"+(t=r[1]):t=r[1],{type:"link",raw:r[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}},{key:"url",value:function(e){var t;if(t=this.rules.inline.url.exec(e)){var n,r;if("@"===t[2])r="mailto:"+(n=t[0]);else{var u;do{var a,i;u=t[0],t[0]=null!==(a=null===(i=this.rules.inline._backpedal.exec(t[0]))||void 0===i?void 0:i[0])&&void 0!==a?a:""}while(u!==t[0]);n=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}},{key:"inlineText",value:function(e){var t=this.rules.inline.text.exec(e);if(t){var n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}}]),Uv=function(){function e(t){Wt(this,e),Yt(this,"tokens",void 0),Yt(this,"options",void 0),Yt(this,"state",void 0),Yt(this,"tokenizer",void 0),Yt(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Lh,this.options.tokenizer=this.options.tokenizer||new qv,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var n={other:Vh,block:Pv.normal,inline:jv.normal};this.options.pedantic?(n.block=Pv.pedantic,n.inline=jv.pedantic):this.options.gfm&&(n.block=Pv.gfm,this.options.breaks?n.inline=jv.breaks:n.inline=jv.gfm),this.tokenizer.rules=n}return Gt(e,[{key:"lex",value:function(e){e=e.replace(Vh.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(var t=0;t<this.inlineQueue.length;t++){var n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}},{key:"blockTokens",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.options.pedantic&&(e=e.replace(Vh.tabCharGlobal," ").replace(Vh.spaceLine,""));for(var u,a=function(){var u,a,i;if(null!==(u=t.options.extensions)&&void 0!==u&&null!==(u=u.block)&&void 0!==u&&u.some((function(r){return!!(i=r.call({lexer:t},e,n))&&(e=e.substring(i.raw.length),n.push(i),!0)})))return 0;if(i=t.tokenizer.space(e)){e=e.substring(i.raw.length);var o=n.at(-1);return 1===i.raw.length&&void 0!==o?o.raw+="\n":n.push(i),0}if(i=t.tokenizer.code(e)){e=e.substring(i.raw.length);var s=n.at(-1);return"paragraph"===(null==s?void 0:s.type)||"text"===(null==s?void 0:s.type)?(s.raw+="\n"+i.raw,s.text+="\n"+i.text,t.inlineQueue.at(-1).src=s.text):n.push(i),0}if(i=t.tokenizer.fences(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.heading(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.hr(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.blockquote(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.list(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.html(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.def(e)){e=e.substring(i.raw.length);var c=n.at(-1);return"paragraph"===(null==c?void 0:c.type)||"text"===(null==c?void 0:c.type)?(c.raw+="\n"+i.raw,c.text+="\n"+i.raw,t.inlineQueue.at(-1).src=c.text):t.tokens.links[i.tag]||(t.tokens.links[i.tag]={href:i.href,title:i.title}),0}if(i=t.tokenizer.table(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.lheading(e))return e=e.substring(i.raw.length),n.push(i),0;var l=e;if(null!==(a=t.options.extensions)&&void 0!==a&&a.startBlock){var f,d=1/0,p=e.slice(1);t.options.extensions.startBlock.forEach((function(e){"number"==typeof(f=e.call({lexer:t},p))&&f>=0&&(d=Math.min(d,f))})),d<1/0&&d>=0&&(l=e.substring(0,d+1))}if(t.state.top&&(i=t.tokenizer.paragraph(l))){var h=n.at(-1);return r&&"paragraph"===(null==h?void 0:h.type)?(h.raw+="\n"+i.raw,h.text+="\n"+i.text,t.inlineQueue.pop(),t.inlineQueue.at(-1).src=h.text):n.push(i),r=l.length!==e.length,e=e.substring(i.raw.length),0}if(i=t.tokenizer.text(e)){e=e.substring(i.raw.length);var v=n.at(-1);return"text"===(null==v?void 0:v.type)?(v.raw+="\n"+i.raw,v.text+="\n"+i.text,t.inlineQueue.pop(),t.inlineQueue.at(-1).src=v.text):n.push(i),0}if(e){var m="Infinite loop on byte: "+e.charCodeAt(0);if(t.options.silent)return console.error(m),1;throw new Error(m)}};e&&(0===(u=a())||1!==u););return this.state.top=!0,n}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=e,u=null;if(this.tokens.links){var a=Object.keys(this.tokens.links);if(a.length>0)for(;null!=(u=this.tokenizer.rules.inline.reflinkSearch.exec(r));)a.includes(u[0].slice(u[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(u=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,u.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(u=this.tokenizer.rules.inline.blockSkip.exec(r));)r=r.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(var i,o=!1,s="",c=function(){var u,a,i;if(o||(s=""),o=!1,null!==(u=t.options.extensions)&&void 0!==u&&null!==(u=u.inline)&&void 0!==u&&u.some((function(r){return!!(i=r.call({lexer:t},e,n))&&(e=e.substring(i.raw.length),n.push(i),!0)})))return 0;if(i=t.tokenizer.escape(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.tag(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.link(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.reflink(e,t.tokens.links)){e=e.substring(i.raw.length);var c=n.at(-1);return"text"===i.type&&"text"===(null==c?void 0:c.type)?(c.raw+=i.raw,c.text+=i.text):n.push(i),0}if(i=t.tokenizer.emStrong(e,r,s))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.codespan(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.br(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.del(e))return e=e.substring(i.raw.length),n.push(i),0;if(i=t.tokenizer.autolink(e))return e=e.substring(i.raw.length),n.push(i),0;if(!t.state.inLink&&(i=t.tokenizer.url(e)))return e=e.substring(i.raw.length),n.push(i),0;var l=e;if(null!==(a=t.options.extensions)&&void 0!==a&&a.startInline){var f,d=1/0,p=e.slice(1);t.options.extensions.startInline.forEach((function(e){"number"==typeof(f=e.call({lexer:t},p))&&f>=0&&(d=Math.min(d,f))})),d<1/0&&d>=0&&(l=e.substring(0,d+1))}if(i=t.tokenizer.inlineText(l)){e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(s=i.raw.slice(-1)),o=!0;var h=n.at(-1);return"text"===(null==h?void 0:h.type)?(h.raw+=i.raw,h.text+=i.text):n.push(i),0}if(e){var v="Infinite loop on byte: "+e.charCodeAt(0);if(t.options.silent)return console.error(v),1;throw new Error(v)}};e&&(0===(i=c())||1!==i););return n}}],[{key:"rules",get:function(){return{block:Pv,inline:jv}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}])}(),Vv=Gt((function e(t){Wt(this,e),Yt(this,"options",void 0),Yt(this,"parser",void 0),this.options=t||Lh}),[{key:"space",value:function(e){return""}},{key:"code",value:function(e){var t,n=e.text,r=e.lang,u=e.escaped,a=null===(t=(r||"").match(Vh.notSpaceStart))||void 0===t?void 0:t[0],i=n.replace(Vh.endingNewline,"")+"\n";return a?'<pre><code class="language-'+Rv(a)+'">'+(u?i:Rv(i,!0))+"</code></pre>\n":"<pre><code>"+(u?i:Rv(i,!0))+"</code></pre>\n"}},{key:"blockquote",value:function(e){var t=e.tokens,n=this.parser.parse(t);return"<blockquote>\n".concat(n,"</blockquote>\n")}},{key:"html",value:function(e){return e.text}},{key:"heading",value:function(e){var t=e.tokens,n=e.depth;return"<h".concat(n,">").concat(this.parser.parseInline(t),"</h").concat(n,">\n")}},{key:"hr",value:function(e){return"<hr>\n"}},{key:"list",value:function(e){for(var t=e.ordered,n=e.start,r="",u=0;u<e.items.length;u++){var a=e.items[u];r+=this.listitem(a)}var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+i+">\n"}},{key:"listitem",value:function(e){var t="";if(e.task){var n,r=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===(null===(n=e.tokens[0])||void 0===n?void 0:n.type)?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=r+" "+Rv(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),"<li>".concat(t,"</li>\n")}},{key:"checkbox",value:function(e){return"<input "+(e.checked?'checked="" ':"")+'disabled="" type="checkbox">'}},{key:"paragraph",value:function(e){var t=e.tokens;return"<p>".concat(this.parser.parseInline(t),"</p>\n")}},{key:"table",value:function(e){for(var t="",n="",r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});for(var u="",a=0;a<e.rows.length;a++){var i=e.rows[a];n="";for(var o=0;o<i.length;o++)n+=this.tablecell(i[o]);u+=this.tablerow({text:n})}return u&&(u="<tbody>".concat(u,"</tbody>")),"<table>\n<thead>\n"+t+"</thead>\n"+u+"</table>\n"}},{key:"tablerow",value:function(e){var t=e.text;return"<tr>\n".concat(t,"</tr>\n")}},{key:"tablecell",value:function(e){var t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?"<".concat(n,' align="').concat(e.align,'">'):"<".concat(n,">"))+t+"</".concat(n,">\n")}},{key:"strong",value:function(e){var t=e.tokens;return"<strong>".concat(this.parser.parseInline(t),"</strong>")}},{key:"em",value:function(e){var t=e.tokens;return"<em>".concat(this.parser.parseInline(t),"</em>")}},{key:"codespan",value:function(e){var t=e.text;return"<code>".concat(Rv(t,!0),"</code>")}},{key:"br",value:function(e){return"<br>"}},{key:"del",value:function(e){var t=e.tokens;return"<del>".concat(this.parser.parseInline(t),"</del>")}},{key:"link",value:function(e){var t=e.href,n=e.title,r=e.tokens,u=this.parser.parseInline(r),a=Mv(t);if(null===a)return u;var i='<a href="'+(t=a)+'"';return n&&(i+=' title="'+Rv(n)+'"'),i+">"+u+"</a>"}},{key:"image",value:function(e){var t=e.href,n=e.title,r=e.text,u=e.tokens;u&&(r=this.parser.parseInline(u,this.parser.textRenderer));var a=Mv(t);if(null===a)return Rv(r);var i='<img src="'.concat(t=a,'" alt="').concat(r,'"');return n&&(i+=' title="'.concat(Rv(n),'"')),i+">"}},{key:"text",value:function(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Rv(e.text)}}]),Hv=Gt((function e(){Wt(this,e)}),[{key:"strong",value:function(e){return e.text}},{key:"em",value:function(e){return e.text}},{key:"codespan",value:function(e){return e.text}},{key:"del",value:function(e){return e.text}},{key:"html",value:function(e){return e.text}},{key:"text",value:function(e){return e.text}},{key:"link",value:function(e){return""+e.text}},{key:"image",value:function(e){return""+e.text}},{key:"br",value:function(){return""}}]),Wv=function(){function e(t){Wt(this,e),Yt(this,"options",void 0),Yt(this,"renderer",void 0),Yt(this,"textRenderer",void 0),this.options=t||Lh,this.options.renderer=this.options.renderer||new Vv,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Hv}return Gt(e,[{key:"parse",value:function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="",r=0;r<e.length;r++){var u,a=e[r];if(null!==(u=this.options.extensions)&&void 0!==u&&null!==(u=u.renderers)&&void 0!==u&&u[a.type]){var i=a,o=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==o||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(i.type)){n+=o||"";continue}}var s=a;switch(s.type){case"space":n+=this.renderer.space(s);continue;case"hr":n+=this.renderer.hr(s);continue;case"heading":n+=this.renderer.heading(s);continue;case"code":n+=this.renderer.code(s);continue;case"table":n+=this.renderer.table(s);continue;case"blockquote":n+=this.renderer.blockquote(s);continue;case"list":n+=this.renderer.list(s);continue;case"html":n+=this.renderer.html(s);continue;case"paragraph":n+=this.renderer.paragraph(s);continue;case"text":for(var c=s,l=this.renderer.text(c);r+1<e.length&&"text"===e[r+1].type;)c=e[++r],l+="\n"+this.renderer.text(c);n+=t?this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):l;continue;default:var f='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}return n}},{key:"parseInline",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.renderer,n="",r=0;r<e.length;r++){var u,a=e[r];if(null!==(u=this.options.extensions)&&void 0!==u&&null!==(u=u.renderers)&&void 0!==u&&u[a.type]){var i=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==i||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=i||"";continue}}var o=a;switch(o.type){case"escape":case"text":n+=t.text(o);break;case"html":n+=t.html(o);break;case"link":n+=t.link(o);break;case"image":n+=t.image(o);break;case"strong":n+=t.strong(o);break;case"em":n+=t.em(o);break;case"codespan":n+=t.codespan(o);break;case"br":n+=t.br(o);break;case"del":n+=t.del(o);break;default:var s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}return n}}],[{key:"parse",value:function(t,n){return new e(n).parse(t)}},{key:"parseInline",value:function(t,n){return new e(n).parseInline(t)}}])}(),Kv=(Rh=Gt((function e(t){Wt(this,e),Yt(this,"options",void 0),Yt(this,"block",void 0),this.options=t||Lh}),[{key:"preprocess",value:function(e){return e}},{key:"postprocess",value:function(e){return e}},{key:"processAllTokens",value:function(e){return e}},{key:"provideLexer",value:function(){return this.block?Uv.lex:Uv.lexInline}},{key:"provideParser",value:function(){return this.block?Wv.parse:Wv.parseInline}}]),Yt(Rh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Rh),Jv=Gt((function e(){Wt(this,e),Yt(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),Yt(this,"options",this.setOptions),Yt(this,"parse",this.parseMarkdown(!0)),Yt(this,"parseInline",this.parseMarkdown(!1)),Yt(this,"Parser",Wv),Yt(this,"Renderer",Vv),Yt(this,"TextRenderer",Hv),Yt(this,"Lexer",Uv),Yt(this,"Tokenizer",qv),Yt(this,"Hooks",Kv),this.use.apply(this,arguments)}),[{key:"walkTokens",value:function(e,t){var n,r=this,u=[],a=Qt(e);try{var i=function(){var e=n.value;switch(u=u.concat(t.call(r,e)),e.type){case"table":var a,i=e,o=Qt(i.header);try{for(o.s();!(a=o.n()).done;){var s=a.value;u=u.concat(r.walkTokens(s.tokens,t))}}catch(e){o.e(e)}finally{o.f()}var c,l=Qt(i.rows);try{for(l.s();!(c=l.n()).done;){var f,d=Qt(c.value);try{for(d.s();!(f=d.n()).done;){var p=f.value;u=u.concat(r.walkTokens(p.tokens,t))}}catch(e){d.e(e)}finally{d.f()}}}catch(e){l.e(e)}finally{l.f()}break;case"list":var h=e;u=u.concat(r.walkTokens(h.items,t));break;default:var v,m=e;null!==(v=r.defaults.extensions)&&void 0!==v&&null!==(v=v.childTokens)&&void 0!==v&&v[m.type]?r.defaults.extensions.childTokens[m.type].forEach((function(e){var n=m[e].flat(1/0);u=u.concat(r.walkTokens(n,t))})):m.tokens&&(u=u.concat(r.walkTokens(m.tokens,t)))}};for(a.s();!(n=a.n()).done;)i()}catch(e){a.e(e)}finally{a.f()}return u}},{key:"use",value:function(){for(var e=this,t=this.defaults.extensions||{renderers:{},childTokens:{}},n=arguments.length,r=new Array(n),u=0;u<n;u++)r[u]=arguments[u];return r.forEach((function(n){var r=un({},n);if(r.async=e.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach((function(e){if(!e.name)throw new Error("extension name required");if("renderer"in e){var n=t.renderers[e.name];t.renderers[e.name]=n?function(){for(var t=arguments.length,r=new Array(t),u=0;u<t;u++)r[u]=arguments[u];var a=e.renderer.apply(this,r);return!1===a&&(a=n.apply(this,r)),a}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");var r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),n.renderer){var u=e.defaults.renderer||new Vv(e.defaults),a=function(){if(!(i in u))throw new Error("renderer '".concat(i,"' does not exist"));if(["options","parser"].includes(i))return 1;var e=i,t=n.renderer[e],r=u[e];u[e]=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];var i=t.apply(u,n);return!1===i&&(i=r.apply(u,n)),i||""}};for(var i in n.renderer)a();r.renderer=u}if(n.tokenizer){var o=e.defaults.tokenizer||new qv(e.defaults),s=function(){if(!(c in o))throw new Error("tokenizer '".concat(c,"' does not exist"));if(["options","rules","lexer"].includes(c))return 1;var e=c,t=n.tokenizer[e],r=o[e];o[e]=function(){for(var e=arguments.length,n=new Array(e),u=0;u<e;u++)n[u]=arguments[u];var a=t.apply(o,n);return!1===a&&(a=r.apply(o,n)),a}};for(var c in n.tokenizer)s();r.tokenizer=o}if(n.hooks){var l=e.defaults.hooks||new Kv,f=function(){if(!(d in l))throw new Error("hook '".concat(d,"' does not exist"));if(["options","block"].includes(d))return 1;var t=d,r=n.hooks[t],u=l[t];Kv.passThroughHooks.has(d)?l[t]=function(t){if(e.defaults.async)return Promise.resolve(r.call(l,t)).then((function(e){return u.call(l,e)}));var n=r.call(l,t);return u.call(l,n)}:l[t]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var a=r.apply(l,t);return!1===a&&(a=u.apply(l,t)),a}};for(var d in n.hooks)f();r.hooks=l}if(n.walkTokens){var p=e.defaults.walkTokens,h=n.walkTokens;r.walkTokens=function(e){var t=[];return t.push(h.call(this,e)),p&&(t=t.concat(p.call(this,e))),t}}e.defaults=un(un({},e.defaults),r)})),this}},{key:"setOptions",value:function(e){return this.defaults=un(un({},this.defaults),e),this}},{key:"lexer",value:function(e,t){return Uv.lex(e,null!=t?t:this.defaults)}},{key:"parser",value:function(e,t){return Wv.parse(e,null!=t?t:this.defaults)}},{key:"parseMarkdown",value:function(e){var t=this;return function(n,r){var u=un({},r),a=un(un({},t.defaults),u),i=t.onError(!!a.silent,!!a.async);if(!0===t.defaults.async&&!1===u.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==n)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);var o=a.hooks?a.hooks.provideLexer():e?Uv.lex:Uv.lexInline,s=a.hooks?a.hooks.provideParser():e?Wv.parse:Wv.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(n):n).then((function(e){return o(e,a)})).then((function(e){return a.hooks?a.hooks.processAllTokens(e):e})).then((function(e){return a.walkTokens?Promise.all(t.walkTokens(e,a.walkTokens)).then((function(){return e})):e})).then((function(e){return s(e,a)})).then((function(e){return a.hooks?a.hooks.postprocess(e):e})).catch(i);try{a.hooks&&(n=a.hooks.preprocess(n));var c=o(n,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&t.walkTokens(c,a.walkTokens);var l=s(c,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(e){return i(e)}}}},{key:"onError",value:function(e,t){return function(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){var r="<p>An error occurred:</p><pre>"+Rv(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}}]),Gv=new Jv;function Qv(e,t){return Gv.parse(e,t)}function Yv(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}Qv.options=Qv.setOptions=function(e){return Gv.setOptions(e),Qv.defaults=Gv.defaults,$h(Qv.defaults),Qv},Qv.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},Qv.defaults=Lh,Qv.use=function(){return Gv.use.apply(Gv,arguments),Qv.defaults=Gv.defaults,$h(Qv.defaults),Qv},Qv.walkTokens=function(e,t){return Gv.walkTokens(e,t)},Qv.parseInline=Gv.parseInline,Qv.Parser=Wv,Qv.parser=Wv.parse,Qv.Renderer=Vv,Qv.TextRenderer=Hv,Qv.Lexer=Uv,Qv.lexer=Uv.lex,Qv.Tokenizer=qv,Qv.Hooks=Kv,Qv.parse=Qv,Qv.options,Qv.setOptions,Qv.use,Qv.walkTokens,Qv.parseInline,Wv.parse,Uv.lex;var Xv=new Qv.Renderer;Xv.code=function(e){var t=e.text,n=e.lang,r=void 0===n?"":n,u=e.escaped,a=r?"language-".concat(r):"",i=u?t:Yv(t),o=encodeURIComponent(t);return'\n <div class="DocSearch-CodeSnippet">\n <button class="DocSearch-CodeSnippet-CopyButton" data-code="'.concat(o,'" aria-label="copy code">').concat('<svg class="DocSearch-CodeSnippet-CopyIcon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2" /><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" /></svg>').concat('<svg class="DocSearch-CodeSnippet-CheckIcon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5" /></svg>','<span class="DocSearch-CodeSnippet-CopyButton-Label"></span></button>\n <pre><code class="').concat(a,'">').concat(i,"</code></pre>\n </div>\n ")},Xv.link=function(e){var t=e.href,n=e.title,r=e.text,u=n?' title="'.concat(Yv(n),'"'):"",a=t?Yv(t):"",i=Yv(r);return'<a href="'.concat(a,'"').concat(u,' target="_blank" rel="noopener noreferrer">').concat(i,"</a>")};var em=et((function(e){var t=e.content,n=e.copyButtonText,r=e.copyButtonCopiedText,u=e.isStreaming,a=Te((function(){return Qv.parse(t,{gfm:!0,breaks:!0,renderer:Xv})}),[t]),i=Oe(null);return Se((function(){var e=i.current;if(e)return Array.from(e.querySelectorAll(".DocSearch-CodeSnippet-CopyButton")).forEach((function(e){var t=e.querySelector(".DocSearch-CodeSnippet-CopyButton-Label");t&&(t.textContent=n),e.classList.remove("DocSearch-CodeSnippet-CopyButton--copied")})),e.addEventListener("click",t),function(){e.removeEventListener("click",t)};function t(e){var t,u=e.target.closest(".DocSearch-CodeSnippet-CopyButton");if(u){var a=null!==(t=u.getAttribute("data-code"))&&void 0!==t?t:"";navigator.clipboard.writeText(decodeURIComponent(a)).catch((function(){}));var i=u.querySelector(".DocSearch-CodeSnippet-CopyButton-Label");if(i){u.classList.add("DocSearch-CodeSnippet-CopyButton--copied");var o=n;i.textContent=r,setTimeout((function(){u.classList.remove("DocSearch-CodeSnippet-CopyButton--copied"),i.textContent=o}),1500)}}}}),[a,n,r]),jt.createElement("div",{ref:i,className:"DocSearch-Markdown-Content ".concat(u?"DocSearch-Markdown-Content--streaming":""),dangerouslySetInnerHTML:{__html:a}})}));em.displayName="MemoizedMarkdown";var tm=function(e,t){var n,r,u=t[0].parts.find((function(e){return"text"===e.type}));return{query:e,objectID:null!==(n=null==u?void 0:u.text)&&void 0!==n?n:"",messages:t,type:"askAI",anchor:"stored",content:null,hierarchy:{lvl0:"askAI",lvl1:null!==(r=null==u?void 0:u.text)&&void 0!==r?r:"",lvl2:null,lvl3:null,lvl4:null,lvl5:null,lvl6:null},url:"",url_without_anchor:""}},nm=function(e){return null==e?void 0:e.parts.find((function(e){return"text"===e.type}))},rm=["translations"];function um(e){var t=e.disclaimerText;return jt.createElement("p",{className:"DocSearch-AskAiScreen-Disclaimer"},t)}function am(e){var t,n=e.exchange,r=e.askAiStreamError,u=e.isLastExchange,a=e.loadingStatus,i=e.onSearchQueryClick,o=e.translations,s=e.conversations,c=e.onFeedback,l=n.userMessage,f=n.assistantMessage,d=!u||u&&"ready"===a&&Boolean(f),p=Te((function(){return nm(f)}),[f]),h=Te((function(){return nm(l)}),[l]),v=jt.useMemo((function(){return e=f,t=[],n=new Set,e?(e.parts.forEach((function(e){if("text"===e.type&&0!==e.text.length){var r,u=e.text.replace(/```[\s\S]*?```/g,"").replace(/`[^`]*`/g,""),a=Qt(u.matchAll(/\[([^\]]*)\]\(([^)]+)\)/g));try{for(a.s();!(r=a.n()).done;){var i=r.value,o=i[1].trim(),s=i[2];n.has(s)||(n.add(s),t.push({url:s,title:o||void 0}))}}catch(e){a.e(e)}finally{a.f()}var c,l=Qt(u.matchAll(/(?<!\]\()https?:\/\/[^\s<>"{}|\\^`[\]]+/g));try{for(l.s();!(c=l.n()).done;){var f=c.value[0].replace(/[.,;:!?]+$/,"");n.has(f)||(n.add(f),t.push({url:f}))}}catch(e){l.e(e)}finally{l.f()}}})),t):[];var e,t,n}),[f]),m=jt.useMemo((function(){return function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if("tool-searchIndex"===r.type&&"output-available"===r.state){for(var u=[],a=n;a<e.length;){var i=e[a];if("tool-searchIndex"!==i.type||"output-available"!==i.state)break;var o,s,c=(null!==(o=null===(s=i.output)||void 0===s?void 0:s.query)&&void 0!==o?o:"").trim();c&&c.length>0&&u.push(c),a++}u.length>1?t.push({type:"aggregated-tool-call",queries:u}):1===u.length&&t.push(r),n=a-1}else t.push(r)}return t}((null==f?void 0:f.parts)||[])}),[f]),D=["submitted","streaming"].includes(a)&&u&&!m.some((function(e){return"step-start"!==e.type}));return jt.createElement("div",{className:"DocSearch-AskAiScreen-Response-Container"},jt.createElement("div",{className:"DocSearch-AskAiScreen-Response"},jt.createElement("div",{className:"DocSearch-AskAiScreen-Message DocSearch-AskAiScreen-Message--user"},jt.createElement("p",{className:"DocSearch-AskAiScreen-Query"},null!==(t=null==h?void 0:h.text)&&void 0!==t?t:"")),jt.createElement("div",{className:"DocSearch-AskAiScreen-Message DocSearch-AskAiScreen-Message--assistant"},jt.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent"},"error"===a&&r&&u&&jt.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent DocSearch-AskAiScreen-Error"},jt.createElement(Sh,null),jt.createElement(em,{content:r.message,copyButtonText:"",copyButtonCopiedText:"",isStreaming:!1})),D&&jt.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Reasoning"},jt.createElement("span",{className:"shimmer"},o.thinkingText||"Thinking...")),m.map((function(e,t){var n,r=t;if("string"==typeof e)return jt.createElement(em,{key:r,content:e,copyButtonText:o.copyButtonText||"Copy",copyButtonCopiedText:o.copyButtonCopiedText||"Copied!",isStreaming:"streaming"===a});if("aggregated-tool-call"===e.type)return jt.createElement(Zh,{key:r,queries:e.queries,translations:o,onSearchQueryClick:i});if("reasoning"===e.type&&"streaming"===e.state)return jt.createElement("div",{key:r,className:"DocSearch-AskAiScreen-MessageContent-Reasoning shimmer"},jt.createElement(Ch,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),jt.createElement("span",{className:"shimmer"},"Reasoning..."));if("text"===e.type)return jt.createElement(em,{key:r,content:e.text,copyButtonText:o.copyButtonText||"Copy",copyButtonCopiedText:o.copyButtonCopiedText||"Copied!",isStreaming:"streaming"===e.state});if("tool-searchIndex"===e.type)switch(e.state){case"input-streaming":return jt.createElement("div",{key:r,className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--PartialCall shimmer"},jt.createElement(Ch,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),jt.createElement("span",null,o.preToolCallText||"Searching..."));case"input-available":return jt.createElement("div",{key:r,className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--Call shimmer"},jt.createElement(Ch,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),jt.createElement("span",null,"".concat(o.duringToolCallText||"Searching for ",' "').concat(e.input.query||"",'" ...')));case"output-available":return jt.createElement("div",{key:r,className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--Result"},jt.createElement(Fn,null),jt.createElement("span",null,"".concat(o.afterToolCallText||"Searched for")," ",jt.createElement("span",{role:"button",tabIndex:0,className:"DocSearch-AskAiScreen-MessageContent-Tool-Query",onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),i(e.output.query||""))},onClick:function(){return i(e.output.query||"")}}," ",'"',e.output.query||"",'"')," ","found ",(null===(n=e.output.hits)||void 0===n?void 0:n.length)||0," results"))}return null})))),jt.createElement("div",{className:"DocSearch-AskAiScreen-Answer-Footer"},jt.createElement(im,{id:(null==l?void 0:l.id)||n.id,showActions:d,latestAssistantMessageContent:(null==p?void 0:p.text)||null,translations:o,conversations:s,onFeedback:c}))),v.length>0?jt.createElement(om,{urlsToDisplay:v,relatedSourcesText:o.relatedSourcesText}):null)}function im(e){var t=e.id,n=e.showActions,r=e.latestAssistantMessageContent,u=e.translations,a=e.conversations,i=e.onFeedback,o=jt.useMemo((function(){var e,n,r=null===(e=a.getOne)||void 0===e?void 0:e.call(a,t);return null!==(n=null==r?void 0:r.feedback)&&void 0!==n?n:null}),[a,t]),s=cn(jt.useState(o),2),c=s[0],l=s[1],f=cn(jt.useState(!1),2),d=f[0],p=f[1],h=cn(jt.useState(null),2),v=h[0],m=h[1],D=function(){var e=Vt(on().mark((function e(n){return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!d){e.next=2;break}return e.abrupt("return");case 2:return m(null),p(!0),e.prev=4,e.next=7,null==i?void 0:i(t,"like"===n?1:0);case 7:l(n),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),m(e.t0);case 13:return e.prev=13,p(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[4,10,13,16]])})));return function(t){return e.apply(this,arguments)}}(),y=u.likeButtonTitle,g=void 0===y?"Like":y,F=u.dislikeButtonTitle,E=void 0===F?"Dislike":F,b=u.thanksForFeedbackText,_=void 0===b?"Thanks for your feedback!":b;return n&&r?jt.createElement("div",{className:"DocSearch-AskAiScreen-Actions"},null===c?jt.createElement(jt.Fragment,null,d?jt.createElement(Ch,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}):jt.createElement(jt.Fragment,null,jt.createElement(fm,{title:g,onClick:function(){return D("like")}}),jt.createElement(dm,{title:E,onClick:function(){return D("dislike")}})),v&&jt.createElement("p",{className:"DocSearch-AskAiScreen-FeedbackText"},v.message||"An error occured")):jt.createElement("p",{className:"DocSearch-AskAiScreen-FeedbackText DocSearch-AskAiScreen-FeedbackText--visible"},_),jt.createElement(lm,{translations:u,onClick:function(){return navigator.clipboard.writeText(r)}})):null}function om(e){var t=e.urlsToDisplay,n=e.relatedSourcesText;return jt.createElement("div",{className:"DocSearch-AskAiScreen-RelatedSources"},jt.createElement("p",{className:"DocSearch-AskAiScreen-RelatedSources-Title"},n||"Related sources"),jt.createElement("div",{className:"DocSearch-AskAiScreen-RelatedSources-List"},t.length>0&&t.map((function(e){return jt.createElement("a",{key:e.url,href:e.url,className:"DocSearch-AskAiScreen-RelatedSources-Item-Link",target:"_blank",rel:"noopener noreferrer"},jt.createElement(cm,null),jt.createElement("span",null,e.title||e.url))}))))}function sm(e){var t=e.translations,n=void 0===t?{}:t,r=an(e,rm),u=n.disclaimerText,a=void 0===u?"Answers are generated with AI which can make mistakes. Verify responses.":u,i=r.messages,o=Te((function(){for(var e=[],t=0;t<i.length;t++)if("user"===i[t].role){var n,r=i[t],u="assistant"===(null===(n=i[t+1])||void 0===n?void 0:n.role)?i[t+1]:null;e.push({id:r.id,userMessage:r,assistantMessage:u}),u&&t++}return e}),[i]),s=function(e){r.onAskAiToggle(!1),r.setQuery(e)};return jt.createElement("div",{className:"DocSearch-AskAiScreen DocSearch-AskAiScreen-Container"},jt.createElement(um,{disclaimerText:a}),jt.createElement("div",{className:"DocSearch-AskAiScreen-Body"},jt.createElement("div",{className:"DocSearch-AskAiScreen-ExchangesList"},o.slice().reverse().map((function(e,t){return jt.createElement(am,{key:e.id,exchange:e,askAiStreamError:r.askAiStreamError,isLastExchange:0===t,loadingStatus:r.status,translations:n,conversations:r.conversations,onSearchQueryClick:s,onFeedback:r.onFeedback})})))))}function cm(){return jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},jt.createElement("line",{x1:"4",x2:"20",y1:"9",y2:"9"}),jt.createElement("line",{x1:"4",x2:"20",y1:"15",y2:"15"}),jt.createElement("line",{x1:"10",x2:"8",y1:"3",y2:"21"}),jt.createElement("line",{x1:"16",x2:"14",y1:"3",y2:"21"}))}function lm(e){var t=e.onClick,n=e.translations,r=n.copyButtonTitle,u=void 0===r?"Copy":r,a=n.copyButtonCopiedText,i=void 0===a?"Copied!":a,o=cn(we(!1),2),s=o[0],c=o[1];return Se((function(){if(s){var e=setTimeout((function(){c(!1)}),1500);return function(){return clearTimeout(e)}}}),[s]),jt.createElement("button",{type:"button",className:"DocSearch-AskAiScreen-ActionButton DocSearch-AskAiScreen-CopyButton ".concat(s?"DocSearch-AskAiScreen-CopyButton--copied":""),disabled:s,title:s?i:u,onClick:function(){t(),c(!0)}},s?jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-check-icon lucide-check"},jt.createElement("path",{d:"M20 6 9 17l-5-5"})):jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-copy-icon lucide-copy"},jt.createElement("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),jt.createElement("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})))}function fm(e){var t=e.title,n=e.onClick;return jt.createElement("button",{type:"button",className:"DocSearch-AskAiScreen-ActionButton DocSearch-AskAiScreen-LikeButton",title:t,onClick:n},jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-thumbs-up-icon lucide-thumbs-up"},jt.createElement("path",{d:"M7 10v12"}),jt.createElement("path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"})))}function dm(e){var t=e.title,n=e.onClick;return jt.createElement("button",{type:"button",className:"DocSearch-AskAiScreen-ActionButton DocSearch-AskAiScreen-DislikeButton",title:t,onClick:n},jt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-thumbs-down-icon lucide-thumbs-down"},jt.createElement("path",{d:"M17 14V2"}),jt.createElement("path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z"})))}function pm(e){var t=e.translations,n=void 0===t?{}:t,r=n.titleText,u=void 0===r?"Unable to fetch results":r,a=n.helpText,i=void 0===a?"You might want to check your network connection.":a;return jt.createElement("div",{className:"DocSearch-ErrorScreen"},jt.createElement("div",{className:"DocSearch-Screen-Icon"},jt.createElement(Nh,null)),jt.createElement("p",{className:"DocSearch-Title"},u),jt.createElement("p",{className:"DocSearch-Help"},i))}var hm=["translations"];function vm(e){var t=e.translations,n=void 0===t?{}:t,r=an(e,hm),u=n.noResultsText,a=void 0===u?"No results found for":u,i=n.suggestedQueryText,o=void 0===i?"Try searching for":i,s=n.reportMissingResultsText,c=void 0===s?"Believe this query should return results?":s,l=n.reportMissingResultsLinkText,f=void 0===l?"Let us know.":l,d=r.state.context.searchSuggestions;return jt.createElement("div",{className:"DocSearch-NoResults ".concat(r.canHandleAskAi?"DocSearch-NoResults--withAskAi":"")},jt.createElement("div",{className:"DocSearch-Screen-Icon"},jt.createElement(zh,null)),jt.createElement("p",{className:"DocSearch-Title"},a,' "',jt.createElement("strong",null,r.state.query),'"'),d&&d.length>0&&jt.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},jt.createElement("p",{className:"DocSearch-Help"},o,":"),jt.createElement("div",{className:"DocSearch-NoResults-Prefill-List-Items"},d.slice(0,3).reduce((function(e,t){return[].concat(ln(e),[jt.createElement("p",{key:t},jt.createElement(Fn,{size:16}),jt.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){r.setQuery(t.toLowerCase()+" "),r.refresh(),r.inputRef.current.focus()}},t))])}),[]))),r.getMissingResultsUrl&&jt.createElement("p",{className:"DocSearch-Help"},"".concat(c," "),jt.createElement("a",{href:r.getMissingResultsUrl({query:r.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var mm=["hit","attribute","tagName"];function Dm(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function ym(e){var t=e.hit,n=e.attribute,r=e.tagName;return q(void 0===r?"span":r,un(un({},an(e,mm)),{},{dangerouslySetInnerHTML:{__html:Dm(t,"_snippetResult.".concat(n,".value"))||Dm(t,n)}}))}function gm(e){return e.collection&&0!==e.collection.items.length?"askAI"===e.collection.source.sourceId?jt.createElement("section",{className:"DocSearch-AskAi-Section"},jt.createElement("ul",e.getListProps({source:e.collection.source}),jt.createElement(Em,Xt({item:e.collection.items[0],translations:e.translations},e)))):(e.collection.source.sourceId,jt.createElement("section",{className:"DocSearch-Hits"},jt.createElement("div",{className:"DocSearch-Hit-source"},e.title),jt.createElement("ul",e.getListProps({source:e.collection.source}),e.collection.items.map((function(t,n){return jt.createElement(Fm,Xt({key:[e.title,t.objectID].join(":"),item:t,index:n},e))}))))):null}function Fm(e){var t=e.item,n=e.index,r=e.renderIcon,u=e.renderAction,a=e.getItemProps,i=e.onItemClick,o=e.collection,s=e.hitComponent,c=cn(jt.useState("idle"),2),l=c[0],f=c[1],d=jt.useRef(null),p=s;return jt.createElement("li",Xt({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child","favoriting"===l&&"DocSearch-Hit--favoriting","deleting"===l&&"DocSearch-Hit--deleting"].filter(Boolean).join(" "),onAnimationEnd:function(){var e;null===(e=d.current)||void 0===e||e.call(d),d.current=null}},a({item:t,source:o.source,onClick:function(e){i(t,e)}})),jt.createElement(p,{hit:t},jt.createElement("div",{className:"DocSearch-Hit-Container"},r({item:t,index:n}),t.hierarchy[t.type]&&"lvl1"===t.type&&jt.createElement("div",{className:"DocSearch-Hit-content-wrapper"},jt.createElement(ym,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&jt.createElement(ym,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),"askAI"===t.type&&jt.createElement("div",{className:"DocSearch-Hit-content-wrapper"},jt.createElement(ym,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"})),t.hierarchy[t.type]&&("lvl2"===t.type||"lvl3"===t.type||"lvl4"===t.type||"lvl5"===t.type||"lvl6"===t.type)&&jt.createElement("div",{className:"DocSearch-Hit-content-wrapper"},jt.createElement(ym,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),jt.createElement(ym,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),"content"===t.type&&jt.createElement("div",{className:"DocSearch-Hit-content-wrapper"},jt.createElement(ym,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),jt.createElement(ym,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),u({item:t,runDeleteTransition:function(e){f("deleting"),d.current=e},runFavoriteTransition:function(e){f("favoriting"),d.current=e}}))))}function Em(e){var t=e.item,n=e.getItemProps,r=e.onItemClick,u=e.translations,a=e.collection,i=(u||{}).askAiPlaceholder,o=void 0===i?"Ask AI: ":i;return jt.createElement("li",Xt({className:"DocSearch-Hit"},n({item:t,source:a.source,onClick:function(e){r(t,e)}})),jt.createElement("div",{className:"DocSearch-Hit--AskAI"},jt.createElement("div",{className:"DocSearch-Hit-AskAIButton DocSearch-Hit-Container"},jt.createElement("div",{className:" DocSearch-Hit-AskAIButton-icon DocSearch-Hit-icon"},jt.createElement(Ah,null)),jt.createElement("div",{className:"DocSearch-Hit-AskAIButton-title"},jt.createElement("span",{className:"DocSearch-Hit-AskAIButton-title-highlight"},o),jt.createElement("mark",{className:"DocSearch-Hit-AskAIButton-title-query"},t.query||"")))))}function bm(e,t,n){return e.reduce((function(e,r){var u=t(r);return e.hasOwnProperty(u)||(e[u]=[]),e[u].length<(n||5)&&e[u].push(r),e}),{})}function _m(e){return e}function km(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function Cm(){}var Am=/(<mark>|<\/mark>)/g,wm=RegExp(Am.source);function xm(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var u=r.__docsearch_parent?null===(t=r.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(n=e._highlightResult)||void 0===n||null===(n=n.hierarchy)||void 0===n?void 0:n.lvl0;return u?u.value&&wm.test(u.value)?u.value.replace(Am,""):u.value:e.hierarchy.lvl0}var Sm=["translations"];function Bm(e){var t=e.translations,n=void 0===t?{}:t,r=an(e,Sm);return jt.createElement("div",{className:"DocSearch-Dropdown-Container"},r.state.collections.map((function(e){if(0===e.items.length)return null;var t=xm(e.items[0]);return jt.createElement(gm,Xt({},r,{key:e.source.sourceId,translations:n,title:t,collection:e,renderIcon:function(t){var n,r=t.item,u=t.index;return jt.createElement(jt.Fragment,null,r.__docsearch_parent&&jt.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},jt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.__docsearch_parent!==(null===(n=e.items[u+1])||void 0===n?void 0:n.__docsearch_parent)?jt.createElement("path",{d:"M8 6v21M20 27H8.3"}):jt.createElement("path",{d:"M8 6v42M20 27H8.3"}))),jt.createElement("div",{className:"DocSearch-Hit-icon"},jt.createElement(Ih,{type:r.type})))},renderAction:function(){return jt.createElement("div",{className:"DocSearch-Hit-action"},jt.createElement(Bh,null))}}))})),r.resultsFooterComponent&&jt.createElement("section",{className:"DocSearch-HitsFooter"},jt.createElement(r.resultsFooterComponent,{state:r.state})))}var Om=["translations"];function Im(e){var t=e.translations,n=void 0===t?{}:t,r=an(e,Om),u=n.recentSearchesTitle,a=void 0===u?"Recent":u,i=n.saveRecentSearchButtonTitle,o=void 0===i?"Save this search":i,s=n.removeRecentSearchButtonTitle,c=void 0===s?"Remove this search from history":s,l=n.favoriteSearchesTitle,f=void 0===l?"Favorite":l,d=n.removeFavoriteSearchButtonTitle,p=void 0===d?"Remove this search from favorites":d,h=n.recentConversationsTitle,v=void 0===h?"Recent conversations":h,m=n.removeRecentConversationButtonTitle,D=void 0===m?"Remove this conversation from history":m;return jt.createElement("div",{className:"DocSearch-Dropdown-Container"},jt.createElement(gm,Xt({},r,{title:a,collection:r.state.collections[0],renderIcon:function(){return jt.createElement("div",{className:"DocSearch-Hit-icon"},jt.createElement(wh,null))},renderAction:function(e){var t=e.item,n=e.runFavoriteTransition,u=e.runDeleteTransition;return jt.createElement(jt.Fragment,null,jt.createElement("div",{className:"DocSearch-Hit-action"},jt.createElement("button",{className:"DocSearch-Hit-action-button",title:o,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){r.favoriteSearches.add(t),r.recentSearches.remove(t),r.refresh()}))}},jt.createElement(jh,null))),jt.createElement("div",{className:"DocSearch-Hit-action"},jt.createElement("button",{className:"DocSearch-Hit-action-button",title:c,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),u((function(){r.recentSearches.remove(t),r.refresh()}))}},jt.createElement(xh,null))))}})),jt.createElement(gm,Xt({},r,{title:f,collection:r.state.collections[1],renderIcon:function(){return jt.createElement("div",{className:"DocSearch-Hit-icon"},jt.createElement(jh,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return jt.createElement("div",{className:"DocSearch-Hit-action"},jt.createElement("button",{className:"DocSearch-Hit-action-button",title:p,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){r.favoriteSearches.remove(t),r.refresh()}))}},jt.createElement(xh,null)))}})),jt.createElement(gm,Xt({},r,{title:v,collection:r.state.collections[2],renderIcon:function(){return jt.createElement("div",{className:"DocSearch-Hit-icon"},jt.createElement(Ah,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return jt.createElement("div",{className:"DocSearch-Hit-action"},jt.createElement("button",{className:"DocSearch-Hit-action-button",title:D,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){r.conversations.remove(t),r.refresh()}))}},jt.createElement(xh,null)))}})))}var Tm=["translations"],Pm=jt.memo((function(e){var t,n=e.translations,r=void 0===n?{}:n,u=an(e,Tm);return u.isAskAiActive&&u.canHandleAskAi?jt.createElement(sm,Xt({},u,{messages:u.messages,status:u.status,askAiStreamError:u.askAiStreamError,askAiFetchError:u.askAiFetchError,translations:null==r?void 0:r.askAiScreen})):"error"===(null===(t=u.state)||void 0===t?void 0:t.status)?jt.createElement(pm,{translations:null==r?void 0:r.errorScreen}):u.state.query?u.hasCollections||u.canHandleAskAi?jt.createElement(jt.Fragment,null,jt.createElement(Bm,Xt({},u,{translations:null==r?void 0:r.resultsScreen})),u.canHandleAskAi&&1===u.state.collections.length&&jt.createElement(vm,Xt({},u,{translations:null==r?void 0:r.noResultsScreen}))):jt.createElement(vm,Xt({},u,{translations:null==r?void 0:r.noResultsScreen})):jt.createElement(Im,Xt({},u,{hasCollections:u.hasCollections,translations:null==r?void 0:r.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function jm(e){var t=e.size,n=void 0===t?20:t,r=e.color,u=void 0===r?"currentColor":r;return jt.createElement("svg",{width:n,height:n,className:"DocSearch-Back-Icon",viewBox:"0 0 24 24",fill:"none",stroke:u,strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},jt.createElement("path",{d:"m12 19-7-7 7-7"}),jt.createElement("path",{d:"M19 12H5"}))}var Nm=["translations"];function zm(e){var t=e.translations,n=void 0===t?{}:t,r=an(e,Nm),u=n.clearButtonTitle,a=void 0===u?"Clear":u,i=n.clearButtonAriaLabel,o=void 0===i?"Clear the query":i,s=n.closeButtonText,c=void 0===s?"Close":s,l=n.closeButtonAriaLabel,f=void 0===l?"Close":l,d=n.searchInputLabel,p=void 0===d?"Search":d,h=n.backToKeywordSearchButtonText,v=void 0===h?"Back to keyword search":h,m=n.backToKeywordSearchButtonAriaLabel,D=void 0===m?"Back to keyword search":m,y=n.placeholderTextAskAiStreaming,g=void 0===y?"Answering...":y,F=r.getFormProps({inputElement:r.inputRef.current}).onReset;jt.useEffect((function(){r.autoFocus&&r.inputRef.current&&r.inputRef.current.focus()}),[r.autoFocus,r.inputRef]),jt.useEffect((function(){r.isFromSelection&&r.inputRef.current&&r.inputRef.current.select()}),[r.isFromSelection,r.inputRef]);var E=r.getInputProps({inputElement:r.inputRef.current,autoFocus:r.autoFocus,maxLength:512}),b=new Set(["ArrowUp","ArrowDown","Enter"]),_=E.onKeyDown,k=E.onChange,C="streaming"===r.askAiStatus||"submitted"===r.askAiStatus,A="stalled"===r.state.status;jt.useEffect((function(){"streaming"!==r.askAiStatus&&"submitted"!==r.askAiStatus&&r.inputRef.current&&r.inputRef.current.focus()}),[r.askAiStatus,r.inputRef]);var w=un(un({},E),{},{enterKeyHint:r.isAskAiActive?"enter":"search",onKeyDown:function(e){if(r.isAskAiActive&&b.has(e.key))return"Enter"===e.key&&!C&&r.state.query&&r.onAskAgain(r.state.query),e.preventDefault(),void e.stopPropagation();null==_||_(e)},onChange:function(e){if(r.isAskAiActive)return r.setQuery(e.currentTarget.value),e.preventDefault(),void e.stopPropagation();null==k||k(e)},disabled:C});return jt.createElement(jt.Fragment,null,jt.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:F},r.isAskAiActive?jt.createElement(jt.Fragment,null,jt.createElement("button",{type:"button",tabIndex:0,className:"DocSearch-AskAi-Return",title:v,"aria-label":D,onClick:function(){return r.onAskAiToggle(!1)}},jt.createElement(jm,null))):jt.createElement(jt.Fragment,null,A&&jt.createElement("div",{className:"DocSearch-LoadingIndicator"},jt.createElement(Ch,null)),!A&&jt.createElement("label",Xt({className:"DocSearch-MagnifierLabel"},r.getLabelProps()),jt.createElement(Fn,null),jt.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},p))),jt.createElement("input",Xt({className:"DocSearch-Input",ref:r.inputRef},w,{placeholder:C?g:r.placeholder})),jt.createElement("div",{className:"DocSearch-Actions"},C&&jt.createElement("button",{type:"button",className:"DocSearch-StreamingIndicator",onClick:function(){return r.onAskAiToggle(!0)}},jt.createElement(Ah,null)),jt.createElement("button",{className:"DocSearch-Clear",type:"reset","aria-label":o,hidden:!r.state.query,tabIndex:r.state.query?0:-1,"aria-hidden":r.state.query?"false":"true"},a),(C||r.state.query)&&jt.createElement("div",{className:"DocSearch-Divider"}),jt.createElement("button",{type:"button",title:c,className:"DocSearch-Close","aria-label":f,onClick:r.onClose},jt.createElement(xh,null)))))}function Rm(){if("undefined"!=typeof window&&window.localStorage){var e=[];for(var t in window.localStorage)if(t.includes("__DOCSEARCH_")){var n=window.localStorage[t];e.push({key:t,size:n.length+t.length})}e.sort((function(e,t){return t.size-e.size}));for(var r=Math.ceil(e.length/2),u=0;u<r&&u<e.length;u++)try{window.localStorage.removeItem(e[u].key)}catch(e){}}}function Mm(e){return!1===function(){if("undefined"==typeof window||!("localStorage"in window))return!1;var e="__TEST_KEY__";try{return window.localStorage.setItem(e,""),window.localStorage.removeItem(e),!0}catch(e){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){!function(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(n){if(n instanceof DOMException&&"QuotaExceededError"===n.name)try{Rm(),window.localStorage.setItem(e,JSON.stringify(t))}catch(e){}}}(e,t)},getItem:function(){var t=window.localStorage.getItem(e);if(null===t)return[];try{var n=JSON.parse(t);return Array.isArray(n)?n:[]}catch(t){return window.localStorage.removeItem(e),[]}}}}var Zm=["_highlightResult","_snippetResult"];function Lm(e){var t=e.key,n=e.limit,r=void 0===n?5:n,u=Mm(t),a=u.getItem().slice(0,r);return{add:function(e){var t=e;t._highlightResult,t._snippetResult;var n=an(t,Zm),i=a.findIndex((function(e){return e.objectID===n.objectID}));i>-1&&a.splice(i,1),a.unshift(n),a=a.slice(0,r),u.setItem(a)},remove:function(e){a=a.filter((function(t){return t.objectID!==e.objectID})),u.setItem(a)},getAll:function(){return a}}}function $m(e){var t,n="algolia-client-js-".concat(e.key);function r(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function u(){return JSON.parse(r().getItem(n)||"{}")}function a(e){r().setItem(n,JSON.stringify(e))}return{get:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var n,r,i;return n=e.timeToLive?1e3*e.timeToLive:null,r=u(),a(i=Object.fromEntries(Object.entries(r).filter((function(e){return void 0!==cn(e,2)[1].timestamp})))),n&&a(Object.fromEntries(Object.entries(i).filter((function(e){var t=cn(e,2)[1],r=(new Date).getTime();return!(t.timestamp+n<r)})))),u()[JSON.stringify(t)]})).then((function(e){return Promise.all([e?e.value:n(),void 0!==e])})).then((function(e){var t=cn(e,2),n=t[0],u=t[1];return Promise.all([n,u||r.miss(n)])})).then((function(e){return cn(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var a=u();return a[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},r().setItem(n,JSON.stringify(a)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=u();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){r().removeItem(n)}))}}}function qm(e){var t=ln(e.caches),n=t.shift();return void 0===n?{get:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return cn(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,u).catch((function(){return qm({caches:t}).get(e,r,u)}))},set:function(e,r){return n.set(e,r).catch((function(){return qm({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return qm({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return qm({caches:t}).clear()}))}}}function Um(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var i=r();return i.then((function(e){return u.miss(e)})).then((function(){return i}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function Vm(e){var t=e.algoliaAgents,n=e.client,r=e.version,u=function(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var n="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(n)&&(t.value="".concat(t.value).concat(n)),t}};return t}(r).add({segment:n,version:r});return t.forEach((function(e){return u.add(e)})),u}var Hm=12e4;function Wm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"up",n=Date.now();return un(un({},e),{},{status:t,lastUpdate:n,isUp:function(){return"up"===t||Date.now()-n>Hm},isTimedOut:function(){return"timed out"===t&&Date.now()-n<=Hm}})}var Km=function(){function e(t,n){var r;return Wt(this,e),Yt(r=Ht(this,e,[t]),"name","AlgoliaError"),n&&(r.name=n),r}return tn(e,hn(Error)),Gt(e)}(),Jm=function(){function e(t,n,r){var u;return Wt(this,e),Yt(u=Ht(this,e,[t,r]),"stackTrace",void 0),u.stackTrace=n,u}return tn(e,Km),Gt(e)}(),Gm=function(){function e(t){return Wt(this,e),Ht(this,e,["Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",t,"RetryError"])}return tn(e,Jm),Gt(e)}(),Qm=function(){function e(t,n,r){var u,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ApiError";return Wt(this,e),Yt(u=Ht(this,e,[t,r,a]),"status",void 0),u.status=n,u}return tn(e,Jm),Gt(e)}(),Ym=function(){function e(t,n){var r;return Wt(this,e),Yt(r=Ht(this,e,[t,"DeserializationError"]),"response",void 0),r.response=n,r}return tn(e,Km),Gt(e)}(),Xm=function(){function e(t,n,r,u){var a;return Wt(this,e),Yt(a=Ht(this,e,[t,n,u,"DetailedApiError"]),"error",void 0),a.error=r,a}return tn(e,Qm),Gt(e)}();function eD(e,t,n){var r,u=(r=n,Object.keys(r).filter((function(e){return void 0!==r[e]})).sort().map((function(e){return"".concat(e,"=").concat(encodeURIComponent("[object Array]"===Object.prototype.toString.call(r[e])?r[e].join(","):r[e]).replace(/\+/g,"%20"))})).join("&")),a="".concat(e.protocol,"://").concat(e.url).concat(e.port?":".concat(e.port):"","/").concat("/"===t.charAt(0)?t.substring(1):t);return u.length&&(a+="?".concat(u)),a}function tD(e,t){if("GET"!==e.method&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:un(un({},e.data),t.data);return JSON.stringify(n)}}function nD(e,t,n){var r=un(un(un({Accept:"application/json"},e),t),n),u={};return Object.keys(r).forEach((function(e){var t=r[e];u[e.toLowerCase()]=t})),u}function rD(e){try{return JSON.parse(e.content)}catch(t){throw new Ym(t.message,e)}}function uD(e,t){var n=e.content,r=e.status;try{var u=JSON.parse(n);return"error"in u?new Xm(u.message,r,u.error,t):new Qm(u.message,r,t)}catch(e){}return new Qm(n,r,t)}function aD(e){return e.map((function(e){return iD(e)}))}function iD(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return un(un({},e),{},{request:un(un({},e.request),{},{headers:un(un({},e.request.headers),t)})})}var oD=["appId","apiKey","authMode","algoliaAgents"],sD=["params"],cD="5.28.0";function lD(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){for(var t=e,n=e.length-1;n>0;n--){var r=Math.floor(Math.random()*(n+1)),u=e[n];t[n]=e[r],t[r]=u}return t}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}var fD="4.0.1";function dD(e,t,n){var r=jt.useMemo((function(){var r=function(e,t){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");return function(e){var t=e.appId,n=e.apiKey,r=e.authMode,u=e.algoliaAgents,a=an(e,oD),i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"WithinHeaders",r={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:function(){return"WithinHeaders"===n?r:{}},queryParameters:function(){return"WithinQueryParameters"===n?r:{}}}}(t,n,r),o=function(e){var t=e.hosts,n=e.hostsCache,r=e.baseHeaders,u=e.logger,a=e.baseQueryParameters,i=e.algoliaAgent,o=e.timeouts,s=e.requester,c=e.requestsCache,l=e.responsesCache;function f(e){return d.apply(this,arguments)}function d(){return(d=Vt(on().mark((function e(t){var r,u,a,i,o;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return n.get(e,(function(){return Promise.resolve(Wm(e))}))})));case 2:return r=e.sent,u=r.filter((function(e){return e.isUp()})),a=r.filter((function(e){return e.isTimedOut()})),i=[].concat(ln(u),ln(a)),o=i.length>0?i:t,e.abrupt("return",{hosts:o,getTimeout:function(e,t){return(0===a.length&&0===e?1:a.length+3+e)*t}});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e,t){return h.apply(this,arguments)}function h(){return h=Vt(on().mark((function e(c,l){var d,p,h,v,m,D,y,g,F,E,b,_,k,C=arguments;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d=!(C.length>2&&void 0!==C[2])||C[2],p=[],h=tD(c,l),v=nD(r,c.headers,l.headers),m="GET"===c.method?un(un({},c.data),l.data):{},D=un(un(un({},a),c.queryParameters),m),i.value&&(D["x-algolia-agent"]=i.value),l&&l.queryParameters)for(y=0,g=Object.keys(l.queryParameters);y<g.length;y++)F=g[y],l.queryParameters[F]&&"[object Object]"!==Object.prototype.toString.call(l.queryParameters[F])?D[F]=l.queryParameters[F].toString():D[F]=l.queryParameters[F];return E=0,b=function(){var e=Vt(on().mark((function e(t,r){var a,i,f,m,y,g;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==(a=t.pop())){e.next=3;break}throw new Gm(aD(p));case 3:return i=un(un({},o),l.timeouts),f={data:h,headers:v,method:c.method,url:eD(a,c.path,D),connectTimeout:r(E,i.connect),responseTimeout:r(E,d?i.read:i.write)},m=function(e){var n={request:f,response:e,host:a,triesLeft:t.length};return p.push(n),n},e.next=8,s.send(f);case 8:if(_=(F=y=e.sent).isTimedOut,k=F.status,!(_||function(e){return!e.isTimedOut&&!~~e.status}({isTimedOut:_,status:k})||2!=~~(k/100)&&4!=~~(k/100))){e.next=16;break}return g=m(y),y.isTimedOut&&E++,u.info("Retryable failure",iD(g)),e.next=15,n.set(a,Wm(a,y.isTimedOut?"timed out":"down"));case 15:return e.abrupt("return",b(t,r));case 16:if(2!=~~(y.status/100)){e.next=18;break}return e.abrupt("return",rD(y));case 18:throw m(y),uD(y,p);case 20:case"end":return e.stop()}var F,_,k}),e)})));return function(t,n){return e.apply(this,arguments)}}(),_=t.filter((function(e){return"readWrite"===e.accept||(d?"read"===e.accept:"write"===e.accept)})),e.next=13,f(_);case 13:return k=e.sent,e.abrupt("return",b(ln(k.hosts).reverse(),k.getTimeout));case 15:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}return{hostsCache:n,requester:s,timeouts:o,logger:u,algoliaAgent:i,baseHeaders:r,baseQueryParameters:a,hosts:t,request:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.useReadTransporter||"GET"===e.method;if(!n)return p(e,t,n);var u=function(){return p(e,t)};if(!0!==(t.cacheable||e.cacheable))return u();var i={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return l.get(i,(function(){return c.get(i,(function(){return c.set(i,u()).then((function(e){return Promise.all([c.delete(i),e])}),(function(e){return Promise.all([c.delete(i),Promise.reject(e)])})).then((function(e){var t=cn(e,2);return t[0],t[1]}))}))}),{miss:function(e){return l.set(i,e)}})},requestsCache:c,responsesCache:l}}(un(un({hosts:lD(t)},a),{},{algoliaAgent:Vm({algoliaAgents:u,client:"Lite",version:cD}),baseHeaders:un(un({"content-type":"text/plain"},i.headers()),a.baseHeaders),baseQueryParameters:un(un({},i.queryParameters()),a.baseQueryParameters)}));return{transporter:o,appId:t,apiKey:n,clearCache:function(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((function(){}))},get _ua(){return o.algoliaAgent.value},addAlgoliaAgent:function(e,t){o.algoliaAgent.add({segment:e,version:t})},setClientApiKey:function(e){var t=e.apiKey;r&&"WithinHeaders"!==r?o.baseQueryParameters["x-algolia-api-key"]=t:o.baseHeaders["x-algolia-api-key"]=t},searchForHits:function(e,t){return this.search(e,t)},searchForFacets:function(e,t){return this.search(e,t)},customPost:function(e,t){var n=e.path,r=e.parameters,u=e.body;if(!n)throw new Error("Parameter `path` is required when calling `customPost`.");var a={method:"POST",path:"/{path}".replace("{path}",n),queryParameters:r||{},headers:{},data:u||{}};return o.request(a,t)},getRecommendations:function(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var n={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return o.request(n,t)},search:function(e,t){if(e&&Array.isArray(e)){var n={requests:e.map((function(e){var t=e.params,n=an(e,sD);return"facet"===n.type?un(un(un({},n),t),{},{type:"facet"}):un(un(un({},n),t),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}))};e=n}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return o.request(r,t)}}}(un({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:function(e,t){return Promise.resolve()},info:function(e,t){return Promise.resolve()},error:function(e,t){return Promise.resolve()}},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,u=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),e)},a=u(e.connectTimeout,"Connection timeout");n.onreadystatechange=function(){n.readyState>n.OPENED&&void 0===r&&(clearTimeout(a),r=u(e.responseTimeout,"Socket timeout"))},n.onerror=function(){0===n.status&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:Um(),requestsCache:Um({serializable:!1}),hostsCache:qm({caches:[$m({key:"".concat(cD,"-").concat(e)}),Um()]})},void 0))}(e,t);return r.addAlgoliaAgent("docsearch",fD),!1===/docsearch.js \(.*\)/.test(r.transporter.algoliaAgent.value)&&r.addAlgoliaAgent("docsearch-react",fD),n(r)}),[e,t,n]);return r}var pD=["footer","searchBox"],hD=function(){var e=Vt(on().mark((function e(t){var n,r,u,a,i,o,s,c,l,f,d,p,h,v,m,D,y,g;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.query,r=t.state,u=t.setContext,a=t.setStatus,i=t.searchClient,o=t.indexes,s=t.snippetLength,c=t.insights,l=t.appId,f=t.apiKey,d=t.maxResultsPerGroup,p=t.transformItems,h=void 0===p?_m:p,v=t.saveRecentSearch,m=t.onClose,D=c,e.prev=2,e.next=5,i.search({requests:o.map((function(e){var t,r,u,a,i,o,c,l="string"==typeof e?e:e.name,f="string"==typeof e?{}:e.searchParameters;return un({query:n,indexName:l,attributesToRetrieve:null!==(t=null==f?void 0:f.attributesToRetrieve)&&void 0!==t?t:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:null!==(r=null==f?void 0:f.attributesToSnippet)&&void 0!==r?r:["hierarchy.lvl1:".concat(s.current),"hierarchy.lvl2:".concat(s.current),"hierarchy.lvl3:".concat(s.current),"hierarchy.lvl4:".concat(s.current),"hierarchy.lvl5:".concat(s.current),"hierarchy.lvl6:".concat(s.current),"content:".concat(s.current)],snippetEllipsisText:null!==(u=null==f?void 0:f.snippetEllipsisText)&&void 0!==u?u:"…",highlightPreTag:null!==(a=null==f?void 0:f.highlightPreTag)&&void 0!==a?a:"<mark>",highlightPostTag:null!==(i=null==f?void 0:f.highlightPostTag)&&void 0!==i?i:"</mark>",hitsPerPage:null!==(o=null==f?void 0:f.hitsPerPage)&&void 0!==o?o:20,clickAnalytics:null!==(c=null==f?void 0:f.clickAnalytics)&&void 0!==c?c:D},null!=f?f:{})}))});case 5:return y=e.sent,g=y.results,e.abrupt("return",g.flatMap((function(e){var t,n=e,a=n.hits,i=n.nbHits,o=bm(h(a),(function(e){return xm(e)}),d);if(r.context.searchSuggestions.length<Object.keys(o).length&&u({searchSuggestions:un(un({},null!==(t=r.context.searchSuggestions)&&void 0!==t?t:[]),Object.keys(o))}),i){var s=r.context.nbHits;u({nbHits:(null!=s?s:0)+i})}var c={};return D&&(c={__autocomplete_indexName:n.index,__autocomplete_queryID:n.queryID,__autocomplete_algoliaCredentials:{appId:l,apiKey:f}}),Object.values(o).map((function(e,t){return{sourceId:"hits_".concat(n.index,"_").concat(t),onSelect:function(e){var t=e.item,n=e.event;v(t),km(n)||m()},getItemUrl:function(e){return e.item.url},getItems:function(){return Object.values(bm(e,(function(e){return e.hierarchy.lvl1}),d)).map((function(e){return e.map((function(t){var n=null,r=e.find((function(e){return"lvl1"===e.type&&e.hierarchy.lvl1===t.hierarchy.lvl1}));return"lvl1"!==t.type&&r&&(n=r),un(un({},t),{},{__docsearch_parent:n},c)}))})).flat()}}}))})));case 10:throw e.prev=10,e.t0=e.catch(2),"RetryError"===e.t0.name&&a("error"),e.t0;case 14:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}();function vD(e){var t=e.appId,n=e.apiKey,r=e.placeholder,u=e.askAi,a=e.maxResultsPerGroup,i=e.theme,o=e.onClose,s=void 0===o?Cm:o,c=e.transformItems,l=void 0===c?_m:c,f=e.hitComponent,d=void 0===f?kh:f,p=e.resultsFooterComponent,h=void 0===p?function(){return null}:p,v=e.navigator,D=e.initialScrollY,y=void 0===D?0:D,g=e.transformSearchClient,F=void 0===g?_m:g,E=e.disableUserPersonalization,b=void 0!==E&&E,_=e.initialQuery,k=void 0===_?"":_,C=e.translations,A=void 0===C?{}:C,w=e.getMissingResultsUrl,x=e.insights,S=void 0!==x&&x,B=e.onAskAiToggle,O=e.isAskAiActive,I=void 0!==O&&O,T=e.canHandleAskAi,P=void 0!==T&&T,j=e.recentSearchesLimit,N=void 0===j?7:j,z=e.recentSearchesWithFavoritesLimit,R=void 0===z?4:z,M=e.indices,Z=void 0===M?[]:M,L=e.indexName,$=e.searchParameters,q=A.footer,U=A.searchBox,V=an(A,pD),H=cn(jt.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),W=H[0],K=H[1],J=jt.useRef(null),G=jt.useRef(null),Q=jt.useRef(null),Y=jt.useRef(null),X=jt.useRef(null),ee=jt.useRef(15),te=jt.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,512):"").current,ne=jt.useRef(k||te).current,re=dD(t,n,F),ue="object"===dn(u)?u:null,ae="string"==typeof u?u:(null==ue?void 0:ue.assistantId)||null,ie=null==ue?void 0:ue.searchParameters,oe=[];if(L&&""!==L&&oe.push({name:L,searchParameters:$}),Z.length>0&&Z.forEach((function(e){oe.push("string"==typeof e?{name:e}:e)})),oe.length<1)throw new Error("Must supply either `indexName` or `indices` for DocSearch to work");var se,ce,le,fe,de,pe,he,ve=oe[0].name,me=jt.useRef((se={key:"__DOCSEARCH_ASKAI_CONVERSATIONS__".concat((null==ue?void 0:ue.indexName)||ve),limit:10},ce=se.key,le=se.limit,fe=void 0===le?5:le,de=Mm(ce),pe=de.getItem().slice(0,fe),{add:function(e){var t=e.objectID,n=e.query,r=pe.findIndex((function(e){return e.objectID===t||e.query===n}));r>-1?pe[r]=e:(pe.unshift(e),pe=pe.slice(0,fe)),de.setItem(pe)},addFeedback:function(e,t){var n=pe.find((function(t){var n;return null===(n=t.messages)||void 0===n?void 0:n.some((function(t){return t.id===e}))}));if(n&&n.messages){var r=n.messages.find((function(t){return t.id===e}));r&&(r.feedback=t,de.setItem(pe))}},getOne:function(e){var t,n=pe.find((function(t){var n;return null===(n=t.messages)||void 0===n?void 0:n.some((function(t){return t.id===e}))}));return null==n||null===(t=n.messages)||void 0===t?void 0:t.find((function(t){return t.id===e}))},getAll:function(){return pe},remove:function(e){pe=pe.filter((function(t){return t.objectID!==e.objectID})),de.setItem(pe)}})).current,De=jt.useRef(Lm({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(ve),limit:10})).current,ye=jt.useRef(Lm({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(ve),limit:0===De.getAll().length?N:R})).current,ge=cn(jt.useState(null),2),Fe=ge[0],Ee=ge[1],be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.experimental_throttle,n=e.resume,r=void 0!==n&&n,u=m(e,$t),a=Oe("chat"in u?u.chat:new td(u));("chat"in u&&u.chat!==a.current||"id"in u&&a.current.id!==u.id)&&(a.current="chat"in u?u.chat:new td(u));var i="id"in u?u.id:null,o=Pe((function(e){return a.current["~registerMessagesCallback"](e,t)}),[t,i]),s=We(o,(function(){return a.current.messages})),c=We(a.current["~registerStatusCallback"],(function(){return a.current.status})),l=We(a.current["~registerErrorCallback"],(function(){return a.current.error})),f=Pe((function(e){"function"==typeof e&&(e=e(a.current.messages)),a.current.messages=e}),[a]);return Se((function(){r&&a.current.resumeStream()}),[r,a]),{id:a.current.id,messages:s,setMessages:f,sendMessage:a.current.sendMessage,regenerate:a.current.regenerate,clearError:a.current.clearError,stop:a.current.stop,error:l,resumeStream:a.current.resumeStream,status:c,addToolResult:a.current.addToolResult}}({sendAutomaticallyWhen:wf,transport:new Cf({api:vh,headers:(he=Vt(on().mark((function e(){var r;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ae){e.next=2;break}throw new Error("Ask AI assistant ID is required");case 2:return r=null,e.next=6,gh({assistantId:ae});case 6:r=e.sent;case 7:return e.abrupt("return",un(un({},r?{authorization:"TOKEN ".concat(r)}:{}),{},{"X-Algolia-API-Key":(null==ue?void 0:ue.apiKey)||n,"X-Algolia-Application-Id":(null==ue?void 0:ue.appId)||t,"X-Algolia-Index-Name":(null==ue?void 0:ue.indexName)||ve,"X-Algolia-Assistant-Id":ae||"","X-AI-SDK-Version":"v5"}));case 8:case"end":return e.stop()}}),e)}))),function(){return he.apply(this,arguments)}),body:ie?{searchParameters:ie}:{}}),onError:function(e){Ee(e)}}),_e=be.messages,ke=be.sendMessage,Ce=be.status,Ae=be.setMessages,we=be.error,xe=jt.useRef(Ce);jt.useEffect((function(){if(!b){if("streaming"===xe.current&&"ready"===Ce){var e,t=Qt(_e[0].parts);try{for(t.s();!(e=t.n()).done;){var n=e.value;"text"===n.type&&me.add(tm(n.text,_e))}}catch(e){t.e(e)}finally{t.f()}}xe.current=Ce}}),[Ce,_e,me,b]);var Be=jt.useCallback((function(e){var t=e.hierarchy,n=["lvl6","lvl5","lvl4","lvl3","lvl2","lvl1","lvl0"].find((function(e){return t[e]}));return un(un({},e),{},{type:n||"lvl0",content:null})}),[]),Ie=jt.useCallback((function(e){if(!b){var t="content"===e.type?e.__docsearch_parent||Be(e):e;t&&-1===De.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&ye.add(t)}}),[De,ye,b,Be]),Te=jt.useCallback((function(e){if(W.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,n={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};W.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(n)}}),[W.context.algoliaInsightsPlugin]),je=jt.useRef(void 0),Ne=jt.useCallback((function(e,t){if(B(e),ke({role:"user",parts:[{type:"text",text:t}]}),Y.current){var n=Y.current;"function"==typeof n.scrollTo?n.scrollTo({top:0,behavior:"smooth"}):n.scrollTop=0}je.current&&je.current.setQuery("")}),[B,ke]),ze=jt.useCallback(function(){var e=Vt(on().mark((function e(n,r){var u;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ae&&t){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Fh({assistantId:ae,thumbs:r,messageId:n,appId:t});case 4:if(!(e.sent.status>=300)){e.next=7;break}throw new Error("Failed, try again later");case 7:null===(u=me.addFeedback)||void 0===u||u.call(me,n,1===r?"like":"dislike");case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[ae,t,me]);je.current||(je.current=hh({id:"docsearch",defaultActiveItemId:0,openOnFocus:!0,initialState:{query:ne,context:{searchSuggestions:[]}},insights:Boolean(S),navigator:v,onStateChange:function(e){K(e.state)},getSources:function(e){var r=e.query,u=e.state,i=e.setContext,o=e.setStatus;if(!r){var c=function(e){var t=e.recentSearches,n=e.favoriteSearches,r=e.saveRecentSearch,u=e.onClose;return e.disableUserPersonalization?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,n=e.event;r(t),km(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return t.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,n=e.event;r(t),km(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return n.getAll()}}]}({recentSearches:ye,favoriteSearches:De,saveRecentSearch:Ie,onClose:s,disableUserPersonalization:b,canHandleAskAi:P}),f=P?[{sourceId:"recentConversations",getItems:function(){return b?[]:me.getAll()},onSelect:function(e){var t=e.item;t.messages&&(Ae(t.messages),B(!0))}}]:[];return[].concat(ln(c),f)}var d={context:u.context},p=hD({query:r,state:d,setContext:i,setStatus:o,searchClient:re,indexes:oe,snippetLength:ee,insights:Boolean(S),appId:t,apiKey:n,maxResultsPerGroup:a,transformItems:l,saveRecentSearch:Ie,onClose:s}),h=P?[{sourceId:"askAI",getItems:function(){return[{type:"askAI",query:r,url_without_anchor:"",objectID:"ask-ai-button",content:null,url:"",anchor:null,hierarchy:{lvl0:"Ask AI",lvl1:r,lvl2:null,lvl3:null,lvl4:null,lvl5:null,lvl6:null},_highlightResult:{},_snippetResult:{},__docsearch_parent:null}]},onSelect:function(e){var t=e.item;"askAI"===t.type&&t.query&&Ne(!0,t.query)}}]:[];return p.then((function(e){return[].concat(h,ln(e))}))}}));var Re,Me,Ze=je.current,Le=Ze.getEnvironmentProps,$e=Ze.getRootProps,qe=Ze.refresh;!function(e){var t=e.getEnvironmentProps,n=e.panelElement,r=e.formElement,u=e.inputElement;jt.useEffect((function(){if(n&&r&&u){var e=t({panelElement:n,formElement:r,inputElement:u}),a=e.onTouchStart,i=e.onTouchMove;return window.addEventListener("touchstart",a),window.addEventListener("touchmove",i),function(){window.removeEventListener("touchstart",a),window.removeEventListener("touchmove",i)}}}),[t,n,r,u])}({getEnvironmentProps:Le,panelElement:Y.current,formElement:Q.current,inputElement:X.current}),Re={container:J.current},Me=Re.container,jt.useEffect((function(){if(Me){var e=Me.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), input:not([disabled])"),t=e[0],n=e[e.length-1];return Me.addEventListener("keydown",r),function(){Me.removeEventListener("keydown",r)}}function r(e){"Tab"===e.key&&(e.shiftKey?document.activeElement===t&&(e.preventDefault(),n.focus()):document.activeElement===n&&(e.preventDefault(),t.focus()))}}),[Me]),En({theme:i}),jt.useEffect((function(){return document.body.classList.add("DocSearch--active"),function(){var e,t;document.body.classList.remove("DocSearch--active"),null===(e=(t=window).scrollTo)||void 0===e||e.call(t,0,y)}}),[]),jt.useEffect((function(){"undefined"!=typeof window&&window.localStorage&&function(){if("undefined"==typeof window||!window.localStorage)return 0;var e=0;for(var t in window.localStorage)window.localStorage.hasOwnProperty(t)&&(e+=window.localStorage[t].length+t.length);return e}()>4194304&&Rm()}),[]),jt.useLayoutEffect((function(){var e=window.innerWidth-document.body.clientWidth;return document.body.style.marginRight="".concat(e,"px"),function(){document.body.style.marginRight="0px"}}),[]),jt.useEffect((function(){window.matchMedia("(max-width: 768px)").matches&&(ee.current=5)}),[]),jt.useEffect((function(){var e;Y.current&&!I&&("function"==typeof(e=Y.current).scrollTo?e.scrollTo({top:0,behavior:"smooth"}):e.scrollTop=0)}),[W.query,I]),jt.useEffect((function(){ne.length>0&&(qe(),X.current&&X.current.focus())}),[ne,qe]),jt.useEffect((function(){function e(){if(G.current){var e=.01*window.innerHeight;G.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),jt.useEffect((function(){I||(Ze.refresh(),Ae([]))}),[I,Ze,Ae]);var Ue=!0,Ve=W.collections.some((function(e){return e.items.length>0}));return"idle"!==W.status||!1!==Ve||0!==W.query.length||I||(Ue=!1),jt.createElement("div",Xt({ref:J},$e({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===W.status&&"DocSearch-Container--Stalled","error"===W.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&s()}}),jt.createElement("div",{className:"DocSearch-Modal",ref:G},jt.createElement("header",{className:"DocSearch-SearchBar",ref:Q},jt.createElement(zm,Xt({},Ze,{state:W,placeholder:r||"Search docs",autoFocus:0===ne.length,inputRef:X,isFromSelection:Boolean(ne)&&ne===te,translations:U,isAskAiActive:I,askAiStatus:Ce,onClose:s,onAskAiToggle:B,onAskAgain:function(e){Ne(!0,e)}}))),Ue&&jt.createElement("div",{className:"DocSearch-Dropdown",ref:Y},jt.createElement(Pm,Xt({},Ze,{indexName:ve,state:W,hitComponent:d,resultsFooterComponent:h,disableUserPersonalization:b,recentSearches:ye,favoriteSearches:De,conversations:me,inputRef:X,translations:V,getMissingResultsUrl:w,isAskAiActive:I,canHandleAskAi:P,messages:_e,askAiStreamError:Fe,askAiFetchError:we,status:Ce,hasCollections:Ve,onAskAiToggle:B,onItemClick:function(e,t){if("askAI"===e.type&&e.query)return"stored"===e.anchor&&"messages"in e?(Ae(e.messages),B(!0)):Ne(!0,e.query),void t.preventDefault();Te(e),Ie(e),km(t)||s()},onFeedback:ze}))),jt.createElement("footer",{className:"DocSearch-Footer"},jt.createElement(_h,{translations:q,isAskAiActive:I}))))}function mD(e){var t,n,r,u,a,i,o=jt.useRef(null),s=cn(jt.useState(!1),2),c=s[0],l=s[1],f=cn(jt.useState((null==e?void 0:e.initialQuery)||void 0),2),d=f[0],p=f[1],h=cn(jt.useState(!1),2),v=h[0],m=h[1],D=(null==e||null===(t=e.translations)||void 0===t||null===(t=t.modal)||void 0===t||null===(t=t.searchBox)||void 0===t?void 0:t.placeholderText)||(null==e?void 0:e.placeholder)||"Search docs",y=Boolean(null==e?void 0:e.askAi);y&&(D=(null==e||null===(a=e.translations)||void 0===a||null===(a=a.modal)||void 0===a||null===(a=a.searchBox)||void 0===a?void 0:a.placeholderText)||"Search docs or ask AI a question"),v&&(D=(null==e||null===(i=e.translations)||void 0===i||null===(i=i.modal)||void 0===i||null===(i=i.searchBox)||void 0===i?void 0:i.placeholderTextAskAi)||"Ask another question...");var g=jt.useCallback((function(e){m(e)}),[m]),F=jt.useCallback((function(){l(!0)}),[l]),E=jt.useCallback((function(){l(!1),p(null==e?void 0:e.initialQuery),v&&m(!1)}),[l,e.initialQuery,v,m]);return function(e){var t=e.isOpen,n=e.onOpen,r=e.onClose,u=e.onInput,a=e.isAskAiActive,i=e.onAskAiToggle,o=e.searchButtonRef,s=mn(e.keyboardShortcuts);jt.useEffect((function(){function e(e){var c;if(t&&"Escape"===e.code&&a)i(!1);else{var l=s["Ctrl/Cmd+K"]&&"k"===(null===(c=e.key)||void 0===c?void 0:c.toLowerCase())&&(e.metaKey||e.ctrlKey),f=s["/"]&&"/"===e.key;if("Escape"===e.code&&t||l||!function(e){var t=e.composedPath()[0],n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&f&&!t)return e.preventDefault(),void(t?r():document.body.classList.contains("DocSearch--active")||n());o&&o.current===document.activeElement&&u&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&u(e)}}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,r,u,o,a,i,s])}({isOpen:c,onOpen:F,onClose:E,onInput:jt.useCallback((function(e){l(!0),p(e.key)}),[l,p]),isAskAiActive:v,onAskAiToggle:g,searchButtonRef:o,keyboardShortcuts:e.keyboardShortcuts}),En({theme:e.theme}),jt.createElement(jt.Fragment,null,jt.createElement(kn,{ref:o,translations:null==e||null===(n=e.translations)||void 0===n?void 0:n.button,keyboardShortcuts:e.keyboardShortcuts,onClick:F}),c&&vt(jt.createElement(vD,Xt({},e,{placeholder:D,initialScrollY:window.scrollY,initialQuery:d,translations:null==e||null===(r=e.translations)||void 0===r?void 0:r.modal,isAskAiActive:v,canHandleAskAi:y,onAskAiToggle:g,onClose:E})),null!==(u=e.portalContainer)&&void 0!==u?u:document.body))}function DD(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return"string"==typeof e?t.document.querySelector(e):e}(e.container,e.environment);return bt(jt.createElement(mD,l({},e,{transformSearchClient:function(t){return t.addAlgoliaAgent("docsearch.js",fD),e.transformSearchClient?e.transformSearchClient(t):t}})),t),function(){Pt(t)}}export{DD as default};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|