PageSourceSearch

https://wsrv.nl/assets/chunks/index.uHKI11e1.js

js wsrv.nl collected 2026-10-02 02:38:02 UTC 498,713 bytes, 112 lines download raw bytes

1function pi(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 fr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yo(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 Ie(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var a=e.apply(t,n);function i(s){Yo(a,r,u,i,o,"next",s)}function o(s){Yo(a,r,u,i,o,"throw",s)}i(void 0)})}}function Yn(e,t,n){return t=_u(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 fr(r)})(e,oo()?Reflect.construct(t,n||[],_u(e).constructor):t.apply(e,n))}function qt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xo(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,cl(r.key),r)}}function Ut(e,t,n){return t&&Xo(e.prototype,t),n&&Xo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Er(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=so(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 Lt(e,t,n){return(t=cl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _u(e){return _u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_u(e)}function Xn(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&&bu(e,t)}function oo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oo=function(){return!!e})()}function es(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 L(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?es(Object(n),!0).forEach(function(r){Lt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):es(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wn(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 ne(){var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",u=n.toStringTag||"@@toStringTag";function a(h,D,m,y){var E=D&&D.prototype instanceof o?D:o,g=Object.create(E.prototype);return kt(g,"_invoke",(function(b,F,_){var C,k,A,j=0,B=_||[],S=!1,O={p:0,n:0,v:e,a:P,f:P.bind(e,4),d:function(x,z){return C=x,k=0,A=e,O.n=z,i}};function P(x,z){for(k=x,A=z,t=0;!S&&j&&!I&&t<B.length;t++){var I,w=B[t],N=O.p,R=w[2];x>3?(I=R===z)&&(A=w[(k=w[4])?5:(k=3,3)],w[4]=w[5]=e):w[0]<=N&&((I=x<2&&N<w[1])?(k=0,O.v=z,O.n=w[1]):N<R&&(I=x<3||w[0]>z||z>R)&&(w[4]=x,w[5]=z,O.n=R,k=0))}if(I||x>1)return i;throw S=!0,z}return function(x,z,I){if(j>1)throw TypeError("Generator is already running");for(S&&z===1&&P(z,I),k=z,A=I;(t=k<2?e:A)||!S;){C||(k?k<3?(k>1&&(O.n=-1),P(k,A)):O.n=A:O.v=A);
2try{if(j=2,C){if(k||(x="next"),t=C[x]){if(!(t=t.call(C,A)))throw TypeError("iterator result is not an object");if(!t.done)return t;A=t.value,k<2&&(k=0)}else k===1&&(t=C.return)&&t.call(C),k<2&&(A=TypeError("The iterator does not provide a '"+x+"' method"),k=1);C=e}else if((t=(S=O.n<0)?A:b.call(F,O))!==i)break}catch(w){C=e,k=1,A=w}finally{j=1}}return{value:t,done:S}}})(h,m,y),!0),g}var i={};function o(){}function s(){}function c(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):(kt(t={},r,function(){return this}),t),d=c.prototype=o.prototype=Object.create(l);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,kt(h,u,"GeneratorFunction")),h.prototype=Object.create(d),h}return s.prototype=c,kt(d,"constructor",c),kt(c,"constructor",s),s.displayName="GeneratorFunction",kt(c,u,"GeneratorFunction"),kt(d),kt(d,u,"Generator"),kt(d,r,function(){return this}),kt(d,"toString",function(){return"[object Generator]"}),(ne=function(){return{w:a,m:f}})()}function kt(e,t,n,r){var u=Object.defineProperty;try{u({},"",{})}catch{u=0}kt=function(a,i,o,s){function c(l,d){kt(a,l,function(f){return this._invoke(l,d,f)})}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))},kt(e,t,n,r)}function bu(e,t){return bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},bu(e,t)}function hi(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=[],l=!0,d=!1;try{if(o=(u=u.call(n)).next,r!==0)for(;!(l=(a=o.call(u)).done)&&(c.push(a.value),c.length!==r);l=!0);}catch(f){d=!0,i=f}finally{try{if(!l&&u.return!=null&&(s=u.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}})(e,t)||so(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 pi(t)})(e)||(function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)})(e)||so(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 cl(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 ee(e){return ee=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},ee(e)}function so(e,t){if(e){if(typeof e=="string")return pi(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)?pi(e,t):void 0}}function vi(e){var t=typeof Map=="function"?new Map:void 0;return vi=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(oo())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,a);var s=new(u.bind.apply(u,o));return i&&bu(s,i.prototype),s})(n,arguments,_u(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),bu(r,n)},vi(e)}var ke,ll,Wn,ts,va,fl,dl,co,mi,Di,pl,Cu={},hl=[],ku=Array.isArray,Ma=hl.slice,sn=Object.assign;function gi(e){e&&e.parentNode&&e.remove()}function wt(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?Ma.call(arguments,2):n),eu(e,i,r,u,null)}function eu(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??++ll,__i:-1,__u:0};return u==null&&ke.vnode!=null&&ke.vnode(a),a}function Zd(){return{current:null}}function Qt(e){return e.children}function cn(e,t){this.props=e,this.context=t,this.__g=0}function _r(e,t){if(t==null)return e.__?_r(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"?_r(e):null}function vl(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 vl(e)}}function yi(e){(8&e.__g||!(e.__g|=8)||!Wn.push(e)||va++)&&ts==ke.debounceRendering||((ts=ke.debounceRendering)||queueMicrotask)(Ld)}function Ld(){for(var e,t,n,r,u,a,i,o,s=1;Wn.length;)Wn.length>s&&Wn.sort(fl),e=Wn.shift(),s=Wn.length,8&e.__g&&(n=void 0,u=(r=(t=e).__v).__e,a=[],i=[],(o=t.__P)&&((n=sn({},r)).__v=r.__v+1,ke.vnode&&ke.vnode(n),lo(o,n,r,t.__n,o.namespaceURI,32&r.__u?[u]:null,a,u??_r(r),!!(32&r.__u),i,o.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,Dl(a,n,i),n.__e!=u&&vl(n)));va=0}function ns(e,t,n,r,u,a,i,o,s,c,l,d){var f,h,D,m,y,E,g,b=r&&r.__k||hl,F=t.length;for(s=(function(_,C,k,A,j){var B,S,O,P,x,z=k.length,I=z,w=0;for(_.__k=new Array(j),B=0;B<j;B++)(S=C[B])!=null&&typeof S!="boolean"&&typeof S!="function"?(P=B+w,(S=_.__k[B]=typeof S=="string"||typeof S=="number"||typeof S=="bigint"||S.constructor==String?eu(null,S,null,null,null):ku(S)?eu(Qt,{children:S},null,null,null):S.constructor==null&&S.__b>0?eu(S.type,S.props,S.key,S.ref?S.ref:null,S.__v):S).__=_,S.__b=_.__b+1,O=null,(x=S.__i=$d(S,k,P,I))!=-1&&(I--,(O=k[x])&&(O.__u|=2)),O==null||O.__v==null?(x==-1&&(j>z?w--:j<z&&w++),typeof S.type!="function"&&(S.__u|=4)):x!=P&&(x==P-1?w--:x==P+1?w++:(x>P?w--:w++,S.__u|=4))):_.__k[B]=null;if(I)for(B=0;B<z;B++)(O=k[B])!=null&&!(2&O.__u)&&(O.__e==A&&(A=_r(O)),yl(O,O));return A})(n,t,b,s,F),f=0;f<F;f++)(D=n.__k[f])!=null&&(h=D.__i==-1?Cu:b[D.__i]||Cu,D.__i=f,E=lo(e,D,h,u,a,i,o,s,c,l,d),m=D.__e,D.ref&&h.ref!=D.ref&&(h.ref&&fo(h.ref,null,D),l.push(D.ref,D.__c||m,D)),y==null&&m!=null&&(y=m),(g=!!(4&D.__u))||h.__k===D.__k?s=ml(D,s,e,g):typeof D.type=="function"&&E!==void 0?s=E:m&&(s=m.nextSibling),D.__u&=-7
vendor: 10,847 bytes, line 4
4);return n.__e=y,s}function ml(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=ml(u[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=_r(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function kn(e,t){return t=t||[],e==null||typeof e=="boolean"||(ku(e)?e.some(function(n){kn(n,t)}):t.push(e)),t}function $d(e,t,n,r){var u,a,i,o=e.key,s=e.type,c=t[n],l=c!=null&&!(2&c.__u);if(c===null&&e.key==null||l&&o==c.key&&s==c.type)return n;if(r>(l?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 rs(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n??""}function qu(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||rs(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||rs(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(dl,"$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=co,e.addEventListener(t,a?Di:mi,a)):e.removeEventListener(t,a?Di:mi,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 us(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=co++;else if(t.u<n.l)return;return n(ke.event?ke.event(t):t)}}}function lo(e,t,n,r,u,a,i,o,s,c,l){var d,f,h,D,m,y,E,g,b,F,_,C,k,A,j,B,S,O,P,x,z,I=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)),(d=ke.__b)&&d(t);e:if(typeof I=="function")try{if(g=t.props,b="prototype"in I&&I.prototype.render,F=(d=I.contextType)&&r[d.__c],_=d?F?F.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,E=!0):(b?t.__c=f=new I(g,_):(t.__c=f=new cn(g,_),f.constructor=I,f.render=qd),F&&F.sub(f),f.props=g,f.state||(f.state={}),f.context=_,f.__n=r,h=!0,f.__g|=8,f.__h=[],f._sb=[]),b&&f.__s==null&&(f.__s=f.state),b&&I.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=sn({},f.__s)),sn(f.__s,I.getDerivedStateFromProps(g,f.__s))),D=f.props,m=f.state,f.__v=t,h)b&&I.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),b&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(b&&I.getDerivedStateFromProps==null&&g!==D&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(g,_),!(4&f.__g)&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(g,f.__s,_)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=g,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(w){w&&(w.__=t)}),C=0;C<f._sb.length;C++)f.__h.push(f._sb[C]);f._sb=[],f.__h.length&&i.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(g,f.__s,_),b&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(D,m,y)})}if(f.context=_,f.props=g,f.__P=e,f.__g&=-5,k=ke.__r,A=0,b){for(f.state=f.__s,f.__g&=-9,k&&k(t),d=f.render(f.props,f.state,f.context),j=0;j<f._sb.length;j++)f.__h.push(f._sb[j]);f._sb=[]}else do f.__g&=-9,k&&k(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(8&f.__g&&++A<25);f.state=f.__s,f.getChildContext!=null&&(r=sn({},r,f.getChildContext())),b&&!h&&f.getSnapshotBeforeUpdate!=null&&(y=f.getSnapshotBeforeUpdate(D,m)),B=d,d!=null&&d.type===Qt&&d.key==null&&(B=gl(d.props.children)),o=ns(e,ku(B)?B:[B],t,n,r,u,a,i,o,s,c,l),t.__u&=-161,f.__h.length&&i.push(f),E&&(f.__g&=-4)}catch(w){if(t.__v=null,s||a!=null)if(w.then){for(S=0,O=!1,t.__u|=s?160:128,t.__c.__z=[],P=0;P<a.length;P++)(x=a[P])==null||O||(x.nodeType==8&&x.data=="$s"?(S>0&&t.__c.__z.push(x),S++,a[P]=null):x.nodeType==8&&x.data=="/$s"?(--S>0&&t.__c.__z.push(x),O=S===0,o=a[P],a[P]=null):S>0&&(t.__c.__z.push(x),a[P]=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(z=a.length;z--;)gi(a[z]);Fi(t)}else t.__e=n.__e,t.__k=n.__k,w.then||Fi(t);ke.__e(w,t,n)}else o=t.__e=(function(w,N,R,M,W,U,oe,he,fe,de){var H,G,re,De,Y,ce,be,Re,Ce=R.props,je=N.props,Ze=N.type;if(Ze=="svg"?W="http://www.w3.org/2000/svg":Ze=="math"?W="http://www.w3.org/1998/Math/MathML":W||(W="http://www.w3.org/1999/xhtml"),U!=null){for(H=0;H<U.length;H++)if((Y=U[H])&&"setAttribute"in Y==!!Ze&&(Ze?Y.localName==Ze:Y.nodeType==3)){w=Y,U[H]=null;break}}if(w==null){if(Ze==null)return de.createTextNode(je);w=de.createElementNS(W,Ze,je.is&&je),he&&(ke.__m&&ke.__m(N,U),he=!1),U=null}if(Ze==null)Ce===je||he&&w.data==je||(w.data=je);else{if(U=U&&Ma.call(w.childNodes),Ce=R.props||Cu,!he&&U!=null)for(Ce={},H=0;H<w.attributes.length;H++)Ce[(Y=w.attributes[H]).name]=Y.value;for(H in Ce)if(Y=Ce[H],H!="children"){if(H=="dangerouslySetInnerHTML")re=Y;else if(!(H in je)){if(H=="value"&&"defaultValue"in je||H=="checked"&&"defaultChecked"in je)continue;qu(w,H,null,Y,W)}}for(H in Re=1&R.__u,je)Y=je[H],H=="children"?De=Y:H=="dangerouslySetInnerHTML"?G=Y:H=="value"?ce=Y:H=="checked"?be=Y:he&&typeof Y!="function"||Ce[H]===Y&&!Re||qu(w,H,Y,Ce[H],W);if(G)he||re&&(G.__html==re.__html||G.__html==w.innerHTML)||(w.innerHTML=G.__html),N.__k=[];else if(re&&(w.innerHTML=""),ns(Ze=="template"?w.content:w,ku(De)?De:[De],N,R,M,Ze=="foreignObject"?"http://www.w3.org/1999/xhtml":W,U,oe,U?U[0]:R.__k&&_r(R,0),he,fe,de),U!=null)for(H=U.length;H--;)gi(U[H]);he||(H="value",Ze=="progress"&&ce==null?w.removeAttribute("value"):ce==null||ce===w[H]&&(Ze!=="progress"||ce)||qu(w,H,ce,Ce[H],W),H="checked",be!=null&&be!=w[H]&&qu(w,H,be,Ce[H],W))}return w})(n.__e,t,n,r,u,a,i,s,c,l);return(d=ke.diffed)&&d(t),128&t.__u?void 0:o}function Fi(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(Fi)}function Dl(e,t,n){for(var r=0;r<n.length;r++)fo(n[r],n[++r],n[++r]);ke.__c&&ke.__c(t,e),e.some(function(u){try{e=u.__h,u.__h=[],e.some(function(a){a.call(u)})}catch(a){ke.__e(a,u.__v)}})}function gl(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:ku(e)?e.map(gl):sn({},e)}function fo(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){ke.__e(u,n)}}function yl(e,t,n){var r,u;if(ke.unmount&&ke.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||fo(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){ke.__e(a,t)}r.__P=null}if(r=e.__k)for(u=0;u<r.length;u++)r[u]&&yl(r[u],t,n||typeof e.type!="function");n||gi(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function qd(e,t,n){return this.constructor(e,n)}function Au(e,t){var n,r,u,a;t==document&&(t=document.documentElement),ke.__&&ke.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=wt(Qt,null,[e]),u=[],a=[],lo(t,e,r||Cu,Cu,t.namespaceURI,r?null:t.firstChild?Ma.call(t.childNodes):null,u,r?r.__e:t.firstChild,n,a,t.ownerDocument),Dl(u,e,a)}function Ud(e,t,n){var r,u,a,i=sn({},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?Ma.call(arguments,2):n),eu(e.type,i,r||e.key,u||e.ref,null)}ke={__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 va=0,e}},ll=0,cn.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=sn({},this.state),typeof e=="function"&&(e=e(sn({},n),this.props)),e&&sn(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),yi(this))},cn.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),yi(this))},cn.prototype.render=Qt,Wn=[],va=0,fl=function(e,t){return e.__v.__b-t.__v.__b},dl=/(PointerCapture)$|Capture$/i,co=0,mi=us(!1),Di=us(!0),pl=0;var Sn,We,Qa,as,Ei=Object.is,br=0,Fl=[],tt=ke,is=tt.__b,os=tt.__r,ss=tt.diffed,cs=tt.__c,ls=tt.unmount,fs=tt.__;function xr(e,t){tt.__h&&tt.__h(We,e,br||t),br=0;var n=We.__H||(We.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function er(e){return br=1,po(kl,e)}function po(e,t,n){var r=xr(Sn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):kl(void 0,t),function(o){var s=r.__N?r.__N[0]:r.__[0],c=r.t(s,o);Ei(s,c)||(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=We,!We.__f)){var u=function(o,s,c){if(!r.__c.__H)return!0;var l=r.__c.__H.__.filter(function(f){return!!f.__c});if(l.every(function(f){return!f.__N}))return!a||a.call(this,o,s,c);var d=r.__c.props!==o;return l.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,Ei(h,f.__[0])||(d=!0)}}),a&&a.call(this,o,s,c)||d};We.__f=!0;var a=We.shouldComponentUpdate,i=We.componentWillUpdate;We.componentWillUpdate=function(o,s,c){if(4&this.__g){var l=a;a=void 0,u(o,s,c),a=l}i&&i.call(this,o,s,c)},We.shouldComponentUpdate=u}return r.__N||r.__}function $t(e,t){var n=xr(Sn++,3);!tt.__s&&ho(n.__H,t)&&(n.__=e,n.u=t,We.__H.__h.push(n))}function zu(e,t){var n=xr(Sn++,4);!tt.__s&&ho(n.__H,t)&&(n.__=e,n.u=t,We.__h.push(n))}function gr(e){return br=5,Bt(function(){return{current:e}},[])}function El(e,t,n){br=6,zu(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 Bt(e,t){var n=xr(Sn++,7);return ho(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function tu(e,t){return br=8,Bt(function(){return e},t)}function _l(e){var t=We.context[e.__c],n=xr(Sn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(We)),t.props.value):e.__}function bl(e,t){tt.useDebugValue&&tt.useDebugValue(t?t(e):e)}function Cl(){var e=xr(Sn++,11);if(!e.__){for(var t=We.__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 Hd(){for(var e;e=Fl.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ua),e.__H.__h.forEach(_i),e.__H.__h=[]}catch(t){e.__H.__h=[],tt.__e(t,e.__v)}}tt.__b=function(e){We=null,is&&is(e)},tt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),fs&&fs(e,t)},tt.__r=function(e){os&&os(e),Sn=0;var t=(We=e.__c).__H;t&&(Qa===We?(t.__h=[],We.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(ua),t.__h.forEach(_i),t.__h=[],Sn=0)),Qa=We},tt.diffed=function(e){ss&&ss(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Fl.push(t)!==1&&as===tt.requestAnimationFrame||((as=tt.requestAnimationFrame)||Vd)(Hd)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Qa=We=null}
4,tt.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ua),n.__h=n.__h.filter(function(r){return!r.__||_i(r)})}catch(r){t.some(function(u){u.__h&&(u.__h=[])}),t=[],tt.__e(r,n.__v)}}),cs&&cs(e,t)},tt.unmount=function(e){ls&&ls(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ua(r)}catch(u){t=u}}),n.__H=void 0,t&&tt.__e(t,n.__v))};var ds=typeof requestAnimationFrame=="function";function Vd(e){var t,n=function(){clearTimeout(r),ds&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);ds&&(t=requestAnimationFrame(n))}function ua(e){var t=We,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),We=t}function _i(e){var t=We;e.__c=e.__(),We=t}function ho(e,t){return!e||e.length!==t.length||t.some(function(n,r){return!Ei(n,e[r])})}function kl(e,t){return typeof t=="function"?t(e):t}function nu(e,t){var n=t(),r=er({t:{__:n,u:t}}),u=r[0].t,a=r[1];return zu(function(){u.__=n,u.u=t,Ga(u)&&a({t:u})},[e,n,t]),$t(function(){return Ga(u)&&a({t:u}),e(function(){Ga(u)&&a({t:u})})},[e]),n}function Ga(e){var t=e.u,n=e.__;try{var r=t();return!Object.is(n,r)}catch{return!0}}function Al(e){e()}function wl(e){return e}function Sl(){return[!1,Al]}var xl=zu,vo=Object.assign;function bi(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 Wd=/^(-|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 Ci(e,t){this.props=e,this.context=t}function Ol(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:bi(this.props,u)}function r(u){return this.shouldComponentUpdate=n,wt(e,u)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.type=e,r}(Ci.prototype=new cn).isPureReactComponent=!0,Ci.prototype.shouldComponentUpdate=function(e,t){return bi(this.props,e)||bi(this.state,t)};var Kd=Symbol.for("react.forward_ref"),ps=function(e,t,n){return e==null?null:kn(kn(e).map(t.bind(n)))},Jd={map:ps,forEach:ps,count:function(e){return e?kn(e).length:0},only:function(e){var t=kn(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:kn},Qd=ke.__e;ke.__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)}Qd(e,t,n,r)};var hs=ke.unmount;function Bl(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=vo({},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 Bl(r,t,n)})),e}function Il(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 Il(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 aa(){this.__u=0,this.o=null,this.__b=null}function Gd(e){return this.getChildContext=function(){return e.context},e.children}function Yd(e){var t=this,n=e.i;if(t.componentWillUnmount=function(){Au(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)}}}Au(wt(Gd,{context:t.context},e.__v),t.l)}function Tl(e,t){var n=wt(Yd,{__v:e,i:t});return n.containerInfo=t,n}ke.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),hs&&hs(e)},(aa.prototype=new cn).__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]=Il(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)},aa.prototype.componentWillUnmount=function(){this.o=[]},aa.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]=Bl(this.__b,n,r.__O=r.__P)}this.__b=null}return[wt(Qt,null,t.__a?null:e.children),t.__a&&wt(Qt,null,e.fallback)]};var Pl=Symbol.for("react.element"),Xd=/^(?: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]/,ep=/[A-Z0-9]/g,tp=typeof document<"u",np=function(e){return/fil|che|rad/.test(e)};function jl(e,t,n){return t.__k==null&&(t.textContent=""),Au(e,t),typeof n=="function"&&n(),e?e.__c:null}cn.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(cn.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var vs=ke.event;function rp(){}function up(){return this.cancelBubble}function ap(){return this.defaultPrevented}ke.event=function(e){return vs&&(e=vs(e)),e.persist=rp,e.isPropagationStopped=up,e.isDefaultPrevented=ap,e.nativeEvent=e};
4var mo,ip={enumerable:!1,configurable:!0,get:function(){return this.class}},ms=ke.vnode;ke.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||tp&&s==="children"&&a==="noscript"||s==="class"||s==="className")){if(s==="style"&&typeof c=="object")for(var l in c)typeof c[l]!="number"||Wd.test(l)||(c[l]+="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 d=s.toLowerCase();d==="ondoubleclick"?s="ondblclick":d!=="onchange"||a!=="input"&&a!=="textarea"||np(u.type)?d==="onfocus"?s="onfocusin":d==="onblur"&&(s="onfocusout"):d=s="oninput",d==="oninput"&&i[s=d]&&(s="oninputCapture")}else o&&Xd.test(s)?s=s.replace(ep,"-$&").toLowerCase():c===null&&(c=void 0);i[s]=c}}a=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=kn(u.children).forEach(function(f){f.props.selected=i.value.indexOf(f.props.value)!=-1})),a=="select"&&i.defaultValue!=null&&(i.value=kn(u.children).forEach(function(f){f.props.selected=i.multiple?i.defaultValue.indexOf(f.props.value)!=-1:i.defaultValue==f.props.value})),u.class&&!u.className?(i.class=u.class,Object.defineProperty(i,"className",ip)):(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=vo({},e.props);for(var n in e.type.defaultProps)t[n]===void 0&&(t[n]=e.type.defaultProps[n]);e.props=t}e.$$typeof=Pl,ms&&ms(e)};var Ds=ke.__r;ke.__r=function(e){Ds&&Ds(e),mo=e.__c};var gs=ke.diffed;ke.diffed=function(e){gs&&gs(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),mo=null};var op={ReactCurrentDispatcher:{current:{readContext:function(e){return mo.__n[e.__c].props.value},useCallback:tu,useContext:_l,useDebugValue:bl,useDeferredValue:wl,useEffect:$t,useId:Cl,useImperativeHandle:El,useInsertionEffect:xl,useLayoutEffect:zu,useMemo:Bt,useReducer:po,useRef:gr,useState:er,useSyncExternalStore:nu,useTransition:Sl}}};function Wr(e){return!!e&&e.$$typeof===Pl}function Nl(e){return!!e.__k&&(Au(null,e),!0)}var p={useState:er,useId:Cl,useReducer:po,useEffect:$t,useLayoutEffect:zu,useInsertionEffect:xl,useTransition:Sl,useDeferredValue:wl,useSyncExternalStore:nu,startTransition:Al,useRef:gr,useImperativeHandle:El,useMemo:Bt,useCallback:tu,useContext:_l,useDebugValue:bl,version:"18.3.1",Children:Jd,render:jl,hydrate:function(e,t,n){return(function(r,u){r.__u|=32,Au(r,u)})(e,t),typeof n=="function"&&n(),e?e.__c:null},unmountComponentAtNode:Nl,createPortal:Tl,createElement:wt,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,yi(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"+pl++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t},createFactory:function(e){return wt.bind(null,e)},cloneElement:function(e){return Wr(e)?Ud.apply(null,arguments):e},createRef:Zd,Fragment:Qt,isValidElement:Wr,isElement:Wr,isFragment:function(e){return Wr(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:cn,PureComponent:Ci,memo:Ol,forwardRef:function(e){function t(n){var r=vo({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Kd,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:aa,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 wt(n,a)}return u.displayName="Lazy",u}
4,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:op};function ys(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 sp(e,t,n){return(t=(function(r){var u=(function(a){if(ee(a)!="object"||!a)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(ee(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);return ee(u)=="symbol"?u:u+""})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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 Es(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){sp(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 $r(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=[],l=!0,d=!1;try{if(o=(u=u.call(n)).next,r!==0)for(;!(l=(a=o.call(u)).done)&&(c.push(a.value),c.length!==r);l=!0);}catch(f){d=!0,i=f}finally{try{if(!l&&u.return!=null&&(s=u.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}})(e,t)||(function(n,r){if(n){if(typeof n=="string")return ys(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)?ys(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 zl={"Ctrl/Cmd+K":!0,"/":!0,"Ctrl/Cmd+I":!0};function cp(e){return Es(Es({},zl),e)}function lp(e){var t=e.isOpen,n=e.isAskAiActive,r=e.onAskAiToggle,u=e.onClose,a=e.onOpen,i=e.keyboardShortcuts,o=i===void 0?zl:i;p.useEffect(function(){function s(c){var l;if(t&&c.code==="Escape"&&n)r(!1);else{var d=o["Ctrl/Cmd+K"]&&((l=c.key)===null||l===void 0?void 0:l.toLowerCase())==="k"&&(c.metaKey||c.ctrlKey),f=o["/"]&&c.key==="/";(c.code==="Escape"&&t||d||!(function(h){var D=h.composedPath()[0],m=D.tagName;return D.isContentEditable||m==="INPUT"||m==="SELECT"||m==="TEXTAREA"})(c)&&f&&!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 fp=["children","theme","onReady","onOpen","onClose","onSidepanelOpen","onSidepanelClose"],Do=p.createContext(void 0);Do.displayName="DocSearchContext";var Rl=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(M,W){if(M==null)return{};var U,oe,he=(function(de,H){if(de==null)return{};var G={};for(var re in de)if({}.hasOwnProperty.call(de,re)){if(H.indexOf(re)!==-1)continue;G[re]=de[re]}return G})(M,W);if(Object.getOwnPropertySymbols){var fe=Object.getOwnPropertySymbols(M);for(oe=0;oe<fe.length;oe++)U=fe[oe],W.indexOf(U)===-1&&{}.propertyIsEnumerable.call(M,U)&&(he[U]=M[U])}return he})(e,fp),l=$r(p.useState("ready"),2),d=l[0],f=l[1],h=$r(p.useState(c.initialQuery||""),2),D=h[0],m=h[1],y=p.useRef(null),E=cp(c.keyboardShortcuts),g=$r(p.useState(),2),b=g[0],F=g[1],_=$r(p.useState(function(){return new Set}),2),C=_[0],k=_[1],A=(function(){var M=$r(p.useState(!1),2),W=M[0],U=M[1];return p.useEffect(function(){var oe=function(){var he=window.matchMedia("(max-width: 768px)");U(he.matches)};return oe(),window.addEventListener("resize",oe),function(){window.removeEventListener("resize",oe)}},[]),W})(),j=p.useRef("ready"),B=["modal-search","modal-askai"].includes(d),S=d==="modal-askai",O=!A&&C.has("sidepanel"),P=d==="sidepanel";p.useEffect(function(){u?.()},[u]),p.useEffect(function(){var M=j.current,W=d;W!=="modal-search"&&W!=="modal-askai"||M==="modal-search"||M==="modal-askai"||a==null||a(),W!=="ready"||M!=="modal-search"&&M!=="modal-askai"||i==null||i(),W==="sidepanel"&&M!=="sidepanel"&&o?.(),W!=="sidepanel"&&M==="sidepanel"&&s?.(),j.current=W},[d,a,i,o,s]);var x=p.useCallback(function(){f("modal-search")},[]),z=p.useCallback(function(){var M,W;f("ready"),(M=y.current)===null||M===void 0||M.focus(),m((W=c.initialQuery)!==null&&W!==void 0?W:"")},[f,c.initialQuery]),I=p.useCallback(function(M,W){if(!A&&M&&O)return F(W),void f("sidepanel");
5f(M?"modal-askai":"modal-search")},[f,A,O]),w=p.useCallback(function(M){C.has("sidepanel")&&(F(M),f("sidepanel"))},[f,C]);p.useCallback(function(M){f("modal-search"),m(M.key)},[f,m]);var N=p.useCallback(function(M){C.has(M)||k(function(W){var U=new Set(W);return U.add(M),U})},[C]);p.useImperativeHandle(t,function(){return{open:x,close:z,openAskAi:function(M){return I(!0,M)},openSidepanel:w,get isReady(){return!0},get isOpen(){return B},get isSidepanelOpen(){return P},get isSidepanelSupported(){return O}}},[x,z,I,w,B,P,O]),(function(M){var W=M.theme;$t(function(){if(W){var U=document.documentElement.dataset.theme;if(W!==U)return document.documentElement.dataset.theme=W,function(){U===void 0?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=U}}},[W])})({theme:r}),lp({isOpen:B,onOpen:x,onClose:z,onAskAiToggle:I,isAskAiActive:S,keyboardShortcuts:E});var R=p.useMemo(function(){return{docsearchState:d,setDocsearchState:f,searchButtonRef:y,initialQuery:D,keyboardShortcuts:E,openModal:x,closeModal:z,isAskAiActive:S,isModalActive:B,onAskAiToggle:I,initialAskAiMessage:b,registerView:N,isHybridModeSupported:O}},[d,y,D,E,x,z,S,B,I,b,N,O]);return p.createElement(Do.Provider,{value:R},n)});Rl.displayName="DocSearch";var dp=["type"],pp=["type"],hp=["additionalProperties"],vp=["abortSignal"],mp=["messageId"],Dp=["messages"],gp=["experimental_throttle","resume"];function ki(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 _s(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 _e(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var a=e.apply(t,n);function i(s){_s(a,r,u,i,o,"next",s)}function o(s){_s(a,r,u,i,o,"throw",s)}i(void 0)})}}function me(e,t,n){return t=wu(t),(function(r,u){if(u&&(ee(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,go()?Reflect.construct(t,n||[],wu(e).constructor):t.apply(e,n))}function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ml(e,t,n){if(go())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var u=new(e.bind.apply(e,r));return n&&Cr(u,n.prototype),u}function bs(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,Zl(r.key),r)}}function ie(e,t,n){return t&&bs(e.prototype,t),n&&bs(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function V(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=yo(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 xe(e,t,n){return(t=Zl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ke(){return Ke=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},Ke.apply(null,arguments)}function wu(e){return wu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wu(e)}function pe(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&&Cr(e,t)}function go(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(go=function(){return!!e})()}function Cs(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]:{};
6t%2?Cs(Object(n),!0).forEach(function(r){xe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cs(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ft(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 J(){var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",u=n.toStringTag||"@@toStringTag";function a(h,D,m,y){var E=D&&D.prototype instanceof o?D:o,g=Object.create(E.prototype);return At(g,"_invoke",(function(b,F,_){var C,k,A,j=0,B=_||[],S=!1,O={p:0,n:0,v:e,a:P,f:P.bind(e,4),d:function(x,z){return C=x,k=0,A=e,O.n=z,i}};function P(x,z){for(k=x,A=z,t=0;!S&&j&&!I&&t<B.length;t++){var I,w=B[t],N=O.p,R=w[2];x>3?(I=R===z)&&(A=w[(k=w[4])?5:(k=3,3)],w[4]=w[5]=e):w[0]<=N&&((I=x<2&&N<w[1])?(k=0,O.v=z,O.n=w[1]):N<R&&(I=x<3||w[0]>z||z>R)&&(w[4]=x,w[5]=z,O.n=R,k=0))}if(I||x>1)return i;throw S=!0,z}return function(x,z,I){if(j>1)throw TypeError("Generator is already running");for(S&&z===1&&P(z,I),k=z,A=I;(t=k<2?e:A)||!S;){C||(k?k<3?(k>1&&(O.n=-1),P(k,A)):O.n=A:O.v=A);try{if(j=2,C){if(k||(x="next"),t=C[x]){if(!(t=t.call(C,A)))throw TypeError("iterator result is not an object");if(!t.done)return t;A=t.value,k<2&&(k=0)}else k===1&&(t=C.return)&&t.call(C),k<2&&(A=TypeError("The iterator does not provide a '"+x+"' method"),k=1);C=e}else if((t=(S=O.n<0)?A:b.call(F,O))!==i)break}catch(w){C=e,k=1,A=w}finally{j=1}}return{value:t,done:S}}})(h,m,y),!0),g}var i={};function o(){}function s(){}function c(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):(At(t={},r,function(){return this}),t),d=c.prototype=o.prototype=Object.create(l);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,At(h,u,"GeneratorFunction")),h.prototype=Object.create(d),h}return s.prototype=c,At(d,"constructor",c),At(c,"constructor",s),s.displayName="GeneratorFunction",At(c,u,"GeneratorFunction"),At(d),At(d,u,"Generator"),At(d,r,function(){return this}),At(d,"toString",function(){return"[object Generator]"}),(J=function(){return{w:a,m:f}})()}function At(e,t,n,r){var u=Object.defineProperty;try{u({},"",{})}catch{u=0}At=function(a,i,o,s){function c(l,d){At(a,l,function(f){return this._invoke(l,d,f)})}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))},At(e,t,n,r)}function Cr(e,t){return Cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Cr(e,t)}function Be(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=[],l=!0,d=!1;try{if(o=(u=u.call(n)).next,r===0){if(Object(u)!==u)return;l=!1}else for(;!(l=(a=o.call(u)).done)&&(c.push(a.value),c.length!==r);l=!0);}catch(f){d=!0,i=f}finally{try{if(!l&&u.return!=null&&(s=u.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}})(e,t)||yo(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 K(e){return(function(t){if(Array.isArray(t))return ki(t)})(e)||(function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)})(e)||yo(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 Zl(e){var t=(function(n){if(ee(n)!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var u=r.call(n,"string");if(ee(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(e);return ee(t)=="symbol"?t:t+""}function ot(e){return ot=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},ot(e)}function yo(e,t){if(e){if(typeof e=="string")return ki(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)?ki(e,t):void 0}}function xn(e){var t=typeof Map=="function"?new Map:void 0;return xn=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 Ml(n,arguments,wu(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Cr(r,n)},xn(e)}function ma(){ma=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)),Cr(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 l=0;u[c[l]]===void 0&&l+1<c.length;)l++;o[s]=u[c[l]]}return o},Object.create(null))}return pe(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}
8,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,l){if(l==="")return s;var d=i[c];return Array.isArray(d)?"$"+d.join("$"):typeof d=="number"?"$"+d:""}))}if(typeof a=="function"){var o=this;return e[Symbol.replace].call(this,u,function(){var s=arguments;return ee(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)},ma.apply(this,arguments)}var Ll=function(e){var t=e.theme;$t(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])},yp={"Ctrl/Cmd+K":!0,"/":!0};function Ru(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 ks(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 Ai(e){return e}function ia(e){return e.button===1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}var Ya="Ctrl";function Fp(){}var $l=/(<mark>|<\/mark>)/g,Ep=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&&Ep.test(u.value)?u.value.replace($l,""):u.value:e.hierarchy.lvl0}var _p=["translations","keyboardShortcuts"],bp=p.forwardRef(function(e,t){var n=e.translations,r=n===void 0?{}:n,u=e.keyboardShortcuts,a=ft(e,_p),i=r.buttonText,o=i===void 0?"Search":i,s=r.buttonAriaLabel,c=s===void 0?"Search":s,l=(function(F){return v(v({},yp),F)})(u),d=Be(er(null),2),f=d[0],h=d[1];Ll({theme:a.theme}),$t(function(){typeof navigator<"u"&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?h("⌘"):h(Ya))},[]);var D=Be(f===Ya?[Ya,"Control","Ctrl"]:["Meta","Meta","⌘"],3),m=D[0],y=D[1],E=D[2],g=l["Ctrl/Cmd+K"],b="".concat(y,"+k");return p.createElement("button",Ke({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(Ru,null),p.createElement("span",{className:"DocSearch-Button-Placeholder"},o)),p.createElement("span",{className:"DocSearch-Button-Keys"},f!==null&&g&&p.createElement(p.Fragment,null,p.createElement(As,{reactsToKey:m},E),p.createElement(As,{reactsToKey:"k"},"K"))))});function As(e){var t=e.reactsToKey,n=e.children,r=Be(er(!1),2),u=r[0],a=r[1];return $t(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 Su(e){return e.reduce(function(t,n){return t.concat(n)},[])}var Cp=0;function wi(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;if(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 Da=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 Ap=["items"],wp=["items"];function ru(e){return ru=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},ru(e)}function Uu(e){return(function(t){if(Array.isArray(t))return Xa(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 Xa(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);
8return 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)?Xa(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 Xa(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,l={},d=Object.keys(i);for(c=0;c<d.length;c++)s=d[c],o.indexOf(s)>=0||(l[s]=i[s]);return l})(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 vr(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){Sp(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 Sp(e,t,n){return(t=(function(r){var u=(function(a){if(ru(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(ru(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);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 Hu(e){return e.map(function(t){var n=t.items,r=Vl(t,Ap);return vr(vr({},r),{},{objectIDs:n?.map(function(u){return u.objectID})||r.objectIDs})})}function xp(e){var t,n,r,u=(t=(function(i,o){return(function(s){if(Array.isArray(s))return s})(i)||(function(s,c){var l=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(l!=null){var d,f,h,D,m=[],y=!0,E=!1;try{if(h=(l=l.call(s)).next,c!==0)for(;!(y=(d=h.call(l)).done)&&(m.push(d.value),m.length!==c);y=!0);}catch(g){E=!0,f=g}finally{try{if(!y&&l.return!=null&&(D=l.return(),Object(D)!==D))return}finally{if(E)throw f}}return m}})(i,o)||(function(s,c){if(s){if(typeof s=="string")return xs(s,c);var l=Object.prototype.toString.call(s).slice(8,-1);return l==="Object"&&s.constructor&&(l=s.constructor.name),l==="Map"||l==="Set"?Array.from(s):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?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);function a(i,o,s){if(u&&s!==void 0){var c=s[0].__autocomplete_algoliaCredentials,l={"X-Algolia-Application-Id":c.appId,"X-Algolia-API-Key":c.apiKey};e.apply(void 0,[i].concat(Uu(o),[{headers:l}]))}else e.apply(void 0,[i].concat(Uu(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",Hu(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",Hu(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",Hu(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",Hu(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>
100&&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,l){var d=l.items,f=Vl(l,wp);return[].concat(Uu(c),Uu((function(h){for(var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,m=[],y=0;y<h.objectIDs.length;y+=D)m.push(vr(vr({},h),{},{objectIDs:h.objectIDs.slice(y,y+D)}));return m})(vr(vr({},f),{},{objectIDs:d?.map(function(h){return h.objectID})||f.objectIDs})).map(function(h){return{items:d,payload:h}})))},[]).forEach(function(c){var l=c.items;return a("viewedObjectIDs",[c.payload],l)})},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 Op(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 qr(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function uu(e){return uu=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},uu(e)}function mr(e){return(function(t){if(Array.isArray(t))return ei(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 ei(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)?ei(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 ei(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 zt(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){Bp(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 Bp(e,t,n){return(t=(function(r){var u=(function(a){if(uu(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(uu(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);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 Wl="2.15.0",Ip="https://cdn.jsdelivr.net/npm/search-insights@".concat(Wl,"/dist/search-insights.min.js"),Tp=Ul(function(e){var t=e.onItemsChange,n=e.items,r=e.insights,u=e.state;t({insights:r,insightsEvents:Op({items:n}).map(function(a){return zt({eventName:"Items Viewed"},a)}),state:u})},400);function Is(e){var t=(function(f){return zt({onItemsChange:function(h){var D=h.insights,m=h.insightsEvents,y=h.state;D.viewedObjectIDs.apply(D,mr(m.map(function(E){return zt(zt({},E),{},{algoliaSource:Ts(E.algoliaSource,y.context)})})))},onSelect:function(h){var D=h.insights,m=h.insightsEvents,y=h.state;D.clickedObjectIDsAfterSearch.apply(D,mr(m.map(function(E){return zt(zt({},E),{},{algoliaSource:Ts(E.algoliaSource,y.context)})})))},onActive:Da,__autocomplete_clickAnalytics:!0},f)})(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(f){var h=f.window,D=h.AlgoliaAnalyticsObject||"aa";
11typeof D=="string"&&(s=h[D]),s||(h.AlgoliaAnalyticsObject=D,h[D]||(h[D]=function(){h[D].queue||(h[D].queue=[]);for(var m=arguments.length,y=new Array(m),E=0;E<m;E++)y[E]=arguments[E];h[D].queue.push(y)}),h[D].version=Wl,s=h[D],(function(m){var y="[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete";try{var E=m.document.createElement("script");E.async=!0,E.src=Ip,E.onerror=function(){console.error(y)},document.body.appendChild(E)}catch{console.error(y)}})(h))})({window}),!s)return{};r&&s("init",zt({partial:!0},r));var c=xp(s),l={current:[]},d=Ul(function(f){var h=f.state;if(h.isOpen){var D=h.collections.reduce(function(m,y){return[].concat(mr(m),mr(y.items))},[]).filter(qr);Hl(l.current.map(function(m){return m.objectID}),D.map(function(m){return m.objectID}))||(l.current=D,D.length>0&&Tp({onItemsChange:u,items:D,insights:c,state:h}))}},0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(f){var h=f.setContext,D=f.onSelect,m=f.onActive;function y(E){h({algoliaInsightsPlugin:{__algoliaSearchParameters:zt(zt({},o?{clickAnalytics:!0}:{}),E?{userToken:Pp(E)}:{}),insights:c}})}s("addAlgoliaAgent","insights-plugin"),y(),s("onUserTokenChange",function(E){y(E)}),s("getUserToken",null,function(E,g){y(g)}),D(function(E){var g=E.item,b=E.state,F=E.event,_=E.source;qr(g)&&a({state:b,event:F,insights:c,item:g,insightsEvents:[zt({eventName:"Item Selected"},Ss({item:g,items:_.getItems().filter(qr)}))]})}),m(function(E){var g=E.item,b=E.source,F=E.state,_=E.event;qr(g)&&i({state:F,event:_,insights:c,item:g,insightsEvents:[zt({eventName:"Item Active"},Ss({item:g,items:b.getItems().filter(qr)}))]})})},onStateChange:function(f){var h=f.state;d({state:h})},__autocomplete_pluginOptions:e}}function Ts(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(mr(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]),["autocomplete-internal"],mr((e=t.algoliaInsightsPlugin)!==null&&e!==void 0&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function Pp(e){return typeof e=="number"?e.toString():e}function oa(e,t){var n=t;return{then:function(r,u){return oa(e.then(Vu(r,n,e),Vu(u,n,e)),n)},catch:function(r){return oa(e.catch(Vu(r,n,e)),n)},finally:function(r){return r&&n.onCancelList.push(r),oa(e.finally(Vu(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 oa(e,{isCanceled:!1,onCancelList:[]})}function Vu(e,t,n){return e?function(r){return t.isCanceled?r:e(r)}:n}var ti,ni=!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){jp(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}
11function jp(e,t,n){return(t=(function(r){var u=(function(a){if(au(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(au(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);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 au(e){return au=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},au(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(l,d){var f=typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(!f){if(Array.isArray(l)||(f=(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}})(l))||d){f&&(l=f);var h=0,D=function(){};return{s:D,n:function(){return h>=l.length?{done:!0}:{done:!1,value:l[h++]}},e:function(g){throw g},f:D}}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 m,y=!0,E=!1;return{s:function(){f=f.call(l)},n:function(){var g=f.next();return y=g.done,g},e:function(g){E=!0,m=g},f:function(){try{y||f.return==null||f.return()}finally{if(E)throw m}}}})(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(l){a.e(l)}finally{a.f()}return r?t.wait():u.length>0?t.wait(Math.max.apply(Math,u)):void 0};function Kn(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 l=a.collections[s];if(l===i){o=!0;break}c+=l.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}}function xt(e,t,n){return[e,n?.sourceId,t].filter(Boolean).join("-").replace(/\s/g,"")}var Np=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function Zs(e){return e.nativeEvent||e}function iu(e){return iu=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},iu(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 zp(e,t,n){return(t=(function(r){var u=(function(a){if(iu(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(iu(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);return iu(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 ou(e){return ou=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},ou(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 Wu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
12t%2?$s(Object(n),!0).forEach(function(r){Rp(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 Rp(e,t,n){return(t=(function(r){var u=(function(a){if(ou(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(ou(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);return ou(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 su(e){return su=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},su(e)}function ri(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 ir(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){Mp(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 Mp(e,t,n){return(t=(function(r){var u=(function(a){if(su(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(su(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);return su(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 Zp(e,t){var n,r=typeof window<"u"?window:{},u=e.plugins||[];return ir(ir({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 wi(a.state)>0},reshape:function(a){return a.sources}},e),{},{id:(n=e.id)!==null&&n!==void 0?n:"autocomplete-".concat(Cp++),plugins:u,initialState:ir({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)})},getSources:function(a){return Promise.all([].concat((function(i){return(function(o){if(Array.isArray(o))return ri(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 ri(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)?ri(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(l){return Promise.all(l.filter(function(d){return!!d}).map(function(d){if(d.sourceId,c.includes(d.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(d.sourceId)," is not unique."));c.push(d.sourceId);var f={getItemInputValue:function(D){return D.state.query},getItemUrl:function(){},onSelect:function(D){(0,D.setIsOpen)(!1)}
13,onActive:Da,onResolve:Da};Object.keys(f).forEach(function(D){f[D].__default=!0});var h=zs(zs({},f),d);return Promise.resolve(h)}))})})(i,a)})).then(function(i){return Su(i)}).then(function(i){return i.map(function(o){return ir(ir({},o),{},{onSelect:function(s){o.onSelect(s),t.forEach(function(c){var l;return(l=c.onSelect)===null||l===void 0?void 0:l.call(c,s)})},onActive:function(s){o.onActive(s),t.forEach(function(c){var l;return(l=c.onActive)===null||l===void 0?void 0:l.call(c,s)})},onResolve:function(s){o.onResolve(s),t.forEach(function(c){var l;return(l=c.onResolve)===null||l===void 0?void 0:l.call(c,s)})}})})})},navigator:ir({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 cu(e){return cu=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},cu(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 Ku(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){Kl(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 Kl(e,t,n){return(t=(function(r){var u=(function(a){if(cu(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(cu(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);return cu(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 lu(e){return lu=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},lu(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 or(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){Lp(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}
13function Lp(e,t,n){return(t=(function(r){var u=(function(a){if(lu(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(lu(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);return lu(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 Jl(e){return(function(t){if(Array.isArray(t))return ui(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 ui(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)?ui(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 ui(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 Ju(e){return!!e.execute}function $p(e){var t=e.reduce(function(n,r){if(!Ju(r))return n.push(r),n;var u=r.searchClient,a=r.execute,i=r.requesterId,o=r.requests,s=n.find(function(d){return Ju(r)&&Ju(d)&&d.searchClient===u&&!!i&&d.requesterId===i});if(s){var c;(c=s.items).push.apply(c,Jl(o))}else{var l={execute:a,requesterId:i,items:o,searchClient:u};n.push(l)}return n},[]).map(function(n){if(!Ju(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 Su(n)})}function fu(e){return fu=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},fu(e)}var qp=["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 Zn(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){Up(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 Up(e,t,n){return(t=(function(r){var u=(function(a){if(fu(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(fu(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);return fu(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,ai,Qu,Ur=null,Ks=(Ws=-1,ai=-1,Qu=void 0,function(e){var t=++Ws;return Promise.resolve(e).then(function(n){return Qu&&t<ai?Qu:(ai=t,Qu=n,n)})});function Un(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 _,C,k=(function(j,B){if(j==null)return{};var S,O,P={},x=Object.keys(j);for(O=0;O<x.length;O++)S=x[O],B.indexOf(S)>=0||(P[S]=j[S]);return P})(b,F);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(b);for(C=0;C<A.length;C++)_=A[C],F.indexOf(_)>=0||Object.prototype.propertyIsEnumerable.call(b,_)&&(k[_]=b[_])}return k})(e,qp);Ur&&u.environment.clearTimeout(Ur);var c=s.setCollections,l=s.setIsOpen,d=s.setQuery,f=s.setActiveItemId,h=s.setStatus,D=s.setContext;if(d(a),f(u.defaultActiveItemId),!a&&u.openOnFocus===!1){var m,y=o.getState().collections.map(function(b){return Zn(Zn({},b),{},{items:[]})});h("idle"),c(y),l((m=r.isOpen)!==null&&m!==void 0?m:u.shouldPanelOpen({state:o.getState()}));var E=Ps(Ks(y).then(function(){return Promise.resolve()}));return o.pendingRequests.add(E)}h("loading"),Ur=u.environment.setTimeout(function(){h("stalled")},u.stallThreshold);var g=Ps(Ks(u.getSources(Zn({query:a,refresh:i,state:o.getState()}
14,s)).then(function(b){return Promise.all(b.map(function(F){return Promise.resolve(F.getItems(Zn({query:a,refresh:i,state:o.getState()},s))).then(function(_){return(function(C,k,A){if(B=C,!!B?.execute){var j=C.requesterId==="algolia"?Object.assign.apply(Object,[{}].concat(Jl(Object.keys(A.context).map(function(S){var O;return(O=A.context[S])===null||O===void 0?void 0:O.__algoliaSearchParameters})))):{};return or(or({},C),{},{requests:C.queries.map(function(S){return{query:C.requesterId==="algolia"?or(or({},S),{},{params:or(or({},j),S.params)}):S,sourceId:k,transformResponse:C.transformResponse}})})}var B;return{items:C,sourceId:k}})(_,F.sourceId,o.getState())})})).then($p).then(function(F){var _,C=F.some(function(k){return(function(A){return!Array.isArray(A)&&!!A?._automaticInsights})(k.items)});return C&&D({algoliaInsightsPlugin:Zn(Zn({},((_=o.getState().context)===null||_===void 0?void 0:_.algoliaInsightsPlugin)||{}),{},{__automaticInsights:C})}),(function(k,A,j){return A.map(function(B){var S,O=k.filter(function(I){return I.sourceId===B.sourceId}),P=O.map(function(I){return I.items}),x=O[0].transformResponse,z=x?x({results:S=P,hits:S.map(function(I){return I.hits}).filter(Boolean),facetHits:S.map(function(I){var w;return(w=I.facetHits)===null||w===void 0?void 0:w.map(function(N){return{label:N.value,count:N.count,_highlightResult:{label:{value:N.highlighted}}}})}).filter(Boolean)}):P;return B.onResolve({source:B,results:P,items:z,state:j.getState()}),z.every(Boolean),'The `getItems` function from source "'.concat(B.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:B,items:z}})})(F,b,o)}).then(function(F){return(function(_){var C=_.props,k=_.state,A=_.collections.reduce(function(B,S){return Ku(Ku({},B),{},Kl({},S.source.sourceId,Ku(Ku({},S.source),{},{getItems:function(){return Su(S.items)}})))},{}),j=C.plugins.reduce(function(B,S){return S.reshape?S.reshape(B):B},{sourcesBySourceId:A,state:k}).sourcesBySourceId;return Su(C.reshape({sourcesBySourceId:j,sources:Object.values(j),state:k})).filter(Boolean).map(function(B){return{source:B,items:B.getItems()}})})({collections:F,props:u,state:o.getState()})})}))).then(function(b){var F;h("idle"),c(b);var _=u.shouldPanelOpen({state:o.getState()});l((F=r.isOpen)!==null&&F!==void 0?F:u.openOnFocus&&!a&&_||_);var C=Kn(o.getState());if(o.getState().activeItemId!==null&&C){var k=C.item,A=C.itemInputValue,j=C.itemUrl,B=C.source;B.onActive(Zn({event:t,item:k,itemInputValue:A,itemUrl:j,refresh:i,source:B,state:o.getState()},s))}}).finally(function(){h("idle"),Ur&&u.environment.clearTimeout(Ur)});return o.pendingRequests.add(g)}function du(e){return du=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},du(e)}var Hp=["event","props","refresh","store"];function Js(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 Ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Js(Object(n),!0).forEach(function(r){Vp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Js(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vp(e,t,n){return(t=(function(r){var u=(function(a){if(du(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(du(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);return du(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 pu(e){return pu=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},pu(e)}var Wp=["props","refresh","store"],Kp=["inputElement","formElement","panelElement"],Jp=["inputElement"],Qp=["inputElement","maxLength"],Gp=["source"],Yp=["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 ct(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
18t%2?Qs(Object(n),!0).forEach(function(r){Xp(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 Xp(e,t,n){return(t=(function(r){var u=(function(a){if(pu(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(pu(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);return pu(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 sr(e,t){if(e==null)return{};var n,r,u=(function(i,o){if(i==null)return{};var s,c,l={},d=Object.keys(i);for(c=0;c<d.length;c++)s=d[c],o.indexOf(s)>=0||(l[s]=i[s]);return l})(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 e0(e){var t=e.props,n=e.refresh,r=e.store,u=sr(e,Wp);return{getEnvironmentProps:function(a){var i=a.inputElement,o=a.formElement,s=a.panelElement;function c(l){!r.getState().isOpen&&r.pendingRequests.isEmpty()||l.target===i||[o,s].some(function(d){return(f=d)===(h=l.target)||f.contains(h);var f,h})===!1&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return ct({onTouchStart:c,onMouseDown:c,onTouchMove:function(l){r.getState().isOpen!==!1&&i===t.environment.document.activeElement&&l.target!==i&&i.blur()}},sr(a,Kp))},getRootProps:function(a){return ct({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 xt(t.id,"list",o)}).join(" "):void 0,"aria-labelledby":xt(t.id,"label")},a)},getFormProps:function(a){a.inputElement;var i=sr(a,Jp),o=function(s){var c;t.onSubmit(ct({event:s,refresh:n,state:r.getState()},u)),r.dispatch("submit",null),(c=a.inputElement)===null||c===void 0||c.blur()};return ct({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(ct({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 ct({htmlFor:xt(t.id,"input"),id:xt(t.id,"label")},a)},getInputProps:function(a){var i;function o(m){(t.openOnFocus||r.getState().query)&&Un(ct({event:m,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,l=c===void 0?512:c,d=sr(s,Qp),f=Kn(r.getState()),h=(function(m){return!!(m&&m.match(Np))})(((i=t.environment.navigator)===null||i===void 0?void 0:i.userAgent)||""),D=t.enterKeyHint||(f!=null&&f.itemUrl&&!h?"go":"search");return ct({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&r.getState().activeItemId!==null?xt(t.id,"item-".concat(r.getState().activeItemId),f?.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.filter(function(m){return m.items.length>0}).map(function(m){var y=m.source;return xt(t.id,"list",y)}).join(" "):void 0,"aria-labelledby":xt(t.id,"label"),value:r.getState().completion||r.getState().query,id:xt(t.id,"input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:D,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:l,type:"search",onChange:function(m){var y=m.currentTarget.value;t.ignoreCompositionEvents&&Zs(m).isComposing?u.setQuery(y):Un(ct({event:m,props:t,query:y.slice(0,l),refresh:n,store:r},u))},onCompositionEnd:function(m){Un(ct({event:m,props:t,query:m.currentTarget.value.slice(0,l),refresh:n,store:r},u))},onKeyDown:function(m){Zs(m).isComposing||(function(y){var E=y.event,g=y.props,b=y.refresh,F=y.store,_=(function(x,z){if(x==null)return{};var I,w,N=(function(M,W){if(M==null)return{};var U,oe,he={},fe=Object.keys(M);for(oe=0;oe<fe.length;oe++)U=fe[oe],W.indexOf(U)>=0||(he[U]=M[U]);return he})(x,z);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(x);for(w=0;w<R.length;w++)I=R[w],z.indexOf(I)>=0||Object.prototype.propertyIsEnumerable.call(x,I)&&(N[I]=x[I])}return N})(y,Hp);if(E.key==="ArrowUp"||E.key==="ArrowDown"){var C=function(){var x=Kn(F.getState()),z=g.environment.document.getElementById(xt(g.id,"item-".concat(F.getState().activeItemId),x?.source));z&&(z.scrollIntoViewIfNeeded?z.scrollIntoViewIfNeeded(!1):z.scrollIntoView(!1))},k=function(){var x=Kn(F.getState());if(F.getState().activeItemId!==null&&x){var z=x.item,I=x.itemInputValue,w=x.itemUrl,N=x.source;N.onActive(Ln({event:E,item:z,itemInputValue:I,itemUrl:w,refresh:b,source:N,state:F.getState()},_))}};E.preventDefault(),F.getState().isOpen===!1&&(g.openOnFocus||F.getState().query
18)?Un(Ln({event:E,props:g,query:F.getState().query,refresh:b,store:F},_)).then(function(){F.dispatch(E.key,{nextActiveItemId:g.defaultActiveItemId}),k(),setTimeout(C,0)}):(F.dispatch(E.key,{}),k(),C())}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(x){return x.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 j=Kn(F.getState()),B=j.item,S=j.itemInputValue,O=j.itemUrl,P=j.source;if(E.metaKey||E.ctrlKey)O!==void 0&&(P.onSelect(Ln({event:E,item:B,itemInputValue:S,itemUrl:O,refresh:b,source:P,state:F.getState()},_)),g.navigator.navigateNewTab({itemUrl:O,item:B,state:F.getState()}));else if(E.shiftKey)O!==void 0&&(P.onSelect(Ln({event:E,item:B,itemInputValue:S,itemUrl:O,refresh:b,source:P,state:F.getState()},_)),g.navigator.navigateNewWindow({itemUrl:O,item:B,state:F.getState()}));else if(!E.altKey){if(O!==void 0)return P.onSelect(Ln({event:E,item:B,itemInputValue:S,itemUrl:O,refresh:b,source:P,state:F.getState()},_)),void g.navigator.navigate({itemUrl:O,item:B,state:F.getState()});Un(Ln({event:E,nextState:{isOpen:!1},props:g,query:S,refresh:b,store:F},_)).then(function(){P.onSelect(Ln({event:E,item:B,itemInputValue:S,itemUrl:O,refresh:b,source:P,state:F.getState()},_))})}}})(ct({event:m,props:t,refresh:n,store:r},u))},onFocus:o,onBlur:Da,onClick:function(m){a.inputElement!==t.environment.document.activeElement||r.getState().isOpen||o(m)}},d)},getPanelProps:function(a){return ct({onMouseDown:function(i){i.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},a)},getListProps:function(a){var i=a||{},o=i.source,s=sr(i,Gp);return ct({role:"listbox","aria-labelledby":xt(t.id,"label"),id:xt(t.id,"list",o)},s)},getItemProps:function(a){var i=a.item,o=a.source,s=sr(a,Yp);return ct({id:xt(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.dispatch("mousemove",i.__autocomplete_id);var l=Kn(r.getState());if(r.getState().activeItemId!==null&&l){var d=l.item,f=l.itemInputValue,h=l.itemUrl,D=l.source;D.onActive(ct({event:c,item:d,itemInputValue:f,itemUrl:h,refresh:n,source:D,state:r.getState()},u))}}},onMouseDown:function(c){c.preventDefault()},onClick:function(c){var l=o.getItemInputValue({item:i,state:r.getState()}),d=o.getItemUrl({item:i,state:r.getState()});(d?Promise.resolve():Un(ct({event:c,nextState:{isOpen:!1},props:t,query:l,refresh:n,store:r},u))).then(function(){o.onSelect(ct({event:c,item:i,itemInputValue:l,itemUrl:d,refresh:n,source:o,state:r.getState()},u))})}},s)}}}function hu(e){return hu=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},hu(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 t0(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){if(hu(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(hu(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);return hu(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 n0(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:t0({"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=Kn(n))===null||t===void 0?void 0:t.itemInputValue)||null}function vu(e){return vu=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},vu(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]:{};
18t%2?Xs(Object(n),!0).forEach(function(r){r0(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 r0(e,t,n){return(t=(function(r){var u=(function(a){if(vu(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(vu(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);return vu(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 u0=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,wi(e),t.props.defaultActiveItemId)});return we(we({},n),{},{completion:Ys({state:n})});case"ArrowUp":var r=we(we({},e),{},{activeItemId:js(-1,e.activeItemId,wi(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 mu(e){return mu=typeof Symbol=="function"&&ee(Symbol.iterator)=="symbol"?function(t){return ee(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ee(t)},mu(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 $n(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){a0(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 a0(e,t,n){return(t=(function(r){var u=(function(a){if(mu(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var o=i.call(a,"string");if(mu(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r);return mu(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 i0(e){var t=[],n=Zp(e,t),r=(function(l,d,f){var h,D=d.initialState;return{getState:function(){return D},dispatch:function(m,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(_){zp(g,_,F[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(F)):Ls(Object(F)).forEach(function(_){Object.defineProperty(g,_,Object.getOwnPropertyDescriptor(F,_))})}return g})({},D);D=l(D,{type:m,props:d,payload:y}),f({state:D,prevState:E})},pendingRequests:(h=[],{add:function(m){return h.push(m),m.finally(function(){h=h.filter(function(y){return y!==m})})},cancelAll:function(){h.forEach(function(m){return m.cancel()})},isEmpty:function(){return h.length===0},wait:function(m){return ni?(ni=!1,ti=m?Promise.race([Promise.all(h),new Promise(function(y){return setTimeout(y,m)})]):Promise.all(h),ti.then(function(){ni=!0}
18)):ti}})}})(u0,n,function(l){var d,f,h=l.prevState,D=l.state;if(n.onStateChange($n({prevState:h,state:D,refresh:i,navigator:n.navigator},u)),!s()&&(d=D.context)!==null&&d!==void 0&&(f=d.algoliaInsightsPlugin)!==null&&f!==void 0&&f.__automaticInsights&&n.insights!==!1){var m=Is({__autocomplete_clickAnalytics:!1});n.plugins.push(m),o([m])}}),u=(function(l){var d=l.store;return{setActiveItemId:function(f){d.dispatch("setActiveItemId",f)},setQuery:function(f){d.dispatch("setQuery",f)},setCollections:function(f){var h=0,D=f.map(function(m){return Wu(Wu({},m),{},{items:Su(m.items).map(function(y){return Wu(Wu({},y),{},{__autocomplete_id:h++})})})});d.dispatch("setCollections",D)},setIsOpen:function(f){d.dispatch("setIsOpen",f)},setStatus:function(f){d.dispatch("setStatus",f)},setContext:function(f){d.dispatch("setContext",f)}}})({store:r}),a=e0($n({props:n,refresh:i,store:r,navigator:n.navigator},u));function i(){return Un($n({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(l){l.forEach(function(d){var f;return(f=d.subscribe)===null||f===void 0?void 0:f.call(d,$n($n({},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(l){return l.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(l){var d,f,h=l.metadata,D=l.environment;if(!((d=D.navigator)===null||d===void 0||(f=d.userAgent)===null||f===void 0)&&f.includes("Algolia Crawler")){var m=D.document.createElement("meta"),y=D.document.querySelector("head");m.name="algolia:metadata",setTimeout(function(){m.content=JSON.stringify(h),y.appendChild(m)},0)}})({metadata:n0({plugins:n.plugins,options:e}),environment:n.environment}),$n($n({refresh:i,navigator:n.navigator},a),u)}var Fo="https://askai.algolia.com/chat",Eo="https://beta-chat-askai.algolia.com";function o0(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-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-.
1805,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 ii(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 s0(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,l=c===void 0?"Submit question":c,d=n.navigateText,f=d===void 0?"Navigate":d,h=n.navigateUpKeyAriaLabel,D=h===void 0?"Arrow up":h,m=n.navigateDownKeyAriaLabel,y=m===void 0?"Arrow down":m,E=n.closeText,g=E===void 0?"Close":E,b=n.backToSearchText,F=b===void 0?"Back to search":b,_=n.closeKeyAriaLabel,C=_===void 0?"Escape key":_,k=n.poweredByText,A=k===void 0?"Powered by":k;return p.createElement(p.Fragment,null,p.createElement("div",{className:"DocSearch-Logo"},p.createElement(o0,{translations:{poweredByText:A}})),p.createElement("ul",{className:"DocSearch-Commands"},p.createElement("li",null,p.createElement("kbd",{className:"DocSearch-Commands-Key"},p.createElement(ii,{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(ii,{ariaLabel:D},p.createElement("path",{d:"m5 12 7-7 7 7"}),p.createElement("path",{d:"M12 19V5"}))),p.createElement("span",{className:"DocSearch-Label"},f)),p.createElement("li",null,p.createElement("kbd",{className:"DocSearch-Commands-Key"},p.createElement(ii,{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?l: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":C},u?F:g))))}function c0(e){var t=e.hit,n=e.children;return p.createElement("a",{href:t.url},n)}function xu(e){var t=e.className;return p.createElement("svg",{viewBox:"0 0 38 38",className:t,stroke:"currentColor",strokeOpacity:".5"}
18,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 _o(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 l0(){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 Du(){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 f0(){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 d0(){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 p0=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 h0(e){switch(e.type){case"lvl1":return p.createElement(p0,null);case"content":return p.createElement(m0,null);default:return p.createElement(v0,null)}}function v0(){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 m0(){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 D0(){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 g0(){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 y0(){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 F0(){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 E0(){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 _0(){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 Gu,b0={before:"Searched for ",separator:", ",lastSeparator:" and ",after:""};function C0(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,l=c===void 0?" and ":c,d=u.after,f=d===void 0?"":d;return p.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--AggregatedResult"},p.createElement(Ru,{size:18}
18),p.createElement("span",null,i&&p.createElement("span",null,i),t.map(function(h,D){return p.createElement(Qt,{key:h+D},p.createElement("span",{role:"button",tabIndex:0,className:"DocSearch-AskAiScreen-MessageContent-Tool-Query",onKeyDown:function(m){m.key!=="enter"&&m.key!==" "||(m.preventDefault(),r(h))},onClick:function(){return r(h)}},'"',h,'"'),D<t.length-2&&s,D===t.length-2&&l)}),f&&p.createElement("span",null,f)))}var tr={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function nc(e){tr=e}var gu={exec:function(){return null}};function Pe(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(mt.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}})(),mt={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")}},Mu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,bo=/(?:[*+-]|\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=Pe(Gl).replace(/bull/g,bo).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(),A0=Pe(Gl).replace(/bull/g,bo).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(),Co=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ko=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,w0=Pe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ko).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),S0=Pe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bo).getRegex(),Za="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",Ao=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,x0=Pe("^ {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",Ao).replace("tag",Za).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),rc=Pe(Co).replace("hr",Mu).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",Za).getRegex(),wo={blockquote:Pe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",rc).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:w0,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Mu,html:x0,lheading:Yl,list:S0,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:rc,table:gu,text:/^[^\n]+/},uc=Pe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Mu).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",Za).getRegex(),O0=v(v({},wo),{},{lheading:A0,table:uc,paragraph:Pe(Co).replace("hr",Mu).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",Za).getRegex()}),B0=v(v({},wo),{},{html:Pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ao).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:gu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pe(Co).replace("hr",Mu).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*$)/,La=/(?:[!-\/:-@\[-`\{-~\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])/,So=/(?:[\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])/,I0=Pe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,So).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])/,T0=Pe(/link|precode-code|html/,"g").replace("link",ma(/\[(?:[^\[\]`]|(`+)[^`]+\1(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/,{a:1})).replace("precode-",k0?"(?<!`)()":"(^^|[^`])").replace("code",ma(/(`+)[^`]+\1(?!`)/,{b:1})).replace("html",/<(?! )[^<>]*?>/).getRegex(),nf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,P0=Pe(nf,"u").replace(/punct/g,La).getRegex(),j0=Pe(nf,"u").replace(/punct/g,tf).getRegex(),rf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",N0=Pe(rf,"gu").replace(/notPunctSpace/g,ef).replace(/punctSpace/g,So).replace(/punct/g,La).getRegex(),z0=Pe(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(),R0=Pe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ef).replace(/punctSpace/g,So).replace(/punct/g,La).getRegex(),M0=Pe(/\\(punct)/,"gu").replace(/punct/g,La).getRegex(),Z0=Pe(/^<(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(),L0=Pe(Ao).replace("(?:-->|$)","-->").getRegex(),$0=Pe("^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",L0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ga=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,q0=Pe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ga).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ac=Pe(/^!?\[(label)\]\[(ref)\]/).replace("label",ga).replace("ref",ko).getRegex(),ic=Pe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ko).getRegex(),oc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,xo={_backpedal:gu,anyPunctuation:M0,autolink:Z0,blockSkip:T0,br:Xl,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:gu,emStrongLDelim:P0,emStrongRDelimAst:N0,emStrongRDelimUnd:R0,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:q0,nolink:ic,punctuation:I0,reflink:ac,reflinkSearch:Pe("reflink|nolink(?!\\()","g").replace("reflink",ac).replace("nolink",ic).getRegex(),tag:$0,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:gu},U0=v(v({},xo),{},{link:Pe(/^!?\[(label)\]\((.*?)\)/).replace("label",ga).getRegex(),reflink:Pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ga).getRegex()}),Si=v(v({},xo),{},{emStrongRDelimAst:z0,emStrongLDelim:j0,url:Pe(/^((?: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:Pe(/^([`~]+|[^`~])(?:(?= {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()}),H0=v(v({},Si),{},{br:Pe(Xl).replace("{2,}","*").getRegex(),text:Pe(Si.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Yu={normal:wo,gfm:O0,pedantic:B0},Hr={normal:xo,gfm:Si,breaks:H0,pedantic:U0},V0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},sc=function(e){return V0[e]};function Wt(e,t){if(t){if(mt.escapeTest.test(e))return e.replace(mt.escapeReplace,sc)}else if(mt.escapeTestNoEncode.test(e))return e.replace(mt.escapeReplaceNoEncode,sc);return e}function cc(e){try{e=encodeURI(e).replace(mt.percentDecode,"%")}catch{return null}return e}function lc(e,t){var n,r=e.replace(mt.findPipe,function(a,i,o){for(var s=!1,c=i;--c>=0&&o[c]==="\\";)s=!s;return s?"|":" |"}).split(mt.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(mt.slashPipe,"|");return r}function Vr(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 ya=ie(function e(t){ae(this,e),xe(this,"options",void 0),xe(this,"rules",void 0),xe(this,"lexer",void 0),this.options=t||tr},[{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:Vr(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 l=c.match(i.other.beginningSpace);return l===null?c:Be(l,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=Vr(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:Vr(t[0],`
23`)}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){for(var n=Vr(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`),l=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(l):l;var d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,a,!0),this.lexer.state.top=d,n.length===0)break;var f=a.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){var h=f,D=h.raw+`
30`+n.join(`
31`),m=this.blockquote(D);a[a.length-1]=m,r=r.substring(0,r.length-h.raw.length)+m.raw,u=u.substring(0,u.length-h.text.length)+m.text;break}if(f?.type==="list"){var y=f,E=y.raw+`
32`+n.join(`
33`),g=this.list(E);a[a.length-1]=g,r=r.substring(0,r.length-f.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="",l="";if(!(n=i.exec(e))||this.rules.block.hr.test(e))break;c=n[0],e=e.substring(c.length);var d=n[2].split(`
35`,1)[0].replace(this.rules.other.listReplaceTabs,function(P){return" ".repeat(3*P.length)}),f=e.split(`
36`,1)[0],h=!d.trim(),D=0;if(this.options.pedantic?(D=2,l=d.trimStart()):h?D=n[1].length+1:(D=(D=n[2].search(this.rules.other.nonSpaceChar))>4?1:D,l=d.slice(D),D+=n[1].length),h&&this.rules.other.blankLine.test(f)&&(c+=f+`
37`,e=e.substring(f.length+1),s=!0),!s)for(var m=this.rules.other.nextBulletRegex(D),y=this.rules.other.hrRegex(D),E=this.rules.other.fencesBeginRegex(D),g=this.rules.other.headingBeginRegex(D),b=this.rules.other.htmlBeginRegex(D);e;){var F=e.split(`
38`,1)[0],_=void 0;if(f=F,_=this.options.pedantic?f=f.replace(this.rules.other.listReplaceNesting,"  "):f.replace(this.rules.other.tabCharGlobal,"    "),E.test(f)||g.test(f)||b.test(f)||m.test(f)||y.test(f))break;if(_.search(this.rules.other.nonSpaceChar)>=D||!f.trim())l+=`
39`+_.slice(D);else{if(h||d.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||E.test(d)||g.test(d)||y.test(d))break;l+=`
40`+f}!h&&!f.trim()&&(h=!0),c+=F+`
41`,e=e.substring(F.length+1),d=_.slice(D)}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));var C=null,k=void 0;this.options.gfm&&(C=this.rules.other.listIsTask.exec(l))&&(k=C[0]!=="[ ] ",l=l.replace(this.rules.other.listReplaceTask,"")),a.items.push({type:"list_item",raw:c,task:!!C,checked:k,loose:!1,text:l,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 j=0;j<a.items.length;j++)if(this.lexer.state.top=!1,a.items[j].tokens=this.lexer.blockTokens(a.items[j].text,[]),!a.loose){var B=a.items[j].tokens.filter(function(P){return P.type==="space"}),S=B.length>0&&B.some(function(P){return t.rules.other.anyLine.test(P.raw)});a.loose=S}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=V(a);try{for(c.s();!(s=c.n()).done;){var l=s.value;this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null)}}catch(m){c.e(m)}finally{c.f()}for(var d=0;d<u.length;d++)o.header.push({text:u[d],tokens:this.lexer.inline(u[d]),header:!0,align:o.align[d]});var f,h=V(i);try{for(h.s();!(f=h.n()).done;){var D=f.value;o.rows.push(lc(D,o.header.length).map(function(m,y){return{text:m,tokens:n.lexer.inline(m),header:!1,align:o.align[y]}}))}}catch(m){h.e(m)}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=Vr(n.slice(0,-1),"\\");if((n.length-r.length)%2==0)return}else{var u=(function(c,l){if(c.indexOf(l[1])===-1)return-1;for(var d=0,f=0;f<c.length;f++)if(c[f]==="\\")f++;else if(c[f]===l[0])d++;else if(c[f]===l[1]&&--d<0)return f;return d>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=K(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=K(u).length,r[3]||r[4])o+=a;else if(!((r[5]||r[6])&&i%3)||(i+a)%3){if(!((o-=a)>0)){a=Math.min(a,a+o+s);var l=K(r[0])[0].length,d=e.slice(0,i+r.index+l+a);if(Math.min(i,a)%2){var f=d.slice(1,-1);return{type:"em",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}var h=d.slice(2,-2);return{type:"strong",raw:d,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}}}}]),Rt=(function(){function e(t){ae(this,e),xe(this,"tokens",void 0),xe(this,"options",void 0),xe(this,"state",void 0),xe(this,"tokenizer",void 0),xe(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||tr,this.options.tokenizer=this.options.tokenizer||new ya,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:mt,block:Yu.normal,inline:Hr.normal};this.options.pedantic?(n.block=Yu.pedantic,n.inline=Hr.pedantic):this.options.gfm&&(n.block=Yu.gfm,this.options.breaks?n.inline=Hr.breaks:n.inline=Hr.gfm),this.tokenizer.rules=n}return ie(e,[{key:"lex",value:function(t){t=t.replace(mt.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 l=u.at(-1);return c.raw.length===1&&l!==void 0?l.raw+=`
45`:u.push(c),0}if(c=r.tokenizer.code(t)){t=t.substring(c.raw.length);var d=u.at(-1);return d?.type==="paragraph"||d?.type==="text"?(d.raw+=(d.raw.endsWith(`
46`)?"":`
47`)+c.raw,d.text+=`
48`+c.text,r.inlineQueue.at(-1).src=d.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 f=u.at(-1);return f?.type==="paragraph"||f?.type==="text"?(f.raw+=(f.raw.endsWith(`
49`)?"":`
50`)+c.raw,f.text+=`
51`+c.raw,r.inlineQueue.at(-1).src=f.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 D,m=1/0,y=t.slice(1);r.options.extensions.startBlock.forEach(function(F){typeof(D=F.call({lexer:r},y))=="number"&&D>=0&&(m=Math.min(m,D))}),m<1/0&&m>=0&&(h=t.substring(0,m+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(mt.tabCharGlobal,"    ").replace(mt.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 l,d=!1,f="",h=function(){var D,m,y;if(d||(f=""),d=!1,(D=a.options.extensions)!==null&&D!==void 0&&(D=D.inline)!==null&&D!==void 0&&D.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,f))||(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((m=a.options.extensions)!==null&&m!==void 0&&m.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)!=="_"&&(f=y.raw.slice(-1)),d=!0;var C=i.at(-1);return C?.type==="text"?(C.raw+=y.raw,C.text+=y.text):i.push(y),0}if(t){var k="Infinite loop on byte: "+t.charCodeAt(0);if(a.options.silent)return console.error(k),1;throw new Error(k)}};
57t&&((l=h())===0||l!==1););return i}}],[{key:"rules",get:function(){return{block:Yu,inline:Hr}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}])})(),Fa=ie(function e(t){ae(this,e),xe(this,"options",void 0),xe(this,"parser",void 0),this.options=t||tr},[{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(mt.notSpaceStart))===null||t===void 0?void 0:t[0],i=n.replace(mt.endingNewline,"")+`
58`;return a?'<pre><code class="language-'+Wt(a)+'">'+(u?i:Wt(i,!0))+`</code></pre>
59`:"<pre><code>"+(u?i:Wt(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+" "+Wt(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(Wt(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="'+Wt(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 Wt(r);var i='<img src="'.concat(t=a,'" alt="').concat(r,'"');return n&&(i+=' title="'.concat(Wt(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:Wt(e.text)}}]),Oo=ie(function e(){ae(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""}}]),Mt=(function(){function e(t){ae(this,e),xe(this,"options",void 0),xe(this,"renderer",void 0),xe(this,"textRenderer",void 0),this.options=t||tr,this.options.renderer=this.options.renderer||new Fa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Oo}return ie(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 l=c,d=this.renderer.text(l);u+1<t.length&&t[u+1].type==="text";)l=t[++u],d+=`
76`+this.renderer.text(l);r+=n?this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):d;continue;default:var f='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}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)}}])})(),Kr=(Gu=ie(function e(t){ae(this,e),xe(this,"options",void 0),xe(this,"block",void 0),this.options=t||tr},[{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?Rt.lex:Rt.lexInline}},{key:"provideParser",value:function(){return this.block?Mt.parse:Mt.parseInline}}]),xe(Gu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),xe(Gu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Gu),W0=ie(function e(){ae(this,e),xe(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),xe(this,"options",this.setOptions),xe(this,"parse",this.parseMarkdown(!0)),xe(this,"parseInline",this.parseMarkdown(!1)),xe(this,"Parser",Mt),xe(this,"Renderer",Fa),xe(this,"TextRenderer",Oo),xe(this,"Lexer",Rt),xe(this,"Tokenizer",ya),xe(this,"Hooks",Kr),this.use.apply(this,arguments)},[{key:"walkTokens",value:function(e,t){var n,r=this,u=[],a=V(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,l=V(c.header);try{for(l.s();!(s=l.n()).done;){var d=s.value;u=u.concat(r.walkTokens(d.tokens,t))}}catch(F){l.e(F)}finally{l.f()}var f,h=V(c.rows);try{for(h.s();!(f=h.n()).done;){var D,m=V(f.value);try{for(m.s();!(D=m.n()).done;){var y=D.value;u=u.concat(r.walkTokens(y.tokens,t))}}catch(F){m.e(F)}finally{m.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,C=new Array(_),k=0;k<_;k++)C[k]=arguments[k];var A=g.renderer.apply(this,C);return A===!1&&(A=b.apply(this,C)),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 Fa(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,C=new Array(_),k=0;k<_;k++)C[k]=arguments[k];var A=b.apply(o,C);return A===!1&&(A=F.apply(o,C)),A||""}};for(var c in a.renderer)s();i.renderer=o}if(a.tokenizer){var l=e.defaults.tokenizer||new ya(e.defaults),d=function(){if(!(f in l))throw new Error("tokenizer '".concat(f,"' does not exist"));if(["options","rules","lexer"].includes(f))return 1;var g=f,b=a.tokenizer[g],F=l[g];l[g]=function(){for(var _=arguments.length,C=new Array(_),k=0;k<_;k++)C[k]=arguments[k];var A=b.apply(l,C);return A===!1&&(A=F.apply(l,C)),A}};for(var f in a.tokenizer)d();i.tokenizer=l}
76if(a.hooks){var h=e.defaults.hooks||new Kr,D=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];Kr.passThroughHooks.has(g)?h[b]=function(C){if(e.defaults.async&&Kr.passThroughHooksRespectAsync.has(g))return _e(J().m(function A(){var j;return J().w(function(B){for(;;)switch(B.n){case 0:return B.n=1,F.call(h,C);case 1:return j=B.v,B.a(2,_.call(h,j))}},A)}))();var k=F.call(h,C);return _.call(h,k)}:h[b]=function(){for(var C=arguments.length,k=new Array(C),A=0;A<C;A++)k[A]=arguments[A];if(e.defaults.async)return _e(J().m(function B(){var S;return J().w(function(O){for(;;)switch(O.n){case 0:return O.n=1,F.apply(h,k);case 1:if((S=O.v)!==!1){O.n=3;break}return O.n=2,_.apply(h,k);case 2:S=O.v;case 3:return O.a(2,S)}},B)}))();var j=F.apply(h,k);return j===!1&&(j=_.apply(h,k)),j}};for(var m in a.hooks)D(m);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 Rt.lex(e,t??this.defaults)}},{key:"parser",value:function(e,t){return Mt.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(ot(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 _e(J().m(function c(){var l,d,f,h,D,m,y,E,g,b,F;return J().w(function(_){for(;;)switch(_.n){case 0:if(!a.hooks){_.n=2;break}return _.n=1,a.hooks.preprocess(n);case 1:D=_.v,_.n=3;break;case 2:D=n;case 3:if(l=D,!a.hooks){_.n=5;break}return _.n=4,a.hooks.provideLexer();case 4:m=_.v,_.n=6;break;case 5:m=e?Rt.lex:Rt.lexInline;case 6:return y=m,_.n=7,y(l,a);case 7:if(d=_.v,!a.hooks){_.n=9;break}return _.n=8,a.hooks.processAllTokens(d);case 8:E=_.v,_.n=10;break;case 9:E=d;case 10:if(f=E,!a.walkTokens){_.n=11;break}return _.n=11,Promise.all(t.walkTokens(f,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?Mt.parse:Mt.parseInline;case 14:return b=g,_.n=15,b(f,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?Rt.lex:Rt.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?Mt.parse:Mt.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>"+Wt(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}}]),yn=new W0;function ze(e,t){return yn.parse(e,t)}function Xu(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}ze.options=ze.setOptions=function(e){return yn.setOptions(e),ze.defaults=yn.defaults,nc(ze.defaults),ze},ze.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},ze.defaults=tr,ze.use=function(){return yn.use.apply(yn,arguments),ze.defaults=yn.defaults,nc(ze.defaults),ze},ze.walkTokens=function(e,t){return yn.walkTokens(e,t)},ze.parseInline=yn.parseInline,ze.Parser=Mt,ze.parser=Mt.parse,ze.Renderer=Fa,ze.TextRenderer=Oo,ze.Lexer=Rt,ze.lexer=Rt.lex,ze.Tokenizer=ya,ze.Hooks=Kr,ze.parse=ze,ze.options,ze.setOptions,ze.use,ze.walkTokens,ze.parseInline,Mt.parse,Rt.lex;var xi=new ze.Renderer;xi.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:Xu(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  `)},xi.link=function(e){var t=e.href,n=e.title,r=e.text,u=n?' title="'.concat(Xu(n),'"'):"",a=t?Xu(t):"",i=Xu(r);return'<a href="'.concat(a,'"').concat(u,' target="_blank" rel="noopener noreferrer">').concat(i,"</a>")};var sa=Ol(function(e){var t=e.content,n=e.copyButtonText,r=e.copyButtonCopiedText,u=e.isStreaming,a=Bt(function(){return ze.parse(t,{gfm:!0,breaks:!0,renderer:xi})},[t]),i=gr(null);return $t(function(){var o=i.current;if(o)return Array.from(o.querySelectorAll(".DocSearch-CodeSnippet-CopyButton")).forEach(function(c){var l=c.querySelector(".DocSearch-CodeSnippet-CopyButton-Label");l&&(l.textContent=n),c.classList.remove("DocSearch-CodeSnippet-CopyButton--copied")}),o.addEventListener("click",s),function(){o.removeEventListener("click",s)};function s(c){var l,d=c.target.closest(".DocSearch-CodeSnippet-CopyButton");if(d){var f=(l=d.getAttribute("data-code"))!==null&&l!==void 0?l:"";navigator.clipboard.writeText(decodeURIComponent(f)).catch(function(){});var h=d.querySelector(".DocSearch-CodeSnippet-CopyButton-Label");if(h){d.classList.add("DocSearch-CodeSnippet-CopyButton--copied");var D=n;h.textContent=r,setTimeout(function(){d.classList.remove("DocSearch-CodeSnippet-CopyButton--copied"),h.textContent=D},1500)}}}},[a,n,r]),p.createElement("div",{ref:i,className:"DocSearch-Markdown-Content ".concat(u?"DocSearch-Markdown-Content--streaming":""),dangerouslySetInnerHTML:{__html:a}})});function K0(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(xu,{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(xu,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),p.createElement("span",null,a," ",'"'.concat(t.input.query||"",'" ...')));case"output-available":var o,s=t.type==="tool-searchIndex"?t.output.query:t.input.query,c=t.type==="tool-searchIndex"?(o=t.output.hits)===null||o===void 0?void 0:o.length:t.output.nbHits;return p.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--Result"},p.createElement(Ru,null),p.createElement("span",null,i," ",r?p.createElement("span",{role:"button",tabIndex:0,className:"DocSearch-AskAiScreen-MessageContent-Tool-Query",onKeyDown:function(l){l.key!=="Enter"&&l.key!==" "||(l.preventDefault(),r(s||""))},onClick:function(){return r(s||"")}}," ",'"',s||"",'"'):p.createElement("span",{className:"DocSearch-AskAiScreen-MessageContent-Tool-Query"},' "',s||"",'"')," ","found ",c||0," results"));default:return null}}function uf(e){return e.replace(/<[^>]*>/g,"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}sa.displayName="MemoizedMarkdown";var J0=function(e,t){var n=t[0].parts.find(function(u){return u.type==="text"}),r=n!=null&&n.text?uf(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:""}},dc=function(e){return e?.parts.find(function(t){return t.type==="text"})};function Bo(e){var t;return e&&((t=e.message)===null||t===void 0?void 0:t.includes("AI-217"))||!1}var Q0=["translations"];function G0(e){var t=e.disclaimerText;return p.createElement("p",{className:"DocSearch-AskAiScreen-Disclaimer"},t)}function Y0(e){var t,n,r,u=e.exchange,a=e.askAiError,i=e.isLastExchange,o=e.loadingStatus,s=e.onSearchQueryClick,c=e.translations,l=e.conversations,d=e.onFeedback,f=e.agentStudio,h=u.userMe
82ssage,D=u.assistantMessage,m=c.stoppedStreamingText,y=m===void 0?"You stopped this response":m,E=c.errorTitleText,g=E===void 0?"Chat error":E,b=c.preToolCallText,F=b===void 0?"Searching...":b,_=c.afterToolCallText,C=_===void 0?"Searched for":_,k=c.duringToolCallText,A=k===void 0?"Searching...":k,j=Bo(a),B=Bt(function(){return dc(D)},[D]),S=Bt(function(){return dc(h)},[h]),O=p.useMemo(function(){return w=D,N=[],R=new Set,w?(w.parts.forEach(function(M){if(M.type==="text"&&M.text.length!==0){var W,U=M.text.replace(/```[\s\S]*?```/g,"").replace(/`[^`]*`/g,""),oe=V(U.matchAll(/\[([^\]]*)\]\(([^)]+)\)/g));try{for(oe.s();!(W=oe.n()).done;){var he=W.value,fe=he[1].trim(),de=he[2];R.has(de)||(R.add(de),N.push({url:de,title:fe||void 0}))}}catch(De){oe.e(De)}finally{oe.f()}var H,G=V(U.matchAll(new RegExp('(?<!\\]\\()https?:\\/\\/[^\\s<>"{}|\\\\^`[\\]]+',"g")));try{for(G.s();!(H=G.n()).done;){var re=H.value[0].replace(/[.,;:!?]+$/,"");R.has(re)||(R.add(re),N.push({url:re}))}}catch(De){G.e(De)}finally{G.f()}}}),N):[];var w,N,R},[D]),P=p.useMemo(function(){return(function(w){for(var N=[],R=0;R<w.length;R++){var M=w[R];if(M.type==="tool-searchIndex"&&M.state==="output-available"){for(var W=[],U=R;U<w.length;){var oe=w[U];if(oe.type!=="tool-searchIndex"||oe.state!=="output-available")break;var he,fe,de=((he=(fe=oe.output)===null||fe===void 0?void 0:fe.query)!==null&&he!==void 0?he:"").trim();de&&de.length>0&&W.push(de),U++}W.length>1?N.push({type:"aggregated-tool-call",queries:W}):W.length===1&&N.push(M),R=U-1}else N.push(M)}return N})(D?.parts||[])},[D]),x=((t=h.metadata)===null||t===void 0?void 0:t.stopped)||(D==null||(n=D.metadata)===null||n===void 0?void 0:n.stopped),z=!x&&(!i||i&&o==="ready"&&!!D),I=["submitted","streaming"].includes(o)&&i&&!P.some(function(w){return w.type!=="step-start"});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=S?.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&&!j&&p.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent DocSearch-AskAiScreen-Error"},p.createElement(f0,null),p.createElement("div",{className:"DocSearch-AskAiScreen-Error-Content"},p.createElement("h4",{className:"DocSearch-AskAiScreen-Error-Title"},g),p.createElement(sa,{content:a.message,copyButtonText:"",copyButtonCopiedText:"",isStreaming:!1}))),I&&p.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Reasoning"},p.createElement("span",{className:"shimmer"},c.thinkingText||"Thinking...")),P.map(function(w,N){var R=N;return typeof w=="string"?p.createElement(sa,{key:R,content:w,copyButtonText:c.copyButtonText||"Copy",copyButtonCopiedText:c.copyButtonCopiedText||"Copied!",isStreaming:o==="streaming"}):w.type==="aggregated-tool-call"?p.createElement(C0,{key:R,queries:w.queries,translations:c,onSearchQueryClick:s}):w.type==="reasoning"&&w.state==="streaming"?p.createElement("div",{key:R,className:"DocSearch-AskAiScreen-MessageContent-Reasoning shimmer"},p.createElement(xu,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),p.createElement("span",{className:"shimmer"},"Reasoning...")):w.type==="text"?p.createElement(sa,{key:R,content:w.text,copyButtonText:c.copyButtonText||"Copy",copyButtonCopiedText:c.copyButtonCopiedText||"Copied!",isStreaming:w.state==="streaming"}):w.type==="tool-searchIndex"||w.type==="tool-algolia_search_index"?p.createElement(K0,{key:R,translations:{preToolCallText:F,searchingText:A,toolCallResultText:C},part:w,onSearchQueryClick:s}):null})),x&&p.createElement("p",{className:"DocSearck-AskAiScreen-MessageContent-Stopped"},y)),p.createElement("div",{className:"DocSearch-AskAiScreen-Answer
82-Footer"},p.createElement(X0,{id:h?.id||u.id,showActions:z,latestAssistantMessageContent:B?.text||null,translations:c,conversations:l,agentStudio:f,onFeedback:d}))),O.length>0?p.createElement(eh,{urlsToDisplay:O,relatedSourcesText:c.relatedSourcesText}):null)}function X0(e){var t=e.id,n=e.showActions,r=e.latestAssistantMessageContent,u=e.translations,a=e.conversations,i=e.onFeedback,o=e.agentStudio,s=p.useMemo(function(){var j,B,S=(j=a.getOne)===null||j===void 0?void 0:j.call(a,t);return(B=S?.feedback)!==null&&B!==void 0?B:null},[a,t]),c=Be(p.useState(s),2),l=c[0],d=c[1],f=Be(p.useState(!1),2),h=f[0],D=f[1],m=Be(p.useState(null),2),y=m[0],E=m[1],g=(function(){var j=_e(J().m(function B(S){var O;return J().w(function(P){for(;;)switch(P.p=P.n){case 0:if(!h){P.n=1;break}return P.a(2);case 1:return E(null),D(!0),P.p=2,P.n=3,i?.(t,S==="like"?1:0);case 3:d(S),P.n=5;break;case 4:P.p=4,O=P.v,E(O);case 5:return P.p=5,D(!1),P.f(5);case 6:return P.a(2)}},B,null,[[2,4,5,6]])}));return function(B){return j.apply(this,arguments)}})(),b=u.likeButtonTitle,F=b===void 0?"Like":b,_=u.dislikeButtonTitle,C=_===void 0?"Dislike":_,k=u.thanksForFeedbackText,A=k===void 0?"Thanks for your feedback!":k;return n&&r?p.createElement("div",{className:"DocSearch-AskAiScreen-Actions"},!o&&(l===null?p.createElement(p.Fragment,null,h?p.createElement(xu,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}):p.createElement(p.Fragment,null,p.createElement(uh,{title:F,onClick:function(){return g("like")}}),p.createElement(ah,{title:C,onClick:function(){return g("dislike")}})),y&&p.createElement("p",{className:"DocSearch-AskAiScreen-FeedbackText"},y.message||"An error occured")):p.createElement("p",{className:"DocSearch-AskAiScreen-FeedbackText DocSearch-AskAiScreen-FeedbackText--visible"},A)),p.createElement(rh,{translations:u,onClick:function(){return navigator.clipboard.writeText(r)}})):null}function eh(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(nh,null),p.createElement("span",null,r.title||r.url))})))}function th(e){var t=e.translations,n=t===void 0?{}:t,r=ft(e,Q0),u=n.disclaimerText,a=u===void 0?"Answers are generated with AI which can make mistakes. Verify responses.":u,i=n.threadDepthExceededMessage,o=i===void 0?"This conversation is now closed to keep responses accurate.":i,s=n.startNewConversationButtonText,c=s===void 0?"Start a new conversation":s,l=r.messages,d=r.askAiError,f=r.status,h=Bt(function(){return f==="error"&&Bo(d)},[f,d]),D=Bt(function(){for(var E=[],g=0;g<l.length;g++)if(l[g].role==="user"){var b,F=l[g],_=((b=l[g+1])===null||b===void 0?void 0:b.role)==="assistant"?l[g+1]:null;E.push({id:F.id,userMessage:F,assistantMessage:_}),_&&g++}return h&&E.length>0&&(E[E.length-1].assistantMessage||E.pop()),E},[l,h]),m=function(E){r.onAskAiToggle(!1),r.setQuery(E)},y=h&&l.some(function(E){return E.role==="assistant"});return p.createElement("div",{className:"DocSearch-AskAiScreen DocSearch-AskAiScreen-Container"},y&&p.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent DocSearch-AskAiScreen-Error DocSearch-AskAiScreen-Error--ThreadDepth"},p.createElement("div",{className:"DocSearch-AskAiScreen-Error-Content"},p.createElement("p",null,o," ",p.createElement("button",{type:"button",className:"DocSearch-ThreadDepthError-Link",onClick:r.onNewConversation},c)," ","to continue."))),p.createElement(G0,{disclaimerText:a}),p.createElement("div",{className:"DocSearch-AskAiScreen-Body"},p.createElement("div",{className:"DocSearch-AskAiScreen-ExchangesList"},D.slice().reverse().map(function(E,g){return p.createElement(Y0,{key:E.id,exchange:E,askAiError:r.askAiError,isLastExchange:g===0,loadingStatus:r.status,translations:n,conversations:r.conversations,agentStudio:r.agentStudio,onSearchQueryClick:m,onFeedback:r.onFeedback})}))))}function nh(){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 rh(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=Be(er(!1),2),s=o[0],c=o[1];return $t(function(){if(s){var l=setTimeout(function(){c(!1)},1500);return function(){return clearTimeout(l)}}},[s]),p.createElement("button",{type:"button",className:"DocSearch-AskAiScreen-ActionButton DocSearch-AskAiScreen-CopyButton ".concat(s?"DocSearch-AskAiScreen-CopyButton--copied":""),disabled:s,title:s?
82i: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 uh(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 ah(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 ih=["hit","attribute","tagName"];function pc(e,t){return t.split(".").reduce(function(n,r){return n!=null&&n[r]?n[r]:null},e)}function cr(e){var t=e.hit,n=e.attribute,r=e.tagName;return wt(r===void 0?"span":r,v(v({},ft(e,ih)),{},{dangerouslySetInnerHTML:{__html:pc(t,"_snippetResult.".concat(n,".value"))||pc(t,n)}}))}var oh=["item","getItemProps","onItemClick","translations","collection"];function yu(e){var t=p.useMemo(function(){return e.title.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'")},[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(ch,Ke({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"},t),p.createElement("ul",e.getListProps({source:e.collection.source}),e.collection.items.map(function(n,r){return p.createElement(sh,Ke({key:[e.title,n.objectID].join(":"),item:n,index:r},e))})))):null}function sh(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",Ke({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(cr,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&p.createElement(cr,{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"},uf(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(cr,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),p.createElement(cr,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),t.type==="content"&&p.createElement("div",{className:"DocSearch-Hit-content-wrapper"},p.createElement(cr,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),p.createElement(cr,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),u({item:t}))))}function ch(e){var t=e.item,n=e.getItemProps,r=e.onItemClick,u=e.translations,a=e.collection,i=ft(e,oh),o=u||{},s=o.askAiPlaceholder,c=s===void 0?"Ask AI: ":s,l=o.noResultsAskAiPlaceholder,d=l===void 0?"Didn't find it in the docs? Ask AI to help: ":l,f=i.state.collections.length===1?d:c;return p.createElement("li",Ke({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"}
82,p.createElement(_o,null)),p.createElement("div",{className:"DocSearch-Hit-AskAIButton-title"},p.createElement("span",{className:"DocSearch-Hit-AskAIButton-title-highlight"},f),p.createElement("mark",{className:"DocSearch-Hit-AskAIButton-title-query"},String(t.query||""))))))}var lh=["onAskAiToggle"];function fh(e){var t=e.onAskAiToggle,n=ft(e,lh),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(yu,Ke({},n,{key:r.source.sourceId,title:"",translations:n.translations,collection:r,renderIcon:function(){return p.createElement("div",{className:"DocSearch-Hit-icon"},p.createElement(_o,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(Du,null)))}})))}function dh(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(g0,null)),p.createElement("p",{className:"DocSearch-Title"},u),p.createElement("p",{className:"DocSearch-Help"},i))}function ph(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(l){return p.createElement("button",{key:l.objectID,type:"button",className:"DocSearch-NewConversationScreen-SuggestedQuestion",onClick:function(){return a(l)}},l.question)})))}var hh=["translations"];function hc(e){var t=e.translations,n=t===void 0?{}:t,r=ft(e,hh),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,l=n.reportMissingResultsLinkText,d=l===void 0?"Let us know.":l,f=r.state.context.searchSuggestions;return p.createElement("div",{className:"DocSearch-NoResults ".concat(r.canHandleAskAi?"DocSearch-NoResults--withAskAi":"")},p.createElement("div",{className:"DocSearch-Screen-Icon"},p.createElement(y0,null)),p.createElement("p",{className:"DocSearch-Title"},a,' "',p.createElement("strong",null,r.state.query),'"'),f&&f.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"},f.slice(0,3).reduce(function(h,D){return[].concat(K(h),[p.createElement("p",{key:D},p.createElement(Ru,{size:16}),p.createElement("button",{className:"DocSearch-Prefill",key:D,type:"button",onClick:function(){r.setQuery(D.toLowerCase()+" "),r.refresh(),r.inputRef.current.focus()}},D))])},[]))),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"},d)))}var vh=["translations"];function mh(e){var t=e.translations,n=t===void 0?{}:t,r=ft(e,vh);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]);
82return p.createElement(yu,Ke({},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(h0,{type:s.type})))},renderAction:function(){return p.createElement("div",{className:"DocSearch-Hit-action"},p.createElement(d0,null))}}))}),r.resultsFooterComponent&&p.createElement("section",{className:"DocSearch-HitsFooter"},p.createElement(r.resultsFooterComponent,{state:r.state})))}var Dh=["translations"];function gh(e){var t=e.translations,n=t===void 0?{}:t,r=ft(e,Dh),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,l=n.favoriteSearchesTitle,d=l===void 0?"Favorite":l,f=n.removeFavoriteSearchButtonTitle,h=f===void 0?"Remove this search from favorites":f,D=n.recentConversationsTitle,m=D===void 0?"Recent conversations":D,y=n.removeRecentConversationButtonTitle,E=y===void 0?"Remove this conversation from history":y;return p.createElement("div",{className:"DocSearch-Dropdown-Container"},p.createElement(yu,Ke({},r,{title:a,collection:r.state.collections[0],renderIcon:function(){return p.createElement("div",{className:"DocSearch-Hit-icon"},p.createElement(l0,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(Du,null))))}})),p.createElement(yu,Ke({},r,{title:d,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(Du,null)))}})),p.createElement(yu,Ke({},r,{title:m,collection:r.state.collections[2],renderIcon:function(){return p.createElement("div",{className:"DocSearch-Hit-icon"},p.createElement(_o,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(Du,null)))}})))}var yh=["translations"],Fh=p.memo(function(e){var t,n=e.translations,r=n===void 0?{}:n,u=ft(e,yh);return u.canHandleAskAi&&u.isAskAiActive&&u.askAiState==="conversation-history"?p.createElement(fh,u):u.canHandleAskAi&&u.isAskAiActive&&u.askAiState==="new-conversation"?p.createElement(ph,{translations:r?.newConversation,selectSuggestedQuestion:u.selectSuggestedQuestion,suggestedQuestions:u.suggestedQuestions}):u.isAskAiActive&&u.canHandleAskAi?p.createElement(th,Ke({},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(dh,{translations:r?.errorScreen}):u.state.query?u.hasCollections||u.canHandleAskAi?p.createElement(p.Fragment,null,p.createElement(mh,Ke({},u,{translations:r?.resultsScreen})),u.canHandleAskAi&&u.state.collections.length===1&&p.createElement(hc,Ke({},u,{translations:r?.noResultsScreen}))):p.createElement(hc,Ke({},u,{translations:r?.noResultsScreen})):p.createElement(gh,Ke({},u,{hasCollections:u.hasCollections,translations:r?.startScreen}))},function(e,t){return t.state.status==="loading"||t.state.status==="stalled"});function Eh(e){var t=e.size,n=t===void 0?20:t,r=e.color,u=r===void 0?"currentColor":r;
82return 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 _h=["children","className","onClick"],ca=p.createContext({open:!1,setOpen:function(e){}});function Cn(e){var t=e.children,n=Be(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(ca.Provider,{value:{open:r,setOpen:u}},p.createElement("div",{ref:a,className:"DocSearch-Menu"},t))}function bh(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)}Cn.Trigger=function(e){var t=e.children,n=e.className,r=n===void 0?"":n,u=e.disabled,a=p.useContext(ca),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)},Cn.Content=function(e){var t=e.children,n=p.useContext(ca).open;return p.createElement("div",{className:"DocSearch-Menu-content".concat(n?" open":"")},t)},Cn.Item=function(e){var t=e.children,n=e.className,r=n===void 0?"":n,u=e.onClick,a=ft(e,_h),i=p.useContext(ca).setOpen;return p.createElement("button",Ke({type:"button",className:"DocSearch-Menu-item ".concat(r),onClick:function(o){u&&(u(o),i(!1))}},a),t)};var Ch=["translations","askAiState","onAskAiToggle","setAskAiState"];function kh(e){var t=e.translations,n=t===void 0?{}:t,r=e.askAiState,u=e.onAskAiToggle,a=e.setAskAiState,i=ft(e,Ch),o=n.clearButtonTitle,s=o===void 0?"Clear":o,c=n.clearButtonAriaLabel,l=c===void 0?"Clear the query":c,d=n.closeButtonText,f=d===void 0?"Close":d,h=n.closeButtonAriaLabel,D=h===void 0?"Close":h,m=n.searchInputLabel,y=m===void 0?"Search":m,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,C=_===void 0?"Answering...":_,k=n.newConversationPlaceholder,A=k===void 0?"Ask a question":k,j=n.conversationHistoryTitle,B=j===void 0?"My conversation history":j,S=n.startNewConversationText,O=S===void 0?"Start a new conversation":S,P=n.viewConversationHistoryText,x=P===void 0?"Conversation history":P,z=n.threadDepthErrorPlaceholder,I=z===void 0?"Conversation limit reached":z,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 N=p.useMemo(function(){var Y=i.state.collections[2];return!!Y&&Y.items.length>0},[i.state.collections]),R=i.getInputProps({inputElement:i.inputRef.current,autoFocus:i.autoFocus,maxLength:512}),M=new Set(["ArrowUp","ArrowDown","Enter"]),W=R.onKeyDown,U=R.onChange,oe=i.askAiStatus==="streaming"||i.askAiStatus==="submitted",he=i.state.status==="stalled",fe=i.isAskAiActive&&r!=="conversation-history",de=i.isThreadDepthError||!1,H=i.placeholder;r==="new-conversation"&&(H=A),de&&i.isAskAiActive&&(H=I);var G=null;oe&&(G=C),r==="conversation-history"&&(G=B),p.useEffect(function(){i.askAiStatus!=="streaming"&&i.askAiStatus!=="submitted"&&i.inputRef.current&&i.inputRef.current.focus()},[i.askAiStatus,i.inputRef]);var re=v(v({},R),{},{enterKeyHint:i.isAskAiActive?"enter":"search",onKeyDown:function(Y){if(i.isAskAiActive&&M.has(Y.key))return Y.key==="Enter"&&!oe&&i.state.query&&i.onAskAgain(i.state.query),Y.preventDefault(),void Y.stopPropagation();W?.(Y)},onChange:function(Y){if(i.isAskAiActive)return i.setQuery(Y.currentTarget.value),Y.preventDefault(),void Y.stopPropagation();U?.(Y)},disabled:oe||de&&i.isAskAiActive}),De=p.useCallback(function(){if(!de)return r==="conversation-history"?(u(!0),void a("initial")):void u(!1);i.onNewConversation()},[r,de,u,a,i]);return p.createElement(p.Fragment,null,p.createElement("form",{className:"DocSearch-
82Form",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:De},p.createElement(Eh,null))):p.createElement(p.Fragment,null,he&&p.createElement("div",{className:"DocSearch-LoadingIndicator"},p.createElement(xu,null)),!he&&p.createElement("label",Ke({className:"DocSearch-MagnifierLabel"},i.getLabelProps()),p.createElement(Ru,null),p.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},y))),G&&p.createElement(bh,{heading:G,shimmer:oe}),p.createElement("input",Ke({className:"DocSearch-Input",ref:i.inputRef},re,{placeholder:H,hidden:!!G})),p.createElement("div",{className:"DocSearch-Actions"},p.createElement("button",{className:"DocSearch-Clear",type:"reset","aria-label":l,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"}),oe&&p.createElement(p.Fragment,null,p.createElement("button",{type:"button",className:"DocSearch-Action DocSearch-StopStreaming",onClick:i.onStopAskAiStreaming},p.createElement(D0,null)),p.createElement("div",{className:"DocSearch-Divider"})),fe&&p.createElement(p.Fragment,null,p.createElement(Cn,null,p.createElement(Cn.Trigger,{className:"DocSearch-Action"},p.createElement(F0,null)),p.createElement(Cn.Content,null,p.createElement(Cn.Item,{onClick:i.onNewConversation},p.createElement(_0,null),O),N&&p.createElement(Cn.Item,{onClick:i.onViewConversationHistory},p.createElement(E0,null),x))),p.createElement("div",{className:"DocSearch-Divider"})),p.createElement("button",{type:"button",title:f,className:"DocSearch-Action DocSearch-Close","aria-label":D,onClick:i.onClose},p.createElement(Du,null)))))}function af(){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 of(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{af(),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 Ah=["_highlightResult","_snippetResult"];function vc(e){var t=e.key,n=e.limit,r=n===void 0?5:n,u=of(t),a=u.getItem().slice(0,r);return{add:function(i){var o=i;o._highlightResult,o._snippetResult;var s=ft(o,Ah),c=a.findIndex(function(l){return l.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}}}function mc(e){var t=e.key,n=e.limit,r=n===void 0?5:n,u=of(t),a=u.getItem().slice(0,r);return{add:function(i){var o=i.objectID,s=i.query,c=a.findIndex(function(l){return l.objectID===o||l.query===s});c>-1?a[c]=i:(a.unshift(i),a=a.slice(0,r)),u.setItem(a)},addFeedback:function(i,o){var s=a.find(function(l){var d;return(d=l.messages)===null||d===void 0?void 0:d.some(function(f){return f.id===i})});if(s&&s.messages){var c=s.messages.find(function(l){return l.id===i});c&&(c.feedback=o,u.setItem(a))}},getOne:function(i){var o,s=a.find(function(c){var l;return(l=c.messages)===null||l===void 0?void 0:l.some(function(d){return d.id===i})});return s==null||(o=s.messages)===null||o===void 0?void 0:o.find(function(c){return c.id===i})},getAll:function(){return a},remove:function(i){a=a.filter(function(o){return o.objectID!==i.objectID}),u.setItem(a)},getConversation:function(i){var o=a.find(function(s){var c;return(c=s.messages)===null||c===void 0?void 0:c.some(function(l){return l.id===i})});if(o&&o.messages)return o}}}var sf,cf="vercel.ai.error",wh=Symbol.for(cf),Sh=(function(){function e(t){var n,r=t.name,u=t.message,a=t.cause;return qt(this,e),(n=Yn(this,e,[u]))[sf]=!0,n.name=r,n.cause=a,n}return Xn(e,vi(Error)),Ut(e,null,[{key:"isInstance",value:function(t){return e.hasMarker(t,cf)}},{key:"hasMarker",value:function(t,n){var r=Symbol.for(n);return t!=null&&ee(t)=="object"&&r in t&&typeof t[r]=="boolean"&&t[r]===!0}}])})();sf=wh;var On=Sh;function lf(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var ff,df="AI_InvalidArgumentError",pf="vercel.ai.error.".concat(df),xh=Symbol.for(pf),Oh=(function(){function e(t){var n,r=t.message,u=t.cause,a=t.argument;return qt(this,e),(n=Yn(this,e,[{name:df,message:r,cause:u}]))[ff]=!0,n.argument=a,n}return Xn(e,On),Ut(e,null,[{key:"isInstance",value:function(t){return On.hasMarker(t,pf)}}])})();ff=xh;var hf,vf="AI_JSONParseError",mf="vercel.ai.error.".concat(vf),Bh=Symbol.for(mf),Dc=(function(){function e(t){var n,r=t.text,u=t.cause;return qt(this,e),(n=Yn(this,e,[{name:vf,message:"JSON parsing failed: Text: ".concat(r,`.
83Error message: `).concat(lf(u)),cause:u}]))[hf]=!0,n.text=r,n}return Xn(e,On),Ut(e,null,[{key:"isInstance",value:function(t){return On.hasMarker(t,mf)}}])})();hf=Bh;var Df,gf="AI_TypeValidationError",yf="vercel.ai.error.".concat(gf),Ih=Symbol.for(yf);Df=Ih;var Ea=(function(){function e(t){var n,r=t.value,u=t.cause;return qt(this,e),(n=Yn(this,e,[{name:gf,message:"Type validation failed: Value: ".concat(JSON.stringify(r),`.
84Error message: `).concat(lf(u)),cause:u}]))[Df]=!0,n.value=r,n}return Xn(e,On),Ut(e,null,[{key:"isInstance",value:function(t){return On.hasMarker(t,yf)}},{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})}}])})(),gc=(function(){function e(t,n){var r;return ae(this,e),(r=me(this,e,[t])).name="ParseError",r.type=n.type,r.field=n.field,r.value=n.value,r.line=n.line,r}return pe(e,xn(Error)),ie(e)})();function oi(e){}var Th=(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 ae(this,e),me(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,l=c===void 0?oi:c,d=o.onError,f=d===void 0?oi:d,h=o.onRetry,D=h===void 0?oi:h,m=o.onComment,y="",E=!0,g="",b="";function F(C){if(C==="")return g.length>0&&l({id:s,event:b||void 0,data:g.endsWith(`
85`)?g.slice(0,-1):g}),s=void 0,g="",void(b="");if(C.startsWith(":"))m&&m(C.slice(C.startsWith(": ")?2:1));else{var k=C.indexOf(":");if(k===-1)_(C,"",C);else{var A=C.slice(0,k),j=C[k+1]===" "?2:1;_(A,C.slice(k+j),C)}}}function _(C,k,A){switch(C){case"event":b=k;break;case"data":g="".concat(g).concat(k,`
86`);break;case"id":s=k.includes("\0")?void 0:k;break;case"retry":/^\d+$/.test(k)?D(parseInt(k,10)):f(new gc('Invalid `retry` value: "'.concat(k,'"'),{type:"invalid-retry",value:k,line:A}));break;default:f(new gc('Unknown field "'.concat(C.length>20?"".concat(C.slice(0,20),"…"):C,'"'),{type:"unknown-field",field:C,value:k,line:A}))}}return{feed:function(C){var k,A=E?C.replace(/^\xEF\xBB\xBF/,""):C,j=(function(x){for(var z=[],I="",w=0;w<x.length;){var N=x.indexOf("\r",w),R=x.indexOf(`
87`,w),M=-1;if(N!==-1&&R!==-1?M=Math.min(N,R):N!==-1?M=N===x.length-1?-1:N:R!==-1&&(M=R),M===-1){I=x.slice(w);break}var W=x.slice(w,M);z.push(W),x[(w=M+1)-1]==="\r"&&x[w]===`
88`&&w++}return[z,I]})("".concat(y).concat(A)),B=Be(j,2),S=B[0],O=B[1],P=V(S);try{for(P.s();!(k=P.n()).done;)F(k.value)}catch(x){P.e(x)}finally{P.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 pe(e,xn(TransformStream)),ie(e)})();function T(e,t,n){var r;function u(o,s){var c,l,d;for(var f in Object.defineProperty(o,"_zod",{value:(c=o._zod)!==null&&c!==void 0?c:{},enumerable:!1}),(l=(d=o._zod).traits)!==null&&l!==void 0||(d.traits=new Set),o._zod.traits.add(e),t(o,s),i.prototype)f in o||Object.defineProperty(o,f,{value:i.prototype[f].bind(o)});o._zod.constr=i,o._zod.def=s}var a=(function(o){function s(){return ae(this,s),me(this,s,arguments)}return pe(s,o),ie(s)})((r=n?.Parent)!==null&&r!==void 0?r:Object);function i(o){var s,c,l=n!=null&&n.Parent?new a:this;u(l,o),(s=(c=l._zod).deferred)!==null&&s!==void 0||(c.deferred=[]);var d,f=V(l._zod.deferred);try{for(f.s();!(d=f.n()).done;)(0,d.value)()}catch(h){f.e(h)}finally{f.f()}return l}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 yr=(function(){function e(){return ae(this,e),me(this,e,["Encountered Promise during synchronous parse. Use .parseAsync() instead."])}return pe(e,xn(Error)),ie(e)})(),Ff=(function(){function e(t){var n;return ae(this,e),(n=me(this,e,["Encountered unidirectional transform during encode: ".concat(t)])).name="ZodEncodeError",n}return pe(e,xn(Error)),ie(e)})(),Ef={};function Bn(e){return Ef}function _f(e){var t=Object.values(e).filter(function(r){return typeof r=="number"}),n=Object.entries(e).filter(function(r){var u=Be(r,2),a=u[0];return u[1],t.indexOf(+a)===-1}).map(function(r){var u=Be(r,2);return u[0],u[1]});return n}function Oi(e,t){return typeof t=="bigint"?t.toString():t}function $a(e){return{get value(){var t=e();return Object.defineProperty(this,"value",{value:t}),t}}}function Or(e){return e==null}function Io(e){var t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}var yc=Symbol("evaluating");function Te(e,t,n){var r=void 0;Object.defineProperty(e,t,{get:function(){if(r!==yc)return r===void 0&&(r=yc,r=n()),r},set:function(u){Object.defineProperty(e,t,{value:u})},configurable:!0})}function qn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Hn(){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 Fc(e){return JSON.stringify(e)}var bf="captureStackTrace"in Error?Error.captureStackTrace:function(){};function Ou(e){return ot(e)==="object"&&e!==null&&!Array.isArray(e)}var Ph=$a(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 kr(e){if(Ou(e)===!1)return!1;var t=e.constructor;if(t===void 0)return!0;var n=t.prototype;return Ou(n)!==!1&&Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")!==!1}function Ec(e){return kr(e)?v({},e):Array.isArray(e)?K(e):e}var jh=new Set(["string","number","symbol"]);function Ar(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fn(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 te(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 Nh={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 Dr(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 Jn(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 ea(e){return typeof e=="string"?e:e?.message}function In(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,l,d,f,h,D=(a=(i=(o=(s=ea((c=e.inst)===null||c===void 0||(c=c._zod.def)===null||c===void 0||(l=c.error)===null||l===void 0?void 0:l.call(c,e)))!==null&&s!==void 0?s:ea(t==null||(d=t.error)===null||d===void 0?void 0:d.call(t,e)))!==null&&o!==void 0?o:ea((f=n.customError)===null||f===void 0?void 0:f.call(n,e)))!==null&&i!==void 0?i:ea((h=n.localeError)===null||h===void 0?void 0:h.call(n,e)))!==null&&a!==void 0?a:"Invalid input";u.message=D}return delete u.inst,delete u.continue,t!=null&&t.reportInput||delete u.input,u}function To(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Po(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Bu(){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 Cf=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,Oi,2),Object.defineProperty(e,"toString",{value:function(){return e.message},enumerable:!1})},kf=T("$ZodError",Cf),Af=T("$ZodError",Cf,{Parent:Error}),jo=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 yr;if(i.issues.length){var o,s=new((o=u?.Err)!==null&&o!==void 0?o:e)(i.issues.map(function(c){return In(c,a,Bn())}));throw bf(s,u?.callee),s}return i.value}},No=function(e){return(function(){var t=_e(J().m(function n(r,u,a,i){var o,s,c,l;return J().w(function(d){for(;;)switch(d.n){case 0:if(o=a?Object.assign(a,{async:!0}):{async:!0},!((s=r._zod.run({value:u,issues:[]},o))instanceof Promise)){d.n=2;break}return d.n=1,s;case 1:s=d.v;
88case 2:if(!s.issues.length){d.n=3;break}throw l=new((c=i?.Err)!==null&&c!==void 0?c:e)(s.issues.map(function(f){return In(f,o,Bn())})),bf(l,i?.callee),l;case 3:return d.a(2,s.value)}},n)}));return function(n,r,u,a){return t.apply(this,arguments)}})()},qa=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 yr;return a.issues.length?{success:!1,error:new(e??kf)(a.issues.map(function(i){return In(i,u,Bn())}))}:{success:!0,data:a.value}}},zh=qa(Af),Ua=function(e){return(function(){var t=_e(J().m(function n(r,u,a){var i,o;return J().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 In(c,i,Bn())}))}:{success:!0,data:o.value})}},n)}));return function(n,r,u){return t.apply(this,arguments)}})()},Rh=Ua(Af),Mh=/^[cC][^\s-]{8,}$/,Zh=/^[0-9a-z]+$/,Lh=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,$h=/^[0-9a-vA-V]{20}$/,qh=/^[A-Za-z0-9]{27}$/,Uh=/^[a-zA-Z0-9_-]{21}$/,Hh=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Vh=/^([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})$/,_c=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)$/},Wh=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Kh=/^(?:(?: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])$/,Jh=/^(([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}|:))$/,Qh=/^((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])$/,Gh=/^(([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])$/,Yh=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,bc=/^[A-Za-z0-9_-]*$/,Xh=/^(?=.{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])?)*\.?$/,ev=/^\+(?:[0-9]){6,14}[0-9]$/,wf="(?:(?:\\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])))",tv=new RegExp("^".concat(wf,"$"));function Sf(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 nv=/^-?\d+$/,rv=/^-?\d+(?:\.\d+)?/,uv=/^(?:true|false)$/i,av=/^null$/i,iv=/^[^A-Z]*$/,ov=/^[^a-z]*$/,st=T("$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=[])}),xf={number:"number",bigint:"bigint",object:"date"},Of=T("$ZodCheckLessThan",function(e,t){st.init(e,t);var n=xf[ot(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})}}),Bf=T("$ZodCheckGreaterThan",function(e,t){st.init(e,t);var n=xf[ot(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})}}),sv=T("$ZodCheckMultipleOf",function(e,t){st.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(ot(n.value)!==ot(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)}
88)(n.value,t.value)===0)||n.issues.push({origin:ot(n.value),code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),cv=T("$ZodCheckNumberFormat",function(e,t){var n;st.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=Be(Nh[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=nv)}),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})}}),lv=T("$ZodCheckMaxSize",function(e,t){var n,r;st.init(e,t),(n=(r=e._zod.def).when)!==null&&n!==void 0||(r.when=function(u){var a=u.value;return!Or(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;a.size<=t.maximum||u.issues.push({origin:To(a),code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),fv=T("$ZodCheckMinSize",function(e,t){var n,r;st.init(e,t),(n=(r=e._zod.def).when)!==null&&n!==void 0||(r.when=function(u){var a=u.value;return!Or(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:To(a),code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),dv=T("$ZodCheckSizeEquals",function(e,t){var n,r;st.init(e,t),(n=(r=e._zod.def).when)!==null&&n!==void 0||(r.when=function(u){var a=u.value;return!Or(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:To(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}))}}}),pv=T("$ZodCheckMaxLength",function(e,t){var n,r;st.init(e,t),(n=(r=e._zod.def).when)!==null&&n!==void 0||(r.when=function(u){var a=u.value;return!Or(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=Po(a);u.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}}),hv=T("$ZodCheckMinLength",function(e,t){var n,r;st.init(e,t),(n=(r=e._zod.def).when)!==null&&n!==void 0||(r.when=function(u){var a=u.value;return!Or(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=Po(a);u.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}}),vv=T("$ZodCheckLengthEquals",function(e,t){var n,r;st.init(e,t),(n=(r=e._zod.def).when)!==null&&n!==void 0||(r.when=function(u){var a=u.value;return!Or(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=Po(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}))}}}),Ha=T("$ZodCheckStringFormat",function(e,t){var n,r,u,a;st.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(){})}),mv=T("$ZodCheckRegex",function(e,t){Ha.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})}}),Dv=T("$ZodCheckLowerCase",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=iv),Ha.init(e,t)}),gv=T("$ZodCheckUpperCase",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=ov),Ha.init(e,t)}),yv=T("$ZodCheckIncludes",function(e,t){st.init(e,t);var n=Ar(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})}}),Fv=T("$ZodCheckStartsWith",function(e,t){var n;st.init(e,t);var r=new RegExp("^".concat(Ar(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})}}),Ev=T("$ZodCheckEndsWith",function(e,t){var n;st.init(e,t);var r=new RegExp(".*".concat(Ar(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 Cc(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,K(Jn(n,e.issues)))}var _v=T("$ZodCheckProperty",function(e,t){st.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 Cc(u,n,t.property)});Cc(r,n,t.property)}}),bv=T("$ZodCheckMimeType",function(e,t){st.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})}}),Cv=T("$ZodCheckOverwrite",function(e,t){st.init(e,t),e._zod.check=function(n){n.value=t.tx(n.value)}}),kv=ie(function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];ae(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,K(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=V(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=K(((e=this==null?void 0:this.content)!==null&&e!==void 0?e:[""]).map(function(u){return"  ".concat(u)}));return Ml(t,K(n).concat([r.join(`
90`)]))}}]),Av={major:4,minor:1,patch:12},Je=T("$ZodType",function(e,t){var n,r;e!=null||(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Av;var u=K((n=e._zod.def.checks)!==null&&n!==void 0?n:[]);e._zod.traits.has("$ZodCheck")&&u.unshift(e);var a,i=V(u);try{for(i.s();!(a=i.n()).done;){var o,s=V(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,l;(c=(r=e._zod).deferred)!==null&&c!==void 0||(r.deferred=[]),(l=e._zod.deferred)===null||l===void 0||l.push(function(){e._zod.run=e._zod.parse})}else{var d=function(h,D,m){var y,E,g=Dr(h),b=V(D);try{var F=function(){var _=E.value;if(_._zod.def.when){if(!_._zod.def.when(h))return 0}else if(g)return 0;var C=h.issues.length,k=_._zod.check(h);if(k instanceof Promise&&m?.async===!1)throw new yr;if(y||k instanceof Promise)y=(y??Promise.resolve()).then(_e(J().m(function A(){return J().w(function(j){for(;;)switch(j.n){case 0:return j.n=1,k;case 1:if(h.issues.length!==C){j.n=2;break}return j.a(2);case 2:g||(g=Dr(h,C));case 3:return j.a(2)}},A)})));else{if(h.issues.length===C)return 0;g||(g=Dr(h,C))}};for(b.s();!(E=b.n()).done;)F()}catch(_){b.e(_)}finally{b.f()}return y?y.then(function(){return h}):h},f=function(h,D,m){if(Dr(h))return h.aborted=!0,h;var y=d(D,u,m);if(y instanceof Promise){if(m.async===!1)throw new yr;return y.then(function(E){return e._zod.parse(E,m)})}return e._zod.parse(y,m)};e._zod.run=function(h,D){if(D.skipChecks)return e._zod.parse(h,D);if(D.direction==="backward"){var m=e._zod.parse({value:h.value,issues:[]},v(v({},D),{},{skipChecks:!0}));return m instanceof Promise?m.then(function(E){return f(E,h,D)}):f(m,h,D)}var y=e._zod.parse(h,D);if(y instanceof Promise){if(D.async===!1)throw new yr;return y.then(function(E){return d(E,u,D)})}return d(y,u,D)}}e["~standard"]={validate:function(h){try{var D,m=zh(e,h);return m.success?{value:m.data}:{issues:(D=m.error)===null||D===void 0?void 0:D.issues}}catch{return Rh(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}}),zo=T("$ZodString",function(e,t){var n,r,u;Je.init(e,t),e._zod.pattern=(n=K((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}}),Ge=T("$ZodStringFormat",function(e,t){Ha.init(e,t),zo.init(e,t)}),wv=T("$ZodGUID",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Vh),Ge.init(e,t)}),Sv=T("$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=_c(u))}else(n=t.pattern)!==null&&n!==void 0||(t.pattern=_c());Ge.init(e,t)}),xv=T("$ZodEmail",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Wh),Ge.init(e,t)}),Ov=T("$ZodURL",function(e,t){Ge.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:Xh.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})}}}),Bv=T("$ZodEmoji",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Ge.init(e,t)}),Iv=T("$ZodNanoID",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Uh),Ge.init(e,t)}),Tv=T("$ZodCUID",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Mh),Ge.init(e,t)}),Pv=T("$ZodCUID2",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Zh),Ge.init(e,t)}),jv=T("$ZodULID",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Lh),Ge.init(e,t)}),Nv=T("$ZodXID",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=$h),Ge.init(e,t)}),zv=T("$ZodKSUID",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=qh),Ge.init(e,t)}),Rv=T("$ZodISODateTime",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=(function(r){var u=Sf({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(wf,"T(?:").concat(i,")$"))})(t)),Ge.init(e,t)}),Mv=T("$ZodISODate",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=tv),Ge.init(e,t)}),Zv=T("$ZodISOTime",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=new RegExp("^".concat(Sf(t),"$"))),Ge.init(e,t)}),Lv=T("$ZodISODuration",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Hh),Ge.init(e,t)}),$v=T("$ZodIPv4",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Kh),Ge.init(e,t),e._zod.onattach.push(function(r){r._zod.bag.format="ipv4"})}),qv=T("$ZodIPv6",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Jh),Ge.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})}}}),Uv=T("$ZodCIDRv4",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Qh),Ge.init(e,t)}),Hv=T("$ZodCIDRv6",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Gh),Ge.init(e,t),e._zod.check=function(r){var u=r.value.split("/");try{if(u.length!==2)throw new Error;var a=Be(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 If(e){if(e==="")return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Vv=T("$ZodBase64",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=Yh),Ge.init(e,t),e._zod.onattach.push(function(r){r._zod.bag.contentEncoding="base64"}),e._zod.check=function(r){If(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),Wv=T("$ZodBase64URL",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=bc),Ge.init(e,t),e._zod.onattach.push(function(r){r._zod.bag.contentEncoding="base64url"}),e._zod.check=function(r){(function(u){if(!bc.test(u))return!1;var a=u.replace(/[-_]/g,function(i){return i==="-"?"+":"/"});return If(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})}}),Kv=T("$ZodE164",function(e,t){var n;(n=t.pattern)!==null&&n!==void 0||(t.pattern=ev),Ge.init(e,t)}),Jv=T("$ZodJWT",function(e,t){Ge.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=Be(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})}}),Tf=T("$ZodNumber",function(e,t){var n;Je.init(e,t),e._zod.pattern=(n=e._zod.bag.pattern)!==null&&n!==void 0?n:rv,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}}),Qv=T("$ZodNumber",function(e,t){cv.init(e,t),Tf.init(e,t)}),Gv=T("$ZodBoolean",function(e,t){Je.init(e,t),e._zod.pattern=uv,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}}),Yv=T("$ZodNull",function(e,t){Je.init(e,t),e._zod.pattern=av,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}}),Xv=T("$ZodUnknown",function(e,t){Je.init(e,t),e._zod.parse=function(n){return n}}),em=T("$ZodNever",function(e,t){Je.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 kc(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,K(Jn(n,e.issues))),t.value[n]=e.value}var tm=T("$ZodArray",function(e,t){Je.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],l=t.element._zod.run({value:c,issues:[]},r);l instanceof Promise?a.push(l.then(function(d){return kc(d,n,s)})):kc(l,n,s)},o=0;o<u.length;o++)i(o);return a.length?Promise.all(a).then(function(){return n}):n}});function _a(e,t,n,r){var u;e.issues.length&&(u=t.issues).push.apply(u,K(Jn(n,e.issues))),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Pf(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 jf(e,t,n,r,u,a){for(var i=[],o=u.keySet,s=u.catchall._zod,c=s.def.type,l=function(){var h=f[d];if(o.has(h))return 0;if(c==="never")return i.push(h),0;var D=s.run({value:t[h],issues:[]},r);D instanceof Promise?e.push(D.then(function(m){return _a(m,n,h,t)})):_a(D,n,h,t)},d=0,f=Object.keys(t);d<f.length;d++)l();return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:a}),e.length?Promise.all(e).then(function(){return n}):n}var nm=T("$ZodObject",function(e,t){Je.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=$a(function(){return Pf(t)});Te(e._zod,"propValues",function(){var s=t.shape,c={};for(var l in s){var d=s[l]._zod;if(d.values){var f;(f=c[l])!==null&&f!==void 0||(c[l]=new Set);var h,D=V(d.values);try{for(D.s();!(h=D.n()).done;){var m=h.value;c[l].add(m)}}catch(y){D.e(y)}finally{D.f()}}}return c});var a,i=Ou,o=t.catchall;e._zod.parse=function(s,c){a!=null||(a=u.value);var l=s.value;if(!i(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};var d,f=[],h=a.shape,D=V(a.keys);try{var m=function(){var y=d.value,E=h[y]._zod.run({value:l[y],issues:[]},c);E instanceof Promise?f.push(E.then(function(g){return _a(g,s,y,l)})):_a(E,s,y,l)};for(D.s();!(d=D.n()).done;)m()}catch(y){D.e(y)}finally{D.f()}return o?jf(f,l,s,c,u.value,e):f.length?Promise.all(f).then(function(){return s}):s}}),rm=T("$ZodObjectJIT",function(e,t){nm.init(e,t);var n,r,u=e._zod.parse,a=$a(function(){return Pf(t)}),i=Ou,o=!Ef.jitless,s=o&&Ph.value,c=t.catchall;e._zod.parse=function(l,d){r!=null||(r=a.value);var f=l.value;return i(f)?o&&s&&d?.async===!1&&d.jitless!==!0?(n||(n=(function(h){var D=new kv(["shape","payload","ctx"]),m=a.value,y=function(S){var O=Fc(S);return"shape[".concat(O,"]._zod.run({ value: input[").concat(O,"], issues: [] }, ctx)")};D.write("const input = payload.value;");
90var E,g=Object.create(null),b=0,F=V(m.keys);try{for(F.s();!(E=F.n()).done;)g[E.value]="key_".concat(b++)}catch(S){F.e(S)}finally{F.f()}D.write("const newResult = {};");var _,C=V(m.keys);try{for(C.s();!(_=C.n()).done;){var k=_.value,A=g[k],j=Fc(k);D.write("const ".concat(A," = ").concat(y(k),";")),D.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(j,", ...iss.path] : [").concat(j,`]
95          })));
96        }
97        
98        
99        if (`).concat(A,`.value === undefined) {
100          if (`).concat(j,` in input) {
101            newResult[`).concat(j,`] = undefined;
102          }
103        } else {
104          newResult[`).concat(j,"] = ").concat(A,`.value;
105        }
106        
107      `))}}catch(S){C.e(S)}finally{C.f()}D.write("payload.value = newResult;"),D.write("return payload;");var B=D.compile();return function(S,O){return B(h,S,O)}})(t.shape)),l=n(l,d),c?jf([],f,l,d,r,e):l):u(l,d):(l.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),l)}});function Ac(e,t,n,r){var u,a=V(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!Dr(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 In(c,r,Bn())})})}),t)}var Nf=T("$ZodUnion",function(e,t){Je.init(e,t),Te(e._zod,"optin",function(){return t.options.some(function(u){return u._zod.optin==="optional"})?"optional":void 0}),Te(e._zod,"optout",function(){return t.options.some(function(u){return u._zod.optout==="optional"})?"optional":void 0}),Te(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)}))}),Te(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 Io(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=V(t.options);try{for(c.s();!(i=c.n()).done;){var l=i.value._zod.run({value:u.value,issues:[]},a);if(l instanceof Promise)s.push(l),o=!0;else{if(l.issues.length===0)return l;s.push(l)}}}catch(d){c.e(d)}finally{c.f()}return o?Promise.all(s).then(function(d){return Ac(d,u,e,a)}):Ac(s,u,e,a)}}),um=T("$ZodDiscriminatedUnion",function(e,t){Nf.init(e,t);var n=e._zod.parse;Te(e._zod,"propValues",function(){var u,a={},i=V(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,l=Object.entries(s);c<l.length;c++){var d=Be(l[c],2),f=d[0],h=d[1];a[f]||(a[f]=new Set);var D,m=V(h);try{for(m.s();!(D=m.n()).done;){var y=D.value;a[f].add(y)}}catch(E){m.e(E)}finally{m.f()}}}}catch(E){i.e(E)}finally{i.f()}return a});var r=$a(function(){var u,a=t.options,i=new Map,o=V(a);try{for(o.s();!(u=o.n()).done;){var s,c=u.value,l=(s=c._zod.propValues)===null||s===void 0?void 0:s[t.discriminator];if(!l||l.size===0)throw new Error('Invalid discriminated union option at index "'.concat(t.options.indexOf(c),'"'));var d,f=V(l);try{for(f.s();!(d=f.n()).done;){var h=d.value;if(i.has(h))throw new Error('Duplicate discriminator value "'.concat(String(h),'"'));i.set(h,c)}}catch(D){f.e(D)}finally{f.f()}}}catch(D){o.e(D)}finally{o.f()}return i});e._zod.parse=function(u,a){var i=u.value;if(!Ou(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)}}),am=T("$ZodIntersection",function(e,t){Je.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=Be(o,2),c=s[0],l=s[1];return wc(n,c,l)}):wc(n,a,i)}});function Bi(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(kr(e)&&kr(t)){var n,r=Object.keys(t),u=Object.keys(e).filter(function(f){return r.indexOf(f)!==-1}),a=v(v({},e),t),i=V(u);try{for(i.s();!(n=i.n()).done;){var o=n.value,s=Bi(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o].concat(K(s.mergeErrorPath))};a[o]=s.data}}catch(f){i.e(f)}finally{i.f()}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};for(var c=[],l=0;l<e.length;l++){var d=Bi(e[l],t[l]);if(!d.valid)return{valid:!1,mergeErrorPath:[l].concat(K(d.mergeErrorPath))};c.push(d.data)}return{valid:!0,data:c}}return{valid:!1,mergeErrorPath:[]}}function wc(e,t,n){var r,u;if(t.issues.length&&(r=e.issues).push.apply(r,K(t.issues)),n.issues.length&&(u=e.issues).push.apply(u,K(n.issues)),Dr(e))return e;var a=Bi(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 im=T("$ZodRecord",function(e,t){Je.init(e,t),e._zod.parse=function(n,r){var u=n.value;if(!kr(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=V(i);try{var l=function(){var m=o.value;if(typeof m=="string"||typeof m=="number"||ot(m)==="symbol"){var y,E=t.valueType._zod.run({value:u[m],issues:[]},r);E instanceof Promise?a.push(E.then(function(g){var b;g.issues.length&&(b=n.issues).push.apply(b,K(Jn(m,g.issues))),n.value[m]=g.value})):(E.issues.length&&(y=n.issues).push.apply(y,K(Jn(m,E.issues))),n.value[m]=E.value)}};for(c.s();!(o=c.n()).done;)l()}catch(m){c.e(m)}finally{c.f()}for(var d in u)i.has(d)||(s=s??[]).push(d);s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:s})}else{n.value={};var f,h=V(Reflect.ownKeys(u));try{var D=function(){var m=f.value;if(m==="__proto__")return 0;var y=t.keyType._zod.run({value:m,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 In(b,r,Bn())}),input:m,path:[m],inst:e}),n.value[y.value]=y.value,0;var E,g=t.valueType._zod.run({value:u[m],issues:[]},r);g instanceof Promise?a.push(g.then(function(b){var F;b.issues.length&&(F=n.issues).push.apply(F,K(Jn(m,b.issues))),n.value[y.value]=b.value})):(g.issues.length&&(E=n.issues).push.apply(E,K(Jn(m,g.issues))),n.value[y.value]=g.value)};for(h.s();!(f=h.n()).done;)D()}catch(m){h.e(m)}finally{h.f()}}return a.length?Promise.all(a).then(function(){return n}):n}}),om=T("$ZodEnum",function(e,t){Je.init(e,t);var n=_f(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp("^(".concat(n.filter(function(u){return jh.has(ot(u))}).map(function(u){return typeof u=="string"?Ar(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}}),sm=T("$ZodLiteral",function(e,t){if(Je.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"?Ar(n):n?Ar(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}}),cm=T("$ZodTransform",function(e,t){Je.init(e,t),e._zod.parse=function(n,r){if(r.direction==="backward")throw new Ff(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 yr;return n.value=u,n}});function Sc(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var lm=T("$ZodOptional",function(e,t){Je.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Te(e._zod,"values",function(){return t.innerType._zod.values?new Set([].concat(K(t.innerType._zod.values),[void 0])):void 0}),Te(e._zod,"pattern",function(){var n=t.innerType._zod.pattern;return n?new RegExp("^(".concat(Io(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 Sc(a,n.value)}):Sc(u,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),fm=T("$ZodNullable",function(e,t){Je.init(e,t),Te(e._zod,"optin",function(){return t.innerType._zod.optin}),Te(e._zod,"optout",function(){return t.innerType._zod.optout}),Te(e._zod,"pattern",function(){var n=t.innerType._zod.pattern;return n?new RegExp("^(".concat(Io(n.source),"|null)$")):void 0}),Te(e._zod,"values",function(){return t.innerType._zod.values?new Set([].concat(K(t.innerType._zod.values),[null])):void 0}),e._zod.parse=function(n,r){return n.value===null?n:t.innerType._zod.run(n,r)}}),dm=T("$ZodDefault",function(e,t){Je.init(e,t),e._zod.optin="optional",Te(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 xc(a,t)}):xc(u,t)}});function xc(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var pm=T("$ZodPrefault",function(e,t){Je.init(e,t),e._zod.optin="optional",Te(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)}}),hm=T("$ZodNonOptional",function(e,t){Je.init(e,t),Te(e._zod,"values",function(){var n=t.innerType._zod.values;return n?new Set(K(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 Oc(a,e)}):Oc(u,e)}});function Oc(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 vm=T("$ZodCatch",function(e,t){Je.init(e,t),Te(e._zod,"optin",function(){return t.innerType._zod.optin}),Te(e._zod,"optout",function(){return t.innerType._zod.optout}),Te(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 In(i,r,Bn())})},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 In(a,r,Bn())})},input:n.value})),n.issues=[]),n)}}),mm=T("$ZodPipe",function(e,t){Je.init(e,t),Te(e._zod,"values",function(){return t.in._zod.values}),Te(e._zod,"optin",function(){return t.in._zod.optin}),Te(e._zod,"optout",function(){return t.out._zod.optout}),Te(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 ta(i,t.in,r)}):ta(u,t.in,r)}var a=t.in._zod.run(n,r);return a instanceof Promise?a.then(function(i){return ta(i,t.out,r)}):ta(a,t.out,r)}});function ta(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Dm=T("$ZodReadonly",function(e,t){Je.init(e,t),Te(e._zod,"propValues",function(){return t.innerType._zod.propValues}),Te(e._zod,"values",function(){return t.innerType._zod.values}),Te(e._zod,"optin",function(){return t.innerType._zod.optin}),Te(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(Bc):Bc(u)}});function Bc(e){return e.value=Object.freeze(e.value),e}var gm=T("$ZodLazy",function(e,t){Je.init(e,t),Te(e._zod,"innerType",function(){return t.getter()}),Te(e._zod,"pattern",function(){return e._zod.innerType._zod.pattern}),Te(e._zod,"propValues",function(){return e._zod.innerType._zod.propValues}),Te(e._zod,"optin",function(){var n;return(n=e._zod.innerType._zod.optin)!==null&&n!==void 0?n:void 0}),Te(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)}}),ym=T("$ZodCustom",function(e,t){st.init(e,t),Je.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 Ic(a,n,r,e)});Ic(u,n,r,e)}});function Ic(e,t,n,r){if(!e){var u,a={code:"custom",input:n,inst:r,path:K((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(Bu(a))}}var zf=ie(function e(){ae(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&&ot(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&&ot(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)}}
107]),Jr=new zf;function Tc(e,t){return new e(v({type:"string",format:"guid",check:"string_format",abort:!1},te(t)))}function ba(e,t){return new Of(v(v({check:"less_than"},te(t)),{},{value:e,inclusive:!1}))}function Fu(e,t){return new Of(v(v({check:"less_than"},te(t)),{},{value:e,inclusive:!0}))}function Ca(e,t){return new Bf(v(v({check:"greater_than"},te(t)),{},{value:e,inclusive:!1}))}function Eu(e,t){return new Bf(v(v({check:"greater_than"},te(t)),{},{value:e,inclusive:!0}))}function Ii(e,t){return new sv(v(v({check:"multiple_of"},te(t)),{},{value:e}))}function Ro(e,t){return new pv(v(v({check:"max_length"},te(t)),{},{maximum:e}))}function Iu(e,t){return new hv(v(v({check:"min_length"},te(t)),{},{minimum:e}))}function Mo(e,t){return new vv(v(v({check:"length_equals"},te(t)),{},{length:e}))}function Rf(e,t){return new mv(v(v({check:"string_format",format:"regex"},te(t)),{},{pattern:e}))}function Mf(e){return new Dv(v({check:"string_format",format:"lowercase"},te(e)))}function Zf(e){return new gv(v({check:"string_format",format:"uppercase"},te(e)))}function Lf(e,t){return new yv(v(v({check:"string_format",format:"includes"},te(t)),{},{includes:e}))}function $f(e,t){return new Fv(v(v({check:"string_format",format:"starts_with"},te(t)),{},{prefix:e}))}function qf(e,t){return new Ev(v(v({check:"string_format",format:"ends_with"},te(t)),{},{suffix:e}))}function Br(e){return new Cv({check:"overwrite",tx:e})}function Uf(e){return Br(function(t){return t.normalize(e)})}function Hf(){return Br(function(e){return e.trim()})}function Vf(){return Br(function(e){return e.toLowerCase()})}function Wf(){return Br(function(e){return e.toUpperCase()})}var Pc=ie(function e(t){var n,r,u,a,i;ae(this,e),this.counter=0,this.metadataRegistry=(n=t?.metadata)!==null&&n!==void 0?n:Jr,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 l=(t=(n=e._zod).toJSONSchema)===null||t===void 0?void 0:t.call(n);if(l)c.schema=l;else{var d=v(v({},i),{},{schemaPath:[].concat(K(i.schemaPath),[e]),path:i.path}),f=e._zod.parent;if(f)c.ref=f,this.process(f,d),this.seen.get(f).isParent=!0;else{var h=c.schema;switch(o.type){case"string":var D=h;D.type="string";var m,y=e._zod.bag,E=y.minimum,g=y.maximum,b=y.format,F=y.patterns,_=y.contentEncoding;if(typeof E=="number"&&(D.minLength=E),typeof g=="number"&&(D.maxLength=g),b&&(D.format=(m={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""}[b])!==null&&m!==void 0?m:b,D.format===""&&delete D.format),_&&(D.contentEncoding=_),F&&F.size>0){var C=K(F);C.length===1?D.pattern=C[0].source:C.length>1&&(c.schema.allOf=K(C.map(function(Ne){return v(v({},a.target==="draft-7"||a.target==="draft-4"||a.target==="openapi-3.0"?{type:"string"}:{}),{},{pattern:Ne.source})})))}break;case"number":var k=h,A=e._zod.bag,j=A.minimum,B=A.maximum,S=A.format,O=A.multipleOf,P=A.exclusiveMaximum,x=A.exclusiveMinimum;typeof S=="string"&&S.includes("int")?k.type="integer":k.type="number",typeof x=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(k.minimum=x,k.exclusiveMinimum=!0):k.exclusiveMinimum=x),typeof j=="number"&&(k.minimum=j,typeof x=="number"&&this.target!=="draft-4"&&(x>=j?delete k.minimum:delete k.exclusiveMinimum)),typeof P=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(k.maximum=P,k.exclusiveMaximum=!0):k.exclusiveMaximum=P),typeof B=="number"&&(k.maximum=B,typeof P=="number"&&this.target!=="draft-4"&&(P<=B?delete k.maximum:delete k.exclusiveMaximum)),typeof O=="number"&&(k.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 z=h,I=e._zod.bag,w=I.minimum,N=I.maximum;typeof w=="number"&&(z.minItems=w),typeof N=="number"&&(z.maxItems=N),z.type="array",z.items=this.process(o.element,v(v({},d),{},{path:[].concat(K(d.path),["items"])}));break;case"object":var R,M=h;M.type="object",M.properties={};var W=o.shape;for(var U in W)M.properties[U]=this.process(W[U],v(v({},d),{},{path:[].concat(K(d.path),["properties",U])}));var oe=new Set(Object.keys(W)),he=new Set(K(oe).filter(function(Ne){var tn=o.shape[Ne]._zod;return a.io==="input"?tn.optin===void 0:tn.optout===void 0}));he.size>0&&(M.required=Array.from(he)),((R=o.catchall)===null||R===void 0?void 0:R._zod.def.type)==="never"?M.additionalProperties=!1:o.catchall?o.cat
107chall&&(M.additionalProperties=this.process(o.catchall,v(v({},d),{},{path:[].concat(K(d.path),["additionalProperties"])}))):this.io==="output"&&(M.additionalProperties=!1);break;case"union":var fe=h,de=o.options.map(function(Ne,tn){return a.process(Ne,v(v({},d),{},{path:[].concat(K(d.path),["anyOf",tn])}))});fe.anyOf=de;break;case"intersection":var H=h,G=this.process(o.left,v(v({},d),{},{path:[].concat(K(d.path),["allOf",0])})),re=this.process(o.right,v(v({},d),{},{path:[].concat(K(d.path),["allOf",1])})),De=function(Ne){return"allOf"in Ne&&Object.keys(Ne).length===1},Y=[].concat(K(De(G)?G.allOf:[G]),K(De(re)?re.allOf:[re]));H.allOf=Y;break;case"tuple":var ce=h;ce.type="array";var be=this.target==="draft-2020-12"?"prefixItems":"items",Re=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",Ce=o.items.map(function(Ne,tn){return a.process(Ne,v(v({},d),{},{path:[].concat(K(d.path),[be,tn])}))}),je=o.rest?this.process(o.rest,v(v({},d),{},{path:[].concat(K(d.path),[Re],K(this.target==="openapi-3.0"?[o.items.length]:[]))})):null;this.target==="draft-2020-12"?(ce.prefixItems=Ce,je&&(ce.items=je)):this.target==="openapi-3.0"?(ce.items={anyOf:Ce},je&&ce.items.anyOf.push(je),ce.minItems=Ce.length,je||(ce.maxItems=Ce.length)):(ce.items=Ce,je&&(ce.additionalItems=je));var Ze=e._zod.bag,Ht=Ze.minimum,Xt=Ze.maximum;typeof Ht=="number"&&(ce.minItems=Ht),typeof Xt=="number"&&(ce.maxItems=Xt);break;case"record":var dt=h;dt.type="object",this.target!=="draft-7"&&this.target!=="draft-2020-12"||(dt.propertyNames=this.process(o.keyType,v(v({},d),{},{path:[].concat(K(d.path),["propertyNames"])}))),dt.additionalProperties=this.process(o.valueType,v(v({},d),{},{path:[].concat(K(d.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 en=h,rt=_f(o.entries);rt.every(function(Ne){return typeof Ne=="number"})&&(en.type="number"),rt.every(function(Ne){return typeof Ne=="string"})&&(en.type="string"),en.enum=rt;break;case"literal":var Vt,Dt=h,_t=[],Pt=V(o.values);try{for(Pt.s();!(Vt=Pt.n()).done;){var Tn=Vt.value;if(Tn===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof Tn=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");_t.push(Number(Tn))}else _t.push(Tn)}}catch(Ne){Pt.e(Ne)}finally{Pt.f()}if(_t.length!==0)if(_t.length===1){var Xe=_t[0];Dt.type=Xe===null?"null":ot(Xe),this.target==="draft-4"||this.target==="openapi-3.0"?Dt.enum=[Xe]:Dt.const=Xe}else _t.every(function(Ne){return typeof Ne=="number"})&&(Dt.type="number"),_t.every(function(Ne){return typeof Ne=="string"})&&(Dt.type="string"),_t.every(function(Ne){return typeof Ne=="boolean"})&&(Dt.type="string"),_t.every(function(Ne){return Ne===null})&&(Dt.type="null"),Dt.enum=_t;break;case"file":var fn=h,dn={type:"string",format:"binary",contentEncoding:"binary"},Tr=e._zod.bag,Pr=Tr.minimum,pn=Tr.maximum,bt=Tr.mime;Pr!==void 0&&(dn.minLength=Pr),pn!==void 0&&(dn.maxLength=pn),bt?bt.length===1?(dn.contentMediaType=bt[0],Object.assign(fn,dn)):fn.anyOf=bt.map(function(Ne){return v(v({},dn),{},{contentMediaType:Ne})}):Object.assign(fn,dn);break;case"transform":if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break;case"nullable":var Wa=this.process(o.innerType,d);this.target==="openapi-3.0"?(c.ref=o.innerType,h.nullable=!0):h.anyOf=[Wa,{type:"null"}];break;case"nonoptional":case"promise":case"optional":this.process(o.innerType,d),c.ref=o.innerType;break;case"default":this.process(o.innerType,d),c.ref=o.innerType,h.default=JSON.parse(JSON.stringify(o.defaultValue));break;case"prefault":this.process(o.innerType,d),c.ref=o.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break;case"catch":var jr;this.process(o.innerType,d),c.ref=o.innerType;try{jr=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=jr;break;case"nan":if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break;case"template_literal":var hn=h,vn=e._zod.pattern;if(!vn)throw new Error("Pattern not found in template literal");hn.type="string",hn.pattern=vn.source;break;case"pipe":var Pn=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(Pn,d),c.ref=Pn;break;case"readonly":this.process(o.innerType,d),c.ref=o.innerType,h.readOnly=!0;break;case"lazy":var mn=e._zod.innerType;this.process(mn,d),c.ref=mn;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 jn=this.metadataRegistry.get(e);return jn&&Object.assign(c.schema,jn),this.io==="input"&&vt(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},l=this.seen.get(e);if(!l)throw new Error("Unprocessed schema. This is a bug in Zod.");var d=function(N){if(!N[1].schema.$ref){var R=N[1],M=(function(fe){var de,H=s.target==="draft-2020-12"?"$defs":"definitions";if(c.external){var G,re,De,Y,ce=(G=c.external.registry.get(fe[0]))===null||G===void 0?void 0:G.id,be=(re=c.external.uri)!==null&&re!==void 0?re:function(Ze){return Ze};if(ce)return{ref:be(ce)};var Re=(De=(Y=fe[1].defId)!==null&&Y!==void 0?Y:fe[1].schema.id)!==null&&De!==void 0?De:"schema".concat(s.counter++);return fe[1].defId=Re,{defId:Re,ref:"".concat(be("__shared"),"#/").concat(H,"/").concat(Re)}}if(fe[1]===l)return{ref:"#"};var Ce="".concat("#","/").concat(H,"/"),je=(de=fe[1].schema.id)!==null&&de!==void 0?de:"__schema".concat(s.counter++);return{defId:je,ref:Ce+je}})(N),W=M.ref,U=M.defId;R.def=v({},R.schema),U&&(R.defId=U);var oe=R.schema;for(var he in oe)delete oe[he];oe.$ref=W}};if(c.cycles==="throw"){var f,h=V(this.seen.entries());try{for(h.s();!(f=h.n()).done;){var D,m=f.value[1];if(m.cycle)throw new Error("Cycle detected: "+"#/".concat((D=m.cycle)===null||D===void 0?void 0:D.join("/"),"/<root>")+'\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.')}}catch(N){h.e(N)}finally{h.f()}}var y,E=V(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 _,C=(_=c.external.registry.get(b[0]))===null||_===void 0?void 0:_.id;if(e!==b[0]&&C){d(b);continue}}(!((g=this.metadataRegistry.get(b[0]))===null||g===void 0)&&g.id||F.cycle||F.count>1&&c.reused==="ref")&&d(b)}else d(b)}}catch(N){E.e(N)}finally{E.f()}var k,A=function(N,R){var M,W,U=s.seen.get(N),oe=(M=U.def)!==null&&M!==void 0?M:U.schema,he=v({},oe);if(U.ref!==null){var fe=U.ref;if(U.ref=null,fe){A(fe,R);var de,H=s.seen.get(fe).schema;!H.$ref||R.target!=="draft-7"&&R.target!=="draft-4"&&R.target!=="openapi-3.0"?(Object.assign(oe,H),Object.assign(oe,he)):(oe.allOf=(de=oe.allOf)!==null&&de!==void 0?de:[],oe.allOf.push(H))}U.isParent||s.override({zodSchema:N,jsonSchema:oe,path:(W=U.path)!==null&&W!==void 0?W:[]})}},j=V(K(this.seen.entries()).reverse());try{for(j.s();!(k=j.n()).done;){var B=k.value;A(B[0],{target:this.target})}}catch(N){j.e(N)}finally{j.f()}var S={};if(this.target==="draft-2020-12"?S.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?S.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?S.$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,P=(O=c.external.registry.get(e))===null||O===void 0?void 0:O.id;if(!P)throw new Error("Schema is missing an `id` property");S.$id=c.external.uri(P)}Object.assign(S,l.def);var x,z=(i=(o=c.external)===null||o===void 0?void 0:o.defs)!==null&&i!==void 0?i:{},I=V(this.seen.entries());try{for(I.s();!(x=I.n()).done;){var w=x.value[1];w.def&&w.defId&&(z[w.defId]=w.def)}}catch(N){I.e(N)}finally{I.f()}c.external||Object.keys(z).length>0&&(this.target==="draft-2020-12"?S.$defs=z:S.definitions=z);try{return JSON.parse(JSON.stringify(S))}catch{throw new Error("Error converting schema to JSON.")}}}]);function vt(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 vt(r.element,n);case"object":for(var u in r.shape)if(vt(r.shape[u],n))return!0;return!1;case"union":var a,i=V(r.options);try{for(i.s();!(a=i.n()).done;)if(vt(a.value,n))return!0}catch(c){i.e(c)}finally{i.f()}return!1;case"intersection":return vt(r.left,n)||vt(r.right,n);case"tuple":var o,s=V(r.items);try{for(s.s();!(o=s.n()).done;)if(vt(o.value,n))return!0}catch(c){s.e(c)}finally{s.f()}return!(!r.rest||!vt(r.rest,n));case"record":case"map":return vt(r.keyType,n)||vt(r.valueType,n);case"set":return vt(r.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":case"default":case"prefault":return vt(r.innerType,n);case"lazy":return vt(r.getter(),n);case"transform":return!0;case"pipe":return vt(r.in,n)||vt(r.out,n)}throw new Error("Unknown schema type: ".concat(r.type))}var an=Object.freeze({__proto__:null,endsWith:qf,gt:Ca,gte:Eu,includes:Lf,length:Mo,lowercase:Mf,lt:ba,lte:Fu,maxLength:Ro,maxSize:function(e,t){return new lv(v(v({check:"max_size"},te(t)),{},{maximum:e}))},mime:function(e,t){return new bv(v({check:"mime_type",mime:e},te(t)))},minLength:Iu,minSize:function(e,t){return new fv(v(v({check:"min_size"},te(t)),{},{minimum:e}))},multipleOf:Ii,negative:function(e){return ba(0,e)},nonnegative:function(e){return Eu(0,e)},nonpositive:function(e){return Fu(0,e)},normalize:Uf,overwrite:Br,positive:function(e){return Ca(0,e)},property:function(e,t,n){return new _v(v({check:"property",property:e,schema:t},te(n)))},regex:Rf,size:function(e,t){return new dv(v(v({check:"size_equals"},te(t)),{},{size:e}))},startsWith:$f,toLowerCase:Vf,toUpperCase:Wf,trim:Hf,uppercase:Zf}),Fm=T("ZodISODateTime",function(e,t){Rv.init(e,t),nt.init(e,t)}),Em=T("ZodISODate",function(e,t){Mv.init(e,t),nt.init(e,t)}),_m=T("ZodISOTime",function(e,t){Zv.init(e,t),nt.init(e,t)}),bm=T("ZodISODuration",function(e,t){Lv.init(e,t),nt.init(e,t)}),Tt=T("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=V(o.issues);try{for(c.s();!(s=c.n()).done;){var l=s.value;if(l.code==="invalid_union"&&l.errors.length)l.errors.map(function(D){return i({issues:D})});else if(l.code==="invalid_key")i({issues:l.issues});else if(l.code==="invalid_element")i({issues:l.issues});else if(l.path.length===0)a._errors.push(u(l));else for(var d=a,f=0;f<l.path.length;){var h=l.path[f];f===l.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(u(l))):d[h]=d[h]||{_errors:[]},d=d[h],f++}}}catch(D){c.e(D)}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(l){return l.message},i={},o=[],s=V(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(l){s.e(l)}finally{s.f()}return{formErrors:o,fieldErrors:i}})(e,n)}},addIssue:{value:function(n){e.issues.push(n),e.message=JSON.stringify(e.issues,Oi,2)}},addIssues:{value:function(n){var r;(r=e.issues).push.apply(r,K(n)),e.message=JSON.stringify(e.issues,Oi,2)}},isEmpty:{get:function(){return e.issues.length===0}}})},{Parent:Error}),Cm=jo(Tt),km=No(Tt),Am=qa(Tt),Kf=Ua(Tt),wm=(function(e){return function(t,n,r){var u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return jo(e)(t,n,u)}})(Tt),Sm=(function(e){return function(t,n,r){return jo(e)(t,n,r)}})(Tt),xm=(function(e){return(function(){var t=_e(J().m(function n(r,u,a){var i;return J().w(function(o){for(;;)if(o.n===0)return i=a?Object.assign(a,{direction:"backward"}):{direction:"backward"},o.a(2,No(e)(r,u,i))},n)}));return function(n,r,u){return t.apply(this,arguments)}})()})(Tt),Om=(function(e){return(function(){var t=_e(J().m(function n(r,u,a){return J().w(function(i){for(;;)if(i.n===0)return i.a(2,No(e)(r,u,a))},n)}));return function(n,r,u){return t.apply(this,arguments)}})()})(Tt),Bm=(function(e){return function(t,n,r){var u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return qa(e)(t,n,u)}})(Tt),Im=(function(e){return function(t,n,r){return qa(e)(t,n,r)}})(Tt),Tm=(function(e){return(function(){var t=_e(J().m(function n(r,u,a){var i;return J().w(function(o){for(;;)if(o.n===0)return i=a?Object.assign(a,{direction:"backward"}):{direction:"backward"},o.a(2,Ua(e)(r,u,i))},n)}));return function(n,r,u){return t.apply(this,arguments)}})()})(Tt),Pm=(function(e){return(function(){var t=_e(J().m(function n(r,u,a){return J().w(function(i){for(;;)if(i.n===0)return i.a(2,Ua(e)(r,u,a))},n)}));return function(n,r,u){return t.apply(this,arguments)}})()})(Tt),Ye=T("ZodType",function(e,t){return Je.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(Hn(t,{checks:[].concat(K((n=t.checks)!==null&&n!==void 0?n:[]),K(u.map(function(i){return typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i})))}
107))},e.clone=function(n,r){return Fn(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 Cm(e,n,r,{callee:e.parse})},e.safeParse=function(n,r){return Am(e,n,r)},e.parseAsync=(function(){var n=_e(J().m(function r(u,a){return J().w(function(i){for(;;)if(i.n===0)return i.a(2,km(e,u,a,{callee:e.parseAsync}))},r)}));return function(r,u){return n.apply(this,arguments)}})(),e.safeParseAsync=(function(){var n=_e(J().m(function r(u,a){return J().w(function(i){for(;;)if(i.n===0)return i.a(2,Kf(e,u,a))},r)}));return function(r,u){return n.apply(this,arguments)}})(),e.spa=e.safeParseAsync,e.encode=function(n,r){return wm(e,n,r)},e.decode=function(n,r){return Sm(e,n,r)},e.encodeAsync=(function(){var n=_e(J().m(function r(u,a){return J().w(function(i){for(;;)if(i.n===0)return i.a(2,xm(e,u,a))},r)}));return function(r,u){return n.apply(this,arguments)}})(),e.decodeAsync=(function(){var n=_e(J().m(function r(u,a){return J().w(function(i){for(;;)if(i.n===0)return i.a(2,Om(e,u,a))},r)}));return function(r,u){return n.apply(this,arguments)}})(),e.safeEncode=function(n,r){return Bm(e,n,r)},e.safeDecode=function(n,r){return Im(e,n,r)},e.safeEncodeAsync=(function(){var n=_e(J().m(function r(u,a){return J().w(function(i){for(;;)if(i.n===0)return i.a(2,Tm(e,u,a))},r)}));return function(r,u){return n.apply(this,arguments)}})(),e.safeDecodeAsync=(function(){var n=_e(J().m(function r(u,a){return J().w(function(i){for(;;)if(i.n===0)return i.a(2,Pm(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 Zo(v({type:"custom",check:"custom",fn:i},te(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 st(v({check:"custom"},te(void 0)));return i._zod.check=a,i})(function(a){return a.addIssue=function(i){if(typeof i=="string")a.issues.push(Bu(i,a.value,u._zod.def));else{var o,s,c,l,d=i;d.fatal&&(d.continue=!1),(o=d.code)!==null&&o!==void 0||(d.code="custom"),(s=d.input)!==null&&s!==void 0||(d.input=a.value),(c=d.inst)!==null&&c!==void 0||(d.inst=u),(l=d.continue)!==null&&l!==void 0||(d.continue=!u._zod.def.abort),a.issues.push(Bu(d))}},r(a.value,a)});return u})(n))},e.overwrite=function(n){return e.check(Br(n))},e.optional=function(){return zc(e)},e.nullable=function(){return Rc(e)},e.nullish=function(){return zc(Rc(e))},e.nonoptional=function(n){return(function(r,u){return new nd(v({type:"nonoptional",innerType:r},te(u)))})(e,n)},e.array=function(){return Ir(e)},e.or=function(n){return It([e,n])},e.and=function(n){return new sD({type:"intersection",left:e,right:n})},e.transform=function(n){return Mc(e,new fD({type:"transform",transform:n}))},e.default=function(n){return r=n,new pD({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():Ec(r)}});var r},e.prefault=function(n){return r=n,new hD({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():Ec(r)}});var r},e.catch=function(n){return new vD({type:"catch",innerType:e,catchValue:typeof(r=n)=="function"?r:function(){return r}});var r},e.pipe=function(n){return Mc(e,n)},e.readonly=function(){return new DD({type:"readonly",innerType:e})},e.describe=function(n){var r=e.clone();return Jr.add(r,{description:n}),r},Object.defineProperty(e,"description",{get:function(){var n;return(n=Jr.get(e))===null||n===void 0?void 0:n.description},configurable:!0}),e.meta=function(){if(arguments.length===0)return Jr.get(e);var n=e.clone();return Jr.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=T("_ZodString",function(e,t){var n,r,u;zo.init(e,t),Ye.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(Rf.apply(an,arguments))},e.includes=function(){return e.check(Lf.apply(an,arguments))},e.startsWith=function(){return e.check($f.apply(an,arguments))},e.endsWith=function(){return e.check(qf.apply(an,arguments))},e.min=function(){return e.check(Iu.apply(an,arguments))},e.max=function(){return e.check(Ro.apply(an,arguments))},e.length=function(){return e.check(Mo.apply(an,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(Iu.apply(an,[1].concat(o)))},e.lowercase=function(i){return e.check(Mf(i))},e.uppercase=function(i){return e.check(Zf(i))},e.trim=function(){return e.check(Hf())},e.normalize=function(){return e.check(Uf.apply(an,arguments))},e.toLowerCase=function(){return e.check(Vf())},e.toUpperCase=function(){return e.check(Wf())}}),jm=T("ZodString",function(e,t){zo.init(e,t),Jf.init(e,t),e.email=function(n){return e.check((function(r,u){return new Nm(v({type:"string",format:"email",check:"string_format",abort:!1},te(u)))})(0,n))},e.url=function(n){return e.check((function(r,u){return new zm(v({type:"string",format:"url",check:"string_format",abort:!1},te(u)))})(0,n))},e.jwt=function(n){return e.check((function(r,u){return new Ym(v({type:"string",format:"jwt",check:"string_format",abort:!1},te(u)))})(0,n))},e.emoji=function(n){return e.check((function(r,u){return new Rm(v({type:"string",format:"emoji",check:"string_format",abort:!1},te(u)))})(0,n))},e.guid=function(n){return e.check(Tc(jc,n))},e.uuid=function(n){return e.check((function(r,u){return new na(v({type:"string",format:"uuid",check:"string_format",abort:!1},te(u)))})(0,n))},e.uuidv4=function(n){return e.check((function(r,u){return new na(v({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4"},te(u)))})(0,n))},e.uuidv6=function(n){return e.check((function(r,u){return new na(v({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6"},te(u)))})(0,n))},e.uuidv7=function(n){return e.check((function(r,u){return new na(v({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7"},te(u)))})(0,n))},e.nanoid=function(n){return e.check((function(r,u){return new Mm(v({type:"string",format:"nanoid",check:"string_format",abort:!1},te(u)))})(0,n))},e.guid=function(n){return e.check(Tc(jc,n))},e.cuid=function(n){return e.check((function(r,u){return new Zm(v({type:"string",format:"cuid",check:"string_format",abort:!1},te(u)))})(0,n))},e.cuid2=function(n){return e.check((function(r,u){return new Lm(v({type:"string",format:"cuid2",check:"string_format",abort:!1},te(u)))})(0,n))},e.ulid=function(n){return e.check((function(r,u){return new $m(v({type:"string",format:"ulid",check:"string_format",abort:!1},te(u)))})(0,n))},e.base64=function(n){return e.check((function(r,u){return new Jm(v({type:"string",format:"base64",check:"string_format",abort:!1},te(u)))})(0,n))},e.base64url=function(n){return e.check((function(r,u){return new Qm(v({type:"string",format:"base64url",check:"string_format",abort:!1},te(u)))})(0,n))},e.xid=function(n){return e.check((function(r,u){return new qm(v({type:"string",format:"xid",check:"string_format",abort:!1},te(u)))})(0,n))},e.ksuid=function(n){return e.check((function(r,u){return new Um(v({type:"string",format:"ksuid",check:"string_format",abort:!1},te(u)))})(0,n))},e.ipv4=function(n){return e.check((function(r,u){return new Hm(v({type:"string",format:"ipv4",check:"string_format",abort:!1},te(u)))})(0,n))},e.ipv6=function(n){return e.check((function(r,u){return new Vm(v({type:"string",format:"ipv6",check:"string_format",abort:!1},te(u)))})(0,n))},e.cidrv4=function(n){return e.check((function(r,u){return new Wm(v({type:"string",format:"cidrv4",check:"string_format",abort:!1},te(u)))})(0,n))},e.cidrv6=function(n){return e.check((function(r,u){return new Km(v({type:"string",format:"cidrv6",check:"string_format",abort:!1},te(u)))})(0,n))},e.e164=function(n){return e.check((function(r,u){return new Gm(v({type:"string",format:"e164",check:"string_format",abort:!1},te(u)))})(0,n))},e.datetime=function(n){return e.check((function(r){return(function(u,a){return new Fm(v({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null},te(a)))})(0,r)})(n))},e.date=function(n){return e.check((function(r){return(function(u,a){return new Em(v({type:"string",format:"date",check:"string_format"},te(a)))})(0,r)})(n))}
107,e.time=function(n){return e.check((function(r){return(function(u,a){return new _m(v({type:"string",format:"time",check:"string_format",precision:null},te(a)))})(0,r)})(n))},e.duration=function(n){return e.check((function(r){return(function(u,a){return new bm(v({type:"string",format:"duration",check:"string_format"},te(a)))})(0,r)})(n))}});function le(e){return(function(t,n){return new jm(v({type:"string"},te(n)))})(0,e)}var nt=T("ZodStringFormat",function(e,t){Ge.init(e,t),Jf.init(e,t)}),Nm=T("ZodEmail",function(e,t){xv.init(e,t),nt.init(e,t)}),jc=T("ZodGUID",function(e,t){wv.init(e,t),nt.init(e,t)}),na=T("ZodUUID",function(e,t){Sv.init(e,t),nt.init(e,t)}),zm=T("ZodURL",function(e,t){Ov.init(e,t),nt.init(e,t)}),Rm=T("ZodEmoji",function(e,t){Bv.init(e,t),nt.init(e,t)}),Mm=T("ZodNanoID",function(e,t){Iv.init(e,t),nt.init(e,t)}),Zm=T("ZodCUID",function(e,t){Tv.init(e,t),nt.init(e,t)}),Lm=T("ZodCUID2",function(e,t){Pv.init(e,t),nt.init(e,t)}),$m=T("ZodULID",function(e,t){jv.init(e,t),nt.init(e,t)}),qm=T("ZodXID",function(e,t){Nv.init(e,t),nt.init(e,t)}),Um=T("ZodKSUID",function(e,t){zv.init(e,t),nt.init(e,t)}),Hm=T("ZodIPv4",function(e,t){$v.init(e,t),nt.init(e,t)}),Vm=T("ZodIPv6",function(e,t){qv.init(e,t),nt.init(e,t)}),Wm=T("ZodCIDRv4",function(e,t){Uv.init(e,t),nt.init(e,t)}),Km=T("ZodCIDRv6",function(e,t){Hv.init(e,t),nt.init(e,t)}),Jm=T("ZodBase64",function(e,t){Vv.init(e,t),nt.init(e,t)}),Qm=T("ZodBase64URL",function(e,t){Wv.init(e,t),nt.init(e,t)}),Gm=T("ZodE164",function(e,t){Kv.init(e,t),nt.init(e,t)}),Ym=T("ZodJWT",function(e,t){Jv.init(e,t),nt.init(e,t)}),Qf=T("ZodNumber",function(e,t){var n,r,u,a,i,o,s,c,l;Tf.init(e,t),Ye.init(e,t),e.gt=function(f,h){return e.check(Ca(f,h))},e.gte=function(f,h){return e.check(Eu(f,h))},e.min=function(f,h){return e.check(Eu(f,h))},e.lt=function(f,h){return e.check(ba(f,h))},e.lte=function(f,h){return e.check(Fu(f,h))},e.max=function(f,h){return e.check(Fu(f,h))},e.int=function(f){return e.check(Nc(f))},e.safe=function(f){return e.check(Nc(f))},e.positive=function(f){return e.check(Ca(0,f))},e.nonnegative=function(f){return e.check(Eu(0,f))},e.negative=function(f){return e.check(ba(0,f))},e.nonpositive=function(f){return e.check(Fu(0,f))},e.multipleOf=function(f,h){return e.check(Ii(f,h))},e.step=function(f,h){return e.check(Ii(f,h))},e.finite=function(){return e};var d=e._zod.bag;e.minValue=(n=Math.max((r=d.minimum)!==null&&r!==void 0?r:Number.NEGATIVE_INFINITY,(u=d.exclusiveMinimum)!==null&&u!==void 0?u:Number.NEGATIVE_INFINITY))!==null&&n!==void 0?n:null,e.maxValue=(a=Math.min((i=d.maximum)!==null&&i!==void 0?i:Number.POSITIVE_INFINITY,(o=d.exclusiveMaximum)!==null&&o!==void 0?o:Number.POSITIVE_INFINITY))!==null&&a!==void 0?a:null,e.isInt=((s=d.format)!==null&&s!==void 0?s:"").includes("int")||Number.isSafeInteger((c=d.multipleOf)!==null&&c!==void 0?c:.5),e.isFinite=!0,e.format=(l=d.format)!==null&&l!==void 0?l:null});function Xm(e){return(function(t,n){return new Qf(v({type:"number",checks:[]},te(n)))})(0,e)}var eD=T("ZodNumberFormat",function(e,t){Qv.init(e,t),Qf.init(e,t)});function Nc(e){return(function(t,n){return new eD(v({type:"number",check:"number_format",abort:!1,format:"safeint"},te(n)))})(0,e)}var tD=T("ZodBoolean",function(e,t){Gv.init(e,t),Ye.init(e,t)});function Ft(e){return(function(t,n){return new tD(v({type:"boolean"},te(n)))})(0,e)}var nD=T("ZodNull",function(e,t){Yv.init(e,t),Ye.init(e,t)});function rD(e){return(function(t,n){return new nD(v({type:"null"},te(n)))})(0,e)}var uD=T("ZodUnknown",function(e,t){Xv.init(e,t),Ye.init(e,t)});function Jt(){return new uD({type:"unknown"})}var aD=T("ZodNever",function(e,t){em.init(e,t),Ye.init(e,t)});function Gf(e){return(function(t,n){return new aD(v({type:"never"},te(n)))})(0,e)}var iD=T("ZodArray",function(e,t){tm.init(e,t),Ye.init(e,t),e.element=t.element,e.min=function(n,r){return e.check(Iu(n,r))},e.nonempty=function(n){return e.check(Iu(1,n))},e.max=function(n,r){return e.check(Ro(n,r))},e.length=function(n,r){return e.check(Mo(n,r))},e.unwrap=function(){return e.element}});function Ir(e,t){return(function(n,r,u){return new iD(v({type:"array",element:r},te(u)))})(0,e,t)}var Yf=T("ZodObject",function(e,t){rm.init(e,t),Ye.init(e,t),Te(e,"shape",function(){return t.shape}),e.keyof=function(){return ed(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:Jt()}))},e.loose=function(){return e.clone(v(v({},e._zod.def),{},{catchall:Jt()}))},e.strict=function(){return e.clone(v(v({},e._zod.def),{},{catchall:Gf()}))},e.strip=function(){return e.clone(v(v({},e._zod.def),{},{catchall:void 0}))},e.extend=function(n){return(function(r,u){if(!kr(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=Hn(r._zod.def,{get shape(){var o=v(v({},r._zod.def.shape),u);return qn(this,"shape",o),o},checks:[]});return Fn(r,i)})(e,n)},e.safeExtend=function(n){return(function(r,u){if(!kr(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 qn(this,"shape",i),i},checks:r._zod.def.checks});return Fn(r,a)})(e,n)},e.merge=function(n){return(function(r,u){var a=Hn(r._zod.def,{get shape(){var i=v(v({},r._zod.def.shape),u._zod.def.shape);return qn(this,"shape",i),i},get catchall(){return u._zod.def.catchall},checks:[]});return Fn(r,a)})(e,n)},e.pick=function(n){return(function(r,u){var a=r._zod.def;return Fn(r,Hn(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 qn(this,"shape",i),i},checks:[]}))})(e,n)},e.omit=function(n){return(function(r,u){var a=r._zod.def,i=Hn(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 qn(this,"shape",o),o},checks:[]});return Fn(r,i)})(e,n)},e.partial=function(){return(function(n,r,u){var a=Hn(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]=new n({type:"optional",innerType:i[s]}))}else for(var c in i)o[c]=new n({type:"optional",innerType:i[c]});return qn(this,"shape",o),o},checks:[]});return Fn(r,a)})(td,e,arguments.length<=0?void 0:arguments[0])},e.required=function(){return(function(n,r,u){var a=Hn(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 qn(this,"shape",o),o},checks:[]});return Fn(r,a)})(nd,e,arguments.length<=0?void 0:arguments[0])}});function lt(e,t){var n=v({type:"object",shape:e??{}},te(t));return new Yf(n)}function et(e,t){return new Yf(v({type:"object",shape:e,catchall:Gf()},te(t)))}var Xf=T("ZodUnion",function(e,t){Nf.init(e,t),Ye.init(e,t),e.options=t.options});function It(e,t){return new Xf(v({type:"union",options:e},te(t)))}var oD=T("ZodDiscriminatedUnion",function(e,t){Xf.init(e,t),um.init(e,t)}),sD=T("ZodIntersection",function(e,t){am.init(e,t),Ye.init(e,t)}),cD=T("ZodRecord",function(e,t){im.init(e,t),Ye.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});
107function Ti(e,t,n){return new cD(v({type:"record",keyType:e,valueType:t},te(n)))}var Pi=T("ZodEnum",function(e,t){om.init(e,t),Ye.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=V(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"));i[s]=t.entries[s]}}catch(c){o.e(c)}finally{o.f()}return new Pi(v(v(v({},t),{},{checks:[]},te(u)),{},{entries:i}))},e.exclude=function(r,u){var a,i=v({},t.entries),o=V(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 Pi(v(v(v({},t),{},{checks:[]},te(u)),{},{entries:i}))}});function ed(e,t){var n=Array.isArray(e)?Object.fromEntries(e.map(function(r){return[r,r]})):e;return new Pi(v({type:"enum",entries:n},te(t)))}var lD=T("ZodLiteral",function(e,t){sm.init(e,t),Ye.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 lD(v({type:"literal",values:Array.isArray(e)?e:[e]},te(t)))}var fD=T("ZodTransform",function(e,t){cm.init(e,t),Ye.init(e,t),e._zod.parse=function(n,r){if(r.direction==="backward")throw new Ff(e.constructor.name);n.addIssue=function(a){if(typeof a=="string")n.issues.push(Bu(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(Bu(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)}}),td=T("ZodOptional",function(e,t){lm.init(e,t),Ye.init(e,t),e.unwrap=function(){return e._zod.def.innerType}});function zc(e){return new td({type:"optional",innerType:e})}var dD=T("ZodNullable",function(e,t){fm.init(e,t),Ye.init(e,t),e.unwrap=function(){return e._zod.def.innerType}});function Rc(e){return new dD({type:"nullable",innerType:e})}var pD=T("ZodDefault",function(e,t){dm.init(e,t),Ye.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeDefault=e.unwrap}),hD=T("ZodPrefault",function(e,t){pm.init(e,t),Ye.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),nd=T("ZodNonOptional",function(e,t){hm.init(e,t),Ye.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),vD=T("ZodCatch",function(e,t){vm.init(e,t),Ye.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeCatch=e.unwrap}),mD=T("ZodPipe",function(e,t){mm.init(e,t),Ye.init(e,t),e.in=t.in,e.out=t.out});function Mc(e,t){return new mD({type:"pipe",in:e,out:t})}var Oe,Zc,DD=T("ZodReadonly",function(e,t){Dm.init(e,t),Ye.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),gD=T("ZodLazy",function(e,t){gm.init(e,t),Ye.init(e,t),e.unwrap=function(){return e._zod.def.getter()}}),Zo=T("ZodCustom",function(e,t){ym.init(e,t),Ye.init(e,t)});function rd(e,t){return(function(n,r,u){var a,i=te(u);return(a=i.abort)!==null&&a!==void 0||(i.abort=!0),new n(v({type:"custom",check:"custom",fn:r},i))})(Zo,e??function(){return!0},t)}function ka(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{error:"Input not instance of ".concat(e.name)},n=new Zo(v({type:"custom",check:"custom",fn:function(r){return r instanceof e},abort:!0},te(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=V(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=V(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=V(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={})),(Zc||(Zc={})).mergeShapes=function(e,t){return v(v({},e),t)};var X=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),bn=function(e){switch(ot(e)){case"undefined":return X.undefined;case"string":return X.string;case"number":return Number.isNaN(e)?X.nan:X.number;case"boolean":return X.boolean;case"function":return X.function;case"bigint":return X.bigint;case"symbol":return X.symbol;case"object":return Array.isArray(e)?X.array:e===null?X.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?X.promise:typeof Map<"u"&&e instanceof Map?X.map:typeof Set<"u"&&e instanceof Set?X.set:typeof Date<"u"&&e instanceof Date?X.date:X.object;default:return X.unknown}}
107,Z=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"]),Gt=(function(){function e(t){var n;ae(this,e),(n=me(this,e)).issues=[],n.addIssue=function(u){n.issues=[].concat(K(n.issues),[u])},n.addIssues=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];n.issues=[].concat(K(n.issues),K(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 pe(e,xn(Error)),ie(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=V(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,l=0;l<s.path.length;){var d=s.path[l];l===s.path.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(n(s))):c[d]=c[d]||{_errors:[]},c=c[d],l++}}}catch(f){o.e(f)}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=V(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))}}])})();Gt.create=function(e){return new Gt(e)};var Tu=function(e,t){var n;switch(e.code){case Z.invalid_type:n=e.received===X.undefined?"Required":"Expected ".concat(e.expected,", received ").concat(e.received);break;case Z.invalid_literal:n="Invalid literal value, expected ".concat(JSON.stringify(e.expected,Oe.jsonStringifyReplacer));break;case Z.unrecognized_keys:n="Unrecognized key(s) in object: ".concat(Oe.joinValues(e.keys,", "));break;case Z.invalid_union:n="Invalid input";break;case Z.invalid_union_discriminator:n="Invalid discriminator value. Expected ".concat(Oe.joinValues(e.options));break;case Z.invalid_enum_value:n="Invalid enum value. Expected ".concat(Oe.joinValues(e.options),", received '").concat(e.received,"'");break;case Z.invalid_arguments:n="Invalid function arguments";break;case Z.invalid_return_type:n="Invalid function return type";break;case Z.invalid_date:n="Invalid date";break;case Z.invalid_string:ot(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 Z.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 Z.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 Z.custom:n="Invalid input";break;case Z.invalid_intersection_types:n="Intersection results could not be merged";break;case Z.not_multiple_of:n="Number must be a multiple of ".concat(e.multipleOf);break;case Z.not_finite:n="Number must be finite";break;default:n=t.defaultError,Oe.assertNever(e)}return{message:n}},yD=Tu;function ji(){return yD}var Ni=function(e){var t=e.data,n=e.path,r=e.errorMaps,u=e.issueData,a=[].concat(K(n),K(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(d){return!!d}).slice().reverse(),l=V(c);try{for(l.s();!(o=l.n()).done;)s=(0,o.value)(i,{data:t,defaultError:s}).message}catch(d){l.e(d)}finally{l.f()}return v(v({},u),{},{path:a,message:s})};function Q(e,t){var n=ji(),r=Ni({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Tu?void 0:Tu].filter(function(u){return!!u})});e.common.issues.push(r)}var se,St=(function(){function e(){ae(this,e),this.value="valid"}return ie(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=V(r);try{for(i.s();!(u=i.n()).done;){var o=u.value;if(o.status==="aborted")return ve;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=_e(J().m(function n(r,u){var a,i,o,s,c,l,d;return J().w(function(f){for(;;)switch(f.p=f.n){case 0:a=[],i=V(u),f.p=1,i.s();case 2:if((o=i.n()).done){f.n=6;break}return s=o.value,f.n=3,s.key;case 3:return c=f.v,f.n=4,s.value;case 4:l=f.v,a.push({key:c,value:l});case 5:f.n=2;break;case 6:f.n=8;break;case 7:f.p=7,d=f.v,i.e(d);case 8:return f.p=8,i.f(),f.f(8);case 9:return f.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=V(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 ve;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(l){i.e(l)}finally{i.f()}return{status:n.value,value:a}}}]);var t})(),ve=Object.freeze({status:"aborted"}),la=function(e){return{status:"dirty",value:e}},Et=function(e){return{status:"valid",value:e}},Lc=function(e){return e.status==="aborted"},$c=function(e){return e.status==="dirty"},wr=function(e){return e.status==="valid"},Aa=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}})(se||(se={}));var Yt=ie(function e(t,n,r,u){ae(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,K(this._path).concat(K(this._key))):(t=this._cachedPath).push.apply(t,K(this._path).concat([this._key]))),this._cachedPath}}]),qc=function(e,t){if(wr(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 Gt(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 si,Ae=(function(){return ie(function t(n){var r=this;ae(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 bn(t.data)}},{key:"_getOrReturnCtx",value:function(t,n){return n||{common:t.parent.common,data:t.data,parsedType:bn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}},{key:"_processInputParams",value:function(t){return{status:new St,ctx:{common:t.parent.common,data:t.data,parsedType:bn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}},{key:"_parseSync",value:function(t){var n=this._parse(t);if(Aa(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:bn(t)},a=this._parseSync({data:t,path:u.path,parent:u});return qc(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:bn(t)};if(!this["~standard"].async)try{var r=this._parseSync({data:t,path:[],parent:n});return wr(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 wr(a)?{value:a.value}:{issues:n.common.issues}})}},{key:"parseAsync",value:(e=_e(J().m(function t(n,r){var u;return J().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=_e(J().m(function n(r,u){var a,i,o;return J().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:bn(r)},i=this._parse({data:r,path:a.path,parent:a}),s.n=1,Aa(i)?i:Promise.resolve(i);case 1:return o=s.v,s.a(2,qc(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:Z.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 on({schema:this,typeName:q.ZodEffects,effect:{type:"refinement",refinement:t}})}},{key:"superRefine",value:function(t){return this._refinement(t)}},{key:"optional",value:function(){return ln.create(this,this._def)}},{key:"nullable",value:function(){return Gn.create(this,this._def)}},{key:"nullish",value:function(){return this.nullable().optional()}},{key:"array",value:function(){return Sr.create(this)}},{key:"promise",value:function(){return Pu.create(this,this._def)}},{key:"or",value:function(t){return Oa.create([this,t],this._def)}},{key:"and",value:function(t){return Ba.create(this,t,this._def)}},{key:"transform",value:function(t){return new on(v(v({},ge(this._def)),{},{schema:this,typeName:q.ZodEffects,effect:{type:"transform",transform:t}}))}},{key:"default",value:function(t){var n=typeof t=="function"?t:function(){return t};return new ja(v(v({},ge(this._def)),{},{innerType:this,defaultValue:n,typeName:q.ZodDefault}))}},{key:"brand",value:function(){return new od(v({typeName:q.ZodBranded,type:this},ge(this._def)))}},{key:"catch",value:function(t){var n=typeof t=="function"?t:function(){return t};return new Na(v(v({},ge(this._def)),{},{innerType:this,catchValue:n,typeName:q.ZodCatch}))}},{key:"describe",value:function(t){return new this.constructor(v(v({},this._def),{},{description:t}))}},{key:"pipe",value:function(t){return sd.create(this,t)}},{key:"readonly",value:function(){return za.create(this)}},{key:"isOptional",value:function(){return this.safeParse(void 0).success}},{key:"isNullable",value:function(){return this.safeParse(null).success}}]);var e})(),FD=/^c[^\s-]{8,}$/i,ED=/^[0-9a-z]+$/,_D=/^[0-9A-HJKMNP-TV-Z]{26}$/i,bD=/^[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,CD=/^[a-z0-9_-]{21}$/i,kD=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,AD=/^[-+]?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)?)??$/,wD=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,SD=/^(?:(?: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])$/,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])$/,OD=/^(([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]))$/,BD=/^(([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])$/,ID=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,TD=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ud="((\\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])))",PD=new RegExp("^".concat(ud,"$"));function ad(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 jD(e){return new RegExp("^".concat(ad(e),"$"))}function ND(e){var t="".concat(ud,"T").concat(ad(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 zD(e,t){return!(t!=="v4"&&t||!SD.test(e))||!(t!=="v6"&&t||!OD.test(e))}function RD(e,t){if(!kD.test(e))return!1;try{var n=Be(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!(ot(u)!=="object"||u===null||"typ"in u&&u?.typ!=="JWT"||!u.alg||t&&u.alg!==t)}catch{return!1}}function MD(e,t){return!(t!=="v4"&&t||!xD.test(e))||!(t!=="v6"&&t||!BD.test(e))}var wa=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==X.string){var n=this._getOrReturnCtx(t);return Q(n,{code:Z.invalid_type,expected:X.string,received:n.parsedType}),ve}var r,u=new St,a=void 0,i=V(this._def.checks);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.kind==="min")t.data.length<o.value&&(Q(a=this._getOrReturnCtx(t,a),{co
107de:Z.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&&(Q(a=this._getOrReturnCtx(t,a),{code:Z.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?Q(a,{code:Z.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):c&&Q(a,{code:Z.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),u.dirty())}else if(o.kind==="email")wD.test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{validation:"email",code:Z.invalid_string,message:o.message}),u.dirty());else if(o.kind==="emoji")si||(si=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),si.test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{validation:"emoji",code:Z.invalid_string,message:o.message}),u.dirty());else if(o.kind==="uuid")bD.test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{validation:"uuid",code:Z.invalid_string,message:o.message}),u.dirty());else if(o.kind==="nanoid")CD.test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{validation:"nanoid",code:Z.invalid_string,message:o.message}),u.dirty());else if(o.kind==="cuid")FD.test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{validation:"cuid",code:Z.invalid_string,message:o.message}),u.dirty());else if(o.kind==="cuid2")ED.test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{validation:"cuid2",code:Z.invalid_string,message:o.message}),u.dirty());else if(o.kind==="ulid")_D.test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{validation:"ulid",code:Z.invalid_string,message:o.message}),u.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{Q(a=this._getOrReturnCtx(t,a),{validation:"url",code:Z.invalid_string,message:o.message}),u.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{validation:"regex",code:Z.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)||(Q(a=this._getOrReturnCtx(t,a),{code:Z.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)||(Q(a=this._getOrReturnCtx(t,a),{code:Z.invalid_string,validation:{startsWith:o.value},message:o.message}),u.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(Q(a=this._getOrReturnCtx(t,a),{code:Z.invalid_string,validation:{endsWith:o.value},message:o.message}),u.dirty()):o.kind==="datetime"?ND(o).test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{code:Z.invalid_string,validation:"datetime",message:o.message}),u.dirty()):o.kind==="date"?PD.test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{code:Z.invalid_string,validation:"date",message:o.message}),u.dirty()):o.kind==="time"?jD(o).test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{code:Z.invalid_string,validation:"time",message:o.message}),u.dirty()):o.kind==="duration"?AD.test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{validation:"duration",code:Z.invalid_string,message:o.message}),u.dirty()):o.kind==="ip"?zD(t.data,o.version)||(Q(a=this._getOrReturnCtx(t,a),{validation:"ip",code:Z.invalid_string,message:o.message}),u.dirty()):o.kind==="jwt"?RD(t.data,o.alg)||(Q(a=this._getOrReturnCtx(t,a),{validation:"jwt",code:Z.invalid_string,message:o.message}),u.dirty()):o.kind==="cidr"?MD(t.data,o.version)||(Q(a=this._getOrReturnCtx(t,a),{validation:"cidr",code:Z.invalid_string,message:o.message}),u.dirty()):o.kind==="base64"?ID.test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{validation:"base64",code:Z.invalid_string,message:o.message}),u.dirty()):o.kind==="base64url"?TD.test(t.data)||(Q(a=this._getOrReturnCtx(t,a),{validation:"base64url",code:Z.invalid_string,message:o.message}),u.dirty()):Oe.assertNever(o)}}catch(l){i.e(l)}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:Z.invalid_string},se.errToObj(r)))}},{key:"_addCheck",value:function(t){return new e(v(v({},this._def),{},{checks:[].concat(K(this._def.checks),[t])}))}},{key:"email",value:function(t){return this._addCheck(v({kind:"email"},se.errToObj(t)))}},{key:"url",value:function(t){return this._addCheck(v({kind:"url"},se.errToObj(t)))}},{key:"emoji",value:function(t){return this._addCheck(v({kind:"emoji"},se.errToObj(t)))}},{key:"uuid",value:function(t){return this._addCheck(v({kind:"uuid"},se.errToObj(t)))}},{key:"nanoid",value:function(t){return this._addCheck(v({kind:"nanoid"},se.errToObj(t)))}},{key:"cuid",value:function(t){return this._addCheck(v({kind:"cuid"},se.errToObj(t)))}},{key:"cuid2",value:function(t){return this._addCheck(v({kind:"cuid2"},se.errToObj(t)))}},{key:"ulid",value:function(t){return this._addCheck(v({kind:"ulid"},se.errToObj(t)))}},{key:"base64",value:function(t){return this._addCheck(v({kind:"base64"},se.errToObj(t)))}},{key:"base64url",value:function(t){return this._addCheck(v({kind:"base64url"},se.errToObj(t)))}},{key:"jwt",value:function(t){return this._addCheck(v({kind:"jwt"},se.errToObj(t)))}},{key:"ip",value:function(t){return this._addCheck(v({kind:"ip"},se.errToObj(t)))}},{key:"cidr",value:function(t){return this._addCheck(v({kind:"cidr"},se.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},se.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},se.errToObj(t?.message)))}},{key:"duration",value:function(t){return this._addCheck(v({kind:"duration"},se.errToObj(t)))}},{key:"regex",value:function(t,n){return this._addCheck(v({kind:"regex",regex:t},se.errToObj(n)))}},{key:"includes",value:function(t,n){return this._addCheck(v({kind:"includes",value:t,position:n?.position},se.errToObj(n?.message)))}},{key:"startsWith",value:function(t,n){return this._addCheck(v({kind:"startsWith",value:t},se.errToObj(n)))}},{key:"endsWith",value:function(t,n){return this._addCheck(v({kind:"endsWith",value:t},se.errToObj(n)))}},{key:"min",value:function(t,n){return this._addCheck(v({kind:"min",value:t},se.errToObj(n)))}},{key:"max",value:function(t,n){return this._addCheck(v({kind:"max",value:t},se.errToObj(n)))}},{key:"length",value:function(t,n){return this._addCheck(v({kind:"length",value:t},se.errToObj(n)))}},{key:"nonempty",value:function(t){return this.min(1,se.errToObj(t))}},{key:"trim",value:function(){return new e(v(v({},this._def),{},{checks:[].concat(K(this._def.checks),[{kind:"trim"}])}))}},{key:"toLowerCase",value:function(){return new e(v(v({},this._def),{},{checks:[].concat(K(this._def.checks),[{kind:"toLowerCase"}])}))}},{key:"toUpperCase",value:function(){return new e(v(v({},this._def),{},{checks:[].concat(K(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=V(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=V(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 ZD(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)}wa.create=function(e){var t;return new wa(v({checks:[],typeName:q.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0&&t},ge(e)))};var zi=(function(){function e(){var t;return ae(this,e),(t=me(this,e,arguments)).min=t.gte,t.max=t.lte,t.step=t.multipleOf,t}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==X.number){var n=this._getOrReturnCtx(t);return Q(n,{code:Z.invalid_type,expected:X.number,received:n.parsedType}),ve}var r,u=void 0,a=new St,i=V(this._def.checks);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.kind==="int"?Oe.isInteger(t.data)||(Q(u=this._getOrReturnCtx(t,u),{code:Z.invalid_type,expected:"integer",received:"float",message:o.message}),a.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(Q(u=this._getOrReturnCtx(t,u),{code:Z.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)&&(Q(u=this._getOrReturnCtx(t,u),{code:Z.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="multipleOf"?ZD(t.data,o.value)!==0&&(Q(u=this._getOrReturnCtx(t,u),{code:Z.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(Q(u=this._getOrReturnCtx(t,u),{code:Z.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,se.toString(n))}},{key:"gt",value:function(t,n){return this.setLimit("min",t,!1,se.toString(n))}},{key:"lte",value:function(t,n){return this.setLimit("max",t,!0,se.toString(n))}},{key:"lt",value:function(t,n){return this.setLimit("max",t,!1,se.toString(n))}},{key:"setLimit",value:function(t,n,r,u){return new e(v(v({},this._def),{},{checks:[].concat(K(this._def.checks),[{kind:t,value:n,inclusive:r,message:se.toString(u)}])}))}},{key:"_addCheck",value:function(t){return new e(v(v({},this._def),{},{checks:[].concat(K(this._def.checks),[t])}))}},{key:"int",value:function(t){return this._addCheck({kind:"int",message:se.toString(t)})}},{key:"positive",value:function(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:se.toString(t)})}},{key:"negative",value:function(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:se.toString(t)})}},{key:"nonpositive",value:function(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:se.toString(t)})}},{key:"nonnegative",value:function(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:se.toString(t)})}},{key:"multipleOf",value:function(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}},{key:"finite",value:function(t){return this._addCheck({kind:"finite",message:se.toString(t)})}},{key:"safe",value:function(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:se.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:se.toString(t)})}},{key:"minValue",get:function(){var t,n=null,r=V(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=V(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=V(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)}}])})();zi.create=function(e){return new zi(v({checks:[],typeName:q.ZodNumber,coerce:e?.coerce||!1},ge(e)))};var Ri=(function(){function e(){var t;return ae(this,e),(t=me(this,e,arguments)).min=t.gte,t.max=t.lte,t}return pe(e,Ae),ie(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)!==X.bigint)return this._getInvalidInput(t);var n,r=void 0,u=new St,a=V(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)&&(Q(r=this._getOrReturnCtx(t,r),{code:Z.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)&&(Q(r=this._getOrReturnCtx(t,r),{code:Z.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),u.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(Q(r=this._getOrReturnCtx(t,r),{code:Z.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 Q(n,{code:Z.invalid_type,expected:X.bigint,received:n.parsedType}),ve}},{key:"gte",value:function(t,n){return this.setLimit("min",t,!0,se.toString(n))}},{key:"gt",value:function(t,n){return this.setLimit("min",t,!1,se.toString(n))}},{key:"lte",value:function(t,n){return this.setLimit("max",t,!0,se.toString(n))}},{key:"lt",value:function(t,n){return this.setLimit("max",t,!1,se.toString(n))}},{key:"setLimit",value:function(t,n,r,u){return new e(v(v({},this._def),{},{checks:[].concat(K(this._def.checks),[{kind:t,value:n,inclusive:r,message:se.toString(u)}])}))}},{key:"_addCheck",value:function(t){return new e(v(v({},this._def),{},{checks:[].concat(K(this._def.checks),[t])}))}},{key:"positive",value:function(t){return this._addCheck({kind:"min",value:
107BigInt(0),inclusive:!1,message:se.toString(t)})}},{key:"negative",value:function(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:se.toString(t)})}},{key:"nonpositive",value:function(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:se.toString(t)})}},{key:"nonnegative",value:function(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:se.toString(t)})}},{key:"multipleOf",value:function(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}},{key:"minValue",get:function(){var t,n=null,r=V(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=V(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}}])})();Ri.create=function(e){var t;return new Ri(v({checks:[],typeName:q.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0&&t},ge(e)))};var Mi=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==X.boolean){var n=this._getOrReturnCtx(t);return Q(n,{code:Z.invalid_type,expected:X.boolean,received:n.parsedType}),ve}return Et(t.data)}}])})();Mi.create=function(e){return new Mi(v({typeName:q.ZodBoolean,coerce:e?.coerce||!1},ge(e)))};var Zi=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==X.date){var n=this._getOrReturnCtx(t);return Q(n,{code:Z.invalid_type,expected:X.date,received:n.parsedType}),ve}if(Number.isNaN(t.data.getTime()))return Q(this._getOrReturnCtx(t),{code:Z.invalid_date}),ve;var r,u=new St,a=void 0,i=V(this._def.checks);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.kind==="min"?t.data.getTime()<o.value&&(Q(a=this._getOrReturnCtx(t,a),{code:Z.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),u.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(Q(a=this._getOrReturnCtx(t,a),{code:Z.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(K(this._def.checks),[t])}))}},{key:"min",value:function(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:se.toString(n)})}},{key:"max",value:function(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:se.toString(n)})}},{key:"minDate",get:function(){var t,n=null,r=V(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=V(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}}])})();Zi.create=function(e){return new Zi(v({checks:[],coerce:e?.coerce||!1,typeName:q.ZodDate},ge(e)))};var Li=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){if(this._getType(t)!==X.symbol){var n=this._getOrReturnCtx(t);return Q(n,{code:Z.invalid_type,expected:X.symbol,received:n.parsedType}),ve}return Et(t.data)}}])})();Li.create=function(e){return new Li(v({typeName:q.ZodSymbol},ge(e)))};var Sa=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){if(this._getType(t)!==X.undefined){var n=this._getOrReturnCtx(t);return Q(n,{code:Z.invalid_type,expected:X.undefined,received:n.parsedType}),ve}return Et(t.data)}}])})();Sa.create=function(e){return new Sa(v({typeName:q.ZodUndefined},ge(e)))};var xa=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){if(this._getType(t)!==X.null){var n=this._getOrReturnCtx(t);return Q(n,{code:Z.invalid_type,expected:X.null,received:n.parsedType}),ve}return Et(t.data)}}])})();xa.create=function(e){return new xa(v({typeName:q.ZodNull},ge(e)))};var $i=(function(){function e(){var t;return ae(this,e),(t=me(this,e,arguments))._any=!0,t}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){return Et(t.data)}}])})();$i.create=function(e){return new $i(v({typeName:q.ZodAny},ge(e)))};var Fr=(function(){function e(){var t;return ae(this,e),(t=me(this,e,arguments))._unknown=!0,t}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){return Et(t.data)}}])})();Fr.create=function(e){return new Fr(v({typeName:q.ZodUnknown},ge(e)))};var An=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){var n=this._getOrReturnCtx(t);return Q(n,{code:Z.invalid_type,expected:X.never,received:n.parsedType}),ve}}])})();An.create=function(e){return new An(v({typeName:q.ZodNever},ge(e)))};var qi=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){if(this._getType(t)!==X.undefined){var n=this._getOrReturnCtx(t);return Q(n,{code:Z.invalid_type,expected:X.void,received:n.parsedType}),ve}return Et(t.data)}}])})();qi.create=function(e){return new qi(v({typeName:q.ZodVoid},ge(e)))};var Sr=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t),r=n.ctx,u=n.status,a=this._def;if(r.parsedType!==X.array)return Q(r,{code:Z.invalid_type,expected:X.array,received:r.parsedType}),ve;if(a.exactLength!==null){var i=r.data.length>a.exactLength.value,o=r.data.length<a.exactLength.value;(i||o)&&(Q(r,{code:i?Z.too_big:Z.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&&(Q(r,{code:Z.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&&(Q(r,{code:Z.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),u.dirty()),r.common.async)return Promise.all(K(r.data).map(function(c,l){return a.type._parseAsync(new Yt(r,c,r.path,l))})).then(function(c){return St.mergeArray(u,c)});var s=K(r.data).map(function(c,l){return a.type._parseSync(new Yt(r,c,r.path,l))});return St.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:se.toString(n)}}))}},{key:"max",value:function(t,n){return new e(v(v({},this._def),{},{maxLength:{value:t,message:se.toString(n)}}))}},{key:"length",value:function(t,n){return new e(v(v({},this._def),{},{exactLength:{value:t,message:se.toString(n)}}))}},{key:"nonempty",value:function(t){return this.min(1,t)}}])})();function dr(e){if(e instanceof Zt){var t={};for(var n in e.shape){var r=e.shape[n];t[n]=ln.create(dr(r))}return new Zt(v(v({},e._def),{},{shape:function(){return t}}))}return e instanceof Sr?new Sr(v(v({},e._def),{},{type:dr(e.element)})):e instanceof ln?ln.create(dr(e.unwrap())):e instanceof Gn?Gn.create(dr(e.unwrap())):e instanceof Qn?Qn.create(e.items.map(function(u){return dr(u)})):e}Sr.create=function(e,t){return new Sr(v({type:e,minLength:null,maxLength:null,exactLength:null,typeName:q.ZodArray},ge(t)))};var Zt=(function(){function e(){var t;return ae(this,e),(t=me(this,e,arguments))._cached=null,t.nonstrict=t.passthrough,t.augment=t.extend,t}return pe(e,Ae),ie(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)!==X.object){var n=this._getOrReturnCtx(t);return Q(n,{code:Z.invalid_type,expected:X.object,received:n.parsedType}),ve}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 An&&this._def.unknownKeys==="strip"))for(var l in a.data)s.includes(l)||c.push(l);var d,f=[],h=V(s);try{for(h.s();!(d=h.n()).done;){var D=d.value,m=o[D],y=a.data[D];
107f.push({key:{status:"valid",value:D},value:m._parse(new Yt(a,y,a.path,D)),alwaysSet:D in a.data})}}catch(B){h.e(B)}finally{h.f()}if(this._def.catchall instanceof An){var E=this._def.unknownKeys;if(E==="passthrough"){var g,b=V(c);try{for(b.s();!(g=b.n()).done;){var F=g.value;f.push({key:{status:"valid",value:F},value:{status:"valid",value:a.data[F]}})}}catch(B){b.e(B)}finally{b.f()}}else if(E==="strict")c.length>0&&(Q(a,{code:Z.unrecognized_keys,keys:c}),u.dirty());else if(E!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{var _,C=this._def.catchall,k=V(c);try{for(k.s();!(_=k.n()).done;){var A=_.value,j=a.data[A];f.push({key:{status:"valid",value:A},value:C._parse(new Yt(a,j,a.path,A)),alwaysSet:A in a.data})}}catch(B){k.e(B)}finally{k.f()}}return a.common.async?Promise.resolve().then(_e(J().m(function B(){var S,O,P,x,z,I,w;return J().w(function(N){for(;;)switch(N.p=N.n){case 0:S=[],O=V(f),N.p=1,O.s();case 2:if((P=O.n()).done){N.n=6;break}return x=P.value,N.n=3,x.key;case 3:return z=N.v,N.n=4,x.value;case 4:I=N.v,S.push({key:z,value:I,alwaysSet:x.alwaysSet});case 5:N.n=2;break;case 6:N.n=8;break;case 7:N.p=7,w=N.v,O.e(w);case 8:return N.p=8,O.f(),N.f(8);case 9:return N.a(2,S)}},B,null,[[1,7,8,9]])}))).then(function(B){return St.mergeObjectSync(u,B)}):St.mergeObjectSync(u,f)}},{key:"shape",get:function(){return this._def.shape()}},{key:"strict",value:function(t){var n=this;return se.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=se.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:q.ZodObject})}},{key:"setKey",value:function(t,n){return this.augment(xe({},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=V(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=V(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 dr(this)}},{key:"partial",value:function(t){var n,r={},u=V(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=V(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 ln;)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 id(Oe.objectKeys(this.shape))}}])})();Zt.create=function(e,t){return new Zt(v({shape:function(){return e},unknownKeys:"strip",catchall:An.create(),typeName:q.ZodObject},ge(t)))},Zt.strictCreate=function(e,t){return new Zt(v({shape:function(){return e},unknownKeys:"strict",catchall:An.create(),typeName:q.ZodObject},ge(t)))},Zt.lazycreate=function(e,t){return new Zt(v({shape:e,unknownKeys:"strip",catchall:An.create(),typeName:q.ZodObject},ge(t)))};var Oa=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(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=_e(J().m(function D(m){var y,E,g;return J().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,m._parseAsync({data:n.data,path:n.path,parent:y});case 1:return E=b.v,g=y,b.a(2,{result:E,ctx:g})}},D)}));return function(D){return h.apply(this,arguments)}})())).then(function(h){var D,m=V(h);try{for(m.s();!(D=m.n()).done;){var y=D.value;if(y.result.status==="valid")return y.result}}catch(C){m.e(C)}finally{m.f()}var E,g=V(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,K(F.ctx.common.issues)),F.result}}catch(C){g.e(C)}finally{g.f()}var _=h.map(function(C){return new Gt(C.ctx.common.issues)});return Q(n,{code:Z.invalid_union,unionErrors:_}),ve});var u,a,i=void 0,o=[],s=V(r);try{for(s.s();!(u=s.n()).done;){var c=u.value,l=v(v({},n),{},{common:v(v({},n.common),{},{issues:[]}),parent:null}),d=c._parseSync({data:n.data,path:n.path,parent:l});if(d.status==="valid")return d;d.status!=="dirty"||i||(i={result:d,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}}catch(h){s.e(h)}finally{s.f()}if(i)return(a=n.common.issues).push.apply(a,K(i.ctx.common.issues)),i.result;var f=o.map(function(h){return new Gt(h)});return Q(n,{code:Z.invalid_union,unionErrors:f}),ve}},{key:"options",get:function(){return this._def.options}}])})();Oa.create=function(e,t){return new Oa(v({options:e,typeName:q.ZodUnion},ge(t)))};var En=function(e){return e instanceof Ia?En(e.schema):e instanceof on?En(e.innerType()):e instanceof Ta?[e.value]:e instanceof Va?e.options:e instanceof Pa?Oe.objectValues(e.enum):e instanceof ja?En(e._def.innerType):e instanceof Sa?[void 0]:e instanceof xa?[null]:e instanceof ln?[void 0].concat(K(En(e.unwrap()))):e instanceof Gn?[null].concat(K(En(e.unwrap()))):e instanceof od||e instanceof za?En(e.unwrap()):e instanceof Na?En(e._def.innerType):[]},LD=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t).ctx;if(n.parsedType!==X.object)return Q(n,{code:Z.invalid_type,expected:X.object,received:n.parsedType}),ve;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}):(Q(n,{code:Z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ve)}},{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=V(n);try{for(i.s();!(u=i.n()).done;){var o=u.value,s=En(o.shape[t]);if(!s.length)throw new Error("A discriminator value for key `".concat(t,"` could not be extracted from all schema options"));var c,l=V(s);try{for(l.s();!(c=l.n()).done;){var d=c.value;if(a.has(d))throw new Error("Discriminator property ".concat(String(t)," has duplicate value ").concat(String(d)));a.set(d,o)}}catch(f){l.e(f)}finally{l.f()}}}catch(f){i.e(f)}finally{i.f()}return new e(v({typeName:q.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a},ge(r)))}}])})();function Ui(e,t){var n=bn(e),r=bn(t);if(e===t)return{valid:!0,data:e};if(n===X.object&&r===X.object){var u,a=Oe.objectKeys(t),i=Oe.objectKeys(e).filter(function(D){return a.indexOf(D)!==-1}),o=v(v({},e),t),s=V(i);try{for(s.s();!(u=s.n()).done;){var c=u.value,l=Ui(e[c],t[c]);if(!l.valid)return{valid:!1};o[c]=l.data}}catch(D){s.e(D)}finally{s.f()}return{valid:!0,data:o}}if(n===X.array&&r===X.array){if(e.length!==t.length)return{valid:!1};for(var d=[],f=0;f<e.length;f++){var h=Ui(e[f],t[f]);if(!h.valid)return{valid:!1};d.push(h.data)}return{valid:!0,data:d}}return n===X.date&&r===X.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Ba=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t),r=n.status,u=n.ctx,a=function(i,o){if(Lc(i)||Lc(o))return ve;var s=Ui(i.value,o.value);return s.valid?(($c(i)||$c(o))&&r.dirty(),{status:r.value,value:s.data}):(Q(u,{code:Z.invalid_intersection_types}),ve)};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=Be(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}))}}])})();Ba.create=function(e,t,n){return new Ba(v({left:e,right:t,typeName:q.ZodIntersection},ge(n)))};var Qn=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){var n=this,r=this._processInputParams(t),u=r.status,a=r.ctx;
107if(a.parsedType!==X.array)return Q(a,{code:Z.invalid_type,expected:X.array,received:a.parsedType}),ve;if(a.data.length<this._def.items.length)return Q(a,{code:Z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&a.data.length>this._def.items.length&&(Q(a,{code:Z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),u.dirty());var i=K(a.data).map(function(o,s){var c=n._def.items[s]||n._def.rest;return c?c._parse(new Yt(a,o,a.path,s)):null}).filter(function(o){return!!o});return a.common.async?Promise.all(i).then(function(o){return St.mergeArray(u,o)}):St.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}))}}])})();Qn.create=function(e,t){if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qn(v({items:e,typeName:q.ZodTuple,rest:null},ge(t)))};var $D=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(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!==X.object)return Q(u,{code:Z.invalid_type,expected:X.object,received:u.parsedType}),ve;var a=[],i=this._def.keyType,o=this._def.valueType;for(var s in u.data)a.push({key:i._parse(new Yt(u,s,u.path,s)),value:o._parse(new Yt(u,u.data[s],u.path,s)),alwaysSet:s in u.data});return u.common.async?St.mergeObjectAsync(r,a):St.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:q.ZodRecord},ge(r)):v({keyType:wa.create(),valueType:t,typeName:q.ZodRecord},ge(n)))}}])})(),Hi=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(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!==X.map)return Q(u,{code:Z.invalid_type,expected:X.map,received:u.parsedType}),ve;var a=this._def.keyType,i=this._def.valueType,o=K(u.data.entries()).map(function(m,y){var E=Be(m,2),g=E[0],b=E[1];return{key:a._parse(new Yt(u,g,u.path,[y,"key"])),value:i._parse(new Yt(u,b,u.path,[y,"value"]))}});if(u.common.async){var s=new Map;return Promise.resolve().then(_e(J().m(function m(){var y,E,g,b,F,_;return J().w(function(C){for(;;)switch(C.p=C.n){case 0:y=V(o),C.p=1,y.s();case 2:if((E=y.n()).done){C.n=7;break}return g=E.value,C.n=3,g.key;case 3:return b=C.v,C.n=4,g.value;case 4:if(F=C.v,b.status!=="aborted"&&F.status!=="aborted"){C.n=5;break}return C.a(2,ve);case 5:b.status!=="dirty"&&F.status!=="dirty"||r.dirty(),s.set(b.value,F.value);case 6:C.n=2;break;case 7:C.n=9;break;case 8:C.p=8,_=C.v,y.e(_);case 9:return C.p=9,y.f(),C.f(9);case 10:return C.a(2,{status:r.value,value:s})}},m,null,[[1,8,9,10]])})))}var c,l=new Map,d=V(o);try{for(d.s();!(c=d.n()).done;){var f=c.value,h=f.key,D=f.value;if(h.status==="aborted"||D.status==="aborted")return ve;h.status!=="dirty"&&D.status!=="dirty"||r.dirty(),l.set(h.value,D.value)}}catch(m){d.e(m)}finally{d.f()}return{status:r.value,value:l}}}])})();Hi.create=function(e,t,n){return new Hi(v({valueType:t,keyType:e,typeName:q.ZodMap},ge(n)))};var Vi=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t),r=n.status,u=n.ctx;if(u.parsedType!==X.set)return Q(u,{code:Z.invalid_type,expected:X.set,received:u.parsedType}),ve;var a=this._def;a.minSize!==null&&u.data.size<a.minSize.value&&(Q(u,{code:Z.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&&(Q(u,{code:Z.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 l,d=new Set,f=V(c);try{for(f.s();!(l=f.n()).done;){var h=l.value;if(h.status==="aborted")return ve;h.status==="dirty"&&r.dirty(),d.add(h.value)}}catch(D){f.e(D)}finally{f.f()}return{status:r.value,value:d}}var s=K(u.data.values()).map(function(c,l){return i._parse(new Yt(u,c,u.path,l))});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:se.toString(n)}}))}},{key:"max",value:function(t,n){return new e(v(v({},this._def),{},{maxSize:{value:t,message:se.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)}}])})();Vi.create=function(e,t){return new Vi(v({valueType:e,minSize:null,maxSize:null,typeName:q.ZodSet},ge(t)))};var qD=(function(){function e(){var t;return ae(this,e),(t=me(this,e,arguments)).validate=t.implement,t}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t).ctx;if(n.parsedType!==X.function)return Q(n,{code:Z.invalid_type,expected:X.function,received:n.parsedType}),ve;function r(c,l){return Ni({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ji(),Tu].filter(function(d){return!!d}),issueData:{code:Z.invalid_arguments,argumentsError:l}})}function u(c,l){return Ni({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ji(),Tu].filter(function(d){return!!d}),issueData:{code:Z.invalid_return_type,returnTypeError:l}})}var a={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Pu){var o=this;return Et(_e(J().m(function c(){var l,d,f,h,D,m,y,E=arguments;return J().w(function(g){for(;;)switch(g.n){case 0:for(l=E.length,d=new Array(l),f=0;f<l;f++)d[f]=E[f];return h=new Gt([]),g.n=1,o._def.args.parseAsync(d,a).catch(function(b){throw h.addIssue(r(d,b)),h});case 1:return D=g.v,g.n=2,Reflect.apply(i,this,D);case 2:return m=g.v,g.n=3,o._def.returns._def.type.parseAsync(m,a).catch(function(b){throw h.addIssue(u(m,b)),h});case 3:return y=g.v,g.a(2,y)}},c,this)})))}var s=this;return Et(function(){for(var c=arguments.length,l=new Array(c),d=0;d<c;d++)l[d]=arguments[d];var f=s._def.args.safeParse(l,a);if(!f.success)throw new Gt([r(l,f.error)]);var h=Reflect.apply(i,this,f.data),D=s._def.returns.safeParse(h,a);if(!D.success)throw new Gt([u(h,D.error)]);return D.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),{}
107,{args:Qn.create(n).rest(Fr.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||Qn.create([]).rest(Fr.create()),returns:n||Fr.create(),typeName:q.ZodFunction},ge(r)))}}])})(),Ia=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(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})}}])})();Ia.create=function(e,t){return new Ia(v({getter:e,typeName:q.ZodLazy},ge(t)))};var Ta=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){if(t.data!==this._def.value){var n=this._getOrReturnCtx(t);return Q(n,{received:n.data,code:Z.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:t.data}}},{key:"value",get:function(){return this._def.value}}])})();function id(e,t){return new Va(v({values:e,typeName:q.ZodEnum},ge(t)))}Ta.create=function(e,t){return new Ta(v({value:e,typeName:q.ZodLiteral},ge(t)))};var Va=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){if(typeof t.data!="string"){var n=this._getOrReturnCtx(t),r=this._def.values;return Q(n,{expected:Oe.joinValues(r),received:n.parsedType,code:Z.invalid_type}),ve}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 Q(u,{received:u.data,code:Z.invalid_enum_value,options:a}),ve}return Et(t.data)}},{key:"options",get:function(){return this._def.values}},{key:"enum",get:function(){var t,n={},r=V(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=V(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=V(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))}}])})();Va.create=id;var Pa=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){var n=Oe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==X.string&&r.parsedType!==X.number){var u=Oe.objectValues(n);return Q(r,{expected:Oe.joinValues(u),received:r.parsedType,code:Z.invalid_type}),ve}if(this._cache||(this._cache=new Set(Oe.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){var a=Oe.objectValues(n);return Q(r,{received:r.data,code:Z.invalid_enum_value,options:a}),ve}return Et(t.data)}},{key:"enum",get:function(){return this._def.values}}])})();Pa.create=function(e,t){return new Pa(v({values:e,typeName:q.ZodNativeEnum},ge(t)))};var Pu=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(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!==X.promise&&r.common.async===!1)return Q(r,{code:Z.invalid_type,expected:X.promise,received:r.parsedType}),ve;var u=r.parsedType===X.promise?r.data:Promise.resolve(r.data);return Et(u.then(function(a){return n._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})}))}}])})();Pu.create=function(e,t){return new Pu(v({type:e,typeName:q.ZodPromise},ge(t)))};var on=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"innerType",value:function(){return this._def.schema}},{key:"sourceType",value:function(){return this._def.schema._def.typeName===q.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(D){Q(a,D),D.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 D=_e(J().m(function m(y){var E;return J().w(function(g){for(;;)switch(g.n){case 0:if(u.value!=="aborted"){g.n=1;break}return g.a(2,ve);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,ve);case 3:if(E.status!=="dirty"){g.n=4;break}return g.a(2,la(E.value));case 4:if(u.value!=="dirty"){g.n=5;break}return g.a(2,la(E.value));case 5:return g.a(2,E)}},m)}));return function(m){return D.apply(this,arguments)}})());if(u.value==="aborted")return ve;var c=this._def.schema._parseSync({data:s,path:a.path,parent:a});return c.status==="aborted"?ve:c.status==="dirty"||u.value==="dirty"?la(c.value):c}if(i.type==="refinement"){var l=function(D){var m=i.refinement(D,o);if(a.common.async)return Promise.resolve(m);if(m instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return D};if(a.common.async===!1){var d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return d.status==="aborted"?ve:(d.status==="dirty"&&u.dirty(),l(d.value),{status:u.value,value:d.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(function(D){return D.status==="aborted"?ve:(D.status==="dirty"&&u.dirty(),l(D.value).then(function(){return{status:u.value,value:D.value}}))})}if(i.type==="transform"){if(a.common.async===!1){var f=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!wr(f))return ve;var h=i.transform(f.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(D){return wr(D)?Promise.resolve(i.transform(D.value,o)).then(function(m){return{status:u.value,value:m}}):ve})}Oe.assertNever(i)}}])})();on.create=function(e,t,n){return new on(v({schema:e,typeName:q.ZodEffects,effect:t},ge(n)))},on.createWithPreprocess=function(e,t,n){return new on(v({schema:t,effect:{type:"preprocess",transform:e},typeName:q.ZodEffects},ge(n)))};var ln=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){return this._getType(t)===X.undefined?Et(void 0):this._def.innerType._parse(t)}},{key:"unwrap",value:function(){return this._def.innerType}}])})();ln.create=function(e,t){return new ln(v({innerType:e,typeName:q.ZodOptional},ge(t)))};var Gn=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){return this._getType(t)===X.null?Et(null):this._def.innerType._parse(t)}},{key:"unwrap",value:function(){return this._def.innerType}}])})();Gn.create=function(e,t){return new Gn(v({innerType:e,typeName:q.ZodNullable},ge(t)))};var ja=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){var n=this._processInputParams(t).ctx,r=n.data;return n.parsedType===X.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}},{key:"removeDefault",value:function(){return this._def.innerType}}])})();ja.create=function(e,t){return new ja(v({innerType:e,typeName:q.ZodDefault,defaultValue:typeof t.default=="function"?t.default:function(){return t.default}},ge(t)))};var Na=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(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 Aa(a)?a.then(function(i){return{status:"valid",value:i.status==="valid"?i.value:n._def.catchValue({get error(){return new Gt(u.common.issues)},input:u.data})}}):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Gt(u.common.issues)},input:u.data})}}},{key:"removeCatch",value:function(){return this._def.innerType}}])})();Na.create=function(e,t){return new Na(v({innerType:e,typeName:q.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:function(){return t.catch}},ge(t)))};var Wi=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){if(this._getType(t)!==X.nan){var n=this._getOrReturnCtx(t);return Q(n,{code:Z.invalid_type,expected:X.nan,received:n.parsedType}),ve}return{status:"valid",value:t.data}}}])})();Wi.create=function(e){return new Wi(v({typeName:q.ZodNaN},ge(e)))};var q,od=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(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}}])})(),sd=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(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=_e(J().m(function c(){var l;return J().w(function(d){for(;;)switch(d.n){case 0:return d.n=1,n._def.in._parseAsync({data:a.data,path:a.path,parent:a});case 1:if((l=d.v).status!=="aborted"){d.n=2;break}return d.a(2,ve);case 2:if(l.status!=="dirty"){d.n=3;break}return u.dirty(),d.a(2,la(l.value));case 3:return d.a(2,n._def.out._parseAsync({data:l.value,path:a.path,parent:a}));case 4:return d.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"?ve: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:q.ZodPipeline})}}])})(),za=(function(){function e(){return ae(this,e),me(this,e,arguments)}return pe(e,Ae),ie(e,[{key:"_parse",value:function(t){var n=this._def.innerType._parse(t),r=function(u){return wr(u)&&(u.value=Object.freeze(u.value)),u};return Aa(n)?n.then(function(u){return r(u)}):r(n)}},{key:"unwrap",value:function(){return this._def.innerType}}])})();za.create=function(e,t){return new za(v({innerType:e,typeName:q.ZodReadonly},ge(t)))},Zt.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"})(q||(q={})),wa.create,zi.create,Wi.create,Ri.create,Mi.create,Zi.create,Li.create,Sa.create,xa.create,$i.create,Fr.create,An.create,qi.create,Sr.create,Zt.create,Zt.strictCreate,Oa.create,LD.create,Ba.create,Qn.create,$D.create,Hi.create,Vi.create,qD.create,Ia.create,Ta.create,Va.create,Pa.create,Pu.create,on.create,ln.create,Gn.create,on.createWithPreprocess,sd.create;var ju=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,l=new Array(r),d=0;d<r;d++)l[d]=a[Math.random()*c|0];return l.join("")};if(t==null)return s;if(a.includes(o))throw new Oh({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())}},UD=ju();function Uc(){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 Vn(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=Er(e);try{for(r.s();!(n=r.n()).done;){var u=hi(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 Hc(e){for(var t=new Headers(Vn(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 HD=/"__proto__"\s*:/,VD=/"constructor"\s*:/;function Vc(e){var t=JSON.parse(e);return t===null||ee(t)!="object"||HD.test(e)===!1&&VD.test(e)===!1?t:(function(n){for(var r=[n];r.length;){var u=r;r=[];var a,i=Er(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&&ee(c)=="object"&&r.push(c)}}}catch(l){i.e(l)}finally{i.f()}}return n})(t)}var fa=Symbol.for("vercel.ai.validator");function WD(e){return(function(r){return ee(r)=="object"&&r!==null&&fa in r&&r[fa]===!0&&"validate"in r})(e)?e:typeof e=="function"?e():(t=e,n=(function(){var r=Ie(ne().m(function u(a){var i;return ne().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 Ea({value:a,cause:i.issues})})}},u)}));return function(u){return r.apply(this,arguments)}})(),Lt(Lt({},fa,!0),"validate",n));var t,n}function Wc(e){return Ki.apply(this,arguments)}function Ki(){return Ki=Ie(ne().m(function e(t){var n,r,u;return ne().w(function(a){for(;;)switch(a.n){case 0:return n=t.value,r=t.schema,a.n=1,Lo({value:n,schema:r});case 1:if((u=a.v).success){a.n=2;break}throw Ea.wrap({value:n,cause:u.error});case 2:return a.a(2,u.value)}},e)})),Ki.apply(this,arguments)}function Lo(e){return Ji.apply(this,arguments)}function Ji(){return Ji=Ie(ne().m(function e(t){var n,r,u,a,i;return ne().w(function(o){for(;;)switch(o.p=o.n){case 0:if(n=t.value,r=t.schema,u=WD(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:Ea.wrap({value:n,cause:a.error}),rawValue:n});case 4:return o.p=4,i=o.v,o.a(2,{success:!1,error:Ea.wrap({value:n,cause:i}),rawValue:n})}},e,null,[[1,4]])})),Ji.apply(this,arguments)}function Ra(e){return Qi.apply(this,arguments)}function Qi(){return Qi=Ie(ne().m(function e(t){var n,r,u,a,i;return ne().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 Vc(s)}try{return Vc(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,Lo({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:Dc.isInstance(i)?i:new Dc({text:n,cause:i}),rawValue:void 0})}},e,null,[[1,5]])})),Qi.apply(this,arguments)}function lr(e){return Gi.apply(this,arguments)}function Gi(){return Gi=Ie(ne().m(function e(t){return ne().w(function(n){for(;;)if(n.n===0)return n.a(2,(typeof t=="function"&&(t=t()),Promise.resolve(t)))},e)})),Gi.apply(this,arguments)}var KD=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("/")},JD=Symbol("Let zodToJsonSchema decide on which parser to use"),Kc={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"};function cd(e,t){return Me(e.type._def,t)}function ld(e,t,n){var r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(function(u,a){return ld(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 QD(e)}}var QD=function(e){var t,n={type:"integer",format:"unix-time"},r=Er(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},ci=void 0,GD=/^[cC][^\s-]{8,}
107$/,YD=/^[0-9a-z]+$/,XD=/^[0-9A-HJKMNP-TV-Z]{26}$/,eg=/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,tg=function(){return ci===void 0&&(ci=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ci},ng=/^(?:(?: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])$/,rg=/^(([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])$/,ug=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ag=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ig=/^[a-zA-Z0-9_-]{21}$/,og=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;function fd(e,t){var n={type:"string"};if(e.checks){var r,u=Er(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":Nt(n,"email",a.message,t);break;case"format:idn-email":Nt(n,"idn-email",a.message,t);break;case"pattern:zod":ht(n,eg,a.message,t)}break;case"url":Nt(n,"uri",a.message,t);break;case"uuid":Nt(n,"uuid",a.message,t);break;case"regex":ht(n,a.regex,a.message,t);break;case"cuid":ht(n,GD,a.message,t);break;case"cuid2":ht(n,YD,a.message,t);break;case"startsWith":ht(n,RegExp("^".concat(li(a.value,t))),a.message,t);break;case"endsWith":ht(n,RegExp("".concat(li(a.value,t),"$")),a.message,t);break;case"datetime":Nt(n,"date-time",a.message,t);break;case"date":Nt(n,"date",a.message,t);break;case"time":Nt(n,"time",a.message,t);break;case"duration":Nt(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":ht(n,RegExp(li(a.value,t)),a.message,t);break;case"ip":a.version!=="v6"&&Nt(n,"ipv4",a.message,t),a.version!=="v4"&&Nt(n,"ipv6",a.message,t);break;case"base64url":ht(n,ag,a.message,t);break;case"jwt":ht(n,og,a.message,t);break;case"cidr":a.version!=="v6"&&ht(n,ng,a.message,t),a.version!=="v4"&&ht(n,rg,a.message,t);break;case"emoji":ht(n,tg(),a.message,t);break;case"ulid":ht(n,XD,a.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":Nt(n,"binary",a.message,t);break;case"contentEncoding:base64":n.contentEncoding="base64";break;case"pattern:zod":ht(n,ug,a.message,t)}break;case"nanoid":ht(n,ig,a.message,t)}}}catch(i){u.e(i)}finally{u.f()}}return n}function li(e,t){return t.patternStrategy==="escape"?(function(n){for(var r="",u=0;u<n.length;u++)sg.has(n[u])||(r+="\\"),r+=n[u];return r})(e):e}var sg=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Nt(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(L({format:t},n&&r.errorMessages&&{errorMessage:{format:n}}))):e.format=t}function ht(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(L({pattern:Jc(t,r)},n&&r.errorMessages&&{errorMessage:{pattern:n}}))):e.pattern=Jc(t,r)}function Jc(e,t){var n;if(!t.applyRegexFlags||!e.flags)return e.source;for(var r=e.flags.includes("i"),u=e.flags.includes("m"),a=e.flags.includes("s"),i=r?e.source.toLowerCase():e.source,o="",s=!1,c=!1,l=!1,d=0;d<i.length;d++)if(s)o+=i[d],s=!1;else{if(r){if(c){if(i[d].match(/[a-z]/)){l?(o+=i[d],o+="".concat(i[d-2],"-").concat(i[d]).toUpperCase(),l=!1):i[d+1]==="-"&&((n=i[d+2])!=null&&n.match(/[a-z]/))?(o+=i[d],l=!0):o+="".concat(i[d]).concat(i[d].toUpperCase());continue}}else if(i[d].match(/[a-z]/)){o+="[".concat(i[d]).concat(i[d].toUpperCase(),"]");continue}}if(u){if(i[d]==="^"){o+=`(^|(?<=[\r
108]))`;continue}if(i[d]==="$"){o+=`($|(?=[\r
109]))`;continue}}a&&i[d]==="."?o+=c?"".concat(i[d],`\r
110`):"[".concat(i[d],`\r
111]`):(o+=i[d],i[d]==="\\"?s=!0:c&&i[d]==="]"?c=!1:c||i[d]!=="["||(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}function Qc(e,t){var n,r,u,a,i,o,s={type:"object",additionalProperties:(n=Me(e.valueType._def,L(L({},t),{},{currentPath:[].concat(Fe(t.currentPath),["additionalProperties"])})))!=null?n:t.allowedAdditionalProperties};if(((r=e.keyType)==null?void 0:r._def.typeName)===q.ZodString&&((u=e.keyType._def.checks)!=null&&u.length)){var c=fd(e.keyType._def,t);c.type;var l=wn(c,dp);return L(L({},s),{},{propertyNames:l})}if(((a=e.keyType)==null?void 0:a._def.typeName)===q.ZodEnum)return L(L({},s),{},{propertyNames:{enum:e.keyType._def.values}});if(((i=e.keyType)==null?void 0:i._def.typeName)===q.ZodBranded&&e.keyType._def.type._def.typeName===q.ZodString&&((o=e.keyType._def.type._def.checks)!=null&&o.length)){var d=cd(e.keyType._def,t);d.type;var f=wn(d,pp);return L(L({},s),{},{propertyNames:f})}return s}var fi={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function cg(e){try{return e.isOptional()}catch{return!0}}var lg=function(e,t,n){switch(t){case q.ZodString:return fd(e,n);case q.ZodNumber:return(function(r){var u={type:"number"};if(!r.checks)return u;var a,i=Er(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 q.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 l=cg(c),d=Me(c._def,L(L({},u),{},{currentPath:[].concat(Fe(u.currentPath),["properties",s]),propertyPath:[].concat(Fe(u.currentPath),["properties",s])}));d!==void 0&&(a.properties[s]=d,l||i.push(s))}}i.length&&(a.required=i);var f=(function(h,D){if(h.catchall._def.typeName!=="ZodNever")return Me(h.catchall._def,L(L({},D),{},{currentPath:[].concat(Fe(D.currentPath),["additionalProperties"])}));switch(h.unknownKeys){case"passthrough":return D.allowedAdditionalProperties;case"strict":return D.rejectedAdditionalProperties;
111case"strip":return D.removeAdditionalStrategy==="strict"?D.allowedAdditionalProperties:D.rejectedAdditionalProperties}})(r,u);return f!==void 0&&(a.additionalProperties=f),a})(e,n);case q.ZodBigInt:return(function(r){var u={type:"integer",format:"int64"};if(!r.checks)return u;var a,i=Er(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 q.ZodBoolean:return{type:"boolean"};case q.ZodDate:return ld(e,n);case q.ZodUndefined:return{not:{}};case q.ZodNull:return{type:"null"};case q.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)!==q.ZodAny&&(s.items=Me(r.type._def,L(L({},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 q.ZodUnion:case q.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 fi&&(!c._def.checks||!c._def.checks.length)})){var i=a.reduce(function(c,l){var d=fi[l._def.typeName];return d&&!c.includes(d)?[].concat(Fe(c),[d]):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,l){var d=ee(l._def.value);switch(d){case"string":case"number":case"boolean":return[].concat(Fe(c),[d]);case"bigint":return[].concat(Fe(c),["integer"]);case"object":if(l._def.value===null)return[].concat(Fe(c),["null"]);default:return c}},[]);if(o.length===a.length){var s=o.filter(function(c,l,d){return d.indexOf(c)===l});return{type:s.length>1?s:s[0],enum:a.reduce(function(c,l){return c.includes(l._def.value)?c:[].concat(Fe(c),[l._def.value])},[])}}}else if(a.every(function(c){return c._def.typeName==="ZodEnum"}))return{type:"string",enum:a.reduce(function(c,l){return[].concat(Fe(c),Fe(l._def.values.filter(function(d){return!c.includes(d)})))},[])};return(function(c,l){var d=(c.options instanceof Map?Array.from(c.options.values()):c.options).map(function(f,h){return Me(f._def,L(L({},l),{},{currentPath:[].concat(Fe(l.currentPath),["anyOf","".concat(h)])}))}).filter(function(f){return!!f&&(!l.strictUnions||ee(f)=="object"&&Object.keys(f).length>0)});return d.length?{anyOf:d}:void 0})(r,u)})(e,n);case q.ZodIntersection:return(function(r,u){var a=[Me(r.left._def,L(L({},u),{},{currentPath:[].concat(Fe(u.currentPath),["allOf","0"])})),Me(r.right._def,L(L({},u),{},{currentPath:[].concat(Fe(u.currentPath),["allOf","1"])}))].filter(function(o){return!!o}),i=[];return 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=wn(o,hp)),i.push(s)}else i.push.apply(i,Fe(o.allOf));var c}),i.length?{allOf:i}:void 0})(e,n);case q.ZodTuple:return(function(r,u){return r.rest?{type:"array",minItems:r.items.length,items:r.items.map(function(a,i){return Me(a._def,L(L({},u),{},{currentPath:[].concat(Fe(u.currentPath),["items","".concat(i)])}))}).reduce(function(a,i){return i===void 0?a:[].concat(Fe(a),[i])},[]),additionalItems:Me(r.rest._def,L(L({},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 Me(a._def,L(L({},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 q.ZodRecord:return Qc(e,n);case q.ZodLiteral:return(function(r){var u=ee(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 q.ZodEnum:return(function(r){return{type:"string",enum:Array.from(r.values)}})(e);case q.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 ee(o)})));
111return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:a}})(e);case q.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:[fi[r.innerType._def.typeName],"null"]};var a=Me(r.innerType._def,L(L({},u),{},{currentPath:[].concat(Fe(u.currentPath),["anyOf","0"])}));return a&&{anyOf:[a,{type:"null"}]}})(e,n);case q.ZodOptional:return(function(r,u){var a;if(u.currentPath.toString()===((a=u.propertyPath)==null?void 0:a.toString()))return Me(r.innerType._def,u);var i=Me(r.innerType._def,L(L({},u),{},{currentPath:[].concat(Fe(u.currentPath),["anyOf","1"])}));return i?{anyOf:[{not:{}},i]}:{}})(e,n);case q.ZodMap:return(function(r,u){return u.mapStrategy==="record"?Qc(r,u):{type:"array",maxItems:125,items:{type:"array",items:[Me(r.keyType._def,L(L({},u),{},{currentPath:[].concat(Fe(u.currentPath),["items","items","0"])}))||{},Me(r.valueType._def,L(L({},u),{},{currentPath:[].concat(Fe(u.currentPath),["items","items","1"])}))||{}],minItems:2,maxItems:2}}})(e,n);case q.ZodSet:return(function(r,u){var a={type:"array",uniqueItems:!0,items:Me(r.valueType._def,L(L({},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 q.ZodLazy:return function(){return e.getter()._def};case q.ZodPromise:return(function(r,u){return Me(r.type._def,u)})(e,n);case q.ZodNaN:case q.ZodNever:return{not:{}};case q.ZodEffects:return(function(r,u){return u.effectStrategy==="input"?Me(r.schema._def,u):{}})(e,n);case q.ZodAny:case q.ZodUnknown:return{};case q.ZodDefault:return(function(r,u){return L(L({},Me(r.innerType._def,u)),{},{default:r.defaultValue()})})(e,n);case q.ZodBranded:return cd(e,n);case q.ZodReadonly:case q.ZodCatch:return(function(r,u){return Me(r.innerType._def,u)})(e,n);case q.ZodPipeline:return(function(r,u){if(u.pipeStrategy==="input")return Me(r.in._def,u);if(u.pipeStrategy==="output")return Me(r.out._def,u);var a=Me(r.in._def,L(L({},u),{},{currentPath:[].concat(Fe(u.currentPath),["allOf","0"])}));return{allOf:[a,Me(r.out._def,L(L({},u),{},{currentPath:[].concat(Fe(u.currentPath),["allOf",a?"1":"0"])}))].filter(function(i){return i!==void 0})}})(e,n);case q.ZodFunction:case q.ZodVoid:case q.ZodSymbol:default:return}};function Me(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!==JD)return a}if(u&&!r){var i=fg(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=lg(e,e.typeName,t),c=typeof s=="function"?Me(s(),t):s;if(c&&dg(e,t,c),t.postProcess){var l=t.postProcess(c,e,t);return o.jsonSchema=c,l}return o.jsonSchema=c,c}var fg=function(e,t){switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:KD(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}},dg=function(e,t,n){return e.description&&(n.description=e.description),n},pg=function(e,t){var n,r=(function(c){var l=(function(f){return typeof f=="string"?L(L({},Kc),{},{name:f}):L(L({},Kc),f)})(c),d=l.name!==void 0?[].concat(Fe(l.basePath),[l.definitionPath,l.name]):l.basePath;return L(L({},l),{},{currentPath:d,propertyPath:void 0,seen:new Map(Object.entries(l.definitions).map(function(f){var h=hi(f,2),D=h[0],m=h[1];return[m._def,{def:m._def,path:[].concat(Fe(l.basePath),[l.definitionPath,D]),jsonSchema:void 0}]}))})})(t),u=ee(t)=="object"&&t.definitions?Object.entries(t.definitions).reduce(function(c,l){var d,f=hi(l,2),h=f[0],D=f[1];return L(L({},c),{},Lt({},h,(d=Me(D._def,L(L({},r),{},{currentPath:[].concat(Fe(r.basePath),[r.definitionPath,h])}),!0))!=null?d:{}))},{}):void 0,a=typeof t=="string"?t:t?.nameStrategy==="title"||t==null?void 0:t.name,i=(n=Me(e._def,a===void 0?r:L(L({},r),{},{currentPath:[].concat(Fe(r.basePath),[r.definitionPath,a])}),!1))!=null?n:{}
111,o=ee(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?L(L({},i),{},Lt({},r.definitionPath,u)):i:Lt({$ref:[].concat(Fe(r.$refStrategy==="relative"?[]:r.basePath),[r.definitionPath,a]).join("/")},r.definitionPath,L(L({},u),{},Lt({},a,i)));return s.$schema="http://json-schema.org/draft-07/schema#",s};function dd(e,t){return(function(n){return"_zod"in n})(e)?(function(n){return Xi(function(){return(function(u,a){if(u instanceof zf){var i,o=new Pc(a),s={},c=V(u._idmap.entries());try{for(c.s();!(i=c.n()).done;){var l=Be(i.value,2),d=(l[0],l[1]);o.process(d)}}catch(_){c.e(_)}finally{c.f()}var f,h={},D={registry:u,uri:a?.uri,defs:s},m=V(u._idmap.entries());try{for(m.s();!(f=m.n()).done;){var y=Be(f.value,2),E=y[0],g=y[1];h[E]=o.emit(g,v(v({},a),{},{external:D}))}}catch(_){m.e(_)}finally{m.f()}if(Object.keys(s).length>0){var b=o.target==="draft-2020-12"?"$defs":"definitions";h.__shared=xe({},b,s)}return{schemas:h}}var F=new Pc(a);return F.process(u),F.emit(u,a)})(n,{target:"draft-7",io:"output",reused:"inline"})},{validate:(r=Ie(ne().m(function u(a){var i;return ne().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,Kf(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 Xi(function(){return pg(n,{$refStrategy:"none"})},{validate:(r=Ie(ne().m(function u(a){var i;return ne().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 Yi=Symbol.for("vercel.ai.schema");function Xi(e){var t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).validate;return Lt((function(n,r,u,a){var i={configurable:!0,enumerable:!0};return i[n]=a,Object.defineProperty(r,u,i)})("get",Lt(Lt(Lt({},Yi,!0),"_type",void 0),fa,!0),"jsonSchema",function(){return typeof e=="function"&&(e=e()),e}),"validate",t)}var pd,hg=Object.defineProperty,hd="AI_NoObjectGeneratedError",vd="vercel.ai.error.".concat(hd),vg=Symbol.for(vd),Gc=(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 qt(this,e),(n=Yn(this,e,[{name:hd,message:u,cause:a}]))[pd]=!0,n.text=i,n.response=o,n.usage=s,n.finishReason=c,n}return Xn(e,On),Ut(e,null,[{key:"isInstance",value:function(t){return On.hasMarker(t,vd)}}])})();pd=vg;var Yc="5.0.93",md=It([le(),ka(Uint8Array),ka(ArrayBuffer),rd(function(e){var t,n;return(n=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null&&n},{message:"Must be a Buffer"})]),Nu=new gD({type:"lazy",getter:function(){return It([rD(),le(),Xm(),Ft(),Ti(le(),Nu),Ir(Nu)])}}),ut=Ti(le(),Ti(le(),Nu)),Dd=lt({type:Ee("text"),text:le(),providerOptions:ut.optional()}),mg=lt({type:Ee("image"),image:It([md,ka(URL)]),mediaType:le().optional(),providerOptions:ut.optional()}),gd=lt({type:Ee("file"),data:It([md,ka(URL)]),filename:le().optional(),mediaType:le(),providerOptions:ut.optional()}),Dg=lt({type:Ee("reasoning"),text:le(),providerOptions:ut.optional()}),gg=lt({type:Ee("tool-call"),toolCallId:le(),toolName:le(),input:Jt(),providerOptions:ut.optional(),providerExecuted:Ft().optional()}),yg=new oD(v({type:"union",options:[lt({type:Ee("text"),value:le()}),lt({type:Ee("json"),value:Nu}),lt({type:Ee("error-text"),value:le()}),lt({type:Ee("error-json"),value:Nu}),lt({type:Ee("content"),value:Ir(It([lt({type:Ee("text"),text:le()}),lt({type:Ee("media"),data:le(),mediaType:le()})]))})],discriminator:"type"},te(void 0))),yd=lt({type:Ee("tool-result"),toolCallId:le(),toolName:le(),output:yg,providerOptions:ut.optional()}),Fg=lt({role:Ee("system"),content:le(),providerOptions:ut.optional()}),Eg=lt({role:Ee("user"),content:It([le(),Ir(It([Dd,mg,gd]))]),providerOptions:ut.optional()}),_g=lt({role:Ee("assistant"),content:It([le(),Ir(It([Dd,gd,Dg,gg,yd]))]),providerOptions:ut.optional()});It([Fg,Eg,_g,lt({role:Ee("tool"),content:Ir(yd),providerOptions:ut.optional()})]),ju({prefix:"aitxt",size:24}),TransformStream;var bg=(function(){var e;return function(){return e==null&&(e=dd(It([et({type:Ee("text-start"),id:le(),providerMetadata:ut.optional()}),et({type:Ee("text-delta"),id:le(),delta:le(),providerMetadata:ut.optional()}),et({type:Ee("text-end"),id:le(),providerMetadata:ut.optional()}),et({type:Ee("error"),errorText:le()}),et({type:Ee("tool-input-start"),toolCallId:le(),toolName:le(),providerExecuted:Ft().optional(),dynamic:Ft().optional()}),et({type:Ee("tool-input-delta"),toolCallId:le(),inputTextDelta:le()}),et({type:Ee("tool-input-available"),toolCallId:le(),toolName:le(),input
111:Jt(),providerExecuted:Ft().optional(),providerMetadata:ut.optional(),dynamic:Ft().optional()}),et({type:Ee("tool-input-error"),toolCallId:le(),toolName:le(),input:Jt(),providerExecuted:Ft().optional(),providerMetadata:ut.optional(),dynamic:Ft().optional(),errorText:le()}),et({type:Ee("tool-output-available"),toolCallId:le(),output:Jt(),providerExecuted:Ft().optional(),dynamic:Ft().optional(),preliminary:Ft().optional()}),et({type:Ee("tool-output-error"),toolCallId:le(),errorText:le(),providerExecuted:Ft().optional(),dynamic:Ft().optional()}),et({type:Ee("reasoning-start"),id:le(),providerMetadata:ut.optional()}),et({type:Ee("reasoning-delta"),id:le(),delta:le(),providerMetadata:ut.optional()}),et({type:Ee("reasoning-end"),id:le(),providerMetadata:ut.optional()}),et({type:Ee("source-url"),sourceId:le(),url:le(),title:le().optional(),providerMetadata:ut.optional()}),et({type:Ee("source-document"),sourceId:le(),mediaType:le(),title:le(),filename:le().optional(),providerMetadata:ut.optional()}),et({type:Ee("file"),url:le(),mediaType:le(),providerMetadata:ut.optional()}),et({type:rd(function(t){return typeof t=="string"&&t.startsWith("data-")},{message:'Type must start with "data-"'}),id:le().optional(),data:Jt(),transient:Ft().optional()}),et({type:Ee("start-step")}),et({type:Ee("finish-step")}),et({type:Ee("start"),messageId:le().optional(),messageMetadata:Jt().optional()}),et({type:Ee("finish"),finishReason:ed(["stop","length","content-filter","tool-calls","error","other","unknown"]).optional(),messageMetadata:Jt().optional()}),et({type:Ee("abort")}),et({type:Ee("message-metadata"),messageMetadata:Jt()})]))),e}})();function Fd(e,t){if(e!==void 0||t!==void 0){if(e===void 0)return t;if(t===void 0)return e;var n=L({},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||ee(u)!="object"||Array.isArray(u)||u instanceof Date||u instanceof RegExp),o=!(a==null||ee(a)!="object"||Array.isArray(a)||a instanceof Date||a instanceof RegExp);n[r]=i&&o?Fd(a,u):u}return n}}function Cg(e){var t=["ROOT"],n=-1,r=null;function u(h,D,m){switch(h){case'"':n=D,t.pop(),t.push(m),t.push("INSIDE_STRING");break;case"f":case"t":case"n":n=D,r=D,t.pop(),t.push(m),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(m),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=D,t.pop(),t.push(m),t.push("INSIDE_NUMBER");break;case"{":n=D,t.pop(),t.push(m),t.push("INSIDE_OBJECT_START");break;case"[":n=D,t.pop(),t.push(m),t.push("INSIDE_ARRAY_START")}}function a(h,D){switch(h){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":n=D,t.pop()}}function i(h,D){switch(h){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=D,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 l=e.slice(0,n+1),d=t.length-1;d>=0;d--)switch(t[d]){case"INSIDE_STRING":l+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":l+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":l+="]";break;case"INSIDE_LITERAL":var f=e.substring(r,e.length);"true".startsWith(f)?l+="true".slice(f.length):"false".startsWith(f)?l+="false".slice(f.length):"null".startsWith(f)&&(l+="null".slice(f.length))}return l}function Ed(e){return eo.apply(this,arguments)}function eo(){return eo=Ie(ne().m(function e(t){var n,r;return ne().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,Ra({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,Ra({text:Cg(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)})),eo.apply(this,arguments)}function da(e){return e.type.startsWith("tool-")}function to(e){return da(e)||(function(t){return t.type==="dynamic-tool"})(e)}function Xc(e){return e.type.split("-").slice(1).join("-")}function kg(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 Ag(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 Ie(ne().m(function l(){return ne().w(function(d){for(;;)switch(d.n){case 0:return d.n=1,u((function(){var f=Ie(ne().m(function h(D){var m,y,E,g,b,F,_,C,k,A,j,B,S,O,P,x,z,I,w,N,R,M,W,U,oe,he,fe,de,H;return ne().w(function(G){for(;;)switch(G.n){case 0:B=function(){return B=Ie(ne().m(function re(De){var Y;return ne().w(function(ce){for(;;)switch(ce.n){case 0:if(De==null){ce.n=2;break}if(Y=m.message.metadata!=null?Fd(m.message.metadata,De):De,n==null){ce.n=1;break}return ce.n=1,Wc({value:Y,schema:n});case 1:m.message.metadata=Y;
111case 2:return ce.a(2)}},re)})),B.apply(this,arguments)},j=function(re){return B.apply(this,arguments)},A=function(re){var De,Y,ce=m.message.parts.find(function(Ce){return Ce.type==="dynamic-tool"&&Ce.toolCallId===re.toolCallId}),be=re,Re=ce;ce!=null?(ce.state=re.state,Re.toolName=re.toolName,Re.input=be.input,Re.output=be.output,Re.errorText=be.errorText,Re.rawInput=(De=be.rawInput)!=null?De:Re.rawInput,Re.preliminary=be.preliminary,Re.providerExecuted=(Y=be.providerExecuted)!=null?Y:ce.providerExecuted,be.providerMetadata!=null&&ce.state==="input-available"&&(ce.callProviderMetadata=be.providerMetadata)):m.message.parts.push(L({type:"dynamic-tool",toolName:re.toolName,toolCallId:re.toolCallId,state:re.state,input:be.input,output:be.output,errorText:be.errorText,preliminary:be.preliminary,providerExecuted:be.providerExecuted},be.providerMetadata!=null?{callProviderMetadata:be.providerMetadata}:{}))},k=function(re){var De,Y=m.message.parts.find(function(Re){return da(Re)&&Re.toolCallId===re.toolCallId}),ce=re,be=Y;Y!=null?(Y.state=re.state,be.input=ce.input,be.output=ce.output,be.errorText=ce.errorText,be.rawInput=ce.rawInput,be.preliminary=ce.preliminary,be.providerExecuted=(De=ce.providerExecuted)!=null?De:Y.providerExecuted,ce.providerMetadata!=null&&Y.state==="input-available"&&(Y.callProviderMetadata=ce.providerMetadata)):m.message.parts.push(L({type:"tool-".concat(re.toolName),toolCallId:re.toolCallId,state:re.state,input:ce.input,output:ce.output,rawInput:ce.rawInput,errorText:ce.errorText,providerExecuted:ce.providerExecuted,preliminary:ce.preliminary},ce.providerMetadata!=null?{callProviderMetadata:ce.providerMetadata}:{}))},C=function(re){var De=m.message.parts.filter(function(Y){return Y.type==="dynamic-tool"}).find(function(Y){return Y.toolCallId===re});if(De==null)throw new Error("tool-output-error must be preceded by a tool-input-available");return De},_=function(re){var De=m.message.parts.filter(da).find(function(Y){return Y.toolCallId===re});if(De==null)throw new Error("tool-output-error must be preceded by a tool-input-available");return De},m=D.state,y=D.write,H=s.type,G.n=H==="text-start"?1:H==="text-delta"?2:H==="text-end"?3:H==="reasoning-start"?4:H==="reasoning-delta"?5:H==="reasoning-end"?6:H==="file"?7:H==="source-url"?8:H==="source-document"?9:H==="tool-input-start"?10:H==="tool-input-delta"?11:H==="tool-input-available"?13:H==="tool-input-error"?15:H==="tool-output-available"?16:H==="tool-output-error"?17:H==="start-step"?18:H==="finish-step"?19:H==="start"?20:H==="finish"?22:H==="message-metadata"?24:H==="error"?26:27;break;case 1:return S={type:"text",text:"",providerMetadata:s.providerMetadata,state:"streaming"},m.activeTextParts[s.id]=S,m.message.parts.push(S),y(),G.a(3,30);case 2:return(O=m.activeTextParts[s.id]).text+=s.delta,O.providerMetadata=(E=s.providerMetadata)!=null?E:O.providerMetadata,y(),G.a(3,30);case 3:return(P=m.activeTextParts[s.id]).state="done",P.providerMetadata=(g=s.providerMetadata)!=null?g:P.providerMetadata,delete m.activeTextParts[s.id],y(),G.a(3,30);case 4:return x={type:"reasoning",text:"",providerMetadata:s.providerMetadata,state:"streaming"},m.activeReasoningParts[s.id]=x,m.message.parts.push(x),y(),G.a(3,30);case 5:return(z=m.activeReasoningParts[s.id]).text+=s.delta,z.providerMetadata=(b=s.providerMetadata)!=null?b:z.providerMetadata,y(),G.a(3,30);case 6:return(I=m.activeReasoningParts[s.id]).providerMetadata=(F=s.providerMetadata)!=null?F:I.providerMetadata,I.state="done",delete m.activeReasoningParts[s.id],y(),G.a(3,30);case 7:return m.message.parts.push({type:"file",mediaType:s.mediaType,url:s.url}),y(),G.a(3,30);case 8:return m.message.parts.push({type:"source-url",sourceId:s.sourceId,url:s.url,title:s.title,providerMetadata:s.providerMetadata}),y(),G.a(3,30);case 9:return m.message.parts.push({type:"source-document",sourceId:s.sourceId,mediaType:s.mediaType,title:s.title,filename:s.filename,providerMetadata:s.providerMetadata}),y(),G.a(3,30);case 10:return w=m.message.parts.filter(da),m.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}):k({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted}),y(),G.a(3,30);case 11:return(N=m.partialToolCalls[s.toolCallId]).text+=s.inputTextDelta,G.n=12,E
111d(N.text);case 12:return R=G.v,M=R.value,N.dynamic?A({toolCallId:s.toolCallId,toolName:N.toolName,state:"input-streaming",input:M}):k({toolCallId:s.toolCallId,toolName:N.toolName,state:"input-streaming",input:M}),y(),G.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}):k({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}),y(),!(i&&!s.providerExecuted)){G.n=14;break}return G.n=14,i({toolCall:s});case 14:return G.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}):k({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(),G.a(3,30);case 16:return s.dynamic?(W=C(s.toolCallId),A({toolCallId:s.toolCallId,toolName:W.toolName,state:"output-available",input:W.input,output:s.output,preliminary:s.preliminary})):(U=_(s.toolCallId),k({toolCallId:s.toolCallId,toolName:Xc(U),state:"output-available",input:U.input,output:s.output,providerExecuted:s.providerExecuted,preliminary:s.preliminary})),y(),G.a(3,30);case 17:return s.dynamic?(oe=C(s.toolCallId),A({toolCallId:s.toolCallId,toolName:oe.toolName,state:"output-error",input:oe.input,errorText:s.errorText,providerExecuted:s.providerExecuted})):(he=_(s.toolCallId),k({toolCallId:s.toolCallId,toolName:Xc(he),state:"output-error",input:he.input,rawInput:he.rawInput,errorText:s.errorText,providerExecuted:s.providerExecuted})),y(),G.a(3,30);case 18:return m.message.parts.push({type:"step-start"}),G.a(3,30);case 19:return m.activeTextParts={},m.activeReasoningParts={},G.a(3,30);case 20:return s.messageId!=null&&(m.message.id=s.messageId),G.n=21,j(s.messageMetadata);case 21:return s.messageId==null&&s.messageMetadata==null||y(),G.a(3,30);case 22:return s.finishReason!=null&&(m.finishReason=s.finishReason),G.n=23,j(s.messageMetadata);case 23:return s.messageMetadata!=null&&y(),G.a(3,30);case 24:return G.n=25,j(s.messageMetadata);case 25:return s.messageMetadata!=null&&y(),G.a(3,30);case 26:return a?.(new Error(s.errorText)),G.a(3,30);case 27:if(!(function(re){return re.type.startsWith("data-")})(s)){G.n=30;break}if(r?.[s.type]==null){G.n=28;break}return G.n=28,Wc({value:s.data,schema:r[s.type]});case 28:if(!(fe=s).transient){G.n=29;break}return o?.(fe),G.a(3,30);case 29:de=fe.id!=null?m.message.parts.find(function(re){return fe.type===re.type&&fe.id===re.id}):void 0,de!=null?de.data=fe.data:m.message.parts.push(fe),o?.(fe),y();case 30:c.enqueue(s);case 31:return G.a(2)}},h)}));return function(h){return f.apply(this,arguments)}})());case 1:return d.a(2)}},l)}))()}}))}ju({prefix:"aitxt",size:24}),ju({prefix:"aiobj",size:24});var wg=(function(){return Ut(function n(){qt(this,n),this.queue=[],this.isProcessing=!1},[{key:"processQueue",value:(t=Ie(ne().m(function n(){return ne().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=Ie(ne().m(function n(r){var u=this;return ne().w(function(a){for(;;)if(a.n===0)return a.a(2,new Promise(function(i,o){u.queue.push(Ie(ne().m(function s(){var c;return ne().w(function(l){for(;;)switch(l.p=l.n){case 0:return l.p=0,l.n=1,r();case 1:i(),l.n=3;break;case 2:l.p=2,c=l.v,o(c);case 3:return l.a(2)}},s,null,[[0,2]])}))),u.processQueue()}))},n)})),function(n){return e.apply(this,arguments)})}]);var e,t})();ju({prefix:"aiobj",size:24}),(function(e,t){for(var n in t)hg(e,n,{get:t[n],enumerable:!0})})({},{object:function(){return xg},text:function(){return Sg}});var el,tl,Sg=function(){return{type:"text",responseFormat:{type:"text"},parsePartial:(t=Ie(ne().m(function n(r){var u;return ne().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=Ie(ne().m(function n(r){var u;return ne().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},xg=function(e){var t=(function(n){return n==null?Xi({properties:{},additionalProperties:!1}):ee(r=n)=="object"&&r!==null&&Yi in r&&r[Yi]===!0&&"jsonSchema"in r&&"validate"in r?n:typeof n=="function"?n():dd(n);var r})(e.schema);return{type:"object",responseFormat:{type:"json",schema:t.jsonSchema},parsePartial:function(n){return Ie(ne().m(function r(){var u,a,i,o;return ne().w(function(s){for(;;)switch(s.n){case 0:return u=n.text,s.n=1,Ed(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 Ie(ne().m(function u(){var a,i,o;return ne().w(function(s){for(;;)switch(s.n){case 0:return a=n.text,s.n=1,Ra({text:a});case 1:if((i=s.v).success){s.n=2;break}throw new Gc({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,Lo({value:i.value,schema:t});case 3:if((o=s.v).success){s.n=4;break}throw new Gc({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)}))()}}},Og=(function(){return Ut(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,l=r.prepareSendMessagesRequest,d=r.prepareReconnectToStreamRequest;qt(this,n),this.api=a,this.credentials=i,this.headers=o,this.body=s,this.fetch=c,this.prepareSendMessagesRequest=l,this.prepareReconnectToStreamRequest=d},[{key:"sendMessages",value:(t=Ie(ne().m(function n(r){var u,a,i,o,s,c,l,d,f,h,D,m,y,E,g,b,F,_,C,k;return ne().w(function(A){for(;;)switch(A.n){case 0:return u=r.abortSignal,a=wn(r,vp),A.n=1,lr(this.body);case 1:return d=A.v,A.n=2,lr(this.headers);case 2:return f=A.v,A.n=3,lr(this.credentials);case 3:return h=A.v,D=L(L({},Vn(f)),Vn(a.headers)),A.n=4,(i=this.prepareSendMessagesRequest)==null?void 0:i.call(this,{api:this.api,id:a.chatId,messages:a.messages,body:L(L({},d),a.body),headers:D,credentials:h,requestMetadata:a.metadata,trigger:a.trigger,messageId:a.messageId});case 4:return m=A.v,y=(o=m?.api)!=null?o:this.api,E=m?.headers!==void 0?Vn(m.headers):D,g=m?.body!==void 0?m.body:L(L(L({},d),a.body),{},{id:a.chatId,messages:a.messages,trigger:a.trigger,messageId:a.messageId}),b=(s=m?.credentials)!=null?s:h,F=(c=this.fetch)!=null?c:globalThis.fetch,A.n=5,F(y,{method:"POST",headers:Hc(L({"Content-Type":"application/json"},E),"ai-sdk/".concat(Yc),Uc()),body:JSON.stringify(g),credentials:b,signal:u});case 5:if((_=A.v).ok){A.n=9;break}return C=Error,A.n=6,_.text();case 6:if((l=A.v)==null){A.n=7;break}k=l,A.n=8;break;case 7:k="Failed to fetch the chat response.";case 8:throw new C(k);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=Ie(ne().m(function n(r){var u,a,i,o,s,c,l,d,f,h,D,m,y,E,g,b,F;return ne().w(function(_){for(;;)switch(_.n){case 0:return _.n=1,lr(this.body);case 1:return c=_.v,_.n=2,lr(this.headers);case 2:return l=_.v,_.n=3,lr(this.credentials);case 3:return d=_.v,f=L(L({},Vn(l)),Vn(r.headers)),_.n=4,(u=this.prepareReconnectToStreamRequest)==null?void 0:u.call(this,{api:this.api,id:r.chatId,body:L(L({},c),r.body),headers:f,credentials:d,requestMetadata:r.metadata});case 4:return h=_.v,D=(a=h?.api)!=null?a:"".concat(this.api,"/").concat(r.chatId,"/stream"),m=h?.headers!==void 0?Vn(h.headers):f,y=(i=h?.credentials)!=null?i:d,E=(o=this.fetch)!=null?o:globalThis.fetch,_.n=5,E(D,{method:"GET",headers:Hc(m,"ai-sdk/".concat(Yc),Uc()),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})(),no=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return qt(this,e),Yn(this,e,[t])}return Xn(e,Og),Ut(e,[{key:"processResponseStream",value:function(t){return(function(n){var r=n.schema;return n.stream.pipeThrough(new TextDecoderStream).pipeThrough(new Th).pipeThrough(new TransformStream({transform:function(u,a){return Ie(ne().m(function i(){var o,s;return ne().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,Ra({text:o,schema:r});case 1:s.enqueue.call(s,c.v);case 2:return c.a(2)}},i)}))()}}))})({stream:t,schema:bg}).pipeThrough(new TransformStream({transform:function(n,r){return Ie(ne().m(function u(){return ne().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)}))()}}))}}])})(),Bg=(function(){return Ut(function t(n){var r=this,u=n.generateId,a=u===void 0?UD:u,i=n.id,o=i===void 0?a():i,s=n.transport,c=s===void 0?new no:s,l=n.messageMetadataSchema,d=n.dataPartSchemas,f=n.state,h=n.onError,D=n.onToolCall,m=n.onFinish,y=n.onData,E=n.sendAutomaticallyWhen;qt(this,t),this.activeResponse=void 0,this.jobExecutor=new wg,this.sendMessage=(function(){var g=Ie(ne().m(function b(F,_){var C,k,A,j,B,S,O;return ne().w(function(P){for(;;)switch(P.n){case 0:if(F!=null){P.n=2;break}
111return P.n=1,r.makeRequest(L({trigger:"submit-message",messageId:(C=r.lastMessage)==null?void 0:C.id},_));case 1:return P.a(2,void P.v);case 2:if(!("text"in F)&&!("files"in F)){P.n=6;break}if(!Array.isArray(F.files)){P.n=3;break}O=F.files,P.n=5;break;case 3:return P.n=4,(function(){var x=Ie(ne().m(function z(I){return ne().w(function(w){for(;;)switch(w.n){case 0:if(I!=null){w.n=1;break}return w.a(2,[]);case 1:if(globalThis.FileList&&I 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(I).map((function(){var N=Ie(ne().m(function R(M){var W,U,oe,he,fe;return ne().w(function(de){for(;;)switch(de.n){case 0:return W=M.name,U=M.type,oe=U,he=W,de.n=1,new Promise(function(H,G){var re=new FileReader;re.onload=function(De){var Y;H((Y=De.target)==null?void 0:Y.result)},re.onerror=function(De){return G(De)},re.readAsDataURL(M)});case 1:return fe=de.v,de.a(2,{type:"file",mediaType:oe,filename:he,url:fe})}},R)}));return function(R){return N.apply(this,arguments)}})())))}},z)}));return function(z){return x.apply(this,arguments)}})()(F.files);case 4:O=P.v;case 5:B={parts:[].concat(Fe(O),Fe("text"in F&&F.text!=null?[{type:"text",text:F.text}]:[]))},P.n=7;break;case 6:B=F;case 7:if(F.messageId==null){P.n=10;break}if(S=r.state.messages.findIndex(function(x){return x.id===F.messageId}),S!==-1){P.n=8;break}throw new Error("message with id ".concat(F.messageId," not found"));case 8:if(r.state.messages[S].role==="user"){P.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,S+1),r.state.replaceMessage(S,L(L({},B),{},{id:F.messageId,role:(k=B.role)!=null?k:"user",metadata:F.metadata})),P.n=11;break;case 10:r.state.pushMessage(L(L({},B),{},{id:(A=B.id)!=null?A:r.generateId(),role:(j=B.role)!=null?j:"user",metadata:F.metadata}));case 11:return P.n=12,r.makeRequest(L({trigger:"submit-message",messageId:F.messageId},_));case 12:return P.a(2)}},b)}));return function(b,F){return g.apply(this,arguments)}})(),this.regenerate=Ie(ne().m(function g(){var b,F,_,C,k=arguments;return ne().w(function(A){for(;;)switch(A.n){case 0:if(F=(b=k.length>0&&k[0]!==void 0?k[0]:{}).messageId,_=wn(b,mp),C=F==null?r.state.messages.length-1:r.state.messages.findIndex(function(j){return j.id===F}),C!==-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[C].role==="assistant"?C:C+1),A.n=2,r.makeRequest(L({trigger:"regenerate-message",messageId:F},_));case 2:return A.a(2)}},g)})),this.resumeStream=Ie(ne().m(function g(){var b,F=arguments;return ne().w(function(_){for(;;)switch(_.n){case 0:return b=F.length>0&&F[0]!==void 0?F[0]:{},_.n=1,r.makeRequest(L({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=Ie(ne().m(function b(F){var _,C,k,A,j;return ne().w(function(B){for(;;)if(B.n===0)return _=F.state,C=_===void 0?"output-available":_,F.tool,k=F.toolCallId,A=F.output,j=F.errorText,B.a(2,r.jobExecutor.run(Ie(ne().m(function S(){var O,P,x,z;return ne().w(function(I){for(;;)switch(I.n){case 0:x=r.state.messages,z=x[x.length-1],r.state.replaceMessage(x.length-1,L(L({},z),{},{parts:z.parts.map(function(w){return to(w)&&w.toolCallId===k?L(L({},w),{},{state:C,output:A,errorText:j}):w})})),r.activeResponse&&(r.activeResponse.state.message.parts=r.activeResponse.state.message.parts.map(function(w){return to(w)&&w.toolCallId===k?L(L({},w),{},{state:C,output:A,errorText:j}):w})),r.status!=="streaming"&&r.status!=="submitted"&&((O=r.sendAutomaticallyWhen)!=null&&O.call(r,{messages:r.state.messages}))&&r.makeRequest({trigger:"submit-message",messageId:(P=r.lastMessage)==null?void 0:P.id});case 1:return I.a(2)}},S)}))))},b)}));return function(b){return g.apply(this,arguments)}})(),this.addToolResult=this.addToolOutput,this.stop=Ie(ne().m(function g(){var b;return ne().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=l,this.dataPartSchemas=d,this.state=f,this.onError=h,this.onToolCall=D,this.onFinish=m,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=Ie(ne().m(function t(n){var r,u,a,i,o,s,c,l,d,f,h,D,m,y,E,g,b,F,_=this;return ne().w(function(C){for(;;)switch(C.p=C.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}),f=this.lastMessage,h=!1,D=!1,m=!1,C.p=1,(y={state:kg({lastMessage:this.state.snapshot(f),messageId:this.generateId()}),abortController:new AbortController}).abortController.signal.addEventListener("abort",function(){h=!0}),this.activeResponse=y,r!=="resume-stream"){C.n=4;break}return C.n=2,this.transport.reconnectToStream({chatId:this.id,metadata:u,headers:a,body:i});case 2:if((g=C.v)!=null){C.n=3;break}return C.a(2,void this.setStatus({status:"ready"}));case 3:E=g,C.n=6;break;case 4:return C.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=C.v;case 6:return b=function(k){return _.jobExecutor.run(function(){return k({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)}})})},C.n=7,(function(){var k=Ie(ne().m(function A(j){var B,S,O,P;return ne().w(function(x){for(;;)switch(x.p=x.n){case 0:B=j.stream,S=j.onError,O=B.getReader(),x.p=1;case 2:return x.n=3,O.read();case 3:if(!x.v.done){x.n=4;break}return x.a(3,5);case 4:x.n=2;break;case 5:x.n=7;break;case 6:x.p=6,P=x.v,S?.(P);case 7:return x.p=7,O.releaseLock(),x.f(7);case 8:return x.a(2)}},A,null,[[1,6,7,8]])}
111));return function(A){return k.apply(this,arguments)}})()({stream:Ag({stream:E,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:b,onError:function(k){throw k}}),onError:function(k){throw k}});case 7:this.setStatus({status:"ready"}),C.n=10;break;case 8:if(C.p=8,F=C.v,!h&&F.name!=="AbortError"){C.n=9;break}return C.a(2,(h=!0,this.setStatus({status:"ready"}),null));case 9:m=!0,F instanceof TypeError&&(F.message.toLowerCase().includes("fetch")||F.message.toLowerCase().includes("network"))&&(D=!0),this.onError&&F instanceof Error&&this.onError(F),this.setStatus({status:"error",error:F});case 10:C.p=10;try{(c=this.onFinish)==null||c.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:h,isDisconnect:D,isError:m,finishReason:(s=this.activeResponse)==null?void 0:s.state.finishReason})}catch(k){console.error(k)}return this.activeResponse=void 0,C.f(10);case 11:if(!((l=this.sendAutomaticallyWhen)!=null&&l.call(this,{messages:this.state.messages}))||m){C.n=12;break}return C.n=12,this.makeRequest({trigger:"submit-message",messageId:(d=this.lastMessage)==null?void 0:d.id,metadata:u,headers:a,body:i});case 12:return C.a(2)}},t,this,[[1,8,10,11]])})),function(t){return e.apply(this,arguments)})}]);var e})();function Ig(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(to).filter(function(a){return!a.providerExecuted});return u.length>0&&u.every(function(a){return a.state==="output-available"||a.state==="output-error"})}var Ot,pa,ha,Qr,Gr,Yr,pr,ro,uo,hr,Tg=(function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e})((tl||(tl=1,el=function(e,t){if(typeof e!="function")throw new TypeError("Expected the first argument to be a `function`, got `".concat(ot(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)}}),el)),_d=function(e,t,n){if(!t.has(e))throw TypeError("Cannot "+n)},Ve=function(e,t,n){return _d(e,t,"read from private field"),n?n.call(e):t.get(e)},Kt=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)},_n=function(e,t,n,r){return _d(e,t,"write to private field"),t.set(e,n),n},Pg=(function(){return Ut(function e(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];qt(this,e),Kt(this,Ot,void 0),Kt(this,pa,"ready"),Kt(this,ha,void 0),Kt(this,Qr,new Set),Kt(this,Gr,new Set),Kt(this,Yr,new Set),this.pushMessage=function(r){_n(t,Ot,Ve(t,Ot).concat(r)),Ve(t,pr).call(t)},this.popMessage=function(){_n(t,Ot,Ve(t,Ot).slice(0,-1)),Ve(t,pr).call(t)},this.replaceMessage=function(r,u){_n(t,Ot,[].concat(Fe(Ve(t,Ot).slice(0,r)),[t.snapshot(u)],Fe(Ve(t,Ot).slice(r+1)))),Ve(t,pr).call(t)},this.snapshot=function(r){return structuredClone(r)},this["~registerMessagesCallback"]=function(r,u){var a,i,o=u?(a=r,(i=u)!=null?Tg(a,i):a):r;return Ve(t,Qr).add(o),function(){Ve(t,Qr).delete(o)}},this["~registerStatusCallback"]=function(r){return Ve(t,Gr).add(r),function(){Ve(t,Gr).delete(r)}},this["~registerErrorCallback"]=function(r){return Ve(t,Yr).add(r),function(){Ve(t,Yr).delete(r)}},Kt(this,pr,function(){Ve(t,Qr).forEach(function(r){return r()})}),Kt(this,ro,function(){Ve(t,Gr).forEach(function(r){return r()})}),Kt(this,uo,function(){Ve(t,Yr).forEach(function(r){return r()})}),_n(this,Ot,n)},[{key:"status",get:function(){return Ve(this,pa)},set:function(e){_n(this,pa,e),Ve(this,ro).call(this)}},{key:"error",get:function(){return Ve(this,ha)},set:function(e){_n(this,ha,e),Ve(this,uo).call(this)}},{key:"messages",get:function(){return Ve(this,Ot)},set:function(e){_n(this,Ot,Fe(e)),Ve(this,pr).call(this)}}])})();Ot=new WeakMap,pa=new WeakMap,ha=new WeakMap,Qr=new WeakMap,Gr=new WeakMap,Yr=new WeakMap,pr=ne
111w WeakMap,ro=new WeakMap,uo=new WeakMap;var nl=(function(){function e(t){var n,r=t.messages,u=wn(t,Dp);qt(this,e);var a=new Pg(r);return n=Yn(this,e,[L(L({},u),{},{state:a})]),Kt(fr(n),hr,void 0),n["~registerMessagesCallback"]=function(i,o){return Ve(fr(n),hr)["~registerMessagesCallback"](i,o)},n["~registerStatusCallback"]=function(i){return Ve(fr(n),hr)["~registerStatusCallback"](i)},n["~registerErrorCallback"]=function(i){return Ve(fr(n),hr)["~registerErrorCallback"](i)},_n(fr(n),hr,a),n}return Xn(e,Bg),Ut(e)})();hr=new WeakMap;var rl="askai_token",jg=function(e){if(!e)return!0;try{var t=(function(r){var u=Be(r.split("."),1)[0];return JSON.parse(atob(u))})(e),n=t.exp;return Date.now()/1e3>n-30}catch{return!0}},ra=null,bd=(function(){var e=_e(J().m(function t(n){var r,u,a,i,o,s;return J().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(rl),jg(o)){c.n=1;break}return c.a(2,o);case 1:return s=i?Eo:Fo,ra||(ra=fetch("".concat(s,"/token"),{method:"POST",headers:{"x-algolia-assistant-id":r,"content-type":"application/json"},signal:u}).then(function(l){return l.json()}).then(function(l){var d=l.token,f=l.success,h=l.message;if(!f&&h)throw new Error(h);return sessionStorage.setItem(rl,d),d}).finally(function(){return ra=null})),c.a(2,ra)}},t)}));return function(t){return e.apply(this,arguments)}})(),Ng=(function(){var e=_e(J().m(function t(n){var r,u,a,i,o,s,c,l,d,f;return J().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,(l=new Headers).set("x-algolia-assistant-id",r),l.set("content-type","application/json"),h.n=1,bd({assistantId:r,abortSignal:o,useStagingEnv:c});case 1:return d=h.v,l.set("authorization","TOKEN ".concat(d)),f=c?Eo:Fo,h.a(2,fetch("".concat(f,"/feedback"),{method:"POST",body:JSON.stringify({appId:i,messageId:a,thumbs:u}),headers:l}))}},t)}));return function(t){return e.apply(this,arguments)}})(),zg=["assistantId","apiKey","appId","indexName","useStagingEnv"];function Rg(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,l,d;return c=e.timeToLive?1e3*e.timeToLive:null,l=u(),a(d=Object.fromEntries(Object.entries(l).filter(function(f){return Be(f,2)[1].timestamp!==void 0}))),c&&a(Object.fromEntries(Object.entries(d).filter(function(f){var h=Be(f,2)[1],D=new Date().getTime();return!(h.timestamp+c<D)}))),u()[JSON.stringify(i)]}).then(function(c){return Promise.all([c?c.value:o(),c!==void 0])}).then(function(c){var l=Be(c,2),d=l[0],f=l[1];return Promise.all([d,f||s.miss(d)])}).then(function(c){return Be(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 Xr(e){var t=K(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 Be(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 Xr({caches:t}).get(r,u,a)})},set:function(r,u){return n.set(r,u).catch(function(){return Xr({caches:t}).set(r,u)})}
111,delete:function(r){return n.delete(r).catch(function(){return Xr({caches:t}).delete(r)})},clear:function(){return n.clear().catch(function(){return Xr({caches:t}).clear()})}}}function di(){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 Mg(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 ul=12e4;function al(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>ul},isTimedOut:function(){return t==="timed out"&&Date.now()-n<=ul}})}var Cd=(function(){function e(t,n){var r;return ae(this,e),xe(r=me(this,e,[t]),"name","AlgoliaError"),n&&(r.name=n),r}return pe(e,xn(Error)),ie(e)})(),kd=(function(){function e(t,n,r){var u;return ae(this,e),xe(u=me(this,e,[t,r]),"stackTrace",void 0),u.stackTrace=n,u}return pe(e,Cd),ie(e)})(),Zg=(function(){function e(t){return ae(this,e),me(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 pe(e,kd),ie(e)})(),ao=(function(){function e(t,n,r){var u,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"ApiError";return ae(this,e),xe(u=me(this,e,[t,r,a]),"status",void 0),u.status=n,u}return pe(e,kd),ie(e)})(),Lg=(function(){function e(t,n){var r;return ae(this,e),xe(r=me(this,e,[t,"DeserializationError"]),"response",void 0),r.response=n,r}return pe(e,Cd),ie(e)})(),$g=(function(){function e(t,n,r,u){var a;return ae(this,e),xe(a=me(this,e,[t,n,u,"DetailedApiError"]),"error",void 0),a.error=r,a}return pe(e,ao),ie(e)})();function qg(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 Ug(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 Hg(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 Vg(e){try{return JSON.parse(e.content)}catch(t){throw new Lg(t.message,e)}}function Wg(e,t){var n=e.content,r=e.status;try{var u=JSON.parse(n);return"error"in u?new $g(u.message,r,u.error,t):new ao(u.message,r,t)}catch{}return new ao(n,r,t)}function Kg(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 Qg(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 Gg=["appId","apiKey","authMode","algoliaAgents"],Yg=["params"],il="5.43.0";function Xg(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 io="4.5.3";
111function ey(e,t,n){var r=p.useMemo(function(){var u=(function(a,i){if(!a||typeof a!="string")throw new Error("`appId` is missing.");if(!i||typeof i!="string")throw new Error("`apiKey` is missing.");return(function(o){var s=o.appId,c=o.apiKey,l=o.authMode,d=o.algoliaAgents,f=ft(o,Gg),h=(function(m,y){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"WithinHeaders",g={"x-algolia-api-key":y,"x-algolia-application-id":m};return{headers:function(){return E==="WithinHeaders"?g:{}},queryParameters:function(){return E==="WithinQueryParameters"?g:{}}}})(s,c,l),D=(function(m){var y=m.hosts,E=m.hostsCache,g=m.baseHeaders,b=m.logger,F=m.baseQueryParameters,_=m.algoliaAgent,C=m.timeouts,k=m.requester,A=m.requestsCache,j=m.responsesCache;function B(x){return S.apply(this,arguments)}function S(){return(S=_e(J().m(function x(z){var I,w,N,R,M;return J().w(function(W){for(;;)switch(W.n){case 0:return W.n=1,Promise.all(z.map(function(U){return E.get(U,function(){return Promise.resolve(al(U))})}));case 1:return I=W.v,w=I.filter(function(U){return U.isUp()}),N=I.filter(function(U){return U.isTimedOut()}),R=[].concat(K(w),K(N)),M=R.length>0?R:z,W.a(2,{hosts:M,getTimeout:function(U,oe){return(N.length===0&&U===0?1:N.length+3+U)*oe}})}},x)}))).apply(this,arguments)}function O(x,z){return P.apply(this,arguments)}function P(){return P=_e(J().m(function x(z,I){var w,N,R,M,W,U,oe,he,fe,de,H,G,re,De=arguments;return J().w(function(Y){for(;;)switch(Y.n){case 0:if(w=!(De.length>2&&De[2]!==void 0)||De[2],N=[],R=Ug(z,I),M=Hg(g,z.headers,I.headers),W=z.method==="GET"?v(v({},z.data),I.data):{},U=v(v(v({},F),z.queryParameters),W),_.value&&(U["x-algolia-agent"]=_.value),I&&I.queryParameters)for(oe=0,he=Object.keys(I.queryParameters);oe<he.length;oe++)fe=he[oe],I.queryParameters[fe]&&Object.prototype.toString.call(I.queryParameters[fe])!=="[object Object]"?U[fe]=I.queryParameters[fe].toString():U[fe]=I.queryParameters[fe];return de=0,H=(function(){var ce=_e(J().m(function be(Re,Ce){var je,Ze,Ht,Xt,dt,en;return J().w(function(rt){for(;;)switch(rt.n){case 0:if((je=Re.pop())!==void 0){rt.n=1;break}throw new Zg(Qg(N));case 1:return Ze=v(v({},C),I.timeouts),Ht={data:R,headers:M,method:z.method,url:qg(je,z.path,U),connectTimeout:Ce(de,Ze.connect),responseTimeout:Ce(de,w?Ze.read:Ze.write)},Xt=function(Vt){var Dt={request:Ht,response:Vt,host:je,triesLeft:Re.length};return N.push(Dt),Dt},rt.n=2,k.send(Ht);case 2:if(!Kg(dt=rt.v)){rt.n=4;break}return en=Xt(dt),dt.isTimedOut&&de++,b.info("Retryable failure",Ad(en)),rt.n=3,E.set(je,al(je,dt.isTimedOut?"timed out":"down"));case 3:return rt.a(2,H(Re,Ce));case 4:if(!Jg(dt)){rt.n=5;break}return rt.a(2,Vg(dt));case 5:throw Xt(dt),Wg(dt,N);case 6:return rt.a(2)}},be)}));return function(be,Re){return ce.apply(this,arguments)}})(),G=y.filter(function(ce){return ce.accept==="readWrite"||(w?ce.accept==="read":ce.accept==="write")}),Y.n=1,B(G);case 1:return re=Y.v,Y.a(2,H(K(re.hosts).reverse(),re.getTimeout))}},x)})),P.apply(this,arguments)}return{hostsCache:E,requester:k,timeouts:C,logger:b,algoliaAgent:_,baseHeaders:g,baseQueryParameters:F,hosts:y,request:function(x){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=x.useReadTransporter||x.method==="GET";if(!I)return O(x,z,I);var w=function(){return O(x,z)};if((z.cacheable||x.cacheable)!==!0)return w();var N={request:x,requestOptions:z,transporter:{queryParameters:F,headers:g}};return j.get(N,function(){return A.get(N,function(){return A.set(N,w()).then(function(R){return Promise.all([A.delete(N),R])},function(R){return Promise.all([A.delete(N),Promise.reject(R)])}).then(function(R){var M=Be(R,2);return M[0],M[1]})})},{miss:function(R){return j.set(N,R)}})},requestsCache:A,responsesCache:j}})(v(v({hosts:Xg(s)},f),{},{algoliaAgent:Mg({algoliaAgents:d,client:"Lite",version:il}),baseHeaders:v(v({"content-type":"text/plain"},h.headers()),f.baseHeaders),baseQueryParameters:v(v({},h.queryParameters()),f.baseQueryParameters)}));return{transporter:D,appId:s,apiKey:c,clearCache:function(){return Promise.all([D.requestsCache.clear(),D.responsesCache.clear()]).then(function(){})},get _ua(){return D.algoliaAgent.value},addAlgoliaAgent:function(m,y){D.algoliaAgent.add({segment:m,version:y})},setClientApiKey:function(m){var y=m.apiKey;l&&l!=="WithinHeaders"?D.baseQueryParameters["x-algolia-api-key"]=y:D.baseHeaders["x-algolia-api-key"]=y},searchForHits:function(m,y){return this.search(m,y)},searchForFacets:function(m,y){return this.search(m,y)},customPost:function(m,y){var E=m.path,g=m.parameters,b=m.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 D.request(F,y)},getRecommendations:function(m,y){if(m&&Array.isArray(m)&&(m={requests:m}),!m)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!m.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var E={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:m,useReadTransporter:!0,cacheable:!0};return D.request(E,y)},search:function(m,y){if(m&&Array.isArray(m)){var E={requests:m.map(function(b){var F=b.params,_=ft(b,Yg);return _.type==="facet"?v(v(v({},_),F),{},{type:"facet"}):v(v(v({},_),F),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})})};m=E}if(!m)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!m.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var g={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:m,useReadTransporter:!0,cacheable:!0};return D.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 l,d=function(h,D){return setTimeout(function(){c.abort(),s({status:0,content:D,isTimedOut:!0})},h)},f=d(o.connectTimeout,"Connection timeout");c.onreadystatechange=function(){c.readyState>c.OPENED&&l===void 0&&(clearTimeout(f),l=d(o.responseTimeout,"Socket timeout"))},c.onerror=function(){c.status===0&&(clearTimeout(f),clearTimeout(l),s({content:c.responseText||"Network request failed",status:c.status,isTimedOut:!1}))},c.onload=function(){clearTimeout(f),clearTimeout(l),s({content:c.responseText,status:c.status,isTimedOut:!1})},c.send(o.data)})}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:di(),requestsCache:di({serializable:!1}),hostsCache:Xr({caches:[Rg({key:"".concat(il,"-").concat(a)}),di()]})},void 0))})(e,t);return u.addAlgoliaAgent("docsearch",io),/docsearch.js \(.*\)/.test(u.transporter.algoliaAgent.value)===!1&&u.addAlgoliaAgent("docsearch-react",io),n(u)},[e,t,n]);return r}var ty=["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"],ny=["footer","searchBox"],ry=(function(){var e=_e(J().m(function t(n){var r,u,a,i,o,s,c,l,d,f,h,D,m,y,E,g,b,F,_;return J().w(function(C){for(;;)switch(C.p=C.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,l=n.insights,d=n.appId,f=n.apiKey,h=n.maxResultsPerGroup,D=n.transformItems,m=D===void 0?Ai:D,y=n.saveRecentSearch,E=n.onClose,g=l,C.p=1,C.n=2,o.search({requests:s.map(function(k){var A,j,B,S,O,P,x,z=typeof k=="string"?k:k.name,I=typeof k=="string"?{}:k.searchParameters;return v({query:r,indexName:z,attributesToRetrieve:(A=I?.attributesToRetrieve)!==null&&A!==void 0?A:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:(j=I?.attributesToSnippet)!==null&&j!==void 0?j:["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:(B=I?.snippetEllipsisText)!==null&&B!==void 0?B:"…",highlightPreTag:(S=I?.highlightPreTag)!==null&&S!==void 0?S:"<mark>",highlightPostTag:(O=I?.highlightPostTag)!==null&&O!==void 0?O:"</mark>",hitsPerPage:(P=I?.hitsPerPage)!==null&&P!==void 0?P:20,clickAnalytics:(x=I?.clickAnalytics)!==null&&x!==void 0?x:g},I??{})})});case 2:return b=C.v,F=b.results,C.a(2,F.flatMap(function(k){var A,j=k,B=j.hits,S=j.nbHits,O=ks(m(B),function(z){return ql(z)},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))}),S){var P=u.context.nbHits;a({nbHits:(P??0)+S})}var x={};return g&&(x={__autocomplete_indexName:j.index,__autocomplete_queryID:j.queryID,__autocomplete_algoliaCredentials:{appId:d,apiKey:f}}),Object.values(O).map(function(z,I){return{sourceId:"hits_".concat(j.index,"_").concat(I),onSelect:function(w){var N=w.item,R=w.event;y(N),ia(R)||E()},getItemUrl:function(w){return w.item.url},getItems:function(){return Object.values(ks(z,function(w){return w.hierarchy.lvl1},h)).map(function(w){return w.map(function(N){var R=null,M=w.find(function(W){return W.type==="lvl1"&&W.hierarchy.lvl1===N.hierarchy.lvl1});return N.type!=="lvl1"&&M&&(R=M),v(v({},N),{},{__docsearch_parent:R},x)})}).flat()}}})}));case 3:throw C.p=3,(_=C.v).name==="RetryError"&&i("error"),_;case 4:return C.a(2)}},t,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}})();function uy(e){var t,n,r,u,a=e.appId,i=e.apiKey,o=e.askAi,s=e.maxResultsPerGroup,c=e.theme,l=e.onClose,d=l===void 0?Fp:l,f=e.transformItems,h=f===void 0?Ai:f,D=e.hitComponent,m=D===void 0?c0:D,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,C=_===void 0?Ai:_,k=e.disableUserPersonalization,A=k!==void 0&&k,j=e.initialQuery,B=j===void 0?"":j,S=e.translations,O=S===void 0?{}:S,P=e.getMissingResultsUrl,x=e.insights,z=x!==void 0&&x,I=e.onAskA
111iToggle,w=e.interceptAskAiEvent,N=e.isAskAiActive,R=N!==void 0&&N,M=e.recentSearchesLimit,W=M===void 0?7:M,U=e.recentSearchesWithFavoritesLimit,oe=U===void 0?4:U,he=e.indices,fe=he===void 0?[]:he,de=e.indexName,H=e.searchParameters,G=e.isHybridModeSupported,re=G!==void 0&&G,De=ft(e,ty),Y=O.footer,ce=O.searchBox,be=ft(O,ny),Re=Be(p.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),Ce=Re[0],je=Re[1],Ze=!!o,Ht=(O==null||(t=O.searchBox)===null||t===void 0?void 0:t.placeholderText)||De.placeholder||"Search docs";Ze&&(Ht=(O==null||(r=O.searchBox)===null||r===void 0?void 0:r.placeholderText)||"Search docs or ask AI a question"),R&&(Ht=(O==null||(u=O.searchBox)===null||u===void 0?void 0:u.placeholderTextAskAi)||"Ask another question...");var Xt=p.useRef(null),dt=p.useRef(null),en=p.useRef(null),rt=p.useRef(null),Vt=p.useRef(null),Dt=p.useRef(15),_t=p.useRef(typeof window<"u"?window.getSelection().toString().slice(0,512):"").current,Pt=p.useRef(B||_t).current,Tn=ey(a,i,C),Xe=ot(o)==="object"?o:null,fn=typeof o=="string"?o:Xe?.assistantId||null,dn=Xe?.searchParameters,Tr=Xe?.useStagingEnv||!1,Pr=Be(p.useState("initial"),2),pn=Pr[0],bt=Pr[1],Wa=(function($){var ue=$.assistantId,ye=$.searchClient,Ue=$.suggestedQuestionsEnabled,$e=Ue!==void 0&&Ue,gt=Be(er([]),2),jt=gt[0],Ct=gt[1];return $t(function(){var Rn=(function(){var Rr=_e(J().m(function at(){var it,ur,rn;return J().w(function(un){for(;;)switch(un.n){case 0:return un.n=1,ye.search({requests:[{indexName:"algolia_ask_ai_suggested_questions",filters:"state:published AND assistantId:".concat(ue),hitsPerPage:3}]});case 1:it=un.v,ur=it.results,rn=ur[0],Ct(rn.hits);case 2:return un.a(2)}},at)}));return function(){return Rr.apply(this,arguments)}})();$e&&ue&&ue!==""&&Rn()},[$e,ue,ye]),jt})({assistantId:fn,searchClient:Tn,suggestedQuestionsEnabled:Xe?.suggestedQuestions}),jr=(n=Xe?.agentStudio)!==null&&n!==void 0&&n,hn=[];if(de&&de!==""&&hn.push({name:de,searchParameters:H}),fe.length>0&&fe.forEach(function($){hn.push(typeof $=="string"?{name:$}:$)}
111),hn.length<1)throw new Error("Must supply either `indexName` or `indices` for DocSearch to work");var vn=hn[0].name,Pn=p.useRef(mc({key:"__DOCSEARCH_ASKAI_CONVERSATIONS__".concat(Xe?.indexName||vn),limit:10})).current,mn=p.useRef(vc({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(vn),limit:10})).current,jn=p.useRef(vc({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(vn),limit:mn.getAll().length===0?W:oe})).current,Ne=Be(p.useState(!1),2),tn=Ne[0],$o=Ne[1],Nn=(function($){var ue=$.assistantId,ye=$.apiKey,Ue=$.appId,$e=$.indexName,gt=$.useStagingEnv,jt=gt!==void 0&&gt,Ct=ft($,zg),Rn=gr(new AbortController),Rr=Bt(function(){return Ct.agentStudio?(function(qe){var He=qe.appId,Qe=qe.apiKey,pt=qe.assistantId,Le=qe.searchParameters;return new no({api:"https://".concat(He,".algolia.net/agent-studio/1/agents/").concat(pt,"/completions?stream=true&compatibilityMode=ai-sdk-5"),headers:{"x-algolia-application-id":He,"x-algolia-api-key":Qe},body:Le?{algolia:{searchParameters:Le}}:{}})})({apiKey:ye,appId:Ue,assistantId:ue??"",searchParameters:Ct.searchParameters}):(function(qe){var He,Qe=qe.assistantId,pt=qe.apiKey,Le=qe.indexName,Se=qe.searchParameters,Zr=qe.appId,Lu=qe.abortController,$u=qe.useStagingEnv;return new no({api:$u?Eo:Fo,headers:(He=_e(J().m(function Ja(){var Lr;return J().w(function(Mn){for(;;)switch(Mn.n){case 0:if(Qe){Mn.n=1;break}throw new Error("Ask AI assistant ID is required");case 1:return Mn.n=2,bd({assistantId:Qe,abortSignal:Lu.signal,useStagingEnv:$u});case 2:return Lr=Mn.v,Mn.a(2,v(v({},Lr?{authorization:"TOKEN ".concat(Lr)}:{}),{},{"X-Algolia-API-Key":pt,"X-Algolia-Application-Id":Zr,"X-Algolia-Index-Name":Le,"X-Algolia-Assistant-Id":Qe||"","X-AI-SDK-Version":"v5"}))}},Ja)})),function(){return He.apply(this,arguments)}),body:Se?{searchParameters:Se}:{}})})({assistantId:ue??"",apiKey:ye,appId:Ue,indexName:$e,searchParameters:Ct.searchParameters,abortController:Rn.current,useStagingEnv:jt})},[ye,Ue,ue,$e,jt,Ct]),at=(function(){var qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},He=qe.experimental_throttle,Qe=qe.resume,pt=Qe!==void 0&&Qe,Le=wn(qe,gp),Se=gr("chat"in Le?Le.chat:new nl(Le));("chat"in Le&&Le.chat!==Se.current||"id"in Le&&Se.current.id!==Le.id)&&(Se.current="chat"in Le?Le.chat:new nl(Le));var Zr="id"in Le?Le.id:null,Lu=tu(function(ar){return Se.current["~registerMessagesCallback"](ar,He)},[He,Zr]),$u=nu(Lu,function(){return Se.current.messages}),Ja=nu(Se.current["~registerStatusCallback"],function(){return Se.current.status}),Lr=nu(Se.current["~registerErrorCallback"],function(){return Se.current.error}),Mn=tu(function(ar){typeof ar=="function"&&(ar=ar(Se.current.messages)),Se.current.messages=ar},[Se]);return $t(function(){pt&&Se.current.resumeStream()},[pt,Se]),{id:Se.current.id,messages:$u,setMessages:Mn,sendMessage:Se.current.sendMessage,regenerate:Se.current.regenerate,clearError:Se.current.clearError,stop:Se.current.stop,error:Lr,resumeStream:Se.current.resumeStream,status:Ja,addToolResult:Se.current.addToolOutput,addToolOutput:Se.current.addToolOutput}})({sendAutomaticallyWhen:Ig,transport:Rr}),it=at.messages,ur=at.sendMessage,rn=at.status,un=at.setMessages,yt=at.error,Mr=at.stop,gn=gr(mc({key:"__DOCSEARCH_ASKAI_CONVERSATIONS__".concat($e),limit:10})).current,jd=tu((function(){var qe=_e(J().m(function He(Qe,pt){var Le;return J().w(function(Se){for(;;)switch(Se.n){case 0:if(ue){Se.n=1;break}return Se.a(2);case 1:return Se.n=2,Ng({assistantId:ue,thumbs:pt,messageId:Qe,appId:Ue,abortSignal:Rn.current.signal,useStagingEnv:jt});case 2:if(!(Se.v.status>=300)){Se.n=3;break}throw new Error("Failed, try again later.");case 3:(Le=gn.addFeedback)===null||Le===void 0||Le.call(gn,Qe,pt===1?"like":"dislike");case 4:return Se.a(2)}},He)}));return function(He,Qe){return qe.apply(this,arguments)}})(),[ue,Ue,gn,jt]),Nd=(function(){var qe=_e(J().m(function He(){return J().w(function(Qe){for(;;)switch(Qe.n){case 0:return Rn.current.abort(),Qe.n=1,Mr();case 1:return Qe.a(2)}},He)}));return function(){return qe.apply(this,arguments)}})(),zd=Bt(function(){for(var qe=[],He=0;He<it.length;He++)if(it[He].role==="user"){var Qe,pt=it[He],Le=((Qe=it[He+1])===null||Qe===void 0?void 0:Qe.role)==="assistant"?it[He+1]:null;qe.push({id:pt.id,userMessage:pt,assistantMessage:Le}),Le&&He++}return qe},[it]),Rd=rn==="streaming"||rn==="submitted",Md=Bt(function(){if(yt)return Ct.agentStudio?(function(qe){var He=qe.message;try{var Qe=JSON.parse(qe.message);if(Qe.name==="ValidationError"){var pt=Qe;if(pt.detail&&pt.detail.length>0){var Le=pt.detail[0],Se=Le.msg,Zr=Le.loc.at(-1);He="".concat(Se,": ").concat(Zr)}}else He=Qe.message}catch{}return new Error(He)})(yt):yt}
111,[yt,Ct.agentStudio]);return{messages:it,sendMessage:ur,status:rn,setMessages:un,askAiError:Md,stopAskAiStreaming:Nd,isStreaming:Rd,exchanges:zd,conversations:gn,sendFeedback:jd}})({assistantId:fn,apiKey:Xe?.apiKey||i,appId:Xe?.appId||a,indexName:Xe?.indexName||vn,searchParameters:dn,useStagingEnv:Tr,agentStudio:jr}),nr=Nn.messages,Dn=Nn.status,Nr=Nn.setMessages,qo=Nn.sendMessage,Sd=Nn.stopAskAiStreaming,Zu=Nn.askAiError,Uo=Nn.sendFeedback,Ho=p.useRef(Dn);p.useEffect(function(){if(!A){if(Ho.current==="streaming"&&Dn==="ready"){tn&&nr.at(-1)&&(nr.at(-1).metadata={stopped:!0});var $,ue=V(nr[0].parts);try{for(ue.s();!($=ue.n()).done;){var ye=$.value;ye.type==="text"&&Pn.add(J0(ye.text,nr))}}catch(Ue){ue.e(Ue)}finally{ue.f()}}Ho.current=Dn}},[Dn,nr,Pn,A,tn]);var xd=p.useMemo(function(){return Dn==="error"&&Bo(Zu)},[Dn,Zu]),Vo=p.useCallback(function($){var ue=$.hierarchy,ye=["lvl6","lvl5","lvl4","lvl3","lvl2","lvl1","lvl0"].find(function(Ue){return ue[Ue]});return v(v({},$),{},{type:ye||"lvl0",content:null})},[]),Ka=p.useCallback(function($){if(!A){var ue=$.type==="content"?$.__docsearch_parent||Vo($):$;ue&&mn.getAll().findIndex(function(ye){return ye.objectID===ue.objectID})===-1&&jn.add(ue)}},[mn,jn,A,Vo]),Od=p.useCallback(function($){if(Ce.context.algoliaInsightsPlugin&&$.__autocomplete_id){var ue=$,ye={eventName:"Item Selected",index:ue.__autocomplete_indexName,items:[ue],positions:[$.__autocomplete_id],queryID:ue.__autocomplete_queryID};Ce.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(ye)}},[Ce.context.algoliaInsightsPlugin]),nn=p.useRef(void 0),zr=p.useCallback(function($,ue){var ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if($){var Ue={query:ue,suggestedQuestionId:ye?.objectID};if(w!=null&&w(Ue))return void(nn.current&&nn.current.setQuery(""))}if($&&pn==="new-conversation"&&bt("initial"),I($,{query:ue,suggestedQuestionId:ye?.objectID}),!re){$o(!1);var $e={};if(ye&&($e.body={suggestedQuestionId:ye.objectID}),qo({role:"user",parts:[{type:"text",text:ue}]},$e),rt.current){var gt=rt.current;typeof gt.scrollTo=="function"?gt.scrollTo({top:0,behavior:"smooth"}):gt.scrollTop=0}nn.current&&nn.current.setQuery("")}},[I,w,qo,pn,bt,re]),Bd=p.useCallback((function(){var $=_e(J().m(function ue(ye,Ue){return J().w(function($e){for(;;)switch($e.n){case 0:if(fn&&a){$e.n=1;break}return $e.a(2);case 1:return $e.n=2,Uo(ye,Ue);case 2:return $e.a(2)}},ue)}));return function(ue,ye){return $.apply(this,arguments)}})(),[fn,a,Uo]);nn.current||(nn.current=i0({id:"docsearch",defaultActiveItemId:0,openOnFocus:!0,initialState:{query:Pt,context:{searchSuggestions:[]}},insights:!!z,navigator:g,onStateChange:function($){je($.state)},getSources:function($){var ue=$.query,ye=$.state,Ue=$.setContext,$e=$.setStatus;if(!ue){var gt=(function(at){var it=at.recentSearches,ur=at.favoriteSearches,rn=at.saveRecentSearch,un=at.onClose;return at.disableUserPersonalization?[]:[{sourceId:"recentSearches",onSelect:function(yt){var Mr=yt.item,gn=yt.event;rn(Mr),ia(gn)||un()},getItemUrl:function(yt){return yt.item.url},getItems:function(){return it.getAll()}},{sourceId:"favoriteSearches",onSelect:function(yt){var Mr=yt.item,gn=yt.event;rn(Mr),ia(gn)||un()},getItemUrl:function(yt){return yt.item.url},getItems:function(){return ur.getAll()}}]})({recentSearches:jn,favoriteSearches:mn,saveRecentSearch:Ka,onClose:d,disableUserPersonalization:A}),jt=Ze?[{sourceId:"recentConversations",getItems:function(){return A?[]:Pn.getAll()},onSelect:function(at){var it=at.item;it.messages&&(Nr(it.messages),I(!0))}}]:[];return[].concat(K(gt),jt)}var Ct={context:ye.context},Rn=ry({query:ue,state:Ct,setContext:Ue,setStatus:$e,searchClient:Tn,indexes:hn,snippetLength:Dt,insights:!!z,appId:a,apiKey:i,maxResultsPerGroup:s,transformItems:h,saveRecentSearch:Ka,onClose:d}),Rr=Ze?[{sourceId:"askAI",getItems:function(){return[{type:"askAI",query:ue,url_without_anchor:"",objectID:"ask-ai-button",content:null,url:"",anchor:null,hierarchy:{lvl0:"Ask AI",lvl1:ue,lvl2:null,lvl3:null,lvl4:null,lvl5:null,lvl6:null},_highlightResult:{},_snippetResult:{},__docsearch_parent:null}]},onSelect:function(at){var it=at.item;it.type==="askAI"&&it.query&&zr(!0,it.query)}}]:[];return Rn.then(function(at){return[].concat(Rr,K(at))})}}));var Wo,rr,zn=nn.current,Id=zn.getEnvironmentProps,Td=zn.getRootProps,Ko=zn.refresh;(function($){var ue=$.getEnvironmentProps,ye=$.panelElement,Ue=$.formElement,$e=$.inputElement;p.useEffect(function(){if(ye&&Ue&&$e){var gt=ue({panelElement:ye,formElement:Ue,inputElement:$e}),jt=gt.onTouchStart,Ct=gt.onTouchMove;return window.addEventListener("touchstart",jt),window.addEventListener("touchmove",Ct),function(){window.removeEventListener("touchstart",jt),window.removeEventListener("touchmove",Ct)}}},[ue,ye,Ue,$e])})({getEnvironmentProps:Id,panelElement:rt.current,formElement:en.current,inputElement:Vt.current}),Wo={container:Xt.current},rr=Wo.container,p.useEffect(function(){if(rr){var $=rr.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), input:not([disabled])"),ue=$[0],ye=$[$.length-1];return rr.addEventListener("keydown",Ue),function(){rr.removeEventListener("keydown",Ue)}}function Ue($e){$e.key==="Tab"&&($e.shiftKey?document.activeElement===ue&&($e.preventDefault(),ye.focu
111s()):document.activeElement===ye&&($e.preventDefault(),ue.focus()))}},[rr]),Ll({theme:c}),p.useEffect(function(){return document.body.classList.add("DocSearch--active"),function(){var $,ue;document.body.classList.remove("DocSearch--active"),($=(ue=window).scrollTo)===null||$===void 0||$.call(ue,0,F)}},[]),p.useEffect(function(){typeof window<"u"&&window.localStorage&&(function(){if(typeof window>"u"||!window.localStorage)return 0;var $=0;for(var ue in window.localStorage)window.localStorage.hasOwnProperty(ue)&&($+=window.localStorage[ue].length+ue.length);return $})()>4194304&&af()},[]),p.useLayoutEffect(function(){var $=window.innerWidth-document.body.clientWidth;return document.body.style.marginInlineEnd="".concat($,"px"),function(){document.body.style.marginInlineEnd="0px"}},[]),p.useEffect(function(){window.matchMedia("(max-width: 768px)").matches&&(Dt.current=5)},[]),p.useEffect(function(){var $;rt.current&&!R&&(typeof($=rt.current).scrollTo=="function"?$.scrollTo({top:0,behavior:"smooth"}):$.scrollTop=0)},[Ce.query,R]),p.useEffect(function(){Pt.length>0&&(Ko(),Vt.current&&Vt.current.focus())},[Pt,Ko]),p.useEffect(function(){function $(){if(dt.current){var ue=.01*window.innerHeight;dt.current.style.setProperty("--docsearch-vh","".concat(ue,"px"))}}return $(),window.addEventListener("resize",$),function(){window.removeEventListener("resize",$)}},[]),p.useEffect(function(){R||(zn.refresh(),Nr([]))},[R,zn,Nr]),p.useEffect(function(){bt("initial")},[R,bt]);var Pd=(function(){var $=_e(J().m(function ue(){return J().w(function(ye){for(;;)switch(ye.n){case 0:return $o(!0),ye.n=1,Sd();case 1:return ye.a(2)}},ue)}));return function(){return $.apply(this,arguments)}})(),Jo=function(){Nr([]),bt("new-conversation")},Qo=!0,Go=Ce.collections.some(function($){return $.items.length>0});return Ce.status!=="idle"||Go!==!1||Ce.query.length!==0||R||(Qo=!1),p.createElement("div",Ke({ref:Xt},Td({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container",Ce.status==="stalled"&&"DocSearch-Container--Stalled",Ce.status==="error"&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function($){$.target===$.currentTarget&&d()}}),p.createElement("div",{className:"DocSearch-Modal",ref:dt},p.createElement("header",{className:"DocSearch-SearchBar",ref:en},p.createElement(kh,Ke({},zn,{state:Ce,placeholder:Ht||"Search docs",autoFocus:Pt.length===0,inputRef:Vt,isFromSelection:!!Pt&&Pt===_t,translations:ce,isAskAiActive:R,askAiStatus:Dn,askAiError:Zu,askAiState:pn,setAskAiState:bt,isThreadDepthError:xd&&pn!=="new-conversation",onClose:d,onAskAiToggle:I,onAskAgain:function($){zr(!0,$)},onStopAskAiStreaming:Pd,onNewConversation:Jo,onViewConversationHistory:function(){bt("conversation-history")}}))),Qo&&p.createElement("div",{className:"DocSearch-Dropdown",ref:rt},p.createElement(Fh,Ke({},zn,{indexName:vn,state:Ce,hitComponent:m,resultsFooterComponent:E,disableUserPersonalization:A,recentSearches:jn,favoriteSearches:mn,conversations:Pn,inputRef:Vt,translations:be,getMissingResultsUrl:P,isAskAiActive:R,canHandleAskAi:Ze,messages:nr,askAiError:Zu,status:Dn,hasCollections:Go,askAiState:pn,selectAskAiQuestion:zr,suggestedQuestions:Wa,selectSuggestedQuestion:function($){zr(!0,$.question,$)},agentStudio:jr,onAskAiToggle:I,onNewConversation:Jo,onItemClick:function($,ue){if($.type==="askAI"&&$.query){if($.anchor==="stored"&&"messages"in $){Nr($.messages);var ye={query:$.query,messageId:$.messages[0].id};if(w!=null&&w(ye))return nn.current&&nn.current.setQuery(""),void ue.preventDefault();I(!0,ye)}else zr(!0,$.query);return bt("initial"),void ue.preventDefault()}Od($),Ka($),ia(ue)||d()},onFeedback:Bd}))),p.createElement("footer",{className:"DocSearch-Footer"},p.createElement(s0,{translations:Y,isAskAiActive:R}))))}var ay=p.forwardRef(function(e,t){return p.createElement(Rl,Ke({},e,{ref:t}),p.createElement(iy,e))});function iy(e){var t,n,r,u=(function(){var h=p.useContext(Do);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,l=u.onAskA
111iToggle,d=u.openModal,f=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:d}),o&&Tl(p.createElement(uy,Ke({},e,{initialScrollY:window.scrollY,initialQuery:c,translations:e==null||(n=e.translations)===null||n===void 0?void 0:n.modal,isAskAiActive:s,onAskAiToggle:l,onClose:f})),(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},ol=new Map,oy=["container","environment","transformSearchClient","hitComponent","resultsFooterComponent"],sy=(function(e){var t=ol.get(this);return t||(t=new Map,ol.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(f){a===1&&(f||(i=i.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(0,f,i):a===3&&(f||i)?(s.push(3,f,i),a=2):a===2&&i==="..."&&f?s.push(4,f,0):a===2&&i&&!f?s.push(5,0,!0,i):a>=5&&((i||!f&&a===5)&&(s.push(a,0,i,u),a=6),f&&(s.push(a,f,0,u),a=6)),i=""},l=0;l<n.length;l++){l&&(a===1&&c(),c(l));for(var d=0;d<n[l].length;d++)r=n[l][d],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[l][d+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(wt);function sl(e){if(e)return function(t){var n=e(t,{html:sy});return Wr(n)?n:typeof n=="function"?n(t):typeof n=="string"?wt("span",null,n):n}}function cy(e){var t=e.container,n=e.environment,r=e.transformSearchClient,u=e.hitComponent,a=e.resultsFooterComponent,i=wn(e,oy),o=(function(d,f){if(typeof d!="string")return d;if(!f)throw new Error("Cannot resolve a selector without a browser environment.");var h=f.document.querySelector(d);if(!h)throw new Error('Container selector did not match any element: "'.concat(d,'"'));return h})(t,n||(typeof window<"u"?window:void 0)),s={current:null},c=!1,l=L(L({},i),{},{ref:s,hitComponent:sl(u),resultsFooterComponent:sl(a),transformSearchClient:function(d){return d!=null&&d.addAlgoliaAgent&&d.addAlgoliaAgent("docsearch.js",io),typeof r=="function"?r(d):d}});return jl(wt(ay,l),o),c=!0,{open:function(){var d;(d=s.current)===null||d===void 0||d.open()},close:function(){var d;(d=s.current)===null||d===void 0||d.close()},openAskAi:function(d){var f;(f=s.current)===null||f===void 0||f.openAskAi(d)},get isReady(){return c},get isOpen(){var d,f;return(d=(f=s.current)===null||f===void 0?void 0:f.isOpen)!==null&&d!==void 0&&d},destroy:function(){Nl(o),c=!1}}}export{cy 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.