1function ai(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jo(e,t,n,r,u,a,i){try{var o=e[a](i),s=o.value}catch(c){return void n(c)}o.done?t(s):Promise.resolve(s).then(r,u)}function Be(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var a=e.apply(t,n);function i(s){Jo(a,r,u,i,o,"next",s)}function o(s){Jo(a,r,u,i,o,"throw",s)}i(void 0)})}}function qn(e,t,n){return t=fu(t),(function(r,u){if(u&&(typeof u=="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nr(r)})(e,no()?Reflect.construct(t,n||[],fu(e).constructor):t.apply(e,n))}function Pt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ko(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,ol(r.key),r)}}function jt(e,t,n){return t&&Ko(e.prototype,t),n&&Ko(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fr(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ro(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(s){throw s},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 2In 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 s=n.next();return i=s.done,s},e:function(s){o=!0,a=s},f:function(){try{i||n.return==null||n.return()}finally{if(o)throw a}}}}function Tt(e,t,n){return(t=ol(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fu(e){return fu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fu(e)}function Un(e,t){if(typeof t!="function"&&t!==null)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&&du(e,t)}function no(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(no=function(){return!!e})()}function Qo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qo(Object(n),!0).forEach(function(r){Tt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qo(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dn(e,t){if(e==null)return{};var n,r,u=(function(i,o){if(i==null)return{};var s={};for(var c in i)if({}.hasOwnProperty.call(i,c)){if(o.indexOf(c)!==-1)continue;s[c]=i[c]}return s})(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function ae(){var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",u=n.toStringTag||"@@toStringTag";function a(h,m,D,y){var E=m&&m.prototype instanceof o?m:o,g=Object.create(E.prototype);return mt(g,"_invoke",(function(b,F,_){var k,C,A,N=0,P=_||[],I=!1,O={p:0,n:0,v:e,a:Z,f:Z.bind(e,4),d:function(B,L){return k=B,C=0,A=e,O.n=L,i}};function Z(B,L){for(C=B,A=L,t=0;!I&&N&&!S&&t<P.length;t++){var S,w=P[t],x=O.p,j=w[2];B>3?(S=j===L)&&(A=w[(C=w[4])?5:(C=3,3)],w[4]=w[5]=e):w[0]<=x&&((S=B<2&&x<w[1])?(C=0,O.v=L,O.n=w[1]):x<j&&(S=B<3||w[0]>L||L>j)&&(w[4]=B,w[5]=L,O.n=j,C=0))}if(S||B>1)return i;throw I=!0,L}return function(B,L,S){if(N>1)throw TypeError("Generator is already running");for(I&&L===1&&Z(L,S),C=L,A=S;(t=C<2?e:A)||!I;){k||(C?C<3?(C>1&&(O.n=-1),Z(C,A)):O.n=A:O.v=A);try{if(N=2,k){if(C||(B="next"),t=k[B]){if(!(t=t.call(k,A)))throw TypeError("iterator result is not an object");
2if(!t.done)return t;A=t.value,C<2&&(C=0)}else C===1&&(t=k.return)&&t.call(k),C<2&&(A=TypeError("The iterator does not provide a '"+B+"' method"),C=1);k=e}else if((t=(I=O.n<0)?A:b.call(F,O))!==i)break}catch(w){k=e,C=1,A=w}finally{N=1}}return{value:t,done:I}}})(h,D,y),!0),g}var i={};function o(){}function s(){}function c(){}t=Object.getPrototypeOf;var d=[][r]?t(t([][r]())):(mt(t={},r,function(){return this}),t),f=c.prototype=o.prototype=Object.create(d);function l(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,mt(h,u,"GeneratorFunction")),h.prototype=Object.create(f),h}return s.prototype=c,mt(f,"constructor",c),mt(c,"constructor",s),s.displayName="GeneratorFunction",mt(c,u,"GeneratorFunction"),mt(f),mt(f,u,"Generator"),mt(f,r,function(){return this}),mt(f,"toString",function(){return"[object Generator]"}),(ae=function(){return{w:a,m:l}})()}function mt(e,t,n,r){var u=Object.defineProperty;try{u({},"",{})}catch{u=0}mt=function(a,i,o,s){function c(d,f){mt(a,d,function(l){return this._invoke(d,f,l)})}i?u?u(a,i,{value:o,enumerable:!s,configurable:!s,writable:!s}):a[i]=o:(c("next",0),c("throw",1),c("return",2))},mt(e,t,n,r)}function du(e,t){return du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},du(e,t)}function ii(e,t){return(function(n){if(Array.isArray(n))return n})(e)||(function(n,r){var u=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var a,i,o,s,c=[],d=!0,f=!1;try{if(o=(u=u.call(n)).next,r!==0)for(;!(d=(a=o.call(u)).done)&&(c.push(a.value),c.length!==r);d=!0);}catch(l){f=!0,i=l}finally{try{if(!d&&u.return!=null&&(s=u.return(),Object(s)!==s))return}finally{if(f)throw i}}return c}})(e,t)||ro(e,t)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Fe(e){return(function(t){if(Array.isArray(t))return ai(t)})(e)||(function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)})(e)||ro(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 4In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ol(e){var t=(function(n,r){if(typeof n!="object"||!n)return n;var u=n[Symbol.toPrimitive];if(u!==void 0){var a=u.call(n,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)})(e,"string");return typeof t=="symbol"?t:t+""}function re(e){return re=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},re(e)}function ro(e,t){if(e){if(typeof e=="string")return ai(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ai(e,t):void 0}}function oi(e){var t=typeof Map=="function"?new Map:void 0;return oi=function(n){if(n===null||!(function(u){try{return Function.toString.call(u).indexOf("[native code]")!==-1}catch{return typeof u=="function"}})(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,r)}function r(){return(function(u,a,i){if(no())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,a);var s=new(u.bind.apply(u,o));return i&&du(s,i.prototype),s})(n,arguments,fu(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),du(r,n)},oi(e)}var Ce,sl,zn,Go,ra,cl,ll,uo,si,ci,fl,pu={},dl=[],hu=Array.isArray,wa=dl.slice,en=Object.assign;function li(e){e&&e.parentNode&&e.remove()}function gt(e,t,n){var r,u,a,i={};for(a in t)a=="key"?r=t[a]:a=="ref"&&typeof e!="function"?u=t[a]:i[a]=t[a];return arguments.length>2&&(i.children=arguments.length>3?wa.call(arguments,2):n),qr(e,i,r,u,null)}function qr(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:u??++sl,__i:-1,__u:0};
vendor: 12,593 bytes, line 4
4return u==null&&Ce.vnode!=null&&Ce.vnode(a),a}function jd(){return{current:null}}function qt(e){return e.children}function tn(e,t){this.props=e,this.context=t,this.__g=0}function dr(e,t){if(t==null)return e.__?dr(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?dr(e):null}function pl(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return pl(e)}}function fi(e){(8&e.__g||!(e.__g|=8)||!zn.push(e)||ra++)&&Go==Ce.debounceRendering||((Go=Ce.debounceRendering)||queueMicrotask)(Nd)}function Nd(){for(var e,t,n,r,u,a,i,o,s=1;zn.length;)zn.length>s&&zn.sort(cl),e=zn.shift(),s=zn.length,8&e.__g&&(n=void 0,u=(r=(t=e).__v).__e,a=[],i=[],(o=t.__P)&&((n=en({},r)).__v=r.__v+1,Ce.vnode&&Ce.vnode(n),ao(o,n,r,t.__n,o.namespaceURI,32&r.__u?[u]:null,a,u??dr(r),!!(32&r.__u),i,o.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,vl(a,n,i),n.__e!=u&&pl(n)));ra=0}function Yo(e,t,n,r,u,a,i,o,s,c,d,f){var l,h,m,D,y,E,g,b=r&&r.__k||dl,F=t.length;for(s=(function(_,k,C,A,N){var P,I,O,Z,B,L=C.length,S=L,w=0;for(_.__k=new Array(N),P=0;P<N;P++)(I=k[P])!=null&&typeof I!="boolean"&&typeof I!="function"?(Z=P+w,(I=_.__k[P]=typeof I=="string"||typeof I=="number"||typeof I=="bigint"||I.constructor==String?qr(null,I,null,null,null):hu(I)?qr(qt,{children:I},null,null,null):I.constructor==null&&I.__b>0?qr(I.type,I.props,I.key,I.ref?I.ref:null,I.__v):I).__=_,I.__b=_.__b+1,O=null,(B=I.__i=zd(I,C,Z,S))!=-1&&(S--,(O=C[B])&&(O.__u|=2)),O==null||O.__v==null?(B==-1&&(N>L?w--:N<L&&w++),typeof I.type!="function"&&(I.__u|=4)):B!=Z&&(B==Z-1?w--:B==Z+1?w++:(B>Z?w--:w++,I.__u|=4))):_.__k[P]=null;if(S)for(P=0;P<L;P++)(O=C[P])!=null&&!(2&O.__u)&&(O.__e==A&&(A=dr(O)),Dl(O,O));return A})(n,t,b,s,F),l=0;l<F;l++)(m=n.__k[l])!=null&&(h=m.__i==-1?pu:b[m.__i]||pu,m.__i=l,E=ao(e,m,h,u,a,i,o,s,c,d,f),D=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&io(h.ref,null,m),d.push(m.ref,m.__c||D,m)),y==null&&D!=null&&(y=D),(g=!!(4&m.__u))||h.__k===m.__k?s=hl(m,s,e,g):typeof m.type=="function"&&E!==void 0?s=E:D&&(s=D.nextSibling),m.__u&=-7);return n.__e=y,s}function hl(e,t,n,r){var u,a;if(typeof e.type=="function"){for(u=e.__k,a=0;u&&a<u.length;a++)u[a]&&(u[a].__=e,t=hl(u[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=dr(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function vn(e,t){return t=t||[],e==null||typeof e=="boolean"||(hu(e)?e.some(function(n){vn(n,t)}):t.push(e)),t}function zd(e,t,n,r){var u,a,i,o=e.key,s=e.type,c=t[n],d=c!=null&&!(2&c.__u);if(c===null&&e.key==null||d&&o==c.key&&s==c.type)return n;if(r>(d?1:0)){for(u=n-1,a=n+1;u>=0||a<t.length;)if((c=t[i=u>=0?u--:a++])!=null&&!(2&c.__u)&&o==c.key&&s==c.type)return i}return-1}function Xo(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n??""}function Bu(e,t,n,r,u){var a;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Xo(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Xo(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(ll,"$1")),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||(e.__l={}),e.__l[t+a]=n,n?r?n.l=r.l:(n.l=uo,e.addEventListener(t,a?ci:si,a)):e.removeEventListener(t,a?ci:si,a);else{if(u=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function es(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=uo++;else if(t.u<n.l)return;return n(Ce.event?Ce.event(t):t)}}}function ao(e,t,n,r,u,a,i,o,s,c,d){var f,l,h,m,D,y,E,g,b,F,_,k,C,A,N,P,I,O,Z,B,L,S=t.type;if(t.constructor!=null)return null;128&n.__u&&(s=!!(32&n.__u),n.__c.__z&&(o=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(f=Ce.__b)&&f(t);e:if(typeof S=="function")try{if(g=t.props,b="prototype"in S&&S.prototype.render,F=(f=S.contextType)&&r[f.__c],_=f?F?F.props.value:f.__:r,n.__c?2&(l=t.__c=n.__c).__g&&(l.__g|=1,E=!0):(b?t.__c=l=new S(g,_):(t.__c=l=new tn(g,_),l.constructor=S,l.render=Rd),F&&F.sub(l),l.props=g,l.state||(l.state={}),l.context=_,l.__n=r,h=!0,l.__g|=8,l.__h=[],l._sb=[]),b&&l.__s==null&&(l.__s=l.state),b&&S.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=en({},l.__s)),en(l.__s,S.getDerivedStateFromProps(g,l.__s))),m=l.props,D=l.state,l.__v=t,h)b&&S.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),b&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(b&&S.getDerivedStateFromProps==null&&g!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(g,_),!(4&l.__g)&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(g,l.__s,_)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(l.props=g,l.state=l.__s,l.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(w){w&&(w.__=t)}),k=0;k<l._sb.length;k++)l.__h.push(l._sb[k]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(g,l.__s,_),b&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,D,y)})}if(l.context=_,l.props=g,l.__P=e,l.__g&=-5,C=Ce.__r,A=0,b){for(l.state=l.__s,l.__g&=-9,C&&C(t),f=l.render(l.props,l.state,l.context),N=0;N<l._sb.length;N++)l.__h.push(l._sb[N]);l._sb=[]}else do l.__g&=-9,C&&C(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(8&l.__g&&++A<25);l.state=l.__s,l.getChildContext!=null&&(r=en({},r,l.getChildContext())),b&&!h&&l.getSnapshotBeforeUpdate!=null&&(y=l.getSnapshotBeforeUpdate(m,D)),P=f,f!=null&&f.type===qt&&f.key==null&&(P=ml(f.props.children)),o=Yo(e,hu(P)?P:[P],t,n,r,u,a,i,o,s,c,d),t.__u&=-161,l.__h.length&&i.push(l),E&&(l.__g&=-4)}catch(w){if(t.__v=null,s||a!=null)if(w.then){for(I=0,O=!1,t.__u|=s?160:128,t.__c.__z=[],Z=0;Z<a.length;Z++)(B=a[Z])==null||O||(B.nodeType==8&&B.data=="$s"?(I>0&&t.__c.__z.push(B),I++,a[Z]=null):B.nodeType==8&&B.data=="/$s"?(--I>0&&t.__c.__z.push(B),O=I===0,o=a[Z],a[Z]=null):I>0&&(t.__c.__z.push(B),a[Z]=null));if(!O){for(;o&&o.nodeType==8&&o.nextSibling;)o=o.nextSibling;a[a.indexOf(o)]=null,t.__c.__z=[o]}t.__e=o}else{for(L=a.length;L--;)li(a[L]);di(t)}else t.__e=n.__e,t.__k=n.__k,w.then||di(t);Ce.__e(w,t,n)}else o=t.__e=(function(w,x,j,R,T,M,V,J,ee,le){var $,Q,ie,pe,Y,oe,_e,ze,ke=j.props,Pe=x.props,Me=x.type;if(Me=="svg"?T="http://www.w3.org/2000/svg":Me=="math"?T="http://www.w3.org/1998/Math/MathML":T||(T="http://www.w3.org/1999/xhtml"),M!=null){for($=0;$<M.length;$++)if((Y=M[$])&&"setAttribute"in Y==!!Me&&(Me?Y.localName==Me:Y.nodeType==3)){w=Y,M[$]=null;break}}if(w==null){if(Me==null)return le.createTextNode(Pe);w=le.createElementNS(T,Me,Pe.is&&Pe),J&&(Ce.__m&&Ce.__m(x,M),J=!1),M=null}if(Me==null)ke===Pe||J&&w.data==Pe||(w.data=Pe);else{if(M=M&&wa.call(w.childNodes),ke=j.props||pu,!J&&M!=null)for(ke={},$=0;$<w.attributes.length;$++)ke[(Y=w.attributes[$]).name]=Y.value;for($ in ke)if(Y=ke[$],$!="children"){if($=="dangerouslySetInnerHTML")ie=Y;else if(!($ in Pe)){if($=="value"&&"defaultValue"in Pe||$=="checked"&&"defaultChecked"in Pe)continue;Bu(w,$,null,Y,T)}}for($ in ze=1&j.__u,Pe)Y=Pe[$],$=="children"?pe=Y:$=="dangerouslySetInnerHTML"?Q=Y:$=="value"?oe=Y:$=="checked"?_e=Y:J&&typeof Y!="function"||ke[$]===Y&&!ze||Bu(w,$,Y,ke[$],T);if(Q)J||ie&&(Q.__html==ie.__html||Q.__html==w.innerHTML)||(w.innerHTML=Q.__html),x.__k=[];else if(ie&&(w.innerHTML=""),Yo(Me=="template"?w.content:w,hu(pe)?pe:[pe],x,j,R,Me=="foreignObject"?"http://www.w3.org/1999/xhtml":T,M,V,M?M[0]:j.__k&&dr(j,0),J,ee,le),M!=null)for($=M.length;$--;)li(M[$]);J||($="value",Me=="progress"&&oe==null?w.removeAttribute("value"):oe==null||oe===w[$]&&(Me!=="progress"||oe)||Bu(w,$,oe,ke[$],T),$="checked",_e!=null&&_e!=w[$]&&Bu(w,$,_e,ke[$],T))}return w})(n.__e,t,n,r,u,a,i,s,c,d);return(f=Ce.diffed)&&f(t),128&t.__u?void 0:o}function di(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(di)}function vl(e,t,n){for(var r=0;r<n.length;r++)io(n[r],n[++r],n[++r]);Ce.__c&&Ce.__c(t,e),e.some(function(u){try{e=u.__h,u.__h=[],e.some(function(a){a.call(u)})}catch(a){Ce.__e(a,u.__v)}})}function ml(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:hu(e)?e.map(ml):en({},e)}function io(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(u){Ce.__e(u,n)}}function Dl(e,t,n){var r,u;if(Ce.unmount&&Ce.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||io(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){Ce.__e(a,t)}r.__P=null}if(r=e.__k)for(u=0;u<r.length;u++)r[u]&&Dl(r[u],t,n||typeof e.type!="function");n||li(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function Rd(e,t,n){return this.constructor(e,n)}function vu(e,t){var n,r,u,a;t==document&&(t=document.documentElement),Ce.__&&Ce.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=gt(qt,null,[e]),u=[],a=[],ao(t,e,r||pu,pu,t.namespaceURI,r?null:t.firstChild?wa.call(t.childNodes):null,u,r?r.__e:t.firstChild,n,a,t.ownerDocument),vl(u,e,a)}function Md(e,t,n){var r,u,a,i=en({},e.props);for(a in t)a=="key"?r=t[a]:a=="ref"&&typeof e.type!="function"?u=t[a]:i[a]=t[a];return arguments.length>2&&(i.children=arguments.length>3?wa.call(arguments,2):n),qr(e.type,i,r||e.key,u||e.ref,null)}Ce={__e:function(e,t,n,r){for(var u,a,i;t=t.__;)if((u=t.__c)&&!(1&u.__g)){u.__g|=4;try{if((a=u.constructor)&&a.getDerivedStateFromError!=null&&(u.setState(a.getDerivedStateFromError(e)),i=8&u.__g),u.componentDidCatch!=null&&(u.componentDidCatch(e,r||{}),i=8&u.__g),i)return void(u.__g|=2)}catch(o){e=o}}throw ra=0,e}},sl=0,tn.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=en({},this.state),typeof e=="function"&&(e=e(en({},n),this.props)),e&&en(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),fi(this))},tn.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),fi(this))},tn.prototype.render=qt,zn=[],ra=0,cl=function(e,t){return e.__v.__b-t.__v.__b},ll=/(PointerCapture)$|Capture$/i,uo=0,si=es(!1),ci=es(!0),fl=0;var gn,Le,$a,ts,pi=Object.is,pr=0,gl=[],Je=Ce,ns=Je.__b,rs=Je.__r,us=Je.diffed,as=Je.__c,is=Je.unmount,os=Je.__;function yr(e,t){Je.__h&&Je.__h(Le,e,pr||t),pr=0;var n=Le.__H||(Le.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function _n(e){return pr=1,oo(_l,e)}function oo(e,t,n){var r=yr(gn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):_l(void 0,t),function(o){var s=r.__N?r.__N[0]:r.__[0],c=r.t(s,o);pi(s,c)||(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=Le,!Le.__f)){var u=function(o,s,c){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(l){return!!l.__c});if(d.every(function(l){return!l.__N}))return!a||a.call(this,o,s,c);var f=r.__c.props!==o;return d.forEach(function(l){if(l.__N){var h=l.__[0];l.__=l.__N,l.__N=void 0,pi(h,l.__[0])||(f=!0)}}),a&&a.call(this,o,s,c)||f};Le.__f=!0;var a=Le.shouldComponentUpdate,i=Le.componentWillUpdate;Le.componentWillUpdate=function(o,s,c){if(4&this.__g){var d=a;a=void 0,u(o,s,c),a=d}i&&i.call(this,o,s,c)},Le.shouldComponentUpdate=u}return r.__N||r.__}function bt(e,t){var n=yr(gn++,3);!Je.__s&&so(n.__H,t)&&(n.__=e,n.u=t,Le.__H.__h.push(n))}function Au(e,t){var n=yr(gn++,4);!Je.__s&&so(n.__H,t)&&(n.__=e,n.u=t,Le.__h.push(n))}function Yt(e){return pr=5,ft(function(){return{current:e}},[])}function yl(e,t,n){pr=6,Au(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function ft(e,t){var n=yr(gn++,7);return so(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Rn(e,t){return pr=8,ft(function(){return e},t)}function Fl(e){var t=Le.context[e.__c],n=yr(gn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Le)),t.props.value):e.__}function El(e,t){Je.useDebugValue&&Je.useDebugValue(t?t(e):e)}function bl(){var e=yr(gn++,11);if(!e.__){for(var t=Le.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Zd(){for(var e;e=gl.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Vu),e.__H.__h.forEach(hi),e.__H.__h=[]}catch(t){e.__H.__h=[],Je.__e(t,e.__v)}}Je.__b=function(e){Le=null,ns&&ns(e)},Je.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),os&&os(e,t)},Je.__r=function(e){rs&&rs(e),gn=0;var t=(Le=e.__c).__H;
4t&&($a===Le?(t.__h=[],Le.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Vu),t.__h.forEach(hi),t.__h=[],gn=0)),$a=Le},Je.diffed=function(e){us&&us(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(gl.push(t)!==1&&ts===Je.requestAnimationFrame||((ts=Je.requestAnimationFrame)||Ld)(Zd)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),$a=Le=null},Je.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Vu),n.__h=n.__h.filter(function(r){return!r.__||hi(r)})}catch(r){t.some(function(u){u.__h&&(u.__h=[])}),t=[],Je.__e(r,n.__v)}}),as&&as(e,t)},Je.unmount=function(e){is&&is(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Vu(r)}catch(u){t=u}}),n.__H=void 0,t&&Je.__e(t,n.__v))};var ss=typeof requestAnimationFrame=="function";function Ld(e){var t,n=function(){clearTimeout(r),ss&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);ss&&(t=requestAnimationFrame(n))}function Vu(e){var t=Le,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Le=t}function hi(e){var t=Le;e.__c=e.__(),Le=t}function so(e,t){return!e||e.length!==t.length||t.some(function(n,r){return!pi(n,e[r])})}function _l(e,t){return typeof t=="function"?t(e):t}function Ur(e,t){var n=t(),r=_n({t:{__:n,u:t}}),u=r[0].t,a=r[1];return Au(function(){u.__=n,u.u=t,qa(u)&&a({t:u})},[e,n,t]),bt(function(){return qa(u)&&a({t:u}),e(function(){qa(u)&&a({t:u})})},[e]),n}function qa(e){var t=e.u,n=e.__;try{var r=t();return!Object.is(n,r)}catch{return!0}}function kl(e){e()}function Cl(e){return e}function Al(){return[!1,kl]}var wl=Au,co=Object.assign;function vi(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}var $d=/^(-|f[lo].*[^se]$|g.{5,}[^ps]$|z|o[pr]|(W.{5})?[lL]i.*(t|mp)$|an|(bo|s).{4}Im|sca|m.{6}[ds]|ta|c.*[st]$|wido|ini)/;function mi(e,t){this.props=e,this.context=t}function Sl(e,t){function n(u){var a=this.props.ref,i=a==u.ref;return!i&&a&&(a.call?a(null):a.current=null),t?!t(this.props,u)||!i:vi(this.props,u)}function r(u){return this.shouldComponentUpdate=n,gt(e,u)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.type=e,r}(mi.prototype=new tn).isPureReactComponent=!0,mi.prototype.shouldComponentUpdate=function(e,t){return vi(this.props,e)||vi(this.state,t)};var qd=Symbol.for("react.forward_ref"),cs=function(e,t,n){return e==null?null:vn(vn(e).map(t.bind(n)))},Ud={map:cs,forEach:cs,count:function(e){return e?vn(e).length:0},only:function(e){var t=vn(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:vn},Hd=Ce.__e;Ce.__e=function(e,t,n,r){if(e.then){for(var u,a=t;a=a.__;)if((u=a.__c)&&u.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),u.__c(e,t)}Hd(e,t,n,r)};var ls=Ce.unmount;function xl(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=co({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__g|=4,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return xl(r,t,n)})),e}function Ol(e,t,n){return e&&n&&(typeof e.type=="string"&&(e.__u|=1),e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Ol(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__g|=4,e.__c.__P=n)),e}function Wu(){this.__u=0,this.o=null,this.__b=null}function Vd(e){return this.getChildContext=function(){return e.context},e.children}function Wd(e){var t=this,n=e.i;if(t.componentWillUnmount=function(){vu(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),!t.l){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},ownerDocument:n.ownerDocument,insertBefore:function(u,a){this.childNodes.push(u),t.i.insertBefore(u,a)}}}vu(gt(Vd,{context:t.context},e.__v),t.l)}function Bl(e,t){var n=gt(Wd,{__v:e,i:t});return n.containerInfo=t,n}Ce.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),ls&&ls(e)},(Wu.prototype=new tn).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var u=!1,a=function(){u||(u=!0,n.__R=null,i())};n.__R=a;var i=function(){if(!--r.__u){if(r.state.__a){var o=r.state.__a;r.__v.__k[0]=Ol(o,o.__c.__P,o.__c.__O)}var s;for(r.setState({__a:r.__b=null});s=r.o.pop();)s.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Wu.prototype.componentWillUnmount=function(){this.o=[]},Wu.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]=xl(this.__b,n,r.__O=r.__P)}this.__b=null}return[gt(qt,null,t.__a?null:e.children),t.__a&>(qt,null,e.fallback)]};var Il=Symbol.for("react.element"),Jd=/^(?: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]/,Kd=/[A-Z0-9]/g,Qd=typeof document<"u",Gd=function(e){return/fil|che|rad/.test(e)};function Tl(e,t,n){return t.__k==null&&(t.textContent=""),vu(e,t),typeof n=="function"&&n(),e?e.__c:null}tn.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(tn.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var fs=Ce.event;function Yd(){}function Xd(){return this.cancelBubble}function ep(){return this.defaultPrevented}Ce.event=function(e){return fs&&(e=fs(e)),e.persist=Yd,e.isPropagationStopped=Xd,e.isDefaultPrevented=ep,e.nativeEvent=e};
4var lo,tp={enumerable:!1,configurable:!0,get:function(){return this.class}},ds=Ce.vnode;Ce.vnode=function(e){if(typeof e.type=="string")(function(r){var u=r.props,a=r.type,i={},o=a.indexOf("-")===-1;for(var s in u){var c=u[s];if(!(s==="value"&&"defaultValue"in u&&c==null||Qd&&s==="children"&&a==="noscript"||s==="class"||s==="className")){if(s==="style"&&typeof c=="object")for(var d in c)typeof c[d]!="number"||$d.test(d)||(c[d]+="px");else if(s==="defaultValue"&&"value"in u&&u.value==null)s="value";else if(s==="download"&&c===!0)c="";else if(s==="translate"&&c==="no")c=!1;else if(s[0]==="o"&&s[1]==="n"){var f=s.toLowerCase();f==="ondoubleclick"?s="ondblclick":f!=="onchange"||a!=="input"&&a!=="textarea"||Gd(u.type)?f==="onfocus"?s="onfocusin":f==="onblur"&&(s="onfocusout"):f=s="oninput",f==="oninput"&&i[s=f]&&(s="oninputCapture")}else o&&Jd.test(s)?s=s.replace(Kd,"-$&").toLowerCase():c===null&&(c=void 0);i[s]=c}}a=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=vn(u.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),a=="select"&&i.defaultValue!=null&&(i.value=vn(u.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),u.class&&!u.className?(i.class=u.class,Object.defineProperty(i,"className",tp)):(u.className&&!u.class||u.class&&u.className)&&(i.class=i.className=u.className),r.props=i})(e);else if(typeof e.type=="function"&&("ref"in e.props&&"prototype"in e.type&&e.type.prototype.render&&(e.ref=e.props.ref,delete e.props.ref),e.type.defaultProps)){var t=co({},e.props);for(var n in e.type.defaultProps)t[n]===void 0&&(t[n]=e.type.defaultProps[n]);e.props=t}e.$$typeof=Il,ds&&ds(e)};var ps=Ce.__r;Ce.__r=function(e){ps&&ps(e),lo=e.__c};var hs=Ce.diffed;Ce.diffed=function(e){hs&&hs(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),lo=null};var np={ReactCurrentDispatcher:{current:{readContext:function(e){return lo.__n[e.__c].props.value},useCallback:Rn,useContext:Fl,useDebugValue:El,useDeferredValue:Cl,useEffect:bt,useId:bl,useImperativeHandle:yl,useInsertionEffect:wl,useLayoutEffect:Au,useMemo:ft,useReducer:oo,useRef:Yt,useState:_n,useSyncExternalStore:Ur,useTransition:Al}}};function jr(e){return!!e&&e.$$typeof===Il}function Pl(e){return!!e.__k&&(vu(null,e),!0)}var p={useState:_n,useId:bl,useReducer:oo,useEffect:bt,useLayoutEffect:Au,useInsertionEffect:wl,useTransition:Al,useDeferredValue:Cl,useSyncExternalStore:Ur,startTransition:kl,useRef:Yt,useImperativeHandle:yl,useMemo:ft,useCallback:Rn,useContext:Fl,useDebugValue:El,version:"18.3.1",Children:Ud,render:Tl,hydrate:function(e,t,n){return(function(r,u){r.__u|=32,vu(r,u)})(e,t),typeof n=="function"&&n(),e?e.__c:null},unmountComponentAtNode:Pl,createPortal:Bl,createElement:gt,createContext:function(e){function t(n){var r,u;return this.getChildContext||(r=new Set,(u={})[t.__c]=this,this.getChildContext=function(){return u},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(a){this.props.value!=a.value&&r.forEach(function(i){i.__g|=4,fi(i)})},this.sub=function(a){r.add(a);var i=a.componentWillUnmount;a.componentWillUnmount=function(){r&&r.delete(a),i&&i.call(a)}}),n.children}return t.__c="__cC"+fl++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t},createFactory:function(e){return gt.bind(null,e)},cloneElement:function(e){return jr(e)?Md.apply(null,arguments):e},createRef:jd,Fragment:qt,isValidElement:jr,isElement:jr,isFragment:function(e){return jr(e)&&e.type===qt},isMemo:function(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")},findDOMNode:function(e){return e&&(e.__v&&e.__v.__e||e.nodeType===1&&e)||null},Component:tn,PureComponent:mi,memo:Sl,forwardRef:function(e){function t(n){var r=co({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=qd,t.render=e,t.prototype.isReactComponent=!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:qt,Suspense:Wu,lazy:function(e){var t,n,r;function u(a){if(t||(t=e()).then(function(i){n=i.default||i},function(i){r=i}),r)throw r;if(!n)throw t;return gt(n,a)}return u.displayName="Lazy",u}
4,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:np};function vs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rp(e,t,n){return(t=(function(r){var u=(function(a,i){if(re(a)!="object"||!a)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(re(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return re(u)=="symbol"?u:u+""})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ms(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function Ds(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ms(Object(n),!0).forEach(function(r){rp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ms(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Or(e,t){return(function(n){if(Array.isArray(n))return n})(e)||(function(n,r){var u=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var a,i,o,s,c=[],d=!0,f=!1;try{if(o=(u=u.call(n)).next,r!==0)for(;!(d=(a=o.call(u)).done)&&(c.push(a.value),c.length!==r);d=!0);}catch(l){f=!0,i=l}finally{try{if(!d&&u.return!=null&&(s=u.return(),Object(s)!==s))return}finally{if(f)throw i}}return c}})(e,t)||(function(n,r){if(n){if(typeof n=="string")return vs(n,r);var u={}.toString.call(n).slice(8,-1);return u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set"?Array.from(n):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?vs(n,r):void 0}})(e,t)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 5In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}var jl={"Ctrl/Cmd+K":!0,"/":!0,"Ctrl/Cmd+I":!0};function up(e){return Ds(Ds({},jl),e)}function ap(e){var t=e.isOpen,n=e.isAskAiActive,r=e.onAskAiToggle,u=e.onClose,a=e.onOpen,i=e.keyboardShortcuts,o=i===void 0?jl:i;p.useEffect(function(){function s(c){var d;if(t&&c.code==="Escape"&&n)r(!1);else{var f=o["Ctrl/Cmd+K"]&&((d=c.key)===null||d===void 0?void 0:d.toLowerCase())==="k"&&(c.metaKey||c.ctrlKey),l=o["/"]&&c.key==="/";(c.code==="Escape"&&t||f||!(function(h){var m=h.composedPath()[0],D=m.tagName;return m.isContentEditable||D==="INPUT"||D==="SELECT"||D==="TEXTAREA"})(c)&&l&&!t)&&(c.preventDefault(),t?u():document.body.classList.contains("DocSearch--active")||a())}}return window.addEventListener("keydown",s),function(){window.removeEventListener("keydown",s)}},[t,n,o,a,u,r])}var ip=["children","theme","onReady","onOpen","onClose","onSidepanelOpen","onSidepanelClose"],fo=p.createContext(void 0);fo.displayName="DocSearchContext";var Nl=p.forwardRef(function(e,t){var n=e.children,r=e.theme,u=e.onReady,a=e.onOpen,i=e.onClose,o=e.onSidepanelOpen,s=e.onSidepanelClose,c=(function(T,M){if(T==null)return{};var V,J,ee=(function($,Q){if($==null)return{};var ie={};for(var pe in $)if({}
5.hasOwnProperty.call($,pe)){if(Q.indexOf(pe)!==-1)continue;ie[pe]=$[pe]}return ie})(T,M);if(Object.getOwnPropertySymbols){var le=Object.getOwnPropertySymbols(T);for(J=0;J<le.length;J++)V=le[J],M.indexOf(V)===-1&&{}.propertyIsEnumerable.call(T,V)&&(ee[V]=T[V])}return ee})(e,ip),d=Or(p.useState("ready"),2),f=d[0],l=d[1],h=Or(p.useState(c.initialQuery||""),2),m=h[0],D=h[1],y=p.useRef(null),E=up(c.keyboardShortcuts),g=Or(p.useState(),2),b=g[0],F=g[1],_=Or(p.useState(function(){return new Set}),2),k=_[0],C=_[1],A=(function(){var T=Or(p.useState(!1),2),M=T[0],V=T[1];return p.useEffect(function(){var J=function(){var ee=window.matchMedia("(max-width: 768px)");V(ee.matches)};return J(),window.addEventListener("resize",J),function(){window.removeEventListener("resize",J)}},[]),M})(),N=p.useRef("ready"),P=["modal-search","modal-askai"].includes(f),I=f==="modal-askai",O=!A&&k.has("sidepanel"),Z=f==="sidepanel";p.useEffect(function(){u?.()},[u]),p.useEffect(function(){var T=N.current,M=f;M!=="modal-search"&&M!=="modal-askai"||T==="modal-search"||T==="modal-askai"||a==null||a(),M!=="ready"||T!=="modal-search"&&T!=="modal-askai"||i==null||i(),M==="sidepanel"&&T!=="sidepanel"&&o?.(),M!=="sidepanel"&&T==="sidepanel"&&s?.(),N.current=M},[f,a,i,o,s]);var B=p.useCallback(function(){l("modal-search")},[]),L=p.useCallback(function(){var T,M;l("ready"),(T=y.current)===null||T===void 0||T.focus(),D((M=c.initialQuery)!==null&&M!==void 0?M:"")},[l,c.initialQuery]),S=p.useCallback(function(T,M){if(!A&&T&&O)return F(M),void l("sidepanel");l(T?"modal-askai":"modal-search")},[l,A,O]),w=p.useCallback(function(T){k.has("sidepanel")&&(F(T),l("sidepanel"))},[l,k]);p.useCallback(function(T){l("modal-search"),D(T.key)},[l,D]);var x=p.useCallback(function(){F(void 0)},[]),j=p.useCallback(function(T){k.has(T)||C(function(M){var V=new Set(M);return V.add(T),V})},[k]);p.useImperativeHandle(t,function(){return{open:B,close:L,openAskAi:function(T){return S(!0,T)},openSidepanel:w,get isReady(){return!0},get isOpen(){return P},get isSidepanelOpen(){return Z},get isSidepanelSupported(){return O}}},[B,L,S,w,P,Z,O]),(function(T){var M=T.theme;bt(function(){if(M){var V=document.documentElement.dataset.theme;if(M!==V)return document.documentElement.dataset.theme=M,function(){V===void 0?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=V}}},[M])})({theme:r}),ap({isOpen:P,onOpen:B,onClose:L,onAskAiToggle:S,isAskAiActive:I,keyboardShortcuts:E});var R=p.useMemo(function(){return{docsearchState:f,setDocsearchState:l,searchButtonRef:y,initialQuery:m,keyboardShortcuts:E,openModal:B,closeModal:L,isAskAiActive:I,isModalActive:P,onAskAiToggle:S,initialAskAiMessage:b,clearInitialAskAiMessage:x,registerView:j,isHybridModeSupported:O}},[f,y,m,E,B,L,I,P,S,b,x,j,O]);return p.createElement(fo.Provider,{value:R},n)});Nl.displayName="DocSearch";var op=["type"],sp=["type"],cp=["additionalProperties"],lp=["abortSignal"],fp=["messageId"],dp=["messages"],pp=["experimental_throttle","resume"];function Di(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gs(e,t,n,r,u,a,i){try{var o=e[a](i),s=o.value}catch(c){return void n(c)}o.done?t(s):Promise.resolve(s).then(r,u)}function be(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var a=e.apply(t,n);function i(s){gs(a,r,u,i,o,"next",s)}function o(s){gs(a,r,u,i,o,"throw",s)}i(void 0)})}}function De(e,t,n){return t=mu(t),(function(r,u){if(u&&(re(u)=="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a})(r)})(e,po()?Reflect.construct(t,n||[],mu(e).constructor):t.apply(e,n))}function se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zl(e,t,n){if(po())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var u=new(e.bind.apply(e,r));return n&&hr(u,n.prototype),u}function ys(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,Rl(r.key),r)}}function ce(e,t,n){return t&&ys(e.prototype,t),n&&ys(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function K(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];
5if(!n){if(Array.isArray(e)||(n=ho(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(s){throw s},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 6In 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 s=n.next();return i=s.done,s},e:function(s){o=!0,a=s},f:function(){try{i||n.return==null||n.return()}finally{if(o)throw a}}}}function Se(e,t,n){return(t=Rl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $e(){return $e=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},$e.apply(null,arguments)}function mu(e){return mu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mu(e)}function ve(e,t){if(typeof t!="function"&&t!==null)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&&hr(e,t)}function po(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(po=function(){return!!e})()}function Fs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fs(Object(n),!0).forEach(function(r){Se(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fs(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ut(e,t){if(e==null)return{};var n,r,u=(function(i,o){if(i==null)return{};var s={};for(var c in i)if({}.hasOwnProperty.call(i,c)){if(o.indexOf(c)!==-1)continue;s[c]=i[c]}return s})(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function X(){var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",u=n.toStringTag||"@@toStringTag";function a(h,m,D,y){var E=m&&m.prototype instanceof o?m:o,g=Object.create(E.prototype);return Dt(g,"_invoke",(function(b,F,_){var k,C,A,N=0,P=_||[],I=!1,O={p:0,n:0,v:e,a:Z,f:Z.bind(e,4),d:function(B,L){return k=B,C=0,A=e,O.n=L,i}};function Z(B,L){for(C=B,A=L,t=0;!I&&N&&!S&&t<P.length;t++){var S,w=P[t],x=O.p,j=w[2];B>3?(S=j===L)&&(A=w[(C=w[4])?5:(C=3,3)],w[4]=w[5]=e):w[0]<=x&&((S=B<2&&x<w[1])?(C=0,O.v=L,O.n=w[1]):x<j&&(S=B<3||w[0]>L||L>j)&&(w[4]=B,w[5]=L,O.n=j,C=0))}if(S||B>1)return i;throw I=!0,L}return function(B,L,S){if(N>1)throw TypeError("Generator is already running");for(I&&L===1&&Z(L,S),C=L,A=S;(t=C<2?e:A)||!I;){k||(C?C<3?(C>1&&(O.n=-1),Z(C,A)):O.n=A:O.v=A);try{if(N=2,k){if(C||(B="next"),t=k[B]){if(!(t=t.call(k,A)))throw TypeError("iterator result is not an object");if(!t.done)return t;A=t.value,C<2&&(C=0)}else C===1&&(t=k.return)&&t.call(k),C<2&&(A=TypeError("The iterator does not provide a '"+B+"' method"),C=1);k=e}else if((t=(I=O.n<0)?A:b.call(F,O))!==i)break}catch(w){k=e,C=1,A=w}finally{N=1}}return{value:t,done:I}}})(h,D,y),!0),g}var i={};function o(){}function s(){}function c(){}t=Object.getPrototypeOf;var d=[][r]?t(t([][r]())):(Dt(t={},r,function(){return this}),t),f=c.prototype=o.prototype=Object.create(d);function l(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,Dt(h,u,"GeneratorFunction")),h.prototype=Object.create(f),h}return s.prototype=c,Dt(f,"constructor",c),Dt(c,"constructor",s),s.displayName="GeneratorFunction",Dt(c,u,"GeneratorFunction"),Dt(f),Dt(f,u,"Generator"),Dt(f,r,function(){return this}),Dt(f,"toString",function(){return"[object Generator]"}),(X=function(){return{w:a,m:l}})()}function Dt(e,t,n,r){var u=Object.defineProperty;try{u({},"",{})}catch{u=0}Dt=function(a,i,o,s){function c(d,f){Dt(a,d,function(l){return this._invoke(d,f,l)})}i?u?u(a,i,{value:o,enumerable:!s,configurable:!s,writable:!s}):a[i]=o:(c("next",0),c("throw",1),c("return",2))},Dt(e,t,n,r)}function hr(e,t){return hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},hr(e,t)}function xe(e,t){return(function(n){if(Array.isArray(n))return n})(e)||(function(n,r){var u=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var a,i,o,s,c=[],d=!0,f=!1;try{if(o=(u=u.call(n)).next,r===0){if(Object(u)!==u)return;d=!1}else for(;
6!(d=(a=o.call(u)).done)&&(c.push(a.value),c.length!==r);d=!0);}catch(l){f=!0,i=l}finally{try{if(!d&&u.return!=null&&(s=u.return(),Object(s)!==s))return}finally{if(f)throw i}}return c}})(e,t)||ho(e,t)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 7In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function G(e){return(function(t){if(Array.isArray(t))return Di(t)})(e)||(function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)})(e)||ho(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 8In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Rl(e){var t=(function(n,r){if(re(n)!="object"||!n)return n;var u=n[Symbol.toPrimitive];if(u!==void 0){var a=u.call(n,r);if(re(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(e,"string");return re(t)=="symbol"?t:t+""}function Qe(e){return Qe=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},Qe(e)}function ho(e,t){if(e){if(typeof e=="string")return Di(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Di(e,t):void 0}}function yn(e){var t=typeof Map=="function"?new Map:void 0;return yn=function(n){if(n===null||!(function(u){try{return Function.toString.call(u).indexOf("[native code]")!==-1}catch{return typeof u=="function"}})(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,r)}function r(){return zl(n,arguments,mu(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),hr(r,n)},yn(e)}function ua(){ua=function(u,a){return new n(u,void 0,a)};var e=RegExp.prototype,t=new WeakMap;function n(u,a,i){var o=RegExp(u,a);return t.set(o,i||t.get(u)),hr(o,n.prototype)}function r(u,a){var i=t.get(a);return Object.keys(i).reduce(function(o,s){var c=i[s];if(typeof c=="number")o[s]=u[c];else{for(var d=0;u[c[d]]===void 0&&d+1<c.length;)d++;o[s]=u[c[d]]}return o},Object.create(null))}return ve(n,RegExp),n.prototype.exec=function(u){var a=e.exec.call(this,u);if(a){a.groups=r(a,this);var i=a.indices;i&&(i.groups=r(i,this))}return a},n.prototype[Symbol.replace]=function(u,a){if(typeof a=="string"){var i=t.get(this);return e[Symbol.replace].call(this,u,a.replace(/\$<([^>]+)(>|$)/g,function(s,c,d){if(d==="")return s;var f=i[c];return Array.isArray(f)?"$"+f.join("$"):typeof f=="number"?"$"+f:""}))}if(typeof a=="function"){var o=this;return e[Symbol.replace].call(this,u,function(){var s=arguments;return re(s[s.length-1])!="object"&&(s=[].slice.call(s)).push(r(s,o)),a.apply(this,s)})}return e[Symbol.replace].call(this,u,a)},ua.apply(this,arguments)}var hp=new Set(["AI-203","AI-205","AI-224","AI-225"]);function Hr(e,t){for(var n=0,r=Object.entries(e);n<r.length;n++){var u=xe(r[n],2),a=u[0],i=u[1];if(a.toLowerCase()===t.toLowerCase()&&typeof i=="string"&&i.trim()!=="")return i.trim()}}function vp(e){var t=/\b(AI-\d{3})\b/i.exec(e);if(t)return t[1].toUpperCase();try{var n,r=JSON.parse(e),u=(n=r.code)!==null&&n!==void 0?n:r.errorCode;if(typeof u=="string"&&/AI-\d{3}/i.test(u))return u.trim().toUpperCase()}catch{}}function Es(e){return/\brequest blocked for this domain\b/.test(e)||/\bblocked for this domain\b/.test(e)}var mp=[{matches:function(e){return typeof e.extractedCodeUpper=="string"&&hp.has(e.extractedCodeUpper)}},{matches:function(e){return e.parsedJson!==null&&Es(((t=Hr(e.parsedJson,"message"))!==null&&t!==void 0?t:"").toLowerCase());var t},showNewConversationLink:!1},{matches:function(e){return e.parsedJson!==null&&(function(t){var n,r,u=typeof t.type=="string"?t.type:"";if(/tokenoutput|outputlimit|steplimit|maxstep|ratelimit|domainnotallowed/i.test(u))return!0;var a=(n=Hr(t,"error"))!==null&&n!==void 0?n:"";if(a.toUpperCase()==="TOO_MANY_REQUESTS"||/token output|output limits|token limits|rate limit|whitelist|step limit|max steps|could not complete response due to token/i.test(a))return!0;var i=(r=Hr(t,"message"))!==null&&r!==void 0?r:"";if(/rate limit exceeded|retry after \d+/i.test(i)||/whitelist/i.test(i))return!0;var o=i.toLowerCase(),s=o.indexOf("not allowed");return s!==-1&&o.indexOf("domain",s)!==-1})(e.parsedJson)}},{matches:function(e){return(function(t){return/\bTokenOutputLimitError\b/i.test(t)})(e.message)},showNewConversationLink:!1},{matches:function(e){return(function(t){return/\b429\b/.test(t)||/\brate\s*limit/i.test(t)||/\btoo\s+many\s+attempts\b/.test(t)||/\btoo_many_requests\b/.test(t)})(e.messageLower)}},{matches:function(e){return Es(e.messageLower)},showNewConversationLink:!1},{matches:function(e){return(function(t){return/\bwhitelist(ed)?\b/.test(t)||/\bnot\s+allowed\s+for\s+this\s+domain\b/.test(t)})(e.messageLower)}},{matches:function(e){return(function(t){var n=t;return/\bcontext\s+length\b/.test(n)||/\bmax tokens\b/.test(n)||/\bmax token\b/.test(n)||/\bmaximum tokens\b/.test(n)||/\bmaximum token\b/.test(n)||/\btoken\s+limit\b/.test(n)||/\btoken\s+output\b/.test(n)||/\boutput\s+limits?\b/.test(n)})(e.messageLower)}},{matches:function(e){return(function(t){var n=t;return/\bstep limit\b/.test(n)||/\bmax steps\b/.test(n)||/\bmax step\b/.test(n)||/\bmaximum steps\b/.test(n)||/\bmaximum step\b/.test(n)||/\bmax agent steps\b/.test(n)||/\bmax agent step\b/.test(n)||/\bmaximum agent steps\b/.test(n)||/\bmaximum agent step\b/.test(n)})(e.messageLower)}}];function Ml(e){var t=(function(u){var a,i=(a=u.message)!==null&&a!==void 0?a:"",o=i.toLowerCase(),s=null;try{var c=JSON.parse(i);c&&Qe(c)==="object"&&!Array.isArray(c)&&(s=c)}catch{}return{message:i,messageLower:o,parsedJson:s,extractedCodeUpper:vp(i)}})(e),n=mp.filter(function(u){return u.matches(t)});if(n.length===0)return{blocking:!1,showNewConversationLink:!0};var r=n.every(function(u){return u.showNewConversationLink!==!1});return{blocking:!0,showNewConversationLink:r}}function Zl(e){return e.replace(/<[^>]*>/g,"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var Dp=function(e,t){var n=t[0].parts.find(function(u){return u.type==="text"}),r=n!=null&&n.text?Zl(n.text):"";return{query:e,objectID:r,messages:t,type:"askAI",anchor:"stored",content:null,hierarchy:{lvl0:"askAI",lvl1:r,lvl2:null,lvl3:null,lvl4:null,lvl5:null,lvl6:null},url:"",url_without_anchor:""}},bs=function(e){return e?.parts.find(function(t){return t.type==="text"})};function _s(e){return!!e&&(function(t){return t.includes("ai-217")||/thread\s+depth/.test(t)})(e.toLowerCase())}function gi(e){var t;return!!e&&(function(n){if(_s(n))return!0;try{var r,u=JSON.parse(n),a=(r=u.code)!==null&&r!==void 0?r:u.errorCode;
8return typeof a=="string"&&a.toUpperCase()==="AI-217"||_s(typeof u.message=="string"?u.message:"")}catch{return!1}})((t=e.message)!==null&&t!==void 0?t:"")}function vo(e,t){return!!e&&(!!gi(e)||!!t&&(function(n){return Ml(n).blocking})(e))}function yi(e){var t;if(!e)return!1;var n=(t=e.message)!==null&&t!==void 0?t:"";if(/TokenOutputLimitError/i.test(n)||/could not complete response due to token output limits/i.test(n))return!0;try{var r=JSON.parse(n);if(typeof r.type=="string"&&/^TokenOutputLimitError$/i.test(r.type.trim())||typeof r.error=="string"&&/token output limits/i.test(r.error))return!0}catch{}return!1}function Nr(e){var t=e.trim();if(t)for(var n=0;n<10;){n+=1;try{var r=JSON.parse(t);if(typeof r!="string"){if(r&&Qe(r)==="object"&&!Array.isArray(r)){var u=r,a=Hr(u,"message");return a||Hr(u,"error")||void 0}return}var i=r.trim();if(!i)return;t=i}catch{if(!/\\"/.test(t)){var o=/"message"\s*:\s*"((?:[^"\\]|\\.)*)"/.exec(t);if(o!=null&&o[1])return o[1].replace(/\\"/g,'"').replace(/\\\\/g,"\\").trim();var s=/"error"\s*:\s*"((?:[^"\\]|\\.)*)"/.exec(t);return s!=null&&s[1]?s[1].replace(/\\"/g,'"').replace(/\\\\/g,"\\").trim():void 0}t=t.replace(/\\"/g,'"').replace(/\\\\/g,"\\").trim()}}}function ks(e){var t;if(e){var n=(t=e.message)!==null&&t!==void 0?t:"",r=Nr(n);if(r)return r;var u=n.trim().replace(/\s*\(AI-\d{3}\)\s*$/i,"").trim();return u!==""?u:void 0}}var Ll=function(e){var t=e.theme;bt(function(){if(t){var n=document.documentElement.dataset.theme;if(t!==n)return document.documentElement.dataset.theme=t,function(){n===void 0?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=n}}},[t])},gp={"Ctrl/Cmd+K":!0,"/":!0};function wu(e){var t=e.size,n=t===void 0?20:t,r=e.color,u=r===void 0?"currentColor":r;return p.createElement("svg",{width:n,height:n,className:"DocSearch-Search-Icon",viewBox:"0 0 24 24","aria-hidden":"true"},p.createElement("circle",{cx:"11",cy:"11",r:"8",stroke:u,fill:"none",strokeWidth:"1.4"}),p.createElement("path",{d:"m21 21-4.3-4.3",stroke:u,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}))}function Cs(e,t,n){return e.reduce(function(r,u){var a=t(u);return r.hasOwnProperty(a)||(r[a]=[]),r[a].length<(n||5)&&r[a].push(u),r},{})}function Fi(e){return e}function Ju(e){return e.button===1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}var Ua="Ctrl";function yp(){}var $l=/(<mark>|<\/mark>)/g,Fp=RegExp($l.source);function ql(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var u=r.__docsearch_parent?(t=r.__docsearch_parent)===null||t===void 0||(t=t._highlightResult)===null||t===void 0||(t=t.hierarchy)===null||t===void 0?void 0:t.lvl0:(n=e._highlightResult)===null||n===void 0||(n=n.hierarchy)===null||n===void 0?void 0:n.lvl0;return u?u.value&&Fp.test(u.value)?u.value.replace($l,""):u.value:e.hierarchy.lvl0}var Ep=["translations","keyboardShortcuts"],bp=p.forwardRef(function(e,t){var n=e.translations,r=n===void 0?{}:n,u=e.keyboardShortcuts,a=ut(e,Ep),i=r.buttonText,o=i===void 0?"Search":i,s=r.buttonAriaLabel,c=s===void 0?"Search":s,d=(function(F){return v(v({},gp),F)})(u),f=xe(_n(null),2),l=f[0],h=f[1];Ll({theme:a.theme}),bt(function(){typeof navigator<"u"&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?h("â"):h(Ua))},[]);var m=xe(l===Ua?[Ua,"Control","Ctrl"]:["Meta","Meta","â"],3),D=m[0],y=m[1],E=m[2],g=d["Ctrl/Cmd+K"],b="".concat(y,"+k");return p.createElement("button",$e({type:"button",className:"DocSearch DocSearch-Button","aria-label":g?"".concat(c," (").concat(b,")"):c,"aria-keyshortcuts":g?b:void 0},a,{ref:t}),p.createElement("span",{className:"DocSearch-Button-Container"},p.createElement(wu,null),p.createElement("span",{className:"DocSearch-Button-Placeholder"},o)),p.createElement("span",{className:"DocSearch-Button-Keys"},l!==null&&g&&p.createElement(p.Fragment,null,p.createElement(As,{reactsToKey:D},E),p.createElement(As,{reactsToKey:"k"},"K"))))});function As(e){var t=e.reactsToKey,n=e.children,r=xe(_n(!1),2),u=r[0],a=r[1];return bt(function(){if(t)return window.addEventListener("keydown",i),window.addEventListener("keyup",o),function(){window.removeEventListener("keydown",i),window.removeEventListener("keyup",o)};function i(s){s.key===t&&a(!0)}function o(s){s.key!==t&&s.key!=="Meta"||a(!1)}},[t]),p.createElement("kbd",{className:u?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"+(t==="Ctrl"?" DocSearch-Button-Key--ctrl":"")},n)}function Ul(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 Du(e){return e.reduce(function(t,n){return t.concat(n)},[])}var _p=0;function Ei(e){return e.collections.length===0?0:e.collections.reduce(function(t,n){return t+n.items.length},0)}function ws(e){return e!==Object(e)}function Hl(e,t){if(e===t)return!0;
8if(ws(e)||ws(t)||typeof e=="function"||typeof t=="function")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)||!Hl(e[u],t[u]))return!1}return!0}var aa=function(){},kp=[{segment:"autocomplete-core",version:"1.19.2"}];function Ss(e){var t=e.item,n=e.items,r=n===void 0?[]:n;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex(function(u){return u.objectID===t.objectID})],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function xs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Cp=["items"],Ap=["items"];function Vr(e){return Vr=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},Vr(e)}function Iu(e){return(function(t){if(Array.isArray(t))return Ha(t)})(e)||(function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)})(e)||(function(t,n){if(t){if(typeof t=="string")return Ha(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ha(t,n):void 0}})(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 9In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Ha(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vl(e,t){if(e==null)return{};var n,r,u=(function(i,o){if(i==null)return{};var s,c,d={},f=Object.keys(i);for(c=0;c<f.length;c++)s=f[c],o.indexOf(s)>=0||(d[s]=i[s]);return d})(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 Os(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function ir(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Os(Object(n),!0).forEach(function(r){wp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Os(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wp(e,t,n){return(t=(function(r){var u=(function(a,i){if(Vr(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(Vr(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return Vr(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tu(e){return e.map(function(t){var n=t.items,r=Vl(t,Cp);return ir(ir({},r),{},{objectIDs:n?.map(function(u){return u.objectID})||r.objectIDs})})}function Sp(e){var t,n,r,u=(t=(function(i,o){return(function(s){if(Array.isArray(s))return s})(i)||(function(s,c){var d=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(d!=null){var f,l,h,m,D=[],y=!0,E=!1;try{if(h=(d=d.call(s)).next,c!==0)for(;!(y=(f=h.call(d)).done)&&(D.push(f.value),D.length!==c);y=!0);}catch(g){E=!0,l=g}finally{try{if(!y&&d.return!=null&&(m=d.return(),Object(m)!==m))return}finally{if(E)throw l}}return D}})(i,o)||(function(s,c){if(s){if(typeof s=="string")return xs(s,c);var d=Object.prototype.toString.call(s).slice(8,-1);return d==="Object"&&s.constructor&&(d=s.constructor.name),d==="Map"||d==="Set"?Array.from(s):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?xs(s,c):void 0}})(i,o)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 10In 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||n===2&&r>=4||n===1&&r>=10);
10function a(i,o,s){if(u&&s!==void 0){var c=s[0].__autocomplete_algoliaCredentials,d={"X-Algolia-Application-Id":c.appId,"X-Algolia-API-Key":c.apiKey};e.apply(void 0,[i].concat(Iu(o),[{headers:d}]))}else e.apply(void 0,[i].concat(Iu(o)))}return{init:function(i,o){e("init",{appId:i,apiKey:o})},setAuthenticatedUserToken:function(i){e("setAuthenticatedUserToken",i)},setUserToken:function(i){e("setUserToken",i)},clickedObjectIDsAfterSearch:function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];o.length>0&&a("clickedObjectIDsAfterSearch",Tu(o),o[0].items)},clickedObjectIDs:function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];o.length>0&&a("clickedObjectIDs",Tu(o),o[0].items)},clickedFilters:function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];o.length>0&&e.apply(void 0,["clickedFilters"].concat(o))},convertedObjectIDsAfterSearch:function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];o.length>0&&a("convertedObjectIDsAfterSearch",Tu(o),o[0].items)},convertedObjectIDs:function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];o.length>0&&a("convertedObjectIDs",Tu(o),o[0].items)},convertedFilters:function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];o.length>0&&e.apply(void 0,["convertedFilters"].concat(o))},viewedObjectIDs:function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];o.length>0&&o.reduce(function(c,d){var f=d.items,l=Vl(d,Ap);return[].concat(Iu(c),Iu((function(h){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,D=[],y=0;y<h.objectIDs.length;y+=m)D.push(ir(ir({},h),{},{objectIDs:h.objectIDs.slice(y,y+m)}));return D})(ir(ir({},l),{},{objectIDs:f?.map(function(h){return h.objectID})||l.objectIDs})).map(function(h){return{items:f,payload:h}})))},[]).forEach(function(c){var d=c.items;return a("viewedObjectIDs",[c.payload],d)})},viewedFilters:function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];o.length>0&&e.apply(void 0,["viewedFilters"].concat(o))}}}function xp(e){var t=e.items.reduce(function(n,r){var u;return n[r.__autocomplete_indexName]=((u=n[r.__autocomplete_indexName])!==null&&u!==void 0?u:[]).concat(r),n},{});return Object.keys(t).map(function(n){return{index:n,items:t[n],algoliaSource:["autocomplete"]}})}function Br(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function Wr(e){return Wr=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},Wr(e)}function or(e){return(function(t){if(Array.isArray(t))return Va(t)})(e)||(function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)})(e)||(function(t,n){if(t){if(typeof t=="string")return Va(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Va(t,n):void 0}})(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 11In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Va(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bs(Object(n),!0).forEach(function(r){Op(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bs(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Op(e,t,n){return(t=(function(r){var u=(function(a,i){if(Wr(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(Wr(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return Wr(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wl="2.15.0",Bp="https://cdn.jsdelivr.net/npm/search-insights@".concat(Wl,"/dist/search-insights.min.js"),Ip=Ul(function(e){var t=e.onItemsChange,n=e.items,r=e.insights,u=e.state;t({insights:r,insightsEvents:xp({items:n}).map(function(a){return xt({eventName:"Items Viewed"},a)}),state:u})},400);function Is(e){var t=(function(l){return xt({onItemsChange:function(h){var m=h.insights,D=h.insightsEvents,y=h.state;m.viewedObjectIDs.apply(m,or(D.map(function(E){return xt(xt({},E),{},{algoliaSource:Ts(E.algoliaSource,y.context)})})))},onSelect:function(h){var m=h.insights,D=h.insightsEvents,y=h.state;m.clickedObjectIDsAfterSearch.apply(m,or(D.map(function(E){return xt(xt({},E),{},{algoliaSource:Ts(E.algoliaSource,y.context)})})))},onActive:aa,__autocomplete_clickAnalytics:!0},l)})(e),n=t.insightsClient,r=t.insightsInitParams,u=t.onItemsChange,a=t.onSelect,i=t.onActive,o=t.__autocomplete_clickAnalytics,s=n;if(n||typeof window<"u"&&(function(l){var h=l.window,m=h.AlgoliaAnalyticsObject||"aa";typeof m=="string"&&(s=h[m]),s||(h.AlgoliaAnalyticsObject=m,h[m]||(h[m]=function(){h[m].queue||(h[m].queue=[]);for(var D=arguments.length,y=new Array(D),E=0;E<D;E++)y[E]=arguments[E];h[m].queue.push(y)}),h[m].version=Wl,s=h[m],(function(D){var y="[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete";try{var E=D.document.createElement("script");E.async=!0,E.src=Bp,E.onerror=function(){console.error(y)},document.body.appendChild(E)}catch{console.error(y)}})(h))})({window}
11),!s)return{};r&&s("init",xt({partial:!0},r));var c=Sp(s),d={current:[]},f=Ul(function(l){var h=l.state;if(h.isOpen){var m=h.collections.reduce(function(D,y){return[].concat(or(D),or(y.items))},[]).filter(Br);Hl(d.current.map(function(D){return D.objectID}),m.map(function(D){return D.objectID}))||(d.current=m,m.length>0&&Ip({onItemsChange:u,items:m,insights:c,state:h}))}},0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(l){var h=l.setContext,m=l.onSelect,D=l.onActive;function y(E){h({algoliaInsightsPlugin:{__algoliaSearchParameters:xt(xt({},o?{clickAnalytics:!0}:{}),E?{userToken:Tp(E)}:{}),insights:c}})}s("addAlgoliaAgent","insights-plugin"),y(),s("onUserTokenChange",function(E){y(E)}),s("getUserToken",null,function(E,g){y(g)}),m(function(E){var g=E.item,b=E.state,F=E.event,_=E.source;Br(g)&&a({state:b,event:F,insights:c,item:g,insightsEvents:[xt({eventName:"Item Selected"},Ss({item:g,items:_.getItems().filter(Br)}))]})}),D(function(E){var g=E.item,b=E.source,F=E.state,_=E.event;Br(g)&&i({state:F,event:_,insights:c,item:g,insightsEvents:[xt({eventName:"Item Active"},Ss({item:g,items:b.getItems().filter(Br)}))]})})},onStateChange:function(l){var h=l.state;f({state:h})},__autocomplete_pluginOptions:e}}function Ts(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(or(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]),["autocomplete-internal"],or((e=t.algoliaInsightsPlugin)!==null&&e!==void 0&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function Tp(e){return typeof e=="number"?e.toString():e}function Ku(e,t){var n=t;return{then:function(r,u){return Ku(e.then(Pu(r,n,e),Pu(u,n,e)),n)},catch:function(r){return Ku(e.catch(Pu(r,n,e)),n)},finally:function(r){return r&&n.onCancelList.push(r),Ku(e.finally(Pu(r&&function(){return n.onCancelList=[],r()},n,e)),n)},cancel:function(){n.isCanceled=!0;var r=n.onCancelList;n.onCancelList=[],r.forEach(function(u){u()})},isCanceled:function(){return n.isCanceled===!0}}}function Ps(e){return Ku(e,{isCanceled:!1,onCancelList:[]})}function Pu(e,t,n){return e?function(r){return t.isCanceled?r:e(r)}:n}var Wa,Ja=!0;function js(e,t,n,r){if(!n)return null;if(e<0&&(t===null||r!==null&&t===0))return n+e;var u=(t===null?-1:t)+e;return u<=-1||u>=n?r===null?null:0:u}function Ns(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function zs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ns(Object(n),!0).forEach(function(r){Pp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ns(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pp(e,t,n){return(t=(function(r){var u=(function(a,i){if(Jr(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(Jr(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return Jr(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jr(e){return Jr=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},Jr(e)}function Rs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ms=function(e,t){var n,r=!1,u=[],a=(function(d,f){var l=typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(!l){if(Array.isArray(d)||(l=(function(g,b){if(g){if(typeof g=="string")return Rs(g,b);var F=Object.prototype.toString.call(g).slice(8,-1);return F==="Object"&&g.constructor&&(F=g.constructor.name),F==="Map"||F==="Set"?Array.from(g):F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F)?Rs(g,b):void 0}})(d))||f){l&&(d=l);var h=0,m=function(){};return{s:m,n:function(){return h>=d.length?{done:!0}:{done:!1,value:d[h++]}},e:function(g){throw g},f:m}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 12In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var D,y=!0,E=!1;return{s:function(){l=l.call(d)},n:function(){var g=l.next();return y=g.done,g},e:function(g){E=!0,D=g},f:function(){try{y||l.return==null||l.return()}finally{if(E)throw D}}}})(e);try{for(a.s();!(n=a.n()).done;){var i,o,s,c=(i=n.value.__autocomplete_pluginOptions)===null||i===void 0||(o=(s=i).awaitSubmit)===null||o===void 0?void 0:o.call(s);if(typeof c=="number")u.push(c);else if(c===!0){r=!0;break}}}catch(d){a.e(d)}finally{a.f()}return r?t.wait():u.length>0?t.wait(Math.max.apply(Math,u)):void 0};function Mn(e){var t=(function(u){var a=u.collections.map(function(i){return i.items.length}).reduce(function(i,o,s){var c=(i[s-1]||0)+o;return i.push(c),i},[]).reduce(function(i,o){return o<=u.activeItemId?i+1:i},0);return u.collections[a]})(e);if(!t)return null;var n=t.items[(function(u){for(var a=u.state,i=u.collection,o=!1,s=0,c=0;o===!1;){var d=a.collections[s];if(d===i){o=!0;break}c+=d.items.length,s++}return a.activeItemId-c})({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}}
12function Ft(e,t,n){return[e,n?.sourceId,t].filter(Boolean).join("-").replace(/\s/g,"")}var jp=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function Zs(e){return e.nativeEvent||e}function Kr(e){return Kr=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},Kr(e)}function Ls(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function Np(e,t,n){return(t=(function(r){var u=(function(a,i){if(Kr(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(Kr(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return Kr(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qr(e){return Qr=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},Qr(e)}function $s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function ju(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$s(Object(n),!0).forEach(function(r){zp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$s(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zp(e,t,n){return(t=(function(r){var u=(function(a,i){if(Qr(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(Qr(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return Qr(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gr(e){return Gr=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},Gr(e)}function Ka(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function Gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qs(Object(n),!0).forEach(function(r){Rp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qs(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rp(e,t,n){return(t=(function(r){var u=(function(a,i){if(Gr(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(Gr(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return Gr(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mp(e,t){var n,r=typeof window<"u"?window:{},u=e.plugins||[];return Gn(Gn({debug:!1,openOnFocus:!1,enterKeyHint:void 0,ignoreCompositionEvents:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:void 0,environment:r,shouldPanelOpen:function(a){return Ei(a.state)>0},reshape:function(a){return a.sources}},e),{},{id:(n=e.id)!==null&&n!==void 0?n:"autocomplete-".concat(_p++),plugins:u,initialState:Gn({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(a){var i;(i=e.onStateChange)===null||i===void 0||i.call(e,a),u.forEach(function(o){var s;return(s=o.onStateChange)===null||s===void 0?void 0:s.call(o,a)})},onSubmit:function(a){var i;(i=e.onSubmit)===null||i===void 0||i.call(e,a),u.forEach(function(o){var s;return(s=o.onSubmit)===null||s===void 0?void 0:s.call(o,a)})},onReset:function(a){var i;(i=e.onReset)===null||i===void 0||i.call(e,a),u.forEach(function(o){var s;return(s=o.onReset)===null||s===void 0?void 0:s.call(o,a)})}
12,getSources:function(a){return Promise.all([].concat((function(i){return(function(o){if(Array.isArray(o))return Ka(o)})(i)||(function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)})(i)||(function(o,s){if(o){if(typeof o=="string")return Ka(o,s);var c=Object.prototype.toString.call(o).slice(8,-1);return c==="Object"&&o.constructor&&(c=o.constructor.name),c==="Map"||c==="Set"?Array.from(o):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?Ka(o,s):void 0}})(i)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 13In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(u.map(function(i){return i.getSources})),[e.getSources]).filter(Boolean).map(function(i){return(function(o,s){var c=[];return Promise.resolve(o(s)).then(function(d){return Promise.all(d.filter(function(f){return!!f}).map(function(f){if(f.sourceId,c.includes(f.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(f.sourceId)," is not unique."));c.push(f.sourceId);var l={getItemInputValue:function(m){return m.state.query},getItemUrl:function(){},onSelect:function(m){(0,m.setIsOpen)(!1)},onActive:aa,onResolve:aa};Object.keys(l).forEach(function(m){l[m].__default=!0});var h=zs(zs({},l),f);return Promise.resolve(h)}))})})(i,a)})).then(function(i){return Du(i)}).then(function(i){return i.map(function(o){return Gn(Gn({},o),{},{onSelect:function(s){o.onSelect(s),t.forEach(function(c){var d;return(d=c.onSelect)===null||d===void 0?void 0:d.call(c,s)})},onActive:function(s){o.onActive(s),t.forEach(function(c){var d;return(d=c.onActive)===null||d===void 0?void 0:d.call(c,s)})},onResolve:function(s){o.onResolve(s),t.forEach(function(c){var d;return(d=c.onResolve)===null||d===void 0?void 0:d.call(c,s)})}})})})},navigator:Gn({navigate:function(a){var i=a.itemUrl;r.location.assign(i)},navigateNewTab:function(a){var i=a.itemUrl,o=r.open(i,"_blank","noopener");o?.focus()},navigateNewWindow:function(a){var i=a.itemUrl;r.open(i,"_blank","noopener")}},e.navigator)})}function Yr(e){return Yr=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},Yr(e)}function Us(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function Nu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Us(Object(n),!0).forEach(function(r){Jl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Us(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jl(e,t,n){return(t=(function(r){var u=(function(a,i){if(Yr(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(Yr(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return Yr(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xr(e){return Xr=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},Xr(e)}function Hs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function Yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hs(Object(n),!0).forEach(function(r){Zp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hs(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zp(e,t,n){return(t=(function(r){var u=(function(a,i){if(Xr(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(Xr(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return Xr(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kl(e){return(function(t){if(Array.isArray(t))return Qa(t)})(e)||(function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)})(e)||(function(t,n){if(t){if(typeof t=="string")return Qa(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);
13return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qa(t,n):void 0}})(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 14In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Qa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zu(e){return!!e.execute}function Lp(e){var t=e.reduce(function(n,r){if(!zu(r))return n.push(r),n;var u=r.searchClient,a=r.execute,i=r.requesterId,o=r.requests,s=n.find(function(f){return zu(r)&&zu(f)&&f.searchClient===u&&!!i&&f.requesterId===i});if(s){var c;(c=s.items).push.apply(c,Kl(o))}else{var d={execute:a,requesterId:i,items:o,searchClient:u};n.push(d)}return n},[]).map(function(n){if(!zu(n))return Promise.resolve(n);var r=n,u=r.execute,a=r.items;return u({searchClient:r.searchClient,requests:a})});return Promise.all(t).then(function(n){return Du(n)})}function eu(e){return eu=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},eu(e)}var $p=["event","nextState","props","query","refresh","store"];function Vs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function On(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vs(Object(n),!0).forEach(function(r){qp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vs(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qp(e,t,n){return(t=(function(r){var u=(function(a,i){if(eu(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(eu(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return eu(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ws,Ga,Ru,Ir=null,Js=(Ws=-1,Ga=-1,Ru=void 0,function(e){var t=++Ws;return Promise.resolve(e).then(function(n){return Ru&&t<Ga?Ru:(Ga=t,Ru=n,n)})});function Pn(e){var t=e.event,n=e.nextState,r=n===void 0?{}:n,u=e.props,a=e.query,i=e.refresh,o=e.store,s=(function(b,F){if(b==null)return{};var _,k,C=(function(N,P){if(N==null)return{};var I,O,Z={},B=Object.keys(N);for(O=0;O<B.length;O++)I=B[O],P.indexOf(I)>=0||(Z[I]=N[I]);return Z})(b,F);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(b);for(k=0;k<A.length;k++)_=A[k],F.indexOf(_)>=0||Object.prototype.propertyIsEnumerable.call(b,_)&&(C[_]=b[_])}return C})(e,$p);Ir&&u.environment.clearTimeout(Ir);var c=s.setCollections,d=s.setIsOpen,f=s.setQuery,l=s.setActiveItemId,h=s.setStatus,m=s.setContext;if(f(a),l(u.defaultActiveItemId),!a&&u.openOnFocus===!1){var D,y=o.getState().collections.map(function(b){return On(On({},b),{},{items:[]})});h("idle"),c(y),d((D=r.isOpen)!==null&&D!==void 0?D:u.shouldPanelOpen({state:o.getState()}));var E=Ps(Js(y).then(function(){return Promise.resolve()}));return o.pendingRequests.add(E)}h("loading"),Ir=u.environment.setTimeout(function(){h("stalled")},u.stallThreshold);var g=Ps(Js(u.getSources(On({query:a,refresh:i,state:o.getState()},s)).then(function(b){return Promise.all(b.map(function(F){return Promise.resolve(F.getItems(On({query:a,refresh:i,state:o.getState()},s))).then(function(_){return(function(k,C,A){if(P=k,!!P?.execute){var N=k.requesterId==="algolia"?Object.assign.apply(Object,[{}].concat(Kl(Object.keys(A.context).map(function(I){var O;return(O=A.context[I])===null||O===void 0?void 0:O.__algoliaSearchParameters})))):{};return Yn(Yn({},k),{},{requests:k.queries.map(function(I){return{query:k.requesterId==="algolia"?Yn(Yn({},I),{},{params:Yn(Yn({},N),I.params)}):I,sourceId:C,transformResponse:k.transformResponse}})})}var P;return{items:k,sourceId:C}})(_,F.sourceId,o.getState())})})).then(Lp).then(function(F){var _,k=F.some(function(C){return(function(A){return!Array.isArray(A)&&!!A?._automaticInsights})(C.items)});return k&&m({algoliaInsightsPlugin:On(On({},((_=o.getState().context)===null||_===void 0?void 0:_.algoliaInsightsPlugin)||{}),{},{__automaticInsights:k})}),(function(C,A,N){return A.map(function(P){var I,O=C.filter(function(S){return S.sourceId===P.sourceId}),Z=O.map(function(S){return S.items}),B=O[0].transformResponse,L=B?B({results:I=Z,hits:I.map(function(S){return S.hits}
14).filter(Boolean),facetHits:I.map(function(S){var w;return(w=S.facetHits)===null||w===void 0?void 0:w.map(function(x){return{label:x.value,count:x.count,_highlightResult:{label:{value:x.highlighted}}}})}).filter(Boolean)}):Z;return P.onResolve({source:P,results:Z,items:L,state:N.getState()}),L.every(Boolean),'The `getItems` function from source "'.concat(P.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),`. 15 16Did you forget to return items? 17 18See: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`),{source:P,items:L}})})(F,b,o)}).then(function(F){return(function(_){var k=_.props,C=_.state,A=_.collections.reduce(function(P,I){return Nu(Nu({},P),{},Jl({},I.source.sourceId,Nu(Nu({},I.source),{},{getItems:function(){return Du(I.items)}})))},{}),N=k.plugins.reduce(function(P,I){return I.reshape?I.reshape(P):P},{sourcesBySourceId:A,state:C}).sourcesBySourceId;return Du(k.reshape({sourcesBySourceId:N,sources:Object.values(N),state:C})).filter(Boolean).map(function(P){return{source:P,items:P.getItems()}})})({collections:F,props:u,state:o.getState()})})}))).then(function(b){var F;h("idle"),c(b);var _=u.shouldPanelOpen({state:o.getState()});d((F=r.isOpen)!==null&&F!==void 0?F:u.openOnFocus&&!a&&_||_);var k=Mn(o.getState());if(o.getState().activeItemId!==null&&k){var C=k.item,A=k.itemInputValue,N=k.itemUrl,P=k.source;P.onActive(On({event:t,item:C,itemInputValue:A,itemUrl:N,refresh:i,source:P,state:o.getState()},s))}}).finally(function(){h("idle"),Ir&&u.environment.clearTimeout(Ir)});return o.pendingRequests.add(g)}function tu(e){return tu=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},tu(e)}var Up=["event","props","refresh","store"];function Ks(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function Bn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ks(Object(n),!0).forEach(function(r){Hp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ks(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hp(e,t,n){return(t=(function(r){var u=(function(a,i){if(tu(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(tu(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return tu(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nu(e){return nu=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},nu(e)}var Vp=["props","refresh","store"],Wp=["inputElement","formElement","panelElement"],Jp=["inputElement"],Kp=["inputElement","maxLength"],Qp=["source"],Gp=["item","source"];function Qs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function nt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qs(Object(n),!0).forEach(function(r){Yp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qs(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yp(e,t,n){return(t=(function(r){var u=(function(a,i){if(nu(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(nu(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return nu(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xn(e,t){if(e==null)return{};var n,r,u=(function(i,o){if(i==null)return{};var s,c,d={},f=Object.keys(i);for(c=0;c<f.length;c++)s=f[c],o.indexOf(s)>=0||(d[s]=i[s]);return d})(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 Xp(e){var t=e.props,n=e.refresh,r=e.store,u=Xn(e,Vp);return{getEnvironmentProps:function(a){var i=a.inputElement,o=a.formElement,s=a.panelElement;function c(d){!r.getState().isOpen&&r.pendingRequests.isEmpty()||d.target===i||[o,s].some(function(f){return(l=f)===(h=d.target)||l.contains(h);var l,h})===!1&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return nt({onTouchStart:c,onMouseDown:c,onTouchMove:function(d){r.getState().isOpen!==!1&&i===t.environment.document.activeElement&&d.target!==i&&i.blur()}},Xn(a,Wp))},getRootProps:function(a){return nt({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-controls":r.getState().isOpen?r.getState().collections.map(function(i){var o=i.source;return Ft(t.id,"list",o)}).join(" "):void 0,"aria-labelledby":Ft(t.id,"label")},a)},getFormProps:function(a){a.inputElement;var i=Xn(a,Jp),o=function(s){var c;t.onSubmit(nt({event:s,refresh:n,state:r.getState()},u)),r.dispatch("submit",null),(c=a.inputElement)===null||c===void 0||c.blur()};return nt({action:"",noValidate:!0,role:"search",onSubmit:function(s){s.preventDefault();var c=Ms(t.plugins,r.pendingRequests);c!==void 0?c.then(function(){return o(s)}):o(s)},onReset:function(s){var c;s.preventDefault(),t.onReset(nt({event:s,refresh:n,state:r.getState()},u)),r.dispatch("reset",null),(c=a.inputElement)===null||c===void 0||c.focus()}},i)},getLabelProps:function(a){return nt({htmlFor:Ft(t.id,"input"),id:Ft(t.id,"label")},a)},getInputProps:function(a){var i;
18function o(D){(t.openOnFocus||r.getState().query)&&Pn(nt({event:D,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},u)),r.dispatch("focus",null)}var s=a||{};s.inputElement;var c=s.maxLength,d=c===void 0?512:c,f=Xn(s,Kp),l=Mn(r.getState()),h=(function(D){return!!(D&&D.match(jp))})(((i=t.environment.navigator)===null||i===void 0?void 0:i.userAgent)||""),m=t.enterKeyHint||(l!=null&&l.itemUrl&&!h?"go":"search");return nt({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&r.getState().activeItemId!==null?Ft(t.id,"item-".concat(r.getState().activeItemId),l?.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.filter(function(D){return D.items.length>0}).map(function(D){var y=D.source;return Ft(t.id,"list",y)}).join(" "):void 0,"aria-labelledby":Ft(t.id,"label"),value:r.getState().completion||r.getState().query,id:Ft(t.id,"input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:m,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:d,type:"search",onChange:function(D){var y=D.currentTarget.value;t.ignoreCompositionEvents&&Zs(D).isComposing?u.setQuery(y):Pn(nt({event:D,props:t,query:y.slice(0,d),refresh:n,store:r},u))},onCompositionEnd:function(D){Pn(nt({event:D,props:t,query:D.currentTarget.value.slice(0,d),refresh:n,store:r},u))},onKeyDown:function(D){Zs(D).isComposing||(function(y){var E=y.event,g=y.props,b=y.refresh,F=y.store,_=(function(B,L){if(B==null)return{};var S,w,x=(function(R,T){if(R==null)return{};var M,V,J={},ee=Object.keys(R);for(V=0;V<ee.length;V++)M=ee[V],T.indexOf(M)>=0||(J[M]=R[M]);return J})(B,L);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(B);for(w=0;w<j.length;w++)S=j[w],L.indexOf(S)>=0||Object.prototype.propertyIsEnumerable.call(B,S)&&(x[S]=B[S])}return x})(y,Up);if(E.key==="ArrowUp"||E.key==="ArrowDown"){var k=function(){var B=Mn(F.getState()),L=g.environment.document.getElementById(Ft(g.id,"item-".concat(F.getState().activeItemId),B?.source));L&&(L.scrollIntoViewIfNeeded?L.scrollIntoViewIfNeeded(!1):L.scrollIntoView(!1))},C=function(){var B=Mn(F.getState());if(F.getState().activeItemId!==null&&B){var L=B.item,S=B.itemInputValue,w=B.itemUrl,x=B.source;x.onActive(Bn({event:E,item:L,itemInputValue:S,itemUrl:w,refresh:b,source:x,state:F.getState()},_))}};E.preventDefault(),F.getState().isOpen===!1&&(g.openOnFocus||F.getState().query)?Pn(Bn({event:E,props:g,query:F.getState().query,refresh:b,store:F},_)).then(function(){F.dispatch(E.key,{nextActiveItemId:g.defaultActiveItemId}),C(),setTimeout(k,0)}):(F.dispatch(E.key,{}),C(),k())}else if(E.key==="Escape")E.preventDefault(),F.dispatch(E.key,null),F.pendingRequests.cancelAll();else if(E.key==="Tab")F.dispatch("blur",null),F.pendingRequests.cancelAll();else if(E.key==="Enter"){if(F.getState().activeItemId===null||F.getState().collections.every(function(B){return B.items.length===0})){var A=Ms(g.plugins,F.pendingRequests);return void(A!==void 0?A.then(F.pendingRequests.cancelAll):g.debug||F.pendingRequests.cancelAll())}E.preventDefault();var N=Mn(F.getState()),P=N.item,I=N.itemInputValue,O=N.itemUrl,Z=N.source;if(E.metaKey||E.ctrlKey)O!==void 0&&(Z.onSelect(Bn({event:E,item:P,itemInputValue:I,itemUrl:O,refresh:b,source:Z,state:F.getState()},_)),g.navigator.navigateNewTab({itemUrl:O,item:P,state:F.getState()}));else if(E.shiftKey)O!==void 0&&(Z.onSelect(Bn({event:E,item:P,itemInputValue:I,itemUrl:O,refresh:b,source:Z,state:F.getState()},_)),g.navigator.navigateNewWindow({itemUrl:O,item:P,state:F.getState()}));else if(!E.altKey){if(O!==void 0)return Z.onSelect(Bn({event:E,item:P,itemInputValue:I,itemUrl:O,refresh:b,source:Z,state:F.getState()},_)),void g.navigator.navigate({itemUrl:O,item:P,state:F.getState()});Pn(Bn({event:E,nextState:{isOpen:!1},props:g,query:I,refresh:b,store:F},_)).then(function(){Z.onSelect(Bn({event:E,item:P,itemInputValue:I,itemUrl:O,refresh:b,source:Z,state:F.getState()},_))})}}})(nt({event:D,props:t,refresh:n,store:r},u))},onFocus:o,onBlur:aa,onClick:function(D){a.inputElement!==t.environment.document.activeElement||r.getState().isOpen||o(D)}},f)},getPanelProps:function(a){return nt({onMouseDown:function(i){i.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},a)},getListProps:function(a){var i=a||{},o=i.source,s=Xn(i,Qp);return nt({role:"listbox","aria-labelledby":Ft(t.id,"label"),id:Ft(t.id,"list",o)},s)},getItemProps:function(a){var i=a.item,o=a.source,s=Xn(a,Gp);return nt({id:Ft(t.id,"item-".concat(i.__autocomplete_id),o),role:"option","aria-selected":r.getState().activeItemId===i.__autocomplete_id,onMouseMove:function(c){if(i.__autocomplete_id!==r.getState().activeItemId){r.dis
18patch("mousemove",i.__autocomplete_id);var d=Mn(r.getState());if(r.getState().activeItemId!==null&&d){var f=d.item,l=d.itemInputValue,h=d.itemUrl,m=d.source;m.onActive(nt({event:c,item:f,itemInputValue:l,itemUrl:h,refresh:n,source:m,state:r.getState()},u))}}},onMouseDown:function(c){c.preventDefault()},onClick:function(c){var d=o.getItemInputValue({item:i,state:r.getState()}),f=o.getItemUrl({item:i,state:r.getState()});(f?Promise.resolve():Pn(nt({event:c,nextState:{isOpen:!1},props:t,query:d,refresh:n,store:r},u))).then(function(){o.onSelect(nt({event:c,item:i,itemInputValue:d,itemUrl:f,refresh:n,source:o,state:r.getState()},u))})}},s)}}}function ru(e){return ru=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},ru(e)}function Gs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function e0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gs(Object(n),!0).forEach(function(r){Ql(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gs(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ql(e,t,n){return(t=(function(r){var u=(function(a,i){if(ru(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(ru(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return ru(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t0(e){var t,n,r,u,a=e.plugins,i=e.options,o=(t=(((n=i.__autocomplete_metadata)===null||n===void 0?void 0:n.userAgents)||[])[0])===null||t===void 0?void 0:t.segment,s=o?Ql({},o,Object.keys(((r=i.__autocomplete_metadata)===null||r===void 0?void 0:r.options)||{})):{};return{plugins:a.map(function(c){return{name:c.name,options:Object.keys(c.__autocomplete_pluginOptions||[])}}),options:e0({"autocomplete-core":Object.keys(i)},s),ua:kp.concat(((u=i.__autocomplete_metadata)===null||u===void 0?void 0:u.userAgents)||[])}}function Ys(e){var t,n=e.state;return n.isOpen===!1||n.activeItemId===null?null:((t=Mn(n))===null||t===void 0?void 0:t.itemInputValue)||null}function uu(e){return uu=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},uu(e)}function Xs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xs(Object(n),!0).forEach(function(r){n0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xs(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n0(e,t,n){return(t=(function(r){var u=(function(a,i){if(uu(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(uu(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return uu(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var r0=function(e,t){switch(t.type){case"setActiveItemId":case"mousemove":return we(we({},e),{},{activeItemId:t.payload});case"setQuery":return we(we({},e),{},{query:t.payload,completion:null});case"setCollections":return we(we({},e),{},{collections:t.payload});case"setIsOpen":return we(we({},e),{},{isOpen:t.payload});case"setStatus":return we(we({},e),{},{status:t.payload});case"setContext":return we(we({},e),{},{context:we(we({},e.context),t.payload)});case"ArrowDown":var n=we(we({},e),{},{activeItemId:t.payload.hasOwnProperty("nextActiveItemId")?t.payload.nextActiveItemId:js(1,e.activeItemId,Ei(e),t.props.defaultActiveItemId)});return we(we({},n),{},{completion:Ys({state:n})});
18case"ArrowUp":var r=we(we({},e),{},{activeItemId:js(-1,e.activeItemId,Ei(e),t.props.defaultActiveItemId)});return we(we({},r),{},{completion:Ys({state:r})});case"Escape":return e.isOpen?we(we({},e),{},{activeItemId:null,isOpen:!1,completion:null}):we(we({},e),{},{activeItemId:null,query:"",status:"idle",collections:[]});case"submit":return we(we({},e),{},{activeItemId:null,isOpen:!1,status:"idle"});case"reset":return we(we({},e),{},{activeItemId:t.props.openOnFocus===!0?t.props.defaultActiveItemId:null,status:"idle",completion:null,query:""});case"focus":return we(we({},e),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||!!e.query)&&t.props.shouldPanelOpen({state:e})});case"blur":return t.props.debug?e:we(we({},e),{},{isOpen:!1,activeItemId:null});case"mouseleave":return we(we({},e),{},{activeItemId:t.props.defaultActiveItemId});default:return"The reducer action ".concat(JSON.stringify(t.type)," is not supported."),e}};function au(e){return au=typeof Symbol=="function"&&re(Symbol.iterator)=="symbol"?function(t){return re(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":re(t)},au(e)}function ec(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function In(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ec(Object(n),!0).forEach(function(r){u0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ec(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function u0(e,t,n){return(t=(function(r){var u=(function(a,i){if(au(a)!=="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var s=o.call(a,i);if(au(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return au(u)==="symbol"?u:String(u)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a0(e){var t=[],n=Mp(e,t),r=(function(d,f,l){var h,m=f.initialState;return{getState:function(){return m},dispatch:function(D,y){var E=(function(g){for(var b=1;b<arguments.length;b++){var F=arguments[b]!=null?arguments[b]:{};b%2?Ls(Object(F),!0).forEach(function(_){Np(g,_,F[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(F)):Ls(Object(F)).forEach(function(_){Object.defineProperty(g,_,Object.getOwnPropertyDescriptor(F,_))})}return g})({},m);m=d(m,{type:D,props:f,payload:y}),l({state:m,prevState:E})},pendingRequests:(h=[],{add:function(D){return h.push(D),D.finally(function(){h=h.filter(function(y){return y!==D})})},cancelAll:function(){h.forEach(function(D){return D.cancel()})},isEmpty:function(){return h.length===0},wait:function(D){return Ja?(Ja=!1,Wa=D?Promise.race([Promise.all(h),new Promise(function(y){return setTimeout(y,D)})]):Promise.all(h),Wa.then(function(){Ja=!0})):Wa}})}})(r0,n,function(d){var f,l,h=d.prevState,m=d.state;if(n.onStateChange(In({prevState:h,state:m,refresh:i,navigator:n.navigator},u)),!s()&&(f=m.context)!==null&&f!==void 0&&(l=f.algoliaInsightsPlugin)!==null&&l!==void 0&&l.__automaticInsights&&n.insights!==!1){var D=Is({__autocomplete_clickAnalytics:!1});n.plugins.push(D),o([D])}}),u=(function(d){var f=d.store;return{setActiveItemId:function(l){f.dispatch("setActiveItemId",l)},setQuery:function(l){f.dispatch("setQuery",l)},setCollections:function(l){var h=0,m=l.map(function(D){return ju(ju({},D),{},{items:Du(D.items).map(function(y){return ju(ju({},y),{},{__autocomplete_id:h++})})})});f.dispatch("setCollections",m)},setIsOpen:function(l){f.dispatch("setIsOpen",l)},setStatus:function(l){f.dispatch("setStatus",l)},setContext:function(l){f.dispatch("setContext",l)}}})({store:r}),a=Xp(In({props:n,refresh:i,store:r,navigator:n.navigator},u));function i(){return Pn(In({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(d){d.forEach(function(f){var l;return(l=f.subscribe)===null||l===void 0?void 0:l.call(f,In(In({},u),{},{navigator:n.navigator,refresh:i,onSelect:function(h){t.push({onSelect:h})},onActive:function(h){t.push({onActive:h})},onResolve:function(h){t.push({onResolve:h})}}))})}function s(){return n.plugins.some(function(d){return d.name==="aa.algoliaInsightsPlugin"})}if(n.insights&&!s()){var c=typeof n.insights=="boolean"?{}:n.insights;n.plugins.push(Is(c))}return o(n.plugins),(function(d){var f,l,h=d.metadata,m=d.environment;if(!((f=m.navigator)===null||f===void 0||(l=f.userAgent)===null||l===void 0)&&l.includes("Algolia Crawler")){var D=m.document.createElement("meta"),y=m.document.querySelector("head");D.name="algolia:metadata",setTimeout(function(){D.content=JSON.stringify(h),y.appendChild(D)},0)}})({metadata:t0({plugins:n.plugins,options:e}),environment:n.environment}),In(In({refresh:i,navigator:n.navigator},a),u)}var mo="https://askai.algolia.com/chat",Do="https://beta-chat-askai.algolia.com";function i0(e){var t=e.translations,n=(t===void 0?{}:t).poweredByText,r=n===void 0?"Powered by":n;return p.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"},p.createElement("span",{className:"DocSearch-Label"},r),p.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"},p.createElement("defs",null,p.createElement("style",null,".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}")),p.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"}),p.createElement("rect",{className:"cls-1",x:"1845.88",y:"104.73",width:"62.58",height:"277.9",rx:"5.9",ry:"5.9"}),p.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
18-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"}),p.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"}),p.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"}),p.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"}),p.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"}),p.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"}),p.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 Ya(e){return p.createElement("svg",{width:"20",height:"20","aria-label":e.ariaLabel,viewBox:"0 0 24 24",role:"img"},p.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.4"},e.children))}function o0(e){var t=e.translations,n=t===void 0?{}:t,r=e.isAskAiActive,u=r!==void 0&&r,a=n.selectText,i=a===void 0?"Select":a,o=n.selectKeyAriaLabel,s=o===void 0?"Enter key":o,c=n.submitQuestionText,d=c===void 0?"Submit question":c,f=n.navigateText,l=f===void 0?"Navigate":f,h=n.navigateUpKeyAriaLabel,m=h===void 0?"Arrow up":h,D=n.navigateDownKeyAriaLabel,y=D===void 0?"Arrow down":D,E=n.closeText,g=E===void 0?"Close":E,b=n.backToSearchText,F=b===void 0?"Back to search":b,_=n.closeKeyAri
18aLabel,k=_===void 0?"Escape key":_,C=n.poweredByText,A=C===void 0?"Powered by":C;return p.createElement(p.Fragment,null,p.createElement("div",{className:"DocSearch-Logo"},p.createElement(i0,{translations:{poweredByText:A}})),p.createElement("ul",{className:"DocSearch-Commands"},p.createElement("li",null,p.createElement("kbd",{className:"DocSearch-Commands-Key"},p.createElement(Ya,{ariaLabel:y},p.createElement("path",{d:"M12 5v14"}),p.createElement("path",{d:"m19 12-7 7-7-7"}))),p.createElement("kbd",{className:"DocSearch-Commands-Key"},p.createElement(Ya,{ariaLabel:m},p.createElement("path",{d:"m5 12 7-7 7 7"}),p.createElement("path",{d:"M12 19V5"}))),p.createElement("span",{className:"DocSearch-Label"},l)),p.createElement("li",null,p.createElement("kbd",{className:"DocSearch-Commands-Key"},p.createElement(Ya,{ariaLabel:s},p.createElement("polyline",{points:"9 10 4 15 9 20"}),p.createElement("path",{d:"M20 4v7a4 4 0 0 1-4 4H4"}))),p.createElement("span",{className:"DocSearch-Label"},u?d:i)),p.createElement("li",null,p.createElement("kbd",{className:"DocSearch-Commands-Key"},p.createElement("span",{className:"DocSearch-Escape-Key"},"ESC")),p.createElement("span",{className:"DocSearch-Label","aria-label":k},u?F:g))))}function s0(e){var t=e.hit,n=e.children;return p.createElement("a",{href:t.url},n)}function gu(e){var t=e.className;return p.createElement("svg",{viewBox:"0 0 38 38",className:t,stroke:"currentColor",strokeOpacity:".5"},p.createElement("g",{fill:"none",fillRule:"evenodd"},p.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},p.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),p.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},p.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}function go(e){var t=e.className,n=t===void 0?"":t;return p.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 ".concat(n)},p.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"}),p.createElement("path",{d:"M20 3v4"}),p.createElement("path",{d:"M22 5h-4"}),p.createElement("path",{d:"M4 17v2"}),p.createElement("path",{d:"M5 18H3"}))}function c0(){return p.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},p.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},p.createElement("path",{d:"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0"}),p.createElement("path",{d:"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13"})))}function iu(){return p.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},p.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 l0(){return p.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"},p.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"}),p.createElement("path",{d:"M12 9v4"}),p.createElement("path",{d:"M12 17h.01"}))}function f0(){return p.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},p.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},p.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),p.createElement("path",{d:"M8 17l-6-6 6-6"})))}var d0=function(){return p.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"},p.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),p.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),p.createElement("path",{d:"M10 9H8"}),p.createElement("path",{d:"M16 13H8"}),p.createElement("path",{d:"M16 17H8"}))};function p0(e){switch(e.type){case"lvl1":return p.createElement(d0,null);case"content":return p.createElement(v0,null);default:return p.createElement(h0,null)}}function h0(){return p.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"},p.createElement("line",{x1:"4",x2:"20",y1:"9",y2:"9"}),p.createElement("line",{x1:"4",x2:"20",y1:"15",y2:"15"}),p.createElement("line",{x1:"10",x2:"8",y1:"3",y2:"21"}),p.createElement("line",{x1:"16",x2:"14",y1:"3",y2:"21"}))}function v0(){return p.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},p.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function tc(){return p.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},p.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 m0(){return p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 18 18",fill:"none"},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99984 1.29102C4.74264 1.29102 1.2915 4.74215 1.2915 8.99935C1.2915 13.2565 4.74264 16.7077 8.99984 16.7077C13.257 16.7077 16.7082 13.2565 16.7082 8.99935C16.7082 4.74215 13.257 1.29102 8.99984 1.29102ZM0.0415039 8.99935C0.0415039 4.0518 4.05229 0.0410156 8.99984 0.0410156C13.9474 0.0410156 17.9582 4.0518 17.9582 8.99935C17.9582 13.9469 13.9474 17.9577 8.99984 17.9577C4.05229 17.9577 0.0415039 13.9469 0.0415039 8.99935ZM5.87484 6.49935C5.87484 6.15417 6.15466 5.87435 6.49984 5.87435H11.4998C11.845 5.87435 12.1248 6.15417 12.1248 6.49935V11.4993C12.1248 11.8445 11.845 12.1243 11.4998 12.1243H6.49984C6.15466 12.1243 5.87484 11.8445 5.87484 11.4993V6.49935ZM7.12484 7.12435V10.8743H10.8748V7.12435H7.12484Z",fill:"currentcolor"}))}function D0(){return p.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},p.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 g0(){return p.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"},p.createElement("path",{d:"m13.5 8.5-5 5"}),p.createElement("path",{d:"m8.5 8.5 5 5"}),p.createElement("circle",{cx:"11",cy:"11",r:"8"}),p.createElement("path",{d:"m21 21-4.3-4.3"}))}function y0(){return p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:4,height:16,viewBox:"0 0 4 16",fill:"none"},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.99984 1.95898C1.88478 1.95898 1.7915 2.05226 1.7915 2.16732C1.7915 2.28238 1.88478 2.37565 1.99984 2.37565C2.1149 2.37565 2.20817 2.28238 2.20817 2.16732C2.20817 2.05226 2.1149 1.95898 1.99984 1.95898ZM0.541504 2.16732C0.541504 1.3619 1.19442 0.708984 1.99984 0.708984C2.80525 0.708984 3.45817 1.3619 3.45817 2.16732C3.45817 2.97273 2.80525 3.62565 1.99984 3.62565C1.19442 3.62565 0.541504 2.97273 0.541504 2.16732ZM1.99984 7.79232C1.88478 7.79232 1.7915 7.88559 1.7915 8.00065C1.7915 8.11571 1.88478 8.20898 1.99984 8.20898C2.1149 8.20898 2.20817 8.11571 2.20817 8.00065C2.20817 7.88559 2.1149 7.79232 1.99984 7.79232ZM0.541504 8.00065C0.541504 7.19524 1.19442 6.54232 1.99984 6.54232C2.80525 6.54232 3.45817 7.19524 3.45817 8.00065C3.45817 8.80607 2.80525 9.45898 1.99984 9.45898C1.19442 9.45898 0.541504 8.80607 0.541504 8.00065ZM1.99984 13.6257C1.88478 13.6257 1.7915 13.7189 1.7915 13.834C1.7915 13.949 1.88478 14.0423 1.99984 14.0423C2.1149 14.0423 2.20817 13.949 2.20817 13.834C2.20817 13.7189 2.1149 13.6257 1.99984 13.6257ZM0.541504 13.834C0.541504 13.0286 1.19442 12.3757 1.99984 12.3757C2.80525 12.3757 3.45817 13.0286 3.45817 13.834C3.45817 14.6394 2.80525 15.2923 1.99984 15.2923C1.19442 15.2923 0.541504 14.6394 0.541504 13.834Z",fill:"currentcolor"}))}function F0(){return p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},p.createElement("path",{d:"M9 0.875C10.6068 0.875 12.1776 1.35149 13.5137 2.24414
18C14.8498 3.13693 15.8919 4.40598 16.5068 5.89062C17.1218 7.37522 17.2822 9.00892 16.9688 10.585C16.6552 12.1611 15.8814 13.6088 14.7451 14.7451C13.6088 15.8814 12.1611 16.6552 10.585 16.9688C9.00892 17.2822 7.37523 17.1218 5.89062 16.5068C4.40598 15.8919 3.13693 14.8498 2.24414 13.5137C1.35149 12.1776 0.875 10.6068 0.875 9C0.875 8.65482 1.15482 8.375 1.5 8.375C1.84518 8.375 2.125 8.65482 2.125 9C2.125 10.3596 2.52792 11.6888 3.2832 12.8193C4.03864 13.9499 5.1129 14.8312 6.36914 15.3516C7.62523 15.8718 9.00736 16.0083 10.3408 15.7432C11.6744 15.4779 12.8998 14.8228 13.8613 13.8613C14.8228 12.8998 15.4779 11.6744 15.7432 10.3408C16.0083 9.00736 15.8718 7.62523 15.3516 6.36914C14.8312 5.1129 13.9499 4.03864 12.8193 3.2832C11.6888 2.52792 10.3596 2.125 9 2.125C7.06829 2.125 5.21604 2.89096 3.82129 4.22949L3.00879 5.04199H5.66699C6.01202 5.04217 6.29199 5.32192 6.29199 5.66699C6.29182 6.01191 6.01191 6.29182 5.66699 6.29199H1.5C1.45939 6.29199 1.41889 6.28716 1.37891 6.2793C1.36148 6.27587 1.345 6.26949 1.32812 6.26465C1.267 6.24714 1.20782 6.22205 1.15332 6.18555C1.08536 6.14005 1.02604 6.08256 0.980469 6.01465C0.970244 5.99942 0.962841 5.98268 0.954102 5.9668C0.904937 5.87756 0.875056 5.77606 0.875 5.66699V1.5C0.875 1.15482 1.15482 0.875002 1.5 0.875C1.84518 0.875 2.125 1.15482 2.125 1.5V4.15723L2.94141 3.3418L2.9502 3.33301C4.57158 1.77433 6.73388 0.875 9 0.875ZM9.33301 4.20801C9.67808 4.20801 9.95783 4.48798 9.95801 4.83301V9.44727L12.9463 10.9414C13.2548 11.0958 13.3798 11.4707 13.2256 11.7793C13.0712 12.088 12.6955 12.213 12.3867 12.0586L9.05371 10.3926C8.84198 10.2867 8.70801 10.0697 8.70801 9.83301V4.83301C8.70818 4.48809 8.98809 4.20819 9.33301 4.20801Z",fill:"currentcolor"}))}function E0(){return p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"19",height:"19",viewBox:"0 0 19 19",fill:"none"},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.712717 3.38039C1.14249 2.95062 1.72538 2.70917 2.33317 2.70917H8.1665C8.51168 2.70917 8.7915 2.989 8.7915 3.33417C8.7915 3.67935 8.51168 3.95917 8.1665 3.95917H2.33317C2.0569 3.95917 1.79195 4.06892 1.5966 4.26427C1.40125 4.45962 1.2915 4.72457 1.2915 5.00084V16.6675C1.2915 16.9438 1.40125 17.2087 1.5966 17.4041C1.79195 17.5994 2.0569 17.7092 2.33317 17.7092H13.9998C14.2761 17.7092 14.5411 17.5994 14.7364 17.4041C14.9318 17.2087 15.0415 16.9438 15.0415 16.6675V10.8342C15.0415 10.489 15.3213 10.2092 15.6665 10.2092C16.0117 10.2092 16.2915 10.489 16.2915 10.8342V16.6675C16.2915 17.2753 16.0501 17.8582 15.6203 18.288C15.1905 18.7177 14.6076 18.9592 13.9998 18.9592H2.33317C1.72538 18.9592 1.14249 18.7177 0.712717 18.288C0.282947 17.8582 0.0415039 17.2753 0.0415039 16.6675V5.00084C0.0415039 4.39305 0.282947 3.81016 0.712717 3.38039Z",fill:"currentcolor"}),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6665 2.19141C15.3634 2.19141 15.0728 2.3118 14.8584 2.52611L7.06419 10.3204L6.52548 12.4752L8.68031 11.9365L16.4746 4.14223C16.6889 3.92792 16.8093 3.63725 16.8093 3.33417C16.8093 3.03109 16.6889 2.74043 16.4746 2.52611C16.2603 2.3118 15.9696 2.19141 15.6665 2.19141ZM13.9746 1.64223C14.4233 1.1935 15.0319 0.941406 15.6665 0.941406C16.3011 0.941406 16.9097 1.1935 17.3584 1.64223C17.8072 2.09096 18.0593 2.69957 18.0593 3.33417C18.0593 3.96877 17.8072 4.57738 17.3584 5.02611L9.44178 12.9428C9.36168 13.0229 9.26132 13.0797 9.15142 13.1072L5.81809 13.9405C5.6051 13.9938 5.3798 13.9314 5.22456 13.7761C5.06932 13.6209 5.00692 13.3956 5.06016 13.1826L5.8935 9.84925C5.92097 9.73936 5.9778 9.639 6.0579 9.5589L13.9746 1.64223Z",fill:"currentcolor"}))}var Mu,b0={before:"Searched for ",separator:", ",lastSeparator:" and ",after:""};function _0(e){var t=e.queries,n=e.translations,r=e.onSearchQueryClick;if(t.length===0)return null;if(typeof n.aggregatedToolCallNode=="function")return p.createElement(p.Fragment,null,n.aggregatedToolCallNode(t,r));var u=(n.aggregatedToolCallText?n.aggregatedToolCallText(t):b0)||{},a=u.before,i=a===void 0?"":a,o=u.separator,s=o===void 0?", ":o,c=u.lastSeparator,d=c===void 0?" and ":c,f=u.after,l=f===void 0?"":f;return p.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--AggregatedResult"},p.createElement(wu,{size:18}
18),p.createElement("span",null,i&&p.createElement("span",null,i),t.map(function(h,m){return p.createElement(qt,{key:h+m},p.createElement("span",{role:"button",tabIndex:0,className:"DocSearch-AskAiScreen-MessageContent-Tool-Query",onKeyDown:function(D){D.key!=="enter"&&D.key!==" "||(D.preventDefault(),r(h))},onClick:function(){return r(h)}},'"',h,'"'),m<t.length-2&&s,m===t.length-2&&d)}),l&&p.createElement("span",null,l)))}var Hn={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function nc(e){Hn=e}var ou={exec:function(){return null}};function Te(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=typeof e=="string"?e:e.source,r={replace:function(u,a){var i=typeof a=="string"?a:a.source;return i=i.replace(st.caret,"$1"),n=n.replace(u,i),r},getRegex:function(){return new RegExp(n,t)}};return r}var k0=(function(){try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),st={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-\u088F\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\u0C5C\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\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\u2CF
18D\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-\uA7DC\uA7F1-\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\uDD40-\uDD59\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-\uDEC7\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\uDDB0-\uDDDB\uDDE0-\uDDE9\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-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\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\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF2-\uDFF6]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\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\uDEC0-\uDEDE\uDEE0-\uDEE2\uDEE4\uDEE5\uDEE7-\uDEED\uDEF0-\uDEF4\uDEFE\uDEFF\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]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79])/,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,")((?:[ ][^\\n]*)?(?:\\n|$))"))},nextBulletRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\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")}},Su=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,yo=/(?:[*+-]|\d{1,9}[.)])/,Gl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Yl=Te(Gl).replace(/bull/g,yo).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(),C0=Te(Gl).replace(/bull/g,yo).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(),Fo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Eo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,A0=Te(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Eo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),w0=Te(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,yo).getRegex(),Sa="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",bo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,S0=Te("^ {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|/?>
18)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",bo).replace("tag",Sa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),rc=Te(Fo).replace("hr",Su).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",Sa).getRegex(),_o={blockquote:Te(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",rc).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:A0,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Su,html:S0,lheading:Yl,list:w0,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:rc,table:ou,text:/^[^\n]+/},uc=Te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Su).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\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",Sa).getRegex(),x0=v(v({},_o),{},{lheading:C0,table:uc,paragraph:Te(Fo).replace("hr",Su).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",uc).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",Sa).getRegex()}),O0=v(v({},_o),{},{html:Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",bo).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:ou,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Te(Fo).replace("hr",Su).replace("heading",` *#{1,6} *[^ 19]`).replace("lheading",Yl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Xl=/^( {2,}|\\)\n(?!\s*$)/,xa=/(?:[!-\/:-@\[-`\{-~\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-\u20C1\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-\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-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\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\uDED0-\uDED8\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\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\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-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8
19E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/,ko=/(?:[\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-\u20C1\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-\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-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\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\uDED0-\uDED8\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\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\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-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/,ef=/(?:[\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\u
190BFB-\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\u20C2-\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\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\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\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-\uDECF\uDED9-\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-\uDCF9\uDCFD-\uDCFF\uDEB4-\uDEB9\uDED1-\uDEDF\uDEF1-\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[\uDED9-\uDEDB\uDEED-\uDEEF\uDEFD-\uDEFF\uDFDA-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCCF\uDCD9-\uDCFF\uDE58-\uDE5F\uDE6E\uDE6F\uDE7D-\uDE7F\uDE8B-\uDE8D\uDEC7\uDEC9-\uDECC\uDEDD\uDEDE\uDEEB-\uDEEE\uDEF9-\uDEFF\uDF93\uDFF0-\uDFF9\uDFFB-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,B0=Te(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ko).getRegex(),tf=/(?!~)(?:[!-\/:-@\[-`\{-~\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\u
190F3A-\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-\u20C1\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-\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-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\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\uDED0-\uDED8\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\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\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-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/,I0=Te(/link|precode-code|html/,"g").replace("link",ua(/\[(?:[^\[\]`]|(`+)[^`]+\1(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/,{a:1})).replace("precode-",k0?"(?<!`)()":"(^^|[^`])").replace("code",ua(/(`+)[^`]+\1(?!`)/,{b:1})).replace("html",/<(?! )[^<>]*?>/).getRegex(),nf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,T0=Te(nf,"u").replace(/punct/g,xa).getRegex(),P0=Te(nf,"u").replace(/punct/g,tf).getRegex(),rf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",j0=Te(rf,"gu").replace(/notPunctSpace/g,ef).replace(/punctSpace/g,ko).replace(/punct/g,xa).getRegex(),N0=Te(rf,"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\u
190BFB-\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\u20C2-\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\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\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\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-\uDECF\uDED9-\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-\uDCF9\uDCFD-\uDCFF\uDEB4-\uDEB9\uDED1-\uDEDF\uDEF1-\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[\uDED9-\uDEDB\uDEED-\uDEEF\uDEFD-\uDEFF\uDFDA-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCCF\uDCD9-\uDCFF\uDE58-\uDE5F\uDE6E\uDE6F\uDE7D-\uDE7F\uDE8B-\uDE8D\uDEC7\uDEC9-\uDECC\uDEDD\uDEDE\uDEEB-\uDEEE\uDEF9-\uDEFF\uDF93\uDFF0-\uDFF9\uDFFB-\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\u
190F3A-\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-\u20C1\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-\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-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\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\uDED0-\uDED8\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\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\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-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/).replace(/punct/g,tf).getRegex(),z0=Te("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ef).replace(/punctSpace/g,ko).replace(/punct/g,xa).getRegex(),R0=Te(/\\(punct)/,"gu").replace(/punct/g,xa).getRegex(),M0=Te(/^<(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(),Z0=Te(bo).replace("(?:-->|$)","-->").getRegex(),L0=Te("^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",Z0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ia=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,$0=Te(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ia).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ac=Te(/^!?\[(label)\]\[(ref)\]/).replace("label",ia).replace("ref",Eo).getRegex(),ic=Te(/^!?\[(ref)\](?:\[\])?/).replace("ref",Eo).getRegex(),oc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Co={_backpedal:ou,anyPunctuation:R0,autolink:M0,blockSkip:I0,br:Xl,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ou,emStrongLDelim:T0,emStrongRDelimAst:j0,emStrongRDelimUnd:z0,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:$0,nolink:ic,punctuation:B0,reflink:ac,reflinkSearch:Te("reflink|nolink(?!\\()","g").replace("reflink",ac).replace("nolink",ic).getRegex(),tag:L0,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:ou},q0=v(v({},Co),{},{link:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",ia).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ia).getRegex()}),bi=v(v({},Co),{},{emStrongRDelimAst:N0,emStrongLDelim:P0,url:Te(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",oc).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\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Te(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",oc).getRegex()}),U0=v(v({},bi),{},{br:Te(Xl).replace("{2,}","*").getRegex(),text:Te(bi.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Zu={normal:_o,gfm:x0,pedantic:O0},Tr={normal:Co,gfm:bi,breaks:U0,pedantic:q0},H0={"&":"&","<":"<",">":">",'"':""","'":"'"},sc=function(e){return H0[e]};function Zt(e,t){if(t){if(st.escapeTest.test(e))return e.replace(st.escapeReplace,sc)}else if(st.escapeTestNoEncode.test(e))return e.replace(st.escapeReplaceNoEncode,sc);return e}function cc(e){try{e=encodeURI(e).replace(st.percentDecode,"%")}catch{return null}return e}function lc(e,t){var n,r=e.replace(st.findPipe,function(a,i,o){for(var s=!1,c=i;--c>=0&&o[c]==="\\";)s=!s;return s?"|":" |"}).split(st.splitPipe),u=0;if(r[0].trim()||r.shift(),r.length>0&&!((n=r.at(-1))!==null&&n!==void 0&&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(st.slashPipe,"|");return r}function Pr(e,t,n){var r=e.length;if(r===0)return"";for(var u=0;u<r&&e.charAt(r-u-1)===t;)u++;return e.slice(0,r-u)}function fc(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 oa=ce(function e(t){se(this,e),Se(this,"options",void 0),Se(this,"rules",void 0),Se(this,"lexer",void 0),this.options=t||Hn},[{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:Pr(n,` 20`)}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=(function(u,a,i){var o=u.match(i.other.indentCodeCompensation);if(o===null)return a;var s=o[1];return a.split(` 21`).map(function(c){var d=c.match(i.other.beginningSpace);return d===null?c:xe(d,1)[0].length>=s.length?c.slice(s.length):c}).join(` 22`)})(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=Pr(n,"#");(this.options.pedantic||!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:Pr(t[0],` 23`)}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){for(var n=Pr(t[0],` 24`).split(` 25`),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(` 26`),d=c.replace(this.rules.other.blockquoteSetextReplace,` 27 $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?"".concat(r,` 28`).concat(c):c,u=u?"".concat(u,` 29`).concat(d):d;var f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=f,n.length===0)break;var l=a.at(-1);if(l?.type==="code")break;if(l?.type==="blockquote"){var h=l,m=h.raw+` 30`+n.join(` 31`),D=this.blockquote(m);a[a.length-1]=D,r=r.substring(0,r.length-h.raw.length)+D.raw,u=u.substring(0,u.length-h.text.length)+D.text;break}if(l?.type==="list"){var y=l,E=y.raw+` 32`+n.join(` 33`),g=this.list(E);a[a.length-1]=g,r=r.substring(0,r.length-l.raw.length)+g.raw,u=u.substring(0,u.length-y.raw.length)+g.raw,n=E.substring(a.at(-1).raw.length).split(` 34`)}}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="",d="";if(!(n=i.exec(e))||this.rules.block.hr.test(e))break;c=n[0],e=e.substring(c.length);var f=n[2].split(` 35`,1)[0].replace(this.rules.other.listReplaceTabs,function(Z){return" ".repeat(3*Z.length)}),l=e.split(` 36`,1)[0],h=!f.trim(),m=0;if(this.options.pedantic?(m=2,d=f.trimStart()):h?m=n[1].length+1:(m=(m=n[2].search(this.rules.other.nonSpaceChar))>4?1:m,d=f.slice(m),m+=n[1].length),h&&this.rules.other.blankLine.test(l)&&(c+=l+` 37`,e=e.substring(l.length+1),s=!0),!s)for(var D=this.rules.other.nextBulletRegex(m),y=this.rules.other.hrRegex(m),E=this.rules.other.fencesBeginRegex(m),g=this.rules.other.headingBeginRegex(m),b=this.rules.other.htmlBeginRegex(m);e;){var F=e.split(` 38`,1)[0],_=void 0;if(l=F,_=this.options.pedantic?l=l.replace(this.rules.other.listReplaceNesting," "):l.replace(this.rules.other.tabCharGlobal," "),E.test(l)||g.test(l)||b.test(l)||D.test(l)||y.test(l))break;if(_.search(this.rules.other.nonSpaceChar)>=m||!l.trim())d+=` 39`+_.slice(m);else{if(h||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(f)||g.test(f)||y.test(f))break;d+=` 40`+l}!h&&!l.trim()&&(h=!0),c+=F+` 41`,e=e.substring(F.length+1),f=_.slice(m)}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));var k=null,C=void 0;this.options.gfm&&(k=this.rules.other.listIsTask.exec(d))&&(C=k[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,"")),a.items.push({type:"list_item",raw:c,task:!!k,checked:C,loose:!1,text:d,tokens:[]}),a.raw+=c}var A=a.items.at(-1);if(!A)return;A.raw=A.raw.trimEnd(),A.text=A.text.trimEnd(),a.raw=a.raw.trimEnd();for(var N=0;N<a.items.length;N++)if(this.lexer.state.top=!1,a.items[N].tokens=this.lexer.blockTokens(a.items[N].text,[]),!a.loose){var P=a.items[N].tokens.filter(function(Z){return Z.type==="space"}),I=P.length>0&&P.some(function(Z){return t.rules.other.anyLine.test(Z.raw)});a.loose=I}if(a.loose)for(var O=0;O<a.items.length;O++)a.items[O].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:t[1]==="pre"||t[1]==="script"||t[1]==="style",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=lc(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(t=r[3])!==null&&t!==void 0&&t.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(` 42`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(u.length===a.length){var s,c=K(a);try{for(c.s();!(s=c.n()).done;){var d=s.value;this.rules.other.tableAlignRight.test(d)?o.align.push("right"):this.rules.other.tableAlignCenter.test(d)?o.align.push("center"):this.rules.other.tableAlignLeft.test(d)?o.align.push("left"):o.align.push(null)}}catch(D){c.e(D)}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 l,h=K(i);try{for(h.s();!(l=h.n()).done;){var m=l.value;o.rows.push(lc(m,o.header.length).map(function(D,y){return{text:D,tokens:n.lexer.inline(D),header:!1,align:o.align[y]}}))}}catch(D){h.e(D)}finally{h.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=t[1].charAt(t[1].length-1)===` 43`?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
43(!this.rules.other.endAngleBracket.test(n))return;var r=Pr(n.slice(0,-1),"\\");if((n.length-r.length)%2==0)return}else{var u=(function(c,d){if(c.indexOf(d[1])===-1)return-1;for(var f=0,l=0;l<c.length;l++)if(c[l]==="\\")l++;else if(c[l]===d[0])f++;else if(c[l]===d[1]&&--f<0)return l;return f>0?-2:-1})(t[2],"()");if(u===-2)return;if(u>-1){var a=(t[0].indexOf("!")===0?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)),fc(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},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 fc(n,r,n[0],this.lexer,this.rules)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?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=G(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);(r=c.exec(t))!=null;)if(u=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=G(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 d=G(r[0])[0].length,f=e.slice(0,i+r.index+d+a);if(Math.min(i,a)%2){var l=f.slice(1,-1);return{type:"em",raw:f,text:l,tokens:this.lexer.inlineTokens(l)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}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]=(a=(i=this.rules.inline._backpedal.exec(t[0]))===null||i===void 0?void 0:i[0])!==null&&a!==void 0?a:""}while(u!==t[0]);n=t[0],r=t[1]==="www."?"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}}}}]),Ot=(function(){function e(t){se(this,e),Se(this,"tokens",void 0),Se(this,"options",void 0),Se(this,"state",void 0),Se(this,"tokenizer",void 0),Se(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Hn,this.options.tokenizer=this.options.tokenizer||new oa,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:st,block:Zu.normal,inline:Tr.normal};this.options.pedantic?(n.block=Zu.pedantic,n.inline=Tr.pedantic):this.options.gfm&&(n.block=Zu.gfm,this.options.breaks?n.inline=Tr.breaks:n.inline=Tr.gfm),this.tokenizer.rules=n}return ce(e,[{key:"lex",value:function(t){t=t.replace(st.carriageReturn,` 44`),this.blockTokens(t,this.tokens);for(var n=0;
44n<this.inlineQueue.length;n++){var r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}},{key:"blockTokens",value:function(t){var n,r=this,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2&&arguments[2]!==void 0&&arguments[2],i=function(){var o,s,c;if((o=r.options.extensions)!==null&&o!==void 0&&(o=o.block)!==null&&o!==void 0&&o.some(function(F){return!!(c=F.call({lexer:r},t,u))&&(t=t.substring(c.raw.length),u.push(c),!0)}))return 0;if(c=r.tokenizer.space(t)){t=t.substring(c.raw.length);var d=u.at(-1);return c.raw.length===1&&d!==void 0?d.raw+=` 45`:u.push(c),0}if(c=r.tokenizer.code(t)){t=t.substring(c.raw.length);var f=u.at(-1);return f?.type==="paragraph"||f?.type==="text"?(f.raw+=(f.raw.endsWith(` 46`)?"":` 47`)+c.raw,f.text+=` 48`+c.text,r.inlineQueue.at(-1).src=f.text):u.push(c),0}if((c=r.tokenizer.fences(t))||(c=r.tokenizer.heading(t))||(c=r.tokenizer.hr(t))||(c=r.tokenizer.blockquote(t))||(c=r.tokenizer.list(t))||(c=r.tokenizer.html(t)))return t=t.substring(c.raw.length),u.push(c),0;if(c=r.tokenizer.def(t)){t=t.substring(c.raw.length);var l=u.at(-1);return l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(` 49`)?"":` 50`)+c.raw,l.text+=` 51`+c.raw,r.inlineQueue.at(-1).src=l.text):r.tokens.links[c.tag]||(r.tokens.links[c.tag]={href:c.href,title:c.title},u.push(c)),0}if((c=r.tokenizer.table(t))||(c=r.tokenizer.lheading(t)))return t=t.substring(c.raw.length),u.push(c),0;var h=t;if((s=r.options.extensions)!==null&&s!==void 0&&s.startBlock){var m,D=1/0,y=t.slice(1);r.options.extensions.startBlock.forEach(function(F){typeof(m=F.call({lexer:r},y))=="number"&&m>=0&&(D=Math.min(D,m))}),D<1/0&&D>=0&&(h=t.substring(0,D+1))}if(r.state.top&&(c=r.tokenizer.paragraph(h))){var E=u.at(-1);return a&&E?.type==="paragraph"?(E.raw+=(E.raw.endsWith(` 52`)?"":` 53`)+c.raw,E.text+=` 54`+c.text,r.inlineQueue.pop(),r.inlineQueue.at(-1).src=E.text):u.push(c),a=h.length!==t.length,t=t.substring(c.raw.length),0}if(c=r.tokenizer.text(t)){t=t.substring(c.raw.length);var g=u.at(-1);return g?.type==="text"?(g.raw+=(g.raw.endsWith(` 55`)?"":` 56`)+c.raw,g.text+=` 57`+c.text,r.inlineQueue.pop(),r.inlineQueue.at(-1).src=g.text):u.push(c),0}if(t){var b="Infinite loop on byte: "+t.charCodeAt(0);if(r.options.silent)return console.error(b),1;throw new Error(b)}};for(this.options.pedantic&&(t=t.replace(st.tabCharGlobal," ").replace(st.spaceLine,""));t&&((n=i())===0||n!==1););return this.state.top=!0,u}},{key:"inline",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return this.inlineQueue.push({src:t,tokens:n}),n}},{key:"inlineTokens",value:function(t){var n,r,u,a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],o=t,s=null;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(c.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,s.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(s=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)u=s[2]?s[2].length:0,o=o.slice(0,s.index+u)+"["+"a".repeat(s[0].length-u-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);o=(n=(r=this.options.hooks)===null||r===void 0||(r=r.emStrongMask)===null||r===void 0?void 0:r.call({lexer:this},o))!==null&&n!==void 0?n:o;for(var d,f=!1,l="",h=function(){var m,D,y;if(f||(l=""),f=!1,(m=a.options.extensions)!==null&&m!==void 0&&(m=m.inline)!==null&&m!==void 0&&m.some(function(A){return!!(y=A.call({lexer:a},t,i))&&(t=t.substring(y.raw.length),i.push(y),!0)}))return 0;if((y=a.tokenizer.escape(t))||(y=a.tokenizer.tag(t))||(y=a.tokenizer.link(t)))return t=t.substring(y.raw.length),i.push(y),0;if(y=a.tokenizer.reflink(t,a.tokens.links)){t=t.substring(y.raw.length);var E=i.at(-1);return y.type==="text"&&E?.type==="text"?(E.raw+=y.raw,E.text+=y.text):i.push(y),0}if((y=a.tokenizer.emStrong(t,o,l))||(y=a.tokenizer.codespan(t))||(y=a.tokenizer.br(t))||(y=a.tokenizer.del(t))||(y=a.tokenizer.autolink(t))||!a.state.inLink&&(y=a.tokenizer.url(t)))return t=t.substring(y.raw.length),i.push(y),0;var g=t;if((D=a.options.extensions)!==null&&D!==void 0&&D.startInline){var b,F=1/0,_=t.slice(1);a.options.extensions.startInline.forEach(function(A){typeof(b=A.call({lexer:a},_))=="number"&&b>=0&&(F=Math.min(F,b))}),F<1/0&&F>=0&&(g=t.substring(0,F+1))}if(y=a.tokenizer.inlineText(g)){t=t.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(l=y.raw.slice(-1)),f=!0;var k=i.at(-1);return k?.type==="text"?(k.raw+=y.raw,k.text+=y.text):i.push(y),0}if(t){var C="Infinite loop on byte: "+t.charCodeAt(0);if(a.options.silent)return console.error(C),1;throw new Error(C)}};t&&((d=h())===0||d!==1););return i}}],[{key:"rules",get:function(){return{block:Zu,inline:Tr}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}])})(),sa=ce(function e(t){se(this,e),Se(this,"options",void 0),Se(this,"parser",void 0),this.options=t||Hn},[{key:"space",value:function(e){return""}},{key:"code",value:function(e){var t,n=e.text,r=e.lang,u=e.escaped,a=(t=(r||"").match(st.notSpaceStart))===null||t===void 0?void 0:t[0],i=n.replace(st.endingNewline,"")+` 58`;return a?'<pre><code class="language-'+Zt(a)+'">'+(u?i:Zt(i,!0))+`</code></pre> 59`:"<pre><code>"+(u?i:Zt(i,!0))+`</code></pre> 60`}},{key:"blockquote",value:function(e){var t=e.tokens;return`<blockquote> 61`.concat(this.parser.parse(t),`</blockquote> 62`)}},{key:"html",value:function(e){return e.text}},{key:"def",value:function(e){return""}},{key:"heading",value:function(e){var t=e.tokens,n=e.depth;return"<h".concat(n,">").concat(this.parser.parseInline(t),"</h").concat(n,`> 63`)}},{key:"hr",value:function(e){return`<hr> 64`}},{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&&n!==1?' start="'+n+'"':"")+`> 65`+r+"</"+i+`> 66`}},{key:"listitem",value:function(e){var t="";if(e.task){var n,r=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])===null||n===void 0?void 0:n.type)==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+Zt(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> 67`)}},{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> 68`)}},{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> 69<thead> 70`+t+`</thead> 71`+u+`</table> 72`}},{key:"tablerow",value:function(e){var t=e.text;return`<tr> 73`.concat(t,`</tr> 74`)}},{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,`> 75`)}},{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(Zt(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=cc(t);if(a===null)return u;var i='<a href="'+(t=a)+'"';return n&&(i+=' title="'+Zt(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=cc(t);if(a===null)return Zt(r);var i='<img src="'.concat(t=a,'" alt="').concat(r,'"');return n&&(i+=' title="'.concat(Zt(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:Zt(e.text)}}]),Ao=ce(function e(){se(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""}}]),Bt=(function(){function e(t){se(this,e),Se(this,"options",void 0),Se(this,"renderer",void 0),Se(this,"textRenderer",void 0),this.options=t||Hn,this.options.renderer=this.options.renderer||new sa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ao}return ce(e,[{key:"parse",value:function(t){for(var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],r="",u=0;u<t.length;u++){var a,i=t[u];
75if((a=this.options.extensions)!==null&&a!==void 0&&(a=a.renderers)!==null&&a!==void 0&&a[i.type]){var o=i,s=this.options.extensions.renderers[o.type].call({parser:this},o);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){r+=s||"";continue}}var c=i;switch(c.type){case"space":r+=this.renderer.space(c);continue;case"hr":r+=this.renderer.hr(c);continue;case"heading":r+=this.renderer.heading(c);continue;case"code":r+=this.renderer.code(c);continue;case"table":r+=this.renderer.table(c);continue;case"blockquote":r+=this.renderer.blockquote(c);continue;case"list":r+=this.renderer.list(c);continue;case"html":r+=this.renderer.html(c);continue;case"def":r+=this.renderer.def(c);continue;case"paragraph":r+=this.renderer.paragraph(c);continue;case"text":for(var d=c,f=this.renderer.text(d);u+1<t.length&&t[u+1].type==="text";)d=t[++u],f+=` 76`+this.renderer.text(d);r+=n?this.renderer.paragraph({type:"paragraph",raw:f,text:f,tokens:[{type:"text",raw:f,text:f,escaped:!0}]}):f;continue;default:var l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}return r}},{key:"parseInline",value:function(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.renderer,r="",u=0;u<t.length;u++){var a,i=t[u];
76if((a=this.options.extensions)!==null&&a!==void 0&&(a=a.renderers)!==null&&a!==void 0&&a[i.type]){var o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=o||"";continue}}var s=i;switch(s.type){case"escape":case"text":r+=n.text(s);break;case"html":r+=n.html(s);break;case"link":r+=n.link(s);break;case"image":r+=n.image(s);break;case"strong":r+=n.strong(s);break;case"em":r+=n.em(s);break;case"codespan":r+=n.codespan(s);break;case"br":r+=n.br(s);break;case"del":r+=n.del(s);break;default:var c='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}return r}}],[{key:"parse",value:function(t,n){return new e(n).parse(t)}},{key:"parseInline",value:function(t,n){return new e(n).parseInline(t)}}])})(),zr=(Mu=ce(function e(t){se(this,e),Se(this,"options",void 0),Se(this,"block",void 0),this.options=t||Hn},[{key:"preprocess",value:function(e){return e}},{key:"postprocess",value:function(e){return e}},{key:"processAllTokens",value:function(e){return e}},{key:"emStrongMask",value:function(e){return e}},{key:"provideLexer",value:function(){return this.block?Ot.lex:Ot.lexInline}},{key:"provideParser",value:function(){return this.block?Bt.parse:Bt.parseInline}}]),Se(Mu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Se(Mu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Mu),V0=ce(function e(){se(this,e),Se(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),Se(this,"options",this.setOptions),Se(this,"parse",this.parseMarkdown(!0)),Se(this,"parseInline",this.parseMarkdown(!1)),Se(this,"Parser",Bt),Se(this,"Renderer",sa),Se(this,"TextRenderer",Ao),Se(this,"Lexer",Ot),Se(this,"Tokenizer",oa),Se(this,"Hooks",zr),this.use.apply(this,arguments)},[{key:"walkTokens",value:function(e,t){var n,r=this,u=[],a=K(e);try{var i=function(){var o=n.value;switch(u=u.concat(t.call(r,o)),o.type){case"table":var s,c=o,d=K(c.header);try{for(d.s();!(s=d.n()).done;){var f=s.value;u=u.concat(r.walkTokens(f.tokens,t))}}catch(F){d.e(F)}finally{d.f()}var l,h=K(c.rows);try{for(h.s();!(l=h.n()).done;){var m,D=K(l.value);try{for(D.s();!(m=D.n()).done;){var y=m.value;u=u.concat(r.walkTokens(y.tokens,t))}}catch(F){D.e(F)}finally{D.f()}}}catch(F){h.e(F)}finally{h.f()}break;case"list":var E=o;u=u.concat(r.walkTokens(E.items,t));break;default:var g,b=o;(g=r.defaults.extensions)!==null&&g!==void 0&&(g=g.childTokens)!==null&&g!==void 0&&g[b.type]?r.defaults.extensions.childTokens[b.type].forEach(function(F){var _=b[F].flat(1/0);u=u.concat(r.walkTokens(_,t))}):b.tokens&&(u=u.concat(r.walkTokens(b.tokens,t)))}};for(a.s();!(n=a.n()).done;)i()}catch(o){a.e(o)}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(a){var i=v({},a);if(i.async=e.defaults.async||i.async||!1,a.extensions&&(a.extensions.forEach(function(g){if(!g.name)throw new Error("extension name required");if("renderer"in g){var b=t.renderers[g.name];t.renderers[g.name]=b?function(){for(var _=arguments.length,k=new Array(_),C=0;C<_;C++)k[C]=arguments[C];var A=g.renderer.apply(this,k);return A===!1&&(A=b.apply(this,k)),A}:g.renderer}if("tokenizer"in g){if(!g.level||g.level!=="block"&&g.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");var F=t[g.level];F?F.unshift(g.tokenizer):t[g.level]=[g.tokenizer],g.start&&(g.level==="block"?t.startBlock?t.startBlock.push(g.start):t.startBlock=[g.start]:g.level==="inline"&&(t.startInline?t.startInline.push(g.start):t.startInline=[g.start]))}"childTokens"in g&&g.childTokens&&(t.childTokens[g.name]=g.childTokens)}),i.extensions=t),a.renderer){var o=e.defaults.renderer||new sa(e.defaults),s=function(){if(!(c in o))throw new Error("renderer '".concat(c,"' does not exist"));if(["options","parser"].includes(c))return 1;var g=c,b=a.renderer[g],F=o[g];o[g]=function(){for(var _=arguments.length,k=new Array(_),C=0;C<_;C++)k[C]=arguments[C];var A=b.apply(o,k);return A===!1&&(A=F.apply(o,k)),A||""}};for(var c in a.renderer)s();i.renderer=o}if(a.tokenizer){var d=e.defaults.tokenizer||new oa(e.defaults),f=function(){if(!(l in d))throw new Error("tokenizer '".concat(l,"' does not exist"));if(["options","rules","lexer"].includes(l))return 1;var g=l,b=a.tokenizer[g],F=d[g];d[g]=function(){for(var _=arguments.length,k=new Array(_),C=0;C<_;C++)k[C]=arguments[C];var A=b.apply(d,k);return A===!1&&(A=F.apply(d,k)),A}};for(var l in a.tokenizer)f();i.tokenizer=d}if(a.hooks){var h=e.defaults.hooks||new zr,m=function(g){if(!(g in h))throw new Error("hook '".concat(g,"' does not exist"));if(["options","block"].includes(g))return 1;var b=g,F=a.hooks[b],_=h[b];zr.passThroughHooks.has(g)?h[b]=function(k){if(e.defaults.async&&zr.passThroughHooksRespectAsync.has(g))return be(X().m(function A(){var N;return X().w(function(P){for(;;)switch(P.n){case 0:return P.n=1,F.call(h,k);case 1:return N=P.v,P.a(2,_.call(h,N))}},A)}))();
76var C=F.call(h,k);return _.call(h,C)}:h[b]=function(){for(var k=arguments.length,C=new Array(k),A=0;A<k;A++)C[A]=arguments[A];if(e.defaults.async)return be(X().m(function P(){var I;return X().w(function(O){for(;;)switch(O.n){case 0:return O.n=1,F.apply(h,C);case 1:if((I=O.v)!==!1){O.n=3;break}return O.n=2,_.apply(h,C);case 2:I=O.v;case 3:return O.a(2,I)}},P)}))();var N=F.apply(h,C);return N===!1&&(N=_.apply(h,C)),N}};for(var D in a.hooks)m(D);i.hooks=h}if(a.walkTokens){var y=e.defaults.walkTokens,E=a.walkTokens;i.walkTokens=function(g){var b=[];return b.push(E.call(this,g)),y&&(b=b.concat(y.call(this,g))),b}}e.defaults=v(v({},e.defaults),i)}),this}},{key:"setOptions",value:function(e){return this.defaults=v(v({},this.defaults),e),this}},{key:"lexer",value:function(e,t){return Ot.lex(e,t??this.defaults)}},{key:"parser",value:function(e,t){return Bt.parse(e,t??this.defaults)}},{key:"parseMarkdown",value:function(e){var t=this;return function(n,r){var u=v({},r),a=v(v({},t.defaults),u),i=t.onError(!!a.silent,!!a.async);if(t.defaults.async===!0&&u.async===!1)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(Qe(n)>"u"||n===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=e),a.async)return be(X().m(function c(){var d,f,l,h,m,D,y,E,g,b,F;return X().w(function(_){for(;;)switch(_.n){case 0:if(!a.hooks){_.n=2;break}return _.n=1,a.hooks.preprocess(n);case 1:m=_.v,_.n=3;break;case 2:m=n;case 3:if(d=m,!a.hooks){_.n=5;break}return _.n=4,a.hooks.provideLexer();case 4:D=_.v,_.n=6;break;case 5:D=e?Ot.lex:Ot.lexInline;case 6:return y=D,_.n=7,y(d,a);case 7:if(f=_.v,!a.hooks){_.n=9;break}return _.n=8,a.hooks.processAllTokens(f);case 8:E=_.v,_.n=10;break;case 9:E=f;case 10:if(l=E,!a.walkTokens){_.n=11;break}return _.n=11,Promise.all(t.walkTokens(l,a.walkTokens));case 11:if(!a.hooks){_.n=13;break}return _.n=12,a.hooks.provideParser();case 12:g=_.v,_.n=14;break;case 13:g=e?Bt.parse:Bt.parseInline;case 14:return b=g,_.n=15,b(l,a);case 15:if(h=_.v,!a.hooks){_.n=17;break}return _.n=16,a.hooks.postprocess(h);case 16:F=_.v,_.n=18;break;case 17:F=h;case 18:return _.a(2,F)}},c)}))().catch(i);try{a.hooks&&(n=a.hooks.preprocess(n));var o=(a.hooks?a.hooks.provideLexer():e?Ot.lex:Ot.lexInline)(n,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&t.walkTokens(o,a.walkTokens);var s=(a.hooks?a.hooks.provideParser():e?Bt.parse:Bt.parseInline)(o,a);return a.hooks&&(s=a.hooks.postprocess(s)),s}catch(c){return i(c)}}}},{key:"onError",value:function(e,t){return function(n){if(n.message+=` 77Please report this to https://github.com/markedjs/marked.`,e){var r="<p>An error occurred:</p><pre>"+Zt(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}}]),cn=new V0;function Ne(e,t){return cn.parse(e,t)}function Lu(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}Ne.options=Ne.setOptions=function(e){return cn.setOptions(e),Ne.defaults=cn.defaults,nc(Ne.defaults),Ne},Ne.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},Ne.defaults=Hn,Ne.use=function(){return cn.use.apply(cn,arguments),Ne.defaults=cn.defaults,nc(Ne.defaults),Ne},Ne.walkTokens=function(e,t){return cn.walkTokens(e,t)},Ne.parseInline=cn.parseInline,Ne.Parser=Bt,Ne.parser=Bt.parse,Ne.Renderer=sa,Ne.TextRenderer=Ao,Ne.Lexer=Ot,Ne.lexer=Ot.lex,Ne.Tokenizer=oa,Ne.Hooks=zr,Ne.parse=Ne,Ne.options,Ne.setOptions,Ne.use,Ne.walkTokens,Ne.parseInline,Bt.parse,Ot.lex;var _i=new Ne.Renderer;_i.code=function(e){var t=e.text,n=e.lang,r=n===void 0?"":n,u=e.escaped,a=r?"language-".concat(r):"",i=u?t:Lu(t),o=encodeURIComponent(t);return` 78 <div class="DocSearch-CodeSnippet"> 79 <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" viewB
79ox="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> 80 <pre><code class="`).concat(a,'">').concat(i,`</code></pre> 81 </div> 82 `)},_i.link=function(e){var t=e.href,n=e.title,r=e.text,u=n?' title="'.concat(Lu(n),'"'):"",a=t?Lu(t):"",i=Lu(r);return'<a href="'.concat(a,'"').concat(u,' target="_blank" rel="noopener noreferrer">').concat(i,"</a>")};var Qu=Sl(function(e){var t=e.content,n=e.copyButtonText,r=e.copyButtonCopiedText,u=e.isStreaming,a=ft(function(){return Ne.parse(t,{gfm:!0,breaks:!0,renderer:_i})},[t]),i=Yt(null);return bt(function(){var o=i.current;if(o)return Array.from(o.querySelectorAll(".DocSearch-CodeSnippet-CopyButton")).forEach(function(c){var d=c.querySelector(".DocSearch-CodeSnippet-CopyButton-Label");d&&(d.textContent=n),c.classList.remove("DocSearch-CodeSnippet-CopyButton--copied")}),o.addEventListener("click",s),function(){o.removeEventListener("click",s)};function s(c){var d,f=c.target.closest(".DocSearch-CodeSnippet-CopyButton");if(f){var l=(d=f.getAttribute("data-code"))!==null&&d!==void 0?d:"";navigator.clipboard.writeText(decodeURIComponent(l)).catch(function(){});var h=f.querySelector(".DocSearch-CodeSnippet-CopyButton-Label");if(h){f.classList.add("DocSearch-CodeSnippet-CopyButton--copied");var m=n;h.textContent=r,setTimeout(function(){f.classList.remove("DocSearch-CodeSnippet-CopyButton--copied"),h.textContent=m},1500)}}}},[a,n,r]),p.createElement("div",{ref:i,className:"DocSearch-Markdown-Content ".concat(u?"DocSearch-Markdown-Content--streaming":""),dangerouslySetInnerHTML:{__html:a}})});function W0(e){var t=e.part,n=e.translations,r=e.onSearchQueryClick,u=n.searchingText,a=n.preToolCallText,i=n.toolCallResultText;switch(t.state){case"input-streaming":return p.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--PartialCall shimmer"},p.createElement(gu,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),p.createElement("span",null,u));case"input-available":return p.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--Call shimmer"},p.createElement(gu,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),p.createElement("span",null,a," ",'"'.concat(t.input.query||"",'" ...')));case"output-available":var o,s,c=t.type==="tool-searchIndex"?t.output.query:t.input.query,d=(o=(s=t.output.hits)===null||s===void 0?void 0:s.length)!==null&&o!==void 0?o:0;return p.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--Result"},p.createElement(wu,null),p.createElement("span",null,i," ",r?p.createElement("span",{role:"button",tabIndex:0,className:"DocSearch-AskAiScreen-MessageContent-Tool-Query",onKeyDown:function(f){f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),r(c||""))},onClick:function(){return r(c||"")}}," ",'"',c||"",'"'):p.createElement("span",{className:"DocSearch-AskAiScreen-MessageContent-Tool-Query"},' "',c||"",'"')," ","found ",d," results"));default:return null}}Qu.displayName="MemoizedMarkdown";var J0=["translations"];function K0(e){var t=e.disclaimerText;return p.createElement("p",{className:"DocSearch-AskAiScreen-Disclaimer"},t)}function Q0(e){var t,n,r,u=e.exchange,a=e.askAiError,i=e.isLastExchange,o=e.loadingStatus,s=e.onSearchQueryClick,c=e.translations,d=e.conversations,f=e.onFeedback,l=e.agentStudio,h=u.userMessage,m=u.assistantMessage,D=c.stoppedStreamingText,y=D===void 0?"You stopped this response":D,E=c.errorTitleText,g=E===void 0?"Chat error":E,b=c.preToolCallText,F=b===void 0?"Searching...":b,_=c.afterToolCallText,k=_===void 0?"Searched for":_,C=c.duringToolCallText,A=C===void 0?"Searching...":C,N=vo(a,!!l),P=ft(function(){return bs(m)},[m]),I=ft(function(){return bs(h)},[h]),O=p.useMemo(function(){return x=m,j=[],R=new Set,x?(x.parts.forEac
82h(function(T){if(T.type==="text"&&T.text.length!==0){var M,V=T.text.replace(/```[\s\S]*?```/g,"").replace(/`[^`]*`/g,""),J=K(V.matchAll(/\[([^\]]*)\]\(([^)]+)\)/g));try{for(J.s();!(M=J.n()).done;){var ee=M.value,le=ee[1].trim(),$=ee[2];R.has($)||(R.add($),j.push({url:$,title:le||void 0}))}}catch(Y){J.e(Y)}finally{J.f()}var Q,ie=K(V.matchAll(new RegExp('(?<!\\]\\()https?:\\/\\/[^\\s<>"{}|\\\\^`[\\]]+',"g")));try{for(ie.s();!(Q=ie.n()).done;){var pe=Q.value[0].replace(/[.,;:!?]+$/,"");R.has(pe)||(R.add(pe),j.push({url:pe}))}}catch(Y){ie.e(Y)}finally{ie.f()}}}),j):[];var x,j,R},[m]),Z=p.useMemo(function(){return(function(x){for(var j=[],R=0;R<x.length;R++){var T=x[R];if(T.type==="tool-searchIndex"&&T.state==="output-available"){for(var M=[],V=R;V<x.length;){var J=x[V];if(J.type!=="tool-searchIndex"||J.state!=="output-available")break;var ee,le,$=((ee=(le=J.output)===null||le===void 0?void 0:le.query)!==null&&ee!==void 0?ee:"").trim();$&&$.length>0&&M.push($),V++}M.length>1?j.push({type:"aggregated-tool-call",queries:M}):M.length===1&&j.push(T),R=V-1}else j.push(T)}return j})(m?.parts||[])},[m]),B=((t=h.metadata)===null||t===void 0?void 0:t.stopped)||(m==null||(n=m.metadata)===null||n===void 0?void 0:n.stopped),L=!B&&(!i||i&&o==="ready"&&!!m),S=["submitted","streaming"].includes(o)&&i&&!Z.some(function(x){return x.type!=="step-start"}),w=l?m?.id||u.id:h?.id||u.id;return p.createElement("div",{className:"DocSearch-AskAiScreen-Response-Container"},p.createElement("div",{className:"DocSearch-AskAiScreen-Response"},p.createElement("div",{className:"DocSearch-AskAiScreen-Message DocSearch-AskAiScreen-Message--user"},p.createElement("p",{className:"DocSearch-AskAiScreen-Query"},(r=I?.text)!==null&&r!==void 0?r:"")),p.createElement("div",{className:"DocSearch-AskAiScreen-Message DocSearch-AskAiScreen-Message--assistant"},p.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent"},o==="error"&&a&&i&&!N&&p.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent DocSearch-AskAiScreen-Error"},p.createElement(l0,null),p.createElement("div",{className:"DocSearch-AskAiScreen-Error-Content"},p.createElement("h4",{className:"DocSearch-AskAiScreen-Error-Title"},g),p.createElement(Qu,{content:a.message,copyButtonText:"",copyButtonCopiedText:"",isStreaming:!1}))),S&&p.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Reasoning"},p.createElement("span",{className:"shimmer"},c.thinkingText||"Thinking...")),Z.map(function(x,j){var R=j;return typeof x=="string"?p.createElement(Qu,{key:R,content:x,copyButtonText:c.copyButtonText||"Copy",copyButtonCopiedText:c.copyButtonCopiedText||"Copied!",isStreaming:o==="streaming"}):x.type==="aggregated-tool-call"?p.createElement(_0,{key:R,queries:x.queries,translations:c,onSearchQueryClick:s}):x.type==="reasoning"&&x.state==="streaming"?p.createElement("div",{key:R,className:"DocSearch-AskAiScreen-MessageContent-Reasoning shimmer"},p.createElement(gu,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),p.createElement("span",{className:"shimmer"},"Reasoning...")):x.type==="text"?p.createElement(Qu,{key:R,content:x.text,copyButtonText:c.copyButtonText||"Copy",copyButtonCopiedText:c.copyButtonCopiedText||"Copied!",isStreaming:x.state==="streaming"}):x.type==="tool-searchIndex"||x.type==="tool-algolia_search_index"?p.createElement(W0,{key:R,translations:{preToolCallText:F,searchingText:A,toolCallResultText:k},part:x,onSearchQueryClick:s}):null})),B&&p.createElement("p",{className:"DocSearck-AskAiScreen-MessageContent-Stopped"},y)),p.createElement("div",{className:"DocSearch-AskAiScreen-Answer
82-Footer"},p.createElement(G0,{id:w,showActions:L,latestAssistantMessageContent:P?.text||null,translations:c,conversations:d,onFeedback:f}))),O.length>0?p.createElement(Y0,{urlsToDisplay:O,relatedSourcesText:c.relatedSourcesText}):null)}function G0(e){var t=e.id,n=e.showActions,r=e.latestAssistantMessageContent,u=e.translations,a=e.conversations,i=e.onFeedback,o=p.useMemo(function(){var A,N,P=(A=a.getOne)===null||A===void 0?void 0:A.call(a,t);return(N=P?.feedback)!==null&&N!==void 0?N:null},[a,t]),s=xe(p.useState(o),2),c=s[0],d=s[1],f=xe(p.useState(!1),2),l=f[0],h=f[1],m=xe(p.useState(null),2),D=m[0],y=m[1],E=(function(){var A=be(X().m(function N(P){var I;return X().w(function(O){for(;;)switch(O.p=O.n){case 0:if(!l){O.n=1;break}return O.a(2);case 1:return y(null),h(!0),O.p=2,O.n=3,i?.(t,P==="like"?1:0);case 3:d(P),O.n=5;break;case 4:O.p=4,I=O.v,y(I);case 5:return O.p=5,h(!1),O.f(5);case 6:return O.a(2)}},N,null,[[2,4,5,6]])}));return function(N){return A.apply(this,arguments)}})(),g=u.likeButtonTitle,b=g===void 0?"Like":g,F=u.dislikeButtonTitle,_=F===void 0?"Dislike":F,k=u.thanksForFeedbackText,C=k===void 0?"Thanks for your feedback!":k;return n&&r?p.createElement("div",{className:"DocSearch-AskAiScreen-Actions"},c===null?p.createElement(p.Fragment,null,l?p.createElement(gu,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}):p.createElement(p.Fragment,null,p.createElement(nh,{title:b,onClick:function(){return E("like")}}),p.createElement(rh,{title:_,onClick:function(){return E("dislike")}})),D&&p.createElement("p",{className:"DocSearch-AskAiScreen-FeedbackText"},D.message||"An error occured")):p.createElement("p",{className:"DocSearch-AskAiScreen-FeedbackText DocSearch-AskAiScreen-FeedbackText--visible"},C),p.createElement(th,{translations:u,onClick:function(){return navigator.clipboard.writeText(r)}})):null}function Y0(e){var t=e.urlsToDisplay,n=e.relatedSourcesText;return p.createElement("div",{className:"DocSearch-AskAiScreen-RelatedSources"},p.createElement("p",{className:"DocSearch-AskAiScreen-RelatedSources-Title"},n||"Related sources"),p.createElement("div",{className:"DocSearch-AskAiScreen-RelatedSources-List"},t.length>0&&t.map(function(r){return p.createElement("a",{key:r.url,href:r.url,className:"DocSearch-AskAiScreen-RelatedSources-Item-Link",target:"_blank",rel:"noopener noreferrer"},p.createElement(eh,null),p.createElement("span",null,r.title||r.url))})))}function X0(e){var t=e.translations,n=t===void 0?{}:t,r=ut(e,J0),u=n.disclaimerText,a=u===void 0?"Answers are generated with AI which can make mistakes. Verify responses.":u,i=n.startNewConversationButtonText,o=i===void 0?"Start a new conversation":i,s=r.messages,c=r.askAiError,d=r.status,f=r.agentStudio,l=ft(function(){return d==="error"&&vo(c,!!f)},[d,c,f]),h=ft(function(){return(function(g){if(g){if(yi(g)){var b=ks(g);return b&&!(function(F){var _=F.trim();return _.startsWith("{")&&_.endsWith("}")})(b)?b:"Could not complete response due to token output limits"}return ks(g)}})(c)},[c]),m=(function(g,b){return!g||!yi(g)&&(!!gi(g)||!b||Ml(g).showNewConversationLink)})(c,!!f),D=ft(function(){for(var g=[],b=0;b<s.length;b++)if(s[b].role==="user"){var F,_=s[b],k=((F=s[b+1])===null||F===void 0?void 0:F.role)==="assistant"?s[b+1]:null;g.push({id:_.id,userMessage:_,assistantMessage:k}),k&&b++}return(function(C){return C})(g)},[s,l]),y=function(g){r.onAskAiToggle(!1),r.setQuery(g)},E=l&&(!gi(c)||s.some(function(g){return g.role==="assistant"}));return p.createElement("div",{className:"DocSearch-AskAiScreen DocSearch-AskAiScreen-Container"},E&&p.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent DocSearch-AskAiScreen-Error DocSearch-AskAiScreen-Error--ThreadDepth"},p.createElement("div",{className:"DocSearch-AskAiScreen-Error-Content"},h?p.createElement("p",{className:"DocSearch-AskAiScreen-Error-Title"},h):null,m?p.createElement("p",null,p.createElement("button",{type:"button",className:"DocSearch-ThreadDepthError-Link",onClick:r.onNewConversation},o)," ","to continue."):null)),p.createElement(K0,{disclaimerText:a}),p.createElement("div",{className:"DocSearch-AskAiScreen-Body"}
82,p.createElement("div",{className:"DocSearch-AskAiScreen-ExchangesList"},D.slice().reverse().map(function(g,b){return p.createElement(Q0,{key:g.id,exchange:g,askAiError:r.askAiError,isLastExchange:b===0,loadingStatus:r.status,translations:n,conversations:r.conversations,agentStudio:f,onSearchQueryClick:y,onFeedback:r.onFeedback})}))))}function eh(){return p.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"},p.createElement("line",{x1:"4",x2:"20",y1:"9",y2:"9"}),p.createElement("line",{x1:"4",x2:"20",y1:"15",y2:"15"}),p.createElement("line",{x1:"10",x2:"8",y1:"3",y2:"21"}),p.createElement("line",{x1:"16",x2:"14",y1:"3",y2:"21"}))}function th(e){var t=e.onClick,n=e.translations,r=n.copyButtonTitle,u=r===void 0?"Copy":r,a=n.copyButtonCopiedText,i=a===void 0?"Copied!":a,o=xe(_n(!1),2),s=o[0],c=o[1];return bt(function(){if(s){var d=setTimeout(function(){c(!1)},1500);return function(){return clearTimeout(d)}}},[s]),p.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?p.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"},p.createElement("path",{d:"M20 6 9 17l-5-5"})):p.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"},p.createElement("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),p.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 nh(e){var t=e.title,n=e.onClick;return p.createElement("button",{type:"button",className:"DocSearch-AskAiScreen-ActionButton DocSearch-AskAiScreen-LikeButton",title:t,onClick:n},p.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"},p.createElement("path",{d:"M7 10v12"}),p.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 rh(e){var t=e.title,n=e.onClick;return p.createElement("button",{type:"button",className:"DocSearch-AskAiScreen-ActionButton DocSearch-AskAiScreen-DislikeButton",title:t,onClick:n},p.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"},p.createElement("path",{d:"M17 14V2"}),p.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"})))}var uh=["hit","attribute","tagName"];function dc(e,t){return t.split(".").reduce(function(n,r){return n!=null&&n[r]?n[r]:null},e)}function er(e){var t=e.hit,n=e.attribute,r=e.tagName;return gt(r===void 0?"span":r,v(v({},ut(e,uh)),{},{dangerouslySetInnerHTML:{__html:dc(t,"_snippetResult.".concat(n,".value"))||dc(t,n)}}))}var ah=["item","getItemProps","onItemClick","translations","collection"];function su(e){var t=p.useMemo(function(){return e.title?e.title.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'"):null},[e.title]);return e.collection&&e.collection.items.length!==0?e.collection.source.sourceId==="askAI"?p.createElement("section",{className:"DocSearch-AskAi-Section"},p.createElement("ul",e.getListProps({source:e.collection.source}),p.createElement(oh,$e({item:e.collection.items[0],translations:e.translations},e)))):(e.collection.source.sourceId,p.createElement("section",{className:"DocSearch-Hits"},p.createElement("div",{className:"DocSearch-Hit-source"}
82,t),p.createElement("ul",e.getListProps({source:e.collection.source}),e.collection.items.map(function(n,r){return p.createElement(ih,$e({key:[e.title,n.objectID].join(":"),item:n,index:r},e))})))):null}function ih(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;return p.createElement("li",$e({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child"].filter(Boolean).join(" ")},a({item:t,source:o.source,onClick:function(c){i(t,c)}})),p.createElement(s,{hit:t},p.createElement("div",{className:"DocSearch-Hit-Container"},r({item:t,index:n}),t.hierarchy[t.type]&&t.type==="lvl1"&&p.createElement("div",{className:"DocSearch-Hit-content-wrapper"},p.createElement(er,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&p.createElement(er,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),t.type==="askAI"&&p.createElement("div",{className:"DocSearch-Hit-content-wrapper"},p.createElement("span",{className:"DocSearch-Hit-title"},Zl(t.hierarchy.lvl1||""))),t.hierarchy[t.type]&&(t.type==="lvl2"||t.type==="lvl3"||t.type==="lvl4"||t.type==="lvl5"||t.type==="lvl6")&&p.createElement("div",{className:"DocSearch-Hit-content-wrapper"},p.createElement(er,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),p.createElement(er,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),t.type==="content"&&p.createElement("div",{className:"DocSearch-Hit-content-wrapper"},p.createElement(er,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),p.createElement(er,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),u({item:t}))))}function oh(e){var t=e.item,n=e.getItemProps,r=e.onItemClick,u=e.translations,a=e.collection,i=ut(e,ah),o=u||{},s=o.askAiPlaceholder,c=s===void 0?"Ask AI: ":s,d=o.noResultsAskAiPlaceholder,f=d===void 0?"Didn't find it in the docs? Ask AI to help: ":d,l=i.state.collections.length===1?f:c;return p.createElement("li",$e({className:"DocSearch-Hit"},n({item:t,source:a.source,onClick:function(h){r(t,h)}})),p.createElement("div",{className:"DocSearch-Hit--AskAI"},p.createElement("div",{className:"DocSearch-Hit-AskAIButton DocSearch-Hit-Container"},p.createElement("div",{className:" DocSearch-Hit-AskAIButton-icon DocSearch-Hit-icon"},p.createElement(go,null)),p.createElement("div",{className:"DocSearch-Hit-AskAIButton-title"},p.createElement("span",{className:"DocSearch-Hit-AskAIButton-title-highlight"},l),p.createElement("mark",{className:"DocSearch-Hit-AskAIButton-title-query"},String(t.query||""))))))}var sh=["onAskAiToggle"];function ch(e){var t=e.onAskAiToggle,n=ut(e,sh),r=p.useMemo(function(){return n.state.collections[2]},[n.state]);return p.useEffect(function(){r&&r.items.length!==0||t(!0)},[r,t]),p.createElement("div",{className:"DocSearch-Dropdown-Container DocSearch-Conversation-History"},p.createElement(su,$e({},n,{key:r.source.sourceId,title:"",translations:n.translations,collection:r,renderIcon:function(){return p.createElement("div",{className:"DocSearch-Hit-icon"},p.createElement(go,null))},renderAction:function(u){var a=u.item;return p.createElement("div",{className:"DocSearch-Hit-action"},p.createElement("button",{type:"button",className:"DocSearch-Hit-action-button",onClick:function(i){i.preventDefault(),i.stopPropagation(),n.conversations.remove(a),n.refresh()}},p.createElement(iu,null)))}})))}function lh(e){var t=e.translations,n=t===void 0?{}:t,r=n.titleText,u=r===void 0?"Unable to fetch results":r,a=n.helpText,i=a===void 0?"You might want to check your network connection.":a;return p.createElement("div",{className:"DocSearch-ErrorScreen"},p.createElement("div",{className:"DocSearch-Screen-Icon"},p.createElement(D0,null)),p.createElement("p",{className:"DocSearch-Title"},u),p.createElement("p",{className:"DocSearch-Help"},i))}function fh(e){var t=e.translations,n=t===void 0?{}:t,r=e.suggestedQuestions,u=r===void 0?[]:r,a=e.selectSuggestedQuestion,i=n.newConversationTitle,o=i===void 0?"How can I help you today?":i,s=n.newConversationDescription,c=s===void 0?"I search through your documentation to help you find setup guides, feature details and troubleshooting tips, fast.":s;return p.createElement("div",{className:"DocSearch-NewConversationScreen"},p.createElement("h3",{className:"DocSearch-NewConversationScreen-Title"},o),p.createElement("p",{className:"DocSearch-NewConversationScreen-Description"},c),p.createElement("div",{className:"DocSearch-NewConversationScreen-SuggestedQuestions"},u.map(function(d){return p.createElement("button",{key:d.objectID,type:"button",className:"DocSearch-NewConversationScreen-SuggestedQuestion",onClick:function(){return a(d)}},d.question)})))}var dh=["translations"];function pc(e){var t=e.translations,n=t===void 0?{}:t,r=ut(e,dh),u=n.noResultsText,a=u===void 0?"No results found for":u,i=n.suggestedQueryText,o=i===void 0?"Try searching for":i,s=n.reportMissingResultsText,c=s===void 0?"Believe this query should return results?":s,d=n.reportMissingResultsLinkText,f=d===void 0?"Let us know.":d,l=r.state.context.searchSuggestions;return p.createElement("div",{className:"DocSearch-NoResults ".concat(r.canHandleAskAi?"DocSearch-NoResults--withAskA
82i":"")},p.createElement("div",{className:"DocSearch-Screen-Icon"},p.createElement(g0,null)),p.createElement("p",{className:"DocSearch-Title"},a,' "',p.createElement("strong",null,r.state.query),'"'),l&&l.length>0&&p.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},p.createElement("p",{className:"DocSearch-Help"},o,":"),p.createElement("div",{className:"DocSearch-NoResults-Prefill-List-Items"},l.slice(0,3).reduce(function(h,m){return[].concat(G(h),[p.createElement("p",{key:m},p.createElement(wu,{size:16}),p.createElement("button",{className:"DocSearch-Prefill",key:m,type:"button",onClick:function(){r.setQuery(m.toLowerCase()+" "),r.refresh(),r.inputRef.current.focus()}},m))])},[]))),r.getMissingResultsUrl&&p.createElement("p",{className:"DocSearch-Help"},"".concat(c," "),p.createElement("a",{href:r.getMissingResultsUrl({query:r.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var ph=["translations"];function hh(e){var t=e.translations,n=t===void 0?{}:t,r=ut(e,ph);return p.createElement("div",{className:"DocSearch-Dropdown-Container"},r.state.collections.map(function(u){if(u.items.length===0)return null;var a=ql(u.items[0]);return p.createElement(su,$e({},r,{key:u.source.sourceId,translations:n,title:a,collection:u,renderIcon:function(i){var o,s=i.item,c=i.index;return p.createElement(p.Fragment,null,s.__docsearch_parent&&p.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},p.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},s.__docsearch_parent!==((o=u.items[c+1])===null||o===void 0?void 0:o.__docsearch_parent)?p.createElement("path",{d:"M8 6v21M20 27H8.3"}):p.createElement("path",{d:"M8 6v42M20 27H8.3"}))),p.createElement("div",{className:"DocSearch-Hit-icon"},p.createElement(p0,{type:s.type})))},renderAction:function(){return p.createElement("div",{className:"DocSearch-Hit-action"},p.createElement(f0,null))}}))}),r.resultsFooterComponent&&p.createElement("section",{className:"DocSearch-HitsFooter"},p.createElement(r.resultsFooterComponent,{state:r.state})))}var vh=["translations"];function mh(e){var t=e.translations,n=t===void 0?{}:t,r=ut(e,vh),u=n.recentSearchesTitle,a=u===void 0?"Recent":u,i=n.saveRecentSearchButtonTitle,o=i===void 0?"Save this search":i,s=n.removeRecentSearchButtonTitle,c=s===void 0?"Remove this search from history":s,d=n.favoriteSearchesTitle,f=d===void 0?"Favorite":d,l=n.removeFavoriteSearchButtonTitle,h=l===void 0?"Remove this search from favorites":l,m=n.recentConversationsTitle,D=m===void 0?"Recent conversations":m,y=n.removeRecentConversationButtonTitle,E=y===void 0?"Remove this conversation from history":y;return p.createElement("div",{className:"DocSearch-Dropdown-Container"},p.createElement(su,$e({},r,{title:a,collection:r.state.collections[0],renderIcon:function(){return p.createElement("div",{className:"DocSearch-Hit-icon"},p.createElement(c0,null))},renderAction:function(g){var b=g.item;return p.createElement(p.Fragment,null,p.createElement("div",{className:"DocSearch-Hit-action"},p.createElement("button",{className:"DocSearch-Hit-action-button",title:o,type:"submit",onClick:function(F){F.preventDefault(),F.stopPropagation(),r.favoriteSearches.add(b),r.recentSearches.remove(b),r.refresh()}},p.createElement(tc,null))),p.createElement("div",{className:"DocSearch-Hit-action"},p.createElement("button",{className:"DocSearch-Hit-action-button",title:c,type:"submit",onClick:function(F){F.preventDefault(),F.stopPropagation(),r.recentSearches.remove(b),r.refresh()}},p.createElement(iu,null))))}})),p.createElement(su,$e({},r,{title:f,collection:r.state.collections[1],renderIcon:function(){return p.createElement("div",{className:"DocSearch-Hit-icon"},p.createElement(tc,null))},renderAction:function(g){var b=g.item;return p.createElement("div",{className:"DocSearch-Hit-action"},p.createElement("button",{className:"DocSearch-Hit-action-button",title:h,type:"submit",onClick:function(F){F.preventDefault(),F.stopPropagation(),r.favoriteSearches.remove(b),r.refresh()}},p.createElement(iu,null)))}})),p.createElement(su,$e({},r,{title:D,collection:r.state.collections[2],renderIcon:function(){return p.createElement("div",{className:"DocSearch-Hit-icon"}
82,p.createElement(go,null))},renderAction:function(g){var b=g.item;return p.createElement("div",{className:"DocSearch-Hit-action"},p.createElement("button",{className:"DocSearch-Hit-action-button",title:E,type:"submit",onClick:function(F){F.preventDefault(),F.stopPropagation(),r.conversations.remove(b),r.refresh()}},p.createElement(iu,null)))}})))}var Dh=["translations"],gh=p.memo(function(e){var t,n=e.translations,r=n===void 0?{}:n,u=ut(e,Dh);return u.canHandleAskAi&&u.isAskAiActive&&u.askAiState==="conversation-history"?p.createElement(ch,u):u.canHandleAskAi&&u.isAskAiActive&&u.askAiState==="new-conversation"?p.createElement(fh,{translations:r?.newConversation,selectSuggestedQuestion:u.selectSuggestedQuestion,suggestedQuestions:u.suggestedQuestions}):u.isAskAiActive&&u.canHandleAskAi?p.createElement(X0,$e({},u,{messages:u.messages,status:u.status,askAiError:u.askAiError,translations:r?.askAiScreen,agentStudio:u.agentStudio})):((t=u.state)===null||t===void 0?void 0:t.status)==="error"?p.createElement(lh,{translations:r?.errorScreen}):u.state.query?u.hasCollections||u.canHandleAskAi?p.createElement(p.Fragment,null,p.createElement(hh,$e({},u,{translations:r?.resultsScreen})),u.canHandleAskAi&&u.state.collections.length===1&&p.createElement(pc,$e({},u,{translations:r?.noResultsScreen}))):p.createElement(pc,$e({},u,{translations:r?.noResultsScreen})):p.createElement(mh,$e({},u,{hasCollections:u.hasCollections,translations:r?.startScreen}))},function(e,t){return t.state.status==="loading"||t.state.status==="stalled"});function yh(e){var t=e.size,n=t===void 0?20:t,r=e.color,u=r===void 0?"currentColor":r;return p.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"},p.createElement("path",{d:"m12 19-7-7 7-7"}),p.createElement("path",{d:"M19 12H5"}))}var Fh=["children","className","onClick"],Gu=p.createContext({open:!1,setOpen:function(e){}});function hn(e){var t=e.children,n=xe(p.useState(!1),2),r=n[0],u=n[1],a=p.useRef(null);return p.useEffect(function(){function i(o){var s;(s=a.current)!==null&&s!==void 0&&s.contains(o.target)||u(!1)}return r&&window.addEventListener("click",i),function(){window.removeEventListener("click",i)}},[r]),p.createElement(Gu.Provider,{value:{open:r,setOpen:u}},p.createElement("div",{ref:a,className:"DocSearch-Menu"},t))}function Eh(e){var t=e.heading,n=e.shimmer,r=n!==void 0&&n;return p.createElement("span",{className:"DocSearch-Modal-heading".concat(r?" shimmer":"")},t)}hn.Trigger=function(e){var t=e.children,n=e.className,r=n===void 0?"":n,u=e.disabled,a=p.useContext(Gu),i=a.open,o=a.setOpen;return p.createElement("button",{type:"button",className:"DocSearch-Menu-trigger ".concat(r).concat(u?" disabled":""),"aria-disabled":u,onClick:function(){u||o(!i)}},t)},hn.Content=function(e){var t=e.children,n=p.useContext(Gu).open;return p.createElement("div",{className:"DocSearch-Menu-content".concat(n?" open":"")},t)},hn.Item=function(e){var t=e.children,n=e.className,r=n===void 0?"":n,u=e.onClick,a=ut(e,Fh),i=p.useContext(Gu).setOpen;return p.createElement("button",$e({type:"button",className:"DocSearch-Menu-item ".concat(r),onClick:function(o){u&&(u(o),i(!1))}},a),t)};var bh=["translations","askAiState","onAskAiToggle","setAskAiState"];function _h(e){var t=e.translations,n=t===void 0?{}:t,r=e.askAiState,u=e.onAskAiToggle,a=e.setAskAiState,i=ut(e,bh),o=n.clearButtonTitle,s=o===void 0?"Clear":o,c=n.clearButtonAriaLabel,d=c===void 0?"Clear the query":c,f=n.closeButtonText,l=f===void 0?"Close":f,h=n.closeButtonAriaLabel,m=h===void 0?"Close":h,D=n.searchInputLabel,y=D===void 0?"Search":D,E=n.backToKeywordSearchButtonText,g=E===void 0?"Back to keyword search":E,b=n.backToKeywordSearchButtonAriaLabel,F=b===void 0?"Back to keyword search":b,_=n.placeholderTextAskAiStreaming,k=_===void 0?"Answering...":_,C=n.newConversationPlaceholder,A=C===void 0?"Ask a question":C,N=n.conversationHistoryTitle,P=N===void 0?"My conversation history":N,I=n.startNewConversationText,O=I===void 0?"Start a new conversation":I,Z=n.viewConversationHistoryText,B=Z===void 0?"Conversation history":Z,L=n.threadDepthErrorPlaceholder,S=L===void 0?"Conversation limit reached":L,w=i.getFormProps({inputElement:i.inputRef.current}).onReset;p.useEffect(function(){i.autoFocus&&i.inputRef.current&&i.inputRef.current.focus()},[i.autoFocus,i.inputRef]),p.useEffect(function(){i.isFromSelection&&i.inputRef.current&&i.inputRef.current.select()},[i.isFromSelection,i.inputRef]);var x=p.useMemo(function(){var Y=i.state.collections[2];return!!Y&&Y.items.length>0},[i.state.collections]),j=i.getInputProps({inputElement:i.inputRef.current,autoF
82ocus:i.autoFocus,maxLength:512}),R=new Set(["ArrowUp","ArrowDown","Enter"]),T=j.onKeyDown,M=j.onChange,V=i.askAiStatus==="streaming"||i.askAiStatus==="submitted",J=i.state.status==="stalled",ee=i.isAskAiActive&&r!=="conversation-history",le=i.isThreadDepthError||!1,$=i.placeholder;r==="new-conversation"&&($=A),le&&i.isAskAiActive&&i.askAiBlockingChrome!=="minimal"&&($=S);var Q=null;V&&(Q=k),r==="conversation-history"&&(Q=P),p.useEffect(function(){i.askAiStatus!=="streaming"&&i.askAiStatus!=="submitted"&&i.inputRef.current&&i.inputRef.current.focus()},[i.askAiStatus,i.inputRef]);var ie=v(v({},j),{},{enterKeyHint:i.isAskAiActive?"enter":"search",onKeyDown:function(Y){if(i.isAskAiActive&&R.has(Y.key))return Y.key==="Enter"&&!V&&i.state.query&&i.onAskAgain(i.state.query),Y.preventDefault(),void Y.stopPropagation();T?.(Y)},onChange:function(Y){if(i.isAskAiActive)return i.setQuery(Y.currentTarget.value),Y.preventDefault(),void Y.stopPropagation();M?.(Y)},disabled:V||le&&i.isAskAiActive}),pe=p.useCallback(function(){if(!le)return r==="conversation-history"?(u(!0),void a("initial")):void u(!1);i.onNewConversation()},[r,le,u,a,i]);return p.createElement(p.Fragment,null,p.createElement("form",{className:"DocSearch-Form",onSubmit:function(Y){Y.preventDefault()},onReset:w},i.isAskAiActive?p.createElement(p.Fragment,null,p.createElement("button",{type:"button",tabIndex:0,className:"DocSearch-Action DocSearch-AskAi-Return",title:g,"aria-label":F,onClick:pe},p.createElement(yh,null))):p.createElement(p.Fragment,null,J&&p.createElement("div",{className:"DocSearch-LoadingIndicator"},p.createElement(gu,null)),!J&&p.createElement("label",$e({className:"DocSearch-MagnifierLabel"},i.getLabelProps()),p.createElement(wu,null),p.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},y))),Q&&p.createElement(Eh,{heading:Q,shimmer:V}),p.createElement("input",$e({className:"DocSearch-Input",ref:i.inputRef},ie,{placeholder:$,hidden:!!Q})),p.createElement("div",{className:"DocSearch-Actions"},p.createElement("button",{className:"DocSearch-Clear",type:"reset","aria-label":d,hidden:!i.state.query,tabIndex:i.state.query?0:-1,"aria-hidden":i.state.query?"false":"true"},s),i.state.query&&p.createElement("div",{className:"DocSearch-Divider"}),V&&p.createElement(p.Fragment,null,p.createElement("button",{type:"button",className:"DocSearch-Action DocSearch-StopStreaming",onClick:i.onStopAskAiStreaming},p.createElement(m0,null)),p.createElement("div",{className:"DocSearch-Divider"})),ee&&p.createElement(p.Fragment,null,p.createElement(hn,null,p.createElement(hn.Trigger,{className:"DocSearch-Action"}
82,p.createElement(y0,null)),p.createElement(hn.Content,null,p.createElement(hn.Item,{onClick:i.onNewConversation},p.createElement(E0,null),O),x&&p.createElement(hn.Item,{onClick:i.onViewConversationHistory},p.createElement(F0,null),B))),p.createElement("div",{className:"DocSearch-Divider"})),p.createElement("button",{type:"button",title:l,className:"DocSearch-Action DocSearch-Close","aria-label":m,onClick:i.onClose},p.createElement(iu,null)))))}function uf(){if(typeof window<"u"&&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(a,i){return i.size-a.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{}}}function af(e){return(function(){if(typeof window>"u"||!("localStorage"in window))return!1;var t="__TEST_KEY__";try{return window.localStorage.setItem(t,""),window.localStorage.removeItem(t),!0}catch{return!1}})()===!1?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){(function(n,r){try{window.localStorage.setItem(n,JSON.stringify(r))}catch(u){if(u instanceof DOMException&&u.name==="QuotaExceededError")try{uf(),window.localStorage.setItem(n,JSON.stringify(r))}catch{}}})(e,t)},getItem:function(){var t=window.localStorage.getItem(e);if(t===null)return[];try{var n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return window.localStorage.removeItem(e),[]}}}}var kh=["_highlightResult","_snippetResult"];function hc(e){var t=e.key,n=e.limit,r=n===void 0?5:n,u=af(t),a=u.getItem().slice(0,r);return{add:function(i){var o=i;o._highlightResult,o._snippetResult;var s=ut(o,kh),c=a.findIndex(function(d){return d.objectID===s.objectID});c>-1&&a.splice(c,1),a.unshift(s),a=a.slice(0,r),u.setItem(a)},remove:function(i){a=a.filter(function(o){return o.objectID!==i.objectID}),u.setItem(a)},getAll:function(){return a}}}var of,sf="vercel.ai.error",Ch=Symbol.for(sf),Ah=(function(){function e(t){var n,r=t.name,u=t.message,a=t.cause;return Pt(this,e),(n=qn(this,e,[u]))[of]=!0,n.name=r,n.cause=a,n}return Un(e,oi(Error)),jt(e,null,[{key:"isInstance",value:function(t){return e.hasMarker(t,sf)}},{key:"hasMarker",value:function(t,n){var r=Symbol.for(n);return t!=null&&re(t)=="object"&&r in t&&typeof t[r]=="boolean"&&t[r]===!0}}])})();of=Ch;var Fn=Ah;function cf(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var lf,ff="AI_InvalidArgumentError",df="vercel.ai.error.".concat(ff),wh=Symbol.for(df),Sh=(function(){function e(t){var n,r=t.message,u=t.cause,a=t.argument;return Pt(this,e),(n=qn(this,e,[{name:ff,message:r,cause:u}]))[lf]=!0,n.argument=a,n}return Un(e,Fn),jt(e,null,[{key:"isInstance",value:function(t){return Fn.hasMarker(t,df)}}])})();lf=wh;var pf,hf="AI_JSONParseError",vf="vercel.ai.error.".concat(hf),xh=Symbol.for(vf),vc=(function(){function e(t){var n,r=t.text,u=t.cause;return Pt(this,e),(n=qn(this,e,[{name:hf,message:"JSON parsing failed: Text: ".concat(r,`. 83Error message: `).concat(cf(u)),cause:u}]))[pf]=!0,n.text=r,n}return Un(e,Fn),jt(e,null,[{key:"isInstance",value:function(t){return Fn.hasMarker(t,vf)}}])})();pf=xh;var mf,Df="AI_TypeValidationError",gf="vercel.ai.error.".concat(Df),Oh=Symbol.for(gf);mf=Oh;var ca=(function(){function e(t){var n,r=t.value,u=t.cause;return Pt(this,e),(n=qn(this,e,[{name:Df,message:"Type validation failed: Value: ".concat(JSON.stringify(r),`. 84Error message: `).concat(cf(u)),cause:u}]))[mf]=!0,n.value=r,n}return Un(e,Fn),jt(e,null,[{key:"isInstance",value:function(t){return Fn.hasMarker(t,gf)}},{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})}}])})(),mc=(function(){function e(t,n){var r;return se(this,e),(r=De(this,e,[t])).name="ParseError",r.type=n.type,r.field=n.field,r.value=n.value,r.line=n.line,r}return ve(e,yn(Error)),ce(e)})();function Xa(e){}var Bh=(function(){function e(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=n.onError,u=n.onRetry,a=n.onComment;return se(this,e),De(this,e,[{start:function(i){t=(function(o){if
84(typeof o=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");var s,c=o.onEvent,d=c===void 0?Xa:c,f=o.onError,l=f===void 0?Xa:f,h=o.onRetry,m=h===void 0?Xa:h,D=o.onComment,y="",E=!0,g="",b="";function F(k){if(k==="")return g.length>0&&d({id:s,event:b||void 0,data:g.endsWith(` 85`)?g.slice(0,-1):g}),s=void 0,g="",void(b="");if(k.startsWith(":"))D&&D(k.slice(k.startsWith(": ")?2:1));else{var C=k.indexOf(":");if(C===-1)_(k,"",k);else{var A=k.slice(0,C),N=k[C+1]===" "?2:1;_(A,k.slice(C+N),k)}}}function _(k,C,A){switch(k){case"event":b=C;break;case"data":g="".concat(g).concat(C,` 86`);break;case"id":s=C.includes("\0")?void 0:C;break;case"retry":/^\d+$/.test(C)?m(parseInt(C,10)):l(new mc('Invalid `retry` value: "'.concat(C,'"'),{type:"invalid-retry",value:C,line:A}));break;default:l(new mc('Unknown field "'.concat(k.length>20?"".concat(k.slice(0,20),"â¦"):k,'"'),{type:"unknown-field",field:k,value:C,line:A}))}}return{feed:function(k){var C,A=E?k.replace(/^\xEF\xBB\xBF/,""):k,N=(function(B){for(var L=[],S="",w=0;w<B.length;){var x=B.indexOf("\r",w),j=B.indexOf(` 87`,w),R=-1;if(x!==-1&&j!==-1?R=Math.min(x,j):x!==-1?R=x===B.length-1?-1:x:j!==-1&&(R=j),R===-1){S=B.slice(w);break}var T=B.slice(w,R);L.push(T),B[(w=R+1)-1]==="\r"&&B[w]===` 88`&&w++}return[L,S]})("".concat(y).concat(A)),P=xe(N,2),I=P[0],O=P[1],Z=K(I);try{for(Z.s();!(C=Z.n()).done;)F(C.value)}catch(B){Z.e(B)}finally{Z.f()}y=O,E=!1},reset:function(){y&&(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).consume&&F(y),E=!0,s=void 0,g="",b="",y=""}}})({onEvent:function(o){i.enqueue(o)},onError:function(o){r==="terminate"?i.error(o):typeof r=="function"&&r(o)},onRetry:u,onComment:a})},transform:function(i){t.feed(i)}}])}return ve(e,yn(TransformStream)),ce(e)})();function z(e,t,n){var r;function u(o,s){var c,d,f;for(var l in Object.defineProperty(o,"_zod",{value:(c=o._zod)!==null&&c!==void 0?c:{},enumerable:!1}),(d=(f=o._zod).traits)!==null&&d!==void 0||(f.traits=new Set),o._zod.traits.add(e),t(o,s),i.prototype)l in o||Object.defineProperty(o,l,{value:i.prototype[l].bind(o)});o._zod.constr=i,o._zod.def=s}var a=(function(o){function s(){return se(this,s),De(this,s,arguments)}return ve(s,o),ce(s)})((r=n?.Parent)!==null&&r!==void 0?r:Object);function i(o){var s,c,d=n!=null&&n.Parent?new a:this;u(d,o),(s=(c=d._zod).deferred)!==null&&s!==void 0||(c.deferred=[]);var f,l=K(d._zod.deferred);try{for(l.s();!(f=l.n()).done;)(0,f.value)()}catch(h){l.e(h)}finally{l.f()}return d}return Object.defineProperty(a,"name",{value:e}),Object.defineProperty(i,"init",{value:u}),Object.defineProperty(i,Symbol.hasInstance,{value:function(o){var s;return!!(n!=null&&n.Parent&&o instanceof n.Parent)||(o==null||(s=o._zod)===null||s===void 0||(s=s.traits)===null||s===void 0?void 0:s.has(e))}}),Object.defineProperty(i,"name",{value:e}),i}var cr=(function(){function e(){return se(this,e),De(this,e,["Encountered Promise during synchronous parse. Use .parseAsync() instead."])}return ve(e,yn(Error)),ce(e)})(),yf=(function(){function e(t){var n;return se(this,e),(n=De(this,e,["Encountered unidirectional transform during encode: ".concat(t)])).name="ZodEncodeError",n}return ve(e,yn(Error)),ce(e)})(),Ff={};function En(e){return Ff}function Ef(e){var t=Object.values(e).filter(function(r){return typeof r=="number"}),n=Object.entries(e).filter(function(r){var u=xe(r,2),a=u[0];return u[1],t.indexOf(+a)===-1}).map(function(r){var u=xe(r,2);return u[0],u[1]});return n}function ki(e,t){return typeof t=="bigint"?t.toString():t}function Oa(e){return{get value(){var t=e();return Object.defineProperty(this,"value",{value:t}),t}}}function Fr(e){return e==null}function wo(e){var t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}var Dc=Symbol("evaluating");function Ie(e,t,n){var r=void 0;Object.defineProperty(e,t,{get:function(){if(r!==Dc)return r===void 0&&(r=Dc,r=n()),r},set:function(u){Object.defineProperty(e,t,{value:u})},configurable:!0})}function Tn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function jn(){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 gc(e){return JSON.stringify(e)}var bf="captureStackTrace"in Error?Error.captureStackTrace:function(){};function yu(e){return Qe(e)==="object"&&e!==null&&!Array.isArray(e)}var Ih=Oa(function(){var e;if(typeof navigator<"u"&&(e=navigator)!==null&&e!==void 0&&(e=e.userAgent)!==null&&e!==void 0&&e.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function vr(e){if(yu(e)===!1)return!1;var t=e.constructor;if(t===void 0)return!0;var n=t.prototype;return yu(n)!==!1&&Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")!==!1}function yc(e){return vr(e)?v({},e):Array.isArray(e)?G(e):e}var Th=new Set(["string","number","symbol"]);function mr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}
88function ln(e,t,n){var r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function ue(e){var t=e;if(!t)return{};if(typeof t=="string")return{error:function(){return t}};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?v(v({},t),{},{error:function(){return t.error}}):t}var Ph={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 sr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(e.aborted===!0)return!0;for(var n=t;n<e.issues.length;n++){var r;if(((r=e.issues[n])===null||r===void 0?void 0:r.continue)!==!0)return!0}return!1}function Zn(e,t){return t.map(function(n){var r,u;return(r=(u=n).path)!==null&&r!==void 0||(u.path=[]),n.path.unshift(e),n})}function $u(e){return typeof e=="string"?e:e?.message}function bn(e,t,n){var r,u=v(v({},e),{},{path:(r=e.path)!==null&&r!==void 0?r:[]});if(!e.message){var a,i,o,s,c,d,f,l,h,m=(a=(i=(o=(s=$u((c=e.inst)===null||c===void 0||(c=c._zod.def)===null||c===void 0||(d=c.error)===null||d===void 0?void 0:d.call(c,e)))!==null&&s!==void 0?s:$u(t==null||(f=t.error)===null||f===void 0?void 0:f.call(t,e)))!==null&&o!==void 0?o:$u((l=n.customError)===null||l===void 0?void 0:l.call(n,e)))!==null&&i!==void 0?i:$u((h=n.localeError)===null||h===void 0?void 0:h.call(n,e)))!==null&&a!==void 0?a:"Invalid input";u.message=m}return delete u.inst,delete u.continue,t!=null&&t.reportInput||delete u.input,u}function So(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function xo(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Fu(){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 typeof r=="string"?{message:r,code:"custom",input:u,inst:a}:v({},r)}var _f=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,ki,2),Object.defineProperty(e,"toString",{value:function(){return e.message},enumerable:!1})},kf=z("$ZodError",_f),Cf=z("$ZodError",_f,{Parent:Error}),Oo=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 cr;if(i.issues.length){var o,s=new((o=u?.Err)!==null&&o!==void 0?o:e)(i.issues.map(function(c){return bn(c,a,En())}));throw bf(s,u?.callee),s}return i.value}},Bo=function(e){return(function(){var t=be(X().m(function n(r,u,a,i){var o,s,c,d;return X().w(function(f){for(;;)switch(f.n){case 0:if(o=a?Object.assign(a,{async:!0}):{async:!0},!((s=r._zod.run({value:u,issues:[]},o))instanceof Promise)){f.n=2;break}return f.n=1,s;case 1:s=f.v;case 2:if(!s.issues.length){f.n=3;break}throw d=new((c=i?.Err)!==null&&c!==void 0?c:e)(s.issues.map(function(l){return bn(l,o,En())})),bf(d,i?.callee),d;case 3:return f.a(2,s.value)}},n)}));return function(n,r,u,a){return t.apply(this,arguments)}})()},Ba=function(e){return function(t,n,r){var u=r?v(v({},r),{},{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},u);if(a instanceof Promise)throw new cr;return a.issues.length?{success:!1,error:new(e??kf)(a.issues.map(function(i){return bn(i,u,En())}))}:{success:!0,data:a.value}}},jh=Ba(Cf),Ia=function(e){return(function(){var t=be(X().m(function n(r,u,a){var i,o;return X().w(function(s){for(;;)switch(s.n){case 0:if(i=a?Object.assign(a,{async:!0}):{async:!0},!((o=r._zod.run({value:u,issues:[]},i))instanceof Promise)){s.n=2;break}return s.n=1,o;case 1:o=s.v;case 2:return s.a(2,o.issues.length?{success:!1,error:new e(o.issues.map(function(c){return bn(c,i,En())}))}:{success:!0,data:o.value})}},n)}));return function(n,r,u){return t.apply(this,arguments)}})()},Nh=Ia(Cf),zh=/^[cC][^\s-]{8,}$/,Rh=/^[0-9a-z]+$/,Mh=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Zh=/^[0-9a-vA-V]{20}$/,Lh=/^[A-Za-z0-9]{27}$/,$h=/^[a-zA-Z0-9_-]{21}$/,qh=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Uh=/^([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})$/,Fc=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)$/},Hh=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Vh=/^(?:(?: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])$/,Wh=/^(([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}|:))$/,Jh=/^((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])$/,Kh=/^(([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])$/,Qh=/^$|^(?:[0-9a-zA-Z+/]{4}
88)*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ec=/^[A-Za-z0-9_-]*$/,Gh=/^(?=.{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])?)*\.?$/,Yh=/^\+(?:[0-9]){6,14}[0-9]$/,Af="(?:(?:\\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])))",Xh=new RegExp("^".concat(Af,"$"));function wf(e){var t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?"".concat(t):e.precision===0?"".concat(t,":[0-5]\\d"):"".concat(t,":[0-5]\\d\\.\\d{").concat(e.precision,"}"):"".concat(t,"(?::[0-5]\\d(?:\\.\\d+)?)?")}var ev=/^-?\d+$/,tv=/^-?\d+(?:\.\d+)?/,nv=/^(?:true|false)$/i,rv=/^null$/i,uv=/^[^A-Z]*$/,av=/^[^a-z]*$/,tt=z("$ZodCheck",function(e,t){var n,r,u;(n=e._zod)!==null&&n!==void 0||(e._zod={}),e._zod.def=t,(r=(u=e._zod).onattach)!==null&&r!==void 0||(u.onattach=[])}),Sf={number:"number",bigint:"bigint",object:"date"},xf=z("$ZodCheckLessThan",function(e,t){tt.init(e,t);var n=Sf[Qe(t.value)];e._zod.onattach.push(function(r){var u,a=r._zod.bag,i=(u=t.inclusive?a.maximum:a.exclusiveMaximum)!==null&&u!==void 0?u:Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?a.maximum=t.value:a.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})}}),Of=z("$ZodCheckGreaterThan",function(e,t){tt.init(e,t);var n=Sf[Qe(t.value)];e._zod.onattach.push(function(r){var u,a=r._zod.bag,i=(u=t.inclusive?a.minimum:a.exclusiveMinimum)!==null&&u!==void 0?u:Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?a.minimum=t.value:a.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})}}),iv=z("$ZodCheckMultipleOf",function(e,t){tt.init(e,t),e._zod.onattach.push(function(n){var r,u;(r=(u=n._zod.bag).multipleOf)!==null&&r!==void 0||(u.multipleOf=t.value)}),e._zod.check=function(n){if(Qe(n.value)!==Qe(t.value))throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):(function(r,u){var a=(r.toString().split(".")[1]||"").length,i=u.toString(),o=(i.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(i)){var s=i.match(/\d?e-(\d?)/);s!=null&&s[1]&&(o=Number.parseInt(s[1]))}var c=a>o?a:o;return Number.parseInt(r.toFixed(c).replace(".",""))%Number.parseInt(u.toFixed(c).replace(".",""))/Math.pow(10,c)})(n.value,t.value)===0)||n.issues.push({origin:Qe(n.value),code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ov=z("$ZodCheckNumberFormat",function(e,t){var n;tt.init(e,t),t.format=t.format||"float64";var r=(n=t.format)===null||n===void 0?void 0:n.includes("int"),u=r?"int":"number",a=xe(Ph[t.format],2),i=a[0],o=a[1];e._zod.onattach.push(function(s){var c=s._zod.bag;c.format=t.format,c.minimum=i,c.maximum=o,r&&(c.pattern=ev)}),e._zod.check=function(s){var c=s.value;if(r){if(!Number.isInteger(c))return void s.issues.push({expected:u,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});if(!Number.isSafeInteger(c))return void(c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:u,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:u,continue:!t.abort}))}c<i&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),c>o&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inst:e})}}),sv=z("$ZodCheckMaxSize",function(e,t){var n,r;tt.init(e,t),(n=(r=e._zod.def).when)!==null&&n!==void 0||(r.when=function(u){var a=u.value;return!Fr(a)&&a.size!==void 0}),e._zod.onattach.push(function(u){var a,i=(a=u._zod.bag.maximum)!==null&&a!==void 0?a:Number.POSITIVE_INFINITY;t.maximum<i&&(u._zod.bag.maximum=t.maximum)}),e._zod.check=function(u){var a=u.value;
88a.size<=t.maximum||u.issues.push({origin:So(a),code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),cv=z("$ZodCheckMinSize",function(e,t){var n,r;tt.init(e,t),(n=(r=e._zod.def).when)!==null&&n!==void 0||(r.when=function(u){var a=u.value;return!Fr(a)&&a.size!==void 0}),e._zod.onattach.push(function(u){var a,i=(a=u._zod.bag.minimum)!==null&&a!==void 0?a:Number.NEGATIVE_INFINITY;t.minimum>i&&(u._zod.bag.minimum=t.minimum)}),e._zod.check=function(u){var a=u.value;a.size>=t.minimum||u.issues.push({origin:So(a),code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),lv=z("$ZodCheckSizeEquals",function(e,t){var n,r;tt.init(e,t),(n=(r=e._zod.def).when)!==null&&n!==void 0||(r.when=function(u){var a=u.value;return!Fr(a)&&a.size!==void 0}),e._zod.onattach.push(function(u){var a=u._zod.bag;a.minimum=t.size,a.maximum=t.size,a.size=t.size}),e._zod.check=function(u){var a=u.value,i=a.size;if(i!==t.size){var o=i>t.size;u.issues.push(v(v({origin:So(a)},o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size}),{},{inclusive:!0,exact:!0,input:u.value,inst:e,continue:!t.abort}))}}}),fv=z("$ZodCheckMaxLength",function(e,t){var n,r;tt.init(e,t),(n=(r=e._zod.def).when)!==null&&n!==void 0||(r.when=function(u){var a=u.value;return!Fr(a)&&a.length!==void 0}),e._zod.onattach.push(function(u){var a,i=(a=u._zod.bag.maximum)!==null&&a!==void 0?a:Number.POSITIVE_INFINITY;t.maximum<i&&(u._zod.bag.maximum=t.maximum)}),e._zod.check=function(u){var a=u.value;if(!(a.length<=t.maximum)){var i=xo(a);u.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}}),dv=z("$ZodCheckMinLength",function(e,t){var n,r;tt.init(e,t),(n=(r=e._zod.def).when)!==null&&n!==void 0||(r.when=function(u){var a=u.value;return!Fr(a)&&a.length!==void 0}),e._zod.onattach.push(function(u){var a,i=(a=u._zod.bag.minimum)!==null&&a!==void 0?a:Number.NEGATIVE_INFINITY;t.minimum>i&&(u._zod.bag.minimum=t.minimum)}),e._zod.check=function(u){var a=u.value;if(!(a.length>=t.minimum)){var i=xo(a);u.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}}),pv=z("$ZodCheckLengthEquals",function(e,t){var n,r;tt.init(e,t),(n=(r=e._zod.def).when)!==null&&n!==void 0||(r.when=function(u){var a=u.value;return!Fr(a)&&a.length!==void 0}),e._zod.onattach.push(function(u){var a=u._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=function(u){var a=u.value,i=a.length;if(i!==t.length){var o=xo(a),s=i>t.length;u.issues.push(v(v({origin:o},s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length}),{},{inclusive:!0,exact:!0,input:u.value,inst:e,continue:!t.abort}))}}}),Ta=z("$ZodCheckStringFormat",function(e,t){var n,r,u,a;tt.init(e,t),e._zod.onattach.push(function(i){var o,s=i._zod.bag;s.format=t.format,t.pattern&&((o=s.patterns)!==null&&o!==void 0||(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=(u=e._zod).check)!==null&&n!==void 0||(u.check=function(i){t.pattern.lastIndex=0,t.pattern.test(i.value)||i.issues.push(v(v({origin:"string",code:"invalid_format",format:t.format,input:i.value},t.pattern?{pattern:t.pattern.toString()}:{}),{},{inst:e,continue:!t.abort}))}):(r=(a=e._zod).check)!==null&&r!==void 0||(a.check=function(){})}),hv=z("$ZodCheckRegex",function(e,t){Ta.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})}}),vv=z("$ZodCheckLowerCase",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=uv),Ta.init(e,t)}),mv=z("$ZodCheckUpperCase",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=av),Ta.init(e,t)}),Dv=z("$ZodCheckIncludes",function(e,t){tt.init(e,t);var n=mr(t.includes),r=new RegExp(typeof t.position=="number"?"^.{".concat(t.position,"}").concat(n):n);t.pattern=r,e._zod.onattach.push(function(u){var a,i=u._zod.bag;(a=i.patterns)!==null&&a!==void 0||(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=function(u){u.value.includes(t.includes,t.position)||u.
88issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:u.value,inst:e,continue:!t.abort})}}),gv=z("$ZodCheckStartsWith",function(e,t){var n;tt.init(e,t);var r=new RegExp("^".concat(mr(t.prefix),".*"));(n=t.pattern)!==null&&n!==void 0||(t.pattern=r),e._zod.onattach.push(function(u){var a,i=u._zod.bag;(a=i.patterns)!==null&&a!==void 0||(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=function(u){u.value.startsWith(t.prefix)||u.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:u.value,inst:e,continue:!t.abort})}}),yv=z("$ZodCheckEndsWith",function(e,t){var n;tt.init(e,t);var r=new RegExp(".*".concat(mr(t.suffix),"$"));(n=t.pattern)!==null&&n!==void 0||(t.pattern=r),e._zod.onattach.push(function(u){var a,i=u._zod.bag;(a=i.patterns)!==null&&a!==void 0||(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=function(u){u.value.endsWith(t.suffix)||u.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:u.value,inst:e,continue:!t.abort})}});function bc(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,G(Zn(n,e.issues)))}var Fv=z("$ZodCheckProperty",function(e,t){tt.init(e,t),e._zod.check=function(n){var r=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(function(u){return bc(u,n,t.property)});bc(r,n,t.property)}}),Ev=z("$ZodCheckMimeType",function(e,t){tt.init(e,t);var n=new Set(t.mime);e._zod.onattach.push(function(r){r._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})}}),bv=z("$ZodCheckOverwrite",function(e,t){tt.init(e,t),e._zod.check=function(n){n.value=t.tx(n.value)}}),_v=ce(function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];se(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(typeof e=="function")return e(this,{execution:"sync"}),void e(this,{execution:"async"});var n,r=e.split(` 89`).filter(function(s){return s}),u=Math.min.apply(Math,G(r.map(function(s){return s.length-s.trimStart().length}))),a=r.map(function(s){return s.slice(u)}).map(function(s){return" ".repeat(2*t.indent)+s}),i=K(a);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.content.push(o)}}catch(s){i.e(s)}finally{i.f()}}},{key:"compile",value:function(){var e,t=Function,n=this==null?void 0:this.args,r=G(((e=this==null?void 0:this.content)!==null&&e!==void 0?e:[""]).map(function(u){return" ".concat(u)}));return zl(t,G(n).concat([r.join(` 90`)]))}}]),kv={major:4,minor:1,patch:12},qe=z("$ZodType",function(e,t){var n,r;e!=null||(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=kv;var u=G((n=e._zod.def.checks)!==null&&n!==void 0?n:[]);e._zod.traits.has("$ZodCheck")&&u.unshift(e);var a,i=K(u);try{for(i.s();!(a=i.n()).done;){var o,s=K(a.value._zod.onattach);try{for(s.s();!(o=s.n()).done;)(0,o.value)(e)}catch(h){s.e(h)}finally{s.f()}}}catch(h){i.e(h)}finally{i.f()}if(u.length===0){var c,d;(c=(r=e._zod).deferred)!==null&&c!==void 0||(r.deferred=[]),(d=e._zod.deferred)===null||d===void 0||d.push(function(){e._zod.run=e._zod.parse})}else{var f=function(h,m,D){var y,E,g=sr(h),b=K(m);try{var F=function(){var _=E.value;if(_._zod.def.when){if(!_._zod.def.when(h))return 0}else if(g)return 0;var k=h.issues.length,C=_._zod.check(h);if(C instanceof Promise&&D?.async===!1)throw new cr;if(y||C instanceof Promise)y=(y??Promise.resolve()).then(be(X().m(function A(){return X().w(function(N){for(;;)switch(N.n){case 0:return N.n=1,C;case 1:if(h.issues.length!==k){N.n=2;break}return N.a(2);case 2:g||(g=sr(h,k));case 3:return N.a(2)}},A)})));else{if(h.issues.length===k)return 0;g||(g=sr(h,k))}};for(b.s();!(E=b.n()).done;)F()}catch(_){b.e(_)}finally{b.f()}return y?y.then(function(){return h}):h},l=function(h,m,D){if(sr(h))return h.aborted=!0,h;var y=f(m,u,D);if(y instanceof Promise){if(D.async===!1)throw new cr;return y.then(function(E){return e._zod.parse(E,D)})}return e._zod.parse(y,D)};e._zod.run=function(h,m){if(m.skipChecks)return e._zod.parse(h,m);if(m.direction==="backward"){var D=e._zod.parse({value:h.value,issues:[]},v(v({},m),{},{skipChecks:!0}));return D instanceof Promise?D.then(function(E){return l(E,h,m)}):l(D,h,m)}var y=e._zod.parse(h,m);if(y instanceof Promise){if(m.async===!1)throw new cr;return y.then(function(E){return f(E,u,m)})}return f(y,u,m)}}e["~standard"]={validate:function(h){try{var m,D=jh(e,h);return D.success?{value:D.data}:{issues:(m=D.error)===null||m===void 0?void 0:m.issues}}catch{return Nh(e,h).then(function(E){var g;return E.success?{value:E.data}:{issues:(g=E.error)===null||g===void 0?void 0:g.issues}})}},vendor:"zod",version:1}}),Io=z("$ZodString",function(e,t){var n,r,u;qe.init(e,t),e._zod.pattern=(n=G((r=e==null||(u=e._zod.bag)===null||u===void 0?void 0:u.patterns)!==null&&r!==void 0?r:[]).pop())!==null&&n!==void 0?n:(function(a){var i,o,s=a?"[\\s\\S]{".concat((i=a?.minimum)!==null&&i!==void 0?i:0,",").concat((o=a?.maximum)!==null&&o!==void 0?o:"","}"):"[\\s\\S]*";return new RegExp("^".concat(s,"$"))})(e._zod.bag),e._zod.parse=function(a,i){if(t.coerce)try{a.value=String(a.value)}catch{}return typeof a.value=="string"||a.issues.push({expected:"string",code:"invalid_type",input:a.value,inst:e}),a}}),He=z("$ZodStringFormat",function(e,t){Ta.init(e,t),Io.init(e,t)}),Cv=z("$ZodGUID",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Uh),He.init(e,t)}),Av=z("$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(u===void 0)throw new Error('Invalid UUID version: "'.concat(t.version,'"'));(r=t.pattern)!==null&&r!==void 0||(t.pattern=Fc(u))}else(n=t.pattern)!==null&&n!==void 0||(t.pattern=Fc());He.init(e,t)}),wv=z("$ZodEmail",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Hh),He.init(e,t)}),Sv=z("$ZodURL",function(e,t){He.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",n
90ote:"Invalid hostname",pattern:Gh.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{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),xv=z("$ZodEmoji",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),He.init(e,t)}),Ov=z("$ZodNanoID",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=$h),He.init(e,t)}),Bv=z("$ZodCUID",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=zh),He.init(e,t)}),Iv=z("$ZodCUID2",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Rh),He.init(e,t)}),Tv=z("$ZodULID",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Mh),He.init(e,t)}),Pv=z("$ZodXID",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Zh),He.init(e,t)}),jv=z("$ZodKSUID",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Lh),He.init(e,t)}),Nv=z("$ZodISODateTime",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=(function(r){var u=wf({precision:r.precision}),a=["Z"];r.local&&a.push(""),r.offset&&a.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");var i="".concat(u,"(?:").concat(a.join("|"),")");return new RegExp("^".concat(Af,"T(?:").concat(i,")$"))})(t)),He.init(e,t)}),zv=z("$ZodISODate",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Xh),He.init(e,t)}),Rv=z("$ZodISOTime",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=new RegExp("^".concat(wf(t),"$"))),He.init(e,t)}),Mv=z("$ZodISODuration",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=qh),He.init(e,t)}),Zv=z("$ZodIPv4",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Vh),He.init(e,t),e._zod.onattach.push(function(r){r._zod.bag.format="ipv4"})}),Lv=z("$ZodIPv6",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Wh),He.init(e,t),e._zod.onattach.push(function(r){r._zod.bag.format="ipv6"}),e._zod.check=function(r){try{new URL("http://[".concat(r.value,"]"))}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),$v=z("$ZodCIDRv4",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Jh),He.init(e,t)}),qv=z("$ZodCIDRv6",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Kh),He.init(e,t),e._zod.check=function(r){var u=r.value.split("/");try{if(u.length!==2)throw new Error;var a=xe(u,2),i=a[0],o=a[1];if(!o)throw new Error;var s=Number(o);if("".concat(s)!==o)throw new Error;if(s<0||s>128)throw new Error;new URL("http://[".concat(i,"]"))}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Bf(e){if(e==="")return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Uv=z("$ZodBase64",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Qh),He.init(e,t),e._zod.onattach.push(function(r){r._zod.bag.contentEncoding="base64"}),e._zod.check=function(r){Bf(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),Hv=z("$ZodBase64URL",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Ec),He.init(e,t),e._zod.onattach.push(function(r){r._zod.bag.contentEncoding="base64url"}),e._zod.check=function(r){(function(u){if(!Ec.test(u))return!1;var a=u.replace(/[-_]/g,function(i){return i==="-"?"+":"/"});return Bf(a.padEnd(4*Math.ceil(a.length/4),"="))})(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Vv=z("$ZodE164",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Yh),He.init(e,t)}),Wv=z("$ZodJWT",function(e,t){He.init(e,t),e._zod.check=function(n){(function(r){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;try{var a=r.split(".");if(a.length!==3)return!1;var i=xe(a,1)[0];if(!i)return!1;var o=JSON.parse(atob(i));
90return!("typ"in o&&o?.typ!=="JWT"||!o.alg||u&&(!("alg"in o)||o.alg!==u))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),If=z("$ZodNumber",function(e,t){var n;qe.init(e,t),e._zod.pattern=(n=e._zod.bag.pattern)!==null&&n!==void 0?n:tv,e._zod.parse=function(r,u){if(t.coerce)try{r.value=Number(r.value)}catch{}var a=r.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return r;var i=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return r.issues.push(v({expected:"number",code:"invalid_type",input:a,inst:e},i?{received:i}:{})),r}}),Jv=z("$ZodNumber",function(e,t){ov.init(e,t),If.init(e,t)}),Kv=z("$ZodBoolean",function(e,t){qe.init(e,t),e._zod.pattern=nv,e._zod.parse=function(n,r){if(t.coerce)try{n.value=!!n.value}catch{}var u=n.value;return typeof u=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),n}}),Qv=z("$ZodNull",function(e,t){qe.init(e,t),e._zod.pattern=rv,e._zod.values=new Set([null]),e._zod.parse=function(n,r){var u=n.value;return u===null||n.issues.push({expected:"null",code:"invalid_type",input:u,inst:e}),n}}),Gv=z("$ZodUnknown",function(e,t){qe.init(e,t),e._zod.parse=function(n){return n}}),Yv=z("$ZodNever",function(e,t){qe.init(e,t),e._zod.parse=function(n,r){return n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n}});function _c(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,G(Zn(n,e.issues))),t.value[n]=e.value}var Xv=z("$ZodArray",function(e,t){qe.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(s){var c=u[s],d=t.element._zod.run({value:c,issues:[]},r);d instanceof Promise?a.push(d.then(function(f){return _c(f,n,s)})):_c(d,n,s)},o=0;o<u.length;o++)i(o);return a.length?Promise.all(a).then(function(){return n}):n}});function la(e,t,n,r){var u;e.issues.length&&(u=t.issues).push.apply(u,G(Zn(n,e.issues))),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Tf(e){for(var t=Object.keys(e.shape),n=0,r=t;n<r.length;n++){var u,a=r[n];if((u=e.shape)===null||u===void 0||(u=u[a])===null||u===void 0||(u=u._zod)===null||u===void 0||(u=u.traits)===null||u===void 0||!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(s){return i[s]._zod.optin==="optional"&&i[s]._zod.optout==="optional"}));return v(v({},e),{},{keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)})}function Pf(e,t,n,r,u,a){for(var i=[],o=u.keySet,s=u.catchall._zod,c=s.def.type,d=function(){var h=l[f];if(o.has(h))return 0;if(c==="never")return i.push(h),0;var m=s.run({value:t[h],issues:[]},r);m instanceof Promise?e.push(m.then(function(D){return la(D,n,h,t)})):la(m,n,h,t)},f=0,l=Object.keys(t);f<l.length;f++)d();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 em=z("$ZodObject",function(e,t){qe.init(e,t);var n=Object.getOwnPropertyDescriptor(t,"shape");if(n==null||!n.get){var r=t.shape;Object.defineProperty(t,"shape",{get:function(){var s=v({},r);return Object.defineProperty(t,"shape",{value:s}),s}})}var u=Oa(function(){return Tf(t)});Ie(e._zod,"propValues",function(){var s=t.shape,c={};for(var d in s){var f=s[d]._zod;if(f.values){var l;(l=c[d])!==null&&l!==void 0||(c[d]=new Set);var h,m=K(f.values);try{for(m.s();!(h=m.n()).done;){var D=h.value;c[d].add(D)}}catch(y){m.e(y)}finally{m.f()}}}return c});var a,i=yu,o=t.catchall;e._zod.parse=function(s,c){a!=null||(a=u.value);var d=s.value;if(!i(d))return s.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),s;s.value={};var f,l=[],h=a.shape,m=K(a.keys);try{var D=function(){var y=f.value,E=h[y]._zod.run({value:d[y],issues:[]},c);E instanceof Promise?l.push(E.then(function(g){return la(g,s,y,d)})):la(E,s,y,d)};for(m.s();!(f=m.n()).done;)D()}catch(y){m.e(y)}finally{m.f()}return o?Pf(l,d,s,c,u.value,e):l.length?Promise.all(l).then(function(){return s}):s}}
90),tm=z("$ZodObjectJIT",function(e,t){em.init(e,t);var n,r,u=e._zod.parse,a=Oa(function(){return Tf(t)}),i=yu,o=!Ff.jitless,s=o&&Ih.value,c=t.catchall;e._zod.parse=function(d,f){r!=null||(r=a.value);var l=d.value;return i(l)?o&&s&&f?.async===!1&&f.jitless!==!0?(n||(n=(function(h){var m=new _v(["shape","payload","ctx"]),D=a.value,y=function(I){var O=gc(I);return"shape[".concat(O,"]._zod.run({ value: input[").concat(O,"], issues: [] }, ctx)")};m.write("const input = payload.value;");var E,g=Object.create(null),b=0,F=K(D.keys);try{for(F.s();!(E=F.n()).done;)g[E.value]="key_".concat(b++)}catch(I){F.e(I)}finally{F.f()}m.write("const newResult = {};");var _,k=K(D.keys);try{for(k.s();!(_=k.n()).done;){var C=_.value,A=g[C],N=gc(C);m.write("const ".concat(A," = ").concat(y(C),";")),m.write(` 91 if (`.concat(A,`.issues.length) { 92 payload.issues = payload.issues.concat(`).concat(A,`.issues.map(iss => ({ 93 ...iss, 94 path: iss.path ? [`).concat(N,", ...iss.path] : [").concat(N,`] 95 }))); 96 } 97 98 99 if (`).concat(A,`.value === undefined) { 100 if (`).concat(N,` in input) { 101 newResult[`).concat(N,`] = undefined; 102 } 103 } else { 104 newResult[`).concat(N,"] = ").concat(A,`.value; 105 } 106 107 `))}}catch(I){k.e(I)}finally{k.f()}m.write("payload.value = newResult;"),m.write("return payload;");var P=m.compile();return function(I,O){return P(h,I,O)}})(t.shape)),d=n(d,f),c?Pf([],l,d,f,r,e):d):u(d,f):(d.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),d)}});function kc(e,t,n,r){var u,a=K(e);try{for(a.s();!(u=a.n()).done;){var i=u.value;if(i.issues.length===0)return t.value=i.value,t}}catch(s){a.e(s)}finally{a.f()}var o=e.filter(function(s){return!sr(s)});return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(function(s){return s.issues.map(function(c){return bn(c,r,En())})})}),t)}var jf=z("$ZodUnion",function(e,t){qe.init(e,t),Ie(e._zod,"optin",function(){return t.options.some(function(u){return u._zod.optin==="optional"})?"optional":void 0}),Ie(e._zod,"optout",function(){return t.options.some(function(u){return u._zod.optout==="optional"})?"optional":void 0}),Ie(e._zod,"values",function(){if(t.options.every(function(u){return u._zod.values}))return new Set(t.options.flatMap(function(u){return Array.from(u._zod.values)}))}),Ie(e._zod,"pattern",function(){if(t.options.every(function(a){return a._zod.pattern})){var u=t.options.map(function(a){return a._zod.pattern});return new RegExp("^(".concat(u.map(function(a){return wo(a.source)}).join("|"),")$"))}});var n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=function(u,a){if(n)return r(u,a);var i,o=!1,s=[],c=K(t.options);try{for(c.s();!(i=c.n()).done;){var d=i.value._zod.run({value:u.value,issues:[]},a);if(d instanceof Promise)s.push(d),o=!0;else{if(d.issues.length===0)return d;s.push(d)}}}catch(f){c.e(f)}finally{c.f()}return o?Promise.all(s).then(function(f){return kc(f,u,e,a)}):kc(s,u,e,a)}}),nm=z("$ZodDiscriminatedUnion",function(e,t){jf.init(e,t);var n=e._zod.parse;Ie(e._zod,"propValues",function(){var u,a={},i=K(t.options);try{for(i.s();!(u=i.n()).done;){var o=u.value,s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error('Invalid discriminated union option at index "'.concat(t.options.indexOf(o),'"'));for(var c=0,d=Object.entries(s);c<d.length;c++){var f=xe(d[c],2),l=f[0],h=f[1];a[l]||(a[l]=new Set);var m,D=K(h);try{for(D.s();!(m=D.n()).done;){var y=m.value;a[l].add(y)}}catch(E){D.e(E)}finally{D.f()}}}}catch(E){i.e(E)}finally{i.f()}return a});var r=Oa(function(){var u,a=t.options,i=new Map,o=K(a);try{for(o.s();!(u=o.n()).done;){var s,c=u.value,d=(s=c._zod.propValues)===null||s===void 0?void 0:s[t.discriminator];if(!d||d.size===0)throw new Error('Invalid discriminated union option at index "'.concat(t.options.indexOf(c),'"'));var f,l=K(d);try{for(l.s();!(f=l.n()).done;){var h=f.value;if(i.has(h))throw new Error('Duplicate discriminator value "'.concat(String(h),'"'));i.set(h,c)}}catch(m){l.e(m)}finally{l.f()}}}catch(m){o.e(m)}finally{o.f()}return i});e._zod.parse=function(u,a){var i=u.value;if(!yu(i))return u.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),u;var o=r.value.get(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)}}),rm=z("$ZodIntersection",function(e,t){qe.init(e,t),e._zod.parse=function(n,r){var u=n.value,a=t.left._zod.run({value:u,issues:[]},r),i=t.right._zod.run({value:u,issues:[]},r);return a instanceof Promise||i instanceof Promise?Promise.all([a,i]).then(function(o){var s=xe(o,2),c=s[0],d=s[1];return Cc(n,c,d)}):Cc(n,a,i)}});function Ci(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(l){return r.indexOf(l)!==-1}),a=v(v({},e),t),i=K(u);try{for(i.s();!(n=i.n()).done;){var o=n.value,s=Ci(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o].concat(G(s.mergeErrorPath))};a[o]=s.data}}catch(l){i.e(l)}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=[],d=0;d<e.length;d++){var f=Ci(e[d],t[d]);if(!f.valid)return{valid:!1,mergeErrorPath:[d].concat(G(f.mergeErrorPath))};c.push(f.data)}return{valid:!0,data:c}}return{valid:!1,mergeErrorPath:[]}}function Cc(e,t,n){var r,u;if(t.issues.length&&(r=e.issues).push.apply(r,G(t.issues)),n.issues.length&&(u=e.issues).push.apply(u,G(n.issues)),sr(e))return e;var a=Ci(t.value,n.value);
107if(!a.valid)throw new Error("Unmergable intersection. Error path: "+"".concat(JSON.stringify(a.mergeErrorPath)));return e.value=a.data,e}var um=z("$ZodRecord",function(e,t){qe.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=K(i);try{var d=function(){var D=o.value;if(typeof D=="string"||typeof D=="number"||Qe(D)==="symbol"){var y,E=t.valueType._zod.run({value:u[D],issues:[]},r);E instanceof Promise?a.push(E.then(function(g){var b;g.issues.length&&(b=n.issues).push.apply(b,G(Zn(D,g.issues))),n.value[D]=g.value})):(E.issues.length&&(y=n.issues).push.apply(y,G(Zn(D,E.issues))),n.value[D]=E.value)}};for(c.s();!(o=c.n()).done;)d()}catch(D){c.e(D)}finally{c.f()}for(var f in u)i.has(f)||(s=s??[]).push(f);s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:s})}else{n.value={};var l,h=K(Reflect.ownKeys(u));try{var m=function(){var D=l.value;if(D==="__proto__")return 0;var y=t.keyType._zod.run({value:D,issues:[]},r);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(y.issues.length)return n.issues.push({code:"invalid_key",origin:"record",issues:y.issues.map(function(b){return bn(b,r,En())}),input:D,path:[D],inst:e}),n.value[y.value]=y.value,0;var E,g=t.valueType._zod.run({value:u[D],issues:[]},r);g instanceof Promise?a.push(g.then(function(b){var F;b.issues.length&&(F=n.issues).push.apply(F,G(Zn(D,b.issues))),n.value[y.value]=b.value})):(g.issues.length&&(E=n.issues).push.apply(E,G(Zn(D,g.issues))),n.value[y.value]=g.value)};for(h.s();!(l=h.n()).done;)m()}catch(D){h.e(D)}finally{h.f()}}return a.length?Promise.all(a).then(function(){return n}):n}}),am=z("$ZodEnum",function(e,t){qe.init(e,t);var n=Ef(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp("^(".concat(n.filter(function(u){return Th.has(Qe(u))}).map(function(u){return typeof u=="string"?mr(u):u.toString()}).join("|"),")$")),e._zod.parse=function(u,a){var i=u.value;return r.has(i)||u.issues.push({code:"invalid_value",values:n,input:i,inst:e}),u}}),im=z("$ZodLiteral",function(e,t){if(qe.init(e,t),t.values.length===0)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(n){return typeof n=="string"?mr(n):n?mr(n.toString()):String(n)}).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}}),om=z("$ZodTransform",function(e,t){qe.init(e,t),e._zod.parse=function(n,r){if(r.direction==="backward")throw new yf(e.constructor.name);var u=t.transform(n.value,n);if(r.async)return(u instanceof Promise?u:Promise.resolve(u)).then(function(a){return n.value=a,n});if(u instanceof Promise)throw new cr;return n.value=u,n}});function Ac(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var sm=z("$ZodOptional",function(e,t){qe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ie(e._zod,"values",function(){return t.innerType._zod.values?new Set([].concat(G(t.innerType._zod.values),[void 0])):void 0}),Ie(e._zod,"pattern",function(){var n=t.innerType._zod.pattern;return n?new RegExp("^(".concat(wo(n.source),")?$")):void 0}),e._zod.parse=function(n,r){if(t.innerType._zod.optin==="optional"){var u=t.innerType._zod.run(n,r);return u instanceof Promise?u.then(function(a){return Ac(a,n.value)}):Ac(u,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),cm=z("$ZodNullable",function(e,t){qe.init(e,t),Ie(e._zod,"optin",function(){return t.innerType._zod.optin}),Ie(e._zod,"optout",function(){return t.innerType._zod.optout}),Ie(e._zod,"pattern",function(){var n=t.innerType._zod.pattern;return n?new RegExp("^(".concat(wo(n.source),"|null)$")):void 0}),Ie(e._zod,"values",function(){return t.innerType._zod.values?new Set([].concat(G(t.innerType._zod.values),[null])):void 0}),e._zod.parse=function(n,r){return n.value===null?n:t.innerType._zod.run(n,r)}}),lm=z("$ZodDefault",function(e,t){qe.init(e,t),e._zod.optin="optional",Ie(e._zod,"values",function(){return t.innerType._zod.values}),e._zod.parse=function(n,r){if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;var u=t.innerType._zod.run(n,r);return u instanceof Promise?u.then(function(a){return wc(a,t)}):wc(u,t)}});function wc(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var fm=z("$ZodPrefault",function(e,t){qe.init(e,t),e._zod.optin="optional",Ie(e._zod,"values",function(){return t.innerType._zod.values}),e._zod.parse=function(n,r){return r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r)}}),dm=z("$ZodNonOptional",function(e,t){qe.init(e,t),Ie(e._zod,"values",function(){var n=t.innerType._zod.values;return n?new Set(G(n).filter(function(r){return r!==void 0})):void 0}),e._zod.parse=function(n,r){var u=t.innerType._zod.run(n,r);return u instanceof Promise?u.then(function(a){return Sc(a,e)}):Sc(u,e)}});function Sc(e,t){return e.issues.length||e.value!==void 0||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var pm=z("$ZodCatch",function(e,t){qe.init(e,t),Ie(e._zod,"optin",function(){return t.innerType._zod.optin}),Ie(e._zod,"optout",function(){return t.innerType._zod.optout}),Ie(e._zod,"values",function(){return t.innerType._zod.values}),e._zod.parse=function(n,r){if(r.direction==="backward")return t.innerType._zod.run(n,r);var u=t.innerType._zod.run(n,r);return u instanceof Promise?u.then(function(a){return n.value=a.value,a.issues.length&&(n.value=t.catchValue(v(v({},n),{},{error:{issues:a.issues.map(function(i){return bn(i,r,En())})},input:n.value})),n.issues=[]),n}):(n.value=u.value,u.issues.length&&(n.value=t.catchValue(v(v({},n),{},{error:{issues:u.issues.map(function(a){return bn(a,r,En())})},input:n.value})),n.issues=[]),n)}}),hm=z("$ZodPipe",function(e,t){qe.init(e,t),Ie(e._zod,"values",function(){return t.in._zod.values}),Ie(e._zod,"optin",function(){return t.in._zod.optin}),Ie(e._zod,"optout",function(){return t.out._zod.optout}),Ie(e._zod,"propValues",function(){return t.in._zod.propValues}),e._zod.parse=function(n,r){if(r.direction==="backward"){var u=t.out._zod.run(n,r);return u instanceof Promise?u.then(function(i){return qu(i,t.in,r)}):qu(u,t.in,r)}var a=t.in._zod.run(n,r);return a instanceof Promise?a.then(function(i){return qu(i,t.out,r)}):qu(a,t.out,r)}});function qu(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var vm=z("$ZodReadonly",function(e,t){qe.init(e,t),Ie(e._zod,"propValues",function(){return t.innerType._zod.propValues}),Ie(e._zod,"values",function(){return t.innerType._zod.values}),Ie(e._zod,"optin",function(){return t.innerType._zod.optin}),Ie(e._zod,"optout",function(){return t.innerType._zod.optout}),e._zod.parse=function(n,r){if(r.direction==="backward")return t.innerType._zod.run(n,r);var u=t.innerType._zod.run(n,r);return u instanceof Promise?u.then(xc):xc(u)}});function xc(e){return e.value=Object.freeze(e.value),e}var mm=z("$ZodLazy",function(e,t){qe.init(e,t),Ie(e._zod,"innerType",function(){return t.getter()}),Ie(e._zod,"pattern",function(){return e._zod.innerType._zod.pattern}),Ie(e._zod,"propValues",function(){return e._zod.innerType._zod.propValues}),Ie(e._zod,"optin",function(){var n;return(n=e._zod.innerType._zod.optin)!==null&&n!==void 0?n:void 0}),Ie(e._zod,"optout",function(){var n;return(n=e._zod.innerType._zod.optout)!==null&&n!==void 0?n:void 0}),e._zod.parse=function(n,r){return e._zod.innerType._zod.run(n,r)}}),Dm=z("$ZodCustom",function(e,t){tt.init(e,t),qe.init(e,t),e._zod.parse=function(n,r){return n},e._zod.check=function(n){var r=n.value,u=t.fn(r);if(u instanceof Promise)return u.then(function(a){return Oc(a,n,r,e)});Oc(u,n,r,e)}});function Oc(e,t,n,r){if(!e){var u,a={code:"custom",input:n,inst:r,path:G((u=r._zod.def.path)!==null&&u!==void 0?u:[]),continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(Fu(a))}}var Nf=ce(function e(){se(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&&Qe(t)==="object"&&"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&&Qe(t)==="object"&&"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=v({},(n=this.get(t))!==null&&n!==void 0?n:{});delete r.id;var u=v(v({},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)}}]),Rr=new Nf;function Bc(e,t){return new e(v({type:"string",format:"guid",check:"string_format",abort:!1},ue(t)))}function fa(e,t){return new xf(v(v({check:"less_than"},ue(t)),{},{value:e,inclusive:!1}))}function cu(e,t){return new xf(v(v({check:"less_than"},ue(t)),{},{value:e,inclusive:!0}))}function da(e,t){return new Of(v(v({check:"greater_than"},ue(t)),{},{value:e,inclusive:!1}))}function lu(e,t){return new Of(v(v({check:"greater_than"},ue(t)),{},{value:e,inclusive:!0}))}function Ai(e,t){return new iv(v(v({check:"multiple_of"},ue(t)),{},{value:e}))}function To(e,t){return new fv(v(v({check:"max_length"},ue(t)),{},{maximum:e}))}function Eu(e,t){return new dv(v(v({check:"min_length"},ue(t)),{},{minimum:e}))}function Po(e,t){return new pv(v(v({check:"length_equals"},ue(t)),{},{length:e}))}function zf(e,t){return new hv(v(v({check:"string_format",format:"regex"},ue(t)),{},{pattern:e}))}function Rf(e){return new vv(v({check:"string_format",format:"lowercase"},ue(e)))}function Mf(e){return new mv(v({check:"string_format",format:"up
107percase"},ue(e)))}function Zf(e,t){return new Dv(v(v({check:"string_format",format:"includes"},ue(t)),{},{includes:e}))}function Lf(e,t){return new gv(v(v({check:"string_format",format:"starts_with"},ue(t)),{},{prefix:e}))}function $f(e,t){return new yv(v(v({check:"string_format",format:"ends_with"},ue(t)),{},{suffix:e}))}function Er(e){return new bv({check:"overwrite",tx:e})}function qf(e){return Er(function(t){return t.normalize(e)})}function Uf(){return Er(function(e){return e.trim()})}function Hf(){return Er(function(e){return e.toLowerCase()})}function Vf(){return Er(function(e){return e.toUpperCase()})}var Ic=ce(function e(t){var n,r,u,a,i;se(this,e),this.counter=0,this.metadataRegistry=(n=t?.metadata)!==null&&n!==void 0?n:Rr,this.target=(r=t?.target)!==null&&r!==void 0?r:"draft-2020-12",this.unrepresentable=(u=t?.unrepresentable)!==null&&u!==void 0?u:"throw",this.override=(a=t?.override)!==null&&a!==void 0?a:function(){},this.io=(i=t?.io)!==null&&i!==void 0?i:"output",this.seen=new Map},[{key:"process",value:function(e){var t,n,r,u,a=this,i=arguments.length>1&&arguments[1]!==void 0?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 d=(t=(n=e._zod).toJSONSchema)===null||t===void 0?void 0:t.call(n);if(d)c.schema=d;else{var f=v(v({},i),{},{schemaPath:[].concat(G(i.schemaPath),[e]),path:i.path}),l=e._zod.parent;if(l)c.ref=l,this.process(l,f),this.seen.get(l).isParent=!0;else{var h=c.schema;switch(o.type){case"string":var m=h;m.type="string";var D,y=e._zod.bag,E=y.minimum,g=y.maximum,b=y.format,F=y.patterns,_=y.contentEncoding;if(typeof E=="number"&&(m.minLength=E),typeof g=="number"&&(m.maxLength=g),b&&(m.format=(D={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""}[b])!==null&&D!==void 0?D:b,m.format===""&&delete m.format),_&&(m.contentEncoding=_),F&&F.size>0){var k=G(F);k.length===1?m.pattern=k[0].source:k.length>1&&(c.schema.allOf=G(k.map(function(je){return v(v({},a.target==="draft-7"||a.target==="draft-4"||a.target==="openapi-3.0"?{type:"string"}:{}),{},{pattern:je.source})})))}break;case"number":var C=h,A=e._zod.bag,N=A.minimum,P=A.maximum,I=A.format,O=A.multipleOf,Z=A.exclusiveMaximum,B=A.exclusiveMinimum;typeof I=="string"&&I.includes("int")?C.type="integer":C.type="number",typeof B=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(C.minimum=B,C.exclusiveMinimum=!0):C.exclusiveMinimum=B),typeof N=="number"&&(C.minimum=N,typeof B=="number"&&this.target!=="draft-4"&&(B>=N?delete C.minimum:delete C.exclusiveMinimum)),typeof Z=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(C.maximum=Z,C.exclusiveMaximum=!0):C.exclusiveMaximum=Z),typeof P=="number"&&(C.maximum=P,typeof Z=="number"&&this.target!=="draft-4"&&(Z<=P?delete C.maximum:delete C.exclusiveMaximum)),typeof O=="number"&&(C.multipleOf=O);break;case"boolean":case"success":h.type="boolean";break;case"bigint":if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break;case"symbol":if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break;case"null":this.target==="openapi-3.0"?(h.type="string",h.nullable=!0,h.enum=[null]):h.type="null";break;case"any":case"unknown":break;case"undefined":if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break;case"void":if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break;case"never":h.not={};break;case"date":if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break;case"array":var L=h,S=e._zod.bag,w=S.minimum,x=S.maximum;typeof w=="number"&&(L.minItems=w),typeof x=="number"&&(L.maxItems=x),L.type="array",L.items=this.process(o.element,v(v({},f),{},{path:[].concat(G(f.path),["items"])}));break;case"object":var j,R=h;R.type="object",R.properties={};var T=o.shape;for(var M in T)R.properties[M]=this.process(T[M],v(v({},f),{},{path:[].concat(G(f.path),["properties",M])}));var V=new Set(Object.keys(T)),J=new Set(G(V).filter(function(je){var Jt=o.shape[je]._zod;return a.io==="input"?Jt.optin===void 0:Jt.optout===void 0}));J.size>0&&(R.required=Array.from(J)),((j=o.catchall)===null||j===void 0?void 0:j._zod.def.type)==="never"?R.additionalProperties=!1:o.catchall?o.cat
107chall&&(R.additionalProperties=this.process(o.catchall,v(v({},f),{},{path:[].concat(G(f.path),["additionalProperties"])}))):this.io==="output"&&(R.additionalProperties=!1);break;case"union":var ee=h,le=o.options.map(function(je,Jt){return a.process(je,v(v({},f),{},{path:[].concat(G(f.path),["anyOf",Jt])}))});ee.anyOf=le;break;case"intersection":var $=h,Q=this.process(o.left,v(v({},f),{},{path:[].concat(G(f.path),["allOf",0])})),ie=this.process(o.right,v(v({},f),{},{path:[].concat(G(f.path),["allOf",1])})),pe=function(je){return"allOf"in je&&Object.keys(je).length===1},Y=[].concat(G(pe(Q)?Q.allOf:[Q]),G(pe(ie)?ie.allOf:[ie]));$.allOf=Y;break;case"tuple":var oe=h;oe.type="array";var _e=this.target==="draft-2020-12"?"prefixItems":"items",ze=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",ke=o.items.map(function(je,Jt){return a.process(je,v(v({},f),{},{path:[].concat(G(f.path),[_e,Jt])}))}),Pe=o.rest?this.process(o.rest,v(v({},f),{},{path:[].concat(G(f.path),[ze],G(this.target==="openapi-3.0"?[o.items.length]:[]))})):null;this.target==="draft-2020-12"?(oe.prefixItems=ke,Pe&&(oe.items=Pe)):this.target==="openapi-3.0"?(oe.items={anyOf:ke},Pe&&oe.items.anyOf.push(Pe),oe.minItems=ke.length,Pe||(oe.maxItems=ke.length)):(oe.items=ke,Pe&&(oe.additionalItems=Pe));var Me=e._zod.bag,Nt=Me.minimum,Vt=Me.maximum;typeof Nt=="number"&&(oe.minItems=Nt),typeof Vt=="number"&&(oe.maxItems=Vt);break;case"record":var at=h;at.type="object",this.target!=="draft-7"&&this.target!=="draft-2020-12"||(at.propertyNames=this.process(o.keyType,v(v({},f),{},{path:[].concat(G(f.path),["propertyNames"])}))),at.additionalProperties=this.process(o.valueType,v(v({},f),{},{path:[].concat(G(f.path),["additionalProperties"])}));break;case"map":if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break;case"set":if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break;case"enum":var Wt=h,Ge=Ef(o.entries);Ge.every(function(je){return typeof je=="number"})&&(Wt.type="number"),Ge.every(function(je){return typeof je=="string"})&&(Wt.type="string"),Wt.enum=Ge;break;case"literal":var zt,ct=h,pt=[],Ct=K(o.values);try{for(Ct.s();!(zt=Ct.n()).done;){var kn=zt.value;if(kn===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof kn=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");pt.push(Number(kn))}else pt.push(kn)}}catch(je){Ct.e(je)}finally{Ct.f()}if(pt.length!==0)if(pt.length===1){var Ye=pt[0];ct.type=Ye===null?"null":Qe(Ye),this.target==="draft-4"||this.target==="openapi-3.0"?ct.enum=[Ye]:ct.const=Ye}else pt.every(function(je){return typeof je=="number"})&&(ct.type="number"),pt.every(function(je){return typeof je=="string"})&&(ct.type="string"),pt.every(function(je){return typeof je=="boolean"})&&(ct.type="string"),pt.every(function(je){return je===null})&&(ct.type="null"),ct.enum=pt;break;case"file":var rn=h,un={type:"string",format:"binary",contentEncoding:"binary"},_r=e._zod.bag,kr=_r.minimum,Rt=_r.maximum,ht=_r.mime;kr!==void 0&&(un.minLength=kr),Rt!==void 0&&(un.maxLength=Rt),ht?ht.length===1?(un.contentMediaType=ht[0],Object.assign(rn,un)):rn.anyOf=ht.map(function(je){return v(v({},un),{},{contentMediaType:je})}):Object.assign(rn,un);break;case"transform":if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break;case"nullable":var ja=this.process(o.innerType,f);this.target==="openapi-3.0"?(c.ref=o.innerType,h.nullable=!0):h.anyOf=[ja,{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,h.default=JSON.parse(JSON.stringify(o.defaultValue));break;case"prefault":this.process(o.innerType,f),c.ref=o.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break;case"catch":var Cn;this.process(o.innerType,f),c.ref=o.innerType;try{Cn=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=Cn;break;case"nan":if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break;case"template_literal":var an=h,An=e._zod.pattern;if(!An)throw new Error("Pattern not found in template literal");an.type="string",an.pattern=An.source;break;case"pipe":var on=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(on,f),c.ref=on;break;case"readonly":this.process(o.innerType,f),c.ref=o.innerType,h.readOnly=!0;break;case"lazy":var wn=e._zod.innerType;this.process(wn,f),c.ref=wn;break;
107case"custom":if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break;case"function":if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")}}}var Cr=this.metadataRegistry.get(e);return Cr&&Object.assign(c.schema,Cr),this.io==="input"&&ot(e)&&(delete c.schema.examples,delete c.schema.default),this.io==="input"&&c.schema._prefault&&((r=(u=c.schema).default)!==null&&r!==void 0||(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:(n=t?.cycles)!==null&&n!==void 0?n:"ref",reused:(r=t?.reused)!==null&&r!==void 0?r:"inline",external:(u=t?.external)!==null&&u!==void 0?u:void 0},d=this.seen.get(e);if(!d)throw new Error("Unprocessed schema. This is a bug in Zod.");var f=function(x){if(!x[1].schema.$ref){var j=x[1],R=(function(ee){var le,$=s.target==="draft-2020-12"?"$defs":"definitions";if(c.external){var Q,ie,pe,Y,oe=(Q=c.external.registry.get(ee[0]))===null||Q===void 0?void 0:Q.id,_e=(ie=c.external.uri)!==null&&ie!==void 0?ie:function(Me){return Me};if(oe)return{ref:_e(oe)};var ze=(pe=(Y=ee[1].defId)!==null&&Y!==void 0?Y:ee[1].schema.id)!==null&&pe!==void 0?pe:"schema".concat(s.counter++);return ee[1].defId=ze,{defId:ze,ref:"".concat(_e("__shared"),"#/").concat($,"/").concat(ze)}}if(ee[1]===d)return{ref:"#"};var ke="".concat("#","/").concat($,"/"),Pe=(le=ee[1].schema.id)!==null&&le!==void 0?le:"__schema".concat(s.counter++);return{defId:Pe,ref:ke+Pe}})(x),T=R.ref,M=R.defId;j.def=v({},j.schema),M&&(j.defId=M);var V=j.schema;for(var J in V)delete V[J];V.$ref=T}};if(c.cycles==="throw"){var l,h=K(this.seen.entries());try{for(h.s();!(l=h.n()).done;){var m,D=l.value[1];if(D.cycle)throw new Error("Cycle detected: "+"#/".concat((m=D.cycle)===null||m===void 0?void 0:m.join("/"),"/<root>")+'\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.')}}catch(x){h.e(x)}finally{h.f()}}var y,E=K(this.seen.entries());try{for(E.s();!(y=E.n()).done;){var g,b=y.value,F=b[1];if(e!==b[0]){if(c.external){var _,k=(_=c.external.registry.get(b[0]))===null||_===void 0?void 0:_.id;if(e!==b[0]&&k){f(b);continue}}(!((g=this.metadataRegistry.get(b[0]))===null||g===void 0)&&g.id||F.cycle||F.count>1&&c.reused==="ref")&&f(b)}else f(b)}}catch(x){E.e(x)}finally{E.f()}var C,A=function(x,j){var R,T,M=s.seen.get(x),V=(R=M.def)!==null&&R!==void 0?R:M.schema,J=v({},V);if(M.ref!==null){var ee=M.ref;if(M.ref=null,ee){A(ee,j);var le,$=s.seen.get(ee).schema;!$.$ref||j.target!=="draft-7"&&j.target!=="draft-4"&&j.target!=="openapi-3.0"?(Object.assign(V,$),Object.assign(V,J)):(V.allOf=(le=V.allOf)!==null&&le!==void 0?le:[],V.allOf.push($))}M.isParent||s.override({zodSchema:x,jsonSchema:V,path:(T=M.path)!==null&&T!==void 0?T:[]})}},N=K(G(this.seen.entries()).reverse());try{for(N.s();!(C=N.n()).done;){var P=C.value;A(P[0],{target:this.target})}}catch(x){N.e(x)}finally{N.f()}var I={};if(this.target==="draft-2020-12"?I.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?I.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?I.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn("Invalid target: ".concat(this.target)),(a=c.external)!==null&&a!==void 0&&a.uri){var O,Z=(O=c.external.registry.get(e))===null||O===void 0?void 0:O.id;if(!Z)throw new Error("Schema is missing an `id` property");I.$id=c.external.uri(Z)}Object.assign(I,d.def);var B,L=(i=(o=c.external)===null||o===void 0?void 0:o.defs)!==null&&i!==void 0?i:{},S=K(this.seen.entries());try{for(S.s();!(B=S.n()).done;){var w=B.value[1];w.def&&w.defId&&(L[w.defId]=w.def)}}catch(x){S.e(x)}finally{S.f()}c.external||Object.keys(L).length>0&&(this.target==="draft-2020-12"?I.$defs=L:I.definitions=L);try{return JSON.parse(JSON.stringify(I))}catch{throw new Error("Error converting schema to JSON.")}}}]);function ot(e,t){var n=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"
107:case"success":case"catch":case"function":return!1;case"array":return ot(r.element,n);case"object":for(var u in r.shape)if(ot(r.shape[u],n))return!0;return!1;case"union":var a,i=K(r.options);try{for(i.s();!(a=i.n()).done;)if(ot(a.value,n))return!0}catch(c){i.e(c)}finally{i.f()}return!1;case"intersection":return ot(r.left,n)||ot(r.right,n);case"tuple":var o,s=K(r.items);try{for(s.s();!(o=s.n()).done;)if(ot(o.value,n))return!0}catch(c){s.e(c)}finally{s.f()}return!(!r.rest||!ot(r.rest,n));case"record":case"map":return ot(r.keyType,n)||ot(r.valueType,n);case"set":return ot(r.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":case"default":case"prefault":return ot(r.innerType,n);case"lazy":return ot(r.getter(),n);case"transform":return!0;case"pipe":return ot(r.in,n)||ot(r.out,n)}throw new Error("Unknown schema type: ".concat(r.type))}var Gt=Object.freeze({__proto__:null,endsWith:$f,gt:da,gte:lu,includes:Zf,length:Po,lowercase:Rf,lt:fa,lte:cu,maxLength:To,maxSize:function(e,t){return new sv(v(v({check:"max_size"},ue(t)),{},{maximum:e}))},mime:function(e,t){return new Ev(v({check:"mime_type",mime:e},ue(t)))},minLength:Eu,minSize:function(e,t){return new cv(v(v({check:"min_size"},ue(t)),{},{minimum:e}))},multipleOf:Ai,negative:function(e){return fa(0,e)},nonnegative:function(e){return lu(0,e)},nonpositive:function(e){return cu(0,e)},normalize:qf,overwrite:Er,positive:function(e){return da(0,e)},property:function(e,t,n){return new Fv(v({check:"property",property:e,schema:t},ue(n)))},regex:zf,size:function(e,t){return new lv(v(v({check:"size_equals"},ue(t)),{},{size:e}))},startsWith:Lf,toLowerCase:Hf,toUpperCase:Vf,trim:Uf,uppercase:Mf}),gm=z("ZodISODateTime",function(e,t){Nv.init(e,t),Ke.init(e,t)}),ym=z("ZodISODate",function(e,t){zv.init(e,t),Ke.init(e,t)}),Fm=z("ZodISOTime",function(e,t){Rv.init(e,t),Ke.init(e,t)}),Em=z("ZodISODuration",function(e,t){Mv.init(e,t),Ke.init(e,t)}),kt=z("ZodError",function(e,t){kf.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:function(n){return(function(r){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(o){return o.message},a={_errors:[]},i=function(o){var s,c=K(o.issues);try{for(c.s();!(s=c.n()).done;){var d=s.value;if(d.code==="invalid_union"&&d.errors.length)d.errors.map(function(m){return i({issues:m})});else if(d.code==="invalid_key")i({issues:d.issues});else if(d.code==="invalid_element")i({issues:d.issues});else if(d.path.length===0)a._errors.push(u(d));else for(var f=a,l=0;l<d.path.length;){var h=d.path[l];l===d.path.length-1?(f[h]=f[h]||{_errors:[]},f[h]._errors.push(u(d))):f[h]=f[h]||{_errors:[]},f=f[h],l++}}}catch(m){c.e(m)}finally{c.f()}};return i(r),a})(e,n)}},flatten:{value:function(n){return(function(r){var u,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(d){return d.message},i={},o=[],s=K(r.issues);try{for(s.s();!(u=s.n()).done;){var c=u.value;c.path.length>0?(i[c.path[0]]=i[c.path[0]]||[],i[c.path[0]].push(a(c))):o.push(a(c))}}catch(d){s.e(d)}finally{s.f()}return{formErrors:o,fieldErrors:i}})(e,n)}},addIssue:{value:function(n){e.issues.push(n),e.message=JSON.stringify(e.issues,ki,2)}},addIssues:{value:function(n){var r;(r=e.issues).push.apply(r,G(n)),e.message=JSON.stringify(e.issues,ki,2)}},isEmpty:{get:function(){return e.issues.length===0}}})},{Parent:Error}),bm=Oo(kt),_m=Bo(kt),km=Ba(kt),Wf=Ia(kt),Cm=(function(e){return function(t,n,r){var u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Oo(e)(t,n,u)}})(kt),Am=(function(e){return function(t,n,r){return Oo(e)(t,n,r)}})(kt),wm=(function(e){return(function(){var t=be(X().m(function n(r,u,a){var i;return X().w(function(o){for(;;)if(o.n===0)return i=a?Object.assign(a,{direction:"backward"}):{direction:"backward"},o.a(2,Bo(e)(r,u,i))},n)}));return function(n,r,u){return t.apply(this,arguments)}})()})(kt),Sm=(function(e){return(function(){var t=be(X().m(function n(r,u,a){return X().w(function(i){for(;;)if(i.n===0)return i.a(2,Bo(e)(r,u,a))},n)}));return function(n,r,u){return t.apply(this,arguments)}})()})(kt),xm=(function(e){return function(t,n,r){var u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ba(e)(t,n,u)}})(kt),Om=(function(e){return function(t,n,r){return Ba(e)(t,n,r)}})(kt),Bm=(function(e){return(function(){var t=be(X().m(function n(r,u,a){var i;return X().w(function(o){for(;;)if(o.n===0)return i=a?Object.assign(a,{direction:"backward"}):{direction:"backward"},o.a(2,Ia(e)(r,u,i))},n)}));return function(n,r,u){return t.apply(this,arguments)}})()})(kt),Im=(function(e){return(function(){var t=be(X().m(function n(r,u,a){return X().w(function(i){for(;;)if(i.n===0)return i.a(2,Ia(e)(r,u,a))},n)}));return function(n,r,u){return t.apply(this,arguments)}})()})(kt),Ve=z("ZodType",function(e,t){return qe.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(jn(t,{checks:[].concat(G((n=t.checks)!==null&&n!==void 0?n:[]),G(u.map(function(i){return typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i})))}
107))},e.clone=function(n,r){return ln(e,n,r)},e.brand=function(){return e},e.register=function(n,r){return n.add(e,r),e},e.parse=function(n,r){return bm(e,n,r,{callee:e.parse})},e.safeParse=function(n,r){return km(e,n,r)},e.parseAsync=(function(){var n=be(X().m(function r(u,a){return X().w(function(i){for(;;)if(i.n===0)return i.a(2,_m(e,u,a,{callee:e.parseAsync}))},r)}));return function(r,u){return n.apply(this,arguments)}})(),e.safeParseAsync=(function(){var n=be(X().m(function r(u,a){return X().w(function(i){for(;;)if(i.n===0)return i.a(2,Wf(e,u,a))},r)}));return function(r,u){return n.apply(this,arguments)}})(),e.spa=e.safeParseAsync,e.encode=function(n,r){return Cm(e,n,r)},e.decode=function(n,r){return Am(e,n,r)},e.encodeAsync=(function(){var n=be(X().m(function r(u,a){return X().w(function(i){for(;;)if(i.n===0)return i.a(2,wm(e,u,a))},r)}));return function(r,u){return n.apply(this,arguments)}})(),e.decodeAsync=(function(){var n=be(X().m(function r(u,a){return X().w(function(i){for(;;)if(i.n===0)return i.a(2,Sm(e,u,a))},r)}));return function(r,u){return n.apply(this,arguments)}})(),e.safeEncode=function(n,r){return xm(e,n,r)},e.safeDecode=function(n,r){return Om(e,n,r)},e.safeEncodeAsync=(function(){var n=be(X().m(function r(u,a){return X().w(function(i){for(;;)if(i.n===0)return i.a(2,Bm(e,u,a))},r)}));return function(r,u){return n.apply(this,arguments)}})(),e.safeDecodeAsync=(function(){var n=be(X().m(function r(u,a){return X().w(function(i){for(;;)if(i.n===0)return i.a(2,Im(e,u,a))},r)}));return function(r,u){return n.apply(this,arguments)}})(),e.refine=function(n,r){return e.check((function(u){return(function(a,i,o){return new jo(v({type:"custom",check:"custom",fn:i},ue(o)))})(0,u,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{})})(n,r))},e.superRefine=function(n){return e.check((function(r){var u=(function(a){var i=new tt(v({check:"custom"},ue(void 0)));return i._zod.check=a,i})(function(a){return a.addIssue=function(i){if(typeof i=="string")a.issues.push(Fu(i,a.value,u._zod.def));else{var o,s,c,d,f=i;f.fatal&&(f.continue=!1),(o=f.code)!==null&&o!==void 0||(f.code="custom"),(s=f.input)!==null&&s!==void 0||(f.input=a.value),(c=f.inst)!==null&&c!==void 0||(f.inst=u),(d=f.continue)!==null&&d!==void 0||(f.continue=!u._zod.def.abort),a.issues.push(Fu(f))}},r(a.value,a)});return u})(n))},e.overwrite=function(n){return e.check(Er(n))},e.optional=function(){return jc(e)},e.nullable=function(){return Nc(e)},e.nullish=function(){return jc(Nc(e))},e.nonoptional=function(n){return(function(r,u){return new td(v({type:"nonoptional",innerType:r},ue(u)))})(e,n)},e.array=function(){return br(e)},e.or=function(n){return _t([e,n])},e.and=function(n){return new iD({type:"intersection",left:e,right:n})},e.transform=function(n){return zc(e,new cD({type:"transform",transform:n}))},e.default=function(n){return r=n,new fD({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():yc(r)}});var r},e.prefault=function(n){return r=n,new dD({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():yc(r)}});var r},e.catch=function(n){return new pD({type:"catch",innerType:e,catchValue:typeof(r=n)=="function"?r:function(){return r}});var r},e.pipe=function(n){return zc(e,n)},e.readonly=function(){return new vD({type:"readonly",innerType:e})},e.describe=function(n){var r=e.clone();return Rr.add(r,{description:n}),r},Object.defineProperty(e,"description",{get:function(){var n;return(n=Rr.get(e))===null||n===void 0?void 0:n.description},configurable:!0}),e.meta=function(){if(arguments.length===0)return Rr.get(e);var n=e.clone();return Rr.add(n,arguments.length<=0?void 0:arguments[0]),n},e.isOptional=function(){return e.safeParse(void 0).success},e.isNullable=function(){return e.safeParse(null).success},e}),Jf=z("_ZodString",function(e,t){var n,r,u;Io.init(e,t),Ve.init(e,t);var a=e._zod.bag;e.format=(n=a.format)!==null&&n!==void 0?n:null,e.minLength=(r=a.minimum)!==null&&r!==void 0?r:null,e.maxLength=(u=a.maximum)!==null&&u!==void 0?u:null,e.regex=function(){return e.check(zf.apply(Gt,arguments))},e.includes=function(){return e.check(Zf.apply(Gt,arguments))},e.startsWith=function(){return e.check(Lf.apply(Gt,arguments))},e.endsWith=function(){return e.check($f.apply(Gt,arguments))},e.min=function(){return e.check(Eu.apply(Gt,arguments))},e.max=function(){return e.check(To.apply(Gt,arguments))},e.length=function(){return e.check(Po.apply(Gt,arguments))},e.nonempty=function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return e.check(Eu.apply(Gt,[1].concat(o)))},e.lowercase=function(i){return e.check(Rf(i))},e.uppercase=function(i){return e.check(Mf(i))},e.trim=function(){return e.check(Uf())},e.normalize=function(){return e.check(qf.apply(Gt,arguments))},e.toLowerCase=function(){return e.check(Hf())},e.toUpperCase=function(){return e.check(Vf())}}),Tm=z("ZodString",function(e,t){Io.init(e,t),Jf.init(e,t),e.email=function(n){return e.check((function(r,u){return new Pm(v({type:"string",format:"email",check:"string_format",abort:!1},ue(u)))})(0,n))},e.url=function(n){return e.check((function(r,u){return new jm(v({type:"string",format:"url",check:"string_format",abort:!1},ue(u)))})(0,n))},e.jwt=function(n){return e.check((function(r,u){return new Qm(v({type:"string",format:"jwt",check:"string_format",abort:!1},ue(u)))})(0,n))},e.emoji=function(n){return e.check((function(r,u){return new Nm(v({type:"string",format:"emoji",check:"string_format",abort:!1},ue(u)))})(0,n))}
107,e.guid=function(n){return e.check(Bc(Tc,n))},e.uuid=function(n){return e.check((function(r,u){return new Uu(v({type:"string",format:"uuid",check:"string_format",abort:!1},ue(u)))})(0,n))},e.uuidv4=function(n){return e.check((function(r,u){return new Uu(v({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4"},ue(u)))})(0,n))},e.uuidv6=function(n){return e.check((function(r,u){return new Uu(v({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6"},ue(u)))})(0,n))},e.uuidv7=function(n){return e.check((function(r,u){return new Uu(v({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7"},ue(u)))})(0,n))},e.nanoid=function(n){return e.check((function(r,u){return new zm(v({type:"string",format:"nanoid",check:"string_format",abort:!1},ue(u)))})(0,n))},e.guid=function(n){return e.check(Bc(Tc,n))},e.cuid=function(n){return e.check((function(r,u){return new Rm(v({type:"string",format:"cuid",check:"string_format",abort:!1},ue(u)))})(0,n))},e.cuid2=function(n){return e.check((function(r,u){return new Mm(v({type:"string",format:"cuid2",check:"string_format",abort:!1},ue(u)))})(0,n))},e.ulid=function(n){return e.check((function(r,u){return new Zm(v({type:"string",format:"ulid",check:"string_format",abort:!1},ue(u)))})(0,n))},e.base64=function(n){return e.check((function(r,u){return new Wm(v({type:"string",format:"base64",check:"string_format",abort:!1},ue(u)))})(0,n))},e.base64url=function(n){return e.check((function(r,u){return new Jm(v({type:"string",format:"base64url",check:"string_format",abort:!1},ue(u)))})(0,n))},e.xid=function(n){return e.check((function(r,u){return new Lm(v({type:"string",format:"xid",check:"string_format",abort:!1},ue(u)))})(0,n))},e.ksuid=function(n){return e.check((function(r,u){return new $m(v({type:"string",format:"ksuid",check:"string_format",abort:!1},ue(u)))})(0,n))},e.ipv4=function(n){return e.check((function(r,u){return new qm(v({type:"string",format:"ipv4",check:"string_format",abort:!1},ue(u)))})(0,n))},e.ipv6=function(n){return e.check((function(r,u){return new Um(v({type:"string",format:"ipv6",check:"string_format",abort:!1},ue(u)))})(0,n))},e.cidrv4=function(n){return e.check((function(r,u){return new Hm(v({type:"string",format:"cidrv4",check:"string_format",abort:!1},ue(u)))})(0,n))},e.cidrv6=function(n){return e.check((function(r,u){return new Vm(v({type:"string",format:"cidrv6",check:"string_format",abort:!1},ue(u)))})(0,n))},e.e164=function(n){return e.check((function(r,u){return new Km(v({type:"string",format:"e164",check:"string_format",abort:!1},ue(u)))})(0,n))},e.datetime=function(n){return e.check((function(r){return(function(u,a){return new gm(v({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null},ue(a)))})(0,r)})(n))},e.date=function(n){return e.check((function(r){return(function(u,a){return new ym(v({type:"string",format:"date",check:"string_format"},ue(a)))})(0,r)})(n))},e.time=function(n){return e.check((function(r){return(function(u,a){return new Fm(v({type:"string",format:"time",check:"string_format",precision:null},ue(a)))})(0,r)})(n))},e.duration=function(n){return e.check((function(r){return(function(u,a){return new Em(v({type:"string",format:"duration",check:"string_format"},ue(a)))})(0,r)})(n))}});function de(e){return(function(t,n){return new Tm(v({type:"string"},ue(n)))})(0,e)}var Ke=z("ZodStringFormat",function(e,t){He.init(e,t),Jf.init(e,t)}),Pm=z("ZodEmail",function(e,t){wv.init(e,t),Ke.init(e,t)}),Tc=z("ZodGUID",function(e,t){Cv.init(e,t),Ke.init(e,t)}),Uu=z("ZodUUID",function(e,t){Av.init(e,t),Ke.init(e,t)}),jm=z("ZodURL",function(e,t){Sv.init(e,t),Ke.init(e,t)}),Nm=z("ZodEmoji",function(e,t){xv.init(e,t),Ke.init(e,t)}),zm=z("ZodNanoID",function(e,t){Ov.init(e,t),Ke.init(e,t)}),Rm=z("ZodCUID",function(e,t){Bv.init(e,t),Ke.init(e,t)}),Mm=z("ZodCUID2",function(e,t){Iv.init(e,t),Ke.init(e,t)}),Zm=z("ZodULID",function(e,t){Tv.init(e,t),Ke.init(e,t)}),Lm=z("ZodXID",function(e,t){Pv.init(e,t),Ke.init(e,t)}),$m=z("ZodKSUID",function(e,t){jv.init(e,t),Ke.init(e,t)}),qm=z("ZodIPv4",function(e,t){Zv.init(e,t),Ke.init(e,t)}),Um=z("ZodIPv6",function(e,t){Lv.init(e,t),Ke.init(e,t)}
107),Hm=z("ZodCIDRv4",function(e,t){$v.init(e,t),Ke.init(e,t)}),Vm=z("ZodCIDRv6",function(e,t){qv.init(e,t),Ke.init(e,t)}),Wm=z("ZodBase64",function(e,t){Uv.init(e,t),Ke.init(e,t)}),Jm=z("ZodBase64URL",function(e,t){Hv.init(e,t),Ke.init(e,t)}),Km=z("ZodE164",function(e,t){Vv.init(e,t),Ke.init(e,t)}),Qm=z("ZodJWT",function(e,t){Wv.init(e,t),Ke.init(e,t)}),Kf=z("ZodNumber",function(e,t){var n,r,u,a,i,o,s,c,d;If.init(e,t),Ve.init(e,t),e.gt=function(l,h){return e.check(da(l,h))},e.gte=function(l,h){return e.check(lu(l,h))},e.min=function(l,h){return e.check(lu(l,h))},e.lt=function(l,h){return e.check(fa(l,h))},e.lte=function(l,h){return e.check(cu(l,h))},e.max=function(l,h){return e.check(cu(l,h))},e.int=function(l){return e.check(Pc(l))},e.safe=function(l){return e.check(Pc(l))},e.positive=function(l){return e.check(da(0,l))},e.nonnegative=function(l){return e.check(lu(0,l))},e.negative=function(l){return e.check(fa(0,l))},e.nonpositive=function(l){return e.check(cu(0,l))},e.multipleOf=function(l,h){return e.check(Ai(l,h))},e.step=function(l,h){return e.check(Ai(l,h))},e.finite=function(){return e};var f=e._zod.bag;e.minValue=(n=Math.max((r=f.minimum)!==null&&r!==void 0?r:Number.NEGATIVE_INFINITY,(u=f.exclusiveMinimum)!==null&&u!==void 0?u:Number.NEGATIVE_INFINITY))!==null&&n!==void 0?n:null,e.maxValue=(a=Math.min((i=f.maximum)!==null&&i!==void 0?i:Number.POSITIVE_INFINITY,(o=f.exclusiveMaximum)!==null&&o!==void 0?o:Number.POSITIVE_INFINITY))!==null&&a!==void 0?a:null,e.isInt=((s=f.format)!==null&&s!==void 0?s:"").includes("int")||Number.isSafeInteger((c=f.multipleOf)!==null&&c!==void 0?c:.5),e.isFinite=!0,e.format=(d=f.format)!==null&&d!==void 0?d:null});function Gm(e){return(function(t,n){return new Kf(v({type:"number",checks:[]},ue(n)))})(0,e)}var Ym=z("ZodNumberFormat",function(e,t){Jv.init(e,t),Kf.init(e,t)});function Pc(e){return(function(t,n){return new Ym(v({type:"number",check:"number_format",abort:!1,format:"safeint"},ue(n)))})(0,e)}var Xm=z("ZodBoolean",function(e,t){Kv.init(e,t),Ve.init(e,t)});function lt(e){return(function(t,n){return new Xm(v({type:"boolean"},ue(n)))})(0,e)}var eD=z("ZodNull",function(e,t){Qv.init(e,t),Ve.init(e,t)});function tD(e){return(function(t,n){return new eD(v({type:"null"},ue(n)))})(0,e)}var nD=z("ZodUnknown",function(e,t){Gv.init(e,t),Ve.init(e,t)});function $t(){return new nD({type:"unknown"})}var rD=z("ZodNever",function(e,t){Yv.init(e,t),Ve.init(e,t)});function Qf(e){return(function(t,n){return new rD(v({type:"never"},ue(n)))})(0,e)}var uD=z("ZodArray",function(e,t){Xv.init(e,t),Ve.init(e,t),e.element=t.element,e.min=function(n,r){return e.check(Eu(n,r))},e.nonempty=function(n){return e.check(Eu(1,n))},e.max=function(n,r){return e.check(To(n,r))},e.length=function(n,r){return e.check(Po(n,r))},e.unwrap=function(){return e.element}});function br(e,t){return(function(n,r,u){return new uD(v({type:"array",element:r},ue(u)))})(0,e,t)}var Gf=z("ZodObject",function(e,t){tm.init(e,t),Ve.init(e,t),Ie(e,"shape",function(){return t.shape}),e.keyof=function(){return Xf(Object.keys(e._zod.def.shape))},e.catchall=function(n){return e.clone(v(v({},e._zod.def),{},{catchall:n}))},e.passthrough=function(){return e.clone(v(v({},e._zod.def),{},{catchall:$t()}))},e.loose=function(){return e.clone(v(v({},e._zod.def),{},{catchall:$t()}))},e.strict=function(){return e.clone(v(v({},e._zod.def),{},{catchall:Qf()}))},e.strip=function(){return e.clone(v(v({},e._zod.def),{},{catchall:void 0}))},e.extend=function(n){return(function(r,u){if(!vr(u))throw new Error("Invalid input to extend: expected a plain object");var a=r._zod.def.checks;if(a&&a.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");var i=jn(r._zod.def,{get shape(){var o=v(v({},r._zod.def.shape),u);return Tn(this,"shape",o),o},checks:[]});return ln(r,i)})(e,n)},e.safeExtend=function(n){return(function(r,u){if(!vr(u))throw new Error("Invalid input to safeExtend: expected a plain object");var a=v(v({},r._zod.def),{},{get shape(){var i=v(v({},r._zod.def.shape),u);return Tn(this,"shape",i),i},checks:r._zod.def.checks});return ln(r,a)})(e,n)},e.merge=function(n){return(function(r,u){var a=jn(r._zod.def,{get shape(){var i=v(v({},r._zod.def.shape),u._zod.def.shape);return Tn(this,"shape",i),i},get catchall(){return u._zod.def.catchall},checks:[]});return ln(r,a)})(e,n)},e.pick=function(n){return(function(r,u){var a=r._zod.def;return ln(r,jn(r._zod.def,{get shape(){var i={};for(var o in u){if(!(o in a.shape))throw new Error('Unrecognized key: "'.concat(o,'"'));u[o]&&(i[o]=a.shape[o])}return Tn(this,"shape",i),i},checks:[]}))})(e,n)},e.omit=function(n){return(function(r,u){var a=r._zod.def,i=jn(r._zod.def,{get shape(){var o=v({},r._zod.def.shape);for(var s in u){if(!(s in a.shape))throw new Error('Unrecognized key: "'.concat(s,'"'));u[s]&&delete o[s]}return Tn(this,"shape",o),o},checks:[]});return ln(r,i)})(e,n)},e.partial=function(){return(function(n,r,u){var a=jn(r._zod.def,{get shape(){var i=r._zod.def.shape,o=v({},i);if(u)for(var s in u){if(!(s in i))throw new Error('Unrecognized key: "'.concat(s,'"'));u[s]&&(o[s]=n?new n({type:"optional",innerType:i[s]}):i[s])}else for(var c in i)o[c]=n?new n({type:"optional",innerType:i[c]}):i[c];return Tn(this,"shape",o),o},checks:[]});return ln(r,a)})(ed,e,arguments.length<=0?void 0:arguments[0])},e.required=function(){return(function(n,r,u){var a=jn(r._zod.def,{get shape(){var i=r._zod.def.shape,o=v({},i);if(u)for(var s in u){if(!(s in o))throw new Error('Unrecognized key: "'.concat(s,'"'));u[s]&&(o[s]=new n({type:"nonoptional",innerType:i[s]}))}else for(var c in i)o[c]=new n({type:"nonoptional",innerType:i[c]});return Tn(this,"shape",o),o},checks:[]});return ln(r,a)})(td,e,arguments.length<=0?void 0:arguments[0])}});function rt(e,t){var n=v({type:"object",shape:e??{}},ue(t));return new Gf(n)}function We(e,t){return new Gf(v({type:"object",shape:e,catchall:Qf()},ue(t)))}var Yf=z("ZodUnion",function(e,t){jf.init(e,t),Ve.init(e,t),e.options=t.options});function _t(e,t){return new Yf(v({type:"union",options:e},ue(t)))}var aD=z("ZodDiscriminatedUnion",function(e,t){Yf.init(e,t),nm.init(e,t)}),iD=z("ZodIntersection",function(e,t){rm.init(e,t),Ve.init(e,t)}),oD=z("ZodRecord",function(e,t){um.init(e,t),Ve.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function wi(e,t,n){return new oD(v({type:"record",keyType:e,valueType:t},ue(n)))}var Si=z("ZodEnum",function(e,t){am.init(e,t),Ve.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);var n=new Set(Object.keys(t.entries));e.extract=function(r,u){var a,i={},o=K(r);try{for(o.s();!(a=o.n()).done;){var s=a.value;
107if(!n.has(s))throw new Error("Key ".concat(s," not found in enum"));i[s]=t.entries[s]}}catch(c){o.e(c)}finally{o.f()}return new Si(v(v(v({},t),{},{checks:[]},ue(u)),{},{entries:i}))},e.exclude=function(r,u){var a,i=v({},t.entries),o=K(r);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(!n.has(s))throw new Error("Key ".concat(s," not found in enum"));delete i[s]}}catch(c){o.e(c)}finally{o.f()}return new Si(v(v(v({},t),{},{checks:[]},ue(u)),{},{entries:i}))}});function Xf(e,t){var n=Array.isArray(e)?Object.fromEntries(e.map(function(r){return[r,r]})):e;return new Si(v({type:"enum",entries:n},ue(t)))}var sD=z("ZodLiteral",function(e,t){im.init(e,t),Ve.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 Ee(e,t){return new sD(v({type:"literal",values:Array.isArray(e)?e:[e]},ue(t)))}var cD=z("ZodTransform",function(e,t){om.init(e,t),Ve.init(e,t),e._zod.parse=function(n,r){if(r.direction==="backward")throw new yf(e.constructor.name);n.addIssue=function(a){if(typeof a=="string")n.issues.push(Fu(a,n.value,t));else{var i,o,s,c=a;c.fatal&&(c.continue=!1),(i=c.code)!==null&&i!==void 0||(c.code="custom"),(o=c.input)!==null&&o!==void 0||(c.input=n.value),(s=c.inst)!==null&&s!==void 0||(c.inst=e),n.issues.push(Fu(c))}};var u=t.transform(n.value,n);return u instanceof Promise?u.then(function(a){return n.value=a,n}):(n.value=u,n)}}),ed=z("ZodOptional",function(e,t){sm.init(e,t),Ve.init(e,t),e.unwrap=function(){return e._zod.def.innerType}});function jc(e){return new ed({type:"optional",innerType:e})}var lD=z("ZodNullable",function(e,t){cm.init(e,t),Ve.init(e,t),e.unwrap=function(){return e._zod.def.innerType}});function Nc(e){return new lD({type:"nullable",innerType:e})}var fD=z("ZodDefault",function(e,t){lm.init(e,t),Ve.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeDefault=e.unwrap}),dD=z("ZodPrefault",function(e,t){fm.init(e,t),Ve.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),td=z("ZodNonOptional",function(e,t){dm.init(e,t),Ve.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),pD=z("ZodCatch",function(e,t){pm.init(e,t),Ve.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeCatch=e.unwrap}),hD=z("ZodPipe",function(e,t){hm.init(e,t),Ve.init(e,t),e.in=t.in,e.out=t.out});function zc(e,t){return new hD({type:"pipe",in:e,out:t})}var Oe,Rc,vD=z("ZodReadonly",function(e,t){vm.init(e,t),Ve.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),mD=z("ZodLazy",function(e,t){mm.init(e,t),Ve.init(e,t),e.unwrap=function(){return e._zod.def.getter()}}),jo=z("ZodCustom",function(e,t){Dm.init(e,t),Ve.init(e,t)});function nd(e,t){return(function(n,r,u){var a,i=ue(u);return(a=i.abort)!==null&&a!==void 0||(i.abort=!0),new n(v({type:"custom",check:"custom",fn:r},i))})(jo,e??function(){return!0},t)}function pa(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{error:"Input not instance of ".concat(e.name)},n=new jo(v({type:"custom",check:"custom",fn:function(r){return r instanceof e},abort:!0},ue(t)));return n._zod.bag.Class=e,n}(function(e){e.assertEqual=function(t){},e.assertIs=function(t){},e.assertNever=function(t){throw new Error},e.arrayToEnum=function(t){var n,r={},u=K(t);try{for(u.s();!(n=u.n()).done;){var a=n.value;r[a]=a}}catch(i){u.e(i)}finally{u.f()}return r},e.getValidEnumValues=function(t){var n,r={},u=K(e.objectKeys(t).filter(function(i){return typeof t[t[i]]!="number"}));try{for(u.s();!(n=u.n()).done;){var a=n.value;r[a]=t[a]}}catch(i){u.e(i)}finally{u.f()}return e.objectValues(r)},e.objectValues=function(t){return e.objectKeys(t).map(function(n){return t[n]})},e.objectKeys=typeof Object.keys=="function"?function(t){return Object.keys(t)}:function(t){var n=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.push(r);return n},e.find=function(t,n){var r,u=K(t);try{for(u.s();!(r=u.n()).done;){var a=r.value;if(n(a))return a}}catch(i){u.e(i)}finally{u.f()}},e.isInteger=typeof Number.isInteger=="function"?function(t){return Number.isInteger(t)}:function(t){return typeof t=="number"&&Number.isFinite(t)&&Math.floor(t)===t},e.joinValues=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:" | ";return t.map(function(r){return typeof r=="string"?"'".concat(r,"'"):r}).join(n)},e.jsonStringifyReplacer=function(t,n){return typeof n=="bigint"?n.toString():n}})(Oe||(Oe={})),(Rc||(Rc={})).mergeShapes=function(e,t){return v(v({},e),t)};var ne=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),pn=function(e){switch(Qe(e)){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return Number.isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(e)?ne.array:e===null?ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ne.promise:typeof Map<"u"&&e instanceof Map?ne.map:typeof Set<"u"&&e instanceof Set?ne.set:typeof Date<"u"&&e instanceof Date?ne.date:ne.object;default:return ne.unknown}}
107,q=Oe.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"]),Ut=(function(){function e(t){var n;se(this,e),(n=De(this,e)).issues=[],n.addIssue=function(u){n.issues=[].concat(G(n.issues),[u])},n.addIssues=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];n.issues=[].concat(G(n.issues),G(u))};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 ve(e,yn(Error)),ce(e,[{key:"errors",get:function(){return this.issues}},{key:"format",value:function(t){var n=t||function(a){return a.message},r={_errors:[]},u=function(a){var i,o=K(a.issues);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s.code==="invalid_union")s.unionErrors.map(u);else if(s.code==="invalid_return_type")u(s.returnTypeError);else if(s.code==="invalid_arguments")u(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else for(var c=r,d=0;d<s.path.length;){var f=s.path[d];d===s.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(n(s))):c[f]=c[f]||{_errors:[]},c=c[f],d++}}}catch(l){o.e(l)}finally{o.f()}};return u(this),r}},{key:"toString",value:function(){return this.message}},{key:"message",get:function(){return JSON.stringify(this.issues,Oe.jsonStringifyReplacer,2)}},{key:"isEmpty",get:function(){return this.issues.length===0}},{key:"flatten",value:function(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(s){return s.message},r=Object.create(null),u=[],a=K(this.issues);try{for(a.s();!(t=a.n()).done;){var i=t.value;if(i.path.length>0){var o=i.path[0];r[o]=r[o]||[],r[o].push(n(i))}else u.push(n(i))}}catch(s){a.e(s)}finally{a.f()}return{formErrors:u,fieldErrors:r}}},{key:"formErrors",get:function(){return this.flatten()}}],[{key:"assert",value:function(t){if(!(t instanceof e))throw new Error("Not a ZodError: ".concat(t))}}])})();Ut.create=function(e){return new Ut(e)};var bu=function(e,t){var n;switch(e.code){case q.invalid_type:n=e.received===ne.undefined?"Required":"Expected ".concat(e.expected,", received ").concat(e.received);break;case q.invalid_literal:n="Invalid literal value, expected ".concat(JSON.stringify(e.expected,Oe.jsonStringifyReplacer));break;case q.unrecognized_keys:n="Unrecognized key(s) in object: ".concat(Oe.joinValues(e.keys,", "));break;case q.invalid_union:n="Invalid input";break;case q.invalid_union_discriminator:n="Invalid discriminator value. Expected ".concat(Oe.joinValues(e.options));break;case q.invalid_enum_value:n="Invalid enum value. Expected ".concat(Oe.joinValues(e.options),", received '").concat(e.received,"'");break;case q.invalid_arguments:n="Invalid function arguments";break;case q.invalid_return_type:n="Invalid function return type";break;case q.invalid_date:n="Invalid date";break;case q.invalid_string:Qe(e.validation)==="object"?"includes"in e.validation?(n='Invalid input: must include "'.concat(e.validation.includes,'"'),typeof e.validation.position=="number"&&(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,'"'):Oe.assertNever(e.validation):n=e.validation!=="regex"?"Invalid ".concat(e.validation):"Invalid";break;case q.too_small:n=e.type==="array"?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)"):e.type==="string"?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)"):e.type==="number"||e.type==="bigint"?"Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum):e.type==="date"?"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 q.too_big:n=e.type==="array"?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element
107(s)"):e.type==="string"?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)"):e.type==="number"?"Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):e.type==="bigint"?"BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):e.type==="date"?"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 q.custom:n="Invalid input";break;case q.invalid_intersection_types:n="Intersection results could not be merged";break;case q.not_multiple_of:n="Number must be a multiple of ".concat(e.multipleOf);break;case q.not_finite:n="Number must be finite";break;default:n=t.defaultError,Oe.assertNever(e)}return{message:n}},DD=bu;function xi(){return DD}var Oi=function(e){var t=e.data,n=e.path,r=e.errorMaps,u=e.issueData,a=[].concat(G(n),G(u.path||[])),i=v(v({},u),{},{path:a});if(u.message!==void 0)return v(v({},u),{},{path:a,message:u.message});var o,s="",c=r.filter(function(f){return!!f}).slice().reverse(),d=K(c);try{for(d.s();!(o=d.n()).done;)s=(0,o.value)(i,{data:t,defaultError:s}).message}catch(f){d.e(f)}finally{d.f()}return v(v({},u),{},{path:a,message:s})};function te(e,t){var n=xi(),r=Oi({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===bu?void 0:bu].filter(function(u){return!!u})});e.common.issues.push(r)}var fe,yt=(function(){function e(){se(this,e),this.value="valid"}return ce(e,[{key:"dirty",value:function(){this.value==="valid"&&(this.value="dirty")}},{key:"abort",value:function(){this.value!=="aborted"&&(this.value="aborted")}}],[{key:"mergeArray",value:function(n,r){var u,a=[],i=K(r);try{for(i.s();!(u=i.n()).done;){var o=u.value;if(o.status==="aborted")return me;o.status==="dirty"&&n.dirty(),a.push(o.value)}}catch(s){i.e(s)}finally{i.f()}return{status:n.value,value:a}}},{key:"mergeObjectAsync",value:(t=be(X().m(function n(r,u){var a,i,o,s,c,d,f;return X().w(function(l){for(;;)switch(l.p=l.n){case 0:a=[],i=K(u),l.p=1,i.s();case 2:if((o=i.n()).done){l.n=6;break}return s=o.value,l.n=3,s.key;case 3:return c=l.v,l.n=4,s.value;case 4:d=l.v,a.push({key:c,value:d});case 5:l.n=2;break;case 6:l.n=8;break;case 7:l.p=7,f=l.v,i.e(f);case 8:return l.p=8,i.f(),l.f(8);case 9:return l.a(2,e.mergeObjectSync(r,a))}},n,null,[[1,7,8,9]])})),function(n,r){return t.apply(this,arguments)})},{key:"mergeObjectSync",value:function(n,r){var u,a={},i=K(r);try{for(i.s();!(u=i.n()).done;){var o=u.value,s=o.key,c=o.value;if(s.status==="aborted"||c.status==="aborted")return me;s.status==="dirty"&&n.dirty(),c.status==="dirty"&&n.dirty(),s.value==="__proto__"||c.value===void 0&&!o.alwaysSet||(a[s.value]=c.value)}}catch(d){i.e(d)}finally{i.f()}return{status:n.value,value:a}}}]);var t})(),me=Object.freeze({status:"aborted"}),Yu=function(e){return{status:"dirty",value:e}},dt=function(e){return{status:"valid",value:e}},Mc=function(e){return e.status==="aborted"},Zc=function(e){return e.status==="dirty"},Dr=function(e){return e.status==="valid"},ha=function(e){return typeof Promise<"u"&&e instanceof Promise};(function(e){e.errToObj=function(t){return typeof t=="string"?{message:t}:t||{}},e.toString=function(t){return typeof t=="string"?t:t?.message}})(fe||(fe={}));var Ht=ce(function e(t,n,r,u){se(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,G(this._path).concat(G(this._key))):(t=this._cachedPath).push.apply(t,G(this._path).concat([this._key]))),this._cachedPath}}]),Lc=function(e,t){if(Dr(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 n=new Ut(e.common.issues);return this._error=n,this._error}}};function ge(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(a,i){var o,s,c=e.message;return a.code==="invalid_enum_value"?{message:c??i.defaultError}:i.data===void 0?{message:(s=c??r)!==null&&s!==void 0?s:i.defaultError}:a.code!=="invalid_type"?{message:i.defaultError}:{message:(o=c??n)!==null&&o!==void 0?o:i.defaultError}},description:u}}var ei,Ae=(function(){return ce(function t(n){var r=this;se(this,t),this.spa=this.safeParseAsync,this._def=n,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(u){return r["~validate"](u)}}},[{key:"description",get:function(){return this._def.description}},{key:"_getType",value:function(t){return pn(t.data)}},{key:"_getOrReturnCtx",value:function(t,n){return n||{common:t.parent.common,data:t.data,parsedType:pn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}},{key:"_processInputParams",value:function(t){return{status:new yt,ctx:{common:t.parent.common,data:t.data,parsedType:pn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}},{key:"_parseSync",value:function(t){var n=this._parse(t);if(ha(n))throw new Error("Synchronous parse encountered promise.");return n}},{key:"_parseAsync",value:function(t){var n=this._parse(t);return Promise.resolve(n)}},{key:"parse",value:function(t,n){var r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}},{key:"safeParse",value:function(t,n){var r,u={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0&&r,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:pn(t)},a=this._parseSync({data:t,path:u.path,parent:u});return Lc(u,a)}},{key:"~validate",value:function(t){var n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:pn(t)};if(!this["~standard"].async)try{var r=this._parseSync({data:t,path:[],parent:n});return Dr(r)?{value:r.value}:{issues:n.common.issues}}catch(a){var u;a!=null&&(u=a.message)!==null&&u!==void 0&&(u=u.toLowerCase())!==null&&u!==void 0&&u.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(function(a){return Dr(a)?{value:a.value}:{issues:n.common.issues}})}},{key:"parseAsync",value:(e=be(X().m(function t(n,r){var u;return X().w(function(a){for(;;)switch(a.n){case 0:return a.n=1,this.safeParseAsync(n,r);case 1:if(!(u=a.v).success){a.n=2;break}return a.a(2,u.data);case 2:throw u.error;case 3:return a.a(2)}},t,this)})),function(t,n){return e.apply(this,arguments)})},{key:"safeParseAsync",value:(function(){var t=be(X().m(function n(r,u){var a,i,o;return X().w(function(s){for(;;)switch(s.n){case 0:return a={common:{issues:[],contextualErrorMap:u?.errorMap,async:!0},path:u?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:pn(r)},i=this._parse({data:r,path:a.path,parent:a}),s.n=1,ha(i)?i:Promise.resolve(i);case 1:return o=s.v,s.a(2,Lc(a,o))}},n,this)}));return function(n,r){return t.apply(this,arguments)}})()},{key:"refine",value:function(t,n){return this._refinement(function(r,u){var a=t(r),i=function(){return u.addIssue(v({code:q.custom},(function(o){return typeof n=="string"||n===void 0?{message:n}:typeof n=="function"?n(o):n})(r)))};
107return typeof Promise<"u"&&a instanceof Promise?a.then(function(o){return!!o||(i(),!1)}):!!a||(i(),!1)})}},{key:"refinement",value:function(t,n){return this._refinement(function(r,u){return!!t(r)||(u.addIssue(typeof n=="function"?n(r,u):n),!1)})}},{key:"_refinement",value:function(t){return new Xt({schema:this,typeName:H.ZodEffects,effect:{type:"refinement",refinement:t}})}},{key:"superRefine",value:function(t){return this._refinement(t)}},{key:"optional",value:function(){return nn.create(this,this._def)}},{key:"nullable",value:function(){return $n.create(this,this._def)}},{key:"nullish",value:function(){return this.nullable().optional()}},{key:"array",value:function(){return gr.create(this)}},{key:"promise",value:function(){return _u.create(this,this._def)}},{key:"or",value:function(t){return ga.create([this,t],this._def)}},{key:"and",value:function(t){return ya.create(this,t,this._def)}},{key:"transform",value:function(t){return new Xt(v(v({},ge(this._def)),{},{schema:this,typeName:H.ZodEffects,effect:{type:"transform",transform:t}}))}},{key:"default",value:function(t){var n=typeof t=="function"?t:function(){return t};return new _a(v(v({},ge(this._def)),{},{innerType:this,defaultValue:n,typeName:H.ZodDefault}))}},{key:"brand",value:function(){return new id(v({typeName:H.ZodBranded,type:this},ge(this._def)))}},{key:"catch",value:function(t){var n=typeof t=="function"?t:function(){return t};return new ka(v(v({},ge(this._def)),{},{innerType:this,catchValue:n,typeName:H.ZodCatch}))}},{key:"describe",value:function(t){return new this.constructor(v(v({},this._def),{},{description:t}))}},{key:"pipe",value:function(t){return od.create(this,t)}},{key:"readonly",value:function(){return Ca.create(this)}},{key:"isOptional",value:function(){return this.safeParse(void 0).success}},{key:"isNullable",value:function(){return this.safeParse(null).success}}]);var e})(),gD=/^c[^\s-]{8,}$/i,yD=/^[0-9a-z]+$/,FD=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ED=/^[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,bD=/^[a-z0-9_-]{21}$/i,_D=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,kD=/^[-+]?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)?)??$/,CD=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,AD=/^(?:(?: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])$/,wD=/^(?:(?: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])$/,SD=/^(([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]))$/,xD=/^(([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])$/,OD=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,BD=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,rd="((\\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])))",ID=new RegExp("^".concat(rd,"$"));function ud(e){var t="[0-5]\\d";e.precision?t="".concat(t,"\\.\\d{").concat(e.precision,"}"):e.precision==null&&(t="".concat(t,"(\\.\\d+)?"));var n=e.precision?"+":"?";return"([01]\\d|2[0-3]):[0-5]\\d(:".concat(t,")").concat(n)}function TD(e){return new RegExp("^".concat(ud(e),"$"))}function PD(e){var t="".concat(rd,"T").concat(ud(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 jD(e,t){return!(t!=="v4"&&t||!AD.test(e))||!(t!=="v6"&&t||!SD.test(e))}function ND(e,t){if(!_D.test(e))return!1;try{var n=xe(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!(Qe(u)!=="object"||u===null||"typ"in u&&u?.typ!=="JWT"||!u.alg||t&&u.alg!==t)}catch{return!1}}function zD(e,t){return!(t!=="v4"&&t||!wD.test(e))||!(t!=="v6"&&t||!xD.test(e))}var va=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){var n=this._getOrReturnCtx(t);return te(n,{code:q.invalid_type,expected:ne.string,received:n.parsedType}),me}var r,u=new yt,a=void 0,i=K(this._def.checks);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.kind==="min")t.data.length<o.value&&(te(a=this._getOrReturnCtx(t,a),{co
107de:q.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),u.dirty());else if(o.kind==="max")t.data.length>o.value&&(te(a=this._getOrReturnCtx(t,a),{code:q.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),u.dirty());else if(o.kind==="length"){var s=t.data.length>o.value,c=t.data.length<o.value;(s||c)&&(a=this._getOrReturnCtx(t,a),s?te(a,{code:q.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):c&&te(a,{code:q.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),u.dirty())}else if(o.kind==="email")CD.test(t.data)||(te(a=this._getOrReturnCtx(t,a),{validation:"email",code:q.invalid_string,message:o.message}),u.dirty());else if(o.kind==="emoji")ei||(ei=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ei.test(t.data)||(te(a=this._getOrReturnCtx(t,a),{validation:"emoji",code:q.invalid_string,message:o.message}),u.dirty());else if(o.kind==="uuid")ED.test(t.data)||(te(a=this._getOrReturnCtx(t,a),{validation:"uuid",code:q.invalid_string,message:o.message}),u.dirty());else if(o.kind==="nanoid")bD.test(t.data)||(te(a=this._getOrReturnCtx(t,a),{validation:"nanoid",code:q.invalid_string,message:o.message}),u.dirty());else if(o.kind==="cuid")gD.test(t.data)||(te(a=this._getOrReturnCtx(t,a),{validation:"cuid",code:q.invalid_string,message:o.message}),u.dirty());else if(o.kind==="cuid2")yD.test(t.data)||(te(a=this._getOrReturnCtx(t,a),{validation:"cuid2",code:q.invalid_string,message:o.message}),u.dirty());else if(o.kind==="ulid")FD.test(t.data)||(te(a=this._getOrReturnCtx(t,a),{validation:"ulid",code:q.invalid_string,message:o.message}),u.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{te(a=this._getOrReturnCtx(t,a),{validation:"url",code:q.invalid_string,message:o.message}),u.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(te(a=this._getOrReturnCtx(t,a),{validation:"regex",code:q.invalid_string,message:o.message}),u.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(te(a=this._getOrReturnCtx(t,a),{code:q.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),u.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(te(a=this._getOrReturnCtx(t,a),{code:q.invalid_string,validation:{startsWith:o.value},message:o.message}),u.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(te(a=this._getOrReturnCtx(t,a),{code:q.invalid_string,validation:{endsWith:o.value},message:o.message}),u.dirty()):o.kind==="datetime"?PD(o).test(t.data)||(te(a=this._getOrReturnCtx(t,a),{code:q.invalid_string,validation:"datetime",message:o.message}),u.dirty()):o.kind==="date"?ID.test(t.data)||(te(a=this._getOrReturnCtx(t,a),{code:q.invalid_string,validation:"date",message:o.message}),u.dirty()):o.kind==="time"?TD(o).test(t.data)||(te(a=this._getOrReturnCtx(t,a),{code:q.invalid_string,validation:"time",message:o.message}),u.dirty()):o.kind==="duration"?kD.test(t.data)||(te(a=this._getOrReturnCtx(t,a),{validation:"duration",code:q.invalid_string,message:o.message}),u.dirty()):o.kind==="ip"?jD(t.data,o.version)||(te(a=this._getOrReturnCtx(t,a),{validation:"ip",code:q.invalid_string,message:o.message}),u.dirty()):o.kind==="jwt"?ND(t.data,o.alg)||(te(a=this._getOrReturnCtx(t,a),{validation:"jwt",code:q.invalid_string,message:o.message}),u.dirty()):o.kind==="cidr"?zD(t.data,o.version)||(te(a=this._getOrReturnCtx(t,a),{validation:"cidr",code:q.invalid_string,message:o.message}),u.dirty()):o.kind==="base64"?OD.test(t.data)||(te(a=this._getOrReturnCtx(t,a),{validation:"base64",code:q.invalid_string,message:o.message}),u.dirty()):o.kind==="base64url"?BD.test(t.data)||(te(a=this._getOrReturnCtx(t,a),{validation:"base64url",code:q.invalid_string,message:o.message}),u.dirty()):Oe.assertNever(o)}}catch(d){i.e(d)}finally{i.f()}return{status:u.value,value:t.data}}},{key:"_regex",value:function(t,n,r){return this.refinement(function(u){return t.test(u)},v({validation:n,code:q.invalid_string},fe.errToObj(r)))}},{key:"_addCheck",value:function(t){return new e(v(v({},this._def),{},{checks:[].concat(G(this._def.checks),[t])}))}},{key:"email",value:function(t){return this._addCheck(v({kind:"email"},fe.errToObj(t)))}},{key:"url",value:function(t){return this._addCheck(v({kind:"url"},fe.errToObj(t)))}},{key:"emoji",value:function(t){return this._addCheck(v({kind:"emoji"},fe.errToObj(t)))}},{key:"uuid",value:function(t){return this._addCheck(v({kind:"uuid"},fe.errToObj(t)))}},{key:"nanoid",value:function(t){return this._addCheck(v({kind:"nanoid"},fe.errToObj(t)))}},{key:"cuid",value:function(t){return this._addCheck(v({kind:"cuid"},fe.errToObj(t)))}},{key:"cuid2",value:function(t){return this._addCheck(v({kind:"cuid2"},fe.errToObj(t)))}},{key:"ulid",value:function(t){return this._addCheck(v({kind:"ulid"},fe.errToObj(t)))}},{key:"base64",value:function(t){return this._addCheck(v({kind:"base64"},fe.errToObj(t)))}},{key:"base64url",value:function(t){return this._addCheck(v({kind:"base64url"},fe.errToObj(t)))}},{key:"jwt",value:function(t){return this._addCheck(v({kind:"jwt"},fe.errToObj(t)))}},{key:"ip",value:function(t){return this._addCheck(v({kind:"ip"},fe.errToObj(t)))}},{key:"cidr",value:function(t){return this._addCheck(v({kind:"cidr"},fe.errToObj(t)))}},{key:"datetime",value:function(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck(v({kind:"datetime",precision:t?.precision===void 0?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0&&n,local:(r=t?.local)!==null&&r!==void 0&&r},fe.errToObj(t?.message)))}},{key:"date",value:function(t){return this._addCheck({kind:"date",message:t})}},{key:"time",value:function(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck(v({kind:"time",precision:t?.precision===void 0?null:t?.precision},fe.errToObj(t?.message)))}},{key:"duration",value:function(t){return this._addCheck(v({kind:"duration"},fe.errToObj(t)))}},{key:"regex",value:function(t,n){return this._addCheck(v({kind:"regex",regex:t},fe.errToObj(n)))}},{key:"includes",value:function(t,n){return this._addCheck(v({kind:"includes",value:t,position:n?.position},fe.errToObj(n?.message)))}},{key:"startsWith",value:function(t,n){return this._addCheck(v({kind:"startsWith",value:t},fe.errToObj(n)))}},{key:"endsWith",value:function(t,n){return this._addCheck(v({kind:"endsWith",value:t},fe.errToObj(n)))}},{key:"min",value:function(t,n){return this._addCheck(v({kind:"min",value:t},fe.errToObj(n)))}},{key:"max",value:function(t,n){return this._addCheck(v({kind:"max",value:t},fe.errToObj(n)))}},{key:"length",value:function(t,n){return this._addCheck(v({kind:"length",value:t},fe.errToObj(n)))}},{key:"nonempty",value:function(t){return this.min(1,fe.errToObj(t))}},{key:"trim",value:function(){return new e(v(v({},this._def),{},{checks:[].concat(G(this._def.checks),[{kind:"trim"}])}))}},{key:"toLowerCase",value:function(){return new e(v(v({},this._def),{},{checks:[].concat(G(this._def.checks),[{kind:"toLowerCase"}])}))}},{key:"toUpperCase",value:function(){return new e(v(v({},this._def),{},{checks:[].concat(G(this._def.checks),[{kind:"toUpperCase"}])}))}},{key:"isDatetime",get:function(){return!!this._def.checks.find(function(t){return t.kind==="datetime"})}},{key:"isDate",get:function(){return!!this._def.checks.find(function(t){return t.kind==="date"})}},{key:"isTime",get:function(){return!!this._def.checks.find(function(t){return t.kind==="time"})}},{key:"isDuration",get:function(){return!!this._def.checks.find(function(t){return t.kind==="duration"})}},{key:"isEmail",get:function(){return!!this._def.checks.find(function(t){return t.kind==="email"})}},{key:"isURL",get:function(){return!!this._def.checks.find(function(t){return t.kind==="url"})}},{key:"isEmoji",get:function(){return!!this._def.checks.find(function(t){return t.kind==="emoji"})}},{key:"isUUID",get:function(){return!!this._def.checks.find(function(t){return t.kind==="uuid"})}},{key:"isNANOID",get:function(){return!!this._def.checks.find(function(t){return t.kind==="nanoid"})}},{key:"isCUID",get:function(){return!!this._def.checks.find(function(t){return t.kind==="cuid"})}},{key:"isCUID2",get:function(){return!!this._def.checks.find(function(t){return t.kind==="cuid2"})}},{key:"isULID",get:function(){return!!this._def.checks.find(function(t){return t.kind==="ulid"})}},{key:"isIP",get:function(){return!!this._def.checks.find(function(t){return t.kind==="ip"})}},{key:"isCIDR",get:function(){return!!this._def.checks.find(function(t){return t.kind==="cidr"})}},{key:"isBase64",get:function(){return!!this._def.checks.find(function(t){return t.kind==="base64"})}},{key:"isBase64url",get:function(){return!!this._def.checks.find(function(t){return t.kind==="base64url"})}},{key:"minLength",get:function(){var t,n=null,r=K(this._def.checks);try{for(r.s();!(t=r.n()).done;){var u=t.value;u.kind==="min"&&(n===null||u.value>n)&&(n=u.value)}}catch(a){r.e(a)}finally{r.f()}return n}},{key:"maxLength",get:function(){var t,n=null,r=K(this._def.checks);try{for(r.s();!(t=r.n()).done;){var u=t.value;u.kind==="max"&&(n===null||u.value<n)&&(n=u.value)}}catch(a){r.e(a)}finally{r.f()}return n}}])})();function RD(e,t){var n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,u=n>r?n:r;return Number.parseInt(e.toFixed(u).replace(".",""))%Number.parseInt(t.toFixed(u).replace(".",""))/Math.pow(10,u)}va.create=function(e){var t;return new va(v({checks:[],typeName:H.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0&&t},ge(e)))};var Bi=(function(){function e(){var t;return se(this,e),(t=De(this,e,arguments)).min=t.gte,t.max=t.lte,t.step=t.multipleOf,t}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ne.number){var n=this._getOrReturnCtx(t);return te(n,{code:q.invalid_type,expected:ne.number,received:n.parsedType}),me}var r,u=void 0,a=new yt,i=K(this._def.checks);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.kind==="int"?Oe.isInteger(t.data)||(te(u=this._getOrReturnCtx(t,u),{code:q.invalid_type,expected:"integer",received:"float",message:o.message}),a.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(te(u=this._getOrReturnCtx(t,u),{code:q.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(te(u=this._getOrReturnCtx(t,u),{code:q.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="multipleOf"?RD(t.data,o.value)!==0&&(te(u=this._getOrReturnCtx(t,u),{code:q.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(te(u=this._getOrReturnCtx(t,u),{code:q.not_finite,message:o.message}),a.dirty()):Oe.assertNever(o)}}catch(s){i.e(s)}finally{i.f()}return{status:a.value,value:t.data}}},{key:"gte",value:function(t,n){return this.setLimit("min",t,!0,fe.toString(n))}},{key:"gt",value:function(t,n){return this.setLimit("min",t,!1,fe.toString(n))}},{key:"lte",value:function(t,n){return this.setLimit("max",t,!0,fe.toString(n))}},{key:"lt",value:function(t,n){return this.setLimit("max",t,!1,fe.toString(n))}},{key:"setLimit",value:function(t,n,r,u){return new e(v(v({},this._def),{},{checks:[].concat(G(this._def.checks),[{kind:t,value:n,inclusive:r,message:fe.toString(u)}])}))}},{key:"_addCheck",value:function(t){return new e(v(v({},this._def),{},{checks:[].concat(G(this._def.checks),[t])}))}},{key:"int",value:function(t){return this._addCheck({kind:"int",message:fe.toString(t)})}},{key:"positive",value:function(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(t)})}},{key:"negative",value:function(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(t)})}},{key:"nonpositive",value:function(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(t)})}},{key:"nonnegative",value:function(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(t)})}},{key:"multipleOf",value:function(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}},{key:"finite",value:function(t){return this._addCheck({kind:"finite",message:fe.toString(t)})}},{key:"safe",value:function(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(t)})}},{key:"minValue",get:function(){var t,n=null,r=K(this._def.checks);try{for(r.s();!(t=r.n()).done;){var u=t.value;u.kind==="min"&&(n===null||u.value>n)&&(n=u.value)}}catch(a){r.e(a)}finally{r.f()}return n}},{key:"maxValue",get:function(){var t,n=null,r=K(this._def.checks);try{for(r.s();!(t=r.n()).done;){var u=t.value;u.kind==="max"&&(n===null||u.value<n)&&(n=u.value)}}catch(a){r.e(a)}finally{r.f()}return n}},{key:"isInt",get:function(){return!!this._def.checks.find(function(t){return t.kind==="int"||t.kind==="multipleOf"&&Oe.isInteger(t.value)})}},{key:"isFinite",get:function(){var t,n=null,r=null,u=K(this._def.checks);try{for(u.s();!(t=u.n()).done;){var a=t.value;if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(r===null||a.value>r)&&(r=a.value):a.kind==="max"&&(n===null||a.value<n)&&(n=a.value)}}catch(i){u.e(i)}finally{u.f()}return Number.isFinite(r)&&Number.isFinite(n)}}])})();Bi.create=function(e){return new Bi(v({checks:[],typeName:H.ZodNumber,coerce:e?.coerce||!1},ge(e)))};var Ii=(function(){function e(){var t;return se(this,e),(t=De(this,e,arguments)).min=t.gte,t.max=t.lte,t}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ne.bigint)return this._getInvalidInput(t);var n,r=void 0,u=new yt,a=K(this._def.checks);try{for(a.s();!(n=a.n()).done;){var i=n.value;i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(te(r=this._getOrReturnCtx(t,r),{code:q.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),u.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(te(r=this._getOrReturnCtx(t,r),{code:q.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),u.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(te(r=this._getOrReturnCtx(t,r),{code:q.not_multiple_of,multipleOf:i.value,message:i.message}),u.dirty()):Oe.assertNever(i)}}catch(o){a.e(o)}finally{a.f()}return{status:u.value,value:t.data}}},{key:"_getInvalidInput",value:function(t){var n=this._getOrReturnCtx(t);return te(n,{code:q.invalid_type,expected:ne.bigint,received:n.parsedType}),me}},{key:"gte",value:function(t,n){return this.setLimit("min",t,!0,fe.toString(n))}},{key:"gt",value:function(t,n){return this.setLimit("min",t,!1,fe.toString(n))}},{key:"lte",value:function(t,n){return this.setLimit("max",t,!0,fe.toString(n))}},{key:"lt",value:function(t,n){return this.setLimit("max",t,!1,fe.toString(n))}},{key:"setLimit",value:function(t,n,r,u){return new e(v(v({},this._def),{},{checks:[].concat(G(this._def.checks),[{kind:t,value:n,inclusive:r,message:fe.toString(u)}])}))}},{key:"_addCheck",value:function(t){return new e(v(v({},this._def),{},{checks:[].concat(G(this._def.checks),[t])}))}},{key:"positive",value:function(t){return this._addCheck({kind:"min",value:
107BigInt(0),inclusive:!1,message:fe.toString(t)})}},{key:"negative",value:function(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}},{key:"nonpositive",value:function(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}},{key:"nonnegative",value:function(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}},{key:"multipleOf",value:function(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}},{key:"minValue",get:function(){var t,n=null,r=K(this._def.checks);try{for(r.s();!(t=r.n()).done;){var u=t.value;u.kind==="min"&&(n===null||u.value>n)&&(n=u.value)}}catch(a){r.e(a)}finally{r.f()}return n}},{key:"maxValue",get:function(){var t,n=null,r=K(this._def.checks);try{for(r.s();!(t=r.n()).done;){var u=t.value;u.kind==="max"&&(n===null||u.value<n)&&(n=u.value)}}catch(a){r.e(a)}finally{r.f()}return n}}])})();Ii.create=function(e){var t;return new Ii(v({checks:[],typeName:H.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0&&t},ge(e)))};var Ti=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ne.boolean){var n=this._getOrReturnCtx(t);return te(n,{code:q.invalid_type,expected:ne.boolean,received:n.parsedType}),me}return dt(t.data)}}])})();Ti.create=function(e){return new Ti(v({typeName:H.ZodBoolean,coerce:e?.coerce||!1},ge(e)))};var Pi=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){var n=this._getOrReturnCtx(t);return te(n,{code:q.invalid_type,expected:ne.date,received:n.parsedType}),me}if(Number.isNaN(t.data.getTime()))return te(this._getOrReturnCtx(t),{code:q.invalid_date}),me;var r,u=new yt,a=void 0,i=K(this._def.checks);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.kind==="min"?t.data.getTime()<o.value&&(te(a=this._getOrReturnCtx(t,a),{code:q.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),u.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(te(a=this._getOrReturnCtx(t,a),{code:q.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),u.dirty()):Oe.assertNever(o)}}catch(s){i.e(s)}finally{i.f()}return{status:u.value,value:new Date(t.data.getTime())}}},{key:"_addCheck",value:function(t){return new e(v(v({},this._def),{},{checks:[].concat(G(this._def.checks),[t])}))}},{key:"min",value:function(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:fe.toString(n)})}},{key:"max",value:function(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:fe.toString(n)})}},{key:"minDate",get:function(){var t,n=null,r=K(this._def.checks);try{for(r.s();!(t=r.n()).done;){var u=t.value;u.kind==="min"&&(n===null||u.value>n)&&(n=u.value)}}catch(a){r.e(a)}finally{r.f()}return n!=null?new Date(n):null}},{key:"maxDate",get:function(){var t,n=null,r=K(this._def.checks);try{for(r.s();!(t=r.n()).done;){var u=t.value;u.kind==="max"&&(n===null||u.value<n)&&(n=u.value)}}catch(a){r.e(a)}finally{r.f()}return n!=null?new Date(n):null}}])})();Pi.create=function(e){return new Pi(v({checks:[],coerce:e?.coerce||!1,typeName:H.ZodDate},ge(e)))};var ji=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){if(this._getType(t)!==ne.symbol){var n=this._getOrReturnCtx(t);return te(n,{code:q.invalid_type,expected:ne.symbol,received:n.parsedType}),me}return dt(t.data)}}])})();ji.create=function(e){return new ji(v({typeName:H.ZodSymbol},ge(e)))};var ma=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){if(this._getType(t)!==ne.undefined){var n=this._getOrReturnCtx(t);return te(n,{code:q.invalid_type,expected:ne.undefined,received:n.parsedType}),me}return dt(t.data)}}])})();ma.create=function(e){return new ma(v({typeName:H.ZodUndefined},ge(e)))};var Da=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){if(this._getType(t)!==ne.null){var n=this._getOrReturnCtx(t);return te(n,{code:q.invalid_type,expected:ne.null,received:n.parsedType}),me}return dt(t.data)}}])})();Da.create=function(e){return new Da(v({typeName:H.ZodNull},ge(e)))};var Ni=(function(){function e(){var t;return se(this,e),(t=De(this,e,arguments))._any=!0,t}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){return dt(t.data)}}])})();Ni.create=function(e){return new Ni(v({typeName:H.ZodAny},ge(e)))};var lr=(function(){function e(){var t;return se(this,e),(t=De(this,e,arguments))._unknown=!0,t}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){return dt(t.data)}}])})();lr.create=function(e){return new lr(v({typeName:H.ZodUnknown},ge(e)))};var mn=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=this._getOrReturnCtx(t);return te(n,{code:q.invalid_type,expected:ne.never,received:n.parsedType}),me}}])})();mn.create=function(e){return new mn(v({typeName:H.ZodNever},ge(e)))};var zi=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){if(this._getType(t)!==ne.undefined){var n=this._getOrReturnCtx(t);return te(n,{code:q.invalid_type,expected:ne.void,received:n.parsedType}),me}return dt(t.data)}}])})();zi.create=function(e){return new zi(v({typeName:H.ZodVoid},ge(e)))};var gr=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t),r=n.ctx,u=n.status,a=this._def;if(r.parsedType!==ne.array)return te(r,{code:q.invalid_type,expected:ne.array,received:r.parsedType}),me;if(a.exactLength!==null){var i=r.data.length>a.exactLength.value,o=r.data.length<a.exactLength.value;(i||o)&&(te(r,{code:i?q.too_big:q.too_small,minimum:o?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),u.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(te(r,{code:q.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),u.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(te(r,{code:q.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),u.dirty()),r.common.async)return Promise.all(G(r.data).map(function(c,d){return a.type._parseAsync(new Ht(r,c,r.path,d))})).then(function(c){return yt.mergeArray(u,c)});var s=G(r.data).map(function(c,d){return a.type._parseSync(new Ht(r,c,r.path,d))});return yt.mergeArray(u,s)}},{key:"element",get:function(){return this._def.type}},{key:"min",value:function(t,n){return new e(v(v({},this._def),{},{minLength:{value:t,message:fe.toString(n)}}))}},{key:"max",value:function(t,n){return new e(v(v({},this._def),{},{maxLength:{value:t,message:fe.toString(n)}}))}},{key:"length",value:function(t,n){return new e(v(v({},this._def),{},{exactLength:{value:t,message:fe.toString(n)}}))}},{key:"nonempty",value:function(t){return this.min(1,t)}}])})();function rr(e){if(e instanceof It){var t={};for(var n in e.shape){var r=e.shape[n];t[n]=nn.create(rr(r))}return new It(v(v({},e._def),{},{shape:function(){return t}}))}return e instanceof gr?new gr(v(v({},e._def),{},{type:rr(e.element)})):e instanceof nn?nn.create(rr(e.unwrap())):e instanceof $n?$n.create(rr(e.unwrap())):e instanceof Ln?Ln.create(e.items.map(function(u){return rr(u)})):e}gr.create=function(e,t){return new gr(v({type:e,minLength:null,maxLength:null,exactLength:null,typeName:H.ZodArray},ge(t)))};var It=(function(){function e(){var t;return se(this,e),(t=De(this,e,arguments))._cached=null,t.nonstrict=t.passthrough,t.augment=t.extend,t}return ve(e,Ae),ce(e,[{key:"_getCached",value:function(){if(this._cached!==null)return this._cached;var t=this._def.shape(),n=Oe.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}},{key:"_parse",value:function(t){if(this._getType(t)!==ne.object){var n=this._getOrReturnCtx(t);return te(n,{code:q.invalid_type,expected:ne.object,received:n.parsedType}),me}var r=this._processInputParams(t),u=r.status,a=r.ctx,i=this._getCached(),o=i.shape,s=i.keys,c=[];if(!(this._def.catchall instanceof mn&&this._def.unknownKeys==="strip"))for(var d in a.data)s.includes(d)||c.push(d);var f,l=[],h=K(s);try{for(h.s();!(f=h.n()).done;){var m=f.value,D=o[m],y=a.data[m];
107l.push({key:{status:"valid",value:m},value:D._parse(new Ht(a,y,a.path,m)),alwaysSet:m in a.data})}}catch(P){h.e(P)}finally{h.f()}if(this._def.catchall instanceof mn){var E=this._def.unknownKeys;if(E==="passthrough"){var g,b=K(c);try{for(b.s();!(g=b.n()).done;){var F=g.value;l.push({key:{status:"valid",value:F},value:{status:"valid",value:a.data[F]}})}}catch(P){b.e(P)}finally{b.f()}}else if(E==="strict")c.length>0&&(te(a,{code:q.unrecognized_keys,keys:c}),u.dirty());else if(E!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{var _,k=this._def.catchall,C=K(c);try{for(C.s();!(_=C.n()).done;){var A=_.value,N=a.data[A];l.push({key:{status:"valid",value:A},value:k._parse(new Ht(a,N,a.path,A)),alwaysSet:A in a.data})}}catch(P){C.e(P)}finally{C.f()}}return a.common.async?Promise.resolve().then(be(X().m(function P(){var I,O,Z,B,L,S,w;return X().w(function(x){for(;;)switch(x.p=x.n){case 0:I=[],O=K(l),x.p=1,O.s();case 2:if((Z=O.n()).done){x.n=6;break}return B=Z.value,x.n=3,B.key;case 3:return L=x.v,x.n=4,B.value;case 4:S=x.v,I.push({key:L,value:S,alwaysSet:B.alwaysSet});case 5:x.n=2;break;case 6:x.n=8;break;case 7:x.p=7,w=x.v,O.e(w);case 8:return x.p=8,O.f(),x.f(8);case 9:return x.a(2,I)}},P,null,[[1,7,8,9]])}))).then(function(P){return yt.mergeObjectSync(u,P)}):yt.mergeObjectSync(u,l)}},{key:"shape",get:function(){return this._def.shape()}},{key:"strict",value:function(t){var n=this;return fe.errToObj,new e(v(v({},this._def),{},{unknownKeys:"strict"},t!==void 0?{errorMap:function(r,u){var a,i,o,s,c=(a=(i=(o=n._def).errorMap)===null||i===void 0?void 0:i.call(o,r,u).message)!==null&&a!==void 0?a:u.defaultError;return r.code==="unrecognized_keys"?{message:(s=fe.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}))}},{key:"strip",value:function(){return new e(v(v({},this._def),{},{unknownKeys:"strip"}))}},{key:"passthrough",value:function(){return new e(v(v({},this._def),{},{unknownKeys:"passthrough"}))}},{key:"extend",value:function(t){var n=this;return new e(v(v({},this._def),{},{shape:function(){return v(v({},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 v(v({},n._def.shape()),t._def.shape())},typeName:H.ZodObject})}},{key:"setKey",value:function(t,n){return this.augment(Se({},t,n))}},{key:"catchall",value:function(t){return new e(v(v({},this._def),{},{catchall:t}))}},{key:"pick",value:function(t){var n,r={},u=K(Oe.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(i){u.e(i)}finally{u.f()}return new e(v(v({},this._def),{},{shape:function(){return r}}))}},{key:"omit",value:function(t){var n,r={},u=K(Oe.objectKeys(this.shape));try{for(u.s();!(n=u.n()).done;){var a=n.value;t[a]||(r[a]=this.shape[a])}}catch(i){u.e(i)}finally{u.f()}return new e(v(v({},this._def),{},{shape:function(){return r}}))}},{key:"deepPartial",value:function(){return rr(this)}},{key:"partial",value:function(t){var n,r={},u=K(Oe.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(o){u.e(o)}finally{u.f()}return new e(v(v({},this._def),{},{shape:function(){return r}}))}},{key:"required",value:function(t){var n,r={},u=K(Oe.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 nn;)i=i._def.innerType;r[a]=i}}}catch(o){u.e(o)}finally{u.f()}return new e(v(v({},this._def),{},{shape:function(){return r}}))}},{key:"keyof",value:function(){return ad(Oe.objectKeys(this.shape))}}])})();It.create=function(e,t){return new It(v({shape:function(){return e},unknownKeys:"strip",catchall:mn.create(),typeName:H.ZodObject},ge(t)))},It.strictCreate=function(e,t){return new It(v({shape:function(){return e},unknownKeys:"strict",catchall:mn.create(),typeName:H.ZodObject},ge(t)))},It.lazycreate=function(e,t){return new It(v({shape:e,unknownKeys:"strip",catchall:mn.create(),typeName:H.ZodObject},ge(t)))};var ga=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t).ctx,r=this._def.options;if(n.common.async)return Promise.all(r.map((function(){var h=be(X().m(function m(D){var y,E,g;return X().w(function(b){for(;;)switch(b.n){case 0:return y=v(v({},n),{},{common:v(v({}
107,n.common),{},{issues:[]}),parent:null}),b.n=1,D._parseAsync({data:n.data,path:n.path,parent:y});case 1:return E=b.v,g=y,b.a(2,{result:E,ctx:g})}},m)}));return function(m){return h.apply(this,arguments)}})())).then(function(h){var m,D=K(h);try{for(D.s();!(m=D.n()).done;){var y=m.value;if(y.result.status==="valid")return y.result}}catch(k){D.e(k)}finally{D.f()}var E,g=K(h);try{for(g.s();!(E=g.n()).done;){var b,F=E.value;if(F.result.status==="dirty")return(b=n.common.issues).push.apply(b,G(F.ctx.common.issues)),F.result}}catch(k){g.e(k)}finally{g.f()}var _=h.map(function(k){return new Ut(k.ctx.common.issues)});return te(n,{code:q.invalid_union,unionErrors:_}),me});var u,a,i=void 0,o=[],s=K(r);try{for(s.s();!(u=s.n()).done;){var c=u.value,d=v(v({},n),{},{common:v(v({},n.common),{},{issues:[]}),parent:null}),f=c._parseSync({data:n.data,path:n.path,parent:d});if(f.status==="valid")return f;f.status!=="dirty"||i||(i={result:f,ctx:d}),d.common.issues.length&&o.push(d.common.issues)}}catch(h){s.e(h)}finally{s.f()}if(i)return(a=n.common.issues).push.apply(a,G(i.ctx.common.issues)),i.result;var l=o.map(function(h){return new Ut(h)});return te(n,{code:q.invalid_union,unionErrors:l}),me}},{key:"options",get:function(){return this._def.options}}])})();ga.create=function(e,t){return new ga(v({options:e,typeName:H.ZodUnion},ge(t)))};var fn=function(e){return e instanceof Fa?fn(e.schema):e instanceof Xt?fn(e.innerType()):e instanceof Ea?[e.value]:e instanceof Pa?e.options:e instanceof ba?Oe.objectValues(e.enum):e instanceof _a?fn(e._def.innerType):e instanceof ma?[void 0]:e instanceof Da?[null]:e instanceof nn?[void 0].concat(G(fn(e.unwrap()))):e instanceof $n?[null].concat(G(fn(e.unwrap()))):e instanceof id||e instanceof Ca?fn(e.unwrap()):e instanceof ka?fn(e._def.innerType):[]},MD=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t).ctx;if(n.parsedType!==ne.object)return te(n,{code:q.invalid_type,expected:ne.object,received:n.parsedType}),me;var r=this.discriminator,u=n.data[r],a=this.optionsMap.get(u);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(te(n,{code:q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}},{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=K(n);try{for(i.s();!(u=i.n()).done;){var o=u.value,s=fn(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,d=K(s);try{for(d.s();!(c=d.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(l){d.e(l)}finally{d.f()}}}catch(l){i.e(l)}finally{i.f()}return new e(v({typeName:H.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a},ge(r)))}}])})();function Ri(e,t){var n=pn(e),r=pn(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){var u,a=Oe.objectKeys(t),i=Oe.objectKeys(e).filter(function(m){return a.indexOf(m)!==-1}),o=v(v({},e),t),s=K(i);try{for(s.s();!(u=s.n()).done;){var c=u.value,d=Ri(e[c],t[c]);if(!d.valid)return{valid:!1};o[c]=d.data}}catch(m){s.e(m)}finally{s.f()}return{valid:!0,data:o}}if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};for(var f=[],l=0;l<e.length;l++){var h=Ri(e[l],t[l]);if(!h.valid)return{valid:!1};f.push(h.data)}return{valid:!0,data:f}}return n===ne.date&&r===ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var ya=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t),r=n.status,u=n.ctx,a=function(i,o){if(Mc(i)||Mc(o))return me;var s=Ri(i.value,o.value);return s.valid?((Zc(i)||Zc(o))&&r.dirty(),{status:r.value,value:s.data}):(te(u,{code:q.invalid_intersection_types}),me)};return u.common.async?Promise.all([this._def.left._parseAsync({data:u.data,path:u.path,parent:u}),this._def.right._parseAsync({data:u.data,path:u.path,parent:u})]).then(function(i){var o=xe(i,2),s=o[0],c=o[1];return a(s,c)}):a(this._def.left._parseSync({data:u.data,path:u.path,parent:u}),this._def.right._parseSync({data:u.data,path:u.path,parent:u}))}}])})();ya.create=function(e,t,n){return new ya(v({left:e,right:t,typeName:H.ZodIntersection},ge(n)))};var Ln=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=this,r=this._processInputParams(t),u=r.status,a=r.ctx;
107if(a.parsedType!==ne.array)return te(a,{code:q.invalid_type,expected:ne.array,received:a.parsedType}),me;if(a.data.length<this._def.items.length)return te(a,{code:q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&a.data.length>this._def.items.length&&(te(a,{code:q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),u.dirty());var i=G(a.data).map(function(o,s){var c=n._def.items[s]||n._def.rest;return c?c._parse(new Ht(a,o,a.path,s)):null}).filter(function(o){return!!o});return a.common.async?Promise.all(i).then(function(o){return yt.mergeArray(u,o)}):yt.mergeArray(u,i)}},{key:"items",get:function(){return this._def.items}},{key:"rest",value:function(t){return new e(v(v({},this._def),{},{rest:t}))}}])})();Ln.create=function(e,t){if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ln(v({items:e,typeName:H.ZodTuple,rest:null},ge(t)))};var ZD=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(t){var n=this._processInputParams(t),r=n.status,u=n.ctx;if(u.parsedType!==ne.object)return te(u,{code:q.invalid_type,expected:ne.object,received:u.parsedType}),me;var a=[],i=this._def.keyType,o=this._def.valueType;for(var s in u.data)a.push({key:i._parse(new Ht(u,s,u.path,s)),value:o._parse(new Ht(u,u.data[s],u.path,s)),alwaysSet:s in u.data});return u.common.async?yt.mergeObjectAsync(r,a):yt.mergeObjectSync(r,a)}},{key:"element",get:function(){return this._def.valueType}}],[{key:"create",value:function(t,n,r){return new e(n instanceof Ae?v({keyType:t,valueType:n,typeName:H.ZodRecord},ge(r)):v({keyType:va.create(),valueType:t,typeName:H.ZodRecord},ge(n)))}}])})(),Mi=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(t){var n=this._processInputParams(t),r=n.status,u=n.ctx;if(u.parsedType!==ne.map)return te(u,{code:q.invalid_type,expected:ne.map,received:u.parsedType}),me;var a=this._def.keyType,i=this._def.valueType,o=G(u.data.entries()).map(function(D,y){var E=xe(D,2),g=E[0],b=E[1];return{key:a._parse(new Ht(u,g,u.path,[y,"key"])),value:i._parse(new Ht(u,b,u.path,[y,"value"]))}});if(u.common.async){var s=new Map;return Promise.resolve().then(be(X().m(function D(){var y,E,g,b,F,_;return X().w(function(k){for(;;)switch(k.p=k.n){case 0:y=K(o),k.p=1,y.s();case 2:if((E=y.n()).done){k.n=7;break}return g=E.value,k.n=3,g.key;case 3:return b=k.v,k.n=4,g.value;case 4:if(F=k.v,b.status!=="aborted"&&F.status!=="aborted"){k.n=5;break}return k.a(2,me);case 5:b.status!=="dirty"&&F.status!=="dirty"||r.dirty(),s.set(b.value,F.value);case 6:k.n=2;break;case 7:k.n=9;break;case 8:k.p=8,_=k.v,y.e(_);case 9:return k.p=9,y.f(),k.f(9);case 10:return k.a(2,{status:r.value,value:s})}},D,null,[[1,8,9,10]])})))}var c,d=new Map,f=K(o);try{for(f.s();!(c=f.n()).done;){var l=c.value,h=l.key,m=l.value;if(h.status==="aborted"||m.status==="aborted")return me;h.status!=="dirty"&&m.status!=="dirty"||r.dirty(),d.set(h.value,m.value)}}catch(D){f.e(D)}finally{f.f()}return{status:r.value,value:d}}}])})();Mi.create=function(e,t,n){return new Mi(v({valueType:t,keyType:e,typeName:H.ZodMap},ge(n)))};var Zi=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t),r=n.status,u=n.ctx;if(u.parsedType!==ne.set)return te(u,{code:q.invalid_type,expected:ne.set,received:u.parsedType}),me;var a=this._def;a.minSize!==null&&u.data.size<a.minSize.value&&(te(u,{code:q.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&u.data.size>a.maxSize.value&&(te(u,{code:q.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());var i=this._def.valueType;function o(c){var d,f=new Set,l=K(c);try{for(l.s();!(d=l.n()).done;){var h=d.value;if(h.status==="aborted")return me;h.status==="dirty"&&r.dirty(),f.add(h.value)}}catch(m){l.e(m)}finally{l.f()}return{status:r.value,value:f}}var s=G(u.data.values()).map(function(c,d){return i._parse(new Ht(u,c,u.path,d))});return u.common.async?Promise.all(s).then(function(c){return o(c)}):o(s)}},{key:"min",value:function(t,n){return new e(v(v({},this._def),{},{minSize:{value:t,message:fe.toString(n)}}))}},{key:"max",value:function(t,n){return new e(v(v({},this._def),{},{maxSize:{value:t,message:fe.toString(n)}}))}},{key:"size",value:function(t,n){return this.min(t,n).max(t,n)}},{key:"nonempty",value:function(t){return this.min(1,t)}}])})();
107Zi.create=function(e,t){return new Zi(v({valueType:e,minSize:null,maxSize:null,typeName:H.ZodSet},ge(t)))};var LD=(function(){function e(){var t;return se(this,e),(t=De(this,e,arguments)).validate=t.implement,t}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t).ctx;if(n.parsedType!==ne.function)return te(n,{code:q.invalid_type,expected:ne.function,received:n.parsedType}),me;function r(c,d){return Oi({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xi(),bu].filter(function(f){return!!f}),issueData:{code:q.invalid_arguments,argumentsError:d}})}function u(c,d){return Oi({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xi(),bu].filter(function(f){return!!f}),issueData:{code:q.invalid_return_type,returnTypeError:d}})}var a={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof _u){var o=this;return dt(be(X().m(function c(){var d,f,l,h,m,D,y,E=arguments;return X().w(function(g){for(;;)switch(g.n){case 0:for(d=E.length,f=new Array(d),l=0;l<d;l++)f[l]=E[l];return h=new Ut([]),g.n=1,o._def.args.parseAsync(f,a).catch(function(b){throw h.addIssue(r(f,b)),h});case 1:return m=g.v,g.n=2,Reflect.apply(i,this,m);case 2:return D=g.v,g.n=3,o._def.returns._def.type.parseAsync(D,a).catch(function(b){throw h.addIssue(u(D,b)),h});case 3:return y=g.v,g.a(2,y)}},c,this)})))}var s=this;return dt(function(){for(var c=arguments.length,d=new Array(c),f=0;f<c;f++)d[f]=arguments[f];var l=s._def.args.safeParse(d,a);if(!l.success)throw new Ut([r(d,l.error)]);var h=Reflect.apply(i,this,l.data),m=s._def.returns.safeParse(h,a);if(!m.success)throw new Ut([u(h,m.error)]);return m.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(v(v({},this._def),{},{args:Ln.create(n).rest(lr.create())}))}},{key:"returns",value:function(t){return new e(v(v({},this._def),{},{returns:t}))}},{key:"implement",value:function(t){return this.parse(t)}},{key:"strictImplement",value:function(t){return this.parse(t)}}],[{key:"create",value:function(t,n,r){return new e(v({args:t||Ln.create([]).rest(lr.create()),returns:n||lr.create(),typeName:H.ZodFunction},ge(r)))}}])})(),Fa=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"schema",get:function(){return this._def.getter()}},{key:"_parse",value:function(t){var n=this._processInputParams(t).ctx;return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}])})();Fa.create=function(e,t){return new Fa(v({getter:e,typeName:H.ZodLazy},ge(t)))};var Ea=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){if(t.data!==this._def.value){var n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:q.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}},{key:"value",get:function(){return this._def.value}}])})();function ad(e,t){return new Pa(v({values:e,typeName:H.ZodEnum},ge(t)))}Ea.create=function(e,t){return new Ea(v({value:e,typeName:H.ZodLiteral},ge(t)))};var Pa=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){if(typeof t.data!="string"){var n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:Oe.joinValues(r),received:n.parsedType,code:q.invalid_type}),me}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){var u=this._getOrReturnCtx(t),a=this._def.values;return te(u,{received:u.data,code:q.invalid_enum_value,options:a}),me}return dt(t.data)}},{key:"options",get:function(){return this._def.values}},{key:"enum",get:function(){var t,n={},r=K(this._def.values);try{for(r.s();!(t=r.n()).done;){var u=t.value;n[u]=u}}catch(a){r.e(a)}finally{r.f()}return n}},{key:"Values",get:function(){var t,n={},r=K(this._def.values);try{for(r.s();!(t=r.n()).done;){var u=t.value;n[u]=u}}catch(a){r.e(a)}finally{r.f()}return n}},{key:"Enum",get:function(){var t,n={},r=K(this._def.values);try{for(r.s();!(t=r.n()).done;){var u=t.value;n[u]=u}}catch(a){r.e(a)}finally{r.f()}return n}},{key:"extract",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._def;return e.create(t,v(v({},this._def),n))}},{key:"exclude",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._def;return e.create(this.options.filter(function(r){return!t.includes(r)}),v(v({},this._def),n))}}])})();Pa.create=ad;var ba=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=Oe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);
107if(r.parsedType!==ne.string&&r.parsedType!==ne.number){var u=Oe.objectValues(n);return te(r,{expected:Oe.joinValues(u),received:r.parsedType,code:q.invalid_type}),me}if(this._cache||(this._cache=new Set(Oe.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){var a=Oe.objectValues(n);return te(r,{received:r.data,code:q.invalid_enum_value,options:a}),me}return dt(t.data)}},{key:"enum",get:function(){return this._def.values}}])})();ba.create=function(e,t){return new ba(v({values:e,typeName:H.ZodNativeEnum},ge(t)))};var _u=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"unwrap",value:function(){return this._def.type}},{key:"_parse",value:function(t){var n=this,r=this._processInputParams(t).ctx;if(r.parsedType!==ne.promise&&r.common.async===!1)return te(r,{code:q.invalid_type,expected:ne.promise,received:r.parsedType}),me;var u=r.parsedType===ne.promise?r.data:Promise.resolve(r.data);return dt(u.then(function(a){return n._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})}))}}])})();_u.create=function(e,t){return new _u(v({type:e,typeName:H.ZodPromise},ge(t)))};var Xt=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"innerType",value:function(){return this._def.schema}},{key:"sourceType",value:function(){return this._def.schema._def.typeName===H.ZodEffects?this._def.schema.sourceType():this._def.schema}},{key:"_parse",value:function(t){var n=this,r=this._processInputParams(t),u=r.status,a=r.ctx,i=this._def.effect||null,o={addIssue:function(m){te(a,m),m.fatal?u.abort():u.dirty()},get path(){return a.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){var s=i.transform(a.data,o);if(a.common.async)return Promise.resolve(s).then((function(){var m=be(X().m(function D(y){var E;return X().w(function(g){for(;;)switch(g.n){case 0:if(u.value!=="aborted"){g.n=1;break}return g.a(2,me);case 1:return g.n=2,n._def.schema._parseAsync({data:y,path:a.path,parent:a});case 2:if((E=g.v).status!=="aborted"){g.n=3;break}return g.a(2,me);case 3:if(E.status!=="dirty"){g.n=4;break}return g.a(2,Yu(E.value));case 4:if(u.value!=="dirty"){g.n=5;break}return g.a(2,Yu(E.value));case 5:return g.a(2,E)}},D)}));return function(D){return m.apply(this,arguments)}})());if(u.value==="aborted")return me;var c=this._def.schema._parseSync({data:s,path:a.path,parent:a});return c.status==="aborted"?me:c.status==="dirty"||u.value==="dirty"?Yu(c.value):c}if(i.type==="refinement"){var d=function(m){var D=i.refinement(m,o);if(a.common.async)return Promise.resolve(D);if(D instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return m};if(a.common.async===!1){var f=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return f.status==="aborted"?me:(f.status==="dirty"&&u.dirty(),d(f.value),{status:u.value,value:f.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(function(m){return m.status==="aborted"?me:(m.status==="dirty"&&u.dirty(),d(m.value).then(function(){return{status:u.value,value:m.value}}))})}if(i.type==="transform"){if(a.common.async===!1){var l=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Dr(l))return me;var h=i.transform(l.value,o);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:u.value,value:h}}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(function(m){return Dr(m)?Promise.resolve(i.transform(m.value,o)).then(function(D){return{status:u.value,value:D}}):me})}Oe.assertNever(i)}}])})();Xt.create=function(e,t,n){return new Xt(v({schema:e,typeName:H.ZodEffects,effect:t},ge(n)))},Xt.createWithPreprocess=function(e,t,n){return new Xt(v({schema:t,effect:{type:"preprocess",transform:e},typeName:H.ZodEffects},ge(n)))};var nn=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){return this._getType(t)===ne.undefined?dt(void 0):this._def.innerType._parse(t)}},{key:"unwrap",value:function(){return this._def.innerType}}])})();nn.create=function(e,t){return new nn(v({innerType:e,typeName:H.ZodOptional},ge(t)))};var $n=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){return this._getType(t)===ne.null?dt(null):this._def.innerType._parse(t)}},{key:"unwrap",value:function(){return this._def.innerType}}])})();$n.create=function(e,t){return new $n(v({innerType:e,typeName:H.ZodNullable},ge(t)))};var _a=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t).ctx,r=n.data;return n.parsedType===ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}},{key:"removeDefault",value:function(){return this._def.innerType}}])})();_a.create=function(e,t){return new _a(v({innerType:e,typeName:H.ZodDefault,defaultValue:typeof t.default=="function"?t.default:function(){return t.default}},ge(t)))};var ka=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=this,r=this._processInputParams(t).ctx,u=v(v({},r),{},{common:v(v({},r.common),{},{issues:[]})}),a=this._def.innerType._parse({data:u.data,path:u.path,parent:v({},u)});
107return ha(a)?a.then(function(i){return{status:"valid",value:i.status==="valid"?i.value:n._def.catchValue({get error(){return new Ut(u.common.issues)},input:u.data})}}):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ut(u.common.issues)},input:u.data})}}},{key:"removeCatch",value:function(){return this._def.innerType}}])})();ka.create=function(e,t){return new ka(v({innerType:e,typeName:H.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:function(){return t.catch}},ge(t)))};var Li=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){if(this._getType(t)!==ne.nan){var n=this._getOrReturnCtx(t);return te(n,{code:q.invalid_type,expected:ne.nan,received:n.parsedType}),me}return{status:"valid",value:t.data}}}])})();Li.create=function(e){return new Li(v({typeName:H.ZodNaN},ge(e)))};var H,id=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t).ctx,r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}},{key:"unwrap",value:function(){return this._def.type}}])})(),od=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=this,r=this._processInputParams(t),u=r.status,a=r.ctx;if(a.common.async){var i=(function(){var s=be(X().m(function c(){var d;return X().w(function(f){for(;;)switch(f.n){case 0:return f.n=1,n._def.in._parseAsync({data:a.data,path:a.path,parent:a});case 1:if((d=f.v).status!=="aborted"){f.n=2;break}return f.a(2,me);case 2:if(d.status!=="dirty"){f.n=3;break}return u.dirty(),f.a(2,Yu(d.value));case 3:return f.a(2,n._def.out._parseAsync({data:d.value,path:a.path,parent:a}));case 4:return f.a(2)}},c)}));return function(){return s.apply(this,arguments)}})();return i()}var o=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?me:o.status==="dirty"?(u.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:a.path,parent:a})}}],[{key:"create",value:function(t,n){return new e({in:t,out:n,typeName:H.ZodPipeline})}}])})(),Ca=(function(){function e(){return se(this,e),De(this,e,arguments)}return ve(e,Ae),ce(e,[{key:"_parse",value:function(t){var n=this._def.innerType._parse(t),r=function(u){return Dr(u)&&(u.value=Object.freeze(u.value)),u};return ha(n)?n.then(function(u){return r(u)}):r(n)}},{key:"unwrap",value:function(){return this._def.innerType}}])})();Ca.create=function(e,t){return new Ca(v({innerType:e,typeName:H.ZodReadonly},ge(t)))},It.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"})(H||(H={})),va.create,Bi.create,Li.create,Ii.create,Ti.create,Pi.create,ji.create,ma.create,Da.create,Ni.create,lr.create,mn.create,zi.create,gr.create,It.create,It.strictCreate,ga.create,MD.create,ya.create,Ln.create,ZD.create,Mi.create,Zi.create,LD.create,Fa.create,Ea.create,Pa.create,ba.create,_u.create,Xt.create,nn.create,$n.create,Xt.createWithPreprocess,od.create;var ku=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.prefix,n=e.size,r=n===void 0?16:n,u=e.alphabet,a=u===void 0?"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz":u,i=e.separator,o=i===void 0?"-":i,s=function(){for(var c=a.length,d=new Array(r),f=0;f<r;f++)d[f]=a[Math.random()*c|0];return d.join("")};if(t==null)return s;if(a.includes(o))throw new Sh({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())}},$i=ku();function $c(){var e,t,n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:globalThis;return r.window?"runtime/browser":(e=r.navigator)!=null&&e.userAgent?"runtime/".concat(r.navigator.userAgent.toLowerCase()):(n=(t=r.process)==null?void 0:t.ver
107sions)!=null&&n.node?"runtime/node.js/".concat(r.process.version.substring(0)):r.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function Nn(e){if(e==null)return{};var t={};if(e instanceof Headers)e.forEach(function(o,s){t[s.toLowerCase()]=o});else{Array.isArray(e)||(e=Object.entries(e));var n,r=fr(e);try{for(r.s();!(n=r.n()).done;){var u=ii(n.value,2),a=u[0],i=u[1];i!=null&&(t[a.toLowerCase()]=i)}}catch(o){r.e(o)}finally{r.f()}}return t}function qc(e){for(var t=new Headers(Nn(e)),n=t.get("user-agent")||"",r=arguments.length,u=new Array(r>1?r-1:0),a=1;a<r;a++)u[a-1]=arguments[a];return t.set("user-agent",[n].concat(u).filter(Boolean).join(" ")),Object.fromEntries(t.entries())}var $D=/"__proto__"\s*:/,qD=/"constructor"\s*:/;function Uc(e){var t=JSON.parse(e);return t===null||re(t)!="object"||$D.test(e)===!1&&qD.test(e)===!1?t:(function(n){for(var r=[n];r.length;){var u=r;r=[];var a,i=fr(u);try{for(i.s();!(a=i.n()).done;){var o=a.value;if(Object.prototype.hasOwnProperty.call(o,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(var s in o){var c=o[s];c&&re(c)=="object"&&r.push(c)}}}catch(d){i.e(d)}finally{i.f()}}return n})(t)}var Xu=Symbol.for("vercel.ai.validator");function UD(e){return(function(r){return re(r)=="object"&&r!==null&&Xu in r&&r[Xu]===!0&&"validate"in r})(e)?e:typeof e=="function"?e():(t=e,n=(function(){var r=Be(ae().m(function u(a){var i;return ae().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,t["~standard"].validate(a);case 1:return i=o.v,o.a(2,i.issues==null?{success:!0,value:i.value}:{success:!1,error:new ca({value:a,cause:i.issues})})}},u)}));return function(u){return r.apply(this,arguments)}})(),Tt(Tt({},Xu,!0),"validate",n));var t,n}function Hc(e){return qi.apply(this,arguments)}function qi(){return qi=Be(ae().m(function e(t){var n,r,u;return ae().w(function(a){for(;;)switch(a.n){case 0:return n=t.value,r=t.schema,a.n=1,No({value:n,schema:r});case 1:if((u=a.v).success){a.n=2;break}throw ca.wrap({value:n,cause:u.error});case 2:return a.a(2,u.value)}},e)})),qi.apply(this,arguments)}function No(e){return Ui.apply(this,arguments)}function Ui(){return Ui=Be(ae().m(function e(t){var n,r,u,a,i;return ae().w(function(o){for(;;)switch(o.p=o.n){case 0:if(n=t.value,r=t.schema,u=UD(r),o.p=1,u.validate!=null){o.n=2;break}return o.a(2,{success:!0,value:n,rawValue:n});case 2:return o.n=3,u.validate(n);case 3:return a=o.v,o.a(2,a.success?{success:!0,value:a.value,rawValue:n}:{success:!1,error:ca.wrap({value:n,cause:a.error}),rawValue:n});case 4:return o.p=4,i=o.v,o.a(2,{success:!1,error:ca.wrap({value:n,cause:i}),rawValue:n})}},e,null,[[1,4]])})),Ui.apply(this,arguments)}function Aa(e){return Hi.apply(this,arguments)}function Hi(){return Hi=Be(ae().m(function e(t){var n,r,u,a,i;return ae().w(function(o){for(;;)switch(o.p=o.n){case 0:if(n=t.text,r=t.schema,o.p=1,u=(function(s){var c=Error.stackTraceLimit;try{Error.stackTraceLimit=0}catch{return Uc(s)}try{return Uc(s)}finally{Error.stackTraceLimit=c}})(n),r!=null){o.n=2;break}a={success:!0,value:u,rawValue:u},o.n=4;break;case 2:return o.n=3,No({value:u,schema:r});case 3:a=o.v;case 4:return o.a(2,a);case 5:return o.p=5,i=o.v,o.a(2,{success:!1,error:vc.isInstance(i)?i:new vc({text:n,cause:i}),rawValue:void 0})}},e,null,[[1,5]])})),Hi.apply(this,arguments)}function tr(e){return Vi.apply(this,arguments)}function Vi(){return Vi=Be(ae().m(function e(t){return ae().w(function(n){for(;;)if(n.n===0)return n.a(2,(typeof t=="function"&&(t=t()),Promise.resolve(t)))},e)})),Vi.apply(this,arguments)}var HD=function(e,t){for(var n=0;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString()].concat(Fe(t.slice(n))).join("/")},VD=Symbol("Let zodToJsonSchema decide on which parser to use"),Vc={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 sd(e,t){return Re(e.type._def,t)}function cd(e,t,n){var r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(function(u,a){return cd(e,t,u)})};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 WD(e)}}var WD=function(e){var t,n={type:"integer",format:"unix-time"},r=fr(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(a){r.e(a)}finally{r.f()}return n},ti=void 0,JD=/^[cC][^\s-]{8,}
107$/,KD=/^[0-9a-z]+$/,QD=/^[0-9A-HJKMNP-TV-Z]{26}$/,GD=/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,YD=function(){return ti===void 0&&(ti=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ti},XD=/^(?:(?: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])$/,eg=/^(([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])$/,tg=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ng=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,rg=/^[a-zA-Z0-9_-]{21}$/,ug=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;function ld(e,t){var n={type:"string"};if(e.checks){var r,u=fr(e.checks);try{for(u.s();!(r=u.n()).done;){var a=r.value;switch(a.kind){case"min":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,a.value):a.value;break;case"max":n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,a.value):a.value;break;case"email":switch(t.emailStrategy){case"format:email":St(n,"email",a.message,t);break;case"format:idn-email":St(n,"idn-email",a.message,t);break;case"pattern:zod":it(n,GD,a.message,t)}break;case"url":St(n,"uri",a.message,t);break;case"uuid":St(n,"uuid",a.message,t);break;case"regex":it(n,a.regex,a.message,t);break;case"cuid":it(n,JD,a.message,t);break;case"cuid2":it(n,KD,a.message,t);break;case"startsWith":it(n,RegExp("^".concat(ni(a.value,t))),a.message,t);break;case"endsWith":it(n,RegExp("".concat(ni(a.value,t),"$")),a.message,t);break;case"datetime":St(n,"date-time",a.message,t);break;case"date":St(n,"date",a.message,t);break;case"time":St(n,"time",a.message,t);break;case"duration":St(n,"duration",a.message,t);break;case"length":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,a.value):a.value,n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,a.value):a.value;break;case"includes":it(n,RegExp(ni(a.value,t)),a.message,t);break;case"ip":a.version!=="v6"&&St(n,"ipv4",a.message,t),a.version!=="v4"&&St(n,"ipv6",a.message,t);break;case"base64url":it(n,ng,a.message,t);break;case"jwt":it(n,ug,a.message,t);break;case"cidr":a.version!=="v6"&&it(n,XD,a.message,t),a.version!=="v4"&&it(n,eg,a.message,t);break;case"emoji":it(n,YD(),a.message,t);break;case"ulid":it(n,QD,a.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":St(n,"binary",a.message,t);break;case"contentEncoding:base64":n.contentEncoding="base64";break;case"pattern:zod":it(n,tg,a.message,t)}break;case"nanoid":it(n,rg,a.message,t)}}}catch(i){u.e(i)}finally{u.f()}}return n}function ni(e,t){return t.patternStrategy==="escape"?(function(n){for(var r="",u=0;u<n.length;u++)ag.has(n[u])||(r+="\\"),r+=n[u];return r})(e):e}var ag=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function St(e,t,n,r){var u;e.format||(u=e.anyOf)!=null&&u.some(function(a){return a.format})?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push(U({format:t},n&&r.errorMessages&&{errorMessage:{format:n}}))):e.format=t}function it(e,t,n,r){var u;e.pattern||(u=e.allOf)!=null&&u.some(function(a){return a.pattern})?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push(U({pattern:Wc(t,r)},n&&r.errorMessages&&{errorMessage:{pattern:n}}))):e.pattern=Wc(t,r)}function Wc(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,d=!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]/)){d?(o+=i[f],o+="".concat(i[f-2],"-").concat(i[f]).toUpperCase(),d=!1):i[f+1]==="-"&&((n=i[f+2])!=null&&n.match(/[a-z]/))?(o+=i[f],d=!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 108]))`;continue}if(i[f]==="$"){o+=`($|(?=[\r 109]))`;continue}}a&&i[f]==="."?o+=c?"".concat(i[f],`\r 110`):"[".concat(i[f],`\r 111]`):(o+=i[f],i[f]==="\\"?s=!0:c&&i[f]==="]"?c=!1:c||i[f]!=="["||(c=!0))}try{new RegExp(o)}catch{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}
111function Jc(e,t){var n,r,u,a,i,o,s={type:"object",additionalProperties:(n=Re(e.valueType._def,U(U({},t),{},{currentPath:[].concat(Fe(t.currentPath),["additionalProperties"])})))!=null?n:t.allowedAdditionalProperties};if(((r=e.keyType)==null?void 0:r._def.typeName)===H.ZodString&&((u=e.keyType._def.checks)!=null&&u.length)){var c=ld(e.keyType._def,t);c.type;var d=Dn(c,op);return U(U({},s),{},{propertyNames:d})}if(((a=e.keyType)==null?void 0:a._def.typeName)===H.ZodEnum)return U(U({},s),{},{propertyNames:{enum:e.keyType._def.values}});if(((i=e.keyType)==null?void 0:i._def.typeName)===H.ZodBranded&&e.keyType._def.type._def.typeName===H.ZodString&&((o=e.keyType._def.type._def.checks)!=null&&o.length)){var f=sd(e.keyType._def,t);f.type;var l=Dn(f,sp);return U(U({},s),{},{propertyNames:l})}return s}var ri={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function ig(e){try{return e.isOptional()}catch{return!0}}var og=function(e,t,n){switch(t){case H.ZodString:return ld(e,n);case H.ZodNumber:return(function(r){var u={type:"number"};if(!r.checks)return u;var a,i=fr(r.checks);try{for(i.s();!(a=i.n()).done;){var o=a.value;switch(o.kind){case"int":u.type="integer";break;case"min":o.inclusive?u.minimum=o.value:u.exclusiveMinimum=o.value;break;case"max":o.inclusive?u.maximum=o.value:u.exclusiveMaximum=o.value;break;case"multipleOf":u.multipleOf=o.value}}}catch(s){i.e(s)}finally{i.f()}return u})(e);case H.ZodObject:return(function(r,u){var a={type:"object",properties:{}},i=[],o=r.shape();for(var s in o){var c=o[s];if(c!==void 0&&c._def!==void 0){var d=ig(c),f=Re(c._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["properties",s]),propertyPath:[].concat(Fe(u.currentPath),["properties",s])}));f!==void 0&&(a.properties[s]=f,d||i.push(s))}}i.length&&(a.required=i);var l=(function(h,m){if(h.catchall._def.typeName!=="ZodNever")return Re(h.catchall._def,U(U({},m),{},{currentPath:[].concat(Fe(m.currentPath),["additionalProperties"])}));switch(h.unknownKeys){case"passthrough":return m.allowedAdditionalProperties;case"strict":return m.rejectedAdditionalProperties;case"strip":return m.removeAdditionalStrategy==="strict"?m.allowedAdditionalProperties:m.rejectedAdditionalProperties}})(r,u);return l!==void 0&&(a.additionalProperties=l),a})(e,n);case H.ZodBigInt:return(function(r){var u={type:"integer",format:"int64"};if(!r.checks)return u;var a,i=fr(r.checks);try{for(i.s();!(a=i.n()).done;){var o=a.value;switch(o.kind){case"min":o.inclusive?u.minimum=o.value:u.exclusiveMinimum=o.value;break;case"max":o.inclusive?u.maximum=o.value:u.exclusiveMaximum=o.value;break;case"multipleOf":u.multipleOf=o.value}}}catch(s){i.e(s)}finally{i.f()}return u})(e);case H.ZodBoolean:return{type:"boolean"};case H.ZodDate:return cd(e,n);case H.ZodUndefined:return{not:{}};case H.ZodNull:return{type:"null"};case H.ZodArray:return(function(r,u){var a,i,o,s={type:"array"};return(a=r.type)!=null&&a._def&&((o=(i=r.type)==null?void 0:i._def)==null?void 0:o.typeName)!==H.ZodAny&&(s.items=Re(r.type._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["items"])}))),r.minLength&&(s.minItems=r.minLength.value),r.maxLength&&(s.maxItems=r.maxLength.value),r.exactLength&&(s.minItems=r.exactLength.value,s.maxItems=r.exactLength.value),s})(e,n);case H.ZodUnion:case H.ZodDiscriminatedUnion:return(function(r,u){var a=r.options instanceof Map?Array.from(r.options.values()):r.options;if(a.every(function(c){return c._def.typeName in ri&&(!c._def.checks||!c._def.checks.length)})){var i=a.reduce(function(c,d){var f=ri[d._def.typeName];return f&&!c.includes(f)?[].concat(Fe(c),[f]):c},[]);return{type:i.length>1?i:i[0]}}if(a.every(function(c){return c._def.typeName==="ZodLiteral"&&!c.description})){var o=a.reduce(function(c,d){var f=re(d._def.value);switch(f){case"string":case"number":case"boolean":return[].concat(Fe(c),[f]);case"bigint":return[].concat(Fe(c),["integer"]);case"object":if(d._def.value===null)return[].concat(Fe(c),["null"]);default:return c}},[]);if(o.length===a.length){var s=o.filter(function(c,d,f){return f.indexOf(c)===d});return{type:s.length>1?s:s[0],enum:a.reduce(function(c,d){return c.includes(d._def.value)?c:[].concat(Fe(c),[d._def.value])},[])}}}else if(a.every(function(c){return c._def.typeName==="ZodEnum"}))return{type:"string",enum:a.reduce(function(c,d){return[].concat(Fe(c),Fe(d._def.values.filter(function(f){return!c.includes(f)})))},[])};return(function(c,d){var f=(c.options instanceof Map?Array.from(c.options.values()):c.options).map(function(l,h){return Re(l._def,U(U({},d),{},{currentPath:[].concat(Fe(d.currentPath),["anyOf","".concat(h)])}))}).filter(function(l){return!!l&&(!d.strictUnions||re(l)=="object"&&Object.keys(l).length>0)});return f.length?{anyOf:f}:void 0})(r,u)})(e,n);case H.ZodIntersection:return(function(r,u){var a=[Re(r.left._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["allOf","0"])})),Re(r.right._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["allOf","1"])}))].filter(function(o){return!!o}),i=[];
111return a.forEach(function(o){if("type"in(c=o)&&c.type==="string"||!("allOf"in c)){var s=o;"additionalProperties"in o&&o.additionalProperties===!1&&(o.additionalProperties,s=Dn(o,cp)),i.push(s)}else i.push.apply(i,Fe(o.allOf));var c}),i.length?{allOf:i}:void 0})(e,n);case H.ZodTuple:return(function(r,u){return r.rest?{type:"array",minItems:r.items.length,items:r.items.map(function(a,i){return Re(a._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["items","".concat(i)])}))}).reduce(function(a,i){return i===void 0?a:[].concat(Fe(a),[i])},[]),additionalItems:Re(r.rest._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["additionalItems"])}))}:{type:"array",minItems:r.items.length,maxItems:r.items.length,items:r.items.map(function(a,i){return Re(a._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["items","".concat(i)])}))}).reduce(function(a,i){return i===void 0?a:[].concat(Fe(a),[i])},[])}})(e,n);case H.ZodRecord:return Jc(e,n);case H.ZodLiteral:return(function(r){var u=re(r.value);return u!=="bigint"&&u!=="number"&&u!=="boolean"&&u!=="string"?{type:Array.isArray(r.value)?"array":"object"}:{type:u==="bigint"?"integer":u,const:r.value}})(e);case H.ZodEnum:return(function(r){return{type:"string",enum:Array.from(r.values)}})(e);case H.ZodNativeEnum:return(function(r){var u=r.values,a=Object.keys(r.values).filter(function(o){return typeof u[u[o]]!="number"}).map(function(o){return u[o]}),i=Array.from(new Set(a.map(function(o){return re(o)})));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:a}})(e);case H.ZodNullable:return(function(r,u){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(r.innerType._def.typeName)&&(!r.innerType._def.checks||!r.innerType._def.checks.length))return{type:[ri[r.innerType._def.typeName],"null"]};var a=Re(r.innerType._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["anyOf","0"])}));return a&&{anyOf:[a,{type:"null"}]}})(e,n);case H.ZodOptional:return(function(r,u){var a;if(u.currentPath.toString()===((a=u.propertyPath)==null?void 0:a.toString()))return Re(r.innerType._def,u);var i=Re(r.innerType._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["anyOf","1"])}));return i?{anyOf:[{not:{}},i]}:{}})(e,n);case H.ZodMap:return(function(r,u){return u.mapStrategy==="record"?Jc(r,u):{type:"array",maxItems:125,items:{type:"array",items:[Re(r.keyType._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["items","items","0"])}))||{},Re(r.valueType._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["items","items","1"])}))||{}],minItems:2,maxItems:2}}})(e,n);case H.ZodSet:return(function(r,u){var a={type:"array",uniqueItems:!0,items:Re(r.valueType._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["items"])}))};return r.minSize&&(a.minItems=r.minSize.value),r.maxSize&&(a.maxItems=r.maxSize.value),a})(e,n);case H.ZodLazy:return function(){return e.getter()._def};case H.ZodPromise:return(function(r,u){return Re(r.type._def,u)})(e,n);case H.ZodNaN:case H.ZodNever:return{not:{}};case H.ZodEffects:return(function(r,u){return u.effectStrategy==="input"?Re(r.schema._def,u):{}})(e,n);case H.ZodAny:case H.ZodUnknown:return{};case H.ZodDefault:return(function(r,u){return U(U({},Re(r.innerType._def,u)),{},{default:r.defaultValue()})})(e,n);case H.ZodBranded:return sd(e,n);case H.ZodReadonly:case H.ZodCatch:return(function(r,u){return Re(r.innerType._def,u)})(e,n);case H.ZodPipeline:return(function(r,u){if(u.pipeStrategy==="input")return Re(r.in._def,u);if(u.pipeStrategy==="output")return Re(r.out._def,u);var a=Re(r.in._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["allOf","0"])}));return{allOf:[a,Re(r.out._def,U(U({},u),{},{currentPath:[].concat(Fe(u.currentPath),["allOf",a?"1":"0"])}))].filter(function(i){return i!==void 0})}})(e,n);case H.ZodFunction:case H.ZodVoid:case H.ZodSymbol:default:return}};function Re(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=t.seen.get(e);if(t.override){var a=(n=t.override)==null?void 0:n.call(t,e,t,u,r);if(a!==VD)return a}if(u&&!r){var i=sg(u,t);if(i!==void 0)return i}var o={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,o);var s=og(e,e.typeName,t),c=typeof s=="function"?Re(s(),t):s;if(c&&cg(e,t,c),t.postProcess){var d=t.postProcess(c,e,t);return o.jsonSchema=c,d}return o.jsonSchema=c,c}var sg=function(e,t){switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:HD(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every(function(n,r){return t.currentPath[r]===n})?(console.warn("Recursive reference detected at ".concat(t.currentPath.join("/"),"! Defaulting to any")),{}):t.$refStrategy==="seen"?{}:void 0}},cg=function(e,t,n){return e.description&&(n.description=e.description),n},lg=function(e,t){var n,r=(function(c){var d=(function(l){return typeof l=="string"?U(U({},Vc),{},{name:l}):U(U({},Vc),l)})(c),f=d.name!==void 0?[].concat(Fe(d.basePath),[d.definitionPath,d.name]):d.basePath;return U(U({},d),{},{currentPath:f,propertyPath:void 0,seen:new Map(Object.entries(d.definitions).map(function(l){var h=ii(l,2),m=h[0],D=h[1];return[D._def,{def:D._def,path:[].concat(Fe(d.basePath),[d.definitionPath,m]),jsonSchema:void 0}]}))})})(t),u=re(t)=="object"&&t.definitions?Object.entries(t.definitions).reduce(function(c,d){var f,l=ii(d,2),h=l[0],m=l[1];return U(U({},c),{},Tt({},h,(f=Re(m._def,U(U({},r),{},{currentPath:[].concat(Fe(r.basePath),[r.definitionPath,h])}),!0))!=null?f:{}))},{}):void 0,a=typeof t=="string"?t:t?.nameStrategy==="title"||t==null?void 0:t.name,i=(n=Re(e._def,a===void 0?r:U(U({},r),{},{currentPath:[].concat(Fe(r.basePath),[r.definitionPath,a])}),!1))!=null?n:{}
111,o=re(t)=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;o!==void 0&&(i.title=o);var s=a===void 0?u?U(U({},i),{},Tt({},r.definitionPath,u)):i:Tt({$ref:[].concat(Fe(r.$refStrategy==="relative"?[]:r.basePath),[r.definitionPath,a]).join("/")},r.definitionPath,U(U({},u),{},Tt({},a,i)));return s.$schema="http://json-schema.org/draft-07/schema#",s};function fd(e,t){return(function(n){return"_zod"in n})(e)?(function(n){return Ji(function(){return(function(u,a){if(u instanceof Nf){var i,o=new Ic(a),s={},c=K(u._idmap.entries());try{for(c.s();!(i=c.n()).done;){var d=xe(i.value,2),f=(d[0],d[1]);o.process(f)}}catch(_){c.e(_)}finally{c.f()}var l,h={},m={registry:u,uri:a?.uri,defs:s},D=K(u._idmap.entries());try{for(D.s();!(l=D.n()).done;){var y=xe(l.value,2),E=y[0],g=y[1];h[E]=o.emit(g,v(v({},a),{},{external:m}))}}catch(_){D.e(_)}finally{D.f()}if(Object.keys(s).length>0){var b=o.target==="draft-2020-12"?"$defs":"definitions";h.__shared=Se({},b,s)}return{schemas:h}}var F=new Ic(a);return F.process(u),F.emit(u,a)})(n,{target:"draft-7",io:"output",reused:"inline"})},{validate:(r=Be(ae().m(function u(a){var i;return ae().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,Wf(n,a);case 1:return i=o.v,o.a(2,i.success?{success:!0,value:i.data}:{success:!1,error:i.error})}},u)})),function(u){return r.apply(this,arguments)})});var r})(e):(function(n){return Ji(function(){return lg(n,{$refStrategy:"none"})},{validate:(r=Be(ae().m(function u(a){var i;return ae().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,n.safeParseAsync(a);case 1:return i=o.v,o.a(2,i.success?{success:!0,value:i.data}:{success:!1,error:i.error})}},u)})),function(u){return r.apply(this,arguments)})});var r})(e)}var Wi=Symbol.for("vercel.ai.schema");function Ji(e){var t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).validate;return Tt((function(n,r,u,a){var i={configurable:!0,enumerable:!0};return i[n]=a,Object.defineProperty(r,u,i)})("get",Tt(Tt(Tt({},Wi,!0),"_type",void 0),Xu,!0),"jsonSchema",function(){return typeof e=="function"&&(e=e()),e}),"validate",t)}var dd,fg=Object.defineProperty,pd="AI_NoObjectGeneratedError",hd="vercel.ai.error.".concat(pd),dg=Symbol.for(hd),Kc=(function(){function e(t){var n,r=t.message,u=r===void 0?"No object generated.":r,a=t.cause,i=t.text,o=t.response,s=t.usage,c=t.finishReason;return Pt(this,e),(n=qn(this,e,[{name:pd,message:u,cause:a}]))[dd]=!0,n.text=i,n.response=o,n.usage=s,n.finishReason=c,n}return Un(e,Fn),jt(e,null,[{key:"isInstance",value:function(t){return Fn.hasMarker(t,hd)}}])})();dd=dg;var Qc="5.0.93",vd=_t([de(),pa(Uint8Array),pa(ArrayBuffer),nd(function(e){var t,n;return(n=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null&&n},{message:"Must be a Buffer"})]),Cu=new mD({type:"lazy",getter:function(){return _t([tD(),de(),Gm(),lt(),wi(de(),Cu),br(Cu)])}}),Xe=wi(de(),wi(de(),Cu)),md=rt({type:Ee("text"),text:de(),providerOptions:Xe.optional()}),pg=rt({type:Ee("image"),image:_t([vd,pa(URL)]),mediaType:de().optional(),providerOptions:Xe.optional()}),Dd=rt({type:Ee("file"),data:_t([vd,pa(URL)]),filename:de().optional(),mediaType:de(),providerOptions:Xe.optional()}),hg=rt({type:Ee("reasoning"),text:de(),providerOptions:Xe.optional()}),vg=rt({type:Ee("tool-call"),toolCallId:de(),toolName:de(),input:$t(),providerOptions:Xe.optional(),providerExecuted:lt().optional()}),mg=new aD(v({type:"union",options:[rt({type:Ee("text"),value:de()}),rt({type:Ee("json"),value:Cu}),rt({type:Ee("error-text"),value:de()}),rt({type:Ee("error-json"),value:Cu}),rt({type:Ee("content"),value:br(_t([rt({type:Ee("text"),text:de()}),rt({type:Ee("media"),data:de(),mediaType:de()})]))})],discriminator:"type"},ue(void 0))),gd=rt({type:Ee("tool-result"),toolCallId:de(),toolName:de(),output:mg,providerOptions:Xe.optional()}),Dg=rt({role:Ee("system"),content:de(),providerOptions:Xe.optional()}),gg=rt({role:Ee("user"),content:_t([de(),br(_t([md,pg,Dd]))]),providerOptions:Xe.optional()}),yg=rt({role:Ee("assistant"),content:_t([de(),br(_t([md,Dd,hg,vg,gd]))]),providerOptions:Xe.optional()});_t([Dg,gg,yg,rt({role:Ee("tool"),content:br(gd),providerOptions:Xe.optional()})]),ku({prefix:"aitxt",size:24}),TransformStream;var Fg=(function(){var e;return function(){return e==null&&(e=fd(_t([We({type:Ee("text-start"),id:de(),providerMetadata:Xe.optional()}),We({type:Ee("text-delta"),id:de(),delta:de(),providerMetadata:Xe.optional()}),We({type:Ee("text-end"),id:de(),providerMetadata:Xe.optional()}),We({type:Ee("error"),errorText:de()}),We({type:Ee("tool-input-start"),toolCallId:de(),toolName:de(),providerExecuted:lt().optional(),dynamic:lt().optional()}),We({type:Ee("tool-input-delta"),toolCallId:de(),inputTextDelta:de()}),We({type:Ee("tool-input-available"),toolCallId:de(),toolName:de(),input
111:$t(),providerExecuted:lt().optional(),providerMetadata:Xe.optional(),dynamic:lt().optional()}),We({type:Ee("tool-input-error"),toolCallId:de(),toolName:de(),input:$t(),providerExecuted:lt().optional(),providerMetadata:Xe.optional(),dynamic:lt().optional(),errorText:de()}),We({type:Ee("tool-output-available"),toolCallId:de(),output:$t(),providerExecuted:lt().optional(),dynamic:lt().optional(),preliminary:lt().optional()}),We({type:Ee("tool-output-error"),toolCallId:de(),errorText:de(),providerExecuted:lt().optional(),dynamic:lt().optional()}),We({type:Ee("reasoning-start"),id:de(),providerMetadata:Xe.optional()}),We({type:Ee("reasoning-delta"),id:de(),delta:de(),providerMetadata:Xe.optional()}),We({type:Ee("reasoning-end"),id:de(),providerMetadata:Xe.optional()}),We({type:Ee("source-url"),sourceId:de(),url:de(),title:de().optional(),providerMetadata:Xe.optional()}),We({type:Ee("source-document"),sourceId:de(),mediaType:de(),title:de(),filename:de().optional(),providerMetadata:Xe.optional()}),We({type:Ee("file"),url:de(),mediaType:de(),providerMetadata:Xe.optional()}),We({type:nd(function(t){return typeof t=="string"&&t.startsWith("data-")},{message:'Type must start with "data-"'}),id:de().optional(),data:$t(),transient:lt().optional()}),We({type:Ee("start-step")}),We({type:Ee("finish-step")}),We({type:Ee("start"),messageId:de().optional(),messageMetadata:$t().optional()}),We({type:Ee("finish"),finishReason:Xf(["stop","length","content-filter","tool-calls","error","other","unknown"]).optional(),messageMetadata:$t().optional()}),We({type:Ee("abort")}),We({type:Ee("message-metadata"),messageMetadata:$t()})]))),e}})();function yd(e,t){if(e!==void 0||t!==void 0){if(e===void 0)return t;if(t===void 0)return e;var n=U({},e);for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var u=t[r];if(u===void 0)continue;var a=r in e?e[r]:void 0,i=!(u===null||re(u)!="object"||Array.isArray(u)||u instanceof Date||u instanceof RegExp),o=!(a==null||re(a)!="object"||Array.isArray(a)||a instanceof Date||a instanceof RegExp);n[r]=i&&o?yd(a,u):u}return n}}function Eg(e){var t=["ROOT"],n=-1,r=null;function u(h,m,D){switch(h){case'"':n=m,t.pop(),t.push(D),t.push("INSIDE_STRING");break;case"f":case"t":case"n":n=m,r=m,t.pop(),t.push(D),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(D),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=m,t.pop(),t.push(D),t.push("INSIDE_NUMBER");break;case"{":n=m,t.pop(),t.push(D),t.push("INSIDE_OBJECT_START");break;case"[":n=m,t.pop(),t.push(D),t.push("INSIDE_ARRAY_START")}}function a(h,m){switch(h){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":n=m,t.pop()}}function i(h,m){switch(h){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=m,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(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(s,o),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&a(s,o);break;case"}":t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&a(s,o);break;case"]":t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&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(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?a(s,o):t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(s,o))}}for(var d=e.slice(0,n+1),f=t.length-1;f>=0;f--)switch(t[f]){case"INSIDE_STRING":d+='"';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":d+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":d+="]";break;case"INSIDE_LITERAL":var l=e.substring(r,e.length);"true".startsWith(l)?d+="true".slice(l.length):"false".startsWith(l)?d+="false".slice(l.length):"null".startsWith(l)&&(d+="null".slice(l.length))}return d}function Fd(e){return Ki.apply(this,arguments)}function Ki(){return Ki=Be(ae().m(function e(t){var n,r;return ae().w(function(u){for(;;)switch(u.n){case 0:if(t!==void 0){u.n=1;break}return u.a(2,{value:void 0,state:"undefined-input"});case 1:return u.n=2,Aa({text:t});case 2:if(!(n=u.v).success){u.n=3;break}r={value:n.value,state:"successful-parse"},u.n=5;break;case 3:return u.n=4,Aa({text:Eg(t)});case 4:n=u.v,r=n.success?{value:n.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"};case 5:return u.a(2,r)}},e)})),Ki.apply(this,arguments)}function ea(e){return e.type.startsWith("tool-")}function Qi(e){return ea(e)||(function(t){return t.type==="dynamic-tool"})(e)}function Gc(e){return e.type.split("-").slice(1).join("-")}function bg(e){var t=e.lastMessage,n=e.messageId;return{message:t?.role==="assistant"?t:{id:n,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function _g(e){var t=e.stream,n=e.messageMetadataSchema,r=e.dataPartSchemas,u=e.runUpdateMessageJob,a=e.onError,i=e.onToolCall,o=e.onData;return t.pipeThrough(new TransformStream({transform:function(s,c){return Be(ae().m(function d(){return ae().w(function(f){for(;;)switch(f.n){case 0:return f.n=1,u((function(){var l=Be(ae().m(function h(m){var D,y,E,g,b,F,_,k,C,A,N,P,I,O,Z,B,L,S,w,x,j,R,T,M,V,J,ee,le,$;return ae().w(function(Q){for(;;)switch(Q.n){case 0:P=function(){return P=Be(ae().m(function ie(pe){var Y;return ae().w(function(oe){for(;;)switch(oe.n){case 0:if(pe==null){oe.n=2;break}if(Y=D.message.metadata!=null?yd(D.message.metadata,pe):pe,n==null){oe.n=1;break}return oe.n=1,Hc({value:Y,schema:n});case 1:D.message.metadata=Y;
111case 2:return oe.a(2)}},ie)})),P.apply(this,arguments)},N=function(ie){return P.apply(this,arguments)},A=function(ie){var pe,Y,oe=D.message.parts.find(function(ke){return ke.type==="dynamic-tool"&&ke.toolCallId===ie.toolCallId}),_e=ie,ze=oe;oe!=null?(oe.state=ie.state,ze.toolName=ie.toolName,ze.input=_e.input,ze.output=_e.output,ze.errorText=_e.errorText,ze.rawInput=(pe=_e.rawInput)!=null?pe:ze.rawInput,ze.preliminary=_e.preliminary,ze.providerExecuted=(Y=_e.providerExecuted)!=null?Y:oe.providerExecuted,_e.providerMetadata!=null&&oe.state==="input-available"&&(oe.callProviderMetadata=_e.providerMetadata)):D.message.parts.push(U({type:"dynamic-tool",toolName:ie.toolName,toolCallId:ie.toolCallId,state:ie.state,input:_e.input,output:_e.output,errorText:_e.errorText,preliminary:_e.preliminary,providerExecuted:_e.providerExecuted},_e.providerMetadata!=null?{callProviderMetadata:_e.providerMetadata}:{}))},C=function(ie){var pe,Y=D.message.parts.find(function(ze){return ea(ze)&&ze.toolCallId===ie.toolCallId}),oe=ie,_e=Y;Y!=null?(Y.state=ie.state,_e.input=oe.input,_e.output=oe.output,_e.errorText=oe.errorText,_e.rawInput=oe.rawInput,_e.preliminary=oe.preliminary,_e.providerExecuted=(pe=oe.providerExecuted)!=null?pe:Y.providerExecuted,oe.providerMetadata!=null&&Y.state==="input-available"&&(Y.callProviderMetadata=oe.providerMetadata)):D.message.parts.push(U({type:"tool-".concat(ie.toolName),toolCallId:ie.toolCallId,state:ie.state,input:oe.input,output:oe.output,rawInput:oe.rawInput,errorText:oe.errorText,providerExecuted:oe.providerExecuted,preliminary:oe.preliminary},oe.providerMetadata!=null?{callProviderMetadata:oe.providerMetadata}:{}))},k=function(ie){var pe=D.message.parts.filter(function(Y){return Y.type==="dynamic-tool"}).find(function(Y){return Y.toolCallId===ie});if(pe==null)throw new Error("tool-output-error must be preceded by a tool-input-available");return pe},_=function(ie){var pe=D.message.parts.filter(ea).find(function(Y){return Y.toolCallId===ie});if(pe==null)throw new Error("tool-output-error must be preceded by a tool-input-available");return pe},D=m.state,y=m.write,$=s.type,Q.n=$==="text-start"?1:$==="text-delta"?2:$==="text-end"?3:$==="reasoning-start"?4:$==="reasoning-delta"?5:$==="reasoning-end"?6:$==="file"?7:$==="source-url"?8:$==="source-document"?9:$==="tool-input-start"?10:$==="tool-input-delta"?11:$==="tool-input-available"?13:$==="tool-input-error"?15:$==="tool-output-available"?16:$==="tool-output-error"?17:$==="start-step"?18:$==="finish-step"?19:$==="start"?20:$==="finish"?22:$==="message-metadata"?24:$==="error"?26:27;break;case 1:return I={type:"text",text:"",providerMetadata:s.providerMetadata,state:"streaming"},D.activeTextParts[s.id]=I,D.message.parts.push(I),y(),Q.a(3,30);case 2:return(O=D.activeTextParts[s.id]).text+=s.delta,O.providerMetadata=(E=s.providerMetadata)!=null?E:O.providerMetadata,y(),Q.a(3,30);case 3:return(Z=D.activeTextParts[s.id]).state="done",Z.providerMetadata=(g=s.providerMetadata)!=null?g:Z.providerMetadata,delete D.activeTextParts[s.id],y(),Q.a(3,30);case 4:return B={type:"reasoning",text:"",providerMetadata:s.providerMetadata,state:"streaming"},D.activeReasoningParts[s.id]=B,D.message.parts.push(B),y(),Q.a(3,30);case 5:return(L=D.activeReasoningParts[s.id]).text+=s.delta,L.providerMetadata=(b=s.providerMetadata)!=null?b:L.providerMetadata,y(),Q.a(3,30);case 6:return(S=D.activeReasoningParts[s.id]).providerMetadata=(F=s.providerMetadata)!=null?F:S.providerMetadata,S.state="done",delete D.activeReasoningParts[s.id],y(),Q.a(3,30);case 7:return D.message.parts.push({type:"file",mediaType:s.mediaType,url:s.url}),y(),Q.a(3,30);case 8:return D.message.parts.push({type:"source-url",sourceId:s.sourceId,url:s.url,title:s.title,providerMetadata:s.providerMetadata}),y(),Q.a(3,30);case 9:return D.message.parts.push({type:"source-document",sourceId:s.sourceId,mediaType:s.mediaType,title:s.title,filename:s.filename,providerMetadata:s.providerMetadata}),y(),Q.a(3,30);case 10:return w=D.message.parts.filter(ea),D.partialToolCalls[s.toolCallId]={text:"",toolName:s.toolName,index:w.length,dynamic:s.dynamic},s.dynamic?A({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted}):C({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted}),y(),Q.a(3,30);case 11:return(x=D.partialToolCalls[s.toolCallId]).text+=s.inputTextDelta,Q.n=12,Fd(x.text);case 12:return j=Q.v,R=j.value,x.dynamic?A({toolCallId:s.toolCallId,toolName:x.toolName,state:"input-streaming",input:R}):C({toolCallId:s.toolCallId,toolName:x.toolName,state:"input-streaming",input:R}),y(),Q.a(3,30);case 13:if(s.dynamic?A({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}):C({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}),y(),!(i&&!s.providerExecuted)){Q.n=14;break}return Q.n=14,i({toolCall:s});case 14:return Q.a(3,30);case 15:return s.dynamic?A({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}):C({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:void 0,rawInput:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}),y(),Q.a(3,30);case 16:return s.dynamic?(T=k(s.toolCallId),A({toolCallId:s.toolCallId,toolName:T.toolName,state:"output-available",input:T.input,output:s.output,preliminary:s.preliminary})):(M=_(s.toolCallId),C({toolCallId:s.toolCallId,toolName:Gc(M),state:"output-available",input:M.input,output:s.output,providerExecuted:s.providerExecuted,preliminary:s.preliminary})),y(),Q.a(3,30);case 17:return s.dynamic?(V=k(s.toolCallId),A({toolCallId:s.toolCallId,toolName:V.toolName,state:"output-error",input:V.input,errorText:s.errorText,providerExecuted:s.providerExecuted})):(J=_(s.toolCallId),C({toolCallId:s.toolCallId,toolName:Gc(J),state:"output-error",input:J.input,rawInput:J.rawInput,errorText:s.errorText,providerExecuted:s.providerExecuted})),y(),Q.a(3,30);case 18:return D.message.parts.push({type:"step-start"}),Q.a(3,30);case 19:return D.activeTextParts={},D.activeReasoningParts={},Q.a(3,30);case 20:return s.messageId!=null&&(D.message.id=s.messageId),Q.n=21,N(s.messageMetadata);case 21:return s.messageId==null&&s.messageMetadata==null||y(),Q.a(3,30);case 22:return s.finishReason!=null&&(D.finishReason=s.finishReason),Q.n=23,N(s.messageMetadata);case 23:return s.messageMetadata!=null&&y(),Q.a(3,30);case 24:return Q.n=25,N(s.messageMetadata);case 25:return s.messageMetadata!=null&&y(),Q.a(3,30);case 26:return a?.(new Error(s.errorText)),Q.a(3,30);case 27:if(!(function(ie){return ie.type.startsWith("data-")})(s)){Q.n=30;break}if(r?.[s.type]==null){Q.n=28;break}return Q.n=28,Hc({value:s.data,schema:r[s.type]});case 28:if(!(ee=s).transient){Q.n=29;break}return o?.(ee),Q.a(3,30);case 29:le=ee.id!=null?D.message.parts.find(function(ie){return ee.type===ie.type&&ee.id===ie.id}):void 0,le!=null?le.data=ee.data:D.message.parts.push(ee),o?.(ee),y();case 30:c.enqueue(s);case 31:return Q.a(2)}},h)}));return function(h){return l.apply(this,arguments)}})());case 1:return f.a(2)}},d)}))()}}))}ku({prefix:"aitxt",size:24}),ku({prefix:"aiobj",size:24});var kg=(function(){return jt(function n(){Pt(this,n),this.queue=[],this.isProcessing=!1},[{key:"processQueue",value:(t=Be(ae().m(function n(){return ae().w(function(r){for(;;)switch(r.n){case 0:if(this.isProcessing){r.n=5;break}this.isProcessing=!0;case 1:if(!(this.queue.length>0)){r.n=4;break}return r.n=2,this.queue[0]();case 2:this.queue.shift();case 3:r.n=1;break;case 4:this.isProcessing=!1;case 5:return r.a(2)}},n,this)})),function(){return t.apply(this,arguments)})},{key:"run",value:(e=Be(ae().m(function n(r){var u=this;return ae().w(function(a){for(;;)if(a.n===0)return a.a(2,new Promise(function(i,o){u.queue.push(Be(ae().m(function s(){var c;return ae().w(function(d){for(;;)switch(d.p=d.n){case 0:return d.p=0,d.n=1,r();case 1:i(),d.n=3;break;case 2:d.p=2,c=d.v,o(c);case 3:return d.a(2)}},s,null,[[0,2]])}))),u.processQueue()}))},n)})),function(n){return e.apply(this,arguments)})}]);var e,t})();ku({prefix:"aiobj",size:24}),(function(e,t){for(var n in t)fg(e,n,{get:t[n],enumerable:!0})})({},{object:function(){return Ag},text:function(){return Cg}});var Yc,Xc,Cg=function(){return{type:"text",responseFormat:{type:"text"},parsePartial:(t=Be(ae().m(function n(r){var u;return ae().w(function(a){for(;;)if(a.n===0)return u=r.text,a.a(2,{partial:u})},n)})),function(n){return t.apply(this,arguments)}),parseOutput:(e=Be(ae().m(function n(r){var u;return ae().w(function(a){for(;;)if(a.n===0)return u=r.text,a.a(2,u)},n)})),function(n){return e.apply(this,arguments)})};var e,t},Ag=function(e){var t=(function(n){return n==null?Ji({properties:{},additionalProperties:!1}):re(r=n)=="object"&&r!==null&&Wi in r&&r[Wi]===!0&&"jsonSchema"in r&&"validate"in r?n:typeof n=="function"?n():fd(n);var r})(e.schema);return{type:"object",responseFormat:{type:"json",schema:t.jsonSchema},parsePartial:function(n){return Be(ae().m(function r(){var u,a,i,o;return ae().w(function(s){for(;;)switch(s.n){case 0:return u=n.text,s.n=1,Fd(u);case 1:a=s.v,o=a.state,s.n=o==="failed-parse"||o==="undefined-input"?2:o==="repaired-parse"||o==="successful-parse"?3:4;break;case 2:case 5:return s.a(2);case 3:return s.a(2,{partial:a.value});case 4:throw i=a.state,new Error("Unsupported parse state: ".concat(i))}},r)}))()},parseOutput:function(n,r){return Be(ae().m(function u(){var a,i,o;return ae().w(function(s){for(;;)switch(s.n){case 0:return a=n.text,s.n=1,Aa({text:a});case 1:if((i=s.v).success){s.n=2;break}throw new Kc({message:"No object generated: could not parse the response.",cause:i.error,text:a,response:r.response,usage:r.usage,finishReason:r.finishReason});case 2:return s.n=3,No({value:i.value,schema:t});case 3:if((o=s.v).success){s.n=4;break}throw new Kc({message:"No object generated: response did not match sc
111hema.",cause:o.error,text:a,response:r.response,usage:r.usage,finishReason:r.finishReason});case 4:return s.a(2,o.value)}},u)}))()}}},wg=(function(){return jt(function n(r){var u=r.api,a=u===void 0?"/api/chat":u,i=r.credentials,o=r.headers,s=r.body,c=r.fetch,d=r.prepareSendMessagesRequest,f=r.prepareReconnectToStreamRequest;Pt(this,n),this.api=a,this.credentials=i,this.headers=o,this.body=s,this.fetch=c,this.prepareSendMessagesRequest=d,this.prepareReconnectToStreamRequest=f},[{key:"sendMessages",value:(t=Be(ae().m(function n(r){var u,a,i,o,s,c,d,f,l,h,m,D,y,E,g,b,F,_,k,C;return ae().w(function(A){for(;;)switch(A.n){case 0:return u=r.abortSignal,a=Dn(r,lp),A.n=1,tr(this.body);case 1:return f=A.v,A.n=2,tr(this.headers);case 2:return l=A.v,A.n=3,tr(this.credentials);case 3:return h=A.v,m=U(U({},Nn(l)),Nn(a.headers)),A.n=4,(i=this.prepareSendMessagesRequest)==null?void 0:i.call(this,{api:this.api,id:a.chatId,messages:a.messages,body:U(U({},f),a.body),headers:m,credentials:h,requestMetadata:a.metadata,trigger:a.trigger,messageId:a.messageId});case 4:return D=A.v,y=(o=D?.api)!=null?o:this.api,E=D?.headers!==void 0?Nn(D.headers):m,g=D?.body!==void 0?D.body:U(U(U({},f),a.body),{},{id:a.chatId,messages:a.messages,trigger:a.trigger,messageId:a.messageId}),b=(s=D?.credentials)!=null?s:h,F=(c=this.fetch)!=null?c:globalThis.fetch,A.n=5,F(y,{method:"POST",headers:qc(U({"Content-Type":"application/json"},E),"ai-sdk/".concat(Qc),$c()),body:JSON.stringify(g),credentials:b,signal:u});case 5:if((_=A.v).ok){A.n=9;break}return k=Error,A.n=6,_.text();case 6:if((d=A.v)==null){A.n=7;break}C=d,A.n=8;break;case 7:C="Failed to fetch the chat response.";case 8:throw new k(C);case 9:if(_.body){A.n=10;break}throw new Error("The response body is empty.");case 10:return A.a(2,this.processResponseStream(_.body))}},n,this)})),function(n){return t.apply(this,arguments)})},{key:"reconnectToStream",value:(e=Be(ae().m(function n(r){var u,a,i,o,s,c,d,f,l,h,m,D,y,E,g,b,F;return ae().w(function(_){for(;;)switch(_.n){case 0:return _.n=1,tr(this.body);case 1:return c=_.v,_.n=2,tr(this.headers);case 2:return d=_.v,_.n=3,tr(this.credentials);case 3:return f=_.v,l=U(U({},Nn(d)),Nn(r.headers)),_.n=4,(u=this.prepareReconnectToStreamRequest)==null?void 0:u.call(this,{api:this.api,id:r.chatId,body:U(U({},c),r.body),headers:l,credentials:f,requestMetadata:r.metadata});case 4:return h=_.v,m=(a=h?.api)!=null?a:"".concat(this.api,"/").concat(r.chatId,"/stream"),D=h?.headers!==void 0?Nn(h.headers):l,y=(i=h?.credentials)!=null?i:f,E=(o=this.fetch)!=null?o:globalThis.fetch,_.n=5,E(m,{method:"GET",headers:qc(D,"ai-sdk/".concat(Qc),$c()),credentials:y});case 5:if((g=_.v).status!==204){_.n=6;break}return _.a(2,null);case 6:if(g.ok){_.n=10;break}return b=Error,_.n=7,g.text();case 7:if((s=_.v)==null){_.n=8;break}F=s,_.n=9;break;case 8:F="Failed to fetch the chat response.";case 9:throw new b(F);case 10:if(g.body){_.n=11;break}throw new Error("The response body is empty.");case 11:return _.a(2,this.processResponseStream(g.body))}},n,this)})),function(n){return e.apply(this,arguments)})}]);var e,t})(),Gi=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Pt(this,e),qn(this,e,[t])}return Un(e,wg),jt(e,[{key:"processResponseStream",value:function(t){return(function(n){var r=n.schema;return n.stream.pipeThrough(new TextDecoderStream).pipeThrough(new Bh).pipeThrough(new TransformStream({transform:function(u,a){return Be(ae().m(function i(){var o,s;return ae().w(function(c){for(;;)switch(c.n){case 0:if(o=u.data,o==="[DONE]"){c.n=2;break}return s=a,c.n=1,Aa({text:o,schema:r});case 1:s.enqueue.call(s,c.v);case 2:return c.a(2)}},i)}))()}}))})({stream:t,schema:Fg}).pipeThrough(new TransformStream({transform:function(n,r){return Be(ae().m(function u(){return ae().w(function(a){for(;;)switch(a.n){case 0:if(n.success){a.n=1;break}throw n.error;case 1:r.enqueue(n.value);case 2:return a.a(2)}},u)}))()}}))}}])})(),Sg=(function(){return jt(function t(n){var r=this,u=n.generateId,a=u===void 0?$i:u,i=n.id,o=i===void 0?a():i,s=n.transport,c=s===void 0?new Gi:s,d=n.messageMetadataSchema,f=n.dataPartSchemas,l=n.state,h=n.onError,m=n.onToolCall,D=n.onFinish,y=n.onData,E=n.sendAutomaticallyWhen;Pt(this,t),this.activeResponse=void 0,this.jobExecutor=new kg,this.sendMessage=(function(){var g=Be(ae().m(function b(F,_){var k,C,A,N,P,I,O;return ae().w(function(Z){for(;;)switch(Z.n){case 0:if(F!=null){Z.n=2;break}
111return Z.n=1,r.makeRequest(U({trigger:"submit-message",messageId:(k=r.lastMessage)==null?void 0:k.id},_));case 1:return Z.a(2,void Z.v);case 2:if(!("text"in F)&&!("files"in F)){Z.n=6;break}if(!Array.isArray(F.files)){Z.n=3;break}O=F.files,Z.n=5;break;case 3:return Z.n=4,(function(){var B=Be(ae().m(function L(S){return ae().w(function(w){for(;;)switch(w.n){case 0:if(S!=null){w.n=1;break}return w.a(2,[]);case 1:if(globalThis.FileList&&S instanceof globalThis.FileList){w.n=2;break}throw new Error("FileList is not supported in the current environment");case 2:return w.a(2,Promise.all(Array.from(S).map((function(){var x=Be(ae().m(function j(R){var T,M,V,J,ee;return ae().w(function(le){for(;;)switch(le.n){case 0:return T=R.name,M=R.type,V=M,J=T,le.n=1,new Promise(function($,Q){var ie=new FileReader;ie.onload=function(pe){var Y;$((Y=pe.target)==null?void 0:Y.result)},ie.onerror=function(pe){return Q(pe)},ie.readAsDataURL(R)});case 1:return ee=le.v,le.a(2,{type:"file",mediaType:V,filename:J,url:ee})}},j)}));return function(j){return x.apply(this,arguments)}})())))}},L)}));return function(L){return B.apply(this,arguments)}})()(F.files);case 4:O=Z.v;
111case 5:P={parts:[].concat(Fe(O),Fe("text"in F&&F.text!=null?[{type:"text",text:F.text}]:[]))},Z.n=7;break;case 6:P=F;case 7:if(F.messageId==null){Z.n=10;break}if(I=r.state.messages.findIndex(function(B){return B.id===F.messageId}),I!==-1){Z.n=8;break}throw new Error("message with id ".concat(F.messageId," not found"));case 8:if(r.state.messages[I].role==="user"){Z.n=9;break}throw new Error("message with id ".concat(F.messageId," is not a user message"));case 9:r.state.messages=r.state.messages.slice(0,I+1),r.state.replaceMessage(I,U(U({},P),{},{id:F.messageId,role:(C=P.role)!=null?C:"user",metadata:F.metadata})),Z.n=11;break;case 10:r.state.pushMessage(U(U({},P),{},{id:(A=P.id)!=null?A:r.generateId(),role:(N=P.role)!=null?N:"user",metadata:F.metadata}));case 11:return Z.n=12,r.makeRequest(U({trigger:"submit-message",messageId:F.messageId},_));case 12:return Z.a(2)}},b)}));return function(b,F){return g.apply(this,arguments)}})(),this.regenerate=Be(ae().m(function g(){var b,F,_,k,C=arguments;return ae().w(function(A){for(;;)switch(A.n){case 0:if(F=(b=C.length>0&&C[0]!==void 0?C[0]:{}).messageId,_=Dn(b,fp),k=F==null?r.state.messages.length-1:r.state.messages.findIndex(function(N){return N.id===F}),k!==-1){A.n=1;break}throw new Error("message ".concat(F," not found"));case 1:return r.state.messages=r.state.messages.slice(0,r.messages[k].role==="assistant"?k:k+1),A.n=2,r.makeRequest(U({trigger:"regenerate-message",messageId:F},_));case 2:return A.a(2)}},g)})),this.resumeStream=Be(ae().m(function g(){var b,F=arguments;return ae().w(function(_){for(;;)switch(_.n){case 0:return b=F.length>0&&F[0]!==void 0?F[0]:{},_.n=1,r.makeRequest(U({trigger:"resume-stream"},b));case 1:return _.a(2)}},g)})),this.clearError=function(){r.status==="error"&&(r.state.error=void 0,r.setStatus({status:"ready"}))},this.addToolOutput=(function(){var g=Be(ae().m(function b(F){var _,k,C,A,N;return ae().w(function(P){for(;;)if(P.n===0)return _=F.state,k=_===void 0?"output-available":_,F.tool,C=F.toolCallId,A=F.output,N=F.errorText,P.a(2,r.jobExecutor.run(Be(ae().m(function I(){var O,Z,B,L;return ae().w(function(S){for(;;)switch(S.n){case 0:B=r.state.messages,L=B[B.length-1],r.state.replaceMessage(B.length-1,U(U({},L),{},{parts:L.parts.map(function(w){return Qi(w)&&w.toolCallId===C?U(U({},w),{},{state:k,output:A,errorText:N}):w})})),r.activeResponse&&(r.activeResponse.state.message.parts=r.activeResponse.state.message.parts.map(function(w){return Qi(w)&&w.toolCallId===C?U(U({},w),{},{state:k,output:A,errorText:N}):w})),r.status!=="streaming"&&r.status!=="submitted"&&((O=r.sendAutomaticallyWhen)!=null&&O.call(r,{messages:r.state.messages}))&&r.makeRequest({trigger:"submit-message",messageId:(Z=r.lastMessage)==null?void 0:Z.id});case 1:return S.a(2)}},I)}))))},b)}));return function(b){return g.apply(this,arguments)}})(),this.addToolResult=this.addToolOutput,this.stop=Be(ae().m(function g(){var b;return ae().w(function(F){for(;;)switch(F.n){case 0:r.status!=="streaming"&&r.status!=="submitted"||(b=r.activeResponse)!=null&&b.abortController&&r.activeResponse.abortController.abort();case 1:return F.a(2)}},g)})),this.id=o,this.transport=c,this.generateId=a,this.messageMetadataSchema=d,this.dataPartSchemas=f,this.state=l,this.onError=h,this.onToolCall=m,this.onFinish=D,this.onData=y,this.sendAutomaticallyWhen=E},[{key:"status",get:function(){return this.state.status}},{key:"setStatus",value:function(t){var n=t.status,r=t.error;this.status!==n&&(this.state.status=n,this.state.error=r)}},{key:"error",get:function(){return this.state.error}},{key:"messages",get:function(){return this.state.messages},set:function(t){this.state.messages=t}},{key:"lastMessage",get:function(){return this.state.messages[this.state.messages.length-1]}},{key:"makeRequest",value:(e=Be(ae().m(function t(n){var r,u,a,i,o,s,c,d,f,l,h,m,D,y,E,g,b,F,_=this;return ae().w(function(k){for(;;)switch(k.p=k.n){case 0:if(r=n.trigger,u=n.metadata,a=n.headers,i=n.body,o=n.messageId,this.setStatus({status:"submitted",error:void 0}),l=this.lastMessage,h=!1,m=!1,D=!1,k.p=1,(y={state:bg({lastMessage:this.state.snapshot(l),messageId:this.generateId()}),abortController:new AbortController}).abortController.signal.addEventListener("abort",function(){h=!0}),this.activeResponse=y,r!=="resume-stream"){k.n=4;break}return k.n=2,this.transport.reconnectToStream({chatId:this.id,metadata:u,headers:a,body:i});case 2:if((g=k.v)!=null){k.n=3;break}return k.a(2,void this.setStatus({status:"ready"}));case 3:E=g,k.n=6;break;case 4:return k.n=5,this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:y.abortController.signal,metadata:u,headers:a,body:i,trigger:r,messageId:o});case 5:E=k.v;case 6:return b=function(C){return _.jobExecutor.run(function(){return C({state:y.state,write:function(){var A;_.setStatus({status:"streaming"}),y.state.message.id===((A=_.lastMessage)==null?void 0:A.id)?_.state.replaceMessage(_.state.messages.length-1,y.state.message):_.state.pushMessage(y.state.message)}})})},k.n=7,(function(){var C=Be(ae().m(function A(N){var P,I,O,Z;return ae().w(function(B){for(;;)switch(B.p=B.n){case 0:P=N.stream,I=N.onError,O=P.getReader(),B.p=1;case 2:return B.n=3,O.read();case 3:if(!B.v.done){B.n=4;break}return B.a(3,5);case 4:B.n=2;break;case 5:B.n=7;break;case 6:B.p=6,Z=B.v,I?.(Z);case 7:return B.p=7,O.releaseLock(),B.f(7);case 8:return B.a(2)}},A,null,[[1,6,7,8]])}
111));return function(A){return C.apply(this,arguments)}})()({stream:_g({stream:E,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:b,onError:function(C){throw C}}),onError:function(C){throw C}});case 7:this.setStatus({status:"ready"}),k.n=10;break;case 8:if(k.p=8,F=k.v,!h&&F.name!=="AbortError"){k.n=9;break}return k.a(2,(h=!0,this.setStatus({status:"ready"}),null));case 9:D=!0,F instanceof TypeError&&(F.message.toLowerCase().includes("fetch")||F.message.toLowerCase().includes("network"))&&(m=!0),this.onError&&F instanceof Error&&this.onError(F),this.setStatus({status:"error",error:F});case 10:k.p=10;try{(c=this.onFinish)==null||c.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:h,isDisconnect:m,isError:D,finishReason:(s=this.activeResponse)==null?void 0:s.state.finishReason})}catch(C){console.error(C)}return this.activeResponse=void 0,k.f(10);case 11:if(!((d=this.sendAutomaticallyWhen)!=null&&d.call(this,{messages:this.state.messages}))||D){k.n=12;break}return k.n=12,this.makeRequest({trigger:"submit-message",messageId:(f=this.lastMessage)==null?void 0:f.id,metadata:u,headers:a,body:i});case 12:return k.a(2)}},t,this,[[1,8,10,11]])})),function(t){return e.apply(this,arguments)})}]);var e})();function xg(e){var t=e.messages,n=t[t.length-1];if(!n||n.role!=="assistant")return!1;var r=n.parts.reduce(function(a,i,o){return i.type==="step-start"?o:a},-1),u=n.parts.slice(r+1).filter(Qi).filter(function(a){return!a.providerExecuted});return u.length>0&&u.every(function(a){return a.state==="output-available"||a.state==="output-error"})}var Et,ta,na,Mr,Zr,Lr,ur,Yi,Xi,ar,Og=(function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e})((Xc||(Xc=1,Yc=function(e,t){if(typeof e!="function")throw new TypeError("Expected the first argument to be a `function`, got `".concat(Qe(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)}}),Yc)),Ed=function(e,t,n){if(!t.has(e))throw TypeError("Cannot "+n)},Ze=function(e,t,n){return Ed(e,t,"read from private field"),n?n.call(e):t.get(e)},Lt=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)},dn=function(e,t,n,r){return Ed(e,t,"write to private field"),t.set(e,n),n},Bg=(function(){return jt(function e(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Pt(this,e),Lt(this,Et,void 0),Lt(this,ta,"ready"),Lt(this,na,void 0),Lt(this,Mr,new Set),Lt(this,Zr,new Set),Lt(this,Lr,new Set),this.pushMessage=function(r){dn(t,Et,Ze(t,Et).concat(r)),Ze(t,ur).call(t)},this.popMessage=function(){dn(t,Et,Ze(t,Et).slice(0,-1)),Ze(t,ur).call(t)},this.replaceMessage=function(r,u){dn(t,Et,[].concat(Fe(Ze(t,Et).slice(0,r)),[t.snapshot(u)],Fe(Ze(t,Et).slice(r+1)))),Ze(t,ur).call(t)},this.snapshot=function(r){return structuredClone(r)},this["~registerMessagesCallback"]=function(r,u){var a,i,o=u?(a=r,(i=u)!=null?Og(a,i):a):r;return Ze(t,Mr).add(o),function(){Ze(t,Mr).delete(o)}},this["~registerStatusCallback"]=function(r){return Ze(t,Zr).add(r),function(){Ze(t,Zr).delete(r)}},this["~registerErrorCallback"]=function(r){return Ze(t,Lr).add(r),function(){Ze(t,Lr).delete(r)}},Lt(this,ur,function(){Ze(t,Mr).forEach(function(r){return r()})}),Lt(this,Yi,function(){Ze(t,Zr).forEach(function(r){return r()})}),Lt(this,Xi,function(){Ze(t,Lr).forEach(function(r){return r()})}),dn(this,Et,n)},[{key:"status",get:function(){return Ze(this,ta)},set:function(e){dn(this,ta,e),Ze(this,Yi).call(this)}},{key:"error",get:function(){return Ze(this,na)},set:function(e){dn(this,na,e),Ze(this,Xi).call(this)}},{key:"messages",get:function(){return Ze(this,Et)},set:function(e){dn(this,Et,Fe(e)),Ze(this,ur).call(this)}}])})();Et=new WeakMap,ta=new WeakMap,na=new WeakMap,Mr=new WeakMap,Zr=ne
111w WeakMap,Lr=new WeakMap,ur=new WeakMap,Yi=new WeakMap,Xi=new WeakMap;var el=(function(){function e(t){var n,r=t.messages,u=Dn(t,dp);Pt(this,e);var a=new Bg(r);return n=qn(this,e,[U(U({},u),{},{state:a})]),Lt(nr(n),ar,void 0),n["~registerMessagesCallback"]=function(i,o){return Ze(nr(n),ar)["~registerMessagesCallback"](i,o)},n["~registerStatusCallback"]=function(i){return Ze(nr(n),ar)["~registerStatusCallback"](i)},n["~registerErrorCallback"]=function(i){return Ze(nr(n),ar)["~registerErrorCallback"](i)},dn(nr(n),ar,a),n}return Un(e,Sg),jt(e)})();ar=new WeakMap;var tl="askai_token",bd=function(e){return"https://".concat(e,".algolia.net/agent-studio/1")},Ig=function(e){if(!e)return!0;try{var t=(function(r){var u=xe(r.split("."),1)[0];return JSON.parse(atob(u))})(e),n=t.exp;return Date.now()/1e3>n-30}catch{return!0}},Hu=null,_d=(function(){var e=be(X().m(function t(n){var r,u,a,i,o,s;return X().w(function(c){for(;;)switch(c.n){case 0:if(r=n.assistantId,u=n.abortSignal,a=n.useStagingEnv,i=a!==void 0&&a,o=sessionStorage.getItem(tl),Ig(o)){c.n=1;break}return c.a(2,o);case 1:return s=i?Do:mo,Hu||(Hu=fetch("".concat(s,"/token"),{method:"POST",headers:{"x-algolia-assistant-id":r,"content-type":"application/json"},signal:u}).then(function(d){return d.json()}).then(function(d){var f=d.token,l=d.success,h=d.message;if(!l&&h)throw new Error(h);return sessionStorage.setItem(tl,f),f}).finally(function(){return Hu=null})),c.a(2,Hu)}},t)}));return function(t){return e.apply(this,arguments)}})(),Tg=(function(){var e=be(X().m(function t(n){var r,u,a,i,o,s,c,d,f,l;return X().w(function(h){for(;;)switch(h.n){case 0:return r=n.assistantId,u=n.thumbs,a=n.messageId,i=n.appId,o=n.abortSignal,s=n.useStagingEnv,c=s!==void 0&&s,(d=new Headers).set("x-algolia-assistant-id",r),d.set("content-type","application/json"),h.n=1,_d({assistantId:r,abortSignal:o,useStagingEnv:c});case 1:return f=h.v,d.set("authorization","TOKEN ".concat(f)),l=c?Do:mo,h.a(2,fetch("".concat(l,"/feedback"),{method:"POST",body:JSON.stringify({appId:i,messageId:a,thumbs:u}),headers:d}))}},t)}));return function(t){return e.apply(this,arguments)}})(),Pg=function(e){var t=e.agentId,n=e.vote,r=e.messageId,u=e.appId,a=e.apiKey,i=e.abortSignal,o=new Headers;o.set("x-algolia-application-id",u),o.set("x-algolia-api-key",a),o.set("content-type","application/json");var s="".concat(bd(u),"/feedback");return fetch(s,{method:"POST",body:JSON.stringify({messageId:r,agentId:t,vote:n}),headers:o,signal:i})},jg=["assistantId","apiKey","appId","indexName","useStagingEnv"],Ng=function(e){var t=e.assistantId,n=e.apiKey,r=e.appId,u=e.indexName,a=e.useStagingEnv,i=a!==void 0&&a,o=ut(e,jg),s=Yt(new AbortController),c=xe(_n(function(){return $i()}),2),d=c[0],f=c[1],l=Yt(null),h=Yt(null),m=Yt(null),D=ft(function(){return o.agentStudio?(function(S){var w=S.appId,x=S.apiKey,j=S.assistantId,R=S.searchParameters;return new Gi({api:"".concat(bd(w),"/agents/").concat(j,"/completions?stream=true&compatibilityMode=ai-sdk-5"),headers:{"x-algolia-application-id":w,"x-algolia-api-key":x},body:R?{algolia:{searchParameters:R}}:{}})})({apiKey:n,appId:r,assistantId:t??"",searchParameters:o.searchParameters}):(function(S){var w,x=S.assistantId,j=S.apiKey,R=S.indexName,T=S.searchParameters,M=S.appId,V=S.abortControllerRef,J=S.useStagingEnv;return new Gi({api:J?Do:mo,headers:(w=be(X().m(function ee(){var le;return X().w(function($){for(;;)switch($.n){case 0:if(x){$.n=1;break}throw new Error("Ask AI assistant ID is required");case 1:return $.n=2,_d({assistantId:x,abortSignal:V.current.signal,useStagingEnv:J});case 2:return le=$.v,$.a(2,v(v({},le?{authorization:"TOKEN ".concat(le)}:{}),{},{"X-Algolia-API-Key":j,"X-Algolia-Application-Id":M,"X-Algolia-Index-Name":R,"X-Algolia-Assistant-Id":x||"","X-AI-SDK-Version":"v5"}))}},ee)})),function(){return w.apply(this,arguments)}),body:T?{searchParameters:T}:{}})})({assistantId:t??"",apiKey:n,appId:r,indexName:u,searchParameters:o.searchParameters,abortControllerRef:s,useStagingEnv:i})},[n,r,t,u,i,o]),y=(function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},w=S.experimental_throttle,x=S.resume,j=x!==void 0&&x,R=Dn(S,pp),T=Yt("chat"in R?R.chat:new el(R));("chat"in R&&R.chat!==T.current||"id"in R&&T.current.id!==R.id)&&(T.current="chat"in R?R.chat:new el(R));var M="id"in R?R.id:null,V=Rn(function(Q){return T.current["~registerMessagesCallback"](Q,w)},[w,M]),J=Ur(V,function(){return T.current.messages}),ee=Ur(T.current["~registerStatusCallback"],function(){return T.current.status}),le=Ur(T.current["~registerErrorCallback"],function(){return T.current.error}),$=Rn(function(Q){typeof Q=="function"&&(Q=Q(T.current.messages)),T.current.messages=Q},[T]);return bt(function(){j&&T.current.resumeStream()},[j,T]),{id:T.current.id,messages:J,setMessages:$,sendMessage:T.current.sendMessage,regenerate:T.current.regenerate,clearError:T.current.clearError,stop:T.current.stop,error:le,resumeStream:T.current.resumeStream,status:ee,addToolResult:T.current.addToolOutput,addToolOutput:T.current.addToolOutput}})(ft(function(){return{id:d,sendAutomaticallyWhen:xg,transport:D}},[d,D])),E=y.messages,g=y.sendMessage,b=y.status,F=y.setMessages,_=y.error,k=y.stop,C=y.clearError;h.current=g,m.current=F;var A=Yt((function(S){var w=S.limit,x=w===void 0?5:w,j=af(S.key),R=j.getItem().slice(0,x);return{add:function(T){var M=T.objectID,V=T.query,J=R.findIndex(function(ee){return ee.objectID===M||ee.query===V});J>-1?R[J]=T:(R.unshift(T),R=R.slice(0,x)),j.setItem(R)},addFeedback:function(T,M){var V=R.find(function(ee){var le;return(le=ee.messages)===null||le===void 0?void 0:le.some(function($){return $.id===T})});if(V&&V.messages){var J=V.messages.find(function(ee){return ee.id===T});J&&(J.feedback=M,j.setItem(R))}},getOne:function(T){var M,V=R.find(function(J){var ee;return(ee=J.messages)===null||ee===void 0?void 0:ee.some(function(le){return le.id===T})});return V==null||(M=V.messages)===null||M===void 0?void 0:M.find(function(J){return J.id===T})},getAll:function(){return R},remove:function(T){R=R.filter(function(M){return M.objectID!==T.objectID}),j.setItem(R)},getConversation:function(T){var M=R.find(function(V){var J;return(J=V.messages)===null||J===void 0?void 0:J.some(function(ee){return ee.id===T})});if(M&&M.messages)return M}}})({key:"__DOCSEARCH_ASKAI_CONVERSATIONS__".concat(u),limit:10})).current,N=Rn((function(){var S=be(X().m(function w(x,j){var R;return X().w(function(T){for(;;)switch(T.n){case 0:if(t){T.n=1;break}return T.a(2);case 1:return T.n=2,o.agentStudio?Pg({agentId:t,vote:j,messageId:x,appId:r,apiKey:n,abortSignal:s.current.signal}):Tg({assistantId:t,thumbs:j,messageId:x,appId:r,abortSignal:s.current.signal,useStagingEnv:i});case 2:if(!(T.v.status>=300)){T.n=3;break}throw new Error("Failed, try again later.");case 3:(R=A.addFeedback)===null||R===void 0||R.call(A,x,j===1?"like"
111:"dislike");case 4:return T.a(2)}},w)}));return function(w,x){return S.apply(this,arguments)}})(),[t,o.agentStudio,r,n,i,A]),P=Rn(function(){s.current.abort(),s.current=new AbortController},[]),I=Rn(function(S){P(),l.current=S??null,f($i())},[P]);bt(function(){var S=l.current;if(S!==null){var w=h.current,x=m.current;if(S.kind==="sendText"){var j;return w?(l.current=null,void w({text:S.text},(j=S.requestOptions)!==null&&j!==void 0?j:{})):void 0}if(S.kind==="sendUserMessage"){var R;return w?(l.current=null,void w(S.message,(R=S.requestOptions)!==null&&R!==void 0?R:{})):void 0}x&&(l.current=null,x(S.messages))}},[d]);var O=(function(){var S=be(X().m(function w(){return X().w(function(x){for(;;)switch(x.n){case 0:return s.current.abort(),x.n=1,k();case 1:s.current=new AbortController;case 2:return x.a(2)}},w)}));return function(){return S.apply(this,arguments)}})(),Z=ft(function(){for(var S=[],w=0;w<E.length;w++)if(E[w].role==="user"){var x,j=E[w],R=((x=E[w+1])===null||x===void 0?void 0:x.role)==="assistant"?E[w+1]:null;S.push({id:j.id,userMessage:j,assistantMessage:R}),R&&w++}return S},[E]),B=b==="streaming"||b==="submitted",L=ft(function(){if(_)return o.agentStudio?(function(S){var w,x,j=S.message;try{x=JSON.parse(j)}catch{var R=Nr(j);return new Error(R??j)}for(;typeof x=="string";)try{x=JSON.parse(x.trim())}catch{var T=Nr(j);return new Error(T??x)}if(Qe(x)!=="object"||x===null||Array.isArray(x)){var M=Nr(j);return new Error(M??j)}var V,J=x;if(J.name==="ValidationError"){var ee=J,le=j;if(ee.detail&&ee.detail.length>0){var $=ee.detail[0],Q=$.msg,ie=$.loc.at(-1);le="".concat(Q,": ").concat(ie)}return new Error(le)}V=Nr(j)||(typeof J.message=="string"&&J.message.trim()!==""?J.message.trim():typeof J.error=="string"&&J.error.trim()!==""?J.error.trim():j);var pe=(w=J.code)!==null&&w!==void 0?w:J.errorCode;if(typeof pe=="string"&&pe.trim()!==""){var Y=pe.trim();V.toUpperCase().includes(Y.toUpperCase())||(V="".concat(V," (").concat(Y,")"))}return new Error(V)})(_):_},[_,o.agentStudio]);return{messages:E,sendMessage:g,status:b,setMessages:F,clearError:C,resetAskAiAbortScope:P,resetAskAiChatSession:I,askAiError:L,stopAskAiStreaming:O,isStreaming:B,exchanges:Z,conversations:A,sendFeedback:N}};function zg(e){var t,n="algolia-client-js-".concat(e.key);function r(){return t===void 0&&(t=e.localStorage||window.localStorage),t}function u(){return JSON.parse(r().getItem(n)||"{}")}function a(i){r().setItem(n,JSON.stringify(i))}return{get:function(i,o){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var c,d,f;return c=e.timeToLive?1e3*e.timeToLive:null,d=u(),a(f=Object.fromEntries(Object.entries(d).filter(function(l){return xe(l,2)[1].timestamp!==void 0}))),c&&a(Object.fromEntries(Object.entries(f).filter(function(l){var h=xe(l,2)[1],m=new Date().getTime();return!(h.timestamp+c<m)}))),u()[JSON.stringify(i)]}).then(function(c){return Promise.all([c?c.value:o(),c!==void 0])}).then(function(c){var d=xe(c,2),f=d[0],l=d[1];return Promise.all([f,l||s.miss(f)])}).then(function(c){return xe(c,1)[0]})},set:function(i,o){return Promise.resolve().then(function(){var s=u();return s[JSON.stringify(i)]={timestamp:new Date().getTime(),value:o},r().setItem(n,JSON.stringify(s)),o})},delete:function(i){return Promise.resolve().then(function(){var o=u();delete o[JSON.stringify(i)],r().setItem(n,JSON.stringify(o))})},clear:function(){return Promise.resolve().then(function(){r().removeItem(n)})}}}function $r(e){var t=G(e.caches),n=t.shift();return n===void 0?{get:function(r,u){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return u().then(function(i){return Promise.all([i,a.miss(i)])}).then(function(i){return xe(i,1)[0]})},set:function(r,u){return Promise.resolve(u)},delete:function(r){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(r,u){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(r,u,a).catch(function(){return $r({caches:t}).get(r,u,a)})},set:function(r,u){return n.set(r,u).catch(function(){return $r({caches:t}).set(r,u)})}
111,delete:function(r){return n.delete(r).catch(function(){return $r({caches:t}).delete(r)})},clear:function(){return n.clear().catch(function(){return $r({caches:t}).clear()})}}}function ui(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var u=arguments.length>2&&arguments[2]!==void 0?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(o){return u.miss(o)}).then(function(){return i})},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(n){return delete t[JSON.stringify(n)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function Rg(e){var t=e.algoliaAgents,n=e.client,r=e.version,u=(function(a){var i={value:"Algolia for JavaScript (".concat(a,")"),add:function(o){var s="; ".concat(o.segment).concat(o.version!==void 0?" (".concat(o.version,")"):"");return i.value.indexOf(s)===-1&&(i.value="".concat(i.value).concat(s)),i}};return i})(r).add({segment:n,version:r});return t.forEach(function(a){return u.add(a)}),u}var nl=12e4;function rl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"up",n=Date.now();return v(v({},e),{},{status:t,lastUpdate:n,isUp:function(){return t==="up"||Date.now()-n>nl},isTimedOut:function(){return t==="timed out"&&Date.now()-n<=nl}})}var kd=(function(){function e(t,n){var r;return se(this,e),Se(r=De(this,e,[t]),"name","AlgoliaError"),n&&(r.name=n),r}return ve(e,yn(Error)),ce(e)})(),Cd=(function(){function e(t,n,r){var u;return se(this,e),Se(u=De(this,e,[t,r]),"stackTrace",void 0),u.stackTrace=n,u}return ve(e,kd),ce(e)})(),Mg=(function(){function e(t){return se(this,e),De(this,e,["Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support",t,"RetryError"])}return ve(e,Cd),ce(e)})(),eo=(function(){function e(t,n,r){var u,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"ApiError";return se(this,e),Se(u=De(this,e,[t,r,a]),"status",void 0),u.status=n,u}return ve(e,Cd),ce(e)})(),Zg=(function(){function e(t,n){var r;return se(this,e),Se(r=De(this,e,[t,"DeserializationError"]),"response",void 0),r.response=n,r}return ve(e,kd),ce(e)})(),Lg=(function(){function e(t,n,r,u){var a;return se(this,e),Se(a=De(this,e,[t,n,u,"DetailedApiError"]),"error",void 0),a.error=r,a}return ve(e,eo),ce(e)})();function $g(e,t,n){var r,u=(r=n,Object.keys(r).filter(function(i){return r[i]!==void 0}).sort().map(function(i){return"".concat(i,"=").concat(encodeURIComponent(Object.prototype.toString.call(r[i])==="[object Array]"?r[i].join(","):r[i]).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 qg(e,t){if(e.method!=="GET"&&(e.data!==void 0||t.data!==void 0)){var n=Array.isArray(e.data)?e.data:v(v({},e.data),t.data);return JSON.stringify(n)}}function Ug(e,t,n){var r=v(v(v({Accept:"application/json"},e),t),n),u={};return Object.keys(r).forEach(function(a){var i=r[a];u[a.toLowerCase()]=i}),u}function Hg(e){try{return JSON.parse(e.content)}catch(t){throw new Zg(t.message,e)}}function Vg(e,t){var n=e.content,r=e.status;try{var u=JSON.parse(n);return"error"in u?new Lg(u.message,r,u.error,t):new eo(u.message,r,t)}catch{}return new eo(n,r,t)}function Wg(e){var t=e.isTimedOut,n=e.status;return t||(function(r){return!r.isTimedOut&&~~r.status===0})({isTimedOut:t,status:n})||~~(n/100)!=2&&~~(n/100)!=4}function Jg(e){return~~(e.status/100)==2}function Kg(e){return e.map(function(t){return Ad(t)})}function Ad(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return v(v({},e),{},{request:v(v({},e.request),{},{headers:v(v({},e.request.headers),t)})})}var Qg=["appId","apiKey","authMode","algoliaAgents"],Gg=["params"],ul="5.43.0";function Yg(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat((function(t){for(var n=t,r=t.length-1;r>0;r--){var u=Math.floor(Math.random()*(r+1)),a=t[r];n[r]=t[u],n[u]=a}return n})([{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 to="4.6.3";function Xg(e,t,n){var r=p.useMemo(function(){var u=(function(a,i){if(!a||typeof a!="string")throw new Error("`appId` is missing.");
111if(!i||typeof i!="string")throw new Error("`apiKey` is missing.");return(function(o){var s=o.appId,c=o.apiKey,d=o.authMode,f=o.algoliaAgents,l=ut(o,Qg),h=(function(D,y){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"WithinHeaders",g={"x-algolia-api-key":y,"x-algolia-application-id":D};return{headers:function(){return E==="WithinHeaders"?g:{}},queryParameters:function(){return E==="WithinQueryParameters"?g:{}}}})(s,c,d),m=(function(D){var y=D.hosts,E=D.hostsCache,g=D.baseHeaders,b=D.logger,F=D.baseQueryParameters,_=D.algoliaAgent,k=D.timeouts,C=D.requester,A=D.requestsCache,N=D.responsesCache;function P(B){return I.apply(this,arguments)}function I(){return(I=be(X().m(function B(L){var S,w,x,j,R;return X().w(function(T){for(;;)switch(T.n){case 0:return T.n=1,Promise.all(L.map(function(M){return E.get(M,function(){return Promise.resolve(rl(M))})}));case 1:return S=T.v,w=S.filter(function(M){return M.isUp()}),x=S.filter(function(M){return M.isTimedOut()}),j=[].concat(G(w),G(x)),R=j.length>0?j:L,T.a(2,{hosts:R,getTimeout:function(M,V){return(x.length===0&&M===0?1:x.length+3+M)*V}})}},B)}))).apply(this,arguments)}function O(B,L){return Z.apply(this,arguments)}function Z(){return Z=be(X().m(function B(L,S){var w,x,j,R,T,M,V,J,ee,le,$,Q,ie,pe=arguments;return X().w(function(Y){for(;;)switch(Y.n){case 0:if(w=!(pe.length>2&&pe[2]!==void 0)||pe[2],x=[],j=qg(L,S),R=Ug(g,L.headers,S.headers),T=L.method==="GET"?v(v({},L.data),S.data):{},M=v(v(v({},F),L.queryParameters),T),_.value&&(M["x-algolia-agent"]=_.value),S&&S.queryParameters)for(V=0,J=Object.keys(S.queryParameters);V<J.length;V++)ee=J[V],S.queryParameters[ee]&&Object.prototype.toString.call(S.queryParameters[ee])!=="[object Object]"?M[ee]=S.queryParameters[ee].toString():M[ee]=S.queryParameters[ee];return le=0,$=(function(){var oe=be(X().m(function _e(ze,ke){var Pe,Me,Nt,Vt,at,Wt;return X().w(function(Ge){for(;;)switch(Ge.n){case 0:if((Pe=ze.pop())!==void 0){Ge.n=1;break}throw new Mg(Kg(x));case 1:return Me=v(v({},k),S.timeouts),Nt={data:j,headers:R,method:L.method,url:$g(Pe,L.path,M),connectTimeout:ke(le,Me.connect),responseTimeout:ke(le,w?Me.read:Me.write)},Vt=function(zt){var ct={request:Nt,response:zt,host:Pe,triesLeft:ze.length};return x.push(ct),ct},Ge.n=2,C.send(Nt);case 2:if(!Wg(at=Ge.v)){Ge.n=4;break}return Wt=Vt(at),at.isTimedOut&&le++,b.info("Retryable failure",Ad(Wt)),Ge.n=3,E.set(Pe,rl(Pe,at.isTimedOut?"timed out":"down"));case 3:return Ge.a(2,$(ze,ke));case 4:if(!Jg(at)){Ge.n=5;break}return Ge.a(2,Hg(at));case 5:throw Vt(at),Vg(at,x);case 6:return Ge.a(2)}},_e)}));return function(_e,ze){return oe.apply(this,arguments)}})(),Q=y.filter(function(oe){return oe.accept==="readWrite"||(w?oe.accept==="read":oe.accept==="write")}),Y.n=1,P(Q);case 1:return ie=Y.v,Y.a(2,$(G(ie.hosts).reverse(),ie.getTimeout))}},B)})),Z.apply(this,arguments)}return{hostsCache:E,requester:C,timeouts:k,logger:b,algoliaAgent:_,baseHeaders:g,baseQueryParameters:F,hosts:y,request:function(B){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=B.useReadTransporter||B.method==="GET";if(!S)return O(B,L,S);var w=function(){return O(B,L)};if((L.cacheable||B.cacheable)!==!0)return w();var x={request:B,requestOptions:L,transporter:{queryParameters:F,headers:g}};return N.get(x,function(){return A.get(x,function(){return A.set(x,w()).then(function(j){return Promise.all([A.delete(x),j])},function(j){return Promise.all([A.delete(x),Promise.reject(j)])}).then(function(j){var R=xe(j,2);return R[0],R[1]})})},{miss:function(j){return N.set(x,j)}})},requestsCache:A,responsesCache:N}})(v(v({hosts:Yg(s)},l),{},{algoliaAgent:Rg({algoliaAgents:f,client:"Lite",version:ul}),baseHeaders:v(v({"content-type":"text/plain"},h.headers()),l.baseHeaders),baseQueryParameters:v(v({},h.queryParameters()),l.baseQueryParameters)}));return{transporter:m,appId:s,apiKey:c,clearCache:function(){return Promise.all([m.requestsCache.clear(),m.responsesCache.clear()]).then(function(){})},get _ua(){return m.algoliaAgent.value},addAlgoliaAgent:function(D,y){m.algoliaAgent.add({segment:D,version:y})},setClientApiKey:function(D){var y=D.apiKey;d&&d!=="WithinHeaders"?m.baseQueryParameters["x-algolia-api-key"]=y:m.baseHeaders["x-algolia-api-key"]=y},searchForHits:function(D,y){return this.search(D,y)},searchForFacets:function(D,y){return this.search(D,y)},customPost:function(D,y){var E=D.path,g=D.parameters,b=D.body;if(!E)throw new Error("Parameter `path` is required when calling `customPost`.");var F={method:"POST",path:"/{path}".replace("{path}",E),queryParameters:g||{},headers:{},data:b||{}};return m.request(F,y)},getRecommendations:function(D,y){if(D&&Array.isArray(D)&&(D={requests:D}),!D)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!D.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var E={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:D,useReadTransporter:!0,cacheable:!0};return m.request(E,y)},search:function(D,y){if(D&&Array.isArray(D)){var E={requests:D.map(function(b){var F=b.params,_=ut(b,Gg);return _.type==="facet"?v(v(v({},_),F),{},{type:"facet"}):v(v(v({},_),F),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})})};D=E}if(!D)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!D.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var g={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:D,useReadTransporter:!0,cacheable:!0};return m.request(g,y)}}})(v({appId:a,apiKey:i,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:function(o,s){return Promise.resolve()},info:function(o,s){return Promise.resolve()},error:function(o,s){return Promise.resolve()}},requester:{send:function(o){return new Promise(function(s){var c=new XMLHttpRequest;
111c.open(o.method,o.url,!0),Object.keys(o.headers).forEach(function(h){return c.setRequestHeader(h,o.headers[h])});var d,f=function(h,m){return setTimeout(function(){c.abort(),s({status:0,content:m,isTimedOut:!0})},h)},l=f(o.connectTimeout,"Connection timeout");c.onreadystatechange=function(){c.readyState>c.OPENED&&d===void 0&&(clearTimeout(l),d=f(o.responseTimeout,"Socket timeout"))},c.onerror=function(){c.status===0&&(clearTimeout(l),clearTimeout(d),s({content:c.responseText||"Network request failed",status:c.status,isTimedOut:!1}))},c.onload=function(){clearTimeout(l),clearTimeout(d),s({content:c.responseText,status:c.status,isTimedOut:!1})},c.send(o.data)})}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:ui(),requestsCache:ui({serializable:!1}),hostsCache:$r({caches:[zg({key:"".concat(ul,"-").concat(a)}),ui()]})},void 0))})(e,t);return u.addAlgoliaAgent("docsearch",to),/docsearch.js \(.*\)/.test(u.transporter.algoliaAgent.value)===!1&&u.addAlgoliaAgent("docsearch-react",to),n(u)},[e,t,n]);return r}var ey=["appId","apiKey","askAi","maxResultsPerGroup","theme","onClose","transformItems","hitComponent","resultsFooterComponent","navigator","initialScrollY","transformSearchClient","disableUserPersonalization","initialQuery","translations","getMissingResultsUrl","insights","onAskAiToggle","interceptAskAiEvent","isAskAiActive","recentSearchesLimit","recentSearchesWithFavoritesLimit","indices","indexName","searchParameters","isHybridModeSupported"],ty=["footer","searchBox"],ny=(function(){var e=be(X().m(function t(n){var r,u,a,i,o,s,c,d,f,l,h,m,D,y,E,g,b,F,_;return X().w(function(k){for(;;)switch(k.p=k.n){case 0:return r=n.query,u=n.state,a=n.setContext,i=n.setStatus,o=n.searchClient,s=n.indexes,c=n.snippetLength,d=n.insights,f=n.appId,l=n.apiKey,h=n.maxResultsPerGroup,m=n.transformItems,D=m===void 0?Fi:m,y=n.saveRecentSearch,E=n.onClose,g=d,k.p=1,k.n=2,o.search({requests:s.map(function(C){var A,N,P,I,O,Z,B,L=typeof C=="string"?C:C.name,S=typeof C=="string"?{}:C.searchParameters;return v({query:r,indexName:L,attributesToRetrieve:(A=S?.attributesToRetrieve)!==null&&A!==void 0?A:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:(N=S?.attributesToSnippet)!==null&&N!==void 0?N:["hierarchy.lvl1:".concat(c.current),"hierarchy.lvl2:".concat(c.current),"hierarchy.lvl3:".concat(c.current),"hierarchy.lvl4:".concat(c.current),"hierarchy.lvl5:".concat(c.current),"hierarchy.lvl6:".concat(c.current),"content:".concat(c.current)],snippetEllipsisText:(P=S?.snippetEllipsisText)!==null&&P!==void 0?P:"â¦",highlightPreTag:(I=S?.highlightPreTag)!==null&&I!==void 0?I:"<mark>",highlightPostTag:(O=S?.highlightPostTag)!==null&&O!==void 0?O:"</mark>",hitsPerPage:(Z=S?.hitsPerPage)!==null&&Z!==void 0?Z:20,clickAnalytics:(B=S?.clickAnalytics)!==null&&B!==void 0?B:g},S??{})})});case 2:return b=k.v,F=b.results,k.a(2,F.flatMap(function(C){var A,N=C,P=N.hits,I=N.nbHits,O=Cs(D(P),function(L){return ql(L)},h);if(u.context.searchSuggestions.length<Object.keys(O).length&&a({searchSuggestions:v(v({},(A=u.context.searchSuggestions)!==null&&A!==void 0?A:[]),Object.keys(O))}),I){var Z=u.context.nbHits;a({nbHits:(Z??0)+I})}var B={};return g&&(B={__autocomplete_indexName:N.index,__autocomplete_queryID:N.queryID,__autocomplete_algoliaCredentials:{appId:f,apiKey:l}}),Object.values(O).map(function(L,S){return{sourceId:"hits_".concat(N.index,"_").concat(S),onSelect:function(w){var x=w.item,j=w.event;y(x),Ju(j)||E()},getItemUrl:function(w){return w.item.url},getItems:function(){return Object.values(Cs(L,function(w){return w.hierarchy.lvl1},h)).map(function(w){return w.map(function(x){var j=null,R=w.find(function(T){return T.type==="lvl1"&&T.hierarchy.lvl1===x.hierarchy.lvl1});return x.type!=="lvl1"&&R&&(j=R),v(v({},x),{},{__docsearch_parent:j},B)})}).flat()}}})}));case 3:throw k.p=3,(_=k.v).name==="RetryError"&&i("error"),_;case 4:return k.a(2)}},t,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}})();function ry(e){var t,n,r,u,a=e.appId,i=e.apiKey,o=e.askAi,s=e.maxResultsPerGroup,c=e.theme,d=e.onClose,f=d===void 0?yp:d,l=e.transformItems,h=l===void 0?Fi:l,m=e.hitComponent,D=m===void 0?s0:m,y=e.resultsFooterComponent,E=y===void 0?function(){return null}:y,g=e.navigator,b=e.initialScrollY,F=b===void 0?0:b,_=e.transformSearchClient,k=_===void 0?Fi:_,C=e.disableUserPersonalization,A=C!==void 0&&C,N=e.initialQuery,P=N===void 0?"":N,I=e.translations,O=I===void 0?{}:I,Z=e.getMissingResultsUrl,B=e.insights,L=B!==void 0&&B,S=e.onAskA
111iToggle,w=e.interceptAskAiEvent,x=e.isAskAiActive,j=x!==void 0&&x,R=e.recentSearchesLimit,T=R===void 0?7:R,M=e.recentSearchesWithFavoritesLimit,V=M===void 0?4:M,J=e.indices,ee=J===void 0?[]:J,le=e.indexName,$=e.searchParameters,Q=e.isHybridModeSupported,ie=Q!==void 0&&Q,pe=ut(e,ey),Y=O.footer,oe=O.searchBox,_e=ut(O,ty),ze=xe(p.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),ke=ze[0],Pe=ze[1],Me=!!o,Nt=(O==null||(t=O.searchBox)===null||t===void 0?void 0:t.placeholderText)||pe.placeholder||"Search docs";Me&&(Nt=(O==null||(r=O.searchBox)===null||r===void 0?void 0:r.placeholderText)||"Search docs or ask AI a question"),j&&(Nt=(O==null||(u=O.searchBox)===null||u===void 0?void 0:u.placeholderTextAskAi)||"Ask another question...");var Vt=p.useRef(null),at=p.useRef(null),Wt=p.useRef(null),Ge=p.useRef(null),zt=p.useRef(null),ct=p.useRef(15),pt=p.useRef(typeof window<"u"?window.getSelection().toString().slice(0,512):"").current,Ct=p.useRef(P||pt).current,kn=Xg(a,i,k),Ye=Qe(o)==="object"?o:null,rn=typeof o=="string"?o:Ye?.assistantId||null,un=Ye?.searchParameters,_r=Ye?.useStagingEnv||!1,kr=xe(p.useState("initial"),2),Rt=kr[0],ht=kr[1],ja=(function(W){var he=W.assistantId,ye=W.searchClient,et=W.suggestedQuestionsEnabled,Ue=et!==void 0&&et,At=xe(_n([]),2),Kn=At[0],Qn=At[1];return bt(function(){var Ra=(function(){var Ma=be(X().m(function vt(){var wt,Ou,xr;return X().w(function(xn){for(;;)switch(xn.n){case 0:return xn.n=1,ye.search({requests:[{indexName:"algolia_ask_ai_suggested_questions",filters:"state:published AND assistantId:".concat(he),hitsPerPage:3}]});case 1:wt=xn.v,Ou=wt.results,xr=Ou[0],Qn(xr.hits);case 2:return xn.a(2)}},vt)}));return function(){return Ma.apply(this,arguments)}})();Ue&&he&&he!==""&&Ra()},[Ue,he,ye]),Kn})({assistantId:rn,searchClient:kn,suggestedQuestionsEnabled:Ye?.suggestedQuestions}),Cn=(n=Ye?.agentStudio)!==null&&n!==void 0&&n,an=[];if(le&&le!==""&&an.push({name:le,searchParameters:$}),ee.length>0&&ee.forEach(function(W){an.push(typeof W=="string"?{name:W}:W)}
111),an.length<1)throw new Error("Must supply either `indexName` or `indices` for DocSearch to work");var An=an[0].name,on=p.useRef(hc({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(An),limit:10})).current,wn=p.useRef(hc({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(An),limit:on.getAll().length===0?T:V})).current,Cr=xe(p.useState(!1),2),je=Cr[0],Jt=Cr[1],Mt=Ng({assistantId:rn,apiKey:Ye?.apiKey||i,appId:Ye?.appId||a,indexName:Ye?.indexName||An,searchParameters:un,useStagingEnv:_r,agentStudio:Cn}),Vn=Mt.messages,sn=Mt.status,zo=Mt.sendMessage,Sd=Mt.stopAskAiStreaming,Wn=Mt.askAiError,Ro=Mt.sendFeedback,xu=Mt.conversations,Ar=Mt.clearError,Mo=Mt.resetAskAiAbortScope,wr=Mt.resetAskAiChatSession,Zo=p.useRef(sn);p.useEffect(function(){if(!A){if(Zo.current==="streaming"&&sn==="ready"){je&&Vn.at(-1)&&(Vn.at(-1).metadata={stopped:!0});var W=Vn[0];if(W!=null&&W.parts){var he,ye=K(W.parts);try{for(ye.s();!(he=ye.n()).done;){var et=he.value;et.type==="text"&&xu.add(Dp(et.text,Vn))}}catch(Ue){ye.e(Ue)}finally{ye.f()}}}Zo.current=sn}},[sn,Vn,xu,A,je]);var Na=p.useMemo(function(){return sn==="error"&&vo(Wn,Cn)},[sn,Wn,Cn]),xd=p.useMemo(function(){if(Na&&Rt!=="new-conversation")return yi(Wn)?"minimal":"thread-depth"},[Na,Rt,Wn]),Lo=p.useCallback(function(W){var he=W.hierarchy,ye=["lvl6","lvl5","lvl4","lvl3","lvl2","lvl1","lvl0"].find(function(et){return he[et]});return v(v({},W),{},{type:ye||"lvl0",content:null})},[]),za=p.useCallback(function(W){if(!A){var he=W.type==="content"?W.__docsearch_parent||Lo(W):W;he&&on.getAll().findIndex(function(ye){return ye.objectID===he.objectID})===-1&&wn.add(he)}},[on,wn,A,Lo]),Od=p.useCallback(function(W){if(ke.context.algoliaInsightsPlugin&&W.__autocomplete_id){var he=W,ye={eventName:"Item Selected",index:he.__autocomplete_indexName,items:[he],positions:[W.__autocomplete_id],queryID:he.__autocomplete_queryID};ke.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(ye)}},[ke.context.algoliaInsightsPlugin]),Kt=p.useRef(void 0),Sr=p.useCallback(function(W,he){var ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(W){var et={query:he,suggestedQuestionId:ye?.objectID};if(w!=null&&w(et))return void(Kt.current&&Kt.current.setQuery(""))}if(W&&Rt==="new-conversation"&&ht("initial"),S(W,{query:he,suggestedQuestionId:ye?.objectID}),!ie){Jt(!1),Mo(),Ar();var Ue={};if(ye&&(Ue.body={suggestedQuestionId:ye.objectID}),zo({role:"user",parts:[{type:"text",text:he}]},Ue),Ge.current){var At=Ge.current;typeof At.scrollTo=="function"?At.scrollTo({top:0,behavior:"smooth"}):At.scrollTop=0}Kt.current&&Kt.current.setQuery("")}},[S,w,Rt,ht,ie,Ar,Mo,zo]),Bd=p.useCallback((function(){var W=be(X().m(function he(ye,et){return X().w(function(Ue){for(;;)switch(Ue.n){case 0:if(rn&&a){Ue.n=1;break}return Ue.a(2);case 1:return Ue.n=2,Ro(ye,et);case 2:return Ue.a(2)}},he)}));return function(he,ye){return W.apply(this,arguments)}})(),[rn,a,Ro]);Kt.current||(Kt.current=a0({id:"docsearch",defaultActiveItemId:0,openOnFocus:!0,initialState:{query:Ct,context:{searchSuggestions:[]}},insights:!!L,navigator:g,onStateChange:function(W){Pe(W.state)},getSources:function(W){var he=W.query,ye=W.state,et=W.setContext,Ue=W.setStatus;if(!he){var At=(function(vt){var wt=vt.recentSearches,Ou=vt.favoriteSearches,xr=vt.saveRecentSearch,xn=vt.onClose;return vt.disableUserPersonalization?[]:[{sourceId:"recentSearches",onSelect:function(Qt){var Za=Qt.item,La=Qt.event;xr(Za),Ju(La)||xn()},getItemUrl:function(Qt){return Qt.item.url},getItems:function(){return wt.getAll()}},{sourceId:"favoriteSearches",onSelect:function(Qt){var Za=Qt.item,La=Qt.event;xr(Za),Ju(La)||xn()},getItemUrl:function(Qt){return Qt.item.url},getItems:function(){return Ou.getAll()}}]})({recentSearches:wn,favoriteSearches:on,saveRecentSearch:za,onClose:f,disableUserPersonalization:A}),Kn=Me?[{sourceId:"recentConversations",getItems:function(){return A?[]:xu.getAll()},onSelect:function(vt){var wt=vt.item;wt.messages&&(wr({kind:"setMessages",messages:wt.messages}),S(!0))}}]:[];return[].concat(G(At),Kn)}var Qn={context:ye.context},Ra=ny({query:he,state:Qn,setContext:et,setStatus:Ue,searchClient:kn,indexes:an,snippetLength:ct,insights:!!L,appI
111d:a,apiKey:i,maxResultsPerGroup:s,transformItems:h,saveRecentSearch:za,onClose:f}),Ma=Me?[{sourceId:"askAI",getItems:function(){return[{type:"askAI",query:he,url_without_anchor:"",objectID:"ask-ai-button",content:null,url:"",anchor:null,hierarchy:{lvl0:"Ask AI",lvl1:he,lvl2:null,lvl3:null,lvl4:null,lvl5:null,lvl6:null},_highlightResult:{},_snippetResult:{},__docsearch_parent:null}]},onSelect:function(vt){var wt=vt.item;wt.type==="askAI"&&wt.query&&Sr(!0,wt.query)}}]:[];return Ra.then(function(vt){return[].concat(Ma,G(vt))})}}));var $o,Jn,Sn=Kt.current,Id=Sn.getEnvironmentProps,Td=Sn.getRootProps,qo=Sn.refresh;(function(W){var he=W.getEnvironmentProps,ye=W.panelElement,et=W.formElement,Ue=W.inputElement;p.useEffect(function(){if(ye&&et&&Ue){var At=he({panelElement:ye,formElement:et,inputElement:Ue}),Kn=At.onTouchStart,Qn=At.onTouchMove;return window.addEventListener("touchstart",Kn),window.addEventListener("touchmove",Qn),function(){window.removeEventListener("touchstart",Kn),window.removeEventListener("touchmove",Qn)}}},[he,ye,et,Ue])})({getEnvironmentProps:Id,panelElement:Ge.current,formElement:Wt.current,inputElement:zt.current}),$o={container:Vt.current},Jn=$o.container,p.useEffect(function(){if(Jn){var W=Jn.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), input:not([disabled])"),he=W[0],ye=W[W.length-1];return Jn.addEventListener("keydown",et),function(){Jn.removeEventListener("keydown",et)}}function et(Ue){Ue.key==="Tab"&&(Ue.shiftKey?document.activeElement===he&&(Ue.preventDefault(),ye.focus()):document.activeElement===ye&&(Ue.preventDefault(),he.focus()))}},[Jn]),Ll({theme:c}),p.useEffect(function(){return document.body.classList.add("DocSearch--active"),function(){var W,he;document.body.classList.remove("DocSearch--active"),(W=(he=window).scrollTo)===null||W===void 0||W.call(he,0,F)}},[]),p.useEffect(function(){typeof window<"u"&&window.localStorage&&(function(){if(typeof window>"u"||!window.localStorage)return 0;var W=0;for(var he in window.localStorage)window.localStorage.hasOwnProperty(he)&&(W+=window.localStorage[he].length+he.length);return W})()>4194304&&uf()},[]),p.useLayoutEffect(function(){var W=window.innerWidth-document.body.clientWidth;return document.body.style.marginInlineEnd="".concat(W,"px"),function(){document.body.style.marginInlineEnd="0px"}},[]),p.useEffect(function(){window.matchMedia("(max-width: 768px)").matches&&(ct.current=5)},[]),p.useEffect(function(){var W;Ge.current&&!j&&(typeof(W=Ge.current).scrollTo=="function"?W.scrollTo({top:0,behavior:"smooth"}):W.scrollTop=0)},[ke.query,j]),p.useEffect(function(){Ct.length>0&&(qo(),zt.current&&zt.current.focus())},[Ct,qo]),p.useEffect(function(){function W(){if(at.current){var he=.01*window.innerHeight;at.current.style.setProperty("--docsearch-vh","".concat(he,"px"))}}return W(),window.addEventListener("resize",W),function(){window.removeEventListener("resize",W)}},[]);var Uo=p.useRef(j);p.useEffect(function(){Uo.current&&!j&&(Sn.refresh(),Ar(),wr()),Uo.current=j},[j,Sn,Ar,wr]),p.useEffect(function(){ht("initial")},[j,ht]);var Pd=(function(){var W=be(X().m(function he(){return X().w(function(ye){for(;;)switch(ye.n){case 0:return Jt(!0),ye.n=1,Sd();case 1:return ye.a(2)}},he)}));return function(){return W.apply(this,arguments)}})(),Ho=function(){Ar(),wr(),ht("new-conversation")},Vo=!0,Wo=ke.collections.some(function(W){return W.items.length>0});return ke.status!=="idle"||Wo!==!1||ke.query.length!==0||j||(Vo=!1),p.createElement("div",$e({ref:Vt},Td({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container",ke.status==="stalled"&&"DocSearch-Container--Stalled",ke.status==="error"&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(W){W.target===W.currentTarget&&f()}}),p.createElement("div",{className:"DocSearch-Modal",ref:at},p.createElement("header",{className:"DocSearch-SearchBar",ref:Wt},p.createElement(_h,$e({},Sn,{state:ke,placeholder:Nt||"Search docs",autoFocus:Ct.length===0,inputRef:zt,isFromSelection:!!Ct&&Ct===pt,translations:oe,isAskAiActive:j,askAiStatus:sn,askAiError:Wn,askAiState:Rt,setAskAiState:ht,isThreadDepthError:Na&&Rt!=="new-conversation",askAiBlockingChrome:xd,onClose:f,onAskAiToggle:S,onAskAgain:function(W){Sr(!0,W)}
111,onStopAskAiStreaming:Pd,onNewConversation:Ho,onViewConversationHistory:function(){ht("conversation-history")}}))),Vo&&p.createElement("div",{className:"DocSearch-Dropdown",ref:Ge},p.createElement(gh,$e({},Sn,{indexName:An,state:ke,hitComponent:D,resultsFooterComponent:E,disableUserPersonalization:A,recentSearches:wn,favoriteSearches:on,conversations:xu,inputRef:zt,translations:_e,getMissingResultsUrl:Z,isAskAiActive:j,canHandleAskAi:Me,messages:Vn,askAiError:Wn,status:sn,hasCollections:Wo,askAiState:Rt,selectAskAiQuestion:Sr,suggestedQuestions:ja,selectSuggestedQuestion:function(W){Sr(!0,W.question,W)},agentStudio:Cn,onAskAiToggle:S,onNewConversation:Ho,onItemClick:function(W,he){if(W.type==="askAI"&&W.query){if(W.anchor==="stored"&&"messages"in W){wr({kind:"setMessages",messages:W.messages});var ye={query:W.query,messageId:W.messages[0].id};if(w!=null&&w(ye))return Kt.current&&Kt.current.setQuery(""),void he.preventDefault();S(!0,ye)}else Sr(!0,W.query);return ht("initial"),void he.preventDefault()}Od(W),za(W),Ju(he)||f()},onFeedback:Bd}))),p.createElement("footer",{className:"DocSearch-Footer"},p.createElement(o0,{translations:Y,isAskAiActive:j}))))}var uy=p.forwardRef(function(e,t){return p.createElement(Nl,$e({},e,{ref:t}),p.createElement(ay,e))});function ay(e){var t,n,r,u=(function(){var h=p.useContext(fo);if(h===void 0)throw new Error("`useDocSearch` must be used within the `DocSearch` provider");return h})(),a=u.searchButtonRef,i=u.keyboardShortcuts,o=u.isModalActive,s=u.isAskAiActive,c=u.initialQuery,d=u.onAskAiToggle,f=u.openModal,l=u.closeModal;return p.createElement(p.Fragment,null,p.createElement(bp,{keyboardShortcuts:i,ref:a,translations:(t=e.translations)===null||t===void 0?void 0:t.button,onClick:f}),o&&Bl(p.createElement(ry,$e({},e,{initialScrollY:window.scrollY,initialQuery:c,translations:e==null||(n=e.translations)===null||n===void 0?void 0:n.modal,isAskAiActive:s,onAskAiToggle:d,onClose:l})),(r=e.portalContainer)!==null&&r!==void 0?r:document.body))}var wd=function(e,t,n,r){var u;t[0]=0;for(var a=1;a<t.length;a++){var i=t[a++],o=t[a]?(t[0]|=i?1:2,n[t[a++]]):t[++a];i===3?r[0]=o:i===4?r[1]=Object.assign(r[1]||{},o):i===5?(r[1]=r[1]||{})[t[++a]]=o:i===6?r[1][t[++a]]+=o+"":i?(u=e.apply(o,wd(e,o,n,["",null])),r.push(u),o[0]?t[0]|=2:(t[a-2]=0,t[a]=u)):r.push(o)}return r},al=new Map,iy=["container","environment","transformSearchClient","hitComponent","resultsFooterComponent"],oy=(function(e){var t=al.get(this);return t||(t=new Map,al.set(this,t)),(t=wd(this,t.get(e)||(t.set(e,t=(function(n){for(var r,u,a=1,i="",o="",s=[0],c=function(l){a===1&&(l||(i=i.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(0,l,i):a===3&&(l||i)?(s.push(3,l,i),a=2):a===2&&i==="..."&&l?s.push(4,l,0):a===2&&i&&!l?s.push(5,0,!0,i):a>=5&&((i||!l&&a===5)&&(s.push(a,0,i,u),a=6),l&&(s.push(a,l,0,u),a=6)),i=""},d=0;d<n.length;d++){d&&(a===1&&c(),c(d));for(var f=0;f<n[d].length;f++)r=n[d][f],a===1?r==="<"?(c(),s=[s],a=3):i+=r:a===4?i==="--"&&r===">"?(a=1,i=""):i=r+i[0]:o?r===o?o="":i+=r:r==='"'||r==="'"?o=r:r===">"?(c(),a=1):a&&(r==="="?(a=5,u=i,i=""):r==="/"&&(a<5||n[d][f+1]===">")?(c(),a===3&&(s=s[0]),a=s,(s=s[0]).push(2,0,a),a=0):r===" "||r===" "||r===` 112`||r==="\r"?(c(),a=2):i+=r),a===3&&i==="!--"&&(a=4,s=s[0])}return c(),s})(e)),t),arguments,[])).length>1?t:t[0]}).bind(gt);function il(e){if(e)return function(t){var n=e(t,{html:oy});return jr(n)?n:typeof n=="function"?n(t):typeof n=="string"?gt("span",null,n):n}}function sy(e){var t=e.container,n=e.environment,r=e.transformSearchClient,u=e.hitComponent,a=e.resultsFooterComponent,i=Dn(e,iy),o=(function(f,l){if(typeof f!="string")return f;if(!l)throw new Error("Cannot resolve a selector without a browser environment.");var h=l.document.querySelector(f);if(!h)throw new Error('Container selector did not match any element: "'.concat(f,'"'));return h})(t,n||(typeof window<"u"?window:void 0)),s={current:null},c=!1,d=U(U({},i),{},{ref:s,hitComponent:il(u),resultsFooterComponent:il(a),transformSearchClient:function(f){return f!=null&&f.addAlgoliaAgent&&f.addAlgoliaAgent("docsearch.js",to),typeof r=="function"?r(f):f}}
112);return Tl(gt(uy,d),o),c=!0,{open:function(){var f;(f=s.current)===null||f===void 0||f.open()},close:function(){var f;(f=s.current)===null||f===void 0||f.close()},openAskAi:function(f){var l;(l=s.current)===null||l===void 0||l.openAskAi(f)},get isReady(){return c},get isOpen(){var f,l;return(f=(l=s.current)===null||l===void 0?void 0:l.isOpen)!==null&&f!==void 0&&f},destroy:function(){Pl(o),c=!1}}}export{sy as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.