@botpress/webchat 2.1.5 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.cjs
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Released under MIT license <https://lodash.com/license>
|
|
6
6
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
7
7
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
8
|
-
*/yd.exports,function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",p=1,m=2,h=4,y=1,v=2,w=1,_=2,b=4,S=8,A=16,E=32,T=64,N=128,L=256,F=512,j=30,H="...",re=800,Q=16,G=1,V=2,q=3,Y=1/0,ne=9007199254740991,ce=17976931348623157e292,P=0/0,ue=4294967295,Oe=ue-1,M=ue>>>1,Ne=[["ary",N],["bind",w],["bindKey",_],["curry",S],["curryRight",A],["flip",F],["partial",E],["partialRight",T],["rearg",L]],qe="[object Arguments]",Me="[object Array]",Je="[object AsyncFunction]",rt="[object Boolean]",Ke="[object Date]",Pe="[object DOMException]",Ae="[object Error]",Fe="[object Function]",$e="[object GeneratorFunction]",Ze="[object Map]",lt="[object Number]",K="[object Null]",pe="[object Object]",Te="[object Promise]",Se="[object Proxy]",et="[object RegExp]",Ue="[object Set]",ot="[object String]",It="[object Symbol]",mt="[object Undefined]",ie="[object WeakMap]",ge="[object WeakSet]",xe="[object ArrayBuffer]",Be="[object DataView]",ct="[object Float32Array]",pn="[object Float64Array]",rn="[object Int8Array]",Jt="[object Int16Array]",cn="[object Int32Array]",Cn="[object Uint8Array]",ee="[object Uint8ClampedArray]",ae="[object Uint16Array]",ft="[object Uint32Array]",At=/\b__p \+= '';/g,on=/\b(__p \+=) '' \+/g,pt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mn=/&(?:amp|lt|gt|quot|#39);/g,sr=/[&<>"']/g,D=RegExp(Mn.source),je=RegExp(sr.source),He=/<%-([\s\S]+?)%>/g,Xe=/<%([\s\S]+?)%>/g,Re=/<%=([\s\S]+?)%>/g,We=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_t=/^\w*$/,Pt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xt=/[\\^$.*+?()[\]{}|]/g,bn=RegExp(Xt.source),Rn=/^\s+/,mr=/\s/,ta=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Sl=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,Ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ze=/[()=,{}\[\]\/\s]/,yt=/\\(\\)?/g,Gt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,un=/\w*$/,qt=/^[-+]0x[0-9a-f]+$/i,Tt=/^0b[01]+$/i,jn=/^\[object .+?Constructor\]$/,On=/^0o[0-7]+$/i,Tn=/^(?:0|[1-9]\d*)$/,Xr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wi=/($^)/,yy=/['\n\r\u2028\u2029\\]/g,Qr="\\ud800-\\udfff",NCe="\\u0300-\\u036f",MCe="\\ufe20-\\ufe2f",jCe="\\u20d0-\\u20ff",Ej=NCe+MCe+jCe,Aj="\\u2700-\\u27bf",Cj="a-z\\xdf-\\xf6\\xf8-\\xff",LCe="\\xac\\xb1\\xd7\\xf7",FCe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qCe="\\u2000-\\u206f",UCe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oj="A-Z\\xc0-\\xd6\\xd8-\\xde",Tj="\\ufe0e\\ufe0f",$j=LCe+FCe+qCe+UCe,Fw="['’]",BCe="["+Qr+"]",kj="["+$j+"]",gy="["+Ej+"]",Ij="\\d+",zCe="["+Aj+"]",Pj="["+Cj+"]",Rj="[^"+Qr+$j+Ij+Aj+Cj+Oj+"]",qw="\\ud83c[\\udffb-\\udfff]",ZCe="(?:"+gy+"|"+qw+")",Dj="[^"+Qr+"]",Uw="(?:\\ud83c[\\udde6-\\uddff]){2}",Bw="[\\ud800-\\udbff][\\udc00-\\udfff]",El="["+Oj+"]",Nj="\\u200d",Mj="(?:"+Pj+"|"+Rj+")",HCe="(?:"+El+"|"+Rj+")",jj="(?:"+Fw+"(?:d|ll|m|re|s|t|ve))?",Lj="(?:"+Fw+"(?:D|LL|M|RE|S|T|VE))?",Fj=ZCe+"?",qj="["+Tj+"]?",WCe="(?:"+Nj+"(?:"+[Dj,Uw,Bw].join("|")+")"+qj+Fj+")*",VCe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",KCe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Uj=qj+Fj+WCe,GCe="(?:"+[zCe,Uw,Bw].join("|")+")"+Uj,YCe="(?:"+[Dj+gy+"?",gy,Uw,Bw,BCe].join("|")+")",JCe=RegExp(Fw,"g"),XCe=RegExp(gy,"g"),zw=RegExp(qw+"(?="+qw+")|"+YCe+Uj,"g"),QCe=RegExp([El+"?"+Pj+"+"+jj+"(?="+[kj,El,"$"].join("|")+")",HCe+"+"+Lj+"(?="+[kj,El+Mj,"$"].join("|")+")",El+"?"+Mj+"+"+jj,El+"+"+Lj,KCe,VCe,Ij,GCe].join("|"),"g"),eOe=RegExp("["+Nj+Qr+Ej+Tj+"]"),tOe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nOe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rOe=-1,$n={};$n[ct]=$n[pn]=$n[rn]=$n[Jt]=$n[cn]=$n[Cn]=$n[ee]=$n[ae]=$n[ft]=!0,$n[qe]=$n[Me]=$n[xe]=$n[rt]=$n[Be]=$n[Ke]=$n[Ae]=$n[Fe]=$n[Ze]=$n[lt]=$n[pe]=$n[et]=$n[Ue]=$n[ot]=$n[ie]=!1;var Sn={};Sn[qe]=Sn[Me]=Sn[xe]=Sn[Be]=Sn[rt]=Sn[Ke]=Sn[ct]=Sn[pn]=Sn[rn]=Sn[Jt]=Sn[cn]=Sn[Ze]=Sn[lt]=Sn[pe]=Sn[et]=Sn[Ue]=Sn[ot]=Sn[It]=Sn[Cn]=Sn[ee]=Sn[ae]=Sn[ft]=!0,Sn[Ae]=Sn[Fe]=Sn[ie]=!1;var iOe={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},oOe={"&":"&","<":"<",">":">",'"':""","'":"'"},aOe={"&":"&","<":"<",">":">",""":'"',"'":"'"},sOe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},uOe=parseFloat,lOe=parseInt,Bj=typeof se=="object"&&se&&se.Object===Object&&se,cOe=typeof self=="object"&&self&&self.Object===Object&&self,yr=Bj||cOe||Function("return this")(),Zw=t&&!t.nodeType&&t,Zs=Zw&&!0&&e&&!e.nodeType&&e,zj=Zs&&Zs.exports===Zw,Hw=zj&&Bj.process,Ei=function(){try{var J=Zs&&Zs.require&&Zs.require("util").types;return J||Hw&&Hw.binding&&Hw.binding("util")}catch{}}(),Zj=Ei&&Ei.isArrayBuffer,Hj=Ei&&Ei.isDate,Wj=Ei&&Ei.isMap,Vj=Ei&&Ei.isRegExp,Kj=Ei&&Ei.isSet,Gj=Ei&&Ei.isTypedArray;function di(J,ve,le){switch(le.length){case 0:return J.call(ve);case 1:return J.call(ve,le[0]);case 2:return J.call(ve,le[0],le[1]);case 3:return J.call(ve,le[0],le[1],le[2])}return J.apply(ve,le)}function fOe(J,ve,le,nt){for(var kt=-1,ln=J==null?0:J.length;++kt<ln;){var tr=J[kt];ve(nt,tr,le(tr),J)}return nt}function Ai(J,ve){for(var le=-1,nt=J==null?0:J.length;++le<nt&&ve(J[le],le,J)!==!1;);return J}function dOe(J,ve){for(var le=J==null?0:J.length;le--&&ve(J[le],le,J)!==!1;);return J}function Yj(J,ve){for(var le=-1,nt=J==null?0:J.length;++le<nt;)if(!ve(J[le],le,J))return!1;return!0}function Ha(J,ve){for(var le=-1,nt=J==null?0:J.length,kt=0,ln=[];++le<nt;){var tr=J[le];ve(tr,le,J)&&(ln[kt++]=tr)}return ln}function vy(J,ve){var le=J==null?0:J.length;return!!le&&Al(J,ve,0)>-1}function Ww(J,ve,le){for(var nt=-1,kt=J==null?0:J.length;++nt<kt;)if(le(ve,J[nt]))return!0;return!1}function kn(J,ve){for(var le=-1,nt=J==null?0:J.length,kt=Array(nt);++le<nt;)kt[le]=ve(J[le],le,J);return kt}function Wa(J,ve){for(var le=-1,nt=ve.length,kt=J.length;++le<nt;)J[kt+le]=ve[le];return J}function Vw(J,ve,le,nt){var kt=-1,ln=J==null?0:J.length;for(nt&&ln&&(le=J[++kt]);++kt<ln;)le=ve(le,J[kt],kt,J);return le}function pOe(J,ve,le,nt){var kt=J==null?0:J.length;for(nt&&kt&&(le=J[--kt]);kt--;)le=ve(le,J[kt],kt,J);return le}function Kw(J,ve){for(var le=-1,nt=J==null?0:J.length;++le<nt;)if(ve(J[le],le,J))return!0;return!1}var hOe=Gw("length");function mOe(J){return J.split("")}function yOe(J){return J.match(Ce)||[]}function Jj(J,ve,le){var nt;return le(J,function(kt,ln,tr){if(ve(kt,ln,tr))return nt=ln,!1}),nt}function by(J,ve,le,nt){for(var kt=J.length,ln=le+(nt?1:-1);nt?ln--:++ln<kt;)if(ve(J[ln],ln,J))return ln;return-1}function Al(J,ve,le){return ve===ve?TOe(J,ve,le):by(J,Xj,le)}function gOe(J,ve,le,nt){for(var kt=le-1,ln=J.length;++kt<ln;)if(nt(J[kt],ve))return kt;return-1}function Xj(J){return J!==J}function Qj(J,ve){var le=J==null?0:J.length;return le?Jw(J,ve)/le:P}function Gw(J){return function(ve){return ve==null?n:ve[J]}}function Yw(J){return function(ve){return J==null?n:J[ve]}}function eL(J,ve,le,nt,kt){return kt(J,function(ln,tr,_n){le=nt?(nt=!1,ln):ve(le,ln,tr,_n)}),le}function vOe(J,ve){var le=J.length;for(J.sort(ve);le--;)J[le]=J[le].value;return J}function Jw(J,ve){for(var le,nt=-1,kt=J.length;++nt<kt;){var ln=ve(J[nt]);ln!==n&&(le=le===n?ln:le+ln)}return le}function Xw(J,ve){for(var le=-1,nt=Array(J);++le<J;)nt[le]=ve(le);return nt}function bOe(J,ve){return kn(ve,function(le){return[le,J[le]]})}function tL(J){return J&&J.slice(0,oL(J)+1).replace(Rn,"")}function pi(J){return function(ve){return J(ve)}}function Qw(J,ve){return kn(ve,function(le){return J[le]})}function Nf(J,ve){return J.has(ve)}function nL(J,ve){for(var le=-1,nt=J.length;++le<nt&&Al(ve,J[le],0)>-1;);return le}function rL(J,ve){for(var le=J.length;le--&&Al(ve,J[le],0)>-1;);return le}function _Oe(J,ve){for(var le=J.length,nt=0;le--;)J[le]===ve&&++nt;return nt}var wOe=Yw(iOe),xOe=Yw(oOe);function SOe(J){return"\\"+sOe[J]}function EOe(J,ve){return J==null?n:J[ve]}function Cl(J){return eOe.test(J)}function AOe(J){return tOe.test(J)}function COe(J){for(var ve,le=[];!(ve=J.next()).done;)le.push(ve.value);return le}function ex(J){var ve=-1,le=Array(J.size);return J.forEach(function(nt,kt){le[++ve]=[kt,nt]}),le}function iL(J,ve){return function(le){return J(ve(le))}}function Va(J,ve){for(var le=-1,nt=J.length,kt=0,ln=[];++le<nt;){var tr=J[le];(tr===ve||tr===d)&&(J[le]=d,ln[kt++]=le)}return ln}function _y(J){var ve=-1,le=Array(J.size);return J.forEach(function(nt){le[++ve]=nt}),le}function OOe(J){var ve=-1,le=Array(J.size);return J.forEach(function(nt){le[++ve]=[nt,nt]}),le}function TOe(J,ve,le){for(var nt=le-1,kt=J.length;++nt<kt;)if(J[nt]===ve)return nt;return-1}function $Oe(J,ve,le){for(var nt=le+1;nt--;)if(J[nt]===ve)return nt;return nt}function Ol(J){return Cl(J)?IOe(J):hOe(J)}function Vi(J){return Cl(J)?POe(J):mOe(J)}function oL(J){for(var ve=J.length;ve--&&mr.test(J.charAt(ve)););return ve}var kOe=Yw(aOe);function IOe(J){for(var ve=zw.lastIndex=0;zw.test(J);)++ve;return ve}function POe(J){return J.match(zw)||[]}function ROe(J){return J.match(QCe)||[]}var DOe=function J(ve){ve=ve==null?yr:Tl.defaults(yr.Object(),ve,Tl.pick(yr,nOe));var le=ve.Array,nt=ve.Date,kt=ve.Error,ln=ve.Function,tr=ve.Math,_n=ve.Object,tx=ve.RegExp,NOe=ve.String,Ci=ve.TypeError,wy=le.prototype,MOe=ln.prototype,$l=_n.prototype,xy=ve["__core-js_shared__"],Sy=MOe.toString,hn=$l.hasOwnProperty,jOe=0,aL=function(){var u=/[^.]+$/.exec(xy&&xy.keys&&xy.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}(),Ey=$l.toString,LOe=Sy.call(_n),FOe=yr._,qOe=tx("^"+Sy.call(hn).replace(Xt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ay=zj?ve.Buffer:n,Ka=ve.Symbol,Cy=ve.Uint8Array,sL=Ay?Ay.allocUnsafe:n,Oy=iL(_n.getPrototypeOf,_n),uL=_n.create,lL=$l.propertyIsEnumerable,Ty=wy.splice,cL=Ka?Ka.isConcatSpreadable:n,Mf=Ka?Ka.iterator:n,Hs=Ka?Ka.toStringTag:n,$y=function(){try{var u=Ys(_n,"defineProperty");return u({},"",{}),u}catch{}}(),UOe=ve.clearTimeout!==yr.clearTimeout&&ve.clearTimeout,BOe=nt&&nt.now!==yr.Date.now&&nt.now,zOe=ve.setTimeout!==yr.setTimeout&&ve.setTimeout,ky=tr.ceil,Iy=tr.floor,nx=_n.getOwnPropertySymbols,ZOe=Ay?Ay.isBuffer:n,fL=ve.isFinite,HOe=wy.join,WOe=iL(_n.keys,_n),nr=tr.max,kr=tr.min,VOe=nt.now,KOe=ve.parseInt,dL=tr.random,GOe=wy.reverse,rx=Ys(ve,"DataView"),jf=Ys(ve,"Map"),ix=Ys(ve,"Promise"),kl=Ys(ve,"Set"),Lf=Ys(ve,"WeakMap"),Ff=Ys(_n,"create"),Py=Lf&&new Lf,Il={},YOe=Js(rx),JOe=Js(jf),XOe=Js(ix),QOe=Js(kl),eTe=Js(Lf),Ry=Ka?Ka.prototype:n,qf=Ry?Ry.valueOf:n,pL=Ry?Ry.toString:n;function $(u){if(Ln(u)&&!Rt(u)&&!(u instanceof Yt)){if(u instanceof Oi)return u;if(hn.call(u,"__wrapped__"))return hF(u)}return new Oi(u)}var Pl=function(){function u(){}return function(f){if(!Dn(f))return{};if(uL)return uL(f);u.prototype=f;var g=new u;return u.prototype=n,g}}();function Dy(){}function Oi(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=n}$.templateSettings={escape:He,evaluate:Xe,interpolate:Re,variable:"",imports:{_:$}},$.prototype=Dy.prototype,$.prototype.constructor=$,Oi.prototype=Pl(Dy.prototype),Oi.prototype.constructor=Oi;function Yt(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ue,this.__views__=[]}function tTe(){var u=new Yt(this.__wrapped__);return u.__actions__=ei(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=ei(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=ei(this.__views__),u}function nTe(){if(this.__filtered__){var u=new Yt(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}function rTe(){var u=this.__wrapped__.value(),f=this.__dir__,g=Rt(u),x=f<0,O=g?u.length:0,I=m$e(0,O,this.__views__),U=I.start,W=I.end,te=W-U,_e=x?W:U-1,we=this.__iteratees__,Ee=we.length,Ve=0,at=kr(te,this.__takeCount__);if(!g||!x&&O==te&&at==te)return jL(u,this.__actions__);var wt=[];e:for(;te--&&Ve<at;){_e+=f;for(var Ut=-1,xt=u[_e];++Ut<Ee;){var Wt=we[Ut],Qt=Wt.iteratee,yi=Wt.type,Ur=Qt(xt);if(yi==V)xt=Ur;else if(!Ur){if(yi==G)continue e;break e}}wt[Ve++]=xt}return wt}Yt.prototype=Pl(Dy.prototype),Yt.prototype.constructor=Yt;function Ws(u){var f=-1,g=u==null?0:u.length;for(this.clear();++f<g;){var x=u[f];this.set(x[0],x[1])}}function iTe(){this.__data__=Ff?Ff(null):{},this.size=0}function oTe(u){var f=this.has(u)&&delete this.__data__[u];return this.size-=f?1:0,f}function aTe(u){var f=this.__data__;if(Ff){var g=f[u];return g===l?n:g}return hn.call(f,u)?f[u]:n}function sTe(u){var f=this.__data__;return Ff?f[u]!==n:hn.call(f,u)}function uTe(u,f){var g=this.__data__;return this.size+=this.has(u)?0:1,g[u]=Ff&&f===n?l:f,this}Ws.prototype.clear=iTe,Ws.prototype.delete=oTe,Ws.prototype.get=aTe,Ws.prototype.has=sTe,Ws.prototype.set=uTe;function na(u){var f=-1,g=u==null?0:u.length;for(this.clear();++f<g;){var x=u[f];this.set(x[0],x[1])}}function lTe(){this.__data__=[],this.size=0}function cTe(u){var f=this.__data__,g=Ny(f,u);if(g<0)return!1;var x=f.length-1;return g==x?f.pop():Ty.call(f,g,1),--this.size,!0}function fTe(u){var f=this.__data__,g=Ny(f,u);return g<0?n:f[g][1]}function dTe(u){return Ny(this.__data__,u)>-1}function pTe(u,f){var g=this.__data__,x=Ny(g,u);return x<0?(++this.size,g.push([u,f])):g[x][1]=f,this}na.prototype.clear=lTe,na.prototype.delete=cTe,na.prototype.get=fTe,na.prototype.has=dTe,na.prototype.set=pTe;function ra(u){var f=-1,g=u==null?0:u.length;for(this.clear();++f<g;){var x=u[f];this.set(x[0],x[1])}}function hTe(){this.size=0,this.__data__={hash:new Ws,map:new(jf||na),string:new Ws}}function mTe(u){var f=Vy(this,u).delete(u);return this.size-=f?1:0,f}function yTe(u){return Vy(this,u).get(u)}function gTe(u){return Vy(this,u).has(u)}function vTe(u,f){var g=Vy(this,u),x=g.size;return g.set(u,f),this.size+=g.size==x?0:1,this}ra.prototype.clear=hTe,ra.prototype.delete=mTe,ra.prototype.get=yTe,ra.prototype.has=gTe,ra.prototype.set=vTe;function Vs(u){var f=-1,g=u==null?0:u.length;for(this.__data__=new ra;++f<g;)this.add(u[f])}function bTe(u){return this.__data__.set(u,l),this}function _Te(u){return this.__data__.has(u)}Vs.prototype.add=Vs.prototype.push=bTe,Vs.prototype.has=_Te;function Ki(u){var f=this.__data__=new na(u);this.size=f.size}function wTe(){this.__data__=new na,this.size=0}function xTe(u){var f=this.__data__,g=f.delete(u);return this.size=f.size,g}function STe(u){return this.__data__.get(u)}function ETe(u){return this.__data__.has(u)}function ATe(u,f){var g=this.__data__;if(g instanceof na){var x=g.__data__;if(!jf||x.length<i-1)return x.push([u,f]),this.size=++g.size,this;g=this.__data__=new ra(x)}return g.set(u,f),this.size=g.size,this}Ki.prototype.clear=wTe,Ki.prototype.delete=xTe,Ki.prototype.get=STe,Ki.prototype.has=ETe,Ki.prototype.set=ATe;function hL(u,f){var g=Rt(u),x=!g&&Xs(u),O=!g&&!x&&Qa(u),I=!g&&!x&&!O&&Ml(u),U=g||x||O||I,W=U?Xw(u.length,NOe):[],te=W.length;for(var _e in u)(f||hn.call(u,_e))&&!(U&&(_e=="length"||O&&(_e=="offset"||_e=="parent")||I&&(_e=="buffer"||_e=="byteLength"||_e=="byteOffset")||sa(_e,te)))&&W.push(_e);return W}function mL(u){var f=u.length;return f?u[mx(0,f-1)]:n}function CTe(u,f){return Ky(ei(u),Ks(f,0,u.length))}function OTe(u){return Ky(ei(u))}function ox(u,f,g){(g!==n&&!Gi(u[f],g)||g===n&&!(f in u))&&ia(u,f,g)}function Uf(u,f,g){var x=u[f];(!(hn.call(u,f)&&Gi(x,g))||g===n&&!(f in u))&&ia(u,f,g)}function Ny(u,f){for(var g=u.length;g--;)if(Gi(u[g][0],f))return g;return-1}function TTe(u,f,g,x){return Ga(u,function(O,I,U){f(x,O,g(O),U)}),x}function yL(u,f){return u&&Ao(f,ur(f),u)}function $Te(u,f){return u&&Ao(f,ni(f),u)}function ia(u,f,g){f=="__proto__"&&$y?$y(u,f,{configurable:!0,enumerable:!0,value:g,writable:!0}):u[f]=g}function ax(u,f){for(var g=-1,x=f.length,O=le(x),I=u==null;++g<x;)O[g]=I?n:qx(u,f[g]);return O}function Ks(u,f,g){return u===u&&(g!==n&&(u=u<=g?u:g),f!==n&&(u=u>=f?u:f)),u}function Ti(u,f,g,x,O,I){var U,W=f&p,te=f&m,_e=f&h;if(g&&(U=O?g(u,x,O,I):g(u)),U!==n)return U;if(!Dn(u))return u;var we=Rt(u);if(we){if(U=g$e(u),!W)return ei(u,U)}else{var Ee=Ir(u),Ve=Ee==Fe||Ee==$e;if(Qa(u))return qL(u,W);if(Ee==pe||Ee==qe||Ve&&!O){if(U=te||Ve?{}:oF(u),!W)return te?a$e(u,$Te(U,u)):o$e(u,yL(U,u))}else{if(!Sn[Ee])return O?u:{};U=v$e(u,Ee,W)}}I||(I=new Ki);var at=I.get(u);if(at)return at;I.set(u,U),DF(u)?u.forEach(function(xt){U.add(Ti(xt,f,g,xt,u,I))}):PF(u)&&u.forEach(function(xt,Wt){U.set(Wt,Ti(xt,f,g,Wt,u,I))});var wt=_e?te?Cx:Ax:te?ni:ur,Ut=we?n:wt(u);return Ai(Ut||u,function(xt,Wt){Ut&&(Wt=xt,xt=u[Wt]),Uf(U,Wt,Ti(xt,f,g,Wt,u,I))}),U}function kTe(u){var f=ur(u);return function(g){return gL(g,u,f)}}function gL(u,f,g){var x=g.length;if(u==null)return!x;for(u=_n(u);x--;){var O=g[x],I=f[O],U=u[O];if(U===n&&!(O in u)||!I(U))return!1}return!0}function vL(u,f,g){if(typeof u!="function")throw new Ci(a);return Kf(function(){u.apply(n,g)},f)}function Bf(u,f,g,x){var O=-1,I=vy,U=!0,W=u.length,te=[],_e=f.length;if(!W)return te;g&&(f=kn(f,pi(g))),x?(I=Ww,U=!1):f.length>=i&&(I=Nf,U=!1,f=new Vs(f));e:for(;++O<W;){var we=u[O],Ee=g==null?we:g(we);if(we=x||we!==0?we:0,U&&Ee===Ee){for(var Ve=_e;Ve--;)if(f[Ve]===Ee)continue e;te.push(we)}else I(f,Ee,x)||te.push(we)}return te}var Ga=HL(Eo),bL=HL(ux,!0);function ITe(u,f){var g=!0;return Ga(u,function(x,O,I){return g=!!f(x,O,I),g}),g}function My(u,f,g){for(var x=-1,O=u.length;++x<O;){var I=u[x],U=f(I);if(U!=null&&(W===n?U===U&&!mi(U):g(U,W)))var W=U,te=I}return te}function PTe(u,f,g,x){var O=u.length;for(g=Mt(g),g<0&&(g=-g>O?0:O+g),x=x===n||x>O?O:Mt(x),x<0&&(x+=O),x=g>x?0:MF(x);g<x;)u[g++]=f;return u}function _L(u,f){var g=[];return Ga(u,function(x,O,I){f(x,O,I)&&g.push(x)}),g}function gr(u,f,g,x,O){var I=-1,U=u.length;for(g||(g=_$e),O||(O=[]);++I<U;){var W=u[I];f>0&&g(W)?f>1?gr(W,f-1,g,x,O):Wa(O,W):x||(O[O.length]=W)}return O}var sx=WL(),wL=WL(!0);function Eo(u,f){return u&&sx(u,f,ur)}function ux(u,f){return u&&wL(u,f,ur)}function jy(u,f){return Ha(f,function(g){return ua(u[g])})}function Gs(u,f){f=Ja(f,u);for(var g=0,x=f.length;u!=null&&g<x;)u=u[Co(f[g++])];return g&&g==x?u:n}function xL(u,f,g){var x=f(u);return Rt(u)?x:Wa(x,g(u))}function Fr(u){return u==null?u===n?mt:K:Hs&&Hs in _n(u)?h$e(u):O$e(u)}function lx(u,f){return u>f}function RTe(u,f){return u!=null&&hn.call(u,f)}function DTe(u,f){return u!=null&&f in _n(u)}function NTe(u,f,g){return u>=kr(f,g)&&u<nr(f,g)}function cx(u,f,g){for(var x=g?Ww:vy,O=u[0].length,I=u.length,U=I,W=le(I),te=1/0,_e=[];U--;){var we=u[U];U&&f&&(we=kn(we,pi(f))),te=kr(we.length,te),W[U]=!g&&(f||O>=120&&we.length>=120)?new Vs(U&&we):n}we=u[0];var Ee=-1,Ve=W[0];e:for(;++Ee<O&&_e.length<te;){var at=we[Ee],wt=f?f(at):at;if(at=g||at!==0?at:0,!(Ve?Nf(Ve,wt):x(_e,wt,g))){for(U=I;--U;){var Ut=W[U];if(!(Ut?Nf(Ut,wt):x(u[U],wt,g)))continue e}Ve&&Ve.push(wt),_e.push(at)}}return _e}function MTe(u,f,g,x){return Eo(u,function(O,I,U){f(x,g(O),I,U)}),x}function zf(u,f,g){f=Ja(f,u),u=lF(u,f);var x=u==null?u:u[Co(ki(f))];return x==null?n:di(x,u,g)}function SL(u){return Ln(u)&&Fr(u)==qe}function jTe(u){return Ln(u)&&Fr(u)==xe}function LTe(u){return Ln(u)&&Fr(u)==Ke}function Zf(u,f,g,x,O){return u===f?!0:u==null||f==null||!Ln(u)&&!Ln(f)?u!==u&&f!==f:FTe(u,f,g,x,Zf,O)}function FTe(u,f,g,x,O,I){var U=Rt(u),W=Rt(f),te=U?Me:Ir(u),_e=W?Me:Ir(f);te=te==qe?pe:te,_e=_e==qe?pe:_e;var we=te==pe,Ee=_e==pe,Ve=te==_e;if(Ve&&Qa(u)){if(!Qa(f))return!1;U=!0,we=!1}if(Ve&&!we)return I||(I=new Ki),U||Ml(u)?nF(u,f,g,x,O,I):d$e(u,f,te,g,x,O,I);if(!(g&y)){var at=we&&hn.call(u,"__wrapped__"),wt=Ee&&hn.call(f,"__wrapped__");if(at||wt){var Ut=at?u.value():u,xt=wt?f.value():f;return I||(I=new Ki),O(Ut,xt,g,x,I)}}return Ve?(I||(I=new Ki),p$e(u,f,g,x,O,I)):!1}function qTe(u){return Ln(u)&&Ir(u)==Ze}function fx(u,f,g,x){var O=g.length,I=O,U=!x;if(u==null)return!I;for(u=_n(u);O--;){var W=g[O];if(U&&W[2]?W[1]!==u[W[0]]:!(W[0]in u))return!1}for(;++O<I;){W=g[O];var te=W[0],_e=u[te],we=W[1];if(U&&W[2]){if(_e===n&&!(te in u))return!1}else{var Ee=new Ki;if(x)var Ve=x(_e,we,te,u,f,Ee);if(!(Ve===n?Zf(we,_e,y|v,x,Ee):Ve))return!1}}return!0}function EL(u){if(!Dn(u)||x$e(u))return!1;var f=ua(u)?qOe:jn;return f.test(Js(u))}function UTe(u){return Ln(u)&&Fr(u)==et}function BTe(u){return Ln(u)&&Ir(u)==Ue}function zTe(u){return Ln(u)&&eg(u.length)&&!!$n[Fr(u)]}function AL(u){return typeof u=="function"?u:u==null?ri:typeof u=="object"?Rt(u)?TL(u[0],u[1]):OL(u):VF(u)}function dx(u){if(!Vf(u))return WOe(u);var f=[];for(var g in _n(u))hn.call(u,g)&&g!="constructor"&&f.push(g);return f}function ZTe(u){if(!Dn(u))return C$e(u);var f=Vf(u),g=[];for(var x in u)x=="constructor"&&(f||!hn.call(u,x))||g.push(x);return g}function px(u,f){return u<f}function CL(u,f){var g=-1,x=ti(u)?le(u.length):[];return Ga(u,function(O,I,U){x[++g]=f(O,I,U)}),x}function OL(u){var f=Tx(u);return f.length==1&&f[0][2]?sF(f[0][0],f[0][1]):function(g){return g===u||fx(g,u,f)}}function TL(u,f){return kx(u)&&aF(f)?sF(Co(u),f):function(g){var x=qx(g,u);return x===n&&x===f?Ux(g,u):Zf(f,x,y|v)}}function Ly(u,f,g,x,O){u!==f&&sx(f,function(I,U){if(O||(O=new Ki),Dn(I))HTe(u,f,U,g,Ly,x,O);else{var W=x?x(Px(u,U),I,U+"",u,f,O):n;W===n&&(W=I),ox(u,U,W)}},ni)}function HTe(u,f,g,x,O,I,U){var W=Px(u,g),te=Px(f,g),_e=U.get(te);if(_e){ox(u,g,_e);return}var we=I?I(W,te,g+"",u,f,U):n,Ee=we===n;if(Ee){var Ve=Rt(te),at=!Ve&&Qa(te),wt=!Ve&&!at&&Ml(te);we=te,Ve||at||wt?Rt(W)?we=W:qn(W)?we=ei(W):at?(Ee=!1,we=qL(te,!0)):wt?(Ee=!1,we=UL(te,!0)):we=[]:Gf(te)||Xs(te)?(we=W,Xs(W)?we=jF(W):(!Dn(W)||ua(W))&&(we=oF(te))):Ee=!1}Ee&&(U.set(te,we),O(we,te,x,I,U),U.delete(te)),ox(u,g,we)}function $L(u,f){var g=u.length;if(g)return f+=f<0?g:0,sa(f,g)?u[f]:n}function kL(u,f,g){f.length?f=kn(f,function(I){return Rt(I)?function(U){return Gs(U,I.length===1?I[0]:I)}:I}):f=[ri];var x=-1;f=kn(f,pi(bt()));var O=CL(u,function(I,U,W){var te=kn(f,function(_e){return _e(I)});return{criteria:te,index:++x,value:I}});return vOe(O,function(I,U){return i$e(I,U,g)})}function WTe(u,f){return IL(u,f,function(g,x){return Ux(u,x)})}function IL(u,f,g){for(var x=-1,O=f.length,I={};++x<O;){var U=f[x],W=Gs(u,U);g(W,U)&&Hf(I,Ja(U,u),W)}return I}function VTe(u){return function(f){return Gs(f,u)}}function hx(u,f,g,x){var O=x?gOe:Al,I=-1,U=f.length,W=u;for(u===f&&(f=ei(f)),g&&(W=kn(u,pi(g)));++I<U;)for(var te=0,_e=f[I],we=g?g(_e):_e;(te=O(W,we,te,x))>-1;)W!==u&&Ty.call(W,te,1),Ty.call(u,te,1);return u}function PL(u,f){for(var g=u?f.length:0,x=g-1;g--;){var O=f[g];if(g==x||O!==I){var I=O;sa(O)?Ty.call(u,O,1):vx(u,O)}}return u}function mx(u,f){return u+Iy(dL()*(f-u+1))}function KTe(u,f,g,x){for(var O=-1,I=nr(ky((f-u)/(g||1)),0),U=le(I);I--;)U[x?I:++O]=u,u+=g;return U}function yx(u,f){var g="";if(!u||f<1||f>ne)return g;do f%2&&(g+=u),f=Iy(f/2),f&&(u+=u);while(f);return g}function Bt(u,f){return Rx(uF(u,f,ri),u+"")}function GTe(u){return mL(jl(u))}function YTe(u,f){var g=jl(u);return Ky(g,Ks(f,0,g.length))}function Hf(u,f,g,x){if(!Dn(u))return u;f=Ja(f,u);for(var O=-1,I=f.length,U=I-1,W=u;W!=null&&++O<I;){var te=Co(f[O]),_e=g;if(te==="__proto__"||te==="constructor"||te==="prototype")return u;if(O!=U){var we=W[te];_e=x?x(we,te,W):n,_e===n&&(_e=Dn(we)?we:sa(f[O+1])?[]:{})}Uf(W,te,_e),W=W[te]}return u}var RL=Py?function(u,f){return Py.set(u,f),u}:ri,JTe=$y?function(u,f){return $y(u,"toString",{configurable:!0,enumerable:!1,value:zx(f),writable:!0})}:ri;function XTe(u){return Ky(jl(u))}function $i(u,f,g){var x=-1,O=u.length;f<0&&(f=-f>O?0:O+f),g=g>O?O:g,g<0&&(g+=O),O=f>g?0:g-f>>>0,f>>>=0;for(var I=le(O);++x<O;)I[x]=u[x+f];return I}function QTe(u,f){var g;return Ga(u,function(x,O,I){return g=f(x,O,I),!g}),!!g}function Fy(u,f,g){var x=0,O=u==null?x:u.length;if(typeof f=="number"&&f===f&&O<=M){for(;x<O;){var I=x+O>>>1,U=u[I];U!==null&&!mi(U)&&(g?U<=f:U<f)?x=I+1:O=I}return O}return gx(u,f,ri,g)}function gx(u,f,g,x){var O=0,I=u==null?0:u.length;if(I===0)return 0;f=g(f);for(var U=f!==f,W=f===null,te=mi(f),_e=f===n;O<I;){var we=Iy((O+I)/2),Ee=g(u[we]),Ve=Ee!==n,at=Ee===null,wt=Ee===Ee,Ut=mi(Ee);if(U)var xt=x||wt;else _e?xt=wt&&(x||Ve):W?xt=wt&&Ve&&(x||!at):te?xt=wt&&Ve&&!at&&(x||!Ut):at||Ut?xt=!1:xt=x?Ee<=f:Ee<f;xt?O=we+1:I=we}return kr(I,Oe)}function DL(u,f){for(var g=-1,x=u.length,O=0,I=[];++g<x;){var U=u[g],W=f?f(U):U;if(!g||!Gi(W,te)){var te=W;I[O++]=U===0?0:U}}return I}function NL(u){return typeof u=="number"?u:mi(u)?P:+u}function hi(u){if(typeof u=="string")return u;if(Rt(u))return kn(u,hi)+"";if(mi(u))return pL?pL.call(u):"";var f=u+"";return f=="0"&&1/u==-Y?"-0":f}function Ya(u,f,g){var x=-1,O=vy,I=u.length,U=!0,W=[],te=W;if(g)U=!1,O=Ww;else if(I>=i){var _e=f?null:c$e(u);if(_e)return _y(_e);U=!1,O=Nf,te=new Vs}else te=f?[]:W;e:for(;++x<I;){var we=u[x],Ee=f?f(we):we;if(we=g||we!==0?we:0,U&&Ee===Ee){for(var Ve=te.length;Ve--;)if(te[Ve]===Ee)continue e;f&&te.push(Ee),W.push(we)}else O(te,Ee,g)||(te!==W&&te.push(Ee),W.push(we))}return W}function vx(u,f){return f=Ja(f,u),u=lF(u,f),u==null||delete u[Co(ki(f))]}function ML(u,f,g,x){return Hf(u,f,g(Gs(u,f)),x)}function qy(u,f,g,x){for(var O=u.length,I=x?O:-1;(x?I--:++I<O)&&f(u[I],I,u););return g?$i(u,x?0:I,x?I+1:O):$i(u,x?I+1:0,x?O:I)}function jL(u,f){var g=u;return g instanceof Yt&&(g=g.value()),Vw(f,function(x,O){return O.func.apply(O.thisArg,Wa([x],O.args))},g)}function bx(u,f,g){var x=u.length;if(x<2)return x?Ya(u[0]):[];for(var O=-1,I=le(x);++O<x;)for(var U=u[O],W=-1;++W<x;)W!=O&&(I[O]=Bf(I[O]||U,u[W],f,g));return Ya(gr(I,1),f,g)}function LL(u,f,g){for(var x=-1,O=u.length,I=f.length,U={};++x<O;){var W=x<I?f[x]:n;g(U,u[x],W)}return U}function _x(u){return qn(u)?u:[]}function wx(u){return typeof u=="function"?u:ri}function Ja(u,f){return Rt(u)?u:kx(u,f)?[u]:pF(fn(u))}var e$e=Bt;function Xa(u,f,g){var x=u.length;return g=g===n?x:g,!f&&g>=x?u:$i(u,f,g)}var FL=UOe||function(u){return yr.clearTimeout(u)};function qL(u,f){if(f)return u.slice();var g=u.length,x=sL?sL(g):new u.constructor(g);return u.copy(x),x}function xx(u){var f=new u.constructor(u.byteLength);return new Cy(f).set(new Cy(u)),f}function t$e(u,f){var g=f?xx(u.buffer):u.buffer;return new u.constructor(g,u.byteOffset,u.byteLength)}function n$e(u){var f=new u.constructor(u.source,un.exec(u));return f.lastIndex=u.lastIndex,f}function r$e(u){return qf?_n(qf.call(u)):{}}function UL(u,f){var g=f?xx(u.buffer):u.buffer;return new u.constructor(g,u.byteOffset,u.length)}function BL(u,f){if(u!==f){var g=u!==n,x=u===null,O=u===u,I=mi(u),U=f!==n,W=f===null,te=f===f,_e=mi(f);if(!W&&!_e&&!I&&u>f||I&&U&&te&&!W&&!_e||x&&U&&te||!g&&te||!O)return 1;if(!x&&!I&&!_e&&u<f||_e&&g&&O&&!x&&!I||W&&g&&O||!U&&O||!te)return-1}return 0}function i$e(u,f,g){for(var x=-1,O=u.criteria,I=f.criteria,U=O.length,W=g.length;++x<U;){var te=BL(O[x],I[x]);if(te){if(x>=W)return te;var _e=g[x];return te*(_e=="desc"?-1:1)}}return u.index-f.index}function zL(u,f,g,x){for(var O=-1,I=u.length,U=g.length,W=-1,te=f.length,_e=nr(I-U,0),we=le(te+_e),Ee=!x;++W<te;)we[W]=f[W];for(;++O<U;)(Ee||O<I)&&(we[g[O]]=u[O]);for(;_e--;)we[W++]=u[O++];return we}function ZL(u,f,g,x){for(var O=-1,I=u.length,U=-1,W=g.length,te=-1,_e=f.length,we=nr(I-W,0),Ee=le(we+_e),Ve=!x;++O<we;)Ee[O]=u[O];for(var at=O;++te<_e;)Ee[at+te]=f[te];for(;++U<W;)(Ve||O<I)&&(Ee[at+g[U]]=u[O++]);return Ee}function ei(u,f){var g=-1,x=u.length;for(f||(f=le(x));++g<x;)f[g]=u[g];return f}function Ao(u,f,g,x){var O=!g;g||(g={});for(var I=-1,U=f.length;++I<U;){var W=f[I],te=x?x(g[W],u[W],W,g,u):n;te===n&&(te=u[W]),O?ia(g,W,te):Uf(g,W,te)}return g}function o$e(u,f){return Ao(u,$x(u),f)}function a$e(u,f){return Ao(u,rF(u),f)}function Uy(u,f){return function(g,x){var O=Rt(g)?fOe:TTe,I=f?f():{};return O(g,u,bt(x,2),I)}}function Rl(u){return Bt(function(f,g){var x=-1,O=g.length,I=O>1?g[O-1]:n,U=O>2?g[2]:n;for(I=u.length>3&&typeof I=="function"?(O--,I):n,U&&qr(g[0],g[1],U)&&(I=O<3?n:I,O=1),f=_n(f);++x<O;){var W=g[x];W&&u(f,W,x,I)}return f})}function HL(u,f){return function(g,x){if(g==null)return g;if(!ti(g))return u(g,x);for(var O=g.length,I=f?O:-1,U=_n(g);(f?I--:++I<O)&&x(U[I],I,U)!==!1;);return g}}function WL(u){return function(f,g,x){for(var O=-1,I=_n(f),U=x(f),W=U.length;W--;){var te=U[u?W:++O];if(g(I[te],te,I)===!1)break}return f}}function s$e(u,f,g){var x=f&w,O=Wf(u);function I(){var U=this&&this!==yr&&this instanceof I?O:u;return U.apply(x?g:this,arguments)}return I}function VL(u){return function(f){f=fn(f);var g=Cl(f)?Vi(f):n,x=g?g[0]:f.charAt(0),O=g?Xa(g,1).join(""):f.slice(1);return x[u]()+O}}function Dl(u){return function(f){return Vw(HF(ZF(f).replace(JCe,"")),u,"")}}function Wf(u){return function(){var f=arguments;switch(f.length){case 0:return new u;case 1:return new u(f[0]);case 2:return new u(f[0],f[1]);case 3:return new u(f[0],f[1],f[2]);case 4:return new u(f[0],f[1],f[2],f[3]);case 5:return new u(f[0],f[1],f[2],f[3],f[4]);case 6:return new u(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new u(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var g=Pl(u.prototype),x=u.apply(g,f);return Dn(x)?x:g}}function u$e(u,f,g){var x=Wf(u);function O(){for(var I=arguments.length,U=le(I),W=I,te=Nl(O);W--;)U[W]=arguments[W];var _e=I<3&&U[0]!==te&&U[I-1]!==te?[]:Va(U,te);if(I-=_e.length,I<g)return XL(u,f,By,O.placeholder,n,U,_e,n,n,g-I);var we=this&&this!==yr&&this instanceof O?x:u;return di(we,this,U)}return O}function KL(u){return function(f,g,x){var O=_n(f);if(!ti(f)){var I=bt(g,3);f=ur(f),g=function(W){return I(O[W],W,O)}}var U=u(f,g,x);return U>-1?O[I?f[U]:U]:n}}function GL(u){return aa(function(f){var g=f.length,x=g,O=Oi.prototype.thru;for(u&&f.reverse();x--;){var I=f[x];if(typeof I!="function")throw new Ci(a);if(O&&!U&&Wy(I)=="wrapper")var U=new Oi([],!0)}for(x=U?x:g;++x<g;){I=f[x];var W=Wy(I),te=W=="wrapper"?Ox(I):n;te&&Ix(te[0])&&te[1]==(N|S|E|L)&&!te[4].length&&te[9]==1?U=U[Wy(te[0])].apply(U,te[3]):U=I.length==1&&Ix(I)?U[W]():U.thru(I)}return function(){var _e=arguments,we=_e[0];if(U&&_e.length==1&&Rt(we))return U.plant(we).value();for(var Ee=0,Ve=g?f[Ee].apply(this,_e):we;++Ee<g;)Ve=f[Ee].call(this,Ve);return Ve}})}function By(u,f,g,x,O,I,U,W,te,_e){var we=f&N,Ee=f&w,Ve=f&_,at=f&(S|A),wt=f&F,Ut=Ve?n:Wf(u);function xt(){for(var Wt=arguments.length,Qt=le(Wt),yi=Wt;yi--;)Qt[yi]=arguments[yi];if(at)var Ur=Nl(xt),gi=_Oe(Qt,Ur);if(x&&(Qt=zL(Qt,x,O,at)),I&&(Qt=ZL(Qt,I,U,at)),Wt-=gi,at&&Wt<_e){var Un=Va(Qt,Ur);return XL(u,f,By,xt.placeholder,g,Qt,Un,W,te,_e-Wt)}var Yi=Ee?g:this,ca=Ve?Yi[u]:u;return Wt=Qt.length,W?Qt=T$e(Qt,W):wt&&Wt>1&&Qt.reverse(),we&&te<Wt&&(Qt.length=te),this&&this!==yr&&this instanceof xt&&(ca=Ut||Wf(ca)),ca.apply(Yi,Qt)}return xt}function YL(u,f){return function(g,x){return MTe(g,u,f(x),{})}}function zy(u,f){return function(g,x){var O;if(g===n&&x===n)return f;if(g!==n&&(O=g),x!==n){if(O===n)return x;typeof g=="string"||typeof x=="string"?(g=hi(g),x=hi(x)):(g=NL(g),x=NL(x)),O=u(g,x)}return O}}function Sx(u){return aa(function(f){return f=kn(f,pi(bt())),Bt(function(g){var x=this;return u(f,function(O){return di(O,x,g)})})})}function Zy(u,f){f=f===n?" ":hi(f);var g=f.length;if(g<2)return g?yx(f,u):f;var x=yx(f,ky(u/Ol(f)));return Cl(f)?Xa(Vi(x),0,u).join(""):x.slice(0,u)}function l$e(u,f,g,x){var O=f&w,I=Wf(u);function U(){for(var W=-1,te=arguments.length,_e=-1,we=x.length,Ee=le(we+te),Ve=this&&this!==yr&&this instanceof U?I:u;++_e<we;)Ee[_e]=x[_e];for(;te--;)Ee[_e++]=arguments[++W];return di(Ve,O?g:this,Ee)}return U}function JL(u){return function(f,g,x){return x&&typeof x!="number"&&qr(f,g,x)&&(g=x=n),f=la(f),g===n?(g=f,f=0):g=la(g),x=x===n?f<g?1:-1:la(x),KTe(f,g,x,u)}}function Hy(u){return function(f,g){return typeof f=="string"&&typeof g=="string"||(f=Ii(f),g=Ii(g)),u(f,g)}}function XL(u,f,g,x,O,I,U,W,te,_e){var we=f&S,Ee=we?U:n,Ve=we?n:U,at=we?I:n,wt=we?n:I;f|=we?E:T,f&=~(we?T:E),f&b||(f&=~(w|_));var Ut=[u,f,O,at,Ee,wt,Ve,W,te,_e],xt=g.apply(n,Ut);return Ix(u)&&cF(xt,Ut),xt.placeholder=x,fF(xt,u,f)}function Ex(u){var f=tr[u];return function(g,x){if(g=Ii(g),x=x==null?0:kr(Mt(x),292),x&&fL(g)){var O=(fn(g)+"e").split("e"),I=f(O[0]+"e"+(+O[1]+x));return O=(fn(I)+"e").split("e"),+(O[0]+"e"+(+O[1]-x))}return f(g)}}var c$e=kl&&1/_y(new kl([,-0]))[1]==Y?function(u){return new kl(u)}:Wx;function QL(u){return function(f){var g=Ir(f);return g==Ze?ex(f):g==Ue?OOe(f):bOe(f,u(f))}}function oa(u,f,g,x,O,I,U,W){var te=f&_;if(!te&&typeof u!="function")throw new Ci(a);var _e=x?x.length:0;if(_e||(f&=~(E|T),x=O=n),U=U===n?U:nr(Mt(U),0),W=W===n?W:Mt(W),_e-=O?O.length:0,f&T){var we=x,Ee=O;x=O=n}var Ve=te?n:Ox(u),at=[u,f,g,x,O,we,Ee,I,U,W];if(Ve&&A$e(at,Ve),u=at[0],f=at[1],g=at[2],x=at[3],O=at[4],W=at[9]=at[9]===n?te?0:u.length:nr(at[9]-_e,0),!W&&f&(S|A)&&(f&=~(S|A)),!f||f==w)var wt=s$e(u,f,g);else f==S||f==A?wt=u$e(u,f,W):(f==E||f==(w|E))&&!O.length?wt=l$e(u,f,g,x):wt=By.apply(n,at);var Ut=Ve?RL:cF;return fF(Ut(wt,at),u,f)}function eF(u,f,g,x){return u===n||Gi(u,$l[g])&&!hn.call(x,g)?f:u}function tF(u,f,g,x,O,I){return Dn(u)&&Dn(f)&&(I.set(f,u),Ly(u,f,n,tF,I),I.delete(f)),u}function f$e(u){return Gf(u)?n:u}function nF(u,f,g,x,O,I){var U=g&y,W=u.length,te=f.length;if(W!=te&&!(U&&te>W))return!1;var _e=I.get(u),we=I.get(f);if(_e&&we)return _e==f&&we==u;var Ee=-1,Ve=!0,at=g&v?new Vs:n;for(I.set(u,f),I.set(f,u);++Ee<W;){var wt=u[Ee],Ut=f[Ee];if(x)var xt=U?x(Ut,wt,Ee,f,u,I):x(wt,Ut,Ee,u,f,I);if(xt!==n){if(xt)continue;Ve=!1;break}if(at){if(!Kw(f,function(Wt,Qt){if(!Nf(at,Qt)&&(wt===Wt||O(wt,Wt,g,x,I)))return at.push(Qt)})){Ve=!1;break}}else if(!(wt===Ut||O(wt,Ut,g,x,I))){Ve=!1;break}}return I.delete(u),I.delete(f),Ve}function d$e(u,f,g,x,O,I,U){switch(g){case Be:if(u.byteLength!=f.byteLength||u.byteOffset!=f.byteOffset)return!1;u=u.buffer,f=f.buffer;case xe:return!(u.byteLength!=f.byteLength||!I(new Cy(u),new Cy(f)));case rt:case Ke:case lt:return Gi(+u,+f);case Ae:return u.name==f.name&&u.message==f.message;case et:case ot:return u==f+"";case Ze:var W=ex;case Ue:var te=x&y;if(W||(W=_y),u.size!=f.size&&!te)return!1;var _e=U.get(u);if(_e)return _e==f;x|=v,U.set(u,f);var we=nF(W(u),W(f),x,O,I,U);return U.delete(u),we;case It:if(qf)return qf.call(u)==qf.call(f)}return!1}function p$e(u,f,g,x,O,I){var U=g&y,W=Ax(u),te=W.length,_e=Ax(f),we=_e.length;if(te!=we&&!U)return!1;for(var Ee=te;Ee--;){var Ve=W[Ee];if(!(U?Ve in f:hn.call(f,Ve)))return!1}var at=I.get(u),wt=I.get(f);if(at&&wt)return at==f&&wt==u;var Ut=!0;I.set(u,f),I.set(f,u);for(var xt=U;++Ee<te;){Ve=W[Ee];var Wt=u[Ve],Qt=f[Ve];if(x)var yi=U?x(Qt,Wt,Ve,f,u,I):x(Wt,Qt,Ve,u,f,I);if(!(yi===n?Wt===Qt||O(Wt,Qt,g,x,I):yi)){Ut=!1;break}xt||(xt=Ve=="constructor")}if(Ut&&!xt){var Ur=u.constructor,gi=f.constructor;Ur!=gi&&"constructor"in u&&"constructor"in f&&!(typeof Ur=="function"&&Ur instanceof Ur&&typeof gi=="function"&&gi instanceof gi)&&(Ut=!1)}return I.delete(u),I.delete(f),Ut}function aa(u){return Rx(uF(u,n,gF),u+"")}function Ax(u){return xL(u,ur,$x)}function Cx(u){return xL(u,ni,rF)}var Ox=Py?function(u){return Py.get(u)}:Wx;function Wy(u){for(var f=u.name+"",g=Il[f],x=hn.call(Il,f)?g.length:0;x--;){var O=g[x],I=O.func;if(I==null||I==u)return O.name}return f}function Nl(u){var f=hn.call($,"placeholder")?$:u;return f.placeholder}function bt(){var u=$.iteratee||Zx;return u=u===Zx?AL:u,arguments.length?u(arguments[0],arguments[1]):u}function Vy(u,f){var g=u.__data__;return w$e(f)?g[typeof f=="string"?"string":"hash"]:g.map}function Tx(u){for(var f=ur(u),g=f.length;g--;){var x=f[g],O=u[x];f[g]=[x,O,aF(O)]}return f}function Ys(u,f){var g=EOe(u,f);return EL(g)?g:n}function h$e(u){var f=hn.call(u,Hs),g=u[Hs];try{u[Hs]=n;var x=!0}catch{}var O=Ey.call(u);return x&&(f?u[Hs]=g:delete u[Hs]),O}var $x=nx?function(u){return u==null?[]:(u=_n(u),Ha(nx(u),function(f){return lL.call(u,f)}))}:Vx,rF=nx?function(u){for(var f=[];u;)Wa(f,$x(u)),u=Oy(u);return f}:Vx,Ir=Fr;(rx&&Ir(new rx(new ArrayBuffer(1)))!=Be||jf&&Ir(new jf)!=Ze||ix&&Ir(ix.resolve())!=Te||kl&&Ir(new kl)!=Ue||Lf&&Ir(new Lf)!=ie)&&(Ir=function(u){var f=Fr(u),g=f==pe?u.constructor:n,x=g?Js(g):"";if(x)switch(x){case YOe:return Be;case JOe:return Ze;case XOe:return Te;case QOe:return Ue;case eTe:return ie}return f});function m$e(u,f,g){for(var x=-1,O=g.length;++x<O;){var I=g[x],U=I.size;switch(I.type){case"drop":u+=U;break;case"dropRight":f-=U;break;case"take":f=kr(f,u+U);break;case"takeRight":u=nr(u,f-U);break}}return{start:u,end:f}}function y$e(u){var f=u.match(Sl);return f?f[1].split(Z):[]}function iF(u,f,g){f=Ja(f,u);for(var x=-1,O=f.length,I=!1;++x<O;){var U=Co(f[x]);if(!(I=u!=null&&g(u,U)))break;u=u[U]}return I||++x!=O?I:(O=u==null?0:u.length,!!O&&eg(O)&&sa(U,O)&&(Rt(u)||Xs(u)))}function g$e(u){var f=u.length,g=new u.constructor(f);return f&&typeof u[0]=="string"&&hn.call(u,"index")&&(g.index=u.index,g.input=u.input),g}function oF(u){return typeof u.constructor=="function"&&!Vf(u)?Pl(Oy(u)):{}}function v$e(u,f,g){var x=u.constructor;switch(f){case xe:return xx(u);case rt:case Ke:return new x(+u);case Be:return t$e(u,g);case ct:case pn:case rn:case Jt:case cn:case Cn:case ee:case ae:case ft:return UL(u,g);case Ze:return new x;case lt:case ot:return new x(u);case et:return n$e(u);case Ue:return new x;case It:return r$e(u)}}function b$e(u,f){var g=f.length;if(!g)return u;var x=g-1;return f[x]=(g>1?"& ":"")+f[x],f=f.join(g>2?", ":" "),u.replace(ta,`{
|
|
8
|
+
*/yd.exports,function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",p=1,m=2,h=4,y=1,v=2,w=1,_=2,b=4,S=8,A=16,E=32,T=64,j=128,L=256,F=512,M=30,H="...",re=800,Q=16,G=1,V=2,q=3,Y=1/0,ne=9007199254740991,ce=17976931348623157e292,P=0/0,ue=4294967295,Oe=ue-1,N=ue>>>1,Ne=[["ary",j],["bind",w],["bindKey",_],["curry",S],["curryRight",A],["flip",F],["partial",E],["partialRight",T],["rearg",L]],qe="[object Arguments]",Me="[object Array]",Je="[object AsyncFunction]",rt="[object Boolean]",Ke="[object Date]",Pe="[object DOMException]",Ae="[object Error]",Fe="[object Function]",$e="[object GeneratorFunction]",Ze="[object Map]",lt="[object Number]",K="[object Null]",pe="[object Object]",Te="[object Promise]",Se="[object Proxy]",et="[object RegExp]",Ue="[object Set]",ot="[object String]",It="[object Symbol]",mt="[object Undefined]",ie="[object WeakMap]",ge="[object WeakSet]",xe="[object ArrayBuffer]",Be="[object DataView]",ct="[object Float32Array]",pn="[object Float64Array]",rn="[object Int8Array]",Jt="[object Int16Array]",cn="[object Int32Array]",Cn="[object Uint8Array]",ee="[object Uint8ClampedArray]",ae="[object Uint16Array]",ft="[object Uint32Array]",At=/\b__p \+= '';/g,on=/\b(__p \+=) '' \+/g,pt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mn=/&(?:amp|lt|gt|quot|#39);/g,sr=/[&<>"']/g,D=RegExp(Mn.source),je=RegExp(sr.source),He=/<%-([\s\S]+?)%>/g,Xe=/<%([\s\S]+?)%>/g,Re=/<%=([\s\S]+?)%>/g,We=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_t=/^\w*$/,Pt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xt=/[\\^$.*+?()[\]{}|]/g,bn=RegExp(Xt.source),Rn=/^\s+/,mr=/\s/,ta=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Sl=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,Ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ze=/[()=,{}\[\]\/\s]/,yt=/\\(\\)?/g,Gt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,un=/\w*$/,qt=/^[-+]0x[0-9a-f]+$/i,Tt=/^0b[01]+$/i,jn=/^\[object .+?Constructor\]$/,On=/^0o[0-7]+$/i,Tn=/^(?:0|[1-9]\d*)$/,Xr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wi=/($^)/,yy=/['\n\r\u2028\u2029\\]/g,Qr="\\ud800-\\udfff",NCe="\\u0300-\\u036f",MCe="\\ufe20-\\ufe2f",jCe="\\u20d0-\\u20ff",Ej=NCe+MCe+jCe,Aj="\\u2700-\\u27bf",Cj="a-z\\xdf-\\xf6\\xf8-\\xff",LCe="\\xac\\xb1\\xd7\\xf7",FCe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qCe="\\u2000-\\u206f",UCe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oj="A-Z\\xc0-\\xd6\\xd8-\\xde",Tj="\\ufe0e\\ufe0f",$j=LCe+FCe+qCe+UCe,Fw="['’]",BCe="["+Qr+"]",kj="["+$j+"]",gy="["+Ej+"]",Ij="\\d+",zCe="["+Aj+"]",Pj="["+Cj+"]",Rj="[^"+Qr+$j+Ij+Aj+Cj+Oj+"]",qw="\\ud83c[\\udffb-\\udfff]",ZCe="(?:"+gy+"|"+qw+")",Dj="[^"+Qr+"]",Uw="(?:\\ud83c[\\udde6-\\uddff]){2}",Bw="[\\ud800-\\udbff][\\udc00-\\udfff]",El="["+Oj+"]",Nj="\\u200d",Mj="(?:"+Pj+"|"+Rj+")",HCe="(?:"+El+"|"+Rj+")",jj="(?:"+Fw+"(?:d|ll|m|re|s|t|ve))?",Lj="(?:"+Fw+"(?:D|LL|M|RE|S|T|VE))?",Fj=ZCe+"?",qj="["+Tj+"]?",WCe="(?:"+Nj+"(?:"+[Dj,Uw,Bw].join("|")+")"+qj+Fj+")*",VCe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",KCe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Uj=qj+Fj+WCe,GCe="(?:"+[zCe,Uw,Bw].join("|")+")"+Uj,YCe="(?:"+[Dj+gy+"?",gy,Uw,Bw,BCe].join("|")+")",JCe=RegExp(Fw,"g"),XCe=RegExp(gy,"g"),zw=RegExp(qw+"(?="+qw+")|"+YCe+Uj,"g"),QCe=RegExp([El+"?"+Pj+"+"+jj+"(?="+[kj,El,"$"].join("|")+")",HCe+"+"+Lj+"(?="+[kj,El+Mj,"$"].join("|")+")",El+"?"+Mj+"+"+jj,El+"+"+Lj,KCe,VCe,Ij,GCe].join("|"),"g"),eOe=RegExp("["+Nj+Qr+Ej+Tj+"]"),tOe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nOe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rOe=-1,$n={};$n[ct]=$n[pn]=$n[rn]=$n[Jt]=$n[cn]=$n[Cn]=$n[ee]=$n[ae]=$n[ft]=!0,$n[qe]=$n[Me]=$n[xe]=$n[rt]=$n[Be]=$n[Ke]=$n[Ae]=$n[Fe]=$n[Ze]=$n[lt]=$n[pe]=$n[et]=$n[Ue]=$n[ot]=$n[ie]=!1;var Sn={};Sn[qe]=Sn[Me]=Sn[xe]=Sn[Be]=Sn[rt]=Sn[Ke]=Sn[ct]=Sn[pn]=Sn[rn]=Sn[Jt]=Sn[cn]=Sn[Ze]=Sn[lt]=Sn[pe]=Sn[et]=Sn[Ue]=Sn[ot]=Sn[It]=Sn[Cn]=Sn[ee]=Sn[ae]=Sn[ft]=!0,Sn[Ae]=Sn[Fe]=Sn[ie]=!1;var iOe={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},oOe={"&":"&","<":"<",">":">",'"':""","'":"'"},aOe={"&":"&","<":"<",">":">",""":'"',"'":"'"},sOe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},uOe=parseFloat,lOe=parseInt,Bj=typeof se=="object"&&se&&se.Object===Object&&se,cOe=typeof self=="object"&&self&&self.Object===Object&&self,yr=Bj||cOe||Function("return this")(),Zw=t&&!t.nodeType&&t,Zs=Zw&&!0&&e&&!e.nodeType&&e,zj=Zs&&Zs.exports===Zw,Hw=zj&&Bj.process,Ei=function(){try{var J=Zs&&Zs.require&&Zs.require("util").types;return J||Hw&&Hw.binding&&Hw.binding("util")}catch{}}(),Zj=Ei&&Ei.isArrayBuffer,Hj=Ei&&Ei.isDate,Wj=Ei&&Ei.isMap,Vj=Ei&&Ei.isRegExp,Kj=Ei&&Ei.isSet,Gj=Ei&&Ei.isTypedArray;function di(J,ve,le){switch(le.length){case 0:return J.call(ve);case 1:return J.call(ve,le[0]);case 2:return J.call(ve,le[0],le[1]);case 3:return J.call(ve,le[0],le[1],le[2])}return J.apply(ve,le)}function fOe(J,ve,le,nt){for(var kt=-1,ln=J==null?0:J.length;++kt<ln;){var tr=J[kt];ve(nt,tr,le(tr),J)}return nt}function Ai(J,ve){for(var le=-1,nt=J==null?0:J.length;++le<nt&&ve(J[le],le,J)!==!1;);return J}function dOe(J,ve){for(var le=J==null?0:J.length;le--&&ve(J[le],le,J)!==!1;);return J}function Yj(J,ve){for(var le=-1,nt=J==null?0:J.length;++le<nt;)if(!ve(J[le],le,J))return!1;return!0}function Ha(J,ve){for(var le=-1,nt=J==null?0:J.length,kt=0,ln=[];++le<nt;){var tr=J[le];ve(tr,le,J)&&(ln[kt++]=tr)}return ln}function vy(J,ve){var le=J==null?0:J.length;return!!le&&Al(J,ve,0)>-1}function Ww(J,ve,le){for(var nt=-1,kt=J==null?0:J.length;++nt<kt;)if(le(ve,J[nt]))return!0;return!1}function kn(J,ve){for(var le=-1,nt=J==null?0:J.length,kt=Array(nt);++le<nt;)kt[le]=ve(J[le],le,J);return kt}function Wa(J,ve){for(var le=-1,nt=ve.length,kt=J.length;++le<nt;)J[kt+le]=ve[le];return J}function Vw(J,ve,le,nt){var kt=-1,ln=J==null?0:J.length;for(nt&&ln&&(le=J[++kt]);++kt<ln;)le=ve(le,J[kt],kt,J);return le}function pOe(J,ve,le,nt){var kt=J==null?0:J.length;for(nt&&kt&&(le=J[--kt]);kt--;)le=ve(le,J[kt],kt,J);return le}function Kw(J,ve){for(var le=-1,nt=J==null?0:J.length;++le<nt;)if(ve(J[le],le,J))return!0;return!1}var hOe=Gw("length");function mOe(J){return J.split("")}function yOe(J){return J.match(Ce)||[]}function Jj(J,ve,le){var nt;return le(J,function(kt,ln,tr){if(ve(kt,ln,tr))return nt=ln,!1}),nt}function by(J,ve,le,nt){for(var kt=J.length,ln=le+(nt?1:-1);nt?ln--:++ln<kt;)if(ve(J[ln],ln,J))return ln;return-1}function Al(J,ve,le){return ve===ve?TOe(J,ve,le):by(J,Xj,le)}function gOe(J,ve,le,nt){for(var kt=le-1,ln=J.length;++kt<ln;)if(nt(J[kt],ve))return kt;return-1}function Xj(J){return J!==J}function Qj(J,ve){var le=J==null?0:J.length;return le?Jw(J,ve)/le:P}function Gw(J){return function(ve){return ve==null?n:ve[J]}}function Yw(J){return function(ve){return J==null?n:J[ve]}}function eL(J,ve,le,nt,kt){return kt(J,function(ln,tr,_n){le=nt?(nt=!1,ln):ve(le,ln,tr,_n)}),le}function vOe(J,ve){var le=J.length;for(J.sort(ve);le--;)J[le]=J[le].value;return J}function Jw(J,ve){for(var le,nt=-1,kt=J.length;++nt<kt;){var ln=ve(J[nt]);ln!==n&&(le=le===n?ln:le+ln)}return le}function Xw(J,ve){for(var le=-1,nt=Array(J);++le<J;)nt[le]=ve(le);return nt}function bOe(J,ve){return kn(ve,function(le){return[le,J[le]]})}function tL(J){return J&&J.slice(0,oL(J)+1).replace(Rn,"")}function pi(J){return function(ve){return J(ve)}}function Qw(J,ve){return kn(ve,function(le){return J[le]})}function Nf(J,ve){return J.has(ve)}function nL(J,ve){for(var le=-1,nt=J.length;++le<nt&&Al(ve,J[le],0)>-1;);return le}function rL(J,ve){for(var le=J.length;le--&&Al(ve,J[le],0)>-1;);return le}function _Oe(J,ve){for(var le=J.length,nt=0;le--;)J[le]===ve&&++nt;return nt}var wOe=Yw(iOe),xOe=Yw(oOe);function SOe(J){return"\\"+sOe[J]}function EOe(J,ve){return J==null?n:J[ve]}function Cl(J){return eOe.test(J)}function AOe(J){return tOe.test(J)}function COe(J){for(var ve,le=[];!(ve=J.next()).done;)le.push(ve.value);return le}function ex(J){var ve=-1,le=Array(J.size);return J.forEach(function(nt,kt){le[++ve]=[kt,nt]}),le}function iL(J,ve){return function(le){return J(ve(le))}}function Va(J,ve){for(var le=-1,nt=J.length,kt=0,ln=[];++le<nt;){var tr=J[le];(tr===ve||tr===d)&&(J[le]=d,ln[kt++]=le)}return ln}function _y(J){var ve=-1,le=Array(J.size);return J.forEach(function(nt){le[++ve]=nt}),le}function OOe(J){var ve=-1,le=Array(J.size);return J.forEach(function(nt){le[++ve]=[nt,nt]}),le}function TOe(J,ve,le){for(var nt=le-1,kt=J.length;++nt<kt;)if(J[nt]===ve)return nt;return-1}function $Oe(J,ve,le){for(var nt=le+1;nt--;)if(J[nt]===ve)return nt;return nt}function Ol(J){return Cl(J)?IOe(J):hOe(J)}function Vi(J){return Cl(J)?POe(J):mOe(J)}function oL(J){for(var ve=J.length;ve--&&mr.test(J.charAt(ve)););return ve}var kOe=Yw(aOe);function IOe(J){for(var ve=zw.lastIndex=0;zw.test(J);)++ve;return ve}function POe(J){return J.match(zw)||[]}function ROe(J){return J.match(QCe)||[]}var DOe=function J(ve){ve=ve==null?yr:Tl.defaults(yr.Object(),ve,Tl.pick(yr,nOe));var le=ve.Array,nt=ve.Date,kt=ve.Error,ln=ve.Function,tr=ve.Math,_n=ve.Object,tx=ve.RegExp,NOe=ve.String,Ci=ve.TypeError,wy=le.prototype,MOe=ln.prototype,$l=_n.prototype,xy=ve["__core-js_shared__"],Sy=MOe.toString,hn=$l.hasOwnProperty,jOe=0,aL=function(){var u=/[^.]+$/.exec(xy&&xy.keys&&xy.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}(),Ey=$l.toString,LOe=Sy.call(_n),FOe=yr._,qOe=tx("^"+Sy.call(hn).replace(Xt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ay=zj?ve.Buffer:n,Ka=ve.Symbol,Cy=ve.Uint8Array,sL=Ay?Ay.allocUnsafe:n,Oy=iL(_n.getPrototypeOf,_n),uL=_n.create,lL=$l.propertyIsEnumerable,Ty=wy.splice,cL=Ka?Ka.isConcatSpreadable:n,Mf=Ka?Ka.iterator:n,Hs=Ka?Ka.toStringTag:n,$y=function(){try{var u=Ys(_n,"defineProperty");return u({},"",{}),u}catch{}}(),UOe=ve.clearTimeout!==yr.clearTimeout&&ve.clearTimeout,BOe=nt&&nt.now!==yr.Date.now&&nt.now,zOe=ve.setTimeout!==yr.setTimeout&&ve.setTimeout,ky=tr.ceil,Iy=tr.floor,nx=_n.getOwnPropertySymbols,ZOe=Ay?Ay.isBuffer:n,fL=ve.isFinite,HOe=wy.join,WOe=iL(_n.keys,_n),nr=tr.max,kr=tr.min,VOe=nt.now,KOe=ve.parseInt,dL=tr.random,GOe=wy.reverse,rx=Ys(ve,"DataView"),jf=Ys(ve,"Map"),ix=Ys(ve,"Promise"),kl=Ys(ve,"Set"),Lf=Ys(ve,"WeakMap"),Ff=Ys(_n,"create"),Py=Lf&&new Lf,Il={},YOe=Js(rx),JOe=Js(jf),XOe=Js(ix),QOe=Js(kl),eTe=Js(Lf),Ry=Ka?Ka.prototype:n,qf=Ry?Ry.valueOf:n,pL=Ry?Ry.toString:n;function $(u){if(Ln(u)&&!Rt(u)&&!(u instanceof Yt)){if(u instanceof Oi)return u;if(hn.call(u,"__wrapped__"))return hF(u)}return new Oi(u)}var Pl=function(){function u(){}return function(f){if(!Dn(f))return{};if(uL)return uL(f);u.prototype=f;var g=new u;return u.prototype=n,g}}();function Dy(){}function Oi(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=n}$.templateSettings={escape:He,evaluate:Xe,interpolate:Re,variable:"",imports:{_:$}},$.prototype=Dy.prototype,$.prototype.constructor=$,Oi.prototype=Pl(Dy.prototype),Oi.prototype.constructor=Oi;function Yt(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ue,this.__views__=[]}function tTe(){var u=new Yt(this.__wrapped__);return u.__actions__=ei(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=ei(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=ei(this.__views__),u}function nTe(){if(this.__filtered__){var u=new Yt(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}function rTe(){var u=this.__wrapped__.value(),f=this.__dir__,g=Rt(u),x=f<0,O=g?u.length:0,I=m$e(0,O,this.__views__),U=I.start,W=I.end,te=W-U,_e=x?W:U-1,we=this.__iteratees__,Ee=we.length,Ve=0,at=kr(te,this.__takeCount__);if(!g||!x&&O==te&&at==te)return jL(u,this.__actions__);var wt=[];e:for(;te--&&Ve<at;){_e+=f;for(var Ut=-1,xt=u[_e];++Ut<Ee;){var Wt=we[Ut],Qt=Wt.iteratee,yi=Wt.type,Ur=Qt(xt);if(yi==V)xt=Ur;else if(!Ur){if(yi==G)continue e;break e}}wt[Ve++]=xt}return wt}Yt.prototype=Pl(Dy.prototype),Yt.prototype.constructor=Yt;function Ws(u){var f=-1,g=u==null?0:u.length;for(this.clear();++f<g;){var x=u[f];this.set(x[0],x[1])}}function iTe(){this.__data__=Ff?Ff(null):{},this.size=0}function oTe(u){var f=this.has(u)&&delete this.__data__[u];return this.size-=f?1:0,f}function aTe(u){var f=this.__data__;if(Ff){var g=f[u];return g===l?n:g}return hn.call(f,u)?f[u]:n}function sTe(u){var f=this.__data__;return Ff?f[u]!==n:hn.call(f,u)}function uTe(u,f){var g=this.__data__;return this.size+=this.has(u)?0:1,g[u]=Ff&&f===n?l:f,this}Ws.prototype.clear=iTe,Ws.prototype.delete=oTe,Ws.prototype.get=aTe,Ws.prototype.has=sTe,Ws.prototype.set=uTe;function na(u){var f=-1,g=u==null?0:u.length;for(this.clear();++f<g;){var x=u[f];this.set(x[0],x[1])}}function lTe(){this.__data__=[],this.size=0}function cTe(u){var f=this.__data__,g=Ny(f,u);if(g<0)return!1;var x=f.length-1;return g==x?f.pop():Ty.call(f,g,1),--this.size,!0}function fTe(u){var f=this.__data__,g=Ny(f,u);return g<0?n:f[g][1]}function dTe(u){return Ny(this.__data__,u)>-1}function pTe(u,f){var g=this.__data__,x=Ny(g,u);return x<0?(++this.size,g.push([u,f])):g[x][1]=f,this}na.prototype.clear=lTe,na.prototype.delete=cTe,na.prototype.get=fTe,na.prototype.has=dTe,na.prototype.set=pTe;function ra(u){var f=-1,g=u==null?0:u.length;for(this.clear();++f<g;){var x=u[f];this.set(x[0],x[1])}}function hTe(){this.size=0,this.__data__={hash:new Ws,map:new(jf||na),string:new Ws}}function mTe(u){var f=Vy(this,u).delete(u);return this.size-=f?1:0,f}function yTe(u){return Vy(this,u).get(u)}function gTe(u){return Vy(this,u).has(u)}function vTe(u,f){var g=Vy(this,u),x=g.size;return g.set(u,f),this.size+=g.size==x?0:1,this}ra.prototype.clear=hTe,ra.prototype.delete=mTe,ra.prototype.get=yTe,ra.prototype.has=gTe,ra.prototype.set=vTe;function Vs(u){var f=-1,g=u==null?0:u.length;for(this.__data__=new ra;++f<g;)this.add(u[f])}function bTe(u){return this.__data__.set(u,l),this}function _Te(u){return this.__data__.has(u)}Vs.prototype.add=Vs.prototype.push=bTe,Vs.prototype.has=_Te;function Ki(u){var f=this.__data__=new na(u);this.size=f.size}function wTe(){this.__data__=new na,this.size=0}function xTe(u){var f=this.__data__,g=f.delete(u);return this.size=f.size,g}function STe(u){return this.__data__.get(u)}function ETe(u){return this.__data__.has(u)}function ATe(u,f){var g=this.__data__;if(g instanceof na){var x=g.__data__;if(!jf||x.length<i-1)return x.push([u,f]),this.size=++g.size,this;g=this.__data__=new ra(x)}return g.set(u,f),this.size=g.size,this}Ki.prototype.clear=wTe,Ki.prototype.delete=xTe,Ki.prototype.get=STe,Ki.prototype.has=ETe,Ki.prototype.set=ATe;function hL(u,f){var g=Rt(u),x=!g&&Xs(u),O=!g&&!x&&Qa(u),I=!g&&!x&&!O&&Ml(u),U=g||x||O||I,W=U?Xw(u.length,NOe):[],te=W.length;for(var _e in u)(f||hn.call(u,_e))&&!(U&&(_e=="length"||O&&(_e=="offset"||_e=="parent")||I&&(_e=="buffer"||_e=="byteLength"||_e=="byteOffset")||sa(_e,te)))&&W.push(_e);return W}function mL(u){var f=u.length;return f?u[mx(0,f-1)]:n}function CTe(u,f){return Ky(ei(u),Ks(f,0,u.length))}function OTe(u){return Ky(ei(u))}function ox(u,f,g){(g!==n&&!Gi(u[f],g)||g===n&&!(f in u))&&ia(u,f,g)}function Uf(u,f,g){var x=u[f];(!(hn.call(u,f)&&Gi(x,g))||g===n&&!(f in u))&&ia(u,f,g)}function Ny(u,f){for(var g=u.length;g--;)if(Gi(u[g][0],f))return g;return-1}function TTe(u,f,g,x){return Ga(u,function(O,I,U){f(x,O,g(O),U)}),x}function yL(u,f){return u&&Ao(f,ur(f),u)}function $Te(u,f){return u&&Ao(f,ni(f),u)}function ia(u,f,g){f=="__proto__"&&$y?$y(u,f,{configurable:!0,enumerable:!0,value:g,writable:!0}):u[f]=g}function ax(u,f){for(var g=-1,x=f.length,O=le(x),I=u==null;++g<x;)O[g]=I?n:qx(u,f[g]);return O}function Ks(u,f,g){return u===u&&(g!==n&&(u=u<=g?u:g),f!==n&&(u=u>=f?u:f)),u}function Ti(u,f,g,x,O,I){var U,W=f&p,te=f&m,_e=f&h;if(g&&(U=O?g(u,x,O,I):g(u)),U!==n)return U;if(!Dn(u))return u;var we=Rt(u);if(we){if(U=g$e(u),!W)return ei(u,U)}else{var Ee=Ir(u),Ve=Ee==Fe||Ee==$e;if(Qa(u))return qL(u,W);if(Ee==pe||Ee==qe||Ve&&!O){if(U=te||Ve?{}:oF(u),!W)return te?a$e(u,$Te(U,u)):o$e(u,yL(U,u))}else{if(!Sn[Ee])return O?u:{};U=v$e(u,Ee,W)}}I||(I=new Ki);var at=I.get(u);if(at)return at;I.set(u,U),DF(u)?u.forEach(function(xt){U.add(Ti(xt,f,g,xt,u,I))}):PF(u)&&u.forEach(function(xt,Wt){U.set(Wt,Ti(xt,f,g,Wt,u,I))});var wt=_e?te?Cx:Ax:te?ni:ur,Ut=we?n:wt(u);return Ai(Ut||u,function(xt,Wt){Ut&&(Wt=xt,xt=u[Wt]),Uf(U,Wt,Ti(xt,f,g,Wt,u,I))}),U}function kTe(u){var f=ur(u);return function(g){return gL(g,u,f)}}function gL(u,f,g){var x=g.length;if(u==null)return!x;for(u=_n(u);x--;){var O=g[x],I=f[O],U=u[O];if(U===n&&!(O in u)||!I(U))return!1}return!0}function vL(u,f,g){if(typeof u!="function")throw new Ci(a);return Kf(function(){u.apply(n,g)},f)}function Bf(u,f,g,x){var O=-1,I=vy,U=!0,W=u.length,te=[],_e=f.length;if(!W)return te;g&&(f=kn(f,pi(g))),x?(I=Ww,U=!1):f.length>=i&&(I=Nf,U=!1,f=new Vs(f));e:for(;++O<W;){var we=u[O],Ee=g==null?we:g(we);if(we=x||we!==0?we:0,U&&Ee===Ee){for(var Ve=_e;Ve--;)if(f[Ve]===Ee)continue e;te.push(we)}else I(f,Ee,x)||te.push(we)}return te}var Ga=HL(Eo),bL=HL(ux,!0);function ITe(u,f){var g=!0;return Ga(u,function(x,O,I){return g=!!f(x,O,I),g}),g}function My(u,f,g){for(var x=-1,O=u.length;++x<O;){var I=u[x],U=f(I);if(U!=null&&(W===n?U===U&&!mi(U):g(U,W)))var W=U,te=I}return te}function PTe(u,f,g,x){var O=u.length;for(g=Mt(g),g<0&&(g=-g>O?0:O+g),x=x===n||x>O?O:Mt(x),x<0&&(x+=O),x=g>x?0:MF(x);g<x;)u[g++]=f;return u}function _L(u,f){var g=[];return Ga(u,function(x,O,I){f(x,O,I)&&g.push(x)}),g}function gr(u,f,g,x,O){var I=-1,U=u.length;for(g||(g=_$e),O||(O=[]);++I<U;){var W=u[I];f>0&&g(W)?f>1?gr(W,f-1,g,x,O):Wa(O,W):x||(O[O.length]=W)}return O}var sx=WL(),wL=WL(!0);function Eo(u,f){return u&&sx(u,f,ur)}function ux(u,f){return u&&wL(u,f,ur)}function jy(u,f){return Ha(f,function(g){return ua(u[g])})}function Gs(u,f){f=Ja(f,u);for(var g=0,x=f.length;u!=null&&g<x;)u=u[Co(f[g++])];return g&&g==x?u:n}function xL(u,f,g){var x=f(u);return Rt(u)?x:Wa(x,g(u))}function Fr(u){return u==null?u===n?mt:K:Hs&&Hs in _n(u)?h$e(u):O$e(u)}function lx(u,f){return u>f}function RTe(u,f){return u!=null&&hn.call(u,f)}function DTe(u,f){return u!=null&&f in _n(u)}function NTe(u,f,g){return u>=kr(f,g)&&u<nr(f,g)}function cx(u,f,g){for(var x=g?Ww:vy,O=u[0].length,I=u.length,U=I,W=le(I),te=1/0,_e=[];U--;){var we=u[U];U&&f&&(we=kn(we,pi(f))),te=kr(we.length,te),W[U]=!g&&(f||O>=120&&we.length>=120)?new Vs(U&&we):n}we=u[0];var Ee=-1,Ve=W[0];e:for(;++Ee<O&&_e.length<te;){var at=we[Ee],wt=f?f(at):at;if(at=g||at!==0?at:0,!(Ve?Nf(Ve,wt):x(_e,wt,g))){for(U=I;--U;){var Ut=W[U];if(!(Ut?Nf(Ut,wt):x(u[U],wt,g)))continue e}Ve&&Ve.push(wt),_e.push(at)}}return _e}function MTe(u,f,g,x){return Eo(u,function(O,I,U){f(x,g(O),I,U)}),x}function zf(u,f,g){f=Ja(f,u),u=lF(u,f);var x=u==null?u:u[Co(ki(f))];return x==null?n:di(x,u,g)}function SL(u){return Ln(u)&&Fr(u)==qe}function jTe(u){return Ln(u)&&Fr(u)==xe}function LTe(u){return Ln(u)&&Fr(u)==Ke}function Zf(u,f,g,x,O){return u===f?!0:u==null||f==null||!Ln(u)&&!Ln(f)?u!==u&&f!==f:FTe(u,f,g,x,Zf,O)}function FTe(u,f,g,x,O,I){var U=Rt(u),W=Rt(f),te=U?Me:Ir(u),_e=W?Me:Ir(f);te=te==qe?pe:te,_e=_e==qe?pe:_e;var we=te==pe,Ee=_e==pe,Ve=te==_e;if(Ve&&Qa(u)){if(!Qa(f))return!1;U=!0,we=!1}if(Ve&&!we)return I||(I=new Ki),U||Ml(u)?nF(u,f,g,x,O,I):d$e(u,f,te,g,x,O,I);if(!(g&y)){var at=we&&hn.call(u,"__wrapped__"),wt=Ee&&hn.call(f,"__wrapped__");if(at||wt){var Ut=at?u.value():u,xt=wt?f.value():f;return I||(I=new Ki),O(Ut,xt,g,x,I)}}return Ve?(I||(I=new Ki),p$e(u,f,g,x,O,I)):!1}function qTe(u){return Ln(u)&&Ir(u)==Ze}function fx(u,f,g,x){var O=g.length,I=O,U=!x;if(u==null)return!I;for(u=_n(u);O--;){var W=g[O];if(U&&W[2]?W[1]!==u[W[0]]:!(W[0]in u))return!1}for(;++O<I;){W=g[O];var te=W[0],_e=u[te],we=W[1];if(U&&W[2]){if(_e===n&&!(te in u))return!1}else{var Ee=new Ki;if(x)var Ve=x(_e,we,te,u,f,Ee);if(!(Ve===n?Zf(we,_e,y|v,x,Ee):Ve))return!1}}return!0}function EL(u){if(!Dn(u)||x$e(u))return!1;var f=ua(u)?qOe:jn;return f.test(Js(u))}function UTe(u){return Ln(u)&&Fr(u)==et}function BTe(u){return Ln(u)&&Ir(u)==Ue}function zTe(u){return Ln(u)&&eg(u.length)&&!!$n[Fr(u)]}function AL(u){return typeof u=="function"?u:u==null?ri:typeof u=="object"?Rt(u)?TL(u[0],u[1]):OL(u):VF(u)}function dx(u){if(!Vf(u))return WOe(u);var f=[];for(var g in _n(u))hn.call(u,g)&&g!="constructor"&&f.push(g);return f}function ZTe(u){if(!Dn(u))return C$e(u);var f=Vf(u),g=[];for(var x in u)x=="constructor"&&(f||!hn.call(u,x))||g.push(x);return g}function px(u,f){return u<f}function CL(u,f){var g=-1,x=ti(u)?le(u.length):[];return Ga(u,function(O,I,U){x[++g]=f(O,I,U)}),x}function OL(u){var f=Tx(u);return f.length==1&&f[0][2]?sF(f[0][0],f[0][1]):function(g){return g===u||fx(g,u,f)}}function TL(u,f){return kx(u)&&aF(f)?sF(Co(u),f):function(g){var x=qx(g,u);return x===n&&x===f?Ux(g,u):Zf(f,x,y|v)}}function Ly(u,f,g,x,O){u!==f&&sx(f,function(I,U){if(O||(O=new Ki),Dn(I))HTe(u,f,U,g,Ly,x,O);else{var W=x?x(Px(u,U),I,U+"",u,f,O):n;W===n&&(W=I),ox(u,U,W)}},ni)}function HTe(u,f,g,x,O,I,U){var W=Px(u,g),te=Px(f,g),_e=U.get(te);if(_e){ox(u,g,_e);return}var we=I?I(W,te,g+"",u,f,U):n,Ee=we===n;if(Ee){var Ve=Rt(te),at=!Ve&&Qa(te),wt=!Ve&&!at&&Ml(te);we=te,Ve||at||wt?Rt(W)?we=W:qn(W)?we=ei(W):at?(Ee=!1,we=qL(te,!0)):wt?(Ee=!1,we=UL(te,!0)):we=[]:Gf(te)||Xs(te)?(we=W,Xs(W)?we=jF(W):(!Dn(W)||ua(W))&&(we=oF(te))):Ee=!1}Ee&&(U.set(te,we),O(we,te,x,I,U),U.delete(te)),ox(u,g,we)}function $L(u,f){var g=u.length;if(g)return f+=f<0?g:0,sa(f,g)?u[f]:n}function kL(u,f,g){f.length?f=kn(f,function(I){return Rt(I)?function(U){return Gs(U,I.length===1?I[0]:I)}:I}):f=[ri];var x=-1;f=kn(f,pi(bt()));var O=CL(u,function(I,U,W){var te=kn(f,function(_e){return _e(I)});return{criteria:te,index:++x,value:I}});return vOe(O,function(I,U){return i$e(I,U,g)})}function WTe(u,f){return IL(u,f,function(g,x){return Ux(u,x)})}function IL(u,f,g){for(var x=-1,O=f.length,I={};++x<O;){var U=f[x],W=Gs(u,U);g(W,U)&&Hf(I,Ja(U,u),W)}return I}function VTe(u){return function(f){return Gs(f,u)}}function hx(u,f,g,x){var O=x?gOe:Al,I=-1,U=f.length,W=u;for(u===f&&(f=ei(f)),g&&(W=kn(u,pi(g)));++I<U;)for(var te=0,_e=f[I],we=g?g(_e):_e;(te=O(W,we,te,x))>-1;)W!==u&&Ty.call(W,te,1),Ty.call(u,te,1);return u}function PL(u,f){for(var g=u?f.length:0,x=g-1;g--;){var O=f[g];if(g==x||O!==I){var I=O;sa(O)?Ty.call(u,O,1):vx(u,O)}}return u}function mx(u,f){return u+Iy(dL()*(f-u+1))}function KTe(u,f,g,x){for(var O=-1,I=nr(ky((f-u)/(g||1)),0),U=le(I);I--;)U[x?I:++O]=u,u+=g;return U}function yx(u,f){var g="";if(!u||f<1||f>ne)return g;do f%2&&(g+=u),f=Iy(f/2),f&&(u+=u);while(f);return g}function Bt(u,f){return Rx(uF(u,f,ri),u+"")}function GTe(u){return mL(jl(u))}function YTe(u,f){var g=jl(u);return Ky(g,Ks(f,0,g.length))}function Hf(u,f,g,x){if(!Dn(u))return u;f=Ja(f,u);for(var O=-1,I=f.length,U=I-1,W=u;W!=null&&++O<I;){var te=Co(f[O]),_e=g;if(te==="__proto__"||te==="constructor"||te==="prototype")return u;if(O!=U){var we=W[te];_e=x?x(we,te,W):n,_e===n&&(_e=Dn(we)?we:sa(f[O+1])?[]:{})}Uf(W,te,_e),W=W[te]}return u}var RL=Py?function(u,f){return Py.set(u,f),u}:ri,JTe=$y?function(u,f){return $y(u,"toString",{configurable:!0,enumerable:!1,value:zx(f),writable:!0})}:ri;function XTe(u){return Ky(jl(u))}function $i(u,f,g){var x=-1,O=u.length;f<0&&(f=-f>O?0:O+f),g=g>O?O:g,g<0&&(g+=O),O=f>g?0:g-f>>>0,f>>>=0;for(var I=le(O);++x<O;)I[x]=u[x+f];return I}function QTe(u,f){var g;return Ga(u,function(x,O,I){return g=f(x,O,I),!g}),!!g}function Fy(u,f,g){var x=0,O=u==null?x:u.length;if(typeof f=="number"&&f===f&&O<=N){for(;x<O;){var I=x+O>>>1,U=u[I];U!==null&&!mi(U)&&(g?U<=f:U<f)?x=I+1:O=I}return O}return gx(u,f,ri,g)}function gx(u,f,g,x){var O=0,I=u==null?0:u.length;if(I===0)return 0;f=g(f);for(var U=f!==f,W=f===null,te=mi(f),_e=f===n;O<I;){var we=Iy((O+I)/2),Ee=g(u[we]),Ve=Ee!==n,at=Ee===null,wt=Ee===Ee,Ut=mi(Ee);if(U)var xt=x||wt;else _e?xt=wt&&(x||Ve):W?xt=wt&&Ve&&(x||!at):te?xt=wt&&Ve&&!at&&(x||!Ut):at||Ut?xt=!1:xt=x?Ee<=f:Ee<f;xt?O=we+1:I=we}return kr(I,Oe)}function DL(u,f){for(var g=-1,x=u.length,O=0,I=[];++g<x;){var U=u[g],W=f?f(U):U;if(!g||!Gi(W,te)){var te=W;I[O++]=U===0?0:U}}return I}function NL(u){return typeof u=="number"?u:mi(u)?P:+u}function hi(u){if(typeof u=="string")return u;if(Rt(u))return kn(u,hi)+"";if(mi(u))return pL?pL.call(u):"";var f=u+"";return f=="0"&&1/u==-Y?"-0":f}function Ya(u,f,g){var x=-1,O=vy,I=u.length,U=!0,W=[],te=W;if(g)U=!1,O=Ww;else if(I>=i){var _e=f?null:c$e(u);if(_e)return _y(_e);U=!1,O=Nf,te=new Vs}else te=f?[]:W;e:for(;++x<I;){var we=u[x],Ee=f?f(we):we;if(we=g||we!==0?we:0,U&&Ee===Ee){for(var Ve=te.length;Ve--;)if(te[Ve]===Ee)continue e;f&&te.push(Ee),W.push(we)}else O(te,Ee,g)||(te!==W&&te.push(Ee),W.push(we))}return W}function vx(u,f){return f=Ja(f,u),u=lF(u,f),u==null||delete u[Co(ki(f))]}function ML(u,f,g,x){return Hf(u,f,g(Gs(u,f)),x)}function qy(u,f,g,x){for(var O=u.length,I=x?O:-1;(x?I--:++I<O)&&f(u[I],I,u););return g?$i(u,x?0:I,x?I+1:O):$i(u,x?I+1:0,x?O:I)}function jL(u,f){var g=u;return g instanceof Yt&&(g=g.value()),Vw(f,function(x,O){return O.func.apply(O.thisArg,Wa([x],O.args))},g)}function bx(u,f,g){var x=u.length;if(x<2)return x?Ya(u[0]):[];for(var O=-1,I=le(x);++O<x;)for(var U=u[O],W=-1;++W<x;)W!=O&&(I[O]=Bf(I[O]||U,u[W],f,g));return Ya(gr(I,1),f,g)}function LL(u,f,g){for(var x=-1,O=u.length,I=f.length,U={};++x<O;){var W=x<I?f[x]:n;g(U,u[x],W)}return U}function _x(u){return qn(u)?u:[]}function wx(u){return typeof u=="function"?u:ri}function Ja(u,f){return Rt(u)?u:kx(u,f)?[u]:pF(fn(u))}var e$e=Bt;function Xa(u,f,g){var x=u.length;return g=g===n?x:g,!f&&g>=x?u:$i(u,f,g)}var FL=UOe||function(u){return yr.clearTimeout(u)};function qL(u,f){if(f)return u.slice();var g=u.length,x=sL?sL(g):new u.constructor(g);return u.copy(x),x}function xx(u){var f=new u.constructor(u.byteLength);return new Cy(f).set(new Cy(u)),f}function t$e(u,f){var g=f?xx(u.buffer):u.buffer;return new u.constructor(g,u.byteOffset,u.byteLength)}function n$e(u){var f=new u.constructor(u.source,un.exec(u));return f.lastIndex=u.lastIndex,f}function r$e(u){return qf?_n(qf.call(u)):{}}function UL(u,f){var g=f?xx(u.buffer):u.buffer;return new u.constructor(g,u.byteOffset,u.length)}function BL(u,f){if(u!==f){var g=u!==n,x=u===null,O=u===u,I=mi(u),U=f!==n,W=f===null,te=f===f,_e=mi(f);if(!W&&!_e&&!I&&u>f||I&&U&&te&&!W&&!_e||x&&U&&te||!g&&te||!O)return 1;if(!x&&!I&&!_e&&u<f||_e&&g&&O&&!x&&!I||W&&g&&O||!U&&O||!te)return-1}return 0}function i$e(u,f,g){for(var x=-1,O=u.criteria,I=f.criteria,U=O.length,W=g.length;++x<U;){var te=BL(O[x],I[x]);if(te){if(x>=W)return te;var _e=g[x];return te*(_e=="desc"?-1:1)}}return u.index-f.index}function zL(u,f,g,x){for(var O=-1,I=u.length,U=g.length,W=-1,te=f.length,_e=nr(I-U,0),we=le(te+_e),Ee=!x;++W<te;)we[W]=f[W];for(;++O<U;)(Ee||O<I)&&(we[g[O]]=u[O]);for(;_e--;)we[W++]=u[O++];return we}function ZL(u,f,g,x){for(var O=-1,I=u.length,U=-1,W=g.length,te=-1,_e=f.length,we=nr(I-W,0),Ee=le(we+_e),Ve=!x;++O<we;)Ee[O]=u[O];for(var at=O;++te<_e;)Ee[at+te]=f[te];for(;++U<W;)(Ve||O<I)&&(Ee[at+g[U]]=u[O++]);return Ee}function ei(u,f){var g=-1,x=u.length;for(f||(f=le(x));++g<x;)f[g]=u[g];return f}function Ao(u,f,g,x){var O=!g;g||(g={});for(var I=-1,U=f.length;++I<U;){var W=f[I],te=x?x(g[W],u[W],W,g,u):n;te===n&&(te=u[W]),O?ia(g,W,te):Uf(g,W,te)}return g}function o$e(u,f){return Ao(u,$x(u),f)}function a$e(u,f){return Ao(u,rF(u),f)}function Uy(u,f){return function(g,x){var O=Rt(g)?fOe:TTe,I=f?f():{};return O(g,u,bt(x,2),I)}}function Rl(u){return Bt(function(f,g){var x=-1,O=g.length,I=O>1?g[O-1]:n,U=O>2?g[2]:n;for(I=u.length>3&&typeof I=="function"?(O--,I):n,U&&qr(g[0],g[1],U)&&(I=O<3?n:I,O=1),f=_n(f);++x<O;){var W=g[x];W&&u(f,W,x,I)}return f})}function HL(u,f){return function(g,x){if(g==null)return g;if(!ti(g))return u(g,x);for(var O=g.length,I=f?O:-1,U=_n(g);(f?I--:++I<O)&&x(U[I],I,U)!==!1;);return g}}function WL(u){return function(f,g,x){for(var O=-1,I=_n(f),U=x(f),W=U.length;W--;){var te=U[u?W:++O];if(g(I[te],te,I)===!1)break}return f}}function s$e(u,f,g){var x=f&w,O=Wf(u);function I(){var U=this&&this!==yr&&this instanceof I?O:u;return U.apply(x?g:this,arguments)}return I}function VL(u){return function(f){f=fn(f);var g=Cl(f)?Vi(f):n,x=g?g[0]:f.charAt(0),O=g?Xa(g,1).join(""):f.slice(1);return x[u]()+O}}function Dl(u){return function(f){return Vw(HF(ZF(f).replace(JCe,"")),u,"")}}function Wf(u){return function(){var f=arguments;switch(f.length){case 0:return new u;case 1:return new u(f[0]);case 2:return new u(f[0],f[1]);case 3:return new u(f[0],f[1],f[2]);case 4:return new u(f[0],f[1],f[2],f[3]);case 5:return new u(f[0],f[1],f[2],f[3],f[4]);case 6:return new u(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new u(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var g=Pl(u.prototype),x=u.apply(g,f);return Dn(x)?x:g}}function u$e(u,f,g){var x=Wf(u);function O(){for(var I=arguments.length,U=le(I),W=I,te=Nl(O);W--;)U[W]=arguments[W];var _e=I<3&&U[0]!==te&&U[I-1]!==te?[]:Va(U,te);if(I-=_e.length,I<g)return XL(u,f,By,O.placeholder,n,U,_e,n,n,g-I);var we=this&&this!==yr&&this instanceof O?x:u;return di(we,this,U)}return O}function KL(u){return function(f,g,x){var O=_n(f);if(!ti(f)){var I=bt(g,3);f=ur(f),g=function(W){return I(O[W],W,O)}}var U=u(f,g,x);return U>-1?O[I?f[U]:U]:n}}function GL(u){return aa(function(f){var g=f.length,x=g,O=Oi.prototype.thru;for(u&&f.reverse();x--;){var I=f[x];if(typeof I!="function")throw new Ci(a);if(O&&!U&&Wy(I)=="wrapper")var U=new Oi([],!0)}for(x=U?x:g;++x<g;){I=f[x];var W=Wy(I),te=W=="wrapper"?Ox(I):n;te&&Ix(te[0])&&te[1]==(j|S|E|L)&&!te[4].length&&te[9]==1?U=U[Wy(te[0])].apply(U,te[3]):U=I.length==1&&Ix(I)?U[W]():U.thru(I)}return function(){var _e=arguments,we=_e[0];if(U&&_e.length==1&&Rt(we))return U.plant(we).value();for(var Ee=0,Ve=g?f[Ee].apply(this,_e):we;++Ee<g;)Ve=f[Ee].call(this,Ve);return Ve}})}function By(u,f,g,x,O,I,U,W,te,_e){var we=f&j,Ee=f&w,Ve=f&_,at=f&(S|A),wt=f&F,Ut=Ve?n:Wf(u);function xt(){for(var Wt=arguments.length,Qt=le(Wt),yi=Wt;yi--;)Qt[yi]=arguments[yi];if(at)var Ur=Nl(xt),gi=_Oe(Qt,Ur);if(x&&(Qt=zL(Qt,x,O,at)),I&&(Qt=ZL(Qt,I,U,at)),Wt-=gi,at&&Wt<_e){var Un=Va(Qt,Ur);return XL(u,f,By,xt.placeholder,g,Qt,Un,W,te,_e-Wt)}var Yi=Ee?g:this,ca=Ve?Yi[u]:u;return Wt=Qt.length,W?Qt=T$e(Qt,W):wt&&Wt>1&&Qt.reverse(),we&&te<Wt&&(Qt.length=te),this&&this!==yr&&this instanceof xt&&(ca=Ut||Wf(ca)),ca.apply(Yi,Qt)}return xt}function YL(u,f){return function(g,x){return MTe(g,u,f(x),{})}}function zy(u,f){return function(g,x){var O;if(g===n&&x===n)return f;if(g!==n&&(O=g),x!==n){if(O===n)return x;typeof g=="string"||typeof x=="string"?(g=hi(g),x=hi(x)):(g=NL(g),x=NL(x)),O=u(g,x)}return O}}function Sx(u){return aa(function(f){return f=kn(f,pi(bt())),Bt(function(g){var x=this;return u(f,function(O){return di(O,x,g)})})})}function Zy(u,f){f=f===n?" ":hi(f);var g=f.length;if(g<2)return g?yx(f,u):f;var x=yx(f,ky(u/Ol(f)));return Cl(f)?Xa(Vi(x),0,u).join(""):x.slice(0,u)}function l$e(u,f,g,x){var O=f&w,I=Wf(u);function U(){for(var W=-1,te=arguments.length,_e=-1,we=x.length,Ee=le(we+te),Ve=this&&this!==yr&&this instanceof U?I:u;++_e<we;)Ee[_e]=x[_e];for(;te--;)Ee[_e++]=arguments[++W];return di(Ve,O?g:this,Ee)}return U}function JL(u){return function(f,g,x){return x&&typeof x!="number"&&qr(f,g,x)&&(g=x=n),f=la(f),g===n?(g=f,f=0):g=la(g),x=x===n?f<g?1:-1:la(x),KTe(f,g,x,u)}}function Hy(u){return function(f,g){return typeof f=="string"&&typeof g=="string"||(f=Ii(f),g=Ii(g)),u(f,g)}}function XL(u,f,g,x,O,I,U,W,te,_e){var we=f&S,Ee=we?U:n,Ve=we?n:U,at=we?I:n,wt=we?n:I;f|=we?E:T,f&=~(we?T:E),f&b||(f&=~(w|_));var Ut=[u,f,O,at,Ee,wt,Ve,W,te,_e],xt=g.apply(n,Ut);return Ix(u)&&cF(xt,Ut),xt.placeholder=x,fF(xt,u,f)}function Ex(u){var f=tr[u];return function(g,x){if(g=Ii(g),x=x==null?0:kr(Mt(x),292),x&&fL(g)){var O=(fn(g)+"e").split("e"),I=f(O[0]+"e"+(+O[1]+x));return O=(fn(I)+"e").split("e"),+(O[0]+"e"+(+O[1]-x))}return f(g)}}var c$e=kl&&1/_y(new kl([,-0]))[1]==Y?function(u){return new kl(u)}:Wx;function QL(u){return function(f){var g=Ir(f);return g==Ze?ex(f):g==Ue?OOe(f):bOe(f,u(f))}}function oa(u,f,g,x,O,I,U,W){var te=f&_;if(!te&&typeof u!="function")throw new Ci(a);var _e=x?x.length:0;if(_e||(f&=~(E|T),x=O=n),U=U===n?U:nr(Mt(U),0),W=W===n?W:Mt(W),_e-=O?O.length:0,f&T){var we=x,Ee=O;x=O=n}var Ve=te?n:Ox(u),at=[u,f,g,x,O,we,Ee,I,U,W];if(Ve&&A$e(at,Ve),u=at[0],f=at[1],g=at[2],x=at[3],O=at[4],W=at[9]=at[9]===n?te?0:u.length:nr(at[9]-_e,0),!W&&f&(S|A)&&(f&=~(S|A)),!f||f==w)var wt=s$e(u,f,g);else f==S||f==A?wt=u$e(u,f,W):(f==E||f==(w|E))&&!O.length?wt=l$e(u,f,g,x):wt=By.apply(n,at);var Ut=Ve?RL:cF;return fF(Ut(wt,at),u,f)}function eF(u,f,g,x){return u===n||Gi(u,$l[g])&&!hn.call(x,g)?f:u}function tF(u,f,g,x,O,I){return Dn(u)&&Dn(f)&&(I.set(f,u),Ly(u,f,n,tF,I),I.delete(f)),u}function f$e(u){return Gf(u)?n:u}function nF(u,f,g,x,O,I){var U=g&y,W=u.length,te=f.length;if(W!=te&&!(U&&te>W))return!1;var _e=I.get(u),we=I.get(f);if(_e&&we)return _e==f&&we==u;var Ee=-1,Ve=!0,at=g&v?new Vs:n;for(I.set(u,f),I.set(f,u);++Ee<W;){var wt=u[Ee],Ut=f[Ee];if(x)var xt=U?x(Ut,wt,Ee,f,u,I):x(wt,Ut,Ee,u,f,I);if(xt!==n){if(xt)continue;Ve=!1;break}if(at){if(!Kw(f,function(Wt,Qt){if(!Nf(at,Qt)&&(wt===Wt||O(wt,Wt,g,x,I)))return at.push(Qt)})){Ve=!1;break}}else if(!(wt===Ut||O(wt,Ut,g,x,I))){Ve=!1;break}}return I.delete(u),I.delete(f),Ve}function d$e(u,f,g,x,O,I,U){switch(g){case Be:if(u.byteLength!=f.byteLength||u.byteOffset!=f.byteOffset)return!1;u=u.buffer,f=f.buffer;case xe:return!(u.byteLength!=f.byteLength||!I(new Cy(u),new Cy(f)));case rt:case Ke:case lt:return Gi(+u,+f);case Ae:return u.name==f.name&&u.message==f.message;case et:case ot:return u==f+"";case Ze:var W=ex;case Ue:var te=x&y;if(W||(W=_y),u.size!=f.size&&!te)return!1;var _e=U.get(u);if(_e)return _e==f;x|=v,U.set(u,f);var we=nF(W(u),W(f),x,O,I,U);return U.delete(u),we;case It:if(qf)return qf.call(u)==qf.call(f)}return!1}function p$e(u,f,g,x,O,I){var U=g&y,W=Ax(u),te=W.length,_e=Ax(f),we=_e.length;if(te!=we&&!U)return!1;for(var Ee=te;Ee--;){var Ve=W[Ee];if(!(U?Ve in f:hn.call(f,Ve)))return!1}var at=I.get(u),wt=I.get(f);if(at&&wt)return at==f&&wt==u;var Ut=!0;I.set(u,f),I.set(f,u);for(var xt=U;++Ee<te;){Ve=W[Ee];var Wt=u[Ve],Qt=f[Ve];if(x)var yi=U?x(Qt,Wt,Ve,f,u,I):x(Wt,Qt,Ve,u,f,I);if(!(yi===n?Wt===Qt||O(Wt,Qt,g,x,I):yi)){Ut=!1;break}xt||(xt=Ve=="constructor")}if(Ut&&!xt){var Ur=u.constructor,gi=f.constructor;Ur!=gi&&"constructor"in u&&"constructor"in f&&!(typeof Ur=="function"&&Ur instanceof Ur&&typeof gi=="function"&&gi instanceof gi)&&(Ut=!1)}return I.delete(u),I.delete(f),Ut}function aa(u){return Rx(uF(u,n,gF),u+"")}function Ax(u){return xL(u,ur,$x)}function Cx(u){return xL(u,ni,rF)}var Ox=Py?function(u){return Py.get(u)}:Wx;function Wy(u){for(var f=u.name+"",g=Il[f],x=hn.call(Il,f)?g.length:0;x--;){var O=g[x],I=O.func;if(I==null||I==u)return O.name}return f}function Nl(u){var f=hn.call($,"placeholder")?$:u;return f.placeholder}function bt(){var u=$.iteratee||Zx;return u=u===Zx?AL:u,arguments.length?u(arguments[0],arguments[1]):u}function Vy(u,f){var g=u.__data__;return w$e(f)?g[typeof f=="string"?"string":"hash"]:g.map}function Tx(u){for(var f=ur(u),g=f.length;g--;){var x=f[g],O=u[x];f[g]=[x,O,aF(O)]}return f}function Ys(u,f){var g=EOe(u,f);return EL(g)?g:n}function h$e(u){var f=hn.call(u,Hs),g=u[Hs];try{u[Hs]=n;var x=!0}catch{}var O=Ey.call(u);return x&&(f?u[Hs]=g:delete u[Hs]),O}var $x=nx?function(u){return u==null?[]:(u=_n(u),Ha(nx(u),function(f){return lL.call(u,f)}))}:Vx,rF=nx?function(u){for(var f=[];u;)Wa(f,$x(u)),u=Oy(u);return f}:Vx,Ir=Fr;(rx&&Ir(new rx(new ArrayBuffer(1)))!=Be||jf&&Ir(new jf)!=Ze||ix&&Ir(ix.resolve())!=Te||kl&&Ir(new kl)!=Ue||Lf&&Ir(new Lf)!=ie)&&(Ir=function(u){var f=Fr(u),g=f==pe?u.constructor:n,x=g?Js(g):"";if(x)switch(x){case YOe:return Be;case JOe:return Ze;case XOe:return Te;case QOe:return Ue;case eTe:return ie}return f});function m$e(u,f,g){for(var x=-1,O=g.length;++x<O;){var I=g[x],U=I.size;switch(I.type){case"drop":u+=U;break;case"dropRight":f-=U;break;case"take":f=kr(f,u+U);break;case"takeRight":u=nr(u,f-U);break}}return{start:u,end:f}}function y$e(u){var f=u.match(Sl);return f?f[1].split(Z):[]}function iF(u,f,g){f=Ja(f,u);for(var x=-1,O=f.length,I=!1;++x<O;){var U=Co(f[x]);if(!(I=u!=null&&g(u,U)))break;u=u[U]}return I||++x!=O?I:(O=u==null?0:u.length,!!O&&eg(O)&&sa(U,O)&&(Rt(u)||Xs(u)))}function g$e(u){var f=u.length,g=new u.constructor(f);return f&&typeof u[0]=="string"&&hn.call(u,"index")&&(g.index=u.index,g.input=u.input),g}function oF(u){return typeof u.constructor=="function"&&!Vf(u)?Pl(Oy(u)):{}}function v$e(u,f,g){var x=u.constructor;switch(f){case xe:return xx(u);case rt:case Ke:return new x(+u);case Be:return t$e(u,g);case ct:case pn:case rn:case Jt:case cn:case Cn:case ee:case ae:case ft:return UL(u,g);case Ze:return new x;case lt:case ot:return new x(u);case et:return n$e(u);case Ue:return new x;case It:return r$e(u)}}function b$e(u,f){var g=f.length;if(!g)return u;var x=g-1;return f[x]=(g>1?"& ":"")+f[x],f=f.join(g>2?", ":" "),u.replace(ta,`{
|
|
9
9
|
/* [wrapped with `+f+`] */
|
|
10
|
-
`)}function _$e(u){return Rt(u)||Xs(u)||!!(cL&&u&&u[cL])}function sa(u,f){var g=typeof u;return f=f??ne,!!f&&(g=="number"||g!="symbol"&&Tn.test(u))&&u>-1&&u%1==0&&u<f}function qr(u,f,g){if(!Dn(g))return!1;var x=typeof f;return(x=="number"?ti(g)&&sa(f,g.length):x=="string"&&f in g)?Gi(g[f],u):!1}function kx(u,f){if(Rt(u))return!1;var g=typeof u;return g=="number"||g=="symbol"||g=="boolean"||u==null||mi(u)?!0:_t.test(u)||!We.test(u)||f!=null&&u in _n(f)}function w$e(u){var f=typeof u;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?u!=="__proto__":u===null}function Ix(u){var f=Wy(u),g=$[f];if(typeof g!="function"||!(f in Yt.prototype))return!1;if(u===g)return!0;var x=Ox(g);return!!x&&u===x[0]}function x$e(u){return!!aL&&aL in u}var S$e=xy?ua:Kx;function Vf(u){var f=u&&u.constructor,g=typeof f=="function"&&f.prototype||$l;return u===g}function aF(u){return u===u&&!Dn(u)}function sF(u,f){return function(g){return g==null?!1:g[u]===f&&(f!==n||u in _n(g))}}function E$e(u){var f=Xy(u,function(x){return g.size===c&&g.clear(),x}),g=f.cache;return f}function A$e(u,f){var g=u[1],x=f[1],O=g|x,I=O<(w|_|N),U=x==N&&g==S||x==N&&g==L&&u[7].length<=f[8]||x==(N|L)&&f[7].length<=f[8]&&g==S;if(!(I||U))return u;x&w&&(u[2]=f[2],O|=g&w?0:b);var W=f[3];if(W){var te=u[3];u[3]=te?zL(te,W,f[4]):W,u[4]=te?Va(u[3],d):f[4]}return W=f[5],W&&(te=u[5],u[5]=te?ZL(te,W,f[6]):W,u[6]=te?Va(u[5],d):f[6]),W=f[7],W&&(u[7]=W),x&N&&(u[8]=u[8]==null?f[8]:kr(u[8],f[8])),u[9]==null&&(u[9]=f[9]),u[0]=f[0],u[1]=O,u}function C$e(u){var f=[];if(u!=null)for(var g in _n(u))f.push(g);return f}function O$e(u){return Ey.call(u)}function uF(u,f,g){return f=nr(f===n?u.length-1:f,0),function(){for(var x=arguments,O=-1,I=nr(x.length-f,0),U=le(I);++O<I;)U[O]=x[f+O];O=-1;for(var W=le(f+1);++O<f;)W[O]=x[O];return W[f]=g(U),di(u,this,W)}}function lF(u,f){return f.length<2?u:Gs(u,$i(f,0,-1))}function T$e(u,f){for(var g=u.length,x=kr(f.length,g),O=ei(u);x--;){var I=f[x];u[x]=sa(I,g)?O[I]:n}return u}function Px(u,f){if(!(f==="constructor"&&typeof u[f]=="function")&&f!="__proto__")return u[f]}var cF=dF(RL),Kf=zOe||function(u,f){return yr.setTimeout(u,f)},Rx=dF(JTe);function fF(u,f,g){var x=f+"";return Rx(u,b$e(x,$$e(y$e(x),g)))}function dF(u){var f=0,g=0;return function(){var x=VOe(),O=Q-(x-g);if(g=x,O>0){if(++f>=re)return arguments[0]}else f=0;return u.apply(n,arguments)}}function Ky(u,f){var g=-1,x=u.length,O=x-1;for(f=f===n?x:f;++g<f;){var I=mx(g,O),U=u[I];u[I]=u[g],u[g]=U}return u.length=f,u}var pF=E$e(function(u){var f=[];return u.charCodeAt(0)===46&&f.push(""),u.replace(Pt,function(g,x,O,I){f.push(O?I.replace(yt,"$1"):x||g)}),f});function Co(u){if(typeof u=="string"||mi(u))return u;var f=u+"";return f=="0"&&1/u==-Y?"-0":f}function Js(u){if(u!=null){try{return Sy.call(u)}catch{}try{return u+""}catch{}}return""}function $$e(u,f){return Ai(Ne,function(g){var x="_."+g[0];f&g[1]&&!vy(u,x)&&u.push(x)}),u.sort()}function hF(u){if(u instanceof Yt)return u.clone();var f=new Oi(u.__wrapped__,u.__chain__);return f.__actions__=ei(u.__actions__),f.__index__=u.__index__,f.__values__=u.__values__,f}function k$e(u,f,g){(g?qr(u,f,g):f===n)?f=1:f=nr(Mt(f),0);var x=u==null?0:u.length;if(!x||f<1)return[];for(var O=0,I=0,U=le(ky(x/f));O<x;)U[I++]=$i(u,O,O+=f);return U}function I$e(u){for(var f=-1,g=u==null?0:u.length,x=0,O=[];++f<g;){var I=u[f];I&&(O[x++]=I)}return O}function P$e(){var u=arguments.length;if(!u)return[];for(var f=le(u-1),g=arguments[0],x=u;x--;)f[x-1]=arguments[x];return Wa(Rt(g)?ei(g):[g],gr(f,1))}var R$e=Bt(function(u,f){return qn(u)?Bf(u,gr(f,1,qn,!0)):[]}),D$e=Bt(function(u,f){var g=ki(f);return qn(g)&&(g=n),qn(u)?Bf(u,gr(f,1,qn,!0),bt(g,2)):[]}),N$e=Bt(function(u,f){var g=ki(f);return qn(g)&&(g=n),qn(u)?Bf(u,gr(f,1,qn,!0),n,g):[]});function M$e(u,f,g){var x=u==null?0:u.length;return x?(f=g||f===n?1:Mt(f),$i(u,f<0?0:f,x)):[]}function j$e(u,f,g){var x=u==null?0:u.length;return x?(f=g||f===n?1:Mt(f),f=x-f,$i(u,0,f<0?0:f)):[]}function L$e(u,f){return u&&u.length?qy(u,bt(f,3),!0,!0):[]}function F$e(u,f){return u&&u.length?qy(u,bt(f,3),!0):[]}function q$e(u,f,g,x){var O=u==null?0:u.length;return O?(g&&typeof g!="number"&&qr(u,f,g)&&(g=0,x=O),PTe(u,f,g,x)):[]}function mF(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=g==null?0:Mt(g);return O<0&&(O=nr(x+O,0)),by(u,bt(f,3),O)}function yF(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=x-1;return g!==n&&(O=Mt(g),O=g<0?nr(x+O,0):kr(O,x-1)),by(u,bt(f,3),O,!0)}function gF(u){var f=u==null?0:u.length;return f?gr(u,1):[]}function U$e(u){var f=u==null?0:u.length;return f?gr(u,Y):[]}function B$e(u,f){var g=u==null?0:u.length;return g?(f=f===n?1:Mt(f),gr(u,f)):[]}function z$e(u){for(var f=-1,g=u==null?0:u.length,x={};++f<g;){var O=u[f];x[O[0]]=O[1]}return x}function vF(u){return u&&u.length?u[0]:n}function Z$e(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=g==null?0:Mt(g);return O<0&&(O=nr(x+O,0)),Al(u,f,O)}function H$e(u){var f=u==null?0:u.length;return f?$i(u,0,-1):[]}var W$e=Bt(function(u){var f=kn(u,_x);return f.length&&f[0]===u[0]?cx(f):[]}),V$e=Bt(function(u){var f=ki(u),g=kn(u,_x);return f===ki(g)?f=n:g.pop(),g.length&&g[0]===u[0]?cx(g,bt(f,2)):[]}),K$e=Bt(function(u){var f=ki(u),g=kn(u,_x);return f=typeof f=="function"?f:n,f&&g.pop(),g.length&&g[0]===u[0]?cx(g,n,f):[]});function G$e(u,f){return u==null?"":HOe.call(u,f)}function ki(u){var f=u==null?0:u.length;return f?u[f-1]:n}function Y$e(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=x;return g!==n&&(O=Mt(g),O=O<0?nr(x+O,0):kr(O,x-1)),f===f?$Oe(u,f,O):by(u,Xj,O,!0)}function J$e(u,f){return u&&u.length?$L(u,Mt(f)):n}var X$e=Bt(bF);function bF(u,f){return u&&u.length&&f&&f.length?hx(u,f):u}function Q$e(u,f,g){return u&&u.length&&f&&f.length?hx(u,f,bt(g,2)):u}function eke(u,f,g){return u&&u.length&&f&&f.length?hx(u,f,n,g):u}var tke=aa(function(u,f){var g=u==null?0:u.length,x=ax(u,f);return PL(u,kn(f,function(O){return sa(O,g)?+O:O}).sort(BL)),x});function nke(u,f){var g=[];if(!(u&&u.length))return g;var x=-1,O=[],I=u.length;for(f=bt(f,3);++x<I;){var U=u[x];f(U,x,u)&&(g.push(U),O.push(x))}return PL(u,O),g}function Dx(u){return u==null?u:GOe.call(u)}function rke(u,f,g){var x=u==null?0:u.length;return x?(g&&typeof g!="number"&&qr(u,f,g)?(f=0,g=x):(f=f==null?0:Mt(f),g=g===n?x:Mt(g)),$i(u,f,g)):[]}function ike(u,f){return Fy(u,f)}function oke(u,f,g){return gx(u,f,bt(g,2))}function ake(u,f){var g=u==null?0:u.length;if(g){var x=Fy(u,f);if(x<g&&Gi(u[x],f))return x}return-1}function ske(u,f){return Fy(u,f,!0)}function uke(u,f,g){return gx(u,f,bt(g,2),!0)}function lke(u,f){var g=u==null?0:u.length;if(g){var x=Fy(u,f,!0)-1;if(Gi(u[x],f))return x}return-1}function cke(u){return u&&u.length?DL(u):[]}function fke(u,f){return u&&u.length?DL(u,bt(f,2)):[]}function dke(u){var f=u==null?0:u.length;return f?$i(u,1,f):[]}function pke(u,f,g){return u&&u.length?(f=g||f===n?1:Mt(f),$i(u,0,f<0?0:f)):[]}function hke(u,f,g){var x=u==null?0:u.length;return x?(f=g||f===n?1:Mt(f),f=x-f,$i(u,f<0?0:f,x)):[]}function mke(u,f){return u&&u.length?qy(u,bt(f,3),!1,!0):[]}function yke(u,f){return u&&u.length?qy(u,bt(f,3)):[]}var gke=Bt(function(u){return Ya(gr(u,1,qn,!0))}),vke=Bt(function(u){var f=ki(u);return qn(f)&&(f=n),Ya(gr(u,1,qn,!0),bt(f,2))}),bke=Bt(function(u){var f=ki(u);return f=typeof f=="function"?f:n,Ya(gr(u,1,qn,!0),n,f)});function _ke(u){return u&&u.length?Ya(u):[]}function wke(u,f){return u&&u.length?Ya(u,bt(f,2)):[]}function xke(u,f){return f=typeof f=="function"?f:n,u&&u.length?Ya(u,n,f):[]}function Nx(u){if(!(u&&u.length))return[];var f=0;return u=Ha(u,function(g){if(qn(g))return f=nr(g.length,f),!0}),Xw(f,function(g){return kn(u,Gw(g))})}function _F(u,f){if(!(u&&u.length))return[];var g=Nx(u);return f==null?g:kn(g,function(x){return di(f,n,x)})}var Ske=Bt(function(u,f){return qn(u)?Bf(u,f):[]}),Eke=Bt(function(u){return bx(Ha(u,qn))}),Ake=Bt(function(u){var f=ki(u);return qn(f)&&(f=n),bx(Ha(u,qn),bt(f,2))}),Cke=Bt(function(u){var f=ki(u);return f=typeof f=="function"?f:n,bx(Ha(u,qn),n,f)}),Oke=Bt(Nx);function Tke(u,f){return LL(u||[],f||[],Uf)}function $ke(u,f){return LL(u||[],f||[],Hf)}var kke=Bt(function(u){var f=u.length,g=f>1?u[f-1]:n;return g=typeof g=="function"?(u.pop(),g):n,_F(u,g)});function wF(u){var f=$(u);return f.__chain__=!0,f}function Ike(u,f){return f(u),u}function Gy(u,f){return f(u)}var Pke=aa(function(u){var f=u.length,g=f?u[0]:0,x=this.__wrapped__,O=function(I){return ax(I,u)};return f>1||this.__actions__.length||!(x instanceof Yt)||!sa(g)?this.thru(O):(x=x.slice(g,+g+(f?1:0)),x.__actions__.push({func:Gy,args:[O],thisArg:n}),new Oi(x,this.__chain__).thru(function(I){return f&&!I.length&&I.push(n),I}))});function Rke(){return wF(this)}function Dke(){return new Oi(this.value(),this.__chain__)}function Nke(){this.__values__===n&&(this.__values__=NF(this.value()));var u=this.__index__>=this.__values__.length,f=u?n:this.__values__[this.__index__++];return{done:u,value:f}}function Mke(){return this}function jke(u){for(var f,g=this;g instanceof Dy;){var x=hF(g);x.__index__=0,x.__values__=n,f?O.__wrapped__=x:f=x;var O=x;g=g.__wrapped__}return O.__wrapped__=u,f}function Lke(){var u=this.__wrapped__;if(u instanceof Yt){var f=u;return this.__actions__.length&&(f=new Yt(this)),f=f.reverse(),f.__actions__.push({func:Gy,args:[Dx],thisArg:n}),new Oi(f,this.__chain__)}return this.thru(Dx)}function Fke(){return jL(this.__wrapped__,this.__actions__)}var qke=Uy(function(u,f,g){hn.call(u,g)?++u[g]:ia(u,g,1)});function Uke(u,f,g){var x=Rt(u)?Yj:ITe;return g&&qr(u,f,g)&&(f=n),x(u,bt(f,3))}function Bke(u,f){var g=Rt(u)?Ha:_L;return g(u,bt(f,3))}var zke=KL(mF),Zke=KL(yF);function Hke(u,f){return gr(Yy(u,f),1)}function Wke(u,f){return gr(Yy(u,f),Y)}function Vke(u,f,g){return g=g===n?1:Mt(g),gr(Yy(u,f),g)}function xF(u,f){var g=Rt(u)?Ai:Ga;return g(u,bt(f,3))}function SF(u,f){var g=Rt(u)?dOe:bL;return g(u,bt(f,3))}var Kke=Uy(function(u,f,g){hn.call(u,g)?u[g].push(f):ia(u,g,[f])});function Gke(u,f,g,x){u=ti(u)?u:jl(u),g=g&&!x?Mt(g):0;var O=u.length;return g<0&&(g=nr(O+g,0)),tg(u)?g<=O&&u.indexOf(f,g)>-1:!!O&&Al(u,f,g)>-1}var Yke=Bt(function(u,f,g){var x=-1,O=typeof f=="function",I=ti(u)?le(u.length):[];return Ga(u,function(U){I[++x]=O?di(f,U,g):zf(U,f,g)}),I}),Jke=Uy(function(u,f,g){ia(u,g,f)});function Yy(u,f){var g=Rt(u)?kn:CL;return g(u,bt(f,3))}function Xke(u,f,g,x){return u==null?[]:(Rt(f)||(f=f==null?[]:[f]),g=x?n:g,Rt(g)||(g=g==null?[]:[g]),kL(u,f,g))}var Qke=Uy(function(u,f,g){u[g?0:1].push(f)},function(){return[[],[]]});function eIe(u,f,g){var x=Rt(u)?Vw:eL,O=arguments.length<3;return x(u,bt(f,4),g,O,Ga)}function tIe(u,f,g){var x=Rt(u)?pOe:eL,O=arguments.length<3;return x(u,bt(f,4),g,O,bL)}function nIe(u,f){var g=Rt(u)?Ha:_L;return g(u,Qy(bt(f,3)))}function rIe(u){var f=Rt(u)?mL:GTe;return f(u)}function iIe(u,f,g){(g?qr(u,f,g):f===n)?f=1:f=Mt(f);var x=Rt(u)?CTe:YTe;return x(u,f)}function oIe(u){var f=Rt(u)?OTe:XTe;return f(u)}function aIe(u){if(u==null)return 0;if(ti(u))return tg(u)?Ol(u):u.length;var f=Ir(u);return f==Ze||f==Ue?u.size:dx(u).length}function sIe(u,f,g){var x=Rt(u)?Kw:QTe;return g&&qr(u,f,g)&&(f=n),x(u,bt(f,3))}var uIe=Bt(function(u,f){if(u==null)return[];var g=f.length;return g>1&&qr(u,f[0],f[1])?f=[]:g>2&&qr(f[0],f[1],f[2])&&(f=[f[0]]),kL(u,gr(f,1),[])}),Jy=BOe||function(){return yr.Date.now()};function lIe(u,f){if(typeof f!="function")throw new Ci(a);return u=Mt(u),function(){if(--u<1)return f.apply(this,arguments)}}function EF(u,f,g){return f=g?n:f,f=u&&f==null?u.length:f,oa(u,N,n,n,n,n,f)}function AF(u,f){var g;if(typeof f!="function")throw new Ci(a);return u=Mt(u),function(){return--u>0&&(g=f.apply(this,arguments)),u<=1&&(f=n),g}}var Mx=Bt(function(u,f,g){var x=w;if(g.length){var O=Va(g,Nl(Mx));x|=E}return oa(u,x,f,g,O)}),CF=Bt(function(u,f,g){var x=w|_;if(g.length){var O=Va(g,Nl(CF));x|=E}return oa(f,x,u,g,O)});function OF(u,f,g){f=g?n:f;var x=oa(u,S,n,n,n,n,n,f);return x.placeholder=OF.placeholder,x}function TF(u,f,g){f=g?n:f;var x=oa(u,A,n,n,n,n,n,f);return x.placeholder=TF.placeholder,x}function $F(u,f,g){var x,O,I,U,W,te,_e=0,we=!1,Ee=!1,Ve=!0;if(typeof u!="function")throw new Ci(a);f=Ii(f)||0,Dn(g)&&(we=!!g.leading,Ee="maxWait"in g,I=Ee?nr(Ii(g.maxWait)||0,f):I,Ve="trailing"in g?!!g.trailing:Ve);function at(Un){var Yi=x,ca=O;return x=O=n,_e=Un,U=u.apply(ca,Yi),U}function wt(Un){return _e=Un,W=Kf(Wt,f),we?at(Un):U}function Ut(Un){var Yi=Un-te,ca=Un-_e,KF=f-Yi;return Ee?kr(KF,I-ca):KF}function xt(Un){var Yi=Un-te,ca=Un-_e;return te===n||Yi>=f||Yi<0||Ee&&ca>=I}function Wt(){var Un=Jy();if(xt(Un))return Qt(Un);W=Kf(Wt,Ut(Un))}function Qt(Un){return W=n,Ve&&x?at(Un):(x=O=n,U)}function yi(){W!==n&&FL(W),_e=0,x=te=O=W=n}function Ur(){return W===n?U:Qt(Jy())}function gi(){var Un=Jy(),Yi=xt(Un);if(x=arguments,O=this,te=Un,Yi){if(W===n)return wt(te);if(Ee)return FL(W),W=Kf(Wt,f),at(te)}return W===n&&(W=Kf(Wt,f)),U}return gi.cancel=yi,gi.flush=Ur,gi}var cIe=Bt(function(u,f){return vL(u,1,f)}),fIe=Bt(function(u,f,g){return vL(u,Ii(f)||0,g)});function dIe(u){return oa(u,F)}function Xy(u,f){if(typeof u!="function"||f!=null&&typeof f!="function")throw new Ci(a);var g=function(){var x=arguments,O=f?f.apply(this,x):x[0],I=g.cache;if(I.has(O))return I.get(O);var U=u.apply(this,x);return g.cache=I.set(O,U)||I,U};return g.cache=new(Xy.Cache||ra),g}Xy.Cache=ra;function Qy(u){if(typeof u!="function")throw new Ci(a);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}function pIe(u){return AF(2,u)}var hIe=e$e(function(u,f){f=f.length==1&&Rt(f[0])?kn(f[0],pi(bt())):kn(gr(f,1),pi(bt()));var g=f.length;return Bt(function(x){for(var O=-1,I=kr(x.length,g);++O<I;)x[O]=f[O].call(this,x[O]);return di(u,this,x)})}),jx=Bt(function(u,f){var g=Va(f,Nl(jx));return oa(u,E,n,f,g)}),kF=Bt(function(u,f){var g=Va(f,Nl(kF));return oa(u,T,n,f,g)}),mIe=aa(function(u,f){return oa(u,L,n,n,n,f)});function yIe(u,f){if(typeof u!="function")throw new Ci(a);return f=f===n?f:Mt(f),Bt(u,f)}function gIe(u,f){if(typeof u!="function")throw new Ci(a);return f=f==null?0:nr(Mt(f),0),Bt(function(g){var x=g[f],O=Xa(g,0,f);return x&&Wa(O,x),di(u,this,O)})}function vIe(u,f,g){var x=!0,O=!0;if(typeof u!="function")throw new Ci(a);return Dn(g)&&(x="leading"in g?!!g.leading:x,O="trailing"in g?!!g.trailing:O),$F(u,f,{leading:x,maxWait:f,trailing:O})}function bIe(u){return EF(u,1)}function _Ie(u,f){return jx(wx(f),u)}function wIe(){if(!arguments.length)return[];var u=arguments[0];return Rt(u)?u:[u]}function xIe(u){return Ti(u,h)}function SIe(u,f){return f=typeof f=="function"?f:n,Ti(u,h,f)}function EIe(u){return Ti(u,p|h)}function AIe(u,f){return f=typeof f=="function"?f:n,Ti(u,p|h,f)}function CIe(u,f){return f==null||gL(u,f,ur(f))}function Gi(u,f){return u===f||u!==u&&f!==f}var OIe=Hy(lx),TIe=Hy(function(u,f){return u>=f}),Xs=SL(function(){return arguments}())?SL:function(u){return Ln(u)&&hn.call(u,"callee")&&!lL.call(u,"callee")},Rt=le.isArray,$Ie=Zj?pi(Zj):jTe;function ti(u){return u!=null&&eg(u.length)&&!ua(u)}function qn(u){return Ln(u)&&ti(u)}function kIe(u){return u===!0||u===!1||Ln(u)&&Fr(u)==rt}var Qa=ZOe||Kx,IIe=Hj?pi(Hj):LTe;function PIe(u){return Ln(u)&&u.nodeType===1&&!Gf(u)}function RIe(u){if(u==null)return!0;if(ti(u)&&(Rt(u)||typeof u=="string"||typeof u.splice=="function"||Qa(u)||Ml(u)||Xs(u)))return!u.length;var f=Ir(u);if(f==Ze||f==Ue)return!u.size;if(Vf(u))return!dx(u).length;for(var g in u)if(hn.call(u,g))return!1;return!0}function DIe(u,f){return Zf(u,f)}function NIe(u,f,g){g=typeof g=="function"?g:n;var x=g?g(u,f):n;return x===n?Zf(u,f,n,g):!!x}function Lx(u){if(!Ln(u))return!1;var f=Fr(u);return f==Ae||f==Pe||typeof u.message=="string"&&typeof u.name=="string"&&!Gf(u)}function MIe(u){return typeof u=="number"&&fL(u)}function ua(u){if(!Dn(u))return!1;var f=Fr(u);return f==Fe||f==$e||f==Je||f==Se}function IF(u){return typeof u=="number"&&u==Mt(u)}function eg(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=ne}function Dn(u){var f=typeof u;return u!=null&&(f=="object"||f=="function")}function Ln(u){return u!=null&&typeof u=="object"}var PF=Wj?pi(Wj):qTe;function jIe(u,f){return u===f||fx(u,f,Tx(f))}function LIe(u,f,g){return g=typeof g=="function"?g:n,fx(u,f,Tx(f),g)}function FIe(u){return RF(u)&&u!=+u}function qIe(u){if(S$e(u))throw new kt(o);return EL(u)}function UIe(u){return u===null}function BIe(u){return u==null}function RF(u){return typeof u=="number"||Ln(u)&&Fr(u)==lt}function Gf(u){if(!Ln(u)||Fr(u)!=pe)return!1;var f=Oy(u);if(f===null)return!0;var g=hn.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&Sy.call(g)==LOe}var Fx=Vj?pi(Vj):UTe;function zIe(u){return IF(u)&&u>=-ne&&u<=ne}var DF=Kj?pi(Kj):BTe;function tg(u){return typeof u=="string"||!Rt(u)&&Ln(u)&&Fr(u)==ot}function mi(u){return typeof u=="symbol"||Ln(u)&&Fr(u)==It}var Ml=Gj?pi(Gj):zTe;function ZIe(u){return u===n}function HIe(u){return Ln(u)&&Ir(u)==ie}function WIe(u){return Ln(u)&&Fr(u)==ge}var VIe=Hy(px),KIe=Hy(function(u,f){return u<=f});function NF(u){if(!u)return[];if(ti(u))return tg(u)?Vi(u):ei(u);if(Mf&&u[Mf])return COe(u[Mf]());var f=Ir(u),g=f==Ze?ex:f==Ue?_y:jl;return g(u)}function la(u){if(!u)return u===0?u:0;if(u=Ii(u),u===Y||u===-Y){var f=u<0?-1:1;return f*ce}return u===u?u:0}function Mt(u){var f=la(u),g=f%1;return f===f?g?f-g:f:0}function MF(u){return u?Ks(Mt(u),0,ue):0}function Ii(u){if(typeof u=="number")return u;if(mi(u))return P;if(Dn(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=Dn(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=tL(u);var g=Tt.test(u);return g||On.test(u)?lOe(u.slice(2),g?2:8):qt.test(u)?P:+u}function jF(u){return Ao(u,ni(u))}function GIe(u){return u?Ks(Mt(u),-ne,ne):u===0?u:0}function fn(u){return u==null?"":hi(u)}var YIe=Rl(function(u,f){if(Vf(f)||ti(f)){Ao(f,ur(f),u);return}for(var g in f)hn.call(f,g)&&Uf(u,g,f[g])}),LF=Rl(function(u,f){Ao(f,ni(f),u)}),ng=Rl(function(u,f,g,x){Ao(f,ni(f),u,x)}),JIe=Rl(function(u,f,g,x){Ao(f,ur(f),u,x)}),XIe=aa(ax);function QIe(u,f){var g=Pl(u);return f==null?g:yL(g,f)}var ePe=Bt(function(u,f){u=_n(u);var g=-1,x=f.length,O=x>2?f[2]:n;for(O&&qr(f[0],f[1],O)&&(x=1);++g<x;)for(var I=f[g],U=ni(I),W=-1,te=U.length;++W<te;){var _e=U[W],we=u[_e];(we===n||Gi(we,$l[_e])&&!hn.call(u,_e))&&(u[_e]=I[_e])}return u}),tPe=Bt(function(u){return u.push(n,tF),di(FF,n,u)});function nPe(u,f){return Jj(u,bt(f,3),Eo)}function rPe(u,f){return Jj(u,bt(f,3),ux)}function iPe(u,f){return u==null?u:sx(u,bt(f,3),ni)}function oPe(u,f){return u==null?u:wL(u,bt(f,3),ni)}function aPe(u,f){return u&&Eo(u,bt(f,3))}function sPe(u,f){return u&&ux(u,bt(f,3))}function uPe(u){return u==null?[]:jy(u,ur(u))}function lPe(u){return u==null?[]:jy(u,ni(u))}function qx(u,f,g){var x=u==null?n:Gs(u,f);return x===n?g:x}function cPe(u,f){return u!=null&&iF(u,f,RTe)}function Ux(u,f){return u!=null&&iF(u,f,DTe)}var fPe=YL(function(u,f,g){f!=null&&typeof f.toString!="function"&&(f=Ey.call(f)),u[f]=g},zx(ri)),dPe=YL(function(u,f,g){f!=null&&typeof f.toString!="function"&&(f=Ey.call(f)),hn.call(u,f)?u[f].push(g):u[f]=[g]},bt),pPe=Bt(zf);function ur(u){return ti(u)?hL(u):dx(u)}function ni(u){return ti(u)?hL(u,!0):ZTe(u)}function hPe(u,f){var g={};return f=bt(f,3),Eo(u,function(x,O,I){ia(g,f(x,O,I),x)}),g}function mPe(u,f){var g={};return f=bt(f,3),Eo(u,function(x,O,I){ia(g,O,f(x,O,I))}),g}var yPe=Rl(function(u,f,g){Ly(u,f,g)}),FF=Rl(function(u,f,g,x){Ly(u,f,g,x)}),gPe=aa(function(u,f){var g={};if(u==null)return g;var x=!1;f=kn(f,function(I){return I=Ja(I,u),x||(x=I.length>1),I}),Ao(u,Cx(u),g),x&&(g=Ti(g,p|m|h,f$e));for(var O=f.length;O--;)vx(g,f[O]);return g});function vPe(u,f){return qF(u,Qy(bt(f)))}var bPe=aa(function(u,f){return u==null?{}:WTe(u,f)});function qF(u,f){if(u==null)return{};var g=kn(Cx(u),function(x){return[x]});return f=bt(f),IL(u,g,function(x,O){return f(x,O[0])})}function _Pe(u,f,g){f=Ja(f,u);var x=-1,O=f.length;for(O||(O=1,u=n);++x<O;){var I=u==null?n:u[Co(f[x])];I===n&&(x=O,I=g),u=ua(I)?I.call(u):I}return u}function wPe(u,f,g){return u==null?u:Hf(u,f,g)}function xPe(u,f,g,x){return x=typeof x=="function"?x:n,u==null?u:Hf(u,f,g,x)}var UF=QL(ur),BF=QL(ni);function SPe(u,f,g){var x=Rt(u),O=x||Qa(u)||Ml(u);if(f=bt(f,4),g==null){var I=u&&u.constructor;O?g=x?new I:[]:Dn(u)?g=ua(I)?Pl(Oy(u)):{}:g={}}return(O?Ai:Eo)(u,function(U,W,te){return f(g,U,W,te)}),g}function EPe(u,f){return u==null?!0:vx(u,f)}function APe(u,f,g){return u==null?u:ML(u,f,wx(g))}function CPe(u,f,g,x){return x=typeof x=="function"?x:n,u==null?u:ML(u,f,wx(g),x)}function jl(u){return u==null?[]:Qw(u,ur(u))}function OPe(u){return u==null?[]:Qw(u,ni(u))}function TPe(u,f,g){return g===n&&(g=f,f=n),g!==n&&(g=Ii(g),g=g===g?g:0),f!==n&&(f=Ii(f),f=f===f?f:0),Ks(Ii(u),f,g)}function $Pe(u,f,g){return f=la(f),g===n?(g=f,f=0):g=la(g),u=Ii(u),NTe(u,f,g)}function kPe(u,f,g){if(g&&typeof g!="boolean"&&qr(u,f,g)&&(f=g=n),g===n&&(typeof f=="boolean"?(g=f,f=n):typeof u=="boolean"&&(g=u,u=n)),u===n&&f===n?(u=0,f=1):(u=la(u),f===n?(f=u,u=0):f=la(f)),u>f){var x=u;u=f,f=x}if(g||u%1||f%1){var O=dL();return kr(u+O*(f-u+uOe("1e-"+((O+"").length-1))),f)}return mx(u,f)}var IPe=Dl(function(u,f,g){return f=f.toLowerCase(),u+(g?zF(f):f)});function zF(u){return Bx(fn(u).toLowerCase())}function ZF(u){return u=fn(u),u&&u.replace(Xr,wOe).replace(XCe,"")}function PPe(u,f,g){u=fn(u),f=hi(f);var x=u.length;g=g===n?x:Ks(Mt(g),0,x);var O=g;return g-=f.length,g>=0&&u.slice(g,O)==f}function RPe(u){return u=fn(u),u&&je.test(u)?u.replace(sr,xOe):u}function DPe(u){return u=fn(u),u&&bn.test(u)?u.replace(Xt,"\\$&"):u}var NPe=Dl(function(u,f,g){return u+(g?"-":"")+f.toLowerCase()}),MPe=Dl(function(u,f,g){return u+(g?" ":"")+f.toLowerCase()}),jPe=VL("toLowerCase");function LPe(u,f,g){u=fn(u),f=Mt(f);var x=f?Ol(u):0;if(!f||x>=f)return u;var O=(f-x)/2;return Zy(Iy(O),g)+u+Zy(ky(O),g)}function FPe(u,f,g){u=fn(u),f=Mt(f);var x=f?Ol(u):0;return f&&x<f?u+Zy(f-x,g):u}function qPe(u,f,g){u=fn(u),f=Mt(f);var x=f?Ol(u):0;return f&&x<f?Zy(f-x,g)+u:u}function UPe(u,f,g){return g||f==null?f=0:f&&(f=+f),KOe(fn(u).replace(Rn,""),f||0)}function BPe(u,f,g){return(g?qr(u,f,g):f===n)?f=1:f=Mt(f),yx(fn(u),f)}function zPe(){var u=arguments,f=fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])}var ZPe=Dl(function(u,f,g){return u+(g?"_":"")+f.toLowerCase()});function HPe(u,f,g){return g&&typeof g!="number"&&qr(u,f,g)&&(f=g=n),g=g===n?ue:g>>>0,g?(u=fn(u),u&&(typeof f=="string"||f!=null&&!Fx(f))&&(f=hi(f),!f&&Cl(u))?Xa(Vi(u),0,g):u.split(f,g)):[]}var WPe=Dl(function(u,f,g){return u+(g?" ":"")+Bx(f)});function VPe(u,f,g){return u=fn(u),g=g==null?0:Ks(Mt(g),0,u.length),f=hi(f),u.slice(g,g+f.length)==f}function KPe(u,f,g){var x=$.templateSettings;g&&qr(u,f,g)&&(f=n),u=fn(u),f=ng({},f,x,eF);var O=ng({},f.imports,x.imports,eF),I=ur(O),U=Qw(O,I),W,te,_e=0,we=f.interpolate||Wi,Ee="__p += '",Ve=tx((f.escape||Wi).source+"|"+we.source+"|"+(we===Re?Gt:Wi).source+"|"+(f.evaluate||Wi).source+"|$","g"),at="//# sourceURL="+(hn.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rOe+"]")+`
|
|
10
|
+
`)}function _$e(u){return Rt(u)||Xs(u)||!!(cL&&u&&u[cL])}function sa(u,f){var g=typeof u;return f=f??ne,!!f&&(g=="number"||g!="symbol"&&Tn.test(u))&&u>-1&&u%1==0&&u<f}function qr(u,f,g){if(!Dn(g))return!1;var x=typeof f;return(x=="number"?ti(g)&&sa(f,g.length):x=="string"&&f in g)?Gi(g[f],u):!1}function kx(u,f){if(Rt(u))return!1;var g=typeof u;return g=="number"||g=="symbol"||g=="boolean"||u==null||mi(u)?!0:_t.test(u)||!We.test(u)||f!=null&&u in _n(f)}function w$e(u){var f=typeof u;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?u!=="__proto__":u===null}function Ix(u){var f=Wy(u),g=$[f];if(typeof g!="function"||!(f in Yt.prototype))return!1;if(u===g)return!0;var x=Ox(g);return!!x&&u===x[0]}function x$e(u){return!!aL&&aL in u}var S$e=xy?ua:Kx;function Vf(u){var f=u&&u.constructor,g=typeof f=="function"&&f.prototype||$l;return u===g}function aF(u){return u===u&&!Dn(u)}function sF(u,f){return function(g){return g==null?!1:g[u]===f&&(f!==n||u in _n(g))}}function E$e(u){var f=Xy(u,function(x){return g.size===c&&g.clear(),x}),g=f.cache;return f}function A$e(u,f){var g=u[1],x=f[1],O=g|x,I=O<(w|_|j),U=x==j&&g==S||x==j&&g==L&&u[7].length<=f[8]||x==(j|L)&&f[7].length<=f[8]&&g==S;if(!(I||U))return u;x&w&&(u[2]=f[2],O|=g&w?0:b);var W=f[3];if(W){var te=u[3];u[3]=te?zL(te,W,f[4]):W,u[4]=te?Va(u[3],d):f[4]}return W=f[5],W&&(te=u[5],u[5]=te?ZL(te,W,f[6]):W,u[6]=te?Va(u[5],d):f[6]),W=f[7],W&&(u[7]=W),x&j&&(u[8]=u[8]==null?f[8]:kr(u[8],f[8])),u[9]==null&&(u[9]=f[9]),u[0]=f[0],u[1]=O,u}function C$e(u){var f=[];if(u!=null)for(var g in _n(u))f.push(g);return f}function O$e(u){return Ey.call(u)}function uF(u,f,g){return f=nr(f===n?u.length-1:f,0),function(){for(var x=arguments,O=-1,I=nr(x.length-f,0),U=le(I);++O<I;)U[O]=x[f+O];O=-1;for(var W=le(f+1);++O<f;)W[O]=x[O];return W[f]=g(U),di(u,this,W)}}function lF(u,f){return f.length<2?u:Gs(u,$i(f,0,-1))}function T$e(u,f){for(var g=u.length,x=kr(f.length,g),O=ei(u);x--;){var I=f[x];u[x]=sa(I,g)?O[I]:n}return u}function Px(u,f){if(!(f==="constructor"&&typeof u[f]=="function")&&f!="__proto__")return u[f]}var cF=dF(RL),Kf=zOe||function(u,f){return yr.setTimeout(u,f)},Rx=dF(JTe);function fF(u,f,g){var x=f+"";return Rx(u,b$e(x,$$e(y$e(x),g)))}function dF(u){var f=0,g=0;return function(){var x=VOe(),O=Q-(x-g);if(g=x,O>0){if(++f>=re)return arguments[0]}else f=0;return u.apply(n,arguments)}}function Ky(u,f){var g=-1,x=u.length,O=x-1;for(f=f===n?x:f;++g<f;){var I=mx(g,O),U=u[I];u[I]=u[g],u[g]=U}return u.length=f,u}var pF=E$e(function(u){var f=[];return u.charCodeAt(0)===46&&f.push(""),u.replace(Pt,function(g,x,O,I){f.push(O?I.replace(yt,"$1"):x||g)}),f});function Co(u){if(typeof u=="string"||mi(u))return u;var f=u+"";return f=="0"&&1/u==-Y?"-0":f}function Js(u){if(u!=null){try{return Sy.call(u)}catch{}try{return u+""}catch{}}return""}function $$e(u,f){return Ai(Ne,function(g){var x="_."+g[0];f&g[1]&&!vy(u,x)&&u.push(x)}),u.sort()}function hF(u){if(u instanceof Yt)return u.clone();var f=new Oi(u.__wrapped__,u.__chain__);return f.__actions__=ei(u.__actions__),f.__index__=u.__index__,f.__values__=u.__values__,f}function k$e(u,f,g){(g?qr(u,f,g):f===n)?f=1:f=nr(Mt(f),0);var x=u==null?0:u.length;if(!x||f<1)return[];for(var O=0,I=0,U=le(ky(x/f));O<x;)U[I++]=$i(u,O,O+=f);return U}function I$e(u){for(var f=-1,g=u==null?0:u.length,x=0,O=[];++f<g;){var I=u[f];I&&(O[x++]=I)}return O}function P$e(){var u=arguments.length;if(!u)return[];for(var f=le(u-1),g=arguments[0],x=u;x--;)f[x-1]=arguments[x];return Wa(Rt(g)?ei(g):[g],gr(f,1))}var R$e=Bt(function(u,f){return qn(u)?Bf(u,gr(f,1,qn,!0)):[]}),D$e=Bt(function(u,f){var g=ki(f);return qn(g)&&(g=n),qn(u)?Bf(u,gr(f,1,qn,!0),bt(g,2)):[]}),N$e=Bt(function(u,f){var g=ki(f);return qn(g)&&(g=n),qn(u)?Bf(u,gr(f,1,qn,!0),n,g):[]});function M$e(u,f,g){var x=u==null?0:u.length;return x?(f=g||f===n?1:Mt(f),$i(u,f<0?0:f,x)):[]}function j$e(u,f,g){var x=u==null?0:u.length;return x?(f=g||f===n?1:Mt(f),f=x-f,$i(u,0,f<0?0:f)):[]}function L$e(u,f){return u&&u.length?qy(u,bt(f,3),!0,!0):[]}function F$e(u,f){return u&&u.length?qy(u,bt(f,3),!0):[]}function q$e(u,f,g,x){var O=u==null?0:u.length;return O?(g&&typeof g!="number"&&qr(u,f,g)&&(g=0,x=O),PTe(u,f,g,x)):[]}function mF(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=g==null?0:Mt(g);return O<0&&(O=nr(x+O,0)),by(u,bt(f,3),O)}function yF(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=x-1;return g!==n&&(O=Mt(g),O=g<0?nr(x+O,0):kr(O,x-1)),by(u,bt(f,3),O,!0)}function gF(u){var f=u==null?0:u.length;return f?gr(u,1):[]}function U$e(u){var f=u==null?0:u.length;return f?gr(u,Y):[]}function B$e(u,f){var g=u==null?0:u.length;return g?(f=f===n?1:Mt(f),gr(u,f)):[]}function z$e(u){for(var f=-1,g=u==null?0:u.length,x={};++f<g;){var O=u[f];x[O[0]]=O[1]}return x}function vF(u){return u&&u.length?u[0]:n}function Z$e(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=g==null?0:Mt(g);return O<0&&(O=nr(x+O,0)),Al(u,f,O)}function H$e(u){var f=u==null?0:u.length;return f?$i(u,0,-1):[]}var W$e=Bt(function(u){var f=kn(u,_x);return f.length&&f[0]===u[0]?cx(f):[]}),V$e=Bt(function(u){var f=ki(u),g=kn(u,_x);return f===ki(g)?f=n:g.pop(),g.length&&g[0]===u[0]?cx(g,bt(f,2)):[]}),K$e=Bt(function(u){var f=ki(u),g=kn(u,_x);return f=typeof f=="function"?f:n,f&&g.pop(),g.length&&g[0]===u[0]?cx(g,n,f):[]});function G$e(u,f){return u==null?"":HOe.call(u,f)}function ki(u){var f=u==null?0:u.length;return f?u[f-1]:n}function Y$e(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=x;return g!==n&&(O=Mt(g),O=O<0?nr(x+O,0):kr(O,x-1)),f===f?$Oe(u,f,O):by(u,Xj,O,!0)}function J$e(u,f){return u&&u.length?$L(u,Mt(f)):n}var X$e=Bt(bF);function bF(u,f){return u&&u.length&&f&&f.length?hx(u,f):u}function Q$e(u,f,g){return u&&u.length&&f&&f.length?hx(u,f,bt(g,2)):u}function eke(u,f,g){return u&&u.length&&f&&f.length?hx(u,f,n,g):u}var tke=aa(function(u,f){var g=u==null?0:u.length,x=ax(u,f);return PL(u,kn(f,function(O){return sa(O,g)?+O:O}).sort(BL)),x});function nke(u,f){var g=[];if(!(u&&u.length))return g;var x=-1,O=[],I=u.length;for(f=bt(f,3);++x<I;){var U=u[x];f(U,x,u)&&(g.push(U),O.push(x))}return PL(u,O),g}function Dx(u){return u==null?u:GOe.call(u)}function rke(u,f,g){var x=u==null?0:u.length;return x?(g&&typeof g!="number"&&qr(u,f,g)?(f=0,g=x):(f=f==null?0:Mt(f),g=g===n?x:Mt(g)),$i(u,f,g)):[]}function ike(u,f){return Fy(u,f)}function oke(u,f,g){return gx(u,f,bt(g,2))}function ake(u,f){var g=u==null?0:u.length;if(g){var x=Fy(u,f);if(x<g&&Gi(u[x],f))return x}return-1}function ske(u,f){return Fy(u,f,!0)}function uke(u,f,g){return gx(u,f,bt(g,2),!0)}function lke(u,f){var g=u==null?0:u.length;if(g){var x=Fy(u,f,!0)-1;if(Gi(u[x],f))return x}return-1}function cke(u){return u&&u.length?DL(u):[]}function fke(u,f){return u&&u.length?DL(u,bt(f,2)):[]}function dke(u){var f=u==null?0:u.length;return f?$i(u,1,f):[]}function pke(u,f,g){return u&&u.length?(f=g||f===n?1:Mt(f),$i(u,0,f<0?0:f)):[]}function hke(u,f,g){var x=u==null?0:u.length;return x?(f=g||f===n?1:Mt(f),f=x-f,$i(u,f<0?0:f,x)):[]}function mke(u,f){return u&&u.length?qy(u,bt(f,3),!1,!0):[]}function yke(u,f){return u&&u.length?qy(u,bt(f,3)):[]}var gke=Bt(function(u){return Ya(gr(u,1,qn,!0))}),vke=Bt(function(u){var f=ki(u);return qn(f)&&(f=n),Ya(gr(u,1,qn,!0),bt(f,2))}),bke=Bt(function(u){var f=ki(u);return f=typeof f=="function"?f:n,Ya(gr(u,1,qn,!0),n,f)});function _ke(u){return u&&u.length?Ya(u):[]}function wke(u,f){return u&&u.length?Ya(u,bt(f,2)):[]}function xke(u,f){return f=typeof f=="function"?f:n,u&&u.length?Ya(u,n,f):[]}function Nx(u){if(!(u&&u.length))return[];var f=0;return u=Ha(u,function(g){if(qn(g))return f=nr(g.length,f),!0}),Xw(f,function(g){return kn(u,Gw(g))})}function _F(u,f){if(!(u&&u.length))return[];var g=Nx(u);return f==null?g:kn(g,function(x){return di(f,n,x)})}var Ske=Bt(function(u,f){return qn(u)?Bf(u,f):[]}),Eke=Bt(function(u){return bx(Ha(u,qn))}),Ake=Bt(function(u){var f=ki(u);return qn(f)&&(f=n),bx(Ha(u,qn),bt(f,2))}),Cke=Bt(function(u){var f=ki(u);return f=typeof f=="function"?f:n,bx(Ha(u,qn),n,f)}),Oke=Bt(Nx);function Tke(u,f){return LL(u||[],f||[],Uf)}function $ke(u,f){return LL(u||[],f||[],Hf)}var kke=Bt(function(u){var f=u.length,g=f>1?u[f-1]:n;return g=typeof g=="function"?(u.pop(),g):n,_F(u,g)});function wF(u){var f=$(u);return f.__chain__=!0,f}function Ike(u,f){return f(u),u}function Gy(u,f){return f(u)}var Pke=aa(function(u){var f=u.length,g=f?u[0]:0,x=this.__wrapped__,O=function(I){return ax(I,u)};return f>1||this.__actions__.length||!(x instanceof Yt)||!sa(g)?this.thru(O):(x=x.slice(g,+g+(f?1:0)),x.__actions__.push({func:Gy,args:[O],thisArg:n}),new Oi(x,this.__chain__).thru(function(I){return f&&!I.length&&I.push(n),I}))});function Rke(){return wF(this)}function Dke(){return new Oi(this.value(),this.__chain__)}function Nke(){this.__values__===n&&(this.__values__=NF(this.value()));var u=this.__index__>=this.__values__.length,f=u?n:this.__values__[this.__index__++];return{done:u,value:f}}function Mke(){return this}function jke(u){for(var f,g=this;g instanceof Dy;){var x=hF(g);x.__index__=0,x.__values__=n,f?O.__wrapped__=x:f=x;var O=x;g=g.__wrapped__}return O.__wrapped__=u,f}function Lke(){var u=this.__wrapped__;if(u instanceof Yt){var f=u;return this.__actions__.length&&(f=new Yt(this)),f=f.reverse(),f.__actions__.push({func:Gy,args:[Dx],thisArg:n}),new Oi(f,this.__chain__)}return this.thru(Dx)}function Fke(){return jL(this.__wrapped__,this.__actions__)}var qke=Uy(function(u,f,g){hn.call(u,g)?++u[g]:ia(u,g,1)});function Uke(u,f,g){var x=Rt(u)?Yj:ITe;return g&&qr(u,f,g)&&(f=n),x(u,bt(f,3))}function Bke(u,f){var g=Rt(u)?Ha:_L;return g(u,bt(f,3))}var zke=KL(mF),Zke=KL(yF);function Hke(u,f){return gr(Yy(u,f),1)}function Wke(u,f){return gr(Yy(u,f),Y)}function Vke(u,f,g){return g=g===n?1:Mt(g),gr(Yy(u,f),g)}function xF(u,f){var g=Rt(u)?Ai:Ga;return g(u,bt(f,3))}function SF(u,f){var g=Rt(u)?dOe:bL;return g(u,bt(f,3))}var Kke=Uy(function(u,f,g){hn.call(u,g)?u[g].push(f):ia(u,g,[f])});function Gke(u,f,g,x){u=ti(u)?u:jl(u),g=g&&!x?Mt(g):0;var O=u.length;return g<0&&(g=nr(O+g,0)),tg(u)?g<=O&&u.indexOf(f,g)>-1:!!O&&Al(u,f,g)>-1}var Yke=Bt(function(u,f,g){var x=-1,O=typeof f=="function",I=ti(u)?le(u.length):[];return Ga(u,function(U){I[++x]=O?di(f,U,g):zf(U,f,g)}),I}),Jke=Uy(function(u,f,g){ia(u,g,f)});function Yy(u,f){var g=Rt(u)?kn:CL;return g(u,bt(f,3))}function Xke(u,f,g,x){return u==null?[]:(Rt(f)||(f=f==null?[]:[f]),g=x?n:g,Rt(g)||(g=g==null?[]:[g]),kL(u,f,g))}var Qke=Uy(function(u,f,g){u[g?0:1].push(f)},function(){return[[],[]]});function eIe(u,f,g){var x=Rt(u)?Vw:eL,O=arguments.length<3;return x(u,bt(f,4),g,O,Ga)}function tIe(u,f,g){var x=Rt(u)?pOe:eL,O=arguments.length<3;return x(u,bt(f,4),g,O,bL)}function nIe(u,f){var g=Rt(u)?Ha:_L;return g(u,Qy(bt(f,3)))}function rIe(u){var f=Rt(u)?mL:GTe;return f(u)}function iIe(u,f,g){(g?qr(u,f,g):f===n)?f=1:f=Mt(f);var x=Rt(u)?CTe:YTe;return x(u,f)}function oIe(u){var f=Rt(u)?OTe:XTe;return f(u)}function aIe(u){if(u==null)return 0;if(ti(u))return tg(u)?Ol(u):u.length;var f=Ir(u);return f==Ze||f==Ue?u.size:dx(u).length}function sIe(u,f,g){var x=Rt(u)?Kw:QTe;return g&&qr(u,f,g)&&(f=n),x(u,bt(f,3))}var uIe=Bt(function(u,f){if(u==null)return[];var g=f.length;return g>1&&qr(u,f[0],f[1])?f=[]:g>2&&qr(f[0],f[1],f[2])&&(f=[f[0]]),kL(u,gr(f,1),[])}),Jy=BOe||function(){return yr.Date.now()};function lIe(u,f){if(typeof f!="function")throw new Ci(a);return u=Mt(u),function(){if(--u<1)return f.apply(this,arguments)}}function EF(u,f,g){return f=g?n:f,f=u&&f==null?u.length:f,oa(u,j,n,n,n,n,f)}function AF(u,f){var g;if(typeof f!="function")throw new Ci(a);return u=Mt(u),function(){return--u>0&&(g=f.apply(this,arguments)),u<=1&&(f=n),g}}var Mx=Bt(function(u,f,g){var x=w;if(g.length){var O=Va(g,Nl(Mx));x|=E}return oa(u,x,f,g,O)}),CF=Bt(function(u,f,g){var x=w|_;if(g.length){var O=Va(g,Nl(CF));x|=E}return oa(f,x,u,g,O)});function OF(u,f,g){f=g?n:f;var x=oa(u,S,n,n,n,n,n,f);return x.placeholder=OF.placeholder,x}function TF(u,f,g){f=g?n:f;var x=oa(u,A,n,n,n,n,n,f);return x.placeholder=TF.placeholder,x}function $F(u,f,g){var x,O,I,U,W,te,_e=0,we=!1,Ee=!1,Ve=!0;if(typeof u!="function")throw new Ci(a);f=Ii(f)||0,Dn(g)&&(we=!!g.leading,Ee="maxWait"in g,I=Ee?nr(Ii(g.maxWait)||0,f):I,Ve="trailing"in g?!!g.trailing:Ve);function at(Un){var Yi=x,ca=O;return x=O=n,_e=Un,U=u.apply(ca,Yi),U}function wt(Un){return _e=Un,W=Kf(Wt,f),we?at(Un):U}function Ut(Un){var Yi=Un-te,ca=Un-_e,KF=f-Yi;return Ee?kr(KF,I-ca):KF}function xt(Un){var Yi=Un-te,ca=Un-_e;return te===n||Yi>=f||Yi<0||Ee&&ca>=I}function Wt(){var Un=Jy();if(xt(Un))return Qt(Un);W=Kf(Wt,Ut(Un))}function Qt(Un){return W=n,Ve&&x?at(Un):(x=O=n,U)}function yi(){W!==n&&FL(W),_e=0,x=te=O=W=n}function Ur(){return W===n?U:Qt(Jy())}function gi(){var Un=Jy(),Yi=xt(Un);if(x=arguments,O=this,te=Un,Yi){if(W===n)return wt(te);if(Ee)return FL(W),W=Kf(Wt,f),at(te)}return W===n&&(W=Kf(Wt,f)),U}return gi.cancel=yi,gi.flush=Ur,gi}var cIe=Bt(function(u,f){return vL(u,1,f)}),fIe=Bt(function(u,f,g){return vL(u,Ii(f)||0,g)});function dIe(u){return oa(u,F)}function Xy(u,f){if(typeof u!="function"||f!=null&&typeof f!="function")throw new Ci(a);var g=function(){var x=arguments,O=f?f.apply(this,x):x[0],I=g.cache;if(I.has(O))return I.get(O);var U=u.apply(this,x);return g.cache=I.set(O,U)||I,U};return g.cache=new(Xy.Cache||ra),g}Xy.Cache=ra;function Qy(u){if(typeof u!="function")throw new Ci(a);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}function pIe(u){return AF(2,u)}var hIe=e$e(function(u,f){f=f.length==1&&Rt(f[0])?kn(f[0],pi(bt())):kn(gr(f,1),pi(bt()));var g=f.length;return Bt(function(x){for(var O=-1,I=kr(x.length,g);++O<I;)x[O]=f[O].call(this,x[O]);return di(u,this,x)})}),jx=Bt(function(u,f){var g=Va(f,Nl(jx));return oa(u,E,n,f,g)}),kF=Bt(function(u,f){var g=Va(f,Nl(kF));return oa(u,T,n,f,g)}),mIe=aa(function(u,f){return oa(u,L,n,n,n,f)});function yIe(u,f){if(typeof u!="function")throw new Ci(a);return f=f===n?f:Mt(f),Bt(u,f)}function gIe(u,f){if(typeof u!="function")throw new Ci(a);return f=f==null?0:nr(Mt(f),0),Bt(function(g){var x=g[f],O=Xa(g,0,f);return x&&Wa(O,x),di(u,this,O)})}function vIe(u,f,g){var x=!0,O=!0;if(typeof u!="function")throw new Ci(a);return Dn(g)&&(x="leading"in g?!!g.leading:x,O="trailing"in g?!!g.trailing:O),$F(u,f,{leading:x,maxWait:f,trailing:O})}function bIe(u){return EF(u,1)}function _Ie(u,f){return jx(wx(f),u)}function wIe(){if(!arguments.length)return[];var u=arguments[0];return Rt(u)?u:[u]}function xIe(u){return Ti(u,h)}function SIe(u,f){return f=typeof f=="function"?f:n,Ti(u,h,f)}function EIe(u){return Ti(u,p|h)}function AIe(u,f){return f=typeof f=="function"?f:n,Ti(u,p|h,f)}function CIe(u,f){return f==null||gL(u,f,ur(f))}function Gi(u,f){return u===f||u!==u&&f!==f}var OIe=Hy(lx),TIe=Hy(function(u,f){return u>=f}),Xs=SL(function(){return arguments}())?SL:function(u){return Ln(u)&&hn.call(u,"callee")&&!lL.call(u,"callee")},Rt=le.isArray,$Ie=Zj?pi(Zj):jTe;function ti(u){return u!=null&&eg(u.length)&&!ua(u)}function qn(u){return Ln(u)&&ti(u)}function kIe(u){return u===!0||u===!1||Ln(u)&&Fr(u)==rt}var Qa=ZOe||Kx,IIe=Hj?pi(Hj):LTe;function PIe(u){return Ln(u)&&u.nodeType===1&&!Gf(u)}function RIe(u){if(u==null)return!0;if(ti(u)&&(Rt(u)||typeof u=="string"||typeof u.splice=="function"||Qa(u)||Ml(u)||Xs(u)))return!u.length;var f=Ir(u);if(f==Ze||f==Ue)return!u.size;if(Vf(u))return!dx(u).length;for(var g in u)if(hn.call(u,g))return!1;return!0}function DIe(u,f){return Zf(u,f)}function NIe(u,f,g){g=typeof g=="function"?g:n;var x=g?g(u,f):n;return x===n?Zf(u,f,n,g):!!x}function Lx(u){if(!Ln(u))return!1;var f=Fr(u);return f==Ae||f==Pe||typeof u.message=="string"&&typeof u.name=="string"&&!Gf(u)}function MIe(u){return typeof u=="number"&&fL(u)}function ua(u){if(!Dn(u))return!1;var f=Fr(u);return f==Fe||f==$e||f==Je||f==Se}function IF(u){return typeof u=="number"&&u==Mt(u)}function eg(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=ne}function Dn(u){var f=typeof u;return u!=null&&(f=="object"||f=="function")}function Ln(u){return u!=null&&typeof u=="object"}var PF=Wj?pi(Wj):qTe;function jIe(u,f){return u===f||fx(u,f,Tx(f))}function LIe(u,f,g){return g=typeof g=="function"?g:n,fx(u,f,Tx(f),g)}function FIe(u){return RF(u)&&u!=+u}function qIe(u){if(S$e(u))throw new kt(o);return EL(u)}function UIe(u){return u===null}function BIe(u){return u==null}function RF(u){return typeof u=="number"||Ln(u)&&Fr(u)==lt}function Gf(u){if(!Ln(u)||Fr(u)!=pe)return!1;var f=Oy(u);if(f===null)return!0;var g=hn.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&Sy.call(g)==LOe}var Fx=Vj?pi(Vj):UTe;function zIe(u){return IF(u)&&u>=-ne&&u<=ne}var DF=Kj?pi(Kj):BTe;function tg(u){return typeof u=="string"||!Rt(u)&&Ln(u)&&Fr(u)==ot}function mi(u){return typeof u=="symbol"||Ln(u)&&Fr(u)==It}var Ml=Gj?pi(Gj):zTe;function ZIe(u){return u===n}function HIe(u){return Ln(u)&&Ir(u)==ie}function WIe(u){return Ln(u)&&Fr(u)==ge}var VIe=Hy(px),KIe=Hy(function(u,f){return u<=f});function NF(u){if(!u)return[];if(ti(u))return tg(u)?Vi(u):ei(u);if(Mf&&u[Mf])return COe(u[Mf]());var f=Ir(u),g=f==Ze?ex:f==Ue?_y:jl;return g(u)}function la(u){if(!u)return u===0?u:0;if(u=Ii(u),u===Y||u===-Y){var f=u<0?-1:1;return f*ce}return u===u?u:0}function Mt(u){var f=la(u),g=f%1;return f===f?g?f-g:f:0}function MF(u){return u?Ks(Mt(u),0,ue):0}function Ii(u){if(typeof u=="number")return u;if(mi(u))return P;if(Dn(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=Dn(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=tL(u);var g=Tt.test(u);return g||On.test(u)?lOe(u.slice(2),g?2:8):qt.test(u)?P:+u}function jF(u){return Ao(u,ni(u))}function GIe(u){return u?Ks(Mt(u),-ne,ne):u===0?u:0}function fn(u){return u==null?"":hi(u)}var YIe=Rl(function(u,f){if(Vf(f)||ti(f)){Ao(f,ur(f),u);return}for(var g in f)hn.call(f,g)&&Uf(u,g,f[g])}),LF=Rl(function(u,f){Ao(f,ni(f),u)}),ng=Rl(function(u,f,g,x){Ao(f,ni(f),u,x)}),JIe=Rl(function(u,f,g,x){Ao(f,ur(f),u,x)}),XIe=aa(ax);function QIe(u,f){var g=Pl(u);return f==null?g:yL(g,f)}var ePe=Bt(function(u,f){u=_n(u);var g=-1,x=f.length,O=x>2?f[2]:n;for(O&&qr(f[0],f[1],O)&&(x=1);++g<x;)for(var I=f[g],U=ni(I),W=-1,te=U.length;++W<te;){var _e=U[W],we=u[_e];(we===n||Gi(we,$l[_e])&&!hn.call(u,_e))&&(u[_e]=I[_e])}return u}),tPe=Bt(function(u){return u.push(n,tF),di(FF,n,u)});function nPe(u,f){return Jj(u,bt(f,3),Eo)}function rPe(u,f){return Jj(u,bt(f,3),ux)}function iPe(u,f){return u==null?u:sx(u,bt(f,3),ni)}function oPe(u,f){return u==null?u:wL(u,bt(f,3),ni)}function aPe(u,f){return u&&Eo(u,bt(f,3))}function sPe(u,f){return u&&ux(u,bt(f,3))}function uPe(u){return u==null?[]:jy(u,ur(u))}function lPe(u){return u==null?[]:jy(u,ni(u))}function qx(u,f,g){var x=u==null?n:Gs(u,f);return x===n?g:x}function cPe(u,f){return u!=null&&iF(u,f,RTe)}function Ux(u,f){return u!=null&&iF(u,f,DTe)}var fPe=YL(function(u,f,g){f!=null&&typeof f.toString!="function"&&(f=Ey.call(f)),u[f]=g},zx(ri)),dPe=YL(function(u,f,g){f!=null&&typeof f.toString!="function"&&(f=Ey.call(f)),hn.call(u,f)?u[f].push(g):u[f]=[g]},bt),pPe=Bt(zf);function ur(u){return ti(u)?hL(u):dx(u)}function ni(u){return ti(u)?hL(u,!0):ZTe(u)}function hPe(u,f){var g={};return f=bt(f,3),Eo(u,function(x,O,I){ia(g,f(x,O,I),x)}),g}function mPe(u,f){var g={};return f=bt(f,3),Eo(u,function(x,O,I){ia(g,O,f(x,O,I))}),g}var yPe=Rl(function(u,f,g){Ly(u,f,g)}),FF=Rl(function(u,f,g,x){Ly(u,f,g,x)}),gPe=aa(function(u,f){var g={};if(u==null)return g;var x=!1;f=kn(f,function(I){return I=Ja(I,u),x||(x=I.length>1),I}),Ao(u,Cx(u),g),x&&(g=Ti(g,p|m|h,f$e));for(var O=f.length;O--;)vx(g,f[O]);return g});function vPe(u,f){return qF(u,Qy(bt(f)))}var bPe=aa(function(u,f){return u==null?{}:WTe(u,f)});function qF(u,f){if(u==null)return{};var g=kn(Cx(u),function(x){return[x]});return f=bt(f),IL(u,g,function(x,O){return f(x,O[0])})}function _Pe(u,f,g){f=Ja(f,u);var x=-1,O=f.length;for(O||(O=1,u=n);++x<O;){var I=u==null?n:u[Co(f[x])];I===n&&(x=O,I=g),u=ua(I)?I.call(u):I}return u}function wPe(u,f,g){return u==null?u:Hf(u,f,g)}function xPe(u,f,g,x){return x=typeof x=="function"?x:n,u==null?u:Hf(u,f,g,x)}var UF=QL(ur),BF=QL(ni);function SPe(u,f,g){var x=Rt(u),O=x||Qa(u)||Ml(u);if(f=bt(f,4),g==null){var I=u&&u.constructor;O?g=x?new I:[]:Dn(u)?g=ua(I)?Pl(Oy(u)):{}:g={}}return(O?Ai:Eo)(u,function(U,W,te){return f(g,U,W,te)}),g}function EPe(u,f){return u==null?!0:vx(u,f)}function APe(u,f,g){return u==null?u:ML(u,f,wx(g))}function CPe(u,f,g,x){return x=typeof x=="function"?x:n,u==null?u:ML(u,f,wx(g),x)}function jl(u){return u==null?[]:Qw(u,ur(u))}function OPe(u){return u==null?[]:Qw(u,ni(u))}function TPe(u,f,g){return g===n&&(g=f,f=n),g!==n&&(g=Ii(g),g=g===g?g:0),f!==n&&(f=Ii(f),f=f===f?f:0),Ks(Ii(u),f,g)}function $Pe(u,f,g){return f=la(f),g===n?(g=f,f=0):g=la(g),u=Ii(u),NTe(u,f,g)}function kPe(u,f,g){if(g&&typeof g!="boolean"&&qr(u,f,g)&&(f=g=n),g===n&&(typeof f=="boolean"?(g=f,f=n):typeof u=="boolean"&&(g=u,u=n)),u===n&&f===n?(u=0,f=1):(u=la(u),f===n?(f=u,u=0):f=la(f)),u>f){var x=u;u=f,f=x}if(g||u%1||f%1){var O=dL();return kr(u+O*(f-u+uOe("1e-"+((O+"").length-1))),f)}return mx(u,f)}var IPe=Dl(function(u,f,g){return f=f.toLowerCase(),u+(g?zF(f):f)});function zF(u){return Bx(fn(u).toLowerCase())}function ZF(u){return u=fn(u),u&&u.replace(Xr,wOe).replace(XCe,"")}function PPe(u,f,g){u=fn(u),f=hi(f);var x=u.length;g=g===n?x:Ks(Mt(g),0,x);var O=g;return g-=f.length,g>=0&&u.slice(g,O)==f}function RPe(u){return u=fn(u),u&&je.test(u)?u.replace(sr,xOe):u}function DPe(u){return u=fn(u),u&&bn.test(u)?u.replace(Xt,"\\$&"):u}var NPe=Dl(function(u,f,g){return u+(g?"-":"")+f.toLowerCase()}),MPe=Dl(function(u,f,g){return u+(g?" ":"")+f.toLowerCase()}),jPe=VL("toLowerCase");function LPe(u,f,g){u=fn(u),f=Mt(f);var x=f?Ol(u):0;if(!f||x>=f)return u;var O=(f-x)/2;return Zy(Iy(O),g)+u+Zy(ky(O),g)}function FPe(u,f,g){u=fn(u),f=Mt(f);var x=f?Ol(u):0;return f&&x<f?u+Zy(f-x,g):u}function qPe(u,f,g){u=fn(u),f=Mt(f);var x=f?Ol(u):0;return f&&x<f?Zy(f-x,g)+u:u}function UPe(u,f,g){return g||f==null?f=0:f&&(f=+f),KOe(fn(u).replace(Rn,""),f||0)}function BPe(u,f,g){return(g?qr(u,f,g):f===n)?f=1:f=Mt(f),yx(fn(u),f)}function zPe(){var u=arguments,f=fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])}var ZPe=Dl(function(u,f,g){return u+(g?"_":"")+f.toLowerCase()});function HPe(u,f,g){return g&&typeof g!="number"&&qr(u,f,g)&&(f=g=n),g=g===n?ue:g>>>0,g?(u=fn(u),u&&(typeof f=="string"||f!=null&&!Fx(f))&&(f=hi(f),!f&&Cl(u))?Xa(Vi(u),0,g):u.split(f,g)):[]}var WPe=Dl(function(u,f,g){return u+(g?" ":"")+Bx(f)});function VPe(u,f,g){return u=fn(u),g=g==null?0:Ks(Mt(g),0,u.length),f=hi(f),u.slice(g,g+f.length)==f}function KPe(u,f,g){var x=$.templateSettings;g&&qr(u,f,g)&&(f=n),u=fn(u),f=ng({},f,x,eF);var O=ng({},f.imports,x.imports,eF),I=ur(O),U=Qw(O,I),W,te,_e=0,we=f.interpolate||Wi,Ee="__p += '",Ve=tx((f.escape||Wi).source+"|"+we.source+"|"+(we===Re?Gt:Wi).source+"|"+(f.evaluate||Wi).source+"|$","g"),at="//# sourceURL="+(hn.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rOe+"]")+`
|
|
11
11
|
`;u.replace(Ve,function(xt,Wt,Qt,yi,Ur,gi){return Qt||(Qt=yi),Ee+=u.slice(_e,gi).replace(yy,SOe),Wt&&(W=!0,Ee+=`' +
|
|
12
12
|
__e(`+Wt+`) +
|
|
13
13
|
'`),Ur&&(te=!0,Ee+=`';
|
|
@@ -24,7 +24,7 @@ __p += '`),Qt&&(Ee+=`' +
|
|
|
24
24
|
function print() { __p += __j.call(arguments, '') }
|
|
25
25
|
`:`;
|
|
26
26
|
`)+Ee+`return __p
|
|
27
|
-
}`;var Ut=WF(function(){return ln(I,at+"return "+Ee).apply(n,U)});if(Ut.source=Ee,Lx(Ut))throw Ut;return Ut}function GPe(u){return fn(u).toLowerCase()}function YPe(u){return fn(u).toUpperCase()}function JPe(u,f,g){if(u=fn(u),u&&(g||f===n))return tL(u);if(!u||!(f=hi(f)))return u;var x=Vi(u),O=Vi(f),I=nL(x,O),U=rL(x,O)+1;return Xa(x,I,U).join("")}function XPe(u,f,g){if(u=fn(u),u&&(g||f===n))return u.slice(0,oL(u)+1);if(!u||!(f=hi(f)))return u;var x=Vi(u),O=rL(x,Vi(f))+1;return Xa(x,0,O).join("")}function QPe(u,f,g){if(u=fn(u),u&&(g||f===n))return u.replace(Rn,"");if(!u||!(f=hi(f)))return u;var x=Vi(u),O=nL(x,Vi(f));return Xa(x,O).join("")}function eRe(u,f){var g=j,x=H;if(Dn(f)){var O="separator"in f?f.separator:O;g="length"in f?Mt(f.length):g,x="omission"in f?hi(f.omission):x}u=fn(u);var I=u.length;if(Cl(u)){var U=Vi(u);I=U.length}if(g>=I)return u;var W=g-Ol(x);if(W<1)return x;var te=U?Xa(U,0,W).join(""):u.slice(0,W);if(O===n)return te+x;if(U&&(W+=te.length-W),Fx(O)){if(u.slice(W).search(O)){var _e,we=te;for(O.global||(O=tx(O.source,fn(un.exec(O))+"g")),O.lastIndex=0;_e=O.exec(we);)var Ee=_e.index;te=te.slice(0,Ee===n?W:Ee)}}else if(u.indexOf(hi(O),W)!=W){var Ve=te.lastIndexOf(O);Ve>-1&&(te=te.slice(0,Ve))}return te+x}function tRe(u){return u=fn(u),u&&D.test(u)?u.replace(Mn,kOe):u}var nRe=Dl(function(u,f,g){return u+(g?" ":"")+f.toUpperCase()}),Bx=VL("toUpperCase");function HF(u,f,g){return u=fn(u),f=g?n:f,f===n?AOe(u)?ROe(u):yOe(u):u.match(f)||[]}var WF=Bt(function(u,f){try{return di(u,n,f)}catch(g){return Lx(g)?g:new kt(g)}}),rRe=aa(function(u,f){return Ai(f,function(g){g=Co(g),ia(u,g,Mx(u[g],u))}),u});function iRe(u){var f=u==null?0:u.length,g=bt();return u=f?kn(u,function(x){if(typeof x[1]!="function")throw new Ci(a);return[g(x[0]),x[1]]}):[],Bt(function(x){for(var O=-1;++O<f;){var I=u[O];if(di(I[0],this,x))return di(I[1],this,x)}})}function oRe(u){return kTe(Ti(u,p))}function zx(u){return function(){return u}}function aRe(u,f){return u==null||u!==u?f:u}var sRe=GL(),uRe=GL(!0);function ri(u){return u}function Zx(u){return AL(typeof u=="function"?u:Ti(u,p))}function lRe(u){return OL(Ti(u,p))}function cRe(u,f){return TL(u,Ti(f,p))}var fRe=Bt(function(u,f){return function(g){return zf(g,u,f)}}),dRe=Bt(function(u,f){return function(g){return zf(u,g,f)}});function Hx(u,f,g){var x=ur(f),O=jy(f,x);g==null&&!(Dn(f)&&(O.length||!x.length))&&(g=f,f=u,u=this,O=jy(f,ur(f)));var I=!(Dn(g)&&"chain"in g)||!!g.chain,U=ua(u);return Ai(O,function(W){var te=f[W];u[W]=te,U&&(u.prototype[W]=function(){var _e=this.__chain__;if(I||_e){var we=u(this.__wrapped__),Ee=we.__actions__=ei(this.__actions__);return Ee.push({func:te,args:arguments,thisArg:u}),we.__chain__=_e,we}return te.apply(u,Wa([this.value()],arguments))})}),u}function pRe(){return yr._===this&&(yr._=FOe),this}function Wx(){}function hRe(u){return u=Mt(u),Bt(function(f){return $L(f,u)})}var mRe=Sx(kn),yRe=Sx(Yj),gRe=Sx(Kw);function VF(u){return kx(u)?Gw(Co(u)):VTe(u)}function vRe(u){return function(f){return u==null?n:Gs(u,f)}}var bRe=JL(),_Re=JL(!0);function Vx(){return[]}function Kx(){return!1}function wRe(){return{}}function xRe(){return""}function SRe(){return!0}function ERe(u,f){if(u=Mt(u),u<1||u>ne)return[];var g=ue,x=kr(u,ue);f=bt(f),u-=ue;for(var O=Xw(x,f);++g<u;)f(g);return O}function ARe(u){return Rt(u)?kn(u,Co):mi(u)?[u]:ei(pF(fn(u)))}function CRe(u){var f=++jOe;return fn(u)+f}var ORe=zy(function(u,f){return u+f},0),TRe=Ex("ceil"),$Re=zy(function(u,f){return u/f},1),kRe=Ex("floor");function IRe(u){return u&&u.length?My(u,ri,lx):n}function PRe(u,f){return u&&u.length?My(u,bt(f,2),lx):n}function RRe(u){return Qj(u,ri)}function DRe(u,f){return Qj(u,bt(f,2))}function NRe(u){return u&&u.length?My(u,ri,px):n}function MRe(u,f){return u&&u.length?My(u,bt(f,2),px):n}var jRe=zy(function(u,f){return u*f},1),LRe=Ex("round"),FRe=zy(function(u,f){return u-f},0);function qRe(u){return u&&u.length?Jw(u,ri):0}function URe(u,f){return u&&u.length?Jw(u,bt(f,2)):0}return $.after=lIe,$.ary=EF,$.assign=YIe,$.assignIn=LF,$.assignInWith=ng,$.assignWith=JIe,$.at=XIe,$.before=AF,$.bind=Mx,$.bindAll=rRe,$.bindKey=CF,$.castArray=wIe,$.chain=wF,$.chunk=k$e,$.compact=I$e,$.concat=P$e,$.cond=iRe,$.conforms=oRe,$.constant=zx,$.countBy=qke,$.create=QIe,$.curry=OF,$.curryRight=TF,$.debounce=$F,$.defaults=ePe,$.defaultsDeep=tPe,$.defer=cIe,$.delay=fIe,$.difference=R$e,$.differenceBy=D$e,$.differenceWith=N$e,$.drop=M$e,$.dropRight=j$e,$.dropRightWhile=L$e,$.dropWhile=F$e,$.fill=q$e,$.filter=Bke,$.flatMap=Hke,$.flatMapDeep=Wke,$.flatMapDepth=Vke,$.flatten=gF,$.flattenDeep=U$e,$.flattenDepth=B$e,$.flip=dIe,$.flow=sRe,$.flowRight=uRe,$.fromPairs=z$e,$.functions=uPe,$.functionsIn=lPe,$.groupBy=Kke,$.initial=H$e,$.intersection=W$e,$.intersectionBy=V$e,$.intersectionWith=K$e,$.invert=fPe,$.invertBy=dPe,$.invokeMap=Yke,$.iteratee=Zx,$.keyBy=Jke,$.keys=ur,$.keysIn=ni,$.map=Yy,$.mapKeys=hPe,$.mapValues=mPe,$.matches=lRe,$.matchesProperty=cRe,$.memoize=Xy,$.merge=yPe,$.mergeWith=FF,$.method=fRe,$.methodOf=dRe,$.mixin=Hx,$.negate=Qy,$.nthArg=hRe,$.omit=gPe,$.omitBy=vPe,$.once=pIe,$.orderBy=Xke,$.over=mRe,$.overArgs=hIe,$.overEvery=yRe,$.overSome=gRe,$.partial=jx,$.partialRight=kF,$.partition=Qke,$.pick=bPe,$.pickBy=qF,$.property=VF,$.propertyOf=vRe,$.pull=X$e,$.pullAll=bF,$.pullAllBy=Q$e,$.pullAllWith=eke,$.pullAt=tke,$.range=bRe,$.rangeRight=_Re,$.rearg=mIe,$.reject=nIe,$.remove=nke,$.rest=yIe,$.reverse=Dx,$.sampleSize=iIe,$.set=wPe,$.setWith=xPe,$.shuffle=oIe,$.slice=rke,$.sortBy=uIe,$.sortedUniq=cke,$.sortedUniqBy=fke,$.split=HPe,$.spread=gIe,$.tail=dke,$.take=pke,$.takeRight=hke,$.takeRightWhile=mke,$.takeWhile=yke,$.tap=Ike,$.throttle=vIe,$.thru=Gy,$.toArray=NF,$.toPairs=UF,$.toPairsIn=BF,$.toPath=ARe,$.toPlainObject=jF,$.transform=SPe,$.unary=bIe,$.union=gke,$.unionBy=vke,$.unionWith=bke,$.uniq=_ke,$.uniqBy=wke,$.uniqWith=xke,$.unset=EPe,$.unzip=Nx,$.unzipWith=_F,$.update=APe,$.updateWith=CPe,$.values=jl,$.valuesIn=OPe,$.without=Ske,$.words=HF,$.wrap=_Ie,$.xor=Eke,$.xorBy=Ake,$.xorWith=Cke,$.zip=Oke,$.zipObject=Tke,$.zipObjectDeep=$ke,$.zipWith=kke,$.entries=UF,$.entriesIn=BF,$.extend=LF,$.extendWith=ng,Hx($,$),$.add=ORe,$.attempt=WF,$.camelCase=IPe,$.capitalize=zF,$.ceil=TRe,$.clamp=TPe,$.clone=xIe,$.cloneDeep=EIe,$.cloneDeepWith=AIe,$.cloneWith=SIe,$.conformsTo=CIe,$.deburr=ZF,$.defaultTo=aRe,$.divide=$Re,$.endsWith=PPe,$.eq=Gi,$.escape=RPe,$.escapeRegExp=DPe,$.every=Uke,$.find=zke,$.findIndex=mF,$.findKey=nPe,$.findLast=Zke,$.findLastIndex=yF,$.findLastKey=rPe,$.floor=kRe,$.forEach=xF,$.forEachRight=SF,$.forIn=iPe,$.forInRight=oPe,$.forOwn=aPe,$.forOwnRight=sPe,$.get=qx,$.gt=OIe,$.gte=TIe,$.has=cPe,$.hasIn=Ux,$.head=vF,$.identity=ri,$.includes=Gke,$.indexOf=Z$e,$.inRange=$Pe,$.invoke=pPe,$.isArguments=Xs,$.isArray=Rt,$.isArrayBuffer=$Ie,$.isArrayLike=ti,$.isArrayLikeObject=qn,$.isBoolean=kIe,$.isBuffer=Qa,$.isDate=IIe,$.isElement=PIe,$.isEmpty=RIe,$.isEqual=DIe,$.isEqualWith=NIe,$.isError=Lx,$.isFinite=MIe,$.isFunction=ua,$.isInteger=IF,$.isLength=eg,$.isMap=PF,$.isMatch=jIe,$.isMatchWith=LIe,$.isNaN=FIe,$.isNative=qIe,$.isNil=BIe,$.isNull=UIe,$.isNumber=RF,$.isObject=Dn,$.isObjectLike=Ln,$.isPlainObject=Gf,$.isRegExp=Fx,$.isSafeInteger=zIe,$.isSet=DF,$.isString=tg,$.isSymbol=mi,$.isTypedArray=Ml,$.isUndefined=ZIe,$.isWeakMap=HIe,$.isWeakSet=WIe,$.join=G$e,$.kebabCase=NPe,$.last=ki,$.lastIndexOf=Y$e,$.lowerCase=MPe,$.lowerFirst=jPe,$.lt=VIe,$.lte=KIe,$.max=IRe,$.maxBy=PRe,$.mean=RRe,$.meanBy=DRe,$.min=NRe,$.minBy=MRe,$.stubArray=Vx,$.stubFalse=Kx,$.stubObject=wRe,$.stubString=xRe,$.stubTrue=SRe,$.multiply=jRe,$.nth=J$e,$.noConflict=pRe,$.noop=Wx,$.now=Jy,$.pad=LPe,$.padEnd=FPe,$.padStart=qPe,$.parseInt=UPe,$.random=kPe,$.reduce=eIe,$.reduceRight=tIe,$.repeat=BPe,$.replace=zPe,$.result=_Pe,$.round=LRe,$.runInContext=J,$.sample=rIe,$.size=aIe,$.snakeCase=ZPe,$.some=sIe,$.sortedIndex=ike,$.sortedIndexBy=oke,$.sortedIndexOf=ake,$.sortedLastIndex=ske,$.sortedLastIndexBy=uke,$.sortedLastIndexOf=lke,$.startCase=WPe,$.startsWith=VPe,$.subtract=FRe,$.sum=qRe,$.sumBy=URe,$.template=KPe,$.times=ERe,$.toFinite=la,$.toInteger=Mt,$.toLength=MF,$.toLower=GPe,$.toNumber=Ii,$.toSafeInteger=GIe,$.toString=fn,$.toUpper=YPe,$.trim=JPe,$.trimEnd=XPe,$.trimStart=QPe,$.truncate=eRe,$.unescape=tRe,$.uniqueId=CRe,$.upperCase=nRe,$.upperFirst=Bx,$.each=xF,$.eachRight=SF,$.first=vF,Hx($,function(){var u={};return Eo($,function(f,g){hn.call($.prototype,g)||(u[g]=f)}),u}(),{chain:!1}),$.VERSION=r,Ai(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){$[u].placeholder=$}),Ai(["drop","take"],function(u,f){Yt.prototype[u]=function(g){g=g===n?1:nr(Mt(g),0);var x=this.__filtered__&&!f?new Yt(this):this.clone();return x.__filtered__?x.__takeCount__=kr(g,x.__takeCount__):x.__views__.push({size:kr(g,ue),type:u+(x.__dir__<0?"Right":"")}),x},Yt.prototype[u+"Right"]=function(g){return this.reverse()[u](g).reverse()}}),Ai(["filter","map","takeWhile"],function(u,f){var g=f+1,x=g==G||g==q;Yt.prototype[u]=function(O){var I=this.clone();return I.__iteratees__.push({iteratee:bt(O,3),type:g}),I.__filtered__=I.__filtered__||x,I}}),Ai(["head","last"],function(u,f){var g="take"+(f?"Right":"");Yt.prototype[u]=function(){return this[g](1).value()[0]}}),Ai(["initial","tail"],function(u,f){var g="drop"+(f?"":"Right");Yt.prototype[u]=function(){return this.__filtered__?new Yt(this):this[g](1)}}),Yt.prototype.compact=function(){return this.filter(ri)},Yt.prototype.find=function(u){return this.filter(u).head()},Yt.prototype.findLast=function(u){return this.reverse().find(u)},Yt.prototype.invokeMap=Bt(function(u,f){return typeof u=="function"?new Yt(this):this.map(function(g){return zf(g,u,f)})}),Yt.prototype.reject=function(u){return this.filter(Qy(bt(u)))},Yt.prototype.slice=function(u,f){u=Mt(u);var g=this;return g.__filtered__&&(u>0||f<0)?new Yt(g):(u<0?g=g.takeRight(-u):u&&(g=g.drop(u)),f!==n&&(f=Mt(f),g=f<0?g.dropRight(-f):g.take(f-u)),g)},Yt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Yt.prototype.toArray=function(){return this.take(ue)},Eo(Yt.prototype,function(u,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),x=/^(?:head|last)$/.test(f),O=$[x?"take"+(f=="last"?"Right":""):f],I=x||/^find/.test(f);O&&($.prototype[f]=function(){var U=this.__wrapped__,W=x?[1]:arguments,te=U instanceof Yt,_e=W[0],we=te||Rt(U),Ee=function(Wt){var Qt=O.apply($,Wa([Wt],W));return x&&Ve?Qt[0]:Qt};we&&g&&typeof _e=="function"&&_e.length!=1&&(te=we=!1);var Ve=this.__chain__,at=!!this.__actions__.length,wt=I&&!Ve,Ut=te&&!at;if(!I&&we){U=Ut?U:new Yt(this);var xt=u.apply(U,W);return xt.__actions__.push({func:Gy,args:[Ee],thisArg:n}),new Oi(xt,Ve)}return wt&&Ut?u.apply(this,W):(xt=this.thru(Ee),wt?x?xt.value()[0]:xt.value():xt)})}),Ai(["pop","push","shift","sort","splice","unshift"],function(u){var f=wy[u],g=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",x=/^(?:pop|shift)$/.test(u);$.prototype[u]=function(){var O=arguments;if(x&&!this.__chain__){var I=this.value();return f.apply(Rt(I)?I:[],O)}return this[g](function(U){return f.apply(Rt(U)?U:[],O)})}}),Eo(Yt.prototype,function(u,f){var g=$[f];if(g){var x=g.name+"";hn.call(Il,x)||(Il[x]=[]),Il[x].push({name:f,func:g})}}),Il[By(n,_).name]=[{name:"wrapper",func:n}],Yt.prototype.clone=tTe,Yt.prototype.reverse=nTe,Yt.prototype.value=rTe,$.prototype.at=Pke,$.prototype.chain=Rke,$.prototype.commit=Dke,$.prototype.next=Nke,$.prototype.plant=jke,$.prototype.reverse=Lke,$.prototype.toJSON=$.prototype.valueOf=$.prototype.value=Fke,$.prototype.first=$.prototype.head,Mf&&($.prototype[Mf]=Mke),$},Tl=DOe();Zs?((Zs.exports=Tl)._=Tl,Zw._=Tl):yr._=Tl}).call(se)}(yd,yd.exports);var cY=yd.exports,fY=Object.create,su=Object.defineProperty,dY=Object.defineProperties,pY=Object.getOwnPropertyDescriptor,hY=Object.getOwnPropertyDescriptors,mY=Object.getOwnPropertyNames,gd=Object.getOwnPropertySymbols,yY=Object.getPrototypeOf,jg=Object.prototype.hasOwnProperty,nE=Object.prototype.propertyIsEnumerable,rE=(e,t,n)=>t in e?su(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||(t={}))jg.call(t,n)&&rE(e,n,t[n]);if(gd)for(var n of gd(t))nE.call(t,n)&&rE(e,n,t[n]);return e},fe=(e,t)=>dY(e,hY(t)),k=(e,t)=>su(e,"name",{value:t,configurable:!0}),iE=(e,t)=>{var n={};for(var r in e)jg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gd)for(var r of gd(e))t.indexOf(r)<0&&nE.call(e,r)&&(n[r]=e[r]);return n},oE=(e,t)=>{for(var n in t)su(e,n,{get:t[n],enumerable:!0})},aE=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of mY(t))!jg.call(e,i)&&i!==n&&su(e,i,{get:()=>t[i],enumerable:!(r=pY(t,i))||r.enumerable});return e},mn=(e,t,n)=>(n=e!=null?fY(yY(e)):{},aE(t||!e||!e.__esModule?su(n,"default",{value:e,enumerable:!0}):n,e)),gY=e=>aE(su({},"__esModule",{value:!0}),e),sE={};oE(sE,{BRAND:()=>sA,DIRTY:()=>ss,EMPTY_PATH:()=>oA,INVALID:()=>vt,NEVER:()=>qC,OK:()=>vr,ParseInputLazyPath:()=>vi,ParseStatus:()=>Pr,Schema:()=>Ct,UntitledDeclarationError:()=>zE,ZodAny:()=>gu,ZodArray:()=>vu,ZodBigInt:()=>ec,ZodBoolean:()=>tc,ZodBranded:()=>nc,ZodCatch:()=>qd,ZodDate:()=>Bd,ZodDefault:()=>Zd,ZodDiscriminatedUnion:()=>Yg,ZodEffects:()=>Do,ZodEnum:()=>Po,ZodError:()=>ro,ZodFirstPartyTypeKind:()=>Wg,ZodFunction:()=>Xg,ZodIntersection:()=>Vd,ZodIssueCode:()=>Ie,ZodLazy:()=>Gd,ZodLiteral:()=>ic,ZodMap:()=>Qg,ZodNaN:()=>ev,ZodNativeEnum:()=>oc,ZodNever:()=>da,ZodNull:()=>ac,ZodNullable:()=>Ro,ZodNumber:()=>sc,ZodObject:()=>ls,ZodOptional:()=>Pi,ZodParsedType:()=>Ge,ZodPipeline:()=>op,ZodPromise:()=>uc,ZodReadonly:()=>up,ZodRecord:()=>tv,ZodSchema:()=>Ct,ZodSet:()=>nv,ZodString:()=>cr,ZodSymbol:()=>iv,ZodTemplateLiteral:()=>bp,ZodTemplateLiteralUnsupportedCheckError:()=>Pd,ZodTemplateLiteralUnsupportedTypeError:()=>Vg,ZodTransformer:()=>Do,ZodTuple:()=>cs,ZodType:()=>Ct,ZodUndefined:()=>fc,ZodUnion:()=>dc,ZodUnknown:()=>_u,ZodVoid:()=>ov,ZuiForm:()=>zJ,addIssueToContext:()=>Ye,agent:()=>VA,aimodel:()=>XA,any:()=>lC,array:()=>pC,bigint:()=>iC,boolean:()=>fv,coerce:()=>FC,conversation:()=>ZA,createZodEnum:()=>rc,cuid2Regex:()=>fp,cuidRegex:()=>cp,custom:()=>Gg,datasource:()=>QA,date:()=>oC,datetimeRegex:()=>mp,defaultErrorMap:()=>wu,discriminatedUnion:()=>gC,effect:()=>Op,emailRegex:()=>hp,enum:()=>CC,errorUtil:()=>ut,event:()=>KA,fromJsonSchema:()=>jC,fromObject:()=>LC,function:()=>SC,getErrorMap:()=>mu,getParsedType:()=>ko,instanceof:()=>nC,intent:()=>JA,intersection:()=>vC,ipv4Regex:()=>lc,ipv6Regex:()=>cc,isAborted:()=>Rd,isAsync:()=>Ql,isDirty:()=>Dd,isEmojiRegex:()=>mA,isValid:()=>yu,jsonSchemaToZui:()=>gc,knowledgebase:()=>eC,late:()=>tC,lazy:()=>EC,literal:()=>AC,makeIssue:()=>Xl,map:()=>wC,message:()=>WA,nan:()=>rC,nativeEnum:()=>OC,never:()=>fC,null:()=>uC,nullable:()=>kC,number:()=>cv,object:()=>hC,objectToZui:()=>xu,objectUtil:()=>kd,oboolean:()=>MC,onumber:()=>NC,optional:()=>$C,ostring:()=>DC,pipeline:()=>PC,preprocess:()=>IC,processCreateParams:()=>Ot,promise:()=>TC,quotelessJson:()=>tA,record:()=>_C,set:()=>xC,setErrorMap:()=>Kg,strictObject:()=>mC,string:()=>lv,symbol:()=>aC,table:()=>GA,tablerow:()=>YA,templateLiteral:()=>RC,transformer:()=>Op,transforms:()=>ZJ,tuple:()=>bC,ulidRegex:()=>dp,undefined:()=>sC,union:()=>yC,unknown:()=>cC,user:()=>HA,util:()=>Vt,uuidRegex:()=>pp,variable:()=>zA,void:()=>dC,z:()=>Bn,zuiToJsonSchema:()=>Cp});var vd=gY(sE),Bn={};oE(Bn,{BRAND:()=>sA,DIRTY:()=>ss,EMPTY_PATH:()=>oA,INVALID:()=>vt,NEVER:()=>qC,OK:()=>vr,ParseInputLazyPath:()=>vi,ParseStatus:()=>Pr,Schema:()=>Ct,ZodAny:()=>gu,ZodArray:()=>vu,ZodBigInt:()=>ec,ZodBoolean:()=>tc,ZodBranded:()=>nc,ZodCatch:()=>qd,ZodDate:()=>Bd,ZodDefault:()=>Zd,ZodDiscriminatedUnion:()=>Yg,ZodEffects:()=>Do,ZodEnum:()=>Po,ZodError:()=>ro,ZodFirstPartyTypeKind:()=>Wg,ZodFunction:()=>Xg,ZodIntersection:()=>Vd,ZodIssueCode:()=>Ie,ZodLazy:()=>Gd,ZodLiteral:()=>ic,ZodMap:()=>Qg,ZodNaN:()=>ev,ZodNativeEnum:()=>oc,ZodNever:()=>da,ZodNull:()=>ac,ZodNullable:()=>Ro,ZodNumber:()=>sc,ZodObject:()=>ls,ZodOptional:()=>Pi,ZodParsedType:()=>Ge,ZodPipeline:()=>op,ZodPromise:()=>uc,ZodReadonly:()=>up,ZodRecord:()=>tv,ZodSchema:()=>Ct,ZodSet:()=>nv,ZodString:()=>cr,ZodSymbol:()=>iv,ZodTemplateLiteral:()=>bp,ZodTemplateLiteralUnsupportedCheckError:()=>Pd,ZodTemplateLiteralUnsupportedTypeError:()=>Vg,ZodTransformer:()=>Do,ZodTuple:()=>cs,ZodType:()=>Ct,ZodUndefined:()=>fc,ZodUnion:()=>dc,ZodUnknown:()=>_u,ZodVoid:()=>ov,addIssueToContext:()=>Ye,agent:()=>VA,aimodel:()=>XA,any:()=>lC,array:()=>pC,bigint:()=>iC,boolean:()=>fv,coerce:()=>FC,conversation:()=>ZA,createZodEnum:()=>rc,cuid2Regex:()=>fp,cuidRegex:()=>cp,custom:()=>Gg,datasource:()=>QA,date:()=>oC,datetimeRegex:()=>mp,defaultErrorMap:()=>wu,discriminatedUnion:()=>gC,effect:()=>Op,emailRegex:()=>hp,enum:()=>CC,errorUtil:()=>ut,event:()=>KA,fromJsonSchema:()=>jC,fromObject:()=>LC,function:()=>SC,getErrorMap:()=>mu,getParsedType:()=>ko,instanceof:()=>nC,intent:()=>JA,intersection:()=>vC,ipv4Regex:()=>lc,ipv6Regex:()=>cc,isAborted:()=>Rd,isAsync:()=>Ql,isDirty:()=>Dd,isEmojiRegex:()=>mA,isValid:()=>yu,jsonSchemaToZui:()=>gc,knowledgebase:()=>eC,late:()=>tC,lazy:()=>EC,literal:()=>AC,makeIssue:()=>Xl,map:()=>wC,message:()=>WA,nan:()=>rC,nativeEnum:()=>OC,never:()=>fC,null:()=>uC,nullable:()=>kC,number:()=>cv,object:()=>hC,objectToZui:()=>xu,objectUtil:()=>kd,oboolean:()=>MC,onumber:()=>NC,optional:()=>$C,ostring:()=>DC,pipeline:()=>PC,preprocess:()=>IC,processCreateParams:()=>Ot,promise:()=>TC,quotelessJson:()=>tA,record:()=>_C,set:()=>xC,setErrorMap:()=>Kg,strictObject:()=>mC,string:()=>lv,symbol:()=>aC,table:()=>GA,tablerow:()=>YA,templateLiteral:()=>RC,transformer:()=>Op,tuple:()=>bC,ulidRegex:()=>dp,undefined:()=>sC,union:()=>yC,unknown:()=>cC,user:()=>HA,util:()=>Vt,uuidRegex:()=>pp,variable:()=>zA,void:()=>dC,zuiToJsonSchema:()=>Cp});var yn="x-zui",vY=mn(g7,1),bY=mn(n8,1),_Y=mn(SS,1),wY=mn(RZ,1),xY=mn(pd,1),SY=mn(BS,1);function Vl(e){return"comment"in e&&e.comment!=null&&e.comment!==""||"deprecated"in e&&e.deprecated===!0}k(Vl,"hasComment");function uu(e){return"standaloneName"in e&&e.standaloneName!=null&&e.standaloneName!==""}k(uu,"hasStandaloneName");var lu={type:"ANY"},EY={keyName:"[k: string]",type:"ANY"},cu={type:"UNKNOWN"},AY={keyName:"[k: string]",type:"UNKNOWN"},CY=mn(fW,1),uE=mn(rs,1),OY=mn(dV,1),TY=mn(wV,1),$Y=mn(pd,1),kY=mn(rs,1),Kl=Symbol("Parent"),lE=(0,$Y.default)(e=>{const t=e[Kl];return t?lE(t):e});function cE(e){return e===!0||e===!1}k(cE,"isBoolean");function fE(e){return!(0,kY.default)(e)}k(fE,"isPrimitive");function bd(e){return Array.isArray(e.type)||"anyOf"in e||"oneOf"in e}k(bd,"isCompound");var dE=k((e,t)=>{const n=e.split("/").pop()||"";return t?n.replaceAll(t,""):n},"basename"),IY=k(e=>{const t=dE(e),n=t.lastIndexOf(".");return n===-1?"":t.slice(n)},"extname"),PY=new Set(["id","$defs","$id","$schema","title","description","default","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","items","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","definitions","properties","patternProperties","dependencies","enum","type","allOf","anyOf","oneOf","not"]);function is(e,t,n){Object.keys(e).forEach(r=>{e[r]&&typeof e[r]=="object"&&!Array.isArray(e[r])&&To(e[r],t,n,r)})}k(is,"traverseObjectKeys");function fu(e,t,n){e.forEach((r,i)=>To(r,t,n,i.toString()))}k(fu,"traverseArray");function To(e,t,n=new Set,r){if(!n.has(e)){if(n.add(e),t(e,r??null),e.anyOf&&fu(e.anyOf,t,n),e.allOf&&fu(e.allOf,t,n),e.oneOf&&fu(e.oneOf,t,n),e.properties&&is(e.properties,t,n),e.patternProperties&&is(e.patternProperties,t,n),e.additionalProperties&&typeof e.additionalProperties=="object"&&To(e.additionalProperties,t,n),e.items){const{items:i}=e;Array.isArray(i)?fu(i,t,n):To(i,t,n)}e.additionalItems&&typeof e.additionalItems=="object"&&To(e.additionalItems,t,n),e.dependencies&&(Array.isArray(e.dependencies)?fu(e.dependencies,t,n):is(e.dependencies,t,n)),e.definitions&&is(e.definitions,t,n),e.$defs&&is(e.$defs,t,n),e.not&&To(e.not,t,n),Object.keys(e).filter(i=>!PY.has(i)).forEach(i=>{const o=e[i];o&&typeof o=="object"&&is(o,t,n)})}}k(To,"traverse");function Lg(e=""){return pE(dE(e))}k(Lg,"justName");function pE(e){return e.replace(IY(e),"")}k(pE,"stripExtension");function $o(e){return(0,TY.default)((0,CY.default)(e).replace(/(^\s*[^a-zA-Z_$])|([^a-zA-Z_$\d])/g," ").replace(/^_[a-z]/g,t=>t.toUpperCase()).replace(/_[a-z]/g,t=>t.substr(1,t.length).toUpperCase()).replace(/([\d$]+[a-zA-Z])/g,t=>t.toUpperCase()).replace(/\s+([a-zA-Z])/g,t=>(0,OY.default)(t.toUpperCase())).replace(/\s/g,""))}k($o,"toSafeString");function hE(e,t){let n=$o(e);if(n||(n="NoName"),t.has(n)){let r=1,i=`${n}${r}`;for(;t.has(i);)i=`${n}${r}`,r++;n=i}return t.add(n),n}k(hE,"generateName");function mE(...e){if(!process.env.VERBOSE)return console.error(e);console.error(...e)}k(mE,"error");function lr(e,t,...n){if(!process.env.VERBOSE)return;let r=null;n.length>1&&typeof n[n.length-1]!="string"&&(r=n.splice(n.length-1,1)),console.info(t,...n),r&&console.dir(r,{depth:6,maxArrayLength:6})}k(lr,"log");function yE(e){const t="* /";if(!(e===null||typeof e!="object"))for(const n of Object.keys(e))n==="description"&&typeof e[n]=="string"&&(e[n]=e[n].replace(/\*\//g,t))}k(yE,"escapeBlockComment");function gE(e){if(!("default"in e))return e;switch(e.type){case"array":if(Array.isArray(e.default))return e;break;case"boolean":if(typeof e.default=="boolean")return e;break;case"integer":case"number":if(typeof e.default=="number")return e;break;case"string":if(typeof e.default=="string")return e;break;case"null":if(e.default===null)return e;break;case"object":if((0,uE.default)(e.default))return e;break}return delete e.default,e}k(gE,"maybeStripDefault");function vE(e){return"$id"in e&&delete e.$id,"description"in e&&delete e.description,"name"in e&&delete e.name,e}k(vE,"maybeStripNameHints");function bE(e,...t){return e?`${e}
|
|
27
|
+
}`;var Ut=WF(function(){return ln(I,at+"return "+Ee).apply(n,U)});if(Ut.source=Ee,Lx(Ut))throw Ut;return Ut}function GPe(u){return fn(u).toLowerCase()}function YPe(u){return fn(u).toUpperCase()}function JPe(u,f,g){if(u=fn(u),u&&(g||f===n))return tL(u);if(!u||!(f=hi(f)))return u;var x=Vi(u),O=Vi(f),I=nL(x,O),U=rL(x,O)+1;return Xa(x,I,U).join("")}function XPe(u,f,g){if(u=fn(u),u&&(g||f===n))return u.slice(0,oL(u)+1);if(!u||!(f=hi(f)))return u;var x=Vi(u),O=rL(x,Vi(f))+1;return Xa(x,0,O).join("")}function QPe(u,f,g){if(u=fn(u),u&&(g||f===n))return u.replace(Rn,"");if(!u||!(f=hi(f)))return u;var x=Vi(u),O=nL(x,Vi(f));return Xa(x,O).join("")}function eRe(u,f){var g=M,x=H;if(Dn(f)){var O="separator"in f?f.separator:O;g="length"in f?Mt(f.length):g,x="omission"in f?hi(f.omission):x}u=fn(u);var I=u.length;if(Cl(u)){var U=Vi(u);I=U.length}if(g>=I)return u;var W=g-Ol(x);if(W<1)return x;var te=U?Xa(U,0,W).join(""):u.slice(0,W);if(O===n)return te+x;if(U&&(W+=te.length-W),Fx(O)){if(u.slice(W).search(O)){var _e,we=te;for(O.global||(O=tx(O.source,fn(un.exec(O))+"g")),O.lastIndex=0;_e=O.exec(we);)var Ee=_e.index;te=te.slice(0,Ee===n?W:Ee)}}else if(u.indexOf(hi(O),W)!=W){var Ve=te.lastIndexOf(O);Ve>-1&&(te=te.slice(0,Ve))}return te+x}function tRe(u){return u=fn(u),u&&D.test(u)?u.replace(Mn,kOe):u}var nRe=Dl(function(u,f,g){return u+(g?" ":"")+f.toUpperCase()}),Bx=VL("toUpperCase");function HF(u,f,g){return u=fn(u),f=g?n:f,f===n?AOe(u)?ROe(u):yOe(u):u.match(f)||[]}var WF=Bt(function(u,f){try{return di(u,n,f)}catch(g){return Lx(g)?g:new kt(g)}}),rRe=aa(function(u,f){return Ai(f,function(g){g=Co(g),ia(u,g,Mx(u[g],u))}),u});function iRe(u){var f=u==null?0:u.length,g=bt();return u=f?kn(u,function(x){if(typeof x[1]!="function")throw new Ci(a);return[g(x[0]),x[1]]}):[],Bt(function(x){for(var O=-1;++O<f;){var I=u[O];if(di(I[0],this,x))return di(I[1],this,x)}})}function oRe(u){return kTe(Ti(u,p))}function zx(u){return function(){return u}}function aRe(u,f){return u==null||u!==u?f:u}var sRe=GL(),uRe=GL(!0);function ri(u){return u}function Zx(u){return AL(typeof u=="function"?u:Ti(u,p))}function lRe(u){return OL(Ti(u,p))}function cRe(u,f){return TL(u,Ti(f,p))}var fRe=Bt(function(u,f){return function(g){return zf(g,u,f)}}),dRe=Bt(function(u,f){return function(g){return zf(u,g,f)}});function Hx(u,f,g){var x=ur(f),O=jy(f,x);g==null&&!(Dn(f)&&(O.length||!x.length))&&(g=f,f=u,u=this,O=jy(f,ur(f)));var I=!(Dn(g)&&"chain"in g)||!!g.chain,U=ua(u);return Ai(O,function(W){var te=f[W];u[W]=te,U&&(u.prototype[W]=function(){var _e=this.__chain__;if(I||_e){var we=u(this.__wrapped__),Ee=we.__actions__=ei(this.__actions__);return Ee.push({func:te,args:arguments,thisArg:u}),we.__chain__=_e,we}return te.apply(u,Wa([this.value()],arguments))})}),u}function pRe(){return yr._===this&&(yr._=FOe),this}function Wx(){}function hRe(u){return u=Mt(u),Bt(function(f){return $L(f,u)})}var mRe=Sx(kn),yRe=Sx(Yj),gRe=Sx(Kw);function VF(u){return kx(u)?Gw(Co(u)):VTe(u)}function vRe(u){return function(f){return u==null?n:Gs(u,f)}}var bRe=JL(),_Re=JL(!0);function Vx(){return[]}function Kx(){return!1}function wRe(){return{}}function xRe(){return""}function SRe(){return!0}function ERe(u,f){if(u=Mt(u),u<1||u>ne)return[];var g=ue,x=kr(u,ue);f=bt(f),u-=ue;for(var O=Xw(x,f);++g<u;)f(g);return O}function ARe(u){return Rt(u)?kn(u,Co):mi(u)?[u]:ei(pF(fn(u)))}function CRe(u){var f=++jOe;return fn(u)+f}var ORe=zy(function(u,f){return u+f},0),TRe=Ex("ceil"),$Re=zy(function(u,f){return u/f},1),kRe=Ex("floor");function IRe(u){return u&&u.length?My(u,ri,lx):n}function PRe(u,f){return u&&u.length?My(u,bt(f,2),lx):n}function RRe(u){return Qj(u,ri)}function DRe(u,f){return Qj(u,bt(f,2))}function NRe(u){return u&&u.length?My(u,ri,px):n}function MRe(u,f){return u&&u.length?My(u,bt(f,2),px):n}var jRe=zy(function(u,f){return u*f},1),LRe=Ex("round"),FRe=zy(function(u,f){return u-f},0);function qRe(u){return u&&u.length?Jw(u,ri):0}function URe(u,f){return u&&u.length?Jw(u,bt(f,2)):0}return $.after=lIe,$.ary=EF,$.assign=YIe,$.assignIn=LF,$.assignInWith=ng,$.assignWith=JIe,$.at=XIe,$.before=AF,$.bind=Mx,$.bindAll=rRe,$.bindKey=CF,$.castArray=wIe,$.chain=wF,$.chunk=k$e,$.compact=I$e,$.concat=P$e,$.cond=iRe,$.conforms=oRe,$.constant=zx,$.countBy=qke,$.create=QIe,$.curry=OF,$.curryRight=TF,$.debounce=$F,$.defaults=ePe,$.defaultsDeep=tPe,$.defer=cIe,$.delay=fIe,$.difference=R$e,$.differenceBy=D$e,$.differenceWith=N$e,$.drop=M$e,$.dropRight=j$e,$.dropRightWhile=L$e,$.dropWhile=F$e,$.fill=q$e,$.filter=Bke,$.flatMap=Hke,$.flatMapDeep=Wke,$.flatMapDepth=Vke,$.flatten=gF,$.flattenDeep=U$e,$.flattenDepth=B$e,$.flip=dIe,$.flow=sRe,$.flowRight=uRe,$.fromPairs=z$e,$.functions=uPe,$.functionsIn=lPe,$.groupBy=Kke,$.initial=H$e,$.intersection=W$e,$.intersectionBy=V$e,$.intersectionWith=K$e,$.invert=fPe,$.invertBy=dPe,$.invokeMap=Yke,$.iteratee=Zx,$.keyBy=Jke,$.keys=ur,$.keysIn=ni,$.map=Yy,$.mapKeys=hPe,$.mapValues=mPe,$.matches=lRe,$.matchesProperty=cRe,$.memoize=Xy,$.merge=yPe,$.mergeWith=FF,$.method=fRe,$.methodOf=dRe,$.mixin=Hx,$.negate=Qy,$.nthArg=hRe,$.omit=gPe,$.omitBy=vPe,$.once=pIe,$.orderBy=Xke,$.over=mRe,$.overArgs=hIe,$.overEvery=yRe,$.overSome=gRe,$.partial=jx,$.partialRight=kF,$.partition=Qke,$.pick=bPe,$.pickBy=qF,$.property=VF,$.propertyOf=vRe,$.pull=X$e,$.pullAll=bF,$.pullAllBy=Q$e,$.pullAllWith=eke,$.pullAt=tke,$.range=bRe,$.rangeRight=_Re,$.rearg=mIe,$.reject=nIe,$.remove=nke,$.rest=yIe,$.reverse=Dx,$.sampleSize=iIe,$.set=wPe,$.setWith=xPe,$.shuffle=oIe,$.slice=rke,$.sortBy=uIe,$.sortedUniq=cke,$.sortedUniqBy=fke,$.split=HPe,$.spread=gIe,$.tail=dke,$.take=pke,$.takeRight=hke,$.takeRightWhile=mke,$.takeWhile=yke,$.tap=Ike,$.throttle=vIe,$.thru=Gy,$.toArray=NF,$.toPairs=UF,$.toPairsIn=BF,$.toPath=ARe,$.toPlainObject=jF,$.transform=SPe,$.unary=bIe,$.union=gke,$.unionBy=vke,$.unionWith=bke,$.uniq=_ke,$.uniqBy=wke,$.uniqWith=xke,$.unset=EPe,$.unzip=Nx,$.unzipWith=_F,$.update=APe,$.updateWith=CPe,$.values=jl,$.valuesIn=OPe,$.without=Ske,$.words=HF,$.wrap=_Ie,$.xor=Eke,$.xorBy=Ake,$.xorWith=Cke,$.zip=Oke,$.zipObject=Tke,$.zipObjectDeep=$ke,$.zipWith=kke,$.entries=UF,$.entriesIn=BF,$.extend=LF,$.extendWith=ng,Hx($,$),$.add=ORe,$.attempt=WF,$.camelCase=IPe,$.capitalize=zF,$.ceil=TRe,$.clamp=TPe,$.clone=xIe,$.cloneDeep=EIe,$.cloneDeepWith=AIe,$.cloneWith=SIe,$.conformsTo=CIe,$.deburr=ZF,$.defaultTo=aRe,$.divide=$Re,$.endsWith=PPe,$.eq=Gi,$.escape=RPe,$.escapeRegExp=DPe,$.every=Uke,$.find=zke,$.findIndex=mF,$.findKey=nPe,$.findLast=Zke,$.findLastIndex=yF,$.findLastKey=rPe,$.floor=kRe,$.forEach=xF,$.forEachRight=SF,$.forIn=iPe,$.forInRight=oPe,$.forOwn=aPe,$.forOwnRight=sPe,$.get=qx,$.gt=OIe,$.gte=TIe,$.has=cPe,$.hasIn=Ux,$.head=vF,$.identity=ri,$.includes=Gke,$.indexOf=Z$e,$.inRange=$Pe,$.invoke=pPe,$.isArguments=Xs,$.isArray=Rt,$.isArrayBuffer=$Ie,$.isArrayLike=ti,$.isArrayLikeObject=qn,$.isBoolean=kIe,$.isBuffer=Qa,$.isDate=IIe,$.isElement=PIe,$.isEmpty=RIe,$.isEqual=DIe,$.isEqualWith=NIe,$.isError=Lx,$.isFinite=MIe,$.isFunction=ua,$.isInteger=IF,$.isLength=eg,$.isMap=PF,$.isMatch=jIe,$.isMatchWith=LIe,$.isNaN=FIe,$.isNative=qIe,$.isNil=BIe,$.isNull=UIe,$.isNumber=RF,$.isObject=Dn,$.isObjectLike=Ln,$.isPlainObject=Gf,$.isRegExp=Fx,$.isSafeInteger=zIe,$.isSet=DF,$.isString=tg,$.isSymbol=mi,$.isTypedArray=Ml,$.isUndefined=ZIe,$.isWeakMap=HIe,$.isWeakSet=WIe,$.join=G$e,$.kebabCase=NPe,$.last=ki,$.lastIndexOf=Y$e,$.lowerCase=MPe,$.lowerFirst=jPe,$.lt=VIe,$.lte=KIe,$.max=IRe,$.maxBy=PRe,$.mean=RRe,$.meanBy=DRe,$.min=NRe,$.minBy=MRe,$.stubArray=Vx,$.stubFalse=Kx,$.stubObject=wRe,$.stubString=xRe,$.stubTrue=SRe,$.multiply=jRe,$.nth=J$e,$.noConflict=pRe,$.noop=Wx,$.now=Jy,$.pad=LPe,$.padEnd=FPe,$.padStart=qPe,$.parseInt=UPe,$.random=kPe,$.reduce=eIe,$.reduceRight=tIe,$.repeat=BPe,$.replace=zPe,$.result=_Pe,$.round=LRe,$.runInContext=J,$.sample=rIe,$.size=aIe,$.snakeCase=ZPe,$.some=sIe,$.sortedIndex=ike,$.sortedIndexBy=oke,$.sortedIndexOf=ake,$.sortedLastIndex=ske,$.sortedLastIndexBy=uke,$.sortedLastIndexOf=lke,$.startCase=WPe,$.startsWith=VPe,$.subtract=FRe,$.sum=qRe,$.sumBy=URe,$.template=KPe,$.times=ERe,$.toFinite=la,$.toInteger=Mt,$.toLength=MF,$.toLower=GPe,$.toNumber=Ii,$.toSafeInteger=GIe,$.toString=fn,$.toUpper=YPe,$.trim=JPe,$.trimEnd=XPe,$.trimStart=QPe,$.truncate=eRe,$.unescape=tRe,$.uniqueId=CRe,$.upperCase=nRe,$.upperFirst=Bx,$.each=xF,$.eachRight=SF,$.first=vF,Hx($,function(){var u={};return Eo($,function(f,g){hn.call($.prototype,g)||(u[g]=f)}),u}(),{chain:!1}),$.VERSION=r,Ai(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){$[u].placeholder=$}),Ai(["drop","take"],function(u,f){Yt.prototype[u]=function(g){g=g===n?1:nr(Mt(g),0);var x=this.__filtered__&&!f?new Yt(this):this.clone();return x.__filtered__?x.__takeCount__=kr(g,x.__takeCount__):x.__views__.push({size:kr(g,ue),type:u+(x.__dir__<0?"Right":"")}),x},Yt.prototype[u+"Right"]=function(g){return this.reverse()[u](g).reverse()}}),Ai(["filter","map","takeWhile"],function(u,f){var g=f+1,x=g==G||g==q;Yt.prototype[u]=function(O){var I=this.clone();return I.__iteratees__.push({iteratee:bt(O,3),type:g}),I.__filtered__=I.__filtered__||x,I}}),Ai(["head","last"],function(u,f){var g="take"+(f?"Right":"");Yt.prototype[u]=function(){return this[g](1).value()[0]}}),Ai(["initial","tail"],function(u,f){var g="drop"+(f?"":"Right");Yt.prototype[u]=function(){return this.__filtered__?new Yt(this):this[g](1)}}),Yt.prototype.compact=function(){return this.filter(ri)},Yt.prototype.find=function(u){return this.filter(u).head()},Yt.prototype.findLast=function(u){return this.reverse().find(u)},Yt.prototype.invokeMap=Bt(function(u,f){return typeof u=="function"?new Yt(this):this.map(function(g){return zf(g,u,f)})}),Yt.prototype.reject=function(u){return this.filter(Qy(bt(u)))},Yt.prototype.slice=function(u,f){u=Mt(u);var g=this;return g.__filtered__&&(u>0||f<0)?new Yt(g):(u<0?g=g.takeRight(-u):u&&(g=g.drop(u)),f!==n&&(f=Mt(f),g=f<0?g.dropRight(-f):g.take(f-u)),g)},Yt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Yt.prototype.toArray=function(){return this.take(ue)},Eo(Yt.prototype,function(u,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),x=/^(?:head|last)$/.test(f),O=$[x?"take"+(f=="last"?"Right":""):f],I=x||/^find/.test(f);O&&($.prototype[f]=function(){var U=this.__wrapped__,W=x?[1]:arguments,te=U instanceof Yt,_e=W[0],we=te||Rt(U),Ee=function(Wt){var Qt=O.apply($,Wa([Wt],W));return x&&Ve?Qt[0]:Qt};we&&g&&typeof _e=="function"&&_e.length!=1&&(te=we=!1);var Ve=this.__chain__,at=!!this.__actions__.length,wt=I&&!Ve,Ut=te&&!at;if(!I&&we){U=Ut?U:new Yt(this);var xt=u.apply(U,W);return xt.__actions__.push({func:Gy,args:[Ee],thisArg:n}),new Oi(xt,Ve)}return wt&&Ut?u.apply(this,W):(xt=this.thru(Ee),wt?x?xt.value()[0]:xt.value():xt)})}),Ai(["pop","push","shift","sort","splice","unshift"],function(u){var f=wy[u],g=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",x=/^(?:pop|shift)$/.test(u);$.prototype[u]=function(){var O=arguments;if(x&&!this.__chain__){var I=this.value();return f.apply(Rt(I)?I:[],O)}return this[g](function(U){return f.apply(Rt(U)?U:[],O)})}}),Eo(Yt.prototype,function(u,f){var g=$[f];if(g){var x=g.name+"";hn.call(Il,x)||(Il[x]=[]),Il[x].push({name:f,func:g})}}),Il[By(n,_).name]=[{name:"wrapper",func:n}],Yt.prototype.clone=tTe,Yt.prototype.reverse=nTe,Yt.prototype.value=rTe,$.prototype.at=Pke,$.prototype.chain=Rke,$.prototype.commit=Dke,$.prototype.next=Nke,$.prototype.plant=jke,$.prototype.reverse=Lke,$.prototype.toJSON=$.prototype.valueOf=$.prototype.value=Fke,$.prototype.first=$.prototype.head,Mf&&($.prototype[Mf]=Mke),$},Tl=DOe();Zs?((Zs.exports=Tl)._=Tl,Zw._=Tl):yr._=Tl}).call(se)}(yd,yd.exports);var cY=yd.exports,fY=Object.create,su=Object.defineProperty,dY=Object.defineProperties,pY=Object.getOwnPropertyDescriptor,hY=Object.getOwnPropertyDescriptors,mY=Object.getOwnPropertyNames,gd=Object.getOwnPropertySymbols,yY=Object.getPrototypeOf,jg=Object.prototype.hasOwnProperty,nE=Object.prototype.propertyIsEnumerable,rE=(e,t,n)=>t in e?su(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||(t={}))jg.call(t,n)&&rE(e,n,t[n]);if(gd)for(var n of gd(t))nE.call(t,n)&&rE(e,n,t[n]);return e},fe=(e,t)=>dY(e,hY(t)),k=(e,t)=>su(e,"name",{value:t,configurable:!0}),iE=(e,t)=>{var n={};for(var r in e)jg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gd)for(var r of gd(e))t.indexOf(r)<0&&nE.call(e,r)&&(n[r]=e[r]);return n},oE=(e,t)=>{for(var n in t)su(e,n,{get:t[n],enumerable:!0})},aE=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of mY(t))!jg.call(e,i)&&i!==n&&su(e,i,{get:()=>t[i],enumerable:!(r=pY(t,i))||r.enumerable});return e},mn=(e,t,n)=>(n=e!=null?fY(yY(e)):{},aE(t||!e||!e.__esModule?su(n,"default",{value:e,enumerable:!0}):n,e)),gY=e=>aE(su({},"__esModule",{value:!0}),e),sE={};oE(sE,{BRAND:()=>sA,DIRTY:()=>ss,EMPTY_PATH:()=>oA,INVALID:()=>vt,NEVER:()=>qC,OK:()=>vr,ParseInputLazyPath:()=>vi,ParseStatus:()=>Pr,Schema:()=>Ct,UntitledDeclarationError:()=>zE,ZodAny:()=>gu,ZodArray:()=>vu,ZodBigInt:()=>ec,ZodBoolean:()=>tc,ZodBranded:()=>nc,ZodCatch:()=>qd,ZodDate:()=>Bd,ZodDefault:()=>Zd,ZodDiscriminatedUnion:()=>Yg,ZodEffects:()=>Do,ZodEnum:()=>Po,ZodError:()=>ro,ZodFirstPartyTypeKind:()=>Wg,ZodFunction:()=>Xg,ZodIntersection:()=>Vd,ZodIssueCode:()=>Ie,ZodLazy:()=>Gd,ZodLiteral:()=>ic,ZodMap:()=>Qg,ZodNaN:()=>ev,ZodNativeEnum:()=>oc,ZodNever:()=>da,ZodNull:()=>ac,ZodNullable:()=>Ro,ZodNumber:()=>sc,ZodObject:()=>ls,ZodOptional:()=>Pi,ZodParsedType:()=>Ge,ZodPipeline:()=>op,ZodPromise:()=>uc,ZodReadonly:()=>up,ZodRecord:()=>tv,ZodSchema:()=>Ct,ZodSet:()=>nv,ZodString:()=>cr,ZodSymbol:()=>iv,ZodTemplateLiteral:()=>bp,ZodTemplateLiteralUnsupportedCheckError:()=>Pd,ZodTemplateLiteralUnsupportedTypeError:()=>Vg,ZodTransformer:()=>Do,ZodTuple:()=>cs,ZodType:()=>Ct,ZodUndefined:()=>fc,ZodUnion:()=>dc,ZodUnknown:()=>_u,ZodVoid:()=>ov,ZuiForm:()=>zJ,addIssueToContext:()=>Ye,agent:()=>VA,aimodel:()=>XA,any:()=>lC,array:()=>pC,bigint:()=>iC,boolean:()=>fv,coerce:()=>FC,conversation:()=>ZA,createZodEnum:()=>rc,cuid2Regex:()=>fp,cuidRegex:()=>cp,custom:()=>Gg,datasource:()=>QA,date:()=>oC,datetimeRegex:()=>mp,defaultErrorMap:()=>wu,discriminatedUnion:()=>gC,effect:()=>Op,emailRegex:()=>hp,enum:()=>CC,errorUtil:()=>ut,event:()=>KA,fromJsonSchema:()=>jC,fromObject:()=>LC,function:()=>SC,getErrorMap:()=>mu,getParsedType:()=>ko,instanceof:()=>nC,intent:()=>JA,intersection:()=>vC,ipv4Regex:()=>lc,ipv6Regex:()=>cc,isAborted:()=>Rd,isAsync:()=>Ql,isDirty:()=>Dd,isEmojiRegex:()=>mA,isValid:()=>yu,jsonSchemaToZui:()=>gc,knowledgebase:()=>eC,late:()=>tC,lazy:()=>EC,literal:()=>AC,makeIssue:()=>Xl,map:()=>wC,message:()=>WA,nan:()=>rC,nativeEnum:()=>OC,never:()=>fC,null:()=>uC,nullable:()=>kC,number:()=>cv,object:()=>hC,objectToZui:()=>xu,objectUtil:()=>kd,oboolean:()=>MC,onumber:()=>NC,optional:()=>$C,ostring:()=>DC,pipeline:()=>PC,preprocess:()=>IC,processCreateParams:()=>Ot,promise:()=>TC,quotelessJson:()=>tA,record:()=>_C,set:()=>xC,setErrorMap:()=>Kg,strictObject:()=>mC,string:()=>lv,symbol:()=>aC,table:()=>GA,tablerow:()=>YA,templateLiteral:()=>RC,transformer:()=>Op,transforms:()=>ZJ,tuple:()=>bC,ulidRegex:()=>dp,undefined:()=>sC,union:()=>yC,unknown:()=>cC,user:()=>HA,util:()=>Vt,uuidRegex:()=>pp,variable:()=>zA,void:()=>dC,z:()=>Bn,zuiToJsonSchema:()=>Cp});var vd=gY(sE),Bn={};oE(Bn,{BRAND:()=>sA,DIRTY:()=>ss,EMPTY_PATH:()=>oA,INVALID:()=>vt,NEVER:()=>qC,OK:()=>vr,ParseInputLazyPath:()=>vi,ParseStatus:()=>Pr,Schema:()=>Ct,ZodAny:()=>gu,ZodArray:()=>vu,ZodBigInt:()=>ec,ZodBoolean:()=>tc,ZodBranded:()=>nc,ZodCatch:()=>qd,ZodDate:()=>Bd,ZodDefault:()=>Zd,ZodDiscriminatedUnion:()=>Yg,ZodEffects:()=>Do,ZodEnum:()=>Po,ZodError:()=>ro,ZodFirstPartyTypeKind:()=>Wg,ZodFunction:()=>Xg,ZodIntersection:()=>Vd,ZodIssueCode:()=>Ie,ZodLazy:()=>Gd,ZodLiteral:()=>ic,ZodMap:()=>Qg,ZodNaN:()=>ev,ZodNativeEnum:()=>oc,ZodNever:()=>da,ZodNull:()=>ac,ZodNullable:()=>Ro,ZodNumber:()=>sc,ZodObject:()=>ls,ZodOptional:()=>Pi,ZodParsedType:()=>Ge,ZodPipeline:()=>op,ZodPromise:()=>uc,ZodReadonly:()=>up,ZodRecord:()=>tv,ZodSchema:()=>Ct,ZodSet:()=>nv,ZodString:()=>cr,ZodSymbol:()=>iv,ZodTemplateLiteral:()=>bp,ZodTemplateLiteralUnsupportedCheckError:()=>Pd,ZodTemplateLiteralUnsupportedTypeError:()=>Vg,ZodTransformer:()=>Do,ZodTuple:()=>cs,ZodType:()=>Ct,ZodUndefined:()=>fc,ZodUnion:()=>dc,ZodUnknown:()=>_u,ZodVoid:()=>ov,addIssueToContext:()=>Ye,agent:()=>VA,aimodel:()=>XA,any:()=>lC,array:()=>pC,bigint:()=>iC,boolean:()=>fv,coerce:()=>FC,conversation:()=>ZA,createZodEnum:()=>rc,cuid2Regex:()=>fp,cuidRegex:()=>cp,custom:()=>Gg,datasource:()=>QA,date:()=>oC,datetimeRegex:()=>mp,defaultErrorMap:()=>wu,discriminatedUnion:()=>gC,effect:()=>Op,emailRegex:()=>hp,enum:()=>CC,errorUtil:()=>ut,event:()=>KA,fromJsonSchema:()=>jC,fromObject:()=>LC,function:()=>SC,getErrorMap:()=>mu,getParsedType:()=>ko,instanceof:()=>nC,intent:()=>JA,intersection:()=>vC,ipv4Regex:()=>lc,ipv6Regex:()=>cc,isAborted:()=>Rd,isAsync:()=>Ql,isDirty:()=>Dd,isEmojiRegex:()=>mA,isValid:()=>yu,jsonSchemaToZui:()=>gc,knowledgebase:()=>eC,late:()=>tC,lazy:()=>EC,literal:()=>AC,makeIssue:()=>Xl,map:()=>wC,message:()=>WA,nan:()=>rC,nativeEnum:()=>OC,never:()=>fC,null:()=>uC,nullable:()=>kC,number:()=>cv,object:()=>hC,objectToZui:()=>xu,objectUtil:()=>kd,oboolean:()=>MC,onumber:()=>NC,optional:()=>$C,ostring:()=>DC,pipeline:()=>PC,preprocess:()=>IC,processCreateParams:()=>Ot,promise:()=>TC,quotelessJson:()=>tA,record:()=>_C,set:()=>xC,setErrorMap:()=>Kg,strictObject:()=>mC,string:()=>lv,symbol:()=>aC,table:()=>GA,tablerow:()=>YA,templateLiteral:()=>RC,transformer:()=>Op,tuple:()=>bC,ulidRegex:()=>dp,undefined:()=>sC,union:()=>yC,unknown:()=>cC,user:()=>HA,util:()=>Vt,uuidRegex:()=>pp,variable:()=>zA,void:()=>dC,zuiToJsonSchema:()=>Cp});var yn="x-zui",vY=mn(g7,1),bY=mn(n8,1),_Y=mn(SS,1),wY=mn(RZ,1),xY=mn(pd,1),SY=mn(BS,1);function Vl(e){return"comment"in e&&e.comment!=null&&e.comment!==""||"deprecated"in e&&e.deprecated===!0}k(Vl,"hasComment");function uu(e){return"standaloneName"in e&&e.standaloneName!=null&&e.standaloneName!==""}k(uu,"hasStandaloneName");var lu={type:"ANY"},EY={keyName:"[k: string]",type:"ANY"},cu={type:"UNKNOWN"},AY={keyName:"[k: string]",type:"UNKNOWN"},CY=mn(fW,1),uE=mn(rs,1),OY=mn(dV,1),TY=mn(wV,1),$Y=mn(pd,1),kY=mn(rs,1),Kl=Symbol("Parent"),lE=(0,$Y.default)(e=>{const t=e[Kl];return t?lE(t):e});function cE(e){return e===!0||e===!1}k(cE,"isBoolean");function fE(e){return!(0,kY.default)(e)}k(fE,"isPrimitive");function bd(e){return Array.isArray(e.type)||"anyOf"in e||"oneOf"in e}k(bd,"isCompound");var dE=k((e,t)=>{const n=e.split("/").pop()||"";return t?n.replaceAll(t,""):n},"basename"),IY=k(e=>{const t=dE(e),n=t.lastIndexOf(".");return n===-1?"":t.slice(n)},"extname"),PY=new Set(["id","$defs","$id","$schema","title","description","default","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","items","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","definitions","properties","patternProperties","dependencies","enum","type","allOf","anyOf","oneOf","not"]);function is(e,t,n){Object.keys(e).forEach(r=>{e[r]&&typeof e[r]=="object"&&!Array.isArray(e[r])&&To(e[r],t,n,r)})}k(is,"traverseObjectKeys");function fu(e,t,n){e.forEach((r,i)=>To(r,t,n,i.toString()))}k(fu,"traverseArray");function To(e,t,n=new Set,r){if(!n.has(e)){if(n.add(e),t(e,r??null),e.anyOf&&fu(e.anyOf,t,n),e.allOf&&fu(e.allOf,t,n),e.oneOf&&fu(e.oneOf,t,n),e.properties&&is(e.properties,t,n),e.patternProperties&&is(e.patternProperties,t,n),e.additionalProperties&&typeof e.additionalProperties=="object"&&To(e.additionalProperties,t,n),e.items){const{items:i}=e;Array.isArray(i)?fu(i,t,n):To(i,t,n)}e.additionalItems&&typeof e.additionalItems=="object"&&To(e.additionalItems,t,n),e.dependencies&&(Array.isArray(e.dependencies)?fu(e.dependencies,t,n):is(e.dependencies,t,n)),e.definitions&&is(e.definitions,t,n),e.$defs&&is(e.$defs,t,n),e.not&&To(e.not,t,n),Object.keys(e).filter(i=>!PY.has(i)).forEach(i=>{const o=e[i];o&&typeof o=="object"&&is(o,t,n)})}}k(To,"traverse");function Lg(e=""){return pE(dE(e))}k(Lg,"justName");function pE(e){return e.replace(IY(e),"")}k(pE,"stripExtension");function $o(e){return(0,TY.default)((0,CY.default)(e).replace(/(^\s*[^a-zA-Z_$])|([^a-zA-Z_$\d])/g," ").replace(/^_[a-z]/g,t=>t.toUpperCase()).replace(/_[a-z]/g,t=>t.substr(1,t.length).toUpperCase()).replace(/([\d$]+[a-zA-Z])/g,t=>t.toUpperCase()).replace(/\s+([a-zA-Z])/g,t=>(0,OY.default)(t.toUpperCase())).replace(/\s/g,""))}k($o,"toSafeString");function hE(e,t){let n=$o(e);if(n||(n="NoName"),t.has(n)){let r=1,i=`${n}${r}`;for(;t.has(i);)i=`${n}${r}`,r++;n=i}return t.add(n),n}k(hE,"generateName");function mE(...e){if(!process.env.VERBOSE)return console.error(e);console.error(...e)}k(mE,"error");function lr(e,t,...n){if(!process.env.VERBOSE)return;let r=null;n.length>1&&typeof n[n.length-1]!="string"&&(r=n.splice(n.length-1,1)),console.info(t,...n),r&&console.dir(r,{depth:6,maxArrayLength:6})}k(lr,"log");function yE(e){const t="* /";if(!(e===null||typeof e!="object"))for(const n of Object.keys(e))n==="description"&&typeof e[n]=="string"&&(e[n]=e[n].replace(/\*\//g,t))}k(yE,"escapeBlockComment");function gE(e){if(!("default"in e))return e;switch(e.type){case"array":if(Array.isArray(e.default))return e;break;case"boolean":if(typeof e.default=="boolean")return e;break;case"integer":case"number":if(typeof e.default=="number")return e;break;case"string":if(typeof e.default=="string")return e;break;case"null":if(e.default===null)return e;break;case"object":if((0,uE.default)(e.default))return e;break}return delete e.default,e}k(gE,"maybeStripDefault");function vE(e){return"$id"in e&&delete e.$id,"description"in e&&delete e.description,"name"in e&&delete e.name,e}k(vE,"maybeStripNameHints");function bE(e,...t){return e?`${e}
|
|
28
28
|
|
|
29
29
|
${t.join(`
|
|
30
30
|
`)}`:t.join(`
|
|
@@ -125,15 +125,15 @@ ${Od(e.value)}`.trim();case St.ZodFirstPartyTypeKind.ZodEnum:return s.values.map
|
|
|
125
125
|
`,i+=`}
|
|
126
126
|
`,i+=`}
|
|
127
127
|
`),i+=`}
|
|
128
|
-
`,i+="})"}let o=n?i?n+i:r?r==="z.never()"?n+".strict()":n+`.catchall(${r})`:n:i||(r?`z.record(${r})`:"z.record(z.any())");return Zn.an.anyOf(e)&&(o+=`.and(${UC(fe(B({},e),{anyOf:e.anyOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?fe(B({},a),{type:"object"}):a)}),t)})`),Zn.a.oneOf(e)&&(o+=`.and(${dv(fe(B({},e),{oneOf:e.oneOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?fe(B({},a),{type:"object"}):a)}),t)})`),Zn.an.allOf(e)&&(o+=`.and(${mc(fe(B({},e),{allOf:e.allOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?fe(B({},a),{type:"object"}):a)}),t)})`),o}k(BC,"parseObject");var EJ=k(e=>{let t="z.string()";return t+=br(e,"format",({value:n})=>{switch(n){case"email":return[".email(",")"];case"ip":return[".ip(",")"];case"ipv4":return['.ip({ version: "v4"',", message: "," })"];case"ipv6":return['.ip({ version: "v6"',", message: "," })"];case"uri":return[".url(",")"];case"uuid":return[".uuid(",")"];case"date-time":return[".datetime(",")"]}}),t+=br(e,"pattern",({json:n})=>[`.regex(new RegExp(${n})`,", ",")"]),t+=br(e,"minLength",({json:n})=>[`.min(${n}`,", ",")"]),t+=br(e,"maxLength",({json:n})=>[`.max(${n}`,", ",")"]),t},"parseString"),AJ=k((e,t)=>`${ir(gJ(e,"nullable"),t,!0)}.nullable()`,"parseNullable"),CJ=k((e,t)=>{var n,r;if(e.oneOf.length<=1||!((n=e.discriminator)!=null&&n.propertyName))return dv(e,t);const i=e.oneOf.map((o,a)=>ir(o,fe(B({},t),{path:[...t.path,"oneOf",a]})));return`z.discriminatedUnion("${(r=e.discriminator)==null?void 0:r.propertyName}", [${i.join(", ")}])`},"parseDiscriminator"),ir=k((e,t={seen:new Map,path:[]},n)=>{if(typeof e!="object")return e?"z.any()":"z.never()";if(t.parserOverride){const o=t.parserOverride(e,t);if(typeof o=="string")return o}let r=t.seen.get(e);if(r){if(r.r!==void 0)return r.r;if(t.depth===void 0||r.n>=t.depth)return"z.any()";r.n+=1}else r={r:void 0,n:0},t.seen.set(e,r);let i=$J(e,t);return n||(i=OJ(e,i),t.withoutDefaults||(i=TJ(e,i))),r.r=i,i},"parseSchema"),OJ=k((e,t)=>(e.description&&(t+=`.describe(${JSON.stringify(e.description)})`),t),"addMeta"),TJ=k((e,t)=>(e.default!==void 0&&(t+=`.default(${JSON.stringify(e.default)})`),t),"addDefaults"),$J=k((e,t)=>Zn.a.nullable(e)?AJ(e,t):Zn.an.object(e)?BC(e,t):Zn.an.array(e)?bJ(e,t):Zn.an.anyOf(e)?UC(e,t):Zn.an.allOf(e)?mc(e,t):Zn.a.discriminator(e)?CJ(e,t):Zn.a.oneOf(e)?dv(e,t):Zn.a.not(e)?hJ(e,t):Zn.an.enum(e)?wJ(e):Zn.a.const(e)?_J(e):Zn.a.multipleType(e)?pJ(e,t):Zn.a.primitive(e,"string")?EJ(e):Zn.a.primitive(e,"number")||Zn.a.primitive(e,"integer")?SJ(e):Zn.a.primitive(e,"boolean")?fJ(e):Zn.a.primitive(e,"null")?mJ(e):Zn.a.conditional(e)?xJ(e,t):dJ(e),"selectParser"),Zn={an:{object:e=>e.type==="object",array:e=>e.type==="array",anyOf:e=>e.anyOf!==void 0,allOf:e=>e.allOf!==void 0,enum:e=>e.enum!==void 0},a:{nullable:e=>e.nullable===!0,multipleType:e=>Array.isArray(e.type),not:e=>e.not!==void 0,const:e=>e.const!==void 0,primitive:(e,t)=>e.type===t,conditional:e=>!!("if"in e&&e.if&&"then"in e&&"else"in e&&e.then&&e.else),discriminator:e=>{var t;return e.oneOf!==void 0&&((t=e.discriminator)==null?void 0:t.propertyName)!==void 0},oneOf:e=>e.oneOf!==void 0}},kJ=k(e=>ir(e,{seen:new Map,path:[]}),"jsonSchemaToZodStr"),IJ=k(e=>{let t=kJ(e);return t=t.replaceAll("errors: z.ZodError[]","errors"),new Function("z",`return ${t}`)(Bn)},"jsonSchemaToZod"),yc=k((e,t)=>{var n,r;if(t[yn]&&e._def&&(e._def[yn]=t[yn]),((n=e._def)==null?void 0:n.typeName)==="ZodObject"&&t.type==="object"&&t.properties&&Object.entries(t.properties).forEach(([i,o])=>{const a=typeof e._def.shape=="function"?e._def.shape():e._def.shape;a[i]&&yc(a[i],o)}),((r=e._def)==null?void 0:r.typeName)==="ZodRecord"&&t.type==="object"&&t.additionalProperties&&yc(e._def.valueType,t.additionalProperties),t.type==="array"&&t.items){const i=t.items;if(typeof i=="object"&&!Array.isArray(i)){const o=e._def.type;o&&yc(o,i)}else Array.isArray(i)&&i.forEach((o,a)=>{const s=e._def;s.typeName===Bn.ZodFirstPartyTypeKind.ZodTuple&&yc(s.items[a],o)})}},"applyZuiPropsRecursively"),gc=k(e=>{const t=IJ(e);return yc(t,e),t},"jsonSchemaToZui"),Rr=mn(C,1),Zr=C,PJ=mn(C,1),zC=(0,Zr.createContext)({formData:void 0,formSchema:void 0,setFormData:()=>{throw new Error("Must be within a FormDataProvider")},setHiddenState:()=>{throw new Error("Must be within a FormDataProvider")},setDisabledState:()=>{throw new Error("Must be within a FormDataProvider")},hiddenState:{},disabledState:{},disableValidation:!1}),ZC=k((e,t,n)=>{var r;const i=(r=t[yn])==null?void 0:r[e];if(typeof i>"u")return!1;if(typeof i=="boolean")return i;if(typeof i=="string"){if(typeof window>"u")return console.warn("Function evaluation is not supported in server side rendering"),!1;const a=new Function("return "+i)()(n);switch(typeof a){case"object":case"boolean":return a;default:return!1}}return!1},"parseMaskableField"),HC=k((e,t)=>{const n=(0,Zr.useContext)(zC);if(n===void 0)throw new Error("useFormData must be used within a FormDataProvider");const r=(0,Zr.useMemo)(()=>ps(n.formData,t),[n.formData,t]);(0,Zr.useEffect)(()=>{(r===null||typeof r>"u")&&n.setFormData(ds(n.formData,t,pv(e)))},[e]);const i=(0,Zr.useMemo)(()=>{if(n.disableValidation)return{formValid:null,formErrors:null};if(!n.formSchema)return{formValid:null,formErrors:null};const m=gc(n.formSchema).safeParse(n.formData);return m.success?{formValid:!0,formErrors:[]}:{formValid:!1,formErrors:m.error.issues}},[n.formData]),o=(0,Zr.useMemo)(()=>ZC("hidden",e,r),[e,r]),a=(0,Zr.useMemo)(()=>ZC("disabled",e,r),[e,r]);(0,Zr.useEffect)(()=>{n.setHiddenState(ds(n.hiddenState,t,o||{})),n.setDisabledState(ds(n.disabledState,t,a||{}))},[o,a]);const{disabled:s,hidden:l}=(0,Zr.useMemo)(()=>{const m=o===!0||ps(n.hiddenState,t),h=a===!0||ps(n.disabledState,t);return{hidden:m===!0,disabled:h===!0}},[n.hiddenState,n.disabledState,o,a,t]),c=(0,Zr.useCallback)((m,h)=>{n.setFormData(ds(n.formData,m,h))},[n.formData]),d=(0,Zr.useCallback)((m,h)=>{const y=ps(n.formData,m)||[];n.setFormData(ds(n.formData,m,[...y,h]))},[n.formData]),p=(0,Zr.useCallback)((m,h)=>{const y=ps(n.formData,m);y.splice(h,1),n.setFormData(ds(n.formData,m,y))},[n.formData]);return B(fe(B({},n),{data:r,disabled:s,hidden:l,handlePropertyChange:c,addArrayItem:d,removeArrayItem:p}),i)},"useFormData");function ds(e,t,n){if(t.length===0)return n;const r=t.length;return t.reduce((i,o,a)=>(a===r-1?i[o]=n:i[o]||(i[o]=isNaN(Number(o))?{}:[]),i[o]),e??{}),B({},e)}k(ds,"setObjectPath");var pv=k(e=>Array.isArray(e)?e.map(t=>pv(t)):e.type==="object"?e.default||{}:e.type==="array"?e.default||[]:e.type==="string"?e.default||"":e.type==="number"?typeof e.default=="number"?e.default:0:e.type==="boolean"?typeof e.default=="boolean"?e.default:!1:e.default?e.default:null,"getDefaultItemData"),RJ=k(({children:e,setFormData:t,formData:n,formSchema:r,disableValidation:i})=>{const[o,a]=(0,Zr.useState)({}),[s,l]=(0,Zr.useState)({});return PJ.default.createElement(zC.Provider,{value:{formData:n,setFormData:t,formSchema:r,disableValidation:i,hiddenState:o,setHiddenState:a,disabledState:s,setDisabledState:l}},e)},"FormDataProvider");function ps(e,t){return t.reduce((n,r)=>n?n[r]:null,e)}k(ps,"getPathData");function hv(e,t){return t||(t=new RegExp("/s|-|_| ","g")),KC(e).split(t).map(WC).map(GC).reduce(VC)}k(hv,"formatTitle");function WC(e){return e.charAt(0).toUpperCase()+e.substring(1)}k(WC,"capitalize");function VC(e,t){return`${e} ${t}`}k(VC,"combine");function KC(e){return e.replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1_$2").toLowerCase()}k(KC,"decamelize");function GC(e,t,n){const r=e.toLowerCase(),i=e.toUpperCase();for(const o of LJ)if(o.toLowerCase()===r)return o;return DJ.includes(i)?i:t===0||t===n.length-1||e.length>=4?e:jJ.includes(r)||MJ.includes(r)||NJ.includes(r)?r:e}k(GC,"handleSpecialWords");var DJ=["2D","3D","4WD","A2O","API","BIOS","CCTV","CC","CCV","CD","CD-ROM","COBOL","CIA","CMS","CSS","CSV","CV","DIY","DVD","DB","DNA","E3","EIN","ESPN","FAQ","FAQs","FTP","FPS","FORTRAN","FBI","HTML","HTTP","ID","IP","ISO","JS","JSON","LASER","M2A","M2M","M2MM","M2O","MMORPG","NAFTA","NASA","NDA","O2M","PDF","PHP","POP","RAM","RNGR","ROM","RPG","RTFM","RTS","SCUBA","SITCOM","SKU","SMTP","SQL","SSN","SWAT","TBS","TTL","TV","TNA","UI","URL","USB","UWP","VIP","W3C","WYSIWYG","WWW","WWE","WWF"],NJ=["a","an","the"],MJ=["and","that","but","or","as","if","when","than","because","while","where","after","so","though","since","until","whether","before","although","nor","like","once","unless","now","except"],jJ=["about","above","across","after","against","along","among","around","at","because of","before","behind","below","beneath","beside","besides","between","beyond","but","by","concerning","despite","down","during","except","excepting","for","from","in","in front of","inside","in spite of","instead of","into","like","near","of","off","on","onto","out","outside","over","past","regarding","since","through","throughout","to","toward","under","underneath","until","up","upon","up to","with","within","without","with regard to","with respect to"],LJ=["2FA","3D","4K","5K","8K","AGI","BI","ChatGPT","CTA","DateTime","GitHub","GPT","HD","IBMid","ID","IDs","iMac","IMAX","iOS","IP","iPad","iPhone","iPod","LDAP","LinkedIn","LLM","M2M","M2O","macOS","McDonalds","ML","MySQL","NLG","NLP","NLU","O2M","OpenAI","PDFs","PEFT","pH","PostgreSQL","SEO","TTS","UHD","UUID","XSS","YouTube"],YC=mn(C,1),JC=class extends YC.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n)}render(){return this.state.hasError&&this.props.fallback?YC.default.createElement(this.props.fallback,{error:this.state.error,schema:this.props.fieldSchema}):this.props.children}};k(JC,"ErrorBoundary");var Tp=JC,XC=C,FJ=k((e,t)=>{const{handlePropertyChange:n,data:r}=HC(e,t),{discriminator:i,value:o,discriminatedSchema:a}=(0,XC.useMemo)(()=>{const s=QC(e.anyOf),l=s!=null&&s.key?r==null?void 0:r[s.key]:e.default||null,c=qJ((s==null?void 0:s.key)||null,l,e.anyOf);return{discriminator:s,value:l,discriminatedSchema:c}},[e.anyOf,r]);return(0,XC.useEffect)(()=>{i!=null&&i.key&&(i!=null&&i.values.length)&&Object.keys(r||{}).length<1&&!e.default&&n(t,{[i.key]:i.values[0]})},[]),{discriminator:i,discriminatorValue:o,discriminatedSchema:a}},"useDiscriminator"),QC=k(e=>{const t=e==null?void 0:e.map(n=>n.type!=="object"||!n.properties?null:Object.entries(n.properties).map(([r,i])=>{var o;return i.type==="string"&&((o=i.enum)!=null&&o.length)?{key:r,value:i.enum[0]}:null}).filter(r=>!!r)).flat().reduce((n,r)=>{if(!r)return n;const{key:i,value:o}=r;return n.key===null&&(n.key=i),n.key===i&&n.values.push(o),n},{key:null,values:[]});return(t==null?void 0:t.key)===null||!(t!=null&&t.values.length)?null:t},"resolveDiscriminator"),qJ=k((e,t,n)=>{var r,i;if(!(n!=null&&n.length)||!e||!t)return null;for(const o of n){if(o.type!=="object")continue;const a=(r=o.properties)==null?void 0:r[e];if((a==null?void 0:a.type)==="string"&&((i=a.enum)!=null&&i.length)&&a.enum[0]===t)return fe(B({},o),{properties:fe(B({},o.properties),{[e]:fe(B({},a),{[yn]:{hidden:!0}})})})}return null},"resolveDiscriminatedSchema"),UJ=k(e=>{var t;return(t=e.anyOf)!=null&&t.length?QC(e.anyOf)?"discriminatedUnion":"object":e.type==="integer"?"number":e.type},"getSchemaType"),BJ=k((e,t)=>{var n,r,i;const o=UJ(t),a=((n=t[yn])==null?void 0:n.displayAs)||null;if(!a||!Array.isArray(a)||a.length<2){const d=(r=e==null?void 0:e[o])==null?void 0:r.default;return d?{Component:d,type:o,id:"default",params:{}}:null}const s=a[0],l=((i=e==null?void 0:e[o])==null?void 0:i[s])||null;if(!l)return console.warn(`Component ${o}.${s} not found`),null;const c=a[1]||{};return{Component:l,type:o,id:s,params:c}},"resolveComponent"),zJ=k(({schema:e,components:t,onChange:n,value:r,disableValidation:i,fallback:o})=>Rr.default.createElement(RJ,{formData:r||{},setFormData:n,formSchema:e,disableValidation:i||!1},Rr.default.createElement(Tp,{fallback:o,fieldSchema:e,path:[]},Rr.default.createElement($p,{components:t,fieldSchema:e,path:[],fallback:o,required:!0,isArrayChild:!1}))),"ZuiForm"),$p=k(e=>{var t=e,{components:n,fieldSchema:r,path:i,required:o,fallback:a}=t,s=iE(t,["components","fieldSchema","path","required","fallback"]),l,c;const{formData:d,disabled:p,hidden:m,handlePropertyChange:h,addArrayItem:y,removeArrayItem:v,formErrors:w,formValid:_}=HC(r,i),b=(0,Rr.useMemo)(()=>ps(d,i),[d,i]),S=(0,Rr.useMemo)(()=>BJ(n,r),[r,n]),{discriminator:A,discriminatedSchema:E,discriminatorValue:T}=FJ(r,i);if(!S||m===!0)return null;const{Component:N,type:L}=S,F={type:L,componentID:S.id,scope:i.join("."),context:{path:i,readonly:!1,formData:d,formErrors:w,formValid:_,updateForm:h},onChange:re=>h(i,re),disabled:p,errors:(w==null?void 0:w.filter(re=>re.path===i))||[],label:((l=r[yn])==null?void 0:l.title)||hv(((c=i[i.length-1])==null?void 0:c.toString())||""),params:S.params,schema:r,zuiProps:r[yn]};if(r.type==="array"&&L==="array"){const re=N,Q=F.schema,G=Array.isArray(b)||typeof b=="object"?b:[],V=B(fe(B({},F),{type:L,schema:Q,data:G,addItem:(q=void 0)=>y(i,typeof q>"u"?pv(Q.items):q),removeItem:q=>v(i,q)}),s);return Array.isArray(r.items)?null:Rr.default.createElement(re,fe(B({key:F.scope},V),{isArrayChild:V.isArrayChild}),Array.isArray(V.data)?V.data.map((q,Y)=>{const ne=[...i,Y.toString()];return Rr.default.createElement(Tp,{key:ne.join("."),fallback:a,fieldSchema:r.items,path:ne},Rr.default.createElement($p,{key:ne.join("."),components:n,fieldSchema:r.items,path:ne,required:o,isArrayChild:!0,index:Y,removeSelf:()=>v(i,Y),fallback:a}))}):[])}if(r.type==="object"&&L==="object"&&r.properties){const re=N,Q=B(fe(B({},F),{type:L,schema:F.schema,data:b||{}}),s);return Rr.default.createElement(re,fe(B({key:F.scope},Q),{isArrayChild:Q.isArrayChild}),Object.entries(r.properties).map(([G,V])=>{var q;const Y=[...i,G];return Rr.default.createElement(Tp,{key:Y.join("."),fallback:a,fieldSchema:V,path:Y},Rr.default.createElement($p,{key:Y.join("."),components:n,fieldSchema:V,path:Y,required:((q=r.required)==null?void 0:q.includes(G))||!1,isArrayChild:!1,fallback:a}))}))}if(L==="discriminatedUnion"){const re=N,Q=B(fe(B({},F),{type:L,schema:F.schema,data:b||{},discriminatorKey:(A==null?void 0:A.key)||null,discriminatorLabel:hv((A==null?void 0:A.key)||"Unknown"),discriminatorOptions:(A==null?void 0:A.values)||null,discriminatorValue:T,setDiscriminator:G=>{if(!(A!=null&&A.key)){console.warn("No discriminator key found, cannot set discriminator");return}h(i,{[A.key]:G})}}),s);return Rr.default.createElement(re,fe(B({key:F.scope},Q),{isArrayChild:Q.isArrayChild}),E&&Rr.default.createElement(Tp,{key:i.join("."),fallback:a,fieldSchema:E,path:i},Rr.default.createElement($p,{components:n,fieldSchema:E,path:i,required:o,isArrayChild:!1,fallback:a})))}const j=N,H=B(fe(B({},F),{type:L,schema:F.schema,config:{},required:o,data:b,description:r.description}),s);return Rr.default.createElement(j,B({},H))},"FormElementRenderer"),ZJ={jsonSchemaToZui:gc,zuiToJsonSchema:Cp,objectToZui:xu,toTypescript:$d,zuiToTypescriptTypings:FE};const mv={},hs=Jf(Object.freeze(Object.defineProperty({__proto__:null,default:mv},Symbol.toStringTag,{value:"Module"})));function eO(e,t){return function(){return e.apply(t,arguments)}}const{toString:HJ}=Object.prototype,{getPrototypeOf:yv}=Object,kp=(e=>t=>{const n=HJ.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ri=e=>(e=e.toLowerCase(),t=>kp(t)===e),Ip=e=>t=>typeof t===e,{isArray:Eu}=Array,vc=Ip("undefined");function WJ(e){return e!==null&&!vc(e)&&e.constructor!==null&&!vc(e.constructor)&&bi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tO=Ri("ArrayBuffer");function VJ(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tO(e.buffer),t}const KJ=Ip("string"),bi=Ip("function"),nO=Ip("number"),Pp=e=>e!==null&&typeof e=="object",GJ=e=>e===!0||e===!1,Rp=e=>{if(kp(e)!=="object")return!1;const t=yv(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},YJ=Ri("Date"),JJ=Ri("File"),XJ=Ri("Blob"),QJ=Ri("FileList"),eX=e=>Pp(e)&&bi(e.pipe),tX=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bi(e.append)&&((t=kp(e))==="formdata"||t==="object"&&bi(e.toString)&&e.toString()==="[object FormData]"))},nX=Ri("URLSearchParams"),[rX,iX,oX,aX]=["ReadableStream","Request","Response","Headers"].map(Ri),sX=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bc(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Eu(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],t.call(null,e[s],s,e)}}function rO(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const iO=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),oO=e=>!vc(e)&&e!==iO;function gv(){const{caseless:e}=oO(this)&&this||{},t={},n=(r,i)=>{const o=e&&rO(t,i)||i;Rp(t[o])&&Rp(r)?t[o]=gv(t[o],r):Rp(r)?t[o]=gv({},r):Eu(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&bc(arguments[r],n);return t}const uX=(e,t,n,{allOwnKeys:r}={})=>(bc(t,(i,o)=>{n&&bi(i)?e[o]=eO(i,n):e[o]=i},{allOwnKeys:r}),e),lX=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),cX=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},fX=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&yv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},dX=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},pX=e=>{if(!e)return null;if(Eu(e))return e;let t=e.length;if(!nO(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},hX=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&yv(Uint8Array)),mX=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},yX=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},gX=Ri("HTMLFormElement"),vX=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),aO=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),bX=Ri("RegExp"),sO=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};bc(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},_X=e=>{sO(e,(t,n)=>{if(bi(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(bi(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},wX=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Eu(e)?r(e):r(String(e).split(t)),n},xX=()=>{},SX=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,vv="abcdefghijklmnopqrstuvwxyz",uO="0123456789",lO={DIGIT:uO,ALPHA:vv,ALPHA_DIGIT:vv+vv.toUpperCase()+uO},EX=(e=16,t=lO.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function AX(e){return!!(e&&bi(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const CX=e=>{const t=new Array(10),n=(r,i)=>{if(Pp(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Eu(r)?[]:{};return bc(r,(a,s)=>{const l=n(a,i+1);!vc(l)&&(o[s]=l)}),t[i]=void 0,o}}return r};return n(e,0)},OX=Ri("AsyncFunction"),de={isArray:Eu,isArrayBuffer:tO,isBuffer:WJ,isFormData:tX,isArrayBufferView:VJ,isString:KJ,isNumber:nO,isBoolean:GJ,isObject:Pp,isPlainObject:Rp,isReadableStream:rX,isRequest:iX,isResponse:oX,isHeaders:aX,isUndefined:vc,isDate:YJ,isFile:JJ,isBlob:XJ,isRegExp:bX,isFunction:bi,isStream:eX,isURLSearchParams:nX,isTypedArray:hX,isFileList:QJ,forEach:bc,merge:gv,extend:uX,trim:sX,stripBOM:lX,inherits:cX,toFlatObject:fX,kindOf:kp,kindOfTest:Ri,endsWith:dX,toArray:pX,forEachEntry:mX,matchAll:yX,isHTMLForm:gX,hasOwnProperty:aO,hasOwnProp:aO,reduceDescriptors:sO,freezeMethods:_X,toObjectSet:wX,toCamelCase:vX,noop:xX,toFiniteNumber:SX,findKey:rO,global:iO,isContextDefined:oO,ALPHABET:lO,generateString:EX,isSpecCompliantForm:AX,toJSONObject:CX,isAsyncFn:OX,isThenable:e=>e&&(Pp(e)||bi(e))&&bi(e.then)&&bi(e.catch)};function Dt(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}de.inherits(Dt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:de.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const cO=Dt.prototype,fO={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{fO[e]={value:e}}),Object.defineProperties(Dt,fO),Object.defineProperty(cO,"isAxiosError",{value:!0}),Dt.from=(e,t,n,r,i,o)=>{const a=Object.create(cO);return de.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Dt.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const TX=null;function bv(e){return de.isPlainObject(e)||de.isArray(e)}function dO(e){return de.endsWith(e,"[]")?e.slice(0,-2):e}function pO(e,t,n){return e?e.concat(t).map(function(i,o){return i=dO(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function $X(e){return de.isArray(e)&&!e.some(bv)}const kX=de.toFlatObject(de,{},null,function(t){return/^is[A-Z]/.test(t)});function Dp(e,t,n){if(!de.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=de.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!de.isUndefined(w[v])});const r=n.metaTokens,i=n.visitor||d,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&de.isSpecCompliantForm(t);if(!de.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(de.isDate(y))return y.toISOString();if(!l&&de.isBlob(y))throw new Dt("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(y)||de.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function d(y,v,w){let _=y;if(y&&!w&&typeof y=="object"){if(de.endsWith(v,"{}"))v=r?v:v.slice(0,-2),y=JSON.stringify(y);else if(de.isArray(y)&&$X(y)||(de.isFileList(y)||de.endsWith(v,"[]"))&&(_=de.toArray(y)))return v=dO(v),_.forEach(function(S,A){!(de.isUndefined(S)||S===null)&&t.append(a===!0?pO([v],A,o):a===null?v:v+"[]",c(S))}),!1}return bv(y)?!0:(t.append(pO(w,v,o),c(y)),!1)}const p=[],m=Object.assign(kX,{defaultVisitor:d,convertValue:c,isVisitable:bv});function h(y,v){if(!de.isUndefined(y)){if(p.indexOf(y)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(y),de.forEach(y,function(_,b){(!(de.isUndefined(_)||_===null)&&i.call(t,_,de.isString(b)?b.trim():b,v,m))===!0&&h(_,v?v.concat(b):[b])}),p.pop()}}if(!de.isObject(e))throw new TypeError("data must be an object");return h(e),t}function hO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function _v(e,t){this._pairs=[],e&&Dp(e,this,t)}const mO=_v.prototype;mO.append=function(t,n){this._pairs.push([t,n])},mO.toString=function(t){const n=t?function(r){return t.call(this,r,hO)}:hO;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function IX(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yO(e,t,n){if(!t)return e;const r=n&&n.encode||IX,i=n&&n.serialize;let o;if(i?o=i(t,n):o=de.isURLSearchParams(t)?t.toString():new _v(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}const gO=class{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){de.forEach(this.handlers,function(r){r!==null&&t(r)})}},vO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},PX={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:_v,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},wv=typeof window<"u"&&typeof document<"u",RX=(e=>wv&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),DX=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),NX=wv&&window.location.href||"http://localhost",Di={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:wv,hasStandardBrowserEnv:RX,hasStandardBrowserWebWorkerEnv:DX,origin:NX},Symbol.toStringTag,{value:"Module"})),...PX};function MX(e,t){return Dp(e,new Di.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Di.isNode&&de.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function jX(e){return de.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function LX(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function bO(e){function t(n,r,i,o){let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),l=o>=n.length;return a=!a&&de.isArray(i)?i.length:a,l?(de.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!de.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&de.isArray(i[a])&&(i[a]=LX(i[a])),!s)}if(de.isFormData(e)&&de.isFunction(e.entries)){const n={};return de.forEachEntry(e,(r,i)=>{t(jX(r),i,n,0)}),n}return null}function FX(e,t,n){if(de.isString(e))try{return(t||JSON.parse)(e),de.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const xv={transitional:vO,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=de.isObject(t);if(o&&de.isHTMLForm(t)&&(t=new FormData(t)),de.isFormData(t))return i?JSON.stringify(bO(t)):t;if(de.isArrayBuffer(t)||de.isBuffer(t)||de.isStream(t)||de.isFile(t)||de.isBlob(t)||de.isReadableStream(t))return t;if(de.isArrayBufferView(t))return t.buffer;if(de.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return MX(t,this.formSerializer).toString();if((s=de.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Dp(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),FX(t)):t}],transformResponse:[function(t){const n=this.transitional||xv.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(de.isResponse(t)||de.isReadableStream(t))return t;if(t&&de.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Dt.from(s,Dt.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Di.classes.FormData,Blob:Di.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],e=>{xv.headers[e]={}});const Sv=xv,qX=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),UX=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
128
|
+
`,i+="})"}let o=n?i?n+i:r?r==="z.never()"?n+".strict()":n+`.catchall(${r})`:n:i||(r?`z.record(${r})`:"z.record(z.any())");return Zn.an.anyOf(e)&&(o+=`.and(${UC(fe(B({},e),{anyOf:e.anyOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?fe(B({},a),{type:"object"}):a)}),t)})`),Zn.a.oneOf(e)&&(o+=`.and(${dv(fe(B({},e),{oneOf:e.oneOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?fe(B({},a),{type:"object"}):a)}),t)})`),Zn.an.allOf(e)&&(o+=`.and(${mc(fe(B({},e),{allOf:e.allOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?fe(B({},a),{type:"object"}):a)}),t)})`),o}k(BC,"parseObject");var EJ=k(e=>{let t="z.string()";return t+=br(e,"format",({value:n})=>{switch(n){case"email":return[".email(",")"];case"ip":return[".ip(",")"];case"ipv4":return['.ip({ version: "v4"',", message: "," })"];case"ipv6":return['.ip({ version: "v6"',", message: "," })"];case"uri":return[".url(",")"];case"uuid":return[".uuid(",")"];case"date-time":return[".datetime(",")"]}}),t+=br(e,"pattern",({json:n})=>[`.regex(new RegExp(${n})`,", ",")"]),t+=br(e,"minLength",({json:n})=>[`.min(${n}`,", ",")"]),t+=br(e,"maxLength",({json:n})=>[`.max(${n}`,", ",")"]),t},"parseString"),AJ=k((e,t)=>`${ir(gJ(e,"nullable"),t,!0)}.nullable()`,"parseNullable"),CJ=k((e,t)=>{var n,r;if(e.oneOf.length<=1||!((n=e.discriminator)!=null&&n.propertyName))return dv(e,t);const i=e.oneOf.map((o,a)=>ir(o,fe(B({},t),{path:[...t.path,"oneOf",a]})));return`z.discriminatedUnion("${(r=e.discriminator)==null?void 0:r.propertyName}", [${i.join(", ")}])`},"parseDiscriminator"),ir=k((e,t={seen:new Map,path:[]},n)=>{if(typeof e!="object")return e?"z.any()":"z.never()";if(t.parserOverride){const o=t.parserOverride(e,t);if(typeof o=="string")return o}let r=t.seen.get(e);if(r){if(r.r!==void 0)return r.r;if(t.depth===void 0||r.n>=t.depth)return"z.any()";r.n+=1}else r={r:void 0,n:0},t.seen.set(e,r);let i=$J(e,t);return n||(i=OJ(e,i),t.withoutDefaults||(i=TJ(e,i))),r.r=i,i},"parseSchema"),OJ=k((e,t)=>(e.description&&(t+=`.describe(${JSON.stringify(e.description)})`),t),"addMeta"),TJ=k((e,t)=>(e.default!==void 0&&(t+=`.default(${JSON.stringify(e.default)})`),t),"addDefaults"),$J=k((e,t)=>Zn.a.nullable(e)?AJ(e,t):Zn.an.object(e)?BC(e,t):Zn.an.array(e)?bJ(e,t):Zn.an.anyOf(e)?UC(e,t):Zn.an.allOf(e)?mc(e,t):Zn.a.discriminator(e)?CJ(e,t):Zn.a.oneOf(e)?dv(e,t):Zn.a.not(e)?hJ(e,t):Zn.an.enum(e)?wJ(e):Zn.a.const(e)?_J(e):Zn.a.multipleType(e)?pJ(e,t):Zn.a.primitive(e,"string")?EJ(e):Zn.a.primitive(e,"number")||Zn.a.primitive(e,"integer")?SJ(e):Zn.a.primitive(e,"boolean")?fJ(e):Zn.a.primitive(e,"null")?mJ(e):Zn.a.conditional(e)?xJ(e,t):dJ(e),"selectParser"),Zn={an:{object:e=>e.type==="object",array:e=>e.type==="array",anyOf:e=>e.anyOf!==void 0,allOf:e=>e.allOf!==void 0,enum:e=>e.enum!==void 0},a:{nullable:e=>e.nullable===!0,multipleType:e=>Array.isArray(e.type),not:e=>e.not!==void 0,const:e=>e.const!==void 0,primitive:(e,t)=>e.type===t,conditional:e=>!!("if"in e&&e.if&&"then"in e&&"else"in e&&e.then&&e.else),discriminator:e=>{var t;return e.oneOf!==void 0&&((t=e.discriminator)==null?void 0:t.propertyName)!==void 0},oneOf:e=>e.oneOf!==void 0}},kJ=k(e=>ir(e,{seen:new Map,path:[]}),"jsonSchemaToZodStr"),IJ=k(e=>{let t=kJ(e);return t=t.replaceAll("errors: z.ZodError[]","errors"),new Function("z",`return ${t}`)(Bn)},"jsonSchemaToZod"),yc=k((e,t)=>{var n,r;if(t[yn]&&e._def&&(e._def[yn]=t[yn]),((n=e._def)==null?void 0:n.typeName)==="ZodObject"&&t.type==="object"&&t.properties&&Object.entries(t.properties).forEach(([i,o])=>{const a=typeof e._def.shape=="function"?e._def.shape():e._def.shape;a[i]&&yc(a[i],o)}),((r=e._def)==null?void 0:r.typeName)==="ZodRecord"&&t.type==="object"&&t.additionalProperties&&yc(e._def.valueType,t.additionalProperties),t.type==="array"&&t.items){const i=t.items;if(typeof i=="object"&&!Array.isArray(i)){const o=e._def.type;o&&yc(o,i)}else Array.isArray(i)&&i.forEach((o,a)=>{const s=e._def;s.typeName===Bn.ZodFirstPartyTypeKind.ZodTuple&&yc(s.items[a],o)})}},"applyZuiPropsRecursively"),gc=k(e=>{const t=IJ(e);return yc(t,e),t},"jsonSchemaToZui"),Rr=mn(C,1),Zr=C,PJ=mn(C,1),zC=(0,Zr.createContext)({formData:void 0,formSchema:void 0,setFormData:()=>{throw new Error("Must be within a FormDataProvider")},setHiddenState:()=>{throw new Error("Must be within a FormDataProvider")},setDisabledState:()=>{throw new Error("Must be within a FormDataProvider")},hiddenState:{},disabledState:{},disableValidation:!1}),ZC=k((e,t,n)=>{var r;const i=(r=t[yn])==null?void 0:r[e];if(typeof i>"u")return!1;if(typeof i=="boolean")return i;if(typeof i=="string"){if(typeof window>"u")return console.warn("Function evaluation is not supported in server side rendering"),!1;const a=new Function("return "+i)()(n);switch(typeof a){case"object":case"boolean":return a;default:return!1}}return!1},"parseMaskableField"),HC=k((e,t)=>{const n=(0,Zr.useContext)(zC);if(n===void 0)throw new Error("useFormData must be used within a FormDataProvider");const r=(0,Zr.useMemo)(()=>ps(n.formData,t),[n.formData,t]);(0,Zr.useEffect)(()=>{(r===null||typeof r>"u")&&n.setFormData(ds(n.formData,t,pv(e)))},[e]);const i=(0,Zr.useMemo)(()=>{if(n.disableValidation)return{formValid:null,formErrors:null};if(!n.formSchema)return{formValid:null,formErrors:null};const m=gc(n.formSchema).safeParse(n.formData);return m.success?{formValid:!0,formErrors:[]}:{formValid:!1,formErrors:m.error.issues}},[n.formData]),o=(0,Zr.useMemo)(()=>ZC("hidden",e,r),[e,r]),a=(0,Zr.useMemo)(()=>ZC("disabled",e,r),[e,r]);(0,Zr.useEffect)(()=>{n.setHiddenState(ds(n.hiddenState,t,o||{})),n.setDisabledState(ds(n.disabledState,t,a||{}))},[o,a]);const{disabled:s,hidden:l}=(0,Zr.useMemo)(()=>{const m=o===!0||ps(n.hiddenState,t),h=a===!0||ps(n.disabledState,t);return{hidden:m===!0,disabled:h===!0}},[n.hiddenState,n.disabledState,o,a,t]),c=(0,Zr.useCallback)((m,h)=>{n.setFormData(ds(n.formData,m,h))},[n.formData]),d=(0,Zr.useCallback)((m,h)=>{const y=ps(n.formData,m)||[];n.setFormData(ds(n.formData,m,[...y,h]))},[n.formData]),p=(0,Zr.useCallback)((m,h)=>{const y=ps(n.formData,m);y.splice(h,1),n.setFormData(ds(n.formData,m,y))},[n.formData]);return B(fe(B({},n),{data:r,disabled:s,hidden:l,handlePropertyChange:c,addArrayItem:d,removeArrayItem:p}),i)},"useFormData");function ds(e,t,n){if(t.length===0)return n;const r=t.length;return t.reduce((i,o,a)=>(a===r-1?i[o]=n:i[o]||(i[o]=isNaN(Number(o))?{}:[]),i[o]),e??{}),B({},e)}k(ds,"setObjectPath");var pv=k(e=>Array.isArray(e)?e.map(t=>pv(t)):e.type==="object"?e.default||{}:e.type==="array"?e.default||[]:e.type==="string"?e.default||"":e.type==="number"?typeof e.default=="number"?e.default:0:e.type==="boolean"?typeof e.default=="boolean"?e.default:!1:e.default?e.default:null,"getDefaultItemData"),RJ=k(({children:e,setFormData:t,formData:n,formSchema:r,disableValidation:i})=>{const[o,a]=(0,Zr.useState)({}),[s,l]=(0,Zr.useState)({});return PJ.default.createElement(zC.Provider,{value:{formData:n,setFormData:t,formSchema:r,disableValidation:i,hiddenState:o,setHiddenState:a,disabledState:s,setDisabledState:l}},e)},"FormDataProvider");function ps(e,t){return t.reduce((n,r)=>n?n[r]:null,e)}k(ps,"getPathData");function hv(e,t){return t||(t=new RegExp("/s|-|_| ","g")),KC(e).split(t).map(WC).map(GC).reduce(VC)}k(hv,"formatTitle");function WC(e){return e.charAt(0).toUpperCase()+e.substring(1)}k(WC,"capitalize");function VC(e,t){return`${e} ${t}`}k(VC,"combine");function KC(e){return e.replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1_$2").toLowerCase()}k(KC,"decamelize");function GC(e,t,n){const r=e.toLowerCase(),i=e.toUpperCase();for(const o of LJ)if(o.toLowerCase()===r)return o;return DJ.includes(i)?i:t===0||t===n.length-1||e.length>=4?e:jJ.includes(r)||MJ.includes(r)||NJ.includes(r)?r:e}k(GC,"handleSpecialWords");var DJ=["2D","3D","4WD","A2O","API","BIOS","CCTV","CC","CCV","CD","CD-ROM","COBOL","CIA","CMS","CSS","CSV","CV","DIY","DVD","DB","DNA","E3","EIN","ESPN","FAQ","FAQs","FTP","FPS","FORTRAN","FBI","HTML","HTTP","ID","IP","ISO","JS","JSON","LASER","M2A","M2M","M2MM","M2O","MMORPG","NAFTA","NASA","NDA","O2M","PDF","PHP","POP","RAM","RNGR","ROM","RPG","RTFM","RTS","SCUBA","SITCOM","SKU","SMTP","SQL","SSN","SWAT","TBS","TTL","TV","TNA","UI","URL","USB","UWP","VIP","W3C","WYSIWYG","WWW","WWE","WWF"],NJ=["a","an","the"],MJ=["and","that","but","or","as","if","when","than","because","while","where","after","so","though","since","until","whether","before","although","nor","like","once","unless","now","except"],jJ=["about","above","across","after","against","along","among","around","at","because of","before","behind","below","beneath","beside","besides","between","beyond","but","by","concerning","despite","down","during","except","excepting","for","from","in","in front of","inside","in spite of","instead of","into","like","near","of","off","on","onto","out","outside","over","past","regarding","since","through","throughout","to","toward","under","underneath","until","up","upon","up to","with","within","without","with regard to","with respect to"],LJ=["2FA","3D","4K","5K","8K","AGI","BI","ChatGPT","CTA","DateTime","GitHub","GPT","HD","IBMid","ID","IDs","iMac","IMAX","iOS","IP","iPad","iPhone","iPod","LDAP","LinkedIn","LLM","M2M","M2O","macOS","McDonalds","ML","MySQL","NLG","NLP","NLU","O2M","OpenAI","PDFs","PEFT","pH","PostgreSQL","SEO","TTS","UHD","UUID","XSS","YouTube"],YC=mn(C,1),JC=class extends YC.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n)}render(){return this.state.hasError&&this.props.fallback?YC.default.createElement(this.props.fallback,{error:this.state.error,schema:this.props.fieldSchema}):this.props.children}};k(JC,"ErrorBoundary");var Tp=JC,XC=C,FJ=k((e,t)=>{const{handlePropertyChange:n,data:r}=HC(e,t),{discriminator:i,value:o,discriminatedSchema:a}=(0,XC.useMemo)(()=>{const s=QC(e.anyOf),l=s!=null&&s.key?r==null?void 0:r[s.key]:e.default||null,c=qJ((s==null?void 0:s.key)||null,l,e.anyOf);return{discriminator:s,value:l,discriminatedSchema:c}},[e.anyOf,r]);return(0,XC.useEffect)(()=>{i!=null&&i.key&&(i!=null&&i.values.length)&&Object.keys(r||{}).length<1&&!e.default&&n(t,{[i.key]:i.values[0]})},[]),{discriminator:i,discriminatorValue:o,discriminatedSchema:a}},"useDiscriminator"),QC=k(e=>{const t=e==null?void 0:e.map(n=>n.type!=="object"||!n.properties?null:Object.entries(n.properties).map(([r,i])=>{var o;return i.type==="string"&&((o=i.enum)!=null&&o.length)?{key:r,value:i.enum[0]}:null}).filter(r=>!!r)).flat().reduce((n,r)=>{if(!r)return n;const{key:i,value:o}=r;return n.key===null&&(n.key=i),n.key===i&&n.values.push(o),n},{key:null,values:[]});return(t==null?void 0:t.key)===null||!(t!=null&&t.values.length)?null:t},"resolveDiscriminator"),qJ=k((e,t,n)=>{var r,i;if(!(n!=null&&n.length)||!e||!t)return null;for(const o of n){if(o.type!=="object")continue;const a=(r=o.properties)==null?void 0:r[e];if((a==null?void 0:a.type)==="string"&&((i=a.enum)!=null&&i.length)&&a.enum[0]===t)return fe(B({},o),{properties:fe(B({},o.properties),{[e]:fe(B({},a),{[yn]:{hidden:!0}})})})}return null},"resolveDiscriminatedSchema"),UJ=k(e=>{var t;return(t=e.anyOf)!=null&&t.length?QC(e.anyOf)?"discriminatedUnion":"object":e.type==="integer"?"number":e.type},"getSchemaType"),BJ=k((e,t)=>{var n,r,i;const o=UJ(t),a=((n=t[yn])==null?void 0:n.displayAs)||null;if(!a||!Array.isArray(a)||a.length<2){const d=(r=e==null?void 0:e[o])==null?void 0:r.default;return d?{Component:d,type:o,id:"default",params:{}}:null}const s=a[0],l=((i=e==null?void 0:e[o])==null?void 0:i[s])||null;if(!l)return console.warn(`Component ${o}.${s} not found`),null;const c=a[1]||{};return{Component:l,type:o,id:s,params:c}},"resolveComponent"),zJ=k(({schema:e,components:t,onChange:n,value:r,disableValidation:i,fallback:o})=>Rr.default.createElement(RJ,{formData:r||{},setFormData:n,formSchema:e,disableValidation:i||!1},Rr.default.createElement(Tp,{fallback:o,fieldSchema:e,path:[]},Rr.default.createElement($p,{components:t,fieldSchema:e,path:[],fallback:o,required:!0,isArrayChild:!1}))),"ZuiForm"),$p=k(e=>{var t=e,{components:n,fieldSchema:r,path:i,required:o,fallback:a}=t,s=iE(t,["components","fieldSchema","path","required","fallback"]),l,c;const{formData:d,disabled:p,hidden:m,handlePropertyChange:h,addArrayItem:y,removeArrayItem:v,formErrors:w,formValid:_}=HC(r,i),b=(0,Rr.useMemo)(()=>ps(d,i),[d,i]),S=(0,Rr.useMemo)(()=>BJ(n,r),[r,n]),{discriminator:A,discriminatedSchema:E,discriminatorValue:T}=FJ(r,i);if(!S||m===!0)return null;const{Component:j,type:L}=S,F={type:L,componentID:S.id,scope:i.join("."),context:{path:i,readonly:!1,formData:d,formErrors:w,formValid:_,updateForm:h},onChange:re=>h(i,re),disabled:p,errors:(w==null?void 0:w.filter(re=>re.path===i))||[],label:((l=r[yn])==null?void 0:l.title)||hv(((c=i[i.length-1])==null?void 0:c.toString())||""),params:S.params,schema:r,zuiProps:r[yn]};if(r.type==="array"&&L==="array"){const re=j,Q=F.schema,G=Array.isArray(b)||typeof b=="object"?b:[],V=B(fe(B({},F),{type:L,schema:Q,data:G,addItem:(q=void 0)=>y(i,typeof q>"u"?pv(Q.items):q),removeItem:q=>v(i,q)}),s);return Array.isArray(r.items)?null:Rr.default.createElement(re,fe(B({key:F.scope},V),{isArrayChild:V.isArrayChild}),Array.isArray(V.data)?V.data.map((q,Y)=>{const ne=[...i,Y.toString()];return Rr.default.createElement(Tp,{key:ne.join("."),fallback:a,fieldSchema:r.items,path:ne},Rr.default.createElement($p,{key:ne.join("."),components:n,fieldSchema:r.items,path:ne,required:o,isArrayChild:!0,index:Y,removeSelf:()=>v(i,Y),fallback:a}))}):[])}if(r.type==="object"&&L==="object"&&r.properties){const re=j,Q=B(fe(B({},F),{type:L,schema:F.schema,data:b||{}}),s);return Rr.default.createElement(re,fe(B({key:F.scope},Q),{isArrayChild:Q.isArrayChild}),Object.entries(r.properties).map(([G,V])=>{var q;const Y=[...i,G];return Rr.default.createElement(Tp,{key:Y.join("."),fallback:a,fieldSchema:V,path:Y},Rr.default.createElement($p,{key:Y.join("."),components:n,fieldSchema:V,path:Y,required:((q=r.required)==null?void 0:q.includes(G))||!1,isArrayChild:!1,fallback:a}))}))}if(L==="discriminatedUnion"){const re=j,Q=B(fe(B({},F),{type:L,schema:F.schema,data:b||{},discriminatorKey:(A==null?void 0:A.key)||null,discriminatorLabel:hv((A==null?void 0:A.key)||"Unknown"),discriminatorOptions:(A==null?void 0:A.values)||null,discriminatorValue:T,setDiscriminator:G=>{if(!(A!=null&&A.key)){console.warn("No discriminator key found, cannot set discriminator");return}h(i,{[A.key]:G})}}),s);return Rr.default.createElement(re,fe(B({key:F.scope},Q),{isArrayChild:Q.isArrayChild}),E&&Rr.default.createElement(Tp,{key:i.join("."),fallback:a,fieldSchema:E,path:i},Rr.default.createElement($p,{components:n,fieldSchema:E,path:i,required:o,isArrayChild:!1,fallback:a})))}const M=j,H=B(fe(B({},F),{type:L,schema:F.schema,config:{},required:o,data:b,description:r.description}),s);return Rr.default.createElement(M,B({},H))},"FormElementRenderer"),ZJ={jsonSchemaToZui:gc,zuiToJsonSchema:Cp,objectToZui:xu,toTypescript:$d,zuiToTypescriptTypings:FE};const mv={},hs=Jf(Object.freeze(Object.defineProperty({__proto__:null,default:mv},Symbol.toStringTag,{value:"Module"})));function eO(e,t){return function(){return e.apply(t,arguments)}}const{toString:HJ}=Object.prototype,{getPrototypeOf:yv}=Object,kp=(e=>t=>{const n=HJ.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ri=e=>(e=e.toLowerCase(),t=>kp(t)===e),Ip=e=>t=>typeof t===e,{isArray:Eu}=Array,vc=Ip("undefined");function WJ(e){return e!==null&&!vc(e)&&e.constructor!==null&&!vc(e.constructor)&&bi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tO=Ri("ArrayBuffer");function VJ(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tO(e.buffer),t}const KJ=Ip("string"),bi=Ip("function"),nO=Ip("number"),Pp=e=>e!==null&&typeof e=="object",GJ=e=>e===!0||e===!1,Rp=e=>{if(kp(e)!=="object")return!1;const t=yv(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},YJ=Ri("Date"),JJ=Ri("File"),XJ=Ri("Blob"),QJ=Ri("FileList"),eX=e=>Pp(e)&&bi(e.pipe),tX=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bi(e.append)&&((t=kp(e))==="formdata"||t==="object"&&bi(e.toString)&&e.toString()==="[object FormData]"))},nX=Ri("URLSearchParams"),[rX,iX,oX,aX]=["ReadableStream","Request","Response","Headers"].map(Ri),sX=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bc(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Eu(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],t.call(null,e[s],s,e)}}function rO(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const iO=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),oO=e=>!vc(e)&&e!==iO;function gv(){const{caseless:e}=oO(this)&&this||{},t={},n=(r,i)=>{const o=e&&rO(t,i)||i;Rp(t[o])&&Rp(r)?t[o]=gv(t[o],r):Rp(r)?t[o]=gv({},r):Eu(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&bc(arguments[r],n);return t}const uX=(e,t,n,{allOwnKeys:r}={})=>(bc(t,(i,o)=>{n&&bi(i)?e[o]=eO(i,n):e[o]=i},{allOwnKeys:r}),e),lX=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),cX=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},fX=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&yv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},dX=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},pX=e=>{if(!e)return null;if(Eu(e))return e;let t=e.length;if(!nO(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},hX=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&yv(Uint8Array)),mX=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},yX=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},gX=Ri("HTMLFormElement"),vX=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),aO=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),bX=Ri("RegExp"),sO=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};bc(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},_X=e=>{sO(e,(t,n)=>{if(bi(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(bi(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},wX=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Eu(e)?r(e):r(String(e).split(t)),n},xX=()=>{},SX=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,vv="abcdefghijklmnopqrstuvwxyz",uO="0123456789",lO={DIGIT:uO,ALPHA:vv,ALPHA_DIGIT:vv+vv.toUpperCase()+uO},EX=(e=16,t=lO.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function AX(e){return!!(e&&bi(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const CX=e=>{const t=new Array(10),n=(r,i)=>{if(Pp(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Eu(r)?[]:{};return bc(r,(a,s)=>{const l=n(a,i+1);!vc(l)&&(o[s]=l)}),t[i]=void 0,o}}return r};return n(e,0)},OX=Ri("AsyncFunction"),de={isArray:Eu,isArrayBuffer:tO,isBuffer:WJ,isFormData:tX,isArrayBufferView:VJ,isString:KJ,isNumber:nO,isBoolean:GJ,isObject:Pp,isPlainObject:Rp,isReadableStream:rX,isRequest:iX,isResponse:oX,isHeaders:aX,isUndefined:vc,isDate:YJ,isFile:JJ,isBlob:XJ,isRegExp:bX,isFunction:bi,isStream:eX,isURLSearchParams:nX,isTypedArray:hX,isFileList:QJ,forEach:bc,merge:gv,extend:uX,trim:sX,stripBOM:lX,inherits:cX,toFlatObject:fX,kindOf:kp,kindOfTest:Ri,endsWith:dX,toArray:pX,forEachEntry:mX,matchAll:yX,isHTMLForm:gX,hasOwnProperty:aO,hasOwnProp:aO,reduceDescriptors:sO,freezeMethods:_X,toObjectSet:wX,toCamelCase:vX,noop:xX,toFiniteNumber:SX,findKey:rO,global:iO,isContextDefined:oO,ALPHABET:lO,generateString:EX,isSpecCompliantForm:AX,toJSONObject:CX,isAsyncFn:OX,isThenable:e=>e&&(Pp(e)||bi(e))&&bi(e.then)&&bi(e.catch)};function Dt(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}de.inherits(Dt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:de.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const cO=Dt.prototype,fO={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{fO[e]={value:e}}),Object.defineProperties(Dt,fO),Object.defineProperty(cO,"isAxiosError",{value:!0}),Dt.from=(e,t,n,r,i,o)=>{const a=Object.create(cO);return de.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Dt.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const TX=null;function bv(e){return de.isPlainObject(e)||de.isArray(e)}function dO(e){return de.endsWith(e,"[]")?e.slice(0,-2):e}function pO(e,t,n){return e?e.concat(t).map(function(i,o){return i=dO(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function $X(e){return de.isArray(e)&&!e.some(bv)}const kX=de.toFlatObject(de,{},null,function(t){return/^is[A-Z]/.test(t)});function Dp(e,t,n){if(!de.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=de.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!de.isUndefined(w[v])});const r=n.metaTokens,i=n.visitor||d,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&de.isSpecCompliantForm(t);if(!de.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(de.isDate(y))return y.toISOString();if(!l&&de.isBlob(y))throw new Dt("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(y)||de.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function d(y,v,w){let _=y;if(y&&!w&&typeof y=="object"){if(de.endsWith(v,"{}"))v=r?v:v.slice(0,-2),y=JSON.stringify(y);else if(de.isArray(y)&&$X(y)||(de.isFileList(y)||de.endsWith(v,"[]"))&&(_=de.toArray(y)))return v=dO(v),_.forEach(function(S,A){!(de.isUndefined(S)||S===null)&&t.append(a===!0?pO([v],A,o):a===null?v:v+"[]",c(S))}),!1}return bv(y)?!0:(t.append(pO(w,v,o),c(y)),!1)}const p=[],m=Object.assign(kX,{defaultVisitor:d,convertValue:c,isVisitable:bv});function h(y,v){if(!de.isUndefined(y)){if(p.indexOf(y)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(y),de.forEach(y,function(_,b){(!(de.isUndefined(_)||_===null)&&i.call(t,_,de.isString(b)?b.trim():b,v,m))===!0&&h(_,v?v.concat(b):[b])}),p.pop()}}if(!de.isObject(e))throw new TypeError("data must be an object");return h(e),t}function hO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function _v(e,t){this._pairs=[],e&&Dp(e,this,t)}const mO=_v.prototype;mO.append=function(t,n){this._pairs.push([t,n])},mO.toString=function(t){const n=t?function(r){return t.call(this,r,hO)}:hO;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function IX(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yO(e,t,n){if(!t)return e;const r=n&&n.encode||IX,i=n&&n.serialize;let o;if(i?o=i(t,n):o=de.isURLSearchParams(t)?t.toString():new _v(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}const gO=class{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){de.forEach(this.handlers,function(r){r!==null&&t(r)})}},vO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},PX={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:_v,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},wv=typeof window<"u"&&typeof document<"u",RX=(e=>wv&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),DX=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),NX=wv&&window.location.href||"http://localhost",Di={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:wv,hasStandardBrowserEnv:RX,hasStandardBrowserWebWorkerEnv:DX,origin:NX},Symbol.toStringTag,{value:"Module"})),...PX};function MX(e,t){return Dp(e,new Di.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Di.isNode&&de.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function jX(e){return de.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function LX(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function bO(e){function t(n,r,i,o){let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),l=o>=n.length;return a=!a&&de.isArray(i)?i.length:a,l?(de.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!de.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&de.isArray(i[a])&&(i[a]=LX(i[a])),!s)}if(de.isFormData(e)&&de.isFunction(e.entries)){const n={};return de.forEachEntry(e,(r,i)=>{t(jX(r),i,n,0)}),n}return null}function FX(e,t,n){if(de.isString(e))try{return(t||JSON.parse)(e),de.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const xv={transitional:vO,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=de.isObject(t);if(o&&de.isHTMLForm(t)&&(t=new FormData(t)),de.isFormData(t))return i?JSON.stringify(bO(t)):t;if(de.isArrayBuffer(t)||de.isBuffer(t)||de.isStream(t)||de.isFile(t)||de.isBlob(t)||de.isReadableStream(t))return t;if(de.isArrayBufferView(t))return t.buffer;if(de.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return MX(t,this.formSerializer).toString();if((s=de.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Dp(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),FX(t)):t}],transformResponse:[function(t){const n=this.transitional||xv.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(de.isResponse(t)||de.isReadableStream(t))return t;if(t&&de.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Dt.from(s,Dt.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Di.classes.FormData,Blob:Di.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],e=>{xv.headers[e]={}});const Sv=xv,qX=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),UX=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
129
129
|
`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&qX[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},_O=Symbol("internals");function _c(e){return e&&String(e).trim().toLowerCase()}function Np(e){return e===!1||e==null?e:de.isArray(e)?e.map(Np):String(e)}function BX(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const zX=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ev(e,t,n,r,i){if(de.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!de.isString(t)){if(de.isString(r))return t.indexOf(r)!==-1;if(de.isRegExp(r))return r.test(t)}}function ZX(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function HX(e,t){const n=de.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}let Mp=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,l,c){const d=_c(l);if(!d)throw new Error("header name must be a non-empty string");const p=de.findKey(i,d);(!p||i[p]===void 0||c===!0||c===void 0&&i[p]!==!1)&&(i[p||l]=Np(s))}const a=(s,l)=>de.forEach(s,(c,d)=>o(c,d,l));if(de.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(de.isString(t)&&(t=t.trim())&&!zX(t))a(UX(t),n);else if(de.isHeaders(t))for(const[s,l]of t.entries())o(l,s,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=_c(t),t){const r=de.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return BX(i);if(de.isFunction(n))return n.call(this,i,r);if(de.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=_c(t),t){const r=de.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ev(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=_c(a),a){const s=de.findKey(r,a);s&&(!n||Ev(r,r[s],s,n))&&(delete r[s],i=!0)}}return de.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Ev(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return de.forEach(this,(i,o)=>{const a=de.findKey(r,o);if(a){n[a]=Np(i),delete n[o];return}const s=t?ZX(o):String(o).trim();s!==o&&delete n[o],n[s]=Np(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return de.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&de.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
130
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[_O]=this[_O]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=_c(a);r[s]||(HX(i,a),r[s]=!0)}return de.isArray(t)?t.forEach(o):o(t),this}};Mp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),de.reduceDescriptors(Mp.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),de.freezeMethods(Mp);const Ni=Mp;function Av(e,t){const n=this||Sv,r=t||n,i=Ni.from(r.headers);let o=r.data;return de.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function wO(e){return!!(e&&e.__CANCEL__)}function Au(e,t,n){Dt.call(this,e??"canceled",Dt.ERR_CANCELED,t,n),this.name="CanceledError"}de.inherits(Au,Dt,{__CANCEL__:!0});function xO(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Dt("Request failed with status code "+n.status,[Dt.ERR_BAD_REQUEST,Dt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function WX(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function VX(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),d=r[o];a||(a=c),n[i]=l,r[i]=c;let p=o,m=0;for(;p!==i;)m+=n[p++],p=p%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-a<t)return;const h=d&&c-d;return h?Math.round(m*1e3/h):void 0}}function KX(e,t){let n=0;const r=1e3/t;let i=null;return function(){const a=this===!0,s=Date.now();if(a||s-n>r)return i&&(clearTimeout(i),i=null),n=s,e.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),e.apply(null,arguments)),r-(s-n)))}}const jp=(e,t,n=3)=>{let r=0;const i=VX(50,250);return KX(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,l=a-r,c=i(l),d=a<=s;r=a;const p={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&d?(s-a)/c:void 0,event:o,lengthComputable:s!=null};p[t?"download":"upload"]=!0,e(p)},n)},GX=Di.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let a=o;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(a){const s=de.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),YX=Di.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];de.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),de.isString(r)&&a.push("path="+r),de.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function JX(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function XX(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function SO(e,t){return e&&!JX(t)?XX(e,t):t}const EO=e=>e instanceof Ni?{...e}:e;function ms(e,t){t=t||{};const n={};function r(c,d,p){return de.isPlainObject(c)&&de.isPlainObject(d)?de.merge.call({caseless:p},c,d):de.isPlainObject(d)?de.merge({},d):de.isArray(d)?d.slice():d}function i(c,d,p){if(de.isUndefined(d)){if(!de.isUndefined(c))return r(void 0,c,p)}else return r(c,d,p)}function o(c,d){if(!de.isUndefined(d))return r(void 0,d)}function a(c,d){if(de.isUndefined(d)){if(!de.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function s(c,d,p){if(p in t)return r(c,d);if(p in e)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,d)=>i(EO(c),EO(d),!0)};return de.forEach(Object.keys(Object.assign({},e,t)),function(d){const p=l[d]||i,m=p(e[d],t[d],d);de.isUndefined(m)&&p!==s||(n[d]=m)}),n}const AO=e=>{const t=ms({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=Ni.from(a),t.url=yO(SO(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(de.isFormData(n)){if(Di.hasStandardBrowserEnv||Di.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...d]=l?l.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...d].join("; "))}}if(Di.hasStandardBrowserEnv&&(r&&de.isFunction(r)&&(r=r(t)),r||r!==!1&&GX(t.url))){const c=i&&o&&YX.read(o);c&&a.set(i,c)}return t},QX=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=AO(e);let o=i.data;const a=Ni.from(i.headers).normalize();let{responseType:s}=i,l;function c(){i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let d=new XMLHttpRequest;d.open(i.method.toUpperCase(),i.url,!0),d.timeout=i.timeout;function p(){if(!d)return;const h=Ni.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),v={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:h,config:e,request:d};xO(function(_){n(_),c()},function(_){r(_),c()},v),d=null}"onloadend"in d?d.onloadend=p:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(p)},d.onabort=function(){d&&(r(new Dt("Request aborted",Dt.ECONNABORTED,i,d)),d=null)},d.onerror=function(){r(new Dt("Network Error",Dt.ERR_NETWORK,i,d)),d=null},d.ontimeout=function(){let y=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const v=i.transitional||vO;i.timeoutErrorMessage&&(y=i.timeoutErrorMessage),r(new Dt(y,v.clarifyTimeoutError?Dt.ETIMEDOUT:Dt.ECONNABORTED,i,d)),d=null},o===void 0&&a.setContentType(null),"setRequestHeader"in d&&de.forEach(a.toJSON(),function(y,v){d.setRequestHeader(v,y)}),de.isUndefined(i.withCredentials)||(d.withCredentials=!!i.withCredentials),s&&s!=="json"&&(d.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&d.addEventListener("progress",jp(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",jp(i.onUploadProgress)),(i.cancelToken||i.signal)&&(l=h=>{d&&(r(!h||h.type?new Au(null,e,d):h),d.abort(),d=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const m=WX(i.url);if(m&&Di.protocols.indexOf(m)===-1){r(new Dt("Unsupported protocol "+m+":",Dt.ERR_BAD_REQUEST,e));return}d.send(o||null)})},eQ=(e,t)=>{let n=new AbortController,r;const i=function(l){if(!r){r=!0,a();const c=l instanceof Error?l:this.reason;n.abort(c instanceof Dt?c:new Au(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{i(new Dt(`timeout ${t} of ms exceeded`,Dt.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l&&(l.removeEventListener?l.removeEventListener("abort",i):l.unsubscribe(i))}),e=null)};e.forEach(l=>l&&l.addEventListener&&l.addEventListener("abort",i));const{signal:s}=n;return s.unsubscribe=a,[s,()=>{o&&clearTimeout(o),o=null}]},tQ=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},nQ=async function*(e,t,n){for await(const r of e)yield*tQ(ArrayBuffer.isView(r)?r:await n(String(r)),t)},CO=(e,t,n,r,i)=>{const o=nQ(e,t,i);let a=0;return new ReadableStream({type:"bytes",async pull(s){const{done:l,value:c}=await o.next();if(l){s.close(),r();return}let d=c.byteLength;n&&n(a+=d),s.enqueue(new Uint8Array(c))},cancel(s){return r(s),o.return()}},{highWaterMark:2})},OO=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},Lp=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",TO=Lp&&typeof ReadableStream=="function",Cv=Lp&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),rQ=TO&&(()=>{let e=!1;const t=new Request(Di.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),$O=64*1024,Ov=TO&&!!(()=>{try{return de.isReadableStream(new Response("").body)}catch{}})(),Fp={stream:Ov&&(e=>e.body)};Lp&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Fp[t]&&(Fp[t]=de.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Dt(`Response type '${t}' is not supported`,Dt.ERR_NOT_SUPPORT,r)})})})(new Response);const iQ=async e=>{if(e==null)return 0;if(de.isBlob(e))return e.size;if(de.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(de.isArrayBufferView(e))return e.byteLength;if(de.isURLSearchParams(e)&&(e=e+""),de.isString(e))return(await Cv(e)).byteLength},oQ=async(e,t)=>{const n=de.toFiniteNumber(e.getContentLength());return n??iQ(t)},Tv={http:TX,xhr:QX,fetch:Lp&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:d,withCredentials:p="same-origin",fetchOptions:m}=AO(e);c=c?(c+"").toLowerCase():"text";let[h,y]=i||o||a?eQ([i,o],a):[],v,w;const _=()=>{!v&&setTimeout(()=>{h&&h.unsubscribe()}),v=!0};let b;try{if(l&&rQ&&n!=="get"&&n!=="head"&&(b=await oQ(d,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),N;de.isFormData(r)&&(N=T.headers.get("content-type"))&&d.setContentType(N),T.body&&(r=CO(T.body,$O,OO(b,jp(l)),null,Cv))}de.isString(p)||(p=p?"cors":"omit"),w=new Request(t,{...m,signal:h,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",withCredentials:p});let S=await fetch(w);const A=Ov&&(c==="stream"||c==="response");if(Ov&&(s||A)){const T={};["status","statusText","headers"].forEach(L=>{T[L]=S[L]});const N=de.toFiniteNumber(S.headers.get("content-length"));S=new Response(CO(S.body,$O,s&&OO(N,jp(s,!0)),A&&_,Cv),T)}c=c||"text";let E=await Fp[de.findKey(Fp,c)||"text"](S,e);return!A&&_(),y&&y(),await new Promise((T,N)=>{xO(T,N,{data:E,headers:Ni.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:w})})}catch(S){throw _(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new Dt("Network Error",Dt.ERR_NETWORK,e,w),{cause:S.cause||S}):Dt.from(S,S&&S.code,e,w)}})};de.forEach(Tv,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const kO=e=>`- ${e}`,aQ=e=>de.isFunction(e)||e===null||e===!1,IO={getAdapter:e=>{e=de.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o<t;o++){n=e[o];let a;if(r=n,!aQ(n)&&(r=Tv[(a=String(n)).toLowerCase()],r===void 0))throw new Dt(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+o]=r}if(!r){const o=Object.entries(i).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since :
|
|
130
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[_O]=this[_O]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=_c(a);r[s]||(HX(i,a),r[s]=!0)}return de.isArray(t)?t.forEach(o):o(t),this}};Mp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),de.reduceDescriptors(Mp.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),de.freezeMethods(Mp);const Ni=Mp;function Av(e,t){const n=this||Sv,r=t||n,i=Ni.from(r.headers);let o=r.data;return de.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function wO(e){return!!(e&&e.__CANCEL__)}function Au(e,t,n){Dt.call(this,e??"canceled",Dt.ERR_CANCELED,t,n),this.name="CanceledError"}de.inherits(Au,Dt,{__CANCEL__:!0});function xO(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Dt("Request failed with status code "+n.status,[Dt.ERR_BAD_REQUEST,Dt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function WX(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function VX(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),d=r[o];a||(a=c),n[i]=l,r[i]=c;let p=o,m=0;for(;p!==i;)m+=n[p++],p=p%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-a<t)return;const h=d&&c-d;return h?Math.round(m*1e3/h):void 0}}function KX(e,t){let n=0;const r=1e3/t;let i=null;return function(){const a=this===!0,s=Date.now();if(a||s-n>r)return i&&(clearTimeout(i),i=null),n=s,e.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),e.apply(null,arguments)),r-(s-n)))}}const jp=(e,t,n=3)=>{let r=0;const i=VX(50,250);return KX(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,l=a-r,c=i(l),d=a<=s;r=a;const p={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&d?(s-a)/c:void 0,event:o,lengthComputable:s!=null};p[t?"download":"upload"]=!0,e(p)},n)},GX=Di.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let a=o;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(a){const s=de.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),YX=Di.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];de.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),de.isString(r)&&a.push("path="+r),de.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function JX(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function XX(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function SO(e,t){return e&&!JX(t)?XX(e,t):t}const EO=e=>e instanceof Ni?{...e}:e;function ms(e,t){t=t||{};const n={};function r(c,d,p){return de.isPlainObject(c)&&de.isPlainObject(d)?de.merge.call({caseless:p},c,d):de.isPlainObject(d)?de.merge({},d):de.isArray(d)?d.slice():d}function i(c,d,p){if(de.isUndefined(d)){if(!de.isUndefined(c))return r(void 0,c,p)}else return r(c,d,p)}function o(c,d){if(!de.isUndefined(d))return r(void 0,d)}function a(c,d){if(de.isUndefined(d)){if(!de.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function s(c,d,p){if(p in t)return r(c,d);if(p in e)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,d)=>i(EO(c),EO(d),!0)};return de.forEach(Object.keys(Object.assign({},e,t)),function(d){const p=l[d]||i,m=p(e[d],t[d],d);de.isUndefined(m)&&p!==s||(n[d]=m)}),n}const AO=e=>{const t=ms({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=Ni.from(a),t.url=yO(SO(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(de.isFormData(n)){if(Di.hasStandardBrowserEnv||Di.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...d]=l?l.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...d].join("; "))}}if(Di.hasStandardBrowserEnv&&(r&&de.isFunction(r)&&(r=r(t)),r||r!==!1&&GX(t.url))){const c=i&&o&&YX.read(o);c&&a.set(i,c)}return t},QX=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=AO(e);let o=i.data;const a=Ni.from(i.headers).normalize();let{responseType:s}=i,l;function c(){i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let d=new XMLHttpRequest;d.open(i.method.toUpperCase(),i.url,!0),d.timeout=i.timeout;function p(){if(!d)return;const h=Ni.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),v={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:h,config:e,request:d};xO(function(_){n(_),c()},function(_){r(_),c()},v),d=null}"onloadend"in d?d.onloadend=p:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(p)},d.onabort=function(){d&&(r(new Dt("Request aborted",Dt.ECONNABORTED,i,d)),d=null)},d.onerror=function(){r(new Dt("Network Error",Dt.ERR_NETWORK,i,d)),d=null},d.ontimeout=function(){let y=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const v=i.transitional||vO;i.timeoutErrorMessage&&(y=i.timeoutErrorMessage),r(new Dt(y,v.clarifyTimeoutError?Dt.ETIMEDOUT:Dt.ECONNABORTED,i,d)),d=null},o===void 0&&a.setContentType(null),"setRequestHeader"in d&&de.forEach(a.toJSON(),function(y,v){d.setRequestHeader(v,y)}),de.isUndefined(i.withCredentials)||(d.withCredentials=!!i.withCredentials),s&&s!=="json"&&(d.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&d.addEventListener("progress",jp(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",jp(i.onUploadProgress)),(i.cancelToken||i.signal)&&(l=h=>{d&&(r(!h||h.type?new Au(null,e,d):h),d.abort(),d=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const m=WX(i.url);if(m&&Di.protocols.indexOf(m)===-1){r(new Dt("Unsupported protocol "+m+":",Dt.ERR_BAD_REQUEST,e));return}d.send(o||null)})},eQ=(e,t)=>{let n=new AbortController,r;const i=function(l){if(!r){r=!0,a();const c=l instanceof Error?l:this.reason;n.abort(c instanceof Dt?c:new Au(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{i(new Dt(`timeout ${t} of ms exceeded`,Dt.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l&&(l.removeEventListener?l.removeEventListener("abort",i):l.unsubscribe(i))}),e=null)};e.forEach(l=>l&&l.addEventListener&&l.addEventListener("abort",i));const{signal:s}=n;return s.unsubscribe=a,[s,()=>{o&&clearTimeout(o),o=null}]},tQ=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},nQ=async function*(e,t,n){for await(const r of e)yield*tQ(ArrayBuffer.isView(r)?r:await n(String(r)),t)},CO=(e,t,n,r,i)=>{const o=nQ(e,t,i);let a=0;return new ReadableStream({type:"bytes",async pull(s){const{done:l,value:c}=await o.next();if(l){s.close(),r();return}let d=c.byteLength;n&&n(a+=d),s.enqueue(new Uint8Array(c))},cancel(s){return r(s),o.return()}},{highWaterMark:2})},OO=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},Lp=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",TO=Lp&&typeof ReadableStream=="function",Cv=Lp&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),rQ=TO&&(()=>{let e=!1;const t=new Request(Di.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),$O=64*1024,Ov=TO&&!!(()=>{try{return de.isReadableStream(new Response("").body)}catch{}})(),Fp={stream:Ov&&(e=>e.body)};Lp&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Fp[t]&&(Fp[t]=de.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Dt(`Response type '${t}' is not supported`,Dt.ERR_NOT_SUPPORT,r)})})})(new Response);const iQ=async e=>{if(e==null)return 0;if(de.isBlob(e))return e.size;if(de.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(de.isArrayBufferView(e))return e.byteLength;if(de.isURLSearchParams(e)&&(e=e+""),de.isString(e))return(await Cv(e)).byteLength},oQ=async(e,t)=>{const n=de.toFiniteNumber(e.getContentLength());return n??iQ(t)},Tv={http:TX,xhr:QX,fetch:Lp&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:d,withCredentials:p="same-origin",fetchOptions:m}=AO(e);c=c?(c+"").toLowerCase():"text";let[h,y]=i||o||a?eQ([i,o],a):[],v,w;const _=()=>{!v&&setTimeout(()=>{h&&h.unsubscribe()}),v=!0};let b;try{if(l&&rQ&&n!=="get"&&n!=="head"&&(b=await oQ(d,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),j;de.isFormData(r)&&(j=T.headers.get("content-type"))&&d.setContentType(j),T.body&&(r=CO(T.body,$O,OO(b,jp(l)),null,Cv))}de.isString(p)||(p=p?"cors":"omit"),w=new Request(t,{...m,signal:h,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",withCredentials:p});let S=await fetch(w);const A=Ov&&(c==="stream"||c==="response");if(Ov&&(s||A)){const T={};["status","statusText","headers"].forEach(L=>{T[L]=S[L]});const j=de.toFiniteNumber(S.headers.get("content-length"));S=new Response(CO(S.body,$O,s&&OO(j,jp(s,!0)),A&&_,Cv),T)}c=c||"text";let E=await Fp[de.findKey(Fp,c)||"text"](S,e);return!A&&_(),y&&y(),await new Promise((T,j)=>{xO(T,j,{data:E,headers:Ni.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:w})})}catch(S){throw _(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new Dt("Network Error",Dt.ERR_NETWORK,e,w),{cause:S.cause||S}):Dt.from(S,S&&S.code,e,w)}})};de.forEach(Tv,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const kO=e=>`- ${e}`,aQ=e=>de.isFunction(e)||e===null||e===!1,IO={getAdapter:e=>{e=de.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o<t;o++){n=e[o];let a;if(r=n,!aQ(n)&&(r=Tv[(a=String(n)).toLowerCase()],r===void 0))throw new Dt(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+o]=r}if(!r){const o=Object.entries(i).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since :
|
|
131
131
|
`+o.map(kO).join(`
|
|
132
132
|
`):" "+kO(o[0]):"as no adapter specified";throw new Dt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Tv};function $v(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Au(null,e)}function PO(e){return $v(e),e.headers=Ni.from(e.headers),e.data=Av.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),IO.getAdapter(e.adapter||Sv.adapter)(e).then(function(r){return $v(e),r.data=Av.call(e,e.transformResponse,r),r.headers=Ni.from(r.headers),r},function(r){return wO(r)||($v(e),r&&r.response&&(r.response.data=Av.call(e,e.transformResponse,r.response),r.response.headers=Ni.from(r.response.headers))),Promise.reject(r)})}const RO="1.7.2",kv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{kv[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const DO={};kv.transitional=function(t,n,r){function i(o,a){return"[Axios v"+RO+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new Dt(i(a," has been removed"+(n?" in "+n:"")),Dt.ERR_DEPRECATED);return n&&!DO[a]&&(DO[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};function sQ(e,t,n){if(typeof e!="object")throw new Dt("options must be an object",Dt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],l=s===void 0||a(s,o,e);if(l!==!0)throw new Dt("option "+o+" must be "+l,Dt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Dt("Unknown option "+o,Dt.ERR_BAD_OPTION)}}const Iv={assertOptions:sQ,validators:kv},ha=Iv.validators;let qp=class{constructor(t){this.defaults=t,this.interceptors={request:new gO,response:new gO}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
133
|
-
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ms(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Iv.assertOptions(r,{silentJSONParsing:ha.transitional(ha.boolean),forcedJSONParsing:ha.transitional(ha.boolean),clarifyTimeoutError:ha.transitional(ha.boolean)},!1),i!=null&&(de.isFunction(i)?n.paramsSerializer={serialize:i}:Iv.assertOptions(i,{encode:ha.function,serialize:ha.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&de.merge(o.common,o[n.method]);o&&de.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Ni.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let d,p=0,m;if(!l){const y=[PO.bind(this),void 0];for(y.unshift.apply(y,s),y.push.apply(y,c),m=y.length,d=Promise.resolve(n);p<m;)d=d.then(y[p++],y[p++]);return d}m=s.length;let h=n;for(p=0;p<m;){const y=s[p++],v=s[p++];try{h=y(h)}catch(w){v.call(this,w);break}}try{d=PO.call(this,h)}catch(y){return Promise.reject(y)}for(p=0,m=c.length;p<m;)d=d.then(c[p++],c[p++]);return d}getUri(t){t=ms(this.defaults,t);const n=SO(t.baseURL,t.url);return yO(n,t.params,t.paramsSerializer)}};de.forEach(["delete","get","head","options"],function(t){qp.prototype[t]=function(n,r){return this.request(ms(r||{},{method:t,url:n,data:(r||{}).data}))}}),de.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(ms(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}qp.prototype[t]=n(),qp.prototype[t+"Form"]=n(!0)});const Up=qp,uQ=class t3{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new Au(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new t3(function(i){t=i}),cancel:t}}};function lQ(e){return function(n){return e.apply(null,n)}}function cQ(e){return de.isObject(e)&&e.isAxiosError===!0}const Pv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pv).forEach(([e,t])=>{Pv[t]=e});const fQ=Pv;function NO(e){const t=new Up(e),n=eO(Up.prototype.request,t);return de.extend(n,Up.prototype,t,{allOwnKeys:!0}),de.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return NO(ms(e,i))},n}const Hn=NO(Sv);Hn.Axios=Up,Hn.CanceledError=Au,Hn.CancelToken=uQ,Hn.isCancel=wO,Hn.VERSION=RO,Hn.toFormData=Dp,Hn.AxiosError=Dt,Hn.Cancel=Hn.CanceledError,Hn.all=function(t){return Promise.all(t)},Hn.spread=lQ,Hn.isAxiosError=cQ,Hn.mergeConfig=ms,Hn.AxiosHeaders=Ni,Hn.formToJSON=e=>bO(de.isHTMLForm(e)?new FormData(e):e),Hn.getAdapter=IO.getAdapter,Hn.HttpStatusCode=fQ,Hn.default=Hn;const Cu=Hn,{Axios:dQ,AxiosError:pQ,CanceledError:hQ,isCancel:mQ,CancelToken:yQ,VERSION:gQ,all:vQ,Cancel:bQ,isAxiosError:_Q,spread:wQ,toFormData:xQ,AxiosHeaders:SQ,HttpStatusCode:EQ,formToJSON:AQ,getAdapter:CQ,mergeConfig:OQ}=Cu,TQ=Object.freeze(Object.defineProperty({__proto__:null,Axios:dQ,AxiosError:pQ,AxiosHeaders:SQ,Cancel:bQ,CancelToken:yQ,CanceledError:hQ,HttpStatusCode:EQ,VERSION:gQ,all:vQ,default:Cu,formToJSON:AQ,getAdapter:CQ,isAxiosError:_Q,isCancel:mQ,mergeConfig:OQ,spread:wQ,toFormData:xQ},Symbol.toStringTag,{value:"Module"}));var Ou={};Object.defineProperty(Ou,"__esModule",{value:!0});var $Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kQ=typeof window<"u"&&typeof window.document<"u",IQ=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,PQ=(typeof self>"u"?"undefined":$Q(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",RQ=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),DQ=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",MO=Ou.isBrowser=kQ;Ou.isWebWorker=PQ;var Rv=Ou.isNode=IQ;Ou.isJsDom=RQ,Ou.isDeno=DQ;var NQ=Object.create,jO=Object.defineProperty,MQ=Object.getOwnPropertyDescriptor,jQ=Object.getOwnPropertyNames,LQ=Object.getPrototypeOf,FQ=Object.prototype.hasOwnProperty,Jn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qQ=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jQ(t))!FQ.call(e,i)&&i!==n&&jO(e,i,{get:()=>t[i],enumerable:!(r=MQ(t,i))||r.enumerable});return e},Dv=(e,t,n)=>(n=e!=null?NQ(LQ(e)):{},qQ(t||!e||!e.__esModule?jO(n,"default",{value:e,enumerable:!0}):n,e)),UQ=Jn(()=>{}),BQ=Jn(()=>{}),zQ=Jn((e,t)=>{t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var o=42;n[r]=o;for(r in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var a=Object.getOwnPropertySymbols(n);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(n,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(n,r);if(s.value!==o||s.enumerable!==!0)return!1}return!0}}),ZQ=Jn((e,t)=>{var n=typeof Symbol<"u"&&Symbol,r=zQ();t.exports=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:r()}}),HQ=Jn((e,t)=>{var n={foo:{}},r=Object;t.exports=function(){return{__proto__:n}.foo===n.foo&&!({__proto__:null}instanceof r)}}),WQ=Jn((e,t)=>{var n="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,i=Object.prototype.toString,o="[object Function]";t.exports=function(a){var s=this;if(typeof s!="function"||i.call(s)!==o)throw new TypeError(n+s);for(var l=r.call(arguments,1),c,d=function(){if(this instanceof c){var v=s.apply(this,l.concat(r.call(arguments)));return Object(v)===v?v:this}else return s.apply(a,l.concat(r.call(arguments)))},p=Math.max(0,s.length-l.length),m=[],h=0;h<p;h++)m.push("$"+h);if(c=Function("binder","return function ("+m.join(",")+"){ return binder.apply(this,arguments); }")(d),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}}),Nv=Jn((e,t)=>{var n=WQ();t.exports=Function.prototype.bind||n}),VQ=Jn((e,t)=>{var n=Nv();t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)}),Mv=Jn((e,t)=>{var n,r=SyntaxError,i=Function,o=TypeError,a=function(G){try{return i('"use strict"; return ('+G+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new o},c=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,d=ZQ()(),p=HQ()(),m=Object.getPrototypeOf||(p?function(G){return G.__proto__}:null),h={},y=typeof Uint8Array>"u"||!m?n:m(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":d&&m?m([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&m?m(m([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!d||!m?n:m(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!d||!m?n:m(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&m?m(""[Symbol.iterator]()):n,"%Symbol%":d?Symbol:n,"%SyntaxError%":r,"%ThrowTypeError%":c,"%TypedArray%":y,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet};if(m)try{null.error}catch(G){w=m(m(G)),v["%Error.prototype%"]=w}var w,_=function G(V){var q;if(V==="%AsyncFunction%")q=a("async function () {}");else if(V==="%GeneratorFunction%")q=a("function* () {}");else if(V==="%AsyncGeneratorFunction%")q=a("async function* () {}");else if(V==="%AsyncGenerator%"){var Y=G("%AsyncGeneratorFunction%");Y&&(q=Y.prototype)}else if(V==="%AsyncIteratorPrototype%"){var ne=G("%AsyncGenerator%");ne&&m&&(q=m(ne.prototype))}return v[V]=q,q},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},S=Nv(),A=VQ(),E=S.call(Function.call,Array.prototype.concat),T=S.call(Function.apply,Array.prototype.splice),N=S.call(Function.call,String.prototype.replace),L=S.call(Function.call,String.prototype.slice),F=S.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,re=function(G){var V=L(G,0,1),q=L(G,-1);if(V==="%"&&q!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(q==="%"&&V!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var Y=[];return N(G,j,function(ne,ce,P,ue){Y[Y.length]=P?N(ue,H,"$1"):ce||ne}),Y},Q=function(G,V){var q=G,Y;if(A(b,q)&&(Y=b[q],q="%"+Y[0]+"%"),A(v,q)){var ne=v[q];if(ne===h&&(ne=_(q)),typeof ne>"u"&&!V)throw new o("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:Y,name:q,value:ne}}throw new r("intrinsic "+G+" does not exist!")};t.exports=function(G,V){if(typeof G!="string"||G.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof V!="boolean")throw new o('"allowMissing" argument must be a boolean');if(F(/^%?[^%]*%?$/,G)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var q=re(G),Y=q.length>0?q[0]:"",ne=Q("%"+Y+"%",V),ce=ne.name,P=ne.value,ue=!1,Oe=ne.alias;Oe&&(Y=Oe[0],T(q,E([0,1],Oe)));for(var M=1,Ne=!0;M<q.length;M+=1){var qe=q[M],Me=L(qe,0,1),Je=L(qe,-1);if((Me==='"'||Me==="'"||Me==="`"||Je==='"'||Je==="'"||Je==="`")&&Me!==Je)throw new r("property names with quotes must have matching quotes");if((qe==="constructor"||!Ne)&&(ue=!0),Y+="."+qe,ce="%"+Y+"%",A(v,ce))P=v[ce];else if(P!=null){if(!(qe in P)){if(!V)throw new o("base intrinsic for "+G+" exists, but the property is not available.");return}if(s&&M+1>=q.length){var rt=s(P,qe);Ne=!!rt,Ne&&"get"in rt&&!("originalValue"in rt.get)?P=rt.get:P=P[qe]}else Ne=A(P,qe),P=P[qe];Ne&&!ue&&(v[ce]=P)}}return P}}),KQ=Jn((e,t)=>{var n=Nv(),r=Mv(),i=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||n.call(o,i),s=r("%Object.getOwnPropertyDescriptor%",!0),l=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(p){var m=a(n,o,arguments);if(s&&l){var h=s(m,"length");h.configurable&&l(m,"length",{value:1+c(0,p.length-(arguments.length-1))})}return m};var d=function(){return a(n,i,arguments)};l?l(t.exports,"apply",{value:d}):t.exports.apply=d}),GQ=Jn((e,t)=>{var n=Mv(),r=KQ(),i=r(n("String.prototype.indexOf"));t.exports=function(o,a){var s=n(o,!!a);return typeof s=="function"&&i(o,".prototype.")>-1?r(s):s}}),YQ=Jn(()=>{}),JQ=Jn((e,t)=>{var n=typeof Map=="function"&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&r&&typeof r.get=="function"?r.get:null,o=n&&Map.prototype.forEach,a=typeof Set=="function"&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=a&&s&&typeof s.get=="function"?s.get:null,c=a&&Set.prototype.forEach,d=typeof WeakMap=="function"&&WeakMap.prototype,p=d?WeakMap.prototype.has:null,m=typeof WeakSet=="function"&&WeakSet.prototype,h=m?WeakSet.prototype.has:null,y=typeof WeakRef=="function"&&WeakRef.prototype,v=y?WeakRef.prototype.deref:null,w=Boolean.prototype.valueOf,_=Object.prototype.toString,b=Function.prototype.toString,S=String.prototype.match,A=String.prototype.slice,E=String.prototype.replace,T=String.prototype.toUpperCase,N=String.prototype.toLowerCase,L=RegExp.prototype.test,F=Array.prototype.concat,j=Array.prototype.join,H=Array.prototype.slice,re=Math.floor,Q=typeof BigInt=="function"?BigInt.prototype.valueOf:null,G=Object.getOwnPropertySymbols,V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,q=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Y=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===q||"symbol")?Symbol.toStringTag:null,ne=Object.prototype.propertyIsEnumerable,ce=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(ee){return ee.__proto__}:null);function P(ee,ae){if(ee===1/0||ee===-1/0||ee!==ee||ee&&ee>-1e3&&ee<1e3||L.call(/e/,ae))return ae;var ft=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ee=="number"){var At=ee<0?-re(-ee):re(ee);if(At!==ee){var on=String(At),pt=A.call(ae,on.length+1);return E.call(on,ft,"$&_")+"."+E.call(E.call(pt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return E.call(ae,ft,"$&_")}var ue=YQ(),Oe=ue.custom,M=$e(Oe)?Oe:null;t.exports=function ee(ae,ft,At,on){var pt=ft||{};if(K(pt,"quoteStyle")&&pt.quoteStyle!=="single"&&pt.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(pt,"maxStringLength")&&(typeof pt.maxStringLength=="number"?pt.maxStringLength<0&&pt.maxStringLength!==1/0:pt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Mn=K(pt,"customInspect")?pt.customInspect:!0;if(typeof Mn!="boolean"&&Mn!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(pt,"indent")&&pt.indent!==null&&pt.indent!==" "&&!(parseInt(pt.indent,10)===pt.indent&&pt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(pt,"numericSeparator")&&typeof pt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var sr=pt.numericSeparator;if(typeof ae>"u")return"undefined";if(ae===null)return"null";if(typeof ae=="boolean")return ae?"true":"false";if(typeof ae=="string")return ge(ae,pt);if(typeof ae=="number"){if(ae===0)return 1/0/ae>0?"0":"-0";var D=String(ae);return sr?P(ae,D):D}if(typeof ae=="bigint"){var je=String(ae)+"n";return sr?P(ae,je):je}var He=typeof pt.depth>"u"?5:pt.depth;if(typeof At>"u"&&(At=0),At>=He&&He>0&&typeof ae=="object")return Me(ae)?"[Array]":"[Object]";var Xe=Jt(pt,At);if(typeof on>"u")on=[];else if(Se(on,ae)>=0)return"[Circular]";function Re(Tt,jn,On){if(jn&&(on=H.call(on),on.push(jn)),On){var Tn={depth:pt.depth};return K(pt,"quoteStyle")&&(Tn.quoteStyle=pt.quoteStyle),ee(Tt,Tn,At+1,on)}return ee(Tt,pt,At+1,on)}if(typeof ae=="function"&&!rt(ae)){var We=Te(ae),_t=Cn(ae,Re);return"[Function"+(We?": "+We:" (anonymous)")+"]"+(_t.length>0?" { "+j.call(_t,", ")+" }":"")}if($e(ae)){var Pt=q?E.call(String(ae),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(ae);return typeof ae=="object"&&!q?Be(Pt):Pt}if(ie(ae)){for(var Xt="<"+N.call(String(ae.nodeName)),bn=ae.attributes||[],Rn=0;Rn<bn.length;Rn++)Xt+=" "+bn[Rn].name+"="+Ne(qe(bn[Rn].value),"double",pt);return Xt+=">",ae.childNodes&&ae.childNodes.length&&(Xt+="..."),Xt+="</"+N.call(String(ae.nodeName))+">",Xt}if(Me(ae)){if(ae.length===0)return"[]";var mr=Cn(ae,Re);return Xe&&!rn(mr)?"["+cn(mr,Xe)+"]":"[ "+j.call(mr,", ")+" ]"}if(Ke(ae)){var ta=Cn(ae,Re);return!("cause"in Error.prototype)&&"cause"in ae&&!ne.call(ae,"cause")?"{ ["+String(ae)+"] "+j.call(F.call("[cause]: "+Re(ae.cause),ta),", ")+" }":ta.length===0?"["+String(ae)+"]":"{ ["+String(ae)+"] "+j.call(ta,", ")+" }"}if(typeof ae=="object"&&Mn){if(M&&typeof ae[M]=="function"&&ue)return ue(ae,{depth:He-At});if(Mn!=="symbol"&&typeof ae.inspect=="function")return ae.inspect()}if(et(ae)){var Sl=[];return o&&o.call(ae,function(Tt,jn){Sl.push(Re(jn,ae,!0)+" => "+Re(Tt,ae))}),pn("Map",i.call(ae),Sl,Xe)}if(It(ae)){var Z=[];return c&&c.call(ae,function(Tt){Z.push(Re(Tt,ae))}),pn("Set",l.call(ae),Z,Xe)}if(Ue(ae))return ct("WeakMap");if(mt(ae))return ct("WeakSet");if(ot(ae))return ct("WeakRef");if(Ae(ae))return Be(Re(Number(ae)));if(Ze(ae))return Be(Re(Q.call(ae)));if(Fe(ae))return Be(w.call(ae));if(Pe(ae))return Be(Re(String(ae)));if(!Je(ae)&&!rt(ae)){var Ce=Cn(ae,Re),ze=ce?ce(ae)===Object.prototype:ae instanceof Object||ae.constructor===Object,yt=ae instanceof Object?"":"null prototype",Gt=!ze&&Y&&Object(ae)===ae&&Y in ae?A.call(pe(ae),8,-1):yt?"Object":"",un=ze||typeof ae.constructor!="function"?"":ae.constructor.name?ae.constructor.name+" ":"",qt=un+(Gt||yt?"["+j.call(F.call([],Gt||[],yt||[]),": ")+"] ":"");return Ce.length===0?qt+"{}":Xe?qt+"{"+cn(Ce,Xe)+"}":qt+"{ "+j.call(Ce,", ")+" }"}return String(ae)};function Ne(ee,ae,ft){var At=(ft.quoteStyle||ae)==="double"?'"':"'";return At+ee+At}function qe(ee){return E.call(String(ee),/"/g,""")}function Me(ee){return pe(ee)==="[object Array]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Je(ee){return pe(ee)==="[object Date]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function rt(ee){return pe(ee)==="[object RegExp]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Ke(ee){return pe(ee)==="[object Error]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Pe(ee){return pe(ee)==="[object String]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Ae(ee){return pe(ee)==="[object Number]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Fe(ee){return pe(ee)==="[object Boolean]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function $e(ee){if(q)return ee&&typeof ee=="object"&&ee instanceof Symbol;if(typeof ee=="symbol")return!0;if(!ee||typeof ee!="object"||!V)return!1;try{return V.call(ee),!0}catch{}return!1}function Ze(ee){if(!ee||typeof ee!="object"||!Q)return!1;try{return Q.call(ee),!0}catch{}return!1}var lt=Object.prototype.hasOwnProperty||function(ee){return ee in this};function K(ee,ae){return lt.call(ee,ae)}function pe(ee){return _.call(ee)}function Te(ee){if(ee.name)return ee.name;var ae=S.call(b.call(ee),/^function\s*([\w$]+)/);return ae?ae[1]:null}function Se(ee,ae){if(ee.indexOf)return ee.indexOf(ae);for(var ft=0,At=ee.length;ft<At;ft++)if(ee[ft]===ae)return ft;return-1}function et(ee){if(!i||!ee||typeof ee!="object")return!1;try{i.call(ee);try{l.call(ee)}catch{return!0}return ee instanceof Map}catch{}return!1}function Ue(ee){if(!p||!ee||typeof ee!="object")return!1;try{p.call(ee,p);try{h.call(ee,h)}catch{return!0}return ee instanceof WeakMap}catch{}return!1}function ot(ee){if(!v||!ee||typeof ee!="object")return!1;try{return v.call(ee),!0}catch{}return!1}function It(ee){if(!l||!ee||typeof ee!="object")return!1;try{l.call(ee);try{i.call(ee)}catch{return!0}return ee instanceof Set}catch{}return!1}function mt(ee){if(!h||!ee||typeof ee!="object")return!1;try{h.call(ee,h);try{p.call(ee,p)}catch{return!0}return ee instanceof WeakSet}catch{}return!1}function ie(ee){return!ee||typeof ee!="object"?!1:typeof HTMLElement<"u"&&ee instanceof HTMLElement?!0:typeof ee.nodeName=="string"&&typeof ee.getAttribute=="function"}function ge(ee,ae){if(ee.length>ae.maxStringLength){var ft=ee.length-ae.maxStringLength,At="... "+ft+" more character"+(ft>1?"s":"");return ge(A.call(ee,0,ae.maxStringLength),ae)+At}var on=E.call(E.call(ee,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,xe);return Ne(on,"single",ae)}function xe(ee){var ae=ee.charCodeAt(0),ft={8:"b",9:"t",10:"n",12:"f",13:"r"}[ae];return ft?"\\"+ft:"\\x"+(ae<16?"0":"")+T.call(ae.toString(16))}function Be(ee){return"Object("+ee+")"}function ct(ee){return ee+" { ? }"}function pn(ee,ae,ft,At){var on=At?cn(ft,At):j.call(ft,", ");return ee+" ("+ae+") {"+on+"}"}function rn(ee){for(var ae=0;ae<ee.length;ae++)if(Se(ee[ae],`
|
|
134
|
-
`)>=0)return!1;return!0}function Jt(ee,ae){var ft;if(ee.indent===" ")ft=" ";else if(typeof ee.indent=="number"&&ee.indent>0)ft=
|
|
135
|
-
`+ae.prev+ae.base;return ft+
|
|
136
|
-
`+ae.prev}function Cn(ee,ae){var ft=Me(ee),At=[];if(ft){At.length=ee.length;for(var on=0;on<ee.length;on++)At[on]=K(ee,on)?ae(ee[on],ee):""}var pt=typeof G=="function"?G(ee):[],Mn;if(q){Mn={};for(var sr=0;sr<pt.length;sr++)Mn["$"+pt[sr]]=pt[sr]}for(var D in ee)K(ee,D)&&(ft&&String(Number(D))===D&&D<ee.length||q&&Mn["$"+D]instanceof Symbol||(L.call(/[^\w$]/,D)?At.push(ae(D,ee)+": "+ae(ee[D],ee)):At.push(D+": "+ae(ee[D],ee))));if(typeof G=="function")for(var je=0;je<pt.length;je++)ne.call(ee,pt[je])&&At.push("["+ae(pt[je])+"]: "+ae(ee[pt[je]],ee));return At}}),XQ=Jn((e,t)=>{var n=Mv(),r=GQ(),i=JQ(),o=n("%TypeError%"),a=n("%WeakMap%",!0),s=n("%Map%",!0),l=r("WeakMap.prototype.get",!0),c=r("WeakMap.prototype.set",!0),d=r("WeakMap.prototype.has",!0),p=r("Map.prototype.get",!0),m=r("Map.prototype.set",!0),h=r("Map.prototype.has",!0),y=function(b,S){for(var A=b,E;(E=A.next)!==null;A=E)if(E.key===S)return A.next=E.next,E.next=b.next,b.next=E,E},v=function(b,S){var A=y(b,S);return A&&A.value},w=function(b,S,A){var E=y(b,S);E?E.value=A:b.next={key:S,next:b.next,value:A}},_=function(b,S){return!!y(b,S)};t.exports=function(){var b,S,A,E={assert:function(T){if(!E.has(T))throw new o("Side channel does not contain "+i(T))},get:function(T){if(a&&T&&(typeof T=="object"||typeof T=="function")){if(b)return l(b,T)}else if(s){if(S)return p(S,T)}else if(A)return v(A,T)},has:function(T){if(a&&T&&(typeof T=="object"||typeof T=="function")){if(b)return d(b,T)}else if(s){if(S)return h(S,T)}else if(A)return _(A,T);return!1},set:function(T,N){a&&T&&(typeof T=="object"||typeof T=="function")?(b||(b=new a),c(b,T,N)):s?(S||(S=new s),m(S,T,N)):(A||(A={key:{},next:null}),w(A,T,N))}};return E}}),jv=Jn((e,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:"RFC1738",RFC3986:"RFC3986"};t.exports={default:i.RFC3986,formatters:{RFC1738:function(o){return n.call(o,r,"+")},RFC3986:function(o){return String(o)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}}),LO=Jn((e,t)=>{var n=jv(),r=Object.prototype.hasOwnProperty,i=Array.isArray,o=function(){for(var _=[],b=0;b<256;++b)_.push("%"+((b<16?"0":"")+b.toString(16)).toUpperCase());return _}(),a=function(_){for(;_.length>1;){var b=_.pop(),S=b.obj[b.prop];if(i(S)){for(var A=[],E=0;E<S.length;++E)typeof S[E]<"u"&&A.push(S[E]);b.obj[b.prop]=A}}},s=function(_,b){for(var S=b&&b.plainObjects?Object.create(null):{},A=0;A<_.length;++A)typeof _[A]<"u"&&(S[A]=_[A]);return S},l=function _(b,S,A){if(!S)return b;if(typeof S!="object"){if(i(b))b.push(S);else if(b&&typeof b=="object")(A&&(A.plainObjects||A.allowPrototypes)||!r.call(Object.prototype,S))&&(b[S]=!0);else return[b,S];return b}if(!b||typeof b!="object")return[b].concat(S);var E=b;return i(b)&&!i(S)&&(E=s(b,A)),i(b)&&i(S)?(S.forEach(function(T,N){if(r.call(b,N)){var L=b[N];L&&typeof L=="object"&&T&&typeof T=="object"?b[N]=_(L,T,A):b.push(T)}else b[N]=T}),b):Object.keys(S).reduce(function(T,N){var L=S[N];return r.call(T,N)?T[N]=_(T[N],L,A):T[N]=L,T},E)},c=function(_,b){return Object.keys(b).reduce(function(S,A){return S[A]=b[A],S},_)},d=function(_,b,S){var A=_.replace(/\+/g," ");if(S==="iso-8859-1")return A.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(A)}catch{return A}},p=function(_,b,S,A,E){if(_.length===0)return _;var T=_;if(typeof _=="symbol"?T=Symbol.prototype.toString.call(_):typeof _!="string"&&(T=String(_)),S==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function(j){return"%26%23"+parseInt(j.slice(2),16)+"%3B"});for(var N="",L=0;L<T.length;++L){var F=T.charCodeAt(L);if(F===45||F===46||F===95||F===126||F>=48&&F<=57||F>=65&&F<=90||F>=97&&F<=122||E===n.RFC1738&&(F===40||F===41)){N+=T.charAt(L);continue}if(F<128){N=N+o[F];continue}if(F<2048){N=N+(o[192|F>>6]+o[128|F&63]);continue}if(F<55296||F>=57344){N=N+(o[224|F>>12]+o[128|F>>6&63]+o[128|F&63]);continue}L+=1,F=65536+((F&1023)<<10|T.charCodeAt(L)&1023),N+=o[240|F>>18]+o[128|F>>12&63]+o[128|F>>6&63]+o[128|F&63]}return N},m=function(_){for(var b=[{obj:{o:_},prop:"o"}],S=[],A=0;A<b.length;++A)for(var E=b[A],T=E.obj[E.prop],N=Object.keys(T),L=0;L<N.length;++L){var F=N[L],j=T[F];typeof j=="object"&&j!==null&&S.indexOf(j)===-1&&(b.push({obj:T,prop:F}),S.push(j))}return a(b),_},h=function(_){return Object.prototype.toString.call(_)==="[object RegExp]"},y=function(_){return!_||typeof _!="object"?!1:!!(_.constructor&&_.constructor.isBuffer&&_.constructor.isBuffer(_))},v=function(_,b){return[].concat(_,b)},w=function(_,b){if(i(_)){for(var S=[],A=0;A<_.length;A+=1)S.push(b(_[A]));return S}return b(_)};t.exports={arrayToObject:s,assign:c,combine:v,compact:m,decode:d,encode:p,isBuffer:y,isRegExp:h,maybeMap:w,merge:l}}),QQ=Jn((e,t)=>{var n=XQ(),r=LO(),i=jv(),o=Object.prototype.hasOwnProperty,a={brackets:function(b){return b+"[]"},comma:"comma",indices:function(b,S){return b+"["+S+"]"},repeat:function(b){return b}},s=Array.isArray,l=String.prototype.split,c=Array.prototype.push,d=function(b,S){c.apply(b,s(S)?S:[S])},p=Date.prototype.toISOString,m=i.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:m,formatter:i.formatters[m],indices:!1,serializeDate:function(b){return p.call(b)},skipNulls:!1,strictNullHandling:!1},y=function(b){return typeof b=="string"||typeof b=="number"||typeof b=="boolean"||typeof b=="symbol"||typeof b=="bigint"},v={},w=function b(S,A,E,T,N,L,F,j,H,re,Q,G,V,q,Y,ne){for(var ce=S,P=ne,ue=0,Oe=!1;(P=P.get(v))!==void 0&&!Oe;){var M=P.get(S);if(ue+=1,typeof M<"u"){if(M===ue)throw new RangeError("Cyclic object value");Oe=!0}typeof P.get(v)>"u"&&(ue=0)}if(typeof j=="function"?ce=j(A,ce):ce instanceof Date?ce=Q(ce):E==="comma"&&s(ce)&&(ce=r.maybeMap(ce,function(pe){return pe instanceof Date?Q(pe):pe})),ce===null){if(N)return F&&!q?F(A,h.encoder,Y,"key",G):A;ce=""}if(y(ce)||r.isBuffer(ce)){if(F){var Ne=q?A:F(A,h.encoder,Y,"key",G);if(E==="comma"&&q){for(var qe=l.call(String(ce),","),Me="",Je=0;Je<qe.length;++Je)Me+=(Je===0?"":",")+V(F(qe[Je],h.encoder,Y,"value",G));return[V(Ne)+(T&&s(ce)&&qe.length===1?"[]":"")+"="+Me]}return[V(Ne)+"="+V(F(ce,h.encoder,Y,"value",G))]}return[V(A)+"="+V(String(ce))]}var rt=[];if(typeof ce>"u")return rt;var Ke;if(E==="comma"&&s(ce))Ke=[{value:ce.length>0?ce.join(",")||null:void 0}];else if(s(j))Ke=j;else{var Pe=Object.keys(ce);Ke=H?Pe.sort(H):Pe}for(var Ae=T&&s(ce)&&ce.length===1?A+"[]":A,Fe=0;Fe<Ke.length;++Fe){var $e=Ke[Fe],Ze=typeof $e=="object"&&typeof $e.value<"u"?$e.value:ce[$e];if(!(L&&Ze===null)){var lt=s(ce)?typeof E=="function"?E(Ae,$e):Ae:Ae+(re?"."+$e:"["+$e+"]");ne.set(S,ue);var K=n();K.set(v,ne),d(rt,b(Ze,lt,E,T,N,L,F,j,H,re,Q,G,V,q,Y,K))}}return rt},_=function(b){if(!b)return h;if(b.encoder!==null&&typeof b.encoder<"u"&&typeof b.encoder!="function")throw new TypeError("Encoder has to be a function.");var S=b.charset||h.charset;if(typeof b.charset<"u"&&b.charset!=="utf-8"&&b.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var A=i.default;if(typeof b.format<"u"){if(!o.call(i.formatters,b.format))throw new TypeError("Unknown format option provided.");A=b.format}var E=i.formatters[A],T=h.filter;return(typeof b.filter=="function"||s(b.filter))&&(T=b.filter),{addQueryPrefix:typeof b.addQueryPrefix=="boolean"?b.addQueryPrefix:h.addQueryPrefix,allowDots:typeof b.allowDots>"u"?h.allowDots:!!b.allowDots,charset:S,charsetSentinel:typeof b.charsetSentinel=="boolean"?b.charsetSentinel:h.charsetSentinel,delimiter:typeof b.delimiter>"u"?h.delimiter:b.delimiter,encode:typeof b.encode=="boolean"?b.encode:h.encode,encoder:typeof b.encoder=="function"?b.encoder:h.encoder,encodeValuesOnly:typeof b.encodeValuesOnly=="boolean"?b.encodeValuesOnly:h.encodeValuesOnly,filter:T,format:A,formatter:E,serializeDate:typeof b.serializeDate=="function"?b.serializeDate:h.serializeDate,skipNulls:typeof b.skipNulls=="boolean"?b.skipNulls:h.skipNulls,sort:typeof b.sort=="function"?b.sort:null,strictNullHandling:typeof b.strictNullHandling=="boolean"?b.strictNullHandling:h.strictNullHandling}};t.exports=function(b,S){var A=b,E=_(S),T,N;typeof E.filter=="function"?(N=E.filter,A=N("",A)):s(E.filter)&&(N=E.filter,T=N);var L=[];if(typeof A!="object"||A===null)return"";var F;S&&S.arrayFormat in a?F=S.arrayFormat:S&&"indices"in S?F=S.indices?"indices":"repeat":F="indices";var j=a[F];if(S&&"commaRoundTrip"in S&&typeof S.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var H=j==="comma"&&S&&S.commaRoundTrip;T||(T=Object.keys(A)),E.sort&&T.sort(E.sort);for(var re=n(),Q=0;Q<T.length;++Q){var G=T[Q];E.skipNulls&&A[G]===null||d(L,w(A[G],G,j,H,E.strictNullHandling,E.skipNulls,E.encode?E.encoder:null,E.filter,E.sort,E.allowDots,E.serializeDate,E.format,E.formatter,E.encodeValuesOnly,E.charset,re))}var V=L.join(E.delimiter),q=E.addQueryPrefix===!0?"?":"";return E.charsetSentinel&&(E.charset==="iso-8859-1"?q+="utf8=%26%2310003%3B&":q+="utf8=%E2%9C%93&"),V.length>0?q+V:""}}),eee=Jn((e,t)=>{var n=LO(),r=Object.prototype.hasOwnProperty,i=Array.isArray,o={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(y){return y.replace(/&#(\d+);/g,function(v,w){return String.fromCharCode(parseInt(w,10))})},s=function(y,v){return y&&typeof y=="string"&&v.comma&&y.indexOf(",")>-1?y.split(","):y},l="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",d=function(y,v){var w={},_=v.ignoreQueryPrefix?y.replace(/^\?/,""):y,b=v.parameterLimit===1/0?void 0:v.parameterLimit,S=_.split(v.delimiter,b),A=-1,E,T=v.charset;if(v.charsetSentinel)for(E=0;E<S.length;++E)S[E].indexOf("utf8=")===0&&(S[E]===c?T="utf-8":S[E]===l&&(T="iso-8859-1"),A=E,E=S.length);for(E=0;E<S.length;++E)if(E!==A){var N=S[E],L=N.indexOf("]="),F=L===-1?N.indexOf("="):L+1,j,H;F===-1?(j=v.decoder(N,o.decoder,T,"key"),H=v.strictNullHandling?null:""):(j=v.decoder(N.slice(0,F),o.decoder,T,"key"),H=n.maybeMap(s(N.slice(F+1),v),function(re){return v.decoder(re,o.decoder,T,"value")})),H&&v.interpretNumericEntities&&T==="iso-8859-1"&&(H=a(H)),N.indexOf("[]=")>-1&&(H=i(H)?[H]:H),r.call(w,j)?w[j]=n.combine(w[j],H):w[j]=H}return w},p=function(y,v,w,_){for(var b=_?v:s(v,w),S=y.length-1;S>=0;--S){var A,E=y[S];if(E==="[]"&&w.parseArrays)A=[].concat(b);else{A=w.plainObjects?Object.create(null):{};var T=E.charAt(0)==="["&&E.charAt(E.length-1)==="]"?E.slice(1,-1):E,N=parseInt(T,10);!w.parseArrays&&T===""?A={0:b}:!isNaN(N)&&E!==T&&String(N)===T&&N>=0&&w.parseArrays&&N<=w.arrayLimit?(A=[],A[N]=b):T!=="__proto__"&&(A[T]=b)}b=A}return b},m=function(y,v,w,_){if(y){var b=w.allowDots?y.replace(/\.([^.[]+)/g,"[$1]"):y,S=/(\[[^[\]]*])/,A=/(\[[^[\]]*])/g,E=w.depth>0&&S.exec(b),T=E?b.slice(0,E.index):b,N=[];if(T){if(!w.plainObjects&&r.call(Object.prototype,T)&&!w.allowPrototypes)return;N.push(T)}for(var L=0;w.depth>0&&(E=A.exec(b))!==null&&L<w.depth;){if(L+=1,!w.plainObjects&&r.call(Object.prototype,E[1].slice(1,-1))&&!w.allowPrototypes)return;N.push(E[1])}return E&&N.push("["+b.slice(E.index)+"]"),p(N,v,w,_)}},h=function(y){if(!y)return o;if(y.decoder!==null&&y.decoder!==void 0&&typeof y.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof y.charset<"u"&&y.charset!=="utf-8"&&y.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var v=typeof y.charset>"u"?o.charset:y.charset;return{allowDots:typeof y.allowDots>"u"?o.allowDots:!!y.allowDots,allowPrototypes:typeof y.allowPrototypes=="boolean"?y.allowPrototypes:o.allowPrototypes,allowSparse:typeof y.allowSparse=="boolean"?y.allowSparse:o.allowSparse,arrayLimit:typeof y.arrayLimit=="number"?y.arrayLimit:o.arrayLimit,charset:v,charsetSentinel:typeof y.charsetSentinel=="boolean"?y.charsetSentinel:o.charsetSentinel,comma:typeof y.comma=="boolean"?y.comma:o.comma,decoder:typeof y.decoder=="function"?y.decoder:o.decoder,delimiter:typeof y.delimiter=="string"||n.isRegExp(y.delimiter)?y.delimiter:o.delimiter,depth:typeof y.depth=="number"||y.depth===!1?+y.depth:o.depth,ignoreQueryPrefix:y.ignoreQueryPrefix===!0,interpretNumericEntities:typeof y.interpretNumericEntities=="boolean"?y.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:typeof y.parameterLimit=="number"?y.parameterLimit:o.parameterLimit,parseArrays:y.parseArrays!==!1,plainObjects:typeof y.plainObjects=="boolean"?y.plainObjects:o.plainObjects,strictNullHandling:typeof y.strictNullHandling=="boolean"?y.strictNullHandling:o.strictNullHandling}};t.exports=function(y,v){var w=h(v);if(y===""||y===null||typeof y>"u")return w.plainObjects?Object.create(null):{};for(var _=typeof y=="string"?d(y,w):y,b=w.plainObjects?Object.create(null):{},S=Object.keys(_),A=0;A<S.length;++A){var E=S[A],T=m(E,_[E],w,typeof y=="string");b=n.merge(b,T,w)}return w.allowSparse===!0?b:n.compact(b)}}),tee=Jn((e,t)=>{var n=QQ(),r=eee(),i=jv();t.exports={formats:i,parse:r,stringify:n}}),nee={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Lv=typeof window<"u"&&typeof window.document<"u"?window.crypto:mv;Lv.getRandomValues||(Lv=nee);var xn=class extends Error{constructor(t,n,r,i,o,a){super(i);R(this,"isApiError",!0);this.code=t,this.description=n,this.type=r,this.message=i,this.error=o,this.id=a,this.id||(this.id=xn.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){let t=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],r=4,i=Array.from(Lv.getRandomValues(new Uint8Array(r))).map(o=>o.toString(16).padStart(2,"0")).join("").toUpperCase();return`${t}_${n}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},ree=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,FO=e=>e instanceof xn||ree(e)&&e.isApiError===!0,Tu=class extends xn{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}},qO=class extends xn{constructor(e,t,n){super(500,"An internal error occurred","Internal",e,t,n)}},UO=class extends xn{constructor(e,t,n){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n)}},BO=class extends xn{constructor(e,t,n){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n)}},zO=class extends xn{constructor(e,t,n){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n)}},ZO=class extends xn{constructor(e,t,n){super(400,"The request payload is invalid.","InvalidPayload",e,t,n)}},HO=class extends xn{constructor(e,t,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n)}},WO=class extends xn{constructor(e,t,n){super(405,"The requested method does not exist.","MethodNotFound",e,t,n)}},VO=class extends xn{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}},KO=class extends xn{constructor(e,t,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n)}},GO=class extends xn{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}},YO=class extends xn{constructor(e,t,n){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",e,t,n)}},JO=class extends xn{constructor(e,t,n){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",e,t,n)}},XO=class extends xn{constructor(t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,n,r)}},QO=class extends xn{constructor(e,t,n){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,n)}},eT=class extends xn{constructor(e,t,n){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",e,t,n)}},tT=class extends xn{constructor(e,t,n){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",e,t,n)}},nT=class extends xn{constructor(t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,n,r)}},rT=class extends xn{constructor(e,t,n){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,n)}},iT=class extends xn{constructor(e,t,n){super(429,"The request has been rate limited.","RateLimited",e,t,n)}},oT=class extends xn{constructor(e,t,n){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n)}},aT=class extends xn{constructor(e,t,n){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",e,t,n)}},sT=class extends xn{constructor(e,t,n){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",e,t,n)}},uT=class extends xn{constructor(e,t,n){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",e,t,n)}},iee={Unknown:Tu,Internal:qO,Unauthorized:UO,Forbidden:BO,PayloadTooLarge:zO,InvalidPayload:ZO,UnsupportedMediaType:HO,MethodNotFound:WO,ResourceNotFound:VO,InvalidJsonSchema:KO,InvalidDataFormat:GO,InvalidIdentifier:YO,RelationConflict:JO,ReferenceConstraint:XO,ResourceLockedConflict:QO,ReferenceNotFound:eT,InvalidQuery:tT,Runtime:nT,AlreadyExists:rT,RateLimited:iT,PaymentRequired:oT,QuotaExceeded:aT,LimitExceeded:sT,BreakingChanges:uT},Fv=e=>FO(e)?e:e instanceof Error?new Tu(e.message,e):typeof e=="string"?new Tu(e):oee(e);function oee(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){let t=iee[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Tu(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Tu("An invalid error occurred: "+JSON.stringify(e))}var wc=class extends Error{constructor(t,n,r){super(t),this.innerError=n,this.file=r,this.name="FileUploadError"}},aee=Dv(UQ()),see=Dv(BQ()),uee="https://api.botpress.cloud",lee=6e4,cee="BP_API_URL",fee="BP_BOT_ID",dee="BP_INTEGRATION_ID",pee="BP_WORKSPACE_ID",hee="BP_TOKEN";function mee(e){let t=yee(e),n={};t.workspaceId&&(n["x-workspace-id"]=t.workspaceId),t.botId&&(n["x-bot-id"]=t.botId),t.integrationId&&(n["x-integration-id"]=t.integrationId),t.token&&(n.Authorization=`Bearer ${t.token}`),n={...n,...t.headers};let r=t.apiUrl??uee,i=t.timeout??lee;return{apiUrl:r,timeout:i,withCredentials:MO,headers:n}}function yee(e){return MO?e:Rv?gee(e):e}function gee(e){let t={...e,apiUrl:e.apiUrl??process.env[cee],botId:e.botId??process.env[fee],integrationId:e.integrationId??process.env[dee],workspaceId:e.workspaceId??process.env[pee]},n=t.token??process.env[hee];return n&&(t.token=n),t}var vee=Dv(tee()),bee=e=>e[1]!==void 0,he=e=>{let{method:t,path:n,query:r,headers:i,body:o}=e,a=Object.entries(i).filter(bee),s=Object.fromEntries(a),l=vee.default.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),c=l?[n,l].join("?"):n;return{method:t,url:c,headers:s,data:o}},_ee=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),wee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),xee=e=>({path:"/v1/chat/conversations",headers:{},query:{nextToken:e.nextToken,tags:e.tags,participantIds:e.participantIds,integrationName:e.integrationName},params:{},body:{}}),See=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),Eee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}}),Aee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Cee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Oee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}}),Tee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),$ee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),kee=e=>({path:"/v1/chat/events",headers:{},query:{},params:{},body:{type:e.type,payload:e.payload,schedule:e.schedule,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId}}),Iee=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Pee=e=>({path:"/v1/chat/events",headers:{},query:{nextToken:e.nextToken,type:e.type,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId,status:e.status},params:{},body:{}}),Ree=e=>({path:"/v1/chat/messages",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}}),Dee=e=>({path:"/v1/chat/messages/get-or-create",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}}),Nee=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Mee=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}}),jee=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),Lee=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Fee=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),qee=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Uee=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),Bee=e=>({path:"/v1/chat/users/get-or-create",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),zee=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,name:e.name,pictureUrl:e.pictureUrl}}),Zee=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Hee=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{}}),Wee=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}}),Vee=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}/get-or-set`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}}),Kee=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload}}),Gee=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}}),Yee=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}}),Jee=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Xee=e=>({path:"/v1/chat/tasks",headers:{},query:{},params:{},body:{title:e.title,description:e.description,type:e.type,data:e.data,parentTaskId:e.parentTaskId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags}}),Qee=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{title:e.title,description:e.description,data:e.data,timeoutAt:e.timeoutAt,status:e.status,tags:e.tags}}),ete=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),tte=e=>({path:"/v1/chat/tasks",headers:{},query:{nextToken:e.nextToken,tags:e.tags,conversationId:e.conversationId,userId:e.userId,parentTaskId:e.parentTaskId,status:e.status,type:e.type},params:{},body:{}}),nte=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}}),rte=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}}),ite=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}}),ote=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}}),ate=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}}),ste=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}}),ute=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),lte=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}}),cte=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}}),fte=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}}),dte=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),pte=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),hte=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}}),mte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}}),yte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}}),gte=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}}),vte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),bte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),_te=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}}),wte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),xte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}}),Ste=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Ete=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Ate=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Cte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Ote=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}}),Tte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}}),$te=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}}),kte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}}),Ite=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}}),Pte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}}),Rte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Dte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Nte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages/by-bot`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Mte=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}}),jte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Lte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}}),Fte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{name:e.name,spendingLimit:e.spendingLimit,about:e.about,profilePicture:e.profilePicture,contactEmail:e.contactEmail,website:e.website,socialAccounts:e.socialAccounts,isPublic:e.isPublic,handle:e.handle}}),qte=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}}),Ute=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),Bte=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}}),zte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Zte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Hte=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),Wte=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}}),Vte=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Kte=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}}),Gte=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}}),Yte=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}}),Jte=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}}),Xte=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Qte=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,interfaces:e.interfaces,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,secrets:e.secrets,code:e.code,url:e.url,dev:e.dev,icon:e.icon,readme:e.readme,title:e.title,description:e.description,public:e.public}}),ene=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,channels:e.channels,identifier:e.identifier,actions:e.actions,events:e.events,states:e.states,user:e.user,entities:e.entities,interfaces:e.interfaces,secrets:e.secrets,code:e.code,icon:e.icon,readme:e.readme,title:e.title,description:e.description,url:e.url,public:e.public}}),tne=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}}),nne=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),rne=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}}),ine=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),one=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),ane=e=>({path:"/v1/admin/interfaces",headers:{},query:{},params:{},body:{name:e.name,version:e.version,events:e.events,actions:e.actions,entities:e.entities}}),sne=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),une=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),lne=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{events:e.events,actions:e.actions,entities:e.entities}}),cne=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),fne=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),dne=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),pne=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}}),hne=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),mne=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}}),yne=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}}),gne=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}}),vne=e=>({path:"/v1/files",headers:{},query:{},params:{},body:{key:e.key,tags:e.tags,size:e.size,index:e.index,accessPolicies:e.accessPolicies,contentType:e.contentType}}),bne=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),_ne=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}}),wne=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),xne=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies}}),Sne=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit},params:{},body:{}}),Ene=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}}),Ane=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),Cne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}}),One=e=>({path:"/v1/tables",headers:{},query:{},params:{},body:{name:e.name,factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}}),Tne=e=>({path:`/v1/tables/${encodeURIComponent(e.sourceTableId)}/duplicate`,headers:{},query:{},params:{sourceTableId:e.sourceTableId},body:{tableName:e.tableName,schemaOnly:e.schemaOnly,factor:e.factor}}),$ne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{name:e.name,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}}),kne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}}),Ine=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),Pne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}}),Rne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/find`,headers:{},query:{},params:{table:e.table},body:{limit:e.limit,offset:e.offset,filter:e.filter,group:e.group,search:e.search,orderBy:e.orderBy,orderDirection:e.orderDirection}}),Dne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),Nne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/delete`,headers:{},query:{},params:{table:e.table},body:{ids:e.ids,filter:e.filter,deleteAllRows:e.deleteAllRows}}),Mne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),jne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/upsert`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,keyColumn:e.keyColumn,waitComputed:e.waitComputed}}),Lne=class{constructor(t,n={}){R(this,"createConversation",async t=>{let{path:n,headers:r,query:i,body:o}=_ee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getConversation",async t=>{let{path:n,headers:r,query:i,body:o}=wee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listConversations",async t=>{let{path:n,headers:r,query:i,body:o}=xee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getOrCreateConversation",async t=>{let{path:n,headers:r,query:i,body:o}=See(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateConversation",async t=>{let{path:n,headers:r,query:i,body:o}=Eee(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteConversation",async t=>{let{path:n,headers:r,query:i,body:o}=Aee(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listParticipants",async t=>{let{path:n,headers:r,query:i,body:o}=Cee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"addParticipant",async t=>{let{path:n,headers:r,query:i,body:o}=Oee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getParticipant",async t=>{let{path:n,headers:r,query:i,body:o}=Tee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"removeParticipant",async t=>{let{path:n,headers:r,query:i,body:o}=$ee(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createEvent",async t=>{let{path:n,headers:r,query:i,body:o}=kee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getEvent",async t=>{let{path:n,headers:r,query:i,body:o}=Iee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listEvents",async t=>{let{path:n,headers:r,query:i,body:o}=Pee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Ree(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getOrCreateMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Dee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Nee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Mee(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listMessages",async t=>{let{path:n,headers:r,query:i,body:o}=jee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Lee(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createUser",async t=>{let{path:n,headers:r,query:i,body:o}=Fee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getUser",async t=>{let{path:n,headers:r,query:i,body:o}=qee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listUsers",async t=>{let{path:n,headers:r,query:i,body:o}=Uee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getOrCreateUser",async t=>{let{path:n,headers:r,query:i,body:o}=Bee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateUser",async t=>{let{path:n,headers:r,query:i,body:o}=zee(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteUser",async t=>{let{path:n,headers:r,query:i,body:o}=Zee(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getState",async t=>{let{path:n,headers:r,query:i,body:o}=Hee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"setState",async t=>{let{path:n,headers:r,query:i,body:o}=Wee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getOrSetState",async t=>{let{path:n,headers:r,query:i,body:o}=Vee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"patchState",async t=>{let{path:n,headers:r,query:i,body:o}=Kee(t),a=(this.props.toAxiosRequest??he)({method:"patch",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"callAction",async t=>{let{path:n,headers:r,query:i,body:o}=Gee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"configureIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=Yee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getTask",async t=>{let{path:n,headers:r,query:i,body:o}=Jee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createTask",async t=>{let{path:n,headers:r,query:i,body:o}=Xee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateTask",async t=>{let{path:n,headers:r,query:i,body:o}=Qee(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteTask",async t=>{let{path:n,headers:r,query:i,body:o}=ete(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listTasks",async t=>{let{path:n,headers:r,query:i,body:o}=tte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"trackAnalytics",async t=>{let{path:n,headers:r,query:i,body:o}=nte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"runVrl",async t=>{let{path:n,headers:r,query:i,body:o}=rte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getAccount",async t=>{let{path:n,headers:r,query:i,body:o}=ite(),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateAccount",async t=>{let{path:n,headers:r,query:i,body:o}=ote(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listPersonalAccessTokens",async t=>{let{path:n,headers:r,query:i,body:o}=ate(),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createPersonalAccessToken",async t=>{let{path:n,headers:r,query:i,body:o}=ste(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deletePersonalAccessToken",async t=>{let{path:n,headers:r,query:i,body:o}=ute(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"setAccountPreference",async t=>{let{path:n,headers:r,query:i,body:o}=lte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getAccountPreference",async t=>{let{path:n,headers:r,query:i,body:o}=cte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listPublicIntegrations",async t=>{let{path:n,headers:r,query:i,body:o}=fte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getPublicIntegrationById",async t=>{let{path:n,headers:r,query:i,body:o}=dte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getPublicIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=pte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createBot",async t=>{let{path:n,headers:r,query:i,body:o}=hte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateBot",async t=>{let{path:n,headers:r,query:i,body:o}=mte(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"transferBot",async t=>{let{path:n,headers:r,query:i,body:o}=yte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listBots",async t=>{let{path:n,headers:r,query:i,body:o}=gte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getBot",async t=>{let{path:n,headers:r,query:i,body:o}=vte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteBot",async t=>{let{path:n,headers:r,query:i,body:o}=bte(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getBotLogs",async t=>{let{path:n,headers:r,query:i,body:o}=_te(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getBotWebchat",async t=>{let{path:n,headers:r,query:i,body:o}=wte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getBotAnalytics",async t=>{let{path:n,headers:r,query:i,body:o}=xte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getBotIssue",async t=>{let{path:n,headers:r,query:i,body:o}=Ste(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listBotIssues",async t=>{let{path:n,headers:r,query:i,body:o}=Ete(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteBotIssue",async t=>{let{path:n,headers:r,query:i,body:o}=Ate(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listBotIssueEvents",async t=>{let{path:n,headers:r,query:i,body:o}=Cte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"setWorkspacePaymentMethod",async t=>{let{path:n,headers:r,query:i,body:o}=Ote(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listWorkspaceInvoices",async t=>{let{path:n,headers:r,query:i,body:o}=Tte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getUpcomingInvoice",async t=>{let{path:n,headers:r,query:i,body:o}=$te(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"chargeWorkspaceUnpaidInvoices",async t=>{let{path:n,headers:r,query:i,body:o}=kte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Ite(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getPublicWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Pte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Rte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listWorkspaceUsages",async t=>{let{path:n,headers:r,query:i,body:o}=Dte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"breakDownWorkspaceUsageByBot",async t=>{let{path:n,headers:r,query:i,body:o}=Nte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getAllWorkspaceQuotaCompletion",async t=>{let{path:n,headers:r,query:i,body:o}=Mte(),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getWorkspaceQuota",async t=>{let{path:n,headers:r,query:i,body:o}=jte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listWorkspaceQuotas",async t=>{let{path:n,headers:r,query:i,body:o}=Lte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Fte(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"checkHandleAvailability",async t=>{let{path:n,headers:r,query:i,body:o}=qte(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listWorkspaces",async t=>{let{path:n,headers:r,query:i,body:o}=Ute(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listPublicWorkspaces",async t=>{let{path:n,headers:r,query:i,body:o}=Bte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=zte(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getAuditRecords",async t=>{let{path:n,headers:r,query:i,body:o}=Zte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listWorkspaceMembers",async t=>{let{path:n,headers:r,query:i,body:o}=Hte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Wte(),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Vte(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Kte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Gte(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listIntegrationApiKeys",async t=>{let{path:n,headers:r,query:i,body:o}=Yte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createIntegrationApiKey",async t=>{let{path:n,headers:r,query:i,body:o}=Jte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteIntegrationApiKey",async t=>{let{path:n,headers:r,query:i,body:o}=Xte(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=Qte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=ene(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listIntegrations",async t=>{let{path:n,headers:r,query:i,body:o}=tne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=nne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getIntegrationLogs",async t=>{let{path:n,headers:r,query:i,body:o}=rne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getIntegrationByName",async t=>{let{path:n,headers:r,query:i,body:o}=ine(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=one(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createInterface",async t=>{let{path:n,headers:r,query:i,body:o}=ane(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getInterface",async t=>{let{path:n,headers:r,query:i,body:o}=sne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getInterfaceByName",async t=>{let{path:n,headers:r,query:i,body:o}=une(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateInterface",async t=>{let{path:n,headers:r,query:i,body:o}=lne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteInterface",async t=>{let{path:n,headers:r,query:i,body:o}=cne(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listInterfaces",async t=>{let{path:n,headers:r,query:i,body:o}=fne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getUsage",async t=>{let{path:n,headers:r,query:i,body:o}=dne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getMultipleUsages",async t=>{let{path:n,headers:r,query:i,body:o}=pne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listUsageHistory",async t=>{let{path:n,headers:r,query:i,body:o}=hne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"changeAISpendQuota",async t=>{let{path:n,headers:r,query:i,body:o}=mne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listActivities",async t=>{let{path:n,headers:r,query:i,body:o}=yne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"introspect",async t=>{let{path:n,headers:r,query:i,body:o}=gne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"upsertFile",async t=>{let{path:n,headers:r,query:i,body:o}=vne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteFile",async t=>{let{path:n,headers:r,query:i,body:o}=bne(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listFiles",async t=>{let{path:n,headers:r,query:i,body:o}=_ne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getFile",async t=>{let{path:n,headers:r,query:i,body:o}=wne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateFileMetadata",async t=>{let{path:n,headers:r,query:i,body:o}=xne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"searchFiles",async t=>{let{path:n,headers:r,query:i,body:o}=Sne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listTables",async t=>{let{path:n,headers:r,query:i,body:o}=Ene(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getTable",async t=>{let{path:n,headers:r,query:i,body:o}=Ane(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getOrCreateTable",async t=>{let{path:n,headers:r,query:i,body:o}=Cne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createTable",async t=>{let{path:n,headers:r,query:i,body:o}=One(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"duplicateTable",async t=>{let{path:n,headers:r,query:i,body:o}=Tne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateTable",async t=>{let{path:n,headers:r,query:i,body:o}=$ne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"renameTableColumn",async t=>{let{path:n,headers:r,query:i,body:o}=kne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteTable",async t=>{let{path:n,headers:r,query:i,body:o}=Ine(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getTableRow",async t=>{let{path:n,headers:r,query:i,body:o}=Pne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"findTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Rne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Dne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Nne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Mne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"upsertTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=jne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});this.axiosInstance=t,this.props=n}};function me(e){var t;return Cu.isAxiosError(e)&&((t=e.response)!=null&&t.data)?Fv(e.response.data):Fv(e)}var lT=100*1024*1024,Fne=lT,qne=lT,Une=class extends Lne{constructor(t={}){let n=mee(t),{apiUrl:r,headers:i,withCredentials:o,timeout:a}=n,s=Cu.create({baseURL:r,headers:i,withCredentials:o,timeout:a,maxBodyLength:Fne,maxContentLength:qne,httpAgent:Rv?new aee.default.Agent({keepAlive:!0}):void 0,httpsAgent:Rv?new see.default.Agent({keepAlive:!0}):void 0});super(s);R(this,"config");R(this,"uploadFile",async({key:t,index:n,tags:r,contentType:i,accessPolicies:o,content:a,url:s})=>{if(s&&a)throw new wc("Cannot provide both content and URL, please provide only one of them");if(s&&(a=await Cu.get(s,{responseType:"arraybuffer"}).then(d=>d.data).catch(d=>{throw new wc(`Failed to download file from provided URL: ${d.message}`,d)})),!a)throw new wc("No content was provided for the file");let l=a instanceof Buffer?a:Buffer.from(a),{file:c}=await this.upsertFile({key:t,tags:r,index:n,accessPolicies:o,contentType:i,size:l.byteLength});try{await Cu.put(c.uploadUrl,l,{maxBodyLength:1/0})}catch(d){throw new wc(`Failed to upload file: ${d.message}`,d,c)}return{file:c}});this.config=n}};const qv=Jf(Object.freeze(Object.defineProperty({__proto__:null,AlreadyExistsError:rT,BreakingChangesError:uT,Client:Une,ForbiddenError:BO,InternalError:qO,InvalidDataFormatError:GO,InvalidIdentifierError:YO,InvalidJsonSchemaError:KO,InvalidPayloadError:ZO,InvalidQueryError:tT,LimitExceededError:sT,MethodNotFoundError:WO,PayloadTooLargeError:zO,PaymentRequiredError:oT,QuotaExceededError:aT,RateLimitedError:iT,ReferenceConstraintError:XO,ReferenceNotFoundError:eT,RelationConflictError:JO,ResourceLockedConflictError:QO,ResourceNotFoundError:VO,RuntimeError:nT,UnauthorizedError:UO,UnknownError:Tu,UnsupportedMediaTypeError:HO,UploadFileError:wc,axios:TQ,errorFrom:Fv,isApiError:FO},Symbol.toStringTag,{value:"Module"})));(function(e){var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,s=(D,je)=>{for(var He in je)n(D,He,{get:je[He],enumerable:!0})},l=(D,je,He,Xe)=>{if(je&&typeof je=="object"||typeof je=="function")for(let Re of i(je))!a.call(D,Re)&&Re!==He&&n(D,Re,{get:()=>je[Re],enumerable:!(Xe=r(je,Re))||Xe.enumerable});return D},c=(D,je,He)=>(l(D,je,"default"),He&&l(He,je,"default")),d=(D,je,He)=>(He=D!=null?t(o(D)):{},l(je||!D||!D.__esModule?n(He,"default",{value:D,enumerable:!0}):He,D)),p=D=>l(n({},"__esModule",{value:!0}),D),m={};s(m,{Bot:()=>sr,BotSpecificClient:()=>cn,Integration:()=>rn,IntegrationDefinition:()=>K,IntegrationSpecificClient:()=>Te,RuntimeError:()=>Fe.RuntimeError,botIdHeader:()=>Y,botUserIdHeader:()=>ne,configurationHeader:()=>ue,integrationIdHeader:()=>ce,isApiError:()=>Fe.isApiError,messages:()=>h,operationHeader:()=>Oe,parseBody:()=>Me,serve:()=>Je,studioComponentDefinitions:()=>_,typeHeader:()=>M,webhookIdHeader:()=>P}),e.exports=p(m);var h={};s(h,{defaults:()=>q});var y={};s(y,{default:()=>b,studioComponentDefinitions:()=>_});var v=vd;c(y,vd);var w=v.z.object({allowDynamicVariable:v.z.boolean().optional(),horizontal:v.z.boolean().optional()}),_={string:{text:{id:"text",params:w.extend({multiLine:v.z.boolean().optional(),growVertically:v.z.boolean().optional(),suggestions:v.z.array(v.z.string()).optional()})},dropdown:{id:"dropdown",params:w.extend({filterable:v.z.boolean().optional()})},radiogroup:{id:"radiogroup",params:w.extend({})},date:{id:"date",params:w.extend({dateFormat:v.z.string().optional(),minDate:v.z.string().optional(),maxDate:v.z.string().optional(),defaultTimezone:v.z.string().optional(),disableTimezoneSelection:v.z.boolean().optional(),highlightCurrentDay:v.z.boolean().optional(),showShortcutButtons:v.z.boolean().optional(),showOutsideDaysOfMonth:v.z.boolean().optional(),firstDayOfWeek:v.z.number().optional(),canChangeMonth:v.z.boolean().optional(),showWeekNumbers:v.z.boolean().optional()})},time:{id:"time",params:w.extend({useAMPM:v.z.boolean().optional(),timeFormat:v.z.string().optional(),minTime:v.z.string().optional(),maxTime:v.z.string().optional(),showArrowButtons:v.z.boolean().optional(),precision:v.z.enum(["minute","second","millisecond"]).optional()})},richtext:{id:"richtext",params:v.z.object({allowDynamicVariable:v.z.boolean().optional(),resizable:v.z.boolean().optional()})},json:{id:"json",params:w.extend({showPreview:v.z.boolean().optional(),showValidationError:v.z.boolean().optional()})},file:{id:"file",params:w.extend({fileTypes:v.z.array(v.z.enum(["image","audio","video"])).optional(),showUploadedFiles:v.z.boolean().optional()})}},number:{number:{id:"number",params:w.extend({allowNumericCharactersOnly:v.z.boolean().optional(),stepSize:v.z.number().optional()})},slider:{id:"slider",params:v.z.object({horizontal:v.z.boolean().optional(),stepSize:v.z.number().optional()})}},boolean:{switch:{id:"switch",params:w}},array:{options:{id:"options",params:w},strings:{id:"strings",params:w},daterange:{id:"daterange",params:v.z.object({dateFormat:v.z.string().optional(),minDate:v.z.string().optional(),maxDate:v.z.string().optional(),defaultTimezone:v.z.string().optional(),allowSingleDayRange:v.z.boolean().optional(),highlightCurrentDay:v.z.boolean().optional(),showOutsideDaysOfMonth:v.z.boolean().optional(),firstDayOfWeek:v.z.number().optional(),canChangeMonth:v.z.boolean().optional(),showWeekNumbers:v.z.boolean().optional()})}},object:{collapsible:{id:"collapsible",params:v.z.object({defaultOpen:v.z.boolean().optional()})},modal:{id:"modal",params:v.z.object({title:v.z.string().optional(),buttonLabel:v.z.string().optional(),closeButtonLabel:v.z.string().optional()})},popover:{id:"popover",params:v.z.object({buttonLabel:v.z.string().optional()})}},discriminatedUnion:{}},b=v.z,S=y.z.string().min(1),A=y.z.object({text:S}),E=y.z.object({markdown:S}),T=y.z.object({imageUrl:S}),N=y.z.object({audioUrl:S}),L=y.z.object({videoUrl:S}),F=y.z.object({fileUrl:S,title:S.optional()}),j=y.z.object({latitude:y.z.number(),longitude:y.z.number(),address:y.z.string().optional(),title:y.z.string().optional()}),H=y.z.object({title:S,subtitle:S.optional(),imageUrl:S.optional(),actions:y.z.array(y.z.object({action:y.z.enum(["postback","url","say"]),label:S,value:S}))}),re=y.z.object({text:S,options:y.z.array(y.z.object({label:S,value:S}))}),Q=y.z.object({items:y.z.array(H)}),G=y.z.discriminatedUnion("type",[y.z.object({type:y.z.literal("text"),payload:A}),y.z.object({type:y.z.literal("markdown"),payload:E}),y.z.object({type:y.z.literal("image"),payload:T}),y.z.object({type:y.z.literal("audio"),payload:N}),y.z.object({type:y.z.literal("video"),payload:L}),y.z.object({type:y.z.literal("file"),payload:F}),y.z.object({type:y.z.literal("location"),payload:j})]),V=y.z.object({items:y.z.array(G)}),q={text:{schema:A},markdown:{schema:E},image:{schema:T},audio:{schema:N},video:{schema:L},file:{schema:F},location:{schema:j},carousel:{schema:Q},card:{schema:H},dropdown:{schema:re},choice:{schema:re},bloc:{schema:V}},Y="x-bot-id",ne="x-bot-user-id",ce="x-integration-id",P="x-webhook-id",ue="x-bp-configuration",Oe="x-bp-operation",M="x-bp-type",Ne=hs,qe=console;function Me(D){if(!D.body)throw new Error("Missing body");return JSON.parse(D.body)}async function Je(D,je=8072,He=Ae){let Xe=(0,Ne.createServer)(async(Re,We)=>{try{let _t=await rt(Re);if(_t.path==="/health"){We.writeHead(200).end("ok");return}let Pt=await D(_t);We.writeHead((Pt==null?void 0:Pt.status)??200,(Pt==null?void 0:Pt.headers)??{}).end((Pt==null?void 0:Pt.body)??"{}")}catch(_t){qe.error("Error while handling request",{error:(_t==null?void 0:_t.message)??"Internal error occured"}),We.writeHead(500).end(JSON.stringify({error:(_t==null?void 0:_t.message)??"Internal error occured"}))}});return Xe.listen(je,()=>He(je)),Xe}async function rt(D){var Re;let je=await Pe(D),He={};for(let We=0;We<D.rawHeaders.length;We+=2){let _t=D.rawHeaders[We].toLowerCase(),Pt=D.rawHeaders[We+1];He[_t]=Pt}let Xe=new URL(D.url??"",D.headers.host?`http://${D.headers.host}`:"http://botpress.cloud");return{body:je,path:Xe.pathname,query:Ke(Xe.search,"?"),headers:He,method:((Re=D.method)==null?void 0:Re.toUpperCase())??"GET"}}function Ke(D,je){return D.indexOf(je)===0?D.slice(je.length):D}async function Pe(D){return new Promise((je,He)=>{if(D.method!=="POST"&&D.method!=="PUT"&&D.method!=="PATCH")return je(void 0);let Xe="";D.on("data",Re=>Xe+=Re.toString()),D.on("error",Re=>He(Re)),D.on("end",()=>je(Xe))})}function Ae(D){qe.info(`Listening on port ${D}`)}c(m,y,e.exports);var Fe=qv,$e=vd,Ze=$e.z.enum(["webhook_received","message_created","action_triggered","register","unregister","ping","create_user","create_conversation"]),lt=D=>{let je=D[Y],He=D[ne],Xe=D[ce],Re=D[P],We=D[ue],_t=Ze.parse(D[Oe]);if(!je)throw new Error("Missing bot headers");if(!He)throw new Error("Missing bot user headers");if(!Xe)throw new Error("Missing integration headers");if(!Re)throw new Error("Missing webhook headers");if(!We)throw new Error("Missing configuration headers");if(!_t)throw new Error("Missing operation headers");return{botId:je,botUserId:He,integrationId:Xe,webhookId:Re,operation:_t,configuration:We?JSON.parse(Buffer.from(We,"base64").toString("utf-8")):{}}},K=class{constructor(D){R(this,"name");R(this,"version");R(this,"title");R(this,"description");R(this,"icon");R(this,"readme");R(this,"configuration");R(this,"events");R(this,"actions");R(this,"channels");R(this,"states");R(this,"user");R(this,"secrets");R(this,"identifier");R(this,"entities");this.props=D,this.name=D.name,this.version=D.version,this.icon=D.icon,this.readme=D.readme,this.title=D.title,this.identifier=D.identifier,this.description=D.description,this.configuration=D.configuration,this.events=D.events,this.actions=D.actions,this.channels=D.channels,this.states=D.states,this.user=D.user,this.secrets=D.secrets,this.entities=D.entities}clone(D){return new K({...this,...D})}},pe=qv,Te=class{constructor(D){R(this,"createConversation",D=>this.client.createConversation(D));R(this,"getConversation",D=>this.client.getConversation(D));R(this,"listConversations",D=>this.client.listConversations(D));R(this,"getOrCreateConversation",D=>this.client.getOrCreateConversation(D));R(this,"updateConversation",D=>this.client.updateConversation(D));R(this,"deleteConversation",D=>this.client.deleteConversation(D));R(this,"listParticipants",D=>this.client.listParticipants(D));R(this,"addParticipant",D=>this.client.addParticipant(D));R(this,"getParticipant",D=>this.client.getParticipant(D));R(this,"removeParticipant",D=>this.client.removeParticipant(D));R(this,"createEvent",D=>this.client.createEvent(D));R(this,"getEvent",D=>this.client.getEvent(D));R(this,"listEvents",D=>this.client.listEvents(D));R(this,"createMessage",D=>this.client.createMessage(D));R(this,"getOrCreateMessage",D=>this.client.getOrCreateMessage(D));R(this,"getMessage",D=>this.client.getMessage(D));R(this,"updateMessage",D=>this.client.updateMessage(D));R(this,"listMessages",D=>this.client.listMessages(D));R(this,"deleteMessage",D=>this.client.deleteMessage(D));R(this,"createUser",D=>this.client.createUser(D));R(this,"getUser",D=>this.client.getUser(D));R(this,"listUsers",D=>this.client.listUsers(D));R(this,"getOrCreateUser",D=>this.client.getOrCreateUser(D));R(this,"updateUser",D=>this.client.updateUser(D));R(this,"deleteUser",D=>this.client.deleteUser(D));R(this,"getState",D=>this.client.getState(D));R(this,"setState",D=>this.client.setState(D));R(this,"getOrSetState",D=>this.client.getOrSetState(D));R(this,"patchState",D=>this.client.patchState(D));R(this,"configureIntegration",D=>this.client.configureIntegration(D));R(this,"uploadFile",D=>this.client.uploadFile(D));R(this,"upsertFile",D=>this.client.upsertFile(D));R(this,"deleteFile",D=>this.client.deleteFile(D));R(this,"listFiles",D=>this.client.listFiles(D));R(this,"getFile",D=>this.client.getFile(D));R(this,"updateFileMetadata",D=>this.client.updateFileMetadata(D));this.client=D}},Se=d(hs),et=D=>{if(process.env.BP_LOG_FORMAT==="json")return JSON.stringify({msg:Se.default.format(...D),visible_to_bot_owner:!0});{let[je,...He]=D;return Se.default.format(`[For Bot Owner] ${je}`,...He)}},Ue={forBot:()=>({info:(...D)=>{console.info(et(D))},warn:(...D)=>{console.warn(et(D))},error:(...D)=>{console.error(et(D))},debug:(...D)=>{console.debug(et(D))}})},ot=D=>async je=>{let He=lt(je.headers),Xe=new Te(new pe.Client({botId:He.botId,integrationId:He.integrationId})),Re={ctx:He,req:je,client:Xe,logger:Ue,instance:D};try{let We;switch(He.operation){case"webhook_received":We=await mt(Re);break;case"register":We=await ie(Re);break;case"unregister":We=await ge(Re);break;case"message_created":We=await ct(Re);break;case"action_triggered":We=await pn(Re);break;case"ping":We=await It(Re);break;case"create_user":We=await xe(Re);break;case"create_conversation":We=await Be(Re);break;default:throw new Error(`Unknown operation ${He.operation}`)}return We?{...We,status:We.status??200}:{status:200}}catch(We){if((0,pe.isApiError)(We)){let _t=new pe.RuntimeError(We.message,We);return{status:_t.code,body:JSON.stringify(_t.toJSON())}}throw We}},It=async D=>{},mt=async({client:D,ctx:je,req:He,logger:Xe,instance:Re})=>{let{req:We}=Me(He);return Re.webhook({client:D,ctx:je,req:We,logger:Xe})},ie=async({client:D,ctx:je,req:He,logger:Xe,instance:Re})=>{if(!Re.register)return;let{webhookUrl:We}=Me(He);await Re.register({client:D,ctx:je,webhookUrl:We,logger:Xe})},ge=async({client:D,ctx:je,req:He,logger:Xe,instance:Re})=>{if(!Re.unregister)return;let{webhookUrl:We}=Me(He);await Re.unregister({ctx:je,webhookUrl:We,client:D,logger:Xe})},xe=async({client:D,ctx:je,req:He,logger:Xe,instance:Re})=>{if(!Re.createUser)return;let{tags:We}=Me(He);return await Re.createUser({ctx:je,client:D,tags:We,logger:Xe})},Be=async({client:D,ctx:je,req:He,logger:Xe,instance:Re})=>{if(!Re.createConversation)return;let{channel:We,tags:_t}=Me(He);return await Re.createConversation({ctx:je,client:D,channel:We,tags:_t,logger:Xe})},ct=async({ctx:D,req:je,client:He,logger:Xe,instance:Re})=>{let{conversation:We,user:_t,type:Pt,payload:Xt,message:bn}=Me(je),Rn=Re.channels[We.channel];if(!Rn)throw new Error(`Channel ${We.channel} not found`);let mr=Rn.messages[Pt];if(!mr)throw new Error(`Message of type ${Pt} not found in channel ${We.channel}`);await mr({ctx:D,conversation:We,message:bn,user:_t,type:Pt,client:He,payload:Xt,ack:async({tags:ta})=>{await He.updateMessage({id:bn.id,tags:ta})},logger:Xe})},pn=async({req:D,ctx:je,client:He,logger:Xe,instance:Re})=>{let{input:We,type:_t}=Me(D);if(!_t)throw new Error("Missing action type");let Pt=Re.actions[_t];if(!Pt)throw new Error(`Action ${_t} not found`);let Xt=await Pt({ctx:je,input:We,client:He,type:_t,logger:Xe});return{body:JSON.stringify({output:Xt})}},rn=class{constructor(D){R(this,"props");R(this,"actions");R(this,"channels");R(this,"register");R(this,"unregister");R(this,"createUser");R(this,"createConversation");R(this,"webhook");R(this,"handler",ot(this));R(this,"start",D=>Je(this.handler,D));this.props=D,this.actions=D.actions,this.channels=D.channels,this.register=D.register,this.unregister=D.unregister,this.createUser=D.createUser,this.createConversation=D.createConversation,this.webhook=D.handler}},Jt=d(qv),cn=class{constructor(D){R(this,"getConversation",D=>this.client.getConversation(D));R(this,"listConversations",D=>this.client.listConversations(D));R(this,"updateConversation",D=>this.client.updateConversation(D));R(this,"deleteConversation",D=>this.client.deleteConversation(D));R(this,"listParticipants",D=>this.client.listParticipants(D));R(this,"addParticipant",D=>this.client.addParticipant(D));R(this,"getParticipant",D=>this.client.getParticipant(D));R(this,"removeParticipant",D=>this.client.removeParticipant(D));R(this,"getEvent",D=>this.client.getEvent(D));R(this,"listEvents",D=>this.client.listEvents(D));R(this,"createMessage",D=>this.client.createMessage(D));R(this,"getOrCreateMessage",D=>this.client.getOrCreateMessage(D));R(this,"getMessage",D=>this.client.getMessage(D));R(this,"updateMessage",D=>this.client.updateMessage(D));R(this,"listMessages",D=>this.client.listMessages(D));R(this,"deleteMessage",D=>this.client.deleteMessage(D));R(this,"getUser",D=>this.client.getUser(D));R(this,"listUsers",D=>this.client.listUsers(D));R(this,"updateUser",D=>this.client.updateUser(D));R(this,"deleteUser",D=>this.client.deleteUser(D));R(this,"getState",D=>this.client.getState(D).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"setState",D=>this.client.setState(D).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"getOrSetState",D=>this.client.getOrSetState(D).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"patchState",D=>this.client.patchState(D).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"callAction",D=>this.client.callAction(D));R(this,"uploadFile",D=>this.client.uploadFile(D));R(this,"upsertFile",D=>this.client.upsertFile(D));R(this,"deleteFile",D=>this.client.deleteFile(D));R(this,"listFiles",D=>this.client.listFiles(D));R(this,"getFile",D=>this.client.getFile(D));R(this,"updateFileMetadata",D=>this.client.updateFileMetadata(D));R(this,"searchFiles",D=>this.client.searchFiles(D));R(this,"createConversation",D=>this.client.createConversation(D));R(this,"getOrCreateConversation",D=>this.client.getOrCreateConversation(D));R(this,"createUser",D=>this.client.createUser(D));R(this,"getOrCreateUser",D=>this.client.getOrCreateUser(D));this.client=D}},Cn=vd,ee=Cn.z.enum(["event_received","register","unregister","ping","action_triggered"]),ae=D=>{let je=D[Y],He=D[ue],Xe=D[M],Re=ee.parse(D[Oe]);if(!je)throw new Error("Missing bot headers");if(!Xe)throw new Error("Missing type headers");if(!He)throw new Error("Missing configuration headers");if(!Re)throw new Error("Missing operation headers");return{botId:je,operation:Re,type:Xe,configuration:He?JSON.parse(Buffer.from(He,"base64").toString("utf-8")):{}}},ft=D=>async je=>{let He=ae(je.headers);He.operation!=="ping"&&qe.info(`Received ${He.operation} operation for bot ${He.botId} of type ${He.type}`);let Xe=new cn(new Jt.Client({botId:He.botId})),Re={req:je,ctx:He,client:Xe,instance:D};switch(He.operation){case"action_triggered":throw new Error(`Operation ${He.operation} not supported yet`);case"event_received":await Mn(Re);break;case"register":await on();break;case"unregister":await pt();break;case"ping":await At();break;default:throw new Error(`Unknown operation ${He.operation}`)}return{status:200}},At=async D=>{},on=async D=>{},pt=async D=>{},Mn=async({ctx:D,req:je,client:He,instance:Xe})=>{qe.debug(`Received event ${D.type}`);let Re=Me(je),We=Re.event;switch(D.type){case"message_created":let _t={user:We.payload.user,conversation:We.payload.conversation,message:We.payload.message,states:We.payload.states,event:We};await Promise.all(Xe.messageHandlers.map(bn=>bn({client:He,ctx:D,..._t})));break;case"state_expired":let Pt={state:We.payload.state};await Promise.all(Xe.stateExpiredHandlers.map(bn=>bn({client:He,ctx:D,...Pt})));break;default:let Xt={event:Re.event};await Promise.all(Xe.eventHandlers.map(bn=>bn({client:He,ctx:D,...Xt})))}},sr=class{constructor(D){R(this,"_state",{messageHandlers:[],eventHandlers:[],stateExpiredHandlers:[]});R(this,"props");R(this,"message",D=>{this._state.messageHandlers.push(D)});R(this,"event",D=>{this._state.eventHandlers.push(D)});R(this,"stateExpired",D=>{this._state.stateExpiredHandlers.push(D)});R(this,"handler",ft(this._state));R(this,"start",D=>Je(this.handler,D));this.props=D}}})(n1);var ye=n1.exports;const{defaults:io}=ye.messages,Mi={className:ye.z.string().describe("CSS className to apply to the message").optional()},cT=io.audio.schema.extend({...Mi,type:ye.z.literal("audio")}),Uv=io.card.schema.extend({type:ye.z.literal("card"),subtitle:ye.z.string().optional(),imageUrl:ye.z.string().optional(),...Mi}),Bne=Uv.omit({type:!0}),fT=ye.z.object({items:ye.z.array(Bne),...Mi,type:ye.z.literal("carousel")}),dT=io.choice.schema.extend({text:ye.z.string(),...Mi,type:ye.z.literal("choice"),disableFreeText:ye.z.boolean().optional()}),pT=io.dropdown.schema.extend({text:ye.z.string(),...Mi,type:ye.z.literal("dropdown")}),hT=io.file.schema.extend({...Mi,type:ye.z.literal("file")}),mT=io.image.schema.extend({...Mi,type:ye.z.literal("image")}),yT=io.location.schema.extend({...Mi,type:ye.z.literal("location")}),gT=io.markdown.schema.extend({...Mi,type:ye.z.literal("markdown")}),vT=io.text.schema.extend({...Mi,type:ye.z.literal("text")}),bT=io.video.schema.extend({...Mi,type:ye.z.literal("video")}),_T=ye.z.union([cT,Uv,fT,dT,pT,hT,mT,yT,gT,vT,bT]),wT=ye.z.object({type:ye.z.literal("webchat_visibility"),data:ye.z.object({visibility:ye.z.union([ye.z.literal("show"),ye.z.literal("hide"),ye.z.literal("toggle")])})}),xT=ye.z.object({type:ye.z.literal("webchat_config"),data:ye.z.object({config:ye.z.record(ye.z.any())})}),ST=ye.z.object({type:ye.z.literal("custom"),data:ye.z.object({event:ye.z.record(ye.z.any())})}),ET=ye.z.union([wT,xT,ST]),zne=ET,Zne=ye.z.object({type:ye.z.literal("message_created"),data:_T}),AT=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:cT,cardSchema:Uv,carouselSchema:fT,choiceSchema:dT,customSchema:ST,dropdownSchema:pT,fileSchema:hT,imageSchema:mT,locationSchema:yT,markdownSchema:gT,messageCreatedSchema:Zne,messageSchema:_T,textSchema:vT,triggerSchema:ET,triggerSignalSchema:zne,videoSchema:bT,webchatConfigSchema:xT,webchatVisibilitySchema:wT},Symbol.toStringTag,{value:"Module"})),oo=ye.z.object({className:ye.z.string().optional(),avatarUrl:ye.z.string().url().optional()}),CT=oo.extend({type:ye.z.literal("audio"),audio:ye.z.string(),title:ye.z.string().optional()}),Hne=ye.z.union([ye.z.object({title:ye.z.string(),action:ye.z.literal("Say something"),text:ye.z.string()}),ye.z.object({title:ye.z.string(),action:ye.z.literal("Open URL"),url:ye.z.string()}),ye.z.object({title:ye.z.string(),action:ye.z.literal("Postback"),payload:ye.z.string()})]),Bv=oo.extend({type:ye.z.literal("card"),title:ye.z.string(),subtitle:ye.z.string().optional(),image:ye.z.string().optional(),actions:ye.z.array(Hne)}),OT=oo.extend({type:ye.z.literal("carousel"),items:ye.z.array(Bv)}),TT=oo.extend({type:ye.z.literal("dropdown"),message:ye.z.string().optional(),options:ye.z.array(ye.z.object({label:ye.z.string(),value:ye.z.string()})),allowCreation:ye.z.boolean().optional(),placeholderText:ye.z.string().optional(),allowMultiple:ye.z.boolean().optional(),buttonText:ye.z.string().optional(),width:ye.z.number().optional(),displayInKeyboard:ye.z.boolean().optional(),markdown:ye.z.boolean().optional(),text:ye.z.string().optional()}),$T=oo.extend({type:ye.z.literal("file"),file:ye.z.string(),title:ye.z.string().optional()}),kT=oo.extend({type:ye.z.literal("image"),image:ye.z.string()}),IT=oo.extend({type:ye.z.literal("location"),latitude:ye.z.number(),longitude:ye.z.number(),address:ye.z.string().optional(),title:ye.z.string().optional()}),PT=oo.extend({type:ye.z.literal("single-choice"),text:ye.z.string(),disableFreeText:ye.z.boolean().optional(),choices:ye.z.array(ye.z.object({title:ye.z.string(),value:ye.z.string()}))}),RT=oo.extend({type:ye.z.literal("text"),text:ye.z.string(),markdown:ye.z.boolean().optional()}),DT=oo.extend({type:ye.z.literal("video"),video:ye.z.string(),title:ye.z.string().optional()}),NT=ye.z.object({type:ye.z.literal("quick_reply"),text:ye.z.string(),payload:ye.z.string().optional()}),Bp=ye.z.union([CT,Bv,OT,TT,$T,kT,IT,PT,RT,DT,NT]),MT=ye.z.object({type:ye.z.literal("webchat-visibility"),visibility:ye.z.union([ye.z.literal("show"),ye.z.literal("hide"),ye.z.literal("toggle")])}),jT=ye.z.object({type:ye.z.literal("webchat-config"),config:ye.z.record(ye.z.any())}),LT=ye.z.object({type:ye.z.literal("custom-event"),event:ye.z.record(ye.z.any())}),FT=ye.z.union([MT,jT,LT]),Wne=ye.z.object({type:ye.z.literal("trigger"),trigger:FT}),qT=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:CT,cardSchema:Bv,carouselSchame:OT,customEventSchema:LT,dropdownSchema:TT,fileSchema:$T,imageSchema:kT,locationSchema:IT,messageSchema:Bp,messageSignalSchema:Bp,quickReplySchema:NT,singleChoiceSchema:PT,textSchema:RT,triggerSchema:FT,triggerSignalSchema:Wne,videoSchema:DT,webchatConfigSchema:jT,webchatVisibilitySchema:MT},Symbol.toStringTag,{value:"Module"})),UT=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(Vne)}),Vne=e=>{switch(e.action){case"postback":return{title:e.label,action:"Postback",payload:e.value};case"url":return{title:e.label,action:"Open URL",url:e.value};case"say":return{title:e.label,action:"Say something",text:e.value};default:throw new Error(`Unknown action type ${e.action}`)}},BT=e=>({...e,type:"audio",audio:e.audioUrl}),zT=e=>UT(e),ZT=e=>({...e,type:"carousel",items:e.items.map(UT)}),HT=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),WT=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),VT=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),KT=e=>({...e,type:"image",image:e.imageUrl}),GT=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),YT=e=>({...e,type:"text",text:e.markdown,markdown:!0}),JT=e=>({...e,type:"text",text:e.text,markdown:!0}),XT=e=>({...e,type:"video",video:e.videoUrl}),Kne=e=>{switch(e.type){case"audio":return BT(e);case"card":return zT(e);case"carousel":return ZT(e);case"choice":return HT(e);case"dropdown":return WT(e);case"file":return VT(e);case"image":return KT(e);case"location":return GT(e);case"markdown":return YT(e);case"text":return JT(e);case"video":return XT(e);default:throw new Error("Unsuported message type")}},QT=e=>({type:"webchat-visibility",visibility:e.data.visibility}),e$=e=>({type:"webchat-config",config:e.data.config}),t$=e=>({type:"custom-event",event:e.data.event}),n$=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:BT,cardAdapter:zT,carouselAdapter:ZT,choiceAdapter:HT,customAdapter:t$,dropdownAdapter:WT,fileAdapter:VT,imageAdapter:KT,locationAdapter:GT,markdownAdapter:YT,messageAdapter:Kne,textAdapter:JT,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return QT(e);case"webchat_config":return e$(e);case"custom":return t$(e);default:throw new Error("unknown trigger type")}},videoAdapter:XT,webchatConfigAdapter:e$,webchatVisibilityAdapter:QT},Symbol.toStringTag,{value:"Module"})),r$=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map(Gne)}),Gne=e=>{switch(e.action){case"Postback":return{label:e.title,action:"postback",value:e.payload};case"Open URL":return{label:e.title,action:"url",value:e.url};case"Say something":return{label:e.title,action:"say",value:e.text};default:throw new Error("Unknown action type")}},Yne=e=>({...e,type:"audio",audioUrl:e.audio}),Jne=e=>r$(e),Xne=e=>({...e,type:"carousel",items:e.items.map(r$)}),Qne=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),ere=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),tre=e=>({...e,type:"image",imageUrl:e.image}),nre=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),rre=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),ire=e=>({...e,type:"text",text:e.text}),ore=e=>({...e,type:"video",videoUrl:e.video}),are=e=>({...e,type:"text",text:e.text??e.payload}),i$=Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return Yne(e);case"card":return Jne(e);case"carousel":return Xne(e);case"dropdown":return Qne(e);case"file":return ere(e);case"image":return tre(e);case"location":return nre(e);case"single-choice":return rre(e);case"text":return ire(e);case"video":return ore(e);case"quick_reply":return are(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),sre=Object.freeze(Object.defineProperty({__proto__:null,messaging:qT,messagingToWebChat:i$,webchat:AT,webchatToMessaging:n$},Symbol.toStringTag,{value:"Module"})),ure=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let zp;const lre=new Uint8Array(16);function cre(){if(!zp&&(zp=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!zp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zp(lre)}const fr=[];for(let e=0;e<256;++e)fr.push((e+256).toString(16).slice(1));function fre(e,t=0){return fr[e[t+0]]+fr[e[t+1]]+fr[e[t+2]]+fr[e[t+3]]+"-"+fr[e[t+4]]+fr[e[t+5]]+"-"+fr[e[t+6]]+fr[e[t+7]]+"-"+fr[e[t+8]]+fr[e[t+9]]+"-"+fr[e[t+10]]+fr[e[t+11]]+fr[e[t+12]]+fr[e[t+13]]+fr[e[t+14]]+fr[e[t+15]]}const o$={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function dre(e,t,n){if(o$.randomUUID&&!t&&!e)return o$.randomUUID();e=e||{};const r=e.random||(e.rng||cre)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return fre(r)}const Zp=e=>({block:e,type:"bubble"}),pre=e=>e.action==="Say something"?{type:"button",variant:"action",text:e.title,buttonValue:e.text,reusable:!0}:e.action==="Open URL"?{type:"button",variant:"link",text:e.title,buttonValue:e.url,reusable:!0}:{type:"button",variant:"action",text:e.title,buttonValue:e.payload,reusable:!0},a$=({title:e,image:t,actions:n,subtitle:r})=>{const i=[];return t&&i.push({type:"image",url:t}),e&&i.push({type:"text",text:`## ${e}`}),r&&i.push({type:"text",text:r}),n.length>0&&i.push({type:"row",blocks:n.map(pre)}),{type:"column",horizontalAlignment:"center",blocks:[...i]}},hre=({choices:e,text:t})=>{const n=dre(),r=Zp({type:"text",text:t});return e.length===0?r:{type:"column",horizontalAlignment:"left",blocks:[r,{type:"row",blocks:e.map(({title:i,value:o})=>({type:"button",variant:"action",text:i,buttonValue:o,groupId:n}))}]}},mre=({options:e,text:t})=>{const n=[{type:"dropdown",label:t??"Select an option",options:e}];return t&&n.unshift({type:"text",text:t}),{type:"column",blocks:n}},zv=({type:e,audio:t})=>({payload:{type:e,url:t}}),Zv=e=>({payload:Zp(a$(e))}),Hv=({items:e})=>({payload:{type:"carousel",blocks:e.map(a$)}}),Wv=e=>({disableInput:e.disableFreeText,payload:hre(e)}),Vv=e=>({disableInput:!0,payload:Zp(mre(e))}),Kv=({file:e,...t})=>({payload:{url:e,...t}}),Gv=({type:e,image:t})=>({payload:{type:e,url:t}}),Yv=({type:e,latitude:t,longitude:n,title:r,address:i})=>({payload:{type:e,latitude:t,longitude:n,title:r??i??"View on map"}}),s$=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),Hp=({type:e,text:t})=>({payload:Zp({type:e,text:t})}),Jv=({type:e,video:t})=>({payload:{type:e,url:t}}),Xv=e=>{switch(e.type){case"audio":return zv(e);case"card":return Zv(e);case"carousel":return Hv(e);case"single-choice":return Wv(e);case"dropdown":return Vv(e);case"file":return Kv(e);case"image":return Gv(e);case"location":return Yv(e);case"quick_reply":return s$(e);case"text":return Hp(e);case"video":return Jv(e);default:throw new Error("Unsuported message type")}},yre=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:zv,cardAdapter:Zv,carouselAdapter:Hv,choiceAdapter:Wv,dropdownAdapter:Vv,fileAdapter:Kv,imageAdapter:Gv,locationAdapter:Yv,messageAdapter:Xv,quickReplyAdapter:s$,textAdapter:Hp,videoAdapter:Jv},Symbol.toStringTag,{value:"Module"})),{webchatToMessaging:ji}=sre,u$=e=>{const t=ji.audioAdapter(e);return zv(t)},l$=e=>{const t=ji.cardAdapter(e);return Zv(t)},c$=e=>{const t=ji.carouselAdapter(e);return Hv(t)},f$=e=>{const t=ji.choiceAdapter(e);return Wv(t)},d$=e=>{const t=ji.dropdownAdapter(e);return Vv(t)},p$=e=>{const t=ji.fileAdapter(e);return Kv(t)},h$=e=>{const t=ji.imageAdapter(e);return Gv(t)},m$=e=>{const t=ji.locationAdapter(e);return Yv(t)},y$=e=>{const t=ji.markdownAdapter(e);return Hp(t)},g$=e=>{const t=ji.textAdapter(e);return Hp(t)},v$=e=>{const t=ji.videoAdapter(e);return Jv(t)},b$=e=>{switch(e.type){case"audio":return u$(e);case"card":return l$(e);case"carousel":return c$(e);case"choice":return f$(e);case"dropdown":return d$(e);case"file":return p$(e);case"image":return h$(e);case"location":return m$(e);case"markdown":return y$(e);case"text":return g$(e);case"video":return v$(e);default:throw new Error("Unsuported message type")}},gre=Object.freeze(Object.defineProperty({__proto__:null,messaging:qT,messagingToTarget:yre,messagingToWebChat:i$,target:ure,webchat:AT,webchatToMessaging:n$,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:u$,cardAdapter:l$,carouselAdapter:c$,choiceAdapter:f$,dropdownAdapter:d$,fileAdapter:p$,imageAdapter:h$,locationAdapter:m$,markdownAdapter:y$,messageAdapter:b$,textAdapter:g$,videoAdapter:v$},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var Qv={exports:{}},xc={};/**
|
|
133
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ms(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Iv.assertOptions(r,{silentJSONParsing:ha.transitional(ha.boolean),forcedJSONParsing:ha.transitional(ha.boolean),clarifyTimeoutError:ha.transitional(ha.boolean)},!1),i!=null&&(de.isFunction(i)?n.paramsSerializer={serialize:i}:Iv.assertOptions(i,{encode:ha.function,serialize:ha.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&de.merge(o.common,o[n.method]);o&&de.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Ni.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let d,p=0,m;if(!l){const y=[PO.bind(this),void 0];for(y.unshift.apply(y,s),y.push.apply(y,c),m=y.length,d=Promise.resolve(n);p<m;)d=d.then(y[p++],y[p++]);return d}m=s.length;let h=n;for(p=0;p<m;){const y=s[p++],v=s[p++];try{h=y(h)}catch(w){v.call(this,w);break}}try{d=PO.call(this,h)}catch(y){return Promise.reject(y)}for(p=0,m=c.length;p<m;)d=d.then(c[p++],c[p++]);return d}getUri(t){t=ms(this.defaults,t);const n=SO(t.baseURL,t.url);return yO(n,t.params,t.paramsSerializer)}};de.forEach(["delete","get","head","options"],function(t){qp.prototype[t]=function(n,r){return this.request(ms(r||{},{method:t,url:n,data:(r||{}).data}))}}),de.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(ms(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}qp.prototype[t]=n(),qp.prototype[t+"Form"]=n(!0)});const Up=qp,uQ=class t3{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new Au(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new t3(function(i){t=i}),cancel:t}}};function lQ(e){return function(n){return e.apply(null,n)}}function cQ(e){return de.isObject(e)&&e.isAxiosError===!0}const Pv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pv).forEach(([e,t])=>{Pv[t]=e});const fQ=Pv;function NO(e){const t=new Up(e),n=eO(Up.prototype.request,t);return de.extend(n,Up.prototype,t,{allOwnKeys:!0}),de.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return NO(ms(e,i))},n}const Hn=NO(Sv);Hn.Axios=Up,Hn.CanceledError=Au,Hn.CancelToken=uQ,Hn.isCancel=wO,Hn.VERSION=RO,Hn.toFormData=Dp,Hn.AxiosError=Dt,Hn.Cancel=Hn.CanceledError,Hn.all=function(t){return Promise.all(t)},Hn.spread=lQ,Hn.isAxiosError=cQ,Hn.mergeConfig=ms,Hn.AxiosHeaders=Ni,Hn.formToJSON=e=>bO(de.isHTMLForm(e)?new FormData(e):e),Hn.getAdapter=IO.getAdapter,Hn.HttpStatusCode=fQ,Hn.default=Hn;const Cu=Hn,{Axios:dQ,AxiosError:pQ,CanceledError:hQ,isCancel:mQ,CancelToken:yQ,VERSION:gQ,all:vQ,Cancel:bQ,isAxiosError:_Q,spread:wQ,toFormData:xQ,AxiosHeaders:SQ,HttpStatusCode:EQ,formToJSON:AQ,getAdapter:CQ,mergeConfig:OQ}=Cu,TQ=Object.freeze(Object.defineProperty({__proto__:null,Axios:dQ,AxiosError:pQ,AxiosHeaders:SQ,Cancel:bQ,CancelToken:yQ,CanceledError:hQ,HttpStatusCode:EQ,VERSION:gQ,all:vQ,default:Cu,formToJSON:AQ,getAdapter:CQ,isAxiosError:_Q,isCancel:mQ,mergeConfig:OQ,spread:wQ,toFormData:xQ},Symbol.toStringTag,{value:"Module"}));var Ou={};Object.defineProperty(Ou,"__esModule",{value:!0});var $Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kQ=typeof window<"u"&&typeof window.document<"u",IQ=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,PQ=(typeof self>"u"?"undefined":$Q(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",RQ=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),DQ=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",MO=Ou.isBrowser=kQ;Ou.isWebWorker=PQ;var Rv=Ou.isNode=IQ;Ou.isJsDom=RQ,Ou.isDeno=DQ;var NQ=Object.create,jO=Object.defineProperty,MQ=Object.getOwnPropertyDescriptor,jQ=Object.getOwnPropertyNames,LQ=Object.getPrototypeOf,FQ=Object.prototype.hasOwnProperty,Jn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qQ=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jQ(t))!FQ.call(e,i)&&i!==n&&jO(e,i,{get:()=>t[i],enumerable:!(r=MQ(t,i))||r.enumerable});return e},Dv=(e,t,n)=>(n=e!=null?NQ(LQ(e)):{},qQ(t||!e||!e.__esModule?jO(n,"default",{value:e,enumerable:!0}):n,e)),UQ=Jn(()=>{}),BQ=Jn(()=>{}),zQ=Jn((e,t)=>{t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var o=42;n[r]=o;for(r in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var a=Object.getOwnPropertySymbols(n);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(n,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(n,r);if(s.value!==o||s.enumerable!==!0)return!1}return!0}}),ZQ=Jn((e,t)=>{var n=typeof Symbol<"u"&&Symbol,r=zQ();t.exports=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:r()}}),HQ=Jn((e,t)=>{var n={foo:{}},r=Object;t.exports=function(){return{__proto__:n}.foo===n.foo&&!({__proto__:null}instanceof r)}}),WQ=Jn((e,t)=>{var n="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,i=Object.prototype.toString,o="[object Function]";t.exports=function(a){var s=this;if(typeof s!="function"||i.call(s)!==o)throw new TypeError(n+s);for(var l=r.call(arguments,1),c,d=function(){if(this instanceof c){var v=s.apply(this,l.concat(r.call(arguments)));return Object(v)===v?v:this}else return s.apply(a,l.concat(r.call(arguments)))},p=Math.max(0,s.length-l.length),m=[],h=0;h<p;h++)m.push("$"+h);if(c=Function("binder","return function ("+m.join(",")+"){ return binder.apply(this,arguments); }")(d),s.prototype){var y=function(){};y.prototype=s.prototype,c.prototype=new y,y.prototype=null}return c}}),Nv=Jn((e,t)=>{var n=WQ();t.exports=Function.prototype.bind||n}),VQ=Jn((e,t)=>{var n=Nv();t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)}),Mv=Jn((e,t)=>{var n,r=SyntaxError,i=Function,o=TypeError,a=function(G){try{return i('"use strict"; return ('+G+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new o},c=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,d=ZQ()(),p=HQ()(),m=Object.getPrototypeOf||(p?function(G){return G.__proto__}:null),h={},y=typeof Uint8Array>"u"||!m?n:m(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":d&&m?m([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&m?m(m([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!d||!m?n:m(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!d||!m?n:m(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&m?m(""[Symbol.iterator]()):n,"%Symbol%":d?Symbol:n,"%SyntaxError%":r,"%ThrowTypeError%":c,"%TypedArray%":y,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet};if(m)try{null.error}catch(G){w=m(m(G)),v["%Error.prototype%"]=w}var w,_=function G(V){var q;if(V==="%AsyncFunction%")q=a("async function () {}");else if(V==="%GeneratorFunction%")q=a("function* () {}");else if(V==="%AsyncGeneratorFunction%")q=a("async function* () {}");else if(V==="%AsyncGenerator%"){var Y=G("%AsyncGeneratorFunction%");Y&&(q=Y.prototype)}else if(V==="%AsyncIteratorPrototype%"){var ne=G("%AsyncGenerator%");ne&&m&&(q=m(ne.prototype))}return v[V]=q,q},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},S=Nv(),A=VQ(),E=S.call(Function.call,Array.prototype.concat),T=S.call(Function.apply,Array.prototype.splice),j=S.call(Function.call,String.prototype.replace),L=S.call(Function.call,String.prototype.slice),F=S.call(Function.call,RegExp.prototype.exec),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,re=function(G){var V=L(G,0,1),q=L(G,-1);if(V==="%"&&q!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(q==="%"&&V!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var Y=[];return j(G,M,function(ne,ce,P,ue){Y[Y.length]=P?j(ue,H,"$1"):ce||ne}),Y},Q=function(G,V){var q=G,Y;if(A(b,q)&&(Y=b[q],q="%"+Y[0]+"%"),A(v,q)){var ne=v[q];if(ne===h&&(ne=_(q)),typeof ne>"u"&&!V)throw new o("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:Y,name:q,value:ne}}throw new r("intrinsic "+G+" does not exist!")};t.exports=function(G,V){if(typeof G!="string"||G.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof V!="boolean")throw new o('"allowMissing" argument must be a boolean');if(F(/^%?[^%]*%?$/,G)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var q=re(G),Y=q.length>0?q[0]:"",ne=Q("%"+Y+"%",V),ce=ne.name,P=ne.value,ue=!1,Oe=ne.alias;Oe&&(Y=Oe[0],T(q,E([0,1],Oe)));for(var N=1,Ne=!0;N<q.length;N+=1){var qe=q[N],Me=L(qe,0,1),Je=L(qe,-1);if((Me==='"'||Me==="'"||Me==="`"||Je==='"'||Je==="'"||Je==="`")&&Me!==Je)throw new r("property names with quotes must have matching quotes");if((qe==="constructor"||!Ne)&&(ue=!0),Y+="."+qe,ce="%"+Y+"%",A(v,ce))P=v[ce];else if(P!=null){if(!(qe in P)){if(!V)throw new o("base intrinsic for "+G+" exists, but the property is not available.");return}if(s&&N+1>=q.length){var rt=s(P,qe);Ne=!!rt,Ne&&"get"in rt&&!("originalValue"in rt.get)?P=rt.get:P=P[qe]}else Ne=A(P,qe),P=P[qe];Ne&&!ue&&(v[ce]=P)}}return P}}),KQ=Jn((e,t)=>{var n=Nv(),r=Mv(),i=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||n.call(o,i),s=r("%Object.getOwnPropertyDescriptor%",!0),l=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(p){var m=a(n,o,arguments);if(s&&l){var h=s(m,"length");h.configurable&&l(m,"length",{value:1+c(0,p.length-(arguments.length-1))})}return m};var d=function(){return a(n,i,arguments)};l?l(t.exports,"apply",{value:d}):t.exports.apply=d}),GQ=Jn((e,t)=>{var n=Mv(),r=KQ(),i=r(n("String.prototype.indexOf"));t.exports=function(o,a){var s=n(o,!!a);return typeof s=="function"&&i(o,".prototype.")>-1?r(s):s}}),YQ=Jn(()=>{}),JQ=Jn((e,t)=>{var n=typeof Map=="function"&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&r&&typeof r.get=="function"?r.get:null,o=n&&Map.prototype.forEach,a=typeof Set=="function"&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=a&&s&&typeof s.get=="function"?s.get:null,c=a&&Set.prototype.forEach,d=typeof WeakMap=="function"&&WeakMap.prototype,p=d?WeakMap.prototype.has:null,m=typeof WeakSet=="function"&&WeakSet.prototype,h=m?WeakSet.prototype.has:null,y=typeof WeakRef=="function"&&WeakRef.prototype,v=y?WeakRef.prototype.deref:null,w=Boolean.prototype.valueOf,_=Object.prototype.toString,b=Function.prototype.toString,S=String.prototype.match,A=String.prototype.slice,E=String.prototype.replace,T=String.prototype.toUpperCase,j=String.prototype.toLowerCase,L=RegExp.prototype.test,F=Array.prototype.concat,M=Array.prototype.join,H=Array.prototype.slice,re=Math.floor,Q=typeof BigInt=="function"?BigInt.prototype.valueOf:null,G=Object.getOwnPropertySymbols,V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,q=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Y=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===q||"symbol")?Symbol.toStringTag:null,ne=Object.prototype.propertyIsEnumerable,ce=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(ee){return ee.__proto__}:null);function P(ee,ae){if(ee===1/0||ee===-1/0||ee!==ee||ee&&ee>-1e3&&ee<1e3||L.call(/e/,ae))return ae;var ft=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ee=="number"){var At=ee<0?-re(-ee):re(ee);if(At!==ee){var on=String(At),pt=A.call(ae,on.length+1);return E.call(on,ft,"$&_")+"."+E.call(E.call(pt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return E.call(ae,ft,"$&_")}var ue=YQ(),Oe=ue.custom,N=$e(Oe)?Oe:null;t.exports=function ee(ae,ft,At,on){var pt=ft||{};if(K(pt,"quoteStyle")&&pt.quoteStyle!=="single"&&pt.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(pt,"maxStringLength")&&(typeof pt.maxStringLength=="number"?pt.maxStringLength<0&&pt.maxStringLength!==1/0:pt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Mn=K(pt,"customInspect")?pt.customInspect:!0;if(typeof Mn!="boolean"&&Mn!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(pt,"indent")&&pt.indent!==null&&pt.indent!==" "&&!(parseInt(pt.indent,10)===pt.indent&&pt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(pt,"numericSeparator")&&typeof pt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var sr=pt.numericSeparator;if(typeof ae>"u")return"undefined";if(ae===null)return"null";if(typeof ae=="boolean")return ae?"true":"false";if(typeof ae=="string")return ge(ae,pt);if(typeof ae=="number"){if(ae===0)return 1/0/ae>0?"0":"-0";var D=String(ae);return sr?P(ae,D):D}if(typeof ae=="bigint"){var je=String(ae)+"n";return sr?P(ae,je):je}var He=typeof pt.depth>"u"?5:pt.depth;if(typeof At>"u"&&(At=0),At>=He&&He>0&&typeof ae=="object")return Me(ae)?"[Array]":"[Object]";var Xe=Jt(pt,At);if(typeof on>"u")on=[];else if(Se(on,ae)>=0)return"[Circular]";function Re(Tt,jn,On){if(jn&&(on=H.call(on),on.push(jn)),On){var Tn={depth:pt.depth};return K(pt,"quoteStyle")&&(Tn.quoteStyle=pt.quoteStyle),ee(Tt,Tn,At+1,on)}return ee(Tt,pt,At+1,on)}if(typeof ae=="function"&&!rt(ae)){var We=Te(ae),_t=Cn(ae,Re);return"[Function"+(We?": "+We:" (anonymous)")+"]"+(_t.length>0?" { "+M.call(_t,", ")+" }":"")}if($e(ae)){var Pt=q?E.call(String(ae),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(ae);return typeof ae=="object"&&!q?Be(Pt):Pt}if(ie(ae)){for(var Xt="<"+j.call(String(ae.nodeName)),bn=ae.attributes||[],Rn=0;Rn<bn.length;Rn++)Xt+=" "+bn[Rn].name+"="+Ne(qe(bn[Rn].value),"double",pt);return Xt+=">",ae.childNodes&&ae.childNodes.length&&(Xt+="..."),Xt+="</"+j.call(String(ae.nodeName))+">",Xt}if(Me(ae)){if(ae.length===0)return"[]";var mr=Cn(ae,Re);return Xe&&!rn(mr)?"["+cn(mr,Xe)+"]":"[ "+M.call(mr,", ")+" ]"}if(Ke(ae)){var ta=Cn(ae,Re);return!("cause"in Error.prototype)&&"cause"in ae&&!ne.call(ae,"cause")?"{ ["+String(ae)+"] "+M.call(F.call("[cause]: "+Re(ae.cause),ta),", ")+" }":ta.length===0?"["+String(ae)+"]":"{ ["+String(ae)+"] "+M.call(ta,", ")+" }"}if(typeof ae=="object"&&Mn){if(N&&typeof ae[N]=="function"&&ue)return ue(ae,{depth:He-At});if(Mn!=="symbol"&&typeof ae.inspect=="function")return ae.inspect()}if(et(ae)){var Sl=[];return o&&o.call(ae,function(Tt,jn){Sl.push(Re(jn,ae,!0)+" => "+Re(Tt,ae))}),pn("Map",i.call(ae),Sl,Xe)}if(It(ae)){var Z=[];return c&&c.call(ae,function(Tt){Z.push(Re(Tt,ae))}),pn("Set",l.call(ae),Z,Xe)}if(Ue(ae))return ct("WeakMap");if(mt(ae))return ct("WeakSet");if(ot(ae))return ct("WeakRef");if(Ae(ae))return Be(Re(Number(ae)));if(Ze(ae))return Be(Re(Q.call(ae)));if(Fe(ae))return Be(w.call(ae));if(Pe(ae))return Be(Re(String(ae)));if(!Je(ae)&&!rt(ae)){var Ce=Cn(ae,Re),ze=ce?ce(ae)===Object.prototype:ae instanceof Object||ae.constructor===Object,yt=ae instanceof Object?"":"null prototype",Gt=!ze&&Y&&Object(ae)===ae&&Y in ae?A.call(pe(ae),8,-1):yt?"Object":"",un=ze||typeof ae.constructor!="function"?"":ae.constructor.name?ae.constructor.name+" ":"",qt=un+(Gt||yt?"["+M.call(F.call([],Gt||[],yt||[]),": ")+"] ":"");return Ce.length===0?qt+"{}":Xe?qt+"{"+cn(Ce,Xe)+"}":qt+"{ "+M.call(Ce,", ")+" }"}return String(ae)};function Ne(ee,ae,ft){var At=(ft.quoteStyle||ae)==="double"?'"':"'";return At+ee+At}function qe(ee){return E.call(String(ee),/"/g,""")}function Me(ee){return pe(ee)==="[object Array]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Je(ee){return pe(ee)==="[object Date]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function rt(ee){return pe(ee)==="[object RegExp]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Ke(ee){return pe(ee)==="[object Error]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Pe(ee){return pe(ee)==="[object String]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Ae(ee){return pe(ee)==="[object Number]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Fe(ee){return pe(ee)==="[object Boolean]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function $e(ee){if(q)return ee&&typeof ee=="object"&&ee instanceof Symbol;if(typeof ee=="symbol")return!0;if(!ee||typeof ee!="object"||!V)return!1;try{return V.call(ee),!0}catch{}return!1}function Ze(ee){if(!ee||typeof ee!="object"||!Q)return!1;try{return Q.call(ee),!0}catch{}return!1}var lt=Object.prototype.hasOwnProperty||function(ee){return ee in this};function K(ee,ae){return lt.call(ee,ae)}function pe(ee){return _.call(ee)}function Te(ee){if(ee.name)return ee.name;var ae=S.call(b.call(ee),/^function\s*([\w$]+)/);return ae?ae[1]:null}function Se(ee,ae){if(ee.indexOf)return ee.indexOf(ae);for(var ft=0,At=ee.length;ft<At;ft++)if(ee[ft]===ae)return ft;return-1}function et(ee){if(!i||!ee||typeof ee!="object")return!1;try{i.call(ee);try{l.call(ee)}catch{return!0}return ee instanceof Map}catch{}return!1}function Ue(ee){if(!p||!ee||typeof ee!="object")return!1;try{p.call(ee,p);try{h.call(ee,h)}catch{return!0}return ee instanceof WeakMap}catch{}return!1}function ot(ee){if(!v||!ee||typeof ee!="object")return!1;try{return v.call(ee),!0}catch{}return!1}function It(ee){if(!l||!ee||typeof ee!="object")return!1;try{l.call(ee);try{i.call(ee)}catch{return!0}return ee instanceof Set}catch{}return!1}function mt(ee){if(!h||!ee||typeof ee!="object")return!1;try{h.call(ee,h);try{p.call(ee,p)}catch{return!0}return ee instanceof WeakSet}catch{}return!1}function ie(ee){return!ee||typeof ee!="object"?!1:typeof HTMLElement<"u"&&ee instanceof HTMLElement?!0:typeof ee.nodeName=="string"&&typeof ee.getAttribute=="function"}function ge(ee,ae){if(ee.length>ae.maxStringLength){var ft=ee.length-ae.maxStringLength,At="... "+ft+" more character"+(ft>1?"s":"");return ge(A.call(ee,0,ae.maxStringLength),ae)+At}var on=E.call(E.call(ee,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,xe);return Ne(on,"single",ae)}function xe(ee){var ae=ee.charCodeAt(0),ft={8:"b",9:"t",10:"n",12:"f",13:"r"}[ae];return ft?"\\"+ft:"\\x"+(ae<16?"0":"")+T.call(ae.toString(16))}function Be(ee){return"Object("+ee+")"}function ct(ee){return ee+" { ? }"}function pn(ee,ae,ft,At){var on=At?cn(ft,At):M.call(ft,", ");return ee+" ("+ae+") {"+on+"}"}function rn(ee){for(var ae=0;ae<ee.length;ae++)if(Se(ee[ae],`
|
|
134
|
+
`)>=0)return!1;return!0}function Jt(ee,ae){var ft;if(ee.indent===" ")ft=" ";else if(typeof ee.indent=="number"&&ee.indent>0)ft=M.call(Array(ee.indent+1)," ");else return null;return{base:ft,prev:M.call(Array(ae+1),ft)}}function cn(ee,ae){if(ee.length===0)return"";var ft=`
|
|
135
|
+
`+ae.prev+ae.base;return ft+M.call(ee,","+ft)+`
|
|
136
|
+
`+ae.prev}function Cn(ee,ae){var ft=Me(ee),At=[];if(ft){At.length=ee.length;for(var on=0;on<ee.length;on++)At[on]=K(ee,on)?ae(ee[on],ee):""}var pt=typeof G=="function"?G(ee):[],Mn;if(q){Mn={};for(var sr=0;sr<pt.length;sr++)Mn["$"+pt[sr]]=pt[sr]}for(var D in ee)K(ee,D)&&(ft&&String(Number(D))===D&&D<ee.length||q&&Mn["$"+D]instanceof Symbol||(L.call(/[^\w$]/,D)?At.push(ae(D,ee)+": "+ae(ee[D],ee)):At.push(D+": "+ae(ee[D],ee))));if(typeof G=="function")for(var je=0;je<pt.length;je++)ne.call(ee,pt[je])&&At.push("["+ae(pt[je])+"]: "+ae(ee[pt[je]],ee));return At}}),XQ=Jn((e,t)=>{var n=Mv(),r=GQ(),i=JQ(),o=n("%TypeError%"),a=n("%WeakMap%",!0),s=n("%Map%",!0),l=r("WeakMap.prototype.get",!0),c=r("WeakMap.prototype.set",!0),d=r("WeakMap.prototype.has",!0),p=r("Map.prototype.get",!0),m=r("Map.prototype.set",!0),h=r("Map.prototype.has",!0),y=function(b,S){for(var A=b,E;(E=A.next)!==null;A=E)if(E.key===S)return A.next=E.next,E.next=b.next,b.next=E,E},v=function(b,S){var A=y(b,S);return A&&A.value},w=function(b,S,A){var E=y(b,S);E?E.value=A:b.next={key:S,next:b.next,value:A}},_=function(b,S){return!!y(b,S)};t.exports=function(){var b,S,A,E={assert:function(T){if(!E.has(T))throw new o("Side channel does not contain "+i(T))},get:function(T){if(a&&T&&(typeof T=="object"||typeof T=="function")){if(b)return l(b,T)}else if(s){if(S)return p(S,T)}else if(A)return v(A,T)},has:function(T){if(a&&T&&(typeof T=="object"||typeof T=="function")){if(b)return d(b,T)}else if(s){if(S)return h(S,T)}else if(A)return _(A,T);return!1},set:function(T,j){a&&T&&(typeof T=="object"||typeof T=="function")?(b||(b=new a),c(b,T,j)):s?(S||(S=new s),m(S,T,j)):(A||(A={key:{},next:null}),w(A,T,j))}};return E}}),jv=Jn((e,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:"RFC1738",RFC3986:"RFC3986"};t.exports={default:i.RFC3986,formatters:{RFC1738:function(o){return n.call(o,r,"+")},RFC3986:function(o){return String(o)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}}),LO=Jn((e,t)=>{var n=jv(),r=Object.prototype.hasOwnProperty,i=Array.isArray,o=function(){for(var _=[],b=0;b<256;++b)_.push("%"+((b<16?"0":"")+b.toString(16)).toUpperCase());return _}(),a=function(_){for(;_.length>1;){var b=_.pop(),S=b.obj[b.prop];if(i(S)){for(var A=[],E=0;E<S.length;++E)typeof S[E]<"u"&&A.push(S[E]);b.obj[b.prop]=A}}},s=function(_,b){for(var S=b&&b.plainObjects?Object.create(null):{},A=0;A<_.length;++A)typeof _[A]<"u"&&(S[A]=_[A]);return S},l=function _(b,S,A){if(!S)return b;if(typeof S!="object"){if(i(b))b.push(S);else if(b&&typeof b=="object")(A&&(A.plainObjects||A.allowPrototypes)||!r.call(Object.prototype,S))&&(b[S]=!0);else return[b,S];return b}if(!b||typeof b!="object")return[b].concat(S);var E=b;return i(b)&&!i(S)&&(E=s(b,A)),i(b)&&i(S)?(S.forEach(function(T,j){if(r.call(b,j)){var L=b[j];L&&typeof L=="object"&&T&&typeof T=="object"?b[j]=_(L,T,A):b.push(T)}else b[j]=T}),b):Object.keys(S).reduce(function(T,j){var L=S[j];return r.call(T,j)?T[j]=_(T[j],L,A):T[j]=L,T},E)},c=function(_,b){return Object.keys(b).reduce(function(S,A){return S[A]=b[A],S},_)},d=function(_,b,S){var A=_.replace(/\+/g," ");if(S==="iso-8859-1")return A.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(A)}catch{return A}},p=function(_,b,S,A,E){if(_.length===0)return _;var T=_;if(typeof _=="symbol"?T=Symbol.prototype.toString.call(_):typeof _!="string"&&(T=String(_)),S==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function(M){return"%26%23"+parseInt(M.slice(2),16)+"%3B"});for(var j="",L=0;L<T.length;++L){var F=T.charCodeAt(L);if(F===45||F===46||F===95||F===126||F>=48&&F<=57||F>=65&&F<=90||F>=97&&F<=122||E===n.RFC1738&&(F===40||F===41)){j+=T.charAt(L);continue}if(F<128){j=j+o[F];continue}if(F<2048){j=j+(o[192|F>>6]+o[128|F&63]);continue}if(F<55296||F>=57344){j=j+(o[224|F>>12]+o[128|F>>6&63]+o[128|F&63]);continue}L+=1,F=65536+((F&1023)<<10|T.charCodeAt(L)&1023),j+=o[240|F>>18]+o[128|F>>12&63]+o[128|F>>6&63]+o[128|F&63]}return j},m=function(_){for(var b=[{obj:{o:_},prop:"o"}],S=[],A=0;A<b.length;++A)for(var E=b[A],T=E.obj[E.prop],j=Object.keys(T),L=0;L<j.length;++L){var F=j[L],M=T[F];typeof M=="object"&&M!==null&&S.indexOf(M)===-1&&(b.push({obj:T,prop:F}),S.push(M))}return a(b),_},h=function(_){return Object.prototype.toString.call(_)==="[object RegExp]"},y=function(_){return!_||typeof _!="object"?!1:!!(_.constructor&&_.constructor.isBuffer&&_.constructor.isBuffer(_))},v=function(_,b){return[].concat(_,b)},w=function(_,b){if(i(_)){for(var S=[],A=0;A<_.length;A+=1)S.push(b(_[A]));return S}return b(_)};t.exports={arrayToObject:s,assign:c,combine:v,compact:m,decode:d,encode:p,isBuffer:y,isRegExp:h,maybeMap:w,merge:l}}),QQ=Jn((e,t)=>{var n=XQ(),r=LO(),i=jv(),o=Object.prototype.hasOwnProperty,a={brackets:function(b){return b+"[]"},comma:"comma",indices:function(b,S){return b+"["+S+"]"},repeat:function(b){return b}},s=Array.isArray,l=String.prototype.split,c=Array.prototype.push,d=function(b,S){c.apply(b,s(S)?S:[S])},p=Date.prototype.toISOString,m=i.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:m,formatter:i.formatters[m],indices:!1,serializeDate:function(b){return p.call(b)},skipNulls:!1,strictNullHandling:!1},y=function(b){return typeof b=="string"||typeof b=="number"||typeof b=="boolean"||typeof b=="symbol"||typeof b=="bigint"},v={},w=function b(S,A,E,T,j,L,F,M,H,re,Q,G,V,q,Y,ne){for(var ce=S,P=ne,ue=0,Oe=!1;(P=P.get(v))!==void 0&&!Oe;){var N=P.get(S);if(ue+=1,typeof N<"u"){if(N===ue)throw new RangeError("Cyclic object value");Oe=!0}typeof P.get(v)>"u"&&(ue=0)}if(typeof M=="function"?ce=M(A,ce):ce instanceof Date?ce=Q(ce):E==="comma"&&s(ce)&&(ce=r.maybeMap(ce,function(pe){return pe instanceof Date?Q(pe):pe})),ce===null){if(j)return F&&!q?F(A,h.encoder,Y,"key",G):A;ce=""}if(y(ce)||r.isBuffer(ce)){if(F){var Ne=q?A:F(A,h.encoder,Y,"key",G);if(E==="comma"&&q){for(var qe=l.call(String(ce),","),Me="",Je=0;Je<qe.length;++Je)Me+=(Je===0?"":",")+V(F(qe[Je],h.encoder,Y,"value",G));return[V(Ne)+(T&&s(ce)&&qe.length===1?"[]":"")+"="+Me]}return[V(Ne)+"="+V(F(ce,h.encoder,Y,"value",G))]}return[V(A)+"="+V(String(ce))]}var rt=[];if(typeof ce>"u")return rt;var Ke;if(E==="comma"&&s(ce))Ke=[{value:ce.length>0?ce.join(",")||null:void 0}];else if(s(M))Ke=M;else{var Pe=Object.keys(ce);Ke=H?Pe.sort(H):Pe}for(var Ae=T&&s(ce)&&ce.length===1?A+"[]":A,Fe=0;Fe<Ke.length;++Fe){var $e=Ke[Fe],Ze=typeof $e=="object"&&typeof $e.value<"u"?$e.value:ce[$e];if(!(L&&Ze===null)){var lt=s(ce)?typeof E=="function"?E(Ae,$e):Ae:Ae+(re?"."+$e:"["+$e+"]");ne.set(S,ue);var K=n();K.set(v,ne),d(rt,b(Ze,lt,E,T,j,L,F,M,H,re,Q,G,V,q,Y,K))}}return rt},_=function(b){if(!b)return h;if(b.encoder!==null&&typeof b.encoder<"u"&&typeof b.encoder!="function")throw new TypeError("Encoder has to be a function.");var S=b.charset||h.charset;if(typeof b.charset<"u"&&b.charset!=="utf-8"&&b.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var A=i.default;if(typeof b.format<"u"){if(!o.call(i.formatters,b.format))throw new TypeError("Unknown format option provided.");A=b.format}var E=i.formatters[A],T=h.filter;return(typeof b.filter=="function"||s(b.filter))&&(T=b.filter),{addQueryPrefix:typeof b.addQueryPrefix=="boolean"?b.addQueryPrefix:h.addQueryPrefix,allowDots:typeof b.allowDots>"u"?h.allowDots:!!b.allowDots,charset:S,charsetSentinel:typeof b.charsetSentinel=="boolean"?b.charsetSentinel:h.charsetSentinel,delimiter:typeof b.delimiter>"u"?h.delimiter:b.delimiter,encode:typeof b.encode=="boolean"?b.encode:h.encode,encoder:typeof b.encoder=="function"?b.encoder:h.encoder,encodeValuesOnly:typeof b.encodeValuesOnly=="boolean"?b.encodeValuesOnly:h.encodeValuesOnly,filter:T,format:A,formatter:E,serializeDate:typeof b.serializeDate=="function"?b.serializeDate:h.serializeDate,skipNulls:typeof b.skipNulls=="boolean"?b.skipNulls:h.skipNulls,sort:typeof b.sort=="function"?b.sort:null,strictNullHandling:typeof b.strictNullHandling=="boolean"?b.strictNullHandling:h.strictNullHandling}};t.exports=function(b,S){var A=b,E=_(S),T,j;typeof E.filter=="function"?(j=E.filter,A=j("",A)):s(E.filter)&&(j=E.filter,T=j);var L=[];if(typeof A!="object"||A===null)return"";var F;S&&S.arrayFormat in a?F=S.arrayFormat:S&&"indices"in S?F=S.indices?"indices":"repeat":F="indices";var M=a[F];if(S&&"commaRoundTrip"in S&&typeof S.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var H=M==="comma"&&S&&S.commaRoundTrip;T||(T=Object.keys(A)),E.sort&&T.sort(E.sort);for(var re=n(),Q=0;Q<T.length;++Q){var G=T[Q];E.skipNulls&&A[G]===null||d(L,w(A[G],G,M,H,E.strictNullHandling,E.skipNulls,E.encode?E.encoder:null,E.filter,E.sort,E.allowDots,E.serializeDate,E.format,E.formatter,E.encodeValuesOnly,E.charset,re))}var V=L.join(E.delimiter),q=E.addQueryPrefix===!0?"?":"";return E.charsetSentinel&&(E.charset==="iso-8859-1"?q+="utf8=%26%2310003%3B&":q+="utf8=%E2%9C%93&"),V.length>0?q+V:""}}),eee=Jn((e,t)=>{var n=LO(),r=Object.prototype.hasOwnProperty,i=Array.isArray,o={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(y){return y.replace(/&#(\d+);/g,function(v,w){return String.fromCharCode(parseInt(w,10))})},s=function(y,v){return y&&typeof y=="string"&&v.comma&&y.indexOf(",")>-1?y.split(","):y},l="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",d=function(y,v){var w={},_=v.ignoreQueryPrefix?y.replace(/^\?/,""):y,b=v.parameterLimit===1/0?void 0:v.parameterLimit,S=_.split(v.delimiter,b),A=-1,E,T=v.charset;if(v.charsetSentinel)for(E=0;E<S.length;++E)S[E].indexOf("utf8=")===0&&(S[E]===c?T="utf-8":S[E]===l&&(T="iso-8859-1"),A=E,E=S.length);for(E=0;E<S.length;++E)if(E!==A){var j=S[E],L=j.indexOf("]="),F=L===-1?j.indexOf("="):L+1,M,H;F===-1?(M=v.decoder(j,o.decoder,T,"key"),H=v.strictNullHandling?null:""):(M=v.decoder(j.slice(0,F),o.decoder,T,"key"),H=n.maybeMap(s(j.slice(F+1),v),function(re){return v.decoder(re,o.decoder,T,"value")})),H&&v.interpretNumericEntities&&T==="iso-8859-1"&&(H=a(H)),j.indexOf("[]=")>-1&&(H=i(H)?[H]:H),r.call(w,M)?w[M]=n.combine(w[M],H):w[M]=H}return w},p=function(y,v,w,_){for(var b=_?v:s(v,w),S=y.length-1;S>=0;--S){var A,E=y[S];if(E==="[]"&&w.parseArrays)A=[].concat(b);else{A=w.plainObjects?Object.create(null):{};var T=E.charAt(0)==="["&&E.charAt(E.length-1)==="]"?E.slice(1,-1):E,j=parseInt(T,10);!w.parseArrays&&T===""?A={0:b}:!isNaN(j)&&E!==T&&String(j)===T&&j>=0&&w.parseArrays&&j<=w.arrayLimit?(A=[],A[j]=b):T!=="__proto__"&&(A[T]=b)}b=A}return b},m=function(y,v,w,_){if(y){var b=w.allowDots?y.replace(/\.([^.[]+)/g,"[$1]"):y,S=/(\[[^[\]]*])/,A=/(\[[^[\]]*])/g,E=w.depth>0&&S.exec(b),T=E?b.slice(0,E.index):b,j=[];if(T){if(!w.plainObjects&&r.call(Object.prototype,T)&&!w.allowPrototypes)return;j.push(T)}for(var L=0;w.depth>0&&(E=A.exec(b))!==null&&L<w.depth;){if(L+=1,!w.plainObjects&&r.call(Object.prototype,E[1].slice(1,-1))&&!w.allowPrototypes)return;j.push(E[1])}return E&&j.push("["+b.slice(E.index)+"]"),p(j,v,w,_)}},h=function(y){if(!y)return o;if(y.decoder!==null&&y.decoder!==void 0&&typeof y.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof y.charset<"u"&&y.charset!=="utf-8"&&y.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var v=typeof y.charset>"u"?o.charset:y.charset;return{allowDots:typeof y.allowDots>"u"?o.allowDots:!!y.allowDots,allowPrototypes:typeof y.allowPrototypes=="boolean"?y.allowPrototypes:o.allowPrototypes,allowSparse:typeof y.allowSparse=="boolean"?y.allowSparse:o.allowSparse,arrayLimit:typeof y.arrayLimit=="number"?y.arrayLimit:o.arrayLimit,charset:v,charsetSentinel:typeof y.charsetSentinel=="boolean"?y.charsetSentinel:o.charsetSentinel,comma:typeof y.comma=="boolean"?y.comma:o.comma,decoder:typeof y.decoder=="function"?y.decoder:o.decoder,delimiter:typeof y.delimiter=="string"||n.isRegExp(y.delimiter)?y.delimiter:o.delimiter,depth:typeof y.depth=="number"||y.depth===!1?+y.depth:o.depth,ignoreQueryPrefix:y.ignoreQueryPrefix===!0,interpretNumericEntities:typeof y.interpretNumericEntities=="boolean"?y.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:typeof y.parameterLimit=="number"?y.parameterLimit:o.parameterLimit,parseArrays:y.parseArrays!==!1,plainObjects:typeof y.plainObjects=="boolean"?y.plainObjects:o.plainObjects,strictNullHandling:typeof y.strictNullHandling=="boolean"?y.strictNullHandling:o.strictNullHandling}};t.exports=function(y,v){var w=h(v);if(y===""||y===null||typeof y>"u")return w.plainObjects?Object.create(null):{};for(var _=typeof y=="string"?d(y,w):y,b=w.plainObjects?Object.create(null):{},S=Object.keys(_),A=0;A<S.length;++A){var E=S[A],T=m(E,_[E],w,typeof y=="string");b=n.merge(b,T,w)}return w.allowSparse===!0?b:n.compact(b)}}),tee=Jn((e,t)=>{var n=QQ(),r=eee(),i=jv();t.exports={formats:i,parse:r,stringify:n}}),nee={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Lv=typeof window<"u"&&typeof window.document<"u"?window.crypto:mv;Lv.getRandomValues||(Lv=nee);var xn=class extends Error{constructor(t,n,r,i,o,a){super(i);R(this,"isApiError",!0);this.code=t,this.description=n,this.type=r,this.message=i,this.error=o,this.id=a,this.id||(this.id=xn.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){let t=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],r=4,i=Array.from(Lv.getRandomValues(new Uint8Array(r))).map(o=>o.toString(16).padStart(2,"0")).join("").toUpperCase();return`${t}_${n}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},ree=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,FO=e=>e instanceof xn||ree(e)&&e.isApiError===!0,Tu=class extends xn{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}},qO=class extends xn{constructor(e,t,n){super(500,"An internal error occurred","Internal",e,t,n)}},UO=class extends xn{constructor(e,t,n){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n)}},BO=class extends xn{constructor(e,t,n){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n)}},zO=class extends xn{constructor(e,t,n){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n)}},ZO=class extends xn{constructor(e,t,n){super(400,"The request payload is invalid.","InvalidPayload",e,t,n)}},HO=class extends xn{constructor(e,t,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n)}},WO=class extends xn{constructor(e,t,n){super(405,"The requested method does not exist.","MethodNotFound",e,t,n)}},VO=class extends xn{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}},KO=class extends xn{constructor(e,t,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n)}},GO=class extends xn{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}},YO=class extends xn{constructor(e,t,n){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",e,t,n)}},JO=class extends xn{constructor(e,t,n){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",e,t,n)}},XO=class extends xn{constructor(t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,n,r)}},QO=class extends xn{constructor(e,t,n){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,n)}},eT=class extends xn{constructor(e,t,n){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",e,t,n)}},tT=class extends xn{constructor(e,t,n){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",e,t,n)}},nT=class extends xn{constructor(t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,n,r)}},rT=class extends xn{constructor(e,t,n){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,n)}},iT=class extends xn{constructor(e,t,n){super(429,"The request has been rate limited.","RateLimited",e,t,n)}},oT=class extends xn{constructor(e,t,n){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n)}},aT=class extends xn{constructor(e,t,n){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",e,t,n)}},sT=class extends xn{constructor(e,t,n){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",e,t,n)}},uT=class extends xn{constructor(e,t,n){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",e,t,n)}},iee={Unknown:Tu,Internal:qO,Unauthorized:UO,Forbidden:BO,PayloadTooLarge:zO,InvalidPayload:ZO,UnsupportedMediaType:HO,MethodNotFound:WO,ResourceNotFound:VO,InvalidJsonSchema:KO,InvalidDataFormat:GO,InvalidIdentifier:YO,RelationConflict:JO,ReferenceConstraint:XO,ResourceLockedConflict:QO,ReferenceNotFound:eT,InvalidQuery:tT,Runtime:nT,AlreadyExists:rT,RateLimited:iT,PaymentRequired:oT,QuotaExceeded:aT,LimitExceeded:sT,BreakingChanges:uT},Fv=e=>FO(e)?e:e instanceof Error?new Tu(e.message,e):typeof e=="string"?new Tu(e):oee(e);function oee(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){let t=iee[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Tu(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Tu("An invalid error occurred: "+JSON.stringify(e))}var wc=class extends Error{constructor(t,n,r){super(t),this.innerError=n,this.file=r,this.name="FileUploadError"}},aee=Dv(UQ()),see=Dv(BQ()),uee="https://api.botpress.cloud",lee=6e4,cee="BP_API_URL",fee="BP_BOT_ID",dee="BP_INTEGRATION_ID",pee="BP_WORKSPACE_ID",hee="BP_TOKEN";function mee(e){let t=yee(e),n={};t.workspaceId&&(n["x-workspace-id"]=t.workspaceId),t.botId&&(n["x-bot-id"]=t.botId),t.integrationId&&(n["x-integration-id"]=t.integrationId),t.token&&(n.Authorization=`Bearer ${t.token}`),n={...n,...t.headers};let r=t.apiUrl??uee,i=t.timeout??lee;return{apiUrl:r,timeout:i,withCredentials:MO,headers:n}}function yee(e){return MO?e:Rv?gee(e):e}function gee(e){let t={...e,apiUrl:e.apiUrl??process.env[cee],botId:e.botId??process.env[fee],integrationId:e.integrationId??process.env[dee],workspaceId:e.workspaceId??process.env[pee]},n=t.token??process.env[hee];return n&&(t.token=n),t}var vee=Dv(tee()),bee=e=>e[1]!==void 0,he=e=>{let{method:t,path:n,query:r,headers:i,body:o}=e,a=Object.entries(i).filter(bee),s=Object.fromEntries(a),l=vee.default.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),c=l?[n,l].join("?"):n;return{method:t,url:c,headers:s,data:o}},_ee=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),wee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),xee=e=>({path:"/v1/chat/conversations",headers:{},query:{nextToken:e.nextToken,tags:e.tags,participantIds:e.participantIds,integrationName:e.integrationName},params:{},body:{}}),See=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),Eee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}}),Aee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Cee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Oee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}}),Tee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),$ee=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),kee=e=>({path:"/v1/chat/events",headers:{},query:{},params:{},body:{type:e.type,payload:e.payload,schedule:e.schedule,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId}}),Iee=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Pee=e=>({path:"/v1/chat/events",headers:{},query:{nextToken:e.nextToken,type:e.type,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId,status:e.status},params:{},body:{}}),Ree=e=>({path:"/v1/chat/messages",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}}),Dee=e=>({path:"/v1/chat/messages/get-or-create",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}}),Nee=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Mee=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}}),jee=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),Lee=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Fee=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),qee=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Uee=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),Bee=e=>({path:"/v1/chat/users/get-or-create",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),zee=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,name:e.name,pictureUrl:e.pictureUrl}}),Zee=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Hee=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{}}),Wee=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}}),Vee=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}/get-or-set`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}}),Kee=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload}}),Gee=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}}),Yee=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}}),Jee=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Xee=e=>({path:"/v1/chat/tasks",headers:{},query:{},params:{},body:{title:e.title,description:e.description,type:e.type,data:e.data,parentTaskId:e.parentTaskId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags}}),Qee=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{title:e.title,description:e.description,data:e.data,timeoutAt:e.timeoutAt,status:e.status,tags:e.tags}}),ete=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),tte=e=>({path:"/v1/chat/tasks",headers:{},query:{nextToken:e.nextToken,tags:e.tags,conversationId:e.conversationId,userId:e.userId,parentTaskId:e.parentTaskId,status:e.status,type:e.type},params:{},body:{}}),nte=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}}),rte=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}}),ite=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}}),ote=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}}),ate=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}}),ste=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}}),ute=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),lte=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}}),cte=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}}),fte=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}}),dte=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),pte=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),hte=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}}),mte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}}),yte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}}),gte=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}}),vte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),bte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),_te=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}}),wte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),xte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}}),Ste=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Ete=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Ate=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Cte=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Ote=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}}),Tte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}}),$te=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}}),kte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}}),Ite=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}}),Pte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}}),Rte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Dte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Nte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages/by-bot`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Mte=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}}),jte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Lte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}}),Fte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{name:e.name,spendingLimit:e.spendingLimit,about:e.about,profilePicture:e.profilePicture,contactEmail:e.contactEmail,website:e.website,socialAccounts:e.socialAccounts,isPublic:e.isPublic,handle:e.handle}}),qte=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}}),Ute=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),Bte=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}}),zte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Zte=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Hte=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),Wte=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}}),Vte=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Kte=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}}),Gte=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}}),Yte=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}}),Jte=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}}),Xte=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Qte=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,interfaces:e.interfaces,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,secrets:e.secrets,code:e.code,url:e.url,dev:e.dev,icon:e.icon,readme:e.readme,title:e.title,description:e.description,public:e.public}}),ene=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,channels:e.channels,identifier:e.identifier,actions:e.actions,events:e.events,states:e.states,user:e.user,entities:e.entities,interfaces:e.interfaces,secrets:e.secrets,code:e.code,icon:e.icon,readme:e.readme,title:e.title,description:e.description,url:e.url,public:e.public}}),tne=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}}),nne=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),rne=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}}),ine=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),one=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),ane=e=>({path:"/v1/admin/interfaces",headers:{},query:{},params:{},body:{name:e.name,version:e.version,events:e.events,actions:e.actions,entities:e.entities}}),sne=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),une=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),lne=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{events:e.events,actions:e.actions,entities:e.entities}}),cne=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),fne=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),dne=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),pne=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}}),hne=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),mne=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}}),yne=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}}),gne=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}}),vne=e=>({path:"/v1/files",headers:{},query:{},params:{},body:{key:e.key,tags:e.tags,size:e.size,index:e.index,accessPolicies:e.accessPolicies,contentType:e.contentType}}),bne=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),_ne=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}}),wne=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),xne=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies}}),Sne=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit},params:{},body:{}}),Ene=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}}),Ane=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),Cne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}}),One=e=>({path:"/v1/tables",headers:{},query:{},params:{},body:{name:e.name,factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}}),Tne=e=>({path:`/v1/tables/${encodeURIComponent(e.sourceTableId)}/duplicate`,headers:{},query:{},params:{sourceTableId:e.sourceTableId},body:{tableName:e.tableName,schemaOnly:e.schemaOnly,factor:e.factor}}),$ne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{name:e.name,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}}),kne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}}),Ine=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),Pne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}}),Rne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/find`,headers:{},query:{},params:{table:e.table},body:{limit:e.limit,offset:e.offset,filter:e.filter,group:e.group,search:e.search,orderBy:e.orderBy,orderDirection:e.orderDirection}}),Dne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),Nne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/delete`,headers:{},query:{},params:{table:e.table},body:{ids:e.ids,filter:e.filter,deleteAllRows:e.deleteAllRows}}),Mne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),jne=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/upsert`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,keyColumn:e.keyColumn,waitComputed:e.waitComputed}}),Lne=class{constructor(t,n={}){R(this,"createConversation",async t=>{let{path:n,headers:r,query:i,body:o}=_ee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getConversation",async t=>{let{path:n,headers:r,query:i,body:o}=wee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listConversations",async t=>{let{path:n,headers:r,query:i,body:o}=xee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getOrCreateConversation",async t=>{let{path:n,headers:r,query:i,body:o}=See(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateConversation",async t=>{let{path:n,headers:r,query:i,body:o}=Eee(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteConversation",async t=>{let{path:n,headers:r,query:i,body:o}=Aee(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listParticipants",async t=>{let{path:n,headers:r,query:i,body:o}=Cee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"addParticipant",async t=>{let{path:n,headers:r,query:i,body:o}=Oee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getParticipant",async t=>{let{path:n,headers:r,query:i,body:o}=Tee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"removeParticipant",async t=>{let{path:n,headers:r,query:i,body:o}=$ee(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createEvent",async t=>{let{path:n,headers:r,query:i,body:o}=kee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getEvent",async t=>{let{path:n,headers:r,query:i,body:o}=Iee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listEvents",async t=>{let{path:n,headers:r,query:i,body:o}=Pee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Ree(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getOrCreateMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Dee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Nee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Mee(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listMessages",async t=>{let{path:n,headers:r,query:i,body:o}=jee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Lee(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createUser",async t=>{let{path:n,headers:r,query:i,body:o}=Fee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getUser",async t=>{let{path:n,headers:r,query:i,body:o}=qee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listUsers",async t=>{let{path:n,headers:r,query:i,body:o}=Uee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getOrCreateUser",async t=>{let{path:n,headers:r,query:i,body:o}=Bee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateUser",async t=>{let{path:n,headers:r,query:i,body:o}=zee(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteUser",async t=>{let{path:n,headers:r,query:i,body:o}=Zee(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getState",async t=>{let{path:n,headers:r,query:i,body:o}=Hee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"setState",async t=>{let{path:n,headers:r,query:i,body:o}=Wee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getOrSetState",async t=>{let{path:n,headers:r,query:i,body:o}=Vee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"patchState",async t=>{let{path:n,headers:r,query:i,body:o}=Kee(t),a=(this.props.toAxiosRequest??he)({method:"patch",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"callAction",async t=>{let{path:n,headers:r,query:i,body:o}=Gee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"configureIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=Yee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getTask",async t=>{let{path:n,headers:r,query:i,body:o}=Jee(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createTask",async t=>{let{path:n,headers:r,query:i,body:o}=Xee(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateTask",async t=>{let{path:n,headers:r,query:i,body:o}=Qee(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteTask",async t=>{let{path:n,headers:r,query:i,body:o}=ete(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listTasks",async t=>{let{path:n,headers:r,query:i,body:o}=tte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"trackAnalytics",async t=>{let{path:n,headers:r,query:i,body:o}=nte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"runVrl",async t=>{let{path:n,headers:r,query:i,body:o}=rte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getAccount",async t=>{let{path:n,headers:r,query:i,body:o}=ite(),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateAccount",async t=>{let{path:n,headers:r,query:i,body:o}=ote(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listPersonalAccessTokens",async t=>{let{path:n,headers:r,query:i,body:o}=ate(),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createPersonalAccessToken",async t=>{let{path:n,headers:r,query:i,body:o}=ste(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deletePersonalAccessToken",async t=>{let{path:n,headers:r,query:i,body:o}=ute(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"setAccountPreference",async t=>{let{path:n,headers:r,query:i,body:o}=lte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getAccountPreference",async t=>{let{path:n,headers:r,query:i,body:o}=cte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listPublicIntegrations",async t=>{let{path:n,headers:r,query:i,body:o}=fte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getPublicIntegrationById",async t=>{let{path:n,headers:r,query:i,body:o}=dte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getPublicIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=pte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createBot",async t=>{let{path:n,headers:r,query:i,body:o}=hte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateBot",async t=>{let{path:n,headers:r,query:i,body:o}=mte(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"transferBot",async t=>{let{path:n,headers:r,query:i,body:o}=yte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listBots",async t=>{let{path:n,headers:r,query:i,body:o}=gte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getBot",async t=>{let{path:n,headers:r,query:i,body:o}=vte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteBot",async t=>{let{path:n,headers:r,query:i,body:o}=bte(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getBotLogs",async t=>{let{path:n,headers:r,query:i,body:o}=_te(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getBotWebchat",async t=>{let{path:n,headers:r,query:i,body:o}=wte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getBotAnalytics",async t=>{let{path:n,headers:r,query:i,body:o}=xte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getBotIssue",async t=>{let{path:n,headers:r,query:i,body:o}=Ste(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listBotIssues",async t=>{let{path:n,headers:r,query:i,body:o}=Ete(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteBotIssue",async t=>{let{path:n,headers:r,query:i,body:o}=Ate(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listBotIssueEvents",async t=>{let{path:n,headers:r,query:i,body:o}=Cte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"setWorkspacePaymentMethod",async t=>{let{path:n,headers:r,query:i,body:o}=Ote(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listWorkspaceInvoices",async t=>{let{path:n,headers:r,query:i,body:o}=Tte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getUpcomingInvoice",async t=>{let{path:n,headers:r,query:i,body:o}=$te(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"chargeWorkspaceUnpaidInvoices",async t=>{let{path:n,headers:r,query:i,body:o}=kte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Ite(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getPublicWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Pte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Rte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listWorkspaceUsages",async t=>{let{path:n,headers:r,query:i,body:o}=Dte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"breakDownWorkspaceUsageByBot",async t=>{let{path:n,headers:r,query:i,body:o}=Nte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getAllWorkspaceQuotaCompletion",async t=>{let{path:n,headers:r,query:i,body:o}=Mte(),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getWorkspaceQuota",async t=>{let{path:n,headers:r,query:i,body:o}=jte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listWorkspaceQuotas",async t=>{let{path:n,headers:r,query:i,body:o}=Lte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Fte(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"checkHandleAvailability",async t=>{let{path:n,headers:r,query:i,body:o}=qte(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listWorkspaces",async t=>{let{path:n,headers:r,query:i,body:o}=Ute(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listPublicWorkspaces",async t=>{let{path:n,headers:r,query:i,body:o}=Bte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=zte(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getAuditRecords",async t=>{let{path:n,headers:r,query:i,body:o}=Zte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listWorkspaceMembers",async t=>{let{path:n,headers:r,query:i,body:o}=Hte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Wte(),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Vte(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Kte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Gte(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listIntegrationApiKeys",async t=>{let{path:n,headers:r,query:i,body:o}=Yte(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createIntegrationApiKey",async t=>{let{path:n,headers:r,query:i,body:o}=Jte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteIntegrationApiKey",async t=>{let{path:n,headers:r,query:i,body:o}=Xte(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=Qte(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=ene(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listIntegrations",async t=>{let{path:n,headers:r,query:i,body:o}=tne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=nne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getIntegrationLogs",async t=>{let{path:n,headers:r,query:i,body:o}=rne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getIntegrationByName",async t=>{let{path:n,headers:r,query:i,body:o}=ine(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=one(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createInterface",async t=>{let{path:n,headers:r,query:i,body:o}=ane(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getInterface",async t=>{let{path:n,headers:r,query:i,body:o}=sne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getInterfaceByName",async t=>{let{path:n,headers:r,query:i,body:o}=une(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateInterface",async t=>{let{path:n,headers:r,query:i,body:o}=lne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteInterface",async t=>{let{path:n,headers:r,query:i,body:o}=cne(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listInterfaces",async t=>{let{path:n,headers:r,query:i,body:o}=fne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getUsage",async t=>{let{path:n,headers:r,query:i,body:o}=dne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getMultipleUsages",async t=>{let{path:n,headers:r,query:i,body:o}=pne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listUsageHistory",async t=>{let{path:n,headers:r,query:i,body:o}=hne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"changeAISpendQuota",async t=>{let{path:n,headers:r,query:i,body:o}=mne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listActivities",async t=>{let{path:n,headers:r,query:i,body:o}=yne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"introspect",async t=>{let{path:n,headers:r,query:i,body:o}=gne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"upsertFile",async t=>{let{path:n,headers:r,query:i,body:o}=vne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteFile",async t=>{let{path:n,headers:r,query:i,body:o}=bne(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listFiles",async t=>{let{path:n,headers:r,query:i,body:o}=_ne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getFile",async t=>{let{path:n,headers:r,query:i,body:o}=wne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateFileMetadata",async t=>{let{path:n,headers:r,query:i,body:o}=xne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"searchFiles",async t=>{let{path:n,headers:r,query:i,body:o}=Sne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"listTables",async t=>{let{path:n,headers:r,query:i,body:o}=Ene(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getTable",async t=>{let{path:n,headers:r,query:i,body:o}=Ane(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getOrCreateTable",async t=>{let{path:n,headers:r,query:i,body:o}=Cne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createTable",async t=>{let{path:n,headers:r,query:i,body:o}=One(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"duplicateTable",async t=>{let{path:n,headers:r,query:i,body:o}=Tne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateTable",async t=>{let{path:n,headers:r,query:i,body:o}=$ne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"renameTableColumn",async t=>{let{path:n,headers:r,query:i,body:o}=kne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteTable",async t=>{let{path:n,headers:r,query:i,body:o}=Ine(t),a=(this.props.toAxiosRequest??he)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"getTableRow",async t=>{let{path:n,headers:r,query:i,body:o}=Pne(t),a=(this.props.toAxiosRequest??he)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"findTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Rne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"createTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Dne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"deleteTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Nne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"updateTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Mne(t),a=(this.props.toAxiosRequest??he)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});R(this,"upsertTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=jne(t),a=(this.props.toAxiosRequest??he)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw me(s)})});this.axiosInstance=t,this.props=n}};function me(e){var t;return Cu.isAxiosError(e)&&((t=e.response)!=null&&t.data)?Fv(e.response.data):Fv(e)}var lT=100*1024*1024,Fne=lT,qne=lT,Une=class extends Lne{constructor(t={}){let n=mee(t),{apiUrl:r,headers:i,withCredentials:o,timeout:a}=n,s=Cu.create({baseURL:r,headers:i,withCredentials:o,timeout:a,maxBodyLength:Fne,maxContentLength:qne,httpAgent:Rv?new aee.default.Agent({keepAlive:!0}):void 0,httpsAgent:Rv?new see.default.Agent({keepAlive:!0}):void 0});super(s);R(this,"config");R(this,"uploadFile",async({key:t,index:n,tags:r,contentType:i,accessPolicies:o,content:a,url:s})=>{if(s&&a)throw new wc("Cannot provide both content and URL, please provide only one of them");if(s&&(a=await Cu.get(s,{responseType:"arraybuffer"}).then(d=>d.data).catch(d=>{throw new wc(`Failed to download file from provided URL: ${d.message}`,d)})),!a)throw new wc("No content was provided for the file");let l=a instanceof Buffer?a:Buffer.from(a),{file:c}=await this.upsertFile({key:t,tags:r,index:n,accessPolicies:o,contentType:i,size:l.byteLength});try{await Cu.put(c.uploadUrl,l,{maxBodyLength:1/0})}catch(d){throw new wc(`Failed to upload file: ${d.message}`,d,c)}return{file:c}});this.config=n}};const qv=Jf(Object.freeze(Object.defineProperty({__proto__:null,AlreadyExistsError:rT,BreakingChangesError:uT,Client:Une,ForbiddenError:BO,InternalError:qO,InvalidDataFormatError:GO,InvalidIdentifierError:YO,InvalidJsonSchemaError:KO,InvalidPayloadError:ZO,InvalidQueryError:tT,LimitExceededError:sT,MethodNotFoundError:WO,PayloadTooLargeError:zO,PaymentRequiredError:oT,QuotaExceededError:aT,RateLimitedError:iT,ReferenceConstraintError:XO,ReferenceNotFoundError:eT,RelationConflictError:JO,ResourceLockedConflictError:QO,ResourceNotFoundError:VO,RuntimeError:nT,UnauthorizedError:UO,UnknownError:Tu,UnsupportedMediaTypeError:HO,UploadFileError:wc,axios:TQ,errorFrom:Fv,isApiError:FO},Symbol.toStringTag,{value:"Module"})));(function(e){var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,s=(D,je)=>{for(var He in je)n(D,He,{get:je[He],enumerable:!0})},l=(D,je,He,Xe)=>{if(je&&typeof je=="object"||typeof je=="function")for(let Re of i(je))!a.call(D,Re)&&Re!==He&&n(D,Re,{get:()=>je[Re],enumerable:!(Xe=r(je,Re))||Xe.enumerable});return D},c=(D,je,He)=>(l(D,je,"default"),He&&l(He,je,"default")),d=(D,je,He)=>(He=D!=null?t(o(D)):{},l(je||!D||!D.__esModule?n(He,"default",{value:D,enumerable:!0}):He,D)),p=D=>l(n({},"__esModule",{value:!0}),D),m={};s(m,{Bot:()=>sr,BotSpecificClient:()=>cn,Integration:()=>rn,IntegrationDefinition:()=>K,IntegrationSpecificClient:()=>Te,RuntimeError:()=>Fe.RuntimeError,botIdHeader:()=>Y,botUserIdHeader:()=>ne,configurationHeader:()=>ue,integrationIdHeader:()=>ce,isApiError:()=>Fe.isApiError,messages:()=>h,operationHeader:()=>Oe,parseBody:()=>Me,serve:()=>Je,studioComponentDefinitions:()=>_,typeHeader:()=>N,webhookIdHeader:()=>P}),e.exports=p(m);var h={};s(h,{defaults:()=>q});var y={};s(y,{default:()=>b,studioComponentDefinitions:()=>_});var v=vd;c(y,vd);var w=v.z.object({allowDynamicVariable:v.z.boolean().optional(),horizontal:v.z.boolean().optional()}),_={string:{text:{id:"text",params:w.extend({multiLine:v.z.boolean().optional(),growVertically:v.z.boolean().optional(),suggestions:v.z.array(v.z.string()).optional()})},dropdown:{id:"dropdown",params:w.extend({filterable:v.z.boolean().optional()})},radiogroup:{id:"radiogroup",params:w.extend({})},date:{id:"date",params:w.extend({dateFormat:v.z.string().optional(),minDate:v.z.string().optional(),maxDate:v.z.string().optional(),defaultTimezone:v.z.string().optional(),disableTimezoneSelection:v.z.boolean().optional(),highlightCurrentDay:v.z.boolean().optional(),showShortcutButtons:v.z.boolean().optional(),showOutsideDaysOfMonth:v.z.boolean().optional(),firstDayOfWeek:v.z.number().optional(),canChangeMonth:v.z.boolean().optional(),showWeekNumbers:v.z.boolean().optional()})},time:{id:"time",params:w.extend({useAMPM:v.z.boolean().optional(),timeFormat:v.z.string().optional(),minTime:v.z.string().optional(),maxTime:v.z.string().optional(),showArrowButtons:v.z.boolean().optional(),precision:v.z.enum(["minute","second","millisecond"]).optional()})},richtext:{id:"richtext",params:v.z.object({allowDynamicVariable:v.z.boolean().optional(),resizable:v.z.boolean().optional()})},json:{id:"json",params:w.extend({showPreview:v.z.boolean().optional(),showValidationError:v.z.boolean().optional()})},file:{id:"file",params:w.extend({fileTypes:v.z.array(v.z.enum(["image","audio","video"])).optional(),showUploadedFiles:v.z.boolean().optional()})}},number:{number:{id:"number",params:w.extend({allowNumericCharactersOnly:v.z.boolean().optional(),stepSize:v.z.number().optional()})},slider:{id:"slider",params:v.z.object({horizontal:v.z.boolean().optional(),stepSize:v.z.number().optional()})}},boolean:{switch:{id:"switch",params:w}},array:{options:{id:"options",params:w},strings:{id:"strings",params:w},daterange:{id:"daterange",params:v.z.object({dateFormat:v.z.string().optional(),minDate:v.z.string().optional(),maxDate:v.z.string().optional(),defaultTimezone:v.z.string().optional(),allowSingleDayRange:v.z.boolean().optional(),highlightCurrentDay:v.z.boolean().optional(),showOutsideDaysOfMonth:v.z.boolean().optional(),firstDayOfWeek:v.z.number().optional(),canChangeMonth:v.z.boolean().optional(),showWeekNumbers:v.z.boolean().optional()})}},object:{collapsible:{id:"collapsible",params:v.z.object({defaultOpen:v.z.boolean().optional()})},modal:{id:"modal",params:v.z.object({title:v.z.string().optional(),buttonLabel:v.z.string().optional(),closeButtonLabel:v.z.string().optional()})},popover:{id:"popover",params:v.z.object({buttonLabel:v.z.string().optional()})}},discriminatedUnion:{}},b=v.z,S=y.z.string().min(1),A=y.z.object({text:S}),E=y.z.object({markdown:S}),T=y.z.object({imageUrl:S}),j=y.z.object({audioUrl:S}),L=y.z.object({videoUrl:S}),F=y.z.object({fileUrl:S,title:S.optional()}),M=y.z.object({latitude:y.z.number(),longitude:y.z.number(),address:y.z.string().optional(),title:y.z.string().optional()}),H=y.z.object({title:S,subtitle:S.optional(),imageUrl:S.optional(),actions:y.z.array(y.z.object({action:y.z.enum(["postback","url","say"]),label:S,value:S}))}),re=y.z.object({text:S,options:y.z.array(y.z.object({label:S,value:S}))}),Q=y.z.object({items:y.z.array(H)}),G=y.z.discriminatedUnion("type",[y.z.object({type:y.z.literal("text"),payload:A}),y.z.object({type:y.z.literal("markdown"),payload:E}),y.z.object({type:y.z.literal("image"),payload:T}),y.z.object({type:y.z.literal("audio"),payload:j}),y.z.object({type:y.z.literal("video"),payload:L}),y.z.object({type:y.z.literal("file"),payload:F}),y.z.object({type:y.z.literal("location"),payload:M})]),V=y.z.object({items:y.z.array(G)}),q={text:{schema:A},markdown:{schema:E},image:{schema:T},audio:{schema:j},video:{schema:L},file:{schema:F},location:{schema:M},carousel:{schema:Q},card:{schema:H},dropdown:{schema:re},choice:{schema:re},bloc:{schema:V}},Y="x-bot-id",ne="x-bot-user-id",ce="x-integration-id",P="x-webhook-id",ue="x-bp-configuration",Oe="x-bp-operation",N="x-bp-type",Ne=hs,qe=console;function Me(D){if(!D.body)throw new Error("Missing body");return JSON.parse(D.body)}async function Je(D,je=8072,He=Ae){let Xe=(0,Ne.createServer)(async(Re,We)=>{try{let _t=await rt(Re);if(_t.path==="/health"){We.writeHead(200).end("ok");return}let Pt=await D(_t);We.writeHead((Pt==null?void 0:Pt.status)??200,(Pt==null?void 0:Pt.headers)??{}).end((Pt==null?void 0:Pt.body)??"{}")}catch(_t){qe.error("Error while handling request",{error:(_t==null?void 0:_t.message)??"Internal error occured"}),We.writeHead(500).end(JSON.stringify({error:(_t==null?void 0:_t.message)??"Internal error occured"}))}});return Xe.listen(je,()=>He(je)),Xe}async function rt(D){var Re;let je=await Pe(D),He={};for(let We=0;We<D.rawHeaders.length;We+=2){let _t=D.rawHeaders[We].toLowerCase(),Pt=D.rawHeaders[We+1];He[_t]=Pt}let Xe=new URL(D.url??"",D.headers.host?`http://${D.headers.host}`:"http://botpress.cloud");return{body:je,path:Xe.pathname,query:Ke(Xe.search,"?"),headers:He,method:((Re=D.method)==null?void 0:Re.toUpperCase())??"GET"}}function Ke(D,je){return D.indexOf(je)===0?D.slice(je.length):D}async function Pe(D){return new Promise((je,He)=>{if(D.method!=="POST"&&D.method!=="PUT"&&D.method!=="PATCH")return je(void 0);let Xe="";D.on("data",Re=>Xe+=Re.toString()),D.on("error",Re=>He(Re)),D.on("end",()=>je(Xe))})}function Ae(D){qe.info(`Listening on port ${D}`)}c(m,y,e.exports);var Fe=qv,$e=vd,Ze=$e.z.enum(["webhook_received","message_created","action_triggered","register","unregister","ping","create_user","create_conversation"]),lt=D=>{let je=D[Y],He=D[ne],Xe=D[ce],Re=D[P],We=D[ue],_t=Ze.parse(D[Oe]);if(!je)throw new Error("Missing bot headers");if(!He)throw new Error("Missing bot user headers");if(!Xe)throw new Error("Missing integration headers");if(!Re)throw new Error("Missing webhook headers");if(!We)throw new Error("Missing configuration headers");if(!_t)throw new Error("Missing operation headers");return{botId:je,botUserId:He,integrationId:Xe,webhookId:Re,operation:_t,configuration:We?JSON.parse(Buffer.from(We,"base64").toString("utf-8")):{}}},K=class{constructor(D){R(this,"name");R(this,"version");R(this,"title");R(this,"description");R(this,"icon");R(this,"readme");R(this,"configuration");R(this,"events");R(this,"actions");R(this,"channels");R(this,"states");R(this,"user");R(this,"secrets");R(this,"identifier");R(this,"entities");this.props=D,this.name=D.name,this.version=D.version,this.icon=D.icon,this.readme=D.readme,this.title=D.title,this.identifier=D.identifier,this.description=D.description,this.configuration=D.configuration,this.events=D.events,this.actions=D.actions,this.channels=D.channels,this.states=D.states,this.user=D.user,this.secrets=D.secrets,this.entities=D.entities}clone(D){return new K({...this,...D})}},pe=qv,Te=class{constructor(D){R(this,"createConversation",D=>this.client.createConversation(D));R(this,"getConversation",D=>this.client.getConversation(D));R(this,"listConversations",D=>this.client.listConversations(D));R(this,"getOrCreateConversation",D=>this.client.getOrCreateConversation(D));R(this,"updateConversation",D=>this.client.updateConversation(D));R(this,"deleteConversation",D=>this.client.deleteConversation(D));R(this,"listParticipants",D=>this.client.listParticipants(D));R(this,"addParticipant",D=>this.client.addParticipant(D));R(this,"getParticipant",D=>this.client.getParticipant(D));R(this,"removeParticipant",D=>this.client.removeParticipant(D));R(this,"createEvent",D=>this.client.createEvent(D));R(this,"getEvent",D=>this.client.getEvent(D));R(this,"listEvents",D=>this.client.listEvents(D));R(this,"createMessage",D=>this.client.createMessage(D));R(this,"getOrCreateMessage",D=>this.client.getOrCreateMessage(D));R(this,"getMessage",D=>this.client.getMessage(D));R(this,"updateMessage",D=>this.client.updateMessage(D));R(this,"listMessages",D=>this.client.listMessages(D));R(this,"deleteMessage",D=>this.client.deleteMessage(D));R(this,"createUser",D=>this.client.createUser(D));R(this,"getUser",D=>this.client.getUser(D));R(this,"listUsers",D=>this.client.listUsers(D));R(this,"getOrCreateUser",D=>this.client.getOrCreateUser(D));R(this,"updateUser",D=>this.client.updateUser(D));R(this,"deleteUser",D=>this.client.deleteUser(D));R(this,"getState",D=>this.client.getState(D));R(this,"setState",D=>this.client.setState(D));R(this,"getOrSetState",D=>this.client.getOrSetState(D));R(this,"patchState",D=>this.client.patchState(D));R(this,"configureIntegration",D=>this.client.configureIntegration(D));R(this,"uploadFile",D=>this.client.uploadFile(D));R(this,"upsertFile",D=>this.client.upsertFile(D));R(this,"deleteFile",D=>this.client.deleteFile(D));R(this,"listFiles",D=>this.client.listFiles(D));R(this,"getFile",D=>this.client.getFile(D));R(this,"updateFileMetadata",D=>this.client.updateFileMetadata(D));this.client=D}},Se=d(hs),et=D=>{if(process.env.BP_LOG_FORMAT==="json")return JSON.stringify({msg:Se.default.format(...D),visible_to_bot_owner:!0});{let[je,...He]=D;return Se.default.format(`[For Bot Owner] ${je}`,...He)}},Ue={forBot:()=>({info:(...D)=>{console.info(et(D))},warn:(...D)=>{console.warn(et(D))},error:(...D)=>{console.error(et(D))},debug:(...D)=>{console.debug(et(D))}})},ot=D=>async je=>{let He=lt(je.headers),Xe=new Te(new pe.Client({botId:He.botId,integrationId:He.integrationId})),Re={ctx:He,req:je,client:Xe,logger:Ue,instance:D};try{let We;switch(He.operation){case"webhook_received":We=await mt(Re);break;case"register":We=await ie(Re);break;case"unregister":We=await ge(Re);break;case"message_created":We=await ct(Re);break;case"action_triggered":We=await pn(Re);break;case"ping":We=await It(Re);break;case"create_user":We=await xe(Re);break;case"create_conversation":We=await Be(Re);break;default:throw new Error(`Unknown operation ${He.operation}`)}return We?{...We,status:We.status??200}:{status:200}}catch(We){if((0,pe.isApiError)(We)){let _t=new pe.RuntimeError(We.message,We);return{status:_t.code,body:JSON.stringify(_t.toJSON())}}throw We}},It=async D=>{},mt=async({client:D,ctx:je,req:He,logger:Xe,instance:Re})=>{let{req:We}=Me(He);return Re.webhook({client:D,ctx:je,req:We,logger:Xe})},ie=async({client:D,ctx:je,req:He,logger:Xe,instance:Re})=>{if(!Re.register)return;let{webhookUrl:We}=Me(He);await Re.register({client:D,ctx:je,webhookUrl:We,logger:Xe})},ge=async({client:D,ctx:je,req:He,logger:Xe,instance:Re})=>{if(!Re.unregister)return;let{webhookUrl:We}=Me(He);await Re.unregister({ctx:je,webhookUrl:We,client:D,logger:Xe})},xe=async({client:D,ctx:je,req:He,logger:Xe,instance:Re})=>{if(!Re.createUser)return;let{tags:We}=Me(He);return await Re.createUser({ctx:je,client:D,tags:We,logger:Xe})},Be=async({client:D,ctx:je,req:He,logger:Xe,instance:Re})=>{if(!Re.createConversation)return;let{channel:We,tags:_t}=Me(He);return await Re.createConversation({ctx:je,client:D,channel:We,tags:_t,logger:Xe})},ct=async({ctx:D,req:je,client:He,logger:Xe,instance:Re})=>{let{conversation:We,user:_t,type:Pt,payload:Xt,message:bn}=Me(je),Rn=Re.channels[We.channel];if(!Rn)throw new Error(`Channel ${We.channel} not found`);let mr=Rn.messages[Pt];if(!mr)throw new Error(`Message of type ${Pt} not found in channel ${We.channel}`);await mr({ctx:D,conversation:We,message:bn,user:_t,type:Pt,client:He,payload:Xt,ack:async({tags:ta})=>{await He.updateMessage({id:bn.id,tags:ta})},logger:Xe})},pn=async({req:D,ctx:je,client:He,logger:Xe,instance:Re})=>{let{input:We,type:_t}=Me(D);if(!_t)throw new Error("Missing action type");let Pt=Re.actions[_t];if(!Pt)throw new Error(`Action ${_t} not found`);let Xt=await Pt({ctx:je,input:We,client:He,type:_t,logger:Xe});return{body:JSON.stringify({output:Xt})}},rn=class{constructor(D){R(this,"props");R(this,"actions");R(this,"channels");R(this,"register");R(this,"unregister");R(this,"createUser");R(this,"createConversation");R(this,"webhook");R(this,"handler",ot(this));R(this,"start",D=>Je(this.handler,D));this.props=D,this.actions=D.actions,this.channels=D.channels,this.register=D.register,this.unregister=D.unregister,this.createUser=D.createUser,this.createConversation=D.createConversation,this.webhook=D.handler}},Jt=d(qv),cn=class{constructor(D){R(this,"getConversation",D=>this.client.getConversation(D));R(this,"listConversations",D=>this.client.listConversations(D));R(this,"updateConversation",D=>this.client.updateConversation(D));R(this,"deleteConversation",D=>this.client.deleteConversation(D));R(this,"listParticipants",D=>this.client.listParticipants(D));R(this,"addParticipant",D=>this.client.addParticipant(D));R(this,"getParticipant",D=>this.client.getParticipant(D));R(this,"removeParticipant",D=>this.client.removeParticipant(D));R(this,"getEvent",D=>this.client.getEvent(D));R(this,"listEvents",D=>this.client.listEvents(D));R(this,"createMessage",D=>this.client.createMessage(D));R(this,"getOrCreateMessage",D=>this.client.getOrCreateMessage(D));R(this,"getMessage",D=>this.client.getMessage(D));R(this,"updateMessage",D=>this.client.updateMessage(D));R(this,"listMessages",D=>this.client.listMessages(D));R(this,"deleteMessage",D=>this.client.deleteMessage(D));R(this,"getUser",D=>this.client.getUser(D));R(this,"listUsers",D=>this.client.listUsers(D));R(this,"updateUser",D=>this.client.updateUser(D));R(this,"deleteUser",D=>this.client.deleteUser(D));R(this,"getState",D=>this.client.getState(D).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"setState",D=>this.client.setState(D).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"getOrSetState",D=>this.client.getOrSetState(D).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"patchState",D=>this.client.patchState(D).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"callAction",D=>this.client.callAction(D));R(this,"uploadFile",D=>this.client.uploadFile(D));R(this,"upsertFile",D=>this.client.upsertFile(D));R(this,"deleteFile",D=>this.client.deleteFile(D));R(this,"listFiles",D=>this.client.listFiles(D));R(this,"getFile",D=>this.client.getFile(D));R(this,"updateFileMetadata",D=>this.client.updateFileMetadata(D));R(this,"searchFiles",D=>this.client.searchFiles(D));R(this,"createConversation",D=>this.client.createConversation(D));R(this,"getOrCreateConversation",D=>this.client.getOrCreateConversation(D));R(this,"createUser",D=>this.client.createUser(D));R(this,"getOrCreateUser",D=>this.client.getOrCreateUser(D));this.client=D}},Cn=vd,ee=Cn.z.enum(["event_received","register","unregister","ping","action_triggered"]),ae=D=>{let je=D[Y],He=D[ue],Xe=D[N],Re=ee.parse(D[Oe]);if(!je)throw new Error("Missing bot headers");if(!Xe)throw new Error("Missing type headers");if(!He)throw new Error("Missing configuration headers");if(!Re)throw new Error("Missing operation headers");return{botId:je,operation:Re,type:Xe,configuration:He?JSON.parse(Buffer.from(He,"base64").toString("utf-8")):{}}},ft=D=>async je=>{let He=ae(je.headers);He.operation!=="ping"&&qe.info(`Received ${He.operation} operation for bot ${He.botId} of type ${He.type}`);let Xe=new cn(new Jt.Client({botId:He.botId})),Re={req:je,ctx:He,client:Xe,instance:D};switch(He.operation){case"action_triggered":throw new Error(`Operation ${He.operation} not supported yet`);case"event_received":await Mn(Re);break;case"register":await on();break;case"unregister":await pt();break;case"ping":await At();break;default:throw new Error(`Unknown operation ${He.operation}`)}return{status:200}},At=async D=>{},on=async D=>{},pt=async D=>{},Mn=async({ctx:D,req:je,client:He,instance:Xe})=>{qe.debug(`Received event ${D.type}`);let Re=Me(je),We=Re.event;switch(D.type){case"message_created":let _t={user:We.payload.user,conversation:We.payload.conversation,message:We.payload.message,states:We.payload.states,event:We};await Promise.all(Xe.messageHandlers.map(bn=>bn({client:He,ctx:D,..._t})));break;case"state_expired":let Pt={state:We.payload.state};await Promise.all(Xe.stateExpiredHandlers.map(bn=>bn({client:He,ctx:D,...Pt})));break;default:let Xt={event:Re.event};await Promise.all(Xe.eventHandlers.map(bn=>bn({client:He,ctx:D,...Xt})))}},sr=class{constructor(D){R(this,"_state",{messageHandlers:[],eventHandlers:[],stateExpiredHandlers:[]});R(this,"props");R(this,"message",D=>{this._state.messageHandlers.push(D)});R(this,"event",D=>{this._state.eventHandlers.push(D)});R(this,"stateExpired",D=>{this._state.stateExpiredHandlers.push(D)});R(this,"handler",ft(this._state));R(this,"start",D=>Je(this.handler,D));this.props=D}}})(n1);var ye=n1.exports;const{defaults:io}=ye.messages,Mi={className:ye.z.string().describe("CSS className to apply to the message").optional()},cT=io.audio.schema.extend({...Mi,type:ye.z.literal("audio")}),Uv=io.card.schema.extend({type:ye.z.literal("card"),subtitle:ye.z.string().optional(),imageUrl:ye.z.string().optional(),...Mi}),Bne=Uv.omit({type:!0}),fT=ye.z.object({items:ye.z.array(Bne),...Mi,type:ye.z.literal("carousel")}),dT=io.choice.schema.extend({text:ye.z.string(),...Mi,type:ye.z.literal("choice"),disableFreeText:ye.z.boolean().optional()}),pT=io.dropdown.schema.extend({text:ye.z.string(),...Mi,type:ye.z.literal("dropdown")}),hT=io.file.schema.extend({...Mi,type:ye.z.literal("file")}),mT=io.image.schema.extend({...Mi,type:ye.z.literal("image")}),yT=io.location.schema.extend({...Mi,type:ye.z.literal("location")}),gT=io.markdown.schema.extend({...Mi,type:ye.z.literal("markdown")}),vT=io.text.schema.extend({...Mi,type:ye.z.literal("text")}),bT=io.video.schema.extend({...Mi,type:ye.z.literal("video")}),_T=ye.z.union([cT,Uv,fT,dT,pT,hT,mT,yT,gT,vT,bT]),wT=ye.z.object({type:ye.z.literal("webchat_visibility"),data:ye.z.object({visibility:ye.z.union([ye.z.literal("show"),ye.z.literal("hide"),ye.z.literal("toggle")])})}),xT=ye.z.object({type:ye.z.literal("webchat_config"),data:ye.z.object({config:ye.z.record(ye.z.any())})}),ST=ye.z.object({type:ye.z.literal("custom"),data:ye.z.object({event:ye.z.record(ye.z.any())})}),ET=ye.z.union([wT,xT,ST]),zne=ET,Zne=ye.z.object({type:ye.z.literal("message_created"),data:_T}),AT=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:cT,cardSchema:Uv,carouselSchema:fT,choiceSchema:dT,customSchema:ST,dropdownSchema:pT,fileSchema:hT,imageSchema:mT,locationSchema:yT,markdownSchema:gT,messageCreatedSchema:Zne,messageSchema:_T,textSchema:vT,triggerSchema:ET,triggerSignalSchema:zne,videoSchema:bT,webchatConfigSchema:xT,webchatVisibilitySchema:wT},Symbol.toStringTag,{value:"Module"})),oo=ye.z.object({className:ye.z.string().optional(),avatarUrl:ye.z.string().url().optional()}),CT=oo.extend({type:ye.z.literal("audio"),audio:ye.z.string(),title:ye.z.string().optional()}),Hne=ye.z.union([ye.z.object({title:ye.z.string(),action:ye.z.literal("Say something"),text:ye.z.string()}),ye.z.object({title:ye.z.string(),action:ye.z.literal("Open URL"),url:ye.z.string()}),ye.z.object({title:ye.z.string(),action:ye.z.literal("Postback"),payload:ye.z.string()})]),Bv=oo.extend({type:ye.z.literal("card"),title:ye.z.string(),subtitle:ye.z.string().optional(),image:ye.z.string().optional(),actions:ye.z.array(Hne)}),OT=oo.extend({type:ye.z.literal("carousel"),items:ye.z.array(Bv)}),TT=oo.extend({type:ye.z.literal("dropdown"),message:ye.z.string().optional(),options:ye.z.array(ye.z.object({label:ye.z.string(),value:ye.z.string()})),allowCreation:ye.z.boolean().optional(),placeholderText:ye.z.string().optional(),allowMultiple:ye.z.boolean().optional(),buttonText:ye.z.string().optional(),width:ye.z.number().optional(),displayInKeyboard:ye.z.boolean().optional(),markdown:ye.z.boolean().optional(),text:ye.z.string().optional()}),$T=oo.extend({type:ye.z.literal("file"),file:ye.z.string(),title:ye.z.string().optional()}),kT=oo.extend({type:ye.z.literal("image"),image:ye.z.string()}),IT=oo.extend({type:ye.z.literal("location"),latitude:ye.z.number(),longitude:ye.z.number(),address:ye.z.string().optional(),title:ye.z.string().optional()}),PT=oo.extend({type:ye.z.literal("single-choice"),text:ye.z.string(),disableFreeText:ye.z.boolean().optional(),choices:ye.z.array(ye.z.object({title:ye.z.string(),value:ye.z.string()}))}),RT=oo.extend({type:ye.z.literal("text"),text:ye.z.string(),markdown:ye.z.boolean().optional()}),DT=oo.extend({type:ye.z.literal("video"),video:ye.z.string(),title:ye.z.string().optional()}),NT=ye.z.object({type:ye.z.literal("quick_reply"),text:ye.z.string(),payload:ye.z.string().optional()}),Bp=ye.z.union([CT,Bv,OT,TT,$T,kT,IT,PT,RT,DT,NT]),MT=ye.z.object({type:ye.z.literal("webchat-visibility"),visibility:ye.z.union([ye.z.literal("show"),ye.z.literal("hide"),ye.z.literal("toggle")])}),jT=ye.z.object({type:ye.z.literal("webchat-config"),config:ye.z.record(ye.z.any())}),LT=ye.z.object({type:ye.z.literal("custom-event"),event:ye.z.record(ye.z.any())}),FT=ye.z.union([MT,jT,LT]),Wne=ye.z.object({type:ye.z.literal("trigger"),trigger:FT}),qT=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:CT,cardSchema:Bv,carouselSchame:OT,customEventSchema:LT,dropdownSchema:TT,fileSchema:$T,imageSchema:kT,locationSchema:IT,messageSchema:Bp,messageSignalSchema:Bp,quickReplySchema:NT,singleChoiceSchema:PT,textSchema:RT,triggerSchema:FT,triggerSignalSchema:Wne,videoSchema:DT,webchatConfigSchema:jT,webchatVisibilitySchema:MT},Symbol.toStringTag,{value:"Module"})),UT=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(Vne)}),Vne=e=>{switch(e.action){case"postback":return{title:e.label,action:"Postback",payload:e.value};case"url":return{title:e.label,action:"Open URL",url:e.value};case"say":return{title:e.label,action:"Say something",text:e.value};default:throw new Error(`Unknown action type ${e.action}`)}},BT=e=>({...e,type:"audio",audio:e.audioUrl}),zT=e=>UT(e),ZT=e=>({...e,type:"carousel",items:e.items.map(UT)}),HT=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),WT=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),VT=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),KT=e=>({...e,type:"image",image:e.imageUrl}),GT=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),YT=e=>({...e,type:"text",text:e.markdown,markdown:!0}),JT=e=>({...e,type:"text",text:e.text,markdown:!0}),XT=e=>({...e,type:"video",video:e.videoUrl}),Kne=e=>{switch(e.type){case"audio":return BT(e);case"card":return zT(e);case"carousel":return ZT(e);case"choice":return HT(e);case"dropdown":return WT(e);case"file":return VT(e);case"image":return KT(e);case"location":return GT(e);case"markdown":return YT(e);case"text":return JT(e);case"video":return XT(e);default:throw new Error("Unsuported message type")}},QT=e=>({type:"webchat-visibility",visibility:e.data.visibility}),e$=e=>({type:"webchat-config",config:e.data.config}),t$=e=>({type:"custom-event",event:e.data.event}),n$=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:BT,cardAdapter:zT,carouselAdapter:ZT,choiceAdapter:HT,customAdapter:t$,dropdownAdapter:WT,fileAdapter:VT,imageAdapter:KT,locationAdapter:GT,markdownAdapter:YT,messageAdapter:Kne,textAdapter:JT,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return QT(e);case"webchat_config":return e$(e);case"custom":return t$(e);default:throw new Error("unknown trigger type")}},videoAdapter:XT,webchatConfigAdapter:e$,webchatVisibilityAdapter:QT},Symbol.toStringTag,{value:"Module"})),r$=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map(Gne)}),Gne=e=>{switch(e.action){case"Postback":return{label:e.title,action:"postback",value:e.payload};case"Open URL":return{label:e.title,action:"url",value:e.url};case"Say something":return{label:e.title,action:"say",value:e.text};default:throw new Error("Unknown action type")}},Yne=e=>({...e,type:"audio",audioUrl:e.audio}),Jne=e=>r$(e),Xne=e=>({...e,type:"carousel",items:e.items.map(r$)}),Qne=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),ere=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),tre=e=>({...e,type:"image",imageUrl:e.image}),nre=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),rre=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),ire=e=>({...e,type:"text",text:e.text}),ore=e=>({...e,type:"video",videoUrl:e.video}),are=e=>({...e,type:"text",text:e.text??e.payload}),i$=Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return Yne(e);case"card":return Jne(e);case"carousel":return Xne(e);case"dropdown":return Qne(e);case"file":return ere(e);case"image":return tre(e);case"location":return nre(e);case"single-choice":return rre(e);case"text":return ire(e);case"video":return ore(e);case"quick_reply":return are(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),sre=Object.freeze(Object.defineProperty({__proto__:null,messaging:qT,messagingToWebChat:i$,webchat:AT,webchatToMessaging:n$},Symbol.toStringTag,{value:"Module"})),ure=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let zp;const lre=new Uint8Array(16);function cre(){if(!zp&&(zp=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!zp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zp(lre)}const fr=[];for(let e=0;e<256;++e)fr.push((e+256).toString(16).slice(1));function fre(e,t=0){return fr[e[t+0]]+fr[e[t+1]]+fr[e[t+2]]+fr[e[t+3]]+"-"+fr[e[t+4]]+fr[e[t+5]]+"-"+fr[e[t+6]]+fr[e[t+7]]+"-"+fr[e[t+8]]+fr[e[t+9]]+"-"+fr[e[t+10]]+fr[e[t+11]]+fr[e[t+12]]+fr[e[t+13]]+fr[e[t+14]]+fr[e[t+15]]}const o$={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function dre(e,t,n){if(o$.randomUUID&&!t&&!e)return o$.randomUUID();e=e||{};const r=e.random||(e.rng||cre)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return fre(r)}const Zp=e=>({block:e,type:"bubble"}),pre=e=>e.action==="Say something"?{type:"button",variant:"action",text:e.title,buttonValue:e.text,reusable:!0}:e.action==="Open URL"?{type:"button",variant:"link",text:e.title,buttonValue:e.url,reusable:!0}:{type:"button",variant:"action",text:e.title,buttonValue:e.payload,reusable:!0},a$=({title:e,image:t,actions:n,subtitle:r})=>{const i=[];return t&&i.push({type:"image",url:t}),e&&i.push({type:"text",text:`## ${e}`}),r&&i.push({type:"text",text:r}),n.length>0&&i.push({type:"row",blocks:n.map(pre)}),{type:"column",horizontalAlignment:"center",blocks:[...i]}},hre=({choices:e,text:t})=>{const n=dre(),r=Zp({type:"text",text:t});return e.length===0?r:{type:"column",horizontalAlignment:"left",blocks:[r,{type:"row",blocks:e.map(({title:i,value:o})=>({type:"button",variant:"action",text:i,buttonValue:o,groupId:n}))}]}},mre=({options:e,text:t})=>{const n=[{type:"dropdown",label:t??"Select an option",options:e}];return t&&n.unshift({type:"text",text:t}),{type:"column",blocks:n}},zv=({type:e,audio:t})=>({payload:{type:e,url:t}}),Zv=e=>({payload:Zp(a$(e))}),Hv=({items:e})=>({payload:{type:"carousel",blocks:e.map(a$)}}),Wv=e=>({disableInput:e.disableFreeText,payload:hre(e)}),Vv=e=>({disableInput:!0,payload:Zp(mre(e))}),Kv=({file:e,...t})=>({payload:{url:e,...t}}),Gv=({type:e,image:t})=>({payload:{type:e,url:t}}),Yv=({type:e,latitude:t,longitude:n,title:r,address:i})=>({payload:{type:e,latitude:t,longitude:n,title:r??i??"View on map"}}),s$=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),Hp=({type:e,text:t})=>({payload:Zp({type:e,text:t})}),Jv=({type:e,video:t})=>({payload:{type:e,url:t}}),Xv=e=>{switch(e.type){case"audio":return zv(e);case"card":return Zv(e);case"carousel":return Hv(e);case"single-choice":return Wv(e);case"dropdown":return Vv(e);case"file":return Kv(e);case"image":return Gv(e);case"location":return Yv(e);case"quick_reply":return s$(e);case"text":return Hp(e);case"video":return Jv(e);default:throw new Error("Unsuported message type")}},yre=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:zv,cardAdapter:Zv,carouselAdapter:Hv,choiceAdapter:Wv,dropdownAdapter:Vv,fileAdapter:Kv,imageAdapter:Gv,locationAdapter:Yv,messageAdapter:Xv,quickReplyAdapter:s$,textAdapter:Hp,videoAdapter:Jv},Symbol.toStringTag,{value:"Module"})),{webchatToMessaging:ji}=sre,u$=e=>{const t=ji.audioAdapter(e);return zv(t)},l$=e=>{const t=ji.cardAdapter(e);return Zv(t)},c$=e=>{const t=ji.carouselAdapter(e);return Hv(t)},f$=e=>{const t=ji.choiceAdapter(e);return Wv(t)},d$=e=>{const t=ji.dropdownAdapter(e);return Vv(t)},p$=e=>{const t=ji.fileAdapter(e);return Kv(t)},h$=e=>{const t=ji.imageAdapter(e);return Gv(t)},m$=e=>{const t=ji.locationAdapter(e);return Yv(t)},y$=e=>{const t=ji.markdownAdapter(e);return Hp(t)},g$=e=>{const t=ji.textAdapter(e);return Hp(t)},v$=e=>{const t=ji.videoAdapter(e);return Jv(t)},b$=e=>{switch(e.type){case"audio":return u$(e);case"card":return l$(e);case"carousel":return c$(e);case"choice":return f$(e);case"dropdown":return d$(e);case"file":return p$(e);case"image":return h$(e);case"location":return m$(e);case"markdown":return y$(e);case"text":return g$(e);case"video":return v$(e);default:throw new Error("Unsuported message type")}},gre=Object.freeze(Object.defineProperty({__proto__:null,messaging:qT,messagingToTarget:yre,messagingToWebChat:i$,target:ure,webchat:AT,webchatToMessaging:n$,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:u$,cardAdapter:l$,carouselAdapter:c$,choiceAdapter:f$,dropdownAdapter:d$,fileAdapter:p$,imageAdapter:h$,locationAdapter:m$,markdownAdapter:y$,messageAdapter:b$,textAdapter:g$,videoAdapter:v$},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var Qv={exports:{}},xc={};/**
|
|
137
137
|
* @license React
|
|
138
138
|
* react-jsx-runtime.production.min.js
|
|
139
139
|
*
|
|
@@ -149,7 +149,7 @@ ${Od(e.value)}`.trim();case St.ZodFirstPartyTypeKind.ZodEnum:return s.values.map
|
|
|
149
149
|
*
|
|
150
150
|
* This source code is licensed under the MIT license found in the
|
|
151
151
|
* LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/var w$;function bre(){return w$||(w$=1,process.env.NODE_ENV!=="production"&&function(){var e=C,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function w(Z){if(Z===null||typeof Z!="object")return null;var Ce=y&&Z[y]||Z[v];return typeof Ce=="function"?Ce:null}var _=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(Z){{for(var Ce=arguments.length,ze=new Array(Ce>1?Ce-1:0),yt=1;yt<Ce;yt++)ze[yt-1]=arguments[yt];S("error",Z,ze)}}function S(Z,Ce,ze){{var yt=_.ReactDebugCurrentFrame,Gt=yt.getStackAddendum();Gt!==""&&(Ce+="%s",ze=ze.concat([Gt]));var un=ze.map(function(qt){return String(qt)});un.unshift("Warning: "+Ce),Function.prototype.apply.call(console[Z],console,un)}}var A=!1,E=!1,T=!1,
|
|
152
|
+
*/var w$;function bre(){return w$||(w$=1,process.env.NODE_ENV!=="production"&&function(){var e=C,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function w(Z){if(Z===null||typeof Z!="object")return null;var Ce=y&&Z[y]||Z[v];return typeof Ce=="function"?Ce:null}var _=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(Z){{for(var Ce=arguments.length,ze=new Array(Ce>1?Ce-1:0),yt=1;yt<Ce;yt++)ze[yt-1]=arguments[yt];S("error",Z,ze)}}function S(Z,Ce,ze){{var yt=_.ReactDebugCurrentFrame,Gt=yt.getStackAddendum();Gt!==""&&(Ce+="%s",ze=ze.concat([Gt]));var un=ze.map(function(qt){return String(qt)});un.unshift("Warning: "+Ce),Function.prototype.apply.call(console[Z],console,un)}}var A=!1,E=!1,T=!1,j=!1,L=!1,F;F=Symbol.for("react.module.reference");function M(Z){return!!(typeof Z=="string"||typeof Z=="function"||Z===r||Z===o||L||Z===i||Z===c||Z===d||j||Z===h||A||E||T||typeof Z=="object"&&Z!==null&&(Z.$$typeof===m||Z.$$typeof===p||Z.$$typeof===a||Z.$$typeof===s||Z.$$typeof===l||Z.$$typeof===F||Z.getModuleId!==void 0))}function H(Z,Ce,ze){var yt=Z.displayName;if(yt)return yt;var Gt=Ce.displayName||Ce.name||"";return Gt!==""?ze+"("+Gt+")":ze}function re(Z){return Z.displayName||"Context"}function Q(Z){if(Z==null)return null;if(typeof Z.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof Z=="function")return Z.displayName||Z.name||null;if(typeof Z=="string")return Z;switch(Z){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case d:return"SuspenseList"}if(typeof Z=="object")switch(Z.$$typeof){case s:var Ce=Z;return re(Ce)+".Consumer";case a:var ze=Z;return re(ze._context)+".Provider";case l:return H(Z,Z.render,"ForwardRef");case p:var yt=Z.displayName||null;return yt!==null?yt:Q(Z.type)||"Memo";case m:{var Gt=Z,un=Gt._payload,qt=Gt._init;try{return Q(qt(un))}catch{return null}}}return null}var G=Object.assign,V=0,q,Y,ne,ce,P,ue,Oe;function N(){}N.__reactDisabledLog=!0;function Ne(){{if(V===0){q=console.log,Y=console.info,ne=console.warn,ce=console.error,P=console.group,ue=console.groupCollapsed,Oe=console.groupEnd;var Z={configurable:!0,enumerable:!0,value:N,writable:!0};Object.defineProperties(console,{info:Z,log:Z,warn:Z,error:Z,group:Z,groupCollapsed:Z,groupEnd:Z})}V++}}function qe(){{if(V--,V===0){var Z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},Z,{value:q}),info:G({},Z,{value:Y}),warn:G({},Z,{value:ne}),error:G({},Z,{value:ce}),group:G({},Z,{value:P}),groupCollapsed:G({},Z,{value:ue}),groupEnd:G({},Z,{value:Oe})})}V<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Me=_.ReactCurrentDispatcher,Je;function rt(Z,Ce,ze){{if(Je===void 0)try{throw Error()}catch(Gt){var yt=Gt.stack.trim().match(/\n( *(at )?)/);Je=yt&&yt[1]||""}return`
|
|
153
153
|
`+Je+Z}}var Ke=!1,Pe;{var Ae=typeof WeakMap=="function"?WeakMap:Map;Pe=new Ae}function Fe(Z,Ce){if(!Z||Ke)return"";{var ze=Pe.get(Z);if(ze!==void 0)return ze}var yt;Ke=!0;var Gt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var un;un=Me.current,Me.current=null,Ne();try{if(Ce){var qt=function(){throw Error()};if(Object.defineProperty(qt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(qt,[])}catch(Qr){yt=Qr}Reflect.construct(Z,[],qt)}else{try{qt.call()}catch(Qr){yt=Qr}Z.call(qt.prototype)}}else{try{throw Error()}catch(Qr){yt=Qr}Z()}}catch(Qr){if(Qr&&yt&&typeof Qr.stack=="string"){for(var Tt=Qr.stack.split(`
|
|
154
154
|
`),jn=yt.stack.split(`
|
|
155
155
|
`),On=Tt.length-1,Tn=jn.length-1;On>=1&&Tn>=0&&Tt[On]!==jn[Tn];)Tn--;for(;On>=1&&Tn>=0;On--,Tn--)if(Tt[On]!==jn[Tn]){if(On!==1||Tn!==1)do if(On--,Tn--,Tn<0||Tt[On]!==jn[Tn]){var Xr=`
|
|
@@ -159,10 +159,10 @@ Check the render method of \``+Z+"`."}return""}}function He(Z){{if(Z!==void 0){v
|
|
|
159
159
|
|
|
160
160
|
Check your code at `+Ce+":"+ze+"."}return""}}var Xe={};function Re(Z){{var Ce=je();if(!Ce){var ze=typeof Z=="string"?Z:Z.displayName||Z.name;ze&&(Ce=`
|
|
161
161
|
|
|
162
|
-
Check the top-level render call using <`+ze+">.")}return Ce}}function We(Z,Ce){{if(!Z._store||Z._store.validated||Z.key!=null)return;Z._store.validated=!0;var ze=Re(Ce);if(Xe[ze])return;Xe[ze]=!0;var yt="";Z&&Z._owner&&Z._owner!==on.current&&(yt=" It was passed a child from "+Q(Z._owner.type)+"."),Mn(Z),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ze,yt),Mn(null)}}function _t(Z,Ce){{if(typeof Z!="object")return;if(ot(Z))for(var ze=0;ze<Z.length;ze++){var yt=Z[ze];D(yt)&&We(yt,Ce)}else if(D(Z))Z._store&&(Z._store.validated=!0);else if(Z){var Gt=w(Z);if(typeof Gt=="function"&&Gt!==Z.entries)for(var un=Gt.call(Z),qt;!(qt=un.next()).done;)D(qt.value)&&We(qt.value,Ce)}}}function Pt(Z){{var Ce=Z.type;if(Ce==null||typeof Ce=="string")return;var ze;if(typeof Ce=="function")ze=Ce.propTypes;else if(typeof Ce=="object"&&(Ce.$$typeof===l||Ce.$$typeof===p))ze=Ce.propTypes;else return;if(ze){var yt=Q(Ce);et(ze,Z.props,"prop",yt,Z)}else if(Ce.PropTypes!==void 0&&!sr){sr=!0;var Gt=Q(Ce);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Gt||"Unknown")}typeof Ce.getDefaultProps=="function"&&!Ce.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xt(Z){{for(var Ce=Object.keys(Z.props),ze=0;ze<Ce.length;ze++){var yt=Ce[ze];if(yt!=="children"&&yt!=="key"){Mn(Z),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",yt),Mn(null);break}}Z.ref!==null&&(Mn(Z),b("Invalid attribute `ref` supplied to `React.Fragment`."),Mn(null))}}function bn(Z,Ce,ze,yt,Gt,un){{var qt=j(Z);if(!qt){var Tt="";(Z===void 0||typeof Z=="object"&&Z!==null&&Object.keys(Z).length===0)&&(Tt+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var jn=He(Gt);jn?Tt+=jn:Tt+=je();var On;Z===null?On="null":ot(Z)?On="array":Z!==void 0&&Z.$$typeof===t?(On="<"+(Q(Z.type)||"Unknown")+" />",Tt=" Did you accidentally export a JSX literal instead of a component?"):On=typeof Z,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",On,Tt)}var Tn=At(Z,Ce,ze,Gt,un);if(Tn==null)return Tn;if(qt){var Xr=Ce.children;if(Xr!==void 0)if(yt)if(ot(Xr)){for(var Wi=0;Wi<Xr.length;Wi++)_t(Xr[Wi],Z);Object.freeze&&Object.freeze(Xr)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _t(Xr,Z)}return Z===r?Xt(Tn):Pt(Tn),Tn}}function Rn(Z,Ce,ze){return bn(Z,Ce,ze,!0)}function mr(Z,Ce,ze){return bn(Z,Ce,ze,!1)}var ta=mr,Sl=Rn;Sc.Fragment=r,Sc.jsx=ta,Sc.jsxs=Sl}()),Sc}process.env.NODE_ENV==="production"?Qv.exports=vre():Qv.exports=bre();var X=Qv.exports;function Zt(){return Zt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zt.apply(this,arguments)}function Wp(e,t=[]){let n=[];function r(o,a){const s=C.createContext(a),l=n.length;n=[...n,a];function c(p){const{scope:m,children:h,...y}=p,v=(m==null?void 0:m[e][l])||s,w=C.useMemo(()=>y,Object.values(y));return C.createElement(v.Provider,{value:w},h)}function d(p,m){const h=(m==null?void 0:m[e][l])||s,y=C.useContext(h);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,d]}const i=()=>{const o=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return C.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,_re(i,...t)]}function _re(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const p=l(o)[`__scope${c}`];return{...s,...p}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Dr(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const $u=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{};function ys(){return ys=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},ys.apply(null,arguments)}function wre(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function x$(...e){return t=>e.forEach(n=>wre(n,t))}function ii(...e){return C.useCallback(x$(...e),e)}const eb=C.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.Children.toArray(n),o=i.find(Sre);if(o){const a=o.props.children,s=i.map(l=>l===o?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return C.createElement(tb,ys({},r,{ref:t}),C.isValidElement(a)?C.cloneElement(a,void 0,s):null)}return C.createElement(tb,ys({},r,{ref:t}),n)});eb.displayName="Slot";const tb=C.forwardRef((e,t)=>{const{children:n,...r}=e;return C.isValidElement(n)?C.cloneElement(n,{...Ere(r,n.props),ref:t?x$(t,n.ref):n.ref}):C.Children.count(n)>1?C.Children.only(null):null});tb.displayName="SlotClone";const xre=({children:e})=>C.createElement(C.Fragment,null,e);function Sre(e){return C.isValidElement(e)&&e.type===xre}function Ere(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const dr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=C.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?eb:t;return C.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.createElement(s,ys({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Are(e,t){e&&Xi.flushSync(()=>e.dispatchEvent(t))}const S$="Avatar",[Cre,u2e]=Wp(S$),[Ore,E$]=Cre(S$),A$=C.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=C.useState("idle");return C.createElement(Ore,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o},C.createElement(dr.span,Zt({},r,{ref:t})))}),Tre="AvatarImage",C$=C.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=E$(Tre,n),s=kre(r),l=Dr(c=>{i(c),a.onImageLoadingStatusChange(c)});return $u(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?C.createElement(dr.img,Zt({},o,{ref:t,src:r})):null}),$re="AvatarFallback",O$=C.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=E$($re,n),[a,s]=C.useState(r===void 0);return C.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&o.imageLoadingStatus!=="loaded"?C.createElement(dr.span,Zt({},i,{ref:t})):null});function kre(e){const[t,n]=C.useState("idle");return C.useEffect(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,o=a=>()=>{r&&n(a)};return n("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=e,()=>{r=!1}},[e]),t}let nb=class{constructor(){R(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var i;(i=this.eventMap[t])==null||i.delete(n)}}emit(t,n){var r,i;(r=this.eventMap[t])==null||r.forEach(o=>{o(n)}),(i=this.eventMap["*"])==null||i.forEach(o=>{o({type:t,payload:n})})}};const Ire=new nb;function T$(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}const rb=C.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...o},a)=>{const s=T$(e??"",15);return X.jsxs(A$,{ref:a,"data-color":s,...n,...o,children:[X.jsx(C$,{src:t,...r}),X.jsx(O$,{...i,children:typeof o.children=="string"?o.children[0]:o.children})]})});function l2e(){}function c2e(){}function Pre(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Rre=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dre=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nre={};function $$(e,t){return((t||Nre).jsx?Dre:Rre).test(e)}const Mre=/[ \t\n\f\r]/g;function jre(e){return typeof e=="object"?e.type==="text"?k$(e.value):!1:k$(e)}function k$(e){return e.replace(Mre,"")===""}let Ec=class{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}};Ec.prototype.property={},Ec.prototype.normal={},Ec.prototype.space=null;function I$(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Ec(n,r,t)}function ib(e){return e.toLowerCase()}class _i{constructor(t,n){this.property=t,this.attribute=n}}_i.prototype.space=null,_i.prototype.boolean=!1,_i.prototype.booleanish=!1,_i.prototype.overloadedBoolean=!1,_i.prototype.number=!1,_i.prototype.commaSeparated=!1,_i.prototype.spaceSeparated=!1,_i.prototype.commaOrSpaceSeparated=!1,_i.prototype.mustUseProperty=!1,_i.prototype.defined=!1;let Lre=0;const jt=gs(),Wn=gs(),P$=gs(),ke=gs(),An=gs(),ku=gs(),oi=gs();function gs(){return 2**++Lre}const ob=Object.freeze(Object.defineProperty({__proto__:null,boolean:jt,booleanish:Wn,commaOrSpaceSeparated:oi,commaSeparated:ku,number:ke,overloadedBoolean:P$,spaceSeparated:An},Symbol.toStringTag,{value:"Module"})),ab=Object.keys(ob);class sb extends _i{constructor(t,n,r,i){let o=-1;if(super(t,n),R$(this,"space",i),typeof r=="number")for(;++o<ab.length;){const a=ab[o];R$(this,ab[o],(r&ob[a])===ob[a])}}}sb.prototype.defined=!0;function R$(e,t,n){n&&(e[t]=n)}const Fre={}.hasOwnProperty;function Iu(e){const t={},n={};let r;for(r in e.properties)if(Fre.call(e.properties,r)){const i=e.properties[r],o=new sb(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ib(r)]=r,n[ib(o.attribute)]=r}return new Ec(t,n,e.space)}const D$=Iu({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),N$=Iu({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function M$(e,t){return t in e?e[t]:t}function j$(e,t){return M$(e,t.toLowerCase())}const L$=Iu({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:j$,properties:{xmlns:null,xmlnsXLink:null}}),F$=Iu({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Wn,ariaAutoComplete:null,ariaBusy:Wn,ariaChecked:Wn,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:An,ariaCurrent:null,ariaDescribedBy:An,ariaDetails:null,ariaDisabled:Wn,ariaDropEffect:An,ariaErrorMessage:null,ariaExpanded:Wn,ariaFlowTo:An,ariaGrabbed:Wn,ariaHasPopup:null,ariaHidden:Wn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:An,ariaLevel:ke,ariaLive:null,ariaModal:Wn,ariaMultiLine:Wn,ariaMultiSelectable:Wn,ariaOrientation:null,ariaOwns:An,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:Wn,ariaReadOnly:Wn,ariaRelevant:null,ariaRequired:Wn,ariaRoleDescription:An,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:Wn,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null}}),qre=Iu({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:j$,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ku,acceptCharset:An,accessKey:An,action:null,allow:null,allowFullScreen:jt,allowPaymentRequest:jt,allowUserMedia:jt,alt:null,as:null,async:jt,autoCapitalize:null,autoComplete:An,autoFocus:jt,autoPlay:jt,capture:jt,charSet:null,checked:jt,cite:null,className:An,cols:ke,colSpan:null,content:null,contentEditable:Wn,controls:jt,controlsList:An,coords:ke|ku,crossOrigin:null,data:null,dateTime:null,decoding:null,default:jt,defer:jt,dir:null,dirName:null,disabled:jt,download:P$,draggable:Wn,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:jt,formTarget:null,headers:An,height:ke,hidden:jt,high:ke,href:null,hrefLang:null,htmlFor:An,httpEquiv:An,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:jt,itemId:null,itemProp:An,itemRef:An,itemScope:jt,itemType:An,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:jt,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:jt,muted:jt,name:null,nonce:null,noModule:jt,noValidate:jt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:jt,optimum:ke,pattern:null,ping:An,placeholder:null,playsInline:jt,poster:null,preload:null,readOnly:jt,referrerPolicy:null,rel:An,required:jt,reversed:jt,rows:ke,rowSpan:ke,sandbox:An,scope:null,scoped:jt,seamless:jt,selected:jt,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:Wn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ke,step:null,style:null,tabIndex:ke,target:null,title:null,translate:null,type:null,typeMustMatch:jt,useMap:null,value:Wn,width:ke,wrap:null,align:null,aLink:null,archive:An,axis:null,background:null,bgColor:null,border:ke,borderColor:null,bottomMargin:ke,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:jt,declare:jt,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:jt,noHref:jt,noShade:jt,noWrap:jt,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:Wn,standby:null,summary:null,text:null,topMargin:ke,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ke,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:jt,disableRemotePlayback:jt,prefix:null,property:null,results:ke,security:null,unselectable:null}}),Ure=Iu({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:M$,properties:{about:oi,accentHeight:ke,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ke,amplitude:ke,arabicForm:null,ascent:ke,attributeName:null,attributeType:null,azimuth:ke,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ke,by:null,calcMode:null,capHeight:ke,className:An,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ke,diffuseConstant:ke,direction:null,display:null,dur:null,divisor:ke,dominantBaseline:null,download:jt,dx:null,dy:null,edgeMode:null,editable:null,elevation:ke,enableBackground:null,end:null,event:null,exponent:ke,externalResourcesRequired:null,fill:null,fillOpacity:ke,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ku,g2:ku,glyphName:ku,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ke,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ke,horizOriginX:ke,horizOriginY:ke,id:null,ideographic:ke,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ke,k:ke,k1:ke,k2:ke,k3:ke,k4:ke,kernelMatrix:oi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ke,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ke,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ke,overlineThickness:ke,paintOrder:null,panose1:null,path:null,pathLength:ke,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:An,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ke,pointsAtY:ke,pointsAtZ:ke,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oi,rev:oi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oi,requiredFeatures:oi,requiredFonts:oi,requiredFormats:oi,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ke,specularExponent:ke,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ke,strikethroughThickness:ke,string:null,stroke:null,strokeDashArray:oi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ke,strokeOpacity:ke,strokeWidth:null,style:null,surfaceScale:ke,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oi,tabIndex:ke,tableValues:null,target:null,targetX:ke,targetY:ke,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oi,to:null,transform:null,u1:null,u2:null,underlinePosition:ke,underlineThickness:ke,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ke,values:null,vAlphabetic:ke,vMathematical:ke,vectorEffect:null,vHanging:ke,vIdeographic:ke,version:null,vertAdvY:ke,vertOriginX:ke,vertOriginY:ke,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ke,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Bre=/^data[-\w.:]+$/i,q$=/-[a-z]/g,zre=/[A-Z]/g;function Zre(e,t){const n=ib(t);let r=t,i=_i;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Bre.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(q$,Wre);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!q$.test(o)){let a=o.replace(zre,Hre);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=sb}return new i(r,t)}function Hre(e){return"-"+e.toLowerCase()}function Wre(e){return e.charAt(1).toUpperCase()}const Vre={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Kre=I$([N$,D$,L$,F$,qre],"html"),ub=I$([N$,D$,L$,F$,Ure],"svg");function Gre(e){return e.join(" ").trim()}var U$={},B$=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Yre=/\n/g,Jre=/^\s*/,Xre=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Qre=/^:\s*/,eie=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,tie=/^[;\s]*/,nie=/^\s+|\s+$/g,rie=`
|
|
163
|
-
`,z$="/",Z$="*",vs="",iie="comment",oie="declaration",aie=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var v=y.match(Yre);v&&(n+=v.length);var w=y.lastIndexOf(rie);r=~w?y.length-w:r+y.length}function o(){var y={line:n,column:r};return function(v){return v.position=new a(y),c(),v}}function a(y){this.start=y,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(y){var v=new Error(t.source+":"+n+":"+r+": "+y);if(v.reason=y,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function l(y){var v=y.exec(e);if(v){var w=v[0];return i(w),e=e.slice(w.length),v}}function c(){l(Jre)}function d(y){var v;for(y=y||[];v=p();)v!==!1&&y.push(v);return y}function p(){var y=o();if(!(z$!=e.charAt(0)||Z$!=e.charAt(1))){for(var v=2;vs!=e.charAt(v)&&(Z$!=e.charAt(v)||z$!=e.charAt(v+1));)++v;if(v+=2,vs===e.charAt(v-1))return s("End of comment missing");var w=e.slice(2,v-2);return r+=2,i(w),e=e.slice(v),r+=2,y({type:iie,comment:w})}}function m(){var y=o(),v=l(Xre);if(v){if(p(),!l(Qre))return s("property missing ':'");var w=l(eie),_=y({type:oie,property:H$(v[0].replace(B$,vs)),value:w?H$(w[0].replace(B$,vs)):vs});return l(tie),_}}function h(){var y=[];d(y);for(var v;v=m();)v!==!1&&(y.push(v),d(y));return y}return c(),h()};function H$(e){return e?e.replace(nie,vs):vs}var sie=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(U$,"__esModule",{value:!0});var uie=sie(aie);function lie(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,uie.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var a=o.property,s=o.value;i?t(a,s,o):s&&(n=n||{},n[a]=s)}}),n}var W$=U$.default=lie;const cie=W$.default||W$,V$=K$("end"),lb=K$("start");function K$(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function fie(e){const t=lb(e),n=V$(e);if(t&&n)return{start:t,end:n}}function Ac(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?G$(e.position):"start"in e||"end"in e?G$(e):"line"in e||"column"in e?cb(e):""}function cb(e){return Y$(e&&e.line)+":"+Y$(e&&e.column)}function G$(e){return cb(e&&e.start)+"-"+cb(e&&e.end)}function Y$(e){return e&&typeof e=="number"?e:1}class _r extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Ac(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}_r.prototype.file="",_r.prototype.name="",_r.prototype.reason="",_r.prototype.message="",_r.prototype.stack="",_r.prototype.column=void 0,_r.prototype.line=void 0,_r.prototype.ancestors=void 0,_r.prototype.cause=void 0,_r.prototype.fatal=void 0,_r.prototype.place=void 0,_r.prototype.ruleId=void 0,_r.prototype.source=void 0;const fb={}.hasOwnProperty,die=new Map,pie=/[A-Z]/g,hie=/-([a-z])/g,mie=new Set(["table","tbody","thead","tfoot","tr"]),yie=new Set(["td","th"]),J$="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gie(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Aie(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Eie(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ub:Kre,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=X$(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function X$(e,t,n){if(t.type==="element")return vie(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return bie(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wie(e,t,n);if(t.type==="mdxjsEsm")return _ie(e,t);if(t.type==="root")return xie(e,t,n);if(t.type==="text")return Sie(e,t)}function vie(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ub,e.schema=i),e.ancestors.push(t);const o=ek(e,t.tagName,!1),a=Cie(e,t);let s=pb(e,t);return mie.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!jre(l):!0})),Q$(e,a,o,t),db(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function bie(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Cc(e,t.position)}function _ie(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Cc(e,t.position)}function wie(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ub,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:ek(e,t.name,!0),a=Oie(e,t),s=pb(e,t);return Q$(e,a,o,t),db(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function xie(e,t,n){const r={};return db(r,pb(e,t)),e.create(t,e.Fragment,r,n)}function Sie(e,t){return t.value}function Q$(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function db(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Eie(e,t,n){return r;function r(i,o,a,s){const c=Array.isArray(a.children)?n:t;return s?c(o,a,s):c(o,a)}}function Aie(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=lb(r);return t(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Cie(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&fb.call(t.properties,i)){const o=Tie(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&yie.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Oie(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Cc(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else Cc(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function pb(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:die;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const c=i.get(l)||0;a=l+"-"+c,i.set(l,c+1)}}const s=X$(e,o,a);s!==void 0&&n.push(s)}return n}function Tie(e,t,n){const r=Zre(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Pre(n):Gre(n)),r.property==="style"){let i=typeof n=="object"?n:$ie(e,String(n));return e.stylePropertyNameCase==="css"&&(i=kie(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Vre[r.property]||r.property:r.attribute,n]}}function $ie(e,t){const n={};try{cie(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,a=new _r("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=J$+"#cannot-parse-style-attribute",a}}return n;function r(i,o){let a=i;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(hie,Pie)),n[a]=o}}function ek(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=$$(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=$$(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return fb.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Cc(e)}function Cc(e,t){const n=new _r("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=J$+"#cannot-handle-mdx-estrees-without-createevaluater",n}function kie(e){const t={};let n;for(n in e)fb.call(e,n)&&(t[Iie(n)]=e[n]);return t}function Iie(e){let t=e.replace(pie,Rie);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Pie(e,t){return t.toUpperCase()}function Rie(e){return"-"+e.toLowerCase()}const hb={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Die={};function mb(e,t){const n=t||Die,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return tk(e,r,i)}function tk(e,t,n){if(Nie(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return nk(e.children,t,n)}return Array.isArray(e)?nk(e,t,n):""}function nk(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=tk(e[i],t,n);return r.join("")}function Nie(e){return!!(e&&typeof e=="object")}const rk=document.createElement("i");function yb(e){const t="&"+e+";";rk.innerHTML=t;const n=rk.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ai(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function wi(e,t){return e.length>0?(ai(e,e.length,0,t),e):t}const ik={}.hasOwnProperty;function ok(e){const t={};let n=-1;for(;++n<e.length;)Mie(t,e[n]);return t}function Mie(e,t){let n;for(n in t){const i=(ik.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){ik.call(i,a)||(i[a]=[]);const s=o[a];jie(i[a],Array.isArray(s)?s:s?[s]:[])}}}function jie(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ai(e,0,0,r)}function ak(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Li(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nr=ma(/[A-Za-z]/),wr=ma(/[\dA-Za-z]/),Lie=ma(/[#-'*+\--9=?A-Z^-~]/);function Vp(e){return e!==null&&(e<32||e===127)}const gb=ma(/\d/),Fie=ma(/[\dA-Fa-f]/),qie=ma(/[!-/:-@[-`{-~]/);function ht(e){return e!==null&&e<-2}function gn(e){return e!==null&&(e<0||e===32)}function Ht(e){return e===-2||e===-1||e===32}const Kp=ma(/\p{P}|\p{S}/u),bs=ma(/\s/);function ma(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Pu(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&wr(e.charCodeAt(n+1))&&wr(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function en(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return Ht(l)?(e.enter(n),s(l)):t(l)}function s(l){return Ht(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const Uie={tokenize:Bie};function Bie(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),en(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return ht(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const zie={tokenize:Zie},sk={tokenize:Hie};function Zie(e){const t=this,n=[];let r=0,i,o,a;return s;function s(S){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,l,c)(S)}return c(S)}function l(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const A=t.events.length;let E=A,T;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){T=t.events[E][1].end;break}_(r);let N=A;for(;N<t.events.length;)t.events[N][1].end=Object.assign({},T),N++;return ai(t.events,E+1,0,t.events.slice(A)),t.events.length=N,c(S)}return s(S)}function c(S){if(r===n.length){if(!i)return m(S);if(i.currentConstruct&&i.currentConstruct.concrete)return y(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sk,d,p)(S)}function d(S){return i&&b(),_(r),m(S)}function p(S){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,y(S)}function m(S){return t.containerState={},e.attempt(sk,h,y)(S)}function h(S){return r++,n.push([t.currentConstruct,t.containerState]),m(S)}function y(S){if(S===null){i&&b(),_(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),v(S)}function v(S){if(S===null){w(e.exit("chunkFlow"),!0),_(0),e.consume(S);return}return ht(S)?(e.consume(S),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(S),v)}function w(S,A){const E=t.sliceStream(S);if(A&&E.push(null),S.previous=o,o&&(o.next=S),o=S,i.defineSkip(S.start),i.write(E),t.parser.lazy[S.start.line]){let T=i.events.length;for(;T--;)if(i.events[T][1].start.offset<a&&(!i.events[T][1].end||i.events[T][1].end.offset>a))return;const N=t.events.length;let L=N,F,j;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(F){j=t.events[L][1].end;break}F=!0}for(_(r),T=N;T<t.events.length;)t.events[T][1].end=Object.assign({},j),T++;ai(t.events,L+1,0,t.events.slice(N)),t.events.length=T}}function _(S){let A=n.length;for(;A-- >S;){const E=n[A];t.containerState=E[1],E[0].exit.call(t,e)}n.length=S}function b(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Hie(e,t,n){return en(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Gp(e){if(e===null||gn(e)||bs(e))return 1;if(Kp(e))return 2}function Yp(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const vb={name:"attention",tokenize:Vie,resolveAll:Wie};function Wie(e,t){let n=-1,r,i,o,a,s,l,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p=Object.assign({},e[r][1].end),m=Object.assign({},e[n][1].start);uk(p,-l),uk(m,l),a={type:l>1?"strongSequence":"emphasisSequence",start:p,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:m},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=wi(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=wi(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),c=wi(c,Yp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=wi(c,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=wi(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,ai(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Vie(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Gp(r);let o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const c=e.exit("attentionSequence"),d=Gp(l),p=!d||d===2&&i||n.includes(l),m=!i||i===2&&d||n.includes(r);return c._open=!!(o===42?p:p&&(i||!m)),c._close=!!(o===42?m:m&&(d||!p)),t(l)}}function uk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Kie={name:"autolink",tokenize:Gie};function Gie(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return Nr(h)?(e.consume(h),a):c(h)}function a(h){return h===43||h===45||h===46||wr(h)?(r=1,s(h)):c(h)}function s(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||wr(h))&&r++<32?(e.consume(h),s):(r=0,c(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Vp(h)?n(h):(e.consume(h),l)}function c(h){return h===64?(e.consume(h),d):Lie(h)?(e.consume(h),c):n(h)}function d(h){return wr(h)?p(h):n(h)}function p(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):m(h)}function m(h){if((h===45||wr(h))&&r++<63){const y=h===45?m:p;return e.consume(h),y}return n(h)}}const Oc={tokenize:Yie,partial:!0};function Yie(e,t,n){return r;function r(o){return Ht(o)?en(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||ht(o)?t(o):n(o)}}const lk={name:"blockQuote",tokenize:Jie,continuation:{tokenize:Xie},exit:Qie};function Jie(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return Ht(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Xie(e,t,n){const r=this;return i;function i(a){return Ht(a)?en(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(lk,t,n)(a)}}function Qie(e){e.exit("blockQuote")}const ck={name:"characterEscape",tokenize:eoe};function eoe(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return qie(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const fk={name:"characterReference",tokenize:toe};function toe(e,t,n){const r=this;let i=0,o,a;return s;function s(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),l}function l(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,a=wr,d(p))}function c(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=Fie,d):(e.enter("characterReferenceValue"),o=7,a=gb,d(p))}function d(p){if(p===59&&i){const m=e.exit("characterReferenceValue");return a===wr&&!yb(r.sliceSerialize(m))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&i++<o?(e.consume(p),d):n(p)}}const dk={tokenize:roe,partial:!0},pk={name:"codeFenced",tokenize:noe,concrete:!0};function noe(e,t,n){const r=this,i={tokenize:E,partial:!0};let o=0,a=0,s;return l;function l(T){return c(T)}function c(T){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,s=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(T)}function d(T){return T===s?(a++,e.consume(T),d):a<3?n(T):(e.exit("codeFencedFenceSequence"),Ht(T)?en(e,p,"whitespace")(T):p(T))}function p(T){return T===null||ht(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(dk,v,A)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(T))}function m(T){return T===null||ht(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(T)):Ht(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),en(e,h,"whitespace")(T)):T===96&&T===s?n(T):(e.consume(T),m)}function h(T){return T===null||ht(T)?p(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(T))}function y(T){return T===null||ht(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(T)):T===96&&T===s?n(T):(e.consume(T),y)}function v(T){return e.attempt(i,A,w)(T)}function w(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),_}function _(T){return o>0&&Ht(T)?en(e,b,"linePrefix",o+1)(T):b(T)}function b(T){return T===null||ht(T)?e.check(dk,v,A)(T):(e.enter("codeFlowValue"),S(T))}function S(T){return T===null||ht(T)?(e.exit("codeFlowValue"),b(T)):(e.consume(T),S)}function A(T){return e.exit("codeFenced"),t(T)}function E(T,N,L){let F=0;return j;function j(V){return T.enter("lineEnding"),T.consume(V),T.exit("lineEnding"),H}function H(V){return T.enter("codeFencedFence"),Ht(V)?en(T,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):re(V)}function re(V){return V===s?(T.enter("codeFencedFenceSequence"),Q(V)):L(V)}function Q(V){return V===s?(F++,T.consume(V),Q):F>=a?(T.exit("codeFencedFenceSequence"),Ht(V)?en(T,G,"whitespace")(V):G(V)):L(V)}function G(V){return V===null||ht(V)?(T.exit("codeFencedFence"),N(V)):L(V)}}}function roe(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const bb={name:"codeIndented",tokenize:ooe},ioe={tokenize:aoe,partial:!0};function ooe(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),en(e,o,"linePrefix",4+1)(c)}function o(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):ht(c)?e.attempt(ioe,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||ht(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function aoe(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):ht(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):en(e,o,"linePrefix",4+1)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):ht(a)?i(a):n(a)}}const soe={name:"codeText",tokenize:coe,resolve:uoe,previous:loe};function uoe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function loe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function coe(e,t,n){let r=0,i,o;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),s(p)}function s(p){return p===96?(e.consume(p),r++,s):(e.exit("codeTextSequence"),l(p))}function l(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),l):p===96?(o=e.enter("codeTextSequence"),i=0,d(p)):ht(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(p))}function c(p){return p===null||p===32||p===96||ht(p)?(e.exit("codeTextData"),l(p)):(e.consume(p),c)}function d(p){return p===96?(e.consume(p),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(o.type="codeTextData",c(p))}}function hk(e){const t={};let n=-1,r,i,o,a,s,l,c;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,foe(e,n)),n=t[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=e[o],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},e[i][1].start),s=e.slice(i,n),s.unshift(r),ai(e,i,n-i+1,s))}}return!c}function foe(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let d,p,m=-1,h=n,y=0,v=0;const w=[v];for(;h;){for(;e[++i][1]!==h;);o.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),p&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=h,h=h.next}for(h=n;++m<s.length;)s[m][0]==="exit"&&s[m-1][0]==="enter"&&s[m][1].type===s[m-1][1].type&&s[m][1].start.line!==s[m][1].end.line&&(v=m+1,w.push(v),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):w.pop(),m=w.length;m--;){const _=s.slice(w[m],w[m+1]),b=o.pop();l.unshift([b,b+_.length-1]),ai(e,b,2,_)}for(m=-1;++m<l.length;)c[y+l[m][0]]=y+l[m][1],y+=l[m][1]-l[m][0]-1;return c}const doe={tokenize:moe,resolve:hoe},poe={tokenize:yoe,partial:!0};function hoe(e){return hk(e),e}function moe(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):ht(s)?e.check(poe,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function yoe(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),en(e,o,"linePrefix")}function o(a){if(a===null||ht(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function mk(e,t,n,r,i,o,a,s,l){const c=l||Number.POSITIVE_INFINITY;let d=0;return p;function p(_){return _===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(_),e.exit(o),m):_===null||_===32||_===41||Vp(_)?n(_):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),v(_))}function m(_){return _===62?(e.enter(o),e.consume(_),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(_))}function h(_){return _===62?(e.exit("chunkString"),e.exit(s),m(_)):_===null||_===60||ht(_)?n(_):(e.consume(_),_===92?y:h)}function y(_){return _===60||_===62||_===92?(e.consume(_),h):h(_)}function v(_){return!d&&(_===null||_===41||gn(_))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(_)):d<c&&_===40?(e.consume(_),d++,v):_===41?(e.consume(_),d--,v):_===null||_===32||_===40||Vp(_)?n(_):(e.consume(_),_===92?w:v)}function w(_){return _===40||_===41||_===92?(e.consume(_),v):v(_)}}function yk(e,t,n,r,i,o){const a=this;let s=0,l;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),d}function d(h){return s>999||h===null||h===91||h===93&&!l||h===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):ht(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===null||h===91||h===93||ht(h)||s++>999?(e.exit("chunkString"),d(h)):(e.consume(h),l||(l=!Ht(h)),h===92?m:p)}function m(h){return h===91||h===92||h===93?(e.consume(h),s++,p):p(h)}}function gk(e,t,n,r,i,o){let a;return s;function s(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,l):n(m)}function l(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(o),c(m))}function c(m){return m===a?(e.exit(o),l(a)):m===null?n(m):ht(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),en(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===a||m===null||ht(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?p:d)}function p(m){return m===a||m===92?(e.consume(m),d):d(m)}}function Tc(e,t){let n;return r;function r(i){return ht(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ht(i)?en(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const goe={name:"definition",tokenize:boe},voe={tokenize:_oe,partial:!0};function boe(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),a(h)}function a(h){return yk.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=Li(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return gn(h)?Tc(e,c)(h):c(h)}function c(h){return mk(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(voe,p,p)(h)}function p(h){return Ht(h)?en(e,m,"whitespace")(h):m(h)}function m(h){return h===null||ht(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function _oe(e,t,n){return r;function r(s){return gn(s)?Tc(e,i)(s):n(s)}function i(s){return gk(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Ht(s)?en(e,a,"whitespace")(s):a(s)}function a(s){return s===null||ht(s)?t(s):n(s)}}const woe={name:"hardBreakEscape",tokenize:xoe};function xoe(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ht(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Soe={name:"headingAtx",tokenize:Aoe,resolve:Eoe};function Eoe(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ai(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Aoe(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||gn(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||ht(d)?(e.exit("atxHeading"),t(d)):Ht(d)?en(e,s,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function l(d){return d===35?(e.consume(d),l):(e.exit("atxHeadingSequence"),s(d))}function c(d){return d===null||d===35||gn(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),c)}}const Coe=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],vk=["pre","script","style","textarea"],Ooe={name:"htmlFlow",tokenize:Ioe,resolveTo:koe,concrete:!0},Toe={tokenize:Roe,partial:!0},$oe={tokenize:Poe,partial:!0};function koe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ioe(e,t,n){const r=this;let i,o,a,s,l;return c;function c(M){return d(M)}function d(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),p}function p(M){return M===33?(e.consume(M),m):M===47?(e.consume(M),o=!0,v):M===63?(e.consume(M),i=3,r.interrupt?t:P):Nr(M)?(e.consume(M),a=String.fromCharCode(M),w):n(M)}function m(M){return M===45?(e.consume(M),i=2,h):M===91?(e.consume(M),i=5,s=0,y):Nr(M)?(e.consume(M),i=4,r.interrupt?t:P):n(M)}function h(M){return M===45?(e.consume(M),r.interrupt?t:P):n(M)}function y(M){const Ne="CDATA[";return M===Ne.charCodeAt(s++)?(e.consume(M),s===Ne.length?r.interrupt?t:re:y):n(M)}function v(M){return Nr(M)?(e.consume(M),a=String.fromCharCode(M),w):n(M)}function w(M){if(M===null||M===47||M===62||gn(M)){const Ne=M===47,qe=a.toLowerCase();return!Ne&&!o&&vk.includes(qe)?(i=1,r.interrupt?t(M):re(M)):Coe.includes(a.toLowerCase())?(i=6,Ne?(e.consume(M),_):r.interrupt?t(M):re(M)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(M):o?b(M):S(M))}return M===45||wr(M)?(e.consume(M),a+=String.fromCharCode(M),w):n(M)}function _(M){return M===62?(e.consume(M),r.interrupt?t:re):n(M)}function b(M){return Ht(M)?(e.consume(M),b):j(M)}function S(M){return M===47?(e.consume(M),j):M===58||M===95||Nr(M)?(e.consume(M),A):Ht(M)?(e.consume(M),S):j(M)}function A(M){return M===45||M===46||M===58||M===95||wr(M)?(e.consume(M),A):E(M)}function E(M){return M===61?(e.consume(M),T):Ht(M)?(e.consume(M),E):S(M)}function T(M){return M===null||M===60||M===61||M===62||M===96?n(M):M===34||M===39?(e.consume(M),l=M,N):Ht(M)?(e.consume(M),T):L(M)}function N(M){return M===l?(e.consume(M),l=null,F):M===null||ht(M)?n(M):(e.consume(M),N)}function L(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||gn(M)?E(M):(e.consume(M),L)}function F(M){return M===47||M===62||Ht(M)?S(M):n(M)}function j(M){return M===62?(e.consume(M),H):n(M)}function H(M){return M===null||ht(M)?re(M):Ht(M)?(e.consume(M),H):n(M)}function re(M){return M===45&&i===2?(e.consume(M),q):M===60&&i===1?(e.consume(M),Y):M===62&&i===4?(e.consume(M),ue):M===63&&i===3?(e.consume(M),P):M===93&&i===5?(e.consume(M),ce):ht(M)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Toe,Oe,Q)(M)):M===null||ht(M)?(e.exit("htmlFlowData"),Q(M)):(e.consume(M),re)}function Q(M){return e.check($oe,G,Oe)(M)}function G(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),V}function V(M){return M===null||ht(M)?Q(M):(e.enter("htmlFlowData"),re(M))}function q(M){return M===45?(e.consume(M),P):re(M)}function Y(M){return M===47?(e.consume(M),a="",ne):re(M)}function ne(M){if(M===62){const Ne=a.toLowerCase();return vk.includes(Ne)?(e.consume(M),ue):re(M)}return Nr(M)&&a.length<8?(e.consume(M),a+=String.fromCharCode(M),ne):re(M)}function ce(M){return M===93?(e.consume(M),P):re(M)}function P(M){return M===62?(e.consume(M),ue):M===45&&i===2?(e.consume(M),P):re(M)}function ue(M){return M===null||ht(M)?(e.exit("htmlFlowData"),Oe(M)):(e.consume(M),ue)}function Oe(M){return e.exit("htmlFlow"),t(M)}}function Poe(e,t,n){const r=this;return i;function i(a){return ht(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Roe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Oc,t,n)}}const Doe={name:"htmlText",tokenize:Noe};function Noe(e,t,n){const r=this;let i,o,a;return s;function s(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),l}function l(P){return P===33?(e.consume(P),c):P===47?(e.consume(P),E):P===63?(e.consume(P),S):Nr(P)?(e.consume(P),L):n(P)}function c(P){return P===45?(e.consume(P),d):P===91?(e.consume(P),o=0,y):Nr(P)?(e.consume(P),b):n(P)}function d(P){return P===45?(e.consume(P),h):n(P)}function p(P){return P===null?n(P):P===45?(e.consume(P),m):ht(P)?(a=p,Y(P)):(e.consume(P),p)}function m(P){return P===45?(e.consume(P),h):p(P)}function h(P){return P===62?q(P):P===45?m(P):p(P)}function y(P){const ue="CDATA[";return P===ue.charCodeAt(o++)?(e.consume(P),o===ue.length?v:y):n(P)}function v(P){return P===null?n(P):P===93?(e.consume(P),w):ht(P)?(a=v,Y(P)):(e.consume(P),v)}function w(P){return P===93?(e.consume(P),_):v(P)}function _(P){return P===62?q(P):P===93?(e.consume(P),_):v(P)}function b(P){return P===null||P===62?q(P):ht(P)?(a=b,Y(P)):(e.consume(P),b)}function S(P){return P===null?n(P):P===63?(e.consume(P),A):ht(P)?(a=S,Y(P)):(e.consume(P),S)}function A(P){return P===62?q(P):S(P)}function E(P){return Nr(P)?(e.consume(P),T):n(P)}function T(P){return P===45||wr(P)?(e.consume(P),T):N(P)}function N(P){return ht(P)?(a=N,Y(P)):Ht(P)?(e.consume(P),N):q(P)}function L(P){return P===45||wr(P)?(e.consume(P),L):P===47||P===62||gn(P)?F(P):n(P)}function F(P){return P===47?(e.consume(P),q):P===58||P===95||Nr(P)?(e.consume(P),j):ht(P)?(a=F,Y(P)):Ht(P)?(e.consume(P),F):q(P)}function j(P){return P===45||P===46||P===58||P===95||wr(P)?(e.consume(P),j):H(P)}function H(P){return P===61?(e.consume(P),re):ht(P)?(a=H,Y(P)):Ht(P)?(e.consume(P),H):F(P)}function re(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),i=P,Q):ht(P)?(a=re,Y(P)):Ht(P)?(e.consume(P),re):(e.consume(P),G)}function Q(P){return P===i?(e.consume(P),i=void 0,V):P===null?n(P):ht(P)?(a=Q,Y(P)):(e.consume(P),Q)}function G(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||gn(P)?F(P):(e.consume(P),G)}function V(P){return P===47||P===62||gn(P)?F(P):n(P)}function q(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function Y(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),ne}function ne(P){return Ht(P)?en(e,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):ce(P)}function ce(P){return e.enter("htmlTextData"),a(P)}}const _b={name:"labelEnd",tokenize:Uoe,resolveTo:qoe,resolveAll:Foe},Moe={tokenize:Boe},joe={tokenize:zoe},Loe={tokenize:Zoe};function Foe(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function qoe(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},d={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",l,t],["enter",c,t]],s=wi(s,e.slice(o+1,o+r+3)),s=wi(s,[["enter",d,t]]),s=wi(s,Yp(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=wi(s,[["exit",d,t],e[a-2],e[a-1],["exit",c,t]]),s=wi(s,e.slice(a+1)),s=wi(s,[["exit",l,t]]),ai(e,o,e.length,s),e}function Uoe(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(m){return o?o._inactive?p(m):(a=r.parser.defined.includes(Li(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),l):n(m)}function l(m){return m===40?e.attempt(Moe,d,a?d:p)(m):m===91?e.attempt(joe,d,a?c:p)(m):a?d(m):p(m)}function c(m){return e.attempt(Loe,d,p)(m)}function d(m){return t(m)}function p(m){return o._balanced=!0,n(m)}}function Boe(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return gn(p)?Tc(e,o)(p):o(p)}function o(p){return p===41?d(p):mk(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return gn(p)?Tc(e,l)(p):d(p)}function s(p){return n(p)}function l(p){return p===34||p===39||p===40?gk(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function c(p){return gn(p)?Tc(e,d)(p):d(p)}function d(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function zoe(e,t,n){const r=this;return i;function i(s){return yk.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Li(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function Zoe(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Hoe={name:"labelStartImage",tokenize:Woe,resolveAll:_b.resolveAll};function Woe(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Voe={name:"labelStartLink",tokenize:Koe,resolveAll:_b.resolveAll};function Koe(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const wb={name:"lineEnding",tokenize:Goe};function Goe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),en(e,t,"linePrefix")}}const Jp={name:"thematicBreak",tokenize:Yoe};function Yoe(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||ht(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),Ht(c)?en(e,s,"whitespace")(c):s(c))}}const Hr={name:"list",tokenize:Qoe,continuation:{tokenize:eae},exit:nae},Joe={tokenize:rae,partial:!0},Xoe={tokenize:tae,partial:!0};function Qoe(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(h){const y=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:gb(h)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Jp,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return gb(h)&&++a<10?(e.consume(h),l):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Oc,r.interrupt?n:d,e.attempt(Joe,m,p))}function d(h){return r.containerState.initialBlankLine=!0,o++,m(h)}function p(h){return Ht(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),m):n(h)}function m(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function eae(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Oc,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,en(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!Ht(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Xoe,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,en(e,e.attempt(Hr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function tae(e,t,n){const r=this;return en(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function nae(e){e.exit(this.containerState.type)}function rae(e,t,n){const r=this;return en(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){const a=r.events[r.events.length-1];return!Ht(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const bk={name:"setextUnderline",tokenize:oae,resolveTo:iae};function iae(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function oae(e,t,n){const r=this;let i;return o;function o(c){let d=r.events.length,p;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){p=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),Ht(c)?en(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||ht(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const aae={tokenize:sae};function sae(e){const t=this,n=e.attempt(Oc,r,e.attempt(this.parser.constructs.flowInitial,i,en(e,e.attempt(this.parser.constructs.flow,i,e.attempt(doe,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const uae={resolveAll:wk()},lae=_k("string"),cae=_k("text");function _k(e){return{tokenize:t,resolveAll:wk(e==="text"?fae:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(d){return c(d)?o(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return c(d)?(n.exit("data"),o(d)):(n.consume(d),l)}function c(d){if(d===null)return!0;const p=i[d];let m=-1;if(p)for(;++m<p.length;){const h=p[m];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function wk(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function fae(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const c=i[o];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){o++;break}}if(s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function dae(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const l={consume:b,enter:S,exit:A,attempt:N(E),check:N(T),interrupt:N(T,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:m,now:y,defineSkip:v,write:p};let d=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function p(H){return a=wi(a,H),w(),a[a.length-1]!==null?[]:(L(t,0),c.events=Yp(o,c.events,c),c.events)}function m(H,re){return hae(h(H),re)}function h(H){return pae(a,H)}function y(){const{line:H,column:re,offset:Q,_index:G,_bufferIndex:V}=r;return{line:H,column:re,offset:Q,_index:G,_bufferIndex:V}}function v(H){i[H.line]=H.column,j()}function w(){let H;for(;r._index<a.length;){const re=a[r._index];if(typeof re=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<re.length;)_(re.charCodeAt(r._bufferIndex));else _(re)}}function _(H){d=d(H)}function b(H){ht(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,j()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=H}function S(H,re){const Q=re||{};return Q.type=H,Q.start=y(),c.events.push(["enter",Q,c]),s.push(Q),Q}function A(H){const re=s.pop();return re.end=y(),c.events.push(["exit",re,c]),re}function E(H,re){L(H,re.from)}function T(H,re){re.restore()}function N(H,re){return Q;function Q(G,V,q){let Y,ne,ce,P;return Array.isArray(G)?Oe(G):"tokenize"in G?Oe([G]):ue(G);function ue(Me){return Je;function Je(rt){const Ke=rt!==null&&Me[rt],Pe=rt!==null&&Me.null,Ae=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return Oe(Ae)(rt)}}function Oe(Me){return Y=Me,ne=0,Me.length===0?q:M(Me[ne])}function M(Me){return Je;function Je(rt){return P=F(),ce=Me,Me.partial||(c.currentConstruct=Me),Me.name&&c.parser.constructs.disable.null.includes(Me.name)?qe():Me.tokenize.call(re?Object.assign(Object.create(c),re):c,l,Ne,qe)(rt)}}function Ne(Me){return H(ce,P),V}function qe(Me){return P.restore(),++ne<Y.length?M(Y[ne]):q}}}function L(H,re){H.resolveAll&&!o.includes(H)&&o.push(H),H.resolve&&ai(c.events,re,c.events.length-re,H.resolve(c.events.slice(re),c)),H.resolveTo&&(c.events=H.resolveTo(c.events,c))}function F(){const H=y(),re=c.previous,Q=c.currentConstruct,G=c.events.length,V=Array.from(s);return{restore:q,from:G};function q(){r=H,c.previous=re,c.currentConstruct=Q,c.events.length=G,s=V,j()}}function j(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function pae(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function hae(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
162
|
+
Check the top-level render call using <`+ze+">.")}return Ce}}function We(Z,Ce){{if(!Z._store||Z._store.validated||Z.key!=null)return;Z._store.validated=!0;var ze=Re(Ce);if(Xe[ze])return;Xe[ze]=!0;var yt="";Z&&Z._owner&&Z._owner!==on.current&&(yt=" It was passed a child from "+Q(Z._owner.type)+"."),Mn(Z),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ze,yt),Mn(null)}}function _t(Z,Ce){{if(typeof Z!="object")return;if(ot(Z))for(var ze=0;ze<Z.length;ze++){var yt=Z[ze];D(yt)&&We(yt,Ce)}else if(D(Z))Z._store&&(Z._store.validated=!0);else if(Z){var Gt=w(Z);if(typeof Gt=="function"&&Gt!==Z.entries)for(var un=Gt.call(Z),qt;!(qt=un.next()).done;)D(qt.value)&&We(qt.value,Ce)}}}function Pt(Z){{var Ce=Z.type;if(Ce==null||typeof Ce=="string")return;var ze;if(typeof Ce=="function")ze=Ce.propTypes;else if(typeof Ce=="object"&&(Ce.$$typeof===l||Ce.$$typeof===p))ze=Ce.propTypes;else return;if(ze){var yt=Q(Ce);et(ze,Z.props,"prop",yt,Z)}else if(Ce.PropTypes!==void 0&&!sr){sr=!0;var Gt=Q(Ce);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Gt||"Unknown")}typeof Ce.getDefaultProps=="function"&&!Ce.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xt(Z){{for(var Ce=Object.keys(Z.props),ze=0;ze<Ce.length;ze++){var yt=Ce[ze];if(yt!=="children"&&yt!=="key"){Mn(Z),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",yt),Mn(null);break}}Z.ref!==null&&(Mn(Z),b("Invalid attribute `ref` supplied to `React.Fragment`."),Mn(null))}}function bn(Z,Ce,ze,yt,Gt,un){{var qt=M(Z);if(!qt){var Tt="";(Z===void 0||typeof Z=="object"&&Z!==null&&Object.keys(Z).length===0)&&(Tt+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var jn=He(Gt);jn?Tt+=jn:Tt+=je();var On;Z===null?On="null":ot(Z)?On="array":Z!==void 0&&Z.$$typeof===t?(On="<"+(Q(Z.type)||"Unknown")+" />",Tt=" Did you accidentally export a JSX literal instead of a component?"):On=typeof Z,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",On,Tt)}var Tn=At(Z,Ce,ze,Gt,un);if(Tn==null)return Tn;if(qt){var Xr=Ce.children;if(Xr!==void 0)if(yt)if(ot(Xr)){for(var Wi=0;Wi<Xr.length;Wi++)_t(Xr[Wi],Z);Object.freeze&&Object.freeze(Xr)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _t(Xr,Z)}return Z===r?Xt(Tn):Pt(Tn),Tn}}function Rn(Z,Ce,ze){return bn(Z,Ce,ze,!0)}function mr(Z,Ce,ze){return bn(Z,Ce,ze,!1)}var ta=mr,Sl=Rn;Sc.Fragment=r,Sc.jsx=ta,Sc.jsxs=Sl}()),Sc}process.env.NODE_ENV==="production"?Qv.exports=vre():Qv.exports=bre();var X=Qv.exports;function Zt(){return Zt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zt.apply(this,arguments)}function Wp(e,t=[]){let n=[];function r(o,a){const s=C.createContext(a),l=n.length;n=[...n,a];function c(p){const{scope:m,children:h,...y}=p,v=(m==null?void 0:m[e][l])||s,w=C.useMemo(()=>y,Object.values(y));return C.createElement(v.Provider,{value:w},h)}function d(p,m){const h=(m==null?void 0:m[e][l])||s,y=C.useContext(h);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,d]}const i=()=>{const o=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return C.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,_re(i,...t)]}function _re(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const p=l(o)[`__scope${c}`];return{...s,...p}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Dr(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const $u=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{};function ys(){return ys=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},ys.apply(null,arguments)}function wre(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function x$(...e){return t=>e.forEach(n=>wre(n,t))}function ii(...e){return C.useCallback(x$(...e),e)}const eb=C.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.Children.toArray(n),o=i.find(Sre);if(o){const a=o.props.children,s=i.map(l=>l===o?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return C.createElement(tb,ys({},r,{ref:t}),C.isValidElement(a)?C.cloneElement(a,void 0,s):null)}return C.createElement(tb,ys({},r,{ref:t}),n)});eb.displayName="Slot";const tb=C.forwardRef((e,t)=>{const{children:n,...r}=e;return C.isValidElement(n)?C.cloneElement(n,{...Ere(r,n.props),ref:t?x$(t,n.ref):n.ref}):C.Children.count(n)>1?C.Children.only(null):null});tb.displayName="SlotClone";const xre=({children:e})=>C.createElement(C.Fragment,null,e);function Sre(e){return C.isValidElement(e)&&e.type===xre}function Ere(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const dr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=C.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?eb:t;return C.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.createElement(s,ys({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Are(e,t){e&&Xi.flushSync(()=>e.dispatchEvent(t))}const S$="Avatar",[Cre,u2e]=Wp(S$),[Ore,E$]=Cre(S$),A$=C.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=C.useState("idle");return C.createElement(Ore,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o},C.createElement(dr.span,Zt({},r,{ref:t})))}),Tre="AvatarImage",C$=C.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=E$(Tre,n),s=kre(r),l=Dr(c=>{i(c),a.onImageLoadingStatusChange(c)});return $u(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?C.createElement(dr.img,Zt({},o,{ref:t,src:r})):null}),$re="AvatarFallback",O$=C.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=E$($re,n),[a,s]=C.useState(r===void 0);return C.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&o.imageLoadingStatus!=="loaded"?C.createElement(dr.span,Zt({},i,{ref:t})):null});function kre(e){const[t,n]=C.useState("idle");return C.useEffect(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,o=a=>()=>{r&&n(a)};return n("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=e,()=>{r=!1}},[e]),t}let nb=class{constructor(){R(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var i;(i=this.eventMap[t])==null||i.delete(n)}}emit(t,n){var r,i;(r=this.eventMap[t])==null||r.forEach(o=>{o(n)}),(i=this.eventMap["*"])==null||i.forEach(o=>{o({type:t,payload:n})})}};const Ire=new nb;function T$(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}const rb=C.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...o},a)=>{const s=T$(e??"",15);return X.jsxs(A$,{ref:a,"data-color":s,...n,...o,children:[X.jsx(C$,{src:t,...r}),X.jsx(O$,{...i,children:typeof o.children=="string"?o.children[0]:o.children})]})});function l2e(){}function c2e(){}function Pre(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Rre=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dre=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nre={};function $$(e,t){return((t||Nre).jsx?Dre:Rre).test(e)}const Mre=/[ \t\n\f\r]/g;function jre(e){return typeof e=="object"?e.type==="text"?k$(e.value):!1:k$(e)}function k$(e){return e.replace(Mre,"")===""}let Ec=class{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}};Ec.prototype.property={},Ec.prototype.normal={},Ec.prototype.space=null;function I$(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Ec(n,r,t)}function ib(e){return e.toLowerCase()}class _i{constructor(t,n){this.property=t,this.attribute=n}}_i.prototype.space=null,_i.prototype.boolean=!1,_i.prototype.booleanish=!1,_i.prototype.overloadedBoolean=!1,_i.prototype.number=!1,_i.prototype.commaSeparated=!1,_i.prototype.spaceSeparated=!1,_i.prototype.commaOrSpaceSeparated=!1,_i.prototype.mustUseProperty=!1,_i.prototype.defined=!1;let Lre=0;const jt=gs(),Wn=gs(),P$=gs(),ke=gs(),An=gs(),ku=gs(),oi=gs();function gs(){return 2**++Lre}const ob=Object.freeze(Object.defineProperty({__proto__:null,boolean:jt,booleanish:Wn,commaOrSpaceSeparated:oi,commaSeparated:ku,number:ke,overloadedBoolean:P$,spaceSeparated:An},Symbol.toStringTag,{value:"Module"})),ab=Object.keys(ob);class sb extends _i{constructor(t,n,r,i){let o=-1;if(super(t,n),R$(this,"space",i),typeof r=="number")for(;++o<ab.length;){const a=ab[o];R$(this,ab[o],(r&ob[a])===ob[a])}}}sb.prototype.defined=!0;function R$(e,t,n){n&&(e[t]=n)}const Fre={}.hasOwnProperty;function Iu(e){const t={},n={};let r;for(r in e.properties)if(Fre.call(e.properties,r)){const i=e.properties[r],o=new sb(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ib(r)]=r,n[ib(o.attribute)]=r}return new Ec(t,n,e.space)}const D$=Iu({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),N$=Iu({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function M$(e,t){return t in e?e[t]:t}function j$(e,t){return M$(e,t.toLowerCase())}const L$=Iu({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:j$,properties:{xmlns:null,xmlnsXLink:null}}),F$=Iu({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Wn,ariaAutoComplete:null,ariaBusy:Wn,ariaChecked:Wn,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:An,ariaCurrent:null,ariaDescribedBy:An,ariaDetails:null,ariaDisabled:Wn,ariaDropEffect:An,ariaErrorMessage:null,ariaExpanded:Wn,ariaFlowTo:An,ariaGrabbed:Wn,ariaHasPopup:null,ariaHidden:Wn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:An,ariaLevel:ke,ariaLive:null,ariaModal:Wn,ariaMultiLine:Wn,ariaMultiSelectable:Wn,ariaOrientation:null,ariaOwns:An,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:Wn,ariaReadOnly:Wn,ariaRelevant:null,ariaRequired:Wn,ariaRoleDescription:An,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:Wn,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null}}),qre=Iu({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:j$,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ku,acceptCharset:An,accessKey:An,action:null,allow:null,allowFullScreen:jt,allowPaymentRequest:jt,allowUserMedia:jt,alt:null,as:null,async:jt,autoCapitalize:null,autoComplete:An,autoFocus:jt,autoPlay:jt,capture:jt,charSet:null,checked:jt,cite:null,className:An,cols:ke,colSpan:null,content:null,contentEditable:Wn,controls:jt,controlsList:An,coords:ke|ku,crossOrigin:null,data:null,dateTime:null,decoding:null,default:jt,defer:jt,dir:null,dirName:null,disabled:jt,download:P$,draggable:Wn,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:jt,formTarget:null,headers:An,height:ke,hidden:jt,high:ke,href:null,hrefLang:null,htmlFor:An,httpEquiv:An,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:jt,itemId:null,itemProp:An,itemRef:An,itemScope:jt,itemType:An,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:jt,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:jt,muted:jt,name:null,nonce:null,noModule:jt,noValidate:jt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:jt,optimum:ke,pattern:null,ping:An,placeholder:null,playsInline:jt,poster:null,preload:null,readOnly:jt,referrerPolicy:null,rel:An,required:jt,reversed:jt,rows:ke,rowSpan:ke,sandbox:An,scope:null,scoped:jt,seamless:jt,selected:jt,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:Wn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ke,step:null,style:null,tabIndex:ke,target:null,title:null,translate:null,type:null,typeMustMatch:jt,useMap:null,value:Wn,width:ke,wrap:null,align:null,aLink:null,archive:An,axis:null,background:null,bgColor:null,border:ke,borderColor:null,bottomMargin:ke,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:jt,declare:jt,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:jt,noHref:jt,noShade:jt,noWrap:jt,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:Wn,standby:null,summary:null,text:null,topMargin:ke,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ke,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:jt,disableRemotePlayback:jt,prefix:null,property:null,results:ke,security:null,unselectable:null}}),Ure=Iu({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:M$,properties:{about:oi,accentHeight:ke,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ke,amplitude:ke,arabicForm:null,ascent:ke,attributeName:null,attributeType:null,azimuth:ke,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ke,by:null,calcMode:null,capHeight:ke,className:An,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ke,diffuseConstant:ke,direction:null,display:null,dur:null,divisor:ke,dominantBaseline:null,download:jt,dx:null,dy:null,edgeMode:null,editable:null,elevation:ke,enableBackground:null,end:null,event:null,exponent:ke,externalResourcesRequired:null,fill:null,fillOpacity:ke,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ku,g2:ku,glyphName:ku,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ke,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ke,horizOriginX:ke,horizOriginY:ke,id:null,ideographic:ke,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ke,k:ke,k1:ke,k2:ke,k3:ke,k4:ke,kernelMatrix:oi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ke,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ke,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ke,overlineThickness:ke,paintOrder:null,panose1:null,path:null,pathLength:ke,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:An,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ke,pointsAtY:ke,pointsAtZ:ke,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oi,rev:oi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oi,requiredFeatures:oi,requiredFonts:oi,requiredFormats:oi,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ke,specularExponent:ke,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ke,strikethroughThickness:ke,string:null,stroke:null,strokeDashArray:oi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ke,strokeOpacity:ke,strokeWidth:null,style:null,surfaceScale:ke,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oi,tabIndex:ke,tableValues:null,target:null,targetX:ke,targetY:ke,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oi,to:null,transform:null,u1:null,u2:null,underlinePosition:ke,underlineThickness:ke,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ke,values:null,vAlphabetic:ke,vMathematical:ke,vectorEffect:null,vHanging:ke,vIdeographic:ke,version:null,vertAdvY:ke,vertOriginX:ke,vertOriginY:ke,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ke,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Bre=/^data[-\w.:]+$/i,q$=/-[a-z]/g,zre=/[A-Z]/g;function Zre(e,t){const n=ib(t);let r=t,i=_i;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Bre.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(q$,Wre);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!q$.test(o)){let a=o.replace(zre,Hre);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=sb}return new i(r,t)}function Hre(e){return"-"+e.toLowerCase()}function Wre(e){return e.charAt(1).toUpperCase()}const Vre={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Kre=I$([N$,D$,L$,F$,qre],"html"),ub=I$([N$,D$,L$,F$,Ure],"svg");function Gre(e){return e.join(" ").trim()}var U$={},B$=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Yre=/\n/g,Jre=/^\s*/,Xre=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Qre=/^:\s*/,eie=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,tie=/^[;\s]*/,nie=/^\s+|\s+$/g,rie=`
|
|
163
|
+
`,z$="/",Z$="*",vs="",iie="comment",oie="declaration",aie=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var v=y.match(Yre);v&&(n+=v.length);var w=y.lastIndexOf(rie);r=~w?y.length-w:r+y.length}function o(){var y={line:n,column:r};return function(v){return v.position=new a(y),c(),v}}function a(y){this.start=y,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(y){var v=new Error(t.source+":"+n+":"+r+": "+y);if(v.reason=y,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function l(y){var v=y.exec(e);if(v){var w=v[0];return i(w),e=e.slice(w.length),v}}function c(){l(Jre)}function d(y){var v;for(y=y||[];v=p();)v!==!1&&y.push(v);return y}function p(){var y=o();if(!(z$!=e.charAt(0)||Z$!=e.charAt(1))){for(var v=2;vs!=e.charAt(v)&&(Z$!=e.charAt(v)||z$!=e.charAt(v+1));)++v;if(v+=2,vs===e.charAt(v-1))return s("End of comment missing");var w=e.slice(2,v-2);return r+=2,i(w),e=e.slice(v),r+=2,y({type:iie,comment:w})}}function m(){var y=o(),v=l(Xre);if(v){if(p(),!l(Qre))return s("property missing ':'");var w=l(eie),_=y({type:oie,property:H$(v[0].replace(B$,vs)),value:w?H$(w[0].replace(B$,vs)):vs});return l(tie),_}}function h(){var y=[];d(y);for(var v;v=m();)v!==!1&&(y.push(v),d(y));return y}return c(),h()};function H$(e){return e?e.replace(nie,vs):vs}var sie=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(U$,"__esModule",{value:!0});var uie=sie(aie);function lie(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,uie.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var a=o.property,s=o.value;i?t(a,s,o):s&&(n=n||{},n[a]=s)}}),n}var W$=U$.default=lie;const cie=W$.default||W$,V$=K$("end"),lb=K$("start");function K$(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function fie(e){const t=lb(e),n=V$(e);if(t&&n)return{start:t,end:n}}function Ac(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?G$(e.position):"start"in e||"end"in e?G$(e):"line"in e||"column"in e?cb(e):""}function cb(e){return Y$(e&&e.line)+":"+Y$(e&&e.column)}function G$(e){return cb(e&&e.start)+"-"+cb(e&&e.end)}function Y$(e){return e&&typeof e=="number"?e:1}class _r extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Ac(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}_r.prototype.file="",_r.prototype.name="",_r.prototype.reason="",_r.prototype.message="",_r.prototype.stack="",_r.prototype.column=void 0,_r.prototype.line=void 0,_r.prototype.ancestors=void 0,_r.prototype.cause=void 0,_r.prototype.fatal=void 0,_r.prototype.place=void 0,_r.prototype.ruleId=void 0,_r.prototype.source=void 0;const fb={}.hasOwnProperty,die=new Map,pie=/[A-Z]/g,hie=/-([a-z])/g,mie=new Set(["table","tbody","thead","tfoot","tr"]),yie=new Set(["td","th"]),J$="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gie(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Aie(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Eie(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ub:Kre,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=X$(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function X$(e,t,n){if(t.type==="element")return vie(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return bie(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wie(e,t,n);if(t.type==="mdxjsEsm")return _ie(e,t);if(t.type==="root")return xie(e,t,n);if(t.type==="text")return Sie(e,t)}function vie(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ub,e.schema=i),e.ancestors.push(t);const o=ek(e,t.tagName,!1),a=Cie(e,t);let s=pb(e,t);return mie.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!jre(l):!0})),Q$(e,a,o,t),db(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function bie(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Cc(e,t.position)}function _ie(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Cc(e,t.position)}function wie(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ub,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:ek(e,t.name,!0),a=Oie(e,t),s=pb(e,t);return Q$(e,a,o,t),db(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function xie(e,t,n){const r={};return db(r,pb(e,t)),e.create(t,e.Fragment,r,n)}function Sie(e,t){return t.value}function Q$(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function db(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Eie(e,t,n){return r;function r(i,o,a,s){const c=Array.isArray(a.children)?n:t;return s?c(o,a,s):c(o,a)}}function Aie(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=lb(r);return t(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Cie(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&fb.call(t.properties,i)){const o=Tie(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&yie.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Oie(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Cc(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else Cc(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function pb(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:die;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const c=i.get(l)||0;a=l+"-"+c,i.set(l,c+1)}}const s=X$(e,o,a);s!==void 0&&n.push(s)}return n}function Tie(e,t,n){const r=Zre(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Pre(n):Gre(n)),r.property==="style"){let i=typeof n=="object"?n:$ie(e,String(n));return e.stylePropertyNameCase==="css"&&(i=kie(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Vre[r.property]||r.property:r.attribute,n]}}function $ie(e,t){const n={};try{cie(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,a=new _r("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=J$+"#cannot-parse-style-attribute",a}}return n;function r(i,o){let a=i;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(hie,Pie)),n[a]=o}}function ek(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=$$(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=$$(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return fb.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Cc(e)}function Cc(e,t){const n=new _r("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=J$+"#cannot-handle-mdx-estrees-without-createevaluater",n}function kie(e){const t={};let n;for(n in e)fb.call(e,n)&&(t[Iie(n)]=e[n]);return t}function Iie(e){let t=e.replace(pie,Rie);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Pie(e,t){return t.toUpperCase()}function Rie(e){return"-"+e.toLowerCase()}const hb={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Die={};function mb(e,t){const n=t||Die,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return tk(e,r,i)}function tk(e,t,n){if(Nie(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return nk(e.children,t,n)}return Array.isArray(e)?nk(e,t,n):""}function nk(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=tk(e[i],t,n);return r.join("")}function Nie(e){return!!(e&&typeof e=="object")}const rk=document.createElement("i");function yb(e){const t="&"+e+";";rk.innerHTML=t;const n=rk.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ai(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function wi(e,t){return e.length>0?(ai(e,e.length,0,t),e):t}const ik={}.hasOwnProperty;function ok(e){const t={};let n=-1;for(;++n<e.length;)Mie(t,e[n]);return t}function Mie(e,t){let n;for(n in t){const i=(ik.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){ik.call(i,a)||(i[a]=[]);const s=o[a];jie(i[a],Array.isArray(s)?s:s?[s]:[])}}}function jie(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ai(e,0,0,r)}function ak(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Li(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nr=ma(/[A-Za-z]/),wr=ma(/[\dA-Za-z]/),Lie=ma(/[#-'*+\--9=?A-Z^-~]/);function Vp(e){return e!==null&&(e<32||e===127)}const gb=ma(/\d/),Fie=ma(/[\dA-Fa-f]/),qie=ma(/[!-/:-@[-`{-~]/);function ht(e){return e!==null&&e<-2}function gn(e){return e!==null&&(e<0||e===32)}function Ht(e){return e===-2||e===-1||e===32}const Kp=ma(/\p{P}|\p{S}/u),bs=ma(/\s/);function ma(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Pu(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&wr(e.charCodeAt(n+1))&&wr(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function en(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return Ht(l)?(e.enter(n),s(l)):t(l)}function s(l){return Ht(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const Uie={tokenize:Bie};function Bie(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),en(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return ht(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const zie={tokenize:Zie},sk={tokenize:Hie};function Zie(e){const t=this,n=[];let r=0,i,o,a;return s;function s(S){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,l,c)(S)}return c(S)}function l(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const A=t.events.length;let E=A,T;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){T=t.events[E][1].end;break}_(r);let j=A;for(;j<t.events.length;)t.events[j][1].end=Object.assign({},T),j++;return ai(t.events,E+1,0,t.events.slice(A)),t.events.length=j,c(S)}return s(S)}function c(S){if(r===n.length){if(!i)return m(S);if(i.currentConstruct&&i.currentConstruct.concrete)return y(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sk,d,p)(S)}function d(S){return i&&b(),_(r),m(S)}function p(S){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,y(S)}function m(S){return t.containerState={},e.attempt(sk,h,y)(S)}function h(S){return r++,n.push([t.currentConstruct,t.containerState]),m(S)}function y(S){if(S===null){i&&b(),_(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),v(S)}function v(S){if(S===null){w(e.exit("chunkFlow"),!0),_(0),e.consume(S);return}return ht(S)?(e.consume(S),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(S),v)}function w(S,A){const E=t.sliceStream(S);if(A&&E.push(null),S.previous=o,o&&(o.next=S),o=S,i.defineSkip(S.start),i.write(E),t.parser.lazy[S.start.line]){let T=i.events.length;for(;T--;)if(i.events[T][1].start.offset<a&&(!i.events[T][1].end||i.events[T][1].end.offset>a))return;const j=t.events.length;let L=j,F,M;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(F){M=t.events[L][1].end;break}F=!0}for(_(r),T=j;T<t.events.length;)t.events[T][1].end=Object.assign({},M),T++;ai(t.events,L+1,0,t.events.slice(j)),t.events.length=T}}function _(S){let A=n.length;for(;A-- >S;){const E=n[A];t.containerState=E[1],E[0].exit.call(t,e)}n.length=S}function b(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Hie(e,t,n){return en(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Gp(e){if(e===null||gn(e)||bs(e))return 1;if(Kp(e))return 2}function Yp(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const vb={name:"attention",tokenize:Vie,resolveAll:Wie};function Wie(e,t){let n=-1,r,i,o,a,s,l,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p=Object.assign({},e[r][1].end),m=Object.assign({},e[n][1].start);uk(p,-l),uk(m,l),a={type:l>1?"strongSequence":"emphasisSequence",start:p,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:m},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=wi(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=wi(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),c=wi(c,Yp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=wi(c,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=wi(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,ai(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Vie(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Gp(r);let o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const c=e.exit("attentionSequence"),d=Gp(l),p=!d||d===2&&i||n.includes(l),m=!i||i===2&&d||n.includes(r);return c._open=!!(o===42?p:p&&(i||!m)),c._close=!!(o===42?m:m&&(d||!p)),t(l)}}function uk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Kie={name:"autolink",tokenize:Gie};function Gie(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return Nr(h)?(e.consume(h),a):c(h)}function a(h){return h===43||h===45||h===46||wr(h)?(r=1,s(h)):c(h)}function s(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||wr(h))&&r++<32?(e.consume(h),s):(r=0,c(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Vp(h)?n(h):(e.consume(h),l)}function c(h){return h===64?(e.consume(h),d):Lie(h)?(e.consume(h),c):n(h)}function d(h){return wr(h)?p(h):n(h)}function p(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):m(h)}function m(h){if((h===45||wr(h))&&r++<63){const y=h===45?m:p;return e.consume(h),y}return n(h)}}const Oc={tokenize:Yie,partial:!0};function Yie(e,t,n){return r;function r(o){return Ht(o)?en(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||ht(o)?t(o):n(o)}}const lk={name:"blockQuote",tokenize:Jie,continuation:{tokenize:Xie},exit:Qie};function Jie(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return Ht(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Xie(e,t,n){const r=this;return i;function i(a){return Ht(a)?en(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(lk,t,n)(a)}}function Qie(e){e.exit("blockQuote")}const ck={name:"characterEscape",tokenize:eoe};function eoe(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return qie(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const fk={name:"characterReference",tokenize:toe};function toe(e,t,n){const r=this;let i=0,o,a;return s;function s(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),l}function l(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,a=wr,d(p))}function c(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=Fie,d):(e.enter("characterReferenceValue"),o=7,a=gb,d(p))}function d(p){if(p===59&&i){const m=e.exit("characterReferenceValue");return a===wr&&!yb(r.sliceSerialize(m))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&i++<o?(e.consume(p),d):n(p)}}const dk={tokenize:roe,partial:!0},pk={name:"codeFenced",tokenize:noe,concrete:!0};function noe(e,t,n){const r=this,i={tokenize:E,partial:!0};let o=0,a=0,s;return l;function l(T){return c(T)}function c(T){const j=r.events[r.events.length-1];return o=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,s=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(T)}function d(T){return T===s?(a++,e.consume(T),d):a<3?n(T):(e.exit("codeFencedFenceSequence"),Ht(T)?en(e,p,"whitespace")(T):p(T))}function p(T){return T===null||ht(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(dk,v,A)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(T))}function m(T){return T===null||ht(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(T)):Ht(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),en(e,h,"whitespace")(T)):T===96&&T===s?n(T):(e.consume(T),m)}function h(T){return T===null||ht(T)?p(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(T))}function y(T){return T===null||ht(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(T)):T===96&&T===s?n(T):(e.consume(T),y)}function v(T){return e.attempt(i,A,w)(T)}function w(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),_}function _(T){return o>0&&Ht(T)?en(e,b,"linePrefix",o+1)(T):b(T)}function b(T){return T===null||ht(T)?e.check(dk,v,A)(T):(e.enter("codeFlowValue"),S(T))}function S(T){return T===null||ht(T)?(e.exit("codeFlowValue"),b(T)):(e.consume(T),S)}function A(T){return e.exit("codeFenced"),t(T)}function E(T,j,L){let F=0;return M;function M(V){return T.enter("lineEnding"),T.consume(V),T.exit("lineEnding"),H}function H(V){return T.enter("codeFencedFence"),Ht(V)?en(T,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):re(V)}function re(V){return V===s?(T.enter("codeFencedFenceSequence"),Q(V)):L(V)}function Q(V){return V===s?(F++,T.consume(V),Q):F>=a?(T.exit("codeFencedFenceSequence"),Ht(V)?en(T,G,"whitespace")(V):G(V)):L(V)}function G(V){return V===null||ht(V)?(T.exit("codeFencedFence"),j(V)):L(V)}}}function roe(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const bb={name:"codeIndented",tokenize:ooe},ioe={tokenize:aoe,partial:!0};function ooe(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),en(e,o,"linePrefix",4+1)(c)}function o(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):ht(c)?e.attempt(ioe,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||ht(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function aoe(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):ht(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):en(e,o,"linePrefix",4+1)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):ht(a)?i(a):n(a)}}const soe={name:"codeText",tokenize:coe,resolve:uoe,previous:loe};function uoe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function loe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function coe(e,t,n){let r=0,i,o;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),s(p)}function s(p){return p===96?(e.consume(p),r++,s):(e.exit("codeTextSequence"),l(p))}function l(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),l):p===96?(o=e.enter("codeTextSequence"),i=0,d(p)):ht(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(p))}function c(p){return p===null||p===32||p===96||ht(p)?(e.exit("codeTextData"),l(p)):(e.consume(p),c)}function d(p){return p===96?(e.consume(p),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(o.type="codeTextData",c(p))}}function hk(e){const t={};let n=-1,r,i,o,a,s,l,c;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,foe(e,n)),n=t[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=e[o],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},e[i][1].start),s=e.slice(i,n),s.unshift(r),ai(e,i,n-i+1,s))}}return!c}function foe(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let d,p,m=-1,h=n,y=0,v=0;const w=[v];for(;h;){for(;e[++i][1]!==h;);o.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),p&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=h,h=h.next}for(h=n;++m<s.length;)s[m][0]==="exit"&&s[m-1][0]==="enter"&&s[m][1].type===s[m-1][1].type&&s[m][1].start.line!==s[m][1].end.line&&(v=m+1,w.push(v),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):w.pop(),m=w.length;m--;){const _=s.slice(w[m],w[m+1]),b=o.pop();l.unshift([b,b+_.length-1]),ai(e,b,2,_)}for(m=-1;++m<l.length;)c[y+l[m][0]]=y+l[m][1],y+=l[m][1]-l[m][0]-1;return c}const doe={tokenize:moe,resolve:hoe},poe={tokenize:yoe,partial:!0};function hoe(e){return hk(e),e}function moe(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):ht(s)?e.check(poe,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function yoe(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),en(e,o,"linePrefix")}function o(a){if(a===null||ht(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function mk(e,t,n,r,i,o,a,s,l){const c=l||Number.POSITIVE_INFINITY;let d=0;return p;function p(_){return _===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(_),e.exit(o),m):_===null||_===32||_===41||Vp(_)?n(_):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),v(_))}function m(_){return _===62?(e.enter(o),e.consume(_),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(_))}function h(_){return _===62?(e.exit("chunkString"),e.exit(s),m(_)):_===null||_===60||ht(_)?n(_):(e.consume(_),_===92?y:h)}function y(_){return _===60||_===62||_===92?(e.consume(_),h):h(_)}function v(_){return!d&&(_===null||_===41||gn(_))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(_)):d<c&&_===40?(e.consume(_),d++,v):_===41?(e.consume(_),d--,v):_===null||_===32||_===40||Vp(_)?n(_):(e.consume(_),_===92?w:v)}function w(_){return _===40||_===41||_===92?(e.consume(_),v):v(_)}}function yk(e,t,n,r,i,o){const a=this;let s=0,l;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),d}function d(h){return s>999||h===null||h===91||h===93&&!l||h===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):ht(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===null||h===91||h===93||ht(h)||s++>999?(e.exit("chunkString"),d(h)):(e.consume(h),l||(l=!Ht(h)),h===92?m:p)}function m(h){return h===91||h===92||h===93?(e.consume(h),s++,p):p(h)}}function gk(e,t,n,r,i,o){let a;return s;function s(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,l):n(m)}function l(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(o),c(m))}function c(m){return m===a?(e.exit(o),l(a)):m===null?n(m):ht(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),en(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===a||m===null||ht(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?p:d)}function p(m){return m===a||m===92?(e.consume(m),d):d(m)}}function Tc(e,t){let n;return r;function r(i){return ht(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ht(i)?en(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const goe={name:"definition",tokenize:boe},voe={tokenize:_oe,partial:!0};function boe(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),a(h)}function a(h){return yk.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=Li(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return gn(h)?Tc(e,c)(h):c(h)}function c(h){return mk(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(voe,p,p)(h)}function p(h){return Ht(h)?en(e,m,"whitespace")(h):m(h)}function m(h){return h===null||ht(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function _oe(e,t,n){return r;function r(s){return gn(s)?Tc(e,i)(s):n(s)}function i(s){return gk(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Ht(s)?en(e,a,"whitespace")(s):a(s)}function a(s){return s===null||ht(s)?t(s):n(s)}}const woe={name:"hardBreakEscape",tokenize:xoe};function xoe(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ht(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Soe={name:"headingAtx",tokenize:Aoe,resolve:Eoe};function Eoe(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ai(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Aoe(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||gn(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||ht(d)?(e.exit("atxHeading"),t(d)):Ht(d)?en(e,s,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function l(d){return d===35?(e.consume(d),l):(e.exit("atxHeadingSequence"),s(d))}function c(d){return d===null||d===35||gn(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),c)}}const Coe=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],vk=["pre","script","style","textarea"],Ooe={name:"htmlFlow",tokenize:Ioe,resolveTo:koe,concrete:!0},Toe={tokenize:Roe,partial:!0},$oe={tokenize:Poe,partial:!0};function koe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ioe(e,t,n){const r=this;let i,o,a,s,l;return c;function c(N){return d(N)}function d(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),p}function p(N){return N===33?(e.consume(N),m):N===47?(e.consume(N),o=!0,v):N===63?(e.consume(N),i=3,r.interrupt?t:P):Nr(N)?(e.consume(N),a=String.fromCharCode(N),w):n(N)}function m(N){return N===45?(e.consume(N),i=2,h):N===91?(e.consume(N),i=5,s=0,y):Nr(N)?(e.consume(N),i=4,r.interrupt?t:P):n(N)}function h(N){return N===45?(e.consume(N),r.interrupt?t:P):n(N)}function y(N){const Ne="CDATA[";return N===Ne.charCodeAt(s++)?(e.consume(N),s===Ne.length?r.interrupt?t:re:y):n(N)}function v(N){return Nr(N)?(e.consume(N),a=String.fromCharCode(N),w):n(N)}function w(N){if(N===null||N===47||N===62||gn(N)){const Ne=N===47,qe=a.toLowerCase();return!Ne&&!o&&vk.includes(qe)?(i=1,r.interrupt?t(N):re(N)):Coe.includes(a.toLowerCase())?(i=6,Ne?(e.consume(N),_):r.interrupt?t(N):re(N)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):o?b(N):S(N))}return N===45||wr(N)?(e.consume(N),a+=String.fromCharCode(N),w):n(N)}function _(N){return N===62?(e.consume(N),r.interrupt?t:re):n(N)}function b(N){return Ht(N)?(e.consume(N),b):M(N)}function S(N){return N===47?(e.consume(N),M):N===58||N===95||Nr(N)?(e.consume(N),A):Ht(N)?(e.consume(N),S):M(N)}function A(N){return N===45||N===46||N===58||N===95||wr(N)?(e.consume(N),A):E(N)}function E(N){return N===61?(e.consume(N),T):Ht(N)?(e.consume(N),E):S(N)}function T(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),l=N,j):Ht(N)?(e.consume(N),T):L(N)}function j(N){return N===l?(e.consume(N),l=null,F):N===null||ht(N)?n(N):(e.consume(N),j)}function L(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||gn(N)?E(N):(e.consume(N),L)}function F(N){return N===47||N===62||Ht(N)?S(N):n(N)}function M(N){return N===62?(e.consume(N),H):n(N)}function H(N){return N===null||ht(N)?re(N):Ht(N)?(e.consume(N),H):n(N)}function re(N){return N===45&&i===2?(e.consume(N),q):N===60&&i===1?(e.consume(N),Y):N===62&&i===4?(e.consume(N),ue):N===63&&i===3?(e.consume(N),P):N===93&&i===5?(e.consume(N),ce):ht(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Toe,Oe,Q)(N)):N===null||ht(N)?(e.exit("htmlFlowData"),Q(N)):(e.consume(N),re)}function Q(N){return e.check($oe,G,Oe)(N)}function G(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),V}function V(N){return N===null||ht(N)?Q(N):(e.enter("htmlFlowData"),re(N))}function q(N){return N===45?(e.consume(N),P):re(N)}function Y(N){return N===47?(e.consume(N),a="",ne):re(N)}function ne(N){if(N===62){const Ne=a.toLowerCase();return vk.includes(Ne)?(e.consume(N),ue):re(N)}return Nr(N)&&a.length<8?(e.consume(N),a+=String.fromCharCode(N),ne):re(N)}function ce(N){return N===93?(e.consume(N),P):re(N)}function P(N){return N===62?(e.consume(N),ue):N===45&&i===2?(e.consume(N),P):re(N)}function ue(N){return N===null||ht(N)?(e.exit("htmlFlowData"),Oe(N)):(e.consume(N),ue)}function Oe(N){return e.exit("htmlFlow"),t(N)}}function Poe(e,t,n){const r=this;return i;function i(a){return ht(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Roe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Oc,t,n)}}const Doe={name:"htmlText",tokenize:Noe};function Noe(e,t,n){const r=this;let i,o,a;return s;function s(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),l}function l(P){return P===33?(e.consume(P),c):P===47?(e.consume(P),E):P===63?(e.consume(P),S):Nr(P)?(e.consume(P),L):n(P)}function c(P){return P===45?(e.consume(P),d):P===91?(e.consume(P),o=0,y):Nr(P)?(e.consume(P),b):n(P)}function d(P){return P===45?(e.consume(P),h):n(P)}function p(P){return P===null?n(P):P===45?(e.consume(P),m):ht(P)?(a=p,Y(P)):(e.consume(P),p)}function m(P){return P===45?(e.consume(P),h):p(P)}function h(P){return P===62?q(P):P===45?m(P):p(P)}function y(P){const ue="CDATA[";return P===ue.charCodeAt(o++)?(e.consume(P),o===ue.length?v:y):n(P)}function v(P){return P===null?n(P):P===93?(e.consume(P),w):ht(P)?(a=v,Y(P)):(e.consume(P),v)}function w(P){return P===93?(e.consume(P),_):v(P)}function _(P){return P===62?q(P):P===93?(e.consume(P),_):v(P)}function b(P){return P===null||P===62?q(P):ht(P)?(a=b,Y(P)):(e.consume(P),b)}function S(P){return P===null?n(P):P===63?(e.consume(P),A):ht(P)?(a=S,Y(P)):(e.consume(P),S)}function A(P){return P===62?q(P):S(P)}function E(P){return Nr(P)?(e.consume(P),T):n(P)}function T(P){return P===45||wr(P)?(e.consume(P),T):j(P)}function j(P){return ht(P)?(a=j,Y(P)):Ht(P)?(e.consume(P),j):q(P)}function L(P){return P===45||wr(P)?(e.consume(P),L):P===47||P===62||gn(P)?F(P):n(P)}function F(P){return P===47?(e.consume(P),q):P===58||P===95||Nr(P)?(e.consume(P),M):ht(P)?(a=F,Y(P)):Ht(P)?(e.consume(P),F):q(P)}function M(P){return P===45||P===46||P===58||P===95||wr(P)?(e.consume(P),M):H(P)}function H(P){return P===61?(e.consume(P),re):ht(P)?(a=H,Y(P)):Ht(P)?(e.consume(P),H):F(P)}function re(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),i=P,Q):ht(P)?(a=re,Y(P)):Ht(P)?(e.consume(P),re):(e.consume(P),G)}function Q(P){return P===i?(e.consume(P),i=void 0,V):P===null?n(P):ht(P)?(a=Q,Y(P)):(e.consume(P),Q)}function G(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||gn(P)?F(P):(e.consume(P),G)}function V(P){return P===47||P===62||gn(P)?F(P):n(P)}function q(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function Y(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),ne}function ne(P){return Ht(P)?en(e,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):ce(P)}function ce(P){return e.enter("htmlTextData"),a(P)}}const _b={name:"labelEnd",tokenize:Uoe,resolveTo:qoe,resolveAll:Foe},Moe={tokenize:Boe},joe={tokenize:zoe},Loe={tokenize:Zoe};function Foe(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function qoe(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},d={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",l,t],["enter",c,t]],s=wi(s,e.slice(o+1,o+r+3)),s=wi(s,[["enter",d,t]]),s=wi(s,Yp(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=wi(s,[["exit",d,t],e[a-2],e[a-1],["exit",c,t]]),s=wi(s,e.slice(a+1)),s=wi(s,[["exit",l,t]]),ai(e,o,e.length,s),e}function Uoe(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(m){return o?o._inactive?p(m):(a=r.parser.defined.includes(Li(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),l):n(m)}function l(m){return m===40?e.attempt(Moe,d,a?d:p)(m):m===91?e.attempt(joe,d,a?c:p)(m):a?d(m):p(m)}function c(m){return e.attempt(Loe,d,p)(m)}function d(m){return t(m)}function p(m){return o._balanced=!0,n(m)}}function Boe(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return gn(p)?Tc(e,o)(p):o(p)}function o(p){return p===41?d(p):mk(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return gn(p)?Tc(e,l)(p):d(p)}function s(p){return n(p)}function l(p){return p===34||p===39||p===40?gk(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function c(p){return gn(p)?Tc(e,d)(p):d(p)}function d(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function zoe(e,t,n){const r=this;return i;function i(s){return yk.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Li(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function Zoe(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Hoe={name:"labelStartImage",tokenize:Woe,resolveAll:_b.resolveAll};function Woe(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Voe={name:"labelStartLink",tokenize:Koe,resolveAll:_b.resolveAll};function Koe(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const wb={name:"lineEnding",tokenize:Goe};function Goe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),en(e,t,"linePrefix")}}const Jp={name:"thematicBreak",tokenize:Yoe};function Yoe(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||ht(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),Ht(c)?en(e,s,"whitespace")(c):s(c))}}const Hr={name:"list",tokenize:Qoe,continuation:{tokenize:eae},exit:nae},Joe={tokenize:rae,partial:!0},Xoe={tokenize:tae,partial:!0};function Qoe(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(h){const y=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:gb(h)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Jp,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return gb(h)&&++a<10?(e.consume(h),l):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Oc,r.interrupt?n:d,e.attempt(Joe,m,p))}function d(h){return r.containerState.initialBlankLine=!0,o++,m(h)}function p(h){return Ht(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),m):n(h)}function m(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function eae(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Oc,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,en(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!Ht(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Xoe,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,en(e,e.attempt(Hr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function tae(e,t,n){const r=this;return en(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function nae(e){e.exit(this.containerState.type)}function rae(e,t,n){const r=this;return en(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){const a=r.events[r.events.length-1];return!Ht(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const bk={name:"setextUnderline",tokenize:oae,resolveTo:iae};function iae(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function oae(e,t,n){const r=this;let i;return o;function o(c){let d=r.events.length,p;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){p=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),Ht(c)?en(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||ht(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const aae={tokenize:sae};function sae(e){const t=this,n=e.attempt(Oc,r,e.attempt(this.parser.constructs.flowInitial,i,en(e,e.attempt(this.parser.constructs.flow,i,e.attempt(doe,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const uae={resolveAll:wk()},lae=_k("string"),cae=_k("text");function _k(e){return{tokenize:t,resolveAll:wk(e==="text"?fae:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(d){return c(d)?o(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return c(d)?(n.exit("data"),o(d)):(n.consume(d),l)}function c(d){if(d===null)return!0;const p=i[d];let m=-1;if(p)for(;++m<p.length;){const h=p[m];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function wk(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function fae(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const c=i[o];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){o++;break}}if(s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function dae(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const l={consume:b,enter:S,exit:A,attempt:j(E),check:j(T),interrupt:j(T,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:m,now:y,defineSkip:v,write:p};let d=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function p(H){return a=wi(a,H),w(),a[a.length-1]!==null?[]:(L(t,0),c.events=Yp(o,c.events,c),c.events)}function m(H,re){return hae(h(H),re)}function h(H){return pae(a,H)}function y(){const{line:H,column:re,offset:Q,_index:G,_bufferIndex:V}=r;return{line:H,column:re,offset:Q,_index:G,_bufferIndex:V}}function v(H){i[H.line]=H.column,M()}function w(){let H;for(;r._index<a.length;){const re=a[r._index];if(typeof re=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<re.length;)_(re.charCodeAt(r._bufferIndex));else _(re)}}function _(H){d=d(H)}function b(H){ht(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,M()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=H}function S(H,re){const Q=re||{};return Q.type=H,Q.start=y(),c.events.push(["enter",Q,c]),s.push(Q),Q}function A(H){const re=s.pop();return re.end=y(),c.events.push(["exit",re,c]),re}function E(H,re){L(H,re.from)}function T(H,re){re.restore()}function j(H,re){return Q;function Q(G,V,q){let Y,ne,ce,P;return Array.isArray(G)?Oe(G):"tokenize"in G?Oe([G]):ue(G);function ue(Me){return Je;function Je(rt){const Ke=rt!==null&&Me[rt],Pe=rt!==null&&Me.null,Ae=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return Oe(Ae)(rt)}}function Oe(Me){return Y=Me,ne=0,Me.length===0?q:N(Me[ne])}function N(Me){return Je;function Je(rt){return P=F(),ce=Me,Me.partial||(c.currentConstruct=Me),Me.name&&c.parser.constructs.disable.null.includes(Me.name)?qe():Me.tokenize.call(re?Object.assign(Object.create(c),re):c,l,Ne,qe)(rt)}}function Ne(Me){return H(ce,P),V}function qe(Me){return P.restore(),++ne<Y.length?N(Y[ne]):q}}}function L(H,re){H.resolveAll&&!o.includes(H)&&o.push(H),H.resolve&&ai(c.events,re,c.events.length-re,H.resolve(c.events.slice(re),c)),H.resolveTo&&(c.events=H.resolveTo(c.events,c))}function F(){const H=y(),re=c.previous,Q=c.currentConstruct,G=c.events.length,V=Array.from(s);return{restore:q,from:G};function q(){r=H,c.previous=re,c.currentConstruct=Q,c.events.length=G,s=V,M()}}function M(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function pae(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function hae(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
164
164
|
`;break}case-3:{a=`\r
|
|
165
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}const mae=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:goe},disable:{null:[]},document:{42:Hr,43:Hr,45:Hr,48:Hr,49:Hr,50:Hr,51:Hr,52:Hr,53:Hr,54:Hr,55:Hr,56:Hr,57:Hr,62:lk},flow:{35:Soe,42:Jp,45:[bk,Jp],60:Ooe,61:bk,95:Jp,96:pk,126:pk},flowInitial:{[-2]:bb,[-1]:bb,32:bb},insideSpan:{null:[vb,uae]},string:{38:fk,92:ck},text:{[-5]:wb,[-4]:wb,[-3]:wb,33:Hoe,38:fk,42:vb,60:[Kie,Doe],91:Voe,92:[woe,ck],93:_b,95:vb,96:soe}},Symbol.toStringTag,{value:"Module"}));function yae(e){const n=ok([mae,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(Uie),document:i(zie),flow:i(aae),string:i(lae),text:i(cae)};return r;function i(o){return a;function a(s){return dae(r,o,s)}}}function gae(e){for(;!hk(e););return e}const xk=/[\0\t\n\r]/g;function vae(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let c,d,p,m,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),p=0,t="",n&&(o.charCodeAt(0)===65279&&p++,n=void 0);p<o.length;){if(xk.lastIndex=p,c=xk.exec(o),m=c&&c.index!==void 0?c.index:o.length,h=o.charCodeAt(m),!c){t=o.slice(p);break}if(h===10&&p===m&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),p<m&&(l.push(o.slice(p,m)),e+=m-p),h){case 0:{l.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}p=m+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const bae=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _ae(e){return e.replace(bae,wae)}function wae(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return ak(n.slice(o?2:1),o?16:10)}return yb(n)||e}const Sk={}.hasOwnProperty;function xae(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Sae(n)(gae(yae(n).document().write(vae()(e,t,!0))))}function Sae(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Te),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(Ze),blockQuote:o(Ke),characterEscape:F,characterReference:F,codeFenced:o(Pe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Pe,a),codeText:o(Ae,a),codeTextData:F,data:F,codeFlowValue:F,definition:o(Fe),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o($e),hardBreakEscape:o(lt),hardBreakTrailing:o(lt),htmlFlow:o(K,a),htmlFlowData:F,htmlText:o(K,a),htmlTextData:F,image:o(pe),label:a,link:o(Te),listItem:o(et),listItemValue:m,listOrdered:o(Se,p),listUnordered:o(Se),paragraph:o(Ue),reference:M,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Ze),strong:o(ot),thematicBreak:o(mt)},exit:{atxHeading:l(),atxHeadingSequence:E,autolink:l(),autolinkEmail:rt,autolinkProtocol:Je,blockQuote:l(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:qe,characterReferenceMarkerNumeric:qe,characterReferenceValue:Me,codeFenced:l(w),codeFencedFence:v,codeFencedFenceInfo:h,codeFencedFenceMeta:y,codeFlowValue:j,codeIndented:l(_),codeText:l(V),codeTextData:j,data:j,definition:l(),definitionDestinationString:A,definitionLabelString:b,definitionTitleString:S,emphasis:l(),hardBreakEscape:l(re),hardBreakTrailing:l(re),htmlFlow:l(Q),htmlFlowData:j,htmlText:l(G),htmlTextData:j,image:l(Y),label:ce,labelText:ne,lineEnding:H,link:l(q),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Ne,resourceDestinationString:P,resourceTitleString:ue,resource:Oe,setextHeading:l(L),setextHeadingLineSequence:N,setextHeadingText:T,strong:l(),thematicBreak:l()}};Ek(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ie){let ge={type:"root",children:[]};const xe={stack:[ge],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:d,data:n},Be=[];let ct=-1;for(;++ct<ie.length;)if(ie[ct][1].type==="listOrdered"||ie[ct][1].type==="listUnordered")if(ie[ct][0]==="enter")Be.push(ct);else{const pn=Be.pop();ct=i(ie,pn,ct)}for(ct=-1;++ct<ie.length;){const pn=t[ie[ct][0]];Sk.call(pn,ie[ct][1].type)&&pn[ie[ct][1].type].call(Object.assign({sliceSerialize:ie[ct][2].sliceSerialize},xe),ie[ct][1])}if(xe.tokenStack.length>0){const pn=xe.tokenStack[xe.tokenStack.length-1];(pn[1]||Ak).call(xe,void 0,pn[0])}for(ge.position={start:ya(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:ya(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},ct=-1;++ct<t.transforms.length;)ge=t.transforms[ct](ge)||ge;return ge}function i(ie,ge,xe){let Be=ge-1,ct=-1,pn=!1,rn,Jt,cn,Cn;for(;++Be<=xe;){const ee=ie[Be];switch(ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ee[0]==="enter"?ct++:ct--,Cn=void 0;break}case"lineEndingBlank":{ee[0]==="enter"&&(rn&&!Cn&&!ct&&!cn&&(cn=Be),Cn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Cn=void 0}if(!ct&&ee[0]==="enter"&&ee[1].type==="listItemPrefix"||ct===-1&&ee[0]==="exit"&&(ee[1].type==="listUnordered"||ee[1].type==="listOrdered")){if(rn){let ae=Be;for(Jt=void 0;ae--;){const ft=ie[ae];if(ft[1].type==="lineEnding"||ft[1].type==="lineEndingBlank"){if(ft[0]==="exit")continue;Jt&&(ie[Jt][1].type="lineEndingBlank",pn=!0),ft[1].type="lineEnding",Jt=ae}else if(!(ft[1].type==="linePrefix"||ft[1].type==="blockQuotePrefix"||ft[1].type==="blockQuotePrefixWhitespace"||ft[1].type==="blockQuoteMarker"||ft[1].type==="listItemIndent"))break}cn&&(!Jt||cn<Jt)&&(rn._spread=!0),rn.end=Object.assign({},Jt?ie[Jt][1].start:ee[1].end),ie.splice(Jt||Be,0,["exit",rn,ee[2]]),Be++,xe++}if(ee[1].type==="listItemPrefix"){const ae={type:"listItem",_spread:!1,start:Object.assign({},ee[1].start),end:void 0};rn=ae,ie.splice(Be,0,["enter",ae,ee[2]]),Be++,xe++,cn=void 0,Cn=!0}}}return ie[ge][1]._spread=pn,xe}function o(ie,ge){return xe;function xe(Be){s.call(this,ie(Be),Be),ge&&ge.call(this,Be)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(ie,ge,xe){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([ge,xe]),ie.position={start:ya(ge.start),end:void 0}}function l(ie){return ge;function ge(xe){ie&&ie.call(this,xe),c.call(this,xe)}}function c(ie,ge){const xe=this.stack.pop(),Be=this.tokenStack.pop();if(Be)Be[0].type!==ie.type&&(ge?ge.call(this,ie,Be[0]):(Be[1]||Ak).call(this,ie,Be[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Ac({start:ie.start,end:ie.end})+"): it’s not open");xe.position.end=ya(ie.end)}function d(){return mb(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(ie){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function h(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=ie}function y(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=ie}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ie.replace(/(\r?\n|\r)$/g,"")}function b(ie){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ge,xe.identifier=Li(this.sliceSerialize(ie)).toLowerCase()}function S(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ie}function A(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ie}function E(ie){const ge=this.stack[this.stack.length-1];if(!ge.depth){const xe=this.sliceSerialize(ie).length;ge.depth=xe}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function N(ie){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function F(ie){const xe=this.stack[this.stack.length-1].children;let Be=xe[xe.length-1];(!Be||Be.type!=="text")&&(Be=It(),Be.position={start:ya(ie.start),end:void 0},xe.push(Be)),this.stack.push(Be)}function j(ie){const ge=this.stack.pop();ge.value+=this.sliceSerialize(ie),ge.position.end=ya(ie.end)}function H(ie){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ge.children[ge.children.length-1];xe.position.end=ya(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(F.call(this,ie),j.call(this,ie))}function re(){this.data.atHardBreak=!0}function Q(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ie}function G(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ie}function V(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ie}function q(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=ge,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function Y(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=ge,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function ne(ie){const ge=this.sliceSerialize(ie),xe=this.stack[this.stack.length-2];xe.label=_ae(ge),xe.identifier=Li(ge).toLowerCase()}function ce(){const ie=this.stack[this.stack.length-1],ge=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const Be=ie.children;xe.children=Be}else xe.alt=ge}function P(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ie}function ue(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ie}function Oe(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function Ne(ie){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ge,xe.identifier=Li(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function qe(ie){this.data.characterReferenceType=ie.type}function Me(ie){const ge=this.sliceSerialize(ie),xe=this.data.characterReferenceType;let Be;xe?(Be=ak(ge,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Be=yb(ge);const ct=this.stack.pop();ct.value+=Be,ct.position.end=ya(ie.end)}function Je(ie){j.call(this,ie);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(ie)}function rt(ie){j.call(this,ie);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(ie)}function Ke(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function Ae(){return{type:"inlineCode",value:""}}function Fe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $e(){return{type:"emphasis",children:[]}}function Ze(){return{type:"heading",depth:0,children:[]}}function lt(){return{type:"break"}}function K(){return{type:"html",value:""}}function pe(){return{type:"image",title:null,url:"",alt:null}}function Te(){return{type:"link",title:null,url:"",children:[]}}function Se(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function et(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function Ue(){return{type:"paragraph",children:[]}}function ot(){return{type:"strong",children:[]}}function It(){return{type:"text",value:""}}function mt(){return{type:"thematicBreak"}}}function ya(e){return{line:e.line,column:e.column,offset:e.offset}}function Ek(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ek(e,r):Eae(e,r)}}function Eae(e,t){let n;for(n in t)if(Sk.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ak(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ac({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ac({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ac({start:t.start,end:t.end})+") is still open")}function Aae(e){const t=this;t.parser=n;function n(r){return xae(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Cae(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Oae(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
165
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}const mae=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:goe},disable:{null:[]},document:{42:Hr,43:Hr,45:Hr,48:Hr,49:Hr,50:Hr,51:Hr,52:Hr,53:Hr,54:Hr,55:Hr,56:Hr,57:Hr,62:lk},flow:{35:Soe,42:Jp,45:[bk,Jp],60:Ooe,61:bk,95:Jp,96:pk,126:pk},flowInitial:{[-2]:bb,[-1]:bb,32:bb},insideSpan:{null:[vb,uae]},string:{38:fk,92:ck},text:{[-5]:wb,[-4]:wb,[-3]:wb,33:Hoe,38:fk,42:vb,60:[Kie,Doe],91:Voe,92:[woe,ck],93:_b,95:vb,96:soe}},Symbol.toStringTag,{value:"Module"}));function yae(e){const n=ok([mae,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(Uie),document:i(zie),flow:i(aae),string:i(lae),text:i(cae)};return r;function i(o){return a;function a(s){return dae(r,o,s)}}}function gae(e){for(;!hk(e););return e}const xk=/[\0\t\n\r]/g;function vae(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let c,d,p,m,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),p=0,t="",n&&(o.charCodeAt(0)===65279&&p++,n=void 0);p<o.length;){if(xk.lastIndex=p,c=xk.exec(o),m=c&&c.index!==void 0?c.index:o.length,h=o.charCodeAt(m),!c){t=o.slice(p);break}if(h===10&&p===m&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),p<m&&(l.push(o.slice(p,m)),e+=m-p),h){case 0:{l.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}p=m+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const bae=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _ae(e){return e.replace(bae,wae)}function wae(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return ak(n.slice(o?2:1),o?16:10)}return yb(n)||e}const Sk={}.hasOwnProperty;function xae(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Sae(n)(gae(yae(n).document().write(vae()(e,t,!0))))}function Sae(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Te),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(Ze),blockQuote:o(Ke),characterEscape:F,characterReference:F,codeFenced:o(Pe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Pe,a),codeText:o(Ae,a),codeTextData:F,data:F,codeFlowValue:F,definition:o(Fe),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o($e),hardBreakEscape:o(lt),hardBreakTrailing:o(lt),htmlFlow:o(K,a),htmlFlowData:F,htmlText:o(K,a),htmlTextData:F,image:o(pe),label:a,link:o(Te),listItem:o(et),listItemValue:m,listOrdered:o(Se,p),listUnordered:o(Se),paragraph:o(Ue),reference:N,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Ze),strong:o(ot),thematicBreak:o(mt)},exit:{atxHeading:l(),atxHeadingSequence:E,autolink:l(),autolinkEmail:rt,autolinkProtocol:Je,blockQuote:l(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:qe,characterReferenceMarkerNumeric:qe,characterReferenceValue:Me,codeFenced:l(w),codeFencedFence:v,codeFencedFenceInfo:h,codeFencedFenceMeta:y,codeFlowValue:M,codeIndented:l(_),codeText:l(V),codeTextData:M,data:M,definition:l(),definitionDestinationString:A,definitionLabelString:b,definitionTitleString:S,emphasis:l(),hardBreakEscape:l(re),hardBreakTrailing:l(re),htmlFlow:l(Q),htmlFlowData:M,htmlText:l(G),htmlTextData:M,image:l(Y),label:ce,labelText:ne,lineEnding:H,link:l(q),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Ne,resourceDestinationString:P,resourceTitleString:ue,resource:Oe,setextHeading:l(L),setextHeadingLineSequence:j,setextHeadingText:T,strong:l(),thematicBreak:l()}};Ek(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ie){let ge={type:"root",children:[]};const xe={stack:[ge],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:d,data:n},Be=[];let ct=-1;for(;++ct<ie.length;)if(ie[ct][1].type==="listOrdered"||ie[ct][1].type==="listUnordered")if(ie[ct][0]==="enter")Be.push(ct);else{const pn=Be.pop();ct=i(ie,pn,ct)}for(ct=-1;++ct<ie.length;){const pn=t[ie[ct][0]];Sk.call(pn,ie[ct][1].type)&&pn[ie[ct][1].type].call(Object.assign({sliceSerialize:ie[ct][2].sliceSerialize},xe),ie[ct][1])}if(xe.tokenStack.length>0){const pn=xe.tokenStack[xe.tokenStack.length-1];(pn[1]||Ak).call(xe,void 0,pn[0])}for(ge.position={start:ya(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:ya(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},ct=-1;++ct<t.transforms.length;)ge=t.transforms[ct](ge)||ge;return ge}function i(ie,ge,xe){let Be=ge-1,ct=-1,pn=!1,rn,Jt,cn,Cn;for(;++Be<=xe;){const ee=ie[Be];switch(ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ee[0]==="enter"?ct++:ct--,Cn=void 0;break}case"lineEndingBlank":{ee[0]==="enter"&&(rn&&!Cn&&!ct&&!cn&&(cn=Be),Cn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Cn=void 0}if(!ct&&ee[0]==="enter"&&ee[1].type==="listItemPrefix"||ct===-1&&ee[0]==="exit"&&(ee[1].type==="listUnordered"||ee[1].type==="listOrdered")){if(rn){let ae=Be;for(Jt=void 0;ae--;){const ft=ie[ae];if(ft[1].type==="lineEnding"||ft[1].type==="lineEndingBlank"){if(ft[0]==="exit")continue;Jt&&(ie[Jt][1].type="lineEndingBlank",pn=!0),ft[1].type="lineEnding",Jt=ae}else if(!(ft[1].type==="linePrefix"||ft[1].type==="blockQuotePrefix"||ft[1].type==="blockQuotePrefixWhitespace"||ft[1].type==="blockQuoteMarker"||ft[1].type==="listItemIndent"))break}cn&&(!Jt||cn<Jt)&&(rn._spread=!0),rn.end=Object.assign({},Jt?ie[Jt][1].start:ee[1].end),ie.splice(Jt||Be,0,["exit",rn,ee[2]]),Be++,xe++}if(ee[1].type==="listItemPrefix"){const ae={type:"listItem",_spread:!1,start:Object.assign({},ee[1].start),end:void 0};rn=ae,ie.splice(Be,0,["enter",ae,ee[2]]),Be++,xe++,cn=void 0,Cn=!0}}}return ie[ge][1]._spread=pn,xe}function o(ie,ge){return xe;function xe(Be){s.call(this,ie(Be),Be),ge&&ge.call(this,Be)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(ie,ge,xe){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([ge,xe]),ie.position={start:ya(ge.start),end:void 0}}function l(ie){return ge;function ge(xe){ie&&ie.call(this,xe),c.call(this,xe)}}function c(ie,ge){const xe=this.stack.pop(),Be=this.tokenStack.pop();if(Be)Be[0].type!==ie.type&&(ge?ge.call(this,ie,Be[0]):(Be[1]||Ak).call(this,ie,Be[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Ac({start:ie.start,end:ie.end})+"): it’s not open");xe.position.end=ya(ie.end)}function d(){return mb(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(ie){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function h(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=ie}function y(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=ie}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ie.replace(/(\r?\n|\r)$/g,"")}function b(ie){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ge,xe.identifier=Li(this.sliceSerialize(ie)).toLowerCase()}function S(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ie}function A(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ie}function E(ie){const ge=this.stack[this.stack.length-1];if(!ge.depth){const xe=this.sliceSerialize(ie).length;ge.depth=xe}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function j(ie){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function F(ie){const xe=this.stack[this.stack.length-1].children;let Be=xe[xe.length-1];(!Be||Be.type!=="text")&&(Be=It(),Be.position={start:ya(ie.start),end:void 0},xe.push(Be)),this.stack.push(Be)}function M(ie){const ge=this.stack.pop();ge.value+=this.sliceSerialize(ie),ge.position.end=ya(ie.end)}function H(ie){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ge.children[ge.children.length-1];xe.position.end=ya(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(F.call(this,ie),M.call(this,ie))}function re(){this.data.atHardBreak=!0}function Q(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ie}function G(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ie}function V(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ie}function q(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=ge,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function Y(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=ge,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function ne(ie){const ge=this.sliceSerialize(ie),xe=this.stack[this.stack.length-2];xe.label=_ae(ge),xe.identifier=Li(ge).toLowerCase()}function ce(){const ie=this.stack[this.stack.length-1],ge=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const Be=ie.children;xe.children=Be}else xe.alt=ge}function P(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ie}function ue(){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ie}function Oe(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function Ne(ie){const ge=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ge,xe.identifier=Li(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function qe(ie){this.data.characterReferenceType=ie.type}function Me(ie){const ge=this.sliceSerialize(ie),xe=this.data.characterReferenceType;let Be;xe?(Be=ak(ge,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Be=yb(ge);const ct=this.stack.pop();ct.value+=Be,ct.position.end=ya(ie.end)}function Je(ie){M.call(this,ie);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(ie)}function rt(ie){M.call(this,ie);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(ie)}function Ke(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function Ae(){return{type:"inlineCode",value:""}}function Fe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $e(){return{type:"emphasis",children:[]}}function Ze(){return{type:"heading",depth:0,children:[]}}function lt(){return{type:"break"}}function K(){return{type:"html",value:""}}function pe(){return{type:"image",title:null,url:"",alt:null}}function Te(){return{type:"link",title:null,url:"",children:[]}}function Se(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function et(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function Ue(){return{type:"paragraph",children:[]}}function ot(){return{type:"strong",children:[]}}function It(){return{type:"text",value:""}}function mt(){return{type:"thematicBreak"}}}function ya(e){return{line:e.line,column:e.column,offset:e.offset}}function Ek(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ek(e,r):Eae(e,r)}}function Eae(e,t){let n;for(n in t)if(Sk.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ak(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ac({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ac({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ac({start:t.start,end:t.end})+") is still open")}function Aae(e){const t=this;t.parser=n;function n(r){return xae(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Cae(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Oae(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
166
166
|
`}]}function Tae(e,t){const n=t.value?t.value+`
|
|
167
167
|
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function $ae(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kae(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Iae(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Pu(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function Pae(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rae(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ck(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function Dae(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ck(e,t);const i={src:Pu(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Nae(e,t){const n={src:Pu(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Mae(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function jae(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ck(e,t);const i={href:Pu(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Lae(e,t){const n={href:Pu(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Fae(e,t,n){const r=e.all(t),i=n?qae(n):Ok(t),o={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let p;d&&d.type==="element"&&d.tagName==="p"?p=d:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const d=r[s];(i||s!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
|
|
168
168
|
`}),d.type==="element"&&d.tagName==="p"&&!i?a.push(...d.children):a.push(d)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
@@ -172,7 +172,7 @@ Check the top-level render call using <`+ze+">.")}return Ce}}function We(Z,Ce){{
|
|
|
172
172
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
173
173
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
174
174
|
`}),n}function Fk(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function qk(e,t){const n=hse(e,t),r=n.one(e,void 0),i=ise(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
175
|
-
`},i),o}function bse(e,t){return e&&"run"in e?async function(n,r){const i=qk(n,{file:r,...t});await e.run(i,r)}:function(n,r){return qk(n,{file:r,...t||e})}}function Uk(e){if(e)throw e}var ah=Object.prototype.hasOwnProperty,Bk=Object.prototype.toString,zk=Object.defineProperty,Zk=Object.getOwnPropertyDescriptor,Hk=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Bk.call(t)==="[object Array]"},Wk=function(t){if(!t||Bk.call(t)!=="[object Object]")return!1;var n=ah.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ah.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ah.call(t,i)},Vk=function(t,n){zk&&n.name==="__proto__"?zk(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Kk=function(t,n){if(n==="__proto__")if(ah.call(t,n)){if(Zk)return Zk(t,n).value}else return;return t[n]},_se=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=Kk(s,n),i=Kk(t,n),s!==i&&(d&&i&&(Wk(i)||(o=Hk(i)))?(o?(o=!1,a=r&&Hk(r)?r:[]):a=r&&Wk(r)?r:{},Vk(s,{name:n,newValue:e(d,a,i)})):typeof i<"u"&&Vk(s,{name:n,newValue:i}));return s};const $b=Oo(_se);function kb(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function wse(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...c){const d=e[++o];let p=-1;if(l){a(l);return}for(;++p<i.length;)(c[p]===null||c[p]===void 0)&&(c[p]=i[p]);i=c,d?xse(d,s)(...c):a(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function xse(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(i);try{l=e.apply(this,a)}catch(c){const d=c;if(s&&n)throw d;return i(d)}s||(l instanceof Promise?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}const ao={basename:Sse,dirname:Ese,extname:Ase,join:Cse,sep:"/"};function Sse(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');kc(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function Ese(e){if(kc(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Ase(e){kc(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Cse(...e){let t=-1,n;for(;++t<e.length;)kc(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Ose(n)}function Ose(e){kc(e);const t=e.codePointAt(0)===47;let n=Tse(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Tse(e,t){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function kc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $se={cwd:kse};function kse(){return"/"}function Ib(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Ise(e){if(typeof e=="string")e=new URL(e);else if(!Ib(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Pse(e)}function Pse(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Pb=["history","path","basename","stem","extname","dirname"];class Gk{constructor(t){let n;t?Ib(t)?n={path:t}:typeof t=="string"||Rse(t)?n={value:t}:n=t:n={},this.cwd=$se.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Pb.length;){const o=Pb[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Pb.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ao.basename(this.path):void 0}set basename(t){Db(t,"basename"),Rb(t,"basename"),this.path=ao.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ao.dirname(this.path):void 0}set dirname(t){Yk(this.basename,"dirname"),this.path=ao.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ao.extname(this.path):void 0}set extname(t){if(Rb(t,"extname"),Yk(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ao.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ib(t)&&(t=Ise(t)),Db(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ao.basename(this.path,this.extname):void 0}set stem(t){Db(t,"stem"),Rb(t,"stem"),this.path=ao.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new _r(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Rb(e,t){if(e&&e.includes(ao.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ao.sep+"`")}function Db(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Yk(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Rse(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Dse=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};Object.setPrototypeOf(o,r);const a=Object.getOwnPropertyNames(i);for(const s of a){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(o,s,l)}return o},Nse={}.hasOwnProperty;class Nb extends Dse{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=wse()}copy(){const t=new Nb;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data($b(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Lb("data",this.frozen),this.namespace[t]=n,this):Nse.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Lb("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=sh(t),r=this.parser||this.Parser;return Mb("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Mb("process",this.parser||this.Parser),jb("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const s=sh(t),l=r.parse(s);r.run(l,s,function(d,p,m){if(d||!p||!m)return c(d);const h=p,y=r.stringify(h,m);Lse(y)?m.value=y:m.result=y,c(d,m)});function c(d,p){d||!p?a(d):o?o(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),Mb("processSync",this.parser||this.Parser),jb("processSync",this.compiler||this.Compiler),this.process(t,i),Xk("processSync","process",n),r;function i(o,a){n=!0,Uk(o),r=a}}run(t,n,r){Jk(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){const l=sh(n);i.run(t,l,c);function c(d,p,m){const h=p||t;d?s(d):a?a(h):r(void 0,h,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Xk("runSync","run",r),i;function o(a,s){Uk(a),i=s,r=!0}}stringify(t,n){this.freeze();const r=sh(n),i=this.compiler||this.Compiler;return jb("stringify",i),Jk(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Lb("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...p]=c;l(d,p)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(i.settings=$b(!0,i.settings,c.settings))}function s(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const p=c[d];o(p)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,d){let p=-1,m=-1;for(;++p<r.length;)if(r[p][0]===c){m=p;break}if(m===-1)r.push([c,...d]);else if(d.length>0){let[h,...y]=d;const v=r[m][1];kb(v)&&kb(h)&&(h=$b(!0,v,h)),r[m]=[c,h,...y]}}}}const Mse=new Nb().freeze();function Mb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function jb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Lb(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Jk(e){if(!kb(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Xk(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function sh(e){return jse(e)?e:new Gk(e)}function jse(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Lse(e){return typeof e=="string"||Fse(e)}function Fse(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const qse="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Qk=[],eI={allowDangerousHtml:!0},Use=/^(https?|ircs?|mailto|xmpp)$/i,Bse=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function zse(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,a=e.disallowedElements,s=e.rehypePlugins||Qk,l=e.remarkPlugins||Qk,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...eI}:eI,d=e.skipHtml,p=e.unwrapDisallowed,m=e.urlTransform||Zse,h=Mse().use(Aae).use(l).use(bse,c).use(s),y=new Gk;typeof r=="string"&&(y.value=r);for(const b of Bse)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+qse+b.id,void 0);const v=h.parse(y);let w=h.runSync(v,y);return i&&(w={type:"element",tagName:"div",properties:{className:i},children:w.type==="root"?w.children:[w]}),Ob(w,_),gie(w,{Fragment:X.Fragment,components:o,ignoreInvalidStyle:!0,jsx:X.jsx,jsxs:X.jsxs,passKeys:!0,passNode:!0});function _(b,S,A){if(b.type==="raw"&&A&&typeof S=="number")return d?A.children.splice(S,1):A.children[S]={type:"text",value:b.value},S;if(b.type==="element"){let E;for(E in hb)if(Object.hasOwn(hb,E)&&Object.hasOwn(b.properties,E)){const T=b.properties[E],N=hb[E];(N===null||N.includes(b.tagName))&&(b.properties[E]=m(String(T||""),E,b))}}if(b.type==="element"){let E=t?!t.includes(b.tagName):a?a.includes(b.tagName):!1;if(!E&&n&&typeof S=="number"&&(E=!n(b,S,A)),E&&A&&typeof S=="number")return p&&b.children?A.children.splice(S,1,...b.children):A.children.splice(S,1),S}}}function Zse(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||Use.test(e.slice(0,t))?e:""}function Hse(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function tI(e,t,n){const i=ih((n||{}).ignore||[]),o=Wse(t);let a=-1;for(;++a<o.length;)Lk(e,"text",s);function s(c,d){let p=-1,m;for(;++p<d.length;){const h=d[p],y=m?m.children:void 0;if(i(h,y?y.indexOf(h):void 0,m))return;m=h}if(m)return l(c,d)}function l(c,d){const p=d[d.length-1],m=o[a][0],h=o[a][1];let y=0;const w=p.children.indexOf(c);let _=!1,b=[];m.lastIndex=0;let S=m.exec(c.value);for(;S;){const A=S.index,E={index:S.index,input:S.input,stack:[...d,c]};let T=h(...S,E);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?m.lastIndex=A+1:(y!==A&&b.push({type:"text",value:c.value.slice(y,A)}),Array.isArray(T)?b.push(...T):T&&b.push(T),y=A+S[0].length,_=!0),!m.global)break;S=m.exec(c.value)}return _?(y<c.value.length&&b.push({type:"text",value:c.value.slice(y)}),p.children.splice(w,1,...b)):b=[c],w+b.length}}function Wse(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Vse(i[0]),Kse(i[1])])}return t}function Vse(e){return typeof e=="string"?new RegExp(Hse(e),"g"):e}function Kse(e){return typeof e=="function"?e:function(){return e}}function Gse(e){tI(e,[/\r?\n|\r/g,Yse])}function Yse(){return{type:"break"}}function Jse(){return function(e){Gse(e)}}function nI(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Fb="phrasing",qb=["autolink","link","image","label"];function Xse(){return{transforms:[oue],enter:{literalAutolink:eue,literalAutolinkEmail:Ub,literalAutolinkHttp:Ub,literalAutolinkWww:Ub},exit:{literalAutolink:iue,literalAutolinkEmail:rue,literalAutolinkHttp:tue,literalAutolinkWww:nue}}}function Qse(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Fb,notInConstruct:qb},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Fb,notInConstruct:qb},{character:":",before:"[ps]",after:"\\/",inConstruct:Fb,notInConstruct:qb}]}}function eue(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ub(e){this.config.enter.autolinkProtocol.call(this,e)}function tue(e){this.config.exit.autolinkProtocol.call(this,e)}function nue(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function rue(e){this.config.exit.autolinkEmail.call(this,e)}function iue(e){this.exit(e)}function oue(e){tI(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aue],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,sue]],{ignore:["link","linkReference"]})}function aue(e,t,n,r,i){let o="";if(!rI(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!uue(n)))return!1;const a=lue(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function sue(e,t,n,r){return!rI(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function uue(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function lue(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=nI(e,"(");let o=nI(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function rI(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||bs(n)||Kp(n))&&(!t||n!==47)}iI.peek=_ue;function cue(){return{enter:{gfmFootnoteDefinition:due,gfmFootnoteDefinitionLabelString:pue,gfmFootnoteCall:yue,gfmFootnoteCallString:gue},exit:{gfmFootnoteDefinition:mue,gfmFootnoteDefinitionLabelString:hue,gfmFootnoteCall:bue,gfmFootnoteCallString:vue}}}function fue(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:wue,footnoteReference:iI}}}function due(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function pue(){this.buffer()}function hue(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Li(this.sliceSerialize(e)).toLowerCase()}function mue(e){this.exit(e)}function yue(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function gue(){this.buffer()}function vue(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Li(this.sliceSerialize(e)).toLowerCase()}function bue(e){this.exit(e)}function iI(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function _ue(){return"["}function wue(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),xue)),a(),o}function xue(e,t,n){return t===0?e:(n?"":" ")+e}const Sue=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];oI.peek=Tue;function Eue(){return{canContainEols:["delete"],enter:{strikethrough:Cue},exit:{strikethrough:Oue}}}function Aue(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Sue}],handlers:{delete:oI}}}function Cue(e){this.enter({type:"delete",children:[]},e)}function Oue(e){this.exit(e)}function oI(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function Tue(){return"~"}function $ue(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||Iue,i=[],o=[],a=[],s=[];let l=0,c=-1;for(;++c<e.length;){const y=[],v=[];let w=-1;for(e[c].length>l&&(l=e[c].length);++w<e[c].length;){const _=kue(e[c][w]);if(t.alignDelimiters!==!1){const b=r(_);v[w]=b,(s[w]===void 0||b>s[w])&&(s[w]=b)}y.push(_)}o[c]=y,a[c]=v}let d=-1;if(typeof n=="object"&&"length"in n)for(;++d<l;)i[d]=aI(n[d]);else{const y=aI(n);for(;++d<l;)i[d]=y}d=-1;const p=[],m=[];for(;++d<l;){const y=i[d];let v="",w="";y===99?(v=":",w=":"):y===108?v=":":y===114&&(w=":");let _=t.alignDelimiters===!1?1:Math.max(1,s[d]-v.length-w.length);const b=v+"-".repeat(_)+w;t.alignDelimiters!==!1&&(_=v.length+_+w.length,_>s[d]&&(s[d]=_),m[d]=_),p[d]=b}o.splice(1,0,p),a.splice(1,0,m),c=-1;const h=[];for(;++c<o.length;){const y=o[c],v=a[c];d=-1;const w=[];for(;++d<l;){const _=y[d]||"";let b="",S="";if(t.alignDelimiters!==!1){const A=s[d]-(v[d]||0),E=i[d];E===114?b=" ".repeat(A):E===99?A%2?(b=" ".repeat(A/2+.5),S=" ".repeat(A/2-.5)):(b=" ".repeat(A/2),S=b):S=" ".repeat(A)}t.delimiterStart!==!1&&!d&&w.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&_==="")&&(t.delimiterStart!==!1||d)&&w.push(" "),t.alignDelimiters!==!1&&w.push(b),w.push(_),t.alignDelimiters!==!1&&w.push(S),t.padding!==!1&&w.push(" "),(t.delimiterEnd!==!1||d!==l-1)&&w.push("|")}h.push(t.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return h.join(`
|
|
175
|
+
`},i),o}function bse(e,t){return e&&"run"in e?async function(n,r){const i=qk(n,{file:r,...t});await e.run(i,r)}:function(n,r){return qk(n,{file:r,...t||e})}}function Uk(e){if(e)throw e}var ah=Object.prototype.hasOwnProperty,Bk=Object.prototype.toString,zk=Object.defineProperty,Zk=Object.getOwnPropertyDescriptor,Hk=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Bk.call(t)==="[object Array]"},Wk=function(t){if(!t||Bk.call(t)!=="[object Object]")return!1;var n=ah.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ah.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ah.call(t,i)},Vk=function(t,n){zk&&n.name==="__proto__"?zk(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Kk=function(t,n){if(n==="__proto__")if(ah.call(t,n)){if(Zk)return Zk(t,n).value}else return;return t[n]},_se=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=Kk(s,n),i=Kk(t,n),s!==i&&(d&&i&&(Wk(i)||(o=Hk(i)))?(o?(o=!1,a=r&&Hk(r)?r:[]):a=r&&Wk(r)?r:{},Vk(s,{name:n,newValue:e(d,a,i)})):typeof i<"u"&&Vk(s,{name:n,newValue:i}));return s};const $b=Oo(_se);function kb(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function wse(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...c){const d=e[++o];let p=-1;if(l){a(l);return}for(;++p<i.length;)(c[p]===null||c[p]===void 0)&&(c[p]=i[p]);i=c,d?xse(d,s)(...c):a(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function xse(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(i);try{l=e.apply(this,a)}catch(c){const d=c;if(s&&n)throw d;return i(d)}s||(l instanceof Promise?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}const ao={basename:Sse,dirname:Ese,extname:Ase,join:Cse,sep:"/"};function Sse(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');kc(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function Ese(e){if(kc(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Ase(e){kc(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Cse(...e){let t=-1,n;for(;++t<e.length;)kc(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Ose(n)}function Ose(e){kc(e);const t=e.codePointAt(0)===47;let n=Tse(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Tse(e,t){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function kc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $se={cwd:kse};function kse(){return"/"}function Ib(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Ise(e){if(typeof e=="string")e=new URL(e);else if(!Ib(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Pse(e)}function Pse(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Pb=["history","path","basename","stem","extname","dirname"];class Gk{constructor(t){let n;t?Ib(t)?n={path:t}:typeof t=="string"||Rse(t)?n={value:t}:n=t:n={},this.cwd=$se.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Pb.length;){const o=Pb[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Pb.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ao.basename(this.path):void 0}set basename(t){Db(t,"basename"),Rb(t,"basename"),this.path=ao.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ao.dirname(this.path):void 0}set dirname(t){Yk(this.basename,"dirname"),this.path=ao.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ao.extname(this.path):void 0}set extname(t){if(Rb(t,"extname"),Yk(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ao.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ib(t)&&(t=Ise(t)),Db(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ao.basename(this.path,this.extname):void 0}set stem(t){Db(t,"stem"),Rb(t,"stem"),this.path=ao.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new _r(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Rb(e,t){if(e&&e.includes(ao.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ao.sep+"`")}function Db(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Yk(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Rse(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Dse=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};Object.setPrototypeOf(o,r);const a=Object.getOwnPropertyNames(i);for(const s of a){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(o,s,l)}return o},Nse={}.hasOwnProperty;class Nb extends Dse{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=wse()}copy(){const t=new Nb;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data($b(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Lb("data",this.frozen),this.namespace[t]=n,this):Nse.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Lb("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=sh(t),r=this.parser||this.Parser;return Mb("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Mb("process",this.parser||this.Parser),jb("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const s=sh(t),l=r.parse(s);r.run(l,s,function(d,p,m){if(d||!p||!m)return c(d);const h=p,y=r.stringify(h,m);Lse(y)?m.value=y:m.result=y,c(d,m)});function c(d,p){d||!p?a(d):o?o(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),Mb("processSync",this.parser||this.Parser),jb("processSync",this.compiler||this.Compiler),this.process(t,i),Xk("processSync","process",n),r;function i(o,a){n=!0,Uk(o),r=a}}run(t,n,r){Jk(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){const l=sh(n);i.run(t,l,c);function c(d,p,m){const h=p||t;d?s(d):a?a(h):r(void 0,h,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Xk("runSync","run",r),i;function o(a,s){Uk(a),i=s,r=!0}}stringify(t,n){this.freeze();const r=sh(n),i=this.compiler||this.Compiler;return jb("stringify",i),Jk(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Lb("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...p]=c;l(d,p)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(i.settings=$b(!0,i.settings,c.settings))}function s(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const p=c[d];o(p)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,d){let p=-1,m=-1;for(;++p<r.length;)if(r[p][0]===c){m=p;break}if(m===-1)r.push([c,...d]);else if(d.length>0){let[h,...y]=d;const v=r[m][1];kb(v)&&kb(h)&&(h=$b(!0,v,h)),r[m]=[c,h,...y]}}}}const Mse=new Nb().freeze();function Mb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function jb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Lb(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Jk(e){if(!kb(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Xk(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function sh(e){return jse(e)?e:new Gk(e)}function jse(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Lse(e){return typeof e=="string"||Fse(e)}function Fse(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const qse="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Qk=[],eI={allowDangerousHtml:!0},Use=/^(https?|ircs?|mailto|xmpp)$/i,Bse=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function zse(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,a=e.disallowedElements,s=e.rehypePlugins||Qk,l=e.remarkPlugins||Qk,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...eI}:eI,d=e.skipHtml,p=e.unwrapDisallowed,m=e.urlTransform||Zse,h=Mse().use(Aae).use(l).use(bse,c).use(s),y=new Gk;typeof r=="string"&&(y.value=r);for(const b of Bse)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+qse+b.id,void 0);const v=h.parse(y);let w=h.runSync(v,y);return i&&(w={type:"element",tagName:"div",properties:{className:i},children:w.type==="root"?w.children:[w]}),Ob(w,_),gie(w,{Fragment:X.Fragment,components:o,ignoreInvalidStyle:!0,jsx:X.jsx,jsxs:X.jsxs,passKeys:!0,passNode:!0});function _(b,S,A){if(b.type==="raw"&&A&&typeof S=="number")return d?A.children.splice(S,1):A.children[S]={type:"text",value:b.value},S;if(b.type==="element"){let E;for(E in hb)if(Object.hasOwn(hb,E)&&Object.hasOwn(b.properties,E)){const T=b.properties[E],j=hb[E];(j===null||j.includes(b.tagName))&&(b.properties[E]=m(String(T||""),E,b))}}if(b.type==="element"){let E=t?!t.includes(b.tagName):a?a.includes(b.tagName):!1;if(!E&&n&&typeof S=="number"&&(E=!n(b,S,A)),E&&A&&typeof S=="number")return p&&b.children?A.children.splice(S,1,...b.children):A.children.splice(S,1),S}}}function Zse(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||Use.test(e.slice(0,t))?e:""}function Hse(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function tI(e,t,n){const i=ih((n||{}).ignore||[]),o=Wse(t);let a=-1;for(;++a<o.length;)Lk(e,"text",s);function s(c,d){let p=-1,m;for(;++p<d.length;){const h=d[p],y=m?m.children:void 0;if(i(h,y?y.indexOf(h):void 0,m))return;m=h}if(m)return l(c,d)}function l(c,d){const p=d[d.length-1],m=o[a][0],h=o[a][1];let y=0;const w=p.children.indexOf(c);let _=!1,b=[];m.lastIndex=0;let S=m.exec(c.value);for(;S;){const A=S.index,E={index:S.index,input:S.input,stack:[...d,c]};let T=h(...S,E);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?m.lastIndex=A+1:(y!==A&&b.push({type:"text",value:c.value.slice(y,A)}),Array.isArray(T)?b.push(...T):T&&b.push(T),y=A+S[0].length,_=!0),!m.global)break;S=m.exec(c.value)}return _?(y<c.value.length&&b.push({type:"text",value:c.value.slice(y)}),p.children.splice(w,1,...b)):b=[c],w+b.length}}function Wse(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Vse(i[0]),Kse(i[1])])}return t}function Vse(e){return typeof e=="string"?new RegExp(Hse(e),"g"):e}function Kse(e){return typeof e=="function"?e:function(){return e}}function Gse(e){tI(e,[/\r?\n|\r/g,Yse])}function Yse(){return{type:"break"}}function Jse(){return function(e){Gse(e)}}function nI(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Fb="phrasing",qb=["autolink","link","image","label"];function Xse(){return{transforms:[oue],enter:{literalAutolink:eue,literalAutolinkEmail:Ub,literalAutolinkHttp:Ub,literalAutolinkWww:Ub},exit:{literalAutolink:iue,literalAutolinkEmail:rue,literalAutolinkHttp:tue,literalAutolinkWww:nue}}}function Qse(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Fb,notInConstruct:qb},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Fb,notInConstruct:qb},{character:":",before:"[ps]",after:"\\/",inConstruct:Fb,notInConstruct:qb}]}}function eue(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ub(e){this.config.enter.autolinkProtocol.call(this,e)}function tue(e){this.config.exit.autolinkProtocol.call(this,e)}function nue(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function rue(e){this.config.exit.autolinkEmail.call(this,e)}function iue(e){this.exit(e)}function oue(e){tI(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aue],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,sue]],{ignore:["link","linkReference"]})}function aue(e,t,n,r,i){let o="";if(!rI(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!uue(n)))return!1;const a=lue(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function sue(e,t,n,r){return!rI(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function uue(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function lue(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=nI(e,"(");let o=nI(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function rI(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||bs(n)||Kp(n))&&(!t||n!==47)}iI.peek=_ue;function cue(){return{enter:{gfmFootnoteDefinition:due,gfmFootnoteDefinitionLabelString:pue,gfmFootnoteCall:yue,gfmFootnoteCallString:gue},exit:{gfmFootnoteDefinition:mue,gfmFootnoteDefinitionLabelString:hue,gfmFootnoteCall:bue,gfmFootnoteCallString:vue}}}function fue(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:wue,footnoteReference:iI}}}function due(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function pue(){this.buffer()}function hue(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Li(this.sliceSerialize(e)).toLowerCase()}function mue(e){this.exit(e)}function yue(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function gue(){this.buffer()}function vue(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Li(this.sliceSerialize(e)).toLowerCase()}function bue(e){this.exit(e)}function iI(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function _ue(){return"["}function wue(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),xue)),a(),o}function xue(e,t,n){return t===0?e:(n?"":" ")+e}const Sue=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];oI.peek=Tue;function Eue(){return{canContainEols:["delete"],enter:{strikethrough:Cue},exit:{strikethrough:Oue}}}function Aue(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Sue}],handlers:{delete:oI}}}function Cue(e){this.enter({type:"delete",children:[]},e)}function Oue(e){this.exit(e)}function oI(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function Tue(){return"~"}function $ue(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||Iue,i=[],o=[],a=[],s=[];let l=0,c=-1;for(;++c<e.length;){const y=[],v=[];let w=-1;for(e[c].length>l&&(l=e[c].length);++w<e[c].length;){const _=kue(e[c][w]);if(t.alignDelimiters!==!1){const b=r(_);v[w]=b,(s[w]===void 0||b>s[w])&&(s[w]=b)}y.push(_)}o[c]=y,a[c]=v}let d=-1;if(typeof n=="object"&&"length"in n)for(;++d<l;)i[d]=aI(n[d]);else{const y=aI(n);for(;++d<l;)i[d]=y}d=-1;const p=[],m=[];for(;++d<l;){const y=i[d];let v="",w="";y===99?(v=":",w=":"):y===108?v=":":y===114&&(w=":");let _=t.alignDelimiters===!1?1:Math.max(1,s[d]-v.length-w.length);const b=v+"-".repeat(_)+w;t.alignDelimiters!==!1&&(_=v.length+_+w.length,_>s[d]&&(s[d]=_),m[d]=_),p[d]=b}o.splice(1,0,p),a.splice(1,0,m),c=-1;const h=[];for(;++c<o.length;){const y=o[c],v=a[c];d=-1;const w=[];for(;++d<l;){const _=y[d]||"";let b="",S="";if(t.alignDelimiters!==!1){const A=s[d]-(v[d]||0),E=i[d];E===114?b=" ".repeat(A):E===99?A%2?(b=" ".repeat(A/2+.5),S=" ".repeat(A/2-.5)):(b=" ".repeat(A/2),S=b):S=" ".repeat(A)}t.delimiterStart!==!1&&!d&&w.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&_==="")&&(t.delimiterStart!==!1||d)&&w.push(" "),t.alignDelimiters!==!1&&w.push(b),w.push(_),t.alignDelimiters!==!1&&w.push(S),t.padding!==!1&&w.push(" "),(t.delimiterEnd!==!1||d!==l-1)&&w.push("|")}h.push(t.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return h.join(`
|
|
176
176
|
`)}function kue(e){return e==null?"":String(e)}function Iue(e){return e.length}function aI(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Pue(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),Rue);return i(),a}function Rue(e,t,n){return">"+(n?"":" ")+e}function Due(e,t){return sI(e,t.inConstruct,!0)&&!sI(e,t.notInConstruct,!1)}function sI(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function uI(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
177
177
|
`&&Due(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
178
178
|
`}function Nue(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function Mue(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function jue(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Lue(e,t,n,r){const i=jue(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Mue(e,n)){const p=n.enter("codeIndented"),m=n.indentLines(o,Fue);return p(),m}const s=n.createTracker(r),l=i.repeat(Math.max(Nue(o,i)+1,3)),c=n.enter("codeFenced");let d=s.move(l);if(e.lang){const p=n.enter(`codeFencedLang${a}`);d+=s.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${a}`);d+=s.move(" "),d+=s.move(n.safe(e.meta,{before:d,after:`
|
|
@@ -186,21 +186,21 @@ Check the top-level render call using <`+ze+">.")}return Ce}}function We(Z,Ce){{
|
|
|
186
186
|
`))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
187
187
|
`,...o.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c}cI.peek=Hue;function cI(e){return e.value||""}function Hue(){return"<"}fI.peek=Wue;function fI(e,t,n,r){const i=Bb(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),c+=l.move(")"),a(),c}function Wue(){return"!"}dI.peek=Vue;function dI(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=d,o(),i==="full"||!c||c!==p?l+=s.move(p+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function Vue(){return"!"}pI.peek=Kue;function pI(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function Kue(){return"`"}function hI(e,t){const n=mb(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}mI.peek=Gue;function mI(e,t,n,r){const i=Bb(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(hI(e,n)){const d=n.stack;n.stack=[],s=n.enter("autolink");let p=a.move("<");return p+=a.move(n.containerPhrasing(e,{before:p,after:">",...a.current()})),p+=a.move(">"),s(),n.stack=d,p}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),s(),c}function Gue(e,t,n){return hI(e,n)?"<":"["}yI.peek=Yue;function yI(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=d,o(),i==="full"||!c||c!==p?l+=s.move(p+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function Yue(){return"["}function zb(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Jue(e){const t=zb(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Xue(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function gI(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Que(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?Xue(n):zb(n);const s=e.ordered?a==="."?")":".":Jue(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),gI(n)===a&&d){let p=-1;for(;++p<e.children.length;){const m=e.children[p];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),c}function ele(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function tle(e,t,n,r){const i=ele(n);let o=n.bulletCurrent||zb(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),d);return l(),c;function d(p,m,h){return m?(h?"":" ".repeat(a))+p:(h?o:o+" ".repeat(a-o.length))+p}}function nle(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const rle=ih(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ile(e,t,n,r){return(e.children.some(function(a){return rle(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ole(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}vI.peek=ale;function vI(e,t,n,r){const i=ole(n),o=n.enter("strong"),a=n.createTracker(r);let s=a.move(i+i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function ale(e,t,n){return n.options.strong||"*"}function sle(e,t,n,r){return n.safe(e.value,r)}function ule(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function lle(e,t,n){const r=(gI(n)+(n.options.ruleSpaces?" ":"")).repeat(ule(n));return n.options.ruleSpaces?r.slice(0,-1):r}const bI={blockquote:Pue,break:uI,code:Lue,definition:que,emphasis:lI,hardBreak:uI,heading:Zue,html:cI,image:fI,imageReference:dI,inlineCode:pI,link:mI,linkReference:yI,list:Que,listItem:tle,paragraph:nle,root:ile,strong:vI,text:sle,thematicBreak:lle};function cle(){return{enter:{table:fle,tableData:_I,tableHeader:_I,tableRow:ple},exit:{codeText:hle,table:dle,tableData:Zb,tableHeader:Zb,tableRow:Zb}}}function fle(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function dle(e){this.exit(e),this.data.inTable=void 0}function ple(e){this.enter({type:"tableRow",children:[]},e)}function Zb(e){this.exit(e)}function _I(e){this.enter({type:"tableCell",children:[]},e)}function hle(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,mle));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function mle(e,t){return t==="|"?t:e}function yle(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
188
188
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:l,tableRow:s}};function a(h,y,v,w){return c(d(h,v,w),h.align)}function s(h,y,v,w){const _=p(h,v,w),b=c([_]);return b.slice(0,b.indexOf(`
|
|
189
|
-
`))}function l(h,y,v,w){const _=v.enter("tableCell"),b=v.enter("phrasing"),S=v.containerPhrasing(h,{...w,before:o,after:o});return b(),_(),S}function c(h,y){return $ue(h,{align:y,alignDelimiters:r,padding:n,stringLength:i})}function d(h,y,v){const w=h.children;let _=-1;const b=[],S=y.enter("table");for(;++_<w.length;)b[_]=p(w[_],y,v);return S(),b}function p(h,y,v){const w=h.children;let _=-1;const b=[],S=y.enter("tableRow");for(;++_<w.length;)b[_]=l(w[_],h,y,v);return S(),b}function m(h,y,v){let w=bI.inlineCode(h,y,v);return v.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function gle(){return{exit:{taskListCheckValueChecked:wI,taskListCheckValueUnchecked:wI,paragraph:ble}}}function vle(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:_le}}}function wI(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ble(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function _le(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=bI.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(d){return d+a}}function wle(){return[Xse(),cue(),Eue(),cle(),gle()]}function xle(e){return{extensions:[Qse(),fue(),Aue(),yle(e),vle()]}}const Sle={tokenize:$le,partial:!0},xI={tokenize:kle,partial:!0},SI={tokenize:Ile,partial:!0},EI={tokenize:Ple,partial:!0},Ele={tokenize:Rle,partial:!0},AI={tokenize:Ole,previous:OI},CI={tokenize:Tle,previous:TI},Mo={tokenize:Cle,previous:$I},so={};function Ale(){return{text:so}}let _s=48;for(;_s<123;)so[_s]=Mo,_s++,_s===58?_s=65:_s===91&&(_s=97);so[43]=Mo,so[45]=Mo,so[46]=Mo,so[95]=Mo,so[72]=[Mo,CI],so[104]=[Mo,CI],so[87]=[Mo,AI],so[119]=[Mo,AI];function Cle(e,t,n){const r=this;let i,o;return a;function a(p){return!Hb(p)||!$I.call(r,r.previous)||Wb(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(p))}function s(p){return Hb(p)?(e.consume(p),s):p===64?(e.consume(p),l):n(p)}function l(p){return p===46?e.check(Ele,d,c)(p):p===45||p===95||wr(p)?(o=!0,e.consume(p),l):d(p)}function c(p){return e.consume(p),i=!0,l}function d(p){return o&&i&&Nr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function Ole(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!OI.call(r,r.previous)||Wb(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Sle,e.attempt(xI,e.attempt(SI,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Tle(e,t,n){const r=this;let i="",o=!1;return a;function a(p){return(p===72||p===104)&&TI.call(r,r.previous)&&!Wb(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),s):n(p)}function s(p){if(Nr(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),s;if(p===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(p),l}return n(p)}function l(p){return p===47?(e.consume(p),o?c:(o=!0,l)):n(p)}function c(p){return p===null||Vp(p)||gn(p)||bs(p)||Kp(p)?n(p):e.attempt(xI,e.attempt(SI,d),n)(p)}function d(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function $le(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function kle(e,t,n){let r,i,o;return a;function a(c){return c===46||c===95?e.check(EI,l,s)(c):c===null||gn(c)||bs(c)||c!==45&&Kp(c)?l(c):(o=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),a}function l(c){return i||r||!o?n(c):t(c)}}function Ile(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(EI,t,o)(a):a===null||gn(a)||bs(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function Ple(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||gn(s)||bs(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||gn(s)||bs(s)?t(s):r(s)}function o(s){return Nr(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):Nr(s)?(e.consume(s),a):n(s)}}function Rle(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return wr(o)?n(o):t(o)}}function OI(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gn(e)}function TI(e){return!Nr(e)}function $I(e){return!(e===47||Hb(e))}function Hb(e){return e===43||e===45||e===46||e===95||wr(e)}function Wb(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Dle={tokenize:Ble,partial:!0};function Nle(){return{document:{91:{tokenize:Fle,continuation:{tokenize:qle},exit:Ule}},text:{91:{tokenize:Lle},93:{add:"after",tokenize:Mle,resolveTo:jle}}}}function Mle(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const c=Li(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function jle(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Lle(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),l}function l(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(p){if(o>999||p===93&&!a||p===null||p===91||gn(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(Li(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return gn(p)||(a=!0),o++,e.consume(p),p===92?d:c}function d(p){return p===91||p===92||p===93?(e.consume(p),o++,c):c(p)}}function Fle(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return l;function l(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(y)}function d(y){if(a>999||y===93&&!s||y===null||y===91||gn(y))return n(y);if(y===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=Li(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return gn(y)||(s=!0),a++,e.consume(y),y===92?p:d}function p(y){return y===91||y===92||y===93?(e.consume(y),a++,d):d(y)}function m(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(o)||i.push(o),en(e,h,"gfmFootnoteDefinitionWhitespace")):n(y)}function h(y){return t(y)}}function qle(e,t,n){return e.check(Oc,t,e.attempt(Dle,t,n))}function Ule(e){e.exit("gfmFootnoteDefinition")}function Ble(e,t,n){const r=this;return en(e,i,"gfmFootnoteDefinitionIndent",4+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function zle(e){let n=(e||{}).singleTilde;const r={tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},p={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},m=[["enter",d,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",p,s]],h=s.parser.constructs.insideSpan.null;h&&ai(m,m.length,0,Yp(h,a.slice(c+1,l),s)),ai(m,m.length,0,[["exit",p,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",d,s]]),ai(a,c-1,l-c+3,m),l=c+m.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function o(a,s,l){const c=this.previous,d=this.events;let p=0;return m;function m(y){return c===126&&d[d.length-1][1].type!=="characterEscape"?l(y):(a.enter("strikethroughSequenceTemporary"),h(y))}function h(y){const v=Gp(c);if(y===126)return p>1?l(y):(a.consume(y),p++,h);if(p<2&&!n)return l(y);const w=a.exit("strikethroughSequenceTemporary"),_=Gp(y);return w._open=!_||_===2&&!!v,w._close=!v||v===2&&!!_,s(y)}}}class Zle{constructor(){this.map=[]}add(t,n,r){Hle(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function Hle(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Wle(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Vle(){return{flow:{null:{tokenize:Kle,resolveAll:Gle}}}}function Kle(e,t,n){const r=this;let i=0,o=0,a;return s;function s(j){let H=r.events.length-1;for(;H>-1;){const G=r.events[H][1].type;if(G==="lineEnding"||G==="linePrefix")H--;else break}const re=H>-1?r.events[H][1].type:null,Q=re==="tableHead"||re==="tableRow"?T:l;return Q===T&&r.parser.lazy[r.now().line]?n(j):Q(j)}function l(j){return e.enter("tableHead"),e.enter("tableRow"),c(j)}function c(j){return j===124||(a=!0,o+=1),d(j)}function d(j){return j===null?n(j):ht(j)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),h):n(j):Ht(j)?en(e,d,"whitespace")(j):(o+=1,a&&(a=!1,i+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),p(j)))}function p(j){return j===null||j===124||gn(j)?(e.exit("data"),d(j)):(e.consume(j),j===92?m:p)}function m(j){return j===92||j===124?(e.consume(j),p):p(j)}function h(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(j):(e.enter("tableDelimiterRow"),a=!1,Ht(j)?en(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):y(j))}function y(j){return j===45||j===58?w(j):j===124?(a=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),v):E(j)}function v(j){return Ht(j)?en(e,w,"whitespace")(j):w(j)}function w(j){return j===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),_):j===45?(o+=1,_(j)):j===null||ht(j)?A(j):E(j)}function _(j){return j===45?(e.enter("tableDelimiterFiller"),b(j)):E(j)}function b(j){return j===45?(e.consume(j),b):j===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(j))}function S(j){return Ht(j)?en(e,A,"whitespace")(j):A(j)}function A(j){return j===124?y(j):j===null||ht(j)?!a||i!==o?E(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):E(j)}function E(j){return n(j)}function T(j){return e.enter("tableRow"),N(j)}function N(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),N):j===null||ht(j)?(e.exit("tableRow"),t(j)):Ht(j)?en(e,N,"whitespace")(j):(e.enter("data"),L(j))}function L(j){return j===null||j===124||gn(j)?(e.exit("data"),N(j)):(e.consume(j),j===92?F:L)}function F(j){return j===92||j===124?(e.consume(j),L):L(j)}}function Gle(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,d,p;const m=new Zle;for(;++n<e.length;){const h=e[n],y=h[1];h[0]==="enter"?y.type==="tableHead"?(s=!1,l!==0&&(kI(m,t,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},m.add(n,0,[["enter",c,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},m.add(n,0,[["enter",d,t]])),i=y.type==="tableDelimiterRow"?2:d?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],p=uh(m,t,o,i,void 0,p),o=[0,0,0,0]),a[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],p=uh(m,t,o,i,void 0,p)),o=a,a=[o[1],n,0,0])):y.type==="tableHead"?(s=!0,l=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(l=n,o[1]!==0?(a[0]=a[1],p=uh(m,t,o,i,n,p)):a[1]!==0&&(p=uh(m,t,a,i,n,p)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&kI(m,t,l,c,d),m.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Wle(t.events,n))}return e}function uh(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},Du(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=Du(t.events,n[1]);if(o={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const c=Du(t.events,n[2]),d=Du(t.events,n[3]),p={type:s,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const m=t.events[n[2]],h=t.events[n[3]];if(m[1].end=Object.assign({},h[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,v=n[3]-n[2]-1;e.add(y,v,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(o.end=Object.assign({},Du(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function kI(e,t,n,r,i){const o=[],a=Du(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function Du(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Yle={tokenize:Xle};function Jle(){return{text:{91:Yle}}}function Xle(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return gn(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return ht(l)?t(l):Ht(l)?e.check({tokenize:Qle},t,n)(l):n(l)}}function Qle(e,t,n){return en(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function ece(e){return ok([Ale(),Nle(),zle(e),Vle(),Jle()])}const tce={};function nce(e){const t=this,n=e||tce,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ece(n)),o.push(wle()),a.push(xle(n))}const rce=({text:e,type:t,styles:n})=>{const r=n==null?void 0:n[t],i={h1:({node:o,...a})=>X.jsx("h1",{...a,...r==null?void 0:r.heading1}),h2:({node:o,...a})=>X.jsx("h2",{...a,...r==null?void 0:r.heading2}),h3:({node:o,...a})=>X.jsx("h3",{...a,...r==null?void 0:r.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:o,...a})=>X.jsx("em",{...a,...r==null?void 0:r.italic}),strong:({node:o,...a})=>X.jsx("strong",{...a,...r==null?void 0:r.bold}),p:({node:o,...a})=>X.jsx("p",{...a,...r==null?void 0:r.text}),hr:({node:o,...a})=>X.jsx("hr",{...a,...r==null?void 0:r.horizontalRule}),a:({node:o,...a})=>X.jsx("a",{...a,...r==null?void 0:r.link,target:"_blank"}),ol:({node:o,...a})=>X.jsx("ol",{...a,...r==null?void 0:r.orderedList}),ul:({node:o,...a})=>X.jsx("ul",{...a,...r==null?void 0:r.unorderedList}),li:({node:o,...a})=>X.jsx("li",{...a,...r==null?void 0:r.listItem}),br:({node:o,...a})=>X.jsx("br",{...a,...r==null?void 0:r.lineBreak}),img:()=>null,pre:({node:o,...a})=>X.jsx("pre",{...a,...r==null?void 0:r.pre})};return X.jsx(zse,{components:i,remarkPlugins:[nce,Jse],children:e})},ice=(e,t,n=120)=>{C.useEffect(()=>{if(e){e.style.height="0px";const r=t?Math.min(e.scrollHeight,n):20;e.style.height=`${r}px`}},[e,t])};var II={},Vb={},PI={};Object.defineProperty(PI,"__esModule",{value:!0});var lh={},oce=se&&se.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(d){try{c(r.next(d))}catch(p){a(p)}}function l(d){try{c(r.throw(d))}catch(p){a(p)}}function c(d){d.done?o(d.value):i(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(lh,"__esModule",{value:!0}),lh.Emitter=void 0;let ace=class{constructor(){this.listeners={}}on(t,n,r=!1){const i=this.listeners[t];i?r?i.unshift(n):i.push(n):this.listeners[t]=[n]}emit(t,n){return oce(this,void 0,void 0,function*(){const r=this.listeners[t];if(r!=null&&r.length){for(const i of r)yield i(n);return!0}else return!1})}};lh.Emitter=ace;var RI={};Object.defineProperty(RI,"__esModule",{value:!0});var DI={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HealthEventType=void 0,function(t){t.Create="create",t.Configure="configure",t.Start="start",t.StartFailure="start-failure",t.Initialize="initialize",t.InitializeFailure="initialize-failure",t.Sleep="sleep",t.Delete="delete"}(e.HealthEventType||(e.HealthEventType={}))})(DI);var NI={};Object.defineProperty(NI,"__esModule",{value:!0});var MI={};Object.defineProperty(MI,"__esModule",{value:!0});var jI={};Object.defineProperty(jI,"__esModule",{value:!0});var LI={};Object.defineProperty(LI,"__esModule",{value:!0}),function(e){var t=se&&se.__createBinding||(Object.create?function(r,i,o,a){a===void 0&&(a=o),Object.defineProperty(r,a,{enumerable:!0,get:function(){return i[o]}})}:function(r,i,o,a){a===void 0&&(a=o),r[a]=i[o]}),n=se&&se.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(PI,e),n(lh,e),n(RI,e),n(DI,e),n(NI,e),n(MI,e),n(jI,e),n(LI,e)}(Vb);var ch={},FI={},Kb={exports:{}},fh={},Gb={},dh={},Ic={},Nu={},ws={},Mu={},ju={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.ERROR_PACKET=uo.PACKET_TYPES_REVERSE=uo.PACKET_TYPES=void 0;const lo=Object.create(null);uo.PACKET_TYPES=lo,lo.open="0",lo.close="1",lo.ping="2",lo.pong="3",lo.message="4",lo.upgrade="5",lo.noop="6";const qI=Object.create(null);uo.PACKET_TYPES_REVERSE=qI,Object.keys(lo).forEach(e=>{qI[lo[e]]=e});const sce={type:"error",data:"parser error"};uo.ERROR_PACKET=sce,Object.defineProperty(ju,"__esModule",{value:!0}),ju.encodePacket=ju.encodePacketToBinary=void 0;const uce=uo,UI=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",BI=typeof ArrayBuffer=="function",zI=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ZI=({type:e,data:t},n,r)=>UI&&t instanceof Blob?n?r(t):HI(t,r):BI&&(t instanceof ArrayBuffer||zI(t))?n?r(t):HI(new Blob([t]),r):r(uce.PACKET_TYPES[e]+(t||""));ju.encodePacket=ZI;const HI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function WI(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Yb;function lce(e,t){if(UI&&e.data instanceof Blob)return e.data.arrayBuffer().then(WI).then(t);if(BI&&(e.data instanceof ArrayBuffer||zI(e.data)))return t(WI(e.data));ZI(e,!1,n=>{Yb||(Yb=new TextEncoder),t(Yb.encode(n))})}ju.encodePacketToBinary=lce;var ph={},Lu={};Object.defineProperty(Lu,"__esModule",{value:!0}),Lu.decode=Lu.encode=void 0;const Fu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Fu.length;e++)Pc[Fu.charCodeAt(e)]=e;const cce=e=>{let t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=Fu[t[n]>>2],i+=Fu[(t[n]&3)<<4|t[n+1]>>4],i+=Fu[(t[n+1]&15)<<2|t[n+2]>>6],i+=Fu[t[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};Lu.encode=cce;const fce=e=>{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r<n;r+=4)o=Pc[e.charCodeAt(r)],a=Pc[e.charCodeAt(r+1)],s=Pc[e.charCodeAt(r+2)],l=Pc[e.charCodeAt(r+3)],d[i++]=o<<2|a>>4,d[i++]=(a&15)<<4|s>>2,d[i++]=(s&3)<<6|l&63;return c};Lu.decode=fce,Object.defineProperty(ph,"__esModule",{value:!0}),ph.decodePacket=void 0;const hh=uo,dce=Lu,pce=typeof ArrayBuffer=="function",hce=(e,t)=>{if(typeof e!="string")return{type:"message",data:VI(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:mce(e.substring(1),t)}:hh.PACKET_TYPES_REVERSE[n]?e.length>1?{type:hh.PACKET_TYPES_REVERSE[n],data:e.substring(1)}:{type:hh.PACKET_TYPES_REVERSE[n]}:hh.ERROR_PACKET};ph.decodePacket=hce;const mce=(e,t)=>{if(pce){const n=(0,dce.decode)(e);return VI(n,t)}else return{base64:!0,data:e}},VI=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=ju;Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const n=ph;Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return n.decodePacket}});const r=uo,i=String.fromCharCode(30),o=(m,h)=>{const y=m.length,v=new Array(y);let w=0;m.forEach((_,b)=>{(0,t.encodePacket)(_,!1,S=>{v[b]=S,++w===y&&h(v.join(i))})})};e.encodePayload=o;const a=(m,h)=>{const y=m.split(i),v=[];for(let w=0;w<y.length;w++){const _=(0,n.decodePacket)(y[w],h);if(v.push(_),_.type==="error")break}return v};e.decodePayload=a;function s(){return new TransformStream({transform(m,h){(0,t.encodePacketToBinary)(m,y=>{const v=y.length;let w;if(v<126)w=new Uint8Array(1),new DataView(w.buffer).setUint8(0,v);else if(v<65536){w=new Uint8Array(3);const _=new DataView(w.buffer);_.setUint8(0,126),_.setUint16(1,v)}else{w=new Uint8Array(9);const _=new DataView(w.buffer);_.setUint8(0,127),_.setBigUint64(1,BigInt(v))}m.data&&typeof m.data!="string"&&(w[0]|=128),h.enqueue(w),h.enqueue(y)})}})}e.createPacketEncoderStream=s;let l;function c(m){return m.reduce((h,y)=>h+y.length,0)}function d(m,h){if(m[0].length===h)return m.shift();const y=new Uint8Array(h);let v=0;for(let w=0;w<h;w++)y[w]=m[0][v++],v===m[0].length&&(m.shift(),v=0);return m.length&&v<m[0].length&&(m[0]=m[0].slice(v)),y}function p(m,h){l||(l=new TextDecoder);const y=[];let v=0,w=-1,_=!1;return new TransformStream({transform(b,S){for(y.push(b);;){if(v===0){if(c(y)<1)break;const A=d(y,1);_=(A[0]&128)===128,w=A[0]&127,w<126?v=3:w===126?v=1:v=2}else if(v===1){if(c(y)<2)break;const A=d(y,2);w=new DataView(A.buffer,A.byteOffset,A.length).getUint16(0),v=3}else if(v===2){if(c(y)<8)break;const A=d(y,8),E=new DataView(A.buffer,A.byteOffset,A.length),T=E.getUint32(0);if(T>Math.pow(2,53-32)-1){S.enqueue(r.ERROR_PACKET);break}w=T*Math.pow(2,32)+E.getUint32(4),v=3}else{if(c(y)<w)break;const A=d(y,w);S.enqueue((0,n.decodePacket)(_?A:l.decode(A),h)),v=0}if(w===0||w>m){S.enqueue(r.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=p,e.protocol=4})(Mu);function Mr(e){if(e)return yce(e)}function yce(e){for(var t in Mr.prototype)e[t]=Mr.prototype[t];return e}Mr.prototype.on=Mr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Mr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Mr.prototype.off=Mr.prototype.removeListener=Mr.prototype.removeAllListeners=Mr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Mr.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},Mr.prototype.emitReserved=Mr.prototype.emit,Mr.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Mr.prototype.hasListeners=function(e){return!!this.listeners(e).length};const qu=Jf(Object.freeze(Object.defineProperty({__proto__:null,Emitter:Mr},Symbol.toStringTag,{value:"Module"})));var xi={},xs={};Object.defineProperty(xs,"__esModule",{value:!0}),xs.globalThisShim=void 0,xs.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),Object.defineProperty(xi,"__esModule",{value:!0}),xi.byteLength=xi.installTimerFunctions=xi.pick=void 0;const ga=xs;function gce(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}xi.pick=gce;const vce=ga.globalThisShim.setTimeout,bce=ga.globalThisShim.clearTimeout;function _ce(e,t){t.useNativeTimers?(e.setTimeoutFn=vce.bind(ga.globalThisShim),e.clearTimeoutFn=bce.bind(ga.globalThisShim)):(e.setTimeoutFn=ga.globalThisShim.setTimeout.bind(ga.globalThisShim),e.clearTimeoutFn=ga.globalThisShim.clearTimeout.bind(ga.globalThisShim))}xi.installTimerFunctions=_ce;const wce=1.33;function xce(e){return typeof e=="string"?Sce(e):Math.ceil((e.byteLength||e.size)*wce)}xi.byteLength=xce;function Sce(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}var Jb={exports:{}},Xb,KI;function Ece(){if(KI)return Xb;KI=1;var e=1e3,t=e*60,n=t*60,r=n*24,i=r*7,o=r*365.25;Xb=function(d,p){p=p||{};var m=typeof d;if(m==="string"&&d.length>0)return a(d);if(m==="number"&&isFinite(d))return p.long?l(d):s(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function a(d){if(d=String(d),!(d.length>100)){var p=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(p){var m=parseFloat(p[1]),h=(p[2]||"ms").toLowerCase();switch(h){case"years":case"year":case"yrs":case"yr":case"y":return m*o;case"weeks":case"week":case"w":return m*i;case"days":case"day":case"d":return m*r;case"hours":case"hour":case"hrs":case"hr":case"h":return m*n;case"minutes":case"minute":case"mins":case"min":case"m":return m*t;case"seconds":case"second":case"secs":case"sec":case"s":return m*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return m;default:return}}}}function s(d){var p=Math.abs(d);return p>=r?Math.round(d/r)+"d":p>=n?Math.round(d/n)+"h":p>=t?Math.round(d/t)+"m":p>=e?Math.round(d/e)+"s":d+"ms"}function l(d){var p=Math.abs(d);return p>=r?c(d,p,r,"day"):p>=n?c(d,p,n,"hour"):p>=t?c(d,p,t,"minute"):p>=e?c(d,p,e,"second"):d+" ms"}function c(d,p,m,h){var y=p>=m*1.5;return Math.round(d/m)+" "+h+(y?"s":"")}return Xb}function Ace(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=i,n.enabled=a,n.humanize=Ece(),n.destroy=c,Object.keys(e).forEach(d=>{n[d]=e[d]}),n.names=[],n.skips=[],n.formatters={};function t(d){let p=0;for(let m=0;m<d.length;m++)p=(p<<5)-p+d.charCodeAt(m),p|=0;return n.colors[Math.abs(p)%n.colors.length]}n.selectColor=t;function n(d){let p,m=null,h,y;function v(...w){if(!v.enabled)return;const _=v,b=Number(new Date),S=b-(p||b);_.diff=S,_.prev=p,_.curr=b,p=b,w[0]=n.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let A=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(T,N)=>{if(T==="%%")return"%";A++;const L=n.formatters[N];if(typeof L=="function"){const F=w[A];T=L.call(_,F),w.splice(A,1),A--}return T}),n.formatArgs.call(_,w),(_.log||n.log).apply(_,w)}return v.namespace=d,v.useColors=n.useColors(),v.color=n.selectColor(d),v.extend=r,v.destroy=n.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(h!==n.namespaces&&(h=n.namespaces,y=n.enabled(d)),y),set:w=>{m=w}}),typeof n.init=="function"&&n.init(v),v}function r(d,p){const m=n(this.namespace+(typeof p>"u"?":":p)+d);return m.log=this.log,m}function i(d){n.save(d),n.namespaces=d,n.names=[],n.skips=[];let p;const m=(typeof d=="string"?d:"").split(/[\s,]+/),h=m.length;for(p=0;p<h;p++)m[p]&&(d=m[p].replace(/\*/g,".*?"),d[0]==="-"?n.skips.push(new RegExp("^"+d.slice(1)+"$")):n.names.push(new RegExp("^"+d+"$")))}function o(){const d=[...n.names.map(s),...n.skips.map(s).map(p=>"-"+p)].join(",");return n.enable(""),d}function a(d){if(d[d.length-1]==="*")return!0;let p,m;for(p=0,m=n.skips.length;p<m;p++)if(n.skips[p].test(d))return!1;for(p=0,m=n.names.length;p<m;p++)if(n.names[p].test(d))return!0;return!1}function s(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function l(d){return d instanceof Error?d.stack||d.message:d}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var Cce=Ace;(function(e,t){t.formatArgs=r,t.save=i,t.load=o,t.useColors=n,t.storage=a(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;l.splice(1,0,c,"color: inherit");let d=0,p=0;l[0].replace(/%[a-zA-Z%]/g,m=>{m!=="%%"&&(d++,m==="%c"&&(p=d))}),l.splice(p,0,c)}t.log=console.debug||console.log||(()=>{});function i(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function o(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof process<"u"&&"env"in process&&(l=process.env.DEBUG),l}function a(){try{return localStorage}catch{}}e.exports=Cce(t);const{formatters:s}=e.exports;s.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(Jb,Jb.exports);var co=Jb.exports,Ss={};Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.decode=Ss.encode=void 0;function Oce(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}Ss.encode=Oce;function Tce(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}Ss.decode=Tce;var $ce=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ws,"__esModule",{value:!0}),ws.Transport=void 0;const kce=Mu,Ice=qu,Pce=xi,Rce=$ce(co),Dce=Ss,Nce=(0,Rce.default)("engine.io-client:transport");class Mce extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class jce extends Ice.Emitter{constructor(t){super(),this.writable=!1,(0,Pce.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new Mce(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"?this.write(t):Nce("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=(0,kce.decodePacket)(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=(0,Dce.encode)(t);return n.length?"?"+n:""}}ws.Transport=jce;var jo={};Object.defineProperty(jo,"__esModule",{value:!0}),jo.yeast=jo.decode=jo.encode=void 0;const GI="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),mh=64,YI={};let JI=0,va=0,XI;function Qb(e){let t="";do t=GI[e%mh]+t,e=Math.floor(e/mh);while(e>0);return t}jo.encode=Qb;function Lce(e){let t=0;for(va=0;va<e.length;va++)t=t*mh+YI[e.charAt(va)];return t}jo.decode=Lce;function Fce(){const e=Qb(+new Date);return e!==XI?(JI=0,XI=e):e+"."+Qb(JI++)}for(jo.yeast=Fce;va<mh;va++)YI[GI[va]]=va;var Uu={},yh={};Object.defineProperty(yh,"__esModule",{value:!0}),yh.hasCORS=void 0;let QI=!1;try{QI=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}yh.hasCORS=QI,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.createCookieJar=Uu.XHR=void 0;const qce=yh,Uce=xs;function Bce(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||qce.hasCORS))return new XMLHttpRequest}catch{}if(!t)try{return new Uce.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}Uu.XHR=Bce;function zce(){}Uu.createCookieJar=zce;var Zce=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.Request=Nu.Polling=void 0;const Hce=ws,Wce=Zce(co),Vce=jo,eP=Mu,e0=Uu,Kce=qu,tP=xi,Gce=xs,Wr=(0,Wce.default)("engine.io-client:polling");function Yce(){}const Jce=function(){return new e0.XHR({xdomain:!1}).responseType!=null}();class Xce extends Hce.Transport{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}const n=t&&t.forceBase64;this.supportsBinary=Jce&&!n,this.opts.withCredentials&&(this.cookieJar=(0,e0.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{Wr("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(Wr("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){Wr("pre-pause polling complete"),--r||n()})),this.writable||(Wr("we are currently writing - waiting to pause"),r++,this.once("drain",function(){Wr("pre-pause writing complete"),--r||n()}))}else n()}poll(){Wr("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){Wr("polling got data %s",t);const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};(0,eP.decodePayload)(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():Wr('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{Wr("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(Wr("transport open - closing"),t()):(Wr("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,eP.encodePayload)(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=(0,Vce.yeast)()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Es(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){Wr("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}Nu.Polling=Xce;let Es=class og extends Kce.Emitter{constructor(t,n){super(),(0,tP.installTimerFunctions)(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=(0,tP.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new e0.XHR(n);try{Wr("xhr open %s: %s",this.method,this.uri),r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},Wr("xhr data %s",this.data),r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=og.requestsCount++,og.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Yce,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete og.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};if(Nu.Request=Es,Es.requestsCount=0,Es.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",nP);else if(typeof addEventListener=="function"){const e="onpagehide"in Gce.globalThisShim?"pagehide":"unload";addEventListener(e,nP,!1)}}function nP(){for(let e in Es.requests)Es.requests.hasOwnProperty(e)&&Es.requests[e].abort()}var gh={},si={};Object.defineProperty(si,"__esModule",{value:!0}),si.defaultBinaryType=si.usingBrowserWebSocket=si.WebSocket=si.nextTick=void 0;const rP=xs;si.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),si.WebSocket=rP.globalThisShim.WebSocket||rP.globalThisShim.MozWebSocket,si.usingBrowserWebSocket=!0,si.defaultBinaryType="arraybuffer";var Qce=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gh,"__esModule",{value:!0}),gh.WS=void 0;const efe=ws,tfe=jo,nfe=xi,ba=si,rfe=Qce(co),ife=Mu,ofe=(0,rfe.default)("engine.io-client:websocket"),iP=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class afe extends efe.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=iP?{}:(0,nfe.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=ba.usingBrowserWebSocket&&!iP?n?new ba.WebSocket(t,n):new ba.WebSocket(t):new ba.WebSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;(0,ife.encodePacket)(r,this.supportsBinary,o=>{const a={};ba.usingBrowserWebSocket||(r.options&&(a.compress=r.options.compress),this.opts.perMessageDeflate&&(typeof o=="string"?Buffer.byteLength(o):o.length)<this.opts.perMessageDeflate.threshold&&(a.compress=!1));try{ba.usingBrowserWebSocket?this.ws.send(o):this.ws.send(o,a)}catch{ofe("websocket closed before onclose event")}i&&(0,ba.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=(0,tfe.yeast)()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!ba.WebSocket}}gh.WS=afe;var vh={},sfe=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vh,"__esModule",{value:!0}),vh.WT=void 0;const ufe=ws,lfe=si,oP=Mu,Rc=(0,sfe(co).default)("engine.io-client:webtransport");class cfe extends ufe.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{Rc("transport closed gracefully"),this.onClose()}).catch(t=>{Rc("transport closed due to %s",t),this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=(0,oP.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=(0,oP.createPacketEncoderStream)();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:s,value:l})=>{if(s){Rc("session is closed");return}Rc("received chunk: %o",l),this.onPacket(l),o()}).catch(s=>{Rc("an error occurred while reading: %s",s)})};o();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this.writer.write(a).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this.writer.write(r).then(()=>{i&&(0,lfe.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}vh.WT=cfe,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.transports=void 0;const ffe=Nu,dfe=gh,pfe=vh;Ic.transports={websocket:dfe.WS,webtransport:pfe.WT,polling:ffe.Polling};var Dc={};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.parse=void 0;const hfe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,mfe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function yfe(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=hfe.exec(e||""),o={},a=14;for(;a--;)o[mfe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=gfe(o,o.path),o.queryKey=vfe(o,o.query),o}Dc.parse=yfe;function gfe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function vfe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}var bfe=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dh,"__esModule",{value:!0}),dh.Socket=void 0;const _fe=Ic,aP=xi,wfe=Ss,sP=Dc,xfe=bfe(co),Sfe=qu,uP=Mu,Efe=si,In=(0,xfe.default)("engine.io-client:socket");let lP=class Ll extends Sfe.Emitter{constructor(t,n={}){super(),this.binaryType=Efe.defaultBinaryType,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=(0,sP.parse)(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=(0,sP.parse)(n.host).host),(0,aP.installTimerFunctions)(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,wfe.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){In('creating transport "%s"',t);const n=Object.assign({},this.opts.query);n.EIO=uP.protocol,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return In("options: %j",r),new _fe.transports[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Ll.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(n){In("error while creating transport: %s",n),this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){In("setting transport %s",t.name),this.transport&&(In("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){In('probing transport "%s"',t);let n=this.createTransport(t),r=!1;Ll.priorWebsocketSuccess=!1;const i=()=>{r||(In('probe transport "%s" opened',t),n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(In('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ll.priorWebsocketSuccess=n.name==="websocket",In('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{r||this.readyState!=="closed"&&(In("changing transport and sending upgrade packet"),d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{In('probe transport "%s" failed',t);const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,d(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),In('probe transport "%s" failed because of error: %s',t,p),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function c(p){n&&p.name!==n.name&&(In('"%s" works - aborting "%s"',p.name,n.name),o())}const d=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",c),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(In("socket open"),this.readyState="open",Ll.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){In("starting upgrade probes");let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(In('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}else In('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();In("flushing %d packets in socket",t.length),this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=(0,aP.byteLength)(i)),r>0&&n>this.maxPayload)return In("only send %d out of %d packets",r,this.writeBuffer.length),this.writeBuffer.slice(0,r);n+=2}return In("payload size is %d (max: %d)",n,this.maxPayload),this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),In("socket closing - telling transport to close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){In("socket error %j",t),Ll.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(In('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}};dh.Socket=lP,lP.protocol=uP.protocol,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=dh;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var n=ws;Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var r=Ic;Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var i=xi;Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return i.installTimerFunctions}});var o=Dc;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return o.parse}});var a=si;Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return a.nextTick}})}(Gb);var Afe=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fh,"__esModule",{value:!0}),fh.url=void 0;const Cfe=Gb,cP=Afe(co).default("socket.io-client:url");function Ofe(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(cP("protocol-less url %s",e),typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),cP("parse %s",e),r=Cfe.parse(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}fh.url=Ofe;var bh={},Nc={},_h={},Bu={},As={};Object.defineProperty(As,"__esModule",{value:!0}),As.hasBinary=As.isBinary=void 0;const Tfe=typeof ArrayBuffer=="function",$fe=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,fP=Object.prototype.toString,kfe=typeof Blob=="function"||typeof Blob<"u"&&fP.call(Blob)==="[object BlobConstructor]",Ife=typeof File=="function"||typeof File<"u"&&fP.call(File)==="[object FileConstructor]";function dP(e){return Tfe&&(e instanceof ArrayBuffer||$fe(e))||kfe&&e instanceof Blob||Ife&&e instanceof File}As.isBinary=dP;function wh(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(wh(e[n]))return!0;return!1}if(dP(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return wh(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&wh(e[n]))return!0;return!1}As.hasBinary=wh,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.reconstructPacket=Bu.deconstructPacket=void 0;const Pfe=As;function Rfe(e){const t=[],n=e.data,r=e;return r.data=t0(n,t),r.attachments=t.length,{packet:r,buffers:t}}Bu.deconstructPacket=Rfe;function t0(e,t){if(!e)return e;if((0,Pfe.isBinary)(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=t0(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=t0(e[r],t));return n}return e}function Dfe(e,t){return e.data=n0(e.data,t),delete e.attachments,e}Bu.reconstructPacket=Dfe;function n0(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=n0(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=n0(e[n],t));return e}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=qu,n=Bu,r=As,o=(0,co.default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var s;(function(m){m[m.CONNECT=0]="CONNECT",m[m.DISCONNECT=1]="DISCONNECT",m[m.EVENT=2]="EVENT",m[m.ACK=3]="ACK",m[m.CONNECT_ERROR=4]="CONNECT_ERROR",m[m.BINARY_EVENT=5]="BINARY_EVENT",m[m.BINARY_ACK=6]="BINARY_ACK"})(s=e.PacketType||(e.PacketType={}));class l{constructor(h){this.replacer=h}encode(h){return o("encoding packet %j",h),(h.type===s.EVENT||h.type===s.ACK)&&(0,r.hasBinary)(h)?this.encodeAsBinary({type:h.type===s.EVENT?s.BINARY_EVENT:s.BINARY_ACK,nsp:h.nsp,data:h.data,id:h.id}):[this.encodeAsString(h)]}encodeAsString(h){let y=""+h.type;return(h.type===s.BINARY_EVENT||h.type===s.BINARY_ACK)&&(y+=h.attachments+"-"),h.nsp&&h.nsp!=="/"&&(y+=h.nsp+","),h.id!=null&&(y+=h.id),h.data!=null&&(y+=JSON.stringify(h.data,this.replacer)),o("encoded %j as %s",h,y),y}encodeAsBinary(h){const y=(0,n.deconstructPacket)(h),v=this.encodeAsString(y.packet),w=y.buffers;return w.unshift(v),w}}e.Encoder=l;function c(m){return Object.prototype.toString.call(m)==="[object Object]"}class d extends t.Emitter{constructor(h){super(),this.reviver=h}add(h){let y;if(typeof h=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");y=this.decodeString(h);const v=y.type===s.BINARY_EVENT;v||y.type===s.BINARY_ACK?(y.type=v?s.EVENT:s.ACK,this.reconstructor=new p(y),y.attachments===0&&super.emitReserved("decoded",y)):super.emitReserved("decoded",y)}else if((0,r.isBinary)(h)||h.base64)if(this.reconstructor)y=this.reconstructor.takeBinaryData(h),y&&(this.reconstructor=null,super.emitReserved("decoded",y));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+h)}decodeString(h){let y=0;const v={type:Number(h.charAt(0))};if(s[v.type]===void 0)throw new Error("unknown packet type "+v.type);if(v.type===s.BINARY_EVENT||v.type===s.BINARY_ACK){const _=y+1;for(;h.charAt(++y)!=="-"&&y!=h.length;);const b=h.substring(_,y);if(b!=Number(b)||h.charAt(y)!=="-")throw new Error("Illegal attachments");v.attachments=Number(b)}if(h.charAt(y+1)==="/"){const _=y+1;for(;++y&&!(h.charAt(y)===","||y===h.length););v.nsp=h.substring(_,y)}else v.nsp="/";const w=h.charAt(y+1);if(w!==""&&Number(w)==w){const _=y+1;for(;++y;){const b=h.charAt(y);if(b==null||Number(b)!=b){--y;break}if(y===h.length)break}v.id=Number(h.substring(_,y+1))}if(h.charAt(++y)){const _=this.tryParse(h.substr(y));if(d.isPayloadValid(v.type,_))v.data=_;else throw new Error("invalid payload")}return o("decoded %s as %j",h,v),v}tryParse(h){try{return JSON.parse(h,this.reviver)}catch{return!1}}static isPayloadValid(h,y){switch(h){case s.CONNECT:return c(y);case s.DISCONNECT:return y===void 0;case s.CONNECT_ERROR:return typeof y=="string"||c(y);case s.EVENT:case s.BINARY_EVENT:return Array.isArray(y)&&(typeof y[0]=="number"||typeof y[0]=="string"&&a.indexOf(y[0])===-1);case s.ACK:case s.BINARY_ACK:return Array.isArray(y)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=d;class p{constructor(h){this.packet=h,this.buffers=[],this.reconPack=h}takeBinaryData(h){if(this.buffers.push(h),this.buffers.length===this.reconPack.attachments){const y=(0,n.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),y}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}})(_h);var Mc={};Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.on=void 0;function Nfe(e,t,n){return e.on(t,n),function(){e.off(t,n)}}Mc.on=Nfe;var Mfe=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.Socket=void 0;const Fi=_h,xh=Mc,jfe=qu,Xn=Mfe(co).default("socket.io-client:socket"),Lfe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Ffe extends jfe.Emitter{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[xh.on(t,"open",this.onopen.bind(this)),xh.on(t,"packet",this.onpacket.bind(this)),xh.on(t,"error",this.onerror.bind(this)),xh.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(Lfe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:Fi.PacketType.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++;Xn("emitting packet with ack id %d",a);const s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)?Xn("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&(Xn("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(a,1));Xn("event with ack id %d has timed out after %d ms",t,i),n.call(this,new Error("operation has timed out"))},i);this.acks[t]=(...a)=>{this.io.clearTimeoutFn(o),n.apply(this,[null,...a])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((a,s)=>r?a?o(a):i(s):i(a)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(Xn("packet [%d] is discarded after %d tries",r.id,r.tryCount),this._queue.shift(),n&&n(i)):(Xn("packet [%d] was successfully sent",r.id),this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(Xn("draining queue"),!this.connected||this._queue.length===0)return;const n=this._queue[0];if(n.pending&&!t){Xn("packet [%d] has already been sent and is waiting for an ack",n.id);return}n.pending=!0,n.tryCount++,Xn("sending packet [%d] (try n°%d)",n.id,n.tryCount),this.flags=n.flags,this.emit.apply(this,n.args)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){Xn("transport is open - connecting"),typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Fi.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){Xn("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Fi.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Fi.PacketType.EVENT:case Fi.PacketType.BINARY_EVENT:this.onevent(t);break;case Fi.PacketType.ACK:case Fi.PacketType.BINARY_ACK:this.onack(t);break;case Fi.PacketType.DISCONNECT:this.ondisconnect();break;case Fi.PacketType.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];Xn("emitting event %j",n),t.id!=null&&(Xn("attaching ack callback to event"),n.push(this.ack(t.id))),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,Xn("sending ack %j",i),n.packet({type:Fi.PacketType.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"?(Xn("calling ack %s with %j",t.id,t.data),n.apply(this,t.data),delete this.acks[t.id]):Xn("bad ack %s",t.id)}onconnect(t,n){Xn("socket connected with id %s",t),this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){Xn("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(Xn("performing disconnect (%s)",this.nsp),this.packet({type:Fi.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}Nc.Socket=Ffe;var Sh={};Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.Backoff=void 0;function zu(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Sh.Backoff=zu,zu.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},zu.prototype.reset=function(){this.attempts=0},zu.prototype.setMin=function(e){this.ms=e},zu.prototype.setMax=function(e){this.max=e},zu.prototype.setJitter=function(e){this.jitter=e};var qfe=se&&se.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Ufe=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Bfe=se&&se.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&qfe(t,e,n);return Ufe(t,e),t},zfe=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bh,"__esModule",{value:!0}),bh.Manager=void 0;const r0=Gb,Zfe=Nc,Hfe=Bfe(_h),Cs=Mc,Wfe=Sh,Vfe=qu,pr=zfe(co).default("socket.io-client:manager");class Kfe extends Vfe.Emitter{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,r0.installTimerFunctions(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Wfe.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Hfe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(pr("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;pr("opening %s",this.uri),this.engine=new r0.Socket(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Cs.on(n,"open",function(){r.onopen(),t&&t()}),o=s=>{pr("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=Cs.on(n,"error",o);if(this._timeout!==!1){const s=this._timeout;pr("connect attempt will timeout after %d",s);const l=this.setTimeoutFn(()=>{pr("connect attempt timed out after %d",s),i(),o(new Error("timeout")),n.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){pr("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Cs.on(t,"ping",this.onping.bind(this)),Cs.on(t,"data",this.ondata.bind(this)),Cs.on(t,"error",this.onerror.bind(this)),Cs.on(t,"close",this.onclose.bind(this)),Cs.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){r0.nextTick(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){pr("error",t),this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Zfe.Socket(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active){pr("socket %s is still active, skipping close",r);return}this._close()}_packet(t){pr("writing packet %j",t);const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){pr("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){pr("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){pr("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)pr("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();pr("will wait %dms before reconnect attempt",n),this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(pr("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(pr("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):(pr("reconnect success"),t.onreconnect())}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}bh.Manager=Kfe,function(e,t){var n=se&&se.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const r=fh,i=bh;Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return i.Manager}});const o=Nc;Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return o.Socket}});const s=n(co).default("socket.io-client"),l={};function c(p,m){typeof p=="object"&&(m=p,p=void 0),m=m||{};const h=r.url(p,m.path||"/socket.io"),y=h.source,v=h.id,w=h.path,_=l[v]&&w in l[v].nsps,b=m.forceNew||m["force new connection"]||m.multiplex===!1||_;let S;return b?(s("ignoring socket cache for %s",y),S=new i.Manager(y,m)):(l[v]||(s("new io instance for %s",y),l[v]=new i.Manager(y,m)),S=l[v]),h.query&&!m.query&&(m.query=h.queryKey),S.socket(h.path,m)}t.io=c,t.connect=c,t.default=c,Object.assign(c,{Manager:i.Manager,Socket:o.Socket,io:c,connect:c});var d=_h;Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return d.protocol}}),e.exports=c}(Kb,Kb.exports);var Gfe=Kb.exports;(function(e){var t=se&&se.__awaiter||function(l,c,d,p){function m(h){return h instanceof d?h:new d(function(y){y(h)})}return new(d||(d=Promise))(function(h,y){function v(b){try{_(p.next(b))}catch(S){y(S)}}function w(b){try{_(p.throw(b))}catch(S){y(S)}}function _(b){b.done?h(b.value):m(b.value).then(v,w)}_((p=p.apply(l,c||[])).next())})},n=se&&se.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.SocketComEmitter=e.SocketComEvents=e.SocketCom=void 0;const r=Vb,i=n(Gfe);class o{constructor(c){this.url=c,this.pending={},this.emitter=new s,this.events=this.emitter}connect(c,d){return t(this,void 0,void 0,function*(){return new Promise((p,m)=>{this.disconnect(),this.socket=(0,i.default)(this.url,{transports:["websocket"],auth:c,autoConnect:!1,query:d});const h=setTimeout(()=>{m("connection timed out")},5e3);this.socket.on("login",y=>t(this,void 0,void 0,function*(){clearTimeout(h),p(y)})),this.socket.on("connect_error",y=>{var v;(v=this.socket)===null||v===void 0||v.close(),clearTimeout(h),m(y.message)}),this.socket.on("message",y=>t(this,void 0,void 0,function*(){var v;this.pending[y.request]&&(!((v=y.data)===null||v===void 0)&&v.error?this.pending[y.request].reject(new Error(y.data.message)):this.pending[y.request].resolve(y.data),delete this.pending[y.request]),yield this.emitter.emit(a.Message,y)})),this.socket.connect()})})}disconnect(){var c;this.socket&&!(!((c=this.socket)===null||c===void 0)&&c.disconnected)&&this.socket.disconnect()}request(c,d){var p;return t(this,void 0,void 0,function*(){if(!(!((p=this.socket)===null||p===void 0)&&p.connected))throw new Error("Client is disconnected");const m=this.random(32),h=new Promise((y,v)=>{this.pending[m]={resolve:y,reject:v}});return this.socket.send({request:m,type:c,data:d}),h})}random(c){const d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let p="";for(let m=0;m<c;m++)p+=d.charAt(Math.floor(Math.random()*d.length));return p}}e.SocketCom=o;var a;(function(l){l.Message="message"})(a=e.SocketComEvents||(e.SocketComEvents={}));class s extends r.Emitter{}e.SocketComEmitter=s})(FI);var Eh={},Yfe=se&&se.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(d){try{c(r.next(d))}catch(p){a(p)}}function l(d){try{c(r.throw(d))}catch(p){a(p)}}function c(d){d.done?o(d.value):i(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(Eh,"__esModule",{value:!0}),Eh.SocketEmitter=void 0;class Jfe{constructor(){this.listeners={}}on(t,n){const r=this.listeners[t];r?r.push(n):this.listeners[t]=[n]}removeListeners(t){this.listeners[t]=[]}emit(t,n){return Yfe(this,void 0,void 0,function*(){const r=this.listeners[t];if(r!=null&&r.length){for(const i of r)yield i(n);return!0}else return!1})}}Eh.SocketEmitter=Jfe;var Vr=se&&se.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(d){try{c(r.next(d))}catch(p){a(p)}}function l(d){try{c(r.throw(d))}catch(p){a(p)}}function c(d){d.done?o(d.value):i(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(ch,"__esModule",{value:!0}),ch.MessagingSocket=void 0;const pP=FI,Xfe=Eh;class Qfe extends Xfe.SocketEmitter{constructor(t){super(),this.clientId=t.clientId,this.com=new pP.SocketCom(t.url),this.com.events.on(pP.SocketComEvents.Message,n=>Vr(this,void 0,void 0,function*(){n.type==="message.new"&&(yield this.emit("message",n.data.message))}))}get creds(){return this._creds}get userId(){var t;return(t=this._creds)===null||t===void 0?void 0:t.userId}get conversationId(){return this._conversationId}connect(t,n){return Vr(this,void 0,void 0,function*(){const r=n?{userData:JSON.stringify(n)}:void 0,i=yield this.com.connect({clientId:this.clientId,creds:t},r);return i.userId===(t==null?void 0:t.userId)&&!i.userToken&&(i.userToken=t.userToken),this._creds=i,yield this.emit("connect",this._creds),yield this.emit("user",this._creds.userId),i})}disconnect(){return Vr(this,void 0,void 0,function*(){this.com.disconnect(),yield this.emit("disconnect",void 0)})}getUser(){return Vr(this,void 0,void 0,function*(){return this.request("users.get",{})})}switchConversation(t){return Vr(this,void 0,void 0,function*(){this._conversationId=t,yield this.emit("conversation",this._conversationId)})}createConversation(t){return Vr(this,void 0,void 0,function*(){const n=yield this.request("conversations.create",{});return(t==null?void 0:t.switch)!==!1&&(yield this.switchConversation(n.id)),n})}startConversation(t){return Vr(this,void 0,void 0,function*(){yield this.request("conversations.start",{id:t||this._conversationId})})}getConversation(t){return Vr(this,void 0,void 0,function*(){return this.request("conversations.get",{id:t||this._conversationId})})}deleteConversation(t){return Vr(this,void 0,void 0,function*(){const n=yield this.request("conversations.delete",{id:t||this._conversationId});return n&&(yield this.switchConversation(void 0)),n})}listConversations(t){return Vr(this,void 0,void 0,function*(){return this.request("conversations.list",{limit:t||20})})}sendText(t){return Vr(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:{type:"text",text:t}})})}sendPayload(t){return Vr(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:t})})}listMessages(t){return Vr(this,void 0,void 0,function*(){return this.request("messages.list",{conversationId:this._conversationId,limit:t||20})})}sendFeedback(t,n){return Vr(this,void 0,void 0,function*(){yield this.request("messages.feedback",{messageId:t,feedback:n})})}request(t,n){return this.com.request(t,n)}}ch.MessagingSocket=Qfe,function(e){var t=se&&se.__createBinding||(Object.create?function(r,i,o,a){a===void 0&&(a=o),Object.defineProperty(r,a,{enumerable:!0,get:function(){return i[o]}})}:function(r,i,o,a){a===void 0&&(a=o),r[a]=i[o]}),n=se&&se.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(Vb,e),n(ch,e)}(II);class ede{constructor(t){R(this,"socket");R(this,"clientId");R(this,"apiUrl");R(this,"userId");R(this,"conversationId");R(this,"userToken");R(this,"connected",!1);R(this,"emitter");R(this,"on");R(this,"mode","messaging");this.socket=new II.MessagingSocket(t),this.emitter=new nb,this.clientId=t.clientId,this.apiUrl=t.url,this.on=this.emitter.on.bind(this.emitter),this.socket.on("message",n=>{const r=n.payload;if(r.type==="trigger")switch(r.trigger.type){case"webchat-visibility":this.emitter.emit("webchatVisibility",r.trigger.visibility);break;case"webchat-config":this.emitter.emit("webchatConfig",r.trigger.config);break;case"custom-event":this.emitter.emit("customEvent",r.trigger.event);break}else{const i=Bp.parse(r),{payload:o,disableInput:a}=Xv(i);this.emitter.emit("message",{...n,payload:o,disableInput:a})}}),this.socket.on("conversation",n=>{this.emitter.emit("conversation",n)})}async connect(t,n){if(this.connected)return;this.connected=!0;const r=await this.socket.connect(t,n).catch(i=>{throw this.connected=!1,i});return this.userId=r.userId,this.userToken=r.userToken,r}async disconnect(){await this.socket.disconnect(),this.connected=!1}async getUser(){throw new Error("Get user is not supported in messaging mode")}async updateUser(){throw new Error("Update user is not supported in messaging mode")}async sendFile(t){throw new Error("Send file is not supported in messaging mode")}async sendMessage(t){this.conversationId||await this.newConversation(),await this.socket.sendText(t),this.emitter.emit("messageSent",t)}async sendEvent(t){this.conversationId||await this.newConversation(),await this.socket.sendPayload({type:"trigger",payload:t})}async switchConversation(t){await this.socket.switchConversation(t),this.conversationId=t}async conversationExists(t){return(await this.socket.listConversations()).some(r=>r.id===t)}async newConversation(){const{id:t}=await this.socket.createConversation();await this.socket.startConversation(),this.conversationId=t}async listMessages(t){return(await this.socket.listMessages(t)).map(r=>{const i=Bp.parse(r.payload),{payload:o,disableInput:a}=Xv(i);return{...r,payload:o,disableInput:a}})}}function hP(e,t){return function(){return e.apply(t,arguments)}}const{toString:mP}=Object.prototype,{getPrototypeOf:i0}=Object,o0=(e=>t=>{const n=mP.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Lo=e=>(e=e.toLowerCase(),t=>o0(t)===e),Ah=e=>t=>typeof t===e,{isArray:Zu}=Array,jc=Ah("undefined");function tde(e){return e!==null&&!jc(e)&&e.constructor!==null&&!jc(e.constructor)&&Os(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yP=Lo("ArrayBuffer");function nde(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&yP(e.buffer),t}const rde=Ah("string"),Os=Ah("function"),gP=Ah("number"),a0=e=>e!==null&&typeof e=="object",ide=e=>e===!0||e===!1,Ch=e=>{if(o0(e)!=="object")return!1;const t=i0(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ode=Lo("Date"),ade=Lo("File"),sde=Lo("Blob"),ude=Lo("FileList"),lde=e=>a0(e)&&Os(e.pipe),cde=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||mP.call(e)===t||Os(e.toString)&&e.toString()===t)},fde=Lo("URLSearchParams"),dde=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Lc(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Zu(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],t.call(null,e[s],s,e)}}function vP(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const bP=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),_P=e=>!jc(e)&&e!==bP;function s0(){const{caseless:e}=_P(this)&&this||{},t={},n=(r,i)=>{const o=e&&vP(t,i)||i;Ch(t[o])&&Ch(r)?t[o]=s0(t[o],r):Ch(r)?t[o]=s0({},r):Zu(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Lc(arguments[r],n);return t}const pde=(e,t,n,{allOwnKeys:r}={})=>(Lc(t,(i,o)=>{n&&Os(i)?e[o]=hP(i,n):e[o]=i},{allOwnKeys:r}),e),hde=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mde=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},yde=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&i0(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gde=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},vde=e=>{if(!e)return null;if(Zu(e))return e;let t=e.length;if(!gP(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},bde=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&i0(Uint8Array)),_de=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},wde=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},xde=Lo("HTMLFormElement"),Sde=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),wP=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ede=Lo("RegExp"),xP=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Lc(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},be={isArray:Zu,isArrayBuffer:yP,isBuffer:tde,isFormData:cde,isArrayBufferView:nde,isString:rde,isNumber:gP,isBoolean:ide,isObject:a0,isPlainObject:Ch,isUndefined:jc,isDate:ode,isFile:ade,isBlob:sde,isRegExp:Ede,isFunction:Os,isStream:lde,isURLSearchParams:fde,isTypedArray:bde,isFileList:ude,forEach:Lc,merge:s0,extend:pde,trim:dde,stripBOM:hde,inherits:mde,toFlatObject:yde,kindOf:o0,kindOfTest:Lo,endsWith:gde,toArray:vde,forEachEntry:_de,matchAll:wde,isHTMLForm:xde,hasOwnProperty:wP,hasOwnProp:wP,reduceDescriptors:xP,freezeMethods:e=>{xP(e,(t,n)=>{if(Os(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Os(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Zu(e)?r(e):r(String(e).split(t)),n},toCamelCase:Sde,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:vP,global:bP,isContextDefined:_P,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(a0(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Zu(r)?[]:{};return Lc(r,(a,s)=>{const l=n(a,i+1);!jc(l)&&(o[s]=l)}),t[i]=void 0,o}}return r};return n(e,0)}};function nn(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}be.inherits(nn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:be.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const SP=nn.prototype,EP={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{EP[e]={value:e}}),Object.defineProperties(nn,EP),Object.defineProperty(SP,"isAxiosError",{value:!0}),nn.from=(e,t,n,r,i,o)=>{const a=Object.create(SP);return be.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),nn.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};var Ade=typeof self=="object"?self.FormData:window.FormData;const Cde=Oo(Ade);function u0(e){return be.isPlainObject(e)||be.isArray(e)}function AP(e){return be.endsWith(e,"[]")?e.slice(0,-2):e}function CP(e,t,n){return e?e.concat(t).map(function(i,o){return i=AP(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Ode(e){return be.isArray(e)&&!e.some(u0)}const Tde=be.toFlatObject(be,{},null,function(t){return/^is[A-Z]/.test(t)});function $de(e){return e&&be.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Oh(e,t,n){if(!be.isObject(e))throw new TypeError("target must be an object");t=t||new(Cde||FormData),n=be.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!be.isUndefined(w[v])});const r=n.metaTokens,i=n.visitor||d,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&$de(t);if(!be.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(be.isDate(y))return y.toISOString();if(!l&&be.isBlob(y))throw new nn("Blob is not supported. Use a Buffer instead.");return be.isArrayBuffer(y)||be.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function d(y,v,w){let _=y;if(y&&!w&&typeof y=="object"){if(be.endsWith(v,"{}"))v=r?v:v.slice(0,-2),y=JSON.stringify(y);else if(be.isArray(y)&&Ode(y)||be.isFileList(y)||be.endsWith(v,"[]")&&(_=be.toArray(y)))return v=AP(v),_.forEach(function(S,A){!(be.isUndefined(S)||S===null)&&t.append(a===!0?CP([v],A,o):a===null?v:v+"[]",c(S))}),!1}return u0(y)?!0:(t.append(CP(w,v,o),c(y)),!1)}const p=[],m=Object.assign(Tde,{defaultVisitor:d,convertValue:c,isVisitable:u0});function h(y,v){if(!be.isUndefined(y)){if(p.indexOf(y)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(y),be.forEach(y,function(_,b){(!(be.isUndefined(_)||_===null)&&i.call(t,_,be.isString(b)?b.trim():b,v,m))===!0&&h(_,v?v.concat(b):[b])}),p.pop()}}if(!be.isObject(e))throw new TypeError("data must be an object");return h(e),t}function OP(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function l0(e,t){this._pairs=[],e&&Oh(e,this,t)}const TP=l0.prototype;TP.append=function(t,n){this._pairs.push([t,n])},TP.toString=function(t){const n=t?function(r){return t.call(this,r,OP)}:OP;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function kde(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $P(e,t,n){if(!t)return e;const r=n&&n.encode||kde,i=n&&n.serialize;let o;if(i?o=i(t,n):o=be.isURLSearchParams(t)?t.toString():new l0(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Ide{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){be.forEach(this.handlers,function(r){r!==null&&t(r)})}}const kP=Ide,IP={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Pde=typeof URLSearchParams<"u"?URLSearchParams:l0,Rde=FormData,Dde=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Nde=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),fo={isBrowser:!0,classes:{URLSearchParams:Pde,FormData:Rde,Blob},isStandardBrowserEnv:Dde,isStandardBrowserWebWorkerEnv:Nde,protocols:["http","https","file","blob","url","data"]};function Mde(e,t){return Oh(e,new fo.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return fo.isNode&&be.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function jde(e){return be.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Lde(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function PP(e){function t(n,r,i,o){let a=n[o++];const s=Number.isFinite(+a),l=o>=n.length;return a=!a&&be.isArray(i)?i.length:a,l?(be.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!be.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&be.isArray(i[a])&&(i[a]=Lde(i[a])),!s)}if(be.isFormData(e)&&be.isFunction(e.entries)){const n={};return be.forEachEntry(e,(r,i)=>{t(jde(r),i,n,0)}),n}return null}const Fde={"Content-Type":void 0};function qde(e,t,n){if(be.isString(e))try{return(t||JSON.parse)(e),be.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Th={transitional:IP,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=be.isObject(t);if(o&&be.isHTMLForm(t)&&(t=new FormData(t)),be.isFormData(t))return i&&i?JSON.stringify(PP(t)):t;if(be.isArrayBuffer(t)||be.isBuffer(t)||be.isStream(t)||be.isFile(t)||be.isBlob(t))return t;if(be.isArrayBufferView(t))return t.buffer;if(be.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Mde(t,this.formSerializer).toString();if((s=be.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Oh(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),qde(t)):t}],transformResponse:[function(t){const n=this.transitional||Th.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&be.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?nn.from(s,nn.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fo.classes.FormData,Blob:fo.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};be.forEach(["delete","get","head"],function(t){Th.headers[t]={}}),be.forEach(["post","put","patch"],function(t){Th.headers[t]=be.merge(Fde)});const c0=Th,Ude=be.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Bde=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
189
|
+
`))}function l(h,y,v,w){const _=v.enter("tableCell"),b=v.enter("phrasing"),S=v.containerPhrasing(h,{...w,before:o,after:o});return b(),_(),S}function c(h,y){return $ue(h,{align:y,alignDelimiters:r,padding:n,stringLength:i})}function d(h,y,v){const w=h.children;let _=-1;const b=[],S=y.enter("table");for(;++_<w.length;)b[_]=p(w[_],y,v);return S(),b}function p(h,y,v){const w=h.children;let _=-1;const b=[],S=y.enter("tableRow");for(;++_<w.length;)b[_]=l(w[_],h,y,v);return S(),b}function m(h,y,v){let w=bI.inlineCode(h,y,v);return v.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function gle(){return{exit:{taskListCheckValueChecked:wI,taskListCheckValueUnchecked:wI,paragraph:ble}}}function vle(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:_le}}}function wI(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ble(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function _le(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=bI.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(d){return d+a}}function wle(){return[Xse(),cue(),Eue(),cle(),gle()]}function xle(e){return{extensions:[Qse(),fue(),Aue(),yle(e),vle()]}}const Sle={tokenize:$le,partial:!0},xI={tokenize:kle,partial:!0},SI={tokenize:Ile,partial:!0},EI={tokenize:Ple,partial:!0},Ele={tokenize:Rle,partial:!0},AI={tokenize:Ole,previous:OI},CI={tokenize:Tle,previous:TI},Mo={tokenize:Cle,previous:$I},so={};function Ale(){return{text:so}}let _s=48;for(;_s<123;)so[_s]=Mo,_s++,_s===58?_s=65:_s===91&&(_s=97);so[43]=Mo,so[45]=Mo,so[46]=Mo,so[95]=Mo,so[72]=[Mo,CI],so[104]=[Mo,CI],so[87]=[Mo,AI],so[119]=[Mo,AI];function Cle(e,t,n){const r=this;let i,o;return a;function a(p){return!Hb(p)||!$I.call(r,r.previous)||Wb(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(p))}function s(p){return Hb(p)?(e.consume(p),s):p===64?(e.consume(p),l):n(p)}function l(p){return p===46?e.check(Ele,d,c)(p):p===45||p===95||wr(p)?(o=!0,e.consume(p),l):d(p)}function c(p){return e.consume(p),i=!0,l}function d(p){return o&&i&&Nr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function Ole(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!OI.call(r,r.previous)||Wb(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Sle,e.attempt(xI,e.attempt(SI,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Tle(e,t,n){const r=this;let i="",o=!1;return a;function a(p){return(p===72||p===104)&&TI.call(r,r.previous)&&!Wb(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),s):n(p)}function s(p){if(Nr(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),s;if(p===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(p),l}return n(p)}function l(p){return p===47?(e.consume(p),o?c:(o=!0,l)):n(p)}function c(p){return p===null||Vp(p)||gn(p)||bs(p)||Kp(p)?n(p):e.attempt(xI,e.attempt(SI,d),n)(p)}function d(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function $le(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function kle(e,t,n){let r,i,o;return a;function a(c){return c===46||c===95?e.check(EI,l,s)(c):c===null||gn(c)||bs(c)||c!==45&&Kp(c)?l(c):(o=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),a}function l(c){return i||r||!o?n(c):t(c)}}function Ile(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(EI,t,o)(a):a===null||gn(a)||bs(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function Ple(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||gn(s)||bs(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||gn(s)||bs(s)?t(s):r(s)}function o(s){return Nr(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):Nr(s)?(e.consume(s),a):n(s)}}function Rle(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return wr(o)?n(o):t(o)}}function OI(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gn(e)}function TI(e){return!Nr(e)}function $I(e){return!(e===47||Hb(e))}function Hb(e){return e===43||e===45||e===46||e===95||wr(e)}function Wb(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Dle={tokenize:Ble,partial:!0};function Nle(){return{document:{91:{tokenize:Fle,continuation:{tokenize:qle},exit:Ule}},text:{91:{tokenize:Lle},93:{add:"after",tokenize:Mle,resolveTo:jle}}}}function Mle(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const c=Li(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function jle(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Lle(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),l}function l(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(p){if(o>999||p===93&&!a||p===null||p===91||gn(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(Li(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return gn(p)||(a=!0),o++,e.consume(p),p===92?d:c}function d(p){return p===91||p===92||p===93?(e.consume(p),o++,c):c(p)}}function Fle(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return l;function l(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(y)}function d(y){if(a>999||y===93&&!s||y===null||y===91||gn(y))return n(y);if(y===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=Li(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return gn(y)||(s=!0),a++,e.consume(y),y===92?p:d}function p(y){return y===91||y===92||y===93?(e.consume(y),a++,d):d(y)}function m(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(o)||i.push(o),en(e,h,"gfmFootnoteDefinitionWhitespace")):n(y)}function h(y){return t(y)}}function qle(e,t,n){return e.check(Oc,t,e.attempt(Dle,t,n))}function Ule(e){e.exit("gfmFootnoteDefinition")}function Ble(e,t,n){const r=this;return en(e,i,"gfmFootnoteDefinitionIndent",4+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function zle(e){let n=(e||{}).singleTilde;const r={tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},p={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},m=[["enter",d,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",p,s]],h=s.parser.constructs.insideSpan.null;h&&ai(m,m.length,0,Yp(h,a.slice(c+1,l),s)),ai(m,m.length,0,[["exit",p,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",d,s]]),ai(a,c-1,l-c+3,m),l=c+m.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function o(a,s,l){const c=this.previous,d=this.events;let p=0;return m;function m(y){return c===126&&d[d.length-1][1].type!=="characterEscape"?l(y):(a.enter("strikethroughSequenceTemporary"),h(y))}function h(y){const v=Gp(c);if(y===126)return p>1?l(y):(a.consume(y),p++,h);if(p<2&&!n)return l(y);const w=a.exit("strikethroughSequenceTemporary"),_=Gp(y);return w._open=!_||_===2&&!!v,w._close=!v||v===2&&!!_,s(y)}}}class Zle{constructor(){this.map=[]}add(t,n,r){Hle(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function Hle(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Wle(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Vle(){return{flow:{null:{tokenize:Kle,resolveAll:Gle}}}}function Kle(e,t,n){const r=this;let i=0,o=0,a;return s;function s(M){let H=r.events.length-1;for(;H>-1;){const G=r.events[H][1].type;if(G==="lineEnding"||G==="linePrefix")H--;else break}const re=H>-1?r.events[H][1].type:null,Q=re==="tableHead"||re==="tableRow"?T:l;return Q===T&&r.parser.lazy[r.now().line]?n(M):Q(M)}function l(M){return e.enter("tableHead"),e.enter("tableRow"),c(M)}function c(M){return M===124||(a=!0,o+=1),d(M)}function d(M){return M===null?n(M):ht(M)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),h):n(M):Ht(M)?en(e,d,"whitespace")(M):(o+=1,a&&(a=!1,i+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),p(M)))}function p(M){return M===null||M===124||gn(M)?(e.exit("data"),d(M)):(e.consume(M),M===92?m:p)}function m(M){return M===92||M===124?(e.consume(M),p):p(M)}function h(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),a=!1,Ht(M)?en(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):y(M))}function y(M){return M===45||M===58?w(M):M===124?(a=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),v):E(M)}function v(M){return Ht(M)?en(e,w,"whitespace")(M):w(M)}function w(M){return M===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),_):M===45?(o+=1,_(M)):M===null||ht(M)?A(M):E(M)}function _(M){return M===45?(e.enter("tableDelimiterFiller"),b(M)):E(M)}function b(M){return M===45?(e.consume(M),b):M===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(M))}function S(M){return Ht(M)?en(e,A,"whitespace")(M):A(M)}function A(M){return M===124?y(M):M===null||ht(M)?!a||i!==o?E(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):E(M)}function E(M){return n(M)}function T(M){return e.enter("tableRow"),j(M)}function j(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),j):M===null||ht(M)?(e.exit("tableRow"),t(M)):Ht(M)?en(e,j,"whitespace")(M):(e.enter("data"),L(M))}function L(M){return M===null||M===124||gn(M)?(e.exit("data"),j(M)):(e.consume(M),M===92?F:L)}function F(M){return M===92||M===124?(e.consume(M),L):L(M)}}function Gle(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,d,p;const m=new Zle;for(;++n<e.length;){const h=e[n],y=h[1];h[0]==="enter"?y.type==="tableHead"?(s=!1,l!==0&&(kI(m,t,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},m.add(n,0,[["enter",c,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},m.add(n,0,[["enter",d,t]])),i=y.type==="tableDelimiterRow"?2:d?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],p=uh(m,t,o,i,void 0,p),o=[0,0,0,0]),a[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],p=uh(m,t,o,i,void 0,p)),o=a,a=[o[1],n,0,0])):y.type==="tableHead"?(s=!0,l=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(l=n,o[1]!==0?(a[0]=a[1],p=uh(m,t,o,i,n,p)):a[1]!==0&&(p=uh(m,t,a,i,n,p)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&kI(m,t,l,c,d),m.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Wle(t.events,n))}return e}function uh(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},Du(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=Du(t.events,n[1]);if(o={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const c=Du(t.events,n[2]),d=Du(t.events,n[3]),p={type:s,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const m=t.events[n[2]],h=t.events[n[3]];if(m[1].end=Object.assign({},h[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,v=n[3]-n[2]-1;e.add(y,v,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(o.end=Object.assign({},Du(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function kI(e,t,n,r,i){const o=[],a=Du(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function Du(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Yle={tokenize:Xle};function Jle(){return{text:{91:Yle}}}function Xle(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return gn(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return ht(l)?t(l):Ht(l)?e.check({tokenize:Qle},t,n)(l):n(l)}}function Qle(e,t,n){return en(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function ece(e){return ok([Ale(),Nle(),zle(e),Vle(),Jle()])}const tce={};function nce(e){const t=this,n=e||tce,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ece(n)),o.push(wle()),a.push(xle(n))}const rce=({text:e,type:t,styles:n})=>{const r=n==null?void 0:n[t],i={h1:({node:o,...a})=>X.jsx("h1",{...a,...r==null?void 0:r.heading1}),h2:({node:o,...a})=>X.jsx("h2",{...a,...r==null?void 0:r.heading2}),h3:({node:o,...a})=>X.jsx("h3",{...a,...r==null?void 0:r.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:o,...a})=>X.jsx("em",{...a,...r==null?void 0:r.italic}),strong:({node:o,...a})=>X.jsx("strong",{...a,...r==null?void 0:r.bold}),p:({node:o,...a})=>X.jsx("p",{...a,...r==null?void 0:r.text}),hr:({node:o,...a})=>X.jsx("hr",{...a,...r==null?void 0:r.horizontalRule}),a:({node:o,...a})=>X.jsx("a",{...a,...r==null?void 0:r.link,target:"_blank"}),ol:({node:o,...a})=>X.jsx("ol",{...a,...r==null?void 0:r.orderedList}),ul:({node:o,...a})=>X.jsx("ul",{...a,...r==null?void 0:r.unorderedList}),li:({node:o,...a})=>X.jsx("li",{...a,...r==null?void 0:r.listItem}),br:({node:o,...a})=>X.jsx("br",{...a,...r==null?void 0:r.lineBreak}),img:()=>null,pre:({node:o,...a})=>X.jsx("pre",{...a,...r==null?void 0:r.pre})};return X.jsx(zse,{components:i,remarkPlugins:[nce,Jse],children:e})},ice=(e,t,n=120)=>{C.useEffect(()=>{if(e){e.style.height="0px";const r=t?Math.min(e.scrollHeight,n):20;e.style.height=`${r}px`}},[e,t])};var II={},Vb={},PI={};Object.defineProperty(PI,"__esModule",{value:!0});var lh={},oce=se&&se.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(d){try{c(r.next(d))}catch(p){a(p)}}function l(d){try{c(r.throw(d))}catch(p){a(p)}}function c(d){d.done?o(d.value):i(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(lh,"__esModule",{value:!0}),lh.Emitter=void 0;let ace=class{constructor(){this.listeners={}}on(t,n,r=!1){const i=this.listeners[t];i?r?i.unshift(n):i.push(n):this.listeners[t]=[n]}emit(t,n){return oce(this,void 0,void 0,function*(){const r=this.listeners[t];if(r!=null&&r.length){for(const i of r)yield i(n);return!0}else return!1})}};lh.Emitter=ace;var RI={};Object.defineProperty(RI,"__esModule",{value:!0});var DI={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HealthEventType=void 0,function(t){t.Create="create",t.Configure="configure",t.Start="start",t.StartFailure="start-failure",t.Initialize="initialize",t.InitializeFailure="initialize-failure",t.Sleep="sleep",t.Delete="delete"}(e.HealthEventType||(e.HealthEventType={}))})(DI);var NI={};Object.defineProperty(NI,"__esModule",{value:!0});var MI={};Object.defineProperty(MI,"__esModule",{value:!0});var jI={};Object.defineProperty(jI,"__esModule",{value:!0});var LI={};Object.defineProperty(LI,"__esModule",{value:!0}),function(e){var t=se&&se.__createBinding||(Object.create?function(r,i,o,a){a===void 0&&(a=o),Object.defineProperty(r,a,{enumerable:!0,get:function(){return i[o]}})}:function(r,i,o,a){a===void 0&&(a=o),r[a]=i[o]}),n=se&&se.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(PI,e),n(lh,e),n(RI,e),n(DI,e),n(NI,e),n(MI,e),n(jI,e),n(LI,e)}(Vb);var ch={},FI={},Kb={exports:{}},fh={},Gb={},dh={},Ic={},Nu={},ws={},Mu={},ju={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.ERROR_PACKET=uo.PACKET_TYPES_REVERSE=uo.PACKET_TYPES=void 0;const lo=Object.create(null);uo.PACKET_TYPES=lo,lo.open="0",lo.close="1",lo.ping="2",lo.pong="3",lo.message="4",lo.upgrade="5",lo.noop="6";const qI=Object.create(null);uo.PACKET_TYPES_REVERSE=qI,Object.keys(lo).forEach(e=>{qI[lo[e]]=e});const sce={type:"error",data:"parser error"};uo.ERROR_PACKET=sce,Object.defineProperty(ju,"__esModule",{value:!0}),ju.encodePacket=ju.encodePacketToBinary=void 0;const uce=uo,UI=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",BI=typeof ArrayBuffer=="function",zI=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ZI=({type:e,data:t},n,r)=>UI&&t instanceof Blob?n?r(t):HI(t,r):BI&&(t instanceof ArrayBuffer||zI(t))?n?r(t):HI(new Blob([t]),r):r(uce.PACKET_TYPES[e]+(t||""));ju.encodePacket=ZI;const HI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function WI(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Yb;function lce(e,t){if(UI&&e.data instanceof Blob)return e.data.arrayBuffer().then(WI).then(t);if(BI&&(e.data instanceof ArrayBuffer||zI(e.data)))return t(WI(e.data));ZI(e,!1,n=>{Yb||(Yb=new TextEncoder),t(Yb.encode(n))})}ju.encodePacketToBinary=lce;var ph={},Lu={};Object.defineProperty(Lu,"__esModule",{value:!0}),Lu.decode=Lu.encode=void 0;const Fu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Fu.length;e++)Pc[Fu.charCodeAt(e)]=e;const cce=e=>{let t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=Fu[t[n]>>2],i+=Fu[(t[n]&3)<<4|t[n+1]>>4],i+=Fu[(t[n+1]&15)<<2|t[n+2]>>6],i+=Fu[t[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};Lu.encode=cce;const fce=e=>{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r<n;r+=4)o=Pc[e.charCodeAt(r)],a=Pc[e.charCodeAt(r+1)],s=Pc[e.charCodeAt(r+2)],l=Pc[e.charCodeAt(r+3)],d[i++]=o<<2|a>>4,d[i++]=(a&15)<<4|s>>2,d[i++]=(s&3)<<6|l&63;return c};Lu.decode=fce,Object.defineProperty(ph,"__esModule",{value:!0}),ph.decodePacket=void 0;const hh=uo,dce=Lu,pce=typeof ArrayBuffer=="function",hce=(e,t)=>{if(typeof e!="string")return{type:"message",data:VI(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:mce(e.substring(1),t)}:hh.PACKET_TYPES_REVERSE[n]?e.length>1?{type:hh.PACKET_TYPES_REVERSE[n],data:e.substring(1)}:{type:hh.PACKET_TYPES_REVERSE[n]}:hh.ERROR_PACKET};ph.decodePacket=hce;const mce=(e,t)=>{if(pce){const n=(0,dce.decode)(e);return VI(n,t)}else return{base64:!0,data:e}},VI=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=ju;Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const n=ph;Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return n.decodePacket}});const r=uo,i=String.fromCharCode(30),o=(m,h)=>{const y=m.length,v=new Array(y);let w=0;m.forEach((_,b)=>{(0,t.encodePacket)(_,!1,S=>{v[b]=S,++w===y&&h(v.join(i))})})};e.encodePayload=o;const a=(m,h)=>{const y=m.split(i),v=[];for(let w=0;w<y.length;w++){const _=(0,n.decodePacket)(y[w],h);if(v.push(_),_.type==="error")break}return v};e.decodePayload=a;function s(){return new TransformStream({transform(m,h){(0,t.encodePacketToBinary)(m,y=>{const v=y.length;let w;if(v<126)w=new Uint8Array(1),new DataView(w.buffer).setUint8(0,v);else if(v<65536){w=new Uint8Array(3);const _=new DataView(w.buffer);_.setUint8(0,126),_.setUint16(1,v)}else{w=new Uint8Array(9);const _=new DataView(w.buffer);_.setUint8(0,127),_.setBigUint64(1,BigInt(v))}m.data&&typeof m.data!="string"&&(w[0]|=128),h.enqueue(w),h.enqueue(y)})}})}e.createPacketEncoderStream=s;let l;function c(m){return m.reduce((h,y)=>h+y.length,0)}function d(m,h){if(m[0].length===h)return m.shift();const y=new Uint8Array(h);let v=0;for(let w=0;w<h;w++)y[w]=m[0][v++],v===m[0].length&&(m.shift(),v=0);return m.length&&v<m[0].length&&(m[0]=m[0].slice(v)),y}function p(m,h){l||(l=new TextDecoder);const y=[];let v=0,w=-1,_=!1;return new TransformStream({transform(b,S){for(y.push(b);;){if(v===0){if(c(y)<1)break;const A=d(y,1);_=(A[0]&128)===128,w=A[0]&127,w<126?v=3:w===126?v=1:v=2}else if(v===1){if(c(y)<2)break;const A=d(y,2);w=new DataView(A.buffer,A.byteOffset,A.length).getUint16(0),v=3}else if(v===2){if(c(y)<8)break;const A=d(y,8),E=new DataView(A.buffer,A.byteOffset,A.length),T=E.getUint32(0);if(T>Math.pow(2,53-32)-1){S.enqueue(r.ERROR_PACKET);break}w=T*Math.pow(2,32)+E.getUint32(4),v=3}else{if(c(y)<w)break;const A=d(y,w);S.enqueue((0,n.decodePacket)(_?A:l.decode(A),h)),v=0}if(w===0||w>m){S.enqueue(r.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=p,e.protocol=4})(Mu);function Mr(e){if(e)return yce(e)}function yce(e){for(var t in Mr.prototype)e[t]=Mr.prototype[t];return e}Mr.prototype.on=Mr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Mr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Mr.prototype.off=Mr.prototype.removeListener=Mr.prototype.removeAllListeners=Mr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Mr.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},Mr.prototype.emitReserved=Mr.prototype.emit,Mr.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Mr.prototype.hasListeners=function(e){return!!this.listeners(e).length};const qu=Jf(Object.freeze(Object.defineProperty({__proto__:null,Emitter:Mr},Symbol.toStringTag,{value:"Module"})));var xi={},xs={};Object.defineProperty(xs,"__esModule",{value:!0}),xs.globalThisShim=void 0,xs.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),Object.defineProperty(xi,"__esModule",{value:!0}),xi.byteLength=xi.installTimerFunctions=xi.pick=void 0;const ga=xs;function gce(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}xi.pick=gce;const vce=ga.globalThisShim.setTimeout,bce=ga.globalThisShim.clearTimeout;function _ce(e,t){t.useNativeTimers?(e.setTimeoutFn=vce.bind(ga.globalThisShim),e.clearTimeoutFn=bce.bind(ga.globalThisShim)):(e.setTimeoutFn=ga.globalThisShim.setTimeout.bind(ga.globalThisShim),e.clearTimeoutFn=ga.globalThisShim.clearTimeout.bind(ga.globalThisShim))}xi.installTimerFunctions=_ce;const wce=1.33;function xce(e){return typeof e=="string"?Sce(e):Math.ceil((e.byteLength||e.size)*wce)}xi.byteLength=xce;function Sce(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}var Jb={exports:{}},Xb,KI;function Ece(){if(KI)return Xb;KI=1;var e=1e3,t=e*60,n=t*60,r=n*24,i=r*7,o=r*365.25;Xb=function(d,p){p=p||{};var m=typeof d;if(m==="string"&&d.length>0)return a(d);if(m==="number"&&isFinite(d))return p.long?l(d):s(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function a(d){if(d=String(d),!(d.length>100)){var p=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(p){var m=parseFloat(p[1]),h=(p[2]||"ms").toLowerCase();switch(h){case"years":case"year":case"yrs":case"yr":case"y":return m*o;case"weeks":case"week":case"w":return m*i;case"days":case"day":case"d":return m*r;case"hours":case"hour":case"hrs":case"hr":case"h":return m*n;case"minutes":case"minute":case"mins":case"min":case"m":return m*t;case"seconds":case"second":case"secs":case"sec":case"s":return m*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return m;default:return}}}}function s(d){var p=Math.abs(d);return p>=r?Math.round(d/r)+"d":p>=n?Math.round(d/n)+"h":p>=t?Math.round(d/t)+"m":p>=e?Math.round(d/e)+"s":d+"ms"}function l(d){var p=Math.abs(d);return p>=r?c(d,p,r,"day"):p>=n?c(d,p,n,"hour"):p>=t?c(d,p,t,"minute"):p>=e?c(d,p,e,"second"):d+" ms"}function c(d,p,m,h){var y=p>=m*1.5;return Math.round(d/m)+" "+h+(y?"s":"")}return Xb}function Ace(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=i,n.enabled=a,n.humanize=Ece(),n.destroy=c,Object.keys(e).forEach(d=>{n[d]=e[d]}),n.names=[],n.skips=[],n.formatters={};function t(d){let p=0;for(let m=0;m<d.length;m++)p=(p<<5)-p+d.charCodeAt(m),p|=0;return n.colors[Math.abs(p)%n.colors.length]}n.selectColor=t;function n(d){let p,m=null,h,y;function v(...w){if(!v.enabled)return;const _=v,b=Number(new Date),S=b-(p||b);_.diff=S,_.prev=p,_.curr=b,p=b,w[0]=n.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let A=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(T,j)=>{if(T==="%%")return"%";A++;const L=n.formatters[j];if(typeof L=="function"){const F=w[A];T=L.call(_,F),w.splice(A,1),A--}return T}),n.formatArgs.call(_,w),(_.log||n.log).apply(_,w)}return v.namespace=d,v.useColors=n.useColors(),v.color=n.selectColor(d),v.extend=r,v.destroy=n.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(h!==n.namespaces&&(h=n.namespaces,y=n.enabled(d)),y),set:w=>{m=w}}),typeof n.init=="function"&&n.init(v),v}function r(d,p){const m=n(this.namespace+(typeof p>"u"?":":p)+d);return m.log=this.log,m}function i(d){n.save(d),n.namespaces=d,n.names=[],n.skips=[];let p;const m=(typeof d=="string"?d:"").split(/[\s,]+/),h=m.length;for(p=0;p<h;p++)m[p]&&(d=m[p].replace(/\*/g,".*?"),d[0]==="-"?n.skips.push(new RegExp("^"+d.slice(1)+"$")):n.names.push(new RegExp("^"+d+"$")))}function o(){const d=[...n.names.map(s),...n.skips.map(s).map(p=>"-"+p)].join(",");return n.enable(""),d}function a(d){if(d[d.length-1]==="*")return!0;let p,m;for(p=0,m=n.skips.length;p<m;p++)if(n.skips[p].test(d))return!1;for(p=0,m=n.names.length;p<m;p++)if(n.names[p].test(d))return!0;return!1}function s(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function l(d){return d instanceof Error?d.stack||d.message:d}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var Cce=Ace;(function(e,t){t.formatArgs=r,t.save=i,t.load=o,t.useColors=n,t.storage=a(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;l.splice(1,0,c,"color: inherit");let d=0,p=0;l[0].replace(/%[a-zA-Z%]/g,m=>{m!=="%%"&&(d++,m==="%c"&&(p=d))}),l.splice(p,0,c)}t.log=console.debug||console.log||(()=>{});function i(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function o(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof process<"u"&&"env"in process&&(l=process.env.DEBUG),l}function a(){try{return localStorage}catch{}}e.exports=Cce(t);const{formatters:s}=e.exports;s.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(Jb,Jb.exports);var co=Jb.exports,Ss={};Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.decode=Ss.encode=void 0;function Oce(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}Ss.encode=Oce;function Tce(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}Ss.decode=Tce;var $ce=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ws,"__esModule",{value:!0}),ws.Transport=void 0;const kce=Mu,Ice=qu,Pce=xi,Rce=$ce(co),Dce=Ss,Nce=(0,Rce.default)("engine.io-client:transport");class Mce extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class jce extends Ice.Emitter{constructor(t){super(),this.writable=!1,(0,Pce.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new Mce(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"?this.write(t):Nce("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=(0,kce.decodePacket)(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=(0,Dce.encode)(t);return n.length?"?"+n:""}}ws.Transport=jce;var jo={};Object.defineProperty(jo,"__esModule",{value:!0}),jo.yeast=jo.decode=jo.encode=void 0;const GI="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),mh=64,YI={};let JI=0,va=0,XI;function Qb(e){let t="";do t=GI[e%mh]+t,e=Math.floor(e/mh);while(e>0);return t}jo.encode=Qb;function Lce(e){let t=0;for(va=0;va<e.length;va++)t=t*mh+YI[e.charAt(va)];return t}jo.decode=Lce;function Fce(){const e=Qb(+new Date);return e!==XI?(JI=0,XI=e):e+"."+Qb(JI++)}for(jo.yeast=Fce;va<mh;va++)YI[GI[va]]=va;var Uu={},yh={};Object.defineProperty(yh,"__esModule",{value:!0}),yh.hasCORS=void 0;let QI=!1;try{QI=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}yh.hasCORS=QI,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.createCookieJar=Uu.XHR=void 0;const qce=yh,Uce=xs;function Bce(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||qce.hasCORS))return new XMLHttpRequest}catch{}if(!t)try{return new Uce.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}Uu.XHR=Bce;function zce(){}Uu.createCookieJar=zce;var Zce=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.Request=Nu.Polling=void 0;const Hce=ws,Wce=Zce(co),Vce=jo,eP=Mu,e0=Uu,Kce=qu,tP=xi,Gce=xs,Wr=(0,Wce.default)("engine.io-client:polling");function Yce(){}const Jce=function(){return new e0.XHR({xdomain:!1}).responseType!=null}();class Xce extends Hce.Transport{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}const n=t&&t.forceBase64;this.supportsBinary=Jce&&!n,this.opts.withCredentials&&(this.cookieJar=(0,e0.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{Wr("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(Wr("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){Wr("pre-pause polling complete"),--r||n()})),this.writable||(Wr("we are currently writing - waiting to pause"),r++,this.once("drain",function(){Wr("pre-pause writing complete"),--r||n()}))}else n()}poll(){Wr("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){Wr("polling got data %s",t);const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};(0,eP.decodePayload)(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():Wr('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{Wr("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(Wr("transport open - closing"),t()):(Wr("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,eP.encodePayload)(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=(0,Vce.yeast)()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Es(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){Wr("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}Nu.Polling=Xce;let Es=class og extends Kce.Emitter{constructor(t,n){super(),(0,tP.installTimerFunctions)(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=(0,tP.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new e0.XHR(n);try{Wr("xhr open %s: %s",this.method,this.uri),r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},Wr("xhr data %s",this.data),r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=og.requestsCount++,og.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Yce,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete og.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};if(Nu.Request=Es,Es.requestsCount=0,Es.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",nP);else if(typeof addEventListener=="function"){const e="onpagehide"in Gce.globalThisShim?"pagehide":"unload";addEventListener(e,nP,!1)}}function nP(){for(let e in Es.requests)Es.requests.hasOwnProperty(e)&&Es.requests[e].abort()}var gh={},si={};Object.defineProperty(si,"__esModule",{value:!0}),si.defaultBinaryType=si.usingBrowserWebSocket=si.WebSocket=si.nextTick=void 0;const rP=xs;si.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),si.WebSocket=rP.globalThisShim.WebSocket||rP.globalThisShim.MozWebSocket,si.usingBrowserWebSocket=!0,si.defaultBinaryType="arraybuffer";var Qce=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gh,"__esModule",{value:!0}),gh.WS=void 0;const efe=ws,tfe=jo,nfe=xi,ba=si,rfe=Qce(co),ife=Mu,ofe=(0,rfe.default)("engine.io-client:websocket"),iP=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class afe extends efe.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=iP?{}:(0,nfe.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=ba.usingBrowserWebSocket&&!iP?n?new ba.WebSocket(t,n):new ba.WebSocket(t):new ba.WebSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;(0,ife.encodePacket)(r,this.supportsBinary,o=>{const a={};ba.usingBrowserWebSocket||(r.options&&(a.compress=r.options.compress),this.opts.perMessageDeflate&&(typeof o=="string"?Buffer.byteLength(o):o.length)<this.opts.perMessageDeflate.threshold&&(a.compress=!1));try{ba.usingBrowserWebSocket?this.ws.send(o):this.ws.send(o,a)}catch{ofe("websocket closed before onclose event")}i&&(0,ba.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=(0,tfe.yeast)()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!ba.WebSocket}}gh.WS=afe;var vh={},sfe=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vh,"__esModule",{value:!0}),vh.WT=void 0;const ufe=ws,lfe=si,oP=Mu,Rc=(0,sfe(co).default)("engine.io-client:webtransport");class cfe extends ufe.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{Rc("transport closed gracefully"),this.onClose()}).catch(t=>{Rc("transport closed due to %s",t),this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=(0,oP.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=(0,oP.createPacketEncoderStream)();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:s,value:l})=>{if(s){Rc("session is closed");return}Rc("received chunk: %o",l),this.onPacket(l),o()}).catch(s=>{Rc("an error occurred while reading: %s",s)})};o();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this.writer.write(a).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this.writer.write(r).then(()=>{i&&(0,lfe.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}vh.WT=cfe,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.transports=void 0;const ffe=Nu,dfe=gh,pfe=vh;Ic.transports={websocket:dfe.WS,webtransport:pfe.WT,polling:ffe.Polling};var Dc={};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.parse=void 0;const hfe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,mfe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function yfe(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=hfe.exec(e||""),o={},a=14;for(;a--;)o[mfe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=gfe(o,o.path),o.queryKey=vfe(o,o.query),o}Dc.parse=yfe;function gfe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function vfe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}var bfe=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dh,"__esModule",{value:!0}),dh.Socket=void 0;const _fe=Ic,aP=xi,wfe=Ss,sP=Dc,xfe=bfe(co),Sfe=qu,uP=Mu,Efe=si,In=(0,xfe.default)("engine.io-client:socket");let lP=class Ll extends Sfe.Emitter{constructor(t,n={}){super(),this.binaryType=Efe.defaultBinaryType,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=(0,sP.parse)(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=(0,sP.parse)(n.host).host),(0,aP.installTimerFunctions)(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,wfe.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){In('creating transport "%s"',t);const n=Object.assign({},this.opts.query);n.EIO=uP.protocol,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return In("options: %j",r),new _fe.transports[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Ll.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(n){In("error while creating transport: %s",n),this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){In("setting transport %s",t.name),this.transport&&(In("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){In('probing transport "%s"',t);let n=this.createTransport(t),r=!1;Ll.priorWebsocketSuccess=!1;const i=()=>{r||(In('probe transport "%s" opened',t),n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(In('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ll.priorWebsocketSuccess=n.name==="websocket",In('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{r||this.readyState!=="closed"&&(In("changing transport and sending upgrade packet"),d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{In('probe transport "%s" failed',t);const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,d(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),In('probe transport "%s" failed because of error: %s',t,p),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function c(p){n&&p.name!==n.name&&(In('"%s" works - aborting "%s"',p.name,n.name),o())}const d=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",c),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(In("socket open"),this.readyState="open",Ll.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){In("starting upgrade probes");let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(In('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}else In('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();In("flushing %d packets in socket",t.length),this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=(0,aP.byteLength)(i)),r>0&&n>this.maxPayload)return In("only send %d out of %d packets",r,this.writeBuffer.length),this.writeBuffer.slice(0,r);n+=2}return In("payload size is %d (max: %d)",n,this.maxPayload),this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),In("socket closing - telling transport to close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){In("socket error %j",t),Ll.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(In('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}};dh.Socket=lP,lP.protocol=uP.protocol,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=dh;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var n=ws;Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var r=Ic;Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var i=xi;Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return i.installTimerFunctions}});var o=Dc;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return o.parse}});var a=si;Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return a.nextTick}})}(Gb);var Afe=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fh,"__esModule",{value:!0}),fh.url=void 0;const Cfe=Gb,cP=Afe(co).default("socket.io-client:url");function Ofe(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(cP("protocol-less url %s",e),typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),cP("parse %s",e),r=Cfe.parse(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}fh.url=Ofe;var bh={},Nc={},_h={},Bu={},As={};Object.defineProperty(As,"__esModule",{value:!0}),As.hasBinary=As.isBinary=void 0;const Tfe=typeof ArrayBuffer=="function",$fe=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,fP=Object.prototype.toString,kfe=typeof Blob=="function"||typeof Blob<"u"&&fP.call(Blob)==="[object BlobConstructor]",Ife=typeof File=="function"||typeof File<"u"&&fP.call(File)==="[object FileConstructor]";function dP(e){return Tfe&&(e instanceof ArrayBuffer||$fe(e))||kfe&&e instanceof Blob||Ife&&e instanceof File}As.isBinary=dP;function wh(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(wh(e[n]))return!0;return!1}if(dP(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return wh(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&wh(e[n]))return!0;return!1}As.hasBinary=wh,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.reconstructPacket=Bu.deconstructPacket=void 0;const Pfe=As;function Rfe(e){const t=[],n=e.data,r=e;return r.data=t0(n,t),r.attachments=t.length,{packet:r,buffers:t}}Bu.deconstructPacket=Rfe;function t0(e,t){if(!e)return e;if((0,Pfe.isBinary)(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=t0(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=t0(e[r],t));return n}return e}function Dfe(e,t){return e.data=n0(e.data,t),delete e.attachments,e}Bu.reconstructPacket=Dfe;function n0(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=n0(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=n0(e[n],t));return e}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=qu,n=Bu,r=As,o=(0,co.default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var s;(function(m){m[m.CONNECT=0]="CONNECT",m[m.DISCONNECT=1]="DISCONNECT",m[m.EVENT=2]="EVENT",m[m.ACK=3]="ACK",m[m.CONNECT_ERROR=4]="CONNECT_ERROR",m[m.BINARY_EVENT=5]="BINARY_EVENT",m[m.BINARY_ACK=6]="BINARY_ACK"})(s=e.PacketType||(e.PacketType={}));class l{constructor(h){this.replacer=h}encode(h){return o("encoding packet %j",h),(h.type===s.EVENT||h.type===s.ACK)&&(0,r.hasBinary)(h)?this.encodeAsBinary({type:h.type===s.EVENT?s.BINARY_EVENT:s.BINARY_ACK,nsp:h.nsp,data:h.data,id:h.id}):[this.encodeAsString(h)]}encodeAsString(h){let y=""+h.type;return(h.type===s.BINARY_EVENT||h.type===s.BINARY_ACK)&&(y+=h.attachments+"-"),h.nsp&&h.nsp!=="/"&&(y+=h.nsp+","),h.id!=null&&(y+=h.id),h.data!=null&&(y+=JSON.stringify(h.data,this.replacer)),o("encoded %j as %s",h,y),y}encodeAsBinary(h){const y=(0,n.deconstructPacket)(h),v=this.encodeAsString(y.packet),w=y.buffers;return w.unshift(v),w}}e.Encoder=l;function c(m){return Object.prototype.toString.call(m)==="[object Object]"}class d extends t.Emitter{constructor(h){super(),this.reviver=h}add(h){let y;if(typeof h=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");y=this.decodeString(h);const v=y.type===s.BINARY_EVENT;v||y.type===s.BINARY_ACK?(y.type=v?s.EVENT:s.ACK,this.reconstructor=new p(y),y.attachments===0&&super.emitReserved("decoded",y)):super.emitReserved("decoded",y)}else if((0,r.isBinary)(h)||h.base64)if(this.reconstructor)y=this.reconstructor.takeBinaryData(h),y&&(this.reconstructor=null,super.emitReserved("decoded",y));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+h)}decodeString(h){let y=0;const v={type:Number(h.charAt(0))};if(s[v.type]===void 0)throw new Error("unknown packet type "+v.type);if(v.type===s.BINARY_EVENT||v.type===s.BINARY_ACK){const _=y+1;for(;h.charAt(++y)!=="-"&&y!=h.length;);const b=h.substring(_,y);if(b!=Number(b)||h.charAt(y)!=="-")throw new Error("Illegal attachments");v.attachments=Number(b)}if(h.charAt(y+1)==="/"){const _=y+1;for(;++y&&!(h.charAt(y)===","||y===h.length););v.nsp=h.substring(_,y)}else v.nsp="/";const w=h.charAt(y+1);if(w!==""&&Number(w)==w){const _=y+1;for(;++y;){const b=h.charAt(y);if(b==null||Number(b)!=b){--y;break}if(y===h.length)break}v.id=Number(h.substring(_,y+1))}if(h.charAt(++y)){const _=this.tryParse(h.substr(y));if(d.isPayloadValid(v.type,_))v.data=_;else throw new Error("invalid payload")}return o("decoded %s as %j",h,v),v}tryParse(h){try{return JSON.parse(h,this.reviver)}catch{return!1}}static isPayloadValid(h,y){switch(h){case s.CONNECT:return c(y);case s.DISCONNECT:return y===void 0;case s.CONNECT_ERROR:return typeof y=="string"||c(y);case s.EVENT:case s.BINARY_EVENT:return Array.isArray(y)&&(typeof y[0]=="number"||typeof y[0]=="string"&&a.indexOf(y[0])===-1);case s.ACK:case s.BINARY_ACK:return Array.isArray(y)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=d;class p{constructor(h){this.packet=h,this.buffers=[],this.reconPack=h}takeBinaryData(h){if(this.buffers.push(h),this.buffers.length===this.reconPack.attachments){const y=(0,n.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),y}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}})(_h);var Mc={};Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.on=void 0;function Nfe(e,t,n){return e.on(t,n),function(){e.off(t,n)}}Mc.on=Nfe;var Mfe=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.Socket=void 0;const Fi=_h,xh=Mc,jfe=qu,Xn=Mfe(co).default("socket.io-client:socket"),Lfe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Ffe extends jfe.Emitter{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[xh.on(t,"open",this.onopen.bind(this)),xh.on(t,"packet",this.onpacket.bind(this)),xh.on(t,"error",this.onerror.bind(this)),xh.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(Lfe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:Fi.PacketType.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++;Xn("emitting packet with ack id %d",a);const s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)?Xn("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&(Xn("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(a,1));Xn("event with ack id %d has timed out after %d ms",t,i),n.call(this,new Error("operation has timed out"))},i);this.acks[t]=(...a)=>{this.io.clearTimeoutFn(o),n.apply(this,[null,...a])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((a,s)=>r?a?o(a):i(s):i(a)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(Xn("packet [%d] is discarded after %d tries",r.id,r.tryCount),this._queue.shift(),n&&n(i)):(Xn("packet [%d] was successfully sent",r.id),this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(Xn("draining queue"),!this.connected||this._queue.length===0)return;const n=this._queue[0];if(n.pending&&!t){Xn("packet [%d] has already been sent and is waiting for an ack",n.id);return}n.pending=!0,n.tryCount++,Xn("sending packet [%d] (try n°%d)",n.id,n.tryCount),this.flags=n.flags,this.emit.apply(this,n.args)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){Xn("transport is open - connecting"),typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Fi.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){Xn("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Fi.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Fi.PacketType.EVENT:case Fi.PacketType.BINARY_EVENT:this.onevent(t);break;case Fi.PacketType.ACK:case Fi.PacketType.BINARY_ACK:this.onack(t);break;case Fi.PacketType.DISCONNECT:this.ondisconnect();break;case Fi.PacketType.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];Xn("emitting event %j",n),t.id!=null&&(Xn("attaching ack callback to event"),n.push(this.ack(t.id))),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,Xn("sending ack %j",i),n.packet({type:Fi.PacketType.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"?(Xn("calling ack %s with %j",t.id,t.data),n.apply(this,t.data),delete this.acks[t.id]):Xn("bad ack %s",t.id)}onconnect(t,n){Xn("socket connected with id %s",t),this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){Xn("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(Xn("performing disconnect (%s)",this.nsp),this.packet({type:Fi.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}Nc.Socket=Ffe;var Sh={};Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.Backoff=void 0;function zu(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Sh.Backoff=zu,zu.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},zu.prototype.reset=function(){this.attempts=0},zu.prototype.setMin=function(e){this.ms=e},zu.prototype.setMax=function(e){this.max=e},zu.prototype.setJitter=function(e){this.jitter=e};var qfe=se&&se.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Ufe=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Bfe=se&&se.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&qfe(t,e,n);return Ufe(t,e),t},zfe=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bh,"__esModule",{value:!0}),bh.Manager=void 0;const r0=Gb,Zfe=Nc,Hfe=Bfe(_h),Cs=Mc,Wfe=Sh,Vfe=qu,pr=zfe(co).default("socket.io-client:manager");class Kfe extends Vfe.Emitter{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,r0.installTimerFunctions(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Wfe.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Hfe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(pr("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;pr("opening %s",this.uri),this.engine=new r0.Socket(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Cs.on(n,"open",function(){r.onopen(),t&&t()}),o=s=>{pr("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=Cs.on(n,"error",o);if(this._timeout!==!1){const s=this._timeout;pr("connect attempt will timeout after %d",s);const l=this.setTimeoutFn(()=>{pr("connect attempt timed out after %d",s),i(),o(new Error("timeout")),n.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){pr("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Cs.on(t,"ping",this.onping.bind(this)),Cs.on(t,"data",this.ondata.bind(this)),Cs.on(t,"error",this.onerror.bind(this)),Cs.on(t,"close",this.onclose.bind(this)),Cs.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){r0.nextTick(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){pr("error",t),this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Zfe.Socket(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active){pr("socket %s is still active, skipping close",r);return}this._close()}_packet(t){pr("writing packet %j",t);const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){pr("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){pr("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){pr("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)pr("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();pr("will wait %dms before reconnect attempt",n),this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(pr("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(pr("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):(pr("reconnect success"),t.onreconnect())}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}bh.Manager=Kfe,function(e,t){var n=se&&se.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const r=fh,i=bh;Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return i.Manager}});const o=Nc;Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return o.Socket}});const s=n(co).default("socket.io-client"),l={};function c(p,m){typeof p=="object"&&(m=p,p=void 0),m=m||{};const h=r.url(p,m.path||"/socket.io"),y=h.source,v=h.id,w=h.path,_=l[v]&&w in l[v].nsps,b=m.forceNew||m["force new connection"]||m.multiplex===!1||_;let S;return b?(s("ignoring socket cache for %s",y),S=new i.Manager(y,m)):(l[v]||(s("new io instance for %s",y),l[v]=new i.Manager(y,m)),S=l[v]),h.query&&!m.query&&(m.query=h.queryKey),S.socket(h.path,m)}t.io=c,t.connect=c,t.default=c,Object.assign(c,{Manager:i.Manager,Socket:o.Socket,io:c,connect:c});var d=_h;Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return d.protocol}}),e.exports=c}(Kb,Kb.exports);var Gfe=Kb.exports;(function(e){var t=se&&se.__awaiter||function(l,c,d,p){function m(h){return h instanceof d?h:new d(function(y){y(h)})}return new(d||(d=Promise))(function(h,y){function v(b){try{_(p.next(b))}catch(S){y(S)}}function w(b){try{_(p.throw(b))}catch(S){y(S)}}function _(b){b.done?h(b.value):m(b.value).then(v,w)}_((p=p.apply(l,c||[])).next())})},n=se&&se.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.SocketComEmitter=e.SocketComEvents=e.SocketCom=void 0;const r=Vb,i=n(Gfe);class o{constructor(c){this.url=c,this.pending={},this.emitter=new s,this.events=this.emitter}connect(c,d){return t(this,void 0,void 0,function*(){return new Promise((p,m)=>{this.disconnect(),this.socket=(0,i.default)(this.url,{transports:["websocket"],auth:c,autoConnect:!1,query:d});const h=setTimeout(()=>{m("connection timed out")},5e3);this.socket.on("login",y=>t(this,void 0,void 0,function*(){clearTimeout(h),p(y)})),this.socket.on("connect_error",y=>{var v;(v=this.socket)===null||v===void 0||v.close(),clearTimeout(h),m(y.message)}),this.socket.on("message",y=>t(this,void 0,void 0,function*(){var v;this.pending[y.request]&&(!((v=y.data)===null||v===void 0)&&v.error?this.pending[y.request].reject(new Error(y.data.message)):this.pending[y.request].resolve(y.data),delete this.pending[y.request]),yield this.emitter.emit(a.Message,y)})),this.socket.connect()})})}disconnect(){var c;this.socket&&!(!((c=this.socket)===null||c===void 0)&&c.disconnected)&&this.socket.disconnect()}request(c,d){var p;return t(this,void 0,void 0,function*(){if(!(!((p=this.socket)===null||p===void 0)&&p.connected))throw new Error("Client is disconnected");const m=this.random(32),h=new Promise((y,v)=>{this.pending[m]={resolve:y,reject:v}});return this.socket.send({request:m,type:c,data:d}),h})}random(c){const d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let p="";for(let m=0;m<c;m++)p+=d.charAt(Math.floor(Math.random()*d.length));return p}}e.SocketCom=o;var a;(function(l){l.Message="message"})(a=e.SocketComEvents||(e.SocketComEvents={}));class s extends r.Emitter{}e.SocketComEmitter=s})(FI);var Eh={},Yfe=se&&se.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(d){try{c(r.next(d))}catch(p){a(p)}}function l(d){try{c(r.throw(d))}catch(p){a(p)}}function c(d){d.done?o(d.value):i(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(Eh,"__esModule",{value:!0}),Eh.SocketEmitter=void 0;class Jfe{constructor(){this.listeners={}}on(t,n){const r=this.listeners[t];r?r.push(n):this.listeners[t]=[n]}removeListeners(t){this.listeners[t]=[]}emit(t,n){return Yfe(this,void 0,void 0,function*(){const r=this.listeners[t];if(r!=null&&r.length){for(const i of r)yield i(n);return!0}else return!1})}}Eh.SocketEmitter=Jfe;var Vr=se&&se.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(d){try{c(r.next(d))}catch(p){a(p)}}function l(d){try{c(r.throw(d))}catch(p){a(p)}}function c(d){d.done?o(d.value):i(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(ch,"__esModule",{value:!0}),ch.MessagingSocket=void 0;const pP=FI,Xfe=Eh;class Qfe extends Xfe.SocketEmitter{constructor(t){super(),this.clientId=t.clientId,this.com=new pP.SocketCom(t.url),this.com.events.on(pP.SocketComEvents.Message,n=>Vr(this,void 0,void 0,function*(){n.type==="message.new"&&(yield this.emit("message",n.data.message))}))}get creds(){return this._creds}get userId(){var t;return(t=this._creds)===null||t===void 0?void 0:t.userId}get conversationId(){return this._conversationId}connect(t,n){return Vr(this,void 0,void 0,function*(){const r=n?{userData:JSON.stringify(n)}:void 0,i=yield this.com.connect({clientId:this.clientId,creds:t},r);return i.userId===(t==null?void 0:t.userId)&&!i.userToken&&(i.userToken=t.userToken),this._creds=i,yield this.emit("connect",this._creds),yield this.emit("user",this._creds.userId),i})}disconnect(){return Vr(this,void 0,void 0,function*(){this.com.disconnect(),yield this.emit("disconnect",void 0)})}getUser(){return Vr(this,void 0,void 0,function*(){return this.request("users.get",{})})}switchConversation(t){return Vr(this,void 0,void 0,function*(){this._conversationId=t,yield this.emit("conversation",this._conversationId)})}createConversation(t){return Vr(this,void 0,void 0,function*(){const n=yield this.request("conversations.create",{});return(t==null?void 0:t.switch)!==!1&&(yield this.switchConversation(n.id)),n})}startConversation(t){return Vr(this,void 0,void 0,function*(){yield this.request("conversations.start",{id:t||this._conversationId})})}getConversation(t){return Vr(this,void 0,void 0,function*(){return this.request("conversations.get",{id:t||this._conversationId})})}deleteConversation(t){return Vr(this,void 0,void 0,function*(){const n=yield this.request("conversations.delete",{id:t||this._conversationId});return n&&(yield this.switchConversation(void 0)),n})}listConversations(t){return Vr(this,void 0,void 0,function*(){return this.request("conversations.list",{limit:t||20})})}sendText(t){return Vr(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:{type:"text",text:t}})})}sendPayload(t){return Vr(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:t})})}listMessages(t){return Vr(this,void 0,void 0,function*(){return this.request("messages.list",{conversationId:this._conversationId,limit:t||20})})}sendFeedback(t,n){return Vr(this,void 0,void 0,function*(){yield this.request("messages.feedback",{messageId:t,feedback:n})})}request(t,n){return this.com.request(t,n)}}ch.MessagingSocket=Qfe,function(e){var t=se&&se.__createBinding||(Object.create?function(r,i,o,a){a===void 0&&(a=o),Object.defineProperty(r,a,{enumerable:!0,get:function(){return i[o]}})}:function(r,i,o,a){a===void 0&&(a=o),r[a]=i[o]}),n=se&&se.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(Vb,e),n(ch,e)}(II);class ede{constructor(t){R(this,"socket");R(this,"clientId");R(this,"apiUrl");R(this,"userId");R(this,"conversationId");R(this,"userToken");R(this,"connected",!1);R(this,"emitter");R(this,"on");R(this,"mode","messaging");this.socket=new II.MessagingSocket(t),this.emitter=new nb,this.clientId=t.clientId,this.apiUrl=t.url,this.on=this.emitter.on.bind(this.emitter),this.socket.on("message",n=>{const r=n.payload;if(r.type==="trigger")switch(r.trigger.type){case"webchat-visibility":this.emitter.emit("webchatVisibility",r.trigger.visibility);break;case"webchat-config":this.emitter.emit("webchatConfig",r.trigger.config);break;case"custom-event":this.emitter.emit("customEvent",r.trigger.event);break}else{const i=Bp.parse(r),{payload:o,disableInput:a}=Xv(i);this.emitter.emit("message",{...n,payload:o,disableInput:a})}}),this.socket.on("conversation",n=>{this.emitter.emit("conversation",n)})}async connect(t,n){if(this.connected)return;this.connected=!0;const r=await this.socket.connect(t,n).catch(i=>{throw this.connected=!1,i});return this.userId=r.userId,this.userToken=r.userToken,r}async disconnect(){await this.socket.disconnect(),this.connected=!1}async getUser(){throw new Error("Get user is not supported in messaging mode")}async updateUser(){throw new Error("Update user is not supported in messaging mode")}async sendFile(t){throw new Error("Send file is not supported in messaging mode")}async sendMessage(t){this.conversationId||await this.newConversation(),await this.socket.sendText(t),this.emitter.emit("messageSent",t)}async sendEvent(t){this.conversationId||await this.newConversation(),await this.socket.sendPayload({type:"trigger",payload:t})}async switchConversation(t){await this.socket.switchConversation(t),this.conversationId=t}async conversationExists(t){return(await this.socket.listConversations()).some(r=>r.id===t)}async newConversation(){const{id:t}=await this.socket.createConversation();await this.socket.startConversation(),this.conversationId=t}async listMessages(t){return(await this.socket.listMessages(t)).map(r=>{const i=Bp.parse(r.payload),{payload:o,disableInput:a}=Xv(i);return{...r,payload:o,disableInput:a}})}}function hP(e,t){return function(){return e.apply(t,arguments)}}const{toString:mP}=Object.prototype,{getPrototypeOf:i0}=Object,o0=(e=>t=>{const n=mP.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Lo=e=>(e=e.toLowerCase(),t=>o0(t)===e),Ah=e=>t=>typeof t===e,{isArray:Zu}=Array,jc=Ah("undefined");function tde(e){return e!==null&&!jc(e)&&e.constructor!==null&&!jc(e.constructor)&&Os(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yP=Lo("ArrayBuffer");function nde(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&yP(e.buffer),t}const rde=Ah("string"),Os=Ah("function"),gP=Ah("number"),a0=e=>e!==null&&typeof e=="object",ide=e=>e===!0||e===!1,Ch=e=>{if(o0(e)!=="object")return!1;const t=i0(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ode=Lo("Date"),ade=Lo("File"),sde=Lo("Blob"),ude=Lo("FileList"),lde=e=>a0(e)&&Os(e.pipe),cde=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||mP.call(e)===t||Os(e.toString)&&e.toString()===t)},fde=Lo("URLSearchParams"),dde=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Lc(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Zu(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],t.call(null,e[s],s,e)}}function vP(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const bP=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),_P=e=>!jc(e)&&e!==bP;function s0(){const{caseless:e}=_P(this)&&this||{},t={},n=(r,i)=>{const o=e&&vP(t,i)||i;Ch(t[o])&&Ch(r)?t[o]=s0(t[o],r):Ch(r)?t[o]=s0({},r):Zu(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Lc(arguments[r],n);return t}const pde=(e,t,n,{allOwnKeys:r}={})=>(Lc(t,(i,o)=>{n&&Os(i)?e[o]=hP(i,n):e[o]=i},{allOwnKeys:r}),e),hde=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mde=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},yde=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&i0(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gde=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},vde=e=>{if(!e)return null;if(Zu(e))return e;let t=e.length;if(!gP(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},bde=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&i0(Uint8Array)),_de=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},wde=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},xde=Lo("HTMLFormElement"),Sde=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),wP=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ede=Lo("RegExp"),xP=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Lc(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},be={isArray:Zu,isArrayBuffer:yP,isBuffer:tde,isFormData:cde,isArrayBufferView:nde,isString:rde,isNumber:gP,isBoolean:ide,isObject:a0,isPlainObject:Ch,isUndefined:jc,isDate:ode,isFile:ade,isBlob:sde,isRegExp:Ede,isFunction:Os,isStream:lde,isURLSearchParams:fde,isTypedArray:bde,isFileList:ude,forEach:Lc,merge:s0,extend:pde,trim:dde,stripBOM:hde,inherits:mde,toFlatObject:yde,kindOf:o0,kindOfTest:Lo,endsWith:gde,toArray:vde,forEachEntry:_de,matchAll:wde,isHTMLForm:xde,hasOwnProperty:wP,hasOwnProp:wP,reduceDescriptors:xP,freezeMethods:e=>{xP(e,(t,n)=>{if(Os(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Os(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Zu(e)?r(e):r(String(e).split(t)),n},toCamelCase:Sde,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:vP,global:bP,isContextDefined:_P,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(a0(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Zu(r)?[]:{};return Lc(r,(a,s)=>{const l=n(a,i+1);!jc(l)&&(o[s]=l)}),t[i]=void 0,o}}return r};return n(e,0)}};function nn(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}be.inherits(nn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:be.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const SP=nn.prototype,EP={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{EP[e]={value:e}}),Object.defineProperties(nn,EP),Object.defineProperty(SP,"isAxiosError",{value:!0}),nn.from=(e,t,n,r,i,o)=>{const a=Object.create(SP);return be.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),nn.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};var Ade=typeof self=="object"?self.FormData:window.FormData;const Cde=Oo(Ade);function u0(e){return be.isPlainObject(e)||be.isArray(e)}function AP(e){return be.endsWith(e,"[]")?e.slice(0,-2):e}function CP(e,t,n){return e?e.concat(t).map(function(i,o){return i=AP(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Ode(e){return be.isArray(e)&&!e.some(u0)}const Tde=be.toFlatObject(be,{},null,function(t){return/^is[A-Z]/.test(t)});function $de(e){return e&&be.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Oh(e,t,n){if(!be.isObject(e))throw new TypeError("target must be an object");t=t||new(Cde||FormData),n=be.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!be.isUndefined(w[v])});const r=n.metaTokens,i=n.visitor||d,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&$de(t);if(!be.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(be.isDate(y))return y.toISOString();if(!l&&be.isBlob(y))throw new nn("Blob is not supported. Use a Buffer instead.");return be.isArrayBuffer(y)||be.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function d(y,v,w){let _=y;if(y&&!w&&typeof y=="object"){if(be.endsWith(v,"{}"))v=r?v:v.slice(0,-2),y=JSON.stringify(y);else if(be.isArray(y)&&Ode(y)||be.isFileList(y)||be.endsWith(v,"[]")&&(_=be.toArray(y)))return v=AP(v),_.forEach(function(S,A){!(be.isUndefined(S)||S===null)&&t.append(a===!0?CP([v],A,o):a===null?v:v+"[]",c(S))}),!1}return u0(y)?!0:(t.append(CP(w,v,o),c(y)),!1)}const p=[],m=Object.assign(Tde,{defaultVisitor:d,convertValue:c,isVisitable:u0});function h(y,v){if(!be.isUndefined(y)){if(p.indexOf(y)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(y),be.forEach(y,function(_,b){(!(be.isUndefined(_)||_===null)&&i.call(t,_,be.isString(b)?b.trim():b,v,m))===!0&&h(_,v?v.concat(b):[b])}),p.pop()}}if(!be.isObject(e))throw new TypeError("data must be an object");return h(e),t}function OP(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function l0(e,t){this._pairs=[],e&&Oh(e,this,t)}const TP=l0.prototype;TP.append=function(t,n){this._pairs.push([t,n])},TP.toString=function(t){const n=t?function(r){return t.call(this,r,OP)}:OP;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function kde(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $P(e,t,n){if(!t)return e;const r=n&&n.encode||kde,i=n&&n.serialize;let o;if(i?o=i(t,n):o=be.isURLSearchParams(t)?t.toString():new l0(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Ide{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){be.forEach(this.handlers,function(r){r!==null&&t(r)})}}const kP=Ide,IP={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Pde=typeof URLSearchParams<"u"?URLSearchParams:l0,Rde=FormData,Dde=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Nde=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),fo={isBrowser:!0,classes:{URLSearchParams:Pde,FormData:Rde,Blob},isStandardBrowserEnv:Dde,isStandardBrowserWebWorkerEnv:Nde,protocols:["http","https","file","blob","url","data"]};function Mde(e,t){return Oh(e,new fo.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return fo.isNode&&be.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function jde(e){return be.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Lde(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function PP(e){function t(n,r,i,o){let a=n[o++];const s=Number.isFinite(+a),l=o>=n.length;return a=!a&&be.isArray(i)?i.length:a,l?(be.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!be.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&be.isArray(i[a])&&(i[a]=Lde(i[a])),!s)}if(be.isFormData(e)&&be.isFunction(e.entries)){const n={};return be.forEachEntry(e,(r,i)=>{t(jde(r),i,n,0)}),n}return null}const Fde={"Content-Type":void 0};function qde(e,t,n){if(be.isString(e))try{return(t||JSON.parse)(e),be.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Th={transitional:IP,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=be.isObject(t);if(o&&be.isHTMLForm(t)&&(t=new FormData(t)),be.isFormData(t))return i&&i?JSON.stringify(PP(t)):t;if(be.isArrayBuffer(t)||be.isBuffer(t)||be.isStream(t)||be.isFile(t)||be.isBlob(t))return t;if(be.isArrayBufferView(t))return t.buffer;if(be.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Mde(t,this.formSerializer).toString();if((s=be.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Oh(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),qde(t)):t}],transformResponse:[function(t){const n=this.transitional||Th.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&be.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?nn.from(s,nn.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fo.classes.FormData,Blob:fo.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};be.forEach(["delete","get","head"],function(t){Th.headers[t]={}}),be.forEach(["post","put","patch"],function(t){Th.headers[t]=be.merge(Fde)});const c0=Th,Ude=be.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Bde=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
190
190
|
`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&Ude[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},RP=Symbol("internals");function Fc(e){return e&&String(e).trim().toLowerCase()}function $h(e){return e===!1||e==null?e:be.isArray(e)?e.map($h):String(e)}function zde(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function Zde(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function DP(e,t,n,r){if(be.isFunction(r))return r.call(this,t,n);if(be.isString(t)){if(be.isString(r))return t.indexOf(r)!==-1;if(be.isRegExp(r))return r.test(t)}}function Hde(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Wde(e,t){const n=be.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}class kh{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,l,c){const d=Fc(l);if(!d)throw new Error("header name must be a non-empty string");const p=be.findKey(i,d);(!p||i[p]===void 0||c===!0||c===void 0&&i[p]!==!1)&&(i[p||l]=$h(s))}const a=(s,l)=>be.forEach(s,(c,d)=>o(c,d,l));return be.isPlainObject(t)||t instanceof this.constructor?a(t,n):be.isString(t)&&(t=t.trim())&&!Zde(t)?a(Bde(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=Fc(t),t){const r=be.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return zde(i);if(be.isFunction(n))return n.call(this,i,r);if(be.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Fc(t),t){const r=be.findKey(this,t);return!!(r&&(!n||DP(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Fc(a),a){const s=be.findKey(r,a);s&&(!n||DP(r,r[s],s,n))&&(delete r[s],i=!0)}}return be.isArray(t)?t.forEach(o):o(t),i}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const n=this,r={};return be.forEach(this,(i,o)=>{const a=be.findKey(r,o);if(a){n[a]=$h(i),delete n[o];return}const s=t?Hde(o):String(o).trim();s!==o&&delete n[o],n[s]=$h(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return be.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&be.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
191
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[RP]=this[RP]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Fc(a);r[s]||(Wde(i,a),r[s]=!0)}return be.isArray(t)?t.forEach(o):o(t),this}}kh.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),be.freezeMethods(kh.prototype),be.freezeMethods(kh);const Fo=kh;function f0(e,t){const n=this||c0,r=t||n,i=Fo.from(r.headers);let o=r.data;return be.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function NP(e){return!!(e&&e.__CANCEL__)}function qc(e,t,n){nn.call(this,e??"canceled",nn.ERR_CANCELED,t,n),this.name="CanceledError"}be.inherits(qc,nn,{__CANCEL__:!0});const Vde=null;function Kde(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new nn("Request failed with status code "+n.status,[nn.ERR_BAD_REQUEST,nn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Gde=fo.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,a,s){const l=[];l.push(n+"="+encodeURIComponent(r)),be.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),be.isString(o)&&l.push("path="+o),be.isString(a)&&l.push("domain="+a),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Yde(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Jde(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function MP(e,t){return e&&!Yde(t)?Jde(e,t):t}const Xde=fo.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let a=o;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(a){const s=be.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Qde(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function epe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),d=r[o];a||(a=c),n[i]=l,r[i]=c;let p=o,m=0;for(;p!==i;)m+=n[p++],p=p%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-a<t)return;const h=d&&c-d;return h?Math.round(m*1e3/h):void 0}}function jP(e,t){let n=0;const r=epe(50,250);return i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-n,l=r(s),c=o<=a;n=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&c?(a-o)/l:void 0,event:i};d[t?"download":"upload"]=!0,e(d)}}const Ih={http:Vde,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const o=Fo.from(e.headers).normalize(),a=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}be.isFormData(i)&&(fo.isStandardBrowserEnv||fo.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(h+":"+y))}const d=MP(e.baseURL,e.url);c.open(e.method.toUpperCase(),$P(d,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function p(){if(!c)return;const h=Fo.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),v={data:!a||a==="text"||a==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:h,config:e,request:c};Kde(function(_){n(_),l()},function(_){r(_),l()},v),c=null}if("onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(p)},c.onabort=function(){c&&(r(new nn("Request aborted",nn.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new nn("Network Error",nn.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const v=e.transitional||IP;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),r(new nn(y,v.clarifyTimeoutError?nn.ETIMEDOUT:nn.ECONNABORTED,e,c)),c=null},fo.isStandardBrowserEnv){const h=(e.withCredentials||Xde(d))&&e.xsrfCookieName&&Gde.read(e.xsrfCookieName);h&&o.set(e.xsrfHeaderName,h)}i===void 0&&o.setContentType(null),"setRequestHeader"in c&&be.forEach(o.toJSON(),function(y,v){c.setRequestHeader(v,y)}),be.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&a!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",jP(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",jP(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=h=>{c&&(r(!h||h.type?new qc(null,e,c):h),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const m=Qde(d);if(m&&fo.protocols.indexOf(m)===-1){r(new nn("Unsupported protocol "+m+":",nn.ERR_BAD_REQUEST,e));return}c.send(i||null)})}};be.forEach(Ih,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const tpe={getAdapter:e=>{e=be.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=be.isString(n)?Ih[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new nn(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(be.hasOwnProp(Ih,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!be.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Ih};function d0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qc(null,e)}function LP(e){return d0(e),e.headers=Fo.from(e.headers),e.data=f0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tpe.getAdapter(e.adapter||c0.adapter)(e).then(function(r){return d0(e),r.data=f0.call(e,e.transformResponse,r),r.headers=Fo.from(r.headers),r},function(r){return NP(r)||(d0(e),r&&r.response&&(r.response.data=f0.call(e,e.transformResponse,r.response),r.response.headers=Fo.from(r.response.headers))),Promise.reject(r)})}const FP=e=>e instanceof Fo?e.toJSON():e;function Hu(e,t){t=t||{};const n={};function r(c,d,p){return be.isPlainObject(c)&&be.isPlainObject(d)?be.merge.call({caseless:p},c,d):be.isPlainObject(d)?be.merge({},d):be.isArray(d)?d.slice():d}function i(c,d,p){if(be.isUndefined(d)){if(!be.isUndefined(c))return r(void 0,c,p)}else return r(c,d,p)}function o(c,d){if(!be.isUndefined(d))return r(void 0,d)}function a(c,d){if(be.isUndefined(d)){if(!be.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function s(c,d,p){if(p in t)return r(c,d);if(p in e)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,d)=>i(FP(c),FP(d),!0)};return be.forEach(Object.keys(e).concat(Object.keys(t)),function(d){const p=l[d]||i,m=p(e[d],t[d],d);be.isUndefined(m)&&p!==s||(n[d]=m)}),n}const qP="1.2.5",p0={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{p0[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const UP={};p0.transitional=function(t,n,r){function i(o,a){return"[Axios v"+qP+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new nn(i(a," has been removed"+(n?" in "+n:"")),nn.ERR_DEPRECATED);return n&&!UP[a]&&(UP[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};function npe(e,t,n){if(typeof e!="object")throw new nn("options must be an object",nn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],l=s===void 0||a(s,o,e);if(l!==!0)throw new nn("option "+o+" must be "+l,nn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new nn("Unknown option "+o,nn.ERR_BAD_OPTION)}}const h0={assertOptions:npe,validators:p0},_a=h0.validators;class Ph{constructor(t){this.defaults=t,this.interceptors={request:new kP,response:new kP}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hu(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&h0.assertOptions(r,{silentJSONParsing:_a.transitional(_a.boolean),forcedJSONParsing:_a.transitional(_a.boolean),clarifyTimeoutError:_a.transitional(_a.boolean)},!1),i!==void 0&&h0.assertOptions(i,{encode:_a.function,serialize:_a.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a;a=o&&be.merge(o.common,o[n.method]),a&&be.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Fo.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let d,p=0,m;if(!l){const y=[LP.bind(this),void 0];for(y.unshift.apply(y,s),y.push.apply(y,c),m=y.length,d=Promise.resolve(n);p<m;)d=d.then(y[p++],y[p++]);return d}m=s.length;let h=n;for(p=0;p<m;){const y=s[p++],v=s[p++];try{h=y(h)}catch(w){v.call(this,w);break}}try{d=LP.call(this,h)}catch(y){return Promise.reject(y)}for(p=0,m=c.length;p<m;)d=d.then(c[p++],c[p++]);return d}getUri(t){t=Hu(this.defaults,t);const n=MP(t.baseURL,t.url);return $P(n,t.params,t.paramsSerializer)}}be.forEach(["delete","get","head","options"],function(t){Ph.prototype[t]=function(n,r){return this.request(Hu(r||{},{method:t,url:n,data:(r||{}).data}))}}),be.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(Hu(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Ph.prototype[t]=n(),Ph.prototype[t+"Form"]=n(!0)});const Rh=Ph;class m0{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new qc(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new m0(function(i){t=i}),cancel:t}}}const rpe=m0;function ipe(e){return function(n){return e.apply(null,n)}}function ope(e){return be.isObject(e)&&e.isAxiosError===!0}const y0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(y0).forEach(([e,t])=>{y0[t]=e});const ape=y0;function BP(e){const t=new Rh(e),n=hP(Rh.prototype.request,t);return be.extend(n,Rh.prototype,t,{allOwnKeys:!0}),be.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return BP(Hu(e,i))},n}const Qn=BP(c0);Qn.Axios=Rh,Qn.CanceledError=qc,Qn.CancelToken=rpe,Qn.isCancel=NP,Qn.VERSION=qP,Qn.toFormData=Oh,Qn.AxiosError=nn,Qn.Cancel=Qn.CanceledError,Qn.all=function(t){return Promise.all(t)},Qn.spread=ipe,Qn.isAxiosError=ope,Qn.mergeConfig=Hu,Qn.AxiosHeaders=Fo,Qn.formToJSON=e=>PP(be.isHTMLForm(e)?new FormData(e):e),Qn.HttpStatusCode=ape,Qn.default=Qn;const zP=Qn,spe={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let g0=typeof window<"u"&&typeof window.document<"u"?window.crypto:mv;g0.getRandomValues||(g0=spe);class vn extends Error{constructor(n,r,i,o,a,s){super(o);R(this,"isApiError",!0);this.code=n,this.description=r,this.type=i,this.message=o,this.error=a,this.id=s,this.id||(this.id=vn.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){const n=this.getPrefix(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],i=4,o=Array.from(g0.getRandomValues(new Uint8Array(i))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${n}_${r}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}}const upe=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,v0=e=>e instanceof vn||upe(e)&&e.isApiError===!0;class Uc extends vn{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}}class lpe extends vn{constructor(t,n,r){super(500,"An internal error occurred","Internal",t,n,r)}}class cpe extends vn{constructor(t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",t,n,r)}}class fpe extends vn{constructor(t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",t,n,r)}}class dpe extends vn{constructor(t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",t,n,r)}}class ppe extends vn{constructor(t,n,r){super(400,"The request payload is invalid.","InvalidPayload",t,n,r)}}class hpe extends vn{constructor(t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,n,r)}}class mpe extends vn{constructor(t,n,r){super(405,"The requested method does not exist.","MethodNotFound",t,n,r)}}class ype extends vn{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}}class gpe extends vn{constructor(t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,n,r)}}class vpe extends vn{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}}class bpe extends vn{constructor(t,n,r){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,n,r)}}class _pe extends vn{constructor(t,n,r){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,n,r)}}class wpe extends vn{constructor(t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,n,r)}}class xpe extends vn{constructor(t,n,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,n,r)}}class Spe extends vn{constructor(t,n,r){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,n,r)}}class Epe extends vn{constructor(t,n,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,n,r)}}class Ape extends vn{constructor(t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,n,r)}}class Cpe extends vn{constructor(t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,n,r)}}class Ope extends vn{constructor(t,n,r){super(429,"The request has been rate limited.","RateLimited",t,n,r)}}class Tpe extends vn{constructor(t,n,r){super(402,"A payment is required to perform this request.","PaymentRequired",t,n,r)}}class $pe extends vn{constructor(t,n,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,n,r)}}class kpe extends vn{constructor(t,n,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,n,r)}}class Ipe extends vn{constructor(t,n,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,n,r)}}const Ppe={Unknown:Uc,Internal:lpe,Unauthorized:cpe,Forbidden:fpe,PayloadTooLarge:dpe,InvalidPayload:ppe,UnsupportedMediaType:hpe,MethodNotFound:mpe,ResourceNotFound:ype,InvalidJsonSchema:gpe,InvalidDataFormat:vpe,InvalidIdentifier:bpe,RelationConflict:_pe,ReferenceConstraint:wpe,ResourceLockedConflict:xpe,ReferenceNotFound:Spe,InvalidQuery:Epe,Runtime:Ape,AlreadyExists:Cpe,RateLimited:Ope,PaymentRequired:Tpe,QuotaExceeded:$pe,LimitExceeded:kpe,BreakingChanges:Ipe},ZP=e=>v0(e)?e:e instanceof Error?new Uc(e.message,e):typeof e=="string"?new Uc(e):Rpe(e);function Rpe(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){const t=Ppe[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Uc(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Uc("An invalid error occurred: "+JSON.stringify(e))}var Dpe=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==i||a.enumerable!==!0)return!1}return!0},HP=typeof Symbol<"u"&&Symbol,Npe=Dpe,Mpe=function(){return typeof HP!="function"||typeof Symbol!="function"||typeof HP("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Npe()},WP={foo:{}},jpe=Object,Lpe=function(){return{__proto__:WP}.foo===WP.foo&&!({__proto__:null}instanceof jpe)},Fpe="Function.prototype.bind called on incompatible ",qpe=Object.prototype.toString,Upe=Math.max,Bpe="[object Function]",VP=function(t,n){for(var r=[],i=0;i<t.length;i+=1)r[i]=t[i];for(var o=0;o<n.length;o+=1)r[o+t.length]=n[o];return r},zpe=function(t,n){for(var r=[],i=n||0,o=0;i<t.length;i+=1,o+=1)r[o]=t[i];return r},Zpe=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Hpe=function(t){var n=this;if(typeof n!="function"||qpe.apply(n)!==Bpe)throw new TypeError(Fpe+n);for(var r=zpe(arguments,1),i,o=function(){if(this instanceof i){var d=n.apply(this,VP(r,arguments));return Object(d)===d?d:this}return n.apply(t,VP(r,arguments))},a=Upe(0,n.length-r.length),s=[],l=0;l<a;l++)s[l]="$"+l;if(i=Function("binder","return function ("+Zpe(s,",")+"){ return binder.apply(this,arguments); }")(o),n.prototype){var c=function(){};c.prototype=n.prototype,i.prototype=new c,c.prototype=null}return i},Wpe=Hpe,b0=Function.prototype.bind||Wpe,Vpe=b0,Kpe=Vpe.call(Function.call,Object.prototype.hasOwnProperty),Kt,Wu=SyntaxError,KP=Function,Vu=TypeError,_0=function(e){try{return KP('"use strict"; return ('+e+").constructor;")()}catch{}},Ts=Object.getOwnPropertyDescriptor;if(Ts)try{Ts({},"")}catch{Ts=null}var w0=function(){throw new Vu},Gpe=Ts?function(){try{return arguments.callee,w0}catch{try{return Ts(arguments,"callee").get}catch{return w0}}}():w0,Ku=Mpe(),Ype=Lpe(),or=Object.getPrototypeOf||(Ype?function(e){return e.__proto__}:null),Gu={},Jpe=typeof Uint8Array>"u"||!or?Kt:or(Uint8Array),$s={"%AggregateError%":typeof AggregateError>"u"?Kt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Kt:ArrayBuffer,"%ArrayIteratorPrototype%":Ku&&or?or([][Symbol.iterator]()):Kt,"%AsyncFromSyncIteratorPrototype%":Kt,"%AsyncFunction%":Gu,"%AsyncGenerator%":Gu,"%AsyncGeneratorFunction%":Gu,"%AsyncIteratorPrototype%":Gu,"%Atomics%":typeof Atomics>"u"?Kt:Atomics,"%BigInt%":typeof BigInt>"u"?Kt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Kt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Kt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Kt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Kt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Kt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Kt:FinalizationRegistry,"%Function%":KP,"%GeneratorFunction%":Gu,"%Int8Array%":typeof Int8Array>"u"?Kt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Kt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Kt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ku&&or?or(or([][Symbol.iterator]())):Kt,"%JSON%":typeof JSON=="object"?JSON:Kt,"%Map%":typeof Map>"u"?Kt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ku||!or?Kt:or(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Kt:Promise,"%Proxy%":typeof Proxy>"u"?Kt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Kt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Kt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ku||!or?Kt:or(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Kt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ku&&or?or(""[Symbol.iterator]()):Kt,"%Symbol%":Ku?Symbol:Kt,"%SyntaxError%":Wu,"%ThrowTypeError%":Gpe,"%TypedArray%":Jpe,"%TypeError%":Vu,"%Uint8Array%":typeof Uint8Array>"u"?Kt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Kt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Kt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Kt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Kt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Kt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Kt:WeakSet};if(or)try{null.error}catch(e){var Xpe=or(or(e));$s["%Error.prototype%"]=Xpe}var Qpe=function e(t){var n;if(t==="%AsyncFunction%")n=_0("async function () {}");else if(t==="%GeneratorFunction%")n=_0("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=_0("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&or&&(n=or(i.prototype))}return $s[t]=n,n},GP={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Bc=b0,Dh=Kpe,ehe=Bc.call(Function.call,Array.prototype.concat),the=Bc.call(Function.apply,Array.prototype.splice),YP=Bc.call(Function.call,String.prototype.replace),Nh=Bc.call(Function.call,String.prototype.slice),nhe=Bc.call(Function.call,RegExp.prototype.exec),rhe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ihe=/\\(\\)?/g,ohe=function(t){var n=Nh(t,0,1),r=Nh(t,-1);if(n==="%"&&r!=="%")throw new Wu("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Wu("invalid intrinsic syntax, expected opening `%`");var i=[];return YP(t,rhe,function(o,a,s,l){i[i.length]=s?YP(l,ihe,"$1"):a||o}),i},ahe=function(t,n){var r=t,i;if(Dh(GP,r)&&(i=GP[r],r="%"+i[0]+"%"),Dh($s,r)){var o=$s[r];if(o===Gu&&(o=Qpe(r)),typeof o>"u"&&!n)throw new Vu("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Wu("intrinsic "+t+" does not exist!")},x0=function(t,n){if(typeof t!="string"||t.length===0)throw new Vu("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Vu('"allowMissing" argument must be a boolean');if(nhe(/^%?[^%]*%?$/,t)===null)throw new Wu("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=ohe(t),i=r.length>0?r[0]:"",o=ahe("%"+i+"%",n),a=o.name,s=o.value,l=!1,c=o.alias;c&&(i=c[0],the(r,ehe([0,1],c)));for(var d=1,p=!0;d<r.length;d+=1){var m=r[d],h=Nh(m,0,1),y=Nh(m,-1);if((h==='"'||h==="'"||h==="`"||y==='"'||y==="'"||y==="`")&&h!==y)throw new Wu("property names with quotes must have matching quotes");if((m==="constructor"||!p)&&(l=!0),i+="."+m,a="%"+i+"%",Dh($s,a))s=$s[a];else if(s!=null){if(!(m in s)){if(!n)throw new Vu("base intrinsic for "+t+" exists, but the property is not available.");return}if(Ts&&d+1>=r.length){var v=Ts(s,m);p=!!v,p&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[m]}else p=Dh(s,m),s=s[m];p&&!l&&($s[a]=s)}}return s},JP={exports:{}};(function(e){var t=b0,n=x0,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(p){var m=o(t,i,arguments);if(a&&s){var h=a(m,"length");h.configurable&&s(m,"length",{value:1+l(0,p.length-(arguments.length-1))})}return m};var c=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c})(JP);var she=JP.exports,XP=x0,QP=she,uhe=QP(XP("String.prototype.indexOf")),lhe=function(t,n){var r=XP(t,!!n);return typeof r=="function"&&uhe(t,".prototype.")>-1?QP(r):r},S0=typeof Map=="function"&&Map.prototype,E0=Object.getOwnPropertyDescriptor&&S0?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Mh=S0&&E0&&typeof E0.get=="function"?E0.get:null,eR=S0&&Map.prototype.forEach,A0=typeof Set=="function"&&Set.prototype,C0=Object.getOwnPropertyDescriptor&&A0?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,jh=A0&&C0&&typeof C0.get=="function"?C0.get:null,tR=A0&&Set.prototype.forEach,che=typeof WeakMap=="function"&&WeakMap.prototype,zc=che?WeakMap.prototype.has:null,fhe=typeof WeakSet=="function"&&WeakSet.prototype,Zc=fhe?WeakSet.prototype.has:null,dhe=typeof WeakRef=="function"&&WeakRef.prototype,nR=dhe?WeakRef.prototype.deref:null,phe=Boolean.prototype.valueOf,hhe=Object.prototype.toString,mhe=Function.prototype.toString,yhe=String.prototype.match,O0=String.prototype.slice,wa=String.prototype.replace,ghe=String.prototype.toUpperCase,rR=String.prototype.toLowerCase,iR=RegExp.prototype.test,oR=Array.prototype.concat,po=Array.prototype.join,vhe=Array.prototype.slice,aR=Math.floor,T0=typeof BigInt=="function"?BigInt.prototype.valueOf:null,$0=Object.getOwnPropertySymbols,k0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Yu=typeof Symbol=="function"&&typeof Symbol.iterator=="object",xr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Yu||"symbol")?Symbol.toStringTag:null,sR=Object.prototype.propertyIsEnumerable,uR=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function lR(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||iR.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-aR(-e):aR(e);if(r!==e){var i=String(r),o=O0.call(t,i.length+1);return wa.call(i,n,"$&_")+"."+wa.call(wa.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return wa.call(t,n,"$&_")}var I0=hs,cR=I0.custom,fR=hR(cR)?cR:null,bhe=function e(t,n,r,i){var o=n||{};if(xa(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(xa(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=xa(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(xa(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(xa(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return yR(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?lR(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?lR(t,c):c}var d=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=d&&d>0&&typeof t=="object")return P0(t)?"[Array]":"[Object]";var p=jhe(o,r);if(typeof i>"u")i=[];else if(mR(i,t)>=0)return"[Circular]";function m(Q,G,V){if(G&&(i=vhe.call(i),i.push(G)),V){var q={depth:o.depth};return xa(o,"quoteStyle")&&(q.quoteStyle=o.quoteStyle),e(Q,q,r+1,i)}return e(Q,o,r+1,i)}if(typeof t=="function"&&!pR(t)){var h=The(t),y=Lh(t,m);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(y.length>0?" { "+po.call(y,", ")+" }":"")}if(hR(t)){var v=Yu?wa.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):k0.call(t);return typeof t=="object"&&!Yu?Hc(v):v}if(Dhe(t)){for(var w="<"+rR.call(String(t.nodeName)),_=t.attributes||[],b=0;b<_.length;b++)w+=" "+_[b].name+"="+dR(_he(_[b].value),"double",o);return w+=">",t.childNodes&&t.childNodes.length&&(w+="..."),w+="</"+rR.call(String(t.nodeName))+">",w}if(P0(t)){if(t.length===0)return"[]";var S=Lh(t,m);return p&&!Mhe(S)?"["+D0(S,p)+"]":"[ "+po.call(S,", ")+" ]"}if(xhe(t)){var A=Lh(t,m);return!("cause"in Error.prototype)&&"cause"in t&&!sR.call(t,"cause")?"{ ["+String(t)+"] "+po.call(oR.call("[cause]: "+m(t.cause),A),", ")+" }":A.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+po.call(A,", ")+" }"}if(typeof t=="object"&&a){if(fR&&typeof t[fR]=="function"&&I0)return I0(t,{depth:d-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if($he(t)){var E=[];return eR&&eR.call(t,function(Q,G){E.push(m(G,t,!0)+" => "+m(Q,t))}),gR("Map",Mh.call(t),E,p)}if(Phe(t)){var T=[];return tR&&tR.call(t,function(Q){T.push(m(Q,t))}),gR("Set",jh.call(t),T,p)}if(khe(t))return R0("WeakMap");if(Rhe(t))return R0("WeakSet");if(Ihe(t))return R0("WeakRef");if(Ehe(t))return Hc(m(Number(t)));if(Che(t))return Hc(m(T0.call(t)));if(Ahe(t))return Hc(phe.call(t));if(She(t))return Hc(m(String(t)));if(!whe(t)&&!pR(t)){var N=Lh(t,m),L=uR?uR(t)===Object.prototype:t instanceof Object||t.constructor===Object,F=t instanceof Object?"":"null prototype",j=!L&&xr&&Object(t)===t&&xr in t?O0.call(Sa(t),8,-1):F?"Object":"",H=L||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",re=H+(j||F?"["+po.call(oR.call([],j||[],F||[]),": ")+"] ":"");return N.length===0?re+"{}":p?re+"{"+D0(N,p)+"}":re+"{ "+po.call(N,", ")+" }"}return String(t)};function dR(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function _he(e){return wa.call(String(e),/"/g,""")}function P0(e){return Sa(e)==="[object Array]"&&(!xr||!(typeof e=="object"&&xr in e))}function whe(e){return Sa(e)==="[object Date]"&&(!xr||!(typeof e=="object"&&xr in e))}function pR(e){return Sa(e)==="[object RegExp]"&&(!xr||!(typeof e=="object"&&xr in e))}function xhe(e){return Sa(e)==="[object Error]"&&(!xr||!(typeof e=="object"&&xr in e))}function She(e){return Sa(e)==="[object String]"&&(!xr||!(typeof e=="object"&&xr in e))}function Ehe(e){return Sa(e)==="[object Number]"&&(!xr||!(typeof e=="object"&&xr in e))}function Ahe(e){return Sa(e)==="[object Boolean]"&&(!xr||!(typeof e=="object"&&xr in e))}function hR(e){if(Yu)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!k0)return!1;try{return k0.call(e),!0}catch{}return!1}function Che(e){if(!e||typeof e!="object"||!T0)return!1;try{return T0.call(e),!0}catch{}return!1}var Ohe=Object.prototype.hasOwnProperty||function(e){return e in this};function xa(e,t){return Ohe.call(e,t)}function Sa(e){return hhe.call(e)}function The(e){if(e.name)return e.name;var t=yhe.call(mhe.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function mR(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function $he(e){if(!Mh||!e||typeof e!="object")return!1;try{Mh.call(e);try{jh.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function khe(e){if(!zc||!e||typeof e!="object")return!1;try{zc.call(e,zc);try{Zc.call(e,Zc)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Ihe(e){if(!nR||!e||typeof e!="object")return!1;try{return nR.call(e),!0}catch{}return!1}function Phe(e){if(!jh||!e||typeof e!="object")return!1;try{jh.call(e);try{Mh.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Rhe(e){if(!Zc||!e||typeof e!="object")return!1;try{Zc.call(e,Zc);try{zc.call(e,zc)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Dhe(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function yR(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return yR(O0.call(e,0,t.maxStringLength),t)+r}var i=wa.call(wa.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Nhe);return dR(i,"single",t)}function Nhe(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+ghe.call(t.toString(16))}function Hc(e){return"Object("+e+")"}function R0(e){return e+" { ? }"}function gR(e,t,n,r){var i=r?D0(n,r):po.call(n,", ");return e+" ("+t+") {"+i+"}"}function Mhe(e){for(var t=0;t<e.length;t++)if(mR(e[t],`
|
|
191
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[RP]=this[RP]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Fc(a);r[s]||(Wde(i,a),r[s]=!0)}return be.isArray(t)?t.forEach(o):o(t),this}}kh.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),be.freezeMethods(kh.prototype),be.freezeMethods(kh);const Fo=kh;function f0(e,t){const n=this||c0,r=t||n,i=Fo.from(r.headers);let o=r.data;return be.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function NP(e){return!!(e&&e.__CANCEL__)}function qc(e,t,n){nn.call(this,e??"canceled",nn.ERR_CANCELED,t,n),this.name="CanceledError"}be.inherits(qc,nn,{__CANCEL__:!0});const Vde=null;function Kde(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new nn("Request failed with status code "+n.status,[nn.ERR_BAD_REQUEST,nn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Gde=fo.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,a,s){const l=[];l.push(n+"="+encodeURIComponent(r)),be.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),be.isString(o)&&l.push("path="+o),be.isString(a)&&l.push("domain="+a),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Yde(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Jde(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function MP(e,t){return e&&!Yde(t)?Jde(e,t):t}const Xde=fo.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let a=o;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(a){const s=be.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Qde(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function epe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),d=r[o];a||(a=c),n[i]=l,r[i]=c;let p=o,m=0;for(;p!==i;)m+=n[p++],p=p%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-a<t)return;const h=d&&c-d;return h?Math.round(m*1e3/h):void 0}}function jP(e,t){let n=0;const r=epe(50,250);return i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-n,l=r(s),c=o<=a;n=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&c?(a-o)/l:void 0,event:i};d[t?"download":"upload"]=!0,e(d)}}const Ih={http:Vde,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const o=Fo.from(e.headers).normalize(),a=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}be.isFormData(i)&&(fo.isStandardBrowserEnv||fo.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(h+":"+y))}const d=MP(e.baseURL,e.url);c.open(e.method.toUpperCase(),$P(d,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function p(){if(!c)return;const h=Fo.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),v={data:!a||a==="text"||a==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:h,config:e,request:c};Kde(function(_){n(_),l()},function(_){r(_),l()},v),c=null}if("onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(p)},c.onabort=function(){c&&(r(new nn("Request aborted",nn.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new nn("Network Error",nn.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const v=e.transitional||IP;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),r(new nn(y,v.clarifyTimeoutError?nn.ETIMEDOUT:nn.ECONNABORTED,e,c)),c=null},fo.isStandardBrowserEnv){const h=(e.withCredentials||Xde(d))&&e.xsrfCookieName&&Gde.read(e.xsrfCookieName);h&&o.set(e.xsrfHeaderName,h)}i===void 0&&o.setContentType(null),"setRequestHeader"in c&&be.forEach(o.toJSON(),function(y,v){c.setRequestHeader(v,y)}),be.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&a!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",jP(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",jP(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=h=>{c&&(r(!h||h.type?new qc(null,e,c):h),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const m=Qde(d);if(m&&fo.protocols.indexOf(m)===-1){r(new nn("Unsupported protocol "+m+":",nn.ERR_BAD_REQUEST,e));return}c.send(i||null)})}};be.forEach(Ih,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const tpe={getAdapter:e=>{e=be.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=be.isString(n)?Ih[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new nn(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(be.hasOwnProp(Ih,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!be.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Ih};function d0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qc(null,e)}function LP(e){return d0(e),e.headers=Fo.from(e.headers),e.data=f0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tpe.getAdapter(e.adapter||c0.adapter)(e).then(function(r){return d0(e),r.data=f0.call(e,e.transformResponse,r),r.headers=Fo.from(r.headers),r},function(r){return NP(r)||(d0(e),r&&r.response&&(r.response.data=f0.call(e,e.transformResponse,r.response),r.response.headers=Fo.from(r.response.headers))),Promise.reject(r)})}const FP=e=>e instanceof Fo?e.toJSON():e;function Hu(e,t){t=t||{};const n={};function r(c,d,p){return be.isPlainObject(c)&&be.isPlainObject(d)?be.merge.call({caseless:p},c,d):be.isPlainObject(d)?be.merge({},d):be.isArray(d)?d.slice():d}function i(c,d,p){if(be.isUndefined(d)){if(!be.isUndefined(c))return r(void 0,c,p)}else return r(c,d,p)}function o(c,d){if(!be.isUndefined(d))return r(void 0,d)}function a(c,d){if(be.isUndefined(d)){if(!be.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function s(c,d,p){if(p in t)return r(c,d);if(p in e)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,d)=>i(FP(c),FP(d),!0)};return be.forEach(Object.keys(e).concat(Object.keys(t)),function(d){const p=l[d]||i,m=p(e[d],t[d],d);be.isUndefined(m)&&p!==s||(n[d]=m)}),n}const qP="1.2.5",p0={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{p0[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const UP={};p0.transitional=function(t,n,r){function i(o,a){return"[Axios v"+qP+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new nn(i(a," has been removed"+(n?" in "+n:"")),nn.ERR_DEPRECATED);return n&&!UP[a]&&(UP[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};function npe(e,t,n){if(typeof e!="object")throw new nn("options must be an object",nn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],l=s===void 0||a(s,o,e);if(l!==!0)throw new nn("option "+o+" must be "+l,nn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new nn("Unknown option "+o,nn.ERR_BAD_OPTION)}}const h0={assertOptions:npe,validators:p0},_a=h0.validators;class Ph{constructor(t){this.defaults=t,this.interceptors={request:new kP,response:new kP}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hu(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&h0.assertOptions(r,{silentJSONParsing:_a.transitional(_a.boolean),forcedJSONParsing:_a.transitional(_a.boolean),clarifyTimeoutError:_a.transitional(_a.boolean)},!1),i!==void 0&&h0.assertOptions(i,{encode:_a.function,serialize:_a.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a;a=o&&be.merge(o.common,o[n.method]),a&&be.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Fo.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let d,p=0,m;if(!l){const y=[LP.bind(this),void 0];for(y.unshift.apply(y,s),y.push.apply(y,c),m=y.length,d=Promise.resolve(n);p<m;)d=d.then(y[p++],y[p++]);return d}m=s.length;let h=n;for(p=0;p<m;){const y=s[p++],v=s[p++];try{h=y(h)}catch(w){v.call(this,w);break}}try{d=LP.call(this,h)}catch(y){return Promise.reject(y)}for(p=0,m=c.length;p<m;)d=d.then(c[p++],c[p++]);return d}getUri(t){t=Hu(this.defaults,t);const n=MP(t.baseURL,t.url);return $P(n,t.params,t.paramsSerializer)}}be.forEach(["delete","get","head","options"],function(t){Ph.prototype[t]=function(n,r){return this.request(Hu(r||{},{method:t,url:n,data:(r||{}).data}))}}),be.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(Hu(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Ph.prototype[t]=n(),Ph.prototype[t+"Form"]=n(!0)});const Rh=Ph;class m0{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new qc(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new m0(function(i){t=i}),cancel:t}}}const rpe=m0;function ipe(e){return function(n){return e.apply(null,n)}}function ope(e){return be.isObject(e)&&e.isAxiosError===!0}const y0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(y0).forEach(([e,t])=>{y0[t]=e});const ape=y0;function BP(e){const t=new Rh(e),n=hP(Rh.prototype.request,t);return be.extend(n,Rh.prototype,t,{allOwnKeys:!0}),be.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return BP(Hu(e,i))},n}const Qn=BP(c0);Qn.Axios=Rh,Qn.CanceledError=qc,Qn.CancelToken=rpe,Qn.isCancel=NP,Qn.VERSION=qP,Qn.toFormData=Oh,Qn.AxiosError=nn,Qn.Cancel=Qn.CanceledError,Qn.all=function(t){return Promise.all(t)},Qn.spread=ipe,Qn.isAxiosError=ope,Qn.mergeConfig=Hu,Qn.AxiosHeaders=Fo,Qn.formToJSON=e=>PP(be.isHTMLForm(e)?new FormData(e):e),Qn.HttpStatusCode=ape,Qn.default=Qn;const zP=Qn,spe={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let g0=typeof window<"u"&&typeof window.document<"u"?window.crypto:mv;g0.getRandomValues||(g0=spe);class vn extends Error{constructor(n,r,i,o,a,s){super(o);R(this,"isApiError",!0);this.code=n,this.description=r,this.type=i,this.message=o,this.error=a,this.id=s,this.id||(this.id=vn.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){const n=this.getPrefix(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],i=4,o=Array.from(g0.getRandomValues(new Uint8Array(i))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${n}_${r}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}}const upe=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,v0=e=>e instanceof vn||upe(e)&&e.isApiError===!0;class Uc extends vn{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}}class lpe extends vn{constructor(t,n,r){super(500,"An internal error occurred","Internal",t,n,r)}}class cpe extends vn{constructor(t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",t,n,r)}}class fpe extends vn{constructor(t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",t,n,r)}}class dpe extends vn{constructor(t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",t,n,r)}}class ppe extends vn{constructor(t,n,r){super(400,"The request payload is invalid.","InvalidPayload",t,n,r)}}class hpe extends vn{constructor(t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,n,r)}}class mpe extends vn{constructor(t,n,r){super(405,"The requested method does not exist.","MethodNotFound",t,n,r)}}class ype extends vn{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}}class gpe extends vn{constructor(t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,n,r)}}class vpe extends vn{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}}class bpe extends vn{constructor(t,n,r){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,n,r)}}class _pe extends vn{constructor(t,n,r){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,n,r)}}class wpe extends vn{constructor(t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,n,r)}}class xpe extends vn{constructor(t,n,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,n,r)}}class Spe extends vn{constructor(t,n,r){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,n,r)}}class Epe extends vn{constructor(t,n,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,n,r)}}class Ape extends vn{constructor(t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,n,r)}}class Cpe extends vn{constructor(t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,n,r)}}class Ope extends vn{constructor(t,n,r){super(429,"The request has been rate limited.","RateLimited",t,n,r)}}class Tpe extends vn{constructor(t,n,r){super(402,"A payment is required to perform this request.","PaymentRequired",t,n,r)}}class $pe extends vn{constructor(t,n,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,n,r)}}class kpe extends vn{constructor(t,n,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,n,r)}}class Ipe extends vn{constructor(t,n,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,n,r)}}const Ppe={Unknown:Uc,Internal:lpe,Unauthorized:cpe,Forbidden:fpe,PayloadTooLarge:dpe,InvalidPayload:ppe,UnsupportedMediaType:hpe,MethodNotFound:mpe,ResourceNotFound:ype,InvalidJsonSchema:gpe,InvalidDataFormat:vpe,InvalidIdentifier:bpe,RelationConflict:_pe,ReferenceConstraint:wpe,ResourceLockedConflict:xpe,ReferenceNotFound:Spe,InvalidQuery:Epe,Runtime:Ape,AlreadyExists:Cpe,RateLimited:Ope,PaymentRequired:Tpe,QuotaExceeded:$pe,LimitExceeded:kpe,BreakingChanges:Ipe},ZP=e=>v0(e)?e:e instanceof Error?new Uc(e.message,e):typeof e=="string"?new Uc(e):Rpe(e);function Rpe(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){const t=Ppe[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Uc(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Uc("An invalid error occurred: "+JSON.stringify(e))}var Dpe=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==i||a.enumerable!==!0)return!1}return!0},HP=typeof Symbol<"u"&&Symbol,Npe=Dpe,Mpe=function(){return typeof HP!="function"||typeof Symbol!="function"||typeof HP("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Npe()},WP={foo:{}},jpe=Object,Lpe=function(){return{__proto__:WP}.foo===WP.foo&&!({__proto__:null}instanceof jpe)},Fpe="Function.prototype.bind called on incompatible ",qpe=Object.prototype.toString,Upe=Math.max,Bpe="[object Function]",VP=function(t,n){for(var r=[],i=0;i<t.length;i+=1)r[i]=t[i];for(var o=0;o<n.length;o+=1)r[o+t.length]=n[o];return r},zpe=function(t,n){for(var r=[],i=n||0,o=0;i<t.length;i+=1,o+=1)r[o]=t[i];return r},Zpe=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Hpe=function(t){var n=this;if(typeof n!="function"||qpe.apply(n)!==Bpe)throw new TypeError(Fpe+n);for(var r=zpe(arguments,1),i,o=function(){if(this instanceof i){var d=n.apply(this,VP(r,arguments));return Object(d)===d?d:this}return n.apply(t,VP(r,arguments))},a=Upe(0,n.length-r.length),s=[],l=0;l<a;l++)s[l]="$"+l;if(i=Function("binder","return function ("+Zpe(s,",")+"){ return binder.apply(this,arguments); }")(o),n.prototype){var c=function(){};c.prototype=n.prototype,i.prototype=new c,c.prototype=null}return i},Wpe=Hpe,b0=Function.prototype.bind||Wpe,Vpe=b0,Kpe=Vpe.call(Function.call,Object.prototype.hasOwnProperty),Kt,Wu=SyntaxError,KP=Function,Vu=TypeError,_0=function(e){try{return KP('"use strict"; return ('+e+").constructor;")()}catch{}},Ts=Object.getOwnPropertyDescriptor;if(Ts)try{Ts({},"")}catch{Ts=null}var w0=function(){throw new Vu},Gpe=Ts?function(){try{return arguments.callee,w0}catch{try{return Ts(arguments,"callee").get}catch{return w0}}}():w0,Ku=Mpe(),Ype=Lpe(),or=Object.getPrototypeOf||(Ype?function(e){return e.__proto__}:null),Gu={},Jpe=typeof Uint8Array>"u"||!or?Kt:or(Uint8Array),$s={"%AggregateError%":typeof AggregateError>"u"?Kt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Kt:ArrayBuffer,"%ArrayIteratorPrototype%":Ku&&or?or([][Symbol.iterator]()):Kt,"%AsyncFromSyncIteratorPrototype%":Kt,"%AsyncFunction%":Gu,"%AsyncGenerator%":Gu,"%AsyncGeneratorFunction%":Gu,"%AsyncIteratorPrototype%":Gu,"%Atomics%":typeof Atomics>"u"?Kt:Atomics,"%BigInt%":typeof BigInt>"u"?Kt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Kt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Kt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Kt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Kt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Kt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Kt:FinalizationRegistry,"%Function%":KP,"%GeneratorFunction%":Gu,"%Int8Array%":typeof Int8Array>"u"?Kt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Kt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Kt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ku&&or?or(or([][Symbol.iterator]())):Kt,"%JSON%":typeof JSON=="object"?JSON:Kt,"%Map%":typeof Map>"u"?Kt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ku||!or?Kt:or(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Kt:Promise,"%Proxy%":typeof Proxy>"u"?Kt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Kt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Kt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ku||!or?Kt:or(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Kt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ku&&or?or(""[Symbol.iterator]()):Kt,"%Symbol%":Ku?Symbol:Kt,"%SyntaxError%":Wu,"%ThrowTypeError%":Gpe,"%TypedArray%":Jpe,"%TypeError%":Vu,"%Uint8Array%":typeof Uint8Array>"u"?Kt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Kt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Kt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Kt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Kt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Kt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Kt:WeakSet};if(or)try{null.error}catch(e){var Xpe=or(or(e));$s["%Error.prototype%"]=Xpe}var Qpe=function e(t){var n;if(t==="%AsyncFunction%")n=_0("async function () {}");else if(t==="%GeneratorFunction%")n=_0("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=_0("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&or&&(n=or(i.prototype))}return $s[t]=n,n},GP={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Bc=b0,Dh=Kpe,ehe=Bc.call(Function.call,Array.prototype.concat),the=Bc.call(Function.apply,Array.prototype.splice),YP=Bc.call(Function.call,String.prototype.replace),Nh=Bc.call(Function.call,String.prototype.slice),nhe=Bc.call(Function.call,RegExp.prototype.exec),rhe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ihe=/\\(\\)?/g,ohe=function(t){var n=Nh(t,0,1),r=Nh(t,-1);if(n==="%"&&r!=="%")throw new Wu("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Wu("invalid intrinsic syntax, expected opening `%`");var i=[];return YP(t,rhe,function(o,a,s,l){i[i.length]=s?YP(l,ihe,"$1"):a||o}),i},ahe=function(t,n){var r=t,i;if(Dh(GP,r)&&(i=GP[r],r="%"+i[0]+"%"),Dh($s,r)){var o=$s[r];if(o===Gu&&(o=Qpe(r)),typeof o>"u"&&!n)throw new Vu("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Wu("intrinsic "+t+" does not exist!")},x0=function(t,n){if(typeof t!="string"||t.length===0)throw new Vu("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Vu('"allowMissing" argument must be a boolean');if(nhe(/^%?[^%]*%?$/,t)===null)throw new Wu("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=ohe(t),i=r.length>0?r[0]:"",o=ahe("%"+i+"%",n),a=o.name,s=o.value,l=!1,c=o.alias;c&&(i=c[0],the(r,ehe([0,1],c)));for(var d=1,p=!0;d<r.length;d+=1){var m=r[d],h=Nh(m,0,1),y=Nh(m,-1);if((h==='"'||h==="'"||h==="`"||y==='"'||y==="'"||y==="`")&&h!==y)throw new Wu("property names with quotes must have matching quotes");if((m==="constructor"||!p)&&(l=!0),i+="."+m,a="%"+i+"%",Dh($s,a))s=$s[a];else if(s!=null){if(!(m in s)){if(!n)throw new Vu("base intrinsic for "+t+" exists, but the property is not available.");return}if(Ts&&d+1>=r.length){var v=Ts(s,m);p=!!v,p&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[m]}else p=Dh(s,m),s=s[m];p&&!l&&($s[a]=s)}}return s},JP={exports:{}};(function(e){var t=b0,n=x0,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(p){var m=o(t,i,arguments);if(a&&s){var h=a(m,"length");h.configurable&&s(m,"length",{value:1+l(0,p.length-(arguments.length-1))})}return m};var c=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c})(JP);var she=JP.exports,XP=x0,QP=she,uhe=QP(XP("String.prototype.indexOf")),lhe=function(t,n){var r=XP(t,!!n);return typeof r=="function"&&uhe(t,".prototype.")>-1?QP(r):r},S0=typeof Map=="function"&&Map.prototype,E0=Object.getOwnPropertyDescriptor&&S0?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Mh=S0&&E0&&typeof E0.get=="function"?E0.get:null,eR=S0&&Map.prototype.forEach,A0=typeof Set=="function"&&Set.prototype,C0=Object.getOwnPropertyDescriptor&&A0?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,jh=A0&&C0&&typeof C0.get=="function"?C0.get:null,tR=A0&&Set.prototype.forEach,che=typeof WeakMap=="function"&&WeakMap.prototype,zc=che?WeakMap.prototype.has:null,fhe=typeof WeakSet=="function"&&WeakSet.prototype,Zc=fhe?WeakSet.prototype.has:null,dhe=typeof WeakRef=="function"&&WeakRef.prototype,nR=dhe?WeakRef.prototype.deref:null,phe=Boolean.prototype.valueOf,hhe=Object.prototype.toString,mhe=Function.prototype.toString,yhe=String.prototype.match,O0=String.prototype.slice,wa=String.prototype.replace,ghe=String.prototype.toUpperCase,rR=String.prototype.toLowerCase,iR=RegExp.prototype.test,oR=Array.prototype.concat,po=Array.prototype.join,vhe=Array.prototype.slice,aR=Math.floor,T0=typeof BigInt=="function"?BigInt.prototype.valueOf:null,$0=Object.getOwnPropertySymbols,k0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Yu=typeof Symbol=="function"&&typeof Symbol.iterator=="object",xr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Yu||"symbol")?Symbol.toStringTag:null,sR=Object.prototype.propertyIsEnumerable,uR=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function lR(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||iR.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-aR(-e):aR(e);if(r!==e){var i=String(r),o=O0.call(t,i.length+1);return wa.call(i,n,"$&_")+"."+wa.call(wa.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return wa.call(t,n,"$&_")}var I0=hs,cR=I0.custom,fR=hR(cR)?cR:null,bhe=function e(t,n,r,i){var o=n||{};if(xa(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(xa(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=xa(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(xa(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(xa(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return yR(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?lR(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?lR(t,c):c}var d=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=d&&d>0&&typeof t=="object")return P0(t)?"[Array]":"[Object]";var p=jhe(o,r);if(typeof i>"u")i=[];else if(mR(i,t)>=0)return"[Circular]";function m(Q,G,V){if(G&&(i=vhe.call(i),i.push(G)),V){var q={depth:o.depth};return xa(o,"quoteStyle")&&(q.quoteStyle=o.quoteStyle),e(Q,q,r+1,i)}return e(Q,o,r+1,i)}if(typeof t=="function"&&!pR(t)){var h=The(t),y=Lh(t,m);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(y.length>0?" { "+po.call(y,", ")+" }":"")}if(hR(t)){var v=Yu?wa.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):k0.call(t);return typeof t=="object"&&!Yu?Hc(v):v}if(Dhe(t)){for(var w="<"+rR.call(String(t.nodeName)),_=t.attributes||[],b=0;b<_.length;b++)w+=" "+_[b].name+"="+dR(_he(_[b].value),"double",o);return w+=">",t.childNodes&&t.childNodes.length&&(w+="..."),w+="</"+rR.call(String(t.nodeName))+">",w}if(P0(t)){if(t.length===0)return"[]";var S=Lh(t,m);return p&&!Mhe(S)?"["+D0(S,p)+"]":"[ "+po.call(S,", ")+" ]"}if(xhe(t)){var A=Lh(t,m);return!("cause"in Error.prototype)&&"cause"in t&&!sR.call(t,"cause")?"{ ["+String(t)+"] "+po.call(oR.call("[cause]: "+m(t.cause),A),", ")+" }":A.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+po.call(A,", ")+" }"}if(typeof t=="object"&&a){if(fR&&typeof t[fR]=="function"&&I0)return I0(t,{depth:d-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if($he(t)){var E=[];return eR&&eR.call(t,function(Q,G){E.push(m(G,t,!0)+" => "+m(Q,t))}),gR("Map",Mh.call(t),E,p)}if(Phe(t)){var T=[];return tR&&tR.call(t,function(Q){T.push(m(Q,t))}),gR("Set",jh.call(t),T,p)}if(khe(t))return R0("WeakMap");if(Rhe(t))return R0("WeakSet");if(Ihe(t))return R0("WeakRef");if(Ehe(t))return Hc(m(Number(t)));if(Che(t))return Hc(m(T0.call(t)));if(Ahe(t))return Hc(phe.call(t));if(She(t))return Hc(m(String(t)));if(!whe(t)&&!pR(t)){var j=Lh(t,m),L=uR?uR(t)===Object.prototype:t instanceof Object||t.constructor===Object,F=t instanceof Object?"":"null prototype",M=!L&&xr&&Object(t)===t&&xr in t?O0.call(Sa(t),8,-1):F?"Object":"",H=L||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",re=H+(M||F?"["+po.call(oR.call([],M||[],F||[]),": ")+"] ":"");return j.length===0?re+"{}":p?re+"{"+D0(j,p)+"}":re+"{ "+po.call(j,", ")+" }"}return String(t)};function dR(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function _he(e){return wa.call(String(e),/"/g,""")}function P0(e){return Sa(e)==="[object Array]"&&(!xr||!(typeof e=="object"&&xr in e))}function whe(e){return Sa(e)==="[object Date]"&&(!xr||!(typeof e=="object"&&xr in e))}function pR(e){return Sa(e)==="[object RegExp]"&&(!xr||!(typeof e=="object"&&xr in e))}function xhe(e){return Sa(e)==="[object Error]"&&(!xr||!(typeof e=="object"&&xr in e))}function She(e){return Sa(e)==="[object String]"&&(!xr||!(typeof e=="object"&&xr in e))}function Ehe(e){return Sa(e)==="[object Number]"&&(!xr||!(typeof e=="object"&&xr in e))}function Ahe(e){return Sa(e)==="[object Boolean]"&&(!xr||!(typeof e=="object"&&xr in e))}function hR(e){if(Yu)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!k0)return!1;try{return k0.call(e),!0}catch{}return!1}function Che(e){if(!e||typeof e!="object"||!T0)return!1;try{return T0.call(e),!0}catch{}return!1}var Ohe=Object.prototype.hasOwnProperty||function(e){return e in this};function xa(e,t){return Ohe.call(e,t)}function Sa(e){return hhe.call(e)}function The(e){if(e.name)return e.name;var t=yhe.call(mhe.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function mR(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function $he(e){if(!Mh||!e||typeof e!="object")return!1;try{Mh.call(e);try{jh.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function khe(e){if(!zc||!e||typeof e!="object")return!1;try{zc.call(e,zc);try{Zc.call(e,Zc)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Ihe(e){if(!nR||!e||typeof e!="object")return!1;try{return nR.call(e),!0}catch{}return!1}function Phe(e){if(!jh||!e||typeof e!="object")return!1;try{jh.call(e);try{Mh.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Rhe(e){if(!Zc||!e||typeof e!="object")return!1;try{Zc.call(e,Zc);try{zc.call(e,zc)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Dhe(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function yR(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return yR(O0.call(e,0,t.maxStringLength),t)+r}var i=wa.call(wa.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Nhe);return dR(i,"single",t)}function Nhe(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+ghe.call(t.toString(16))}function Hc(e){return"Object("+e+")"}function R0(e){return e+" { ? }"}function gR(e,t,n,r){var i=r?D0(n,r):po.call(n,", ");return e+" ("+t+") {"+i+"}"}function Mhe(e){for(var t=0;t<e.length;t++)if(mR(e[t],`
|
|
192
192
|
`)>=0)return!1;return!0}function jhe(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=po.call(Array(e.indent+1)," ");else return null;return{base:n,prev:po.call(Array(t+1),n)}}function D0(e,t){if(e.length===0)return"";var n=`
|
|
193
193
|
`+t.prev+t.base;return n+po.call(e,","+n)+`
|
|
194
|
-
`+t.prev}function Lh(e,t){var n=P0(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=xa(e,i)?t(e[i],e):""}var o=typeof $0=="function"?$0(e):[],a;if(Yu){a={};for(var s=0;s<o.length;s++)a["$"+o[s]]=o[s]}for(var l in e)xa(e,l)&&(n&&String(Number(l))===l&&l<e.length||Yu&&a["$"+l]instanceof Symbol||(iR.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof $0=="function")for(var c=0;c<o.length;c++)sR.call(e,o[c])&&r.push("["+t(o[c])+"]: "+t(e[o[c]],e));return r}var N0=x0,Ju=lhe,Lhe=bhe,Fhe=N0("%TypeError%"),Fh=N0("%WeakMap%",!0),qh=N0("%Map%",!0),qhe=Ju("WeakMap.prototype.get",!0),Uhe=Ju("WeakMap.prototype.set",!0),Bhe=Ju("WeakMap.prototype.has",!0),zhe=Ju("Map.prototype.get",!0),Zhe=Ju("Map.prototype.set",!0),Hhe=Ju("Map.prototype.has",!0),M0=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Whe=function(e,t){var n=M0(e,t);return n&&n.value},Vhe=function(e,t,n){var r=M0(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Khe=function(e,t){return!!M0(e,t)},Ghe=function(){var t,n,r,i={assert:function(o){if(!i.has(o))throw new Fhe("Side channel does not contain "+Lhe(o))},get:function(o){if(Fh&&o&&(typeof o=="object"||typeof o=="function")){if(t)return qhe(t,o)}else if(qh){if(n)return zhe(n,o)}else if(r)return Whe(r,o)},has:function(o){if(Fh&&o&&(typeof o=="object"||typeof o=="function")){if(t)return Bhe(t,o)}else if(qh){if(n)return Hhe(n,o)}else if(r)return Khe(r,o);return!1},set:function(o,a){Fh&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new Fh),Uhe(t,o,a)):qh?(n||(n=new qh),Zhe(n,o,a)):(r||(r={key:{},next:null}),Vhe(r,o,a))}};return i},Yhe=String.prototype.replace,Jhe=/%20/g,j0={RFC1738:"RFC1738",RFC3986:"RFC3986"},L0={default:j0.RFC3986,formatters:{RFC1738:function(e){return Yhe.call(e,Jhe,"+")},RFC3986:function(e){return String(e)}},RFC1738:j0.RFC1738,RFC3986:j0.RFC3986},Xhe=L0,F0=Object.prototype.hasOwnProperty,ks=Array.isArray,ho=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Qhe=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(ks(r)){for(var i=[],o=0;o<r.length;++o)typeof r[o]<"u"&&i.push(r[o]);n.obj[n.prop]=i}}},vR=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(r[i]=t[i]);return r},eme=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(ks(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!F0.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var i=t;return ks(t)&&!ks(n)&&(i=vR(t,r)),ks(t)&&ks(n)?(n.forEach(function(o,a){if(F0.call(t,a)){var s=t[a];s&&typeof s=="object"&&o&&typeof o=="object"?t[a]=e(s,o,r):t.push(o)}else t[a]=o}),t):Object.keys(n).reduce(function(o,a){var s=n[a];return F0.call(o,a)?o[a]=e(o[a],s,r):o[a]=s,o},i)},tme=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},nme=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},rme=function(t,n,r,i,o){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),r==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var s="",l=0;l<a.length;++l){var c=a.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===Xhe.RFC1738&&(c===40||c===41)){s+=a.charAt(l);continue}if(c<128){s=s+ho[c];continue}if(c<2048){s=s+(ho[192|c>>6]+ho[128|c&63]);continue}if(c<55296||c>=57344){s=s+(ho[224|c>>12]+ho[128|c>>6&63]+ho[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|a.charCodeAt(l)&1023),s+=ho[240|c>>18]+ho[128|c>>12&63]+ho[128|c>>6&63]+ho[128|c&63]}return s},ime=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i<n.length;++i)for(var o=n[i],a=o.obj[o.prop],s=Object.keys(a),l=0;l<s.length;++l){var c=s[l],d=a[c];typeof d=="object"&&d!==null&&r.indexOf(d)===-1&&(n.push({obj:a,prop:c}),r.push(d))}return Qhe(n),t},ome=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ame=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},sme=function(t,n){return[].concat(t,n)},ume=function(t,n){if(ks(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},bR={arrayToObject:vR,assign:tme,combine:sme,compact:ime,decode:nme,encode:rme,isBuffer:ame,isRegExp:ome,maybeMap:ume,merge:eme},_R=Ghe,Uh=bR,Wc=L0,lme=Object.prototype.hasOwnProperty,wR={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},qo=Array.isArray,cme=Array.prototype.push,xR=function(e,t){cme.apply(e,qo(t)?t:[t])},fme=Date.prototype.toISOString,SR=Wc.default,Sr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Uh.encode,encodeValuesOnly:!1,format:SR,formatter:Wc.formatters[SR],indices:!1,serializeDate:function(t){return fme.call(t)},skipNulls:!1,strictNullHandling:!1},dme=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},q0={},pme=function e(t,n,r,i,o,a,s,l,c,d,p,m,h,y,v,w){for(var _=t,b=w,S=0,A=!1;(b=b.get(q0))!==void 0&&!A;){var E=b.get(t);if(S+=1,typeof E<"u"){if(E===S)throw new RangeError("Cyclic object value");A=!0}typeof b.get(q0)>"u"&&(S=0)}if(typeof l=="function"?_=l(n,_):_ instanceof Date?_=p(_):r==="comma"&&qo(_)&&(_=Uh.maybeMap(_,function(q){return q instanceof Date?p(q):q})),_===null){if(o)return s&&!y?s(n,Sr.encoder,v,"key",m):n;_=""}if(dme(_)||Uh.isBuffer(_)){if(s){var T=y?n:s(n,Sr.encoder,v,"key",m);return[h(T)+"="+h(s(_,Sr.encoder,v,"value",m))]}return[h(n)+"="+h(String(_))]}var N=[];if(typeof _>"u")return N;var L;if(r==="comma"&&qo(_))y&&s&&(_=Uh.maybeMap(_,s)),L=[{value:_.length>0?_.join(",")||null:void 0}];else if(qo(l))L=l;else{var F=Object.keys(_);L=c?F.sort(c):F}for(var j=i&&qo(_)&&_.length===1?n+"[]":n,H=0;H<L.length;++H){var re=L[H],Q=typeof re=="object"&&typeof re.value<"u"?re.value:_[re];if(!(a&&Q===null)){var G=qo(_)?typeof r=="function"?r(j,re):j:j+(d?"."+re:"["+re+"]");w.set(t,S);var V=_R();V.set(q0,w),xR(N,e(Q,G,r,i,o,a,r==="comma"&&y&&qo(_)?null:s,l,c,d,p,m,h,y,v,V))}}return N},hme=function(t){if(!t)return Sr;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Sr.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Wc.default;if(typeof t.format<"u"){if(!lme.call(Wc.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=Wc.formatters[r],o=Sr.filter;return(typeof t.filter=="function"||qo(t.filter))&&(o=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Sr.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Sr.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Sr.charsetSentinel,delimiter:typeof t.delimiter>"u"?Sr.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Sr.encode,encoder:typeof t.encoder=="function"?t.encoder:Sr.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Sr.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Sr.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Sr.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Sr.strictNullHandling}},mme=function(e,t){var n=e,r=hme(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):qo(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in wR?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var l=wR[s];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var d=_R(),p=0;p<i.length;++p){var m=i[p];r.skipNulls&&n[m]===null||xR(a,pme(n[m],m,l,c,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,d))}var h=a.join(r.delimiter),y=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),h.length>0?y+h:""},Xu=bR,U0=Object.prototype.hasOwnProperty,yme=Array.isArray,ar={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Xu.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},gme=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},ER=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},vme="utf8=%26%2310003%3B",bme="utf8=%E2%9C%93",_me=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,a=i.split(n.delimiter,o),s=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<a.length;++l)a[l].indexOf("utf8=")===0&&(a[l]===bme?c="utf-8":a[l]===vme&&(c="iso-8859-1"),s=l,l=a.length);for(l=0;l<a.length;++l)if(l!==s){var d=a[l],p=d.indexOf("]="),m=p===-1?d.indexOf("="):p+1,h,y;m===-1?(h=n.decoder(d,ar.decoder,c,"key"),y=n.strictNullHandling?null:""):(h=n.decoder(d.slice(0,m),ar.decoder,c,"key"),y=Xu.maybeMap(ER(d.slice(m+1),n),function(v){return n.decoder(v,ar.decoder,c,"value")})),y&&n.interpretNumericEntities&&c==="iso-8859-1"&&(y=gme(y)),d.indexOf("[]=")>-1&&(y=yme(y)?[y]:y),U0.call(r,h)?r[h]=Xu.combine(r[h],y):r[h]=y}return r},wme=function(e,t,n,r){for(var i=r?t:ER(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if(s==="[]"&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,c=parseInt(l,10);!n.parseArrays&&l===""?a={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[],a[c]=i):l!=="__proto__"&&(a[l]=i)}i=a}return i},xme=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=r.depth>0&&a.exec(o),c=l?o.slice(0,l.index):o,d=[];if(c){if(!r.plainObjects&&U0.call(Object.prototype,c)&&!r.allowPrototypes)return;d.push(c)}for(var p=0;r.depth>0&&(l=s.exec(o))!==null&&p<r.depth;){if(p+=1,!r.plainObjects&&U0.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;d.push(l[1])}return l&&d.push("["+o.slice(l.index)+"]"),wme(d,n,r,i)}},Sme=function(t){if(!t)return ar;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?ar.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?ar.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ar.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ar.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ar.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ar.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ar.comma,decoder:typeof t.decoder=="function"?t.decoder:ar.decoder,delimiter:typeof t.delimiter=="string"||Xu.isRegExp(t.delimiter)?t.delimiter:ar.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ar.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ar.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ar.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ar.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ar.strictNullHandling}},Eme=function(e,t){var n=Sme(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?_me(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;a<o.length;++a){var s=o[a],l=xme(s,r[s],n,typeof e=="string");i=Xu.merge(i,l,n)}return n.allowSparse===!0?i:Xu.compact(i)},Ame=mme,Cme=Eme,Ome=L0,Tme={formats:Ome,parse:Cme,stringify:Ame};const $me=Oo(Tme),kme=e=>e[1]!==void 0,Vn=e=>{const{method:t,path:n,query:r,headers:i,body:o}=e,a=Object.entries(i).filter(kme),s=Object.fromEntries(a),l=$me.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),c=l?[n,l].join("?"):n;return{method:t,url:c,headers:s,data:o}},Ime=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),Pme=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),Rme=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Dme=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Nme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),Mme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),jme=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),Lme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Fme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),qme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),Ume=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),Bme=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),zme=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Zme=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Hme=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),Wme=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),Vme=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Kme=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),Gme=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Yme=e=>({path:"/files",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{key:e.key,size:e.size,accessPolicies:e.accessPolicies,index:e.index,contentType:e.contentType,tags:e.tags}});let Jme=class{constructor(t,n={}){R(this,"addParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=Ime(t),s=(this.props.toAxiosRequest??Vn)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"createConversation",async t=>{const{path:n,headers:r,query:i,body:o}=Pme(t),s=(this.props.toAxiosRequest??Vn)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"deleteConversation",async t=>{const{path:n,headers:r,query:i,body:o}=Rme(t),s=(this.props.toAxiosRequest??Vn)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"getConversation",async t=>{const{path:n,headers:r,query:i,body:o}=Dme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"getParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=Nme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"listConversationMessages",async t=>{const{path:n,headers:r,query:i,body:o}=Mme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"listConversations",async t=>{const{path:n,headers:r,query:i,body:o}=jme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"listParticipants",async t=>{const{path:n,headers:r,query:i,body:o}=Lme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"listenConversation",async t=>{const{path:n,headers:r,query:i,body:o}=Fme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"removeParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=qme(t),s=(this.props.toAxiosRequest??Vn)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"createMessage",async t=>{const{path:n,headers:r,query:i,body:o}=Ume(t),s=(this.props.toAxiosRequest??Vn)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"deleteMessage",async t=>{const{path:n,headers:r,query:i,body:o}=Bme(t),s=(this.props.toAxiosRequest??Vn)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"getMessage",async t=>{const{path:n,headers:r,query:i,body:o}=zme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"createUser",async t=>{const{path:n,headers:r,query:i,body:o}=Zme(t),s=(this.props.toAxiosRequest??Vn)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"deleteUser",async t=>{const{path:n,headers:r,query:i,body:o}=Hme(t),s=(this.props.toAxiosRequest??Vn)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"getUser",async t=>{const{path:n,headers:r,query:i,body:o}=Wme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"updateUser",async t=>{const{path:n,headers:r,query:i,body:o}=Vme(t),s=(this.props.toAxiosRequest??Vn)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"createEvent",async t=>{const{path:n,headers:r,query:i,body:o}=Kme(t),s=(this.props.toAxiosRequest??Vn)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"getEvent",async t=>{const{path:n,headers:r,query:i,body:o}=Gme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"createFile",async t=>{const{path:n,headers:r,query:i,body:o}=Yme(t),s=(this.props.toAxiosRequest??Vn)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});this.axiosInstance=t,this.props=n}};function Kn(e){var t;return zP.isAxiosError(e)&&((t=e.response)!=null&&t.data)?ZP(e.response.data):ZP(e)}class AR{constructor(){R(this,"listeners",{})}emit(t,n){const r=this.listeners[t];if(r)for(const i of[...r])i(n)}onceOrMore(t,n){const r=i=>{n(i)==="stop-listening"&&this.off(t,r)};this.on(t,r)}once(t,n){const r=i=>{this.off(t,r),n(i)};this.on(t,r)}on(t,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n)}off(t,n){const r=this.listeners[t];if(!r)return;const i=r.indexOf(n);i!==-1&&r.splice(i,1)}cleanup(){this.listeners={}}}var B0={exports:{}};/** @license
|
|
194
|
+
`+t.prev}function Lh(e,t){var n=P0(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=xa(e,i)?t(e[i],e):""}var o=typeof $0=="function"?$0(e):[],a;if(Yu){a={};for(var s=0;s<o.length;s++)a["$"+o[s]]=o[s]}for(var l in e)xa(e,l)&&(n&&String(Number(l))===l&&l<e.length||Yu&&a["$"+l]instanceof Symbol||(iR.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof $0=="function")for(var c=0;c<o.length;c++)sR.call(e,o[c])&&r.push("["+t(o[c])+"]: "+t(e[o[c]],e));return r}var N0=x0,Ju=lhe,Lhe=bhe,Fhe=N0("%TypeError%"),Fh=N0("%WeakMap%",!0),qh=N0("%Map%",!0),qhe=Ju("WeakMap.prototype.get",!0),Uhe=Ju("WeakMap.prototype.set",!0),Bhe=Ju("WeakMap.prototype.has",!0),zhe=Ju("Map.prototype.get",!0),Zhe=Ju("Map.prototype.set",!0),Hhe=Ju("Map.prototype.has",!0),M0=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Whe=function(e,t){var n=M0(e,t);return n&&n.value},Vhe=function(e,t,n){var r=M0(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Khe=function(e,t){return!!M0(e,t)},Ghe=function(){var t,n,r,i={assert:function(o){if(!i.has(o))throw new Fhe("Side channel does not contain "+Lhe(o))},get:function(o){if(Fh&&o&&(typeof o=="object"||typeof o=="function")){if(t)return qhe(t,o)}else if(qh){if(n)return zhe(n,o)}else if(r)return Whe(r,o)},has:function(o){if(Fh&&o&&(typeof o=="object"||typeof o=="function")){if(t)return Bhe(t,o)}else if(qh){if(n)return Hhe(n,o)}else if(r)return Khe(r,o);return!1},set:function(o,a){Fh&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new Fh),Uhe(t,o,a)):qh?(n||(n=new qh),Zhe(n,o,a)):(r||(r={key:{},next:null}),Vhe(r,o,a))}};return i},Yhe=String.prototype.replace,Jhe=/%20/g,j0={RFC1738:"RFC1738",RFC3986:"RFC3986"},L0={default:j0.RFC3986,formatters:{RFC1738:function(e){return Yhe.call(e,Jhe,"+")},RFC3986:function(e){return String(e)}},RFC1738:j0.RFC1738,RFC3986:j0.RFC3986},Xhe=L0,F0=Object.prototype.hasOwnProperty,ks=Array.isArray,ho=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Qhe=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(ks(r)){for(var i=[],o=0;o<r.length;++o)typeof r[o]<"u"&&i.push(r[o]);n.obj[n.prop]=i}}},vR=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(r[i]=t[i]);return r},eme=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(ks(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!F0.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var i=t;return ks(t)&&!ks(n)&&(i=vR(t,r)),ks(t)&&ks(n)?(n.forEach(function(o,a){if(F0.call(t,a)){var s=t[a];s&&typeof s=="object"&&o&&typeof o=="object"?t[a]=e(s,o,r):t.push(o)}else t[a]=o}),t):Object.keys(n).reduce(function(o,a){var s=n[a];return F0.call(o,a)?o[a]=e(o[a],s,r):o[a]=s,o},i)},tme=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},nme=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},rme=function(t,n,r,i,o){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),r==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var s="",l=0;l<a.length;++l){var c=a.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===Xhe.RFC1738&&(c===40||c===41)){s+=a.charAt(l);continue}if(c<128){s=s+ho[c];continue}if(c<2048){s=s+(ho[192|c>>6]+ho[128|c&63]);continue}if(c<55296||c>=57344){s=s+(ho[224|c>>12]+ho[128|c>>6&63]+ho[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|a.charCodeAt(l)&1023),s+=ho[240|c>>18]+ho[128|c>>12&63]+ho[128|c>>6&63]+ho[128|c&63]}return s},ime=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i<n.length;++i)for(var o=n[i],a=o.obj[o.prop],s=Object.keys(a),l=0;l<s.length;++l){var c=s[l],d=a[c];typeof d=="object"&&d!==null&&r.indexOf(d)===-1&&(n.push({obj:a,prop:c}),r.push(d))}return Qhe(n),t},ome=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ame=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},sme=function(t,n){return[].concat(t,n)},ume=function(t,n){if(ks(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},bR={arrayToObject:vR,assign:tme,combine:sme,compact:ime,decode:nme,encode:rme,isBuffer:ame,isRegExp:ome,maybeMap:ume,merge:eme},_R=Ghe,Uh=bR,Wc=L0,lme=Object.prototype.hasOwnProperty,wR={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},qo=Array.isArray,cme=Array.prototype.push,xR=function(e,t){cme.apply(e,qo(t)?t:[t])},fme=Date.prototype.toISOString,SR=Wc.default,Sr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Uh.encode,encodeValuesOnly:!1,format:SR,formatter:Wc.formatters[SR],indices:!1,serializeDate:function(t){return fme.call(t)},skipNulls:!1,strictNullHandling:!1},dme=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},q0={},pme=function e(t,n,r,i,o,a,s,l,c,d,p,m,h,y,v,w){for(var _=t,b=w,S=0,A=!1;(b=b.get(q0))!==void 0&&!A;){var E=b.get(t);if(S+=1,typeof E<"u"){if(E===S)throw new RangeError("Cyclic object value");A=!0}typeof b.get(q0)>"u"&&(S=0)}if(typeof l=="function"?_=l(n,_):_ instanceof Date?_=p(_):r==="comma"&&qo(_)&&(_=Uh.maybeMap(_,function(q){return q instanceof Date?p(q):q})),_===null){if(o)return s&&!y?s(n,Sr.encoder,v,"key",m):n;_=""}if(dme(_)||Uh.isBuffer(_)){if(s){var T=y?n:s(n,Sr.encoder,v,"key",m);return[h(T)+"="+h(s(_,Sr.encoder,v,"value",m))]}return[h(n)+"="+h(String(_))]}var j=[];if(typeof _>"u")return j;var L;if(r==="comma"&&qo(_))y&&s&&(_=Uh.maybeMap(_,s)),L=[{value:_.length>0?_.join(",")||null:void 0}];else if(qo(l))L=l;else{var F=Object.keys(_);L=c?F.sort(c):F}for(var M=i&&qo(_)&&_.length===1?n+"[]":n,H=0;H<L.length;++H){var re=L[H],Q=typeof re=="object"&&typeof re.value<"u"?re.value:_[re];if(!(a&&Q===null)){var G=qo(_)?typeof r=="function"?r(M,re):M:M+(d?"."+re:"["+re+"]");w.set(t,S);var V=_R();V.set(q0,w),xR(j,e(Q,G,r,i,o,a,r==="comma"&&y&&qo(_)?null:s,l,c,d,p,m,h,y,v,V))}}return j},hme=function(t){if(!t)return Sr;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Sr.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Wc.default;if(typeof t.format<"u"){if(!lme.call(Wc.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=Wc.formatters[r],o=Sr.filter;return(typeof t.filter=="function"||qo(t.filter))&&(o=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Sr.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Sr.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Sr.charsetSentinel,delimiter:typeof t.delimiter>"u"?Sr.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Sr.encode,encoder:typeof t.encoder=="function"?t.encoder:Sr.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Sr.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Sr.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Sr.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Sr.strictNullHandling}},mme=function(e,t){var n=e,r=hme(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):qo(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in wR?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var l=wR[s];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var d=_R(),p=0;p<i.length;++p){var m=i[p];r.skipNulls&&n[m]===null||xR(a,pme(n[m],m,l,c,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,d))}var h=a.join(r.delimiter),y=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),h.length>0?y+h:""},Xu=bR,U0=Object.prototype.hasOwnProperty,yme=Array.isArray,ar={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Xu.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},gme=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},ER=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},vme="utf8=%26%2310003%3B",bme="utf8=%E2%9C%93",_me=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,a=i.split(n.delimiter,o),s=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<a.length;++l)a[l].indexOf("utf8=")===0&&(a[l]===bme?c="utf-8":a[l]===vme&&(c="iso-8859-1"),s=l,l=a.length);for(l=0;l<a.length;++l)if(l!==s){var d=a[l],p=d.indexOf("]="),m=p===-1?d.indexOf("="):p+1,h,y;m===-1?(h=n.decoder(d,ar.decoder,c,"key"),y=n.strictNullHandling?null:""):(h=n.decoder(d.slice(0,m),ar.decoder,c,"key"),y=Xu.maybeMap(ER(d.slice(m+1),n),function(v){return n.decoder(v,ar.decoder,c,"value")})),y&&n.interpretNumericEntities&&c==="iso-8859-1"&&(y=gme(y)),d.indexOf("[]=")>-1&&(y=yme(y)?[y]:y),U0.call(r,h)?r[h]=Xu.combine(r[h],y):r[h]=y}return r},wme=function(e,t,n,r){for(var i=r?t:ER(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if(s==="[]"&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,c=parseInt(l,10);!n.parseArrays&&l===""?a={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[],a[c]=i):l!=="__proto__"&&(a[l]=i)}i=a}return i},xme=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=r.depth>0&&a.exec(o),c=l?o.slice(0,l.index):o,d=[];if(c){if(!r.plainObjects&&U0.call(Object.prototype,c)&&!r.allowPrototypes)return;d.push(c)}for(var p=0;r.depth>0&&(l=s.exec(o))!==null&&p<r.depth;){if(p+=1,!r.plainObjects&&U0.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;d.push(l[1])}return l&&d.push("["+o.slice(l.index)+"]"),wme(d,n,r,i)}},Sme=function(t){if(!t)return ar;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?ar.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?ar.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ar.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ar.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ar.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ar.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ar.comma,decoder:typeof t.decoder=="function"?t.decoder:ar.decoder,delimiter:typeof t.delimiter=="string"||Xu.isRegExp(t.delimiter)?t.delimiter:ar.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ar.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ar.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ar.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ar.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ar.strictNullHandling}},Eme=function(e,t){var n=Sme(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?_me(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;a<o.length;++a){var s=o[a],l=xme(s,r[s],n,typeof e=="string");i=Xu.merge(i,l,n)}return n.allowSparse===!0?i:Xu.compact(i)},Ame=mme,Cme=Eme,Ome=L0,Tme={formats:Ome,parse:Cme,stringify:Ame};const $me=Oo(Tme),kme=e=>e[1]!==void 0,Vn=e=>{const{method:t,path:n,query:r,headers:i,body:o}=e,a=Object.entries(i).filter(kme),s=Object.fromEntries(a),l=$me.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),c=l?[n,l].join("?"):n;return{method:t,url:c,headers:s,data:o}},Ime=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),Pme=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),Rme=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Dme=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Nme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),Mme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),jme=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),Lme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Fme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),qme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),Ume=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),Bme=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),zme=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Zme=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Hme=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),Wme=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),Vme=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Kme=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),Gme=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Yme=e=>({path:"/files",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{key:e.key,size:e.size,accessPolicies:e.accessPolicies,index:e.index,contentType:e.contentType,tags:e.tags}});let Jme=class{constructor(t,n={}){R(this,"addParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=Ime(t),s=(this.props.toAxiosRequest??Vn)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"createConversation",async t=>{const{path:n,headers:r,query:i,body:o}=Pme(t),s=(this.props.toAxiosRequest??Vn)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"deleteConversation",async t=>{const{path:n,headers:r,query:i,body:o}=Rme(t),s=(this.props.toAxiosRequest??Vn)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"getConversation",async t=>{const{path:n,headers:r,query:i,body:o}=Dme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"getParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=Nme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"listConversationMessages",async t=>{const{path:n,headers:r,query:i,body:o}=Mme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"listConversations",async t=>{const{path:n,headers:r,query:i,body:o}=jme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"listParticipants",async t=>{const{path:n,headers:r,query:i,body:o}=Lme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"listenConversation",async t=>{const{path:n,headers:r,query:i,body:o}=Fme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"removeParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=qme(t),s=(this.props.toAxiosRequest??Vn)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"createMessage",async t=>{const{path:n,headers:r,query:i,body:o}=Ume(t),s=(this.props.toAxiosRequest??Vn)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"deleteMessage",async t=>{const{path:n,headers:r,query:i,body:o}=Bme(t),s=(this.props.toAxiosRequest??Vn)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"getMessage",async t=>{const{path:n,headers:r,query:i,body:o}=zme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"createUser",async t=>{const{path:n,headers:r,query:i,body:o}=Zme(t),s=(this.props.toAxiosRequest??Vn)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"deleteUser",async t=>{const{path:n,headers:r,query:i,body:o}=Hme(t),s=(this.props.toAxiosRequest??Vn)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"getUser",async t=>{const{path:n,headers:r,query:i,body:o}=Wme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"updateUser",async t=>{const{path:n,headers:r,query:i,body:o}=Vme(t),s=(this.props.toAxiosRequest??Vn)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"createEvent",async t=>{const{path:n,headers:r,query:i,body:o}=Kme(t),s=(this.props.toAxiosRequest??Vn)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"getEvent",async t=>{const{path:n,headers:r,query:i,body:o}=Gme(t),s=(this.props.toAxiosRequest??Vn)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});R(this,"createFile",async t=>{const{path:n,headers:r,query:i,body:o}=Yme(t),s=(this.props.toAxiosRequest??Vn)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(s).then(l=>l.data).catch(l=>{throw Kn(l)})});this.axiosInstance=t,this.props=n}};function Kn(e){var t;return zP.isAxiosError(e)&&((t=e.response)!=null&&t.data)?ZP(e.response.data):ZP(e)}class AR{constructor(){R(this,"listeners",{})}emit(t,n){const r=this.listeners[t];if(r)for(const i of[...r])i(n)}onceOrMore(t,n){const r=i=>{n(i)==="stop-listening"&&this.off(t,r)};this.on(t,r)}once(t,n){const r=i=>{this.off(t,r),n(i)};this.on(t,r)}on(t,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n)}off(t,n){const r=this.listeners[t];if(!r)return;const i=r.indexOf(n);i!==-1&&r.splice(i,1)}cleanup(){this.listeners={}}}var B0={exports:{}};/** @license
|
|
195
195
|
* eventsource.js
|
|
196
196
|
* Available under MIT License (MIT)
|
|
197
197
|
* https://github.com/Yaffle/EventSource/
|
|
198
198
|
*/(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,a=n.XDomainRequest,s=n.ActiveXObject,l=n.EventSource,c=n.document,d=n.Promise,p=n.fetch,m=n.Response,h=n.TextDecoder,y=n.TextEncoder,v=n.AbortController;if(typeof window<"u"&&typeof c<"u"&&!("readyState"in c)&&c.body==null&&(c.readyState="loading",window.addEventListener("load",function(K){c.readyState="complete"},!1)),o==null&&s!=null&&(o=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(K){function pe(){}return pe.prototype=K,new pe}),Date.now||(Date.now=function(){return new Date().getTime()}),v==null){var w=p;p=function(K,pe){var Te=pe.signal;return w(K,{headers:pe.headers,credentials:pe.credentials,cache:pe.cache}).then(function(Se){var et=Se.body.getReader();return Te._reader=et,Te._aborted&&Te._reader.cancel(),{status:Se.status,statusText:Se.statusText,headers:Se.headers,body:{getReader:function(){return et}}}})},v=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function _(){this.bitsNeeded=0,this.codePoint=0}_.prototype.decode=function(K){function pe(ie,ge,xe){if(xe===1)return ie>=128>>ge&&ie<<ge<=2047;if(xe===2)return ie>=2048>>ge&&ie<<ge<=55295||ie>=57344>>ge&&ie<<ge<=65535;if(xe===3)return ie>=65536>>ge&&ie<<ge<=1114111;throw new Error}function Te(ie,ge){if(ie===6*1)return ge>>6>15?3:ge>31?2:1;if(ie===6*2)return ge>15?3:2;if(ie===6*3)return 3;throw new Error}for(var Se=65533,et="",Ue=this.bitsNeeded,ot=this.codePoint,It=0;It<K.length;It+=1){var mt=K[It];Ue!==0&&(mt<128||mt>191||!pe(ot<<6|mt&63,Ue-6,Te(Ue,ot)))&&(Ue=0,ot=Se,et+=String.fromCharCode(ot)),Ue===0?(mt>=0&&mt<=127?(Ue=0,ot=mt):mt>=192&&mt<=223?(Ue=6*1,ot=mt&31):mt>=224&&mt<=239?(Ue=6*2,ot=mt&15):mt>=240&&mt<=247?(Ue=6*3,ot=mt&7):(Ue=0,ot=Se),Ue!==0&&!pe(ot,Ue,Te(Ue,ot))&&(Ue=0,ot=Se)):(Ue-=6,ot=ot<<6|mt&63),Ue===0&&(ot<=65535?et+=String.fromCharCode(ot):(et+=String.fromCharCode(55296+(ot-65535-1>>10)),et+=String.fromCharCode(56320+(ot-65535-1&1023))))}return this.bitsNeeded=Ue,this.codePoint=ot,et};var b=function(){try{return new h().decode(new y().encode("test"),{stream:!0})==="test"}catch(K){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+K)}return!1};(h==null||y==null||!b())&&(h=_);var S=function(){};function A(K){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=S,this.onload=S,this.onerror=S,this.onreadystatechange=S,this._contentType="",this._xhr=K,this._sendTimeout=0,this._abort=S}A.prototype.open=function(K,pe){this._abort(!0);var Te=this,Se=this._xhr,et=1,Ue=0;this._abort=function(xe){Te._sendTimeout!==0&&(i(Te._sendTimeout),Te._sendTimeout=0),(et===1||et===2||et===3)&&(et=4,Se.onload=S,Se.onerror=S,Se.onabort=S,Se.onprogress=S,Se.onreadystatechange=S,Se.abort(),Ue!==0&&(i(Ue),Ue=0),xe||(Te.readyState=4,Te.onabort(null),Te.onreadystatechange())),et=0};var ot=function(){if(et===1){var xe=0,Be="",ct=void 0;if("contentType"in Se)xe=200,Be="OK",ct=Se.contentType;else try{xe=Se.status,Be=Se.statusText,ct=Se.getResponseHeader("Content-Type")}catch{xe=0,Be="",ct=void 0}xe!==0&&(et=2,Te.readyState=2,Te.status=xe,Te.statusText=Be,Te._contentType=ct,Te.onreadystatechange())}},It=function(){if(ot(),et===2||et===3){et=3;var xe="";try{xe=Se.responseText}catch{}Te.readyState=3,Te.responseText=xe,Te.onprogress()}},mt=function(xe,Be){if((Be==null||Be.preventDefault==null)&&(Be={preventDefault:S}),It(),et===1||et===2||et===3){if(et=4,Ue!==0&&(i(Ue),Ue=0),Te.readyState=4,xe==="load")Te.onload(Be);else if(xe==="error")Te.onerror(Be);else if(xe==="abort")Te.onabort(Be);else throw new TypeError;Te.onreadystatechange()}},ie=function(xe){Se!=null&&(Se.readyState===4?(!("onload"in Se)||!("onerror"in Se)||!("onabort"in Se))&&mt(Se.responseText===""?"error":"load",xe):Se.readyState===3?"onprogress"in Se||It():Se.readyState===2&&ot())},ge=function(){Ue=r(function(){ge()},500),Se.readyState===3&&It()};"onload"in Se&&(Se.onload=function(xe){mt("load",xe)}),"onerror"in Se&&(Se.onerror=function(xe){mt("error",xe)}),"onabort"in Se&&(Se.onabort=function(xe){mt("abort",xe)}),"onprogress"in Se&&(Se.onprogress=It),"onreadystatechange"in Se&&(Se.onreadystatechange=function(xe){ie(xe)}),("contentType"in Se||!("ontimeout"in o.prototype))&&(pe+=(pe.indexOf("?")===-1?"?":"&")+"padding=true"),Se.open(K,pe,!0),"readyState"in Se&&(Ue=r(function(){ge()},0))},A.prototype.abort=function(){this._abort(!1)},A.prototype.getResponseHeader=function(K){return this._contentType},A.prototype.setRequestHeader=function(K,pe){var Te=this._xhr;"setRequestHeader"in Te&&Te.setRequestHeader(K,pe)},A.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},A.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var K=this;K._sendTimeout=r(function(){K._sendTimeout=0,K.send()},4);return}var pe=this._xhr;"withCredentials"in pe&&(pe.withCredentials=this.withCredentials);try{pe.send(void 0)}catch(Te){throw Te}};function E(K){return K.replace(/[A-Z]/g,function(pe){return String.fromCharCode(pe.charCodeAt(0)+32)})}function T(K){for(var pe=Object.create(null),Te=K.split(`\r
|
|
199
|
-
`),Se=0;Se<Te.length;Se+=1){var et=Te[Se],Ue=et.split(": "),ot=Ue.shift(),It=Ue.join(": ");pe[E(ot)]=It}this._map=pe}T.prototype.get=function(K){return this._map[E(K)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function
|
|
199
|
+
`),Se=0;Se<Te.length;Se+=1){var et=Te[Se],Ue=et.split(": "),ot=Ue.shift(),It=Ue.join(": ");pe[E(ot)]=It}this._map=pe}T.prototype.get=function(K){return this._map[E(K)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function j(){}j.prototype.open=function(K,pe,Te,Se,et,Ue,ot){K.open("GET",et);var It=0;K.onprogress=function(){var ie=K.responseText,ge=ie.slice(It);It+=ge.length,Te(ge)},K.onerror=function(ie){ie.preventDefault(),Se(new Error("NetworkError"))},K.onload=function(){Se(null)},K.onabort=function(){Se(null)},K.onreadystatechange=function(){if(K.readyState===o.HEADERS_RECEIVED){var ie=K.status,ge=K.statusText,xe=K.getResponseHeader("Content-Type"),Be=K.getAllResponseHeaders();pe(ie,ge,xe,new T(Be))}},K.withCredentials=Ue;for(var mt in ot)Object.prototype.hasOwnProperty.call(ot,mt)&&K.setRequestHeader(mt,ot[mt]);return K.send(),K};function L(K){this._headers=K}L.prototype.get=function(K){return this._headers.get(K)};function F(){}F.prototype.open=function(K,pe,Te,Se,et,Ue,ot){var It=null,mt=new v,ie=mt.signal,ge=new h;return p(et,{headers:ot,credentials:Ue?"include":"same-origin",signal:ie,cache:"no-store"}).then(function(xe){return It=xe.body.getReader(),pe(xe.status,xe.statusText,xe.headers.get("Content-Type"),new L(xe.headers)),new d(function(Be,ct){var pn=function(){It.read().then(function(rn){if(rn.done)Be(void 0);else{var Jt=ge.decode(rn.value,{stream:!0});Te(Jt),pn()}}).catch(function(rn){ct(rn)})};pn()})}).catch(function(xe){if(xe.name!=="AbortError")return xe}).then(function(xe){Se(xe)}),{abort:function(){It!=null&&It.cancel(),mt.abort()}}};function M(){this._listeners=Object.create(null)}function H(K){r(function(){throw K},0)}M.prototype.dispatchEvent=function(K){K.target=this;var pe=this._listeners[K.type];if(pe!=null)for(var Te=pe.length,Se=0;Se<Te;Se+=1){var et=pe[Se];try{typeof et.handleEvent=="function"?et.handleEvent(K):et.call(this,K)}catch(Ue){H(Ue)}}},M.prototype.addEventListener=function(K,pe){K=String(K);var Te=this._listeners,Se=Te[K];Se==null&&(Se=[],Te[K]=Se);for(var et=!1,Ue=0;Ue<Se.length;Ue+=1)Se[Ue]===pe&&(et=!0);et||Se.push(pe)},M.prototype.removeEventListener=function(K,pe){K=String(K);var Te=this._listeners,Se=Te[K];if(Se!=null){for(var et=[],Ue=0;Ue<Se.length;Ue+=1)Se[Ue]!==pe&&et.push(Se[Ue]);et.length===0?delete Te[K]:Te[K]=et}};function re(K){this.type=K,this.target=void 0}function Q(K,pe){re.call(this,K),this.data=pe.data,this.lastEventId=pe.lastEventId}Q.prototype=Object.create(re.prototype);function G(K,pe){re.call(this,K),this.status=pe.status,this.statusText=pe.statusText,this.headers=pe.headers}G.prototype=Object.create(re.prototype);function V(K,pe){re.call(this,K),this.error=pe.error}V.prototype=Object.create(re.prototype);var q=-1,Y=0,ne=1,ce=2,P=-1,ue=0,Oe=1,N=2,Ne=3,qe=/^text\/event\-stream(;.*)?$/i,Me=1e3,Je=18e6,rt=function(K,pe){var Te=K==null?pe:parseInt(K,10);return Te!==Te&&(Te=pe),Ke(Te)},Ke=function(K){return Math.min(Math.max(K,Me),Je)},Pe=function(K,pe,Te){try{typeof pe=="function"&&pe.call(K,Te)}catch(Se){H(Se)}};function Ae(K,pe){M.call(this),pe=pe||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,Ze(this,K,pe)}function Fe(){return o!=null&&"withCredentials"in o.prototype||a==null?new o:new a}var $e=p!=null&&m!=null&&"body"in m.prototype;function Ze(K,pe,Te){pe=String(pe);var Se=!!Te.withCredentials,et=Te.lastEventIdQueryParameterName||"lastEventId",Ue=Ke(1e3),ot=rt(Te.heartbeatTimeout,45e3),It="",mt=Ue,ie=!1,ge=0,xe=Te.headers||{},Be=Te.Transport,ct=$e&&Be==null?void 0:new A(Be!=null?new Be:Fe()),pn=Be!=null&&typeof Be!="string"?new Be:ct==null?new F:new j,rn=void 0,Jt=0,cn=q,Cn="",ee="",ae="",ft="",At=ue,on=0,pt=0,Mn=function(Xe,Re,We,_t){if(cn===Y)if(Xe===200&&We!=null&&qe.test(We)){cn=ne,ie=Date.now(),mt=Ue,K.readyState=ne;var Pt=new G("open",{status:Xe,statusText:Re,headers:_t});K.dispatchEvent(Pt),Pe(K,K.onopen,Pt)}else{var Xt="";Xe!==200?(Re&&(Re=Re.replace(/\s+/g," ")),Xt="EventSource's response has a status "+Xe+" "+Re+" that is not 200. Aborting the connection."):Xt="EventSource's response has a Content-Type specifying an unsupported type: "+(We==null?"-":We.replace(/\s+/g," "))+". Aborting the connection.",je();var Pt=new G("error",{status:Xe,statusText:Re,headers:_t});K.dispatchEvent(Pt),Pe(K,K.onerror,Pt),console.error(Xt)}},sr=function(Xe){if(cn===ne){for(var Re=-1,We=0;We<Xe.length;We+=1){var _t=Xe.charCodeAt(We);(_t===`
|
|
200
200
|
`.charCodeAt(0)||_t==="\r".charCodeAt(0))&&(Re=We)}var Pt=(Re!==-1?ft:"")+Xe.slice(0,Re+1);ft=(Re===-1?ft:"")+Xe.slice(Re+1),Xe!==""&&(ie=Date.now(),ge+=Xe.length);for(var Xt=0;Xt<Pt.length;Xt+=1){var _t=Pt.charCodeAt(Xt);if(At===P&&_t===`
|
|
201
201
|
`.charCodeAt(0))At=ue;else if(At===P&&(At=ue),_t==="\r".charCodeAt(0)||_t===`
|
|
202
202
|
`.charCodeAt(0)){if(At!==ue){At===Oe&&(pt=Xt+1);var bn=Pt.slice(on,pt-1),Rn=Pt.slice(pt+(pt<Xt&&Pt.charCodeAt(pt)===" ".charCodeAt(0)?1:0),Xt);bn==="data"?(Cn+=`
|
|
203
|
-
`,Cn+=Rn):bn==="id"?ee=Rn:bn==="event"?ae=Rn:bn==="retry"?(Ue=rt(Rn,Ue),mt=Ue):bn==="heartbeatTimeout"&&(ot=rt(Rn,ot),Jt!==0&&(i(Jt),Jt=r(function(){He()},ot)))}if(At===ue){if(Cn!==""){It=ee,ae===""&&(ae="message");var mr=new Q(ae,{data:Cn.slice(1),lastEventId:ee});if(K.dispatchEvent(mr),ae==="open"?Pe(K,K.onopen,mr):ae==="message"?Pe(K,K.onmessage,mr):ae==="error"&&Pe(K,K.onerror,mr),cn===ce)return}Cn="",ae=""}At=_t==="\r".charCodeAt(0)?P:ue}else At===ue&&(on=Xt,At=Oe),At===Oe?_t===":".charCodeAt(0)&&(pt=Xt+1,At=M):At===M&&(At=Ne)}}},D=function(Xe){if(cn===ne||cn===Y){cn=q,Jt!==0&&(i(Jt),Jt=0),Jt=r(function(){He()},mt),mt=Ke(Math.min(Ue*16,mt*2)),K.readyState=Y;var Re=new V("error",{error:Xe});K.dispatchEvent(Re),Pe(K,K.onerror,Re),Xe!=null&&console.error(Xe)}},je=function(){cn=ce,rn!=null&&(rn.abort(),rn=void 0),Jt!==0&&(i(Jt),Jt=0),K.readyState=ce},He=function(){if(Jt=0,cn!==q){if(!ie&&rn!=null)D(new Error("No activity within "+ot+" milliseconds. "+(cn===Y?"No response received.":ge+" chars received.")+" Reconnecting.")),rn!=null&&(rn.abort(),rn=void 0);else{var Xe=Math.max((ie||Date.now())+ot-Date.now(),1);ie=!1,Jt=r(function(){He()},Xe)}return}ie=!1,ge=0,Jt=r(function(){He()},ot),cn=Y,Cn="",ae="",ee=It,ft="",on=0,pt=0,At=ue;var Re=pe;if(pe.slice(0,5)!=="data:"&&pe.slice(0,5)!=="blob:"&&It!==""){var We=pe.indexOf("?");Re=We===-1?pe:pe.slice(0,We+1)+pe.slice(We+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Rn,mr){return mr===et?"":Rn}),Re+=(pe.indexOf("?")===-1?"?":"&")+et+"="+encodeURIComponent(It)}var _t=K.withCredentials,Pt={};Pt.Accept="text/event-stream";var Xt=K.headers;if(Xt!=null)for(var bn in Xt)Object.prototype.hasOwnProperty.call(Xt,bn)&&(Pt[bn]=Xt[bn]);try{rn=pn.open(ct,Mn,sr,D,Re,_t,Pt)}catch(Rn){throw je(),Rn}};K.url=pe,K.readyState=Y,K.withCredentials=Se,K.headers=xe,K._close=je,He()}Ae.prototype=Object.create(j.prototype),Ae.prototype.CONNECTING=Y,Ae.prototype.OPEN=ne,Ae.prototype.CLOSED=ce,Ae.prototype.close=function(){this._close()},Ae.CONNECTING=Y,Ae.OPEN=ne,Ae.CLOSED=ce,Ae.prototype.withCredentials=void 0;var lt=l;o!=null&&(l==null||!("withCredentials"in l.prototype))&&(lt=Ae),function(K){{var pe=K(t);pe!==void 0&&(e.exports=pe)}}(function(K){K.EventSourcePolyfill=Ae,K.NativeEventSource=l,K.EventSource=lt})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:se:globalThis)})(B0,B0.exports);var Xme=B0.exports;const Qme=Oo(Xme),eye=(e,t={})=>{const n=new Qme.EventSourcePolyfill(e,{headers:t.headers}),r=new AR;return n.onopen=i=>r.emit("open",i),n.onmessage=i=>r.emit("message",i),n.onerror=i=>r.emit("error",i),{emitter:r,source:n}},tye=async(e,t={})=>{const{emitter:n,source:r}=eye(e,t);return await new Promise((i,o)=>{n.on("open",()=>{i()}),n.on("error",a=>{o(a)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}};var sn;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(sn||(sn={}));var z0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(z0||(z0={}));const Qe=sn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ea=e=>{switch(typeof e){case"undefined":return Qe.undefined;case"string":return Qe.string;case"number":return isNaN(e)?Qe.nan:Qe.number;case"boolean":return Qe.boolean;case"function":return Qe.function;case"bigint":return Qe.bigint;case"symbol":return Qe.symbol;case"object":return Array.isArray(e)?Qe.array:e===null?Qe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Qe.promise:typeof Map<"u"&&e instanceof Map?Qe.map:typeof Set<"u"&&e instanceof Set?Qe.set:typeof Date<"u"&&e instanceof Date?Qe.date:Qe.object;default:return Qe.unknown}},De=sn.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"]),nye=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class qi extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,sn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}qi.create=e=>new qi(e);const Vc=(e,t)=>{let n;switch(e.code){case De.invalid_type:e.received===Qe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case De.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,sn.jsonStringifyReplacer)}`;break;case De.unrecognized_keys:n=`Unrecognized key(s) in object: ${sn.joinValues(e.keys,", ")}`;break;case De.invalid_union:n="Invalid input";break;case De.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${sn.joinValues(e.options)}`;break;case De.invalid_enum_value:n=`Invalid enum value. Expected ${sn.joinValues(e.options)}, received '${e.received}'`;break;case De.invalid_arguments:n="Invalid function arguments";break;case De.invalid_return_type:n="Invalid function return type";break;case De.invalid_date:n="Invalid date";break;case De.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:sn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case De.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case De.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case De.custom:n="Invalid input";break;case De.invalid_intersection_types:n="Intersection results could not be merged";break;case De.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case De.not_finite:n="Number must be finite";break;default:n=t.defaultError,sn.assertNever(e)}return{message:n}};let CR=Vc;function rye(e){CR=e}function Bh(){return CR}const zh=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...i,path:o,message:i.message||s}},iye=[];function tt(e,t){const n=zh({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Bh(),Vc].filter(r=>!!r)});e.common.issues.push(n)}class Er{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return $t;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return Er.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return $t;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const $t=Object.freeze({status:"aborted"}),OR=e=>({status:"dirty",value:e}),jr=e=>({status:"valid",value:e}),Z0=e=>e.status==="aborted",H0=e=>e.status==="dirty",Kc=e=>e.status==="valid",Zh=e=>typeof Promise<"u"&&e instanceof Promise;var dt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(dt||(dt={}));class mo{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const TR=(e,t)=>{if(Kc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new qi(e.common.issues);return this._error=n,this._error}}};function Nt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;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:i}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}class Lt{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Ea(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ea(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Er,ctx:{common:t.parent.common,data:t.data,parsedType:Ea(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Zh(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ea(t)},o=this._parseSync({data:t,path:i.path,parent:i});return TR(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ea(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(Zh(i)?i:Promise.resolve(i));return TR(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:De.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new zi({schema:this,typeName:Et.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Bo.create(this,this._def)}nullable(){return Ds.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Bi.create(this,this._def)}promise(){return nl.create(this,this._def)}or(t){return Xc.create([this,t],this._def)}and(t){return Qc.create(this,t,this._def)}transform(t){return new zi({...Nt(this._def),schema:this,typeName:Et.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new of({...Nt(this._def),innerType:this,defaultValue:n,typeName:Et.ZodDefault})}brand(){return new kR({typeName:Et.ZodBranded,type:this,...Nt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Yh({...Nt(this._def),innerType:this,catchValue:n,typeName:Et.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return af.create(this,t)}readonly(){return Xh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const oye=/^c[^\s-]{8,}$/i,aye=/^[a-z][a-z0-9]*$/,sye=/^[0-9A-HJKMNP-TV-Z]{26}$/,uye=/^[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,lye=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,cye="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let W0;const fye=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,dye=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,pye=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function hye(e,t){return!!((t==="v4"||!t)&&fye.test(e)||(t==="v6"||!t)&&dye.test(e))}class Ui extends Lt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Qe.string){const o=this._getOrReturnCtx(t);return tt(o,{code:De.invalid_type,expected:Qe.string,received:o.parsedType}),$t}const r=new Er;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:De.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:De.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(t,i),a?tt(i,{code:De.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&tt(i,{code:De.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")lye.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"email",code:De.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")W0||(W0=new RegExp(cye,"u")),W0.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"emoji",code:De.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")uye.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"uuid",code:De.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")oye.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"cuid",code:De.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")aye.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"cuid2",code:De.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")sye.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"ulid",code:De.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),tt(i,{validation:"url",code:De.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"regex",code:De.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),tt(i,{code:De.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.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)||(i=this._getOrReturnCtx(t,i),tt(i,{code:De.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),tt(i,{code:De.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?pye(o).test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{code:De.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?hye(t.data,o.version)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"ip",code:De.invalid_string,message:o.message}),r.dirty()):sn.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:De.invalid_string,...dt.errToObj(r)})}_addCheck(t){return new Ui({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...dt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...dt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...dt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...dt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...dt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...dt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...dt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...dt.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...dt.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...dt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...dt.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...dt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...dt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...dt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...dt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...dt.errToObj(n)})}nonempty(t){return this.min(1,dt.errToObj(t))}trim(){return new Ui({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ui({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ui({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ui.create=e=>{var t;return new Ui({checks:[],typeName:Et.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Nt(e)})};function mye(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Aa extends Lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Qe.number){const o=this._getOrReturnCtx(t);return tt(o,{code:De.invalid_type,expected:Qe.number,received:o.parsedType}),$t}let r;const i=new Er;for(const o of this._def.checks)o.kind==="int"?sn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:De.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:De.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:De.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?mye(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),tt(r,{code:De.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:De.not_finite,message:o.message}),i.dirty()):sn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new Aa({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Aa({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:dt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:dt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:dt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:dt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&sn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Aa.create=e=>new Aa({checks:[],typeName:Et.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Nt(e)});class Ca extends Lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Qe.bigint){const o=this._getOrReturnCtx(t);return tt(o,{code:De.invalid_type,expected:Qe.bigint,received:o.parsedType}),$t}let r;const i=new Er;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:De.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:De.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:De.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):sn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new Ca({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Ca({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ca.create=e=>{var t;return new Ca({checks:[],typeName:Et.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Nt(e)})};class Gc extends Lt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Qe.boolean){const r=this._getOrReturnCtx(t);return tt(r,{code:De.invalid_type,expected:Qe.boolean,received:r.parsedType}),$t}return jr(t.data)}}Gc.create=e=>new Gc({typeName:Et.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Nt(e)});class Is extends Lt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Qe.date){const o=this._getOrReturnCtx(t);return tt(o,{code:De.invalid_type,expected:Qe.date,received:o.parsedType}),$t}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return tt(o,{code:De.invalid_date}),$t}const r=new Er;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:De.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:De.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):sn.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Is({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:dt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:dt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Is.create=e=>new Is({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Et.ZodDate,...Nt(e)});class Hh extends Lt{_parse(t){if(this._getType(t)!==Qe.symbol){const r=this._getOrReturnCtx(t);return tt(r,{code:De.invalid_type,expected:Qe.symbol,received:r.parsedType}),$t}return jr(t.data)}}Hh.create=e=>new Hh({typeName:Et.ZodSymbol,...Nt(e)});class Yc extends Lt{_parse(t){if(this._getType(t)!==Qe.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:De.invalid_type,expected:Qe.undefined,received:r.parsedType}),$t}return jr(t.data)}}Yc.create=e=>new Yc({typeName:Et.ZodUndefined,...Nt(e)});class Jc extends Lt{_parse(t){if(this._getType(t)!==Qe.null){const r=this._getOrReturnCtx(t);return tt(r,{code:De.invalid_type,expected:Qe.null,received:r.parsedType}),$t}return jr(t.data)}}Jc.create=e=>new Jc({typeName:Et.ZodNull,...Nt(e)});class Qu extends Lt{constructor(){super(...arguments),this._any=!0}_parse(t){return jr(t.data)}}Qu.create=e=>new Qu({typeName:Et.ZodAny,...Nt(e)});class Ps extends Lt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return jr(t.data)}}Ps.create=e=>new Ps({typeName:Et.ZodUnknown,...Nt(e)});class Uo extends Lt{_parse(t){const n=this._getOrReturnCtx(t);return tt(n,{code:De.invalid_type,expected:Qe.never,received:n.parsedType}),$t}}Uo.create=e=>new Uo({typeName:Et.ZodNever,...Nt(e)});class Wh extends Lt{_parse(t){if(this._getType(t)!==Qe.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:De.invalid_type,expected:Qe.void,received:r.parsedType}),$t}return jr(t.data)}}Wh.create=e=>new Wh({typeName:Et.ZodVoid,...Nt(e)});class Bi extends Lt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Qe.array)return tt(n,{code:De.invalid_type,expected:Qe.array,received:n.parsedType}),$t;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(a||s)&&(tt(n,{code:a?De.too_big:De.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(tt(n,{code:De.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(tt(n,{code:De.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new mo(n,a,n.path,s)))).then(a=>Er.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new mo(n,a,n.path,s)));return Er.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Bi({...this._def,minLength:{value:t,message:dt.toString(n)}})}max(t,n){return new Bi({...this._def,maxLength:{value:t,message:dt.toString(n)}})}length(t,n){return new Bi({...this._def,exactLength:{value:t,message:dt.toString(n)}})}nonempty(t){return this.min(1,t)}}Bi.create=(e,t)=>new Bi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Et.ZodArray,...Nt(t)});function el(e){if(e instanceof Pn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Bo.create(el(r))}return new Pn({...e._def,shape:()=>t})}else return e instanceof Bi?new Bi({...e._def,type:el(e.element)}):e instanceof Bo?Bo.create(el(e.unwrap())):e instanceof Ds?Ds.create(el(e.unwrap())):e instanceof yo?yo.create(e.items.map(t=>el(t))):e}class Pn extends Lt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=sn.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Qe.object){const c=this._getOrReturnCtx(t);return tt(c,{code:De.invalid_type,expected:Qe.object,received:c.parsedType}),$t}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Uo&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const d=o[c],p=i.data[c];l.push({key:{status:"valid",value:c},value:d._parse(new mo(i,p,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Uo){const c=this._def.unknownKeys;if(c==="passthrough")for(const d of s)l.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(c==="strict")s.length>0&&(tt(i,{code:De.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const d of s){const p=i.data[d];l.push({key:{status:"valid",value:d},value:c._parse(new mo(i,p,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const d of l){const p=await d.key;c.push({key:p,value:await d.value,alwaysSet:d.alwaysSet})}return c}).then(c=>Er.mergeObjectSync(r,c)):Er.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return dt.errToObj,new Pn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const l=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=dt.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new Pn({...this._def,unknownKeys:"strip"})}passthrough(){return new Pn({...this._def,unknownKeys:"passthrough"})}extend(t){return new Pn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Pn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Et.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Pn({...this._def,catchall:t})}pick(t){const n={};return sn.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Pn({...this._def,shape:()=>n})}omit(t){const n={};return sn.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Pn({...this._def,shape:()=>n})}deepPartial(){return el(this)}partial(t){const n={};return sn.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Pn({...this._def,shape:()=>n})}required(t){const n={};return sn.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Bo;)o=o._def.innerType;n[r]=o}}),new Pn({...this._def,shape:()=>n})}keyof(){return $R(sn.objectKeys(this.shape))}}Pn.create=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strip",catchall:Uo.create(),typeName:Et.ZodObject,...Nt(t)}),Pn.strictCreate=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strict",catchall:Uo.create(),typeName:Et.ZodObject,...Nt(t)}),Pn.lazycreate=(e,t)=>new Pn({shape:e,unknownKeys:"strip",catchall:Uo.create(),typeName:Et.ZodObject,...Nt(t)});class Xc extends Lt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new qi(s.ctx.common.issues));return tt(n,{code:De.invalid_union,unionErrors:a}),$t}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(l=>new qi(l));return tt(n,{code:De.invalid_union,unionErrors:s}),$t}}get options(){return this._def.options}}Xc.create=(e,t)=>new Xc({options:e,typeName:Et.ZodUnion,...Nt(t)});const Vh=e=>e instanceof tf?Vh(e.schema):e instanceof zi?Vh(e.innerType()):e instanceof nf?[e.value]:e instanceof Oa?e.options:e instanceof rf?Object.keys(e.enum):e instanceof of?Vh(e._def.innerType):e instanceof Yc?[void 0]:e instanceof Jc?[null]:null;class Kh extends Lt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Qe.object)return tt(n,{code:De.invalid_type,expected:Qe.object,received:n.parsedType}),$t;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(tt(n,{code:De.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),$t)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=Vh(o.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new Kh({typeName:Et.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Nt(r)})}}function V0(e,t){const n=Ea(e),r=Ea(t);if(e===t)return{valid:!0,data:e};if(n===Qe.object&&r===Qe.object){const i=sn.objectKeys(t),o=sn.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const l=V0(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Qe.array&&r===Qe.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const a=e[o],s=t[o],l=V0(a,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Qe.date&&r===Qe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Qc extends Lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(Z0(o)||Z0(a))return $t;const s=V0(o.value,a.value);return s.valid?((H0(o)||H0(a))&&n.dirty(),{status:n.value,value:s.data}):(tt(r,{code:De.invalid_intersection_types}),$t)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Qc.create=(e,t,n)=>new Qc({left:e,right:t,typeName:Et.ZodIntersection,...Nt(n)});class yo extends Lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Qe.array)return tt(r,{code:De.invalid_type,expected:Qe.array,received:r.parsedType}),$t;if(r.data.length<this._def.items.length)return tt(r,{code:De.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$t;!this._def.rest&&r.data.length>this._def.items.length&&(tt(r,{code:De.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new mo(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>Er.mergeArray(n,a)):Er.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new yo({...this._def,rest:t})}}yo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yo({items:e,typeName:Et.ZodTuple,rest:null,...Nt(t)})};class ef extends Lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Qe.object)return tt(r,{code:De.invalid_type,expected:Qe.object,received:r.parsedType}),$t;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new mo(r,s,r.path,s)),value:a._parse(new mo(r,r.data[s],r.path,s))});return r.common.async?Er.mergeObjectAsync(n,i):Er.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Lt?new ef({keyType:t,valueType:n,typeName:Et.ZodRecord,...Nt(r)}):new ef({keyType:Ui.create(),valueType:t,typeName:Et.ZodRecord,...Nt(n)})}}class Gh extends Lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Qe.map)return tt(r,{code:De.invalid_type,expected:Qe.map,received:r.parsedType}),$t;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:i._parse(new mo(r,s,r.path,[c,"key"])),value:o._parse(new mo(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,d=await l.value;if(c.status==="aborted"||d.status==="aborted")return $t;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(c.value,d.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,d=l.value;if(c.status==="aborted"||d.status==="aborted")return $t;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(c.value,d.value)}return{status:n.value,value:s}}}}Gh.create=(e,t,n)=>new Gh({valueType:t,keyType:e,typeName:Et.ZodMap,...Nt(n)});class Rs extends Lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Qe.set)return tt(r,{code:De.invalid_type,expected:Qe.set,received:r.parsedType}),$t;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(tt(r,{code:De.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(tt(r,{code:De.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(l){const c=new Set;for(const d of l){if(d.status==="aborted")return $t;d.status==="dirty"&&n.dirty(),c.add(d.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>o._parse(new mo(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Rs({...this._def,minSize:{value:t,message:dt.toString(n)}})}max(t,n){return new Rs({...this._def,maxSize:{value:t,message:dt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Rs.create=(e,t)=>new Rs({valueType:e,minSize:null,maxSize:null,typeName:Et.ZodSet,...Nt(t)});class tl extends Lt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Qe.function)return tt(n,{code:De.invalid_type,expected:Qe.function,received:n.parsedType}),$t;function r(s,l){return zh({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Bh(),Vc].filter(c=>!!c),issueData:{code:De.invalid_arguments,argumentsError:l}})}function i(s,l){return zh({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Bh(),Vc].filter(c=>!!c),issueData:{code:De.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof nl){const s=this;return jr(async function(...l){const c=new qi([]),d=await s._def.args.parseAsync(l,o).catch(h=>{throw c.addIssue(r(l,h)),c}),p=await Reflect.apply(a,this,d);return await s._def.returns._def.type.parseAsync(p,o).catch(h=>{throw c.addIssue(i(p,h)),c})})}else{const s=this;return jr(function(...l){const c=s._def.args.safeParse(l,o);if(!c.success)throw new qi([r(l,c.error)]);const d=Reflect.apply(a,this,c.data),p=s._def.returns.safeParse(d,o);if(!p.success)throw new qi([i(d,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new tl({...this._def,args:yo.create(t).rest(Ps.create())})}returns(t){return new tl({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new tl({args:t||yo.create([]).rest(Ps.create()),returns:n||Ps.create(),typeName:Et.ZodFunction,...Nt(r)})}}class tf extends Lt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}tf.create=(e,t)=>new tf({getter:e,typeName:Et.ZodLazy,...Nt(t)});class nf extends Lt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return tt(n,{received:n.data,code:De.invalid_literal,expected:this._def.value}),$t}return{status:"valid",value:t.data}}get value(){return this._def.value}}nf.create=(e,t)=>new nf({value:e,typeName:Et.ZodLiteral,...Nt(t)});function $R(e,t){return new Oa({values:e,typeName:Et.ZodEnum,...Nt(t)})}class Oa extends Lt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{expected:sn.joinValues(r),received:n.parsedType,code:De.invalid_type}),$t}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{received:n.data,code:De.invalid_enum_value,options:r}),$t}return jr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return Oa.create(t)}exclude(t){return Oa.create(this.options.filter(n=>!t.includes(n)))}}Oa.create=$R;class rf extends Lt{_parse(t){const n=sn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Qe.string&&r.parsedType!==Qe.number){const i=sn.objectValues(n);return tt(r,{expected:sn.joinValues(i),received:r.parsedType,code:De.invalid_type}),$t}if(n.indexOf(t.data)===-1){const i=sn.objectValues(n);return tt(r,{received:r.data,code:De.invalid_enum_value,options:i}),$t}return jr(t.data)}get enum(){return this._def.values}}rf.create=(e,t)=>new rf({values:e,typeName:Et.ZodNativeEnum,...Nt(t)});class nl extends Lt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Qe.promise&&n.common.async===!1)return tt(n,{code:De.invalid_type,expected:Qe.promise,received:n.parsedType}),$t;const r=n.parsedType===Qe.promise?n.data:Promise.resolve(n.data);return jr(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}nl.create=(e,t)=>new nl({type:e,typeName:Et.ZodPromise,...Nt(t)});class zi extends Lt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Et.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{tt(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(i.type==="refinement"){const a=s=>{const l=i.refinement(s,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?$t:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?$t:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Kc(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Kc(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);sn.assertNever(i)}}zi.create=(e,t,n)=>new zi({schema:e,typeName:Et.ZodEffects,effect:t,...Nt(n)}),zi.createWithPreprocess=(e,t,n)=>new zi({schema:t,effect:{type:"preprocess",transform:e},typeName:Et.ZodEffects,...Nt(n)});class Bo extends Lt{_parse(t){return this._getType(t)===Qe.undefined?jr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Bo.create=(e,t)=>new Bo({innerType:e,typeName:Et.ZodOptional,...Nt(t)});class Ds extends Lt{_parse(t){return this._getType(t)===Qe.null?jr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ds.create=(e,t)=>new Ds({innerType:e,typeName:Et.ZodNullable,...Nt(t)});class of extends Lt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Qe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}of.create=(e,t)=>new of({innerType:e,typeName:Et.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Nt(t)});class Yh extends Lt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Zh(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new qi(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new qi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Yh.create=(e,t)=>new Yh({innerType:e,typeName:Et.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Nt(t)});class Jh extends Lt{_parse(t){if(this._getType(t)!==Qe.nan){const r=this._getOrReturnCtx(t);return tt(r,{code:De.invalid_type,expected:Qe.nan,received:r.parsedType}),$t}return{status:"valid",value:t.data}}}Jh.create=e=>new Jh({typeName:Et.ZodNaN,...Nt(e)});const yye=Symbol("zod_brand");class kR extends Lt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class af extends Lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?$t:o.status==="dirty"?(n.dirty(),OR(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?$t:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new af({in:t,out:n,typeName:Et.ZodPipeline})}}class Xh extends Lt{_parse(t){const n=this._def.innerType._parse(t);return Kc(n)&&(n.value=Object.freeze(n.value)),n}}Xh.create=(e,t)=>new Xh({innerType:e,typeName:Et.ZodReadonly,...Nt(t)});const IR=(e,t={},n)=>e?Qu.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,c=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...c,fatal:l})}}):Qu.create(),gye={object:Pn.lazycreate};var Et;(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"})(Et||(Et={}));const vye=(e,t={message:`Input not instance of ${e.name}`})=>IR(n=>n instanceof e,t),PR=Ui.create,RR=Aa.create,bye=Jh.create,_ye=Ca.create,DR=Gc.create,wye=Is.create,xye=Hh.create,Sye=Yc.create,Eye=Jc.create,Aye=Qu.create,Cye=Ps.create,Oye=Uo.create,Tye=Wh.create,$ye=Bi.create,kye=Pn.create,Iye=Pn.strictCreate,Pye=Xc.create,Rye=Kh.create,Dye=Qc.create,Nye=yo.create,Mye=ef.create,jye=Gh.create,Lye=Rs.create,Fye=tl.create,qye=tf.create,Uye=nf.create,Bye=Oa.create,zye=rf.create,Zye=nl.create,NR=zi.create,Hye=Bo.create,Wye=Ds.create,Vye=zi.createWithPreprocess,Kye=af.create;var oe=Object.freeze({__proto__:null,defaultErrorMap:Vc,setErrorMap:rye,getErrorMap:Bh,makeIssue:zh,EMPTY_PATH:iye,addIssueToContext:tt,ParseStatus:Er,INVALID:$t,DIRTY:OR,OK:jr,isAborted:Z0,isDirty:H0,isValid:Kc,isAsync:Zh,get util(){return sn},get objectUtil(){return z0},ZodParsedType:Qe,getParsedType:Ea,ZodType:Lt,ZodString:Ui,ZodNumber:Aa,ZodBigInt:Ca,ZodBoolean:Gc,ZodDate:Is,ZodSymbol:Hh,ZodUndefined:Yc,ZodNull:Jc,ZodAny:Qu,ZodUnknown:Ps,ZodNever:Uo,ZodVoid:Wh,ZodArray:Bi,ZodObject:Pn,ZodUnion:Xc,ZodDiscriminatedUnion:Kh,ZodIntersection:Qc,ZodTuple:yo,ZodRecord:ef,ZodMap:Gh,ZodSet:Rs,ZodFunction:tl,ZodLazy:tf,ZodLiteral:nf,ZodEnum:Oa,ZodNativeEnum:rf,ZodPromise:nl,ZodEffects:zi,ZodTransformer:zi,ZodOptional:Bo,ZodNullable:Ds,ZodDefault:of,ZodCatch:Yh,ZodNaN:Jh,BRAND:yye,ZodBranded:kR,ZodPipeline:af,ZodReadonly:Xh,custom:IR,Schema:Lt,ZodSchema:Lt,late:gye,get ZodFirstPartyTypeKind(){return Et},coerce:{string:e=>Ui.create({...e,coerce:!0}),number:e=>Aa.create({...e,coerce:!0}),boolean:e=>Gc.create({...e,coerce:!0}),bigint:e=>Ca.create({...e,coerce:!0}),date:e=>Is.create({...e,coerce:!0})},any:Aye,array:$ye,bigint:_ye,boolean:DR,date:wye,discriminatedUnion:Rye,effect:NR,enum:Bye,function:Fye,instanceof:vye,intersection:Dye,lazy:qye,literal:Uye,map:jye,nan:bye,nativeEnum:zye,never:Oye,null:Eye,nullable:Wye,number:RR,object:kye,oboolean:()=>DR().optional(),onumber:()=>RR().optional(),optional:Hye,ostring:()=>PR().optional(),pipeline:Kye,preprocess:Vye,promise:Zye,record:Mye,set:Lye,strictObject:Iye,string:PR,symbol:xye,transformer:NR,tuple:Nye,undefined:Sye,union:Pye,unknown:Cye,void:Tye,NEVER:$t,ZodIssueCode:De,quotelessJson:nye,ZodError:qi});const Gye=oe.object({type:oe.literal("message_created"),data:oe.object({id:oe.string().describe("Id of the [Message](#schema_message)"),createdAt:oe.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:oe.union([oe.object({audioUrl:oe.string().min(1),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("audio")}),oe.object({title:oe.string().min(1),subtitle:oe.string().optional(),imageUrl:oe.string().optional(),actions:oe.array(oe.object({action:oe.enum(["postback","url","say"]),label:oe.string().min(1),value:oe.string().min(1)})),type:oe.literal("card"),className:oe.string().describe("CSS className to apply to the message").optional()}),oe.object({items:oe.array(oe.object({title:oe.string().min(1),subtitle:oe.string().optional(),imageUrl:oe.string().optional(),actions:oe.array(oe.object({action:oe.enum(["postback","url","say"]),label:oe.string().min(1),value:oe.string().min(1)})),className:oe.string().describe("CSS className to apply to the message").optional()})),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("carousel")}),oe.object({text:oe.string(),options:oe.array(oe.object({label:oe.string().min(1),value:oe.string().min(1)})),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("choice"),disableFreeText:oe.boolean().optional()}),oe.object({text:oe.string(),options:oe.array(oe.object({label:oe.string().min(1),value:oe.string().min(1)})),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("dropdown")}),oe.object({fileUrl:oe.string().min(1),title:oe.string().min(1).optional(),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("file")}),oe.object({imageUrl:oe.string().min(1),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("image")}),oe.object({latitude:oe.number(),longitude:oe.number(),address:oe.string().optional(),title:oe.string().optional(),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("location")}),oe.object({markdown:oe.string().min(1),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("markdown")}),oe.object({text:oe.string().min(1),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("text")}),oe.object({videoUrl:oe.string().min(1),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("video")})]).describe("Payload is the content type of the message."),userId:oe.string().describe("ID of the [User](#schema_user)"),conversationId:oe.string().describe("ID of the [Conversation](#schema_conversation)")}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),Yye=oe.object({type:oe.literal("webchat_visibility"),data:oe.object({visibility:oe.union([oe.literal("show"),oe.literal("hide"),oe.literal("toggle")])})}),Jye=oe.object({type:oe.literal("webchat_config"),data:oe.object({config:oe.record(oe.union([oe.any(),oe.null()]))})}),Xye=oe.object({type:oe.literal("custom"),data:oe.object({event:oe.record(oe.union([oe.any(),oe.null()]))})}),Qye={messageCreated:Gye,webchatVisibility:Yye,webchatConfig:Jye,custom:Xye},MR="unknown error",my=class my extends AR{constructor(n){super();R(this,"_state",{status:"disconnected"});R(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const n=this._connect();this._state={status:"connecting",connectionPromise:n},await n});R(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let n;this._state.status==="connecting"?n=await this._state.connectionPromise:n=this._state.source,this._disconnectSync(n)});R(this,"_connect",async()=>{const n=await tye(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey}});return n.on("message",this._handleMessage),n.on("error",this._handleError(n)),this._state={status:"connected",source:n},n});R(this,"_disconnectSync",n=>{n.close(),this._state={status:"disconnected"}});R(this,"_handleMessage",n=>{const r=this._parseSignal(n.data);this.emit(r.type,r.data)});R(this,"_handleError",n=>r=>{this._disconnectSync(n);const i=this._toError(r);this.emit("error",i)});R(this,"_parseSignal",n=>{for(const r of Object.values(Qye)){const i=this._safeJsonParse(n),o=r.safeParse(i);if(o.success)return o.data}return{type:"unknown",data:n}});R(this,"_safeJsonParse",n=>{try{return JSON.parse(n)}catch{return n}});R(this,"_toError",n=>{if(n instanceof Error)return n;if(typeof n=="string")return new Error(n);if(n===null)return new Error(MR);if(typeof n=="object"&&"message"in n)return this._toError(n.message);try{const r=JSON.stringify(n);return new Error(r)}catch{return new Error(MR)}});this._props=n}get status(){return this._state.status}};R(my,"listen",async n=>{const r=new my(n);return await r.connect(),r});let K0=my;const jR=100*1024*1024,ege=jR,tge=jR,nge=6e4;class rge{constructor(t){R(this,"_auto");R(this,"createConversation",t=>this._auto.createConversation(t));R(this,"getConversation",t=>this._auto.getConversation(t));R(this,"deleteConversation",t=>this._auto.deleteConversation(t));R(this,"listConversations",t=>this._auto.listConversations(t));R(this,"listConversationMessages",t=>this._auto.listConversationMessages(t));R(this,"addParticipant",t=>this._auto.addParticipant(t));R(this,"removeParticipant",t=>this._auto.removeParticipant(t));R(this,"getParticipant",t=>this._auto.getParticipant(t));R(this,"listParticipants",t=>this._auto.listParticipants(t));R(this,"createMessage",t=>this._auto.createMessage(t));R(this,"getMessage",t=>this._auto.getMessage(t));R(this,"deleteMessage",t=>this._auto.deleteMessage(t));R(this,"createFile",t=>this._auto.createFile(t));R(this,"createUser",t=>this._auto.createUser(t));R(this,"getUser",t=>this._auto.getUser(t));R(this,"updateUser",t=>this._auto.updateUser(t));R(this,"deleteUser",t=>this._auto.deleteUser(t));R(this,"createEvent",t=>this._auto.createEvent(t));R(this,"getEvent",t=>this._auto.getEvent(t));R(this,"listenConversation",async({id:t,"x-user-key":n})=>await K0.listen({url:this.props.apiUrl,conversationId:t,userKey:n}));this.props=t;const{apiUrl:n}=t,r={...t.headers},i=t.timeout??nge,o=zP.create({baseURL:n,headers:r,withCredentials:!0,timeout:i,maxBodyLength:ege,maxContentLength:tge});this._auto=new Jme(o)}}const Qh={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},Kr=(e,t)=>e.status===t,go=(e,t)=>Qh[e.status]<Qh[t],LR=(e,t)=>Qh[e.status]>=Qh[t];class vo extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const FR=["audio","file","image","video"],qR=e=>FR.includes(e);class ige extends nb{constructor(n){super();R(this,"_client");R(this,"_webhookId");R(this,"_apiUrl");R(this,"_state",{status:"disconnected"});R(this,"mode","pushpin");R(this,"_initialConnect",async n=>{if(LR(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(Kr(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:r},key:i}=await this._client.createUser({name:void 0,pictureUrl:void 0,userData:n});return this._state={status:"user_created",userId:r,userKey:i},{userId:r,userToken:i}});R(this,"_reConnect",async(n,r)=>{if(LR(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return Kr(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:void 0,pictureUrl:void 0,userData:r})),n});R(this,"_mapMessage",n=>{const{payload:r,disableInput:i}=b$(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:r,disableInput:i}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new rge({apiUrl:r})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!go(this._state,"user_created"))return this._state.userId}async getUser(){if(go(this._state,"user_created"))throw new vo(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(go(this._state,"user_created"))throw new vo(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,userData:n.data});return r}get conversationId(){if(!go(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r){return n?await this.userExists(n)?this._reConnect(n,r):this._initialConnect(r):this._initialConnect(r)}async disconnect(){Kr(this._state,"conversation_created")?this._state.signalEmitter.cleanup():Kr(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(go(this._state,"user_created"))throw new vo(this._state);if(Kr(this._state,"conversation_creating"))throw new vo(this._state);let r;Kr(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:i,name:o}=n,s=await(y=>new Promise((v,w)=>{const _=new FileReader;_.onload=b=>{var S;return v((S=b.target)==null?void 0:S.result)},_.onerror=b=>{var S;return w((S=b.target)==null?void 0:S.error)},_.readAsArrayBuffer(y)}))(n),{file:{uploadUrl:l,contentType:c,url:d}}=await this._client.createFile({"x-user-key":r.userKey,size:i,key:o,accessPolicies:["public_content"],index:!1});await fetch(l,{method:"PUT",body:s});const p=c.split("/").shift()??"",m=qR(p)?p:"file",h=m==="image"?{type:m,imageUrl:d}:m==="audio"?{type:m,audioUrl:d}:m==="video"?{type:m,videoUrl:d}:{type:m,fileUrl:d};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:h}),this.emit("messageSent",d),{fileUrl:d,name:o,type:m}}async sendMessage(n){if(go(this._state,"user_created"))throw new vo(this._state);if(Kr(this._state,"conversation_creating"))throw new vo(this._state);let r;Kr(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"text",text:n}}),this.emit("messageSent",n)}async sendEvent(n){if(go(this._state,"user_created"))throw new vo(this._state);if(Kr(this._state,"conversation_creating"))throw new vo(this._state);let r;Kr(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(go(this._state,"user_created"))throw new vo(this._state);Kr(this._state,"conversation_created")&&this._state.conversationId===n||Kr(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(go(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(v0(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const i=o=>o.code===404||o.code===401;if(v0(r)&&i(r))return!1;throw r}}async newConversation(){if(go(this._state,"user_created"))throw new vo(this._state);Kr(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),i=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),i}async listMessages(){if(!Kr(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,i=[];let o;do{const a=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:o});i.push(...a.messages),o=a.meta.nextToken}while(o);return i.map(this._mapMessage)}async _connectConversation(n,r){const i=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return i.on("unknown",o=>{typeof o=="string"&&o==="ping"||console.debug("unknown event",o)}),i.on("message_created",o=>{o.userId!==n.userId&&this.emit("message",this._mapMessage(o))}),i.on("error",()=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error("Connection to conversation lost"))}),i.on("webchat_visibility",o=>{this.emit("webchatVisibility",o.visibility)}),i.on("webchat_config",o=>{this.emit("webchatConfig",o.config)}),i.on("custom",o=>{this.emit("customEvent",o.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:i},this._state}}const UR=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>n==="messaging"?new ede({url:t,clientId:e}):new ige({apiUrl:t,clientId:e}),oge=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>{const[r]=C.useState(UR({clientId:e,apiUrl:t,mode:n}));return r};function age(e,t){const n=t?`The ${t} has been copied to your clipboard.`:"Copied to clipboard.";return navigator.clipboard.writeText(e).then(()=>xve({title:n,type:"success"}))}const sge=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const o=new Image;o.addEventListener("load",()=>{i&&clearTimeout(i),n({width:o.naturalWidth,height:o.naturalHeight})}),o.addEventListener("error",a=>{i&&clearTimeout(i),r(`${a.type}: ${a.message}`)}),o.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))});let uge={data:""},lge=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||uge,cge=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,fge=/\/\*[^]*?\*\/| +/g,BR=/\n+/g,Ta=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+a+";":r+=o[1]=="f"?Ta(a,o):o+"{"+Ta(a,o[1]=="k"?"":t)+"}":typeof a=="object"?r+=Ta(a,t?t.replace(/([^,])+/g,s=>o.replace(/(^:.*)|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):o):a!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Ta.p?Ta.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},zo={},zR=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+zR(e[n]);return t}return e},dge=(e,t,n,r,i)=>{let o=zR(e),a=zo[o]||(zo[o]=(l=>{let c=0,d=11;for(;c<l.length;)d=101*d+l.charCodeAt(c++)>>>0;return"go"+d})(o));if(!zo[a]){let l=o!==e?e:(c=>{let d,p,m=[{}];for(;d=cge.exec(c.replace(fge,""));)d[4]?m.shift():d[3]?(p=d[3].replace(BR," ").trim(),m.unshift(m[0][p]=m[0][p]||{})):m[0][d[1]]=d[2].replace(BR," ").trim();return m[0]})(e);zo[a]=Ta(i?{["@keyframes "+a]:l}:l,n?"":"."+a)}let s=n&&zo.g?zo.g:null;return n&&(zo.g=zo[a]),((l,c,d,p)=>{p?c.data=c.data.replace(p,l):c.data.indexOf(l)===-1&&(c.data=d?l+c.data:c.data+l)})(zo[a],t,r,s),a},pge=(e,t,n)=>e.reduce((r,i,o)=>{let a=t[o];if(a&&a.call){let s=a(n),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=l?"."+l:s&&typeof s=="object"?s.props?"":Ta(s,""):s===!1?"":s}return r+i+(a??"")},"");function em(e){let t=this||{},n=e.call?e(t.p):e;return dge(n.unshift?n.raw?pge(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,lge(t.target),t.g,t.o,t.k)}let ZR,G0,Y0;em.bind({g:1});let Zo=em.bind({k:1});function hge(e,t,n,r){Ta.p=t,ZR=e,G0=n,Y0=r}function $a(e,t){let n=this||{};return function(){let r=arguments;function i(o,a){let s=Object.assign({},o),l=s.className||i.className;n.p=Object.assign({theme:G0&&G0()},s),n.o=/ *go\d+/.test(l),s.className=em.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),Y0&&c[0]&&Y0(s),ZR(c,s)}return t?t(i):i}}var mge=e=>typeof e=="function",tm=(e,t)=>mge(e)?e(t):e,yge=(()=>{let e=0;return()=>(++e).toString()})(),HR=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),gge=20,nm=new Map,vge=1e3,WR=e=>{if(nm.has(e))return;let t=setTimeout(()=>{nm.delete(e),Ns({type:4,toastId:e})},vge);nm.set(e,t)},bge=e=>{let t=nm.get(e);t&&clearTimeout(t)},J0=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,gge)};case 1:return t.toast.id&&bge(t.toast.id),{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:n}=t;return e.toasts.find(o=>o.id===n.id)?J0(e,{type:1,toast:n}):J0(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?WR(r):e.toasts.forEach(o=>{WR(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+i}))}}},rm=[],im={toasts:[],pausedAt:void 0},Ns=e=>{im=J0(im,e),rm.forEach(t=>{t(im)})},_ge={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},wge=(e={})=>{let[t,n]=C.useState(im);C.useEffect(()=>(rm.push(n),()=>{let i=rm.indexOf(n);i>-1&&rm.splice(i,1)}),[t]);let r=t.toasts.map(i=>{var o,a;return{...e,...e[i.type],...i,duration:i.duration||((o=e[i.type])==null?void 0:o.duration)||(e==null?void 0:e.duration)||_ge[i.type],style:{...e.style,...(a=e[i.type])==null?void 0:a.style,...i.style}}});return{...t,toasts:r}},xge=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||yge()}),sf=e=>(t,n)=>{let r=xge(t,e,n);return Ns({type:2,toast:r}),r.id},Gr=(e,t)=>sf("blank")(e,t);Gr.error=sf("error"),Gr.success=sf("success"),Gr.loading=sf("loading"),Gr.custom=sf("custom"),Gr.dismiss=e=>{Ns({type:3,toastId:e})},Gr.remove=e=>Ns({type:4,toastId:e}),Gr.promise=(e,t,n)=>{let r=Gr.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(Gr.success(tm(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Gr.error(tm(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var Sge=(e,t)=>{Ns({type:1,toast:{id:e,height:t}})},Ege=()=>{Ns({type:5,time:Date.now()})},Age=e=>{let{toasts:t,pausedAt:n}=wge(e);C.useEffect(()=>{if(n)return;let o=Date.now(),a=t.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(o-s.createdAt);if(l<0){s.visible&&Gr.dismiss(s.id);return}return setTimeout(()=>Gr.dismiss(s.id),l)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=C.useCallback(()=>{n&&Ns({type:6,time:Date.now()})},[n]),i=C.useCallback((o,a)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:c}=a||{},d=t.filter(h=>(h.position||c)===(o.position||c)&&h.height),p=d.findIndex(h=>h.id===o.id),m=d.filter((h,y)=>y<p&&h.visible).length;return d.filter(h=>h.visible).slice(...s?[m+1]:[0,m]).reduce((h,y)=>h+(y.height||0)+l,0)},[t]);return{toasts:t,handlers:{updateHeight:Sge,startPause:Ege,endPause:r,calculateOffset:i}}},Cge=Zo`
|
|
203
|
+
`,Cn+=Rn):bn==="id"?ee=Rn:bn==="event"?ae=Rn:bn==="retry"?(Ue=rt(Rn,Ue),mt=Ue):bn==="heartbeatTimeout"&&(ot=rt(Rn,ot),Jt!==0&&(i(Jt),Jt=r(function(){He()},ot)))}if(At===ue){if(Cn!==""){It=ee,ae===""&&(ae="message");var mr=new Q(ae,{data:Cn.slice(1),lastEventId:ee});if(K.dispatchEvent(mr),ae==="open"?Pe(K,K.onopen,mr):ae==="message"?Pe(K,K.onmessage,mr):ae==="error"&&Pe(K,K.onerror,mr),cn===ce)return}Cn="",ae=""}At=_t==="\r".charCodeAt(0)?P:ue}else At===ue&&(on=Xt,At=Oe),At===Oe?_t===":".charCodeAt(0)&&(pt=Xt+1,At=N):At===N&&(At=Ne)}}},D=function(Xe){if(cn===ne||cn===Y){cn=q,Jt!==0&&(i(Jt),Jt=0),Jt=r(function(){He()},mt),mt=Ke(Math.min(Ue*16,mt*2)),K.readyState=Y;var Re=new V("error",{error:Xe});K.dispatchEvent(Re),Pe(K,K.onerror,Re),Xe!=null&&console.error(Xe)}},je=function(){cn=ce,rn!=null&&(rn.abort(),rn=void 0),Jt!==0&&(i(Jt),Jt=0),K.readyState=ce},He=function(){if(Jt=0,cn!==q){if(!ie&&rn!=null)D(new Error("No activity within "+ot+" milliseconds. "+(cn===Y?"No response received.":ge+" chars received.")+" Reconnecting.")),rn!=null&&(rn.abort(),rn=void 0);else{var Xe=Math.max((ie||Date.now())+ot-Date.now(),1);ie=!1,Jt=r(function(){He()},Xe)}return}ie=!1,ge=0,Jt=r(function(){He()},ot),cn=Y,Cn="",ae="",ee=It,ft="",on=0,pt=0,At=ue;var Re=pe;if(pe.slice(0,5)!=="data:"&&pe.slice(0,5)!=="blob:"&&It!==""){var We=pe.indexOf("?");Re=We===-1?pe:pe.slice(0,We+1)+pe.slice(We+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Rn,mr){return mr===et?"":Rn}),Re+=(pe.indexOf("?")===-1?"?":"&")+et+"="+encodeURIComponent(It)}var _t=K.withCredentials,Pt={};Pt.Accept="text/event-stream";var Xt=K.headers;if(Xt!=null)for(var bn in Xt)Object.prototype.hasOwnProperty.call(Xt,bn)&&(Pt[bn]=Xt[bn]);try{rn=pn.open(ct,Mn,sr,D,Re,_t,Pt)}catch(Rn){throw je(),Rn}};K.url=pe,K.readyState=Y,K.withCredentials=Se,K.headers=xe,K._close=je,He()}Ae.prototype=Object.create(M.prototype),Ae.prototype.CONNECTING=Y,Ae.prototype.OPEN=ne,Ae.prototype.CLOSED=ce,Ae.prototype.close=function(){this._close()},Ae.CONNECTING=Y,Ae.OPEN=ne,Ae.CLOSED=ce,Ae.prototype.withCredentials=void 0;var lt=l;o!=null&&(l==null||!("withCredentials"in l.prototype))&&(lt=Ae),function(K){{var pe=K(t);pe!==void 0&&(e.exports=pe)}}(function(K){K.EventSourcePolyfill=Ae,K.NativeEventSource=l,K.EventSource=lt})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:se:globalThis)})(B0,B0.exports);var Xme=B0.exports;const Qme=Oo(Xme),eye=(e,t={})=>{const n=new Qme.EventSourcePolyfill(e,{headers:t.headers}),r=new AR;return n.onopen=i=>r.emit("open",i),n.onmessage=i=>r.emit("message",i),n.onerror=i=>r.emit("error",i),{emitter:r,source:n}},tye=async(e,t={})=>{const{emitter:n,source:r}=eye(e,t);return await new Promise((i,o)=>{n.on("open",()=>{i()}),n.on("error",a=>{o(a)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}};var sn;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(sn||(sn={}));var z0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(z0||(z0={}));const Qe=sn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ea=e=>{switch(typeof e){case"undefined":return Qe.undefined;case"string":return Qe.string;case"number":return isNaN(e)?Qe.nan:Qe.number;case"boolean":return Qe.boolean;case"function":return Qe.function;case"bigint":return Qe.bigint;case"symbol":return Qe.symbol;case"object":return Array.isArray(e)?Qe.array:e===null?Qe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Qe.promise:typeof Map<"u"&&e instanceof Map?Qe.map:typeof Set<"u"&&e instanceof Set?Qe.set:typeof Date<"u"&&e instanceof Date?Qe.date:Qe.object;default:return Qe.unknown}},De=sn.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"]),nye=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class qi extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,sn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}qi.create=e=>new qi(e);const Vc=(e,t)=>{let n;switch(e.code){case De.invalid_type:e.received===Qe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case De.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,sn.jsonStringifyReplacer)}`;break;case De.unrecognized_keys:n=`Unrecognized key(s) in object: ${sn.joinValues(e.keys,", ")}`;break;case De.invalid_union:n="Invalid input";break;case De.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${sn.joinValues(e.options)}`;break;case De.invalid_enum_value:n=`Invalid enum value. Expected ${sn.joinValues(e.options)}, received '${e.received}'`;break;case De.invalid_arguments:n="Invalid function arguments";break;case De.invalid_return_type:n="Invalid function return type";break;case De.invalid_date:n="Invalid date";break;case De.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:sn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case De.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case De.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case De.custom:n="Invalid input";break;case De.invalid_intersection_types:n="Intersection results could not be merged";break;case De.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case De.not_finite:n="Number must be finite";break;default:n=t.defaultError,sn.assertNever(e)}return{message:n}};let CR=Vc;function rye(e){CR=e}function Bh(){return CR}const zh=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...i,path:o,message:i.message||s}},iye=[];function tt(e,t){const n=zh({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Bh(),Vc].filter(r=>!!r)});e.common.issues.push(n)}class Er{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return $t;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return Er.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return $t;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const $t=Object.freeze({status:"aborted"}),OR=e=>({status:"dirty",value:e}),jr=e=>({status:"valid",value:e}),Z0=e=>e.status==="aborted",H0=e=>e.status==="dirty",Kc=e=>e.status==="valid",Zh=e=>typeof Promise<"u"&&e instanceof Promise;var dt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(dt||(dt={}));class mo{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const TR=(e,t)=>{if(Kc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new qi(e.common.issues);return this._error=n,this._error}}};function Nt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;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:i}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}class Lt{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Ea(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ea(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Er,ctx:{common:t.parent.common,data:t.data,parsedType:Ea(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Zh(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ea(t)},o=this._parseSync({data:t,path:i.path,parent:i});return TR(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ea(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(Zh(i)?i:Promise.resolve(i));return TR(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:De.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new zi({schema:this,typeName:Et.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Bo.create(this,this._def)}nullable(){return Ds.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Bi.create(this,this._def)}promise(){return nl.create(this,this._def)}or(t){return Xc.create([this,t],this._def)}and(t){return Qc.create(this,t,this._def)}transform(t){return new zi({...Nt(this._def),schema:this,typeName:Et.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new of({...Nt(this._def),innerType:this,defaultValue:n,typeName:Et.ZodDefault})}brand(){return new kR({typeName:Et.ZodBranded,type:this,...Nt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Yh({...Nt(this._def),innerType:this,catchValue:n,typeName:Et.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return af.create(this,t)}readonly(){return Xh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const oye=/^c[^\s-]{8,}$/i,aye=/^[a-z][a-z0-9]*$/,sye=/^[0-9A-HJKMNP-TV-Z]{26}$/,uye=/^[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,lye=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,cye="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let W0;const fye=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,dye=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,pye=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function hye(e,t){return!!((t==="v4"||!t)&&fye.test(e)||(t==="v6"||!t)&&dye.test(e))}class Ui extends Lt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Qe.string){const o=this._getOrReturnCtx(t);return tt(o,{code:De.invalid_type,expected:Qe.string,received:o.parsedType}),$t}const r=new Er;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:De.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:De.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(t,i),a?tt(i,{code:De.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&tt(i,{code:De.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")lye.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"email",code:De.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")W0||(W0=new RegExp(cye,"u")),W0.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"emoji",code:De.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")uye.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"uuid",code:De.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")oye.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"cuid",code:De.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")aye.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"cuid2",code:De.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")sye.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"ulid",code:De.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),tt(i,{validation:"url",code:De.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"regex",code:De.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),tt(i,{code:De.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.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)||(i=this._getOrReturnCtx(t,i),tt(i,{code:De.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),tt(i,{code:De.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?pye(o).test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{code:De.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?hye(t.data,o.version)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"ip",code:De.invalid_string,message:o.message}),r.dirty()):sn.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:De.invalid_string,...dt.errToObj(r)})}_addCheck(t){return new Ui({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...dt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...dt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...dt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...dt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...dt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...dt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...dt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...dt.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...dt.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...dt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...dt.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...dt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...dt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...dt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...dt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...dt.errToObj(n)})}nonempty(t){return this.min(1,dt.errToObj(t))}trim(){return new Ui({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ui({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ui({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ui.create=e=>{var t;return new Ui({checks:[],typeName:Et.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Nt(e)})};function mye(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Aa extends Lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Qe.number){const o=this._getOrReturnCtx(t);return tt(o,{code:De.invalid_type,expected:Qe.number,received:o.parsedType}),$t}let r;const i=new Er;for(const o of this._def.checks)o.kind==="int"?sn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:De.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:De.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:De.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?mye(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),tt(r,{code:De.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:De.not_finite,message:o.message}),i.dirty()):sn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new Aa({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Aa({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:dt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:dt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:dt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:dt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&sn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Aa.create=e=>new Aa({checks:[],typeName:Et.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Nt(e)});class Ca extends Lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Qe.bigint){const o=this._getOrReturnCtx(t);return tt(o,{code:De.invalid_type,expected:Qe.bigint,received:o.parsedType}),$t}let r;const i=new Er;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:De.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:De.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:De.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):sn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new Ca({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Ca({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ca.create=e=>{var t;return new Ca({checks:[],typeName:Et.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Nt(e)})};class Gc extends Lt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Qe.boolean){const r=this._getOrReturnCtx(t);return tt(r,{code:De.invalid_type,expected:Qe.boolean,received:r.parsedType}),$t}return jr(t.data)}}Gc.create=e=>new Gc({typeName:Et.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Nt(e)});class Is extends Lt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Qe.date){const o=this._getOrReturnCtx(t);return tt(o,{code:De.invalid_type,expected:Qe.date,received:o.parsedType}),$t}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return tt(o,{code:De.invalid_date}),$t}const r=new Er;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:De.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:De.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):sn.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Is({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:dt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:dt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Is.create=e=>new Is({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Et.ZodDate,...Nt(e)});class Hh extends Lt{_parse(t){if(this._getType(t)!==Qe.symbol){const r=this._getOrReturnCtx(t);return tt(r,{code:De.invalid_type,expected:Qe.symbol,received:r.parsedType}),$t}return jr(t.data)}}Hh.create=e=>new Hh({typeName:Et.ZodSymbol,...Nt(e)});class Yc extends Lt{_parse(t){if(this._getType(t)!==Qe.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:De.invalid_type,expected:Qe.undefined,received:r.parsedType}),$t}return jr(t.data)}}Yc.create=e=>new Yc({typeName:Et.ZodUndefined,...Nt(e)});class Jc extends Lt{_parse(t){if(this._getType(t)!==Qe.null){const r=this._getOrReturnCtx(t);return tt(r,{code:De.invalid_type,expected:Qe.null,received:r.parsedType}),$t}return jr(t.data)}}Jc.create=e=>new Jc({typeName:Et.ZodNull,...Nt(e)});class Qu extends Lt{constructor(){super(...arguments),this._any=!0}_parse(t){return jr(t.data)}}Qu.create=e=>new Qu({typeName:Et.ZodAny,...Nt(e)});class Ps extends Lt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return jr(t.data)}}Ps.create=e=>new Ps({typeName:Et.ZodUnknown,...Nt(e)});class Uo extends Lt{_parse(t){const n=this._getOrReturnCtx(t);return tt(n,{code:De.invalid_type,expected:Qe.never,received:n.parsedType}),$t}}Uo.create=e=>new Uo({typeName:Et.ZodNever,...Nt(e)});class Wh extends Lt{_parse(t){if(this._getType(t)!==Qe.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:De.invalid_type,expected:Qe.void,received:r.parsedType}),$t}return jr(t.data)}}Wh.create=e=>new Wh({typeName:Et.ZodVoid,...Nt(e)});class Bi extends Lt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Qe.array)return tt(n,{code:De.invalid_type,expected:Qe.array,received:n.parsedType}),$t;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(a||s)&&(tt(n,{code:a?De.too_big:De.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(tt(n,{code:De.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(tt(n,{code:De.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new mo(n,a,n.path,s)))).then(a=>Er.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new mo(n,a,n.path,s)));return Er.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Bi({...this._def,minLength:{value:t,message:dt.toString(n)}})}max(t,n){return new Bi({...this._def,maxLength:{value:t,message:dt.toString(n)}})}length(t,n){return new Bi({...this._def,exactLength:{value:t,message:dt.toString(n)}})}nonempty(t){return this.min(1,t)}}Bi.create=(e,t)=>new Bi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Et.ZodArray,...Nt(t)});function el(e){if(e instanceof Pn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Bo.create(el(r))}return new Pn({...e._def,shape:()=>t})}else return e instanceof Bi?new Bi({...e._def,type:el(e.element)}):e instanceof Bo?Bo.create(el(e.unwrap())):e instanceof Ds?Ds.create(el(e.unwrap())):e instanceof yo?yo.create(e.items.map(t=>el(t))):e}class Pn extends Lt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=sn.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Qe.object){const c=this._getOrReturnCtx(t);return tt(c,{code:De.invalid_type,expected:Qe.object,received:c.parsedType}),$t}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Uo&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const d=o[c],p=i.data[c];l.push({key:{status:"valid",value:c},value:d._parse(new mo(i,p,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Uo){const c=this._def.unknownKeys;if(c==="passthrough")for(const d of s)l.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(c==="strict")s.length>0&&(tt(i,{code:De.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const d of s){const p=i.data[d];l.push({key:{status:"valid",value:d},value:c._parse(new mo(i,p,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const d of l){const p=await d.key;c.push({key:p,value:await d.value,alwaysSet:d.alwaysSet})}return c}).then(c=>Er.mergeObjectSync(r,c)):Er.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return dt.errToObj,new Pn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const l=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=dt.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new Pn({...this._def,unknownKeys:"strip"})}passthrough(){return new Pn({...this._def,unknownKeys:"passthrough"})}extend(t){return new Pn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Pn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Et.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Pn({...this._def,catchall:t})}pick(t){const n={};return sn.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Pn({...this._def,shape:()=>n})}omit(t){const n={};return sn.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Pn({...this._def,shape:()=>n})}deepPartial(){return el(this)}partial(t){const n={};return sn.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Pn({...this._def,shape:()=>n})}required(t){const n={};return sn.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Bo;)o=o._def.innerType;n[r]=o}}),new Pn({...this._def,shape:()=>n})}keyof(){return $R(sn.objectKeys(this.shape))}}Pn.create=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strip",catchall:Uo.create(),typeName:Et.ZodObject,...Nt(t)}),Pn.strictCreate=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strict",catchall:Uo.create(),typeName:Et.ZodObject,...Nt(t)}),Pn.lazycreate=(e,t)=>new Pn({shape:e,unknownKeys:"strip",catchall:Uo.create(),typeName:Et.ZodObject,...Nt(t)});class Xc extends Lt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new qi(s.ctx.common.issues));return tt(n,{code:De.invalid_union,unionErrors:a}),$t}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(l=>new qi(l));return tt(n,{code:De.invalid_union,unionErrors:s}),$t}}get options(){return this._def.options}}Xc.create=(e,t)=>new Xc({options:e,typeName:Et.ZodUnion,...Nt(t)});const Vh=e=>e instanceof tf?Vh(e.schema):e instanceof zi?Vh(e.innerType()):e instanceof nf?[e.value]:e instanceof Oa?e.options:e instanceof rf?Object.keys(e.enum):e instanceof of?Vh(e._def.innerType):e instanceof Yc?[void 0]:e instanceof Jc?[null]:null;class Kh extends Lt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Qe.object)return tt(n,{code:De.invalid_type,expected:Qe.object,received:n.parsedType}),$t;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(tt(n,{code:De.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),$t)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=Vh(o.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new Kh({typeName:Et.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Nt(r)})}}function V0(e,t){const n=Ea(e),r=Ea(t);if(e===t)return{valid:!0,data:e};if(n===Qe.object&&r===Qe.object){const i=sn.objectKeys(t),o=sn.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const l=V0(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Qe.array&&r===Qe.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const a=e[o],s=t[o],l=V0(a,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Qe.date&&r===Qe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Qc extends Lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(Z0(o)||Z0(a))return $t;const s=V0(o.value,a.value);return s.valid?((H0(o)||H0(a))&&n.dirty(),{status:n.value,value:s.data}):(tt(r,{code:De.invalid_intersection_types}),$t)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Qc.create=(e,t,n)=>new Qc({left:e,right:t,typeName:Et.ZodIntersection,...Nt(n)});class yo extends Lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Qe.array)return tt(r,{code:De.invalid_type,expected:Qe.array,received:r.parsedType}),$t;if(r.data.length<this._def.items.length)return tt(r,{code:De.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$t;!this._def.rest&&r.data.length>this._def.items.length&&(tt(r,{code:De.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new mo(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>Er.mergeArray(n,a)):Er.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new yo({...this._def,rest:t})}}yo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yo({items:e,typeName:Et.ZodTuple,rest:null,...Nt(t)})};class ef extends Lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Qe.object)return tt(r,{code:De.invalid_type,expected:Qe.object,received:r.parsedType}),$t;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new mo(r,s,r.path,s)),value:a._parse(new mo(r,r.data[s],r.path,s))});return r.common.async?Er.mergeObjectAsync(n,i):Er.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Lt?new ef({keyType:t,valueType:n,typeName:Et.ZodRecord,...Nt(r)}):new ef({keyType:Ui.create(),valueType:t,typeName:Et.ZodRecord,...Nt(n)})}}class Gh extends Lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Qe.map)return tt(r,{code:De.invalid_type,expected:Qe.map,received:r.parsedType}),$t;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:i._parse(new mo(r,s,r.path,[c,"key"])),value:o._parse(new mo(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,d=await l.value;if(c.status==="aborted"||d.status==="aborted")return $t;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(c.value,d.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,d=l.value;if(c.status==="aborted"||d.status==="aborted")return $t;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(c.value,d.value)}return{status:n.value,value:s}}}}Gh.create=(e,t,n)=>new Gh({valueType:t,keyType:e,typeName:Et.ZodMap,...Nt(n)});class Rs extends Lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Qe.set)return tt(r,{code:De.invalid_type,expected:Qe.set,received:r.parsedType}),$t;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(tt(r,{code:De.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(tt(r,{code:De.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(l){const c=new Set;for(const d of l){if(d.status==="aborted")return $t;d.status==="dirty"&&n.dirty(),c.add(d.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>o._parse(new mo(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Rs({...this._def,minSize:{value:t,message:dt.toString(n)}})}max(t,n){return new Rs({...this._def,maxSize:{value:t,message:dt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Rs.create=(e,t)=>new Rs({valueType:e,minSize:null,maxSize:null,typeName:Et.ZodSet,...Nt(t)});class tl extends Lt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Qe.function)return tt(n,{code:De.invalid_type,expected:Qe.function,received:n.parsedType}),$t;function r(s,l){return zh({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Bh(),Vc].filter(c=>!!c),issueData:{code:De.invalid_arguments,argumentsError:l}})}function i(s,l){return zh({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Bh(),Vc].filter(c=>!!c),issueData:{code:De.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof nl){const s=this;return jr(async function(...l){const c=new qi([]),d=await s._def.args.parseAsync(l,o).catch(h=>{throw c.addIssue(r(l,h)),c}),p=await Reflect.apply(a,this,d);return await s._def.returns._def.type.parseAsync(p,o).catch(h=>{throw c.addIssue(i(p,h)),c})})}else{const s=this;return jr(function(...l){const c=s._def.args.safeParse(l,o);if(!c.success)throw new qi([r(l,c.error)]);const d=Reflect.apply(a,this,c.data),p=s._def.returns.safeParse(d,o);if(!p.success)throw new qi([i(d,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new tl({...this._def,args:yo.create(t).rest(Ps.create())})}returns(t){return new tl({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new tl({args:t||yo.create([]).rest(Ps.create()),returns:n||Ps.create(),typeName:Et.ZodFunction,...Nt(r)})}}class tf extends Lt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}tf.create=(e,t)=>new tf({getter:e,typeName:Et.ZodLazy,...Nt(t)});class nf extends Lt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return tt(n,{received:n.data,code:De.invalid_literal,expected:this._def.value}),$t}return{status:"valid",value:t.data}}get value(){return this._def.value}}nf.create=(e,t)=>new nf({value:e,typeName:Et.ZodLiteral,...Nt(t)});function $R(e,t){return new Oa({values:e,typeName:Et.ZodEnum,...Nt(t)})}class Oa extends Lt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{expected:sn.joinValues(r),received:n.parsedType,code:De.invalid_type}),$t}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{received:n.data,code:De.invalid_enum_value,options:r}),$t}return jr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return Oa.create(t)}exclude(t){return Oa.create(this.options.filter(n=>!t.includes(n)))}}Oa.create=$R;class rf extends Lt{_parse(t){const n=sn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Qe.string&&r.parsedType!==Qe.number){const i=sn.objectValues(n);return tt(r,{expected:sn.joinValues(i),received:r.parsedType,code:De.invalid_type}),$t}if(n.indexOf(t.data)===-1){const i=sn.objectValues(n);return tt(r,{received:r.data,code:De.invalid_enum_value,options:i}),$t}return jr(t.data)}get enum(){return this._def.values}}rf.create=(e,t)=>new rf({values:e,typeName:Et.ZodNativeEnum,...Nt(t)});class nl extends Lt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Qe.promise&&n.common.async===!1)return tt(n,{code:De.invalid_type,expected:Qe.promise,received:n.parsedType}),$t;const r=n.parsedType===Qe.promise?n.data:Promise.resolve(n.data);return jr(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}nl.create=(e,t)=>new nl({type:e,typeName:Et.ZodPromise,...Nt(t)});class zi extends Lt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Et.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{tt(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(i.type==="refinement"){const a=s=>{const l=i.refinement(s,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?$t:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?$t:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Kc(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Kc(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);sn.assertNever(i)}}zi.create=(e,t,n)=>new zi({schema:e,typeName:Et.ZodEffects,effect:t,...Nt(n)}),zi.createWithPreprocess=(e,t,n)=>new zi({schema:t,effect:{type:"preprocess",transform:e},typeName:Et.ZodEffects,...Nt(n)});class Bo extends Lt{_parse(t){return this._getType(t)===Qe.undefined?jr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Bo.create=(e,t)=>new Bo({innerType:e,typeName:Et.ZodOptional,...Nt(t)});class Ds extends Lt{_parse(t){return this._getType(t)===Qe.null?jr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ds.create=(e,t)=>new Ds({innerType:e,typeName:Et.ZodNullable,...Nt(t)});class of extends Lt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Qe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}of.create=(e,t)=>new of({innerType:e,typeName:Et.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Nt(t)});class Yh extends Lt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Zh(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new qi(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new qi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Yh.create=(e,t)=>new Yh({innerType:e,typeName:Et.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Nt(t)});class Jh extends Lt{_parse(t){if(this._getType(t)!==Qe.nan){const r=this._getOrReturnCtx(t);return tt(r,{code:De.invalid_type,expected:Qe.nan,received:r.parsedType}),$t}return{status:"valid",value:t.data}}}Jh.create=e=>new Jh({typeName:Et.ZodNaN,...Nt(e)});const yye=Symbol("zod_brand");class kR extends Lt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class af extends Lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?$t:o.status==="dirty"?(n.dirty(),OR(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?$t:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new af({in:t,out:n,typeName:Et.ZodPipeline})}}class Xh extends Lt{_parse(t){const n=this._def.innerType._parse(t);return Kc(n)&&(n.value=Object.freeze(n.value)),n}}Xh.create=(e,t)=>new Xh({innerType:e,typeName:Et.ZodReadonly,...Nt(t)});const IR=(e,t={},n)=>e?Qu.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,c=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...c,fatal:l})}}):Qu.create(),gye={object:Pn.lazycreate};var Et;(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"})(Et||(Et={}));const vye=(e,t={message:`Input not instance of ${e.name}`})=>IR(n=>n instanceof e,t),PR=Ui.create,RR=Aa.create,bye=Jh.create,_ye=Ca.create,DR=Gc.create,wye=Is.create,xye=Hh.create,Sye=Yc.create,Eye=Jc.create,Aye=Qu.create,Cye=Ps.create,Oye=Uo.create,Tye=Wh.create,$ye=Bi.create,kye=Pn.create,Iye=Pn.strictCreate,Pye=Xc.create,Rye=Kh.create,Dye=Qc.create,Nye=yo.create,Mye=ef.create,jye=Gh.create,Lye=Rs.create,Fye=tl.create,qye=tf.create,Uye=nf.create,Bye=Oa.create,zye=rf.create,Zye=nl.create,NR=zi.create,Hye=Bo.create,Wye=Ds.create,Vye=zi.createWithPreprocess,Kye=af.create;var oe=Object.freeze({__proto__:null,defaultErrorMap:Vc,setErrorMap:rye,getErrorMap:Bh,makeIssue:zh,EMPTY_PATH:iye,addIssueToContext:tt,ParseStatus:Er,INVALID:$t,DIRTY:OR,OK:jr,isAborted:Z0,isDirty:H0,isValid:Kc,isAsync:Zh,get util(){return sn},get objectUtil(){return z0},ZodParsedType:Qe,getParsedType:Ea,ZodType:Lt,ZodString:Ui,ZodNumber:Aa,ZodBigInt:Ca,ZodBoolean:Gc,ZodDate:Is,ZodSymbol:Hh,ZodUndefined:Yc,ZodNull:Jc,ZodAny:Qu,ZodUnknown:Ps,ZodNever:Uo,ZodVoid:Wh,ZodArray:Bi,ZodObject:Pn,ZodUnion:Xc,ZodDiscriminatedUnion:Kh,ZodIntersection:Qc,ZodTuple:yo,ZodRecord:ef,ZodMap:Gh,ZodSet:Rs,ZodFunction:tl,ZodLazy:tf,ZodLiteral:nf,ZodEnum:Oa,ZodNativeEnum:rf,ZodPromise:nl,ZodEffects:zi,ZodTransformer:zi,ZodOptional:Bo,ZodNullable:Ds,ZodDefault:of,ZodCatch:Yh,ZodNaN:Jh,BRAND:yye,ZodBranded:kR,ZodPipeline:af,ZodReadonly:Xh,custom:IR,Schema:Lt,ZodSchema:Lt,late:gye,get ZodFirstPartyTypeKind(){return Et},coerce:{string:e=>Ui.create({...e,coerce:!0}),number:e=>Aa.create({...e,coerce:!0}),boolean:e=>Gc.create({...e,coerce:!0}),bigint:e=>Ca.create({...e,coerce:!0}),date:e=>Is.create({...e,coerce:!0})},any:Aye,array:$ye,bigint:_ye,boolean:DR,date:wye,discriminatedUnion:Rye,effect:NR,enum:Bye,function:Fye,instanceof:vye,intersection:Dye,lazy:qye,literal:Uye,map:jye,nan:bye,nativeEnum:zye,never:Oye,null:Eye,nullable:Wye,number:RR,object:kye,oboolean:()=>DR().optional(),onumber:()=>RR().optional(),optional:Hye,ostring:()=>PR().optional(),pipeline:Kye,preprocess:Vye,promise:Zye,record:Mye,set:Lye,strictObject:Iye,string:PR,symbol:xye,transformer:NR,tuple:Nye,undefined:Sye,union:Pye,unknown:Cye,void:Tye,NEVER:$t,ZodIssueCode:De,quotelessJson:nye,ZodError:qi});const Gye=oe.object({type:oe.literal("message_created"),data:oe.object({id:oe.string().describe("Id of the [Message](#schema_message)"),createdAt:oe.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:oe.union([oe.object({audioUrl:oe.string().min(1),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("audio")}),oe.object({title:oe.string().min(1),subtitle:oe.string().optional(),imageUrl:oe.string().optional(),actions:oe.array(oe.object({action:oe.enum(["postback","url","say"]),label:oe.string().min(1),value:oe.string().min(1)})),type:oe.literal("card"),className:oe.string().describe("CSS className to apply to the message").optional()}),oe.object({items:oe.array(oe.object({title:oe.string().min(1),subtitle:oe.string().optional(),imageUrl:oe.string().optional(),actions:oe.array(oe.object({action:oe.enum(["postback","url","say"]),label:oe.string().min(1),value:oe.string().min(1)})),className:oe.string().describe("CSS className to apply to the message").optional()})),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("carousel")}),oe.object({text:oe.string(),options:oe.array(oe.object({label:oe.string().min(1),value:oe.string().min(1)})),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("choice"),disableFreeText:oe.boolean().optional()}),oe.object({text:oe.string(),options:oe.array(oe.object({label:oe.string().min(1),value:oe.string().min(1)})),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("dropdown")}),oe.object({fileUrl:oe.string().min(1),title:oe.string().min(1).optional(),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("file")}),oe.object({imageUrl:oe.string().min(1),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("image")}),oe.object({latitude:oe.number(),longitude:oe.number(),address:oe.string().optional(),title:oe.string().optional(),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("location")}),oe.object({markdown:oe.string().min(1),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("markdown")}),oe.object({text:oe.string().min(1),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("text")}),oe.object({videoUrl:oe.string().min(1),className:oe.string().describe("CSS className to apply to the message").optional(),type:oe.literal("video")})]).describe("Payload is the content type of the message."),userId:oe.string().describe("ID of the [User](#schema_user)"),conversationId:oe.string().describe("ID of the [Conversation](#schema_conversation)")}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),Yye=oe.object({type:oe.literal("webchat_visibility"),data:oe.object({visibility:oe.union([oe.literal("show"),oe.literal("hide"),oe.literal("toggle")])})}),Jye=oe.object({type:oe.literal("webchat_config"),data:oe.object({config:oe.record(oe.union([oe.any(),oe.null()]))})}),Xye=oe.object({type:oe.literal("custom"),data:oe.object({event:oe.record(oe.union([oe.any(),oe.null()]))})}),Qye={messageCreated:Gye,webchatVisibility:Yye,webchatConfig:Jye,custom:Xye},MR="unknown error",my=class my extends AR{constructor(n){super();R(this,"_state",{status:"disconnected"});R(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const n=this._connect();this._state={status:"connecting",connectionPromise:n},await n});R(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let n;this._state.status==="connecting"?n=await this._state.connectionPromise:n=this._state.source,this._disconnectSync(n)});R(this,"_connect",async()=>{const n=await tye(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey}});return n.on("message",this._handleMessage),n.on("error",this._handleError(n)),this._state={status:"connected",source:n},n});R(this,"_disconnectSync",n=>{n.close(),this._state={status:"disconnected"}});R(this,"_handleMessage",n=>{const r=this._parseSignal(n.data);this.emit(r.type,r.data)});R(this,"_handleError",n=>r=>{this._disconnectSync(n);const i=this._toError(r);this.emit("error",i)});R(this,"_parseSignal",n=>{for(const r of Object.values(Qye)){const i=this._safeJsonParse(n),o=r.safeParse(i);if(o.success)return o.data}return{type:"unknown",data:n}});R(this,"_safeJsonParse",n=>{try{return JSON.parse(n)}catch{return n}});R(this,"_toError",n=>{if(n instanceof Error)return n;if(typeof n=="string")return new Error(n);if(n===null)return new Error(MR);if(typeof n=="object"&&"message"in n)return this._toError(n.message);try{const r=JSON.stringify(n);return new Error(r)}catch{return new Error(MR)}});this._props=n}get status(){return this._state.status}};R(my,"listen",async n=>{const r=new my(n);return await r.connect(),r});let K0=my;const jR=100*1024*1024,ege=jR,tge=jR,nge=6e4;class rge{constructor(t){R(this,"_auto");R(this,"createConversation",t=>this._auto.createConversation(t));R(this,"getConversation",t=>this._auto.getConversation(t));R(this,"deleteConversation",t=>this._auto.deleteConversation(t));R(this,"listConversations",t=>this._auto.listConversations(t));R(this,"listConversationMessages",t=>this._auto.listConversationMessages(t));R(this,"addParticipant",t=>this._auto.addParticipant(t));R(this,"removeParticipant",t=>this._auto.removeParticipant(t));R(this,"getParticipant",t=>this._auto.getParticipant(t));R(this,"listParticipants",t=>this._auto.listParticipants(t));R(this,"createMessage",t=>this._auto.createMessage(t));R(this,"getMessage",t=>this._auto.getMessage(t));R(this,"deleteMessage",t=>this._auto.deleteMessage(t));R(this,"createFile",t=>this._auto.createFile(t));R(this,"createUser",t=>this._auto.createUser(t));R(this,"getUser",t=>this._auto.getUser(t));R(this,"updateUser",t=>this._auto.updateUser(t));R(this,"deleteUser",t=>this._auto.deleteUser(t));R(this,"createEvent",t=>this._auto.createEvent(t));R(this,"getEvent",t=>this._auto.getEvent(t));R(this,"listenConversation",async({id:t,"x-user-key":n})=>await K0.listen({url:this.props.apiUrl,conversationId:t,userKey:n}));this.props=t;const{apiUrl:n}=t,r={...t.headers},i=t.timeout??nge,o=zP.create({baseURL:n,headers:r,withCredentials:!0,timeout:i,maxBodyLength:ege,maxContentLength:tge});this._auto=new Jme(o)}}const Qh={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},Kr=(e,t)=>e.status===t,go=(e,t)=>Qh[e.status]<Qh[t],LR=(e,t)=>Qh[e.status]>=Qh[t];class vo extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const FR=["audio","file","image","video"],qR=e=>FR.includes(e);class ige extends nb{constructor(n){super();R(this,"_client");R(this,"_webhookId");R(this,"_apiUrl");R(this,"_state",{status:"disconnected"});R(this,"mode","pushpin");R(this,"_initialConnect",async n=>{if(LR(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(Kr(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:r},key:i}=await this._client.createUser({name:void 0,pictureUrl:void 0,userData:n});return this._state={status:"user_created",userId:r,userKey:i},{userId:r,userToken:i}});R(this,"_reConnect",async(n,r)=>{if(LR(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return Kr(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:void 0,pictureUrl:void 0,userData:r})),n});R(this,"_mapMessage",n=>{const{payload:r,disableInput:i}=b$(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:r,disableInput:i}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new rge({apiUrl:r})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!go(this._state,"user_created"))return this._state.userId}async getUser(){if(go(this._state,"user_created"))throw new vo(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(go(this._state,"user_created"))throw new vo(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,userData:n.data});return r}get conversationId(){if(!go(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r){return n?await this.userExists(n)?this._reConnect(n,r):this._initialConnect(r):this._initialConnect(r)}async disconnect(){Kr(this._state,"conversation_created")?this._state.signalEmitter.cleanup():Kr(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(go(this._state,"user_created"))throw new vo(this._state);if(Kr(this._state,"conversation_creating"))throw new vo(this._state);let r;Kr(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:i,name:o}=n,s=await(y=>new Promise((v,w)=>{const _=new FileReader;_.onload=b=>{var S;return v((S=b.target)==null?void 0:S.result)},_.onerror=b=>{var S;return w((S=b.target)==null?void 0:S.error)},_.readAsArrayBuffer(y)}))(n),{file:{uploadUrl:l,contentType:c,url:d}}=await this._client.createFile({"x-user-key":r.userKey,size:i,key:o,accessPolicies:["public_content"],index:!1});await fetch(l,{method:"PUT",body:s});const p=c.split("/").shift()??"",m=qR(p)?p:"file",h=m==="image"?{type:m,imageUrl:d}:m==="audio"?{type:m,audioUrl:d}:m==="video"?{type:m,videoUrl:d}:{type:m,fileUrl:d};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:h}),this.emit("messageSent",d),{fileUrl:d,name:o,type:m}}async sendMessage(n){if(go(this._state,"user_created"))throw new vo(this._state);if(Kr(this._state,"conversation_creating"))throw new vo(this._state);let r;Kr(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"text",text:n}}),this.emit("messageSent",n)}async sendEvent(n){if(go(this._state,"user_created"))throw new vo(this._state);if(Kr(this._state,"conversation_creating"))throw new vo(this._state);let r;Kr(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(go(this._state,"user_created"))throw new vo(this._state);Kr(this._state,"conversation_created")&&this._state.conversationId===n||Kr(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(go(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(v0(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const i=o=>o.code===404||o.code===401;if(v0(r)&&i(r))return!1;throw r}}async newConversation(){if(go(this._state,"user_created"))throw new vo(this._state);Kr(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),i=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),i}async listMessages(){if(!Kr(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,i=[];let o;do{const a=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:o});i.push(...a.messages),o=a.meta.nextToken}while(o);return i.map(this._mapMessage)}async _connectConversation(n,r){const i=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return i.on("unknown",o=>{typeof o=="string"&&o==="ping"||console.debug("unknown event",o)}),i.on("message_created",o=>{o.userId!==n.userId&&this.emit("message",this._mapMessage(o))}),i.on("error",()=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error("Connection to conversation lost"))}),i.on("webchat_visibility",o=>{this.emit("webchatVisibility",o.visibility)}),i.on("webchat_config",o=>{this.emit("webchatConfig",o.config)}),i.on("custom",o=>{this.emit("customEvent",o.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:i},this._state}}const UR=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>n==="messaging"?new ede({url:t,clientId:e}):new ige({apiUrl:t,clientId:e}),oge=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>{const[r]=C.useState(UR({clientId:e,apiUrl:t,mode:n}));return r};function age(e,t){const n=t?`The ${t} has been copied to your clipboard.`:"Copied to clipboard.";return navigator.clipboard.writeText(e).then(()=>xve({title:n,type:"success"}))}const sge=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const o=new Image;o.addEventListener("load",()=>{i&&clearTimeout(i),n({width:o.naturalWidth,height:o.naturalHeight})}),o.addEventListener("error",a=>{i&&clearTimeout(i),r(`${a.type}: ${a.message}`)}),o.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))});let uge={data:""},lge=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||uge,cge=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,fge=/\/\*[^]*?\*\/| +/g,BR=/\n+/g,Ta=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+a+";":r+=o[1]=="f"?Ta(a,o):o+"{"+Ta(a,o[1]=="k"?"":t)+"}":typeof a=="object"?r+=Ta(a,t?t.replace(/([^,])+/g,s=>o.replace(/(^:.*)|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):o):a!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Ta.p?Ta.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},zo={},zR=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+zR(e[n]);return t}return e},dge=(e,t,n,r,i)=>{let o=zR(e),a=zo[o]||(zo[o]=(l=>{let c=0,d=11;for(;c<l.length;)d=101*d+l.charCodeAt(c++)>>>0;return"go"+d})(o));if(!zo[a]){let l=o!==e?e:(c=>{let d,p,m=[{}];for(;d=cge.exec(c.replace(fge,""));)d[4]?m.shift():d[3]?(p=d[3].replace(BR," ").trim(),m.unshift(m[0][p]=m[0][p]||{})):m[0][d[1]]=d[2].replace(BR," ").trim();return m[0]})(e);zo[a]=Ta(i?{["@keyframes "+a]:l}:l,n?"":"."+a)}let s=n&&zo.g?zo.g:null;return n&&(zo.g=zo[a]),((l,c,d,p)=>{p?c.data=c.data.replace(p,l):c.data.indexOf(l)===-1&&(c.data=d?l+c.data:c.data+l)})(zo[a],t,r,s),a},pge=(e,t,n)=>e.reduce((r,i,o)=>{let a=t[o];if(a&&a.call){let s=a(n),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=l?"."+l:s&&typeof s=="object"?s.props?"":Ta(s,""):s===!1?"":s}return r+i+(a??"")},"");function em(e){let t=this||{},n=e.call?e(t.p):e;return dge(n.unshift?n.raw?pge(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,lge(t.target),t.g,t.o,t.k)}let ZR,G0,Y0;em.bind({g:1});let Zo=em.bind({k:1});function hge(e,t,n,r){Ta.p=t,ZR=e,G0=n,Y0=r}function $a(e,t){let n=this||{};return function(){let r=arguments;function i(o,a){let s=Object.assign({},o),l=s.className||i.className;n.p=Object.assign({theme:G0&&G0()},s),n.o=/ *go\d+/.test(l),s.className=em.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),Y0&&c[0]&&Y0(s),ZR(c,s)}return t?t(i):i}}var mge=e=>typeof e=="function",tm=(e,t)=>mge(e)?e(t):e,yge=(()=>{let e=0;return()=>(++e).toString()})(),HR=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),gge=20,nm=new Map,vge=1e3,WR=e=>{if(nm.has(e))return;let t=setTimeout(()=>{nm.delete(e),Ns({type:4,toastId:e})},vge);nm.set(e,t)},bge=e=>{let t=nm.get(e);t&&clearTimeout(t)},J0=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,gge)};case 1:return t.toast.id&&bge(t.toast.id),{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:n}=t;return e.toasts.find(o=>o.id===n.id)?J0(e,{type:1,toast:n}):J0(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?WR(r):e.toasts.forEach(o=>{WR(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+i}))}}},rm=[],im={toasts:[],pausedAt:void 0},Ns=e=>{im=J0(im,e),rm.forEach(t=>{t(im)})},_ge={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},wge=(e={})=>{let[t,n]=C.useState(im);C.useEffect(()=>(rm.push(n),()=>{let i=rm.indexOf(n);i>-1&&rm.splice(i,1)}),[t]);let r=t.toasts.map(i=>{var o,a;return{...e,...e[i.type],...i,duration:i.duration||((o=e[i.type])==null?void 0:o.duration)||(e==null?void 0:e.duration)||_ge[i.type],style:{...e.style,...(a=e[i.type])==null?void 0:a.style,...i.style}}});return{...t,toasts:r}},xge=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||yge()}),sf=e=>(t,n)=>{let r=xge(t,e,n);return Ns({type:2,toast:r}),r.id},Gr=(e,t)=>sf("blank")(e,t);Gr.error=sf("error"),Gr.success=sf("success"),Gr.loading=sf("loading"),Gr.custom=sf("custom"),Gr.dismiss=e=>{Ns({type:3,toastId:e})},Gr.remove=e=>Ns({type:4,toastId:e}),Gr.promise=(e,t,n)=>{let r=Gr.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(Gr.success(tm(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Gr.error(tm(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var Sge=(e,t)=>{Ns({type:1,toast:{id:e,height:t}})},Ege=()=>{Ns({type:5,time:Date.now()})},Age=e=>{let{toasts:t,pausedAt:n}=wge(e);C.useEffect(()=>{if(n)return;let o=Date.now(),a=t.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(o-s.createdAt);if(l<0){s.visible&&Gr.dismiss(s.id);return}return setTimeout(()=>Gr.dismiss(s.id),l)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=C.useCallback(()=>{n&&Ns({type:6,time:Date.now()})},[n]),i=C.useCallback((o,a)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:c}=a||{},d=t.filter(h=>(h.position||c)===(o.position||c)&&h.height),p=d.findIndex(h=>h.id===o.id),m=d.filter((h,y)=>y<p&&h.visible).length;return d.filter(h=>h.visible).slice(...s?[m+1]:[0,m]).reduce((h,y)=>h+(y.height||0)+l,0)},[t]);return{toasts:t,handlers:{updateHeight:Sge,startPause:Ege,endPause:r,calculateOffset:i}}},Cge=Zo`
|
|
204
204
|
from {
|
|
205
205
|
transform: scale(0) rotate(45deg);
|
|
206
206
|
opacity: 0;
|
|
@@ -379,7 +379,7 @@ to {
|
|
|
379
379
|
`,om=16,Jge=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,containerStyle:o,containerClassName:a})=>{let{toasts:s,handlers:l}=Age(n);return z.createElement("div",{style:{position:"fixed",zIndex:9999,top:om,left:om,right:om,bottom:om,pointerEvents:"none",...o},className:a,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(c=>{let d=c.position||t,p=l.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),m=Gge(d,p);return z.createElement(Kge,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?Yge:"",style:m},c.type==="custom"?tm(c.message,c):i?i(c):z.createElement(Vge,{toast:c,position:d}))}))},Xge=Object.defineProperty,Qge=(e,t,n)=>t in e?Xge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X0=(e,t,n)=>(Qge(e,typeof t!="symbol"?t+"":t,n),n);let eve=class{constructor(){X0(this,"current",this.detect()),X0(this,"handoffState","pending"),X0(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},uf=new eve,am=(e,t)=>{uf.isServer?C.useEffect(e,t):C.useLayoutEffect(e,t)};function rl(e){let t=C.useRef(e);return am(()=>{t.current=e},[e]),t}function tve(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function sm(){let e=[],t=[],n={enqueue(r){t.push(r)},addEventListener(r,i,o,a){return r.addEventListener(i,o,a),n.add(()=>r.removeEventListener(i,o,a))},requestAnimationFrame(...r){let i=requestAnimationFrame(...r);return n.add(()=>cancelAnimationFrame(i))},nextFrame(...r){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...r))},setTimeout(...r){let i=setTimeout(...r);return n.add(()=>clearTimeout(i))},microTask(...r){let i={current:!0};return tve(()=>{i.current&&r[0]()}),n.add(()=>{i.current=!1})},add(r){return e.push(r),()=>{let i=e.indexOf(r);if(i>=0){let[o]=e.splice(i,1);o()}}},dispose(){for(let r of e.splice(0))r()},async workQueue(){for(let r of t.splice(0))await r()},style(r,i,o){let a=r.style.getPropertyValue(i);return Object.assign(r.style,{[i]:o}),this.add(()=>{Object.assign(r.style,{[i]:a})})}};return n}function VR(){let[e]=C.useState(sm);return C.useEffect(()=>()=>e.dispose(),[e]),e}let Ms=function(e){let t=rl(e);return C.useCallback((...n)=>t.current(...n),[t])};function KR(){let[e,t]=C.useState(uf.isHandoffComplete);return e&&uf.isHandoffComplete===!1&&t(!1),C.useEffect(()=>{e!==!0&&t(!0)},[e]),C.useEffect(()=>uf.handoff(),[]),e}function bo(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,bo),r}let nve=Symbol();function GR(...e){let t=C.useRef(e);C.useEffect(()=>{t.current=e},[e]);let n=Ms(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[nve]))?void 0:n}function YR(...e){return e.filter(Boolean).join(" ")}var JR=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(JR||{}),Ho=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ho||{});function XR({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:a}){let s=QR(t,e);if(o)return um(s,n,r,a);let l=i??0;if(l&2){let{static:c=!1,...d}=s;if(c)return um(d,n,r,a)}if(l&1){let{unmount:c=!0,...d}=s;return bo(c?0:1,{0(){return null},1(){return um({...d,hidden:!0,style:{display:"none"}},n,r,a)}})}return um(s,n,r,a)}function um(e,t={},n,r){var i;let{as:o=n,children:a,refName:s="ref",...l}=e_(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},d=typeof a=="function"?a(t):a;l.className&&typeof l.className=="function"&&(l.className=l.className(t));let p={};if(t){let m=!1,h=[];for(let[y,v]of Object.entries(t))typeof v=="boolean"&&(m=!0),v===!0&&h.push(y);m&&(p["data-headlessui-state"]=h.join(" "))}if(o===C.Fragment&&Object.keys(e2(l)).length>0){if(!C.isValidElement(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map(y=>` - ${y}`).join(`
|
|
380
380
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(y=>` - ${y}`).join(`
|
|
381
381
|
`)].join(`
|
|
382
|
-
`));let m=YR((i=d.props)==null?void 0:i.className,l.className),h=m?{className:m}:{};return C.cloneElement(d,Object.assign({},QR(d.props,e2(e_(l,["ref"]))),p,c,rve(d.ref,c.ref),h))}return C.createElement(o,Object.assign({},e_(l,["ref"]),o!==C.Fragment&&c,o!==C.Fragment&&p),d)}function rve(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function QR(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...o){let a=n[r];for(let s of a){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;s(i,...o)}}});return t}function Q0(e){var t;return Object.assign(C.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function e2(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function e_(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let t_=C.createContext(null);t_.displayName="OpenClosedContext";var Wo=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Wo||{});function t2(){return C.useContext(t_)}function ive({value:e,children:t}){return C.createElement(t_.Provider,{value:e},t)}function n2(){let e=C.useRef(!1);return am(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function ove(e=0){let[t,n]=C.useState(e),r=C.useCallback(s=>n(l=>l|s),[t]),i=C.useCallback(s=>!!(t&s),[t]),o=C.useCallback(s=>n(l=>l&~s),[n]),a=C.useCallback(s=>n(l=>l^s),[n]);return{flags:t,addFlag:r,hasFlag:i,removeFlag:o,toggleFlag:a}}function ave(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function n_(e,...t){e&&t.length>0&&e.classList.add(...t)}function r_(e,...t){e&&t.length>0&&e.classList.remove(...t)}function sve(e,t){let n=sm();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[o,a]=[r,i].map(s=>{let[l=0]=s.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,d)=>d-c);return l});if(o+a!==0){let s=n.addEventListener(e,"transitionend",l=>{l.target===l.currentTarget&&(t(),s())})}else t();return n.add(()=>t()),n.dispose}function uve(e,t,n,r){let i=n?"enter":"leave",o=sm(),a=r!==void 0?ave(r):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=bo(i,{enter:()=>t.enter,leave:()=>t.leave}),l=bo(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=bo(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return r_(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),n_(e,...s,...c),o.nextFrame(()=>{r_(e,...c),n_(e,...l),sve(e,()=>(r_(e,...s),n_(e,...t.entered),a()))}),o.dispose}function lve({container:e,direction:t,classes:n,onStart:r,onStop:i}){let o=n2(),a=VR(),s=rl(t);am(()=>{let l=sm();a.add(l.dispose);let c=e.current;if(c&&s.current!=="idle"&&o.current)return l.dispose(),r.current(s.current),l.add(uve(c,n.current,s.current==="enter",()=>{l.dispose(),i.current(s.current)})),l.dispose},[t])}function js(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let lm=C.createContext(null);lm.displayName="TransitionContext";var cve=(e=>(e.Visible="visible",e.Hidden="hidden",e))(cve||{});function fve(){let e=C.useContext(lm);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function dve(){let e=C.useContext(cm);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let cm=C.createContext(null);cm.displayName="NestingContext";function fm(e){return"children"in e?fm(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function r2(e,t){let n=rl(e),r=C.useRef([]),i=n2(),o=VR(),a=Ms((h,y=Ho.Hidden)=>{let v=r.current.findIndex(({el:w})=>w===h);v!==-1&&(bo(y,{[Ho.Unmount](){r.current.splice(v,1)},[Ho.Hidden](){r.current[v].state="hidden"}}),o.microTask(()=>{var w;!fm(r)&&i.current&&((w=n.current)==null||w.call(n))}))}),s=Ms(h=>{let y=r.current.find(({el:v})=>v===h);return y?y.state!=="visible"&&(y.state="visible"):r.current.push({el:h,state:"visible"}),()=>a(h,Ho.Unmount)}),l=C.useRef([]),c=C.useRef(Promise.resolve()),d=C.useRef({enter:[],leave:[],idle:[]}),p=Ms((h,y,v)=>{l.current.splice(0),t&&(t.chains.current[y]=t.chains.current[y].filter(([w])=>w!==h)),t==null||t.chains.current[y].push([h,new Promise(w=>{l.current.push(w)})]),t==null||t.chains.current[y].push([h,new Promise(w=>{Promise.all(d.current[y].map(([_,b])=>b)).then(()=>w())})]),y==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>v(y)):v(y)}),m=Ms((h,y,v)=>{Promise.all(d.current[y].splice(0).map(([w,_])=>_)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>v(y))});return C.useMemo(()=>({children:r,register:s,unregister:a,onStart:p,onStop:m,wait:c,chains:d}),[s,a,r,p,m,d,c])}function pve(){}let hve=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function i2(e){var t;let n={};for(let r of hve)n[r]=(t=e[r])!=null?t:pve;return n}function mve(e){let t=C.useRef(i2(e));return C.useEffect(()=>{t.current=i2(e)},[e]),t}let yve="div",o2=JR.RenderStrategy,a2=Q0(function(e,t){let{beforeEnter:n,afterEnter:r,beforeLeave:i,afterLeave:o,enter:a,enterFrom:s,enterTo:l,entered:c,leave:d,leaveFrom:p,leaveTo:m,...h}=e,y=C.useRef(null),v=GR(y,t),w=h.unmount?Ho.Unmount:Ho.Hidden,{show:_,appear:b,initial:S}=fve(),[A,E]=C.useState(_?"visible":"hidden"),T=dve(),{register:N,unregister:L}=T,F=C.useRef(null);C.useEffect(()=>N(y),[N,y]),C.useEffect(()=>{if(w===Ho.Hidden&&y.current){if(_&&A!=="visible"){E("visible");return}return bo(A,{hidden:()=>L(y),visible:()=>N(y)})}},[A,y,N,L,_,w]);let j=rl({enter:js(a),enterFrom:js(s),enterTo:js(l),entered:js(c),leave:js(d),leaveFrom:js(p),leaveTo:js(m)}),H=mve({beforeEnter:n,afterEnter:r,beforeLeave:i,afterLeave:o}),re=KR();C.useEffect(()=>{if(re&&A==="visible"&&y.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[y,A,re]);let Q=S&&!b,G=(()=>!re||Q||F.current===_?"idle":_?"enter":"leave")(),V=ove(0),q=Ms(ue=>bo(ue,{enter:()=>{V.addFlag(Wo.Opening),H.current.beforeEnter()},leave:()=>{V.addFlag(Wo.Closing),H.current.beforeLeave()},idle:()=>{}})),Y=Ms(ue=>bo(ue,{enter:()=>{V.removeFlag(Wo.Opening),H.current.afterEnter()},leave:()=>{V.removeFlag(Wo.Closing),H.current.afterLeave()},idle:()=>{}})),ne=r2(()=>{E("hidden"),L(y)},T);lve({container:y,classes:j,direction:G,onStart:rl(ue=>{ne.onStart(y,ue,q)}),onStop:rl(ue=>{ne.onStop(y,ue,Y),ue==="leave"&&!fm(ne)&&(E("hidden"),L(y))})}),C.useEffect(()=>{!Q||(w===Ho.Hidden?F.current=null:F.current=_)},[_,Q,A]);let ce=h,P={ref:v};return b&&_&&uf.isServer&&(ce={...ce,className:YR(h.className,...j.current.enter,...j.current.enterFrom)}),C.createElement(cm.Provider,{value:ne},C.createElement(ive,{value:bo(A,{visible:Wo.Open,hidden:Wo.Closed})|V.flags},XR({ourProps:P,theirProps:ce,defaultTag:yve,features:o2,visible:A==="visible",name:"Transition.Child"})))}),i_=Q0(function(e,t){let{show:n,appear:r=!1,unmount:i,...o}=e,a=C.useRef(null),s=GR(a,t);KR();let l=t2();if(n===void 0&&l!==null&&(n=(l&Wo.Open)===Wo.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=C.useState(n?"visible":"hidden"),p=r2(()=>{d("hidden")}),[m,h]=C.useState(!0),y=C.useRef([n]);am(()=>{m!==!1&&y.current[y.current.length-1]!==n&&(y.current.push(n),h(!1))},[y,n]);let v=C.useMemo(()=>({show:n,appear:r,initial:m}),[n,r,m]);C.useEffect(()=>{if(n)d("visible");else if(!fm(p))d("hidden");else{let _=a.current;if(!_)return;let b=_.getBoundingClientRect();b.x===0&&b.y===0&&b.width===0&&b.height===0&&d("hidden")}},[n,p]);let w={unmount:i};return C.createElement(cm.Provider,{value:p},C.createElement(lm.Provider,{value:v},XR({ourProps:{...w,as:C.Fragment,children:C.createElement(a2,{ref:s,...w,...o})},theirProps:{},defaultTag:C.Fragment,features:o2,visible:c==="visible",name:"Transition"})))}),gve=Q0(function(e,t){let n=C.useContext(lm)!==null,r=t2()!==null;return C.createElement(C.Fragment,null,!n&&r?C.createElement(i_,{ref:t,...e}):C.createElement(a2,{ref:t,...e}))}),vve=Object.assign(i_,{Child:gve,Root:i_});const bve=e=>z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,...e},z.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m7.5 12 3 3 6-6m5.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"})),_ve=e=>z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},z.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M18 6 6 18M6 6l12 12"})),wve=e=>z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,...e},z.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m15 9-6 6m0-6 6 6m7-3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));function xve(e){return Gr.custom(t=>X.jsx(Eve,{type:e.type,show:t.visible,children:e.type==="custom"?e.content:X.jsx(Sve,{...e,toastId:t.id})}))}const Sve=({icon:e,type:t,title:n,description:r,toastId:i})=>{const{notification:o}=it(a=>a.theme);return X.jsxs(X.Fragment,{children:[e?X.jsx(e,{...o==null?void 0:o.icon}):X.jsx(Ave,{...o==null?void 0:o.icon,type:t}),X.jsx("p",{...o==null?void 0:o.title,children:n}),r?X.jsx("p",{...o==null?void 0:o.description,children:r}):null,X.jsx(_ve,{...o==null?void 0:o.closeIcon,onClick:()=>Gr.dismiss(i)})]})},Eve=({type:e,...t})=>{const{notification:n}=it(r=>r.theme);return X.jsx(vve,{...t,...n==null?void 0:n.container,appear:!0,"data-type":e??"neutral"})},Ave=({type:e,className:t})=>{switch(e){case"success":return X.jsx(bve,{className:t});case"error":return X.jsx(wve,{className:t});default:return null}};var dm=function(){return dm=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},dm.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;function Cve(){var e=C.useRef(!1),t=C.useCallback(function(){return e.current},[]);return C.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function Ove(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=C.useRef(0),i=Cve(),o=C.useState(n),a=o[0],s=o[1],l=C.useCallback(function(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];var p=++r.current;return a.loading||s(function(m){return dm(dm({},m),{loading:!0})}),e.apply(void 0,c).then(function(m){return i()&&p===r.current&&s({value:m,loading:!1}),m},function(m){return i()&&p===r.current&&s({error:m,loading:!1}),m})},t);return[a,l]}function o_(e,t){t===void 0&&(t=[]);var n=Ove(e,t,{loading:!0}),r=n[0],i=n[1];return C.useEffect(function(){i()},[i]),r}function Tve(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function $ve(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var kve=function(e){C.useEffect(e,[])};const s2=kve;var Ive=function(e){s2(function(){e()})};const Pve=Ive;var Rve=function(e){var t=C.useRef(e);t.current=e,s2(function(){return function(){return t.current()}})};const Dve=Rve;var Nve=function(e){var t=C.useRef(0),n=C.useState(e),r=n[0],i=n[1],o=C.useCallback(function(a){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(a)})},[]);return Dve(function(){cancelAnimationFrame(t.current)}),[r,o]};const Mve=Nve;var jve=function(e){process.env.NODE_ENV==="development"&&(typeof e!="object"||typeof e.current>"u")&&console.error("`useScroll` expects a single ref argument.");var t=Mve({x:0,y:0}),n=t[0],r=t[1];return C.useEffect(function(){var i=function(){e.current&&r({x:e.current.scrollLeft,y:e.current.scrollTop})};return e.current&&Tve(e.current,"scroll",i,{capture:!1,passive:!0}),function(){e.current&&$ve(e.current,"scroll",i)}},[e]),n};const Lve=jve,Fve=e=>{const t=new Date;return e.getTime()-t.getTime()},qve=(e=Fve)=>{const[t,n]=C.useState(0),[r,i]=C.useState(),o=()=>n(a=>a+1);return o_(async()=>{if(r){const a=setTimeout(o,e(r));return()=>{clearTimeout(a)}}},[r]),[t,i]},u2=e=>{let t;const n=new Set,r=(l,c)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const p=t;t=c??typeof d!="object"?d:Object.assign({},t,d),n.forEach(m=>m(t,p))}},i=()=>t,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return t=e(r,i,s),s},l2=e=>e?u2(e):u2;var a_={exports:{}},s_={},pm={exports:{}},u_={};/**
|
|
382
|
+
`));let m=YR((i=d.props)==null?void 0:i.className,l.className),h=m?{className:m}:{};return C.cloneElement(d,Object.assign({},QR(d.props,e2(e_(l,["ref"]))),p,c,rve(d.ref,c.ref),h))}return C.createElement(o,Object.assign({},e_(l,["ref"]),o!==C.Fragment&&c,o!==C.Fragment&&p),d)}function rve(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function QR(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...o){let a=n[r];for(let s of a){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;s(i,...o)}}});return t}function Q0(e){var t;return Object.assign(C.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function e2(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function e_(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let t_=C.createContext(null);t_.displayName="OpenClosedContext";var Wo=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Wo||{});function t2(){return C.useContext(t_)}function ive({value:e,children:t}){return C.createElement(t_.Provider,{value:e},t)}function n2(){let e=C.useRef(!1);return am(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function ove(e=0){let[t,n]=C.useState(e),r=C.useCallback(s=>n(l=>l|s),[t]),i=C.useCallback(s=>!!(t&s),[t]),o=C.useCallback(s=>n(l=>l&~s),[n]),a=C.useCallback(s=>n(l=>l^s),[n]);return{flags:t,addFlag:r,hasFlag:i,removeFlag:o,toggleFlag:a}}function ave(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function n_(e,...t){e&&t.length>0&&e.classList.add(...t)}function r_(e,...t){e&&t.length>0&&e.classList.remove(...t)}function sve(e,t){let n=sm();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[o,a]=[r,i].map(s=>{let[l=0]=s.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,d)=>d-c);return l});if(o+a!==0){let s=n.addEventListener(e,"transitionend",l=>{l.target===l.currentTarget&&(t(),s())})}else t();return n.add(()=>t()),n.dispose}function uve(e,t,n,r){let i=n?"enter":"leave",o=sm(),a=r!==void 0?ave(r):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=bo(i,{enter:()=>t.enter,leave:()=>t.leave}),l=bo(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=bo(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return r_(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),n_(e,...s,...c),o.nextFrame(()=>{r_(e,...c),n_(e,...l),sve(e,()=>(r_(e,...s),n_(e,...t.entered),a()))}),o.dispose}function lve({container:e,direction:t,classes:n,onStart:r,onStop:i}){let o=n2(),a=VR(),s=rl(t);am(()=>{let l=sm();a.add(l.dispose);let c=e.current;if(c&&s.current!=="idle"&&o.current)return l.dispose(),r.current(s.current),l.add(uve(c,n.current,s.current==="enter",()=>{l.dispose(),i.current(s.current)})),l.dispose},[t])}function js(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let lm=C.createContext(null);lm.displayName="TransitionContext";var cve=(e=>(e.Visible="visible",e.Hidden="hidden",e))(cve||{});function fve(){let e=C.useContext(lm);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function dve(){let e=C.useContext(cm);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let cm=C.createContext(null);cm.displayName="NestingContext";function fm(e){return"children"in e?fm(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function r2(e,t){let n=rl(e),r=C.useRef([]),i=n2(),o=VR(),a=Ms((h,y=Ho.Hidden)=>{let v=r.current.findIndex(({el:w})=>w===h);v!==-1&&(bo(y,{[Ho.Unmount](){r.current.splice(v,1)},[Ho.Hidden](){r.current[v].state="hidden"}}),o.microTask(()=>{var w;!fm(r)&&i.current&&((w=n.current)==null||w.call(n))}))}),s=Ms(h=>{let y=r.current.find(({el:v})=>v===h);return y?y.state!=="visible"&&(y.state="visible"):r.current.push({el:h,state:"visible"}),()=>a(h,Ho.Unmount)}),l=C.useRef([]),c=C.useRef(Promise.resolve()),d=C.useRef({enter:[],leave:[],idle:[]}),p=Ms((h,y,v)=>{l.current.splice(0),t&&(t.chains.current[y]=t.chains.current[y].filter(([w])=>w!==h)),t==null||t.chains.current[y].push([h,new Promise(w=>{l.current.push(w)})]),t==null||t.chains.current[y].push([h,new Promise(w=>{Promise.all(d.current[y].map(([_,b])=>b)).then(()=>w())})]),y==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>v(y)):v(y)}),m=Ms((h,y,v)=>{Promise.all(d.current[y].splice(0).map(([w,_])=>_)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>v(y))});return C.useMemo(()=>({children:r,register:s,unregister:a,onStart:p,onStop:m,wait:c,chains:d}),[s,a,r,p,m,d,c])}function pve(){}let hve=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function i2(e){var t;let n={};for(let r of hve)n[r]=(t=e[r])!=null?t:pve;return n}function mve(e){let t=C.useRef(i2(e));return C.useEffect(()=>{t.current=i2(e)},[e]),t}let yve="div",o2=JR.RenderStrategy,a2=Q0(function(e,t){let{beforeEnter:n,afterEnter:r,beforeLeave:i,afterLeave:o,enter:a,enterFrom:s,enterTo:l,entered:c,leave:d,leaveFrom:p,leaveTo:m,...h}=e,y=C.useRef(null),v=GR(y,t),w=h.unmount?Ho.Unmount:Ho.Hidden,{show:_,appear:b,initial:S}=fve(),[A,E]=C.useState(_?"visible":"hidden"),T=dve(),{register:j,unregister:L}=T,F=C.useRef(null);C.useEffect(()=>j(y),[j,y]),C.useEffect(()=>{if(w===Ho.Hidden&&y.current){if(_&&A!=="visible"){E("visible");return}return bo(A,{hidden:()=>L(y),visible:()=>j(y)})}},[A,y,j,L,_,w]);let M=rl({enter:js(a),enterFrom:js(s),enterTo:js(l),entered:js(c),leave:js(d),leaveFrom:js(p),leaveTo:js(m)}),H=mve({beforeEnter:n,afterEnter:r,beforeLeave:i,afterLeave:o}),re=KR();C.useEffect(()=>{if(re&&A==="visible"&&y.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[y,A,re]);let Q=S&&!b,G=(()=>!re||Q||F.current===_?"idle":_?"enter":"leave")(),V=ove(0),q=Ms(ue=>bo(ue,{enter:()=>{V.addFlag(Wo.Opening),H.current.beforeEnter()},leave:()=>{V.addFlag(Wo.Closing),H.current.beforeLeave()},idle:()=>{}})),Y=Ms(ue=>bo(ue,{enter:()=>{V.removeFlag(Wo.Opening),H.current.afterEnter()},leave:()=>{V.removeFlag(Wo.Closing),H.current.afterLeave()},idle:()=>{}})),ne=r2(()=>{E("hidden"),L(y)},T);lve({container:y,classes:M,direction:G,onStart:rl(ue=>{ne.onStart(y,ue,q)}),onStop:rl(ue=>{ne.onStop(y,ue,Y),ue==="leave"&&!fm(ne)&&(E("hidden"),L(y))})}),C.useEffect(()=>{!Q||(w===Ho.Hidden?F.current=null:F.current=_)},[_,Q,A]);let ce=h,P={ref:v};return b&&_&&uf.isServer&&(ce={...ce,className:YR(h.className,...M.current.enter,...M.current.enterFrom)}),C.createElement(cm.Provider,{value:ne},C.createElement(ive,{value:bo(A,{visible:Wo.Open,hidden:Wo.Closed})|V.flags},XR({ourProps:P,theirProps:ce,defaultTag:yve,features:o2,visible:A==="visible",name:"Transition.Child"})))}),i_=Q0(function(e,t){let{show:n,appear:r=!1,unmount:i,...o}=e,a=C.useRef(null),s=GR(a,t);KR();let l=t2();if(n===void 0&&l!==null&&(n=(l&Wo.Open)===Wo.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=C.useState(n?"visible":"hidden"),p=r2(()=>{d("hidden")}),[m,h]=C.useState(!0),y=C.useRef([n]);am(()=>{m!==!1&&y.current[y.current.length-1]!==n&&(y.current.push(n),h(!1))},[y,n]);let v=C.useMemo(()=>({show:n,appear:r,initial:m}),[n,r,m]);C.useEffect(()=>{if(n)d("visible");else if(!fm(p))d("hidden");else{let _=a.current;if(!_)return;let b=_.getBoundingClientRect();b.x===0&&b.y===0&&b.width===0&&b.height===0&&d("hidden")}},[n,p]);let w={unmount:i};return C.createElement(cm.Provider,{value:p},C.createElement(lm.Provider,{value:v},XR({ourProps:{...w,as:C.Fragment,children:C.createElement(a2,{ref:s,...w,...o})},theirProps:{},defaultTag:C.Fragment,features:o2,visible:c==="visible",name:"Transition"})))}),gve=Q0(function(e,t){let n=C.useContext(lm)!==null,r=t2()!==null;return C.createElement(C.Fragment,null,!n&&r?C.createElement(i_,{ref:t,...e}):C.createElement(a2,{ref:t,...e}))}),vve=Object.assign(i_,{Child:gve,Root:i_});const bve=e=>z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,...e},z.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m7.5 12 3 3 6-6m5.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"})),_ve=e=>z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},z.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M18 6 6 18M6 6l12 12"})),wve=e=>z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,...e},z.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m15 9-6 6m0-6 6 6m7-3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));function xve(e){return Gr.custom(t=>X.jsx(Eve,{type:e.type,show:t.visible,children:e.type==="custom"?e.content:X.jsx(Sve,{...e,toastId:t.id})}))}const Sve=({icon:e,type:t,title:n,description:r,toastId:i})=>{const{notification:o}=it(a=>a.theme);return X.jsxs(X.Fragment,{children:[e?X.jsx(e,{...o==null?void 0:o.icon}):X.jsx(Ave,{...o==null?void 0:o.icon,type:t}),X.jsx("p",{...o==null?void 0:o.title,children:n}),r?X.jsx("p",{...o==null?void 0:o.description,children:r}):null,X.jsx(_ve,{...o==null?void 0:o.closeIcon,onClick:()=>Gr.dismiss(i)})]})},Eve=({type:e,...t})=>{const{notification:n}=it(r=>r.theme);return X.jsx(vve,{...t,...n==null?void 0:n.container,appear:!0,"data-type":e??"neutral"})},Ave=({type:e,className:t})=>{switch(e){case"success":return X.jsx(bve,{className:t});case"error":return X.jsx(wve,{className:t});default:return null}};var dm=function(){return dm=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},dm.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;function Cve(){var e=C.useRef(!1),t=C.useCallback(function(){return e.current},[]);return C.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function Ove(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=C.useRef(0),i=Cve(),o=C.useState(n),a=o[0],s=o[1],l=C.useCallback(function(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];var p=++r.current;return a.loading||s(function(m){return dm(dm({},m),{loading:!0})}),e.apply(void 0,c).then(function(m){return i()&&p===r.current&&s({value:m,loading:!1}),m},function(m){return i()&&p===r.current&&s({error:m,loading:!1}),m})},t);return[a,l]}function o_(e,t){t===void 0&&(t=[]);var n=Ove(e,t,{loading:!0}),r=n[0],i=n[1];return C.useEffect(function(){i()},[i]),r}function Tve(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function $ve(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var kve=function(e){C.useEffect(e,[])};const s2=kve;var Ive=function(e){s2(function(){e()})};const Pve=Ive;var Rve=function(e){var t=C.useRef(e);t.current=e,s2(function(){return function(){return t.current()}})};const Dve=Rve;var Nve=function(e){var t=C.useRef(0),n=C.useState(e),r=n[0],i=n[1],o=C.useCallback(function(a){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(a)})},[]);return Dve(function(){cancelAnimationFrame(t.current)}),[r,o]};const Mve=Nve;var jve=function(e){process.env.NODE_ENV==="development"&&(typeof e!="object"||typeof e.current>"u")&&console.error("`useScroll` expects a single ref argument.");var t=Mve({x:0,y:0}),n=t[0],r=t[1];return C.useEffect(function(){var i=function(){e.current&&r({x:e.current.scrollLeft,y:e.current.scrollTop})};return e.current&&Tve(e.current,"scroll",i,{capture:!1,passive:!0}),function(){e.current&&$ve(e.current,"scroll",i)}},[e]),n};const Lve=jve,Fve=e=>{const t=new Date;return e.getTime()-t.getTime()},qve=(e=Fve)=>{const[t,n]=C.useState(0),[r,i]=C.useState(),o=()=>n(a=>a+1);return o_(async()=>{if(r){const a=setTimeout(o,e(r));return()=>{clearTimeout(a)}}},[r]),[t,i]},u2=e=>{let t;const n=new Set,r=(l,c)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const p=t;t=c??typeof d!="object"?d:Object.assign({},t,d),n.forEach(m=>m(t,p))}},i=()=>t,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return t=e(r,i,s),s},l2=e=>e?u2(e):u2;var a_={exports:{}},s_={},pm={exports:{}},u_={};/**
|
|
383
383
|
* @license React
|
|
384
384
|
* use-sync-external-store-shim.production.min.js
|
|
385
385
|
*
|
|
@@ -395,7 +395,7 @@ to {
|
|
|
395
395
|
*
|
|
396
396
|
* This source code is licensed under the MIT license found in the
|
|
397
397
|
* LICENSE file in the root directory of this source tree.
|
|
398
|
-
*/var f2;function Bve(){return f2||(f2=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=C,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(S){{for(var A=arguments.length,E=new Array(A>1?A-1:0),T=1;T<A;T++)E[T-1]=arguments[T];r("error",S,E)}}function r(S,A,E){{var T=t.ReactDebugCurrentFrame,
|
|
398
|
+
*/var f2;function Bve(){return f2||(f2=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=C,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(S){{for(var A=arguments.length,E=new Array(A>1?A-1:0),T=1;T<A;T++)E[T-1]=arguments[T];r("error",S,E)}}function r(S,A,E){{var T=t.ReactDebugCurrentFrame,j=T.getStackAddendum();j!==""&&(A+="%s",E=E.concat([j]));var L=E.map(function(F){return String(F)});L.unshift("Warning: "+A),Function.prototype.apply.call(console[S],console,L)}}function i(S,A){return S===A&&(S!==0||1/S===1/A)||S!==S&&A!==A}var o=typeof Object.is=="function"?Object.is:i,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,d=!1,p=!1;function m(S,A,E){d||e.startTransition!==void 0&&(d=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var T=A();if(!p){var j=A();o(T,j)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}var L=a({inst:{value:T,getSnapshot:A}}),F=L[0].inst,M=L[1];return l(function(){F.value=T,F.getSnapshot=A,h(F)&&M({inst:F})},[S,T,A]),s(function(){h(F)&&M({inst:F});var H=function(){h(F)&&M({inst:F})};return S(H)},[S]),c(T),T}function h(S){var A=S.getSnapshot,E=S.value;try{var T=A();return!o(E,T)}catch{return!0}}function y(S,A,E){return A()}var v=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",w=!v,_=w?y:m,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_;l_.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),l_}var d2;function p2(){return d2||(d2=1,process.env.NODE_ENV==="production"?pm.exports=Uve():pm.exports=Bve()),pm.exports}/**
|
|
399
399
|
* @license React
|
|
400
400
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
401
401
|
*
|
|
@@ -403,7 +403,7 @@ to {
|
|
|
403
403
|
*
|
|
404
404
|
* This source code is licensed under the MIT license found in the
|
|
405
405
|
* LICENSE file in the root directory of this source tree.
|
|
406
|
-
*/var h2;function zve(){if(h2)return s_;h2=1;var e=C,t=p2();function n(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return s_.useSyncExternalStoreWithSelector=function(c,d,p,m,h){var y=o(null);if(y.current===null){var v={hasValue:!1,value:null};y.current=v}else v=y.current;y=s(function(){function _(T){if(!b){if(b=!0,S=T,T=m(T),h!==void 0&&v.hasValue){var
|
|
406
|
+
*/var h2;function zve(){if(h2)return s_;h2=1;var e=C,t=p2();function n(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return s_.useSyncExternalStoreWithSelector=function(c,d,p,m,h){var y=o(null);if(y.current===null){var v={hasValue:!1,value:null};y.current=v}else v=y.current;y=s(function(){function _(T){if(!b){if(b=!0,S=T,T=m(T),h!==void 0&&v.hasValue){var j=v.value;if(h(j,T))return A=j}return A=T}if(j=A,r(S,T))return j;var L=m(T);return h!==void 0&&h(j,L)?j:(S=T,A=L)}var b=!1,S,A,E=p===void 0?null:p;return[function(){return _(d())},E===null?void 0:function(){return _(E())}]},[d,p,m,h]);var w=i(c,y[0],y[1]);return a(function(){v.hasValue=!0,v.value=w},[w]),l(w),w},s_}var c_={};/**
|
|
407
407
|
* @license React
|
|
408
408
|
* use-sync-external-store-shim/with-selector.development.js
|
|
409
409
|
*
|
|
@@ -411,15 +411,15 @@ to {
|
|
|
411
411
|
*
|
|
412
412
|
* This source code is licensed under the MIT license found in the
|
|
413
413
|
* LICENSE file in the root directory of this source tree.
|
|
414
|
-
*/var m2;function Zve(){return m2||(m2=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=C,t=p2();function n(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(d,p,m,h,y){var v=o(null),w;v.current===null?(w={hasValue:!1,value:null},v.current=w):w=v.current;var _=s(function(){var E=!1,T,
|
|
414
|
+
*/var m2;function Zve(){return m2||(m2=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=C,t=p2();function n(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(d,p,m,h,y){var v=o(null),w;v.current===null?(w={hasValue:!1,value:null},v.current=w):w=v.current;var _=s(function(){var E=!1,T,j,L=function(re){if(!E){E=!0,T=re;var Q=h(re);if(y!==void 0&&w.hasValue){var G=w.value;if(y(G,Q))return j=G,G}return j=Q,Q}var V=T,q=j;if(r(V,re))return q;var Y=h(re);return y!==void 0&&y(q,Y)?q:(T=re,j=Y,Y)},F=m===void 0?null:m,M=function(){return L(p())},H=F===null?void 0:function(){return L(F())};return[M,H]},[p,m,h,y]),b=_[0],S=_[1],A=i(d,b,S);return a(function(){w.hasValue=!0,w.value=A},[A]),l(A),A}c_.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),c_}process.env.NODE_ENV==="production"?a_.exports=zve():a_.exports=Zve();var Hve=a_.exports;const Wve=Oo(Hve),{useSyncExternalStoreWithSelector:Vve}=Wve;let L2e=!1;function y2(e,t=e.getState,n){const r=Vve(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return C.useDebugValue(r),r}const g2=e=>{const t=typeof e=="function"?l2(e):e,n=(r,i)=>y2(t,r,i);return Object.assign(n,t),n},Kve=e=>e?g2(e):g2,f_=new Map,hm=e=>{const t=f_.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},Gve=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=f_.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return f_.set(n.name,i),{type:"tracked",store:e,...i}},v2=(e,t={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:a,store:s,...l}=t;let c;try{c=(o??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(n,r,i);const{connection:d,...p}=Gve(s,c,l);let m=!0;i.setState=(v,w,_)=>{const b=n(v,w);if(!m)return b;const S=_===void 0?{type:a||"anonymous"}:typeof _=="string"?{type:_}:_;return s===void 0?(d==null||d.send(S,r()),b):(d==null||d.send({...S,type:`${s}/${S.type}`},{...hm(l.name),[s]:i.getState()}),b)};const h=(...v)=>{const w=m;m=!1,n(...v),m=w},y=e(i.setState,r,i);if(p.type==="untracked"?d==null||d.init(y):(p.stores[p.store]=i,d==null||d.init(Object.fromEntries(Object.entries(p.stores).map(([v,w])=>[v,v===p.store?y:w.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let v=!1;const w=i.dispatch;i.dispatch=(..._)=>{w(..._)}}return d.subscribe(v=>{var w;switch(v.type){case"ACTION":if(typeof v.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return d_(v.payload,_=>{if(_.type==="__setState"){if(s===void 0){h(_.state);return}Object.keys(_.state).length!==1&&console.error(`
|
|
415
415
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
416
416
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
417
417
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
418
|
-
`);const b=_.state[s];if(b==null)return;JSON.stringify(i.getState())!==JSON.stringify(b)&&h(b);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(_)});case"DISPATCH":switch(v.payload.type){case"RESET":return h(y),s===void 0?d==null?void 0:d.init(i.getState()):d==null?void 0:d.init(hm(l.name));case"COMMIT":if(s===void 0){d==null||d.init(i.getState());return}return d==null?void 0:d.init(hm(l.name));case"ROLLBACK":return d_(v.state,_=>{if(s===void 0){h(_),d==null||d.init(i.getState());return}h(_[s]),d==null||d.init(hm(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return d_(v.state,_=>{if(s===void 0){h(_);return}JSON.stringify(i.getState())!==JSON.stringify(_[s])&&h(_[s])});case"IMPORT_STATE":{const{nextLiftedState:_}=v.payload,b=(w=_.computedStates.slice(-1)[0])==null?void 0:w.state;if(!b)return;h(s===void 0?b:b[s]),d==null||d.send(null,_);return}case"PAUSE_RECORDING":return m=!m}return}}),y},d_=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function Yve(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l,t==null?void 0:t.reviver),s=(o=n.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,t==null?void 0:t.replacer)),removeItem:i=>n.removeItem(i)}}const lf=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return lf(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return lf(r)(n)}}}},Jve=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:w=>w,version:0,merge:(w,_)=>({..._,...w}),...t},a=!1;const s=new Set,l=new Set;let c;try{c=o.getStorage()}catch{}if(!c)return e((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...w)},r,i);const d=lf(o.serialize),p=()=>{const w=o.partialize({...r()});let _;const b=d({state:w,version:o.version}).then(S=>c.setItem(o.name,S)).catch(S=>{_=S});if(_)throw _;return b},m=i.setState;i.setState=(w,_)=>{m(w,_),p()};const h=e((...w)=>{n(...w),p()},r,i);let y;const v=()=>{var w;if(!c)return;a=!1,s.forEach(b=>b(r()));const _=((w=o.onRehydrateStorage)==null?void 0:w.call(o,r()))||void 0;return lf(c.getItem.bind(c))(o.name).then(b=>{if(b)return o.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var S;return y=o.merge(b,(S=r())!=null?S:h),n(y,!0),p()}).then(()=>{_==null||_(y,void 0),a=!0,l.forEach(b=>b(y))}).catch(b=>{_==null||_(void 0,b)})};return i.persist={setOptions:w=>{o={...o,...w},w.getStorage&&(c=w.getStorage())},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>v(),hasHydrated:()=>a,onHydrate:w=>(s.add(w),()=>{s.delete(w)}),onFinishHydration:w=>(l.add(w),()=>{l.delete(w)})},v(),y||h},Xve=(e,t)=>(n,r,i)=>{let o={storage:Yve(()=>localStorage),partialize:v=>v,version:0,merge:(v,w)=>({...w,...v}),...t},a=!1;const s=new Set,l=new Set;let c=o.storage;if(!c)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...v)},r,i);const d=()=>{const v=o.partialize({...r()});return c.setItem(o.name,{state:v,version:o.version})},p=i.setState;i.setState=(v,w)=>{p(v,w),d()};const m=e((...v)=>{n(...v),d()},r,i);let h;const y=()=>{var v,w;if(!c)return;a=!1,s.forEach(b=>{var S;return b((S=r())!=null?S:m)});const _=((w=o.onRehydrateStorage)==null?void 0:w.call(o,(v=r())!=null?v:m))||void 0;return lf(c.getItem.bind(c))(o.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var S;return h=o.merge(b,(S=r())!=null?S:m),n(h,!0),d()}).then(()=>{_==null||_(h,void 0),h=r(),a=!0,l.forEach(b=>b(h))}).catch(b=>{_==null||_(void 0,b)})};return i.persist={setOptions:v=>{o={...o,...v},v.storage&&(c=v.storage)},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>a,onHydrate:v=>(s.add(v),()=>{s.delete(v)}),onFinishHydration:v=>(l.add(v),()=>{l.delete(v)})},o.skipHydration||y(),h||m},Qve=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?Jve(e,t):Xve(e,t),Vo=Kve()(v2(Qve((e,t)=>({messageHistory:{},addMessageToHistory:({userId:n,message:r})=>e(i=>({...i,messageHistory:{...i.messageHistory,[n]:[r,...(i.messageHistory[n]??[]).slice(0,100)]}})),clientMode:"",setClientMode:n=>{const{clearAll:r,clientMode:i}=t();i!==n&&r(),e(o=>({...o,clientMode:n}))},setUser:n=>e(r=>({...r,user:n})),setConversationId:n=>e(r=>({...r,conversationId:n})),clearAll:()=>{e(n=>({...n,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),b2=C.createContext(null),ebe=e=>{const t={theme:{},configuration:{},messages:[],connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},closeWindow:()=>{},messageContainerRef:{current:null},isTyping:!1,allowFileUpload:!1,conversationId:void 0},n=e==null?void 0:e.client,r=e==null?void 0:e.conversationId,i=Vo.getState().setClientMode,o=Vo.getState().setConversationId;return n&&i(n.mode),C.useEffect(()=>{r&&o(r)},[r]),l2()(v2((a,s)=>{const l=p=>a(m=>({...m,messages:[...m.messages??[],p]})),c=p=>a(m=>({...m,messages:p})),d=Vo.getState().addMessageToHistory;return{...t,...e,eventEmitter:Ire,client:n,sendFile:p=>s().client.sendFile(p),sendTextMessage:async p=>{const m=s().client;m&&await m.sendMessage(p),l({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:p}}}),m!=null&&m.userId&&d({message:p,userId:m.userId})},on:(p,m)=>{const h=s().client;return h?h.on(p,m):()=>{}},getClientId:()=>{var p;return(p=s().client)==null?void 0:p.clientId},setState:p=>a(m=>({...m,...p})),setTheme:p=>a(m=>({...m,theme:p})),setMessages:c,setConfiguration:p=>a(m=>({...m,configuration:p})),setIsTyping:p=>a(m=>({...m,isTyping:p})),addMessage:l,setConnected:p=>a(m=>({...m,connected:p})),restartConversation:async()=>{const p=s().client,m=s().setMessages;p&&(await p.newConversation(),m([]))}}},{name:"webchatStore"}))};function it(e){const t=C.useContext(b2);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return y2(t,e)}const tbe=({text:e,buttonValue:t,type:n,styles:r,variant:i,groupId:o,reusable:a,...s})=>{const l=it(b=>b.eventEmitter),c=it(b=>b.sendTextMessage),d=it(b=>b.isReadOnly),[p,m]=C.useState(!1),[h,y]=C.useState(!1),[v,w]=C.useState(!1);C.useEffect(()=>{if(o)return l.on(`button-group-${o}-click`,()=>{y(!0),a||w(!0)})},[l,o,a]);function _(){o&&l.emit(`button-group-${o}-click`),m(!0),a||w(!0),i!=="link"&&c(t)}return X.jsx(nbe,{...s,variant:i,onClick:_,disabled:v||d,"data-activated":p?"":void 0,"data-group-activated":h?"":void 0,"data-type":i,value:t,...r==null?void 0:r[n],children:e})},nbe=e=>{if(e.variant==="link"){const{value:r,variant:i,...o}=e;return X.jsx("a",{...o,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return X.jsx("button",{type:"button",...n})},rbe=C.forwardRef(({block:e,styles:t,type:n,...r},i)=>X.jsx("div",{...r,...t==null?void 0:t[n],ref:i,children:X.jsx(fl,{styles:t,block:e})})),_2=C.createContext(null);function w2(){const e=C.useContext(_2);if(!e)throw new Error("useComposerContext must be used within a Message");return e}const x2=C.createContext(null);function ibe(){const e=C.useContext(x2);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const S2=C.createContext(null);function E2(){const e=C.useContext(S2);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}C.createContext(null);const obe=C.forwardRef(({url:e,type:t,styles:n,orientation:r="auto",...i},o)=>{var m,h;const a=C.useId(),{setIsLoading:s}=ibe(),[l,c]=C.useState(r),[d,p]=C.useState(!1);return C.useLayoutEffect(()=>{s(y=>[...y,a])},[]),C.useEffect(()=>{e&&l==="auto"&&sge(e).then(({width:y,height:v})=>{c(abe(y,v)),s(w=>w.filter(_=>_!==a))})},[e]),X.jsxs(X.Fragment,{children:[d?null:X.jsx("div",{"data-orientation":l,...(m=n==null?void 0:n[t])==null?void 0:m.placeholder}),X.jsx("img",{"data-orientation":l,"data-loaded":d,...i,...(h=n==null?void 0:n[t])==null?void 0:h.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{p(!0)}})]})});function abe(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((o,a)=>Math.abs(n[a]-r)<Math.abs(n[o]-r)?a:o)}const sbe=C.forwardRef(({url:e,type:t,styles:n,...r},i)=>X.jsx("div",{children:X.jsx("video",{...r,controls:!0,src:e,...n==null?void 0:n[t],ref:i})})),ube=C.forwardRef(({url:e,type:t,styles:n,...r},i)=>X.jsx("div",{children:X.jsx("audio",{...r,controls:!0,src:e,...n==null?void 0:n[t],ref:i})}));function lbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 01.75.75v10.638l3.96-4.158a.75.75 0 111.08 1.04l-5.25 5.5a.75.75 0 01-1.08 0l-5.25-5.5a.75.75 0 111.08-1.04l3.96 4.158V3.75A.75.75 0 0110 3z",clipRule:"evenodd"}))}const cbe=z.forwardRef(lbe);function fbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 01-9.201 2.466l-.312-.311h2.433a.75.75 0 000-1.5H3.989a.75.75 0 00-.75.75v4.242a.75.75 0 001.5 0v-2.43l.31.31a7 7 0 0011.712-3.138.75.75 0 00-1.449-.39zm1.23-3.723a.75.75 0 00.219-.53V2.929a.75.75 0 00-1.5 0V5.36l-.31-.31A7 7 0 003.239 8.188a.75.75 0 101.448.389A5.5 5.5 0 0113.89 6.11l.311.31h-2.432a.75.75 0 000 1.5h4.243a.75.75 0 00.53-.219z",clipRule:"evenodd"}))}const dbe=z.forwardRef(fbe);function pbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm-.75-4.75a.75.75 0 001.5 0V8.66l1.95 2.1a.75.75 0 101.1-1.02l-3.25-3.5a.75.75 0 00-1.1 0L6.2 9.74a.75.75 0 101.1 1.02l1.95-2.1v4.59z",clipRule:"evenodd"}))}const hbe=z.forwardRef(pbe);function mbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"}))}const ybe=z.forwardRef(mbe);function gbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 003 3.5v13A1.5 1.5 0 004.5 18h11a1.5 1.5 0 001.5-1.5V7.621a1.5 1.5 0 00-.44-1.06l-4.12-4.122A1.5 1.5 0 0011.378 2H4.5zm4.75 6.75a.75.75 0 011.5 0v2.546l.943-1.048a.75.75 0 011.114 1.004l-2.25 2.5a.75.75 0 01-1.114 0l-2.25-2.5a.75.75 0 111.114-1.004l.943 1.048V8.75z",clipRule:"evenodd"}))}const vbe=z.forwardRef(gbe);function bbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M9.69 18.933l.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 00.281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 103 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 002.273 1.765 11.842 11.842 0 00.976.544l.062.029.018.008.006.003zM10 11.25a2.25 2.25 0 100-4.5 2.25 2.25 0 000 4.5z",clipRule:"evenodd"}))}const _be=z.forwardRef(bbe);function wbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{d:"M10.75 4.75a.75.75 0 00-1.5 0v4.5h-4.5a.75.75 0 000 1.5h4.5v4.5a.75.75 0 001.5 0v-4.5h4.5a.75.75 0 000-1.5h-4.5v-4.5z"}))}const xbe=z.forwardRef(wbe),Sbe=C.forwardRef(({type:e,latitude:t,longitude:n,title:r,styles:i,...o},a)=>{var l,c,d;const s=`https://www.google.com/maps/search/?api=1&query=${t},${n}`;return X.jsxs("a",{...o,...(l=i==null?void 0:i[e])==null?void 0:l.container,href:s,type:"_blank",rel:"noopener",ref:a,children:[X.jsx("p",{...(c=i==null?void 0:i[e])==null?void 0:c.title,children:r}),X.jsx(_be,{...(d=i==null?void 0:i[e])==null?void 0:d.icon})]})}),Ebe=C.forwardRef(({blocks:e,styles:t,type:n,horizontalAlignment:r,verticalAlignment:i,...o},a)=>X.jsx("div",{"data-horizontal":r,"data-vertical":i,...o,...t==null?void 0:t[n],ref:a,children:e.map((s,l)=>X.jsx(fl,{styles:t,block:s},l))})),Abe=C.forwardRef(({blocks:e,styles:t,type:n,horizontalAlignment:r,verticalAlignment:i,...o},a)=>X.jsx("div",{"data-horizontal":r,"data-vertical":i,...o,...t==null?void 0:t[n],ref:a,children:e.map((s,l)=>X.jsx(fl,{styles:t,block:s},l))}));function Cbe(e){return Object.prototype.toString.call(e)==="[object Object]"}function A2(e){return Cbe(e)||Array.isArray(e)}function Obe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function p_(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==o?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!A2(s)||!A2(l)?s===l:p_(s,l)})}function C2(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function Tbe(e,t){if(e.length!==t.length)return!1;const n=C2(e),r=C2(t);return n.every((i,o)=>{const a=r[o];return p_(i,a)})}function h_(e){return typeof e=="number"}function O2(e){return typeof e=="string"}function m_(e){return typeof e=="boolean"}function T2(e){return Object.prototype.toString.call(e)==="[object Object]"}function Nn(e){return Math.abs(e)}function y_(e){return Math.sign(e)}function mm(e,t){return Nn(e-t)}function $be(e,t){if(e===0||t===0||Nn(e)<=Nn(t))return 0;const n=mm(Nn(e),Nn(t));return Nn(n/e)}function cf(e){return gm(e).map(Number)}function Ko(e){return e[ym(e)]}function ym(e){return Math.max(0,e.length-1)}function gm(e){return Object.keys(e)}function $2(e,t){return[e,t].reduce((n,r)=>(gm(r).forEach(i=>{const o=n[i],a=r[i],s=T2(o)&&T2(a);n[i]=s?$2(o,a):a}),n),{})}function k2(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function kbe(e,t){const n={start:r,center:i,end:o};function r(){return 0}function i(c){return o(c)/2}function o(c){return t-c}function a(){return t*Number(e)}function s(c){return h_(e)?a():n[e](c)}return{measure:s}}function Ibe(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),o=l();function a(d){const{width:p,height:m}=d;return n==="x"?p:m}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function l(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:o,measureSize:a}}function ka(e,t){const n=Nn(e-t);function r(c){return c<e}function i(c){return c>t}function o(c){return r(c)||i(c)}function a(c){return o(c)?r(c)?e:t:c}function s(c){return n?c-n*Math.ceil((c-t)/n):c}return{length:n,max:t,min:e,constrain:a,reachedAny:o,reachedMax:i,reachedMin:r,removeOffset:s}}function I2(e,t,n){const{constrain:r}=ka(0,e),i=e+1;let o=a(t);function a(m){return n?Nn((i+m)%i):r(m)}function s(){return o}function l(m){return o=a(m),p}function c(m){return d().set(s()+m)}function d(){return I2(e,s(),n)}const p={get:s,set:l,add:c,clone:d};return p}function Pbe(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function ff(){let e=[];function t(i,o,a,s={passive:!0}){return i.addEventListener(o,a,s),e.push(()=>i.removeEventListener(o,a,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function Rbe(e,t,n,r,i,o,a,s,l,c,d,p,m,h,y,v,w,_,b){const{cross:S}=e,A=["INPUT","SELECT","TEXTAREA"],E={passive:!1},T=ff(),N=ff(),L=ka(50,225).constrain(y.measure(20)),F={mouse:300,touch:400},j={mouse:500,touch:600},H=v?43:25;let re=!1,Q=0,G=0,V=!1,q=!1,Y=!1,ne=!1;function ce(Ae,Fe){if(!Fe)return;function $e(lt){(m_(Fe)||Fe(Ae,lt))&&qe(lt)}const Ze=n;T.add(Ze,"dragstart",lt=>lt.preventDefault(),E).add(Ze,"touchmove",()=>{},E).add(Ze,"touchend",()=>{}).add(Ze,"touchstart",$e).add(Ze,"mousedown",$e).add(Ze,"touchcancel",Je).add(Ze,"contextmenu",Je).add(Ze,"click",rt,!0)}function P(){T.clear(),N.clear()}function ue(){const Ae=ne?r:n;N.add(Ae,"touchmove",Me,E).add(Ae,"touchend",Je).add(Ae,"mousemove",Me,E).add(Ae,"mouseup",Je)}function Oe(Ae){const Fe=Ae.nodeName||"";return A.includes(Fe)}function M(){return(v?j:F)[ne?"mouse":"touch"]}function Ne(Ae,Fe){const $e=m.add(y_(Ae)*-1),Ze=p.byDistance(Ae,!v).distance;return v||Nn(Ae)<L?Ze:_&&Fe?Ze*.5:p.byIndex($e.get(),0).distance}function qe(Ae){const Fe=k2(Ae,i);ne=Fe,!(Fe&&Ae.button!==0)&&(Oe(Ae.target)||(Y=v&&Fe&&!Ae.buttons&&re,re=mm(o.get(),s.get())>=2,V=!0,a.pointerDown(Ae),d.useFriction(0).useDuration(0),o.set(s),ue(),Q=a.readPoint(Ae),G=a.readPoint(Ae,S),h.emit("pointerDown")))}function Me(Ae){const Fe=a.readPoint(Ae),$e=a.readPoint(Ae,S),Ze=mm(Fe,Q),lt=mm($e,G);if(!q&&!ne&&(!Ae.cancelable||(q=Ze>lt,!q)))return Je(Ae);const K=a.pointerMove(Ae);Ze>w&&(Y=!0),d.useFriction(.3).useDuration(1),l.start(),o.add(t.apply(K)),Ae.preventDefault()}function Je(Ae){const $e=p.byDistance(0,!1).index!==m.get(),Ze=a.pointerUp(Ae)*M(),lt=Ne(t.apply(Ze),$e),K=$be(Ze,lt),pe=H-10*K,Te=b+K/50;q=!1,V=!1,N.clear(),d.useDuration(pe).useFriction(Te),c.distance(lt,!v),ne=!1,h.emit("pointerUp")}function rt(Ae){Y&&(Ae.stopPropagation(),Ae.preventDefault())}function Ke(){return V}return{init:ce,pointerDown:Ke,destroy:P}}function Dbe(e,t){let r,i;function o(p){return p.timeStamp}function a(p,m){const y=`client${(m||e.scroll)==="x"?"X":"Y"}`;return(k2(p,t)?p:p.touches[0])[y]}function s(p){return r=p,i=p,a(p)}function l(p){const m=a(p)-a(i),h=o(p)-o(r)>170;return i=p,h&&(r=p),m}function c(p){if(!r||!i)return 0;const m=a(i)-a(r),h=o(p)-o(r),y=o(p)-o(i)>170,v=m/h;return h&&!y&&Nn(v)>.1?v:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:a}}function Nbe(e){function t(r){return e*(r/100)}return{measure:t}}function Mbe(e,t,n,r,i){let o,a,s=[],l=!1;function c(h){return i.measureSize(h.getBoundingClientRect())}function d(h,y){if(!y)return;a=c(e),s=r.map(c);function v(_){for(const b of _){const S=b.target===e,A=r.indexOf(b.target),E=S?a:s[A],T=c(S?e:r[A]);if(E!==T){n.requestAnimationFrame(()=>{h.reInit(),t.emit("resize")});break}}}o=new ResizeObserver(_=>{l||(m_(y)||y(h,_))&&v(_)}),[e].concat(r).forEach(_=>o.observe(_))}function p(){o&&o.disconnect(),l=!0}return{init:d,destroy:p}}function jbe(e,t,n,r){let i=!0,o=0,a=0,s=n,l=r,c=e.get(),d=0;function p(){const E=t.get()-e.get(),T=!s;let N=0;return T?(o=0,e.set(t),N=E):(o+=E/s,o*=l,c+=o,e.add(o),N=c-d),a=y_(N),d=c,i=Nn(E)<.001,A}function m(){return i}function h(){return s}function y(){return a}function v(){return o}function w(){return b(n)}function _(){return S(r)}function b(E){return s=E,A}function S(E){return l=E,A}const A={direction:y,duration:h,velocity:v,seek:p,settled:m,useBaseFriction:_,useBaseDuration:w,useFriction:S,useDuration:b};return A}function Lbe(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=ka(.1,.99);let l=!1;function c(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function d(h){if(!c())return;const y=e.reachedMin(t.get())?"min":"max",v=Nn(e[y]-t.get()),w=n.get()-t.get(),_=s.constrain(v/a);n.subtract(w*_),!h&&Nn(w)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function p(h){l=!h}return{constrain:d,toggleActive:p}}function Fbe(e,t,n,r){const i=ka(-t+e,n[0]),o=l(),a=c();function s(){const p=o[0],m=Ko(o),h=o.lastIndexOf(p),y=o.indexOf(m)+1;return ka(h,y)}function l(){return n.map(i.constrain).map(p=>parseFloat(p.toFixed(3)))}function c(){if(t<=e)return[i.max];if(r==="keepSnaps")return o;const{min:p,max:m}=s();return o.slice(p,m)}return{snapsContained:a}}function qbe(e,t,n){const r=t[0],i=n?r-e:Ko(t);return{limit:ka(i,r)}}function Ube(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=ka(o,a);function c(m){return m===1?l(n.get()):m===-1?s(n.get()):!1}function d(m){if(!c(m))return;const h=e*(m*-1);r.forEach(y=>y.add(h))}return{loop:d}}function Bbe(e){const{max:t,length:n}=e;function r(o){return(o-t)/-n}return{get:r}}function zbe(e,t,n,r,i,o,a){const{startEdge:s,endEdge:l}=e,{groupSlides:c}=o,d=h().map(t.measure),p=y(),m=v();function h(){return c(r).map(_=>Ko(_)[l]-_[0][s]).map(Nn)}function y(){return r.map(_=>n[s]-_[s]).map(_=>-Nn(_))}function v(){const b=Ko(p)-Ko(i);return c(p).map(S=>S[0]).map((S,A,E)=>{const T=!A,N=A===ym(E);return a&&T?0:a&&N?b:S+d[A]})}return{snaps:p,snapsAligned:m}}function Zbe(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(y){return y.concat().sort((v,w)=>Nn(v)-Nn(w))[0]}function c(y){const v=e?a(y):s(y),w=t.map(b=>b-v).map(b=>d(b,0)).map((b,S)=>({diff:b,index:S})).sort((b,S)=>Nn(b.diff)-Nn(S.diff)),{index:_}=w[0];return{index:_,distance:v}}function d(y,v){const w=[y,y+n,y-n];if(!e)return w[0];if(!v)return l(w);const _=w.filter(b=>y_(b)===v);return l(_)}function p(y,v){const w=t[y]-i.get(),_=d(w,v);return{index:y,distance:_}}function m(y,v){const w=i.get()+y,{index:_,distance:b}=c(w),S=!e&&o(w);if(!v||S)return{index:_,distance:y};const A=t[_]-b,E=y+d(A,0);return{index:_,distance:E}}return{byDistance:m,byIndex:p,shortcut:d}}function Hbe(e,t,n,r,i,o,a){function s(p){const m=p.distance,h=p.index!==t.get();o.add(m),m&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(n.set(t.get()),t.set(p.index),a.emit("select"))}function l(p,m){const h=r.byDistance(p,m);s(h)}function c(p,m){const h=t.clone().set(p),y=r.byIndex(h.get(),m);s(y)}return{distance:l,index:c}}function vm(e){let t=e;function n(){return t}function r(l){t=a(l)}function i(l){t+=a(l)}function o(l){t-=a(l)}function a(l){return h_(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function P2(e,t,n){const r=e.scroll==="x"?a:s,i=n.style;let o=!1;function a(m){return`translate3d(${m}px,0px,0px)`}function s(m){return`translate3d(0px,${m}px,0px)`}function l(m){o||(i.transform=r(t.apply(m)))}function c(m){o=!m}function d(){o||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:d,to:l,toggleActive:c}}function Wbe(e,t,n,r,i,o,a,s,l){const c=cf(i),d=cf(i).reverse(),p=v().concat(w());function m(E,T){return E.reduce((N,L)=>N-i[L],T)}function h(E,T){return E.reduce((N,L)=>m(N,T)>0?N.concat([L]):N,[])}function y(E,T){const N=T==="start",L=N?-r:r,F=a.findSlideBounds([L]);return E.map(j=>{const H=N?0:-r,re=N?r:0,G=F.filter(V=>V.index===j)[0][N?"end":"start"];return{index:j,slideLocation:vm(-1),translate:P2(e,t,l[j]),target:()=>s.get()>G?H:re}})}function v(){const E=o[0]-1,T=h(d,E);return y(T,"end")}function w(){const E=n-o[0]-1,T=h(c,E);return y(T,"start")}function _(){return p.every(({index:E})=>{const T=c.filter(N=>N!==E);return m(T,n)<=.1})}function b(){p.forEach(E=>{const{target:T,translate:N,slideLocation:L}=E,F=T();F!==L.get()&&(N.to(F),L.set(F))})}function S(){p.forEach(E=>E.translate.clear())}return{canLoop:_,clear:S,loop:b,loopPoints:p}}function Vbe(e,t){let n,r=!1;function i(s,l){if(!l)return;function c(d){for(const p of d)if(p.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(d=>{r||(m_(l)||l(s,d))&&c(d)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:i,destroy:o}}function Kbe(e,t,n,r,i,o,a){const{removeOffset:s,constrain:l}=i,c=.5,d=o?[0,t,-t]:[0],p=h(d,a);function m(w){const _=w||0;return n.map(b=>ka(c,b-c).constrain(b*_))}function h(w,_){const b=w||d,S=m(_);return b.reduce((A,E)=>{const T=r.map((N,L)=>({start:N-n[L]+S[L]+E,end:N+e-S[L]+E,index:L}));return A.concat(T)},[])}function y(w,_){const b=o?s(w):l(w);return(_||p).reduce((A,E)=>{const{index:T,start:N,end:L}=E,F=A.includes(T),j=N<b&&L>b;return!F&&j?A.concat([T]):A},[])}return{check:y,findSlideBounds:h}}function Gbe(e,t,n,r,i,o){const{measureSize:a,startEdge:s,endEdge:l}=e,c=n[0]&&i,d=y(),p=v(),m=n.map(a),h=w();function y(){if(!c)return 0;const b=n[0];return Nn(t[s]-b[s])}function v(){if(!c)return 0;const b=o.getComputedStyle(Ko(r));return parseFloat(b.getPropertyValue(`margin-${l}`))}function w(){return n.map((b,S,A)=>{const E=!S,T=S===ym(A);return E?m[S]+d:T?m[S]+p:A[S+1][s]-b[s]}).map(Nn)}return{slideSizes:m,slideSizesWithGaps:h}}function Ybe(e,t,n){const r=h_(n);function i(l,c){return cf(l).filter(d=>d%c===0).map(d=>l.slice(d,d+c))}function o(l){return cf(l).reduce((c,d)=>{const m=t.slice(Ko(c),d+1).reduce((h,y)=>h+y,0);return!d||m>e?c.concat(d):c},[]).map((c,d,p)=>l.slice(c,p[d+1]))}function a(l){return r?i(l,n):o(l)}return{groupSlides:a}}function Jbe(e,t,n,r,i,o,a,s){const{align:l,axis:c,direction:d,startIndex:p,inViewThreshold:m,loop:h,duration:y,dragFree:v,dragThreshold:w,slidesToScroll:_,skipSnaps:b,containScroll:S}=o,A=t.getBoundingClientRect(),E=n.map(Te=>Te.getBoundingClientRect()),T=Pbe(d),N=Ibe(c,d),L=N.measureSize(A),F=Nbe(L),j=kbe(l,L),H=!h&&!!S,re=h||!!S,{slideSizes:Q,slideSizesWithGaps:G}=Gbe(N,A,E,n,re,i),V=Ybe(L,G,_),{snaps:q,snapsAligned:Y}=zbe(N,j,A,E,G,V,H),ne=-Ko(q)+Ko(G),{snapsContained:ce}=Fbe(L,ne,Y,S),P=H?ce:Y,{limit:ue}=qbe(ne,P,h),Oe=I2(ym(P),p,h),M=Oe.clone(),Ne=cf(n),qe=({dragHandler:Te,scrollBody:Se,scrollBounds:et,eventHandler:Ue,animation:ot,options:{loop:It}})=>{const mt=Te.pointerDown();It||et.constrain(mt);const ie=Se.seek().settled();ie&&!mt&&(ot.stop(),Ue.emit("settle")),ie||Ue.emit("scroll")},Me=({scrollBody:Te,translate:Se,location:et,offsetLocation:Ue,scrollLooper:ot,slideLooper:It,options:{loop:mt}},ie)=>{const ge=Te.velocity();Ue.set(et.get()-ge+ge*ie),mt&&(ot.loop(Te.direction()),It.loop()),Se.to(Ue.get())},Je={start:()=>s.start(pe),stop:()=>s.stop(pe),update:()=>qe(pe),render:Te=>Me(pe,Te)},rt=.68,Ke=P[Oe.get()],Pe=vm(Ke),Ae=vm(Ke),Fe=vm(Ke),$e=jbe(Pe,Fe,y,rt),Ze=Zbe(h,P,ne,ue,Fe),lt=Hbe(Je,Oe,M,Ze,$e,Fe,a),K=Kbe(L,ne,Q,q,ue,h,m),pe={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:A,slideRects:E,animation:Je,axis:N,direction:T,dragHandler:Rbe(N,T,e,r,i,Fe,Dbe(N,i),Pe,Je,lt,$e,Ze,Oe,a,F,v,w,b,rt),eventStore:ff(),percentOfView:F,index:Oe,indexPrevious:M,limit:ue,location:Pe,offsetLocation:Ae,options:o,resizeHandler:Mbe(t,a,i,n,N),scrollBody:$e,scrollBounds:Lbe(ue,Pe,Fe,$e,F),scrollLooper:Ube(ne,ue,Ae,[Pe,Ae,Fe]),scrollProgress:Bbe(ue),scrollSnaps:P,scrollTarget:Ze,scrollTo:lt,slideLooper:Wbe(N,T,L,ne,G,P,K,Ae,n),slidesHandler:Vbe(t,a),slidesInView:K,slideIndexes:Ne,slidesToScroll:V,target:Fe,translate:P2(N,T,t)};return pe}function Xbe(e){const t=16.666666666666668;let n=[],r=null,i=0,o=0;function a(p){r||(r=p);const m=p-r;for(r=p,i+=m;i>=t;)n.forEach(({animation:y})=>y.update()),i-=t;const h=Nn(i/t);n.forEach(({animation:y})=>y.render(h)),o&&e.requestAnimationFrame(a)}function s(p){n.includes(p)||n.push(p),!o&&(o=e.requestAnimationFrame(a))}function l(p){n=n.filter(m=>m!==p),!n.length&&(e.cancelAnimationFrame(o),r=null,i=0,o=0)}function c(){r=null,i=0}return{start:s,stop:l,reset:c,window:e}}function Qbe(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function i(l){return r(l).forEach(c=>c(t,l)),s}function o(l,c){return e[l]=r(l).concat([c]),s}function a(l,c){return e[l]=r(l).filter(d=>d!==c),s}const s={init:n,emit:i,off:a,on:o};return s}const e0e={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function t0e(e){function t(o,a){return $2(o,a||{})}function n(o){const a=o.breakpoints||{},s=gm(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,c)=>t(l,c),{});return t(o,s)}function r(o){return o.map(a=>gm(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function n0e(e){let t=[];function n(o,a){return t=o.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),o.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(o=>o.destroy())}return{init:n,destroy:r}}function il(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=t0e(i),a=n0e(o),s=ff(),l=ff(),c=Qbe(),{animationRealms:d}=il,{mergeOptions:p,optionsAtMedia:m,optionsMediaQueries:h}=o,{on:y,off:v,emit:w}=c,_=Q;let b=!1,S,A=p(e0e,il.globalOptions),E=p(A),T=[],N,L,F;function j(){const{container:$e,slides:Ze}=E;L=(O2($e)?e.querySelector($e):$e)||e.children[0];const K=O2(Ze)?L.querySelectorAll(Ze):Ze;F=[].slice.call(K||L.children)}function H($e,Ze){const lt=Jbe(e,L,F,r,i,$e,c,Ze);if($e.loop&&!lt.slideLooper.canLoop()){const K=Object.assign({},$e,{loop:!1});return H(K,Ze)}return lt}function re($e,Ze){if(b)return;const lt=d.find(pe=>pe.window===i),K=lt||Xbe(i);lt||d.push(K),A=p(A,$e),E=m(A),T=Ze||T,j(),S=H(E,K),h([A,...T.map(({options:pe})=>pe)]).forEach(pe=>s.add(pe,"change",Q)),E.active&&(S.translate.to(S.location.get()),S.eventHandler.init(Fe),S.resizeHandler.init(Fe,E.watchResize),S.slidesHandler.init(Fe,E.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&K.reset()}),S.options.loop&&S.slideLooper.loop(),L.offsetParent&&F.length&&S.dragHandler.init(Fe,E.watchDrag),N=a.init(T,Fe))}function Q($e,Ze){const lt=qe();G(),re(p({startIndex:lt},$e),Ze),c.emit("reInit")}function G(){S.dragHandler.destroy(),S.animation.stop(),S.eventStore.clear(),S.translate.clear(),S.slideLooper.clear(),S.resizeHandler.destroy(),S.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function V(){b||(b=!0,s.clear(),G(),c.emit("destroy"))}function q($e){const Ze=S[$e?"target":"location"].get(),lt=E.loop?"removeOffset":"constrain";return S.slidesInView.check(S.limit[lt](Ze))}function Y($e){const Ze=q($e);return S.slideIndexes.filter(lt=>!Ze.includes(lt))}function ne($e,Ze,lt){!E.active||b||(S.scrollBody.useBaseFriction().useDuration(Ze?0:E.duration),S.scrollTo.index($e,lt||0))}function ce($e){const Ze=S.index.add(1).get();ne(Ze,$e===!0,-1)}function P($e){const Ze=S.index.add(-1).get();ne(Ze,$e===!0,1)}function ue(){return S.index.add(1).get()!==qe()}function Oe(){return S.index.add(-1).get()!==qe()}function M(){return S.scrollSnaps.map(S.scrollProgress.get)}function Ne(){return S.scrollProgress.get(S.location.get())}function qe(){return S.index.get()}function Me(){return S.indexPrevious.get()}function Je(){return N}function rt(){return S}function Ke(){return e}function Pe(){return L}function Ae(){return F}const Fe={canScrollNext:ue,canScrollPrev:Oe,containerNode:Pe,internalEngine:rt,destroy:V,off:v,on:y,emit:w,plugins:Je,previousScrollSnap:Me,reInit:_,rootNode:Ke,scrollNext:ce,scrollPrev:P,scrollProgress:Ne,scrollSnapList:M,scrollTo:ne,selectedScrollSnap:qe,slideNodes:Ae,slidesInView:q,slidesNotInView:Y};return re(t,n),setTimeout(()=>c.emit("init"),0),Fe}il.animationRealms=[],il.globalOptions=void 0;function g_(e={},t=[]){const n=C.useRef(e),r=C.useRef(t),[i,o]=C.useState(),[a,s]=C.useState(),l=C.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return C.useEffect(()=>{if(Obe()&&a){il.globalOptions=g_.globalOptions;const c=il(a,n.current,r.current);return o(c),()=>c.destroy()}else o(void 0)},[a,o]),C.useEffect(()=>{p_(n.current,e)||(n.current=e,l())},[e,l]),C.useEffect(()=>{Tbe(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}g_.globalOptions=void 0;function r0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z",clipRule:"evenodd"}))}const i0e=z.forwardRef(r0e);function o0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z",clipRule:"evenodd"}))}const a0e=z.forwardRef(o0e);function s0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0016.5 9h-1.875a1.875 1.875 0 01-1.875-1.875V5.25A3.75 3.75 0 009 1.5H5.625zM7.5 15a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5A.75.75 0 017.5 15zm.75 2.25a.75.75 0 000 1.5H12a.75.75 0 000-1.5H8.25z",clipRule:"evenodd"}),z.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0114.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 013.434 1.279 9.768 9.768 0 00-6.963-6.963z"}))}const u0e=z.forwardRef(s0e);function l0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z"}),z.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z"}))}const c0e=z.forwardRef(l0e);function f0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 00-.945-5.003 12.754 12.754 0 01-4.339 2.708 18.991 18.991 0 01-.214 4.772 17.165 17.165 0 005.498-2.477zM14.634 15.55a17.324 17.324 0 00.332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 00.332 4.647 17.385 17.385 0 005.268 0zM9.772 17.119a18.963 18.963 0 004.456 0A17.182 17.182 0 0112 21.724a17.18 17.18 0 01-2.228-4.605zM7.777 15.23a18.87 18.87 0 01-.214-4.774 12.753 12.753 0 01-4.34-2.708 9.711 9.711 0 00-.944 5.004 17.165 17.165 0 005.498 2.477zM21.356 14.752a9.765 9.765 0 01-7.478 6.817 18.64 18.64 0 001.988-4.718 18.627 18.627 0 005.49-2.098zM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 001.988 4.718 9.765 9.765 0 01-7.478-6.816zM13.878 2.43a9.755 9.755 0 016.116 3.986 11.267 11.267 0 01-3.746 2.504 18.63 18.63 0 00-2.37-6.49zM12 2.276a17.152 17.152 0 012.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0112 2.276zM10.122 2.43a18.629 18.629 0 00-2.37 6.49 11.266 11.266 0 01-3.746-2.504 9.754 9.754 0 016.116-3.985z"}))}const d0e=z.forwardRef(f0e);function p0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 00-5.25 5.25v3a3 3 0 00-3 3v6.75a3 3 0 003 3h10.5a3 3 0 003-3v-6.75a3 3 0 00-3-3v-3c0-2.9-2.35-5.25-5.25-5.25zm3.75 8.25v-3a3.75 3.75 0 10-7.5 0v3h7.5z",clipRule:"evenodd"}))}const h0e=z.forwardRef(p0e);function m0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 013-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 01-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 006.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 011.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 01-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5z",clipRule:"evenodd"}))}const y0e=z.forwardRef(m0e),g0e=C.forwardRef(({type:e,styles:t,blocks:n},r)=>{const[i,o]=g_({skipSnaps:!0}),[a,s]=C.useState(!0),[l,c]=C.useState(!0),d=C.useCallback(()=>o&&o.scrollPrev(),[o]),p=C.useCallback(()=>o&&o.scrollNext(),[o]),m=t==null?void 0:t[e],h=C.useCallback(y=>{s(!y.canScrollPrev()),c(!y.canScrollNext())},[]);return C.useEffect(()=>{o&&(h(o),o.on("reInit",h),o.on("select",h))},[o,h]),X.jsxs("div",{...m==null?void 0:m.container,"data-container":"carousel",ref:i,children:[X.jsx("div",{ref:r,...m==null?void 0:m.slidesContainer,children:n.map((y,v)=>X.jsx(fl,{styles:t,block:y},v))}),X.jsx(i0e,{...m==null?void 0:m.backButton,"data-disabled":a?"":void 0,onClick:d}),X.jsx(a0e,{...m==null?void 0:m.nextButton,"data-disabled":l?"":void 0,onClick:p})]})}),ol=Math.min,ui=Math.max,bm=Math.round,al=Math.floor,Ia=e=>({x:e,y:e});function R2(e,t,n){return ui(e,ol(t,n))}function _m(e,t){return typeof e=="function"?e(t):e}function df(e){return e.split("-")[0]}function v_(e){return e.split("-")[1]}function D2(e){return e==="x"?"y":"x"}function v0e(e){return e==="y"?"height":"width"}function pf(e){return["top","bottom"].includes(df(e))?"y":"x"}function b0e(e){return D2(pf(e))}function _0e(e){return{top:0,right:0,bottom:0,left:0,...e}}function w0e(e){return typeof e!="number"?_0e(e):{top:e,right:e,bottom:e,left:e}}function wm(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Pa(e){return N2(e)?(e.nodeName||"").toLowerCase():"#document"}function li(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Go(e){var t;return(t=(N2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function N2(e){return e instanceof Node||e instanceof li(e).Node}function Fn(e){return e instanceof Element||e instanceof li(e).Element}function Ar(e){return e instanceof HTMLElement||e instanceof li(e).HTMLElement}function b_(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof li(e).ShadowRoot}function hf(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ci(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function x0e(e){return["table","td","th"].includes(Pa(e))}function __(e){const t=w_(),n=ci(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function S0e(e){let t=Ls(e);for(;Ar(t)&&!mf(t);){if(__(t))return t;t=Ls(t)}return null}function w_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mf(e){return["html","body","#document"].includes(Pa(e))}function ci(e){return li(e).getComputedStyle(e)}function xm(e){return Fn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ls(e){if(Pa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||b_(e)&&e.host||Go(e);return b_(t)?t.host:t}function M2(e){const t=Ls(e);return mf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ar(t)&&hf(t)?t:M2(t)}function Ra(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=M2(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=li(i);return o?t.concat(a,a.visualViewport||[],hf(i)?i:[],a.frameElement&&n?Ra(a.frameElement):[]):t.concat(i,Ra(i,[],n))}function Da(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function Yr(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&b_(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function j2(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function E0e(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function L2(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(j2())||t.test(E0e()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function F2(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function q2(){return/apple/i.test(navigator.vendor)}function A0e(){return j2().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function U2(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function C0e(e){return"nativeEvent"in e}function O0e(e){return e.matches("html,body")}function Zi(e){return(e==null?void 0:e.ownerDocument)||document}function x_(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function B2(e){return"composedPath"in e?e.composedPath()[0]:e.target}const T0e="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function z2(e){return Ar(e)&&e.matches(T0e)}function hr(e){e.preventDefault(),e.stopPropagation()}function Z2(e,t,n){let{reference:r,floating:i}=e;const o=pf(t),a=b0e(t),s=v0e(a),l=df(t),c=o==="y",d=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-i.width,y:p};break;default:h={x:r.x,y:r.y}}switch(v_(t)){case"start":h[a]-=m*(n&&c?-1:1);break;case"end":h[a]+=m*(n&&c?-1:1);break}return h}const $0e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:p}=Z2(c,r,l),m=r,h={},y=0;for(let v=0;v<s.length;v++){const{name:w,fn:_}=s[v],{x:b,y:S,data:A,reset:E}=await _({x:d,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});if(d=b??d,p=S??p,h={...h,[w]:{...h[w],...A}},E&&y<=50){y++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:d,y:p}=Z2(c,m,l)),v=-1;continue}}return{x:d,y:p,placement:m,strategy:i,middlewareData:h}};async function H2(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:m=!1,padding:h=0}=_m(t,e),y=w0e(h),w=s[m?p==="floating"?"reference":"floating":p],_=wm(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b=p==="floating"?{...a.floating,x:r,y:i}:a.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),A=await(o.isElement==null?void 0:o.isElement(S))?await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1}:{x:1,y:1},E=wm(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:S,strategy:l}):b);return{top:(_.top-E.top+y.top)/A.y,bottom:(E.bottom-_.bottom+y.bottom)/A.y,left:(_.left-E.left+y.left)/A.x,right:(E.right-_.right+y.right)/A.x}}async function k0e(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=df(n),s=v_(n),l=pf(n)==="y",c=["left","top"].includes(a)?-1:1,d=o&&l?-1:1,p=_m(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof y=="number"&&(h=s==="end"?y*-1:y),l?{x:h*d,y:m*c}:{x:m*c,y:h*d}}const I0e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await k0e(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},P0e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:w=>{let{x:_,y:b}=w;return{x:_,y:b}}},...l}=_m(e,t),c={x:n,y:r},d=await H2(t,l),p=pf(df(i)),m=D2(p);let h=c[m],y=c[p];if(o){const w=m==="y"?"top":"left",_=m==="y"?"bottom":"right",b=h+d[w],S=h-d[_];h=R2(b,h,S)}if(a){const w=p==="y"?"top":"left",_=p==="y"?"bottom":"right",b=y+d[w],S=y-d[_];y=R2(b,y,S)}const v=s.fn({...t,[m]:h,[p]:y});return{...v,data:{x:v.x-n,y:v.y-r}}}}},R0e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...s}=_m(e,t),l=await H2(t,s),c=df(n),d=v_(n),p=pf(n)==="y",{width:m,height:h}=r.floating;let y,v;c==="top"||c==="bottom"?(y=c,v=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=c,y=d==="end"?"top":"bottom");const w=h-l[y],_=m-l[v],b=!t.middlewareData.shift;let S=w,A=_;if(p){const T=m-l.left-l.right;A=d||b?ol(_,T):T}else{const T=h-l.top-l.bottom;S=d||b?ol(w,T):T}if(b&&!d){const T=ui(l.left,0),N=ui(l.right,0),L=ui(l.top,0),F=ui(l.bottom,0);p?A=m-2*(T!==0||N!==0?T+N:ui(l.left,l.right)):S=h-2*(L!==0||F!==0?L+F:ui(l.top,l.bottom))}await a({...t,availableWidth:A,availableHeight:S});const E=await i.getDimensions(o.floating);return m!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function W2(e){const t=ci(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ar(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=bm(n)!==o||bm(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function S_(e){return Fn(e)?e:e.contextElement}function sl(e){const t=S_(e);if(!Ar(t))return Ia(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=W2(t);let a=(o?bm(n.width):n.width)/r,s=(o?bm(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const D0e=Ia(0);function V2(e){const t=li(e);return!w_()||!t.visualViewport?D0e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function N0e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==li(e)?!1:t}function Fs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=S_(e);let a=Ia(1);t&&(r?Fn(r)&&(a=sl(r)):a=sl(e));const s=N0e(o,n,r)?V2(o):Ia(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,d=i.width/a.x,p=i.height/a.y;if(o){const m=li(o),h=r&&Fn(r)?li(r):r;let y=m.frameElement;for(;y&&r&&h!==m;){const v=sl(y),w=y.getBoundingClientRect(),_=ci(y),b=w.left+(y.clientLeft+parseFloat(_.paddingLeft))*v.x,S=w.top+(y.clientTop+parseFloat(_.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,p*=v.y,l+=b,c+=S,y=li(y).frameElement}}return wm({width:d,height:p,x:l,y:c})}function M0e(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ar(n),o=Go(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s=Ia(1);const l=Ia(0);if((i||!i&&r!=="fixed")&&((Pa(n)!=="body"||hf(o))&&(a=xm(n)),Ar(n))){const c=Fs(n);s=sl(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}}function j0e(e){return Array.from(e.getClientRects())}function K2(e){return Fs(Go(e)).left+xm(e).scrollLeft}function L0e(e){const t=Go(e),n=xm(e),r=e.ownerDocument.body,i=ui(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ui(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+K2(e);const s=-n.scrollTop;return ci(r).direction==="rtl"&&(a+=ui(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function F0e(e,t){const n=li(e),r=Go(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const c=w_();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function q0e(e,t){const n=Fs(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ar(e)?sl(e):Ia(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:a,height:s,x:l,y:c}}function G2(e,t,n){let r;if(t==="viewport")r=F0e(e,n);else if(t==="document")r=L0e(Go(e));else if(Fn(t))r=q0e(t,n);else{const i=V2(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return wm(r)}function Y2(e,t){const n=Ls(e);return n===t||!Fn(n)||mf(n)?!1:ci(n).position==="fixed"||Y2(n,t)}function U0e(e,t){const n=t.get(e);if(n)return n;let r=Ra(e,[],!1).filter(s=>Fn(s)&&Pa(s)!=="body"),i=null;const o=ci(e).position==="fixed";let a=o?Ls(e):e;for(;Fn(a)&&!mf(a);){const s=ci(a),l=__(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||hf(a)&&!l&&Y2(e,a))?r=r.filter(d=>d!==a):i=s,a=Ls(a)}return t.set(e,r),r}function B0e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?U0e(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,d)=>{const p=G2(t,d,i);return c.top=ui(p.top,c.top),c.right=ol(p.right,c.right),c.bottom=ol(p.bottom,c.bottom),c.left=ui(p.left,c.left),c},G2(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function z0e(e){return W2(e)}function Z0e(e,t,n){const r=Ar(t),i=Go(t),o=n==="fixed",a=Fs(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Ia(0);if(r||!r&&!o)if((Pa(t)!=="body"||hf(i))&&(s=xm(t)),r){const c=Fs(t,!0,o,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else i&&(l.x=K2(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function J2(e,t){return!Ar(e)||ci(e).position==="fixed"?null:t?t(e):e.offsetParent}function X2(e,t){const n=li(e);if(!Ar(e))return n;let r=J2(e,t);for(;r&&x0e(r)&&ci(r).position==="static";)r=J2(r,t);return r&&(Pa(r)==="html"||Pa(r)==="body"&&ci(r).position==="static"&&!__(r))?n:r||S0e(e)||n}const H0e=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||X2,o=this.getDimensions;return{reference:Z0e(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function W0e(e){return ci(e).direction==="rtl"}const V0e={convertOffsetParentRelativeRectToViewportRelativeRect:M0e,getDocumentElement:Go,getClippingRect:B0e,getOffsetParent:X2,getElementRects:H0e,getClientRects:j0e,getDimensions:z0e,getScale:sl,isElement:Fn,isRTL:W0e};function K0e(e,t){let n=null,r;const i=Go(e);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:c,top:d,width:p,height:m}=e.getBoundingClientRect();if(s||t(),!p||!m)return;const h=al(d),y=al(i.clientWidth-(c+p)),v=al(i.clientHeight-(d+m)),w=al(c),b={rootMargin:-h+"px "+-y+"px "+-v+"px "+-w+"px",threshold:ui(0,ol(1,l))||1};let S=!0;function A(E){const T=E[0].intersectionRatio;if(T!==l){if(!S)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(A,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,b)}n.observe(e)}return a(!0),o}function G0e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=S_(e),d=i||o?[...c?Ra(c):[],...Ra(t)]:[];d.forEach(_=>{i&&_.addEventListener("scroll",n,{passive:!0}),o&&_.addEventListener("resize",n)});const p=c&&s?K0e(c,n):null;let m=-1,h=null;a&&(h=new ResizeObserver(_=>{let[b]=_;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let y,v=l?Fs(e):null;l&&w();function w(){const _=Fs(e);v&&(_.x!==v.x||_.y!==v.y||_.width!==v.width||_.height!==v.height)&&n(),v=_,y=requestAnimationFrame(w)}return n(),()=>{d.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),p&&p(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const Y0e=(e,t,n)=>{const r=new Map,i={platform:V0e,...n},o={...i.platform,_c:r};return $0e(e,t,{...i,platform:o})};var Sm=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Em(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Em(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Em(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Q2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eD(e,t){const n=Q2(e);return Math.round(t*n)/n}function tD(e){const t=z.useRef(e);return Sm(()=>{t.current=e}),t}function J0e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,p]=z.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=z.useState(r);Em(m,r)||h(r);const[y,v]=z.useState(null),[w,_]=z.useState(null),b=z.useCallback(q=>{q!=T.current&&(T.current=q,v(q))},[v]),S=z.useCallback(q=>{q!==N.current&&(N.current=q,_(q))},[_]),A=o||y,E=a||w,T=z.useRef(null),N=z.useRef(null),L=z.useRef(d),F=tD(l),j=tD(i),H=z.useCallback(()=>{if(!T.current||!N.current)return;const q={placement:t,strategy:n,middleware:m};j.current&&(q.platform=j.current),Y0e(T.current,N.current,q).then(Y=>{const ne={...Y,isPositioned:!0};re.current&&!Em(L.current,ne)&&(L.current=ne,r3.flushSync(()=>{p(ne)}))})},[m,t,n,j]);Sm(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,p(q=>({...q,isPositioned:!1})))},[c]);const re=z.useRef(!1);Sm(()=>(re.current=!0,()=>{re.current=!1}),[]),Sm(()=>{if(A&&(T.current=A),E&&(N.current=E),A&&E){if(F.current)return F.current(A,E,H);H()}},[A,E,H,F]);const Q=z.useMemo(()=>({reference:T,floating:N,setReference:b,setFloating:S}),[b,S]),G=z.useMemo(()=>({reference:A,floating:E}),[A,E]),V=z.useMemo(()=>{const q={position:n,left:0,top:0};if(!G.floating)return q;const Y=eD(G.floating,d.x),ne=eD(G.floating,d.y);return s?{...q,transform:"translate("+Y+"px, "+ne+"px)",...Q2(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:ne}},[n,s,G.floating,d.x,d.y]);return z.useMemo(()=>({...d,update:H,refs:Q,elements:G,floatingStyles:V}),[d,H,Q,G,V])}/*!
|
|
418
|
+
`);const b=_.state[s];if(b==null)return;JSON.stringify(i.getState())!==JSON.stringify(b)&&h(b);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(_)});case"DISPATCH":switch(v.payload.type){case"RESET":return h(y),s===void 0?d==null?void 0:d.init(i.getState()):d==null?void 0:d.init(hm(l.name));case"COMMIT":if(s===void 0){d==null||d.init(i.getState());return}return d==null?void 0:d.init(hm(l.name));case"ROLLBACK":return d_(v.state,_=>{if(s===void 0){h(_),d==null||d.init(i.getState());return}h(_[s]),d==null||d.init(hm(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return d_(v.state,_=>{if(s===void 0){h(_);return}JSON.stringify(i.getState())!==JSON.stringify(_[s])&&h(_[s])});case"IMPORT_STATE":{const{nextLiftedState:_}=v.payload,b=(w=_.computedStates.slice(-1)[0])==null?void 0:w.state;if(!b)return;h(s===void 0?b:b[s]),d==null||d.send(null,_);return}case"PAUSE_RECORDING":return m=!m}return}}),y},d_=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function Yve(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l,t==null?void 0:t.reviver),s=(o=n.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,t==null?void 0:t.replacer)),removeItem:i=>n.removeItem(i)}}const lf=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return lf(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return lf(r)(n)}}}},Jve=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:w=>w,version:0,merge:(w,_)=>({..._,...w}),...t},a=!1;const s=new Set,l=new Set;let c;try{c=o.getStorage()}catch{}if(!c)return e((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...w)},r,i);const d=lf(o.serialize),p=()=>{const w=o.partialize({...r()});let _;const b=d({state:w,version:o.version}).then(S=>c.setItem(o.name,S)).catch(S=>{_=S});if(_)throw _;return b},m=i.setState;i.setState=(w,_)=>{m(w,_),p()};const h=e((...w)=>{n(...w),p()},r,i);let y;const v=()=>{var w;if(!c)return;a=!1,s.forEach(b=>b(r()));const _=((w=o.onRehydrateStorage)==null?void 0:w.call(o,r()))||void 0;return lf(c.getItem.bind(c))(o.name).then(b=>{if(b)return o.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var S;return y=o.merge(b,(S=r())!=null?S:h),n(y,!0),p()}).then(()=>{_==null||_(y,void 0),a=!0,l.forEach(b=>b(y))}).catch(b=>{_==null||_(void 0,b)})};return i.persist={setOptions:w=>{o={...o,...w},w.getStorage&&(c=w.getStorage())},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>v(),hasHydrated:()=>a,onHydrate:w=>(s.add(w),()=>{s.delete(w)}),onFinishHydration:w=>(l.add(w),()=>{l.delete(w)})},v(),y||h},Xve=(e,t)=>(n,r,i)=>{let o={storage:Yve(()=>localStorage),partialize:v=>v,version:0,merge:(v,w)=>({...w,...v}),...t},a=!1;const s=new Set,l=new Set;let c=o.storage;if(!c)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...v)},r,i);const d=()=>{const v=o.partialize({...r()});return c.setItem(o.name,{state:v,version:o.version})},p=i.setState;i.setState=(v,w)=>{p(v,w),d()};const m=e((...v)=>{n(...v),d()},r,i);let h;const y=()=>{var v,w;if(!c)return;a=!1,s.forEach(b=>{var S;return b((S=r())!=null?S:m)});const _=((w=o.onRehydrateStorage)==null?void 0:w.call(o,(v=r())!=null?v:m))||void 0;return lf(c.getItem.bind(c))(o.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var S;return h=o.merge(b,(S=r())!=null?S:m),n(h,!0),d()}).then(()=>{_==null||_(h,void 0),h=r(),a=!0,l.forEach(b=>b(h))}).catch(b=>{_==null||_(void 0,b)})};return i.persist={setOptions:v=>{o={...o,...v},v.storage&&(c=v.storage)},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>a,onHydrate:v=>(s.add(v),()=>{s.delete(v)}),onFinishHydration:v=>(l.add(v),()=>{l.delete(v)})},o.skipHydration||y(),h||m},Qve=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?Jve(e,t):Xve(e,t),Vo=Kve()(v2(Qve((e,t)=>({messageHistory:{},addMessageToHistory:({userId:n,message:r})=>e(i=>({...i,messageHistory:{...i.messageHistory,[n]:[r,...(i.messageHistory[n]??[]).slice(0,100)]}})),clientMode:"",setClientMode:n=>{const{clearAll:r,clientMode:i}=t();i!==n&&r(),e(o=>({...o,clientMode:n}))},setUser:n=>e(r=>({...r,user:n})),setConversationId:n=>e(r=>({...r,conversationId:n})),clearAll:()=>{e(n=>({...n,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),b2=C.createContext(null),ebe=e=>{const t={theme:{},configuration:{},messages:[],connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},closeWindow:()=>{},messageContainerRef:{current:null},isTyping:!1,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},n=e==null?void 0:e.client,r=e==null?void 0:e.conversationId,i=Vo.getState().setClientMode,o=Vo.getState().setConversationId;return n&&i(n.mode),C.useEffect(()=>{r&&o(r)},[r]),l2()(v2((a,s)=>{const l=p=>a(m=>({...m,messages:[...m.messages??[],p]})),c=p=>a(m=>({...m,messages:p})),d=Vo.getState().addMessageToHistory;return{...t,...e,eventEmitter:Ire,client:n,sendFile:p=>s().client.sendFile(p),sendTextMessage:async p=>{const m=s().client;m&&await m.sendMessage(p),l({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:p}}}),m!=null&&m.userId&&d({message:p,userId:m.userId})},on:(p,m)=>{const h=s().client;return h?h.on(p,m):()=>{}},getClientId:()=>{var p;return(p=s().client)==null?void 0:p.clientId},setState:p=>a(m=>({...m,...p})),setTheme:p=>a(m=>({...m,theme:p})),setMessages:c,setConfiguration:p=>a(m=>({...m,configuration:p})),setIsTyping:p=>a(m=>({...m,isTyping:p})),addMessage:l,setConnected:p=>a(m=>({...m,connected:p})),restartConversation:async()=>{const p=s().client,m=s().setMessages;p&&(await p.newConversation(),m([]))}}},{name:"webchatStore"}))};function it(e){const t=C.useContext(b2);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return y2(t,e)}const tbe=({text:e,buttonValue:t,type:n,styles:r,variant:i,groupId:o,reusable:a,...s})=>{const l=it(b=>b.eventEmitter),c=it(b=>b.sendTextMessage),d=it(b=>b.isReadOnly),[p,m]=C.useState(!1),[h,y]=C.useState(!1),[v,w]=C.useState(!1);C.useEffect(()=>{if(o)return l.on(`button-group-${o}-click`,()=>{y(!0),a||w(!0)})},[l,o,a]);function _(){o&&l.emit(`button-group-${o}-click`),m(!0),a||w(!0),i!=="link"&&c(t)}return X.jsx(nbe,{...s,variant:i,onClick:_,disabled:v||d,"data-activated":p?"":void 0,"data-group-activated":h?"":void 0,"data-type":i,value:t,...r==null?void 0:r[n],children:e})},nbe=e=>{if(e.variant==="link"){const{value:r,variant:i,...o}=e;return X.jsx("a",{...o,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return X.jsx("button",{type:"button",...n})},rbe=C.forwardRef(({block:e,styles:t,type:n,...r},i)=>X.jsx("div",{...r,...t==null?void 0:t[n],ref:i,children:X.jsx(fl,{styles:t,block:e})})),_2=C.createContext(null);function w2(){const e=C.useContext(_2);if(!e)throw new Error("useComposerContext must be used within a Message");return e}const x2=C.createContext(null);function ibe(){const e=C.useContext(x2);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const S2=C.createContext(null);function E2(){const e=C.useContext(S2);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}C.createContext(null);const obe=C.forwardRef(({url:e,type:t,styles:n,orientation:r="auto",...i},o)=>{var m,h;const a=C.useId(),{setIsLoading:s}=ibe(),[l,c]=C.useState(r),[d,p]=C.useState(!1);return C.useLayoutEffect(()=>{s(y=>[...y,a])},[]),C.useEffect(()=>{e&&l==="auto"&&sge(e).then(({width:y,height:v})=>{c(abe(y,v)),s(w=>w.filter(_=>_!==a))})},[e]),X.jsxs(X.Fragment,{children:[d?null:X.jsx("div",{"data-orientation":l,...(m=n==null?void 0:n[t])==null?void 0:m.placeholder}),X.jsx("img",{"data-orientation":l,"data-loaded":d,...i,...(h=n==null?void 0:n[t])==null?void 0:h.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{p(!0)}})]})});function abe(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((o,a)=>Math.abs(n[a]-r)<Math.abs(n[o]-r)?a:o)}const sbe=C.forwardRef(({url:e,type:t,styles:n,...r},i)=>X.jsx("div",{children:X.jsx("video",{...r,controls:!0,src:e,...n==null?void 0:n[t],ref:i})})),ube=C.forwardRef(({url:e,type:t,styles:n,...r},i)=>X.jsx("div",{children:X.jsx("audio",{...r,controls:!0,src:e,...n==null?void 0:n[t],ref:i})}));function lbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 01.75.75v10.638l3.96-4.158a.75.75 0 111.08 1.04l-5.25 5.5a.75.75 0 01-1.08 0l-5.25-5.5a.75.75 0 111.08-1.04l3.96 4.158V3.75A.75.75 0 0110 3z",clipRule:"evenodd"}))}const cbe=z.forwardRef(lbe);function fbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 01-9.201 2.466l-.312-.311h2.433a.75.75 0 000-1.5H3.989a.75.75 0 00-.75.75v4.242a.75.75 0 001.5 0v-2.43l.31.31a7 7 0 0011.712-3.138.75.75 0 00-1.449-.39zm1.23-3.723a.75.75 0 00.219-.53V2.929a.75.75 0 00-1.5 0V5.36l-.31-.31A7 7 0 003.239 8.188a.75.75 0 101.448.389A5.5 5.5 0 0113.89 6.11l.311.31h-2.432a.75.75 0 000 1.5h4.243a.75.75 0 00.53-.219z",clipRule:"evenodd"}))}const dbe=z.forwardRef(fbe);function pbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm-.75-4.75a.75.75 0 001.5 0V8.66l1.95 2.1a.75.75 0 101.1-1.02l-3.25-3.5a.75.75 0 00-1.1 0L6.2 9.74a.75.75 0 101.1 1.02l1.95-2.1v4.59z",clipRule:"evenodd"}))}const hbe=z.forwardRef(pbe);function mbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"}))}const ybe=z.forwardRef(mbe);function gbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 003 3.5v13A1.5 1.5 0 004.5 18h11a1.5 1.5 0 001.5-1.5V7.621a1.5 1.5 0 00-.44-1.06l-4.12-4.122A1.5 1.5 0 0011.378 2H4.5zm4.75 6.75a.75.75 0 011.5 0v2.546l.943-1.048a.75.75 0 011.114 1.004l-2.25 2.5a.75.75 0 01-1.114 0l-2.25-2.5a.75.75 0 111.114-1.004l.943 1.048V8.75z",clipRule:"evenodd"}))}const vbe=z.forwardRef(gbe);function bbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M9.69 18.933l.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 00.281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 103 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 002.273 1.765 11.842 11.842 0 00.976.544l.062.029.018.008.006.003zM10 11.25a2.25 2.25 0 100-4.5 2.25 2.25 0 000 4.5z",clipRule:"evenodd"}))}const _be=z.forwardRef(bbe);function wbe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{d:"M10.75 4.75a.75.75 0 00-1.5 0v4.5h-4.5a.75.75 0 000 1.5h4.5v4.5a.75.75 0 001.5 0v-4.5h4.5a.75.75 0 000-1.5h-4.5v-4.5z"}))}const xbe=z.forwardRef(wbe),Sbe=C.forwardRef(({type:e,latitude:t,longitude:n,title:r,styles:i,...o},a)=>{var l,c,d;const s=`https://www.google.com/maps/search/?api=1&query=${t},${n}`;return X.jsxs("a",{...o,...(l=i==null?void 0:i[e])==null?void 0:l.container,href:s,type:"_blank",rel:"noopener",ref:a,children:[X.jsx("p",{...(c=i==null?void 0:i[e])==null?void 0:c.title,children:r}),X.jsx(_be,{...(d=i==null?void 0:i[e])==null?void 0:d.icon})]})}),Ebe=C.forwardRef(({blocks:e,styles:t,type:n,horizontalAlignment:r,verticalAlignment:i,...o},a)=>X.jsx("div",{"data-horizontal":r,"data-vertical":i,...o,...t==null?void 0:t[n],ref:a,children:e.map((s,l)=>X.jsx(fl,{styles:t,block:s},l))})),Abe=C.forwardRef(({blocks:e,styles:t,type:n,horizontalAlignment:r,verticalAlignment:i,...o},a)=>X.jsx("div",{"data-horizontal":r,"data-vertical":i,...o,...t==null?void 0:t[n],ref:a,children:e.map((s,l)=>X.jsx(fl,{styles:t,block:s},l))}));function Cbe(e){return Object.prototype.toString.call(e)==="[object Object]"}function A2(e){return Cbe(e)||Array.isArray(e)}function Obe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function p_(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==o?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!A2(s)||!A2(l)?s===l:p_(s,l)})}function C2(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function Tbe(e,t){if(e.length!==t.length)return!1;const n=C2(e),r=C2(t);return n.every((i,o)=>{const a=r[o];return p_(i,a)})}function h_(e){return typeof e=="number"}function O2(e){return typeof e=="string"}function m_(e){return typeof e=="boolean"}function T2(e){return Object.prototype.toString.call(e)==="[object Object]"}function Nn(e){return Math.abs(e)}function y_(e){return Math.sign(e)}function mm(e,t){return Nn(e-t)}function $be(e,t){if(e===0||t===0||Nn(e)<=Nn(t))return 0;const n=mm(Nn(e),Nn(t));return Nn(n/e)}function cf(e){return gm(e).map(Number)}function Ko(e){return e[ym(e)]}function ym(e){return Math.max(0,e.length-1)}function gm(e){return Object.keys(e)}function $2(e,t){return[e,t].reduce((n,r)=>(gm(r).forEach(i=>{const o=n[i],a=r[i],s=T2(o)&&T2(a);n[i]=s?$2(o,a):a}),n),{})}function k2(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function kbe(e,t){const n={start:r,center:i,end:o};function r(){return 0}function i(c){return o(c)/2}function o(c){return t-c}function a(){return t*Number(e)}function s(c){return h_(e)?a():n[e](c)}return{measure:s}}function Ibe(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),o=l();function a(d){const{width:p,height:m}=d;return n==="x"?p:m}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function l(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:o,measureSize:a}}function ka(e,t){const n=Nn(e-t);function r(c){return c<e}function i(c){return c>t}function o(c){return r(c)||i(c)}function a(c){return o(c)?r(c)?e:t:c}function s(c){return n?c-n*Math.ceil((c-t)/n):c}return{length:n,max:t,min:e,constrain:a,reachedAny:o,reachedMax:i,reachedMin:r,removeOffset:s}}function I2(e,t,n){const{constrain:r}=ka(0,e),i=e+1;let o=a(t);function a(m){return n?Nn((i+m)%i):r(m)}function s(){return o}function l(m){return o=a(m),p}function c(m){return d().set(s()+m)}function d(){return I2(e,s(),n)}const p={get:s,set:l,add:c,clone:d};return p}function Pbe(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function ff(){let e=[];function t(i,o,a,s={passive:!0}){return i.addEventListener(o,a,s),e.push(()=>i.removeEventListener(o,a,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function Rbe(e,t,n,r,i,o,a,s,l,c,d,p,m,h,y,v,w,_,b){const{cross:S}=e,A=["INPUT","SELECT","TEXTAREA"],E={passive:!1},T=ff(),j=ff(),L=ka(50,225).constrain(y.measure(20)),F={mouse:300,touch:400},M={mouse:500,touch:600},H=v?43:25;let re=!1,Q=0,G=0,V=!1,q=!1,Y=!1,ne=!1;function ce(Ae,Fe){if(!Fe)return;function $e(lt){(m_(Fe)||Fe(Ae,lt))&&qe(lt)}const Ze=n;T.add(Ze,"dragstart",lt=>lt.preventDefault(),E).add(Ze,"touchmove",()=>{},E).add(Ze,"touchend",()=>{}).add(Ze,"touchstart",$e).add(Ze,"mousedown",$e).add(Ze,"touchcancel",Je).add(Ze,"contextmenu",Je).add(Ze,"click",rt,!0)}function P(){T.clear(),j.clear()}function ue(){const Ae=ne?r:n;j.add(Ae,"touchmove",Me,E).add(Ae,"touchend",Je).add(Ae,"mousemove",Me,E).add(Ae,"mouseup",Je)}function Oe(Ae){const Fe=Ae.nodeName||"";return A.includes(Fe)}function N(){return(v?M:F)[ne?"mouse":"touch"]}function Ne(Ae,Fe){const $e=m.add(y_(Ae)*-1),Ze=p.byDistance(Ae,!v).distance;return v||Nn(Ae)<L?Ze:_&&Fe?Ze*.5:p.byIndex($e.get(),0).distance}function qe(Ae){const Fe=k2(Ae,i);ne=Fe,!(Fe&&Ae.button!==0)&&(Oe(Ae.target)||(Y=v&&Fe&&!Ae.buttons&&re,re=mm(o.get(),s.get())>=2,V=!0,a.pointerDown(Ae),d.useFriction(0).useDuration(0),o.set(s),ue(),Q=a.readPoint(Ae),G=a.readPoint(Ae,S),h.emit("pointerDown")))}function Me(Ae){const Fe=a.readPoint(Ae),$e=a.readPoint(Ae,S),Ze=mm(Fe,Q),lt=mm($e,G);if(!q&&!ne&&(!Ae.cancelable||(q=Ze>lt,!q)))return Je(Ae);const K=a.pointerMove(Ae);Ze>w&&(Y=!0),d.useFriction(.3).useDuration(1),l.start(),o.add(t.apply(K)),Ae.preventDefault()}function Je(Ae){const $e=p.byDistance(0,!1).index!==m.get(),Ze=a.pointerUp(Ae)*N(),lt=Ne(t.apply(Ze),$e),K=$be(Ze,lt),pe=H-10*K,Te=b+K/50;q=!1,V=!1,j.clear(),d.useDuration(pe).useFriction(Te),c.distance(lt,!v),ne=!1,h.emit("pointerUp")}function rt(Ae){Y&&(Ae.stopPropagation(),Ae.preventDefault())}function Ke(){return V}return{init:ce,pointerDown:Ke,destroy:P}}function Dbe(e,t){let r,i;function o(p){return p.timeStamp}function a(p,m){const y=`client${(m||e.scroll)==="x"?"X":"Y"}`;return(k2(p,t)?p:p.touches[0])[y]}function s(p){return r=p,i=p,a(p)}function l(p){const m=a(p)-a(i),h=o(p)-o(r)>170;return i=p,h&&(r=p),m}function c(p){if(!r||!i)return 0;const m=a(i)-a(r),h=o(p)-o(r),y=o(p)-o(i)>170,v=m/h;return h&&!y&&Nn(v)>.1?v:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:a}}function Nbe(e){function t(r){return e*(r/100)}return{measure:t}}function Mbe(e,t,n,r,i){let o,a,s=[],l=!1;function c(h){return i.measureSize(h.getBoundingClientRect())}function d(h,y){if(!y)return;a=c(e),s=r.map(c);function v(_){for(const b of _){const S=b.target===e,A=r.indexOf(b.target),E=S?a:s[A],T=c(S?e:r[A]);if(E!==T){n.requestAnimationFrame(()=>{h.reInit(),t.emit("resize")});break}}}o=new ResizeObserver(_=>{l||(m_(y)||y(h,_))&&v(_)}),[e].concat(r).forEach(_=>o.observe(_))}function p(){o&&o.disconnect(),l=!0}return{init:d,destroy:p}}function jbe(e,t,n,r){let i=!0,o=0,a=0,s=n,l=r,c=e.get(),d=0;function p(){const E=t.get()-e.get(),T=!s;let j=0;return T?(o=0,e.set(t),j=E):(o+=E/s,o*=l,c+=o,e.add(o),j=c-d),a=y_(j),d=c,i=Nn(E)<.001,A}function m(){return i}function h(){return s}function y(){return a}function v(){return o}function w(){return b(n)}function _(){return S(r)}function b(E){return s=E,A}function S(E){return l=E,A}const A={direction:y,duration:h,velocity:v,seek:p,settled:m,useBaseFriction:_,useBaseDuration:w,useFriction:S,useDuration:b};return A}function Lbe(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=ka(.1,.99);let l=!1;function c(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function d(h){if(!c())return;const y=e.reachedMin(t.get())?"min":"max",v=Nn(e[y]-t.get()),w=n.get()-t.get(),_=s.constrain(v/a);n.subtract(w*_),!h&&Nn(w)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function p(h){l=!h}return{constrain:d,toggleActive:p}}function Fbe(e,t,n,r){const i=ka(-t+e,n[0]),o=l(),a=c();function s(){const p=o[0],m=Ko(o),h=o.lastIndexOf(p),y=o.indexOf(m)+1;return ka(h,y)}function l(){return n.map(i.constrain).map(p=>parseFloat(p.toFixed(3)))}function c(){if(t<=e)return[i.max];if(r==="keepSnaps")return o;const{min:p,max:m}=s();return o.slice(p,m)}return{snapsContained:a}}function qbe(e,t,n){const r=t[0],i=n?r-e:Ko(t);return{limit:ka(i,r)}}function Ube(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=ka(o,a);function c(m){return m===1?l(n.get()):m===-1?s(n.get()):!1}function d(m){if(!c(m))return;const h=e*(m*-1);r.forEach(y=>y.add(h))}return{loop:d}}function Bbe(e){const{max:t,length:n}=e;function r(o){return(o-t)/-n}return{get:r}}function zbe(e,t,n,r,i,o,a){const{startEdge:s,endEdge:l}=e,{groupSlides:c}=o,d=h().map(t.measure),p=y(),m=v();function h(){return c(r).map(_=>Ko(_)[l]-_[0][s]).map(Nn)}function y(){return r.map(_=>n[s]-_[s]).map(_=>-Nn(_))}function v(){const b=Ko(p)-Ko(i);return c(p).map(S=>S[0]).map((S,A,E)=>{const T=!A,j=A===ym(E);return a&&T?0:a&&j?b:S+d[A]})}return{snaps:p,snapsAligned:m}}function Zbe(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(y){return y.concat().sort((v,w)=>Nn(v)-Nn(w))[0]}function c(y){const v=e?a(y):s(y),w=t.map(b=>b-v).map(b=>d(b,0)).map((b,S)=>({diff:b,index:S})).sort((b,S)=>Nn(b.diff)-Nn(S.diff)),{index:_}=w[0];return{index:_,distance:v}}function d(y,v){const w=[y,y+n,y-n];if(!e)return w[0];if(!v)return l(w);const _=w.filter(b=>y_(b)===v);return l(_)}function p(y,v){const w=t[y]-i.get(),_=d(w,v);return{index:y,distance:_}}function m(y,v){const w=i.get()+y,{index:_,distance:b}=c(w),S=!e&&o(w);if(!v||S)return{index:_,distance:y};const A=t[_]-b,E=y+d(A,0);return{index:_,distance:E}}return{byDistance:m,byIndex:p,shortcut:d}}function Hbe(e,t,n,r,i,o,a){function s(p){const m=p.distance,h=p.index!==t.get();o.add(m),m&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(n.set(t.get()),t.set(p.index),a.emit("select"))}function l(p,m){const h=r.byDistance(p,m);s(h)}function c(p,m){const h=t.clone().set(p),y=r.byIndex(h.get(),m);s(y)}return{distance:l,index:c}}function vm(e){let t=e;function n(){return t}function r(l){t=a(l)}function i(l){t+=a(l)}function o(l){t-=a(l)}function a(l){return h_(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function P2(e,t,n){const r=e.scroll==="x"?a:s,i=n.style;let o=!1;function a(m){return`translate3d(${m}px,0px,0px)`}function s(m){return`translate3d(0px,${m}px,0px)`}function l(m){o||(i.transform=r(t.apply(m)))}function c(m){o=!m}function d(){o||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:d,to:l,toggleActive:c}}function Wbe(e,t,n,r,i,o,a,s,l){const c=cf(i),d=cf(i).reverse(),p=v().concat(w());function m(E,T){return E.reduce((j,L)=>j-i[L],T)}function h(E,T){return E.reduce((j,L)=>m(j,T)>0?j.concat([L]):j,[])}function y(E,T){const j=T==="start",L=j?-r:r,F=a.findSlideBounds([L]);return E.map(M=>{const H=j?0:-r,re=j?r:0,G=F.filter(V=>V.index===M)[0][j?"end":"start"];return{index:M,slideLocation:vm(-1),translate:P2(e,t,l[M]),target:()=>s.get()>G?H:re}})}function v(){const E=o[0]-1,T=h(d,E);return y(T,"end")}function w(){const E=n-o[0]-1,T=h(c,E);return y(T,"start")}function _(){return p.every(({index:E})=>{const T=c.filter(j=>j!==E);return m(T,n)<=.1})}function b(){p.forEach(E=>{const{target:T,translate:j,slideLocation:L}=E,F=T();F!==L.get()&&(j.to(F),L.set(F))})}function S(){p.forEach(E=>E.translate.clear())}return{canLoop:_,clear:S,loop:b,loopPoints:p}}function Vbe(e,t){let n,r=!1;function i(s,l){if(!l)return;function c(d){for(const p of d)if(p.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(d=>{r||(m_(l)||l(s,d))&&c(d)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:i,destroy:o}}function Kbe(e,t,n,r,i,o,a){const{removeOffset:s,constrain:l}=i,c=.5,d=o?[0,t,-t]:[0],p=h(d,a);function m(w){const _=w||0;return n.map(b=>ka(c,b-c).constrain(b*_))}function h(w,_){const b=w||d,S=m(_);return b.reduce((A,E)=>{const T=r.map((j,L)=>({start:j-n[L]+S[L]+E,end:j+e-S[L]+E,index:L}));return A.concat(T)},[])}function y(w,_){const b=o?s(w):l(w);return(_||p).reduce((A,E)=>{const{index:T,start:j,end:L}=E,F=A.includes(T),M=j<b&&L>b;return!F&&M?A.concat([T]):A},[])}return{check:y,findSlideBounds:h}}function Gbe(e,t,n,r,i,o){const{measureSize:a,startEdge:s,endEdge:l}=e,c=n[0]&&i,d=y(),p=v(),m=n.map(a),h=w();function y(){if(!c)return 0;const b=n[0];return Nn(t[s]-b[s])}function v(){if(!c)return 0;const b=o.getComputedStyle(Ko(r));return parseFloat(b.getPropertyValue(`margin-${l}`))}function w(){return n.map((b,S,A)=>{const E=!S,T=S===ym(A);return E?m[S]+d:T?m[S]+p:A[S+1][s]-b[s]}).map(Nn)}return{slideSizes:m,slideSizesWithGaps:h}}function Ybe(e,t,n){const r=h_(n);function i(l,c){return cf(l).filter(d=>d%c===0).map(d=>l.slice(d,d+c))}function o(l){return cf(l).reduce((c,d)=>{const m=t.slice(Ko(c),d+1).reduce((h,y)=>h+y,0);return!d||m>e?c.concat(d):c},[]).map((c,d,p)=>l.slice(c,p[d+1]))}function a(l){return r?i(l,n):o(l)}return{groupSlides:a}}function Jbe(e,t,n,r,i,o,a,s){const{align:l,axis:c,direction:d,startIndex:p,inViewThreshold:m,loop:h,duration:y,dragFree:v,dragThreshold:w,slidesToScroll:_,skipSnaps:b,containScroll:S}=o,A=t.getBoundingClientRect(),E=n.map(Te=>Te.getBoundingClientRect()),T=Pbe(d),j=Ibe(c,d),L=j.measureSize(A),F=Nbe(L),M=kbe(l,L),H=!h&&!!S,re=h||!!S,{slideSizes:Q,slideSizesWithGaps:G}=Gbe(j,A,E,n,re,i),V=Ybe(L,G,_),{snaps:q,snapsAligned:Y}=zbe(j,M,A,E,G,V,H),ne=-Ko(q)+Ko(G),{snapsContained:ce}=Fbe(L,ne,Y,S),P=H?ce:Y,{limit:ue}=qbe(ne,P,h),Oe=I2(ym(P),p,h),N=Oe.clone(),Ne=cf(n),qe=({dragHandler:Te,scrollBody:Se,scrollBounds:et,eventHandler:Ue,animation:ot,options:{loop:It}})=>{const mt=Te.pointerDown();It||et.constrain(mt);const ie=Se.seek().settled();ie&&!mt&&(ot.stop(),Ue.emit("settle")),ie||Ue.emit("scroll")},Me=({scrollBody:Te,translate:Se,location:et,offsetLocation:Ue,scrollLooper:ot,slideLooper:It,options:{loop:mt}},ie)=>{const ge=Te.velocity();Ue.set(et.get()-ge+ge*ie),mt&&(ot.loop(Te.direction()),It.loop()),Se.to(Ue.get())},Je={start:()=>s.start(pe),stop:()=>s.stop(pe),update:()=>qe(pe),render:Te=>Me(pe,Te)},rt=.68,Ke=P[Oe.get()],Pe=vm(Ke),Ae=vm(Ke),Fe=vm(Ke),$e=jbe(Pe,Fe,y,rt),Ze=Zbe(h,P,ne,ue,Fe),lt=Hbe(Je,Oe,N,Ze,$e,Fe,a),K=Kbe(L,ne,Q,q,ue,h,m),pe={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:A,slideRects:E,animation:Je,axis:j,direction:T,dragHandler:Rbe(j,T,e,r,i,Fe,Dbe(j,i),Pe,Je,lt,$e,Ze,Oe,a,F,v,w,b,rt),eventStore:ff(),percentOfView:F,index:Oe,indexPrevious:N,limit:ue,location:Pe,offsetLocation:Ae,options:o,resizeHandler:Mbe(t,a,i,n,j),scrollBody:$e,scrollBounds:Lbe(ue,Pe,Fe,$e,F),scrollLooper:Ube(ne,ue,Ae,[Pe,Ae,Fe]),scrollProgress:Bbe(ue),scrollSnaps:P,scrollTarget:Ze,scrollTo:lt,slideLooper:Wbe(j,T,L,ne,G,P,K,Ae,n),slidesHandler:Vbe(t,a),slidesInView:K,slideIndexes:Ne,slidesToScroll:V,target:Fe,translate:P2(j,T,t)};return pe}function Xbe(e){const t=16.666666666666668;let n=[],r=null,i=0,o=0;function a(p){r||(r=p);const m=p-r;for(r=p,i+=m;i>=t;)n.forEach(({animation:y})=>y.update()),i-=t;const h=Nn(i/t);n.forEach(({animation:y})=>y.render(h)),o&&e.requestAnimationFrame(a)}function s(p){n.includes(p)||n.push(p),!o&&(o=e.requestAnimationFrame(a))}function l(p){n=n.filter(m=>m!==p),!n.length&&(e.cancelAnimationFrame(o),r=null,i=0,o=0)}function c(){r=null,i=0}return{start:s,stop:l,reset:c,window:e}}function Qbe(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function i(l){return r(l).forEach(c=>c(t,l)),s}function o(l,c){return e[l]=r(l).concat([c]),s}function a(l,c){return e[l]=r(l).filter(d=>d!==c),s}const s={init:n,emit:i,off:a,on:o};return s}const e0e={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function t0e(e){function t(o,a){return $2(o,a||{})}function n(o){const a=o.breakpoints||{},s=gm(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,c)=>t(l,c),{});return t(o,s)}function r(o){return o.map(a=>gm(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function n0e(e){let t=[];function n(o,a){return t=o.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),o.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(o=>o.destroy())}return{init:n,destroy:r}}function il(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=t0e(i),a=n0e(o),s=ff(),l=ff(),c=Qbe(),{animationRealms:d}=il,{mergeOptions:p,optionsAtMedia:m,optionsMediaQueries:h}=o,{on:y,off:v,emit:w}=c,_=Q;let b=!1,S,A=p(e0e,il.globalOptions),E=p(A),T=[],j,L,F;function M(){const{container:$e,slides:Ze}=E;L=(O2($e)?e.querySelector($e):$e)||e.children[0];const K=O2(Ze)?L.querySelectorAll(Ze):Ze;F=[].slice.call(K||L.children)}function H($e,Ze){const lt=Jbe(e,L,F,r,i,$e,c,Ze);if($e.loop&&!lt.slideLooper.canLoop()){const K=Object.assign({},$e,{loop:!1});return H(K,Ze)}return lt}function re($e,Ze){if(b)return;const lt=d.find(pe=>pe.window===i),K=lt||Xbe(i);lt||d.push(K),A=p(A,$e),E=m(A),T=Ze||T,M(),S=H(E,K),h([A,...T.map(({options:pe})=>pe)]).forEach(pe=>s.add(pe,"change",Q)),E.active&&(S.translate.to(S.location.get()),S.eventHandler.init(Fe),S.resizeHandler.init(Fe,E.watchResize),S.slidesHandler.init(Fe,E.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&K.reset()}),S.options.loop&&S.slideLooper.loop(),L.offsetParent&&F.length&&S.dragHandler.init(Fe,E.watchDrag),j=a.init(T,Fe))}function Q($e,Ze){const lt=qe();G(),re(p({startIndex:lt},$e),Ze),c.emit("reInit")}function G(){S.dragHandler.destroy(),S.animation.stop(),S.eventStore.clear(),S.translate.clear(),S.slideLooper.clear(),S.resizeHandler.destroy(),S.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function V(){b||(b=!0,s.clear(),G(),c.emit("destroy"))}function q($e){const Ze=S[$e?"target":"location"].get(),lt=E.loop?"removeOffset":"constrain";return S.slidesInView.check(S.limit[lt](Ze))}function Y($e){const Ze=q($e);return S.slideIndexes.filter(lt=>!Ze.includes(lt))}function ne($e,Ze,lt){!E.active||b||(S.scrollBody.useBaseFriction().useDuration(Ze?0:E.duration),S.scrollTo.index($e,lt||0))}function ce($e){const Ze=S.index.add(1).get();ne(Ze,$e===!0,-1)}function P($e){const Ze=S.index.add(-1).get();ne(Ze,$e===!0,1)}function ue(){return S.index.add(1).get()!==qe()}function Oe(){return S.index.add(-1).get()!==qe()}function N(){return S.scrollSnaps.map(S.scrollProgress.get)}function Ne(){return S.scrollProgress.get(S.location.get())}function qe(){return S.index.get()}function Me(){return S.indexPrevious.get()}function Je(){return j}function rt(){return S}function Ke(){return e}function Pe(){return L}function Ae(){return F}const Fe={canScrollNext:ue,canScrollPrev:Oe,containerNode:Pe,internalEngine:rt,destroy:V,off:v,on:y,emit:w,plugins:Je,previousScrollSnap:Me,reInit:_,rootNode:Ke,scrollNext:ce,scrollPrev:P,scrollProgress:Ne,scrollSnapList:N,scrollTo:ne,selectedScrollSnap:qe,slideNodes:Ae,slidesInView:q,slidesNotInView:Y};return re(t,n),setTimeout(()=>c.emit("init"),0),Fe}il.animationRealms=[],il.globalOptions=void 0;function g_(e={},t=[]){const n=C.useRef(e),r=C.useRef(t),[i,o]=C.useState(),[a,s]=C.useState(),l=C.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return C.useEffect(()=>{if(Obe()&&a){il.globalOptions=g_.globalOptions;const c=il(a,n.current,r.current);return o(c),()=>c.destroy()}else o(void 0)},[a,o]),C.useEffect(()=>{p_(n.current,e)||(n.current=e,l())},[e,l]),C.useEffect(()=>{Tbe(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}g_.globalOptions=void 0;function r0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z",clipRule:"evenodd"}))}const i0e=z.forwardRef(r0e);function o0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z",clipRule:"evenodd"}))}const a0e=z.forwardRef(o0e);function s0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0016.5 9h-1.875a1.875 1.875 0 01-1.875-1.875V5.25A3.75 3.75 0 009 1.5H5.625zM7.5 15a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5A.75.75 0 017.5 15zm.75 2.25a.75.75 0 000 1.5H12a.75.75 0 000-1.5H8.25z",clipRule:"evenodd"}),z.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0114.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 013.434 1.279 9.768 9.768 0 00-6.963-6.963z"}))}const u0e=z.forwardRef(s0e);function l0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z"}),z.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z"}))}const c0e=z.forwardRef(l0e);function f0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 00-.945-5.003 12.754 12.754 0 01-4.339 2.708 18.991 18.991 0 01-.214 4.772 17.165 17.165 0 005.498-2.477zM14.634 15.55a17.324 17.324 0 00.332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 00.332 4.647 17.385 17.385 0 005.268 0zM9.772 17.119a18.963 18.963 0 004.456 0A17.182 17.182 0 0112 21.724a17.18 17.18 0 01-2.228-4.605zM7.777 15.23a18.87 18.87 0 01-.214-4.774 12.753 12.753 0 01-4.34-2.708 9.711 9.711 0 00-.944 5.004 17.165 17.165 0 005.498 2.477zM21.356 14.752a9.765 9.765 0 01-7.478 6.817 18.64 18.64 0 001.988-4.718 18.627 18.627 0 005.49-2.098zM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 001.988 4.718 9.765 9.765 0 01-7.478-6.816zM13.878 2.43a9.755 9.755 0 016.116 3.986 11.267 11.267 0 01-3.746 2.504 18.63 18.63 0 00-2.37-6.49zM12 2.276a17.152 17.152 0 012.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0112 2.276zM10.122 2.43a18.629 18.629 0 00-2.37 6.49 11.266 11.266 0 01-3.746-2.504 9.754 9.754 0 016.116-3.985z"}))}const d0e=z.forwardRef(f0e);function p0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 00-5.25 5.25v3a3 3 0 00-3 3v6.75a3 3 0 003 3h10.5a3 3 0 003-3v-6.75a3 3 0 00-3-3v-3c0-2.9-2.35-5.25-5.25-5.25zm3.75 8.25v-3a3.75 3.75 0 10-7.5 0v3h7.5z",clipRule:"evenodd"}))}const h0e=z.forwardRef(p0e);function m0e({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 013-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 01-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 006.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 011.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 01-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5z",clipRule:"evenodd"}))}const y0e=z.forwardRef(m0e),g0e=C.forwardRef(({type:e,styles:t,blocks:n},r)=>{const[i,o]=g_({skipSnaps:!0}),[a,s]=C.useState(!0),[l,c]=C.useState(!0),d=C.useCallback(()=>o&&o.scrollPrev(),[o]),p=C.useCallback(()=>o&&o.scrollNext(),[o]),m=t==null?void 0:t[e],h=C.useCallback(y=>{s(!y.canScrollPrev()),c(!y.canScrollNext())},[]);return C.useEffect(()=>{o&&(h(o),o.on("reInit",h),o.on("select",h))},[o,h]),X.jsxs("div",{...m==null?void 0:m.container,"data-container":"carousel",ref:i,children:[X.jsx("div",{ref:r,...m==null?void 0:m.slidesContainer,children:n.map((y,v)=>X.jsx(fl,{styles:t,block:y},v))}),X.jsx(i0e,{...m==null?void 0:m.backButton,"data-disabled":a?"":void 0,onClick:d}),X.jsx(a0e,{...m==null?void 0:m.nextButton,"data-disabled":l?"":void 0,onClick:p})]})}),ol=Math.min,ui=Math.max,bm=Math.round,al=Math.floor,Ia=e=>({x:e,y:e});function R2(e,t,n){return ui(e,ol(t,n))}function _m(e,t){return typeof e=="function"?e(t):e}function df(e){return e.split("-")[0]}function v_(e){return e.split("-")[1]}function D2(e){return e==="x"?"y":"x"}function v0e(e){return e==="y"?"height":"width"}function pf(e){return["top","bottom"].includes(df(e))?"y":"x"}function b0e(e){return D2(pf(e))}function _0e(e){return{top:0,right:0,bottom:0,left:0,...e}}function w0e(e){return typeof e!="number"?_0e(e):{top:e,right:e,bottom:e,left:e}}function wm(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Pa(e){return N2(e)?(e.nodeName||"").toLowerCase():"#document"}function li(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Go(e){var t;return(t=(N2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function N2(e){return e instanceof Node||e instanceof li(e).Node}function Fn(e){return e instanceof Element||e instanceof li(e).Element}function Ar(e){return e instanceof HTMLElement||e instanceof li(e).HTMLElement}function b_(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof li(e).ShadowRoot}function hf(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ci(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function x0e(e){return["table","td","th"].includes(Pa(e))}function __(e){const t=w_(),n=ci(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function S0e(e){let t=Ls(e);for(;Ar(t)&&!mf(t);){if(__(t))return t;t=Ls(t)}return null}function w_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mf(e){return["html","body","#document"].includes(Pa(e))}function ci(e){return li(e).getComputedStyle(e)}function xm(e){return Fn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ls(e){if(Pa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||b_(e)&&e.host||Go(e);return b_(t)?t.host:t}function M2(e){const t=Ls(e);return mf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ar(t)&&hf(t)?t:M2(t)}function Ra(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=M2(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=li(i);return o?t.concat(a,a.visualViewport||[],hf(i)?i:[],a.frameElement&&n?Ra(a.frameElement):[]):t.concat(i,Ra(i,[],n))}function Da(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function Yr(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&b_(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function j2(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function E0e(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function L2(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(j2())||t.test(E0e()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function F2(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function q2(){return/apple/i.test(navigator.vendor)}function A0e(){return j2().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function U2(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function C0e(e){return"nativeEvent"in e}function O0e(e){return e.matches("html,body")}function Zi(e){return(e==null?void 0:e.ownerDocument)||document}function x_(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function B2(e){return"composedPath"in e?e.composedPath()[0]:e.target}const T0e="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function z2(e){return Ar(e)&&e.matches(T0e)}function hr(e){e.preventDefault(),e.stopPropagation()}function Z2(e,t,n){let{reference:r,floating:i}=e;const o=pf(t),a=b0e(t),s=v0e(a),l=df(t),c=o==="y",d=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-i.width,y:p};break;default:h={x:r.x,y:r.y}}switch(v_(t)){case"start":h[a]-=m*(n&&c?-1:1);break;case"end":h[a]+=m*(n&&c?-1:1);break}return h}const $0e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:p}=Z2(c,r,l),m=r,h={},y=0;for(let v=0;v<s.length;v++){const{name:w,fn:_}=s[v],{x:b,y:S,data:A,reset:E}=await _({x:d,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});if(d=b??d,p=S??p,h={...h,[w]:{...h[w],...A}},E&&y<=50){y++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:d,y:p}=Z2(c,m,l)),v=-1;continue}}return{x:d,y:p,placement:m,strategy:i,middlewareData:h}};async function H2(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:m=!1,padding:h=0}=_m(t,e),y=w0e(h),w=s[m?p==="floating"?"reference":"floating":p],_=wm(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b=p==="floating"?{...a.floating,x:r,y:i}:a.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),A=await(o.isElement==null?void 0:o.isElement(S))?await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1}:{x:1,y:1},E=wm(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:S,strategy:l}):b);return{top:(_.top-E.top+y.top)/A.y,bottom:(E.bottom-_.bottom+y.bottom)/A.y,left:(_.left-E.left+y.left)/A.x,right:(E.right-_.right+y.right)/A.x}}async function k0e(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=df(n),s=v_(n),l=pf(n)==="y",c=["left","top"].includes(a)?-1:1,d=o&&l?-1:1,p=_m(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof y=="number"&&(h=s==="end"?y*-1:y),l?{x:h*d,y:m*c}:{x:m*c,y:h*d}}const I0e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await k0e(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},P0e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:w=>{let{x:_,y:b}=w;return{x:_,y:b}}},...l}=_m(e,t),c={x:n,y:r},d=await H2(t,l),p=pf(df(i)),m=D2(p);let h=c[m],y=c[p];if(o){const w=m==="y"?"top":"left",_=m==="y"?"bottom":"right",b=h+d[w],S=h-d[_];h=R2(b,h,S)}if(a){const w=p==="y"?"top":"left",_=p==="y"?"bottom":"right",b=y+d[w],S=y-d[_];y=R2(b,y,S)}const v=s.fn({...t,[m]:h,[p]:y});return{...v,data:{x:v.x-n,y:v.y-r}}}}},R0e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...s}=_m(e,t),l=await H2(t,s),c=df(n),d=v_(n),p=pf(n)==="y",{width:m,height:h}=r.floating;let y,v;c==="top"||c==="bottom"?(y=c,v=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=c,y=d==="end"?"top":"bottom");const w=h-l[y],_=m-l[v],b=!t.middlewareData.shift;let S=w,A=_;if(p){const T=m-l.left-l.right;A=d||b?ol(_,T):T}else{const T=h-l.top-l.bottom;S=d||b?ol(w,T):T}if(b&&!d){const T=ui(l.left,0),j=ui(l.right,0),L=ui(l.top,0),F=ui(l.bottom,0);p?A=m-2*(T!==0||j!==0?T+j:ui(l.left,l.right)):S=h-2*(L!==0||F!==0?L+F:ui(l.top,l.bottom))}await a({...t,availableWidth:A,availableHeight:S});const E=await i.getDimensions(o.floating);return m!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function W2(e){const t=ci(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ar(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=bm(n)!==o||bm(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function S_(e){return Fn(e)?e:e.contextElement}function sl(e){const t=S_(e);if(!Ar(t))return Ia(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=W2(t);let a=(o?bm(n.width):n.width)/r,s=(o?bm(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const D0e=Ia(0);function V2(e){const t=li(e);return!w_()||!t.visualViewport?D0e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function N0e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==li(e)?!1:t}function Fs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=S_(e);let a=Ia(1);t&&(r?Fn(r)&&(a=sl(r)):a=sl(e));const s=N0e(o,n,r)?V2(o):Ia(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,d=i.width/a.x,p=i.height/a.y;if(o){const m=li(o),h=r&&Fn(r)?li(r):r;let y=m.frameElement;for(;y&&r&&h!==m;){const v=sl(y),w=y.getBoundingClientRect(),_=ci(y),b=w.left+(y.clientLeft+parseFloat(_.paddingLeft))*v.x,S=w.top+(y.clientTop+parseFloat(_.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,p*=v.y,l+=b,c+=S,y=li(y).frameElement}}return wm({width:d,height:p,x:l,y:c})}function M0e(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ar(n),o=Go(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s=Ia(1);const l=Ia(0);if((i||!i&&r!=="fixed")&&((Pa(n)!=="body"||hf(o))&&(a=xm(n)),Ar(n))){const c=Fs(n);s=sl(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}}function j0e(e){return Array.from(e.getClientRects())}function K2(e){return Fs(Go(e)).left+xm(e).scrollLeft}function L0e(e){const t=Go(e),n=xm(e),r=e.ownerDocument.body,i=ui(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ui(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+K2(e);const s=-n.scrollTop;return ci(r).direction==="rtl"&&(a+=ui(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function F0e(e,t){const n=li(e),r=Go(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const c=w_();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function q0e(e,t){const n=Fs(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ar(e)?sl(e):Ia(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:a,height:s,x:l,y:c}}function G2(e,t,n){let r;if(t==="viewport")r=F0e(e,n);else if(t==="document")r=L0e(Go(e));else if(Fn(t))r=q0e(t,n);else{const i=V2(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return wm(r)}function Y2(e,t){const n=Ls(e);return n===t||!Fn(n)||mf(n)?!1:ci(n).position==="fixed"||Y2(n,t)}function U0e(e,t){const n=t.get(e);if(n)return n;let r=Ra(e,[],!1).filter(s=>Fn(s)&&Pa(s)!=="body"),i=null;const o=ci(e).position==="fixed";let a=o?Ls(e):e;for(;Fn(a)&&!mf(a);){const s=ci(a),l=__(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||hf(a)&&!l&&Y2(e,a))?r=r.filter(d=>d!==a):i=s,a=Ls(a)}return t.set(e,r),r}function B0e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?U0e(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,d)=>{const p=G2(t,d,i);return c.top=ui(p.top,c.top),c.right=ol(p.right,c.right),c.bottom=ol(p.bottom,c.bottom),c.left=ui(p.left,c.left),c},G2(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function z0e(e){return W2(e)}function Z0e(e,t,n){const r=Ar(t),i=Go(t),o=n==="fixed",a=Fs(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Ia(0);if(r||!r&&!o)if((Pa(t)!=="body"||hf(i))&&(s=xm(t)),r){const c=Fs(t,!0,o,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else i&&(l.x=K2(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function J2(e,t){return!Ar(e)||ci(e).position==="fixed"?null:t?t(e):e.offsetParent}function X2(e,t){const n=li(e);if(!Ar(e))return n;let r=J2(e,t);for(;r&&x0e(r)&&ci(r).position==="static";)r=J2(r,t);return r&&(Pa(r)==="html"||Pa(r)==="body"&&ci(r).position==="static"&&!__(r))?n:r||S0e(e)||n}const H0e=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||X2,o=this.getDimensions;return{reference:Z0e(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function W0e(e){return ci(e).direction==="rtl"}const V0e={convertOffsetParentRelativeRectToViewportRelativeRect:M0e,getDocumentElement:Go,getClippingRect:B0e,getOffsetParent:X2,getElementRects:H0e,getClientRects:j0e,getDimensions:z0e,getScale:sl,isElement:Fn,isRTL:W0e};function K0e(e,t){let n=null,r;const i=Go(e);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:c,top:d,width:p,height:m}=e.getBoundingClientRect();if(s||t(),!p||!m)return;const h=al(d),y=al(i.clientWidth-(c+p)),v=al(i.clientHeight-(d+m)),w=al(c),b={rootMargin:-h+"px "+-y+"px "+-v+"px "+-w+"px",threshold:ui(0,ol(1,l))||1};let S=!0;function A(E){const T=E[0].intersectionRatio;if(T!==l){if(!S)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(A,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,b)}n.observe(e)}return a(!0),o}function G0e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=S_(e),d=i||o?[...c?Ra(c):[],...Ra(t)]:[];d.forEach(_=>{i&&_.addEventListener("scroll",n,{passive:!0}),o&&_.addEventListener("resize",n)});const p=c&&s?K0e(c,n):null;let m=-1,h=null;a&&(h=new ResizeObserver(_=>{let[b]=_;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let y,v=l?Fs(e):null;l&&w();function w(){const _=Fs(e);v&&(_.x!==v.x||_.y!==v.y||_.width!==v.width||_.height!==v.height)&&n(),v=_,y=requestAnimationFrame(w)}return n(),()=>{d.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),p&&p(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const Y0e=(e,t,n)=>{const r=new Map,i={platform:V0e,...n},o={...i.platform,_c:r};return $0e(e,t,{...i,platform:o})};var Sm=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Em(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Em(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Em(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Q2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eD(e,t){const n=Q2(e);return Math.round(t*n)/n}function tD(e){const t=z.useRef(e);return Sm(()=>{t.current=e}),t}function J0e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,p]=z.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=z.useState(r);Em(m,r)||h(r);const[y,v]=z.useState(null),[w,_]=z.useState(null),b=z.useCallback(q=>{q!=T.current&&(T.current=q,v(q))},[v]),S=z.useCallback(q=>{q!==j.current&&(j.current=q,_(q))},[_]),A=o||y,E=a||w,T=z.useRef(null),j=z.useRef(null),L=z.useRef(d),F=tD(l),M=tD(i),H=z.useCallback(()=>{if(!T.current||!j.current)return;const q={placement:t,strategy:n,middleware:m};M.current&&(q.platform=M.current),Y0e(T.current,j.current,q).then(Y=>{const ne={...Y,isPositioned:!0};re.current&&!Em(L.current,ne)&&(L.current=ne,r3.flushSync(()=>{p(ne)}))})},[m,t,n,M]);Sm(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,p(q=>({...q,isPositioned:!1})))},[c]);const re=z.useRef(!1);Sm(()=>(re.current=!0,()=>{re.current=!1}),[]),Sm(()=>{if(A&&(T.current=A),E&&(j.current=E),A&&E){if(F.current)return F.current(A,E,H);H()}},[A,E,H,F]);const Q=z.useMemo(()=>({reference:T,floating:j,setReference:b,setFloating:S}),[b,S]),G=z.useMemo(()=>({reference:A,floating:E}),[A,E]),V=z.useMemo(()=>{const q={position:n,left:0,top:0};if(!G.floating)return q;const Y=eD(G.floating,d.x),ne=eD(G.floating,d.y);return s?{...q,transform:"translate("+Y+"px, "+ne+"px)",...Q2(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:ne}},[n,s,G.floating,d.x,d.y]);return z.useMemo(()=>({...d,update:H,refs:Q,elements:G,floatingStyles:V}),[d,H,Q,G,V])}/*!
|
|
419
419
|
* tabbable 6.2.0
|
|
420
420
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
421
|
-
*/var X0e=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],E_=X0e.join(","),nD=typeof Element>"u",yf=nD?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Am=!nD&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Cm=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&e(t.parentNode);return a},Q0e=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},e_e=function(t,n,r){if(Cm(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(E_));return n&&yf.call(t,E_)&&i.unshift(t),i=i.filter(r),i},t_e=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Cm(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:a,candidates:c})}else{var d=yf.call(a,E_);d&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!Cm(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(p&&m){var h=e(p===!0?a.children:p.children,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:a,candidates:h})}else o.unshift.apply(o,a.children)}}return i},rD=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},iD=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Q0e(t))&&!rD(t)?0:t.tabIndex},n_e=function(t,n){var r=iD(t);return r<0&&n&&!rD(t)?0:r},r_e=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},oD=function(t){return t.tagName==="INPUT"},i_e=function(t){return oD(t)&&t.type==="hidden"},o_e=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},a_e=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},s_e=function(t){if(!t.name)return!0;var n=t.form||Am(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=a_e(i,t.form);return!o||o===t},u_e=function(t){return oD(t)&&t.type==="radio"},l_e=function(t){return u_e(t)&&!s_e(t)},c_e=function(t){var n,r=t&&Am(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,s,l;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var c,d,p;r=Am(i),i=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=i)!==null&&d!==void 0&&(p=d.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return o},aD=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},f_e=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=yf.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(yf.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,c=Am(t);if(l&&!l.shadowRoot&&i(l)===!0)return aD(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(c_e(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return aD(t);return!1},d_e=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return yf.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},p_e=function(t,n){return!(n.disabled||Cm(n)||i_e(n)||f_e(n,t)||o_e(n)||d_e(n))},sD=function(t,n){return!(l_e(n)||iD(n)<0||!p_e(t,n))},h_e=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},m_e=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=n_e(s,a),c=a?e(i.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:c})}),r.sort(r_e).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},A_=function(t,n){n=n||{};var r;return n.getShadowRoot?r=t_e([t],n.includeContainer,{filter:sD.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:h_e}):r=e_e(t,n.includeContainer,sD.bind(null,n)),m_e(r)};const C_="ArrowUp",Om="ArrowDown",ul="ArrowLeft",gf="ArrowRight";function Tm(e,t,n){return Math.floor(e/t)!==n}function vf(e,t){return t<0||t>=e.current.length}function O_(e,t){return Cr(e,{disabledIndices:t})}function uD(e,t){return Cr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Cr(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,c;s=s+(r?-o:o)}while(s>=0&&s<=a.length-1&&(i?i.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((c=a[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function y_e(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:d=!1}=t,p=c;if(n.key===C_){if(d&&hr(n),c===-1)p=l;else if(p=Cr(e,{startingIndex:p,amount:o,decrement:!0,disabledIndices:a}),i&&(c-o<s||p<0)){const m=c%o,h=l%o,y=l-(h-m);h===m?p=l:p=h>m?y:y-o}vf(e,p)&&(p=c)}if(n.key===Om&&(d&&hr(n),c===-1?p=s:(p=Cr(e,{startingIndex:c,amount:o,disabledIndices:a}),i&&c+o>l&&(p=Cr(e,{startingIndex:c%o-o,amount:o,disabledIndices:a}))),vf(e,p)&&(p=c)),r==="both"){const m=al(c/o);n.key===gf&&(d&&hr(n),c%o!==o-1?(p=Cr(e,{startingIndex:c,disabledIndices:a}),i&&Tm(p,o,m)&&(p=Cr(e,{startingIndex:c-c%o-1,disabledIndices:a}))):i&&(p=Cr(e,{startingIndex:c-c%o-1,disabledIndices:a})),Tm(p,o,m)&&(p=c)),n.key===ul&&(d&&hr(n),c%o!==0?(p=Cr(e,{startingIndex:c,disabledIndices:a,decrement:!0}),i&&Tm(p,o,m)&&(p=Cr(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a}))):i&&(p=Cr(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a})),Tm(p,o,m)&&(p=c));const h=al(l/o)===m;vf(e,p)&&(i&&h?p=n.key===ul?l:Cr(e,{startingIndex:c-c%o-1,disabledIndices:a}):p=c)}return p}let lD=0;function Yo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(lD);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():lD=requestAnimationFrame(o)}var er=typeof document<"u"?C.useLayoutEffect:C.useEffect;function $m(){return $m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$m.apply(this,arguments)}let T_=!1,g_e=0;const cD=()=>"floating-ui-"+g_e++;function v_e(){const[e,t]=z.useState(()=>T_?cD():void 0);return er(()=>{e==null&&t(cD())},[]),z.useEffect(()=>{T_||(T_=!0)},[]),e}const $_=z["useId".toString()]||v_e;function b_e(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const __e=z.createContext(null),w_e=z.createContext(null),fD=()=>{var e;return((e=z.useContext(__e))==null?void 0:e.id)||null},km=()=>z.useContext(w_e);function bf(e){return"data-floating-ui-"+e}function Na(e){const t=C.useRef(e);return er(()=>{t.current=e}),t}function x_e(e,t){var n;let r=[],i=(n=e.find(o=>o.id===t))==null?void 0:n.parentId;for(;i;){const o=e.find(a=>a.id===i);i=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function ll(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function S_e(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),ll(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let cl=new WeakMap,Im=new WeakSet,Pm={},k_=0;const E_e=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,dD=e=>e&&(e.host||dD(e.parentNode)),A_e=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=dD(n);return e.contains(r)?r:null}).filter(n=>n!=null);function C_e(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=A_e(t,e),s=new Set,l=new Set(a),c=[];Pm[i]||(Pm[i]=new WeakMap);const d=Pm[i];a.forEach(p),m(t),s.clear();function p(h){!h||s.has(h)||(s.add(h),h.parentNode&&p(h.parentNode))}function m(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,y=>{if(s.has(y))m(y);else{const v=o?y.getAttribute(o):null,w=v!==null&&v!=="false",_=(cl.get(y)||0)+1,b=(d.get(y)||0)+1;cl.set(y,_),d.set(y,b),c.push(y),_===1&&w&&Im.add(y),b===1&&y.setAttribute(i,""),!w&&o&&y.setAttribute(o,"true")}})}return k_++,()=>{c.forEach(h=>{const y=(cl.get(h)||0)-1,v=(d.get(h)||0)-1;cl.set(h,y),d.set(h,v),y||(!Im.has(h)&&o&&h.removeAttribute(o),Im.delete(h)),v||h.removeAttribute(i)}),k_--,k_||(cl=new WeakMap,cl=new WeakMap,Im=new WeakSet,Pm={})}}function pD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Zi(e[0]).body;return C_e(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const I_=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function hD(e,t){const n=A_(e,I_());t==="prev"&&n.reverse();const r=n.indexOf(Da(Zi(e)));return n.slice(r+1)[0]}function mD(){return hD(document.body,"next")}function yD(){return hD(document.body,"prev")}function _f(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Yr(n,r)}function O_e(e){A_(e,I_()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function T_e(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const P_={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let $_e;function gD(e){e.key==="Tab"&&(e.target,clearTimeout($_e))}const Rm=z.forwardRef(function(t,n){const[r,i]=z.useState();er(()=>(q2()&&i("button"),document.addEventListener("keydown",gD),()=>{document.removeEventListener("keydown",gD)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[bf("focus-guard")]:"",style:P_};return z.createElement("span",$m({},t,o))}),vD=z.createContext(null);function k_e(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=z.useState(null),o=$_(),a=bD(),s=z.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:o}),[t,n,a,o]),l=z.useRef();return er(()=>()=>{r==null||r.remove()},[r,s]),er(()=>{if(l.current===s)return;l.current=s;const{id:c,root:d,portalContext:p,uniqueId:m}=s,h=c?document.getElementById(c):null,y=bf("portal");if(h){const v=document.createElement("div");v.id=m,v.setAttribute(y,""),h.appendChild(v),i(v)}else{let v=d||(p==null?void 0:p.portalNode);v&&!Fn(v)&&(v=v.current),v=v||document.body;let w=null;c&&(w=document.createElement("div"),w.id=c,v.appendChild(w));const _=document.createElement("div");_.id=m,_.setAttribute(y,""),v=w||v,v.appendChild(_),i(_)}},[s]),r}function I_e(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=k_e({id:n,root:r}),[a,s]=z.useState(null),l=z.useRef(null),c=z.useRef(null),d=z.useRef(null),p=z.useRef(null),m=!!a&&!a.modal&&a.open&&i&&!!(r||o);return z.useEffect(()=>{if(!o||!i||a!=null&&a.modal)return;function h(y){o&&_f(y)&&(y.type==="focusin"?T_e:O_e)(o)}return o.addEventListener("focusin",h,!0),o.addEventListener("focusout",h,!0),()=>{o.removeEventListener("focusin",h,!0),o.removeEventListener("focusout",h,!0)}},[o,i,a==null?void 0:a.modal]),z.createElement(vD.Provider,{value:z.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:p,portalNode:o,setFocusManagerState:s}),[i,o])},m&&o&&z.createElement(Rm,{"data-type":"outside",ref:l,onFocus:h=>{if(_f(h,o)){var y;(y=d.current)==null||y.focus()}else{const v=yD()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus()}}}),m&&o&&z.createElement("span",{"aria-owns":o.id,style:P_}),o&&Xi.createPortal(t,o),m&&o&&z.createElement(Rm,{"data-type":"outside",ref:c,onFocus:h=>{if(_f(h,o)){var y;(y=p.current)==null||y.focus()}else{const v=mD()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,h.nativeEvent))}}}))}const bD=()=>z.useContext(vD),P_e=z.forwardRef(function(t,n){return z.createElement("button",$m({},t,{type:"button",ref:n,tabIndex:-1,style:P_}))});function R_e(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:m,nodeId:h,onOpenChange:y,events:v,dataRef:w,elements:{domReference:_,floating:b}}=t,S=E_e()?o:!0,A=Na(i),E=Na(a),T=Na(s),N=km(),L=bD(),F=typeof a=="number"&&a<0,j=z.useRef(null),H=z.useRef(null),re=z.useRef(!1),Q=z.useRef(null),G=z.useRef(!1),V=L!=null,q=_&&_.getAttribute("role")==="combobox"&&z2(_)&&F,Y=z.useCallback(function(ue){return ue===void 0&&(ue=b),ue?A_(ue,I_()):[]},[b]),ne=z.useCallback(ue=>{const Oe=Y(ue);return A.current.map(M=>_&&M==="reference"?_:b&&M==="floating"?b:Oe).filter(Boolean).flat()},[_,b,A,Y]);z.useEffect(()=>{if(r||!l)return;function ue(M){if(M.key==="Tab"){Yr(b,Da(Zi(b)))&&Y().length===0&&!q&&hr(M);const Ne=ne(),qe=B2(M);A.current[0]==="reference"&&qe===_&&(hr(M),M.shiftKey?Yo(Ne[Ne.length-1]):Yo(Ne[1])),A.current[1]==="floating"&&qe===b&&M.shiftKey&&(hr(M),Yo(Ne[0]))}}const Oe=Zi(b);return Oe.addEventListener("keydown",ue),()=>{Oe.removeEventListener("keydown",ue)}},[r,_,b,l,A,m,q,Y,ne]),z.useEffect(()=>{if(r||!d)return;function ue(){G.current=!0,setTimeout(()=>{G.current=!1})}function Oe(M){const Ne=M.relatedTarget;queueMicrotask(()=>{const qe=!(Yr(_,Ne)||Yr(b,Ne)||Yr(Ne,b)||Yr(L==null?void 0:L.portalNode,Ne)||Ne!=null&&Ne.hasAttribute(bf("focus-guard"))||N&&(ll(N.nodesRef.current,h).find(Me=>{var Je,rt;return Yr((Je=Me.context)==null?void 0:Je.elements.floating,Ne)||Yr((rt=Me.context)==null?void 0:rt.elements.domReference,Ne)})||x_e(N.nodesRef.current,h).find(Me=>{var Je,rt;return((Je=Me.context)==null?void 0:Je.elements.floating)===Ne||((rt=Me.context)==null?void 0:rt.elements.domReference)===Ne})));Ne&&qe&&!G.current&&Ne!==Q.current&&(re.current=!0,y(!1,M))})}if(b&&Ar(_))return _.addEventListener("focusout",Oe),_.addEventListener("pointerdown",ue),!l&&b.addEventListener("focusout",Oe),()=>{_.removeEventListener("focusout",Oe),_.removeEventListener("pointerdown",ue),!l&&b.removeEventListener("focusout",Oe)}},[r,_,b,l,h,N,L,y,d]),z.useEffect(()=>{var ue;if(r)return;const Oe=Array.from((L==null||(ue=L.portalNode)==null?void 0:ue.querySelectorAll("["+bf("portal")+"]"))||[]);if(b){const M=[b,...Oe,j.current,H.current,A.current.includes("reference")||q?_:null].filter(qe=>qe!=null),Ne=l?pD(M,S,!S):pD(M);return()=>{Ne()}}},[r,_,b,l,A,L,q,S]),er(()=>{if(r||!b)return;const ue=Zi(b),Oe=Da(ue);queueMicrotask(()=>{const M=ne(b),Ne=E.current,qe=(typeof Ne=="number"?M[Ne]:Ne.current)||b,Me=Yr(b,Oe);!F&&!Me&&p&&Yo(qe,{preventScroll:qe===b})})},[r,p,b,F,ne,E]),er(()=>{if(r||!b)return;let ue=!1;const Oe=Zi(b),M=Da(Oe),Ne=w.current;Q.current=M;function qe(Me){if(Me.type==="escapeKey"&&m.domReference.current&&(Q.current=m.domReference.current),["referencePress","escapeKey"].includes(Me.type))return;const Je=Me.data.returnFocus;typeof Je=="object"?(re.current=!1,ue=Je.preventScroll):re.current=!Je}return v.on("dismiss",qe),()=>{v.off("dismiss",qe);const Me=Da(Oe);(Yr(b,Me)||N&&ll(N.nodesRef.current,h).some(rt=>{var Ke;return Yr((Ke=rt.context)==null?void 0:Ke.elements.floating,Me)})||Ne.openEvent&&["click","mousedown"].includes(Ne.openEvent.type))&&m.domReference.current&&(Q.current=m.domReference.current),T.current&&Ar(Q.current)&&!re.current&&Yo(Q.current,{cancelPrevious:!1,preventScroll:ue})}},[r,b,T,w,m,v,N,h]),er(()=>{if(!(r||!L))return L.setFocusManagerState({modal:l,closeOnFocusOut:d,open:p,onOpenChange:y,refs:m}),()=>{L.setFocusManagerState(null)}},[r,L,l,p,y,m,d]),er(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!F){const ue=()=>{const M=b.getAttribute("tabindex");A.current.includes("floating")||Da(Zi(b))!==m.domReference.current&&Y().length===0?M!=="0"&&b.setAttribute("tabindex","0"):M!=="-1"&&b.setAttribute("tabindex","-1")};ue();const Oe=new MutationObserver(ue);return Oe.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{Oe.disconnect()}}},[r,b,m,A,Y,F]);function ce(ue){return r||!c||!l?null:z.createElement(P_e,{ref:ue==="start"?j:H,onClick:Oe=>y(!1,Oe.nativeEvent)},typeof c=="string"?c:"Dismiss")}const P=!r&&S&&!q&&(V||l);return z.createElement(z.Fragment,null,P&&z.createElement(Rm,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:ue=>{if(l){const M=ne();Yo(i[0]==="reference"?M[0]:M[M.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(re.current=!1,_f(ue,L.portalNode)){const M=mD()||_;M==null||M.focus()}else{var Oe;(Oe=L.beforeOutsideRef.current)==null||Oe.focus()}}}),!q&&ce("start"),n,ce("end"),P&&z.createElement(Rm,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:ue=>{if(l)Yo(ne()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(d&&(re.current=!0),_f(ue,L.portalNode)){const M=yD()||_;M==null||M.focus()}else{var Oe;(Oe=L.afterOutsideRef.current)==null||Oe.focus()}}}))}function _D(e){return Ar(e.target)&&e.target.tagName==="BUTTON"}function wD(e){return z2(e)}function D_e(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0}=t,p=z.useRef(),m=z.useRef(!1);return z.useMemo(()=>a?{reference:{onPointerDown(h){p.current=h.pointerType},onMouseDown(h){h.button===0&&(U2(p.current,!0)&&c||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent):(h.preventDefault(),r(!0,h.nativeEvent))))},onClick(h){if(s==="mousedown"&&p.current){p.current=void 0;return}U2(p.current,!0)&&c||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,h.nativeEvent):r(!0,h.nativeEvent))},onKeyDown(h){p.current=void 0,!(h.defaultPrevented||!d||_D(h))&&(h.key===" "&&!wD(o)&&(h.preventDefault(),m.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent))},onKeyUp(h){h.defaultPrevented||!d||_D(h)||wD(o)||h.key===" "&&m.current&&(m.current=!1,r(!(n&&l),h.nativeEvent))}}}:{},[a,i,s,c,d,o,l,n,r])}const N_e=z["useInsertionEffect".toString()]||(e=>e());function Ma(e){const t=z.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return N_e(()=>{t.current=e}),z.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const M_e={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},j_e={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},L_e=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function F_e(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:o,elements:{reference:a,domReference:s,floating:l},dataRef:c}=e,{enabled:d=!0,escapeKey:p=!0,outsidePress:m=!0,outsidePressEvent:h="pointerdown",referencePress:y=!1,referencePressEvent:v="pointerdown",ancestorScroll:w=!1,bubbles:_}=t,b=km(),S=fD()!=null,A=Ma(typeof m=="function"?m:()=>!1),E=typeof m=="function"?A:m,T=z.useRef(!1),{escapeKeyBubbles:N,outsidePressBubbles:L}=L_e(_),F=Ma(H=>{if(!n||!d||!p||H.key!=="Escape")return;const re=b?ll(b.nodesRef.current,o):[];if(!N&&(H.stopPropagation(),re.length>0)){let Q=!0;if(re.forEach(G=>{var V;if((V=G.context)!=null&&V.open&&!G.context.dataRef.current.__escapeKeyBubbles){Q=!1;return}}),!Q)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,C0e(H)?H.nativeEvent:H)}),j=Ma(H=>{const re=T.current;if(T.current=!1,re||typeof E=="function"&&!E(H))return;const Q=B2(H),G="["+bf("inert")+"]",V=Zi(l).querySelectorAll(G);let q=Fn(Q)?Q:null;for(;q&&!mf(q);){const ce=Ls(q);if(ce===Zi(l).body||!Fn(ce))break;q=ce}if(V.length&&Fn(Q)&&!O0e(Q)&&!Yr(Q,l)&&Array.from(V).every(ce=>!Yr(q,ce)))return;if(Ar(Q)&&l){const ce=Q.clientWidth>0&&Q.scrollWidth>Q.clientWidth,P=Q.clientHeight>0&&Q.scrollHeight>Q.clientHeight;let ue=P&&H.offsetX>Q.clientWidth;if(P&&ci(Q).direction==="rtl"&&(ue=H.offsetX<=Q.offsetWidth-Q.clientWidth),ue||ce&&H.offsetY>Q.clientHeight)return}const Y=b&&ll(b.nodesRef.current,o).some(ce=>{var P;return x_(H,(P=ce.context)==null?void 0:P.elements.floating)});if(x_(H,l)||x_(H,s)||Y)return;const ne=b?ll(b.nodesRef.current,o):[];if(ne.length>0){let ce=!0;if(ne.forEach(P=>{var ue;if((ue=P.context)!=null&&ue.open&&!P.context.dataRef.current.__outsidePressBubbles){ce=!1;return}}),!ce)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:S?{preventScroll:!0}:L2(H)||F2(H)}}),r(!1,H)});return z.useEffect(()=>{if(!n||!d)return;c.current.__escapeKeyBubbles=N,c.current.__outsidePressBubbles=L;function H(G){r(!1,G)}const re=Zi(l);p&&re.addEventListener("keydown",F),E&&re.addEventListener(h,j);let Q=[];return w&&(Fn(s)&&(Q=Ra(s)),Fn(l)&&(Q=Q.concat(Ra(l))),!Fn(a)&&a&&a.contextElement&&(Q=Q.concat(Ra(a.contextElement)))),Q=Q.filter(G=>{var V;return G!==((V=re.defaultView)==null?void 0:V.visualViewport)}),Q.forEach(G=>{G.addEventListener("scroll",H,{passive:!0})}),()=>{p&&re.removeEventListener("keydown",F),E&&re.removeEventListener(h,j),Q.forEach(G=>{G.removeEventListener("scroll",H)})}},[c,l,s,a,p,E,h,n,r,w,d,N,L,F,j]),z.useEffect(()=>{T.current=!1},[E,h]),z.useMemo(()=>d?{reference:{onKeyDown:F,[M_e[v]]:H=>{y&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,H.nativeEvent))}},floating:{onKeyDown:F,[j_e[h]]:()=>{T.current=!0}}}:{},[d,i,y,h,v,r,F])}let R_;process.env.NODE_ENV!=="production"&&(R_=new Set);function q_e(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var o;const N="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((o=e.elements)!=null&&o.reference&&!Fn(e.elements.reference)){var a;if(!((a=R_)!=null&&a.has(N))){var s;(s=R_)==null||s.add(N),console.error(N)}}}const[l,c]=z.useState(null),d=((t=e.elements)==null?void 0:t.reference)||l,p=J0e(e),m=km(),h=Ma((N,L)=>{N&&(v.current.openEvent=L),r==null||r(N,L)}),y=z.useRef(null),v=z.useRef({}),w=z.useState(()=>b_e())[0],_=$_(),b=z.useCallback(N=>{const L=Fn(N)?{getBoundingClientRect:()=>N.getBoundingClientRect(),contextElement:N}:N;p.refs.setReference(L)},[p.refs]),S=z.useCallback(N=>{(Fn(N)||N===null)&&(y.current=N,c(N)),(Fn(p.refs.reference.current)||p.refs.reference.current===null||N!==null&&!Fn(N))&&p.refs.setReference(N)},[p.refs]),A=z.useMemo(()=>({...p.refs,setReference:S,setPositionReference:b,domReference:y}),[p.refs,S,b]),E=z.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),T=z.useMemo(()=>({...p,refs:A,elements:E,dataRef:v,nodeId:i,floatingId:_,events:w,open:n,onOpenChange:h}),[p,i,_,w,n,h,A,E]);return er(()=>{const N=m==null?void 0:m.nodesRef.current.find(L=>L.id===i);N&&(N.context=T)}),z.useMemo(()=>({...p,context:T,refs:A,elements:E}),[p,A,E,T])}function D_(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var c;(c=r.get(s))==null||c.push(l),i[s]=function(){for(var d,p=arguments.length,m=new Array(p),h=0;h<p;h++)m[h]=arguments[h];return(d=r.get(s))==null?void 0:d.map(y=>y(...m)).find(y=>y!==void 0)}}}else i[s]=l}),i),{})}}function U_e(e){e===void 0&&(e=[]);const t=e,n=z.useCallback(o=>D_(o,e,"reference"),t),r=z.useCallback(o=>D_(o,e,"floating"),t),i=z.useCallback(o=>D_(o,e,"item"),e.map(o=>o==null?void 0:o.item));return z.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let xD=!1;function Dm(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function SD(e,t){return Dm(t,e===C_||e===Om,e===ul||e===gf)}function N_(e,t,n){return Dm(t,e===Om,n?e===ul:e===gf)||e==="Enter"||e==" "||e===""}function B_e(e,t,n){return Dm(t,n?e===ul:e===gf,e===Om)}function ED(e,t,n){return Dm(t,n?e===gf:e===ul,e===C_)}function z_e(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:o,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:p=null,allowEscape:m=!1,loop:h=!1,nested:y=!1,rtl:v=!1,virtual:w=!1,focusItemOnOpen:_="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:S=!0,disabledIndices:A=void 0,orientation:E="vertical",cols:T=1,scrollItemIntoView:N=!0,virtualItemRef:L}=t;process.env.NODE_ENV!=="production"&&(m&&(h||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),w||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),E==="vertical"&&T>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const F=fD(),j=km(),H=Ma(c),re=z.useRef(_),Q=z.useRef(p??-1),G=z.useRef(null),V=z.useRef(!0),q=z.useRef(H),Y=z.useRef(!!a),ne=z.useRef(!1),ce=z.useRef(!1),P=Na(A),ue=Na(n),Oe=Na(N),[M,Ne]=z.useState(),[qe,Me]=z.useState(),Je=Ma(function(Pe,Ae,Fe){Fe===void 0&&(Fe=!1);const $e=Pe.current[Ae.current];$e&&(w?(Ne($e.id),j==null||j.events.emit("virtualfocus",$e),L&&(L.current=$e)):Yo($e,{preventScroll:!0,sync:A0e()&&q2()?xD||ne.current:!1}),requestAnimationFrame(()=>{const Ze=Oe.current;Ze&&$e&&(Fe||!V.current)&&($e.scrollIntoView==null||$e.scrollIntoView(typeof Ze=="boolean"?{block:"nearest",inline:"nearest"}:Ze))}))});er(()=>{document.createElement("div").focus({get preventScroll(){return xD=!0,!1}})},[]),er(()=>{d&&(n&&a?re.current&&p!=null&&(ce.current=!0,H(p)):Y.current&&(Q.current=-1,q.current(null)))},[d,n,a,p,H]),er(()=>{if(d&&n&&a)if(l==null){if(ne.current=!1,p!=null)return;if(Y.current&&(Q.current=-1,Je(s,Q)),!Y.current&&re.current&&(G.current!=null||re.current===!0&&G.current==null)){let Pe=0;const Ae=()=>{s.current[0]==null?(Pe<2&&(Pe?requestAnimationFrame:queueMicrotask)(Ae),Pe++):(Q.current=G.current==null||N_(G.current,E,v)||y?O_(s,P.current):uD(s,P.current),G.current=null,H(Q.current))};Ae()}}else vf(s,l)||(Q.current=l,Je(s,Q,ce.current),ce.current=!1)},[d,n,a,l,p,y,s,E,v,H,Je,P]),er(()=>{var Pe,Ae;if(!d||a||!j||w||!Y.current)return;const Fe=j.nodesRef.current,$e=(Pe=Fe.find(K=>K.id===F))==null||(Ae=Pe.context)==null?void 0:Ae.elements.floating,Ze=Da(Zi(a)),lt=Fe.some(K=>K.context&&Yr(K.context.elements.floating,Ze));$e&&!lt&&V.current&&$e.focus({preventScroll:!0})},[d,a,j,F,w]),er(()=>{if(!d||!j||!w||F)return;function Pe(Ae){Me(Ae.id),L&&(L.current=Ae)}return j.events.on("virtualfocus",Pe),()=>{j.events.off("virtualfocus",Pe)}},[d,j,w,F,L]),er(()=>{q.current=H,Y.current=!!a}),er(()=>{n||(G.current=null)},[n]);const rt=l!=null,Ke=z.useMemo(()=>{function Pe(Fe){if(!n)return;const $e=s.current.indexOf(Fe);$e!==-1&&H($e)}return{onFocus(Fe){let{currentTarget:$e}=Fe;Pe($e)},onClick:Fe=>{let{currentTarget:$e}=Fe;return $e.focus({preventScroll:!0})},...b&&{onMouseMove(Fe){let{currentTarget:$e}=Fe;Pe($e)},onPointerLeave(Fe){let{pointerType:$e}=Fe;!V.current||$e==="touch"||(Q.current=-1,Je(s,Q),H(null),w||Yo(i.floating.current,{preventScroll:!0}))}}}},[n,i,Je,b,s,H,w]);return z.useMemo(()=>{if(!d)return{};const Pe=P.current;function Ae(K){if(V.current=!1,ne.current=!0,!ue.current&&K.currentTarget===i.floating.current)return;if(y&&ED(K.key,E,v)){hr(K),r(!1,K.nativeEvent),Ar(o)&&!w&&o.focus();return}const pe=Q.current,Te=O_(s,Pe),Se=uD(s,Pe);if(K.key==="Home"&&(hr(K),Q.current=Te,H(Q.current)),K.key==="End"&&(hr(K),Q.current=Se,H(Q.current)),!(T>1&&(Q.current=y_e(s,{event:K,orientation:E,loop:h,cols:T,disabledIndices:Pe,minIndex:Te,maxIndex:Se,prevIndex:Q.current,stopEvent:!0}),H(Q.current),E==="both"))&&SD(K.key,E)){if(hr(K),n&&!w&&Da(K.currentTarget.ownerDocument)===K.currentTarget){Q.current=N_(K.key,E,v)?Te:Se,H(Q.current);return}N_(K.key,E,v)?h?Q.current=pe>=Se?m&&pe!==s.current.length?-1:Te:Cr(s,{startingIndex:pe,disabledIndices:Pe}):Q.current=Math.min(Se,Cr(s,{startingIndex:pe,disabledIndices:Pe})):h?Q.current=pe<=Te?m&&pe!==-1?s.current.length:Se:Cr(s,{startingIndex:pe,decrement:!0,disabledIndices:Pe}):Q.current=Math.max(Te,Cr(s,{startingIndex:pe,decrement:!0,disabledIndices:Pe})),vf(s,Q.current)?H(null):H(Q.current)}}function Fe(K){_==="auto"&&L2(K.nativeEvent)&&(re.current=!0)}function $e(K){re.current=_,_==="auto"&&F2(K.nativeEvent)&&(re.current=!0)}const Ze=w&&n&&rt&&{"aria-activedescendant":qe||M},lt=s.current.find(K=>(K==null?void 0:K.id)===M);return{reference:{...Ze,onKeyDown(K){V.current=!1;const pe=K.key.indexOf("Arrow")===0,Te=B_e(K.key,E,v),Se=ED(K.key,E,v),et=SD(K.key,E),Ue=(y?Te:et)||K.key==="Enter"||K.key.trim()==="";if(w&&n){const ie=j==null?void 0:j.nodesRef.current.find(xe=>xe.parentId==null),ge=j&&ie?S_e(j.nodesRef.current,ie.id):null;if(pe&&ge&&L){const xe=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Te||Se){var ot,It;const Be=((ot=ge.context)==null?void 0:ot.elements.domReference)===K.currentTarget,ct=Se&&!Be?(It=ge.context)==null?void 0:It.elements.domReference:Te?lt:null;ct&&(hr(K),ct.dispatchEvent(xe),Me(void 0))}if(et&&ge.context&&ge.context.open&&ge.parentId&&K.currentTarget!==ge.context.elements.domReference){var mt;hr(K),(mt=ge.context.elements.domReference)==null||mt.dispatchEvent(xe);return}}return Ae(K)}if(!(!n&&!S&&pe)){if(Ue&&(G.current=y&&et?null:K.key),y){Te&&(hr(K),n?(Q.current=O_(s,Pe),H(Q.current)):r(!0,K.nativeEvent));return}et&&(p!=null&&(Q.current=p),hr(K),!n&&S?r(!0,K.nativeEvent):Ae(K),n&&H(Q.current))}},onFocus(){n&&H(null)},onPointerDown:$e,onMouseDown:Fe,onClick:Fe},floating:{"aria-orientation":E==="both"?void 0:E,...Ze,onKeyDown:Ae,onPointerMove(){V.current=!0}},item:Ke}},[o,i,M,qe,P,ue,s,d,E,v,w,n,rt,y,p,S,m,T,h,_,H,r,Ke,j,L])}function Z_e(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=$_();return z.useMemo(()=>{const s={id:r,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?r:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[i,o,n,r,a])}function H_e(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:d=null,resetMs:p=750,ignoreKeys:m=[],selectedIndex:h=null}=t,y=z.useRef(),v=z.useRef(""),w=z.useRef((n=h??a)!=null?n:-1),_=z.useRef(null),b=Ma(s),S=Ma(l),A=Na(d),E=Na(m);return er(()=>{r&&(clearTimeout(y.current),_.current=null,v.current="")},[r]),er(()=>{if(r&&v.current===""){var T;w.current=(T=h??a)!=null?T:-1}},[r,h,a]),z.useMemo(()=>{if(!c)return{};function T(F){F?i.current.typing||(i.current.typing=F,S(F)):i.current.typing&&(i.current.typing=F,S(F))}function N(F,j,H){const re=A.current?A.current(j,H):j.find(Q=>(Q==null?void 0:Q.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return re?F.indexOf(re):-1}function L(F){const j=o.current;if(v.current.length>0&&v.current[0]!==" "&&(N(j,j,v.current)===-1?T(!1):F.key===" "&&hr(F)),j==null||E.current.includes(F.key)||F.key.length!==1||F.ctrlKey||F.metaKey||F.altKey)return;r&&F.key!==" "&&(hr(F),T(!0)),j.every(G=>{var V,q;return G?((V=G[0])==null?void 0:V.toLocaleLowerCase())!==((q=G[1])==null?void 0:q.toLocaleLowerCase()):!0})&&v.current===F.key&&(v.current="",w.current=_.current),v.current+=F.key,clearTimeout(y.current),y.current=setTimeout(()=>{v.current="",w.current=_.current,T(!1)},p);const re=w.current,Q=N(j,[...j.slice((re||0)+1),...j.slice(0,(re||0)+1)],v.current);Q!==-1?(b(Q),_.current=Q):F.key!==" "&&(v.current="",T(!1))}return{reference:{onKeyDown:L},floating:{onKeyDown:L,onKeyUp(F){F.key===" "&&T(!1)}}}},[c,r,i,o,p,E,A,b,S])}const W_e=({styles:e,type:t,options:n,label:r,reusable:i})=>{var Y,ne,ce,P,ue,Oe,M,Ne,qe,Me,Je,rt;const o=it(Ke=>Ke.sendTextMessage),a=it(Ke=>Ke.messageContainerRef),s=it(Ke=>Ke.isReadOnly),[l,c]=z.useState(!1),[d,p]=z.useState(null),[m,h]=z.useState(null),y=n.reduce((Ke,Pe)=>(Ke[Pe.label]=Pe.value,Ke),{}),v=y?Object.keys(y):[],w=Ke=>{c(m!==null&&!i?!1:Ke)},{refs:_,floatingStyles:b,context:S}=q_e({placement:"bottom-start",open:l,onOpenChange:w,whileElementsMounted:G0e,middleware:[I0e(5),P0e({padding:10,boundary:(a==null?void 0:a.current)??void 0,crossAxis:!0}),R0e({apply({rects:Ke,elements:Pe,availableHeight:Ae}){Object.assign(Pe.floating.style,{maxHeight:`${Ae}px`,minWidth:`${Ke.reference.width}px`})},padding:10})]}),A=z.useRef([]),E=z.useRef(v),T=z.useRef(!1),N=D_e(S,{event:"mousedown"}),L=F_e(S),F=Z_e(S,{role:"listbox"}),j=z_e(S,{listRef:A,activeIndex:d,selectedIndex:m,onNavigate:p,loop:!0}),H=H_e(S,{listRef:E,activeIndex:d,selectedIndex:m,onMatch:l?p:h,onTypingChange(Ke){T.current=Ke}}),{getReferenceProps:re,getFloatingProps:Q,getItemProps:G}=U_e([L,F,j,H,N]),V=Ke=>{h(Ke),o(y[v[Ke]]),c(!1)},q=m!==null?v[m]:void 0;return X.jsxs(X.Fragment,{children:[X.jsxs("div",{tabIndex:0,ref:_.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":m!==null&&!i?"":void 0,...(ne=(Y=e==null?void 0:e[t])==null?void 0:Y.button)==null?void 0:ne.container,...re(),children:[X.jsx("span",{...(P=(ce=e==null?void 0:e[t])==null?void 0:ce.button)==null?void 0:P.text,children:q||r||"Select..."}),X.jsx(ybe,{...(Oe=(ue=e==null?void 0:e[t])==null?void 0:ue.button)==null?void 0:Oe.icon})]}),l&&X.jsx(I_e,{children:X.jsx(R_e,{context:S,modal:!1,children:X.jsx("div",{ref:_.setFloating,className:(qe=(Ne=(M=e==null?void 0:e[t])==null?void 0:M.content)==null?void 0:Ne.container)==null?void 0:qe.className,style:{...b,...(rt=(Je=(Me=e==null?void 0:e[t])==null?void 0:Me.content)==null?void 0:Je.container)==null?void 0:rt.style},...Q(),children:v.map((Ke,Pe)=>{var Ae,Fe;return X.jsx("div",{ref:$e=>{A.current[Pe]=$e},role:"option",tabIndex:Pe===d?0:-1,"aria-selected":Pe===m&&Pe===d,"data-active":Pe===d?"":void 0,...(Fe=(Ae=e==null?void 0:e[t])==null?void 0:Ae.content)==null?void 0:Fe.item,...G({onClick(){s||V(Pe)},onKeyDown($e){s||($e.key==="Enter"&&($e.preventDefault(),V(Pe)),$e.key===" "&&!T.current&&($e.preventDefault(),V(Pe)))}}),children:Ke},Ke)})})})})]})},V_e=C.forwardRef(({type:e,title:t,styles:n,url:r,...i},o)=>{var a,s,l;return X.jsxs("a",{...i,...(a=n==null?void 0:n[e])==null?void 0:a.container,href:r,download:!0,ref:o,target:"_blank",children:[X.jsx("p",{...(s=n==null?void 0:n[e])==null?void 0:s.title,children:t||r}),X.jsx(vbe,{...(l=n==null?void 0:n[e])==null?void 0:l.icon})]})}),AD={audio:ube,bubble:rbe,button:tbe,carousel:g0e,column:Ebe,dropdown:W_e,file:V_e,image:obe,location:Sbe,row:Abe,text:rce,video:sbe},fl=({block:e,styles:t,...n})=>{const i=it(a=>a.renderers)[e.type]??AD[e.type],o={...n,styles:t,...e};return X.jsx(i,{...o})},CD=C.memo(C.forwardRef((e,t)=>{const{composer:n}=it(p=>p.theme),r=it(p=>p.sendTextMessage),i=it(p=>p.disableComposer),o=it(p=>p.isReadOnly),[a,s]=C.useState(""),[l,c]=C.useState(-1);if(o)return null;const d=()=>{a&&(r(a),s(""),c(-1))};return X.jsx(_2.Provider,{value:{value:a,setValue:s,historyIndex:l,setHistoryIndex:c,sendMessage:d},children:X.jsx("div",{"data-disabled":i,...e,...n==null?void 0:n.container,ref:t})})})),OD=C.memo(e=>{const{composer:t}=it(w=>w.theme),n=it(w=>w.configuration),r=it(w=>w.disableComposer),{value:i,setValue:o,historyIndex:a,setHistoryIndex:s,sendMessage:l}=w2(),c=C.useRef(null),d=Vo(w=>w.user),p=Vo(w=>w.messageHistory),[m,h]=C.useState(!1);ice(c.current,i),C.useEffect(()=>{c.current&&(c.current.selectionStart=c.current.value.length,c.current.selectionEnd=c.current.value.length)},[i]);function y({key:w}){w==="Shift"&&h(!0)}function v({key:w}){w==="Shift"&&h(!1)}return C.useEffect(()=>(window.addEventListener("keydown",y),window.addEventListener("keyup",v),()=>{window.removeEventListener("keydown",y),window.removeEventListener("keyup",v)}),[]),X.jsx("textarea",{...t==null?void 0:t.input,placeholder:(n==null?void 0:n.composerPlaceholder)??"Type your message...",disabled:r,ref:c,value:i,"data-has-value":!!i,onChange:w=>o(w.target.value),onKeyDown:w=>{if(!r){if(w.key==="Enter"&&(w.preventDefault(),m?(o(`${i}
|
|
422
|
-
`),setTimeout(()=>{var _;return(_=c.current)==null?void 0:_.scroll({behavior:"instant",top:c.current.scrollHeight})},0)):l()),w.key==="ArrowUp"){w.preventDefault();const _=p[(d==null?void 0:d.userId)??""]??[];a<_.length-1&&o(_[a+1]),s(()=>Math.min(a+1,_.length-1))}if(w.key==="ArrowDown"){w.preventDefault();const _=p[(d==null?void 0:d.userId)??""]??[];o(a===0?"":_[a-1]),s(()=>Math.max(a-1,-1))}}},...e})}),TD=C.memo(C.forwardRef(({icon:e=xbe,...t},n)=>{var d,p;const{composer:r}=it(m=>m.theme),i=it(m=>m.sendFile),o=it(m=>m.addMessage),a=C.useRef(null);if(!it(m=>m.allowFileUpload))return null;const l=()=>{var m;a.current&&((m=a.current)==null||m.click())},c=async m=>{var y;const h=(y=m.target.files)==null?void 0:y[0];if(h)try{const{fileUrl:v,type:w}=await i(h)??"";o({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:w,url:v}})}catch(v){console.error("Error sending file:",v)}};return X.jsxs(X.Fragment,{children:[X.jsx("button",{type:"button",ref:n,...t,...(d=r==null?void 0:r.uploadButton)==null?void 0:d.container,onClick:l,children:X.jsx(e,{...(p=r==null?void 0:r.uploadButton)==null?void 0:p.icon})}),X.jsx("input",{type:"file",ref:a,style:{display:"none"},onChange:c})]})})),$D=C.memo(C.forwardRef(({icon:e=hbe,...t},n)=>{var a,s;const{value:r,sendMessage:i}=w2(),{composer:o}=it(l=>l.theme);return X.jsx("button",{type:"button",ref:n,...t,...(a=o==null?void 0:o.button)==null?void 0:a.container,disabled:!r,onClick:i,children:X.jsx(e,{...(s=o==null?void 0:o.button)==null?void 0:s.icon})})})),kD=({children:e})=>{const[t,n]=C.useState(!1),[r,i]=C.useState(""),[o,a]=C.useState(null),s=({title:c,content:d})=>{i(c),a(d),n(!0)},l=()=>{n(!1)};return X.jsxs(S2.Provider,{value:{hideModal:l,showModal:s,title:r,content:o,open:t},children:[X.jsx(Fa,{open:t,onOpenChange:n,children:X.jsx(Fa.Content,{title:r,children:o})}),e]})},K_e=({children:e,...t})=>{const n=C.useRef(),r=C.useRef(null),i=ebe({...t,messageContainerRef:r});return n.current||(n.current=i),X.jsx(b2.Provider,{value:n.current,children:X.jsx(G_e,{children:e})})},G_e=({children:e})=>{const t=it(h=>h.client),n=it(h=>h.addMessage),r=it(h=>h.setMessages),i=it(h=>h.configuration),o=it(h=>h.setConnected),a=it(h=>h.userData),s=Vo(h=>h.setConversationId),l=Vo(h=>h.user),c=Vo(h=>h.conversationId),d=Vo(h=>h.setUser),[p,m]=C.useState(0);return C.useEffect(()=>{if(t)return t.on("message",h=>{try{const{payload:y,disableInput:v}=h;n({direction:"incoming",sender:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date(h.sentOn),block:y,disableInput:v})}catch{console.error("Invalid message payload")}})},[]),C.useEffect(()=>{if(t)return t.on("conversation",h=>{s(h)})},[]),o_(async()=>{if(t)return t.on("error",()=>{m(h=>h+1)})}),o_(async()=>{if(!t||c&&t.conversationId===c)return;let h;try{h=await t.connect(l,a),o(!0)}catch(v){console.error(v),o(!1);return}d(h),c&&await t.conversationExists(c)?await t.switchConversation(c):await t.newConversation();const y=[];for(const v of await t.listMessages())try{const{payload:w,authorId:_,sentOn:b,disableInput:S}=v,A=_===t.userId?"outgoing":"incoming";y.push({direction:A,sender:A==="outgoing"?{name:"You"}:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date(b),block:w,disableInput:S})}catch{console.error("Invalid message payload")}return r(y.reverse()),()=>{t.disconnect()}},[p,c]),X.jsx(X.Fragment,{children:e})};function Or(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}const Y_e=z["useId".toString()]||(()=>{});let J_e=0;function Nm(e){const[t,n]=z.useState(Y_e());return $u(()=>{e||n(r=>r??String(J_e++))},[e]),e||(t?`radix-${t}`:"")}function ID({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=X_e({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Dr(n),l=C.useCallback(c=>{if(o){const p=typeof c=="function"?c(e):c;p!==e&&s(p)}else i(c)},[o,e,i,s]);return[a,l]}function X_e({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,i=C.useRef(r),o=Dr(t);return C.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function Q_e(e,t=globalThis==null?void 0:globalThis.document){const n=Dr(e);C.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const M_="dismissableLayer.update",ewe="dismissableLayer.pointerDownOutside",twe="dismissableLayer.focusOutside";let PD;const nwe=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),rwe=C.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,d=C.useContext(nwe),[p,m]=C.useState(null),h=(n=p==null?void 0:p.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,y]=C.useState({}),v=ii(t,L=>m(L)),w=Array.from(d.layers),[_]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=w.indexOf(_),S=p?w.indexOf(p):-1,A=d.layersWithOutsidePointerEventsDisabled.size>0,E=S>=b,T=iwe(L=>{const F=L.target,j=[...d.branches].some(H=>H.contains(F));!E||j||(o==null||o(L),s==null||s(L),L.defaultPrevented||l==null||l())},h),N=owe(L=>{const F=L.target;[...d.branches].some(H=>H.contains(F))||(a==null||a(L),s==null||s(L),L.defaultPrevented||l==null||l())},h);return Q_e(L=>{S===d.layers.size-1&&(i==null||i(L),!L.defaultPrevented&&l&&(L.preventDefault(),l()))},h),C.useEffect(()=>{if(p)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(PD=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),RD(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=PD)}},[p,h,r,d]),C.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),RD())},[p,d]),C.useEffect(()=>{const L=()=>y({});return document.addEventListener(M_,L),()=>document.removeEventListener(M_,L)},[]),C.createElement(dr.div,ys({},c,{ref:v,style:{pointerEvents:A?E?"auto":"none":void 0,...e.style},onFocusCapture:Or(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Or(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Or(e.onPointerDownCapture,T.onPointerDownCapture)}))});function iwe(e,t=globalThis==null?void 0:globalThis.document){const n=Dr(e),r=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let c=function(){DD(ewe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function owe(e,t=globalThis==null?void 0:globalThis.document){const n=Dr(e),r=C.useRef(!1);return C.useEffect(()=>{const i=o=>{o.target&&!r.current&&DD(twe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function RD(){const e=new CustomEvent(M_);document.dispatchEvent(e)}function DD(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Are(i,o):i.dispatchEvent(o)}const j_="focusScope.autoFocusOnMount",L_="focusScope.autoFocusOnUnmount",ND={bubbles:!1,cancelable:!0},awe=C.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.useState(null),c=Dr(i),d=Dr(o),p=C.useRef(null),m=ii(t,v=>l(v)),h=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let v=function(S){if(h.paused||!s)return;const A=S.target;s.contains(A)?p.current=A:ja(p.current,{select:!0})},w=function(S){if(h.paused||!s)return;const A=S.relatedTarget;A!==null&&(s.contains(A)||ja(p.current,{select:!0}))},_=function(S){const A=document.activeElement;for(const E of S)E.removedNodes.length>0&&(s!=null&&s.contains(A)||ja(s))};document.addEventListener("focusin",v),document.addEventListener("focusout",w);const b=new MutationObserver(_);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",w),b.disconnect()}}},[r,s,h.paused]),C.useEffect(()=>{if(s){LD.add(h);const v=document.activeElement;if(!s.contains(v)){const _=new CustomEvent(j_,ND);s.addEventListener(j_,c),s.dispatchEvent(_),_.defaultPrevented||(swe(dwe(MD(s)),{select:!0}),document.activeElement===v&&ja(s))}return()=>{s.removeEventListener(j_,c),setTimeout(()=>{const _=new CustomEvent(L_,ND);s.addEventListener(L_,d),s.dispatchEvent(_),_.defaultPrevented||ja(v??document.body,{select:!0}),s.removeEventListener(L_,d),LD.remove(h)},0)}}},[s,c,d,h]);const y=C.useCallback(v=>{if(!n&&!r||h.paused)return;const w=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,_=document.activeElement;if(w&&_){const b=v.currentTarget,[S,A]=uwe(b);S&&A?!v.shiftKey&&_===A?(v.preventDefault(),n&&ja(S,{select:!0})):v.shiftKey&&_===S&&(v.preventDefault(),n&&ja(A,{select:!0})):_===b&&v.preventDefault()}},[n,r,h.paused]);return C.createElement(dr.div,ys({tabIndex:-1},a,{ref:m,onKeyDown:y}))});function swe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ja(r,{select:t}),document.activeElement!==n)return}function uwe(e){const t=MD(e),n=jD(t,e),r=jD(t.reverse(),e);return[n,r]}function MD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function jD(e,t){for(const n of e)if(!lwe(n,{upTo:t}))return n}function lwe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function cwe(e){return e instanceof HTMLInputElement&&"select"in e}function ja(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cwe(e)&&t&&e.select()}}const LD=fwe();function fwe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=FD(e,t),e.unshift(t)},remove(t){var n;e=FD(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function FD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function dwe(e){return e.filter(t=>t.tagName!=="A")}function pwe(e,t){return C.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const La=e=>{const{present:t,children:n}=e,r=hwe(t),i=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),o=ii(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.cloneElement(i,{ref:o}):null};La.displayName="Presence";function hwe(e){const[t,n]=C.useState(),r=C.useRef({}),i=C.useRef(e),o=C.useRef("none"),a=e?"mounted":"unmounted",[s,l]=pwe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=Mm(r.current);o.current=s==="mounted"?c:"none"},[s]),$u(()=>{const c=r.current,d=i.current;if(d!==e){const m=o.current,h=Mm(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),$u(()=>{if(t){const c=p=>{const h=Mm(r.current).includes(p.animationName);p.target===t&&h&&Xi.flushSync(()=>l("ANIMATION_END"))},d=p=>{p.target===t&&(o.current=Mm(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Mm(e){return(e==null?void 0:e.animationName)||"none"}let F_=0;function mwe(){C.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:qD()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:qD()),F_++,()=>{F_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),F_--}},[])}function qD(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var _o=function(){return _o=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_o.apply(this,arguments)};function UD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ywe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var jm="right-scroll-bar-position",Lm="width-before-scroll-bar",gwe="with-scroll-bars-hidden",vwe="--removed-body-scroll-bar-size";function bwe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _we(e,t){var n=C.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function wwe(e,t){return _we(t||null,function(n){return e.forEach(function(r){return bwe(r,n)})})}function xwe(e){return e}function Swe(e,t){t===void 0&&(t=xwe);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var d=a;a=[],d.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),n}}}};return i}function Ewe(e){e===void 0&&(e={});var t=Swe(null);return t.options=_o({async:!0,ssr:!1},e),t}var BD=function(e){var t=e.sideCar,n=UD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return z.createElement(r,_o({},n))};BD.isSideCarExport=!0;function Awe(e,t){return e.useMedium(t),BD}var zD=Ewe(),q_=function(){},Fm=z.forwardRef(function(e,t){var n=z.useRef(null),r=z.useState({onScrollCapture:q_,onWheelCapture:q_,onTouchMoveCapture:q_}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,p=e.shards,m=e.sideCar,h=e.noIsolation,y=e.inert,v=e.allowPinchZoom,w=e.as,_=w===void 0?"div":w,b=UD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=m,A=wwe([n,t]),E=_o(_o({},b),i);return z.createElement(z.Fragment,null,d&&z.createElement(S,{sideCar:zD,removeScrollBar:c,shards:p,noIsolation:h,inert:y,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),a?z.cloneElement(z.Children.only(s),_o(_o({},E),{ref:A})):z.createElement(_,_o({},E,{className:l,ref:A}),s))});Fm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Fm.classNames={fullWidth:Lm,zeroRight:jm};var ZD,Cwe=function(){if(ZD)return ZD;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Owe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Cwe();return t&&e.setAttribute("nonce",t),e}function Twe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $we(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var kwe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Owe())&&(Twe(t,n),$we(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Iwe=function(){var e=kwe();return function(t,n){z.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},HD=function(){var e=Iwe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Pwe={left:0,top:0,right:0,gap:0},U_=function(e){return parseInt(e||"",10)||0},Rwe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[U_(n),U_(r),U_(i)]},Dwe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Pwe;var t=Rwe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Nwe=HD(),Mwe=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
421
|
+
*/var X0e=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],E_=X0e.join(","),nD=typeof Element>"u",yf=nD?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Am=!nD&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Cm=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&e(t.parentNode);return a},Q0e=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},e_e=function(t,n,r){if(Cm(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(E_));return n&&yf.call(t,E_)&&i.unshift(t),i=i.filter(r),i},t_e=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Cm(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:a,candidates:c})}else{var d=yf.call(a,E_);d&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!Cm(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(p&&m){var h=e(p===!0?a.children:p.children,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:a,candidates:h})}else o.unshift.apply(o,a.children)}}return i},rD=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},iD=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Q0e(t))&&!rD(t)?0:t.tabIndex},n_e=function(t,n){var r=iD(t);return r<0&&n&&!rD(t)?0:r},r_e=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},oD=function(t){return t.tagName==="INPUT"},i_e=function(t){return oD(t)&&t.type==="hidden"},o_e=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},a_e=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},s_e=function(t){if(!t.name)return!0;var n=t.form||Am(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=a_e(i,t.form);return!o||o===t},u_e=function(t){return oD(t)&&t.type==="radio"},l_e=function(t){return u_e(t)&&!s_e(t)},c_e=function(t){var n,r=t&&Am(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,s,l;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var c,d,p;r=Am(i),i=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=i)!==null&&d!==void 0&&(p=d.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return o},aD=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},f_e=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=yf.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(yf.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,c=Am(t);if(l&&!l.shadowRoot&&i(l)===!0)return aD(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(c_e(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return aD(t);return!1},d_e=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return yf.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},p_e=function(t,n){return!(n.disabled||Cm(n)||i_e(n)||f_e(n,t)||o_e(n)||d_e(n))},sD=function(t,n){return!(l_e(n)||iD(n)<0||!p_e(t,n))},h_e=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},m_e=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=n_e(s,a),c=a?e(i.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:c})}),r.sort(r_e).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},A_=function(t,n){n=n||{};var r;return n.getShadowRoot?r=t_e([t],n.includeContainer,{filter:sD.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:h_e}):r=e_e(t,n.includeContainer,sD.bind(null,n)),m_e(r)};const C_="ArrowUp",Om="ArrowDown",ul="ArrowLeft",gf="ArrowRight";function Tm(e,t,n){return Math.floor(e/t)!==n}function vf(e,t){return t<0||t>=e.current.length}function O_(e,t){return Cr(e,{disabledIndices:t})}function uD(e,t){return Cr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Cr(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,c;s=s+(r?-o:o)}while(s>=0&&s<=a.length-1&&(i?i.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((c=a[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function y_e(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:d=!1}=t,p=c;if(n.key===C_){if(d&&hr(n),c===-1)p=l;else if(p=Cr(e,{startingIndex:p,amount:o,decrement:!0,disabledIndices:a}),i&&(c-o<s||p<0)){const m=c%o,h=l%o,y=l-(h-m);h===m?p=l:p=h>m?y:y-o}vf(e,p)&&(p=c)}if(n.key===Om&&(d&&hr(n),c===-1?p=s:(p=Cr(e,{startingIndex:c,amount:o,disabledIndices:a}),i&&c+o>l&&(p=Cr(e,{startingIndex:c%o-o,amount:o,disabledIndices:a}))),vf(e,p)&&(p=c)),r==="both"){const m=al(c/o);n.key===gf&&(d&&hr(n),c%o!==o-1?(p=Cr(e,{startingIndex:c,disabledIndices:a}),i&&Tm(p,o,m)&&(p=Cr(e,{startingIndex:c-c%o-1,disabledIndices:a}))):i&&(p=Cr(e,{startingIndex:c-c%o-1,disabledIndices:a})),Tm(p,o,m)&&(p=c)),n.key===ul&&(d&&hr(n),c%o!==0?(p=Cr(e,{startingIndex:c,disabledIndices:a,decrement:!0}),i&&Tm(p,o,m)&&(p=Cr(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a}))):i&&(p=Cr(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a})),Tm(p,o,m)&&(p=c));const h=al(l/o)===m;vf(e,p)&&(i&&h?p=n.key===ul?l:Cr(e,{startingIndex:c-c%o-1,disabledIndices:a}):p=c)}return p}let lD=0;function Yo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(lD);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():lD=requestAnimationFrame(o)}var er=typeof document<"u"?C.useLayoutEffect:C.useEffect;function $m(){return $m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$m.apply(this,arguments)}let T_=!1,g_e=0;const cD=()=>"floating-ui-"+g_e++;function v_e(){const[e,t]=z.useState(()=>T_?cD():void 0);return er(()=>{e==null&&t(cD())},[]),z.useEffect(()=>{T_||(T_=!0)},[]),e}const $_=z["useId".toString()]||v_e;function b_e(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const __e=z.createContext(null),w_e=z.createContext(null),fD=()=>{var e;return((e=z.useContext(__e))==null?void 0:e.id)||null},km=()=>z.useContext(w_e);function bf(e){return"data-floating-ui-"+e}function Na(e){const t=C.useRef(e);return er(()=>{t.current=e}),t}function x_e(e,t){var n;let r=[],i=(n=e.find(o=>o.id===t))==null?void 0:n.parentId;for(;i;){const o=e.find(a=>a.id===i);i=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function ll(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function S_e(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),ll(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let cl=new WeakMap,Im=new WeakSet,Pm={},k_=0;const E_e=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,dD=e=>e&&(e.host||dD(e.parentNode)),A_e=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=dD(n);return e.contains(r)?r:null}).filter(n=>n!=null);function C_e(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=A_e(t,e),s=new Set,l=new Set(a),c=[];Pm[i]||(Pm[i]=new WeakMap);const d=Pm[i];a.forEach(p),m(t),s.clear();function p(h){!h||s.has(h)||(s.add(h),h.parentNode&&p(h.parentNode))}function m(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,y=>{if(s.has(y))m(y);else{const v=o?y.getAttribute(o):null,w=v!==null&&v!=="false",_=(cl.get(y)||0)+1,b=(d.get(y)||0)+1;cl.set(y,_),d.set(y,b),c.push(y),_===1&&w&&Im.add(y),b===1&&y.setAttribute(i,""),!w&&o&&y.setAttribute(o,"true")}})}return k_++,()=>{c.forEach(h=>{const y=(cl.get(h)||0)-1,v=(d.get(h)||0)-1;cl.set(h,y),d.set(h,v),y||(!Im.has(h)&&o&&h.removeAttribute(o),Im.delete(h)),v||h.removeAttribute(i)}),k_--,k_||(cl=new WeakMap,cl=new WeakMap,Im=new WeakSet,Pm={})}}function pD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Zi(e[0]).body;return C_e(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const I_=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function hD(e,t){const n=A_(e,I_());t==="prev"&&n.reverse();const r=n.indexOf(Da(Zi(e)));return n.slice(r+1)[0]}function mD(){return hD(document.body,"next")}function yD(){return hD(document.body,"prev")}function _f(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Yr(n,r)}function O_e(e){A_(e,I_()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function T_e(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const P_={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let $_e;function gD(e){e.key==="Tab"&&(e.target,clearTimeout($_e))}const Rm=z.forwardRef(function(t,n){const[r,i]=z.useState();er(()=>(q2()&&i("button"),document.addEventListener("keydown",gD),()=>{document.removeEventListener("keydown",gD)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[bf("focus-guard")]:"",style:P_};return z.createElement("span",$m({},t,o))}),vD=z.createContext(null);function k_e(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=z.useState(null),o=$_(),a=bD(),s=z.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:o}),[t,n,a,o]),l=z.useRef();return er(()=>()=>{r==null||r.remove()},[r,s]),er(()=>{if(l.current===s)return;l.current=s;const{id:c,root:d,portalContext:p,uniqueId:m}=s,h=c?document.getElementById(c):null,y=bf("portal");if(h){const v=document.createElement("div");v.id=m,v.setAttribute(y,""),h.appendChild(v),i(v)}else{let v=d||(p==null?void 0:p.portalNode);v&&!Fn(v)&&(v=v.current),v=v||document.body;let w=null;c&&(w=document.createElement("div"),w.id=c,v.appendChild(w));const _=document.createElement("div");_.id=m,_.setAttribute(y,""),v=w||v,v.appendChild(_),i(_)}},[s]),r}function I_e(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=k_e({id:n,root:r}),[a,s]=z.useState(null),l=z.useRef(null),c=z.useRef(null),d=z.useRef(null),p=z.useRef(null),m=!!a&&!a.modal&&a.open&&i&&!!(r||o);return z.useEffect(()=>{if(!o||!i||a!=null&&a.modal)return;function h(y){o&&_f(y)&&(y.type==="focusin"?T_e:O_e)(o)}return o.addEventListener("focusin",h,!0),o.addEventListener("focusout",h,!0),()=>{o.removeEventListener("focusin",h,!0),o.removeEventListener("focusout",h,!0)}},[o,i,a==null?void 0:a.modal]),z.createElement(vD.Provider,{value:z.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:p,portalNode:o,setFocusManagerState:s}),[i,o])},m&&o&&z.createElement(Rm,{"data-type":"outside",ref:l,onFocus:h=>{if(_f(h,o)){var y;(y=d.current)==null||y.focus()}else{const v=yD()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus()}}}),m&&o&&z.createElement("span",{"aria-owns":o.id,style:P_}),o&&Xi.createPortal(t,o),m&&o&&z.createElement(Rm,{"data-type":"outside",ref:c,onFocus:h=>{if(_f(h,o)){var y;(y=p.current)==null||y.focus()}else{const v=mD()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,h.nativeEvent))}}}))}const bD=()=>z.useContext(vD),P_e=z.forwardRef(function(t,n){return z.createElement("button",$m({},t,{type:"button",ref:n,tabIndex:-1,style:P_}))});function R_e(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:m,nodeId:h,onOpenChange:y,events:v,dataRef:w,elements:{domReference:_,floating:b}}=t,S=E_e()?o:!0,A=Na(i),E=Na(a),T=Na(s),j=km(),L=bD(),F=typeof a=="number"&&a<0,M=z.useRef(null),H=z.useRef(null),re=z.useRef(!1),Q=z.useRef(null),G=z.useRef(!1),V=L!=null,q=_&&_.getAttribute("role")==="combobox"&&z2(_)&&F,Y=z.useCallback(function(ue){return ue===void 0&&(ue=b),ue?A_(ue,I_()):[]},[b]),ne=z.useCallback(ue=>{const Oe=Y(ue);return A.current.map(N=>_&&N==="reference"?_:b&&N==="floating"?b:Oe).filter(Boolean).flat()},[_,b,A,Y]);z.useEffect(()=>{if(r||!l)return;function ue(N){if(N.key==="Tab"){Yr(b,Da(Zi(b)))&&Y().length===0&&!q&&hr(N);const Ne=ne(),qe=B2(N);A.current[0]==="reference"&&qe===_&&(hr(N),N.shiftKey?Yo(Ne[Ne.length-1]):Yo(Ne[1])),A.current[1]==="floating"&&qe===b&&N.shiftKey&&(hr(N),Yo(Ne[0]))}}const Oe=Zi(b);return Oe.addEventListener("keydown",ue),()=>{Oe.removeEventListener("keydown",ue)}},[r,_,b,l,A,m,q,Y,ne]),z.useEffect(()=>{if(r||!d)return;function ue(){G.current=!0,setTimeout(()=>{G.current=!1})}function Oe(N){const Ne=N.relatedTarget;queueMicrotask(()=>{const qe=!(Yr(_,Ne)||Yr(b,Ne)||Yr(Ne,b)||Yr(L==null?void 0:L.portalNode,Ne)||Ne!=null&&Ne.hasAttribute(bf("focus-guard"))||j&&(ll(j.nodesRef.current,h).find(Me=>{var Je,rt;return Yr((Je=Me.context)==null?void 0:Je.elements.floating,Ne)||Yr((rt=Me.context)==null?void 0:rt.elements.domReference,Ne)})||x_e(j.nodesRef.current,h).find(Me=>{var Je,rt;return((Je=Me.context)==null?void 0:Je.elements.floating)===Ne||((rt=Me.context)==null?void 0:rt.elements.domReference)===Ne})));Ne&&qe&&!G.current&&Ne!==Q.current&&(re.current=!0,y(!1,N))})}if(b&&Ar(_))return _.addEventListener("focusout",Oe),_.addEventListener("pointerdown",ue),!l&&b.addEventListener("focusout",Oe),()=>{_.removeEventListener("focusout",Oe),_.removeEventListener("pointerdown",ue),!l&&b.removeEventListener("focusout",Oe)}},[r,_,b,l,h,j,L,y,d]),z.useEffect(()=>{var ue;if(r)return;const Oe=Array.from((L==null||(ue=L.portalNode)==null?void 0:ue.querySelectorAll("["+bf("portal")+"]"))||[]);if(b){const N=[b,...Oe,M.current,H.current,A.current.includes("reference")||q?_:null].filter(qe=>qe!=null),Ne=l?pD(N,S,!S):pD(N);return()=>{Ne()}}},[r,_,b,l,A,L,q,S]),er(()=>{if(r||!b)return;const ue=Zi(b),Oe=Da(ue);queueMicrotask(()=>{const N=ne(b),Ne=E.current,qe=(typeof Ne=="number"?N[Ne]:Ne.current)||b,Me=Yr(b,Oe);!F&&!Me&&p&&Yo(qe,{preventScroll:qe===b})})},[r,p,b,F,ne,E]),er(()=>{if(r||!b)return;let ue=!1;const Oe=Zi(b),N=Da(Oe),Ne=w.current;Q.current=N;function qe(Me){if(Me.type==="escapeKey"&&m.domReference.current&&(Q.current=m.domReference.current),["referencePress","escapeKey"].includes(Me.type))return;const Je=Me.data.returnFocus;typeof Je=="object"?(re.current=!1,ue=Je.preventScroll):re.current=!Je}return v.on("dismiss",qe),()=>{v.off("dismiss",qe);const Me=Da(Oe);(Yr(b,Me)||j&&ll(j.nodesRef.current,h).some(rt=>{var Ke;return Yr((Ke=rt.context)==null?void 0:Ke.elements.floating,Me)})||Ne.openEvent&&["click","mousedown"].includes(Ne.openEvent.type))&&m.domReference.current&&(Q.current=m.domReference.current),T.current&&Ar(Q.current)&&!re.current&&Yo(Q.current,{cancelPrevious:!1,preventScroll:ue})}},[r,b,T,w,m,v,j,h]),er(()=>{if(!(r||!L))return L.setFocusManagerState({modal:l,closeOnFocusOut:d,open:p,onOpenChange:y,refs:m}),()=>{L.setFocusManagerState(null)}},[r,L,l,p,y,m,d]),er(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!F){const ue=()=>{const N=b.getAttribute("tabindex");A.current.includes("floating")||Da(Zi(b))!==m.domReference.current&&Y().length===0?N!=="0"&&b.setAttribute("tabindex","0"):N!=="-1"&&b.setAttribute("tabindex","-1")};ue();const Oe=new MutationObserver(ue);return Oe.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{Oe.disconnect()}}},[r,b,m,A,Y,F]);function ce(ue){return r||!c||!l?null:z.createElement(P_e,{ref:ue==="start"?M:H,onClick:Oe=>y(!1,Oe.nativeEvent)},typeof c=="string"?c:"Dismiss")}const P=!r&&S&&!q&&(V||l);return z.createElement(z.Fragment,null,P&&z.createElement(Rm,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:ue=>{if(l){const N=ne();Yo(i[0]==="reference"?N[0]:N[N.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(re.current=!1,_f(ue,L.portalNode)){const N=mD()||_;N==null||N.focus()}else{var Oe;(Oe=L.beforeOutsideRef.current)==null||Oe.focus()}}}),!q&&ce("start"),n,ce("end"),P&&z.createElement(Rm,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:ue=>{if(l)Yo(ne()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(d&&(re.current=!0),_f(ue,L.portalNode)){const N=yD()||_;N==null||N.focus()}else{var Oe;(Oe=L.afterOutsideRef.current)==null||Oe.focus()}}}))}function _D(e){return Ar(e.target)&&e.target.tagName==="BUTTON"}function wD(e){return z2(e)}function D_e(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0}=t,p=z.useRef(),m=z.useRef(!1);return z.useMemo(()=>a?{reference:{onPointerDown(h){p.current=h.pointerType},onMouseDown(h){h.button===0&&(U2(p.current,!0)&&c||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent):(h.preventDefault(),r(!0,h.nativeEvent))))},onClick(h){if(s==="mousedown"&&p.current){p.current=void 0;return}U2(p.current,!0)&&c||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,h.nativeEvent):r(!0,h.nativeEvent))},onKeyDown(h){p.current=void 0,!(h.defaultPrevented||!d||_D(h))&&(h.key===" "&&!wD(o)&&(h.preventDefault(),m.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent))},onKeyUp(h){h.defaultPrevented||!d||_D(h)||wD(o)||h.key===" "&&m.current&&(m.current=!1,r(!(n&&l),h.nativeEvent))}}}:{},[a,i,s,c,d,o,l,n,r])}const N_e=z["useInsertionEffect".toString()]||(e=>e());function Ma(e){const t=z.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return N_e(()=>{t.current=e}),z.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const M_e={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},j_e={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},L_e=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function F_e(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:o,elements:{reference:a,domReference:s,floating:l},dataRef:c}=e,{enabled:d=!0,escapeKey:p=!0,outsidePress:m=!0,outsidePressEvent:h="pointerdown",referencePress:y=!1,referencePressEvent:v="pointerdown",ancestorScroll:w=!1,bubbles:_}=t,b=km(),S=fD()!=null,A=Ma(typeof m=="function"?m:()=>!1),E=typeof m=="function"?A:m,T=z.useRef(!1),{escapeKeyBubbles:j,outsidePressBubbles:L}=L_e(_),F=Ma(H=>{if(!n||!d||!p||H.key!=="Escape")return;const re=b?ll(b.nodesRef.current,o):[];if(!j&&(H.stopPropagation(),re.length>0)){let Q=!0;if(re.forEach(G=>{var V;if((V=G.context)!=null&&V.open&&!G.context.dataRef.current.__escapeKeyBubbles){Q=!1;return}}),!Q)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,C0e(H)?H.nativeEvent:H)}),M=Ma(H=>{const re=T.current;if(T.current=!1,re||typeof E=="function"&&!E(H))return;const Q=B2(H),G="["+bf("inert")+"]",V=Zi(l).querySelectorAll(G);let q=Fn(Q)?Q:null;for(;q&&!mf(q);){const ce=Ls(q);if(ce===Zi(l).body||!Fn(ce))break;q=ce}if(V.length&&Fn(Q)&&!O0e(Q)&&!Yr(Q,l)&&Array.from(V).every(ce=>!Yr(q,ce)))return;if(Ar(Q)&&l){const ce=Q.clientWidth>0&&Q.scrollWidth>Q.clientWidth,P=Q.clientHeight>0&&Q.scrollHeight>Q.clientHeight;let ue=P&&H.offsetX>Q.clientWidth;if(P&&ci(Q).direction==="rtl"&&(ue=H.offsetX<=Q.offsetWidth-Q.clientWidth),ue||ce&&H.offsetY>Q.clientHeight)return}const Y=b&&ll(b.nodesRef.current,o).some(ce=>{var P;return x_(H,(P=ce.context)==null?void 0:P.elements.floating)});if(x_(H,l)||x_(H,s)||Y)return;const ne=b?ll(b.nodesRef.current,o):[];if(ne.length>0){let ce=!0;if(ne.forEach(P=>{var ue;if((ue=P.context)!=null&&ue.open&&!P.context.dataRef.current.__outsidePressBubbles){ce=!1;return}}),!ce)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:S?{preventScroll:!0}:L2(H)||F2(H)}}),r(!1,H)});return z.useEffect(()=>{if(!n||!d)return;c.current.__escapeKeyBubbles=j,c.current.__outsidePressBubbles=L;function H(G){r(!1,G)}const re=Zi(l);p&&re.addEventListener("keydown",F),E&&re.addEventListener(h,M);let Q=[];return w&&(Fn(s)&&(Q=Ra(s)),Fn(l)&&(Q=Q.concat(Ra(l))),!Fn(a)&&a&&a.contextElement&&(Q=Q.concat(Ra(a.contextElement)))),Q=Q.filter(G=>{var V;return G!==((V=re.defaultView)==null?void 0:V.visualViewport)}),Q.forEach(G=>{G.addEventListener("scroll",H,{passive:!0})}),()=>{p&&re.removeEventListener("keydown",F),E&&re.removeEventListener(h,M),Q.forEach(G=>{G.removeEventListener("scroll",H)})}},[c,l,s,a,p,E,h,n,r,w,d,j,L,F,M]),z.useEffect(()=>{T.current=!1},[E,h]),z.useMemo(()=>d?{reference:{onKeyDown:F,[M_e[v]]:H=>{y&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,H.nativeEvent))}},floating:{onKeyDown:F,[j_e[h]]:()=>{T.current=!0}}}:{},[d,i,y,h,v,r,F])}let R_;process.env.NODE_ENV!=="production"&&(R_=new Set);function q_e(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var o;const j="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((o=e.elements)!=null&&o.reference&&!Fn(e.elements.reference)){var a;if(!((a=R_)!=null&&a.has(j))){var s;(s=R_)==null||s.add(j),console.error(j)}}}const[l,c]=z.useState(null),d=((t=e.elements)==null?void 0:t.reference)||l,p=J0e(e),m=km(),h=Ma((j,L)=>{j&&(v.current.openEvent=L),r==null||r(j,L)}),y=z.useRef(null),v=z.useRef({}),w=z.useState(()=>b_e())[0],_=$_(),b=z.useCallback(j=>{const L=Fn(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),contextElement:j}:j;p.refs.setReference(L)},[p.refs]),S=z.useCallback(j=>{(Fn(j)||j===null)&&(y.current=j,c(j)),(Fn(p.refs.reference.current)||p.refs.reference.current===null||j!==null&&!Fn(j))&&p.refs.setReference(j)},[p.refs]),A=z.useMemo(()=>({...p.refs,setReference:S,setPositionReference:b,domReference:y}),[p.refs,S,b]),E=z.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),T=z.useMemo(()=>({...p,refs:A,elements:E,dataRef:v,nodeId:i,floatingId:_,events:w,open:n,onOpenChange:h}),[p,i,_,w,n,h,A,E]);return er(()=>{const j=m==null?void 0:m.nodesRef.current.find(L=>L.id===i);j&&(j.context=T)}),z.useMemo(()=>({...p,context:T,refs:A,elements:E}),[p,A,E,T])}function D_(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var c;(c=r.get(s))==null||c.push(l),i[s]=function(){for(var d,p=arguments.length,m=new Array(p),h=0;h<p;h++)m[h]=arguments[h];return(d=r.get(s))==null?void 0:d.map(y=>y(...m)).find(y=>y!==void 0)}}}else i[s]=l}),i),{})}}function U_e(e){e===void 0&&(e=[]);const t=e,n=z.useCallback(o=>D_(o,e,"reference"),t),r=z.useCallback(o=>D_(o,e,"floating"),t),i=z.useCallback(o=>D_(o,e,"item"),e.map(o=>o==null?void 0:o.item));return z.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let xD=!1;function Dm(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function SD(e,t){return Dm(t,e===C_||e===Om,e===ul||e===gf)}function N_(e,t,n){return Dm(t,e===Om,n?e===ul:e===gf)||e==="Enter"||e==" "||e===""}function B_e(e,t,n){return Dm(t,n?e===ul:e===gf,e===Om)}function ED(e,t,n){return Dm(t,n?e===gf:e===ul,e===C_)}function z_e(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:o,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:p=null,allowEscape:m=!1,loop:h=!1,nested:y=!1,rtl:v=!1,virtual:w=!1,focusItemOnOpen:_="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:S=!0,disabledIndices:A=void 0,orientation:E="vertical",cols:T=1,scrollItemIntoView:j=!0,virtualItemRef:L}=t;process.env.NODE_ENV!=="production"&&(m&&(h||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),w||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),E==="vertical"&&T>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const F=fD(),M=km(),H=Ma(c),re=z.useRef(_),Q=z.useRef(p??-1),G=z.useRef(null),V=z.useRef(!0),q=z.useRef(H),Y=z.useRef(!!a),ne=z.useRef(!1),ce=z.useRef(!1),P=Na(A),ue=Na(n),Oe=Na(j),[N,Ne]=z.useState(),[qe,Me]=z.useState(),Je=Ma(function(Pe,Ae,Fe){Fe===void 0&&(Fe=!1);const $e=Pe.current[Ae.current];$e&&(w?(Ne($e.id),M==null||M.events.emit("virtualfocus",$e),L&&(L.current=$e)):Yo($e,{preventScroll:!0,sync:A0e()&&q2()?xD||ne.current:!1}),requestAnimationFrame(()=>{const Ze=Oe.current;Ze&&$e&&(Fe||!V.current)&&($e.scrollIntoView==null||$e.scrollIntoView(typeof Ze=="boolean"?{block:"nearest",inline:"nearest"}:Ze))}))});er(()=>{document.createElement("div").focus({get preventScroll(){return xD=!0,!1}})},[]),er(()=>{d&&(n&&a?re.current&&p!=null&&(ce.current=!0,H(p)):Y.current&&(Q.current=-1,q.current(null)))},[d,n,a,p,H]),er(()=>{if(d&&n&&a)if(l==null){if(ne.current=!1,p!=null)return;if(Y.current&&(Q.current=-1,Je(s,Q)),!Y.current&&re.current&&(G.current!=null||re.current===!0&&G.current==null)){let Pe=0;const Ae=()=>{s.current[0]==null?(Pe<2&&(Pe?requestAnimationFrame:queueMicrotask)(Ae),Pe++):(Q.current=G.current==null||N_(G.current,E,v)||y?O_(s,P.current):uD(s,P.current),G.current=null,H(Q.current))};Ae()}}else vf(s,l)||(Q.current=l,Je(s,Q,ce.current),ce.current=!1)},[d,n,a,l,p,y,s,E,v,H,Je,P]),er(()=>{var Pe,Ae;if(!d||a||!M||w||!Y.current)return;const Fe=M.nodesRef.current,$e=(Pe=Fe.find(K=>K.id===F))==null||(Ae=Pe.context)==null?void 0:Ae.elements.floating,Ze=Da(Zi(a)),lt=Fe.some(K=>K.context&&Yr(K.context.elements.floating,Ze));$e&&!lt&&V.current&&$e.focus({preventScroll:!0})},[d,a,M,F,w]),er(()=>{if(!d||!M||!w||F)return;function Pe(Ae){Me(Ae.id),L&&(L.current=Ae)}return M.events.on("virtualfocus",Pe),()=>{M.events.off("virtualfocus",Pe)}},[d,M,w,F,L]),er(()=>{q.current=H,Y.current=!!a}),er(()=>{n||(G.current=null)},[n]);const rt=l!=null,Ke=z.useMemo(()=>{function Pe(Fe){if(!n)return;const $e=s.current.indexOf(Fe);$e!==-1&&H($e)}return{onFocus(Fe){let{currentTarget:$e}=Fe;Pe($e)},onClick:Fe=>{let{currentTarget:$e}=Fe;return $e.focus({preventScroll:!0})},...b&&{onMouseMove(Fe){let{currentTarget:$e}=Fe;Pe($e)},onPointerLeave(Fe){let{pointerType:$e}=Fe;!V.current||$e==="touch"||(Q.current=-1,Je(s,Q),H(null),w||Yo(i.floating.current,{preventScroll:!0}))}}}},[n,i,Je,b,s,H,w]);return z.useMemo(()=>{if(!d)return{};const Pe=P.current;function Ae(K){if(V.current=!1,ne.current=!0,!ue.current&&K.currentTarget===i.floating.current)return;if(y&&ED(K.key,E,v)){hr(K),r(!1,K.nativeEvent),Ar(o)&&!w&&o.focus();return}const pe=Q.current,Te=O_(s,Pe),Se=uD(s,Pe);if(K.key==="Home"&&(hr(K),Q.current=Te,H(Q.current)),K.key==="End"&&(hr(K),Q.current=Se,H(Q.current)),!(T>1&&(Q.current=y_e(s,{event:K,orientation:E,loop:h,cols:T,disabledIndices:Pe,minIndex:Te,maxIndex:Se,prevIndex:Q.current,stopEvent:!0}),H(Q.current),E==="both"))&&SD(K.key,E)){if(hr(K),n&&!w&&Da(K.currentTarget.ownerDocument)===K.currentTarget){Q.current=N_(K.key,E,v)?Te:Se,H(Q.current);return}N_(K.key,E,v)?h?Q.current=pe>=Se?m&&pe!==s.current.length?-1:Te:Cr(s,{startingIndex:pe,disabledIndices:Pe}):Q.current=Math.min(Se,Cr(s,{startingIndex:pe,disabledIndices:Pe})):h?Q.current=pe<=Te?m&&pe!==-1?s.current.length:Se:Cr(s,{startingIndex:pe,decrement:!0,disabledIndices:Pe}):Q.current=Math.max(Te,Cr(s,{startingIndex:pe,decrement:!0,disabledIndices:Pe})),vf(s,Q.current)?H(null):H(Q.current)}}function Fe(K){_==="auto"&&L2(K.nativeEvent)&&(re.current=!0)}function $e(K){re.current=_,_==="auto"&&F2(K.nativeEvent)&&(re.current=!0)}const Ze=w&&n&&rt&&{"aria-activedescendant":qe||N},lt=s.current.find(K=>(K==null?void 0:K.id)===N);return{reference:{...Ze,onKeyDown(K){V.current=!1;const pe=K.key.indexOf("Arrow")===0,Te=B_e(K.key,E,v),Se=ED(K.key,E,v),et=SD(K.key,E),Ue=(y?Te:et)||K.key==="Enter"||K.key.trim()==="";if(w&&n){const ie=M==null?void 0:M.nodesRef.current.find(xe=>xe.parentId==null),ge=M&&ie?S_e(M.nodesRef.current,ie.id):null;if(pe&&ge&&L){const xe=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Te||Se){var ot,It;const Be=((ot=ge.context)==null?void 0:ot.elements.domReference)===K.currentTarget,ct=Se&&!Be?(It=ge.context)==null?void 0:It.elements.domReference:Te?lt:null;ct&&(hr(K),ct.dispatchEvent(xe),Me(void 0))}if(et&&ge.context&&ge.context.open&&ge.parentId&&K.currentTarget!==ge.context.elements.domReference){var mt;hr(K),(mt=ge.context.elements.domReference)==null||mt.dispatchEvent(xe);return}}return Ae(K)}if(!(!n&&!S&&pe)){if(Ue&&(G.current=y&&et?null:K.key),y){Te&&(hr(K),n?(Q.current=O_(s,Pe),H(Q.current)):r(!0,K.nativeEvent));return}et&&(p!=null&&(Q.current=p),hr(K),!n&&S?r(!0,K.nativeEvent):Ae(K),n&&H(Q.current))}},onFocus(){n&&H(null)},onPointerDown:$e,onMouseDown:Fe,onClick:Fe},floating:{"aria-orientation":E==="both"?void 0:E,...Ze,onKeyDown:Ae,onPointerMove(){V.current=!0}},item:Ke}},[o,i,N,qe,P,ue,s,d,E,v,w,n,rt,y,p,S,m,T,h,_,H,r,Ke,M,L])}function Z_e(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=$_();return z.useMemo(()=>{const s={id:r,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?r:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[i,o,n,r,a])}function H_e(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:d=null,resetMs:p=750,ignoreKeys:m=[],selectedIndex:h=null}=t,y=z.useRef(),v=z.useRef(""),w=z.useRef((n=h??a)!=null?n:-1),_=z.useRef(null),b=Ma(s),S=Ma(l),A=Na(d),E=Na(m);return er(()=>{r&&(clearTimeout(y.current),_.current=null,v.current="")},[r]),er(()=>{if(r&&v.current===""){var T;w.current=(T=h??a)!=null?T:-1}},[r,h,a]),z.useMemo(()=>{if(!c)return{};function T(F){F?i.current.typing||(i.current.typing=F,S(F)):i.current.typing&&(i.current.typing=F,S(F))}function j(F,M,H){const re=A.current?A.current(M,H):M.find(Q=>(Q==null?void 0:Q.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return re?F.indexOf(re):-1}function L(F){const M=o.current;if(v.current.length>0&&v.current[0]!==" "&&(j(M,M,v.current)===-1?T(!1):F.key===" "&&hr(F)),M==null||E.current.includes(F.key)||F.key.length!==1||F.ctrlKey||F.metaKey||F.altKey)return;r&&F.key!==" "&&(hr(F),T(!0)),M.every(G=>{var V,q;return G?((V=G[0])==null?void 0:V.toLocaleLowerCase())!==((q=G[1])==null?void 0:q.toLocaleLowerCase()):!0})&&v.current===F.key&&(v.current="",w.current=_.current),v.current+=F.key,clearTimeout(y.current),y.current=setTimeout(()=>{v.current="",w.current=_.current,T(!1)},p);const re=w.current,Q=j(M,[...M.slice((re||0)+1),...M.slice(0,(re||0)+1)],v.current);Q!==-1?(b(Q),_.current=Q):F.key!==" "&&(v.current="",T(!1))}return{reference:{onKeyDown:L},floating:{onKeyDown:L,onKeyUp(F){F.key===" "&&T(!1)}}}},[c,r,i,o,p,E,A,b,S])}const W_e=({styles:e,type:t,options:n,label:r,reusable:i})=>{var Y,ne,ce,P,ue,Oe,N,Ne,qe,Me,Je,rt;const o=it(Ke=>Ke.sendTextMessage),a=it(Ke=>Ke.messageContainerRef),s=it(Ke=>Ke.isReadOnly),[l,c]=z.useState(!1),[d,p]=z.useState(null),[m,h]=z.useState(null),y=n.reduce((Ke,Pe)=>(Ke[Pe.label]=Pe.value,Ke),{}),v=y?Object.keys(y):[],w=Ke=>{c(m!==null&&!i?!1:Ke)},{refs:_,floatingStyles:b,context:S}=q_e({placement:"bottom-start",open:l,onOpenChange:w,whileElementsMounted:G0e,middleware:[I0e(5),P0e({padding:10,boundary:(a==null?void 0:a.current)??void 0,crossAxis:!0}),R0e({apply({rects:Ke,elements:Pe,availableHeight:Ae}){Object.assign(Pe.floating.style,{maxHeight:`${Ae}px`,minWidth:`${Ke.reference.width}px`})},padding:10})]}),A=z.useRef([]),E=z.useRef(v),T=z.useRef(!1),j=D_e(S,{event:"mousedown"}),L=F_e(S),F=Z_e(S,{role:"listbox"}),M=z_e(S,{listRef:A,activeIndex:d,selectedIndex:m,onNavigate:p,loop:!0}),H=H_e(S,{listRef:E,activeIndex:d,selectedIndex:m,onMatch:l?p:h,onTypingChange(Ke){T.current=Ke}}),{getReferenceProps:re,getFloatingProps:Q,getItemProps:G}=U_e([L,F,M,H,j]),V=Ke=>{h(Ke),o(y[v[Ke]]),c(!1)},q=m!==null?v[m]:void 0;return X.jsxs(X.Fragment,{children:[X.jsxs("div",{tabIndex:0,ref:_.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":m!==null&&!i?"":void 0,...(ne=(Y=e==null?void 0:e[t])==null?void 0:Y.button)==null?void 0:ne.container,...re(),children:[X.jsx("span",{...(P=(ce=e==null?void 0:e[t])==null?void 0:ce.button)==null?void 0:P.text,children:q||r||"Select..."}),X.jsx(ybe,{...(Oe=(ue=e==null?void 0:e[t])==null?void 0:ue.button)==null?void 0:Oe.icon})]}),l&&X.jsx(I_e,{children:X.jsx(R_e,{context:S,modal:!1,children:X.jsx("div",{ref:_.setFloating,className:(qe=(Ne=(N=e==null?void 0:e[t])==null?void 0:N.content)==null?void 0:Ne.container)==null?void 0:qe.className,style:{...b,...(rt=(Je=(Me=e==null?void 0:e[t])==null?void 0:Me.content)==null?void 0:Je.container)==null?void 0:rt.style},...Q(),children:v.map((Ke,Pe)=>{var Ae,Fe;return X.jsx("div",{ref:$e=>{A.current[Pe]=$e},role:"option",tabIndex:Pe===d?0:-1,"aria-selected":Pe===m&&Pe===d,"data-active":Pe===d?"":void 0,...(Fe=(Ae=e==null?void 0:e[t])==null?void 0:Ae.content)==null?void 0:Fe.item,...G({onClick(){s||V(Pe)},onKeyDown($e){s||($e.key==="Enter"&&($e.preventDefault(),V(Pe)),$e.key===" "&&!T.current&&($e.preventDefault(),V(Pe)))}}),children:Ke},Ke)})})})})]})},V_e=C.forwardRef(({type:e,title:t,styles:n,url:r,...i},o)=>{var a,s,l;return X.jsxs("a",{...i,...(a=n==null?void 0:n[e])==null?void 0:a.container,href:r,download:!0,ref:o,target:"_blank",children:[X.jsx("p",{...(s=n==null?void 0:n[e])==null?void 0:s.title,children:t||r}),X.jsx(vbe,{...(l=n==null?void 0:n[e])==null?void 0:l.icon})]})}),AD={audio:ube,bubble:rbe,button:tbe,carousel:g0e,column:Ebe,dropdown:W_e,file:V_e,image:obe,location:Sbe,row:Abe,text:rce,video:sbe},fl=({block:e,styles:t,...n})=>{const i=it(a=>a.renderers)[e.type]??AD[e.type],o={...n,styles:t,...e};return X.jsx(i,{...o})},CD=C.memo(C.forwardRef((e,t)=>{const{composer:n}=it(p=>p.theme),r=it(p=>p.sendTextMessage),i=it(p=>p.disableComposer),o=it(p=>p.isReadOnly),[a,s]=C.useState(""),[l,c]=C.useState(-1);if(o)return null;const d=()=>{a&&(r(a),s(""),c(-1))};return X.jsx(_2.Provider,{value:{value:a,setValue:s,historyIndex:l,setHistoryIndex:c,sendMessage:d},children:X.jsx("div",{"data-disabled":i,...e,...n==null?void 0:n.container,ref:t})})})),OD=C.memo(e=>{const{composer:t}=it(w=>w.theme),n=it(w=>w.configuration),r=it(w=>w.disableComposer),{value:i,setValue:o,historyIndex:a,setHistoryIndex:s,sendMessage:l}=w2(),c=C.useRef(null),d=Vo(w=>w.user),p=Vo(w=>w.messageHistory),[m,h]=C.useState(!1);ice(c.current,i),C.useEffect(()=>{c.current&&(c.current.selectionStart=c.current.value.length,c.current.selectionEnd=c.current.value.length)},[i]);function y({key:w}){w==="Shift"&&h(!0)}function v({key:w}){w==="Shift"&&h(!1)}return C.useEffect(()=>(window.addEventListener("keydown",y),window.addEventListener("keyup",v),()=>{window.removeEventListener("keydown",y),window.removeEventListener("keyup",v)}),[]),X.jsx("textarea",{...t==null?void 0:t.input,placeholder:(n==null?void 0:n.composerPlaceholder)??"Type your message...",disabled:r,ref:c,value:i,"data-has-value":!!i,onChange:w=>o(w.target.value),onKeyDown:w=>{if(!r){if(w.key==="Enter"&&(w.preventDefault(),m?(o(`${i}
|
|
422
|
+
`),setTimeout(()=>{var _;return(_=c.current)==null?void 0:_.scroll({behavior:"instant",top:c.current.scrollHeight})},0)):l()),w.key==="ArrowUp"){w.preventDefault();const _=p[(d==null?void 0:d.userId)??""]??[];a<_.length-1&&o(_[a+1]),s(()=>Math.min(a+1,_.length-1))}if(w.key==="ArrowDown"){w.preventDefault();const _=p[(d==null?void 0:d.userId)??""]??[];o(a===0?"":_[a-1]),s(()=>Math.max(a-1,-1))}}},...e})}),TD=C.memo(C.forwardRef(({icon:e=xbe,...t},n)=>{var d,p;const{composer:r}=it(m=>m.theme),i=it(m=>m.sendFile),o=it(m=>m.addMessage),a=C.useRef(null);if(!it(m=>m.allowFileUpload))return null;const l=()=>{var m;a.current&&((m=a.current)==null||m.click())},c=async m=>{var y;const h=(y=m.target.files)==null?void 0:y[0];if(h)try{const{fileUrl:v,type:w}=await i(h)??"";o({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:w,url:v}})}catch(v){console.error("Error sending file:",v)}};return X.jsxs(X.Fragment,{children:[X.jsx("button",{type:"button",ref:n,...t,...(d=r==null?void 0:r.uploadButton)==null?void 0:d.container,onClick:l,children:X.jsx(e,{...(p=r==null?void 0:r.uploadButton)==null?void 0:p.icon})}),X.jsx("input",{type:"file",ref:a,style:{display:"none"},onChange:c})]})})),$D=C.memo(C.forwardRef(({icon:e=hbe,...t},n)=>{var a,s;const{value:r,sendMessage:i}=w2(),{composer:o}=it(l=>l.theme);return X.jsx("button",{type:"button",ref:n,...t,...(a=o==null?void 0:o.button)==null?void 0:a.container,disabled:!r,onClick:i,children:X.jsx(e,{...(s=o==null?void 0:o.button)==null?void 0:s.icon})})})),kD=({children:e})=>{const[t,n]=C.useState(!1),[r,i]=C.useState(""),[o,a]=C.useState(null),s=({title:c,content:d})=>{i(c),a(d),n(!0)},l=()=>{n(!1)};return X.jsxs(S2.Provider,{value:{hideModal:l,showModal:s,title:r,content:o,open:t},children:[X.jsx(Fa,{open:t,onOpenChange:n,children:X.jsx(Fa.Content,{title:r,children:o})}),e]})},K_e=({children:e,...t})=>{const n=C.useRef(),r=C.useRef(null),i=ebe({...t,messageContainerRef:r});return n.current||(n.current=i),X.jsx(b2.Provider,{value:n.current,children:X.jsx(G_e,{children:e})})},G_e=({children:e})=>{const t=it(h=>h.client),n=it(h=>h.addMessage),r=it(h=>h.setMessages),i=it(h=>h.configuration),o=it(h=>h.setConnected),a=it(h=>h.userData),s=Vo(h=>h.setConversationId),l=Vo(h=>h.user),c=Vo(h=>h.conversationId),d=Vo(h=>h.setUser),[p,m]=C.useState(0);return C.useEffect(()=>{if(t)return t.on("message",h=>{try{const{payload:y,disableInput:v}=h;n({direction:"incoming",sender:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date(h.sentOn),block:y,disableInput:v})}catch{console.error("Invalid message payload")}})},[]),C.useEffect(()=>{if(t)return t.on("conversation",h=>{s(h)})},[]),o_(async()=>{if(t)return t.on("error",()=>{m(h=>h+1)})}),o_(async()=>{if(!t||c&&t.conversationId===c)return;let h;try{h=await t.connect(l,a),o(!0)}catch(v){console.error(v),o(!1);return}d(h),c&&await t.conversationExists(c)?await t.switchConversation(c):await t.newConversation();const y=[];for(const v of await t.listMessages())try{const{payload:w,authorId:_,sentOn:b,disableInput:S}=v,A=_===t.userId?"outgoing":"incoming";y.push({direction:A,sender:A==="outgoing"?{name:"You"}:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date(b),block:w,disableInput:S})}catch{console.error("Invalid message payload")}return r(y.reverse()),()=>{t.disconnect()}},[p,c]),X.jsx(X.Fragment,{children:e})};function Or(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}const Y_e=z["useId".toString()]||(()=>{});let J_e=0;function Nm(e){const[t,n]=z.useState(Y_e());return $u(()=>{e||n(r=>r??String(J_e++))},[e]),e||(t?`radix-${t}`:"")}function ID({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=X_e({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Dr(n),l=C.useCallback(c=>{if(o){const p=typeof c=="function"?c(e):c;p!==e&&s(p)}else i(c)},[o,e,i,s]);return[a,l]}function X_e({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,i=C.useRef(r),o=Dr(t);return C.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function Q_e(e,t=globalThis==null?void 0:globalThis.document){const n=Dr(e);C.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const M_="dismissableLayer.update",ewe="dismissableLayer.pointerDownOutside",twe="dismissableLayer.focusOutside";let PD;const nwe=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),rwe=C.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,d=C.useContext(nwe),[p,m]=C.useState(null),h=(n=p==null?void 0:p.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,y]=C.useState({}),v=ii(t,L=>m(L)),w=Array.from(d.layers),[_]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=w.indexOf(_),S=p?w.indexOf(p):-1,A=d.layersWithOutsidePointerEventsDisabled.size>0,E=S>=b,T=iwe(L=>{const F=L.target,M=[...d.branches].some(H=>H.contains(F));!E||M||(o==null||o(L),s==null||s(L),L.defaultPrevented||l==null||l())},h),j=owe(L=>{const F=L.target;[...d.branches].some(H=>H.contains(F))||(a==null||a(L),s==null||s(L),L.defaultPrevented||l==null||l())},h);return Q_e(L=>{S===d.layers.size-1&&(i==null||i(L),!L.defaultPrevented&&l&&(L.preventDefault(),l()))},h),C.useEffect(()=>{if(p)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(PD=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),RD(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=PD)}},[p,h,r,d]),C.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),RD())},[p,d]),C.useEffect(()=>{const L=()=>y({});return document.addEventListener(M_,L),()=>document.removeEventListener(M_,L)},[]),C.createElement(dr.div,ys({},c,{ref:v,style:{pointerEvents:A?E?"auto":"none":void 0,...e.style},onFocusCapture:Or(e.onFocusCapture,j.onFocusCapture),onBlurCapture:Or(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Or(e.onPointerDownCapture,T.onPointerDownCapture)}))});function iwe(e,t=globalThis==null?void 0:globalThis.document){const n=Dr(e),r=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let c=function(){DD(ewe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function owe(e,t=globalThis==null?void 0:globalThis.document){const n=Dr(e),r=C.useRef(!1);return C.useEffect(()=>{const i=o=>{o.target&&!r.current&&DD(twe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function RD(){const e=new CustomEvent(M_);document.dispatchEvent(e)}function DD(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Are(i,o):i.dispatchEvent(o)}const j_="focusScope.autoFocusOnMount",L_="focusScope.autoFocusOnUnmount",ND={bubbles:!1,cancelable:!0},awe=C.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.useState(null),c=Dr(i),d=Dr(o),p=C.useRef(null),m=ii(t,v=>l(v)),h=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let v=function(S){if(h.paused||!s)return;const A=S.target;s.contains(A)?p.current=A:ja(p.current,{select:!0})},w=function(S){if(h.paused||!s)return;const A=S.relatedTarget;A!==null&&(s.contains(A)||ja(p.current,{select:!0}))},_=function(S){const A=document.activeElement;for(const E of S)E.removedNodes.length>0&&(s!=null&&s.contains(A)||ja(s))};document.addEventListener("focusin",v),document.addEventListener("focusout",w);const b=new MutationObserver(_);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",w),b.disconnect()}}},[r,s,h.paused]),C.useEffect(()=>{if(s){LD.add(h);const v=document.activeElement;if(!s.contains(v)){const _=new CustomEvent(j_,ND);s.addEventListener(j_,c),s.dispatchEvent(_),_.defaultPrevented||(swe(dwe(MD(s)),{select:!0}),document.activeElement===v&&ja(s))}return()=>{s.removeEventListener(j_,c),setTimeout(()=>{const _=new CustomEvent(L_,ND);s.addEventListener(L_,d),s.dispatchEvent(_),_.defaultPrevented||ja(v??document.body,{select:!0}),s.removeEventListener(L_,d),LD.remove(h)},0)}}},[s,c,d,h]);const y=C.useCallback(v=>{if(!n&&!r||h.paused)return;const w=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,_=document.activeElement;if(w&&_){const b=v.currentTarget,[S,A]=uwe(b);S&&A?!v.shiftKey&&_===A?(v.preventDefault(),n&&ja(S,{select:!0})):v.shiftKey&&_===S&&(v.preventDefault(),n&&ja(A,{select:!0})):_===b&&v.preventDefault()}},[n,r,h.paused]);return C.createElement(dr.div,ys({tabIndex:-1},a,{ref:m,onKeyDown:y}))});function swe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ja(r,{select:t}),document.activeElement!==n)return}function uwe(e){const t=MD(e),n=jD(t,e),r=jD(t.reverse(),e);return[n,r]}function MD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function jD(e,t){for(const n of e)if(!lwe(n,{upTo:t}))return n}function lwe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function cwe(e){return e instanceof HTMLInputElement&&"select"in e}function ja(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cwe(e)&&t&&e.select()}}const LD=fwe();function fwe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=FD(e,t),e.unshift(t)},remove(t){var n;e=FD(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function FD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function dwe(e){return e.filter(t=>t.tagName!=="A")}function pwe(e,t){return C.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const La=e=>{const{present:t,children:n}=e,r=hwe(t),i=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),o=ii(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.cloneElement(i,{ref:o}):null};La.displayName="Presence";function hwe(e){const[t,n]=C.useState(),r=C.useRef({}),i=C.useRef(e),o=C.useRef("none"),a=e?"mounted":"unmounted",[s,l]=pwe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=Mm(r.current);o.current=s==="mounted"?c:"none"},[s]),$u(()=>{const c=r.current,d=i.current;if(d!==e){const m=o.current,h=Mm(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),$u(()=>{if(t){const c=p=>{const h=Mm(r.current).includes(p.animationName);p.target===t&&h&&Xi.flushSync(()=>l("ANIMATION_END"))},d=p=>{p.target===t&&(o.current=Mm(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Mm(e){return(e==null?void 0:e.animationName)||"none"}let F_=0;function mwe(){C.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:qD()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:qD()),F_++,()=>{F_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),F_--}},[])}function qD(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var _o=function(){return _o=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_o.apply(this,arguments)};function UD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ywe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var jm="right-scroll-bar-position",Lm="width-before-scroll-bar",gwe="with-scroll-bars-hidden",vwe="--removed-body-scroll-bar-size";function bwe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _we(e,t){var n=C.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function wwe(e,t){return _we(t||null,function(n){return e.forEach(function(r){return bwe(r,n)})})}function xwe(e){return e}function Swe(e,t){t===void 0&&(t=xwe);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var d=a;a=[],d.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),n}}}};return i}function Ewe(e){e===void 0&&(e={});var t=Swe(null);return t.options=_o({async:!0,ssr:!1},e),t}var BD=function(e){var t=e.sideCar,n=UD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return z.createElement(r,_o({},n))};BD.isSideCarExport=!0;function Awe(e,t){return e.useMedium(t),BD}var zD=Ewe(),q_=function(){},Fm=z.forwardRef(function(e,t){var n=z.useRef(null),r=z.useState({onScrollCapture:q_,onWheelCapture:q_,onTouchMoveCapture:q_}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,p=e.shards,m=e.sideCar,h=e.noIsolation,y=e.inert,v=e.allowPinchZoom,w=e.as,_=w===void 0?"div":w,b=UD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=m,A=wwe([n,t]),E=_o(_o({},b),i);return z.createElement(z.Fragment,null,d&&z.createElement(S,{sideCar:zD,removeScrollBar:c,shards:p,noIsolation:h,inert:y,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),a?z.cloneElement(z.Children.only(s),_o(_o({},E),{ref:A})):z.createElement(_,_o({},E,{className:l,ref:A}),s))});Fm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Fm.classNames={fullWidth:Lm,zeroRight:jm};var ZD,Cwe=function(){if(ZD)return ZD;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Owe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Cwe();return t&&e.setAttribute("nonce",t),e}function Twe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $we(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var kwe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Owe())&&(Twe(t,n),$we(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Iwe=function(){var e=kwe();return function(t,n){z.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},HD=function(){var e=Iwe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Pwe={left:0,top:0,right:0,gap:0},U_=function(e){return parseInt(e||"",10)||0},Rwe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[U_(n),U_(r),U_(i)]},Dwe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Pwe;var t=Rwe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Nwe=HD(),Mwe=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
423
423
|
.`.concat(gwe,` {
|
|
424
424
|
overflow: hidden `).concat(r,`;
|
|
425
425
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
@@ -459,11 +459,11 @@ to {
|
|
|
459
459
|
`)},jwe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=z.useMemo(function(){return Dwe(i)},[i]);return z.createElement(Nwe,{styles:Mwe(o,!t,i,n?"":"!important")})},B_=!1;if(typeof window<"u")try{var qm=Object.defineProperty({},"passive",{get:function(){return B_=!0,!0}});window.addEventListener("test",qm,qm),window.removeEventListener("test",qm,qm)}catch{B_=!1}var dl=B_?{passive:!1}:!1,Lwe=function(e){return e.tagName==="TEXTAREA"},WD=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Lwe(e)&&n[t]==="visible")},Fwe=function(e){return WD(e,"overflowY")},qwe=function(e){return WD(e,"overflowX")},VD=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=KD(e,n);if(r){var i=GD(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Uwe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Bwe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},KD=function(e,t){return e==="v"?Fwe(t):qwe(t)},GD=function(e,t){return e==="v"?Uwe(t):Bwe(t)},zwe=function(e,t){return e==="h"&&t==="rtl"?-1:1},Zwe=function(e,t,n,r,i){var o=zwe(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),c=!1,d=a>0,p=0,m=0;do{var h=GD(e,s),y=h[0],v=h[1],w=h[2],_=v-w-o*y;(y||_)&&KD(e,s)&&(p+=_,m+=y),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(i&&p===0||!i&&a>p)||!d&&(i&&m===0||!i&&-a>m))&&(c=!0),c},Um=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},YD=function(e){return[e.deltaX,e.deltaY]},JD=function(e){return e&&"current"in e?e.current:e},Hwe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Wwe=function(e){return`
|
|
460
460
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
461
461
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
462
|
-
`)},Vwe=0,pl=[];function Kwe(e){var t=z.useRef([]),n=z.useRef([0,0]),r=z.useRef(),i=z.useState(Vwe++)[0],o=z.useState(function(){return HD()})[0],a=z.useRef(e);z.useEffect(function(){a.current=e},[e]),z.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=ywe([e.lockRef.current],(e.shards||[]).map(JD),!0).filter(Boolean);return v.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=z.useCallback(function(v,w){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var _=Um(v),b=n.current,S="deltaX"in v?v.deltaX:b[0]-_[0],A="deltaY"in v?v.deltaY:b[1]-_[1],E,T=v.target,N=Math.abs(S)>Math.abs(A)?"h":"v";if("touches"in v&&N==="h"&&T.type==="range")return!1;var L=VD(N,T);if(!L)return!0;if(L?E=N:(E=N==="v"?"h":"v",L=VD(N,T)),!L)return!1;if(!r.current&&"changedTouches"in v&&(S||A)&&(r.current=E),!E)return!0;var F=r.current||E;return Zwe(F,w,v,F==="h"?S:A,!0)},[]),l=z.useCallback(function(v){var w=v;if(!(!pl.length||pl[pl.length-1]!==o)){var _="deltaY"in w?YD(w):Um(w),b=t.current.filter(function(E){return E.name===w.type&&E.target===w.target&&Hwe(E.delta,_)})[0];if(b&&b.should){w.cancelable&&w.preventDefault();return}if(!b){var S=(a.current.shards||[]).map(JD).filter(Boolean).filter(function(E){return E.contains(w.target)}),A=S.length>0?s(w,S[0]):!a.current.noIsolation;A&&w.cancelable&&w.preventDefault()}}},[]),c=z.useCallback(function(v,w,_,b){var S={name:v,delta:w,target:_,should:b};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(A){return A!==S})},1)},[]),d=z.useCallback(function(v){n.current=Um(v),r.current=void 0},[]),p=z.useCallback(function(v){c(v.type,YD(v),v.target,s(v,e.lockRef.current))},[]),m=z.useCallback(function(v){c(v.type,Um(v),v.target,s(v,e.lockRef.current))},[]);z.useEffect(function(){return pl.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,dl),document.addEventListener("touchmove",l,dl),document.addEventListener("touchstart",d,dl),function(){pl=pl.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,dl),document.removeEventListener("touchmove",l,dl),document.removeEventListener("touchstart",d,dl)}},[]);var h=e.removeScrollBar,y=e.inert;return z.createElement(z.Fragment,null,y?z.createElement(o,{styles:Wwe(i)}):null,h?z.createElement(jwe,{gapMode:"margin"}):null)}const Gwe=Awe(zD,Kwe);var XD=z.forwardRef(function(e,t){return z.createElement(Fm,_o({},e,{ref:t,sideCar:Gwe}))});XD.classNames=Fm.classNames;const Ywe=XD;var Jwe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},hl=new WeakMap,Bm=new WeakMap,zm={},z_=0,QD=function(e){return e&&(e.host||QD(e.parentNode))},Xwe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=QD(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Qwe=function(e,t,n,r){var i=Xwe(t,Array.isArray(e)?e:[e]);zm[n]||(zm[n]=new WeakMap);var o=zm[n],a=[],s=new Set,l=new Set(i),c=function(p){!p||s.has(p)||(s.add(p),c(p.parentNode))};i.forEach(c);var d=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))d(m);else{var h=m.getAttribute(r),y=h!==null&&h!=="false",v=(hl.get(m)||0)+1,w=(o.get(m)||0)+1;hl.set(m,v),o.set(m,w),a.push(m),v===1&&y&&Bm.set(m,!0),w===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}})};return d(t),s.clear(),z_++,function(){a.forEach(function(p){var m=hl.get(p)-1,h=o.get(p)-1;hl.set(p,m),o.set(p,h),m||(Bm.has(p)||p.removeAttribute(r),Bm.delete(p)),h||p.removeAttribute(n)}),z_--,z_||(hl=new WeakMap,hl=new WeakMap,Bm=new WeakMap,zm={})}},exe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Jwe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Qwe(r,i,n,"aria-hidden")):function(){return null}};const eN="Dialog",[tN,rDe]=Wp(eN),[txe,Jo]=tN(eN),nxe=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=C.useRef(null),l=C.useRef(null),[c=!1,d]=ID({prop:r,defaultProp:i,onChange:o});return C.createElement(txe,{scope:t,triggerRef:s,contentRef:l,contentId:Nm(),titleId:Nm(),descriptionId:Nm(),open:c,onOpenChange:d,onOpenToggle:C.useCallback(()=>d(p=>!p),[d]),modal:a},n)},rxe="DialogTrigger",ixe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jo(rxe,n),o=ii(t,i.triggerRef);return C.createElement(dr.button,Zt({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":H_(i.open)},r,{ref:o,onClick:Or(e.onClick,i.onOpenToggle)}))}),oxe="DialogPortal",[iDe,nN]=tN(oxe,{forceMount:void 0}),Z_="DialogOverlay",axe=C.forwardRef((e,t)=>{const n=nN(Z_,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Jo(Z_,e.__scopeDialog);return o.modal?C.createElement(La,{present:r||o.open},C.createElement(sxe,Zt({},i,{ref:t}))):null}),sxe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jo(Z_,n);return C.createElement(Ywe,{as:eb,allowPinchZoom:!0,shards:[i.contentRef]},C.createElement(dr.div,Zt({"data-state":H_(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),wf="DialogContent",uxe=C.forwardRef((e,t)=>{const n=nN(wf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Jo(wf,e.__scopeDialog);return C.createElement(La,{present:r||o.open},o.modal?C.createElement(lxe,Zt({},i,{ref:t})):C.createElement(cxe,Zt({},i,{ref:t})))}),lxe=C.forwardRef((e,t)=>{const n=Jo(wf,e.__scopeDialog),r=C.useRef(null),i=ii(t,n.contentRef,r);return C.useEffect(()=>{const o=r.current;if(o)return exe(o)},[]),C.createElement(rN,Zt({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Or(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Or(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Or(e.onFocusOutside,o=>o.preventDefault())}))}),cxe=C.forwardRef((e,t)=>{const n=Jo(wf,e.__scopeDialog),r=C.useRef(!1),i=C.useRef(!1);return C.createElement(rN,Zt({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,o),!o.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),rN=C.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=Jo(wf,n),l=C.useRef(null),c=ii(t,l);return mwe(),C.createElement(C.Fragment,null,C.createElement(awe,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},C.createElement(rwe,Zt({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":H_(s.open)},a,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),fxe="DialogTitle",dxe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jo(fxe,n);return C.createElement(dr.h2,Zt({id:i.titleId},r,{ref:t}))}),pxe="DialogClose",hxe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jo(pxe,n);return C.createElement(dr.button,Zt({type:"button"},r,{ref:t,onClick:Or(e.onClick,()=>i.onOpenChange(!1))}))});function H_(e){return e?"open":"closed"}const mxe=nxe,yxe=ixe,gxe=axe,vxe=uxe,bxe=dxe,iN=hxe;function _xe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const oN=z.forwardRef(_xe);function Fa({open:e,onOpenChange:t,children:n}){return X.jsx(mxe,{open:e,onOpenChange:t,children:n})}function wxe({title:e,children:t}){var r,i,o,a,s,l,c,d;const{modal:n}=it(p=>p.theme);return X.jsxs(X.Fragment,{children:[X.jsx(gxe,{...n==null?void 0:n.overlay}),X.jsx("div",{...n==null?void 0:n.container,children:X.jsxs(vxe,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[X.jsxs("div",{...(o=(i=n==null?void 0:n.dialog)==null?void 0:i.title)==null?void 0:o.container,children:[X.jsx(bxe,{...(s=(a=n==null?void 0:n.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),X.jsx(iN,{children:X.jsx(oN,{role:"button",tabIndex:0,...(c=(l=n==null?void 0:n.dialog)==null?void 0:l.title)==null?void 0:c.closeIcon})})]}),X.jsx("div",{...(d=n==null?void 0:n.dialog)==null?void 0:d.content,children:t})]})})]})}Fa.Button=yxe,Fa.Close=iN,Fa.Content=wxe;const aN=C.forwardRef(({children:e,...t},n)=>{const{container:r}=it(i=>i.theme);return X.jsxs("div",{...t,...r,ref:n,children:[X.jsx(Jge,{}),X.jsxs(kD,{children:[X.jsx(xxe,{}),e]})]})}),xxe=()=>{const{modal:e}=it(r=>r.theme),t=it(r=>r.connected),{showModal:n}=E2();return C.useEffect(()=>{var r,i,o,a;t||n({title:"Connection Error",content:X.jsxs(X.Fragment,{children:[X.jsx("p",{...(i=(r=e==null?void 0:e.dialog)==null?void 0:r.newConversation)==null?void 0:i.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),X.jsx(Fa.Close,{asChild:!0,children:X.jsx("button",{type:"button",...(a=(o=e==null?void 0:e.dialog)==null?void 0:o.newConversation)==null?void 0:a.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),X.jsx(X.Fragment,{})},Sxe=C.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:i}=it(s=>s.theme),{container:o,icon:a}=i??{};return X.jsx("div",{...n,...o,ref:r,onClick:t,children:X.jsx("div",{...a})})}),sN="Collapsible",[Exe,aDe]=Wp(sN),[Axe,W_]=Exe(sN),Cxe=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,c]=ID({prop:r,defaultProp:i,onChange:a});return C.createElement(Axe,{scope:n,disabled:o,contentId:Nm(),open:l,onOpenToggle:C.useCallback(()=>c(d=>!d),[c])},C.createElement(dr.div,Zt({"data-state":V_(l),"data-disabled":o?"":void 0},s,{ref:t})))}),Oxe="CollapsibleTrigger",Txe=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=W_(Oxe,n);return C.createElement(dr.button,Zt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":V_(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:t,onClick:Or(e.onClick,i.onOpenToggle)}))}),uN="CollapsibleContent",$xe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=W_(uN,e.__scopeCollapsible);return C.createElement(La,{present:n||i.open},({present:o})=>C.createElement(kxe,Zt({},r,{ref:t,present:o})))}),kxe=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=W_(uN,n),[s,l]=C.useState(r),c=C.useRef(null),d=ii(t,c),p=C.useRef(0),m=p.current,h=C.useRef(0),y=h.current,v=a.open||s,w=C.useRef(v),_=C.useRef();return C.useEffect(()=>{const b=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(b)},[]),$u(()=>{const b=c.current;if(b){_.current=_.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const S=b.getBoundingClientRect();p.current=S.height,h.current=S.width,w.current||(b.style.transitionDuration=_.current.transitionDuration,b.style.animationName=_.current.animationName),l(r)}},[a.open,r]),C.createElement(dr.div,Zt({"data-state":V_(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v},o,{ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style}}),v&&i)});function V_(e){return e?"open":"closed"}const Ixe=Cxe,Pxe=Txe,Rxe=$xe,Dxe=e=>z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},z.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 5.5v-5m0 0h-5m5 0L8.833 7.167m-2.5-5H4.5c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 .772 3.532C.5 4.066.5 4.767.5 6.167V11.5c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.092C2.4 15.5 3.1 15.5 4.5 15.5h5.333c1.4 0 2.1 0 2.635-.273a2.5 2.5 0 0 0 1.093-1.092c.272-.535.272-1.235.272-2.635V9.667"})),lN=({...e})=>{var a,s;const{header:t,modal:n}=it(l=>l.theme),r=it(l=>l.restartConversation),{showModal:i}=E2(),o=l=>{var c,d,p,m;l.stopPropagation(),i({title:"Restart Conversation",content:X.jsxs(X.Fragment,{children:[X.jsx("p",{...(d=(c=n==null?void 0:n.dialog)==null?void 0:c.newConversation)==null?void 0:d.text,children:"Are you sure you want to restart a new conversation?"}),X.jsx(Fa.Close,{asChild:!0,children:X.jsx("button",{type:"button",...(m=(p=n==null?void 0:n.dialog)==null?void 0:p.newConversation)==null?void 0:m.button,onClick:r,children:"Restart"})})]})})};return X.jsx(dbe,{...e,...(s=(a=t==null?void 0:t.content)==null?void 0:a.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:o,onKeyDown:l=>{l.key==="Enter"&&o(l)}})},Nxe=({...e})=>{var i,o;const{header:t}=it(a=>a.theme),n=it(a=>a.closeWindow),r=a=>{a.stopPropagation(),n==null||n()};return X.jsx(oN,{...e,...(o=(i=t==null?void 0:t.content)==null?void 0:i.actions)==null?void 0:o.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:a=>{a.key==="Enter"&&r(a)}})},Mxe=C.memo(C.forwardRef(({defaultOpen:e,...t},n)=>{const{header:r}=it(a=>a.theme),[i,o]=C.useState(!!e);return X.jsx(Ixe,{open:i,onOpenChange:o,...t,...r==null?void 0:r.container,ref:n})})),jxe=C.forwardRef((e,t)=>{var r;const{header:n}=it(i=>i.theme);return X.jsx(Pxe,{...e,...(r=n==null?void 0:n.content)==null?void 0:r.container,ref:t})}),Lxe=C.forwardRef((e,t)=>{var r;const{header:n}=it(i=>i.theme);return X.jsx(Rxe,{...e,...(r=n==null?void 0:n.expandedContent)==null?void 0:r.container,ref:t})}),Fxe=C.forwardRef(({src:e,...t},n)=>{var o;const{header:r}=it(a=>a.theme),i=it(a=>a.getClientId)();return X.jsx(rb,{...t,ref:n,userId:i,src:e,...(o=r==null?void 0:r.content)==null?void 0:o.avatar})}),qxe=C.forwardRef((e,t)=>{var r;const{header:n}=it(i=>i.theme);return X.jsx("h2",{...e,...(r=n==null?void 0:n.content)==null?void 0:r.title,ref:t})}),Uxe=C.forwardRef((e,t)=>{var r;const{header:n}=it(i=>i.theme);return X.jsx("p",{...e,...(r=n==null?void 0:n.content)==null?void 0:r.description,ref:t})}),Bxe=C.forwardRef((e,t)=>{var r,i;const{header:n}=it(o=>o.theme);return X.jsx("div",{...e,...(i=(r=n==null?void 0:n.content)==null?void 0:r.actions)==null?void 0:i.container,ref:t})}),fi=Object.assign(Mxe,{Content:jxe,ExpandedContent:Lxe,Avatar:Fxe,Description:Uxe,Title:qxe,Actions:Bxe,DescriptionItem:({icon:e,title:t,link:n,...r})=>{var s,l,c,d,p,m,h,y,v,w,_,b;const{header:i}=it(S=>S.theme),o=e??Dxe,a=S=>{S&&age(S)};return!n&&!t?null:n?X.jsxs("a",{...r,...(l=(s=i==null?void 0:i.expandedContent)==null?void 0:s.descriptionItems)==null?void 0:l.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[X.jsx(o,{...(d=(c=i==null?void 0:i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:d.icon}),X.jsx("p",{...(m=(p=i==null?void 0:i.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:m.link,children:t})]}):X.jsxs("div",{...r,...(y=(h=i==null?void 0:i.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:y.container,onClick:S=>{a(S.currentTarget.textContent)},children:[X.jsx(o,{...(w=(v=i==null?void 0:i.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:w.icon}),X.jsx("p",{...(b=(_=i==null?void 0:i.expandedContent)==null?void 0:_.descriptionItems)==null?void 0:b.text,children:t})]})}}),cN=()=>{var i,o,a,s,l,c,d,p,m,h,y,v,w,_,b,S,A,E,T;const{header:e}=it(N=>N.theme),t=it(N=>N.configuration),n=it(N=>N.closeWindow),r=!!((i=t.email)!=null&&i.title)||!!((o=t.phone)!=null&&o.title)||!!((a=t.website)!=null&&a.title)||!!((s=t.termsOfService)!=null&&s.link)||!!((l=t.privacyPolicy)!=null&&l.link);return X.jsxs(fi,{open:r?void 0:!1,"data-disabled":r?void 0:"",children:[X.jsxs(fi.Content,{children:[X.jsx(fi.Avatar,{src:t.botAvatar,children:t.botName||"Bot"}),X.jsx(fi.Title,{children:t.botName||"Bot"}),t.botDescription&&X.jsx(fi.Description,{children:t.botDescription}),X.jsxs(fi.Actions,{children:[X.jsx(lN,{}),n&&X.jsx(Nxe,{})]})]}),X.jsxs(fi.ExpandedContent,{children:[X.jsxs("div",{"data-links":"",...(c=e==null?void 0:e.expandedContent)==null?void 0:c.group,children:[X.jsx(fi.DescriptionItem,{"data-email":"",icon:c0e,title:(d=t.email)==null?void 0:d.title,link:(p=t.email)==null?void 0:p.link}),X.jsx(fi.DescriptionItem,{"data-phone":"",icon:y0e,title:(m=t.phone)==null?void 0:m.title,link:(h=t.phone)==null?void 0:h.link}),X.jsx(fi.DescriptionItem,{"data-website":"",link:(y=t.website)==null?void 0:y.link,icon:d0e,title:(v=t.website)==null?void 0:v.title})]}),X.jsxs("div",{"data-legal":"",...(w=e==null?void 0:e.expandedContent)==null?void 0:w.group,children:[X.jsx(fi.DescriptionItem,{"data-terms":"",link:(_=t.termsOfService)==null?void 0:_.link,icon:u0e,title:(b=t.termsOfService)==null?void 0:b.title}),X.jsx(fi.DescriptionItem,{"data-privacy":"",link:(S=t.privacyPolicy)==null?void 0:S.link,icon:h0e,title:(A=t.privacyPolicy)==null?void 0:A.title})]}),X.jsx("div",{...(T=(E=e==null?void 0:e.expandedContent)==null?void 0:E.descriptionItems)==null?void 0:T.poweredBy,children:"⚡ by Botpress"})]})]})},zxe=fi,fN=C.memo(({...e})=>{const{loadingIndicator:t}=it(n=>n.theme);return X.jsx("div",{...e,...t==null?void 0:t.container,children:X.jsx("div",{...t==null?void 0:t.loader})})}),K_=C.forwardRef(({direction:e,block:t,scroll:n,disableInput:r,children:i,sender:o,...a},s)=>{var v,w,_,b;const[l,c]=C.useState([]),{message:d}=it(S=>S.theme),{botAvatar:p,botName:m}=it(S=>S.configuration),h=it(S=>S.getClientId)();Pve(()=>{n()}),C.useEffect(()=>{l.length===0&&n()},[l.length]);const y=T$(h??"",15);return X.jsx(x2.Provider,{value:{isLoading:l,setIsLoading:c},children:X.jsxs("div",{...a,...d==null?void 0:d.container,"data-loaded":l.length===0,"data-disable-input":!!r,"data-direction":e,ref:s,children:[X.jsxs(A$,{"data-color":y,...(v=d==null?void 0:d.avatar)==null?void 0:v.container,children:[X.jsx(C$,{...(w=d==null?void 0:d.avatar)==null?void 0:w.image,src:(o==null?void 0:o.avatar)??p}),X.jsx(O$,{...(_=d==null?void 0:d.avatar)==null?void 0:_.fallback,children:(o==null?void 0:o.name[0])??((b=m??"Bot")==null?void 0:b[0])})]}),t&&X.jsx(fl,{block:t,styles:d==null?void 0:d.blocks}),i]})})}),Zxe=C.createContext(void 0);function Hxe(e){const t=C.useContext(Zxe);return e||t||"ltr"}function Wxe(e,[t,n]){return Math.min(n,Math.max(t,e))}function Vxe(e,t){return C.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const dN="ScrollArea",[pN,uDe]=Wp(dN),[Kxe,Si]=pN(dN),Gxe=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,l]=C.useState(null),[c,d]=C.useState(null),[p,m]=C.useState(null),[h,y]=C.useState(null),[v,w]=C.useState(null),[_,b]=C.useState(0),[S,A]=C.useState(0),[E,T]=C.useState(!1),[N,L]=C.useState(!1),F=ii(t,H=>l(H)),j=Hxe(i);return C.createElement(Kxe,{scope:n,type:r,dir:j,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:d,content:p,onContentChange:m,scrollbarX:h,onScrollbarXChange:y,scrollbarXEnabled:E,onScrollbarXEnabledChange:T,scrollbarY:v,onScrollbarYChange:w,scrollbarYEnabled:N,onScrollbarYEnabledChange:L,onCornerWidthChange:b,onCornerHeightChange:A},C.createElement(dr.div,Zt({dir:j},a,{ref:F,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})))}),Yxe="ScrollAreaViewport",Jxe=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...i}=e,o=Si(Yxe,n),a=C.useRef(null),s=ii(t,a,o.onViewportChange);return C.createElement(C.Fragment,null,C.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),C.createElement(dr.div,Zt({"data-radix-scroll-area-viewport":""},i,{ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style}}),C.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Xo="ScrollAreaScrollbar",Xxe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Si(Xo,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s=e.orientation==="horizontal";return C.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),i.type==="hover"?C.createElement(Qxe,Zt({},r,{ref:t,forceMount:n})):i.type==="scroll"?C.createElement(e1e,Zt({},r,{ref:t,forceMount:n})):i.type==="auto"?C.createElement(hN,Zt({},r,{ref:t,forceMount:n})):i.type==="always"?C.createElement(G_,Zt({},r,{ref:t})):null}),Qxe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Si(Xo,e.__scopeScrollArea),[o,a]=C.useState(!1);return C.useEffect(()=>{const s=i.scrollArea;let l=0;if(s){const c=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),C.createElement(La,{present:n||o},C.createElement(hN,Zt({"data-state":o?"visible":"hidden"},r,{ref:t})))}),e1e=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Si(Xo,e.__scopeScrollArea),o=e.orientation==="horizontal",a=Wm(()=>l("SCROLL_END"),100),[s,l]=Vxe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return C.useEffect(()=>{if(s==="idle"){const c=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,i.scrollHideDelay,l]),C.useEffect(()=>{const c=i.viewport,d=o?"scrollLeft":"scrollTop";if(c){let p=c[d];const m=()=>{const h=c[d];p!==h&&(l("SCROLL"),a()),p=h};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[i.viewport,o,l,a]),C.createElement(La,{present:n||s!=="hidden"},C.createElement(G_,Zt({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:Or(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Or(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),hN=C.forwardRef((e,t)=>{const n=Si(Xo,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=C.useState(!1),s=e.orientation==="horizontal",l=Wm(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(s?c:d)}},10);return ml(n.viewport,l),ml(n.content,l),C.createElement(La,{present:r||o},C.createElement(G_,Zt({"data-state":o?"visible":"hidden"},i,{ref:t})))}),G_=C.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=Si(Xo,e.__scopeScrollArea),o=C.useRef(null),a=C.useRef(0),[s,l]=C.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=vN(s.viewport,s.content),d={...r,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:m=>o.current=m,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:m=>a.current=m};function p(m,h){return u1e(m,a.current,s,h)}return n==="horizontal"?C.createElement(t1e,Zt({},d,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollLeft,h=bN(m,s,i.dir);o.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=p(m,i.dir))}})):n==="vertical"?C.createElement(n1e,Zt({},d,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollTop,h=bN(m,s);o.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=p(m))}})):null}),t1e=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=Si(Xo,e.__scopeScrollArea),[a,s]=C.useState(),l=C.useRef(null),c=ii(t,l,o.onScrollbarXChange);return C.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),C.createElement(yN,Zt({"data-orientation":"horizontal"},i,{ref:c,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Hm(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const m=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),wN(m,p)&&d.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Zm(a.paddingLeft),paddingEnd:Zm(a.paddingRight)}})}}))}),n1e=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=Si(Xo,e.__scopeScrollArea),[a,s]=C.useState(),l=C.useRef(null),c=ii(t,l,o.onScrollbarYChange);return C.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),C.createElement(yN,Zt({"data-orientation":"vertical"},i,{ref:c,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Hm(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const m=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),wN(m,p)&&d.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Zm(a.paddingTop),paddingEnd:Zm(a.paddingBottom)}})}}))}),[r1e,mN]=pN(Xo),yN=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:d,onResize:p,...m}=e,h=Si(Xo,n),[y,v]=C.useState(null),w=ii(t,F=>v(F)),_=C.useRef(null),b=C.useRef(""),S=h.viewport,A=r.content-r.viewport,E=Dr(d),T=Dr(l),N=Wm(p,10);function L(F){if(_.current){const j=F.clientX-_.current.left,H=F.clientY-_.current.top;c({x:j,y:H})}}return C.useEffect(()=>{const F=j=>{const H=j.target;(y==null?void 0:y.contains(H))&&E(j,A)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[S,y,A,E]),C.useEffect(T,[r,T]),ml(y,N),ml(h.content,N),C.createElement(r1e,{scope:n,scrollbar:y,hasThumb:i,onThumbChange:Dr(o),onThumbPointerUp:Dr(a),onThumbPositionChange:T,onThumbPointerDown:Dr(s)},C.createElement(dr.div,Zt({},m,{ref:w,style:{position:"absolute",...m.style},onPointerDown:Or(e.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),_.current=y.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),L(F))}),onPointerMove:Or(e.onPointerMove,L),onPointerUp:Or(e.onPointerUp,F=>{const j=F.target;j.hasPointerCapture(F.pointerId)&&j.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=b.current,h.viewport&&(h.viewport.style.scrollBehavior=""),_.current=null})})))}),Y_="ScrollAreaThumb",i1e=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=mN(Y_,e.__scopeScrollArea);return C.createElement(La,{present:n||i.hasThumb},C.createElement(o1e,Zt({ref:t},r)))}),o1e=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=Si(Y_,n),a=mN(Y_,n),{onThumbPositionChange:s}=a,l=ii(t,p=>a.onThumbChange(p)),c=C.useRef(),d=Wm(()=>{c.current&&(c.current(),c.current=void 0)},100);return C.useEffect(()=>{const p=o.viewport;if(p){const m=()=>{if(d(),!c.current){const h=l1e(p,s);c.current=h,s()}};return s(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[o.viewport,d,s]),C.createElement(dr.div,Zt({"data-state":a.hasThumb?"visible":"hidden"},i,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Or(e.onPointerDownCapture,p=>{const h=p.target.getBoundingClientRect(),y=p.clientX-h.left,v=p.clientY-h.top;a.onThumbPointerDown({x:y,y:v})}),onPointerUp:Or(e.onPointerUp,a.onThumbPointerUp)}))}),gN="ScrollAreaCorner",a1e=C.forwardRef((e,t)=>{const n=Si(gN,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?C.createElement(s1e,Zt({},e,{ref:t})):null}),s1e=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=Si(gN,n),[o,a]=C.useState(0),[s,l]=C.useState(0),c=!!(o&&s);return ml(i.scrollbarX,()=>{var d;const p=((d=i.scrollbarX)===null||d===void 0?void 0:d.offsetHeight)||0;i.onCornerHeightChange(p),l(p)}),ml(i.scrollbarY,()=>{var d;const p=((d=i.scrollbarY)===null||d===void 0?void 0:d.offsetWidth)||0;i.onCornerWidthChange(p),a(p)}),c?C.createElement(dr.div,Zt({},r,{ref:t,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Zm(e){return e?parseInt(e,10):0}function vN(e,t){const n=e/t;return isNaN(n)?0:n}function Hm(e){const t=vN(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function u1e(e,t,n,r="ltr"){const i=Hm(n),o=i/2,a=t||o,s=i-a,l=n.scrollbar.paddingStart+a,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,d=n.content-n.viewport,p=r==="ltr"?[0,d]:[d*-1,0];return _N([l,c],p)(e)}function bN(e,t,n="ltr"){const r=Hm(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s=o-r,l=n==="ltr"?[0,a]:[a*-1,0],c=Wxe(e,l);return _N([0,a],[0,s])(c)}function _N(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function wN(e,t){return e>0&&e<t}const l1e=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,s=n.top!==o.top;(a||s)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function Wm(e,t){const n=Dr(e),r=C.useRef(0);return C.useEffect(()=>()=>window.clearTimeout(r.current),[]),C.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function ml(e,t){const n=Dr(t);$u(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}const c1e=Gxe,f1e=Jxe,d1e=Xxe,p1e=i1e,h1e=a1e;var xN={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(se,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",c="day",d="week",p="month",m="quarter",h="year",y="date",v="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(G){var V=["th","st","nd","rd"],q=G%100;return"["+G+(V[(q-20)%10]||V[q]||V[0])+"]"}},S=function(G,V,q){var Y=String(G);return!Y||Y.length>=V?G:""+Array(V+1-Y.length).join(q)+G},A={s:S,z:function(G){var V=-G.utcOffset(),q=Math.abs(V),Y=Math.floor(q/60),ne=q%60;return(V<=0?"+":"-")+S(Y,2,"0")+":"+S(ne,2,"0")},m:function G(V,q){if(V.date()<q.date())return-G(q,V);var Y=12*(q.year()-V.year())+(q.month()-V.month()),ne=V.clone().add(Y,p),ce=q-ne<0,P=V.clone().add(Y+(ce?-1:1),p);return+(-(Y+(q-ne)/(ce?ne-P:P-ne))||0)},a:function(G){return G<0?Math.ceil(G)||0:Math.floor(G)},p:function(G){return{M:p,y:h,w:d,d:c,D:y,h:l,m:s,s:a,ms:o,Q:m}[G]||String(G||"").toLowerCase().replace(/s$/,"")},u:function(G){return G===void 0}},E="en",T={};T[E]=b;var N="$isDayjsObject",L=function(G){return G instanceof re||!(!G||!G[N])},F=function G(V,q,Y){var ne;if(!V)return E;if(typeof V=="string"){var ce=V.toLowerCase();T[ce]&&(ne=ce),q&&(T[ce]=q,ne=ce);var P=V.split("-");if(!ne&&P.length>1)return G(P[0])}else{var ue=V.name;T[ue]=V,ne=ue}return!Y&&ne&&(E=ne),ne||!Y&&E},j=function(G,V){if(L(G))return G.clone();var q=typeof V=="object"?V:{};return q.date=G,q.args=arguments,new re(q)},H=A;H.l=F,H.i=L,H.w=function(G,V){return j(G,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var re=function(){function G(q){this.$L=F(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[N]=!0}var V=G.prototype;return V.parse=function(q){this.$d=function(Y){var ne=Y.date,ce=Y.utc;if(ne===null)return new Date(NaN);if(H.u(ne))return new Date;if(ne instanceof Date)return new Date(ne);if(typeof ne=="string"&&!/Z$/i.test(ne)){var P=ne.match(w);if(P){var ue=P[2]-1||0,Oe=(P[7]||"0").substring(0,3);return ce?new Date(Date.UTC(P[1],ue,P[3]||1,P[4]||0,P[5]||0,P[6]||0,Oe)):new Date(P[1],ue,P[3]||1,P[4]||0,P[5]||0,P[6]||0,Oe)}}return new Date(ne)}(q),this.init()},V.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},V.$utils=function(){return H},V.isValid=function(){return this.$d.toString()!==v},V.isSame=function(q,Y){var ne=j(q);return this.startOf(Y)<=ne&&ne<=this.endOf(Y)},V.isAfter=function(q,Y){return j(q)<this.startOf(Y)},V.isBefore=function(q,Y){return this.endOf(Y)<j(q)},V.$g=function(q,Y,ne){return H.u(q)?this[Y]:this.set(ne,q)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(q,Y){var ne=this,ce=!!H.u(Y)||Y,P=H.p(q),ue=function(Ke,Pe){var Ae=H.w(ne.$u?Date.UTC(ne.$y,Pe,Ke):new Date(ne.$y,Pe,Ke),ne);return ce?Ae:Ae.endOf(c)},Oe=function(Ke,Pe){return H.w(ne.toDate()[Ke].apply(ne.toDate("s"),(ce?[0,0,0,0]:[23,59,59,999]).slice(Pe)),ne)},M=this.$W,Ne=this.$M,qe=this.$D,Me="set"+(this.$u?"UTC":"");switch(P){case h:return ce?ue(1,0):ue(31,11);case p:return ce?ue(1,Ne):ue(0,Ne+1);case d:var Je=this.$locale().weekStart||0,rt=(M<Je?M+7:M)-Je;return ue(ce?qe-rt:qe+(6-rt),Ne);case c:case y:return Oe(Me+"Hours",0);case l:return Oe(Me+"Minutes",1);case s:return Oe(Me+"Seconds",2);case a:return Oe(Me+"Milliseconds",3);default:return this.clone()}},V.endOf=function(q){return this.startOf(q,!1)},V.$set=function(q,Y){var ne,ce=H.p(q),P="set"+(this.$u?"UTC":""),ue=(ne={},ne[c]=P+"Date",ne[y]=P+"Date",ne[p]=P+"Month",ne[h]=P+"FullYear",ne[l]=P+"Hours",ne[s]=P+"Minutes",ne[a]=P+"Seconds",ne[o]=P+"Milliseconds",ne)[ce],Oe=ce===c?this.$D+(Y-this.$W):Y;if(ce===p||ce===h){var M=this.clone().set(y,1);M.$d[ue](Oe),M.init(),this.$d=M.set(y,Math.min(this.$D,M.daysInMonth())).$d}else ue&&this.$d[ue](Oe);return this.init(),this},V.set=function(q,Y){return this.clone().$set(q,Y)},V.get=function(q){return this[H.p(q)]()},V.add=function(q,Y){var ne,ce=this;q=Number(q);var P=H.p(Y),ue=function(Ne){var qe=j(ce);return H.w(qe.date(qe.date()+Math.round(Ne*q)),ce)};if(P===p)return this.set(p,this.$M+q);if(P===h)return this.set(h,this.$y+q);if(P===c)return ue(1);if(P===d)return ue(7);var Oe=(ne={},ne[s]=r,ne[l]=i,ne[a]=n,ne)[P]||1,M=this.$d.getTime()+q*Oe;return H.w(M,this)},V.subtract=function(q,Y){return this.add(-1*q,Y)},V.format=function(q){var Y=this,ne=this.$locale();if(!this.isValid())return ne.invalidDate||v;var ce=q||"YYYY-MM-DDTHH:mm:ssZ",P=H.z(this),ue=this.$H,Oe=this.$m,M=this.$M,Ne=ne.weekdays,qe=ne.months,Me=ne.meridiem,Je=function(Pe,Ae,Fe,$e){return Pe&&(Pe[Ae]||Pe(Y,ce))||Fe[Ae].slice(0,$e)},rt=function(Pe){return H.s(ue%12||12,Pe,"0")},Ke=Me||function(Pe,Ae,Fe){var $e=Pe<12?"AM":"PM";return Fe?$e.toLowerCase():$e};return ce.replace(_,function(Pe,Ae){return Ae||function(Fe){switch(Fe){case"YY":return String(Y.$y).slice(-2);case"YYYY":return H.s(Y.$y,4,"0");case"M":return M+1;case"MM":return H.s(M+1,2,"0");case"MMM":return Je(ne.monthsShort,M,qe,3);case"MMMM":return Je(qe,M);case"D":return Y.$D;case"DD":return H.s(Y.$D,2,"0");case"d":return String(Y.$W);case"dd":return Je(ne.weekdaysMin,Y.$W,Ne,2);case"ddd":return Je(ne.weekdaysShort,Y.$W,Ne,3);case"dddd":return Ne[Y.$W];case"H":return String(ue);case"HH":return H.s(ue,2,"0");case"h":return rt(1);case"hh":return rt(2);case"a":return Ke(ue,Oe,!0);case"A":return Ke(ue,Oe,!1);case"m":return String(Oe);case"mm":return H.s(Oe,2,"0");case"s":return String(Y.$s);case"ss":return H.s(Y.$s,2,"0");case"SSS":return H.s(Y.$ms,3,"0");case"Z":return P}return null}(Pe)||P.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(q,Y,ne){var ce,P=this,ue=H.p(Y),Oe=j(q),M=(Oe.utcOffset()-this.utcOffset())*r,Ne=this-Oe,qe=function(){return H.m(P,Oe)};switch(ue){case h:ce=qe()/12;break;case p:ce=qe();break;case m:ce=qe()/3;break;case d:ce=(Ne-M)/6048e5;break;case c:ce=(Ne-M)/864e5;break;case l:ce=Ne/i;break;case s:ce=Ne/r;break;case a:ce=Ne/n;break;default:ce=Ne}return ne?ce:H.a(ce)},V.daysInMonth=function(){return this.endOf(p).$D},V.$locale=function(){return T[this.$L]},V.locale=function(q,Y){if(!q)return this.$L;var ne=this.clone(),ce=F(q,Y,!0);return ce&&(ne.$L=ce),ne},V.clone=function(){return H.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},G}(),Q=re.prototype;return j.prototype=Q,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",c],["$M",p],["$y",h],["$D",y]].forEach(function(G){Q[G[1]]=function(V){return this.$g(V,G[0],G[1])}}),j.extend=function(G,V){return G.$i||(G(V,re,j),G.$i=!0),j},j.locale=F,j.isDayjs=L,j.unix=function(G){return j(1e3*G)},j.en=T[E],j.Ls=T,j.p={},j})})(xN);var m1e=xN.exports;const Vm=Oo(m1e);var SN={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(se,function(){return function(n,r,i){r.prototype.isToday=function(){var o="YYYY-MM-DD",a=i();return this.format(o)===a.format(o)}}})})(SN);var y1e=SN.exports;const g1e=Oo(y1e);var EN={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(se,function(){return function(n,r,i){r.prototype.isYesterday=function(){var o="YYYY-MM-DD",a=i().subtract(1,"day");return this.format(o)===a.format(o)}}})})(EN);var v1e=EN.exports;const b1e=Oo(v1e);Vm.extend(g1e),Vm.extend(b1e);function _1e(e,t="day"){if(!e||e.length===0)return[];const n=[];n.push(AN(e[0].timestamp));for(let r=0;r<e.length;r++)if(n.push(e[r]),r+1<e.length){const i=e[r].timestamp,o=e[r+1].timestamp;Vm(i).isSame(o,t)||n.push(AN(o))}return n}function AN(e){return{direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:w1e(e)}}}function w1e(e,t=!1){const n=Vm(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}const CN=10*1e3,ON=C.memo(({scrollDownButton:e,...t})=>{var S,A,E,T,N,L,F,j,H,re,Q,G,V;const{messageList:n}=it(q=>q.theme),r=it(q=>q.messages),i=it(q=>q.setState),o=it(q=>q.on),a=it(q=>q.getClientId)(),s=it(q=>q.configuration),l=it(q=>q.messageContainerRef),c=it(q=>q.isTyping),d=it(q=>q.setIsTyping),p=C.useMemo(()=>_1e(r),[r]),[m,h]=C.useState(!0),{y}=Lve(l),[v,w]=qve(),_=()=>{if(!l.current)return;const{scrollHeight:q}=l.current;m&&l.current.scrollTo({top:q})};C.useEffect(()=>{const q=new Date(Date.now()-CN+2e3);r.length>0&&r[r.length-1].timestamp<q&&d(!1)},[v]),C.useEffect(()=>o("messageSent",()=>{d(!0),w(new Date(Date.now()+CN))}),[]),C.useEffect(()=>o("message",()=>{d(!1)}),[]),C.useEffect(()=>{const q=r[r.length-1];i({disableComposer:!!(q!=null&&q.disableInput)})},[r.length]),C.useEffect(()=>{if(!l.current)return;const{offsetHeight:q,scrollHeight:Y,scrollTop:ne}=l.current;h(Y<=ne+q+100)},[y]);const b=e!=null&&e.icon?e==null?void 0:e.icon:cbe;return X.jsxs(c1e,{...(S=n==null?void 0:n.scrollbar)==null?void 0:S.container,scrollHideDelay:300,type:"hover",children:[X.jsx(f1e,{...(A=n==null?void 0:n.scrollbar)==null?void 0:A.viewport,ref:l,children:X.jsxs("ul",{...t,...n==null?void 0:n.container,children:[X.jsxs("li",{...(E=n==null?void 0:n.marquee)==null?void 0:E.container,children:[X.jsx(rb,{userId:a,src:s.botAvatar,...(T=n==null?void 0:n.marquee)==null?void 0:T.avatar,children:(s.botName||"Bot").slice(0,1)}),X.jsxs("div",{...(N=n==null?void 0:n.marquee)==null?void 0:N.content,children:[X.jsx("h1",{...(L=n==null?void 0:n.marquee)==null?void 0:L.title,children:s.botName||"Bot"}),X.jsx("p",{...(F=n==null?void 0:n.marquee)==null?void 0:F.description,children:s.botDescription})]})]}),p.map((q,Y)=>X.jsx(K_,{scroll:_,...q},Y)),c&&X.jsx(K_,{scroll:_,direction:"incoming",children:X.jsx(fN,{})}),X.jsx("li",{"data-is-at-bottom":m,...(j=n==null?void 0:n.scrollDownButton)==null?void 0:j.container,children:!!r.length&&X.jsxs("button",{type:"button","data-is-at-bottom":m,...(H=n==null?void 0:n.scrollDownButton)==null?void 0:H.button,onClick:()=>{var q,Y;return(Y=l.current)==null?void 0:Y.scrollBy({top:(q=l.current)==null?void 0:q.scrollHeight})},children:[(e==null?void 0:e.text)??"Back"," ",X.jsx(b,{...(re=n==null?void 0:n.scrollDownButton)==null?void 0:re.icon})]})})]})}),X.jsx(d1e,{orientation:"vertical",...(Q=n==null?void 0:n.scrollbar)==null?void 0:Q.background,children:X.jsx(p1e,{...(G=n==null?void 0:n.scrollbar)==null?void 0:G.thumb})}),X.jsx(h1e,{...(V=n==null?void 0:n.scrollbar)==null?void 0:V.corner})]})}),x1e=()=>X.jsxs(aN,{children:[X.jsx(cN,{}),X.jsx(ON,{}),X.jsxs(CD,{children:[X.jsx(TD,{}),X.jsx(OD,{}),X.jsx($D,{})]})]}),yl=oe.object({title:oe.string(),link:oe.string().optional()}),TN=oe.object({composerPlaceholder:oe.string().optional(),botName:oe.string().optional(),botAvatar:oe.string().optional(),botDescription:oe.string().optional(),website:yl.optional(),email:yl.optional(),phone:yl.optional(),privacyPolicy:yl.optional(),termsOfService:yl.optional()}),$N=oe.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),kN=oe.object({}).passthrough().transform(e=>e),Le=oe.object({className:oe.string().optional(),style:kN.optional()}),Km=oe.object({container:Le.optional(),image:Le.optional(),fallback:Le.optional()}),IN=oe.object({button:Le.optional(),text:oe.record($N,Le.optional()),image:oe.object({image:Le.optional(),placeholder:Le.optional()}).optional(),audio:Le.optional(),video:Le.optional(),file:oe.object({container:Le.optional(),title:Le.optional(),icon:Le.optional()}).optional(),location:oe.object({container:Le.optional(),title:Le.optional(),icon:Le.optional()}).optional(),column:Le.optional(),row:Le.optional(),bubble:Le.optional(),carousel:oe.object({container:Le.optional(),slidesContainer:Le.optional(),backButton:Le.optional(),nextButton:Le.optional()}).optional(),dropdown:oe.object({button:oe.object({container:Le.optional(),icon:Le.optional(),text:Le.optional()}).optional(),content:oe.object({container:Le.optional(),item:Le.optional()}).optional()}).optional()}),PN=oe.object({container:Le.optional(),modal:oe.object({overlay:Le.optional(),container:Le.optional(),dialog:oe.object({container:Le.optional(),title:oe.object({container:Le.optional(),text:Le.optional(),closeIcon:Le.optional()}).optional(),content:Le.optional(),newConversation:oe.object({text:Le.optional(),button:Le.optional()}).optional()}).optional()}).optional(),notification:oe.object({container:Le.optional(),title:Le.optional(),description:Le.optional(),icon:Le.optional(),closeIcon:Le.optional()}).optional(),header:oe.object({container:Le.optional(),content:oe.object({container:Le.optional(),title:Le.optional(),description:Le.optional(),avatar:Km.optional(),actions:oe.object({container:Le.optional(),icons:Le.optional()}).optional()}),expandedContent:oe.object({container:Le.optional(),group:Le.optional(),descriptionItems:oe.object({container:Le.optional(),icon:Le.optional(),text:Le.optional(),link:Le.optional(),poweredBy:Le.optional()}).optional()}).optional(),description:oe.object({container:Le.optional(),title:Le.optional(),subtitle:Le.optional()}).optional(),newConversationIcon:Le.optional()}).optional(),composer:oe.object({container:Le.optional(),input:Le.optional(),uploadButton:oe.object({container:Le.optional(),icon:Le.optional()}).optional(),button:oe.object({container:Le.optional(),icon:Le.optional()}).optional()}).optional(),fab:oe.object({icon:Le.optional(),container:Le.optional()}).optional(),messageList:oe.object({scrollbar:oe.object({container:Le.optional(),viewport:Le.optional(),thumb:Le.optional(),corner:Le.optional(),background:Le.optional()}).optional(),container:Le.optional(),marquee:oe.object({content:Le.optional(),title:Le.optional(),description:Le.optional(),avatar:Km.optional(),container:Le.optional()}).optional(),scrollDownButton:oe.object({container:Le.optional(),button:Le.optional(),icon:Le.optional()}).optional()}).optional(),message:oe.object({container:Le.optional(),avatar:Km.optional(),blocks:IN.optional()}).optional(),loadingIndicator:oe.object({container:Le.optional(),loader:Le.optional()}).optional()}),RN=oe.enum(["opened","closed","initial"]),DN=oe.object({data:oe.record(oe.unknown()).optional()}),NN=oe.enum(["messaging","pushpin"]),MN=oe.object({configuration:TN.optional().catch(void 0),theme:PN.optional().catch(void 0),style:oe.string().optional().catch(void 0),user:DN.optional().catch(void 0)}),S1e=MN.extend({clientId:oe.string(),botId:oe.string(),selector:oe.string().optional().catch(void 0),webchatScriptUrl:oe.string().optional().catch(void 0),fabScriptUrl:oe.string().optional().catch(void 0),messagingUrl:oe.string().optional().catch(void 0),pushpinUrl:oe.string().optional().catch(void 0),clientMode:NN.optional().catch(void 0),defaultState:RN.optional().catch(void 0)});var J_={},X_={};const E1e=!1,A1e=/\r?\n/,C1e=/\bono[ @]/;function O1e(e){return!!(e&&e.configurable&&typeof e.get=="function")}function T1e(e){return!!(!e||e.writable||typeof e.set=="function")}function jN(e,t){let n=LN(e.stack),r=t?t.stack:void 0;return n&&r?n+`
|
|
462
|
+
`)},Vwe=0,pl=[];function Kwe(e){var t=z.useRef([]),n=z.useRef([0,0]),r=z.useRef(),i=z.useState(Vwe++)[0],o=z.useState(function(){return HD()})[0],a=z.useRef(e);z.useEffect(function(){a.current=e},[e]),z.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=ywe([e.lockRef.current],(e.shards||[]).map(JD),!0).filter(Boolean);return v.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=z.useCallback(function(v,w){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var _=Um(v),b=n.current,S="deltaX"in v?v.deltaX:b[0]-_[0],A="deltaY"in v?v.deltaY:b[1]-_[1],E,T=v.target,j=Math.abs(S)>Math.abs(A)?"h":"v";if("touches"in v&&j==="h"&&T.type==="range")return!1;var L=VD(j,T);if(!L)return!0;if(L?E=j:(E=j==="v"?"h":"v",L=VD(j,T)),!L)return!1;if(!r.current&&"changedTouches"in v&&(S||A)&&(r.current=E),!E)return!0;var F=r.current||E;return Zwe(F,w,v,F==="h"?S:A,!0)},[]),l=z.useCallback(function(v){var w=v;if(!(!pl.length||pl[pl.length-1]!==o)){var _="deltaY"in w?YD(w):Um(w),b=t.current.filter(function(E){return E.name===w.type&&E.target===w.target&&Hwe(E.delta,_)})[0];if(b&&b.should){w.cancelable&&w.preventDefault();return}if(!b){var S=(a.current.shards||[]).map(JD).filter(Boolean).filter(function(E){return E.contains(w.target)}),A=S.length>0?s(w,S[0]):!a.current.noIsolation;A&&w.cancelable&&w.preventDefault()}}},[]),c=z.useCallback(function(v,w,_,b){var S={name:v,delta:w,target:_,should:b};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(A){return A!==S})},1)},[]),d=z.useCallback(function(v){n.current=Um(v),r.current=void 0},[]),p=z.useCallback(function(v){c(v.type,YD(v),v.target,s(v,e.lockRef.current))},[]),m=z.useCallback(function(v){c(v.type,Um(v),v.target,s(v,e.lockRef.current))},[]);z.useEffect(function(){return pl.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,dl),document.addEventListener("touchmove",l,dl),document.addEventListener("touchstart",d,dl),function(){pl=pl.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,dl),document.removeEventListener("touchmove",l,dl),document.removeEventListener("touchstart",d,dl)}},[]);var h=e.removeScrollBar,y=e.inert;return z.createElement(z.Fragment,null,y?z.createElement(o,{styles:Wwe(i)}):null,h?z.createElement(jwe,{gapMode:"margin"}):null)}const Gwe=Awe(zD,Kwe);var XD=z.forwardRef(function(e,t){return z.createElement(Fm,_o({},e,{ref:t,sideCar:Gwe}))});XD.classNames=Fm.classNames;const Ywe=XD;var Jwe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},hl=new WeakMap,Bm=new WeakMap,zm={},z_=0,QD=function(e){return e&&(e.host||QD(e.parentNode))},Xwe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=QD(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Qwe=function(e,t,n,r){var i=Xwe(t,Array.isArray(e)?e:[e]);zm[n]||(zm[n]=new WeakMap);var o=zm[n],a=[],s=new Set,l=new Set(i),c=function(p){!p||s.has(p)||(s.add(p),c(p.parentNode))};i.forEach(c);var d=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))d(m);else{var h=m.getAttribute(r),y=h!==null&&h!=="false",v=(hl.get(m)||0)+1,w=(o.get(m)||0)+1;hl.set(m,v),o.set(m,w),a.push(m),v===1&&y&&Bm.set(m,!0),w===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}})};return d(t),s.clear(),z_++,function(){a.forEach(function(p){var m=hl.get(p)-1,h=o.get(p)-1;hl.set(p,m),o.set(p,h),m||(Bm.has(p)||p.removeAttribute(r),Bm.delete(p)),h||p.removeAttribute(n)}),z_--,z_||(hl=new WeakMap,hl=new WeakMap,Bm=new WeakMap,zm={})}},exe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Jwe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Qwe(r,i,n,"aria-hidden")):function(){return null}};const eN="Dialog",[tN,rDe]=Wp(eN),[txe,Jo]=tN(eN),nxe=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=C.useRef(null),l=C.useRef(null),[c=!1,d]=ID({prop:r,defaultProp:i,onChange:o});return C.createElement(txe,{scope:t,triggerRef:s,contentRef:l,contentId:Nm(),titleId:Nm(),descriptionId:Nm(),open:c,onOpenChange:d,onOpenToggle:C.useCallback(()=>d(p=>!p),[d]),modal:a},n)},rxe="DialogTrigger",ixe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jo(rxe,n),o=ii(t,i.triggerRef);return C.createElement(dr.button,Zt({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":H_(i.open)},r,{ref:o,onClick:Or(e.onClick,i.onOpenToggle)}))}),oxe="DialogPortal",[iDe,nN]=tN(oxe,{forceMount:void 0}),Z_="DialogOverlay",axe=C.forwardRef((e,t)=>{const n=nN(Z_,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Jo(Z_,e.__scopeDialog);return o.modal?C.createElement(La,{present:r||o.open},C.createElement(sxe,Zt({},i,{ref:t}))):null}),sxe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jo(Z_,n);return C.createElement(Ywe,{as:eb,allowPinchZoom:!0,shards:[i.contentRef]},C.createElement(dr.div,Zt({"data-state":H_(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),wf="DialogContent",uxe=C.forwardRef((e,t)=>{const n=nN(wf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Jo(wf,e.__scopeDialog);return C.createElement(La,{present:r||o.open},o.modal?C.createElement(lxe,Zt({},i,{ref:t})):C.createElement(cxe,Zt({},i,{ref:t})))}),lxe=C.forwardRef((e,t)=>{const n=Jo(wf,e.__scopeDialog),r=C.useRef(null),i=ii(t,n.contentRef,r);return C.useEffect(()=>{const o=r.current;if(o)return exe(o)},[]),C.createElement(rN,Zt({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Or(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Or(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Or(e.onFocusOutside,o=>o.preventDefault())}))}),cxe=C.forwardRef((e,t)=>{const n=Jo(wf,e.__scopeDialog),r=C.useRef(!1),i=C.useRef(!1);return C.createElement(rN,Zt({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,o),!o.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),rN=C.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=Jo(wf,n),l=C.useRef(null),c=ii(t,l);return mwe(),C.createElement(C.Fragment,null,C.createElement(awe,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},C.createElement(rwe,Zt({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":H_(s.open)},a,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),fxe="DialogTitle",dxe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jo(fxe,n);return C.createElement(dr.h2,Zt({id:i.titleId},r,{ref:t}))}),pxe="DialogClose",hxe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jo(pxe,n);return C.createElement(dr.button,Zt({type:"button"},r,{ref:t,onClick:Or(e.onClick,()=>i.onOpenChange(!1))}))});function H_(e){return e?"open":"closed"}const mxe=nxe,yxe=ixe,gxe=axe,vxe=uxe,bxe=dxe,iN=hxe;function _xe({title:e,titleId:t,...n},r){return z.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?z.createElement("title",{id:t},e):null,z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const oN=z.forwardRef(_xe);function Fa({open:e,onOpenChange:t,children:n}){return X.jsx(mxe,{open:e,onOpenChange:t,children:n})}function wxe({title:e,children:t}){var r,i,o,a,s,l,c,d;const{modal:n}=it(p=>p.theme);return X.jsxs(X.Fragment,{children:[X.jsx(gxe,{...n==null?void 0:n.overlay}),X.jsx("div",{...n==null?void 0:n.container,children:X.jsxs(vxe,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[X.jsxs("div",{...(o=(i=n==null?void 0:n.dialog)==null?void 0:i.title)==null?void 0:o.container,children:[X.jsx(bxe,{...(s=(a=n==null?void 0:n.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),X.jsx(iN,{children:X.jsx(oN,{role:"button",tabIndex:0,...(c=(l=n==null?void 0:n.dialog)==null?void 0:l.title)==null?void 0:c.closeIcon})})]}),X.jsx("div",{...(d=n==null?void 0:n.dialog)==null?void 0:d.content,children:t})]})})]})}Fa.Button=yxe,Fa.Close=iN,Fa.Content=wxe;const aN=C.forwardRef(({children:e,...t},n)=>{const{container:r}=it(i=>i.theme);return X.jsxs("div",{...t,...r,ref:n,children:[X.jsx(Jge,{}),X.jsxs(kD,{children:[X.jsx(xxe,{}),e]})]})}),xxe=()=>{const{modal:e}=it(r=>r.theme),t=it(r=>r.connected),{showModal:n}=E2();return C.useEffect(()=>{var r,i,o,a;t||n({title:"Connection Error",content:X.jsxs(X.Fragment,{children:[X.jsx("p",{...(i=(r=e==null?void 0:e.dialog)==null?void 0:r.newConversation)==null?void 0:i.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),X.jsx(Fa.Close,{asChild:!0,children:X.jsx("button",{type:"button",...(a=(o=e==null?void 0:e.dialog)==null?void 0:o.newConversation)==null?void 0:a.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),X.jsx(X.Fragment,{})},Sxe=C.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:i}=it(s=>s.theme),{container:o,icon:a}=i??{};return X.jsx("div",{...n,...o,ref:r,onClick:t,children:X.jsx("div",{...a})})}),sN="Collapsible",[Exe,aDe]=Wp(sN),[Axe,W_]=Exe(sN),Cxe=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,c]=ID({prop:r,defaultProp:i,onChange:a});return C.createElement(Axe,{scope:n,disabled:o,contentId:Nm(),open:l,onOpenToggle:C.useCallback(()=>c(d=>!d),[c])},C.createElement(dr.div,Zt({"data-state":V_(l),"data-disabled":o?"":void 0},s,{ref:t})))}),Oxe="CollapsibleTrigger",Txe=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=W_(Oxe,n);return C.createElement(dr.button,Zt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":V_(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:t,onClick:Or(e.onClick,i.onOpenToggle)}))}),uN="CollapsibleContent",$xe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=W_(uN,e.__scopeCollapsible);return C.createElement(La,{present:n||i.open},({present:o})=>C.createElement(kxe,Zt({},r,{ref:t,present:o})))}),kxe=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=W_(uN,n),[s,l]=C.useState(r),c=C.useRef(null),d=ii(t,c),p=C.useRef(0),m=p.current,h=C.useRef(0),y=h.current,v=a.open||s,w=C.useRef(v),_=C.useRef();return C.useEffect(()=>{const b=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(b)},[]),$u(()=>{const b=c.current;if(b){_.current=_.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const S=b.getBoundingClientRect();p.current=S.height,h.current=S.width,w.current||(b.style.transitionDuration=_.current.transitionDuration,b.style.animationName=_.current.animationName),l(r)}},[a.open,r]),C.createElement(dr.div,Zt({"data-state":V_(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v},o,{ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style}}),v&&i)});function V_(e){return e?"open":"closed"}const Ixe=Cxe,Pxe=Txe,Rxe=$xe,Dxe=e=>z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},z.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 5.5v-5m0 0h-5m5 0L8.833 7.167m-2.5-5H4.5c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 .772 3.532C.5 4.066.5 4.767.5 6.167V11.5c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.092C2.4 15.5 3.1 15.5 4.5 15.5h5.333c1.4 0 2.1 0 2.635-.273a2.5 2.5 0 0 0 1.093-1.092c.272-.535.272-1.235.272-2.635V9.667"})),lN=({...e})=>{var a,s;const{header:t,modal:n}=it(l=>l.theme),r=it(l=>l.restartConversation),{showModal:i}=E2(),o=l=>{var c,d,p,m;l.stopPropagation(),i({title:"Restart Conversation",content:X.jsxs(X.Fragment,{children:[X.jsx("p",{...(d=(c=n==null?void 0:n.dialog)==null?void 0:c.newConversation)==null?void 0:d.text,children:"Are you sure you want to restart a new conversation?"}),X.jsx(Fa.Close,{asChild:!0,children:X.jsx("button",{type:"button",...(m=(p=n==null?void 0:n.dialog)==null?void 0:p.newConversation)==null?void 0:m.button,onClick:r,children:"Restart"})})]})})};return X.jsx(dbe,{...e,...(s=(a=t==null?void 0:t.content)==null?void 0:a.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:o,onKeyDown:l=>{l.key==="Enter"&&o(l)}})},Nxe=({...e})=>{var i,o;const{header:t}=it(a=>a.theme),n=it(a=>a.closeWindow),r=a=>{a.stopPropagation(),n==null||n()};return X.jsx(oN,{...e,...(o=(i=t==null?void 0:t.content)==null?void 0:i.actions)==null?void 0:o.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:a=>{a.key==="Enter"&&r(a)}})},Mxe=C.memo(C.forwardRef(({defaultOpen:e,...t},n)=>{const{header:r}=it(a=>a.theme),[i,o]=C.useState(!!e);return X.jsx(Ixe,{open:i,onOpenChange:o,...t,...r==null?void 0:r.container,ref:n})})),jxe=C.forwardRef((e,t)=>{var r;const{header:n}=it(i=>i.theme);return X.jsx(Pxe,{...e,...(r=n==null?void 0:n.content)==null?void 0:r.container,ref:t})}),Lxe=C.forwardRef((e,t)=>{var r;const{header:n}=it(i=>i.theme);return X.jsx(Rxe,{...e,...(r=n==null?void 0:n.expandedContent)==null?void 0:r.container,ref:t})}),Fxe=C.forwardRef(({src:e,...t},n)=>{var o;const{header:r}=it(a=>a.theme),i=it(a=>a.getClientId)();return X.jsx(rb,{...t,ref:n,userId:i,src:e,...(o=r==null?void 0:r.content)==null?void 0:o.avatar})}),qxe=C.forwardRef((e,t)=>{var r;const{header:n}=it(i=>i.theme);return X.jsx("h2",{...e,...(r=n==null?void 0:n.content)==null?void 0:r.title,ref:t})}),Uxe=C.forwardRef((e,t)=>{var r;const{header:n}=it(i=>i.theme);return X.jsx("p",{...e,...(r=n==null?void 0:n.content)==null?void 0:r.description,ref:t})}),Bxe=C.forwardRef((e,t)=>{var r,i;const{header:n}=it(o=>o.theme);return X.jsx("div",{...e,...(i=(r=n==null?void 0:n.content)==null?void 0:r.actions)==null?void 0:i.container,ref:t})}),fi=Object.assign(Mxe,{Content:jxe,ExpandedContent:Lxe,Avatar:Fxe,Description:Uxe,Title:qxe,Actions:Bxe,DescriptionItem:({icon:e,title:t,link:n,...r})=>{var s,l,c,d,p,m,h,y,v,w,_,b;const{header:i}=it(S=>S.theme),o=e??Dxe,a=S=>{S&&age(S)};return!n&&!t?null:n?X.jsxs("a",{...r,...(l=(s=i==null?void 0:i.expandedContent)==null?void 0:s.descriptionItems)==null?void 0:l.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[X.jsx(o,{...(d=(c=i==null?void 0:i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:d.icon}),X.jsx("p",{...(m=(p=i==null?void 0:i.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:m.link,children:t})]}):X.jsxs("div",{...r,...(y=(h=i==null?void 0:i.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:y.container,onClick:S=>{a(S.currentTarget.textContent)},children:[X.jsx(o,{...(w=(v=i==null?void 0:i.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:w.icon}),X.jsx("p",{...(b=(_=i==null?void 0:i.expandedContent)==null?void 0:_.descriptionItems)==null?void 0:b.text,children:t})]})}}),cN=()=>{var o,a,s,l,c,d,p,m,h,y,v,w,_,b,S,A,E,T,j;const{header:e}=it(L=>L.theme),t=it(L=>L.configuration),n=it(L=>L.closeWindow),r=it(L=>!L.disableRestartConversation),i=!!((o=t.email)!=null&&o.title)||!!((a=t.phone)!=null&&a.title)||!!((s=t.website)!=null&&s.title)||!!((l=t.termsOfService)!=null&&l.link)||!!((c=t.privacyPolicy)!=null&&c.link);return X.jsxs(fi,{open:i?void 0:!1,"data-disabled":i?void 0:"",children:[X.jsxs(fi.Content,{children:[X.jsx(fi.Avatar,{src:t.botAvatar,children:t.botName||"Bot"}),X.jsx(fi.Title,{children:t.botName||"Bot"}),t.botDescription&&X.jsx(fi.Description,{children:t.botDescription}),X.jsxs(fi.Actions,{children:[r&&X.jsx(lN,{}),n&&X.jsx(Nxe,{})]})]}),X.jsxs(fi.ExpandedContent,{children:[X.jsxs("div",{"data-links":"",...(d=e==null?void 0:e.expandedContent)==null?void 0:d.group,children:[X.jsx(fi.DescriptionItem,{"data-email":"",icon:c0e,title:(p=t.email)==null?void 0:p.title,link:(m=t.email)==null?void 0:m.link}),X.jsx(fi.DescriptionItem,{"data-phone":"",icon:y0e,title:(h=t.phone)==null?void 0:h.title,link:(y=t.phone)==null?void 0:y.link}),X.jsx(fi.DescriptionItem,{"data-website":"",link:(v=t.website)==null?void 0:v.link,icon:d0e,title:(w=t.website)==null?void 0:w.title})]}),X.jsxs("div",{"data-legal":"",...(_=e==null?void 0:e.expandedContent)==null?void 0:_.group,children:[X.jsx(fi.DescriptionItem,{"data-terms":"",link:(b=t.termsOfService)==null?void 0:b.link,icon:u0e,title:(S=t.termsOfService)==null?void 0:S.title}),X.jsx(fi.DescriptionItem,{"data-privacy":"",link:(A=t.privacyPolicy)==null?void 0:A.link,icon:h0e,title:(E=t.privacyPolicy)==null?void 0:E.title})]}),X.jsx("div",{...(j=(T=e==null?void 0:e.expandedContent)==null?void 0:T.descriptionItems)==null?void 0:j.poweredBy,children:"⚡ by Botpress"})]})]})},zxe=fi,fN=C.memo(({...e})=>{const{loadingIndicator:t}=it(n=>n.theme);return X.jsx("div",{...e,...t==null?void 0:t.container,children:X.jsx("div",{...t==null?void 0:t.loader})})}),K_=C.forwardRef(({direction:e,block:t,scroll:n,disableInput:r,children:i,sender:o,...a},s)=>{var v,w,_,b;const[l,c]=C.useState([]),{message:d}=it(S=>S.theme),{botAvatar:p,botName:m}=it(S=>S.configuration),h=it(S=>S.getClientId)();Pve(()=>{n()}),C.useEffect(()=>{l.length===0&&n()},[l.length]);const y=T$(h??"",15);return X.jsx(x2.Provider,{value:{isLoading:l,setIsLoading:c},children:X.jsxs("div",{...a,...d==null?void 0:d.container,"data-loaded":l.length===0,"data-disable-input":!!r,"data-direction":e,ref:s,children:[X.jsxs(A$,{"data-color":y,...(v=d==null?void 0:d.avatar)==null?void 0:v.container,children:[X.jsx(C$,{...(w=d==null?void 0:d.avatar)==null?void 0:w.image,src:(o==null?void 0:o.avatar)??p}),X.jsx(O$,{...(_=d==null?void 0:d.avatar)==null?void 0:_.fallback,children:(o==null?void 0:o.name[0])??((b=m??"Bot")==null?void 0:b[0])})]}),t&&X.jsx(fl,{block:t,styles:d==null?void 0:d.blocks}),i]})})}),Zxe=C.createContext(void 0);function Hxe(e){const t=C.useContext(Zxe);return e||t||"ltr"}function Wxe(e,[t,n]){return Math.min(n,Math.max(t,e))}function Vxe(e,t){return C.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const dN="ScrollArea",[pN,uDe]=Wp(dN),[Kxe,Si]=pN(dN),Gxe=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,l]=C.useState(null),[c,d]=C.useState(null),[p,m]=C.useState(null),[h,y]=C.useState(null),[v,w]=C.useState(null),[_,b]=C.useState(0),[S,A]=C.useState(0),[E,T]=C.useState(!1),[j,L]=C.useState(!1),F=ii(t,H=>l(H)),M=Hxe(i);return C.createElement(Kxe,{scope:n,type:r,dir:M,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:d,content:p,onContentChange:m,scrollbarX:h,onScrollbarXChange:y,scrollbarXEnabled:E,onScrollbarXEnabledChange:T,scrollbarY:v,onScrollbarYChange:w,scrollbarYEnabled:j,onScrollbarYEnabledChange:L,onCornerWidthChange:b,onCornerHeightChange:A},C.createElement(dr.div,Zt({dir:M},a,{ref:F,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})))}),Yxe="ScrollAreaViewport",Jxe=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...i}=e,o=Si(Yxe,n),a=C.useRef(null),s=ii(t,a,o.onViewportChange);return C.createElement(C.Fragment,null,C.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),C.createElement(dr.div,Zt({"data-radix-scroll-area-viewport":""},i,{ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style}}),C.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Xo="ScrollAreaScrollbar",Xxe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Si(Xo,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s=e.orientation==="horizontal";return C.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),i.type==="hover"?C.createElement(Qxe,Zt({},r,{ref:t,forceMount:n})):i.type==="scroll"?C.createElement(e1e,Zt({},r,{ref:t,forceMount:n})):i.type==="auto"?C.createElement(hN,Zt({},r,{ref:t,forceMount:n})):i.type==="always"?C.createElement(G_,Zt({},r,{ref:t})):null}),Qxe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Si(Xo,e.__scopeScrollArea),[o,a]=C.useState(!1);return C.useEffect(()=>{const s=i.scrollArea;let l=0;if(s){const c=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),C.createElement(La,{present:n||o},C.createElement(hN,Zt({"data-state":o?"visible":"hidden"},r,{ref:t})))}),e1e=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Si(Xo,e.__scopeScrollArea),o=e.orientation==="horizontal",a=Wm(()=>l("SCROLL_END"),100),[s,l]=Vxe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return C.useEffect(()=>{if(s==="idle"){const c=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,i.scrollHideDelay,l]),C.useEffect(()=>{const c=i.viewport,d=o?"scrollLeft":"scrollTop";if(c){let p=c[d];const m=()=>{const h=c[d];p!==h&&(l("SCROLL"),a()),p=h};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[i.viewport,o,l,a]),C.createElement(La,{present:n||s!=="hidden"},C.createElement(G_,Zt({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:Or(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Or(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),hN=C.forwardRef((e,t)=>{const n=Si(Xo,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=C.useState(!1),s=e.orientation==="horizontal",l=Wm(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(s?c:d)}},10);return ml(n.viewport,l),ml(n.content,l),C.createElement(La,{present:r||o},C.createElement(G_,Zt({"data-state":o?"visible":"hidden"},i,{ref:t})))}),G_=C.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=Si(Xo,e.__scopeScrollArea),o=C.useRef(null),a=C.useRef(0),[s,l]=C.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=vN(s.viewport,s.content),d={...r,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:m=>o.current=m,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:m=>a.current=m};function p(m,h){return u1e(m,a.current,s,h)}return n==="horizontal"?C.createElement(t1e,Zt({},d,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollLeft,h=bN(m,s,i.dir);o.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=p(m,i.dir))}})):n==="vertical"?C.createElement(n1e,Zt({},d,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollTop,h=bN(m,s);o.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=p(m))}})):null}),t1e=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=Si(Xo,e.__scopeScrollArea),[a,s]=C.useState(),l=C.useRef(null),c=ii(t,l,o.onScrollbarXChange);return C.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),C.createElement(yN,Zt({"data-orientation":"horizontal"},i,{ref:c,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Hm(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const m=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),wN(m,p)&&d.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Zm(a.paddingLeft),paddingEnd:Zm(a.paddingRight)}})}}))}),n1e=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=Si(Xo,e.__scopeScrollArea),[a,s]=C.useState(),l=C.useRef(null),c=ii(t,l,o.onScrollbarYChange);return C.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),C.createElement(yN,Zt({"data-orientation":"vertical"},i,{ref:c,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Hm(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const m=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),wN(m,p)&&d.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Zm(a.paddingTop),paddingEnd:Zm(a.paddingBottom)}})}}))}),[r1e,mN]=pN(Xo),yN=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:d,onResize:p,...m}=e,h=Si(Xo,n),[y,v]=C.useState(null),w=ii(t,F=>v(F)),_=C.useRef(null),b=C.useRef(""),S=h.viewport,A=r.content-r.viewport,E=Dr(d),T=Dr(l),j=Wm(p,10);function L(F){if(_.current){const M=F.clientX-_.current.left,H=F.clientY-_.current.top;c({x:M,y:H})}}return C.useEffect(()=>{const F=M=>{const H=M.target;(y==null?void 0:y.contains(H))&&E(M,A)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[S,y,A,E]),C.useEffect(T,[r,T]),ml(y,j),ml(h.content,j),C.createElement(r1e,{scope:n,scrollbar:y,hasThumb:i,onThumbChange:Dr(o),onThumbPointerUp:Dr(a),onThumbPositionChange:T,onThumbPointerDown:Dr(s)},C.createElement(dr.div,Zt({},m,{ref:w,style:{position:"absolute",...m.style},onPointerDown:Or(e.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),_.current=y.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),L(F))}),onPointerMove:Or(e.onPointerMove,L),onPointerUp:Or(e.onPointerUp,F=>{const M=F.target;M.hasPointerCapture(F.pointerId)&&M.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=b.current,h.viewport&&(h.viewport.style.scrollBehavior=""),_.current=null})})))}),Y_="ScrollAreaThumb",i1e=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=mN(Y_,e.__scopeScrollArea);return C.createElement(La,{present:n||i.hasThumb},C.createElement(o1e,Zt({ref:t},r)))}),o1e=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=Si(Y_,n),a=mN(Y_,n),{onThumbPositionChange:s}=a,l=ii(t,p=>a.onThumbChange(p)),c=C.useRef(),d=Wm(()=>{c.current&&(c.current(),c.current=void 0)},100);return C.useEffect(()=>{const p=o.viewport;if(p){const m=()=>{if(d(),!c.current){const h=l1e(p,s);c.current=h,s()}};return s(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[o.viewport,d,s]),C.createElement(dr.div,Zt({"data-state":a.hasThumb?"visible":"hidden"},i,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Or(e.onPointerDownCapture,p=>{const h=p.target.getBoundingClientRect(),y=p.clientX-h.left,v=p.clientY-h.top;a.onThumbPointerDown({x:y,y:v})}),onPointerUp:Or(e.onPointerUp,a.onThumbPointerUp)}))}),gN="ScrollAreaCorner",a1e=C.forwardRef((e,t)=>{const n=Si(gN,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?C.createElement(s1e,Zt({},e,{ref:t})):null}),s1e=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=Si(gN,n),[o,a]=C.useState(0),[s,l]=C.useState(0),c=!!(o&&s);return ml(i.scrollbarX,()=>{var d;const p=((d=i.scrollbarX)===null||d===void 0?void 0:d.offsetHeight)||0;i.onCornerHeightChange(p),l(p)}),ml(i.scrollbarY,()=>{var d;const p=((d=i.scrollbarY)===null||d===void 0?void 0:d.offsetWidth)||0;i.onCornerWidthChange(p),a(p)}),c?C.createElement(dr.div,Zt({},r,{ref:t,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Zm(e){return e?parseInt(e,10):0}function vN(e,t){const n=e/t;return isNaN(n)?0:n}function Hm(e){const t=vN(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function u1e(e,t,n,r="ltr"){const i=Hm(n),o=i/2,a=t||o,s=i-a,l=n.scrollbar.paddingStart+a,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,d=n.content-n.viewport,p=r==="ltr"?[0,d]:[d*-1,0];return _N([l,c],p)(e)}function bN(e,t,n="ltr"){const r=Hm(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s=o-r,l=n==="ltr"?[0,a]:[a*-1,0],c=Wxe(e,l);return _N([0,a],[0,s])(c)}function _N(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function wN(e,t){return e>0&&e<t}const l1e=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,s=n.top!==o.top;(a||s)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function Wm(e,t){const n=Dr(e),r=C.useRef(0);return C.useEffect(()=>()=>window.clearTimeout(r.current),[]),C.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function ml(e,t){const n=Dr(t);$u(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}const c1e=Gxe,f1e=Jxe,d1e=Xxe,p1e=i1e,h1e=a1e;var xN={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(se,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",c="day",d="week",p="month",m="quarter",h="year",y="date",v="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(G){var V=["th","st","nd","rd"],q=G%100;return"["+G+(V[(q-20)%10]||V[q]||V[0])+"]"}},S=function(G,V,q){var Y=String(G);return!Y||Y.length>=V?G:""+Array(V+1-Y.length).join(q)+G},A={s:S,z:function(G){var V=-G.utcOffset(),q=Math.abs(V),Y=Math.floor(q/60),ne=q%60;return(V<=0?"+":"-")+S(Y,2,"0")+":"+S(ne,2,"0")},m:function G(V,q){if(V.date()<q.date())return-G(q,V);var Y=12*(q.year()-V.year())+(q.month()-V.month()),ne=V.clone().add(Y,p),ce=q-ne<0,P=V.clone().add(Y+(ce?-1:1),p);return+(-(Y+(q-ne)/(ce?ne-P:P-ne))||0)},a:function(G){return G<0?Math.ceil(G)||0:Math.floor(G)},p:function(G){return{M:p,y:h,w:d,d:c,D:y,h:l,m:s,s:a,ms:o,Q:m}[G]||String(G||"").toLowerCase().replace(/s$/,"")},u:function(G){return G===void 0}},E="en",T={};T[E]=b;var j="$isDayjsObject",L=function(G){return G instanceof re||!(!G||!G[j])},F=function G(V,q,Y){var ne;if(!V)return E;if(typeof V=="string"){var ce=V.toLowerCase();T[ce]&&(ne=ce),q&&(T[ce]=q,ne=ce);var P=V.split("-");if(!ne&&P.length>1)return G(P[0])}else{var ue=V.name;T[ue]=V,ne=ue}return!Y&&ne&&(E=ne),ne||!Y&&E},M=function(G,V){if(L(G))return G.clone();var q=typeof V=="object"?V:{};return q.date=G,q.args=arguments,new re(q)},H=A;H.l=F,H.i=L,H.w=function(G,V){return M(G,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var re=function(){function G(q){this.$L=F(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[j]=!0}var V=G.prototype;return V.parse=function(q){this.$d=function(Y){var ne=Y.date,ce=Y.utc;if(ne===null)return new Date(NaN);if(H.u(ne))return new Date;if(ne instanceof Date)return new Date(ne);if(typeof ne=="string"&&!/Z$/i.test(ne)){var P=ne.match(w);if(P){var ue=P[2]-1||0,Oe=(P[7]||"0").substring(0,3);return ce?new Date(Date.UTC(P[1],ue,P[3]||1,P[4]||0,P[5]||0,P[6]||0,Oe)):new Date(P[1],ue,P[3]||1,P[4]||0,P[5]||0,P[6]||0,Oe)}}return new Date(ne)}(q),this.init()},V.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},V.$utils=function(){return H},V.isValid=function(){return this.$d.toString()!==v},V.isSame=function(q,Y){var ne=M(q);return this.startOf(Y)<=ne&&ne<=this.endOf(Y)},V.isAfter=function(q,Y){return M(q)<this.startOf(Y)},V.isBefore=function(q,Y){return this.endOf(Y)<M(q)},V.$g=function(q,Y,ne){return H.u(q)?this[Y]:this.set(ne,q)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(q,Y){var ne=this,ce=!!H.u(Y)||Y,P=H.p(q),ue=function(Ke,Pe){var Ae=H.w(ne.$u?Date.UTC(ne.$y,Pe,Ke):new Date(ne.$y,Pe,Ke),ne);return ce?Ae:Ae.endOf(c)},Oe=function(Ke,Pe){return H.w(ne.toDate()[Ke].apply(ne.toDate("s"),(ce?[0,0,0,0]:[23,59,59,999]).slice(Pe)),ne)},N=this.$W,Ne=this.$M,qe=this.$D,Me="set"+(this.$u?"UTC":"");switch(P){case h:return ce?ue(1,0):ue(31,11);case p:return ce?ue(1,Ne):ue(0,Ne+1);case d:var Je=this.$locale().weekStart||0,rt=(N<Je?N+7:N)-Je;return ue(ce?qe-rt:qe+(6-rt),Ne);case c:case y:return Oe(Me+"Hours",0);case l:return Oe(Me+"Minutes",1);case s:return Oe(Me+"Seconds",2);case a:return Oe(Me+"Milliseconds",3);default:return this.clone()}},V.endOf=function(q){return this.startOf(q,!1)},V.$set=function(q,Y){var ne,ce=H.p(q),P="set"+(this.$u?"UTC":""),ue=(ne={},ne[c]=P+"Date",ne[y]=P+"Date",ne[p]=P+"Month",ne[h]=P+"FullYear",ne[l]=P+"Hours",ne[s]=P+"Minutes",ne[a]=P+"Seconds",ne[o]=P+"Milliseconds",ne)[ce],Oe=ce===c?this.$D+(Y-this.$W):Y;if(ce===p||ce===h){var N=this.clone().set(y,1);N.$d[ue](Oe),N.init(),this.$d=N.set(y,Math.min(this.$D,N.daysInMonth())).$d}else ue&&this.$d[ue](Oe);return this.init(),this},V.set=function(q,Y){return this.clone().$set(q,Y)},V.get=function(q){return this[H.p(q)]()},V.add=function(q,Y){var ne,ce=this;q=Number(q);var P=H.p(Y),ue=function(Ne){var qe=M(ce);return H.w(qe.date(qe.date()+Math.round(Ne*q)),ce)};if(P===p)return this.set(p,this.$M+q);if(P===h)return this.set(h,this.$y+q);if(P===c)return ue(1);if(P===d)return ue(7);var Oe=(ne={},ne[s]=r,ne[l]=i,ne[a]=n,ne)[P]||1,N=this.$d.getTime()+q*Oe;return H.w(N,this)},V.subtract=function(q,Y){return this.add(-1*q,Y)},V.format=function(q){var Y=this,ne=this.$locale();if(!this.isValid())return ne.invalidDate||v;var ce=q||"YYYY-MM-DDTHH:mm:ssZ",P=H.z(this),ue=this.$H,Oe=this.$m,N=this.$M,Ne=ne.weekdays,qe=ne.months,Me=ne.meridiem,Je=function(Pe,Ae,Fe,$e){return Pe&&(Pe[Ae]||Pe(Y,ce))||Fe[Ae].slice(0,$e)},rt=function(Pe){return H.s(ue%12||12,Pe,"0")},Ke=Me||function(Pe,Ae,Fe){var $e=Pe<12?"AM":"PM";return Fe?$e.toLowerCase():$e};return ce.replace(_,function(Pe,Ae){return Ae||function(Fe){switch(Fe){case"YY":return String(Y.$y).slice(-2);case"YYYY":return H.s(Y.$y,4,"0");case"M":return N+1;case"MM":return H.s(N+1,2,"0");case"MMM":return Je(ne.monthsShort,N,qe,3);case"MMMM":return Je(qe,N);case"D":return Y.$D;case"DD":return H.s(Y.$D,2,"0");case"d":return String(Y.$W);case"dd":return Je(ne.weekdaysMin,Y.$W,Ne,2);case"ddd":return Je(ne.weekdaysShort,Y.$W,Ne,3);case"dddd":return Ne[Y.$W];case"H":return String(ue);case"HH":return H.s(ue,2,"0");case"h":return rt(1);case"hh":return rt(2);case"a":return Ke(ue,Oe,!0);case"A":return Ke(ue,Oe,!1);case"m":return String(Oe);case"mm":return H.s(Oe,2,"0");case"s":return String(Y.$s);case"ss":return H.s(Y.$s,2,"0");case"SSS":return H.s(Y.$ms,3,"0");case"Z":return P}return null}(Pe)||P.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(q,Y,ne){var ce,P=this,ue=H.p(Y),Oe=M(q),N=(Oe.utcOffset()-this.utcOffset())*r,Ne=this-Oe,qe=function(){return H.m(P,Oe)};switch(ue){case h:ce=qe()/12;break;case p:ce=qe();break;case m:ce=qe()/3;break;case d:ce=(Ne-N)/6048e5;break;case c:ce=(Ne-N)/864e5;break;case l:ce=Ne/i;break;case s:ce=Ne/r;break;case a:ce=Ne/n;break;default:ce=Ne}return ne?ce:H.a(ce)},V.daysInMonth=function(){return this.endOf(p).$D},V.$locale=function(){return T[this.$L]},V.locale=function(q,Y){if(!q)return this.$L;var ne=this.clone(),ce=F(q,Y,!0);return ce&&(ne.$L=ce),ne},V.clone=function(){return H.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},G}(),Q=re.prototype;return M.prototype=Q,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",c],["$M",p],["$y",h],["$D",y]].forEach(function(G){Q[G[1]]=function(V){return this.$g(V,G[0],G[1])}}),M.extend=function(G,V){return G.$i||(G(V,re,M),G.$i=!0),M},M.locale=F,M.isDayjs=L,M.unix=function(G){return M(1e3*G)},M.en=T[E],M.Ls=T,M.p={},M})})(xN);var m1e=xN.exports;const Vm=Oo(m1e);var SN={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(se,function(){return function(n,r,i){r.prototype.isToday=function(){var o="YYYY-MM-DD",a=i();return this.format(o)===a.format(o)}}})})(SN);var y1e=SN.exports;const g1e=Oo(y1e);var EN={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(se,function(){return function(n,r,i){r.prototype.isYesterday=function(){var o="YYYY-MM-DD",a=i().subtract(1,"day");return this.format(o)===a.format(o)}}})})(EN);var v1e=EN.exports;const b1e=Oo(v1e);Vm.extend(g1e),Vm.extend(b1e);function _1e(e,t="day"){if(!e||e.length===0)return[];const n=[];n.push(AN(e[0].timestamp));for(let r=0;r<e.length;r++)if(n.push(e[r]),r+1<e.length){const i=e[r].timestamp,o=e[r+1].timestamp;Vm(i).isSame(o,t)||n.push(AN(o))}return n}function AN(e){return{direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:w1e(e)}}}function w1e(e,t=!1){const n=Vm(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}const CN=10*1e3,ON=C.memo(({scrollDownButton:e,...t})=>{var S,A,E,T,j,L,F,M,H,re,Q,G,V;const{messageList:n}=it(q=>q.theme),r=it(q=>q.messages),i=it(q=>q.setState),o=it(q=>q.on),a=it(q=>q.getClientId)(),s=it(q=>q.configuration),l=it(q=>q.messageContainerRef),c=it(q=>q.isTyping),d=it(q=>q.setIsTyping),p=C.useMemo(()=>_1e(r),[r]),[m,h]=C.useState(!0),{y}=Lve(l),[v,w]=qve(),_=()=>{if(!l.current)return;const{scrollHeight:q}=l.current;m&&l.current.scrollTo({top:q})};C.useEffect(()=>{const q=new Date(Date.now()-CN+2e3);r.length>0&&r[r.length-1].timestamp<q&&d(!1)},[v]),C.useEffect(()=>o("messageSent",()=>{d(!0),w(new Date(Date.now()+CN))}),[]),C.useEffect(()=>o("message",()=>{d(!1)}),[]),C.useEffect(()=>{const q=r[r.length-1];i({disableComposer:!!(q!=null&&q.disableInput)})},[r.length]),C.useEffect(()=>{if(!l.current)return;const{offsetHeight:q,scrollHeight:Y,scrollTop:ne}=l.current;h(Y<=ne+q+100)},[y]);const b=e!=null&&e.icon?e==null?void 0:e.icon:cbe;return X.jsxs(c1e,{...(S=n==null?void 0:n.scrollbar)==null?void 0:S.container,scrollHideDelay:300,type:"hover",children:[X.jsx(f1e,{...(A=n==null?void 0:n.scrollbar)==null?void 0:A.viewport,ref:l,children:X.jsxs("ul",{...t,...n==null?void 0:n.container,children:[X.jsxs("li",{...(E=n==null?void 0:n.marquee)==null?void 0:E.container,children:[X.jsx(rb,{userId:a,src:s.botAvatar,...(T=n==null?void 0:n.marquee)==null?void 0:T.avatar,children:(s.botName||"Bot").slice(0,1)}),X.jsxs("div",{...(j=n==null?void 0:n.marquee)==null?void 0:j.content,children:[X.jsx("h1",{...(L=n==null?void 0:n.marquee)==null?void 0:L.title,children:s.botName||"Bot"}),X.jsx("p",{...(F=n==null?void 0:n.marquee)==null?void 0:F.description,children:s.botDescription})]})]}),p.map((q,Y)=>X.jsx(K_,{scroll:_,...q},Y)),c&&X.jsx(K_,{scroll:_,direction:"incoming",children:X.jsx(fN,{})}),X.jsx("li",{"data-is-at-bottom":m,...(M=n==null?void 0:n.scrollDownButton)==null?void 0:M.container,children:!!r.length&&X.jsxs("button",{type:"button","data-is-at-bottom":m,...(H=n==null?void 0:n.scrollDownButton)==null?void 0:H.button,onClick:()=>{var q,Y;return(Y=l.current)==null?void 0:Y.scrollBy({top:(q=l.current)==null?void 0:q.scrollHeight})},children:[(e==null?void 0:e.text)??"Back"," ",X.jsx(b,{...(re=n==null?void 0:n.scrollDownButton)==null?void 0:re.icon})]})})]})}),X.jsx(d1e,{orientation:"vertical",...(Q=n==null?void 0:n.scrollbar)==null?void 0:Q.background,children:X.jsx(p1e,{...(G=n==null?void 0:n.scrollbar)==null?void 0:G.thumb})}),X.jsx(h1e,{...(V=n==null?void 0:n.scrollbar)==null?void 0:V.corner})]})}),x1e=()=>X.jsxs(aN,{children:[X.jsx(cN,{}),X.jsx(ON,{}),X.jsxs(CD,{children:[X.jsx(TD,{}),X.jsx(OD,{}),X.jsx($D,{})]})]}),yl=oe.object({title:oe.string(),link:oe.string().optional()}),TN=oe.object({composerPlaceholder:oe.string().optional(),botName:oe.string().optional(),botAvatar:oe.string().optional(),botDescription:oe.string().optional(),website:yl.optional(),email:yl.optional(),phone:yl.optional(),privacyPolicy:yl.optional(),termsOfService:yl.optional()}),$N=oe.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),kN=oe.object({}).passthrough().transform(e=>e),Le=oe.object({className:oe.string().optional(),style:kN.optional()}),Km=oe.object({container:Le.optional(),image:Le.optional(),fallback:Le.optional()}),IN=oe.object({button:Le.optional(),text:oe.record($N,Le.optional()),image:oe.object({image:Le.optional(),placeholder:Le.optional()}).optional(),audio:Le.optional(),video:Le.optional(),file:oe.object({container:Le.optional(),title:Le.optional(),icon:Le.optional()}).optional(),location:oe.object({container:Le.optional(),title:Le.optional(),icon:Le.optional()}).optional(),column:Le.optional(),row:Le.optional(),bubble:Le.optional(),carousel:oe.object({container:Le.optional(),slidesContainer:Le.optional(),backButton:Le.optional(),nextButton:Le.optional()}).optional(),dropdown:oe.object({button:oe.object({container:Le.optional(),icon:Le.optional(),text:Le.optional()}).optional(),content:oe.object({container:Le.optional(),item:Le.optional()}).optional()}).optional()}),PN=oe.object({container:Le.optional(),modal:oe.object({overlay:Le.optional(),container:Le.optional(),dialog:oe.object({container:Le.optional(),title:oe.object({container:Le.optional(),text:Le.optional(),closeIcon:Le.optional()}).optional(),content:Le.optional(),newConversation:oe.object({text:Le.optional(),button:Le.optional()}).optional()}).optional()}).optional(),notification:oe.object({container:Le.optional(),title:Le.optional(),description:Le.optional(),icon:Le.optional(),closeIcon:Le.optional()}).optional(),header:oe.object({container:Le.optional(),content:oe.object({container:Le.optional(),title:Le.optional(),description:Le.optional(),avatar:Km.optional(),actions:oe.object({container:Le.optional(),icons:Le.optional()}).optional()}),expandedContent:oe.object({container:Le.optional(),group:Le.optional(),descriptionItems:oe.object({container:Le.optional(),icon:Le.optional(),text:Le.optional(),link:Le.optional(),poweredBy:Le.optional()}).optional()}).optional(),description:oe.object({container:Le.optional(),title:Le.optional(),subtitle:Le.optional()}).optional(),newConversationIcon:Le.optional()}).optional(),composer:oe.object({container:Le.optional(),input:Le.optional(),uploadButton:oe.object({container:Le.optional(),icon:Le.optional()}).optional(),button:oe.object({container:Le.optional(),icon:Le.optional()}).optional()}).optional(),fab:oe.object({icon:Le.optional(),container:Le.optional()}).optional(),messageList:oe.object({scrollbar:oe.object({container:Le.optional(),viewport:Le.optional(),thumb:Le.optional(),corner:Le.optional(),background:Le.optional()}).optional(),container:Le.optional(),marquee:oe.object({content:Le.optional(),title:Le.optional(),description:Le.optional(),avatar:Km.optional(),container:Le.optional()}).optional(),scrollDownButton:oe.object({container:Le.optional(),button:Le.optional(),icon:Le.optional()}).optional()}).optional(),message:oe.object({container:Le.optional(),avatar:Km.optional(),blocks:IN.optional()}).optional(),loadingIndicator:oe.object({container:Le.optional(),loader:Le.optional()}).optional()}),RN=oe.enum(["opened","closed","initial"]),DN=oe.object({data:oe.record(oe.unknown()).optional()}),NN=oe.enum(["messaging","pushpin"]),MN=oe.object({configuration:TN.optional().catch(void 0),theme:PN.optional().catch(void 0),style:oe.string().optional().catch(void 0),user:DN.optional().catch(void 0)}),S1e=MN.extend({clientId:oe.string(),botId:oe.string(),selector:oe.string().optional().catch(void 0),webchatScriptUrl:oe.string().optional().catch(void 0),fabScriptUrl:oe.string().optional().catch(void 0),messagingUrl:oe.string().optional().catch(void 0),pushpinUrl:oe.string().optional().catch(void 0),clientMode:NN.optional().catch(void 0),defaultState:RN.optional().catch(void 0)});var J_={},X_={};const E1e=!1,A1e=/\r?\n/,C1e=/\bono[ @]/;function O1e(e){return!!(e&&e.configurable&&typeof e.get=="function")}function T1e(e){return!!(!e||e.writable||typeof e.set=="function")}function jN(e,t){let n=LN(e.stack),r=t?t.stack:void 0;return n&&r?n+`
|
|
463
463
|
|
|
464
464
|
`+r:n||r}function $1e(e,t,n){n?Object.defineProperty(t,"stack",{get:()=>{let r=e.get.apply(t);return jN({stack:r},n)},enumerable:!1,configurable:!0}):k1e(t,e)}function LN(e){if(e){let t=e.split(A1e),n;for(let r=0;r<t.length;r++){let i=t[r];if(C1e.test(i))n===void 0&&(n=r);else if(n!==void 0){t.splice(n,r-n);break}}if(t.length>0)return t.join(`
|
|
465
465
|
`)}return e}function k1e(e,t){Object.defineProperty(e,"stack",{get:()=>LN(t.get.apply(e)),enumerable:!1,configurable:!0})}const I1e=["function","symbol","undefined"],P1e=["constructor","prototype","__proto__"],R1e=Object.getPrototypeOf({});function FN(){let e={},t=this;for(let n of qN(t))if(typeof n=="string"){let r=t[n],i=typeof r;I1e.includes(i)||(e[n]=r)}return e}function qN(e,t=[]){let n=[];for(;e&&e!==R1e;)n=n.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let r=new Set(n);for(let i of t.concat(P1e))r.delete(i);return r}const D1e=["name","message","stack"];function Gm(e,t,n){let r=e;return N1e(r,t),t&&typeof t=="object"&&M1e(r,t),r.toJSON=FN,n&&typeof n=="object"&&Object.assign(r,n),r}function N1e(e,t){let n=Object.getOwnPropertyDescriptor(e,"stack");O1e(n)?$1e(n,e,t):T1e(n)&&(e.stack=jN(e,t))}function M1e(e,t){let n=qN(t,D1e),r=e,i=t;for(let o of n)if(r[o]===void 0)try{r[o]=i[o]}catch{}}function j1e(e){return e=e||{},{concatMessages:e.concatMessages===void 0?!0:!!e.concatMessages,format:e.format===void 0?E1e:typeof e.format=="function"?e.format:!1}}function L1e(e,t){let n,r,i,o="";return typeof e[0]=="string"?i=e:typeof e[1]=="string"?(e[0]instanceof Error?n=e[0]:r=e[0],i=e.slice(1)):(n=e[0],r=e[1],i=e.slice(2)),i.length>0&&(t.format?o=t.format.apply(void 0,i):o=i.join(" ")),t.concatMessages&&n&&n.message&&(o+=(o?`
|
|
466
|
-
`:"")+n.message),{originalError:n,props:r,message:o}}const qa=Q_;function Q_(e,t){t=j1e(t);function n(...r){let{originalError:i,props:o,message:a}=L1e(r,t),s=new e(a);return Gm(s,i,o)}return n[Symbol.species]=e,n}Q_.toJSON=function(t){return FN.call(t)},Q_.extend=function(t,n,r){return r||n instanceof Error?Gm(t,n,r):n?Gm(t,void 0,n):Gm(t)};const UN=wo;wo.error=new qa(Error),wo.eval=new qa(EvalError),wo.range=new qa(RangeError),wo.reference=new qa(ReferenceError),wo.syntax=new qa(SyntaxError),wo.type=new qa(TypeError),wo.uri=new qa(URIError);const F1e=wo;function wo(...e){let t=e[0];if(typeof t=="object"&&typeof t.name=="string"){for(let n of Object.values(F1e))if(typeof n=="function"&&n.name==="ono"){let r=n[Symbol.species];if(r&&r!==Error&&(t instanceof r||t.name===r.name))return n.apply(void 0,e)}}return wo.error.apply(void 0,e)}typeof module=="object"&&typeof module.exports=="object"&&(module.exports=Object.assign(module.exports.default,module.exports));const qs=Jf(Object.freeze(Object.defineProperty({__proto__:null,Ono:qa,default:UN,ono:UN},Symbol.toStringTag,{value:"Module"})));var Ym={},Jm={},Ft={},Xm={},q1e=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xm,"__esModule",{value:!0});const BN=q1e(hs);function U1e(e){var n,r,i,o;return e.startsWith("\\\\?\\")?e:e.split((r=(n=BN.default)==null?void 0:n.win32)==null?void 0:r.sep).join(((o=(i=BN.default)==null?void 0:i.posix)==null?void 0:o.sep)??"/")}Xm.default=U1e;var Qm={};Object.defineProperty(Qm,"__esModule",{value:!0}),Qm.isWindows=void 0;const B1e=/^win/.test(globalThis.process?globalThis.process.platform:""),z1e=()=>B1e;Qm.isWindows=z1e;var Z1e=se&&se.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),H1e=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),W1e=se&&se.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Z1e(t,e,n);return H1e(t,e),t},V1e=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.relative=Ft.safePointerToPath=Ft.toFileSystemPath=Ft.fromFileSystemPath=Ft.isFileSystemPath=Ft.isHttp=Ft.stripHash=Ft.getHash=Ft.stripQuery=Ft.getExtension=Ft.getProtocol=Ft.cwd=Ft.resolve=Ft.parse=void 0;const ey=V1e(Xm),ew=W1e(hs),K1e=/\//g,G1e=/^(\w{2,}):\/\//i,Y1e=/~1/g,J1e=/~0/g,X1e=hs,ty=Qm,Q1e=[[/\?/g,"%3F"],[/#/g,"%23"]],tw=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],eSe=e=>new URL(e);Ft.parse=eSe;function zN(e,t){var o;const n=new URL((0,ey.default)(e),"resolve://"),r=new URL((0,ey.default)(t),n),i=((o=t.match(/(\s*)$/))==null?void 0:o[1])||"";if(r.protocol==="resolve:"){const{pathname:a,search:s,hash:l}=r;return a+s+l+i}return r.toString()+i}Ft.resolve=zN;function ZN(){if(typeof window<"u")return location.href;const e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}Ft.cwd=ZN;function nw(e){const t=G1e.exec(e||"");if(t)return t[1].toLowerCase()}Ft.getProtocol=nw;function tSe(e){const t=e.lastIndexOf(".");return t>=0?HN(e.substr(t).toLowerCase()):""}Ft.getExtension=tSe;function HN(e){const t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}Ft.stripQuery=HN;function WN(e){if(!e)return"#";const t=e.indexOf("#");return t>=0?e.substring(t):"#"}Ft.getHash=WN;function rw(e){if(!e)return"";const t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}Ft.stripHash=rw;function nSe(e){const t=nw(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}Ft.isHttp=nSe;function iw(e){if(typeof window<"u"||process.browser)return!1;const t=nw(e);return t===void 0||t==="file"}Ft.isFileSystemPath=iw;function rSe(e){var t;if((0,ty.isWindows)()){const n=ZN(),r=e.toUpperCase(),o=(0,ey.default)(n).toUpperCase(),a=r.includes(o),s=r.includes(o),l=((t=ew.win32)==null?void 0:t.isAbsolute(e))||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(a||s||l)&&!n.startsWith("http")&&(e=(0,X1e.join)(n,e)),e=(0,ey.default)(e)}e=encodeURI(e);for(const n of Q1e)e=e.replace(n[0],n[1]);return e}Ft.fromFileSystemPath=rSe;function iSe(e,t){e=decodeURI(e);for(let r=0;r<tw.length;r+=2)e=e.replace(tw[r],tw[r+1]);let n=e.substr(0,7).toLowerCase()==="file://";return n&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,ty.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(n=!1,e=(0,ty.isWindows)()?e:"/"+e)),(0,ty.isWindows)()&&!n&&(e=e.replace(K1e,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}Ft.toFileSystemPath=iSe;function oSe(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(Y1e,"/").replace(J1e,"~"))}Ft.safePointerToPath=oSe;function aSe(e,t){if(!iw(e)||!iw(t))return zN(e,t);const n=ew.default.dirname(rw(e)),r=rw(t);return ew.default.relative(n,r)+WN(t)}Ft.relative=aSe;var tn={};Object.defineProperty(tn,"__esModule",{value:!0}),tn.normalizeError=tn.isHandledError=tn.InvalidPointerError=tn.TimeoutError=tn.MissingPointerError=tn.UnmatchedResolverError=tn.ResolverError=tn.UnmatchedParserError=tn.ParserError=tn.JSONParserErrorGroup=tn.JSONParserError=void 0;const VN=qs,ow=Ft;class Qo extends Error{constructor(t,n){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=n,this.path=null,VN.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}}tn.JSONParserError=Qo;class ny extends Error{constructor(t){super(),this.files=t,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${(0,ow.toFileSystemPath)(t.$refs._root$Ref.path)}'`,VN.Ono.extend(this)}static getParserErrors(t){const n=[];for(const r of Object.values(t.$refs._$refs))r.errors&&n.push(...r.errors);return n}get errors(){return ny.getParserErrors(this.files)}}tn.JSONParserErrorGroup=ny;class sSe extends Qo{constructor(t,n){super(`Error parsing ${n}: ${t}`,n),this.code="EPARSER",this.name="ParserError"}}tn.ParserError=sSe;class uSe extends Qo{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}}tn.UnmatchedParserError=uSe;class lSe extends Qo{constructor(t,n){super(t.message||`Error reading file "${n}"`,n),this.code="ERESOLVER",this.name="ResolverError","code"in t&&(this.ioErrorCode=String(t.code))}}tn.ResolverError=lSe;class cSe extends Qo{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}}tn.UnmatchedResolverError=cSe;class fSe extends Qo{constructor(t,n){super(`Token "${t}" does not exist.`,(0,ow.stripHash)(n)),this.code="EUNMATCHEDRESOLVER",this.name="MissingPointerError"}}tn.MissingPointerError=fSe;class dSe extends Qo{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}}tn.TimeoutError=dSe;class pSe extends Qo{constructor(t,n){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,ow.stripHash)(n)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}}tn.InvalidPointerError=pSe;function hSe(e){return e instanceof Qo||e instanceof ny}tn.isHandledError=hSe;function mSe(e){return e.path===null&&(e.path=[]),e}tn.normalizeError=mSe;var KN;function ry(){if(KN)return Jm;KN=1;var e=se&&se.__createBinding||(Object.create?function(_,b,S,A){A===void 0&&(A=S);var E=Object.getOwnPropertyDescriptor(b,S);(!E||("get"in E?!b.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return b[S]}}),Object.defineProperty(_,A,E)}:function(_,b,S,A){A===void 0&&(A=S),_[A]=b[S]}),t=se&&se.__setModuleDefault||(Object.create?function(_,b){Object.defineProperty(_,"default",{enumerable:!0,value:b})}:function(_,b){_.default=b}),n=se&&se.__importStar||function(_){if(_&&_.__esModule)return _;var b={};if(_!=null)for(var S in _)S!=="default"&&Object.prototype.hasOwnProperty.call(_,S)&&e(b,_,S);return t(b,_),b},r=se&&se.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(Jm,"__esModule",{value:!0});const i=r(xf()),o=n(Ft),a=tn,s=/\//g,l=/~/g,c=/~1/g,d=/~0/g,p=_=>{try{return decodeURIComponent(_)}catch{return _}};class m{constructor(b,S,A){this.$ref=b,this.path=S,this.originalPath=A||S,this.value=void 0,this.circular=!1,this.indirections=0}resolve(b,S,A){const E=m.parse(this.path,this.originalPath);this.value=v(b);for(let T=0;T<E.length;T++){if(h(this,S,A)&&(this.path=m.join(this.path,E.slice(T))),typeof this.value=="object"&&this.value!==null&&!w(A)&&"$ref"in this.value)return this;const N=E[T];if(this.value[N]===void 0||this.value[N]===null&&T===E.length-1){let L=!1;for(let F=E.length-1;F>T;F--){const j=E.slice(T,F+1).join("/");if(this.value[j]!==void 0){this.value=this.value[j],T=F,L=!0;break}}if(L)continue;throw this.value=null,new a.MissingPointerError(N,decodeURI(this.originalPath))}else this.value=this.value[N]}return(!this.value||this.value.$ref&&o.resolve(this.path,this.value.$ref)!==A)&&h(this,S,A),this}set(b,S,A){const E=m.parse(this.path);let T;if(E.length===0)return this.value=S,S;this.value=v(b);for(let N=0;N<E.length-1;N++)h(this,A),T=E[N],this.value&&this.value[T]!==void 0?this.value=this.value[T]:this.value=y(this,T,{});return h(this,A),T=E[E.length-1],y(this,T,S),b}static parse(b,S){const A=o.getHash(b).substring(1);if(!A)return[];const E=A.split("/");for(let T=0;T<E.length;T++)E[T]=p(E[T].replace(c,"/").replace(d,"~"));if(E[0]!=="")throw new a.InvalidPointerError(E,S===void 0?b:S);return E.slice(1)}static join(b,S){b.indexOf("#")===-1&&(b+="#"),S=Array.isArray(S)?S:[S];for(let A=0;A<S.length;A++){const E=S[A];b+="/"+encodeURIComponent(E.replace(l,"~0").replace(s,"~1"))}return b}}function h(_,b,S){if(i.default.isAllowed$Ref(_.value,b)){const A=o.resolve(_.path,_.value.$ref);if(A===_.path&&!w(S))_.circular=!0;else{const E=_.$ref.$refs._resolve(A,_.path,b);return E===null?!1:(_.indirections+=E.indirections+1,i.default.isExtended$Ref(_.value)?(_.value=i.default.dereference(_.value,E.value),!1):(_.$ref=E.$ref,_.path=E.path,_.value=E.value,!0))}}}Jm.default=m;function y(_,b,S){if(_.value&&typeof _.value=="object")b==="-"&&Array.isArray(_.value)?_.value.push(S):_.value[b]=S;else throw new a.JSONParserError(`Error assigning $ref pointer "${_.path}".
|
|
466
|
+
`:"")+n.message),{originalError:n,props:r,message:o}}const qa=Q_;function Q_(e,t){t=j1e(t);function n(...r){let{originalError:i,props:o,message:a}=L1e(r,t),s=new e(a);return Gm(s,i,o)}return n[Symbol.species]=e,n}Q_.toJSON=function(t){return FN.call(t)},Q_.extend=function(t,n,r){return r||n instanceof Error?Gm(t,n,r):n?Gm(t,void 0,n):Gm(t)};const UN=wo;wo.error=new qa(Error),wo.eval=new qa(EvalError),wo.range=new qa(RangeError),wo.reference=new qa(ReferenceError),wo.syntax=new qa(SyntaxError),wo.type=new qa(TypeError),wo.uri=new qa(URIError);const F1e=wo;function wo(...e){let t=e[0];if(typeof t=="object"&&typeof t.name=="string"){for(let n of Object.values(F1e))if(typeof n=="function"&&n.name==="ono"){let r=n[Symbol.species];if(r&&r!==Error&&(t instanceof r||t.name===r.name))return n.apply(void 0,e)}}return wo.error.apply(void 0,e)}typeof module=="object"&&typeof module.exports=="object"&&(module.exports=Object.assign(module.exports.default,module.exports));const qs=Jf(Object.freeze(Object.defineProperty({__proto__:null,Ono:qa,default:UN,ono:UN},Symbol.toStringTag,{value:"Module"})));var Ym={},Jm={},Ft={},Xm={},q1e=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xm,"__esModule",{value:!0});const BN=q1e(hs);function U1e(e){var n,r,i,o;return e.startsWith("\\\\?\\")?e:e.split((r=(n=BN.default)==null?void 0:n.win32)==null?void 0:r.sep).join(((o=(i=BN.default)==null?void 0:i.posix)==null?void 0:o.sep)??"/")}Xm.default=U1e;var Qm={};Object.defineProperty(Qm,"__esModule",{value:!0}),Qm.isWindows=void 0;const B1e=/^win/.test(globalThis.process?globalThis.process.platform:""),z1e=()=>B1e;Qm.isWindows=z1e;var Z1e=se&&se.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),H1e=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),W1e=se&&se.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Z1e(t,e,n);return H1e(t,e),t},V1e=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.relative=Ft.safePointerToPath=Ft.toFileSystemPath=Ft.fromFileSystemPath=Ft.isFileSystemPath=Ft.isHttp=Ft.stripHash=Ft.getHash=Ft.stripQuery=Ft.getExtension=Ft.getProtocol=Ft.cwd=Ft.resolve=Ft.parse=void 0;const ey=V1e(Xm),ew=W1e(hs),K1e=/\//g,G1e=/^(\w{2,}):\/\//i,Y1e=/~1/g,J1e=/~0/g,X1e=hs,ty=Qm,Q1e=[[/\?/g,"%3F"],[/#/g,"%23"]],tw=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],eSe=e=>new URL(e);Ft.parse=eSe;function zN(e,t){var o;const n=new URL((0,ey.default)(e),"resolve://"),r=new URL((0,ey.default)(t),n),i=((o=t.match(/(\s*)$/))==null?void 0:o[1])||"";if(r.protocol==="resolve:"){const{pathname:a,search:s,hash:l}=r;return a+s+l+i}return r.toString()+i}Ft.resolve=zN;function ZN(){if(typeof window<"u")return location.href;const e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}Ft.cwd=ZN;function nw(e){const t=G1e.exec(e||"");if(t)return t[1].toLowerCase()}Ft.getProtocol=nw;function tSe(e){const t=e.lastIndexOf(".");return t>=0?HN(e.substr(t).toLowerCase()):""}Ft.getExtension=tSe;function HN(e){const t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}Ft.stripQuery=HN;function WN(e){if(!e)return"#";const t=e.indexOf("#");return t>=0?e.substring(t):"#"}Ft.getHash=WN;function rw(e){if(!e)return"";const t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}Ft.stripHash=rw;function nSe(e){const t=nw(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}Ft.isHttp=nSe;function iw(e){if(typeof window<"u"||process.browser)return!1;const t=nw(e);return t===void 0||t==="file"}Ft.isFileSystemPath=iw;function rSe(e){var t;if((0,ty.isWindows)()){const n=ZN(),r=e.toUpperCase(),o=(0,ey.default)(n).toUpperCase(),a=r.includes(o),s=r.includes(o),l=((t=ew.win32)==null?void 0:t.isAbsolute(e))||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(a||s||l)&&!n.startsWith("http")&&(e=(0,X1e.join)(n,e)),e=(0,ey.default)(e)}e=encodeURI(e);for(const n of Q1e)e=e.replace(n[0],n[1]);return e}Ft.fromFileSystemPath=rSe;function iSe(e,t){e=decodeURI(e);for(let r=0;r<tw.length;r+=2)e=e.replace(tw[r],tw[r+1]);let n=e.substr(0,7).toLowerCase()==="file://";return n&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,ty.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(n=!1,e=(0,ty.isWindows)()?e:"/"+e)),(0,ty.isWindows)()&&!n&&(e=e.replace(K1e,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}Ft.toFileSystemPath=iSe;function oSe(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(Y1e,"/").replace(J1e,"~"))}Ft.safePointerToPath=oSe;function aSe(e,t){if(!iw(e)||!iw(t))return zN(e,t);const n=ew.default.dirname(rw(e)),r=rw(t);return ew.default.relative(n,r)+WN(t)}Ft.relative=aSe;var tn={};Object.defineProperty(tn,"__esModule",{value:!0}),tn.normalizeError=tn.isHandledError=tn.InvalidPointerError=tn.TimeoutError=tn.MissingPointerError=tn.UnmatchedResolverError=tn.ResolverError=tn.UnmatchedParserError=tn.ParserError=tn.JSONParserErrorGroup=tn.JSONParserError=void 0;const VN=qs,ow=Ft;class Qo extends Error{constructor(t,n){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=n,this.path=null,VN.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}}tn.JSONParserError=Qo;class ny extends Error{constructor(t){super(),this.files=t,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${(0,ow.toFileSystemPath)(t.$refs._root$Ref.path)}'`,VN.Ono.extend(this)}static getParserErrors(t){const n=[];for(const r of Object.values(t.$refs._$refs))r.errors&&n.push(...r.errors);return n}get errors(){return ny.getParserErrors(this.files)}}tn.JSONParserErrorGroup=ny;class sSe extends Qo{constructor(t,n){super(`Error parsing ${n}: ${t}`,n),this.code="EPARSER",this.name="ParserError"}}tn.ParserError=sSe;class uSe extends Qo{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}}tn.UnmatchedParserError=uSe;class lSe extends Qo{constructor(t,n){super(t.message||`Error reading file "${n}"`,n),this.code="ERESOLVER",this.name="ResolverError","code"in t&&(this.ioErrorCode=String(t.code))}}tn.ResolverError=lSe;class cSe extends Qo{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}}tn.UnmatchedResolverError=cSe;class fSe extends Qo{constructor(t,n){super(`Token "${t}" does not exist.`,(0,ow.stripHash)(n)),this.code="EUNMATCHEDRESOLVER",this.name="MissingPointerError"}}tn.MissingPointerError=fSe;class dSe extends Qo{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}}tn.TimeoutError=dSe;class pSe extends Qo{constructor(t,n){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,ow.stripHash)(n)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}}tn.InvalidPointerError=pSe;function hSe(e){return e instanceof Qo||e instanceof ny}tn.isHandledError=hSe;function mSe(e){return e.path===null&&(e.path=[]),e}tn.normalizeError=mSe;var KN;function ry(){if(KN)return Jm;KN=1;var e=se&&se.__createBinding||(Object.create?function(_,b,S,A){A===void 0&&(A=S);var E=Object.getOwnPropertyDescriptor(b,S);(!E||("get"in E?!b.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return b[S]}}),Object.defineProperty(_,A,E)}:function(_,b,S,A){A===void 0&&(A=S),_[A]=b[S]}),t=se&&se.__setModuleDefault||(Object.create?function(_,b){Object.defineProperty(_,"default",{enumerable:!0,value:b})}:function(_,b){_.default=b}),n=se&&se.__importStar||function(_){if(_&&_.__esModule)return _;var b={};if(_!=null)for(var S in _)S!=="default"&&Object.prototype.hasOwnProperty.call(_,S)&&e(b,_,S);return t(b,_),b},r=se&&se.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(Jm,"__esModule",{value:!0});const i=r(xf()),o=n(Ft),a=tn,s=/\//g,l=/~/g,c=/~1/g,d=/~0/g,p=_=>{try{return decodeURIComponent(_)}catch{return _}};class m{constructor(b,S,A){this.$ref=b,this.path=S,this.originalPath=A||S,this.value=void 0,this.circular=!1,this.indirections=0}resolve(b,S,A){const E=m.parse(this.path,this.originalPath);this.value=v(b);for(let T=0;T<E.length;T++){if(h(this,S,A)&&(this.path=m.join(this.path,E.slice(T))),typeof this.value=="object"&&this.value!==null&&!w(A)&&"$ref"in this.value)return this;const j=E[T];if(this.value[j]===void 0||this.value[j]===null&&T===E.length-1){let L=!1;for(let F=E.length-1;F>T;F--){const M=E.slice(T,F+1).join("/");if(this.value[M]!==void 0){this.value=this.value[M],T=F,L=!0;break}}if(L)continue;throw this.value=null,new a.MissingPointerError(j,decodeURI(this.originalPath))}else this.value=this.value[j]}return(!this.value||this.value.$ref&&o.resolve(this.path,this.value.$ref)!==A)&&h(this,S,A),this}set(b,S,A){const E=m.parse(this.path);let T;if(E.length===0)return this.value=S,S;this.value=v(b);for(let j=0;j<E.length-1;j++)h(this,A),T=E[j],this.value&&this.value[T]!==void 0?this.value=this.value[T]:this.value=y(this,T,{});return h(this,A),T=E[E.length-1],y(this,T,S),b}static parse(b,S){const A=o.getHash(b).substring(1);if(!A)return[];const E=A.split("/");for(let T=0;T<E.length;T++)E[T]=p(E[T].replace(c,"/").replace(d,"~"));if(E[0]!=="")throw new a.InvalidPointerError(E,S===void 0?b:S);return E.slice(1)}static join(b,S){b.indexOf("#")===-1&&(b+="#"),S=Array.isArray(S)?S:[S];for(let A=0;A<S.length;A++){const E=S[A];b+="/"+encodeURIComponent(E.replace(l,"~0").replace(s,"~1"))}return b}}function h(_,b,S){if(i.default.isAllowed$Ref(_.value,b)){const A=o.resolve(_.path,_.value.$ref);if(A===_.path&&!w(S))_.circular=!0;else{const E=_.$ref.$refs._resolve(A,_.path,b);return E===null?!1:(_.indirections+=E.indirections+1,i.default.isExtended$Ref(_.value)?(_.value=i.default.dereference(_.value,E.value),!1):(_.$ref=E.$ref,_.path=E.path,_.value=E.value,!0))}}}Jm.default=m;function y(_,b,S){if(_.value&&typeof _.value=="object")b==="-"&&Array.isArray(_.value)?_.value.push(S):_.value[b]=S;else throw new a.JSONParserError(`Error assigning $ref pointer "${_.path}".
|
|
467
467
|
Cannot set "${b}" of a non-object.`);return S}function v(_){if((0,a.isHandledError)(_))throw _;return _}function w(_){return typeof _=="string"&&m.parse(_).length==0}return Jm}var GN;function xf(){if(GN)return Ym;GN=1;var e=se&&se.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Ym,"__esModule",{value:!0});const t=e(ry()),n=tn,r=Ft;class i{constructor(a){this.errors=[],this.$refs=a}addError(a){this.errors===void 0&&(this.errors=[]);const s=this.errors.map(({footprint:l})=>l);"errors"in a&&Array.isArray(a.errors)?this.errors.push(...a.errors.map(n.normalizeError).filter(({footprint:l})=>!s.includes(l))):(!("footprint"in a)||!s.includes(a.footprint))&&this.errors.push((0,n.normalizeError)(a))}exists(a,s){try{return this.resolve(a,s),!0}catch{return!1}}get(a,s){var l;return(l=this.resolve(a,s))==null?void 0:l.value}resolve(a,s,l,c){const d=new t.default(this,a,l);try{return d.resolve(this.value,s,c)}catch(p){if(!s||!s.continueOnError||!(0,n.isHandledError)(p))throw p;return p.path===null&&(p.path=(0,r.safePointerToPath)((0,r.getHash)(c))),p instanceof n.InvalidPointerError&&(p.source=decodeURI((0,r.stripHash)(c))),this.addError(p),null}}set(a,s){const l=new t.default(this,a);this.value=l.set(this.value,s)}static is$Ref(a){return!!a&&typeof a=="object"&&a!==null&&"$ref"in a&&typeof a.$ref=="string"&&a.$ref.length>0}static isExternal$Ref(a){return i.is$Ref(a)&&a.$ref[0]!=="#"}static isAllowed$Ref(a,s){var l;if(this.is$Ref(a)){if(a.$ref.substring(0,2)==="#/"||a.$ref==="#")return!0;if(a.$ref[0]!=="#"&&(!s||(l=s.resolve)!=null&&l.external))return!0}}static isExtended$Ref(a){return i.is$Ref(a)&&Object.keys(a).length>1}static dereference(a,s){if(s&&typeof s=="object"&&i.isExtended$Ref(a)){const l={};for(const c of Object.keys(a))c!=="$ref"&&(l[c]=a[c]);for(const c of Object.keys(s))c in l||(l[c]=s[c]);return l}else return s}}return Ym.default=i,Ym}var ySe=se&&se.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),gSe=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),vSe=se&&se.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&ySe(t,e,n);return gSe(t,e),t},YN=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X_,"__esModule",{value:!0});const JN=qs,bSe=YN(xf()),Ua=vSe(Ft),XN=YN(Xm);class _Se{paths(...t){return QN(this._$refs,t.flat()).map(r=>(0,XN.default)(r.decoded))}values(...t){const n=this._$refs;return QN(n,t.flat()).reduce((i,o)=>(i[(0,XN.default)(o.decoded)]=n[o.encoded].value,i),{})}exists(t,n){try{return this._resolve(t,"",n),!0}catch{return!1}}get(t,n){return this._resolve(t,"",n).value}set(t,n){const r=Ua.resolve(this._root$Ref.path,t),i=Ua.stripHash(r),o=this._$refs[i];if(!o)throw(0,JN.ono)(`Error resolving $ref pointer "${t}".
|
|
468
468
|
"${i}" not found.`);o.set(r,n)}_get$Ref(t){t=Ua.resolve(this._root$Ref.path,t);const n=Ua.stripHash(t);return this._$refs[n]}_add(t){const n=Ua.stripHash(t),r=new bSe.default(this);return r.path=n,this._$refs[n]=r,this._root$Ref=this._root$Ref||r,r}_resolve(t,n,r){const i=Ua.resolve(this._root$Ref.path,t),o=Ua.stripHash(i),a=this._$refs[o];if(!a)throw(0,JN.ono)(`Error resolving $ref pointer "${t}".
|
|
469
469
|
"${o}" not found.`);return a.resolve(i,r,t,n)}constructor(){this._$refs={},this.toJSON=this.values,this.circular=!1,this._$refs={},this._root$Ref=null}}X_.default=_Se;function QN(e,t){let n=Object.keys(e);return t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t),t.length>0&&t[0]&&(n=n.filter(r=>t.includes(e[r].pathType))),n.map(r=>({encoded:r,decoded:e[r].pathType==="file"?Ua.toFileSystemPath(r,!0):r}))}var iy={},xo={};Object.defineProperty(xo,"__esModule",{value:!0}),xo.run=xo.sort=xo.filter=xo.all=void 0;function wSe(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}xo.all=wSe;function xSe(e,t,n){return e.filter(r=>!!eM(r,t,n))}xo.filter=xSe;function SSe(e){for(const t of e)t.order=t.order||Number.MAX_SAFE_INTEGER;return e.sort((t,n)=>t.order-n.order)}xo.sort=SSe;async function ESe(e,t,n,r){let i,o,a=0;return new Promise((s,l)=>{c();function c(){if(i=e[a++],!i)return l(o);try{const h=eM(i,t,n,d,r);if(h&&typeof h.then=="function")h.then(p,m);else if(h!==void 0)p(h);else if(a===e.length)throw new Error("No promise has been returned or callback has been called.")}catch(h){m(h)}}function d(h,y){h?m(h):p(y)}function p(h){s({plugin:i,result:h})}function m(h){o={plugin:i,error:h},c()}})}xo.run=ESe;function eM(e,t,n,r,i){const o=e[t];if(typeof o=="function")return o.apply(e,[n,r,i]);if(!r){if(o instanceof RegExp)return o.test(n.url);if(typeof o=="string")return o===n.extension;if(Array.isArray(o))return o.indexOf(n.extension)!==-1}return o}var ASe=se&&se.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),CSe=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),tM=se&&se.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&ASe(t,e,n);return CSe(t,e),t};Object.defineProperty(iy,"__esModule",{value:!0});const aw=qs,OSe=tM(Ft),Ba=tM(xo),Us=tn;async function TSe(e,t,n){const r=e.indexOf("#");let i="";r>=0&&(i=e.substring(r),e=e.substring(0,r));const o=t._add(e),a={url:e,hash:i,extension:OSe.getExtension(e)};try{const s=await $Se(a,n,t);o.pathType=s.plugin.name,a.data=s.result;const l=await kSe(a,n,t);return o.value=l.result,l.result}catch(s){throw(0,Us.isHandledError)(s)&&(o.value=s),s}}async function $Se(e,t,n){let r=Ba.all(t.resolve);r=Ba.filter(r,"canRead",e),Ba.sort(r);try{return await Ba.run(r,"read",e,n)}catch(i){throw!i&&t.continueOnError?new Us.UnmatchedResolverError(e.url):!i||!("error"in i)?aw.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`):i.error instanceof Us.ResolverError?i.error:new Us.ResolverError(i,e.url)}}async function kSe(e,t,n){const r=Ba.all(t.parse),i=Ba.filter(r,"canParse",e),o=i.length>0?i:r;Ba.sort(o);try{const a=await Ba.run(o,"parse",e,n);if(!a.plugin.allowEmpty&&ISe(a.result))throw aw.ono.syntax(`Error parsing "${e.url}" as ${a.plugin.name}.
|