@botpress/webchat 2.1.2 → 2.1.4
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
|
@@ -24,10 +24,10 @@ Check the render method of \``+Z+"`."}return""}}function He(Z){{if(Z!==void 0){v
|
|
|
24
24
|
|
|
25
25
|
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=`
|
|
26
26
|
|
|
27
|
-
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];N(yt)&&We(yt,Ce)}else if(N(Z))Z._store&&(Z._store.validated=!0);else if(Z){var Kt=w(Z);if(typeof Kt=="function"&&Kt!==Z.entries)for(var un=Kt.call(Z),Ft;!(Ft=un.next()).done;)N(Ft.value)&&We(Ft.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 Kt=Q(Ce);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Kt||"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 Jt(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,Kt,un){{var Ft=M(Z);if(!Ft){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(Kt);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,Kt,un);if(Tn==null)return Tn;if(Ft){var Xr=Ce.children;if(Xr!==void 0)if(yt)if(ot(Xr)){for(var Zi=0;Zi<Xr.length;Zi++)_t(Xr[Zi],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?Jt(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,xl=Rn;Fl.Fragment=r,Fl.jsx=ta,Fl.jsxs=xl}()),Fl}process.env.NODE_ENV==="production"?tg.exports=kF():tg.exports=IF();var X=tg.exports;function Bt(){return Bt=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},Bt.apply(this,arguments)}function Xf(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,PF(i,...t)]}function PF(...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 Pr(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 Xs=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{};function ts(){return ts=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},ts.apply(null,arguments)}function RF(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ux(...e){return t=>e.forEach(n=>RF(n,t))}function ii(...e){return C.useCallback(Ux(...e),e)}const ng=C.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.Children.toArray(n),o=i.find(DF);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(rg,ts({},r,{ref:t}),C.isValidElement(a)?C.cloneElement(a,void 0,s):null)}return C.createElement(rg,ts({},r,{ref:t}),n)});ng.displayName="Slot";const rg=C.forwardRef((e,t)=>{const{children:n,...r}=e;return C.isValidElement(n)?C.cloneElement(n,{...MF(r,n.props),ref:t?Ux(t,n.ref):n.ref}):C.Children.count(n)>1?C.Children.only(null):null});rg.displayName="SlotClone";const NF=({children:e})=>C.createElement(C.Fragment,null,e);function DF(e){return C.isValidElement(e)&&e.type===NF}function MF(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 lr=["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?ng:t;return C.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.createElement(s,ts({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function jF(e,t){e&&Yi.flushSync(()=>e.dispatchEvent(t))}const Bx="Avatar",[LF,vRe]=Xf(Bx),[FF,zx]=LF(Bx),Zx=C.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=C.useState("idle");return C.createElement(FF,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o},C.createElement(lr.span,Bt({},r,{ref:t})))}),qF="AvatarImage",Hx=C.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=zx(qF,n),s=BF(r),l=Pr(c=>{i(c),a.onImageLoadingStatusChange(c)});return Xs(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?C.createElement(lr.img,Bt({},o,{ref:t,src:r})):null}),UF="AvatarFallback",Wx=C.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=zx(UF,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(lr.span,Bt({},i,{ref:t})):null});function BF(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 ig=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 zF=new ig;function Vx(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 og=C.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...o},a)=>{const s=Vx(e??"",15);return X.jsxs(Zx,{ref:a,"data-color":s,...n,...o,children:[X.jsx(Hx,{src:t,...r}),X.jsx(Wx,{...i,children:typeof o.children=="string"?o.children[0]:o.children})]})});function bRe(){}function _Re(){}function ZF(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const HF=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WF=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VF={};function Kx(e,t){return((t||VF).jsx?WF:HF).test(e)}const KF=/[ \t\n\f\r]/g;function GF(e){return typeof e=="object"?e.type==="text"?Gx(e.value):!1:Gx(e)}function Gx(e){return e.replace(KF,"")===""}let ql=class{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}};ql.prototype.property={},ql.prototype.normal={},ql.prototype.space=null;function Yx(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 ql(n,r,t)}function ag(e){return e.toLowerCase()}class vi{constructor(t,n){this.property=t,this.attribute=n}}vi.prototype.space=null,vi.prototype.boolean=!1,vi.prototype.booleanish=!1,vi.prototype.overloadedBoolean=!1,vi.prototype.number=!1,vi.prototype.commaSeparated=!1,vi.prototype.spaceSeparated=!1,vi.prototype.commaOrSpaceSeparated=!1,vi.prototype.mustUseProperty=!1,vi.prototype.defined=!1;let YF=0;const Mt=ns(),Bn=ns(),Jx=ns(),ke=ns(),En=ns(),Qs=ns(),oi=ns();function ns(){return 2**++YF}const sg=Object.freeze(Object.defineProperty({__proto__:null,boolean:Mt,booleanish:Bn,commaOrSpaceSeparated:oi,commaSeparated:Qs,number:ke,overloadedBoolean:Jx,spaceSeparated:En},Symbol.toStringTag,{value:"Module"})),ug=Object.keys(sg);class lg extends vi{constructor(t,n,r,i){let o=-1;if(super(t,n),Xx(this,"space",i),typeof r=="number")for(;++o<ug.length;){const a=ug[o];Xx(this,ug[o],(r&sg[a])===sg[a])}}}lg.prototype.defined=!0;function Xx(e,t,n){n&&(e[t]=n)}const JF={}.hasOwnProperty;function eu(e){const t={},n={};let r;for(r in e.properties)if(JF.call(e.properties,r)){const i=e.properties[r],o=new lg(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ag(r)]=r,n[ag(o.attribute)]=r}return new ql(t,n,e.space)}const Qx=eu({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}}),e1=eu({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function t1(e,t){return t in e?e[t]:t}function n1(e,t){return t1(e,t.toLowerCase())}const r1=eu({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:n1,properties:{xmlns:null,xmlnsXLink:null}}),i1=eu({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Bn,ariaAutoComplete:null,ariaBusy:Bn,ariaChecked:Bn,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:En,ariaCurrent:null,ariaDescribedBy:En,ariaDetails:null,ariaDisabled:Bn,ariaDropEffect:En,ariaErrorMessage:null,ariaExpanded:Bn,ariaFlowTo:En,ariaGrabbed:Bn,ariaHasPopup:null,ariaHidden:Bn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:En,ariaLevel:ke,ariaLive:null,ariaModal:Bn,ariaMultiLine:Bn,ariaMultiSelectable:Bn,ariaOrientation:null,ariaOwns:En,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:Bn,ariaReadOnly:Bn,ariaRelevant:null,ariaRequired:Bn,ariaRoleDescription:En,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:Bn,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null}}),XF=eu({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:n1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Qs,acceptCharset:En,accessKey:En,action:null,allow:null,allowFullScreen:Mt,allowPaymentRequest:Mt,allowUserMedia:Mt,alt:null,as:null,async:Mt,autoCapitalize:null,autoComplete:En,autoFocus:Mt,autoPlay:Mt,capture:Mt,charSet:null,checked:Mt,cite:null,className:En,cols:ke,colSpan:null,content:null,contentEditable:Bn,controls:Mt,controlsList:En,coords:ke|Qs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Mt,defer:Mt,dir:null,dirName:null,disabled:Mt,download:Jx,draggable:Bn,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Mt,formTarget:null,headers:En,height:ke,hidden:Mt,high:ke,href:null,hrefLang:null,htmlFor:En,httpEquiv:En,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:Mt,itemId:null,itemProp:En,itemRef:En,itemScope:Mt,itemType:En,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Mt,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:Mt,muted:Mt,name:null,nonce:null,noModule:Mt,noValidate:Mt,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:Mt,optimum:ke,pattern:null,ping:En,placeholder:null,playsInline:Mt,poster:null,preload:null,readOnly:Mt,referrerPolicy:null,rel:En,required:Mt,reversed:Mt,rows:ke,rowSpan:ke,sandbox:En,scope:null,scoped:Mt,seamless:Mt,selected:Mt,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:Bn,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:Mt,useMap:null,value:Bn,width:ke,wrap:null,align:null,aLink:null,archive:En,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:Mt,declare:Mt,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:Mt,noHref:Mt,noShade:Mt,noWrap:Mt,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:Bn,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:Mt,disableRemotePlayback:Mt,prefix:null,property:null,results:ke,security:null,unselectable:null}}),QF=eu({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:t1,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:En,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:Mt,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:Qs,g2:Qs,glyphName:Qs,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:En,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}}),e3=/^data[-\w.:]+$/i,o1=/-[a-z]/g,t3=/[A-Z]/g;function n3(e,t){const n=ag(t);let r=t,i=vi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&e3.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(o1,i3);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!o1.test(o)){let a=o.replace(t3,r3);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=lg}return new i(r,t)}function r3(e){return"-"+e.toLowerCase()}function i3(e){return e.charAt(1).toUpperCase()}const o3={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"},a3=Yx([e1,Qx,r1,i1,XF],"html"),cg=Yx([e1,Qx,r1,i1,QF],"svg");function s3(e){return e.join(" ").trim()}var a1={},s1=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,u3=/\n/g,l3=/^\s*/,c3=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,f3=/^:\s*/,d3=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,p3=/^[;\s]*/,h3=/^\s+|\s+$/g,m3=`
|
|
28
|
-
`,u1="/",l1="*",rs="",y3="comment",g3="declaration",v3=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(u3);v&&(n+=v.length);var w=y.lastIndexOf(m3);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(l3)}function d(y){var v;for(y=y||[];v=p();)v!==!1&&y.push(v);return y}function p(){var y=o();if(!(u1!=e.charAt(0)||l1!=e.charAt(1))){for(var v=2;rs!=e.charAt(v)&&(l1!=e.charAt(v)||u1!=e.charAt(v+1));)++v;if(v+=2,rs===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:y3,comment:w})}}function m(){var y=o(),v=l(c3);if(v){if(p(),!l(f3))return s("property missing ':'");var w=l(d3),_=y({type:g3,property:c1(v[0].replace(s1,rs)),value:w?c1(w[0].replace(s1,rs)):rs});return l(p3),_}}function h(){var y=[];d(y);for(var v;v=m();)v!==!1&&(y.push(v),d(y));return y}return c(),h()};function c1(e){return e?e.replace(h3,rs):rs}var b3=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a1,"__esModule",{value:!0});var _3=b3(v3);function w3(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,_3.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 f1=a1.default=w3;const x3=f1.default||f1,d1=p1("end"),fg=p1("start");function p1(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 S3(e){const t=fg(e),n=d1(e);if(t&&n)return{start:t,end:n}}function Ul(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?h1(e.position):"start"in e||"end"in e?h1(e):"line"in e||"column"in e?dg(e):""}function dg(e){return m1(e&&e.line)+":"+m1(e&&e.column)}function h1(e){return dg(e&&e.start)+"-"+dg(e&&e.end)}function m1(e){return e&&typeof e=="number"?e:1}class vr 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=Ul(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}}vr.prototype.file="",vr.prototype.name="",vr.prototype.reason="",vr.prototype.message="",vr.prototype.stack="",vr.prototype.column=void 0,vr.prototype.line=void 0,vr.prototype.ancestors=void 0,vr.prototype.cause=void 0,vr.prototype.fatal=void 0,vr.prototype.place=void 0,vr.prototype.ruleId=void 0,vr.prototype.source=void 0;const pg={}.hasOwnProperty,E3=new Map,A3=/[A-Z]/g,C3=/-([a-z])/g,O3=new Set(["table","tbody","thead","tfoot","tr"]),T3=new Set(["td","th"]),y1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $3(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=j3(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=M3(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"?cg:a3,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=g1(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function g1(e,t,n){if(t.type==="element")return k3(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return I3(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return R3(e,t,n);if(t.type==="mdxjsEsm")return P3(e,t);if(t.type==="root")return N3(e,t,n);if(t.type==="text")return D3(e,t)}function k3(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=cg,e.schema=i),e.ancestors.push(t);const o=b1(e,t.tagName,!1),a=L3(e,t);let s=mg(e,t);return O3.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!GF(l):!0})),v1(e,a,o,t),hg(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function I3(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)}Bl(e,t.position)}function P3(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Bl(e,t.position)}function R3(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=cg,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:b1(e,t.name,!0),a=F3(e,t),s=mg(e,t);return v1(e,a,o,t),hg(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function N3(e,t,n){const r={};return hg(r,mg(e,t)),e.create(t,e.Fragment,r,n)}function D3(e,t){return t.value}function v1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function M3(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 j3(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=fg(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 L3(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&pg.call(t.properties,i)){const o=q3(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&T3.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 F3(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 Bl(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 Bl(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function mg(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:E3;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=g1(e,o,a);s!==void 0&&n.push(s)}return n}function q3(e,t,n){const r=n3(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ZF(n):s3(n)),r.property==="style"){let i=typeof n=="object"?n:U3(e,String(n));return e.stylePropertyNameCase==="css"&&(i=B3(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?o3[r.property]||r.property:r.attribute,n]}}function U3(e,t){const n={};try{x3(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,a=new vr("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=y1+"#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(C3,Z3)),n[a]=o}}function b1(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=Kx(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=Kx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return pg.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Bl(e)}function Bl(e,t){const n=new vr("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=y1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function B3(e){const t={};let n;for(n in e)pg.call(e,n)&&(t[z3(n)]=e[n]);return t}function z3(e){let t=e.replace(A3,H3);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Z3(e,t){return t.toUpperCase()}function H3(e){return"-"+e.toLowerCase()}const yg={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"]},W3={};function gg(e,t){const n=t||W3,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _1(e,r,i)}function _1(e,t,n){if(V3(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 w1(e.children,t,n)}return Array.isArray(e)?w1(e,t,n):""}function w1(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=_1(e[i],t,n);return r.join("")}function V3(e){return!!(e&&typeof e=="object")}const x1=document.createElement("i");function vg(e){const t="&"+e+";";x1.innerHTML=t;const n=x1.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 bi(e,t){return e.length>0?(ai(e,e.length,0,t),e):t}const S1={}.hasOwnProperty;function E1(e){const t={};let n=-1;for(;++n<e.length;)K3(t,e[n]);return t}function K3(e,t){let n;for(n in t){const i=(S1.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){S1.call(i,a)||(i[a]=[]);const s=o[a];G3(i[a],Array.isArray(s)?s:s?[s]:[])}}}function G3(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 A1(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 Pi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rr=fa(/[A-Za-z]/),br=fa(/[\dA-Za-z]/),Y3=fa(/[#-'*+\--9=?A-Z^-~]/);function Qf(e){return e!==null&&(e<32||e===127)}const bg=fa(/\d/),J3=fa(/[\dA-Fa-f]/),X3=fa(/[!-/:-@[-`{-~]/);function ht(e){return e!==null&&e<-2}function mn(e){return e!==null&&(e<0||e===32)}function zt(e){return e===-2||e===-1||e===32}const ed=fa(/\p{P}|\p{S}/u),is=fa(/\s/);function fa(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function tu(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&br(e.charCodeAt(n+1))&&br(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 Qt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return zt(l)?(e.enter(n),s(l)):t(l)}function s(l){return zt(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const Q3={tokenize:eq};function eq(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"),Qt(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 tq={tokenize:nq},C1={tokenize:rq};function nq(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(C1,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(C1,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 q=j,L,M;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(L){M=t.events[q][1].end;break}L=!0}for(_(r),T=j;T<t.events.length;)t.events[T][1].end=Object.assign({},M),T++;ai(t.events,q+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 rq(e,t,n){return Qt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function td(e){if(e===null||mn(e)||is(e))return 1;if(ed(e))return 2}function nd(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 _g={name:"attention",tokenize:oq,resolveAll:iq};function iq(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);O1(p,-l),O1(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=bi(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=bi(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),c=bi(c,nd(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=bi(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=bi(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 oq(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=td(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=td(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 O1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const aq={name:"autolink",tokenize:sq};function sq(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 Rr(h)?(e.consume(h),a):c(h)}function a(h){return h===43||h===45||h===46||br(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||br(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||Qf(h)?n(h):(e.consume(h),l)}function c(h){return h===64?(e.consume(h),d):Y3(h)?(e.consume(h),c):n(h)}function d(h){return br(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||br(h))&&r++<63){const y=h===45?m:p;return e.consume(h),y}return n(h)}}const zl={tokenize:uq,partial:!0};function uq(e,t,n){return r;function r(o){return zt(o)?Qt(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||ht(o)?t(o):n(o)}}const T1={name:"blockQuote",tokenize:lq,continuation:{tokenize:cq},exit:fq};function lq(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 zt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function cq(e,t,n){const r=this;return i;function i(a){return zt(a)?Qt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(T1,t,n)(a)}}function fq(e){e.exit("blockQuote")}const $1={name:"characterEscape",tokenize:dq};function dq(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 X3(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const k1={name:"characterReference",tokenize:pq};function pq(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=br,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=J3,d):(e.enter("characterReferenceValue"),o=7,a=bg,d(p))}function d(p){if(p===59&&i){const m=e.exit("characterReferenceValue");return a===br&&!vg(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 I1={tokenize:mq,partial:!0},P1={name:"codeFenced",tokenize:hq,concrete:!0};function hq(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"),zt(T)?Qt(e,p,"whitespace")(T):p(T))}function p(T){return T===null||ht(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(I1,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)):zt(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qt(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&&zt(T)?Qt(e,b,"linePrefix",o+1)(T):b(T)}function b(T){return T===null||ht(T)?e.check(I1,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,q){let L=0;return M;function M(V){return T.enter("lineEnding"),T.consume(V),T.exit("lineEnding"),H}function H(V){return T.enter("codeFencedFence"),zt(V)?Qt(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)):q(V)}function Q(V){return V===s?(L++,T.consume(V),Q):L>=a?(T.exit("codeFencedFenceSequence"),zt(V)?Qt(T,G,"whitespace")(V):G(V)):q(V)}function G(V){return V===null||ht(V)?(T.exit("codeFencedFence"),j(V)):q(V)}}}function mq(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 wg={name:"codeIndented",tokenize:gq},yq={tokenize:vq,partial:!0};function gq(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Qt(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(yq,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 vq(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):Qt(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 bq={name:"codeText",tokenize:xq,resolve:_q,previous:wq};function _q(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 wq(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xq(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 R1(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,Sq(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 Sq(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 Eq={tokenize:Oq,resolve:Cq},Aq={tokenize:Tq,partial:!0};function Cq(e){return R1(e),e}function Oq(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(Aq,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 Tq(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Qt(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 N1(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||Qf(_)?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||mn(_))?(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||Qf(_)?n(_):(e.consume(_),_===92?w:v)}function w(_){return _===40||_===41||_===92?(e.consume(_),v):v(_)}}function D1(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=!zt(h)),h===92?m:p)}function m(h){return h===91||h===92||h===93?(e.consume(h),s++,p):p(h)}}function M1(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"),Qt(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 Zl(e,t){let n;return r;function r(i){return ht(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):zt(i)?Qt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const $q={name:"definition",tokenize:Iq},kq={tokenize:Pq,partial:!0};function Iq(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),a(h)}function a(h){return D1.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=Pi(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 mn(h)?Zl(e,c)(h):c(h)}function c(h){return N1(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(kq,p,p)(h)}function p(h){return zt(h)?Qt(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 Pq(e,t,n){return r;function r(s){return mn(s)?Zl(e,i)(s):n(s)}function i(s){return M1(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return zt(s)?Qt(e,a,"whitespace")(s):a(s)}function a(s){return s===null||ht(s)?t(s):n(s)}}const Rq={name:"hardBreakEscape",tokenize:Nq};function Nq(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 Dq={name:"headingAtx",tokenize:jq,resolve:Mq};function Mq(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 jq(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||mn(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)):zt(d)?Qt(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||mn(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),c)}}const Lq=["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"],j1=["pre","script","style","textarea"],Fq={name:"htmlFlow",tokenize:zq,resolveTo:Bq,concrete:!0},qq={tokenize:Hq,partial:!0},Uq={tokenize:Zq,partial:!0};function Bq(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 zq(e,t,n){const r=this;let i,o,a,s,l;return c;function c(D){return d(D)}function d(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),p}function p(D){return D===33?(e.consume(D),m):D===47?(e.consume(D),o=!0,v):D===63?(e.consume(D),i=3,r.interrupt?t:P):Rr(D)?(e.consume(D),a=String.fromCharCode(D),w):n(D)}function m(D){return D===45?(e.consume(D),i=2,h):D===91?(e.consume(D),i=5,s=0,y):Rr(D)?(e.consume(D),i=4,r.interrupt?t:P):n(D)}function h(D){return D===45?(e.consume(D),r.interrupt?t:P):n(D)}function y(D){const De="CDATA[";return D===De.charCodeAt(s++)?(e.consume(D),s===De.length?r.interrupt?t:re:y):n(D)}function v(D){return Rr(D)?(e.consume(D),a=String.fromCharCode(D),w):n(D)}function w(D){if(D===null||D===47||D===62||mn(D)){const De=D===47,qe=a.toLowerCase();return!De&&!o&&j1.includes(qe)?(i=1,r.interrupt?t(D):re(D)):Lq.includes(a.toLowerCase())?(i=6,De?(e.consume(D),_):r.interrupt?t(D):re(D)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(D):o?b(D):S(D))}return D===45||br(D)?(e.consume(D),a+=String.fromCharCode(D),w):n(D)}function _(D){return D===62?(e.consume(D),r.interrupt?t:re):n(D)}function b(D){return zt(D)?(e.consume(D),b):M(D)}function S(D){return D===47?(e.consume(D),M):D===58||D===95||Rr(D)?(e.consume(D),A):zt(D)?(e.consume(D),S):M(D)}function A(D){return D===45||D===46||D===58||D===95||br(D)?(e.consume(D),A):E(D)}function E(D){return D===61?(e.consume(D),T):zt(D)?(e.consume(D),E):S(D)}function T(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),l=D,j):zt(D)?(e.consume(D),T):q(D)}function j(D){return D===l?(e.consume(D),l=null,L):D===null||ht(D)?n(D):(e.consume(D),j)}function q(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||mn(D)?E(D):(e.consume(D),q)}function L(D){return D===47||D===62||zt(D)?S(D):n(D)}function M(D){return D===62?(e.consume(D),H):n(D)}function H(D){return D===null||ht(D)?re(D):zt(D)?(e.consume(D),H):n(D)}function re(D){return D===45&&i===2?(e.consume(D),F):D===60&&i===1?(e.consume(D),Y):D===62&&i===4?(e.consume(D),ue):D===63&&i===3?(e.consume(D),P):D===93&&i===5?(e.consume(D),ce):ht(D)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(qq,Oe,Q)(D)):D===null||ht(D)?(e.exit("htmlFlowData"),Q(D)):(e.consume(D),re)}function Q(D){return e.check(Uq,G,Oe)(D)}function G(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),V}function V(D){return D===null||ht(D)?Q(D):(e.enter("htmlFlowData"),re(D))}function F(D){return D===45?(e.consume(D),P):re(D)}function Y(D){return D===47?(e.consume(D),a="",ne):re(D)}function ne(D){if(D===62){const De=a.toLowerCase();return j1.includes(De)?(e.consume(D),ue):re(D)}return Rr(D)&&a.length<8?(e.consume(D),a+=String.fromCharCode(D),ne):re(D)}function ce(D){return D===93?(e.consume(D),P):re(D)}function P(D){return D===62?(e.consume(D),ue):D===45&&i===2?(e.consume(D),P):re(D)}function ue(D){return D===null||ht(D)?(e.exit("htmlFlowData"),Oe(D)):(e.consume(D),ue)}function Oe(D){return e.exit("htmlFlow"),t(D)}}function Zq(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 Hq(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(zl,t,n)}}const Wq={name:"htmlText",tokenize:Vq};function Vq(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):Rr(P)?(e.consume(P),q):n(P)}function c(P){return P===45?(e.consume(P),d):P===91?(e.consume(P),o=0,y):Rr(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?F(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?F(P):P===93?(e.consume(P),_):v(P)}function b(P){return P===null||P===62?F(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?F(P):S(P)}function E(P){return Rr(P)?(e.consume(P),T):n(P)}function T(P){return P===45||br(P)?(e.consume(P),T):j(P)}function j(P){return ht(P)?(a=j,Y(P)):zt(P)?(e.consume(P),j):F(P)}function q(P){return P===45||br(P)?(e.consume(P),q):P===47||P===62||mn(P)?L(P):n(P)}function L(P){return P===47?(e.consume(P),F):P===58||P===95||Rr(P)?(e.consume(P),M):ht(P)?(a=L,Y(P)):zt(P)?(e.consume(P),L):F(P)}function M(P){return P===45||P===46||P===58||P===95||br(P)?(e.consume(P),M):H(P)}function H(P){return P===61?(e.consume(P),re):ht(P)?(a=H,Y(P)):zt(P)?(e.consume(P),H):L(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)):zt(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||mn(P)?L(P):(e.consume(P),G)}function V(P){return P===47||P===62||mn(P)?L(P):n(P)}function F(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 zt(P)?Qt(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 xg={name:"labelEnd",tokenize:Qq,resolveTo:Xq,resolveAll:Jq},Kq={tokenize:eU},Gq={tokenize:tU},Yq={tokenize:nU};function Jq(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 Xq(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=bi(s,e.slice(o+1,o+r+3)),s=bi(s,[["enter",d,t]]),s=bi(s,nd(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=bi(s,[["exit",d,t],e[a-2],e[a-1],["exit",c,t]]),s=bi(s,e.slice(a+1)),s=bi(s,[["exit",l,t]]),ai(e,o,e.length,s),e}function Qq(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(Pi(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(Kq,d,a?d:p)(m):m===91?e.attempt(Gq,d,a?c:p)(m):a?d(m):p(m)}function c(m){return e.attempt(Yq,d,p)(m)}function d(m){return t(m)}function p(m){return o._balanced=!0,n(m)}}function eU(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 mn(p)?Zl(e,o)(p):o(p)}function o(p){return p===41?d(p):N1(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return mn(p)?Zl(e,l)(p):d(p)}function s(p){return n(p)}function l(p){return p===34||p===39||p===40?M1(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function c(p){return mn(p)?Zl(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 tU(e,t,n){const r=this;return i;function i(s){return D1.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Pi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function nU(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 rU={name:"labelStartImage",tokenize:iU,resolveAll:xg.resolveAll};function iU(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 oU={name:"labelStartLink",tokenize:aU,resolveAll:xg.resolveAll};function aU(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 Sg={name:"lineEnding",tokenize:sU};function sU(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qt(e,t,"linePrefix")}}const rd={name:"thematicBreak",tokenize:uU};function uU(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"),zt(c)?Qt(e,s,"whitespace")(c):s(c))}}const Br={name:"list",tokenize:fU,continuation:{tokenize:dU},exit:hU},lU={tokenize:mU,partial:!0},cU={tokenize:pU,partial:!0};function fU(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:bg(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(rd,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 bg(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(zl,r.interrupt?n:d,e.attempt(lU,m,p))}function d(h){return r.containerState.initialBlankLine=!0,o++,m(h)}function p(h){return zt(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 dU(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(zl,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qt(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!zt(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(cU,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qt(e,e.attempt(Br,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function pU(e,t,n){const r=this;return Qt(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 hU(e){e.exit(this.containerState.type)}function mU(e,t,n){const r=this;return Qt(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!zt(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const L1={name:"setextUnderline",tokenize:gU,resolveTo:yU};function yU(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 gU(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"),zt(c)?Qt(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||ht(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const vU={tokenize:bU};function bU(e){const t=this,n=e.attempt(zl,r,e.attempt(this.parser.constructs.flowInitial,i,Qt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Eq,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 _U={resolveAll:q1()},wU=F1("string"),xU=F1("text");function F1(e){return{tokenize:t,resolveAll:q1(e==="text"?SU: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 q1(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 SU(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 EU(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=bi(a,H),w(),a[a.length-1]!==null?[]:(q(t,0),c.events=nd(o,c.events,c),c.events)}function m(H,re){return CU(h(H),re)}function h(H){return AU(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){q(H,re.from)}function T(H,re){re.restore()}function j(H,re){return Q;function Q(G,V,F){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?F:D(Me[ne])}function D(Me){return Je;function Je(rt){return P=L(),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,De,qe)(rt)}}function De(Me){return H(ce,P),V}function qe(Me){return P.restore(),++ne<Y.length?D(Y[ne]):F}}}function q(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 L(){const H=y(),re=c.previous,Q=c.currentConstruct,G=c.events.length,V=Array.from(s);return{restore:F,from:G};function F(){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 AU(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 CU(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=`
|
|
27
|
+
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];N(yt)&&We(yt,Ce)}else if(N(Z))Z._store&&(Z._store.validated=!0);else if(Z){var Kt=w(Z);if(typeof Kt=="function"&&Kt!==Z.entries)for(var un=Kt.call(Z),Ft;!(Ft=un.next()).done;)N(Ft.value)&&We(Ft.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 Kt=Q(Ce);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Kt||"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 Jt(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,Kt,un){{var Ft=M(Z);if(!Ft){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(Kt);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,Kt,un);if(Tn==null)return Tn;if(Ft){var Xr=Ce.children;if(Xr!==void 0)if(yt)if(ot(Xr)){for(var Zi=0;Zi<Xr.length;Zi++)_t(Xr[Zi],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?Jt(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 na=mr,xl=Rn;Fl.Fragment=r,Fl.jsx=na,Fl.jsxs=xl}()),Fl}process.env.NODE_ENV==="production"?tg.exports=kF():tg.exports=IF();var X=tg.exports;function Bt(){return Bt=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},Bt.apply(this,arguments)}function Xf(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,PF(i,...t)]}function PF(...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 Pr(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 Xs=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{};function ts(){return ts=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},ts.apply(null,arguments)}function RF(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ux(...e){return t=>e.forEach(n=>RF(n,t))}function ii(...e){return C.useCallback(Ux(...e),e)}const ng=C.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.Children.toArray(n),o=i.find(DF);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(rg,ts({},r,{ref:t}),C.isValidElement(a)?C.cloneElement(a,void 0,s):null)}return C.createElement(rg,ts({},r,{ref:t}),n)});ng.displayName="Slot";const rg=C.forwardRef((e,t)=>{const{children:n,...r}=e;return C.isValidElement(n)?C.cloneElement(n,{...MF(r,n.props),ref:t?Ux(t,n.ref):n.ref}):C.Children.count(n)>1?C.Children.only(null):null});rg.displayName="SlotClone";const NF=({children:e})=>C.createElement(C.Fragment,null,e);function DF(e){return C.isValidElement(e)&&e.type===NF}function MF(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 lr=["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?ng:t;return C.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.createElement(s,ts({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function jF(e,t){e&&Yi.flushSync(()=>e.dispatchEvent(t))}const Bx="Avatar",[LF,vRe]=Xf(Bx),[FF,zx]=LF(Bx),Zx=C.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=C.useState("idle");return C.createElement(FF,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o},C.createElement(lr.span,Bt({},r,{ref:t})))}),qF="AvatarImage",Hx=C.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=zx(qF,n),s=BF(r),l=Pr(c=>{i(c),a.onImageLoadingStatusChange(c)});return Xs(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?C.createElement(lr.img,Bt({},o,{ref:t,src:r})):null}),UF="AvatarFallback",Wx=C.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=zx(UF,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(lr.span,Bt({},i,{ref:t})):null});function BF(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 ig=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 zF=new ig;function Vx(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 og=C.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...o},a)=>{const s=Vx(e??"",15);return X.jsxs(Zx,{ref:a,"data-color":s,...n,...o,children:[X.jsx(Hx,{src:t,...r}),X.jsx(Wx,{...i,children:typeof o.children=="string"?o.children[0]:o.children})]})});function bRe(){}function _Re(){}function ZF(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const HF=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WF=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VF={};function Kx(e,t){return((t||VF).jsx?WF:HF).test(e)}const KF=/[ \t\n\f\r]/g;function GF(e){return typeof e=="object"?e.type==="text"?Gx(e.value):!1:Gx(e)}function Gx(e){return e.replace(KF,"")===""}let ql=class{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}};ql.prototype.property={},ql.prototype.normal={},ql.prototype.space=null;function Yx(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 ql(n,r,t)}function ag(e){return e.toLowerCase()}class vi{constructor(t,n){this.property=t,this.attribute=n}}vi.prototype.space=null,vi.prototype.boolean=!1,vi.prototype.booleanish=!1,vi.prototype.overloadedBoolean=!1,vi.prototype.number=!1,vi.prototype.commaSeparated=!1,vi.prototype.spaceSeparated=!1,vi.prototype.commaOrSpaceSeparated=!1,vi.prototype.mustUseProperty=!1,vi.prototype.defined=!1;let YF=0;const Mt=ns(),Bn=ns(),Jx=ns(),ke=ns(),En=ns(),Qs=ns(),oi=ns();function ns(){return 2**++YF}const sg=Object.freeze(Object.defineProperty({__proto__:null,boolean:Mt,booleanish:Bn,commaOrSpaceSeparated:oi,commaSeparated:Qs,number:ke,overloadedBoolean:Jx,spaceSeparated:En},Symbol.toStringTag,{value:"Module"})),ug=Object.keys(sg);class lg extends vi{constructor(t,n,r,i){let o=-1;if(super(t,n),Xx(this,"space",i),typeof r=="number")for(;++o<ug.length;){const a=ug[o];Xx(this,ug[o],(r&sg[a])===sg[a])}}}lg.prototype.defined=!0;function Xx(e,t,n){n&&(e[t]=n)}const JF={}.hasOwnProperty;function eu(e){const t={},n={};let r;for(r in e.properties)if(JF.call(e.properties,r)){const i=e.properties[r],o=new lg(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ag(r)]=r,n[ag(o.attribute)]=r}return new ql(t,n,e.space)}const Qx=eu({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}}),e1=eu({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function t1(e,t){return t in e?e[t]:t}function n1(e,t){return t1(e,t.toLowerCase())}const r1=eu({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:n1,properties:{xmlns:null,xmlnsXLink:null}}),i1=eu({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Bn,ariaAutoComplete:null,ariaBusy:Bn,ariaChecked:Bn,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:En,ariaCurrent:null,ariaDescribedBy:En,ariaDetails:null,ariaDisabled:Bn,ariaDropEffect:En,ariaErrorMessage:null,ariaExpanded:Bn,ariaFlowTo:En,ariaGrabbed:Bn,ariaHasPopup:null,ariaHidden:Bn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:En,ariaLevel:ke,ariaLive:null,ariaModal:Bn,ariaMultiLine:Bn,ariaMultiSelectable:Bn,ariaOrientation:null,ariaOwns:En,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:Bn,ariaReadOnly:Bn,ariaRelevant:null,ariaRequired:Bn,ariaRoleDescription:En,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:Bn,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null}}),XF=eu({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:n1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Qs,acceptCharset:En,accessKey:En,action:null,allow:null,allowFullScreen:Mt,allowPaymentRequest:Mt,allowUserMedia:Mt,alt:null,as:null,async:Mt,autoCapitalize:null,autoComplete:En,autoFocus:Mt,autoPlay:Mt,capture:Mt,charSet:null,checked:Mt,cite:null,className:En,cols:ke,colSpan:null,content:null,contentEditable:Bn,controls:Mt,controlsList:En,coords:ke|Qs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Mt,defer:Mt,dir:null,dirName:null,disabled:Mt,download:Jx,draggable:Bn,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Mt,formTarget:null,headers:En,height:ke,hidden:Mt,high:ke,href:null,hrefLang:null,htmlFor:En,httpEquiv:En,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:Mt,itemId:null,itemProp:En,itemRef:En,itemScope:Mt,itemType:En,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Mt,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:Mt,muted:Mt,name:null,nonce:null,noModule:Mt,noValidate:Mt,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:Mt,optimum:ke,pattern:null,ping:En,placeholder:null,playsInline:Mt,poster:null,preload:null,readOnly:Mt,referrerPolicy:null,rel:En,required:Mt,reversed:Mt,rows:ke,rowSpan:ke,sandbox:En,scope:null,scoped:Mt,seamless:Mt,selected:Mt,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:Bn,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:Mt,useMap:null,value:Bn,width:ke,wrap:null,align:null,aLink:null,archive:En,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:Mt,declare:Mt,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:Mt,noHref:Mt,noShade:Mt,noWrap:Mt,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:Bn,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:Mt,disableRemotePlayback:Mt,prefix:null,property:null,results:ke,security:null,unselectable:null}}),QF=eu({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:t1,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:En,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:Mt,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:Qs,g2:Qs,glyphName:Qs,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:En,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}}),e3=/^data[-\w.:]+$/i,o1=/-[a-z]/g,t3=/[A-Z]/g;function n3(e,t){const n=ag(t);let r=t,i=vi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&e3.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(o1,i3);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!o1.test(o)){let a=o.replace(t3,r3);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=lg}return new i(r,t)}function r3(e){return"-"+e.toLowerCase()}function i3(e){return e.charAt(1).toUpperCase()}const o3={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"},a3=Yx([e1,Qx,r1,i1,XF],"html"),cg=Yx([e1,Qx,r1,i1,QF],"svg");function s3(e){return e.join(" ").trim()}var a1={},s1=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,u3=/\n/g,l3=/^\s*/,c3=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,f3=/^:\s*/,d3=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,p3=/^[;\s]*/,h3=/^\s+|\s+$/g,m3=`
|
|
28
|
+
`,u1="/",l1="*",rs="",y3="comment",g3="declaration",v3=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(u3);v&&(n+=v.length);var w=y.lastIndexOf(m3);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(l3)}function d(y){var v;for(y=y||[];v=p();)v!==!1&&y.push(v);return y}function p(){var y=o();if(!(u1!=e.charAt(0)||l1!=e.charAt(1))){for(var v=2;rs!=e.charAt(v)&&(l1!=e.charAt(v)||u1!=e.charAt(v+1));)++v;if(v+=2,rs===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:y3,comment:w})}}function m(){var y=o(),v=l(c3);if(v){if(p(),!l(f3))return s("property missing ':'");var w=l(d3),_=y({type:g3,property:c1(v[0].replace(s1,rs)),value:w?c1(w[0].replace(s1,rs)):rs});return l(p3),_}}function h(){var y=[];d(y);for(var v;v=m();)v!==!1&&(y.push(v),d(y));return y}return c(),h()};function c1(e){return e?e.replace(h3,rs):rs}var b3=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a1,"__esModule",{value:!0});var _3=b3(v3);function w3(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,_3.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 f1=a1.default=w3;const x3=f1.default||f1,d1=p1("end"),fg=p1("start");function p1(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 S3(e){const t=fg(e),n=d1(e);if(t&&n)return{start:t,end:n}}function Ul(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?h1(e.position):"start"in e||"end"in e?h1(e):"line"in e||"column"in e?dg(e):""}function dg(e){return m1(e&&e.line)+":"+m1(e&&e.column)}function h1(e){return dg(e&&e.start)+"-"+dg(e&&e.end)}function m1(e){return e&&typeof e=="number"?e:1}class vr 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=Ul(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}}vr.prototype.file="",vr.prototype.name="",vr.prototype.reason="",vr.prototype.message="",vr.prototype.stack="",vr.prototype.column=void 0,vr.prototype.line=void 0,vr.prototype.ancestors=void 0,vr.prototype.cause=void 0,vr.prototype.fatal=void 0,vr.prototype.place=void 0,vr.prototype.ruleId=void 0,vr.prototype.source=void 0;const pg={}.hasOwnProperty,E3=new Map,A3=/[A-Z]/g,C3=/-([a-z])/g,O3=new Set(["table","tbody","thead","tfoot","tr"]),T3=new Set(["td","th"]),y1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $3(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=j3(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=M3(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"?cg:a3,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=g1(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function g1(e,t,n){if(t.type==="element")return k3(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return I3(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return R3(e,t,n);if(t.type==="mdxjsEsm")return P3(e,t);if(t.type==="root")return N3(e,t,n);if(t.type==="text")return D3(e,t)}function k3(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=cg,e.schema=i),e.ancestors.push(t);const o=b1(e,t.tagName,!1),a=L3(e,t);let s=mg(e,t);return O3.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!GF(l):!0})),v1(e,a,o,t),hg(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function I3(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)}Bl(e,t.position)}function P3(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Bl(e,t.position)}function R3(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=cg,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:b1(e,t.name,!0),a=F3(e,t),s=mg(e,t);return v1(e,a,o,t),hg(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function N3(e,t,n){const r={};return hg(r,mg(e,t)),e.create(t,e.Fragment,r,n)}function D3(e,t){return t.value}function v1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function M3(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 j3(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=fg(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 L3(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&pg.call(t.properties,i)){const o=q3(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&T3.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 F3(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 Bl(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 Bl(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function mg(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:E3;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=g1(e,o,a);s!==void 0&&n.push(s)}return n}function q3(e,t,n){const r=n3(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ZF(n):s3(n)),r.property==="style"){let i=typeof n=="object"?n:U3(e,String(n));return e.stylePropertyNameCase==="css"&&(i=B3(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?o3[r.property]||r.property:r.attribute,n]}}function U3(e,t){const n={};try{x3(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,a=new vr("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=y1+"#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(C3,Z3)),n[a]=o}}function b1(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=Kx(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=Kx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return pg.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Bl(e)}function Bl(e,t){const n=new vr("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=y1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function B3(e){const t={};let n;for(n in e)pg.call(e,n)&&(t[z3(n)]=e[n]);return t}function z3(e){let t=e.replace(A3,H3);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Z3(e,t){return t.toUpperCase()}function H3(e){return"-"+e.toLowerCase()}const yg={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"]},W3={};function gg(e,t){const n=t||W3,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _1(e,r,i)}function _1(e,t,n){if(V3(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 w1(e.children,t,n)}return Array.isArray(e)?w1(e,t,n):""}function w1(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=_1(e[i],t,n);return r.join("")}function V3(e){return!!(e&&typeof e=="object")}const x1=document.createElement("i");function vg(e){const t="&"+e+";";x1.innerHTML=t;const n=x1.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 bi(e,t){return e.length>0?(ai(e,e.length,0,t),e):t}const S1={}.hasOwnProperty;function E1(e){const t={};let n=-1;for(;++n<e.length;)K3(t,e[n]);return t}function K3(e,t){let n;for(n in t){const i=(S1.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){S1.call(i,a)||(i[a]=[]);const s=o[a];G3(i[a],Array.isArray(s)?s:s?[s]:[])}}}function G3(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 A1(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 Pi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rr=da(/[A-Za-z]/),br=da(/[\dA-Za-z]/),Y3=da(/[#-'*+\--9=?A-Z^-~]/);function Qf(e){return e!==null&&(e<32||e===127)}const bg=da(/\d/),J3=da(/[\dA-Fa-f]/),X3=da(/[!-/:-@[-`{-~]/);function ht(e){return e!==null&&e<-2}function mn(e){return e!==null&&(e<0||e===32)}function zt(e){return e===-2||e===-1||e===32}const ed=da(/\p{P}|\p{S}/u),is=da(/\s/);function da(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function tu(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&br(e.charCodeAt(n+1))&&br(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 Qt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return zt(l)?(e.enter(n),s(l)):t(l)}function s(l){return zt(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const Q3={tokenize:eq};function eq(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"),Qt(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 tq={tokenize:nq},C1={tokenize:rq};function nq(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(C1,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(C1,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 q=j,L,M;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(L){M=t.events[q][1].end;break}L=!0}for(_(r),T=j;T<t.events.length;)t.events[T][1].end=Object.assign({},M),T++;ai(t.events,q+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 rq(e,t,n){return Qt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function td(e){if(e===null||mn(e)||is(e))return 1;if(ed(e))return 2}function nd(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 _g={name:"attention",tokenize:oq,resolveAll:iq};function iq(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);O1(p,-l),O1(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=bi(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=bi(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),c=bi(c,nd(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=bi(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=bi(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 oq(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=td(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=td(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 O1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const aq={name:"autolink",tokenize:sq};function sq(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 Rr(h)?(e.consume(h),a):c(h)}function a(h){return h===43||h===45||h===46||br(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||br(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||Qf(h)?n(h):(e.consume(h),l)}function c(h){return h===64?(e.consume(h),d):Y3(h)?(e.consume(h),c):n(h)}function d(h){return br(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||br(h))&&r++<63){const y=h===45?m:p;return e.consume(h),y}return n(h)}}const zl={tokenize:uq,partial:!0};function uq(e,t,n){return r;function r(o){return zt(o)?Qt(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||ht(o)?t(o):n(o)}}const T1={name:"blockQuote",tokenize:lq,continuation:{tokenize:cq},exit:fq};function lq(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 zt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function cq(e,t,n){const r=this;return i;function i(a){return zt(a)?Qt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(T1,t,n)(a)}}function fq(e){e.exit("blockQuote")}const $1={name:"characterEscape",tokenize:dq};function dq(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 X3(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const k1={name:"characterReference",tokenize:pq};function pq(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=br,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=J3,d):(e.enter("characterReferenceValue"),o=7,a=bg,d(p))}function d(p){if(p===59&&i){const m=e.exit("characterReferenceValue");return a===br&&!vg(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 I1={tokenize:mq,partial:!0},P1={name:"codeFenced",tokenize:hq,concrete:!0};function hq(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"),zt(T)?Qt(e,p,"whitespace")(T):p(T))}function p(T){return T===null||ht(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(I1,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)):zt(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qt(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&&zt(T)?Qt(e,b,"linePrefix",o+1)(T):b(T)}function b(T){return T===null||ht(T)?e.check(I1,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,q){let L=0;return M;function M(V){return T.enter("lineEnding"),T.consume(V),T.exit("lineEnding"),H}function H(V){return T.enter("codeFencedFence"),zt(V)?Qt(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)):q(V)}function Q(V){return V===s?(L++,T.consume(V),Q):L>=a?(T.exit("codeFencedFenceSequence"),zt(V)?Qt(T,G,"whitespace")(V):G(V)):q(V)}function G(V){return V===null||ht(V)?(T.exit("codeFencedFence"),j(V)):q(V)}}}function mq(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 wg={name:"codeIndented",tokenize:gq},yq={tokenize:vq,partial:!0};function gq(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Qt(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(yq,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 vq(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):Qt(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 bq={name:"codeText",tokenize:xq,resolve:_q,previous:wq};function _q(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 wq(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xq(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 R1(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,Sq(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 Sq(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 Eq={tokenize:Oq,resolve:Cq},Aq={tokenize:Tq,partial:!0};function Cq(e){return R1(e),e}function Oq(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(Aq,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 Tq(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Qt(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 N1(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||Qf(_)?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||mn(_))?(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||Qf(_)?n(_):(e.consume(_),_===92?w:v)}function w(_){return _===40||_===41||_===92?(e.consume(_),v):v(_)}}function D1(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=!zt(h)),h===92?m:p)}function m(h){return h===91||h===92||h===93?(e.consume(h),s++,p):p(h)}}function M1(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"),Qt(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 Zl(e,t){let n;return r;function r(i){return ht(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):zt(i)?Qt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const $q={name:"definition",tokenize:Iq},kq={tokenize:Pq,partial:!0};function Iq(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),a(h)}function a(h){return D1.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=Pi(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 mn(h)?Zl(e,c)(h):c(h)}function c(h){return N1(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(kq,p,p)(h)}function p(h){return zt(h)?Qt(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 Pq(e,t,n){return r;function r(s){return mn(s)?Zl(e,i)(s):n(s)}function i(s){return M1(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return zt(s)?Qt(e,a,"whitespace")(s):a(s)}function a(s){return s===null||ht(s)?t(s):n(s)}}const Rq={name:"hardBreakEscape",tokenize:Nq};function Nq(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 Dq={name:"headingAtx",tokenize:jq,resolve:Mq};function Mq(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 jq(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||mn(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)):zt(d)?Qt(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||mn(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),c)}}const Lq=["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"],j1=["pre","script","style","textarea"],Fq={name:"htmlFlow",tokenize:zq,resolveTo:Bq,concrete:!0},qq={tokenize:Hq,partial:!0},Uq={tokenize:Zq,partial:!0};function Bq(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 zq(e,t,n){const r=this;let i,o,a,s,l;return c;function c(D){return d(D)}function d(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),p}function p(D){return D===33?(e.consume(D),m):D===47?(e.consume(D),o=!0,v):D===63?(e.consume(D),i=3,r.interrupt?t:P):Rr(D)?(e.consume(D),a=String.fromCharCode(D),w):n(D)}function m(D){return D===45?(e.consume(D),i=2,h):D===91?(e.consume(D),i=5,s=0,y):Rr(D)?(e.consume(D),i=4,r.interrupt?t:P):n(D)}function h(D){return D===45?(e.consume(D),r.interrupt?t:P):n(D)}function y(D){const De="CDATA[";return D===De.charCodeAt(s++)?(e.consume(D),s===De.length?r.interrupt?t:re:y):n(D)}function v(D){return Rr(D)?(e.consume(D),a=String.fromCharCode(D),w):n(D)}function w(D){if(D===null||D===47||D===62||mn(D)){const De=D===47,qe=a.toLowerCase();return!De&&!o&&j1.includes(qe)?(i=1,r.interrupt?t(D):re(D)):Lq.includes(a.toLowerCase())?(i=6,De?(e.consume(D),_):r.interrupt?t(D):re(D)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(D):o?b(D):S(D))}return D===45||br(D)?(e.consume(D),a+=String.fromCharCode(D),w):n(D)}function _(D){return D===62?(e.consume(D),r.interrupt?t:re):n(D)}function b(D){return zt(D)?(e.consume(D),b):M(D)}function S(D){return D===47?(e.consume(D),M):D===58||D===95||Rr(D)?(e.consume(D),A):zt(D)?(e.consume(D),S):M(D)}function A(D){return D===45||D===46||D===58||D===95||br(D)?(e.consume(D),A):E(D)}function E(D){return D===61?(e.consume(D),T):zt(D)?(e.consume(D),E):S(D)}function T(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),l=D,j):zt(D)?(e.consume(D),T):q(D)}function j(D){return D===l?(e.consume(D),l=null,L):D===null||ht(D)?n(D):(e.consume(D),j)}function q(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||mn(D)?E(D):(e.consume(D),q)}function L(D){return D===47||D===62||zt(D)?S(D):n(D)}function M(D){return D===62?(e.consume(D),H):n(D)}function H(D){return D===null||ht(D)?re(D):zt(D)?(e.consume(D),H):n(D)}function re(D){return D===45&&i===2?(e.consume(D),F):D===60&&i===1?(e.consume(D),Y):D===62&&i===4?(e.consume(D),ue):D===63&&i===3?(e.consume(D),P):D===93&&i===5?(e.consume(D),ce):ht(D)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(qq,Oe,Q)(D)):D===null||ht(D)?(e.exit("htmlFlowData"),Q(D)):(e.consume(D),re)}function Q(D){return e.check(Uq,G,Oe)(D)}function G(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),V}function V(D){return D===null||ht(D)?Q(D):(e.enter("htmlFlowData"),re(D))}function F(D){return D===45?(e.consume(D),P):re(D)}function Y(D){return D===47?(e.consume(D),a="",ne):re(D)}function ne(D){if(D===62){const De=a.toLowerCase();return j1.includes(De)?(e.consume(D),ue):re(D)}return Rr(D)&&a.length<8?(e.consume(D),a+=String.fromCharCode(D),ne):re(D)}function ce(D){return D===93?(e.consume(D),P):re(D)}function P(D){return D===62?(e.consume(D),ue):D===45&&i===2?(e.consume(D),P):re(D)}function ue(D){return D===null||ht(D)?(e.exit("htmlFlowData"),Oe(D)):(e.consume(D),ue)}function Oe(D){return e.exit("htmlFlow"),t(D)}}function Zq(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 Hq(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(zl,t,n)}}const Wq={name:"htmlText",tokenize:Vq};function Vq(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):Rr(P)?(e.consume(P),q):n(P)}function c(P){return P===45?(e.consume(P),d):P===91?(e.consume(P),o=0,y):Rr(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?F(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?F(P):P===93?(e.consume(P),_):v(P)}function b(P){return P===null||P===62?F(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?F(P):S(P)}function E(P){return Rr(P)?(e.consume(P),T):n(P)}function T(P){return P===45||br(P)?(e.consume(P),T):j(P)}function j(P){return ht(P)?(a=j,Y(P)):zt(P)?(e.consume(P),j):F(P)}function q(P){return P===45||br(P)?(e.consume(P),q):P===47||P===62||mn(P)?L(P):n(P)}function L(P){return P===47?(e.consume(P),F):P===58||P===95||Rr(P)?(e.consume(P),M):ht(P)?(a=L,Y(P)):zt(P)?(e.consume(P),L):F(P)}function M(P){return P===45||P===46||P===58||P===95||br(P)?(e.consume(P),M):H(P)}function H(P){return P===61?(e.consume(P),re):ht(P)?(a=H,Y(P)):zt(P)?(e.consume(P),H):L(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)):zt(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||mn(P)?L(P):(e.consume(P),G)}function V(P){return P===47||P===62||mn(P)?L(P):n(P)}function F(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 zt(P)?Qt(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 xg={name:"labelEnd",tokenize:Qq,resolveTo:Xq,resolveAll:Jq},Kq={tokenize:eU},Gq={tokenize:tU},Yq={tokenize:nU};function Jq(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 Xq(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=bi(s,e.slice(o+1,o+r+3)),s=bi(s,[["enter",d,t]]),s=bi(s,nd(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=bi(s,[["exit",d,t],e[a-2],e[a-1],["exit",c,t]]),s=bi(s,e.slice(a+1)),s=bi(s,[["exit",l,t]]),ai(e,o,e.length,s),e}function Qq(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(Pi(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(Kq,d,a?d:p)(m):m===91?e.attempt(Gq,d,a?c:p)(m):a?d(m):p(m)}function c(m){return e.attempt(Yq,d,p)(m)}function d(m){return t(m)}function p(m){return o._balanced=!0,n(m)}}function eU(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 mn(p)?Zl(e,o)(p):o(p)}function o(p){return p===41?d(p):N1(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return mn(p)?Zl(e,l)(p):d(p)}function s(p){return n(p)}function l(p){return p===34||p===39||p===40?M1(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function c(p){return mn(p)?Zl(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 tU(e,t,n){const r=this;return i;function i(s){return D1.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Pi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function nU(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 rU={name:"labelStartImage",tokenize:iU,resolveAll:xg.resolveAll};function iU(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 oU={name:"labelStartLink",tokenize:aU,resolveAll:xg.resolveAll};function aU(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 Sg={name:"lineEnding",tokenize:sU};function sU(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qt(e,t,"linePrefix")}}const rd={name:"thematicBreak",tokenize:uU};function uU(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"),zt(c)?Qt(e,s,"whitespace")(c):s(c))}}const Br={name:"list",tokenize:fU,continuation:{tokenize:dU},exit:hU},lU={tokenize:mU,partial:!0},cU={tokenize:pU,partial:!0};function fU(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:bg(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(rd,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 bg(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(zl,r.interrupt?n:d,e.attempt(lU,m,p))}function d(h){return r.containerState.initialBlankLine=!0,o++,m(h)}function p(h){return zt(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 dU(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(zl,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qt(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!zt(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(cU,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qt(e,e.attempt(Br,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function pU(e,t,n){const r=this;return Qt(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 hU(e){e.exit(this.containerState.type)}function mU(e,t,n){const r=this;return Qt(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!zt(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const L1={name:"setextUnderline",tokenize:gU,resolveTo:yU};function yU(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 gU(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"),zt(c)?Qt(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||ht(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const vU={tokenize:bU};function bU(e){const t=this,n=e.attempt(zl,r,e.attempt(this.parser.constructs.flowInitial,i,Qt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Eq,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 _U={resolveAll:q1()},wU=F1("string"),xU=F1("text");function F1(e){return{tokenize:t,resolveAll:q1(e==="text"?SU: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 q1(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 SU(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 EU(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=bi(a,H),w(),a[a.length-1]!==null?[]:(q(t,0),c.events=nd(o,c.events,c),c.events)}function m(H,re){return CU(h(H),re)}function h(H){return AU(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){q(H,re.from)}function T(H,re){re.restore()}function j(H,re){return Q;function Q(G,V,F){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?F:D(Me[ne])}function D(Me){return Je;function Je(rt){return P=L(),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,De,qe)(rt)}}function De(Me){return H(ce,P),V}function qe(Me){return P.restore(),++ne<Y.length?D(Y[ne]):F}}}function q(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 L(){const H=y(),re=c.previous,Q=c.currentConstruct,G=c.events.length,V=Array.from(s);return{restore:F,from:G};function F(){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 AU(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 CU(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=`
|
|
29
29
|
`;break}case-3:{a=`\r
|
|
30
|
-
`;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 OU=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:$q},disable:{null:[]},document:{42:Br,43:Br,45:Br,48:Br,49:Br,50:Br,51:Br,52:Br,53:Br,54:Br,55:Br,56:Br,57:Br,62:T1},flow:{35:Dq,42:rd,45:[L1,rd],60:Fq,61:L1,95:rd,96:P1,126:P1},flowInitial:{[-2]:wg,[-1]:wg,32:wg},insideSpan:{null:[_g,_U]},string:{38:k1,92:$1},text:{[-5]:Sg,[-4]:Sg,[-3]:Sg,33:rU,38:k1,42:_g,60:[aq,Wq],91:oU,92:[Rq,$1],93:xg,95:_g,96:bq}},Symbol.toStringTag,{value:"Module"}));function TU(e){const n=E1([OU,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(Q3),document:i(tq),flow:i(vU),string:i(wU),text:i(xU)};return r;function i(o){return a;function a(s){return EU(r,o,s)}}}function $U(e){for(;!R1(e););return e}const U1=/[\0\t\n\r]/g;function kU(){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(U1.lastIndex=p,c=U1.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 IU=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function PU(e){return e.replace(IU,RU)}function RU(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return A1(n.slice(o?2:1),o?16:10)}return vg(n)||e}const B1={}.hasOwnProperty;function NU(e,t,n){return typeof t!="string"&&(n=t,t=void 0),DU(n)($U(TU(n).document().write(kU()(e,t,!0))))}function DU(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Te),autolinkProtocol:L,autolinkEmail:L,atxHeading:o(Ze),blockQuote:o(Ke),characterEscape:L,characterReference:L,codeFenced:o(Pe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Pe,a),codeText:o(Ae,a),codeTextData:L,data:L,codeFlowValue:L,definition:o(Fe),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o($e),hardBreakEscape:o(lt),hardBreakTrailing:o(lt),htmlFlow:o(K,a),htmlFlowData:L,htmlText:o(K,a),htmlTextData:L,image:o(de),label:a,link:o(Te),listItem:o(et),listItemValue:m,listOrdered:o(Se,p),listUnordered:o(Se),paragraph:o(Ue),reference:D,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(F),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:De,resourceDestinationString:P,resourceTitleString:ue,resource:Oe,setextHeading:l(q),setextHeadingLineSequence:j,setextHeadingText:T,strong:l(),thematicBreak:l()}};z1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ie){let ye={type:"root",children:[]};const xe={stack:[ye],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]];B1.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]||Z1).call(xe,void 0,pn[0])}for(ye.position={start:da(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:da(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},ct=-1;++ct<t.transforms.length;)ye=t.transforms[ct](ye)||ye;return ye}function i(ie,ye,xe){let Be=ye-1,ct=-1,pn=!1,rn,Yt,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(Yt=void 0;ae--;){const ft=ie[ae];if(ft[1].type==="lineEnding"||ft[1].type==="lineEndingBlank"){if(ft[0]==="exit")continue;Yt&&(ie[Yt][1].type="lineEndingBlank",pn=!0),ft[1].type="lineEnding",Yt=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&&(!Yt||cn<Yt)&&(rn._spread=!0),rn.end=Object.assign({},Yt?ie[Yt][1].start:ee[1].end),ie.splice(Yt||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[ye][1]._spread=pn,xe}function o(ie,ye){return xe;function xe(Be){s.call(this,ie(Be),Be),ye&&ye.call(this,Be)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(ie,ye,xe){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([ye,xe]),ie.position={start:da(ye.start),end:void 0}}function l(ie){return ye;function ye(xe){ie&&ie.call(this,xe),c.call(this,xe)}}function c(ie,ye){const xe=this.stack.pop(),Be=this.tokenStack.pop();if(Be)Be[0].type!==ie.type&&(ye?ye.call(this,ie,Be[0]):(Be[1]||Z1).call(this,ie,Be[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Ul({start:ie.start,end:ie.end})+"): it’s not open");xe.position.end=da(ie.end)}function d(){return gg(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(ie){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function h(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=ie}function y(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=ie}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ie.replace(/(\r?\n|\r)$/g,"")}function b(ie){const ye=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ye,xe.identifier=Pi(this.sliceSerialize(ie)).toLowerCase()}function S(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ie}function A(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ie}function E(ie){const ye=this.stack[this.stack.length-1];if(!ye.depth){const xe=this.sliceSerialize(ie).length;ye.depth=xe}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function j(ie){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function L(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:da(ie.start),end:void 0},xe.push(Be)),this.stack.push(Be)}function M(ie){const ye=this.stack.pop();ye.value+=this.sliceSerialize(ie),ye.position.end=da(ie.end)}function H(ie){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ye.children[ye.children.length-1];xe.position.end=da(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ye.type)&&(L.call(this,ie),M.call(this,ie))}function re(){this.data.atHardBreak=!0}function Q(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ie}function G(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ie}function V(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ie}function F(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=ye,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 ye=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=ye,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function ne(ie){const ye=this.sliceSerialize(ie),xe=this.stack[this.stack.length-2];xe.label=PU(ye),xe.identifier=Pi(ye).toLowerCase()}function ce(){const ie=this.stack[this.stack.length-1],ye=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=ye}function P(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ie}function ue(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ie}function Oe(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function De(ie){const ye=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ye,xe.identifier=Pi(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function qe(ie){this.data.characterReferenceType=ie.type}function Me(ie){const ye=this.sliceSerialize(ie),xe=this.data.characterReferenceType;let Be;xe?(Be=A1(ye,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Be=vg(ye);const ct=this.stack.pop();ct.value+=Be,ct.position.end=da(ie.end)}function Je(ie){M.call(this,ie);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(ie)}function rt(ie){M.call(this,ie);const ye=this.stack[this.stack.length-1];ye.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 de(){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 da(e){return{line:e.line,column:e.column,offset:e.offset}}function z1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?z1(e,r):MU(e,r)}}function MU(e,t){let n;for(n in t)if(B1.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 Z1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ul({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ul({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ul({start:t.start,end:t.end})+") is still open")}function jU(e){const t=this;t.parser=n;function n(r){return NU(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function LU(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 FU(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
30
|
+
`;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 OU=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:$q},disable:{null:[]},document:{42:Br,43:Br,45:Br,48:Br,49:Br,50:Br,51:Br,52:Br,53:Br,54:Br,55:Br,56:Br,57:Br,62:T1},flow:{35:Dq,42:rd,45:[L1,rd],60:Fq,61:L1,95:rd,96:P1,126:P1},flowInitial:{[-2]:wg,[-1]:wg,32:wg},insideSpan:{null:[_g,_U]},string:{38:k1,92:$1},text:{[-5]:Sg,[-4]:Sg,[-3]:Sg,33:rU,38:k1,42:_g,60:[aq,Wq],91:oU,92:[Rq,$1],93:xg,95:_g,96:bq}},Symbol.toStringTag,{value:"Module"}));function TU(e){const n=E1([OU,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(Q3),document:i(tq),flow:i(vU),string:i(wU),text:i(xU)};return r;function i(o){return a;function a(s){return EU(r,o,s)}}}function $U(e){for(;!R1(e););return e}const U1=/[\0\t\n\r]/g;function kU(){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(U1.lastIndex=p,c=U1.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 IU=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function PU(e){return e.replace(IU,RU)}function RU(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return A1(n.slice(o?2:1),o?16:10)}return vg(n)||e}const B1={}.hasOwnProperty;function NU(e,t,n){return typeof t!="string"&&(n=t,t=void 0),DU(n)($U(TU(n).document().write(kU()(e,t,!0))))}function DU(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Te),autolinkProtocol:L,autolinkEmail:L,atxHeading:o(Ze),blockQuote:o(Ke),characterEscape:L,characterReference:L,codeFenced:o(Pe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Pe,a),codeText:o(Ae,a),codeTextData:L,data:L,codeFlowValue:L,definition:o(Fe),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o($e),hardBreakEscape:o(lt),hardBreakTrailing:o(lt),htmlFlow:o(K,a),htmlFlowData:L,htmlText:o(K,a),htmlTextData:L,image:o(de),label:a,link:o(Te),listItem:o(et),listItemValue:m,listOrdered:o(Se,p),listUnordered:o(Se),paragraph:o(Ue),reference:D,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(F),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:De,resourceDestinationString:P,resourceTitleString:ue,resource:Oe,setextHeading:l(q),setextHeadingLineSequence:j,setextHeadingText:T,strong:l(),thematicBreak:l()}};z1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ie){let ye={type:"root",children:[]};const xe={stack:[ye],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]];B1.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]||Z1).call(xe,void 0,pn[0])}for(ye.position={start:pa(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:pa(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},ct=-1;++ct<t.transforms.length;)ye=t.transforms[ct](ye)||ye;return ye}function i(ie,ye,xe){let Be=ye-1,ct=-1,pn=!1,rn,Yt,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(Yt=void 0;ae--;){const ft=ie[ae];if(ft[1].type==="lineEnding"||ft[1].type==="lineEndingBlank"){if(ft[0]==="exit")continue;Yt&&(ie[Yt][1].type="lineEndingBlank",pn=!0),ft[1].type="lineEnding",Yt=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&&(!Yt||cn<Yt)&&(rn._spread=!0),rn.end=Object.assign({},Yt?ie[Yt][1].start:ee[1].end),ie.splice(Yt||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[ye][1]._spread=pn,xe}function o(ie,ye){return xe;function xe(Be){s.call(this,ie(Be),Be),ye&&ye.call(this,Be)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(ie,ye,xe){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([ye,xe]),ie.position={start:pa(ye.start),end:void 0}}function l(ie){return ye;function ye(xe){ie&&ie.call(this,xe),c.call(this,xe)}}function c(ie,ye){const xe=this.stack.pop(),Be=this.tokenStack.pop();if(Be)Be[0].type!==ie.type&&(ye?ye.call(this,ie,Be[0]):(Be[1]||Z1).call(this,ie,Be[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Ul({start:ie.start,end:ie.end})+"): it’s not open");xe.position.end=pa(ie.end)}function d(){return gg(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(ie){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function h(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=ie}function y(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=ie}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ie.replace(/(\r?\n|\r)$/g,"")}function b(ie){const ye=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ye,xe.identifier=Pi(this.sliceSerialize(ie)).toLowerCase()}function S(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ie}function A(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ie}function E(ie){const ye=this.stack[this.stack.length-1];if(!ye.depth){const xe=this.sliceSerialize(ie).length;ye.depth=xe}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function j(ie){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function L(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:pa(ie.start),end:void 0},xe.push(Be)),this.stack.push(Be)}function M(ie){const ye=this.stack.pop();ye.value+=this.sliceSerialize(ie),ye.position.end=pa(ie.end)}function H(ie){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ye.children[ye.children.length-1];xe.position.end=pa(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ye.type)&&(L.call(this,ie),M.call(this,ie))}function re(){this.data.atHardBreak=!0}function Q(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ie}function G(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ie}function V(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ie}function F(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=ye,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 ye=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=ye,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function ne(ie){const ye=this.sliceSerialize(ie),xe=this.stack[this.stack.length-2];xe.label=PU(ye),xe.identifier=Pi(ye).toLowerCase()}function ce(){const ie=this.stack[this.stack.length-1],ye=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=ye}function P(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ie}function ue(){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ie}function Oe(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function De(ie){const ye=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ye,xe.identifier=Pi(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function qe(ie){this.data.characterReferenceType=ie.type}function Me(ie){const ye=this.sliceSerialize(ie),xe=this.data.characterReferenceType;let Be;xe?(Be=A1(ye,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Be=vg(ye);const ct=this.stack.pop();ct.value+=Be,ct.position.end=pa(ie.end)}function Je(ie){M.call(this,ie);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(ie)}function rt(ie){M.call(this,ie);const ye=this.stack[this.stack.length-1];ye.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 de(){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 pa(e){return{line:e.line,column:e.column,offset:e.offset}}function z1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?z1(e,r):MU(e,r)}}function MU(e,t){let n;for(n in t)if(B1.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 Z1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ul({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ul({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ul({start:t.start,end:t.end})+") is still open")}function jU(e){const t=this;t.parser=n;function n(r){return NU(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function LU(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 FU(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
31
31
|
`}]}function qU(e,t){const n=t.value?t.value+`
|
|
32
32
|
`:"",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 UU(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BU(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zU(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=tu(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 ZU(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 HU(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function H1(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 WU(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return H1(e,t);const i={src:tu(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 VU(e,t){const n={src:tu(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 KU(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 GU(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return H1(e,t);const i={href:tu(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 YU(e,t){const n={href:tu(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 JU(e,t,n){const r=e.all(t),i=n?XU(n):W1(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:`
|
|
33
33
|
`}),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:`
|
|
@@ -51,16 +51,16 @@ Check the top-level render call using <`+ze+">.")}return Ce}}function We(Z,Ce){{
|
|
|
51
51
|
`))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
52
52
|
`,...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}$S.peek=rz;function $S(e){return e.value||""}function rz(){return"<"}kS.peek=iz;function kS(e,t,n,r){const i=Zg(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 iz(){return"!"}IS.peek=oz;function IS(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 oz(){return"!"}PS.peek=az;function PS(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 az(){return"`"}function RS(e,t){const n=gg(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))}NS.peek=sz;function NS(e,t,n,r){const i=Zg(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(RS(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 sz(e,t,n){return RS(e,n)?"<":"["}DS.peek=uz;function DS(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 uz(){return"["}function Hg(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 lz(e){const t=Hg(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 cz(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 MS(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 fz(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?cz(n):Hg(n);const s=e.ordered?a==="."?")":".":lz(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),MS(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 dz(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 pz(e,t,n,r){const i=dz(n);let o=n.bulletCurrent||Hg(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 hz(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const mz=cd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function yz(e,t,n,r){return(e.children.some(function(a){return mz(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function gz(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}jS.peek=vz;function jS(e,t,n,r){const i=gz(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 vz(e,t,n){return n.options.strong||"*"}function bz(e,t,n,r){return n.safe(e.value,r)}function _z(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 wz(e,t,n){const r=(MS(n)+(n.options.ruleSpaces?" ":"")).repeat(_z(n));return n.options.ruleSpaces?r.slice(0,-1):r}const LS={blockquote:Z5,break:OS,code:Y5,definition:X5,emphasis:TS,hardBreak:OS,heading:nz,html:$S,image:kS,imageReference:IS,inlineCode:PS,link:NS,linkReference:DS,list:fz,listItem:pz,paragraph:hz,root:yz,strong:jS,text:bz,thematicBreak:wz};function xz(){return{enter:{table:Sz,tableData:FS,tableHeader:FS,tableRow:Az},exit:{codeText:Cz,table:Ez,tableData:Wg,tableHeader:Wg,tableRow:Wg}}}function Sz(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 Ez(e){this.exit(e),this.data.inTable=void 0}function Az(e){this.enter({type:"tableRow",children:[]},e)}function Wg(e){this.exit(e)}function FS(e){this.enter({type:"tableCell",children:[]},e)}function Cz(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Oz));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Oz(e,t){return t==="|"?t:e}function Tz(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
53
53
|
`,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(`
|
|
54
|
-
`))}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 U5(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=LS.inlineCode(h,y,v);return v.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function $z(){return{exit:{taskListCheckValueChecked:qS,taskListCheckValueUnchecked:qS,paragraph:Iz}}}function kz(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Pz}}}function qS(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Iz(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 Pz(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=LS.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 Rz(){return[c5(),x5(),M5(),xz(),$z()]}function Nz(e){return{extensions:[f5(),S5(),j5(),Tz(e),kz()]}}const Dz={tokenize:Uz,partial:!0},US={tokenize:Bz,partial:!0},BS={tokenize:zz,partial:!0},zS={tokenize:Zz,partial:!0},Mz={tokenize:Hz,partial:!0},ZS={tokenize:Fz,previous:WS},HS={tokenize:qz,previous:VS},To={tokenize:Lz,previous:KS},Xi={};function jz(){return{text:Xi}}let os=48;for(;os<123;)Xi[os]=To,os++,os===58?os=65:os===91&&(os=97);Xi[43]=To,Xi[45]=To,Xi[46]=To,Xi[95]=To,Xi[72]=[To,HS],Xi[104]=[To,HS],Xi[87]=[To,ZS],Xi[119]=[To,ZS];function Lz(e,t,n){const r=this;let i,o;return a;function a(p){return!Vg(p)||!KS.call(r,r.previous)||Kg(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(p))}function s(p){return Vg(p)?(e.consume(p),s):p===64?(e.consume(p),l):n(p)}function l(p){return p===46?e.check(Mz,d,c)(p):p===45||p===95||br(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&&Rr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function Fz(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!WS.call(r,r.previous)||Kg(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Dz,e.attempt(US,e.attempt(BS,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function qz(e,t,n){const r=this;let i="",o=!1;return a;function a(p){return(p===72||p===104)&&VS.call(r,r.previous)&&!Kg(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),s):n(p)}function s(p){if(Rr(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||Qf(p)||mn(p)||is(p)||ed(p)?n(p):e.attempt(US,e.attempt(BS,d),n)(p)}function d(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function Uz(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 Bz(e,t,n){let r,i,o;return a;function a(c){return c===46||c===95?e.check(zS,l,s)(c):c===null||mn(c)||is(c)||c!==45&&ed(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 zz(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(zS,t,o)(a):a===null||mn(a)||is(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function Zz(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||mn(s)||is(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||mn(s)||is(s)?t(s):r(s)}function o(s){return Rr(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):Rr(s)?(e.consume(s),a):n(s)}}function Hz(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return br(o)?n(o):t(o)}}function WS(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mn(e)}function VS(e){return!Rr(e)}function KS(e){return!(e===47||Vg(e))}function Vg(e){return e===43||e===45||e===46||e===95||br(e)}function Kg(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 Wz={tokenize:e4,partial:!0};function Vz(){return{document:{91:{tokenize:Jz,continuation:{tokenize:Xz},exit:Qz}},text:{91:{tokenize:Yz},93:{add:"after",tokenize:Kz,resolveTo:Gz}}}}function Kz(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=Pi(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 Gz(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 Yz(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||mn(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(Pi(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return mn(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 Jz(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||mn(y))return n(y);if(y===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=Pi(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return mn(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),Qt(e,h,"gfmFootnoteDefinitionWhitespace")):n(y)}function h(y){return t(y)}}function Xz(e,t,n){return e.check(zl,t,e.attempt(Wz,t,n))}function Qz(e){e.exit("gfmFootnoteDefinition")}function e4(e,t,n){const r=this;return Qt(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 t4(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,nd(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=td(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"),_=td(y);return w._open=!_||_===2&&!!v,w._close=!v||v===2&&!!_,s(y)}}}class n4{constructor(){this.map=[]}add(t,n,r){r4(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 r4(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 i4(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 o4(){return{flow:{null:{tokenize:a4,resolveAll:s4}}}}function a4(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):zt(M)?Qt(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||mn(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,zt(M)?Qt(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 zt(M)?Qt(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 zt(M)?Qt(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)):zt(M)?Qt(e,j,"whitespace")(M):(e.enter("data"),q(M))}function q(M){return M===null||M===124||mn(M)?(e.exit("data"),j(M)):(e.consume(M),M===92?L:q)}function L(M){return M===92||M===124?(e.consume(M),q):q(M)}}function s4(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 n4;for(;++n<e.length;){const h=e[n],y=h[1];h[0]==="enter"?y.type==="tableHead"?(s=!1,l!==0&&(GS(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=hd(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=hd(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=hd(m,t,o,i,n,p)):a[1]!==0&&(p=hd(m,t,a,i,n,p)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&GS(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=i4(t.events,n))}return e}function hd(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},ru(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=ru(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=ru(t.events,n[2]),d=ru(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({},ru(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function GS(e,t,n,r,i){const o=[],a=ru(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 ru(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const u4={tokenize:c4};function l4(){return{text:{91:u4}}}function c4(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 mn(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):zt(l)?e.check({tokenize:f4},t,n)(l):n(l)}}function f4(e,t,n){return Qt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function d4(e){return E1([jz(),Vz(),t4(e),o4(),l4()])}const p4={};function h4(e){const t=this,n=e||p4,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(d4(n)),o.push(Rz()),a.push(Nz(n))}const m4=({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(t5,{components:i,remarkPlugins:[h4,l5],children:e})},y4=(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 YS={},Gg={},JS={};Object.defineProperty(JS,"__esModule",{value:!0});var md={},g4=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(md,"__esModule",{value:!0}),md.Emitter=void 0;let v4=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 g4(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})}};md.Emitter=v4;var XS={};Object.defineProperty(XS,"__esModule",{value:!0});var QS={};(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={}))})(QS);var eE={};Object.defineProperty(eE,"__esModule",{value:!0});var tE={};Object.defineProperty(tE,"__esModule",{value:!0});var nE={};Object.defineProperty(nE,"__esModule",{value:!0});var rE={};Object.defineProperty(rE,"__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(JS,e),n(md,e),n(XS,e),n(QS,e),n(eE,e),n(tE,e),n(nE,e),n(rE,e)}(Gg);var yd={},iE={},Yg={exports:{}},gd={},Jg={},vd={},Vl={},iu={},as={},ou={},au={},Qi={};Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.ERROR_PACKET=Qi.PACKET_TYPES_REVERSE=Qi.PACKET_TYPES=void 0;const eo=Object.create(null);Qi.PACKET_TYPES=eo,eo.open="0",eo.close="1",eo.ping="2",eo.pong="3",eo.message="4",eo.upgrade="5",eo.noop="6";const oE=Object.create(null);Qi.PACKET_TYPES_REVERSE=oE,Object.keys(eo).forEach(e=>{oE[eo[e]]=e});const b4={type:"error",data:"parser error"};Qi.ERROR_PACKET=b4,Object.defineProperty(au,"__esModule",{value:!0}),au.encodePacket=au.encodePacketToBinary=void 0;const _4=Qi,aE=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",sE=typeof ArrayBuffer=="function",uE=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,lE=({type:e,data:t},n,r)=>aE&&t instanceof Blob?n?r(t):cE(t,r):sE&&(t instanceof ArrayBuffer||uE(t))?n?r(t):cE(new Blob([t]),r):r(_4.PACKET_TYPES[e]+(t||""));au.encodePacket=lE;const cE=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function fE(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Xg;function w4(e,t){if(aE&&e.data instanceof Blob)return e.data.arrayBuffer().then(fE).then(t);if(sE&&(e.data instanceof ArrayBuffer||uE(e.data)))return t(fE(e.data));lE(e,!1,n=>{Xg||(Xg=new TextEncoder),t(Xg.encode(n))})}au.encodePacketToBinary=w4;var bd={},su={};Object.defineProperty(su,"__esModule",{value:!0}),su.decode=su.encode=void 0;const uu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<uu.length;e++)Kl[uu.charCodeAt(e)]=e;const x4=e=>{let t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=uu[t[n]>>2],i+=uu[(t[n]&3)<<4|t[n+1]>>4],i+=uu[(t[n+1]&15)<<2|t[n+2]>>6],i+=uu[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};su.encode=x4;const S4=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=Kl[e.charCodeAt(r)],a=Kl[e.charCodeAt(r+1)],s=Kl[e.charCodeAt(r+2)],l=Kl[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};su.decode=S4,Object.defineProperty(bd,"__esModule",{value:!0}),bd.decodePacket=void 0;const _d=Qi,E4=su,A4=typeof ArrayBuffer=="function",C4=(e,t)=>{if(typeof e!="string")return{type:"message",data:dE(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:O4(e.substring(1),t)}:_d.PACKET_TYPES_REVERSE[n]?e.length>1?{type:_d.PACKET_TYPES_REVERSE[n],data:e.substring(1)}:{type:_d.PACKET_TYPES_REVERSE[n]}:_d.ERROR_PACKET};bd.decodePacket=C4;const O4=(e,t)=>{if(A4){const n=(0,E4.decode)(e);return dE(n,t)}else return{base64:!0,data:e}},dE=(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=au;Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const n=bd;Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return n.decodePacket}});const r=Qi,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})(ou);function Nr(e){if(e)return T4(e)}function T4(e){for(var t in Nr.prototype)e[t]=Nr.prototype[t];return e}Nr.prototype.on=Nr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Nr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Nr.prototype.off=Nr.prototype.removeListener=Nr.prototype.removeAllListeners=Nr.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},Nr.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},Nr.prototype.emitReserved=Nr.prototype.emit,Nr.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Nr.prototype.hasListeners=function(e){return!!this.listeners(e).length};const lu=Jf(Object.freeze(Object.defineProperty({__proto__:null,Emitter:Nr},Symbol.toStringTag,{value:"Module"})));var _i={},ss={};Object.defineProperty(ss,"__esModule",{value:!0}),ss.globalThisShim=void 0,ss.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),Object.defineProperty(_i,"__esModule",{value:!0}),_i.byteLength=_i.installTimerFunctions=_i.pick=void 0;const pa=ss;function $4(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}_i.pick=$4;const k4=pa.globalThisShim.setTimeout,I4=pa.globalThisShim.clearTimeout;function P4(e,t){t.useNativeTimers?(e.setTimeoutFn=k4.bind(pa.globalThisShim),e.clearTimeoutFn=I4.bind(pa.globalThisShim)):(e.setTimeoutFn=pa.globalThisShim.setTimeout.bind(pa.globalThisShim),e.clearTimeoutFn=pa.globalThisShim.clearTimeout.bind(pa.globalThisShim))}_i.installTimerFunctions=P4;const R4=1.33;function N4(e){return typeof e=="string"?D4(e):Math.ceil((e.byteLength||e.size)*R4)}_i.byteLength=N4;function D4(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 Qg={exports:{}},ev,pE;function M4(){if(pE)return ev;pE=1;var e=1e3,t=e*60,n=t*60,r=n*24,i=r*7,o=r*365.25;ev=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 ev}function j4(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=i,n.enabled=a,n.humanize=M4(),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 q=n.formatters[j];if(typeof q=="function"){const L=w[A];T=q.call(_,L),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 L4=j4;(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=L4(t);const{formatters:s}=e.exports;s.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(Qg,Qg.exports);var to=Qg.exports,us={};Object.defineProperty(us,"__esModule",{value:!0}),us.decode=us.encode=void 0;function F4(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}us.encode=F4;function q4(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}us.decode=q4;var U4=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(as,"__esModule",{value:!0}),as.Transport=void 0;const B4=ou,z4=lu,Z4=_i,H4=U4(to),W4=us,V4=(0,H4.default)("engine.io-client:transport");class K4 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class G4 extends z4.Emitter{constructor(t){super(),this.writable=!1,(0,Z4.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new K4(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):V4("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=(0,B4.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,W4.encode)(t);return n.length?"?"+n:""}}as.Transport=G4;var $o={};Object.defineProperty($o,"__esModule",{value:!0}),$o.yeast=$o.decode=$o.encode=void 0;const hE="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),wd=64,mE={};let yE=0,ha=0,gE;function tv(e){let t="";do t=hE[e%wd]+t,e=Math.floor(e/wd);while(e>0);return t}$o.encode=tv;function Y4(e){let t=0;for(ha=0;ha<e.length;ha++)t=t*wd+mE[e.charAt(ha)];return t}$o.decode=Y4;function J4(){const e=tv(+new Date);return e!==gE?(yE=0,gE=e):e+"."+tv(yE++)}for($o.yeast=J4;ha<wd;ha++)mE[hE[ha]]=ha;var cu={},xd={};Object.defineProperty(xd,"__esModule",{value:!0}),xd.hasCORS=void 0;let vE=!1;try{vE=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}xd.hasCORS=vE,Object.defineProperty(cu,"__esModule",{value:!0}),cu.createCookieJar=cu.XHR=void 0;const X4=xd,Q4=ss;function e6(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||X4.hasCORS))return new XMLHttpRequest}catch{}if(!t)try{return new Q4.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}cu.XHR=e6;function t6(){}cu.createCookieJar=t6;var n6=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(iu,"__esModule",{value:!0}),iu.Request=iu.Polling=void 0;const r6=as,i6=n6(to),o6=$o,bE=ou,nv=cu,a6=lu,_E=_i,s6=ss,zr=(0,i6.default)("engine.io-client:polling");function u6(){}const l6=function(){return new nv.XHR({xdomain:!1}).responseType!=null}();class c6 extends r6.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=l6&&!n,this.opts.withCredentials&&(this.cookieJar=(0,nv.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{zr("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(zr("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){zr("pre-pause polling complete"),--r||n()})),this.writable||(zr("we are currently writing - waiting to pause"),r++,this.once("drain",function(){zr("pre-pause writing complete"),--r||n()}))}else n()}poll(){zr("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){zr("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,bE.decodePayload)(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():zr('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{zr("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(zr("transport open - closing"),t()):(zr("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,bE.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,o6.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 Ri(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(){zr("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}}iu.Polling=c6;class Ri extends a6.Emitter{constructor(t,n){super(),(0,_E.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,_E.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new nv.XHR(n);try{zr("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))},zr("xhr data %s",this.data),r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Ri.requestsCount++,Ri.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=u6,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ri.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(iu.Request=Ri,Ri.requestsCount=0,Ri.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",wE);else if(typeof addEventListener=="function"){const e="onpagehide"in s6.globalThisShim?"pagehide":"unload";addEventListener(e,wE,!1)}}function wE(){for(let e in Ri.requests)Ri.requests.hasOwnProperty(e)&&Ri.requests[e].abort()}var Sd={},si={};Object.defineProperty(si,"__esModule",{value:!0}),si.defaultBinaryType=si.usingBrowserWebSocket=si.WebSocket=si.nextTick=void 0;const xE=ss;si.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),si.WebSocket=xE.globalThisShim.WebSocket||xE.globalThisShim.MozWebSocket,si.usingBrowserWebSocket=!0,si.defaultBinaryType="arraybuffer";var f6=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.WS=void 0;const d6=as,p6=$o,h6=_i,ma=si,m6=f6(to),y6=ou,g6=(0,m6.default)("engine.io-client:websocket"),SE=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class v6 extends d6.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=SE?{}:(0,h6.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=ma.usingBrowserWebSocket&&!SE?n?new ma.WebSocket(t,n):new ma.WebSocket(t):new ma.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,y6.encodePacket)(r,this.supportsBinary,o=>{const a={};ma.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{ma.usingBrowserWebSocket?this.ws.send(o):this.ws.send(o,a)}catch{g6("websocket closed before onclose event")}i&&(0,ma.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,p6.yeast)()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!ma.WebSocket}}Sd.WS=v6;var Ed={},b6=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.WT=void 0;const _6=as,w6=si,EE=ou,Gl=(0,b6(to).default)("engine.io-client:webtransport");class x6 extends _6.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(()=>{Gl("transport closed gracefully"),this.onClose()}).catch(t=>{Gl("transport closed due to %s",t),this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=(0,EE.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=(0,EE.createPacketEncoderStream)();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:s,value:l})=>{if(s){Gl("session is closed");return}Gl("received chunk: %o",l),this.onPacket(l),o()}).catch(s=>{Gl("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,w6.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}Ed.WT=x6,Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.transports=void 0;const S6=iu,E6=Sd,A6=Ed;Vl.transports={websocket:E6.WS,webtransport:A6.WT,polling:S6.Polling};var Yl={};Object.defineProperty(Yl,"__esModule",{value:!0}),Yl.parse=void 0;const C6=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,O6=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function T6(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=C6.exec(e||""),o={},a=14;for(;a--;)o[O6[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=$6(o,o.path),o.queryKey=k6(o,o.query),o}Yl.parse=T6;function $6(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 k6(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}var I6=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vd,"__esModule",{value:!0}),vd.Socket=void 0;const P6=Vl,AE=_i,R6=us,CE=Yl,N6=I6(to),D6=lu,OE=ou,M6=si,In=(0,N6.default)("engine.io-client:socket");let TE=class jl extends D6.Emitter{constructor(t,n={}){super(),this.binaryType=M6.defaultBinaryType,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=(0,CE.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,CE.parse)(n.host).host),(0,AE.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,R6.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=OE.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 P6.transports[t](r)}open(){let t;if(this.opts.rememberUpgrade&&jl.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;jl.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;jl.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",jl.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,AE.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),jl.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}};vd.Socket=TE,TE.protocol=OE.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=vd;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var n=as;Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var r=Vl;Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var i=_i;Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return i.installTimerFunctions}});var o=Yl;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}})}(Jg);var j6=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gd,"__esModule",{value:!0}),gd.url=void 0;const L6=Jg,$E=j6(to).default("socket.io-client:url");function F6(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)||($E("protocol-less url %s",e),typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),$E("parse %s",e),r=L6.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}gd.url=F6;var Ad={},Jl={},Cd={},fu={},ls={};Object.defineProperty(ls,"__esModule",{value:!0}),ls.hasBinary=ls.isBinary=void 0;const q6=typeof ArrayBuffer=="function",U6=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,kE=Object.prototype.toString,B6=typeof Blob=="function"||typeof Blob<"u"&&kE.call(Blob)==="[object BlobConstructor]",z6=typeof File=="function"||typeof File<"u"&&kE.call(File)==="[object FileConstructor]";function IE(e){return q6&&(e instanceof ArrayBuffer||U6(e))||B6&&e instanceof Blob||z6&&e instanceof File}ls.isBinary=IE;function Od(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Od(e[n]))return!0;return!1}if(IE(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Od(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Od(e[n]))return!0;return!1}ls.hasBinary=Od,Object.defineProperty(fu,"__esModule",{value:!0}),fu.reconstructPacket=fu.deconstructPacket=void 0;const Z6=ls;function H6(e){const t=[],n=e.data,r=e;return r.data=rv(n,t),r.attachments=t.length,{packet:r,buffers:t}}fu.deconstructPacket=H6;function rv(e,t){if(!e)return e;if((0,Z6.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]=rv(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]=rv(e[r],t));return n}return e}function W6(e,t){return e.data=iv(e.data,t),delete e.attachments,e}fu.reconstructPacket=W6;function iv(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]=iv(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=iv(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=lu,n=fu,r=ls,o=(0,to.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=[]}}})(Cd);var Xl={};Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.on=void 0;function V6(e,t,n){return e.on(t,n),function(){e.off(t,n)}}Xl.on=V6;var K6=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.Socket=void 0;const Ni=Cd,Td=Xl,G6=lu,Yn=K6(to).default("socket.io-client:socket"),Y6=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class J6 extends G6.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=[Td.on(t,"open",this.onopen.bind(this)),Td.on(t,"packet",this.onpacket.bind(this)),Td.on(t,"error",this.onerror.bind(this)),Td.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(Y6.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:Ni.PacketType.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++;Yn("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)?Yn("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&&(Yn("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(a,1));Yn("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&&(Yn("packet [%d] is discarded after %d tries",r.id,r.tryCount),this._queue.shift(),n&&n(i)):(Yn("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(Yn("draining queue"),!this.connected||this._queue.length===0)return;const n=this._queue[0];if(n.pending&&!t){Yn("packet [%d] has already been sent and is waiting for an ack",n.id);return}n.pending=!0,n.tryCount++,Yn("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(){Yn("transport is open - connecting"),typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ni.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){Yn("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 Ni.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 Ni.PacketType.EVENT:case Ni.PacketType.BINARY_EVENT:this.onevent(t);break;case Ni.PacketType.ACK:case Ni.PacketType.BINARY_ACK:this.onack(t);break;case Ni.PacketType.DISCONNECT:this.ondisconnect();break;case Ni.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||[];Yn("emitting event %j",n),t.id!=null&&(Yn("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,Yn("sending ack %j",i),n.packet({type:Ni.PacketType.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"?(Yn("calling ack %s with %j",t.id,t.data),n.apply(this,t.data),delete this.acks[t.id]):Yn("bad ack %s",t.id)}onconnect(t,n){Yn("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(){Yn("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&&(Yn("performing disconnect (%s)",this.nsp),this.packet({type:Ni.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)}}}Jl.Socket=J6;var $d={};Object.defineProperty($d,"__esModule",{value:!0}),$d.Backoff=void 0;function du(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}$d.Backoff=du,du.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},du.prototype.reset=function(){this.attempts=0},du.prototype.setMin=function(e){this.ms=e},du.prototype.setMax=function(e){this.max=e},du.prototype.setJitter=function(e){this.jitter=e};var X6=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]}),Q6=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),e7=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)&&X6(t,e,n);return Q6(t,e),t},t7=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.Manager=void 0;const ov=Jg,n7=Jl,r7=e7(Cd),cs=Xl,i7=$d,o7=lu,cr=t7(to).default("socket.io-client:manager");class a7 extends o7.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,ov.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 i7.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||r7;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(cr("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;cr("opening %s",this.uri),this.engine=new ov.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=>{cr("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;cr("connect attempt will timeout after %d",s);const l=this.setTimeoutFn(()=>{cr("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(){cr("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){ov.nextTick(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){cr("error",t),this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new n7.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){cr("socket %s is still active, skipping close",r);return}this._close()}_packet(t){cr("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(){cr("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){cr("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){cr("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)cr("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();cr("will wait %dms before reconnect attempt",n),this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(cr("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(cr("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):(cr("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)}}Ad.Manager=a7,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=gd,i=Ad;Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return i.Manager}});const o=Jl;Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return o.Socket}});const s=n(to).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=Cd;Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return d.protocol}}),e.exports=c}(Yg,Yg.exports);var s7=Yg.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=Gg,i=n(s7);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})(iE);var kd={},u7=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(kd,"__esModule",{value:!0}),kd.SocketEmitter=void 0;class l7{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 u7(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})}}kd.SocketEmitter=l7;var Zr=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(yd,"__esModule",{value:!0}),yd.MessagingSocket=void 0;const PE=iE,c7=kd;class f7 extends c7.SocketEmitter{constructor(t){super(),this.clientId=t.clientId,this.com=new PE.SocketCom(t.url),this.com.events.on(PE.SocketComEvents.Message,n=>Zr(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 Zr(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 Zr(this,void 0,void 0,function*(){this.com.disconnect(),yield this.emit("disconnect",void 0)})}getUser(){return Zr(this,void 0,void 0,function*(){return this.request("users.get",{})})}switchConversation(t){return Zr(this,void 0,void 0,function*(){this._conversationId=t,yield this.emit("conversation",this._conversationId)})}createConversation(t){return Zr(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 Zr(this,void 0,void 0,function*(){yield this.request("conversations.start",{id:t||this._conversationId})})}getConversation(t){return Zr(this,void 0,void 0,function*(){return this.request("conversations.get",{id:t||this._conversationId})})}deleteConversation(t){return Zr(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 Zr(this,void 0,void 0,function*(){return this.request("conversations.list",{limit:t||20})})}sendText(t){return Zr(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:{type:"text",text:t}})})}sendPayload(t){return Zr(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:t})})}listMessages(t){return Zr(this,void 0,void 0,function*(){return this.request("messages.list",{conversationId:this._conversationId,limit:t||20})})}sendFeedback(t,n){return Zr(this,void 0,void 0,function*(){yield this.request("messages.feedback",{messageId:t,feedback:n})})}request(t,n){return this.com.request(t,n)}}yd.MessagingSocket=f7,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(Gg,e),n(yd,e)}(YS);var RE={exports:{}};function d7(){this.__data__=[],this.size=0}var p7=d7;function h7(e,t){return e===t||e!==e&&t!==t}var Ql=h7,m7=Ql;function y7(e,t){for(var n=e.length;n--;)if(m7(e[n][0],t))return n;return-1}var Id=y7,g7=Id,v7=Array.prototype,b7=v7.splice;function _7(e){var t=this.__data__,n=g7(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():b7.call(t,n,1),--this.size,!0}var w7=_7,x7=Id;function S7(e){var t=this.__data__,n=x7(t,e);return n<0?void 0:t[n][1]}var E7=S7,A7=Id;function C7(e){return A7(this.__data__,e)>-1}var O7=C7,T7=Id;function $7(e,t){var n=this.__data__,r=T7(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var k7=$7,I7=p7,P7=w7,R7=E7,N7=O7,D7=k7;function pu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}pu.prototype.clear=I7,pu.prototype.delete=P7,pu.prototype.get=R7,pu.prototype.has=N7,pu.prototype.set=D7;var Pd=pu,M7=Pd;function j7(){this.__data__=new M7,this.size=0}var L7=j7;function F7(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var q7=F7;function U7(e){return this.__data__.get(e)}var B7=U7;function z7(e){return this.__data__.has(e)}var Z7=z7,H7=typeof se=="object"&&se&&se.Object===Object&&se,NE=H7,W7=NE,V7=typeof self=="object"&&self&&self.Object===Object&&self,K7=W7||V7||Function("return this")(),no=K7,G7=no,Y7=G7.Symbol,hu=Y7,DE=hu,ME=Object.prototype,J7=ME.hasOwnProperty,X7=ME.toString,ec=DE?DE.toStringTag:void 0;function Q7(e){var t=J7.call(e,ec),n=e[ec];try{e[ec]=void 0;var r=!0}catch{}var i=X7.call(e);return r&&(t?e[ec]=n:delete e[ec]),i}var e8=Q7,t8=Object.prototype,n8=t8.toString;function r8(e){return n8.call(e)}var i8=r8,jE=hu,o8=e8,a8=i8,s8="[object Null]",u8="[object Undefined]",LE=jE?jE.toStringTag:void 0;function l8(e){return e==null?e===void 0?u8:s8:LE&&LE in Object(e)?o8(e):a8(e)}var fs=l8;function c8(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ro=c8,f8=fs,d8=ro,p8="[object AsyncFunction]",h8="[object Function]",m8="[object GeneratorFunction]",y8="[object Proxy]";function g8(e){if(!d8(e))return!1;var t=f8(e);return t==h8||t==m8||t==p8||t==y8}var av=g8,v8=no,b8=v8["__core-js_shared__"],_8=b8,sv=_8,FE=function(){var e=/[^.]+$/.exec(sv&&sv.keys&&sv.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function w8(e){return!!FE&&FE in e}var x8=w8,S8=Function.prototype,E8=S8.toString;function A8(e){if(e!=null){try{return E8.call(e)}catch{}try{return e+""}catch{}}return""}var qE=A8,C8=av,O8=x8,T8=ro,$8=qE,k8=/[\\^$.*+?()[\]{}|]/g,I8=/^\[object .+?Constructor\]$/,P8=Function.prototype,R8=Object.prototype,N8=P8.toString,D8=R8.hasOwnProperty,M8=RegExp("^"+N8.call(D8).replace(k8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function j8(e){if(!T8(e)||O8(e))return!1;var t=C8(e)?M8:I8;return t.test($8(e))}var L8=j8;function F8(e,t){return e==null?void 0:e[t]}var q8=F8,U8=L8,B8=q8;function z8(e,t){var n=B8(e,t);return U8(n)?n:void 0}var ds=z8,Z8=ds,H8=no,W8=Z8(H8,"Map"),uv=W8,V8=ds,K8=V8(Object,"create"),Rd=K8,UE=Rd;function G8(){this.__data__=UE?UE(null):{},this.size=0}var Y8=G8;function J8(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var X8=J8,Q8=Rd,e9="__lodash_hash_undefined__",t9=Object.prototype,n9=t9.hasOwnProperty;function r9(e){var t=this.__data__;if(Q8){var n=t[e];return n===e9?void 0:n}return n9.call(t,e)?t[e]:void 0}var i9=r9,o9=Rd,a9=Object.prototype,s9=a9.hasOwnProperty;function u9(e){var t=this.__data__;return o9?t[e]!==void 0:s9.call(t,e)}var l9=u9,c9=Rd,f9="__lodash_hash_undefined__";function d9(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=c9&&t===void 0?f9:t,this}var p9=d9,h9=Y8,m9=X8,y9=i9,g9=l9,v9=p9;function mu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}mu.prototype.clear=h9,mu.prototype.delete=m9,mu.prototype.get=y9,mu.prototype.has=g9,mu.prototype.set=v9;var b9=mu,BE=b9,_9=Pd,w9=uv;function x9(){this.size=0,this.__data__={hash:new BE,map:new(w9||_9),string:new BE}}var S9=x9;function E9(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var A9=E9,C9=A9;function O9(e,t){var n=e.__data__;return C9(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Nd=O9,T9=Nd;function $9(e){var t=T9(this,e).delete(e);return this.size-=t?1:0,t}var k9=$9,I9=Nd;function P9(e){return I9(this,e).get(e)}var R9=P9,N9=Nd;function D9(e){return N9(this,e).has(e)}var M9=D9,j9=Nd;function L9(e,t){var n=j9(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var F9=L9,q9=S9,U9=k9,B9=R9,z9=M9,Z9=F9;function yu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yu.prototype.clear=q9,yu.prototype.delete=U9,yu.prototype.get=B9,yu.prototype.has=z9,yu.prototype.set=Z9;var lv=yu,H9=Pd,W9=uv,V9=lv,K9=200;function G9(e,t){var n=this.__data__;if(n instanceof H9){var r=n.__data__;if(!W9||r.length<K9-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new V9(r)}return n.set(e,t),this.size=n.size,this}var Y9=G9,J9=Pd,X9=L7,Q9=q7,eZ=B7,tZ=Z7,nZ=Y9;function gu(e){var t=this.__data__=new J9(e);this.size=t.size}gu.prototype.clear=X9,gu.prototype.delete=Q9,gu.prototype.get=eZ,gu.prototype.has=tZ,gu.prototype.set=nZ;var Dd=gu;function rZ(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var iZ=rZ,oZ=ds,aZ=function(){try{var e=oZ(Object,"defineProperty");return e({},"",{}),e}catch{}}(),zE=aZ,ZE=zE;function sZ(e,t,n){t=="__proto__"&&ZE?ZE(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var cv=sZ,uZ=cv,lZ=Ql,cZ=Object.prototype,fZ=cZ.hasOwnProperty;function dZ(e,t,n){var r=e[t];(!(fZ.call(e,t)&&lZ(r,n))||n===void 0&&!(t in e))&&uZ(e,t,n)}var HE=dZ,pZ=HE,hZ=cv;function mZ(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),i?hZ(n,s,l):pZ(n,s,l)}return n}var vu=mZ;function yZ(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var gZ=yZ;function vZ(e){return e!=null&&typeof e=="object"}var io=vZ,bZ=fs,_Z=io,wZ="[object Arguments]";function xZ(e){return _Z(e)&&bZ(e)==wZ}var SZ=xZ,WE=SZ,EZ=io,VE=Object.prototype,AZ=VE.hasOwnProperty,CZ=VE.propertyIsEnumerable,OZ=WE(function(){return arguments}())?WE:function(e){return EZ(e)&&AZ.call(e,"callee")&&!CZ.call(e,"callee")},tc=OZ,TZ=Array.isArray,Hr=TZ,Md={exports:{}};function $Z(){return!1}var kZ=$Z;Md.exports,function(e,t){var n=no,r=kZ,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||r;e.exports=c}(Md,Md.exports);var nc=Md.exports,IZ=9007199254740991,PZ=/^(?:0|[1-9]\d*)$/;function RZ(e,t){var n=typeof e;return t=t??IZ,!!t&&(n=="number"||n!="symbol"&&PZ.test(e))&&e>-1&&e%1==0&&e<t}var fv=RZ,NZ=9007199254740991;function DZ(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=NZ}var dv=DZ,MZ=fs,jZ=dv,LZ=io,FZ="[object Arguments]",qZ="[object Array]",UZ="[object Boolean]",BZ="[object Date]",zZ="[object Error]",ZZ="[object Function]",HZ="[object Map]",WZ="[object Number]",VZ="[object Object]",KZ="[object RegExp]",GZ="[object Set]",YZ="[object String]",JZ="[object WeakMap]",XZ="[object ArrayBuffer]",QZ="[object DataView]",eH="[object Float32Array]",tH="[object Float64Array]",nH="[object Int8Array]",rH="[object Int16Array]",iH="[object Int32Array]",oH="[object Uint8Array]",aH="[object Uint8ClampedArray]",sH="[object Uint16Array]",uH="[object Uint32Array]",An={};An[eH]=An[tH]=An[nH]=An[rH]=An[iH]=An[oH]=An[aH]=An[sH]=An[uH]=!0,An[FZ]=An[qZ]=An[XZ]=An[UZ]=An[QZ]=An[BZ]=An[zZ]=An[ZZ]=An[HZ]=An[WZ]=An[VZ]=An[KZ]=An[GZ]=An[YZ]=An[JZ]=!1;function lH(e){return LZ(e)&&jZ(e.length)&&!!An[MZ(e)]}var cH=lH;function fH(e){return function(t){return e(t)}}var pv=fH,jd={exports:{}};jd.exports,function(e,t){var n=NE,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s}(jd,jd.exports);var hv=jd.exports,dH=cH,pH=pv,KE=hv,GE=KE&&KE.isTypedArray,hH=GE?pH(GE):dH,Ld=hH,mH=gZ,yH=tc,gH=Hr,vH=nc,bH=fv,_H=Ld,wH=Object.prototype,xH=wH.hasOwnProperty;function SH(e,t){var n=gH(e),r=!n&&yH(e),i=!n&&!r&&vH(e),o=!n&&!r&&!i&&_H(e),a=n||r||i||o,s=a?mH(e.length,String):[],l=s.length;for(var c in e)(t||xH.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||bH(c,l)))&&s.push(c);return s}var YE=SH,EH=Object.prototype;function AH(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||EH;return e===n}var Fd=AH;function CH(e,t){return function(n){return e(t(n))}}var JE=CH,OH=JE,TH=OH(Object.keys,Object),$H=TH,kH=Fd,IH=$H,PH=Object.prototype,RH=PH.hasOwnProperty;function NH(e){if(!kH(e))return IH(e);var t=[];for(var n in Object(e))RH.call(e,n)&&n!="constructor"&&t.push(n);return t}var XE=NH,DH=av,MH=dv;function jH(e){return e!=null&&MH(e.length)&&!DH(e)}var ya=jH,LH=YE,FH=XE,qH=ya;function UH(e){return qH(e)?LH(e):FH(e)}var bu=UH,BH=vu,zH=bu;function ZH(e,t){return e&&BH(t,zH(t),e)}var HH=ZH;function WH(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var VH=WH,KH=ro,GH=Fd,YH=VH,JH=Object.prototype,XH=JH.hasOwnProperty;function QH(e){if(!KH(e))return YH(e);var t=GH(e),n=[];for(var r in e)r=="constructor"&&(t||!XH.call(e,r))||n.push(r);return n}var eW=QH,tW=YE,nW=eW,rW=ya;function iW(e){return rW(e)?tW(e,!0):nW(e)}var rc=iW,oW=vu,aW=rc;function sW(e,t){return e&&oW(t,aW(t),e)}var uW=sW,qd={exports:{}};qd.exports,function(e,t){var n=no,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;function l(c,d){if(d)return c.slice();var p=c.length,m=s?s(p):new c.constructor(p);return c.copy(m),m}e.exports=l}(qd,qd.exports);var QE=qd.exports;function lW(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var eA=lW;function cW(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}var fW=cW;function dW(){return[]}var tA=dW,pW=fW,hW=tA,mW=Object.prototype,yW=mW.propertyIsEnumerable,nA=Object.getOwnPropertySymbols,gW=nA?function(e){return e==null?[]:(e=Object(e),pW(nA(e),function(t){return yW.call(e,t)}))}:hW,mv=gW,vW=vu,bW=mv;function _W(e,t){return vW(e,bW(e),t)}var wW=_W;function xW(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var yv=xW,SW=JE,EW=SW(Object.getPrototypeOf,Object),gv=EW,AW=yv,CW=gv,OW=mv,TW=tA,$W=Object.getOwnPropertySymbols,kW=$W?function(e){for(var t=[];e;)AW(t,OW(e)),e=CW(e);return t}:TW,rA=kW,IW=vu,PW=rA;function RW(e,t){return IW(e,PW(e),t)}var NW=RW,DW=yv,MW=Hr;function jW(e,t,n){var r=t(e);return MW(e)?r:DW(r,n(e))}var iA=jW,LW=iA,FW=mv,qW=bu;function UW(e){return LW(e,qW,FW)}var oA=UW,BW=iA,zW=rA,ZW=rc;function HW(e){return BW(e,ZW,zW)}var aA=HW,WW=ds,VW=no,KW=WW(VW,"DataView"),GW=KW,YW=ds,JW=no,XW=YW(JW,"Promise"),QW=XW,eV=ds,tV=no,nV=eV(tV,"Set"),sA=nV,rV=ds,iV=no,oV=rV(iV,"WeakMap"),aV=oV,vv=GW,bv=uv,_v=QW,wv=sA,xv=aV,uA=fs,_u=qE,lA="[object Map]",sV="[object Object]",cA="[object Promise]",fA="[object Set]",dA="[object WeakMap]",pA="[object DataView]",uV=_u(vv),lV=_u(bv),cV=_u(_v),fV=_u(wv),dV=_u(xv),ps=uA;(vv&&ps(new vv(new ArrayBuffer(1)))!=pA||bv&&ps(new bv)!=lA||_v&&ps(_v.resolve())!=cA||wv&&ps(new wv)!=fA||xv&&ps(new xv)!=dA)&&(ps=function(e){var t=uA(e),n=t==sV?e.constructor:void 0,r=n?_u(n):"";if(r)switch(r){case uV:return pA;case lV:return lA;case cV:return cA;case fV:return fA;case dV:return dA}return t});var ic=ps,pV=Object.prototype,hV=pV.hasOwnProperty;function mV(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&hV.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var yV=mV,gV=no,vV=gV.Uint8Array,hA=vV,mA=hA;function bV(e){var t=new e.constructor(e.byteLength);return new mA(t).set(new mA(e)),t}var Sv=bV,_V=Sv;function wV(e,t){var n=t?_V(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var xV=wV,SV=/\w*$/;function EV(e){var t=new e.constructor(e.source,SV.exec(e));return t.lastIndex=e.lastIndex,t}var AV=EV,yA=hu,gA=yA?yA.prototype:void 0,vA=gA?gA.valueOf:void 0;function CV(e){return vA?Object(vA.call(e)):{}}var OV=CV,TV=Sv;function $V(e,t){var n=t?TV(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var bA=$V,kV=Sv,IV=xV,PV=AV,RV=OV,NV=bA,DV="[object Boolean]",MV="[object Date]",jV="[object Map]",LV="[object Number]",FV="[object RegExp]",qV="[object Set]",UV="[object String]",BV="[object Symbol]",zV="[object ArrayBuffer]",ZV="[object DataView]",HV="[object Float32Array]",WV="[object Float64Array]",VV="[object Int8Array]",KV="[object Int16Array]",GV="[object Int32Array]",YV="[object Uint8Array]",JV="[object Uint8ClampedArray]",XV="[object Uint16Array]",QV="[object Uint32Array]";function eK(e,t,n){var r=e.constructor;switch(t){case zV:return kV(e);case DV:case MV:return new r(+e);case ZV:return IV(e,n);case HV:case WV:case VV:case KV:case GV:case YV:case JV:case XV:case QV:return NV(e,n);case jV:return new r;case LV:case UV:return new r(e);case FV:return PV(e);case qV:return new r;case BV:return RV(e)}}var tK=eK,nK=ro,_A=Object.create,rK=function(){function e(){}return function(t){if(!nK(t))return{};if(_A)return _A(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),iK=rK,oK=iK,aK=gv,sK=Fd;function uK(e){return typeof e.constructor=="function"&&!sK(e)?oK(aK(e)):{}}var wA=uK,lK=ic,cK=io,fK="[object Map]";function dK(e){return cK(e)&&lK(e)==fK}var pK=dK,hK=pK,mK=pv,xA=hv,SA=xA&&xA.isMap,yK=SA?mK(SA):hK,gK=yK,vK=ic,bK=io,_K="[object Set]";function wK(e){return bK(e)&&vK(e)==_K}var xK=wK,SK=xK,EK=pv,EA=hv,AA=EA&&EA.isSet,AK=AA?EK(AA):SK,CK=AK,OK=Dd,TK=iZ,$K=HE,kK=HH,IK=uW,PK=QE,RK=eA,NK=wW,DK=NW,MK=oA,jK=aA,LK=ic,FK=yV,qK=tK,UK=wA,BK=Hr,zK=nc,ZK=gK,HK=ro,WK=CK,VK=bu,KK=rc,GK=1,YK=2,JK=4,CA="[object Arguments]",XK="[object Array]",QK="[object Boolean]",eG="[object Date]",tG="[object Error]",OA="[object Function]",nG="[object GeneratorFunction]",rG="[object Map]",iG="[object Number]",TA="[object Object]",oG="[object RegExp]",aG="[object Set]",sG="[object String]",uG="[object Symbol]",lG="[object WeakMap]",cG="[object ArrayBuffer]",fG="[object DataView]",dG="[object Float32Array]",pG="[object Float64Array]",hG="[object Int8Array]",mG="[object Int16Array]",yG="[object Int32Array]",gG="[object Uint8Array]",vG="[object Uint8ClampedArray]",bG="[object Uint16Array]",_G="[object Uint32Array]",wn={};wn[CA]=wn[XK]=wn[cG]=wn[fG]=wn[QK]=wn[eG]=wn[dG]=wn[pG]=wn[hG]=wn[mG]=wn[yG]=wn[rG]=wn[iG]=wn[TA]=wn[oG]=wn[aG]=wn[sG]=wn[uG]=wn[gG]=wn[vG]=wn[bG]=wn[_G]=!0,wn[tG]=wn[OA]=wn[lG]=!1;function Ud(e,t,n,r,i,o){var a,s=t&GK,l=t&YK,c=t&JK;if(n&&(a=i?n(e,r,i,o):n(e)),a!==void 0)return a;if(!HK(e))return e;var d=BK(e);if(d){if(a=FK(e),!s)return RK(e,a)}else{var p=LK(e),m=p==OA||p==nG;if(zK(e))return PK(e,s);if(p==TA||p==CA||m&&!i){if(a=l||m?{}:UK(e),!s)return l?DK(e,IK(a,e)):NK(e,kK(a,e))}else{if(!wn[p])return i?e:{};a=qK(e,p,s)}}o||(o=new OK);var h=o.get(e);if(h)return h;o.set(e,a),WK(e)?e.forEach(function(w){a.add(Ud(w,t,n,w,e,o))}):ZK(e)&&e.forEach(function(w,_){a.set(_,Ud(w,t,n,_,e,o))});var y=c?l?jK:MK:l?KK:VK,v=d?void 0:y(e);return TK(v||e,function(w,_){v&&(_=w,w=e[_]),$K(a,_,Ud(w,t,n,_,e,o))}),a}var $A=Ud,wG=$A,xG=1,SG=4;function EG(e){return wG(e,xG|SG)}var AG=EG;function CG(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}var OG=CG;function TG(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Bd=TG,$G=fs,kG=io,IG="[object Symbol]";function PG(e){return typeof e=="symbol"||kG(e)&&$G(e)==IG}var zd=PG,kA=hu,RG=Bd,NG=Hr,DG=zd,MG=1/0,IA=kA?kA.prototype:void 0,PA=IA?IA.toString:void 0;function RA(e){if(typeof e=="string")return e;if(NG(e))return RG(e,RA)+"";if(DG(e))return PA?PA.call(e):"";var t=e+"";return t=="0"&&1/e==-MG?"-0":t}var Ev=RA,jG=/\s/;function LG(e){for(var t=e.length;t--&&jG.test(e.charAt(t)););return t}var FG=LG,qG=FG,UG=/^\s+/;function BG(e){return e&&e.slice(0,qG(e)+1).replace(UG,"")}var NA=BG,zG=NA,DA=ro,ZG=zd,MA=0/0,HG=/^[-+]0x[0-9a-f]+$/i,WG=/^0b[01]+$/i,VG=/^0o[0-7]+$/i,KG=parseInt;function GG(e){if(typeof e=="number")return e;if(ZG(e))return MA;if(DA(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=DA(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=zG(e);var n=WG.test(e);return n||VG.test(e)?KG(e.slice(2),n?2:8):HG.test(e)?MA:+e}var YG=GG,JG=YG,jA=1/0,XG=17976931348623157e292;function QG(e){if(!e)return e===0?e:0;if(e=JG(e),e===jA||e===-jA){var t=e<0?-1:1;return t*XG}return e===e?e:0}var eY=QG,tY=eY;function nY(e){var t=tY(e),n=t%1;return t===t?n?t-n:t:0}var LA=nY,rY=Ev;function iY(e){return e==null?"":rY(e)}var oc=iY,oY=OG,aY=Ev,sY=LA,uY=oc;function lY(e,t,n){e=uY(e),t=aY(t);var r=e.length;n=n===void 0?r:oY(sY(n),0,r);var i=n;return n-=t.length,n>=0&&e.slice(n,i)==t}var cY=lY,fY="__lodash_hash_undefined__";function dY(e){return this.__data__.set(e,fY),this}var pY=dY;function hY(e){return this.__data__.has(e)}var mY=hY,yY=lv,gY=pY,vY=mY;function Zd(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new yY;++t<n;)this.add(e[t])}Zd.prototype.add=Zd.prototype.push=gY,Zd.prototype.has=vY;var FA=Zd;function bY(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var _Y=bY;function wY(e,t){return e.has(t)}var qA=wY,xY=FA,SY=_Y,EY=qA,AY=1,CY=2;function OY(e,t,n,r,i,o){var a=n&AY,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),d=o.get(t);if(c&&d)return c==t&&d==e;var p=-1,m=!0,h=n&CY?new xY:void 0;for(o.set(e,t),o.set(t,e);++p<s;){var y=e[p],v=t[p];if(r)var w=a?r(v,y,p,t,e,o):r(y,v,p,e,t,o);if(w!==void 0){if(w)continue;m=!1;break}if(h){if(!SY(t,function(_,b){if(!EY(h,b)&&(y===_||i(y,_,n,r,o)))return h.push(b)})){m=!1;break}}else if(!(y===v||i(y,v,n,r,o))){m=!1;break}}return o.delete(e),o.delete(t),m}var UA=OY;function TY(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var $Y=TY;function kY(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Av=kY,BA=hu,zA=hA,IY=Ql,PY=UA,RY=$Y,NY=Av,DY=1,MY=2,jY="[object Boolean]",LY="[object Date]",FY="[object Error]",qY="[object Map]",UY="[object Number]",BY="[object RegExp]",zY="[object Set]",ZY="[object String]",HY="[object Symbol]",WY="[object ArrayBuffer]",VY="[object DataView]",ZA=BA?BA.prototype:void 0,Cv=ZA?ZA.valueOf:void 0;function KY(e,t,n,r,i,o,a){switch(n){case VY:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case WY:return!(e.byteLength!=t.byteLength||!o(new zA(e),new zA(t)));case jY:case LY:case UY:return IY(+e,+t);case FY:return e.name==t.name&&e.message==t.message;case BY:case ZY:return e==t+"";case qY:var s=RY;case zY:var l=r&DY;if(s||(s=NY),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=MY,a.set(e,t);var d=PY(s(e),s(t),r,i,o,a);return a.delete(e),d;case HY:if(Cv)return Cv.call(e)==Cv.call(t)}return!1}var GY=KY,HA=oA,YY=1,JY=Object.prototype,XY=JY.hasOwnProperty;function QY(e,t,n,r,i,o){var a=n&YY,s=HA(e),l=s.length,c=HA(t),d=c.length;if(l!=d&&!a)return!1;for(var p=l;p--;){var m=s[p];if(!(a?m in t:XY.call(t,m)))return!1}var h=o.get(e),y=o.get(t);if(h&&y)return h==t&&y==e;var v=!0;o.set(e,t),o.set(t,e);for(var w=a;++p<l;){m=s[p];var _=e[m],b=t[m];if(r)var S=a?r(b,_,m,t,e,o):r(_,b,m,e,t,o);if(!(S===void 0?_===b||i(_,b,n,r,o):S)){v=!1;break}w||(w=m=="constructor")}if(v&&!w){var A=e.constructor,E=t.constructor;A!=E&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof E=="function"&&E instanceof E)&&(v=!1)}return o.delete(e),o.delete(t),v}var eJ=QY,Ov=Dd,tJ=UA,nJ=GY,rJ=eJ,WA=ic,VA=Hr,KA=nc,iJ=Ld,oJ=1,GA="[object Arguments]",YA="[object Array]",Hd="[object Object]",aJ=Object.prototype,JA=aJ.hasOwnProperty;function sJ(e,t,n,r,i,o){var a=VA(e),s=VA(t),l=a?YA:WA(e),c=s?YA:WA(t);l=l==GA?Hd:l,c=c==GA?Hd:c;var d=l==Hd,p=c==Hd,m=l==c;if(m&&KA(e)){if(!KA(t))return!1;a=!0,d=!1}if(m&&!d)return o||(o=new Ov),a||iJ(e)?tJ(e,t,n,r,i,o):nJ(e,t,l,n,r,i,o);if(!(n&oJ)){var h=d&&JA.call(e,"__wrapped__"),y=p&&JA.call(t,"__wrapped__");if(h||y){var v=h?e.value():e,w=y?t.value():t;return o||(o=new Ov),i(v,w,n,r,o)}}return m?(o||(o=new Ov),rJ(e,t,n,r,i,o)):!1}var uJ=sJ,lJ=uJ,XA=io;function QA(e,t,n,r,i){return e===t?!0:e==null||t==null||!XA(e)&&!XA(t)?e!==e&&t!==t:lJ(e,t,n,r,QA,i)}var Tv=QA,cJ=Tv;function fJ(e,t){return cJ(e,t)}var eC=fJ,dJ=cv,pJ=Ql;function hJ(e,t,n){(n!==void 0&&!pJ(e[t],n)||n===void 0&&!(t in e))&&dJ(e,t,n)}var tC=hJ;function mJ(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(n(o[l],l,o)===!1)break}return t}}var yJ=mJ,gJ=yJ,vJ=gJ(),nC=vJ,bJ=ya,_J=io;function wJ(e){return _J(e)&&bJ(e)}var xJ=wJ,SJ=fs,EJ=gv,AJ=io,CJ="[object Object]",OJ=Function.prototype,TJ=Object.prototype,rC=OJ.toString,$J=TJ.hasOwnProperty,kJ=rC.call(Object);function IJ(e){if(!AJ(e)||SJ(e)!=CJ)return!1;var t=EJ(e);if(t===null)return!0;var n=$J.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&rC.call(n)==kJ}var hs=IJ;function PJ(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var iC=PJ,RJ=vu,NJ=rc;function DJ(e){return RJ(e,NJ(e))}var MJ=DJ,oC=tC,jJ=QE,LJ=bA,FJ=eA,qJ=wA,aC=tc,sC=Hr,UJ=xJ,BJ=nc,zJ=av,ZJ=ro,HJ=hs,WJ=Ld,uC=iC,VJ=MJ;function KJ(e,t,n,r,i,o,a){var s=uC(e,n),l=uC(t,n),c=a.get(l);if(c){oC(e,n,c);return}var d=o?o(s,l,n+"",e,t,a):void 0,p=d===void 0;if(p){var m=sC(l),h=!m&&BJ(l),y=!m&&!h&&WJ(l);d=l,m||h||y?sC(s)?d=s:UJ(s)?d=FJ(s):h?(p=!1,d=jJ(l,!0)):y?(p=!1,d=LJ(l,!0)):d=[]:HJ(l)||aC(l)?(d=s,aC(s)?d=VJ(s):(!ZJ(s)||zJ(s))&&(d=qJ(l))):p=!1}p&&(a.set(l,d),i(d,l,r,o,a),a.delete(l)),oC(e,n,d)}var GJ=KJ,YJ=Dd,JJ=tC,XJ=nC,QJ=GJ,eX=ro,tX=rc,nX=iC;function lC(e,t,n,r,i){e!==t&&XJ(t,function(o,a){if(i||(i=new YJ),eX(o))QJ(e,t,a,n,lC,r,i);else{var s=r?r(nX(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),JJ(e,a,s)}},tX)}var rX=lC;function iX(e){return e}var $v=iX;function oX(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var aX=oX,sX=aX,cC=Math.max;function uX(e,t,n){return t=cC(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=cC(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),sX(e,this,s)}}var fC=uX;function lX(e){return function(){return e}}var cX=lX,fX=cX,dC=zE,dX=$v,pX=dC?function(e,t){return dC(e,"toString",{configurable:!0,enumerable:!1,value:fX(t),writable:!0})}:dX,hX=pX,mX=800,yX=16,gX=Date.now;function vX(e){var t=0,n=0;return function(){var r=gX(),i=yX-(r-n);if(n=r,i>0){if(++t>=mX)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var bX=vX,_X=hX,wX=bX,xX=wX(_X),pC=xX,SX=$v,EX=fC,AX=pC;function CX(e,t){return AX(EX(e,t,SX),e+"")}var OX=CX,TX=Ql,$X=ya,kX=fv,IX=ro;function PX(e,t,n){if(!IX(n))return!1;var r=typeof t;return(r=="number"?$X(n)&&kX(t,n.length):r=="string"&&t in n)?TX(n[t],e):!1}var RX=PX,NX=OX,DX=RX;function MX(e){return NX(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&DX(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t})}var jX=MX,LX=rX,FX=jX,qX=FX(function(e,t,n){LX(e,t,n)}),UX=qX,hC=lv,BX="Expected a function";function kv(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(BX);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(kv.Cache||hC),n}kv.Cache=hC;var Wd=kv,zX=Hr,ZX=zd,HX=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,WX=/^\w*$/;function VX(e,t){if(zX(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ZX(e)?!0:WX.test(e)||!HX.test(e)||t!=null&&e in Object(t)}var Iv=VX,KX=Wd,GX=500;function YX(e){var t=KX(e,function(r){return n.size===GX&&n.clear(),r}),n=t.cache;return t}var JX=YX,XX=JX,QX=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eQ=/\\(\\)?/g,tQ=XX(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(QX,function(n,r,i,o){t.push(i?o.replace(eQ,"$1"):r||n)}),t}),nQ=tQ,rQ=Hr,iQ=Iv,oQ=nQ,aQ=oc;function sQ(e,t){return rQ(e)?e:iQ(e,t)?[e]:oQ(aQ(e))}var Vd=sQ;function uQ(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var lQ=uQ,cQ=zd,fQ=1/0;function dQ(e){if(typeof e=="string"||cQ(e))return e;var t=e+"";return t=="0"&&1/e==-fQ?"-0":t}var ac=dQ,pQ=Vd,hQ=ac;function mQ(e,t){t=pQ(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[hQ(t[n++])];return n&&n==r?e:void 0}var Pv=mQ;function yQ(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}var mC=yQ,gQ=Pv,vQ=mC;function bQ(e,t){return t.length<2?e:gQ(e,vQ(t,0,-1))}var _Q=bQ,wQ=Vd,xQ=lQ,SQ=_Q,EQ=ac;function AQ(e,t){return t=wQ(t,e),e=SQ(e,t),e==null||delete e[EQ(xQ(t))]}var CQ=AQ,OQ=hs;function TQ(e){return OQ(e)?void 0:e}var $Q=TQ,yC=hu,kQ=tc,IQ=Hr,gC=yC?yC.isConcatSpreadable:void 0;function PQ(e){return IQ(e)||kQ(e)||!!(gC&&e&&e[gC])}var RQ=PQ,NQ=yv,DQ=RQ;function vC(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=DQ),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?vC(s,t-1,n,r,i):NQ(i,s):r||(i[i.length]=s)}return i}var MQ=vC,jQ=MQ;function LQ(e){var t=e==null?0:e.length;return t?jQ(e,1):[]}var FQ=LQ,qQ=FQ,UQ=fC,BQ=pC;function zQ(e){return BQ(UQ(e,void 0,qQ),e+"")}var ZQ=zQ,HQ=Bd,WQ=$A,VQ=CQ,KQ=Vd,GQ=vu,YQ=$Q,JQ=ZQ,XQ=aA,QQ=1,eee=2,tee=4,nee=JQ(function(e,t){var n={};if(e==null)return n;var r=!1;t=HQ(t,function(o){return o=KQ(o,e),r||(r=o.length>1),o}),GQ(e,XQ(e),n),r&&(n=WQ(n,QQ|eee|tee,YQ));for(var i=t.length;i--;)VQ(n,t[i]);return n}),bC=nee;function ree(e){return function(t){return e==null?void 0:e[t]}}var iee=ree,oee=iee,aee={À:"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"},see=oee(aee),uee=see,lee=uee,cee=oc,fee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dee="\\u0300-\\u036f",pee="\\ufe20-\\ufe2f",hee="\\u20d0-\\u20ff",mee=dee+pee+hee,yee="["+mee+"]",gee=RegExp(yee,"g");function vee(e){return e=cee(e),e&&e.replace(fee,lee).replace(gee,"")}var bee=vee,_ee=mC;function wee(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:_ee(e,t,n)}var _C=wee;function xee(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var See=xee;function Eee(e){return e!==e}var Aee=Eee;function Cee(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var Oee=Cee,Tee=See,$ee=Aee,kee=Oee;function Iee(e,t,n){return t===t?kee(e,t,n):Tee(e,$ee,n)}var Kd=Iee,Pee=Kd;function Ree(e,t){for(var n=e.length;n--&&Pee(t,e[n],0)>-1;);return n}var Nee=Ree,Dee=Kd;function Mee(e,t){for(var n=-1,r=e.length;++n<r&&Dee(t,e[n],0)>-1;);return n}var jee=Mee;function Lee(e){return e.split("")}var Fee=Lee,qee="\\ud800-\\udfff",Uee="\\u0300-\\u036f",Bee="\\ufe20-\\ufe2f",zee="\\u20d0-\\u20ff",Zee=Uee+Bee+zee,Hee="\\ufe0e\\ufe0f",Wee="\\u200d",Vee=RegExp("["+Wee+qee+Zee+Hee+"]");function Kee(e){return Vee.test(e)}var wC=Kee,xC="\\ud800-\\udfff",Gee="\\u0300-\\u036f",Yee="\\ufe20-\\ufe2f",Jee="\\u20d0-\\u20ff",Xee=Gee+Yee+Jee,Qee="\\ufe0e\\ufe0f",ete="["+xC+"]",Rv="["+Xee+"]",Nv="\\ud83c[\\udffb-\\udfff]",tte="(?:"+Rv+"|"+Nv+")",SC="[^"+xC+"]",EC="(?:\\ud83c[\\udde6-\\uddff]){2}",AC="[\\ud800-\\udbff][\\udc00-\\udfff]",nte="\\u200d",CC=tte+"?",OC="["+Qee+"]?",rte="(?:"+nte+"(?:"+[SC,EC,AC].join("|")+")"+OC+CC+")*",ite=OC+CC+rte,ote="(?:"+[SC+Rv+"?",Rv,EC,AC,ete].join("|")+")",ate=RegExp(Nv+"(?="+Nv+")|"+ote+ite,"g");function ste(e){return e.match(ate)||[]}var ute=ste,lte=Fee,cte=wC,fte=ute;function dte(e){return cte(e)?fte(e):lte(e)}var TC=dte,pte=Ev,hte=NA,mte=_C,yte=Nee,gte=jee,$C=TC,vte=oc;function bte(e,t,n){if(e=vte(e),e&&(n||t===void 0))return hte(e);if(!e||!(t=pte(t)))return e;var r=$C(e),i=$C(t),o=gte(r,i),a=yte(r,i)+1;return mte(r,o,a).join("")}var _te=bte,wte=_C,xte=wC,Ste=TC,Ete=oc;function Ate(e){return function(t){t=Ete(t);var n=xte(t)?Ste(t):void 0,r=n?n[0]:t.charAt(0),i=n?wte(n,1).join(""):t.slice(1);return r[e]()+i}}var Cte=Ate,Ote=Cte,Tte=Ote("toUpperCase"),$te=Tte,kte=XE,Ite=ic,Pte=tc,Rte=Hr,Nte=ya,Dte=nc,Mte=Fd,jte=Ld,Lte="[object Map]",Fte="[object Set]",qte=Object.prototype,Ute=qte.hasOwnProperty;function Bte(e){if(e==null)return!0;if(Nte(e)&&(Rte(e)||typeof e=="string"||typeof e.splice=="function"||Dte(e)||jte(e)||Pte(e)))return!e.length;var t=Ite(e);if(t==Lte||t==Fte)return!e.size;if(Mte(e))return!kte(e).length;for(var n in e)if(Ute.call(e,n))return!1;return!0}var zte=Bte,Zte=Dd,Hte=Tv,Wte=1,Vte=2;function Kte(e,t,n,r){var i=n.length,o=i,a=!r;if(e==null)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=n[i];var l=s[0],c=e[l],d=s[1];if(a&&s[2]){if(c===void 0&&!(l in e))return!1}else{var p=new Zte;if(r)var m=r(c,d,l,e,t,p);if(!(m===void 0?Hte(d,c,Wte|Vte,r,p):m))return!1}}return!0}var Gte=Kte,Yte=ro;function Jte(e){return e===e&&!Yte(e)}var kC=Jte,Xte=kC,Qte=bu;function ene(e){for(var t=Qte(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Xte(i)]}return t}var tne=ene;function nne(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var IC=nne,rne=Gte,ine=tne,one=IC;function ane(e){var t=ine(e);return t.length==1&&t[0][2]?one(t[0][0],t[0][1]):function(n){return n===e||rne(n,e,t)}}var sne=ane,une=Pv;function lne(e,t,n){var r=e==null?void 0:une(e,t);return r===void 0?n:r}var cne=lne;function fne(e,t){return e!=null&&t in Object(e)}var dne=fne,pne=Vd,hne=tc,mne=Hr,yne=fv,gne=dv,vne=ac;function bne(e,t,n){t=pne(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=vne(t[r]);if(!(o=e!=null&&n(e,a)))break;e=e[a]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&gne(i)&&yne(a,i)&&(mne(e)||hne(e)))}var _ne=bne,wne=dne,xne=_ne;function Sne(e,t){return e!=null&&xne(e,t,wne)}var Ene=Sne,Ane=Tv,Cne=cne,One=Ene,Tne=Iv,$ne=kC,kne=IC,Ine=ac,Pne=1,Rne=2;function Nne(e,t){return Tne(e)&&$ne(t)?kne(Ine(e),t):function(n){var r=Cne(n,e);return r===void 0&&r===t?One(n,e):Ane(t,r,Pne|Rne)}}var Dne=Nne;function Mne(e){return function(t){return t==null?void 0:t[e]}}var jne=Mne,Lne=Pv;function Fne(e){return function(t){return Lne(t,e)}}var qne=Fne,Une=jne,Bne=qne,zne=Iv,Zne=ac;function Hne(e){return zne(e)?Une(Zne(e)):Bne(e)}var Wne=Hne,Vne=sne,Kne=Dne,Gne=$v,Yne=Hr,Jne=Wne;function Xne(e){return typeof e=="function"?e:e==null?Gne:typeof e=="object"?Yne(e)?Kne(e[0],e[1]):Vne(e):Jne(e)}var Dv=Xne,Qne=Kd;function ere(e,t){var n=e==null?0:e.length;return!!n&&Qne(e,t,0)>-1}var tre=ere;function nre(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var rre=nre;function ire(){}var ore=ire,Mv=sA,are=ore,sre=Av,ure=1/0,lre=Mv&&1/sre(new Mv([,-0]))[1]==ure?function(e){return new Mv(e)}:are,cre=lre,fre=FA,dre=tre,pre=rre,hre=qA,mre=cre,yre=Av,gre=200;function vre(e,t,n){var r=-1,i=dre,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=pre;else if(o>=gre){var c=t?null:mre(e);if(c)return yre(c);a=!1,i=hre,l=new fre}else l=t?[]:s;e:for(;++r<o;){var d=e[r],p=t?t(d):d;if(d=n||d!==0?d:0,a&&p===p){for(var m=l.length;m--;)if(l[m]===p)continue e;t&&l.push(p),s.push(d)}else i(l,p,n)||(l!==s&&l.push(p),s.push(d))}return s}var bre=vre,_re=Dv,wre=bre;function xre(e,t){return e&&e.length?wre(e,_re(t)):[]}var Sre=xre;function Ere(e,t,n){var r;return n(e,function(i,o,a){if(t(i,o,a))return r=o,!1}),r}var Are=Ere,Cre=nC,Ore=bu;function Tre(e,t){return e&&Cre(e,t,Ore)}var PC=Tre,$re=Are,kre=PC,Ire=Dv;function Pre(e,t){return $re(e,Ire(t),kre)}var Rre=Pre,Nre=fs,Dre=Hr,Mre=io,jre="[object String]";function Lre(e){return typeof e=="string"||!Dre(e)&&Mre(e)&&Nre(e)==jre}var Fre=Lre,qre=Bd;function Ure(e,t){return qre(t,function(n){return e[n]})}var Bre=Ure,zre=Bre,Zre=bu;function Hre(e){return e==null?[]:zre(e,Zre(e))}var Wre=Hre,Vre=Kd,Kre=ya,Gre=Fre,Yre=LA,Jre=Wre,Xre=Math.max;function Qre(e,t,n,r){e=Kre(e)?e:Jre(e),n=n&&!r?Yre(n):0;var i=e.length;return n<0&&(n=Xre(i+n,0)),Gre(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Vre(e,t,n)>-1}var eie=Qre,tie=ya;function nie(e,t){return function(n,r){if(n==null)return n;if(!tie(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++o<i)&&r(a[o],o,a)!==!1;);return n}}var rie=nie,iie=PC,oie=rie,aie=oie(iie),sie=aie,uie=sie,lie=ya;function cie(e,t){var n=-1,r=lie(e)?Array(e.length):[];return uie(e,function(i,o,a){r[++n]=t(i,o,a)}),r}var fie=cie,die=Bd,pie=Dv,hie=fie,mie=Hr;function yie(e,t){var n=mie(e)?die:hie;return n(e,pie(t))}var gie=yie,Gd={exports:{}};/**
|
|
54
|
+
`))}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 U5(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=LS.inlineCode(h,y,v);return v.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function $z(){return{exit:{taskListCheckValueChecked:qS,taskListCheckValueUnchecked:qS,paragraph:Iz}}}function kz(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Pz}}}function qS(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Iz(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 Pz(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=LS.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 Rz(){return[c5(),x5(),M5(),xz(),$z()]}function Nz(e){return{extensions:[f5(),S5(),j5(),Tz(e),kz()]}}const Dz={tokenize:Uz,partial:!0},US={tokenize:Bz,partial:!0},BS={tokenize:zz,partial:!0},zS={tokenize:Zz,partial:!0},Mz={tokenize:Hz,partial:!0},ZS={tokenize:Fz,previous:WS},HS={tokenize:qz,previous:VS},To={tokenize:Lz,previous:KS},Xi={};function jz(){return{text:Xi}}let os=48;for(;os<123;)Xi[os]=To,os++,os===58?os=65:os===91&&(os=97);Xi[43]=To,Xi[45]=To,Xi[46]=To,Xi[95]=To,Xi[72]=[To,HS],Xi[104]=[To,HS],Xi[87]=[To,ZS],Xi[119]=[To,ZS];function Lz(e,t,n){const r=this;let i,o;return a;function a(p){return!Vg(p)||!KS.call(r,r.previous)||Kg(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(p))}function s(p){return Vg(p)?(e.consume(p),s):p===64?(e.consume(p),l):n(p)}function l(p){return p===46?e.check(Mz,d,c)(p):p===45||p===95||br(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&&Rr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function Fz(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!WS.call(r,r.previous)||Kg(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Dz,e.attempt(US,e.attempt(BS,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function qz(e,t,n){const r=this;let i="",o=!1;return a;function a(p){return(p===72||p===104)&&VS.call(r,r.previous)&&!Kg(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),s):n(p)}function s(p){if(Rr(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||Qf(p)||mn(p)||is(p)||ed(p)?n(p):e.attempt(US,e.attempt(BS,d),n)(p)}function d(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function Uz(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 Bz(e,t,n){let r,i,o;return a;function a(c){return c===46||c===95?e.check(zS,l,s)(c):c===null||mn(c)||is(c)||c!==45&&ed(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 zz(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(zS,t,o)(a):a===null||mn(a)||is(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function Zz(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||mn(s)||is(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||mn(s)||is(s)?t(s):r(s)}function o(s){return Rr(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):Rr(s)?(e.consume(s),a):n(s)}}function Hz(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return br(o)?n(o):t(o)}}function WS(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mn(e)}function VS(e){return!Rr(e)}function KS(e){return!(e===47||Vg(e))}function Vg(e){return e===43||e===45||e===46||e===95||br(e)}function Kg(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 Wz={tokenize:e4,partial:!0};function Vz(){return{document:{91:{tokenize:Jz,continuation:{tokenize:Xz},exit:Qz}},text:{91:{tokenize:Yz},93:{add:"after",tokenize:Kz,resolveTo:Gz}}}}function Kz(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=Pi(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 Gz(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 Yz(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||mn(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(Pi(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return mn(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 Jz(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||mn(y))return n(y);if(y===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=Pi(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return mn(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),Qt(e,h,"gfmFootnoteDefinitionWhitespace")):n(y)}function h(y){return t(y)}}function Xz(e,t,n){return e.check(zl,t,e.attempt(Wz,t,n))}function Qz(e){e.exit("gfmFootnoteDefinition")}function e4(e,t,n){const r=this;return Qt(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 t4(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,nd(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=td(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"),_=td(y);return w._open=!_||_===2&&!!v,w._close=!v||v===2&&!!_,s(y)}}}class n4{constructor(){this.map=[]}add(t,n,r){r4(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 r4(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 i4(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 o4(){return{flow:{null:{tokenize:a4,resolveAll:s4}}}}function a4(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):zt(M)?Qt(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||mn(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,zt(M)?Qt(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 zt(M)?Qt(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 zt(M)?Qt(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)):zt(M)?Qt(e,j,"whitespace")(M):(e.enter("data"),q(M))}function q(M){return M===null||M===124||mn(M)?(e.exit("data"),j(M)):(e.consume(M),M===92?L:q)}function L(M){return M===92||M===124?(e.consume(M),q):q(M)}}function s4(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 n4;for(;++n<e.length;){const h=e[n],y=h[1];h[0]==="enter"?y.type==="tableHead"?(s=!1,l!==0&&(GS(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=hd(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=hd(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=hd(m,t,o,i,n,p)):a[1]!==0&&(p=hd(m,t,a,i,n,p)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&GS(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=i4(t.events,n))}return e}function hd(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},ru(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=ru(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=ru(t.events,n[2]),d=ru(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({},ru(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function GS(e,t,n,r,i){const o=[],a=ru(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 ru(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const u4={tokenize:c4};function l4(){return{text:{91:u4}}}function c4(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 mn(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):zt(l)?e.check({tokenize:f4},t,n)(l):n(l)}}function f4(e,t,n){return Qt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function d4(e){return E1([jz(),Vz(),t4(e),o4(),l4()])}const p4={};function h4(e){const t=this,n=e||p4,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(d4(n)),o.push(Rz()),a.push(Nz(n))}const m4=({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(t5,{components:i,remarkPlugins:[h4,l5],children:e})},y4=(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 YS={},Gg={},JS={};Object.defineProperty(JS,"__esModule",{value:!0});var md={},g4=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(md,"__esModule",{value:!0}),md.Emitter=void 0;let v4=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 g4(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})}};md.Emitter=v4;var XS={};Object.defineProperty(XS,"__esModule",{value:!0});var QS={};(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={}))})(QS);var eE={};Object.defineProperty(eE,"__esModule",{value:!0});var tE={};Object.defineProperty(tE,"__esModule",{value:!0});var nE={};Object.defineProperty(nE,"__esModule",{value:!0});var rE={};Object.defineProperty(rE,"__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(JS,e),n(md,e),n(XS,e),n(QS,e),n(eE,e),n(tE,e),n(nE,e),n(rE,e)}(Gg);var yd={},iE={},Yg={exports:{}},gd={},Jg={},vd={},Vl={},iu={},as={},ou={},au={},Qi={};Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.ERROR_PACKET=Qi.PACKET_TYPES_REVERSE=Qi.PACKET_TYPES=void 0;const eo=Object.create(null);Qi.PACKET_TYPES=eo,eo.open="0",eo.close="1",eo.ping="2",eo.pong="3",eo.message="4",eo.upgrade="5",eo.noop="6";const oE=Object.create(null);Qi.PACKET_TYPES_REVERSE=oE,Object.keys(eo).forEach(e=>{oE[eo[e]]=e});const b4={type:"error",data:"parser error"};Qi.ERROR_PACKET=b4,Object.defineProperty(au,"__esModule",{value:!0}),au.encodePacket=au.encodePacketToBinary=void 0;const _4=Qi,aE=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",sE=typeof ArrayBuffer=="function",uE=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,lE=({type:e,data:t},n,r)=>aE&&t instanceof Blob?n?r(t):cE(t,r):sE&&(t instanceof ArrayBuffer||uE(t))?n?r(t):cE(new Blob([t]),r):r(_4.PACKET_TYPES[e]+(t||""));au.encodePacket=lE;const cE=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function fE(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Xg;function w4(e,t){if(aE&&e.data instanceof Blob)return e.data.arrayBuffer().then(fE).then(t);if(sE&&(e.data instanceof ArrayBuffer||uE(e.data)))return t(fE(e.data));lE(e,!1,n=>{Xg||(Xg=new TextEncoder),t(Xg.encode(n))})}au.encodePacketToBinary=w4;var bd={},su={};Object.defineProperty(su,"__esModule",{value:!0}),su.decode=su.encode=void 0;const uu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<uu.length;e++)Kl[uu.charCodeAt(e)]=e;const x4=e=>{let t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=uu[t[n]>>2],i+=uu[(t[n]&3)<<4|t[n+1]>>4],i+=uu[(t[n+1]&15)<<2|t[n+2]>>6],i+=uu[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};su.encode=x4;const S4=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=Kl[e.charCodeAt(r)],a=Kl[e.charCodeAt(r+1)],s=Kl[e.charCodeAt(r+2)],l=Kl[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};su.decode=S4,Object.defineProperty(bd,"__esModule",{value:!0}),bd.decodePacket=void 0;const _d=Qi,E4=su,A4=typeof ArrayBuffer=="function",C4=(e,t)=>{if(typeof e!="string")return{type:"message",data:dE(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:O4(e.substring(1),t)}:_d.PACKET_TYPES_REVERSE[n]?e.length>1?{type:_d.PACKET_TYPES_REVERSE[n],data:e.substring(1)}:{type:_d.PACKET_TYPES_REVERSE[n]}:_d.ERROR_PACKET};bd.decodePacket=C4;const O4=(e,t)=>{if(A4){const n=(0,E4.decode)(e);return dE(n,t)}else return{base64:!0,data:e}},dE=(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=au;Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const n=bd;Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return n.decodePacket}});const r=Qi,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})(ou);function Nr(e){if(e)return T4(e)}function T4(e){for(var t in Nr.prototype)e[t]=Nr.prototype[t];return e}Nr.prototype.on=Nr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Nr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Nr.prototype.off=Nr.prototype.removeListener=Nr.prototype.removeAllListeners=Nr.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},Nr.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},Nr.prototype.emitReserved=Nr.prototype.emit,Nr.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Nr.prototype.hasListeners=function(e){return!!this.listeners(e).length};const lu=Jf(Object.freeze(Object.defineProperty({__proto__:null,Emitter:Nr},Symbol.toStringTag,{value:"Module"})));var _i={},ss={};Object.defineProperty(ss,"__esModule",{value:!0}),ss.globalThisShim=void 0,ss.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),Object.defineProperty(_i,"__esModule",{value:!0}),_i.byteLength=_i.installTimerFunctions=_i.pick=void 0;const ha=ss;function $4(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}_i.pick=$4;const k4=ha.globalThisShim.setTimeout,I4=ha.globalThisShim.clearTimeout;function P4(e,t){t.useNativeTimers?(e.setTimeoutFn=k4.bind(ha.globalThisShim),e.clearTimeoutFn=I4.bind(ha.globalThisShim)):(e.setTimeoutFn=ha.globalThisShim.setTimeout.bind(ha.globalThisShim),e.clearTimeoutFn=ha.globalThisShim.clearTimeout.bind(ha.globalThisShim))}_i.installTimerFunctions=P4;const R4=1.33;function N4(e){return typeof e=="string"?D4(e):Math.ceil((e.byteLength||e.size)*R4)}_i.byteLength=N4;function D4(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 Qg={exports:{}},ev,pE;function M4(){if(pE)return ev;pE=1;var e=1e3,t=e*60,n=t*60,r=n*24,i=r*7,o=r*365.25;ev=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 ev}function j4(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=i,n.enabled=a,n.humanize=M4(),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 q=n.formatters[j];if(typeof q=="function"){const L=w[A];T=q.call(_,L),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 L4=j4;(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=L4(t);const{formatters:s}=e.exports;s.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(Qg,Qg.exports);var to=Qg.exports,us={};Object.defineProperty(us,"__esModule",{value:!0}),us.decode=us.encode=void 0;function F4(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}us.encode=F4;function q4(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}us.decode=q4;var U4=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(as,"__esModule",{value:!0}),as.Transport=void 0;const B4=ou,z4=lu,Z4=_i,H4=U4(to),W4=us,V4=(0,H4.default)("engine.io-client:transport");class K4 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class G4 extends z4.Emitter{constructor(t){super(),this.writable=!1,(0,Z4.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new K4(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):V4("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=(0,B4.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,W4.encode)(t);return n.length?"?"+n:""}}as.Transport=G4;var $o={};Object.defineProperty($o,"__esModule",{value:!0}),$o.yeast=$o.decode=$o.encode=void 0;const hE="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),wd=64,mE={};let yE=0,ma=0,gE;function tv(e){let t="";do t=hE[e%wd]+t,e=Math.floor(e/wd);while(e>0);return t}$o.encode=tv;function Y4(e){let t=0;for(ma=0;ma<e.length;ma++)t=t*wd+mE[e.charAt(ma)];return t}$o.decode=Y4;function J4(){const e=tv(+new Date);return e!==gE?(yE=0,gE=e):e+"."+tv(yE++)}for($o.yeast=J4;ma<wd;ma++)mE[hE[ma]]=ma;var cu={},xd={};Object.defineProperty(xd,"__esModule",{value:!0}),xd.hasCORS=void 0;let vE=!1;try{vE=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}xd.hasCORS=vE,Object.defineProperty(cu,"__esModule",{value:!0}),cu.createCookieJar=cu.XHR=void 0;const X4=xd,Q4=ss;function e6(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||X4.hasCORS))return new XMLHttpRequest}catch{}if(!t)try{return new Q4.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}cu.XHR=e6;function t6(){}cu.createCookieJar=t6;var n6=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(iu,"__esModule",{value:!0}),iu.Request=iu.Polling=void 0;const r6=as,i6=n6(to),o6=$o,bE=ou,nv=cu,a6=lu,_E=_i,s6=ss,zr=(0,i6.default)("engine.io-client:polling");function u6(){}const l6=function(){return new nv.XHR({xdomain:!1}).responseType!=null}();class c6 extends r6.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=l6&&!n,this.opts.withCredentials&&(this.cookieJar=(0,nv.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{zr("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(zr("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){zr("pre-pause polling complete"),--r||n()})),this.writable||(zr("we are currently writing - waiting to pause"),r++,this.once("drain",function(){zr("pre-pause writing complete"),--r||n()}))}else n()}poll(){zr("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){zr("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,bE.decodePayload)(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():zr('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{zr("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(zr("transport open - closing"),t()):(zr("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,bE.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,o6.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 Ri(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(){zr("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}}iu.Polling=c6;class Ri extends a6.Emitter{constructor(t,n){super(),(0,_E.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,_E.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new nv.XHR(n);try{zr("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))},zr("xhr data %s",this.data),r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Ri.requestsCount++,Ri.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=u6,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ri.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(iu.Request=Ri,Ri.requestsCount=0,Ri.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",wE);else if(typeof addEventListener=="function"){const e="onpagehide"in s6.globalThisShim?"pagehide":"unload";addEventListener(e,wE,!1)}}function wE(){for(let e in Ri.requests)Ri.requests.hasOwnProperty(e)&&Ri.requests[e].abort()}var Sd={},si={};Object.defineProperty(si,"__esModule",{value:!0}),si.defaultBinaryType=si.usingBrowserWebSocket=si.WebSocket=si.nextTick=void 0;const xE=ss;si.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),si.WebSocket=xE.globalThisShim.WebSocket||xE.globalThisShim.MozWebSocket,si.usingBrowserWebSocket=!0,si.defaultBinaryType="arraybuffer";var f6=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.WS=void 0;const d6=as,p6=$o,h6=_i,ya=si,m6=f6(to),y6=ou,g6=(0,m6.default)("engine.io-client:websocket"),SE=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class v6 extends d6.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=SE?{}:(0,h6.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=ya.usingBrowserWebSocket&&!SE?n?new ya.WebSocket(t,n):new ya.WebSocket(t):new ya.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,y6.encodePacket)(r,this.supportsBinary,o=>{const a={};ya.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{ya.usingBrowserWebSocket?this.ws.send(o):this.ws.send(o,a)}catch{g6("websocket closed before onclose event")}i&&(0,ya.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,p6.yeast)()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!ya.WebSocket}}Sd.WS=v6;var Ed={},b6=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.WT=void 0;const _6=as,w6=si,EE=ou,Gl=(0,b6(to).default)("engine.io-client:webtransport");class x6 extends _6.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(()=>{Gl("transport closed gracefully"),this.onClose()}).catch(t=>{Gl("transport closed due to %s",t),this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=(0,EE.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=(0,EE.createPacketEncoderStream)();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:s,value:l})=>{if(s){Gl("session is closed");return}Gl("received chunk: %o",l),this.onPacket(l),o()}).catch(s=>{Gl("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,w6.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}Ed.WT=x6,Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.transports=void 0;const S6=iu,E6=Sd,A6=Ed;Vl.transports={websocket:E6.WS,webtransport:A6.WT,polling:S6.Polling};var Yl={};Object.defineProperty(Yl,"__esModule",{value:!0}),Yl.parse=void 0;const C6=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,O6=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function T6(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=C6.exec(e||""),o={},a=14;for(;a--;)o[O6[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=$6(o,o.path),o.queryKey=k6(o,o.query),o}Yl.parse=T6;function $6(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 k6(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}var I6=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vd,"__esModule",{value:!0}),vd.Socket=void 0;const P6=Vl,AE=_i,R6=us,CE=Yl,N6=I6(to),D6=lu,OE=ou,M6=si,In=(0,N6.default)("engine.io-client:socket");let TE=class jl extends D6.Emitter{constructor(t,n={}){super(),this.binaryType=M6.defaultBinaryType,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=(0,CE.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,CE.parse)(n.host).host),(0,AE.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,R6.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=OE.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 P6.transports[t](r)}open(){let t;if(this.opts.rememberUpgrade&&jl.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;jl.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;jl.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",jl.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,AE.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),jl.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}};vd.Socket=TE,TE.protocol=OE.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=vd;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var n=as;Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var r=Vl;Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var i=_i;Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return i.installTimerFunctions}});var o=Yl;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}})}(Jg);var j6=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gd,"__esModule",{value:!0}),gd.url=void 0;const L6=Jg,$E=j6(to).default("socket.io-client:url");function F6(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)||($E("protocol-less url %s",e),typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),$E("parse %s",e),r=L6.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}gd.url=F6;var Ad={},Jl={},Cd={},fu={},ls={};Object.defineProperty(ls,"__esModule",{value:!0}),ls.hasBinary=ls.isBinary=void 0;const q6=typeof ArrayBuffer=="function",U6=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,kE=Object.prototype.toString,B6=typeof Blob=="function"||typeof Blob<"u"&&kE.call(Blob)==="[object BlobConstructor]",z6=typeof File=="function"||typeof File<"u"&&kE.call(File)==="[object FileConstructor]";function IE(e){return q6&&(e instanceof ArrayBuffer||U6(e))||B6&&e instanceof Blob||z6&&e instanceof File}ls.isBinary=IE;function Od(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Od(e[n]))return!0;return!1}if(IE(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Od(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Od(e[n]))return!0;return!1}ls.hasBinary=Od,Object.defineProperty(fu,"__esModule",{value:!0}),fu.reconstructPacket=fu.deconstructPacket=void 0;const Z6=ls;function H6(e){const t=[],n=e.data,r=e;return r.data=rv(n,t),r.attachments=t.length,{packet:r,buffers:t}}fu.deconstructPacket=H6;function rv(e,t){if(!e)return e;if((0,Z6.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]=rv(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]=rv(e[r],t));return n}return e}function W6(e,t){return e.data=iv(e.data,t),delete e.attachments,e}fu.reconstructPacket=W6;function iv(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]=iv(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=iv(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=lu,n=fu,r=ls,o=(0,to.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=[]}}})(Cd);var Xl={};Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.on=void 0;function V6(e,t,n){return e.on(t,n),function(){e.off(t,n)}}Xl.on=V6;var K6=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.Socket=void 0;const Ni=Cd,Td=Xl,G6=lu,Yn=K6(to).default("socket.io-client:socket"),Y6=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class J6 extends G6.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=[Td.on(t,"open",this.onopen.bind(this)),Td.on(t,"packet",this.onpacket.bind(this)),Td.on(t,"error",this.onerror.bind(this)),Td.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(Y6.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:Ni.PacketType.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++;Yn("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)?Yn("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&&(Yn("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(a,1));Yn("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&&(Yn("packet [%d] is discarded after %d tries",r.id,r.tryCount),this._queue.shift(),n&&n(i)):(Yn("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(Yn("draining queue"),!this.connected||this._queue.length===0)return;const n=this._queue[0];if(n.pending&&!t){Yn("packet [%d] has already been sent and is waiting for an ack",n.id);return}n.pending=!0,n.tryCount++,Yn("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(){Yn("transport is open - connecting"),typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ni.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){Yn("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 Ni.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 Ni.PacketType.EVENT:case Ni.PacketType.BINARY_EVENT:this.onevent(t);break;case Ni.PacketType.ACK:case Ni.PacketType.BINARY_ACK:this.onack(t);break;case Ni.PacketType.DISCONNECT:this.ondisconnect();break;case Ni.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||[];Yn("emitting event %j",n),t.id!=null&&(Yn("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,Yn("sending ack %j",i),n.packet({type:Ni.PacketType.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"?(Yn("calling ack %s with %j",t.id,t.data),n.apply(this,t.data),delete this.acks[t.id]):Yn("bad ack %s",t.id)}onconnect(t,n){Yn("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(){Yn("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&&(Yn("performing disconnect (%s)",this.nsp),this.packet({type:Ni.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)}}}Jl.Socket=J6;var $d={};Object.defineProperty($d,"__esModule",{value:!0}),$d.Backoff=void 0;function du(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}$d.Backoff=du,du.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},du.prototype.reset=function(){this.attempts=0},du.prototype.setMin=function(e){this.ms=e},du.prototype.setMax=function(e){this.max=e},du.prototype.setJitter=function(e){this.jitter=e};var X6=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]}),Q6=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),e7=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)&&X6(t,e,n);return Q6(t,e),t},t7=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.Manager=void 0;const ov=Jg,n7=Jl,r7=e7(Cd),cs=Xl,i7=$d,o7=lu,cr=t7(to).default("socket.io-client:manager");class a7 extends o7.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,ov.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 i7.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||r7;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(cr("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;cr("opening %s",this.uri),this.engine=new ov.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=>{cr("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;cr("connect attempt will timeout after %d",s);const l=this.setTimeoutFn(()=>{cr("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(){cr("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){ov.nextTick(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){cr("error",t),this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new n7.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){cr("socket %s is still active, skipping close",r);return}this._close()}_packet(t){cr("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(){cr("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){cr("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){cr("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)cr("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();cr("will wait %dms before reconnect attempt",n),this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(cr("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(cr("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):(cr("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)}}Ad.Manager=a7,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=gd,i=Ad;Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return i.Manager}});const o=Jl;Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return o.Socket}});const s=n(to).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=Cd;Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return d.protocol}}),e.exports=c}(Yg,Yg.exports);var s7=Yg.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=Gg,i=n(s7);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})(iE);var kd={},u7=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(kd,"__esModule",{value:!0}),kd.SocketEmitter=void 0;class l7{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 u7(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})}}kd.SocketEmitter=l7;var Zr=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(yd,"__esModule",{value:!0}),yd.MessagingSocket=void 0;const PE=iE,c7=kd;class f7 extends c7.SocketEmitter{constructor(t){super(),this.clientId=t.clientId,this.com=new PE.SocketCom(t.url),this.com.events.on(PE.SocketComEvents.Message,n=>Zr(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 Zr(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 Zr(this,void 0,void 0,function*(){this.com.disconnect(),yield this.emit("disconnect",void 0)})}getUser(){return Zr(this,void 0,void 0,function*(){return this.request("users.get",{})})}switchConversation(t){return Zr(this,void 0,void 0,function*(){this._conversationId=t,yield this.emit("conversation",this._conversationId)})}createConversation(t){return Zr(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 Zr(this,void 0,void 0,function*(){yield this.request("conversations.start",{id:t||this._conversationId})})}getConversation(t){return Zr(this,void 0,void 0,function*(){return this.request("conversations.get",{id:t||this._conversationId})})}deleteConversation(t){return Zr(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 Zr(this,void 0,void 0,function*(){return this.request("conversations.list",{limit:t||20})})}sendText(t){return Zr(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:{type:"text",text:t}})})}sendPayload(t){return Zr(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:t})})}listMessages(t){return Zr(this,void 0,void 0,function*(){return this.request("messages.list",{conversationId:this._conversationId,limit:t||20})})}sendFeedback(t,n){return Zr(this,void 0,void 0,function*(){yield this.request("messages.feedback",{messageId:t,feedback:n})})}request(t,n){return this.com.request(t,n)}}yd.MessagingSocket=f7,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(Gg,e),n(yd,e)}(YS);var RE={exports:{}};function d7(){this.__data__=[],this.size=0}var p7=d7;function h7(e,t){return e===t||e!==e&&t!==t}var Ql=h7,m7=Ql;function y7(e,t){for(var n=e.length;n--;)if(m7(e[n][0],t))return n;return-1}var Id=y7,g7=Id,v7=Array.prototype,b7=v7.splice;function _7(e){var t=this.__data__,n=g7(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():b7.call(t,n,1),--this.size,!0}var w7=_7,x7=Id;function S7(e){var t=this.__data__,n=x7(t,e);return n<0?void 0:t[n][1]}var E7=S7,A7=Id;function C7(e){return A7(this.__data__,e)>-1}var O7=C7,T7=Id;function $7(e,t){var n=this.__data__,r=T7(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var k7=$7,I7=p7,P7=w7,R7=E7,N7=O7,D7=k7;function pu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}pu.prototype.clear=I7,pu.prototype.delete=P7,pu.prototype.get=R7,pu.prototype.has=N7,pu.prototype.set=D7;var Pd=pu,M7=Pd;function j7(){this.__data__=new M7,this.size=0}var L7=j7;function F7(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var q7=F7;function U7(e){return this.__data__.get(e)}var B7=U7;function z7(e){return this.__data__.has(e)}var Z7=z7,H7=typeof se=="object"&&se&&se.Object===Object&&se,NE=H7,W7=NE,V7=typeof self=="object"&&self&&self.Object===Object&&self,K7=W7||V7||Function("return this")(),no=K7,G7=no,Y7=G7.Symbol,hu=Y7,DE=hu,ME=Object.prototype,J7=ME.hasOwnProperty,X7=ME.toString,ec=DE?DE.toStringTag:void 0;function Q7(e){var t=J7.call(e,ec),n=e[ec];try{e[ec]=void 0;var r=!0}catch{}var i=X7.call(e);return r&&(t?e[ec]=n:delete e[ec]),i}var e8=Q7,t8=Object.prototype,n8=t8.toString;function r8(e){return n8.call(e)}var i8=r8,jE=hu,o8=e8,a8=i8,s8="[object Null]",u8="[object Undefined]",LE=jE?jE.toStringTag:void 0;function l8(e){return e==null?e===void 0?u8:s8:LE&&LE in Object(e)?o8(e):a8(e)}var fs=l8;function c8(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ro=c8,f8=fs,d8=ro,p8="[object AsyncFunction]",h8="[object Function]",m8="[object GeneratorFunction]",y8="[object Proxy]";function g8(e){if(!d8(e))return!1;var t=f8(e);return t==h8||t==m8||t==p8||t==y8}var av=g8,v8=no,b8=v8["__core-js_shared__"],_8=b8,sv=_8,FE=function(){var e=/[^.]+$/.exec(sv&&sv.keys&&sv.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function w8(e){return!!FE&&FE in e}var x8=w8,S8=Function.prototype,E8=S8.toString;function A8(e){if(e!=null){try{return E8.call(e)}catch{}try{return e+""}catch{}}return""}var qE=A8,C8=av,O8=x8,T8=ro,$8=qE,k8=/[\\^$.*+?()[\]{}|]/g,I8=/^\[object .+?Constructor\]$/,P8=Function.prototype,R8=Object.prototype,N8=P8.toString,D8=R8.hasOwnProperty,M8=RegExp("^"+N8.call(D8).replace(k8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function j8(e){if(!T8(e)||O8(e))return!1;var t=C8(e)?M8:I8;return t.test($8(e))}var L8=j8;function F8(e,t){return e==null?void 0:e[t]}var q8=F8,U8=L8,B8=q8;function z8(e,t){var n=B8(e,t);return U8(n)?n:void 0}var ds=z8,Z8=ds,H8=no,W8=Z8(H8,"Map"),uv=W8,V8=ds,K8=V8(Object,"create"),Rd=K8,UE=Rd;function G8(){this.__data__=UE?UE(null):{},this.size=0}var Y8=G8;function J8(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var X8=J8,Q8=Rd,e9="__lodash_hash_undefined__",t9=Object.prototype,n9=t9.hasOwnProperty;function r9(e){var t=this.__data__;if(Q8){var n=t[e];return n===e9?void 0:n}return n9.call(t,e)?t[e]:void 0}var i9=r9,o9=Rd,a9=Object.prototype,s9=a9.hasOwnProperty;function u9(e){var t=this.__data__;return o9?t[e]!==void 0:s9.call(t,e)}var l9=u9,c9=Rd,f9="__lodash_hash_undefined__";function d9(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=c9&&t===void 0?f9:t,this}var p9=d9,h9=Y8,m9=X8,y9=i9,g9=l9,v9=p9;function mu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}mu.prototype.clear=h9,mu.prototype.delete=m9,mu.prototype.get=y9,mu.prototype.has=g9,mu.prototype.set=v9;var b9=mu,BE=b9,_9=Pd,w9=uv;function x9(){this.size=0,this.__data__={hash:new BE,map:new(w9||_9),string:new BE}}var S9=x9;function E9(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var A9=E9,C9=A9;function O9(e,t){var n=e.__data__;return C9(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Nd=O9,T9=Nd;function $9(e){var t=T9(this,e).delete(e);return this.size-=t?1:0,t}var k9=$9,I9=Nd;function P9(e){return I9(this,e).get(e)}var R9=P9,N9=Nd;function D9(e){return N9(this,e).has(e)}var M9=D9,j9=Nd;function L9(e,t){var n=j9(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var F9=L9,q9=S9,U9=k9,B9=R9,z9=M9,Z9=F9;function yu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yu.prototype.clear=q9,yu.prototype.delete=U9,yu.prototype.get=B9,yu.prototype.has=z9,yu.prototype.set=Z9;var lv=yu,H9=Pd,W9=uv,V9=lv,K9=200;function G9(e,t){var n=this.__data__;if(n instanceof H9){var r=n.__data__;if(!W9||r.length<K9-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new V9(r)}return n.set(e,t),this.size=n.size,this}var Y9=G9,J9=Pd,X9=L7,Q9=q7,eZ=B7,tZ=Z7,nZ=Y9;function gu(e){var t=this.__data__=new J9(e);this.size=t.size}gu.prototype.clear=X9,gu.prototype.delete=Q9,gu.prototype.get=eZ,gu.prototype.has=tZ,gu.prototype.set=nZ;var Dd=gu;function rZ(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var iZ=rZ,oZ=ds,aZ=function(){try{var e=oZ(Object,"defineProperty");return e({},"",{}),e}catch{}}(),zE=aZ,ZE=zE;function sZ(e,t,n){t=="__proto__"&&ZE?ZE(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var cv=sZ,uZ=cv,lZ=Ql,cZ=Object.prototype,fZ=cZ.hasOwnProperty;function dZ(e,t,n){var r=e[t];(!(fZ.call(e,t)&&lZ(r,n))||n===void 0&&!(t in e))&&uZ(e,t,n)}var HE=dZ,pZ=HE,hZ=cv;function mZ(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),i?hZ(n,s,l):pZ(n,s,l)}return n}var vu=mZ;function yZ(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var gZ=yZ;function vZ(e){return e!=null&&typeof e=="object"}var io=vZ,bZ=fs,_Z=io,wZ="[object Arguments]";function xZ(e){return _Z(e)&&bZ(e)==wZ}var SZ=xZ,WE=SZ,EZ=io,VE=Object.prototype,AZ=VE.hasOwnProperty,CZ=VE.propertyIsEnumerable,OZ=WE(function(){return arguments}())?WE:function(e){return EZ(e)&&AZ.call(e,"callee")&&!CZ.call(e,"callee")},tc=OZ,TZ=Array.isArray,Hr=TZ,Md={exports:{}};function $Z(){return!1}var kZ=$Z;Md.exports,function(e,t){var n=no,r=kZ,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||r;e.exports=c}(Md,Md.exports);var nc=Md.exports,IZ=9007199254740991,PZ=/^(?:0|[1-9]\d*)$/;function RZ(e,t){var n=typeof e;return t=t??IZ,!!t&&(n=="number"||n!="symbol"&&PZ.test(e))&&e>-1&&e%1==0&&e<t}var fv=RZ,NZ=9007199254740991;function DZ(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=NZ}var dv=DZ,MZ=fs,jZ=dv,LZ=io,FZ="[object Arguments]",qZ="[object Array]",UZ="[object Boolean]",BZ="[object Date]",zZ="[object Error]",ZZ="[object Function]",HZ="[object Map]",WZ="[object Number]",VZ="[object Object]",KZ="[object RegExp]",GZ="[object Set]",YZ="[object String]",JZ="[object WeakMap]",XZ="[object ArrayBuffer]",QZ="[object DataView]",eH="[object Float32Array]",tH="[object Float64Array]",nH="[object Int8Array]",rH="[object Int16Array]",iH="[object Int32Array]",oH="[object Uint8Array]",aH="[object Uint8ClampedArray]",sH="[object Uint16Array]",uH="[object Uint32Array]",An={};An[eH]=An[tH]=An[nH]=An[rH]=An[iH]=An[oH]=An[aH]=An[sH]=An[uH]=!0,An[FZ]=An[qZ]=An[XZ]=An[UZ]=An[QZ]=An[BZ]=An[zZ]=An[ZZ]=An[HZ]=An[WZ]=An[VZ]=An[KZ]=An[GZ]=An[YZ]=An[JZ]=!1;function lH(e){return LZ(e)&&jZ(e.length)&&!!An[MZ(e)]}var cH=lH;function fH(e){return function(t){return e(t)}}var pv=fH,jd={exports:{}};jd.exports,function(e,t){var n=NE,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s}(jd,jd.exports);var hv=jd.exports,dH=cH,pH=pv,KE=hv,GE=KE&&KE.isTypedArray,hH=GE?pH(GE):dH,Ld=hH,mH=gZ,yH=tc,gH=Hr,vH=nc,bH=fv,_H=Ld,wH=Object.prototype,xH=wH.hasOwnProperty;function SH(e,t){var n=gH(e),r=!n&&yH(e),i=!n&&!r&&vH(e),o=!n&&!r&&!i&&_H(e),a=n||r||i||o,s=a?mH(e.length,String):[],l=s.length;for(var c in e)(t||xH.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||bH(c,l)))&&s.push(c);return s}var YE=SH,EH=Object.prototype;function AH(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||EH;return e===n}var Fd=AH;function CH(e,t){return function(n){return e(t(n))}}var JE=CH,OH=JE,TH=OH(Object.keys,Object),$H=TH,kH=Fd,IH=$H,PH=Object.prototype,RH=PH.hasOwnProperty;function NH(e){if(!kH(e))return IH(e);var t=[];for(var n in Object(e))RH.call(e,n)&&n!="constructor"&&t.push(n);return t}var XE=NH,DH=av,MH=dv;function jH(e){return e!=null&&MH(e.length)&&!DH(e)}var ga=jH,LH=YE,FH=XE,qH=ga;function UH(e){return qH(e)?LH(e):FH(e)}var bu=UH,BH=vu,zH=bu;function ZH(e,t){return e&&BH(t,zH(t),e)}var HH=ZH;function WH(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var VH=WH,KH=ro,GH=Fd,YH=VH,JH=Object.prototype,XH=JH.hasOwnProperty;function QH(e){if(!KH(e))return YH(e);var t=GH(e),n=[];for(var r in e)r=="constructor"&&(t||!XH.call(e,r))||n.push(r);return n}var eW=QH,tW=YE,nW=eW,rW=ga;function iW(e){return rW(e)?tW(e,!0):nW(e)}var rc=iW,oW=vu,aW=rc;function sW(e,t){return e&&oW(t,aW(t),e)}var uW=sW,qd={exports:{}};qd.exports,function(e,t){var n=no,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;function l(c,d){if(d)return c.slice();var p=c.length,m=s?s(p):new c.constructor(p);return c.copy(m),m}e.exports=l}(qd,qd.exports);var QE=qd.exports;function lW(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var eA=lW;function cW(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}var fW=cW;function dW(){return[]}var tA=dW,pW=fW,hW=tA,mW=Object.prototype,yW=mW.propertyIsEnumerable,nA=Object.getOwnPropertySymbols,gW=nA?function(e){return e==null?[]:(e=Object(e),pW(nA(e),function(t){return yW.call(e,t)}))}:hW,mv=gW,vW=vu,bW=mv;function _W(e,t){return vW(e,bW(e),t)}var wW=_W;function xW(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var yv=xW,SW=JE,EW=SW(Object.getPrototypeOf,Object),gv=EW,AW=yv,CW=gv,OW=mv,TW=tA,$W=Object.getOwnPropertySymbols,kW=$W?function(e){for(var t=[];e;)AW(t,OW(e)),e=CW(e);return t}:TW,rA=kW,IW=vu,PW=rA;function RW(e,t){return IW(e,PW(e),t)}var NW=RW,DW=yv,MW=Hr;function jW(e,t,n){var r=t(e);return MW(e)?r:DW(r,n(e))}var iA=jW,LW=iA,FW=mv,qW=bu;function UW(e){return LW(e,qW,FW)}var oA=UW,BW=iA,zW=rA,ZW=rc;function HW(e){return BW(e,ZW,zW)}var aA=HW,WW=ds,VW=no,KW=WW(VW,"DataView"),GW=KW,YW=ds,JW=no,XW=YW(JW,"Promise"),QW=XW,eV=ds,tV=no,nV=eV(tV,"Set"),sA=nV,rV=ds,iV=no,oV=rV(iV,"WeakMap"),aV=oV,vv=GW,bv=uv,_v=QW,wv=sA,xv=aV,uA=fs,_u=qE,lA="[object Map]",sV="[object Object]",cA="[object Promise]",fA="[object Set]",dA="[object WeakMap]",pA="[object DataView]",uV=_u(vv),lV=_u(bv),cV=_u(_v),fV=_u(wv),dV=_u(xv),ps=uA;(vv&&ps(new vv(new ArrayBuffer(1)))!=pA||bv&&ps(new bv)!=lA||_v&&ps(_v.resolve())!=cA||wv&&ps(new wv)!=fA||xv&&ps(new xv)!=dA)&&(ps=function(e){var t=uA(e),n=t==sV?e.constructor:void 0,r=n?_u(n):"";if(r)switch(r){case uV:return pA;case lV:return lA;case cV:return cA;case fV:return fA;case dV:return dA}return t});var ic=ps,pV=Object.prototype,hV=pV.hasOwnProperty;function mV(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&hV.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var yV=mV,gV=no,vV=gV.Uint8Array,hA=vV,mA=hA;function bV(e){var t=new e.constructor(e.byteLength);return new mA(t).set(new mA(e)),t}var Sv=bV,_V=Sv;function wV(e,t){var n=t?_V(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var xV=wV,SV=/\w*$/;function EV(e){var t=new e.constructor(e.source,SV.exec(e));return t.lastIndex=e.lastIndex,t}var AV=EV,yA=hu,gA=yA?yA.prototype:void 0,vA=gA?gA.valueOf:void 0;function CV(e){return vA?Object(vA.call(e)):{}}var OV=CV,TV=Sv;function $V(e,t){var n=t?TV(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var bA=$V,kV=Sv,IV=xV,PV=AV,RV=OV,NV=bA,DV="[object Boolean]",MV="[object Date]",jV="[object Map]",LV="[object Number]",FV="[object RegExp]",qV="[object Set]",UV="[object String]",BV="[object Symbol]",zV="[object ArrayBuffer]",ZV="[object DataView]",HV="[object Float32Array]",WV="[object Float64Array]",VV="[object Int8Array]",KV="[object Int16Array]",GV="[object Int32Array]",YV="[object Uint8Array]",JV="[object Uint8ClampedArray]",XV="[object Uint16Array]",QV="[object Uint32Array]";function eK(e,t,n){var r=e.constructor;switch(t){case zV:return kV(e);case DV:case MV:return new r(+e);case ZV:return IV(e,n);case HV:case WV:case VV:case KV:case GV:case YV:case JV:case XV:case QV:return NV(e,n);case jV:return new r;case LV:case UV:return new r(e);case FV:return PV(e);case qV:return new r;case BV:return RV(e)}}var tK=eK,nK=ro,_A=Object.create,rK=function(){function e(){}return function(t){if(!nK(t))return{};if(_A)return _A(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),iK=rK,oK=iK,aK=gv,sK=Fd;function uK(e){return typeof e.constructor=="function"&&!sK(e)?oK(aK(e)):{}}var wA=uK,lK=ic,cK=io,fK="[object Map]";function dK(e){return cK(e)&&lK(e)==fK}var pK=dK,hK=pK,mK=pv,xA=hv,SA=xA&&xA.isMap,yK=SA?mK(SA):hK,gK=yK,vK=ic,bK=io,_K="[object Set]";function wK(e){return bK(e)&&vK(e)==_K}var xK=wK,SK=xK,EK=pv,EA=hv,AA=EA&&EA.isSet,AK=AA?EK(AA):SK,CK=AK,OK=Dd,TK=iZ,$K=HE,kK=HH,IK=uW,PK=QE,RK=eA,NK=wW,DK=NW,MK=oA,jK=aA,LK=ic,FK=yV,qK=tK,UK=wA,BK=Hr,zK=nc,ZK=gK,HK=ro,WK=CK,VK=bu,KK=rc,GK=1,YK=2,JK=4,CA="[object Arguments]",XK="[object Array]",QK="[object Boolean]",eG="[object Date]",tG="[object Error]",OA="[object Function]",nG="[object GeneratorFunction]",rG="[object Map]",iG="[object Number]",TA="[object Object]",oG="[object RegExp]",aG="[object Set]",sG="[object String]",uG="[object Symbol]",lG="[object WeakMap]",cG="[object ArrayBuffer]",fG="[object DataView]",dG="[object Float32Array]",pG="[object Float64Array]",hG="[object Int8Array]",mG="[object Int16Array]",yG="[object Int32Array]",gG="[object Uint8Array]",vG="[object Uint8ClampedArray]",bG="[object Uint16Array]",_G="[object Uint32Array]",wn={};wn[CA]=wn[XK]=wn[cG]=wn[fG]=wn[QK]=wn[eG]=wn[dG]=wn[pG]=wn[hG]=wn[mG]=wn[yG]=wn[rG]=wn[iG]=wn[TA]=wn[oG]=wn[aG]=wn[sG]=wn[uG]=wn[gG]=wn[vG]=wn[bG]=wn[_G]=!0,wn[tG]=wn[OA]=wn[lG]=!1;function Ud(e,t,n,r,i,o){var a,s=t&GK,l=t&YK,c=t&JK;if(n&&(a=i?n(e,r,i,o):n(e)),a!==void 0)return a;if(!HK(e))return e;var d=BK(e);if(d){if(a=FK(e),!s)return RK(e,a)}else{var p=LK(e),m=p==OA||p==nG;if(zK(e))return PK(e,s);if(p==TA||p==CA||m&&!i){if(a=l||m?{}:UK(e),!s)return l?DK(e,IK(a,e)):NK(e,kK(a,e))}else{if(!wn[p])return i?e:{};a=qK(e,p,s)}}o||(o=new OK);var h=o.get(e);if(h)return h;o.set(e,a),WK(e)?e.forEach(function(w){a.add(Ud(w,t,n,w,e,o))}):ZK(e)&&e.forEach(function(w,_){a.set(_,Ud(w,t,n,_,e,o))});var y=c?l?jK:MK:l?KK:VK,v=d?void 0:y(e);return TK(v||e,function(w,_){v&&(_=w,w=e[_]),$K(a,_,Ud(w,t,n,_,e,o))}),a}var $A=Ud,wG=$A,xG=1,SG=4;function EG(e){return wG(e,xG|SG)}var AG=EG;function CG(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}var OG=CG;function TG(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Bd=TG,$G=fs,kG=io,IG="[object Symbol]";function PG(e){return typeof e=="symbol"||kG(e)&&$G(e)==IG}var zd=PG,kA=hu,RG=Bd,NG=Hr,DG=zd,MG=1/0,IA=kA?kA.prototype:void 0,PA=IA?IA.toString:void 0;function RA(e){if(typeof e=="string")return e;if(NG(e))return RG(e,RA)+"";if(DG(e))return PA?PA.call(e):"";var t=e+"";return t=="0"&&1/e==-MG?"-0":t}var Ev=RA,jG=/\s/;function LG(e){for(var t=e.length;t--&&jG.test(e.charAt(t)););return t}var FG=LG,qG=FG,UG=/^\s+/;function BG(e){return e&&e.slice(0,qG(e)+1).replace(UG,"")}var NA=BG,zG=NA,DA=ro,ZG=zd,MA=0/0,HG=/^[-+]0x[0-9a-f]+$/i,WG=/^0b[01]+$/i,VG=/^0o[0-7]+$/i,KG=parseInt;function GG(e){if(typeof e=="number")return e;if(ZG(e))return MA;if(DA(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=DA(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=zG(e);var n=WG.test(e);return n||VG.test(e)?KG(e.slice(2),n?2:8):HG.test(e)?MA:+e}var YG=GG,JG=YG,jA=1/0,XG=17976931348623157e292;function QG(e){if(!e)return e===0?e:0;if(e=JG(e),e===jA||e===-jA){var t=e<0?-1:1;return t*XG}return e===e?e:0}var eY=QG,tY=eY;function nY(e){var t=tY(e),n=t%1;return t===t?n?t-n:t:0}var LA=nY,rY=Ev;function iY(e){return e==null?"":rY(e)}var oc=iY,oY=OG,aY=Ev,sY=LA,uY=oc;function lY(e,t,n){e=uY(e),t=aY(t);var r=e.length;n=n===void 0?r:oY(sY(n),0,r);var i=n;return n-=t.length,n>=0&&e.slice(n,i)==t}var cY=lY,fY="__lodash_hash_undefined__";function dY(e){return this.__data__.set(e,fY),this}var pY=dY;function hY(e){return this.__data__.has(e)}var mY=hY,yY=lv,gY=pY,vY=mY;function Zd(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new yY;++t<n;)this.add(e[t])}Zd.prototype.add=Zd.prototype.push=gY,Zd.prototype.has=vY;var FA=Zd;function bY(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var _Y=bY;function wY(e,t){return e.has(t)}var qA=wY,xY=FA,SY=_Y,EY=qA,AY=1,CY=2;function OY(e,t,n,r,i,o){var a=n&AY,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),d=o.get(t);if(c&&d)return c==t&&d==e;var p=-1,m=!0,h=n&CY?new xY:void 0;for(o.set(e,t),o.set(t,e);++p<s;){var y=e[p],v=t[p];if(r)var w=a?r(v,y,p,t,e,o):r(y,v,p,e,t,o);if(w!==void 0){if(w)continue;m=!1;break}if(h){if(!SY(t,function(_,b){if(!EY(h,b)&&(y===_||i(y,_,n,r,o)))return h.push(b)})){m=!1;break}}else if(!(y===v||i(y,v,n,r,o))){m=!1;break}}return o.delete(e),o.delete(t),m}var UA=OY;function TY(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var $Y=TY;function kY(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Av=kY,BA=hu,zA=hA,IY=Ql,PY=UA,RY=$Y,NY=Av,DY=1,MY=2,jY="[object Boolean]",LY="[object Date]",FY="[object Error]",qY="[object Map]",UY="[object Number]",BY="[object RegExp]",zY="[object Set]",ZY="[object String]",HY="[object Symbol]",WY="[object ArrayBuffer]",VY="[object DataView]",ZA=BA?BA.prototype:void 0,Cv=ZA?ZA.valueOf:void 0;function KY(e,t,n,r,i,o,a){switch(n){case VY:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case WY:return!(e.byteLength!=t.byteLength||!o(new zA(e),new zA(t)));case jY:case LY:case UY:return IY(+e,+t);case FY:return e.name==t.name&&e.message==t.message;case BY:case ZY:return e==t+"";case qY:var s=RY;case zY:var l=r&DY;if(s||(s=NY),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=MY,a.set(e,t);var d=PY(s(e),s(t),r,i,o,a);return a.delete(e),d;case HY:if(Cv)return Cv.call(e)==Cv.call(t)}return!1}var GY=KY,HA=oA,YY=1,JY=Object.prototype,XY=JY.hasOwnProperty;function QY(e,t,n,r,i,o){var a=n&YY,s=HA(e),l=s.length,c=HA(t),d=c.length;if(l!=d&&!a)return!1;for(var p=l;p--;){var m=s[p];if(!(a?m in t:XY.call(t,m)))return!1}var h=o.get(e),y=o.get(t);if(h&&y)return h==t&&y==e;var v=!0;o.set(e,t),o.set(t,e);for(var w=a;++p<l;){m=s[p];var _=e[m],b=t[m];if(r)var S=a?r(b,_,m,t,e,o):r(_,b,m,e,t,o);if(!(S===void 0?_===b||i(_,b,n,r,o):S)){v=!1;break}w||(w=m=="constructor")}if(v&&!w){var A=e.constructor,E=t.constructor;A!=E&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof E=="function"&&E instanceof E)&&(v=!1)}return o.delete(e),o.delete(t),v}var eJ=QY,Ov=Dd,tJ=UA,nJ=GY,rJ=eJ,WA=ic,VA=Hr,KA=nc,iJ=Ld,oJ=1,GA="[object Arguments]",YA="[object Array]",Hd="[object Object]",aJ=Object.prototype,JA=aJ.hasOwnProperty;function sJ(e,t,n,r,i,o){var a=VA(e),s=VA(t),l=a?YA:WA(e),c=s?YA:WA(t);l=l==GA?Hd:l,c=c==GA?Hd:c;var d=l==Hd,p=c==Hd,m=l==c;if(m&&KA(e)){if(!KA(t))return!1;a=!0,d=!1}if(m&&!d)return o||(o=new Ov),a||iJ(e)?tJ(e,t,n,r,i,o):nJ(e,t,l,n,r,i,o);if(!(n&oJ)){var h=d&&JA.call(e,"__wrapped__"),y=p&&JA.call(t,"__wrapped__");if(h||y){var v=h?e.value():e,w=y?t.value():t;return o||(o=new Ov),i(v,w,n,r,o)}}return m?(o||(o=new Ov),rJ(e,t,n,r,i,o)):!1}var uJ=sJ,lJ=uJ,XA=io;function QA(e,t,n,r,i){return e===t?!0:e==null||t==null||!XA(e)&&!XA(t)?e!==e&&t!==t:lJ(e,t,n,r,QA,i)}var Tv=QA,cJ=Tv;function fJ(e,t){return cJ(e,t)}var eC=fJ,dJ=cv,pJ=Ql;function hJ(e,t,n){(n!==void 0&&!pJ(e[t],n)||n===void 0&&!(t in e))&&dJ(e,t,n)}var tC=hJ;function mJ(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(n(o[l],l,o)===!1)break}return t}}var yJ=mJ,gJ=yJ,vJ=gJ(),nC=vJ,bJ=ga,_J=io;function wJ(e){return _J(e)&&bJ(e)}var xJ=wJ,SJ=fs,EJ=gv,AJ=io,CJ="[object Object]",OJ=Function.prototype,TJ=Object.prototype,rC=OJ.toString,$J=TJ.hasOwnProperty,kJ=rC.call(Object);function IJ(e){if(!AJ(e)||SJ(e)!=CJ)return!1;var t=EJ(e);if(t===null)return!0;var n=$J.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&rC.call(n)==kJ}var hs=IJ;function PJ(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var iC=PJ,RJ=vu,NJ=rc;function DJ(e){return RJ(e,NJ(e))}var MJ=DJ,oC=tC,jJ=QE,LJ=bA,FJ=eA,qJ=wA,aC=tc,sC=Hr,UJ=xJ,BJ=nc,zJ=av,ZJ=ro,HJ=hs,WJ=Ld,uC=iC,VJ=MJ;function KJ(e,t,n,r,i,o,a){var s=uC(e,n),l=uC(t,n),c=a.get(l);if(c){oC(e,n,c);return}var d=o?o(s,l,n+"",e,t,a):void 0,p=d===void 0;if(p){var m=sC(l),h=!m&&BJ(l),y=!m&&!h&&WJ(l);d=l,m||h||y?sC(s)?d=s:UJ(s)?d=FJ(s):h?(p=!1,d=jJ(l,!0)):y?(p=!1,d=LJ(l,!0)):d=[]:HJ(l)||aC(l)?(d=s,aC(s)?d=VJ(s):(!ZJ(s)||zJ(s))&&(d=qJ(l))):p=!1}p&&(a.set(l,d),i(d,l,r,o,a),a.delete(l)),oC(e,n,d)}var GJ=KJ,YJ=Dd,JJ=tC,XJ=nC,QJ=GJ,eX=ro,tX=rc,nX=iC;function lC(e,t,n,r,i){e!==t&&XJ(t,function(o,a){if(i||(i=new YJ),eX(o))QJ(e,t,a,n,lC,r,i);else{var s=r?r(nX(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),JJ(e,a,s)}},tX)}var rX=lC;function iX(e){return e}var $v=iX;function oX(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var aX=oX,sX=aX,cC=Math.max;function uX(e,t,n){return t=cC(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=cC(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),sX(e,this,s)}}var fC=uX;function lX(e){return function(){return e}}var cX=lX,fX=cX,dC=zE,dX=$v,pX=dC?function(e,t){return dC(e,"toString",{configurable:!0,enumerable:!1,value:fX(t),writable:!0})}:dX,hX=pX,mX=800,yX=16,gX=Date.now;function vX(e){var t=0,n=0;return function(){var r=gX(),i=yX-(r-n);if(n=r,i>0){if(++t>=mX)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var bX=vX,_X=hX,wX=bX,xX=wX(_X),pC=xX,SX=$v,EX=fC,AX=pC;function CX(e,t){return AX(EX(e,t,SX),e+"")}var OX=CX,TX=Ql,$X=ga,kX=fv,IX=ro;function PX(e,t,n){if(!IX(n))return!1;var r=typeof t;return(r=="number"?$X(n)&&kX(t,n.length):r=="string"&&t in n)?TX(n[t],e):!1}var RX=PX,NX=OX,DX=RX;function MX(e){return NX(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&DX(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t})}var jX=MX,LX=rX,FX=jX,qX=FX(function(e,t,n){LX(e,t,n)}),UX=qX,hC=lv,BX="Expected a function";function kv(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(BX);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(kv.Cache||hC),n}kv.Cache=hC;var Wd=kv,zX=Hr,ZX=zd,HX=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,WX=/^\w*$/;function VX(e,t){if(zX(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ZX(e)?!0:WX.test(e)||!HX.test(e)||t!=null&&e in Object(t)}var Iv=VX,KX=Wd,GX=500;function YX(e){var t=KX(e,function(r){return n.size===GX&&n.clear(),r}),n=t.cache;return t}var JX=YX,XX=JX,QX=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eQ=/\\(\\)?/g,tQ=XX(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(QX,function(n,r,i,o){t.push(i?o.replace(eQ,"$1"):r||n)}),t}),nQ=tQ,rQ=Hr,iQ=Iv,oQ=nQ,aQ=oc;function sQ(e,t){return rQ(e)?e:iQ(e,t)?[e]:oQ(aQ(e))}var Vd=sQ;function uQ(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var lQ=uQ,cQ=zd,fQ=1/0;function dQ(e){if(typeof e=="string"||cQ(e))return e;var t=e+"";return t=="0"&&1/e==-fQ?"-0":t}var ac=dQ,pQ=Vd,hQ=ac;function mQ(e,t){t=pQ(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[hQ(t[n++])];return n&&n==r?e:void 0}var Pv=mQ;function yQ(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}var mC=yQ,gQ=Pv,vQ=mC;function bQ(e,t){return t.length<2?e:gQ(e,vQ(t,0,-1))}var _Q=bQ,wQ=Vd,xQ=lQ,SQ=_Q,EQ=ac;function AQ(e,t){return t=wQ(t,e),e=SQ(e,t),e==null||delete e[EQ(xQ(t))]}var CQ=AQ,OQ=hs;function TQ(e){return OQ(e)?void 0:e}var $Q=TQ,yC=hu,kQ=tc,IQ=Hr,gC=yC?yC.isConcatSpreadable:void 0;function PQ(e){return IQ(e)||kQ(e)||!!(gC&&e&&e[gC])}var RQ=PQ,NQ=yv,DQ=RQ;function vC(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=DQ),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?vC(s,t-1,n,r,i):NQ(i,s):r||(i[i.length]=s)}return i}var MQ=vC,jQ=MQ;function LQ(e){var t=e==null?0:e.length;return t?jQ(e,1):[]}var FQ=LQ,qQ=FQ,UQ=fC,BQ=pC;function zQ(e){return BQ(UQ(e,void 0,qQ),e+"")}var ZQ=zQ,HQ=Bd,WQ=$A,VQ=CQ,KQ=Vd,GQ=vu,YQ=$Q,JQ=ZQ,XQ=aA,QQ=1,eee=2,tee=4,nee=JQ(function(e,t){var n={};if(e==null)return n;var r=!1;t=HQ(t,function(o){return o=KQ(o,e),r||(r=o.length>1),o}),GQ(e,XQ(e),n),r&&(n=WQ(n,QQ|eee|tee,YQ));for(var i=t.length;i--;)VQ(n,t[i]);return n}),bC=nee;function ree(e){return function(t){return e==null?void 0:e[t]}}var iee=ree,oee=iee,aee={À:"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"},see=oee(aee),uee=see,lee=uee,cee=oc,fee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dee="\\u0300-\\u036f",pee="\\ufe20-\\ufe2f",hee="\\u20d0-\\u20ff",mee=dee+pee+hee,yee="["+mee+"]",gee=RegExp(yee,"g");function vee(e){return e=cee(e),e&&e.replace(fee,lee).replace(gee,"")}var bee=vee,_ee=mC;function wee(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:_ee(e,t,n)}var _C=wee;function xee(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var See=xee;function Eee(e){return e!==e}var Aee=Eee;function Cee(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var Oee=Cee,Tee=See,$ee=Aee,kee=Oee;function Iee(e,t,n){return t===t?kee(e,t,n):Tee(e,$ee,n)}var Kd=Iee,Pee=Kd;function Ree(e,t){for(var n=e.length;n--&&Pee(t,e[n],0)>-1;);return n}var Nee=Ree,Dee=Kd;function Mee(e,t){for(var n=-1,r=e.length;++n<r&&Dee(t,e[n],0)>-1;);return n}var jee=Mee;function Lee(e){return e.split("")}var Fee=Lee,qee="\\ud800-\\udfff",Uee="\\u0300-\\u036f",Bee="\\ufe20-\\ufe2f",zee="\\u20d0-\\u20ff",Zee=Uee+Bee+zee,Hee="\\ufe0e\\ufe0f",Wee="\\u200d",Vee=RegExp("["+Wee+qee+Zee+Hee+"]");function Kee(e){return Vee.test(e)}var wC=Kee,xC="\\ud800-\\udfff",Gee="\\u0300-\\u036f",Yee="\\ufe20-\\ufe2f",Jee="\\u20d0-\\u20ff",Xee=Gee+Yee+Jee,Qee="\\ufe0e\\ufe0f",ete="["+xC+"]",Rv="["+Xee+"]",Nv="\\ud83c[\\udffb-\\udfff]",tte="(?:"+Rv+"|"+Nv+")",SC="[^"+xC+"]",EC="(?:\\ud83c[\\udde6-\\uddff]){2}",AC="[\\ud800-\\udbff][\\udc00-\\udfff]",nte="\\u200d",CC=tte+"?",OC="["+Qee+"]?",rte="(?:"+nte+"(?:"+[SC,EC,AC].join("|")+")"+OC+CC+")*",ite=OC+CC+rte,ote="(?:"+[SC+Rv+"?",Rv,EC,AC,ete].join("|")+")",ate=RegExp(Nv+"(?="+Nv+")|"+ote+ite,"g");function ste(e){return e.match(ate)||[]}var ute=ste,lte=Fee,cte=wC,fte=ute;function dte(e){return cte(e)?fte(e):lte(e)}var TC=dte,pte=Ev,hte=NA,mte=_C,yte=Nee,gte=jee,$C=TC,vte=oc;function bte(e,t,n){if(e=vte(e),e&&(n||t===void 0))return hte(e);if(!e||!(t=pte(t)))return e;var r=$C(e),i=$C(t),o=gte(r,i),a=yte(r,i)+1;return mte(r,o,a).join("")}var _te=bte,wte=_C,xte=wC,Ste=TC,Ete=oc;function Ate(e){return function(t){t=Ete(t);var n=xte(t)?Ste(t):void 0,r=n?n[0]:t.charAt(0),i=n?wte(n,1).join(""):t.slice(1);return r[e]()+i}}var Cte=Ate,Ote=Cte,Tte=Ote("toUpperCase"),$te=Tte,kte=XE,Ite=ic,Pte=tc,Rte=Hr,Nte=ga,Dte=nc,Mte=Fd,jte=Ld,Lte="[object Map]",Fte="[object Set]",qte=Object.prototype,Ute=qte.hasOwnProperty;function Bte(e){if(e==null)return!0;if(Nte(e)&&(Rte(e)||typeof e=="string"||typeof e.splice=="function"||Dte(e)||jte(e)||Pte(e)))return!e.length;var t=Ite(e);if(t==Lte||t==Fte)return!e.size;if(Mte(e))return!kte(e).length;for(var n in e)if(Ute.call(e,n))return!1;return!0}var zte=Bte,Zte=Dd,Hte=Tv,Wte=1,Vte=2;function Kte(e,t,n,r){var i=n.length,o=i,a=!r;if(e==null)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=n[i];var l=s[0],c=e[l],d=s[1];if(a&&s[2]){if(c===void 0&&!(l in e))return!1}else{var p=new Zte;if(r)var m=r(c,d,l,e,t,p);if(!(m===void 0?Hte(d,c,Wte|Vte,r,p):m))return!1}}return!0}var Gte=Kte,Yte=ro;function Jte(e){return e===e&&!Yte(e)}var kC=Jte,Xte=kC,Qte=bu;function ene(e){for(var t=Qte(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Xte(i)]}return t}var tne=ene;function nne(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var IC=nne,rne=Gte,ine=tne,one=IC;function ane(e){var t=ine(e);return t.length==1&&t[0][2]?one(t[0][0],t[0][1]):function(n){return n===e||rne(n,e,t)}}var sne=ane,une=Pv;function lne(e,t,n){var r=e==null?void 0:une(e,t);return r===void 0?n:r}var cne=lne;function fne(e,t){return e!=null&&t in Object(e)}var dne=fne,pne=Vd,hne=tc,mne=Hr,yne=fv,gne=dv,vne=ac;function bne(e,t,n){t=pne(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=vne(t[r]);if(!(o=e!=null&&n(e,a)))break;e=e[a]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&gne(i)&&yne(a,i)&&(mne(e)||hne(e)))}var _ne=bne,wne=dne,xne=_ne;function Sne(e,t){return e!=null&&xne(e,t,wne)}var Ene=Sne,Ane=Tv,Cne=cne,One=Ene,Tne=Iv,$ne=kC,kne=IC,Ine=ac,Pne=1,Rne=2;function Nne(e,t){return Tne(e)&&$ne(t)?kne(Ine(e),t):function(n){var r=Cne(n,e);return r===void 0&&r===t?One(n,e):Ane(t,r,Pne|Rne)}}var Dne=Nne;function Mne(e){return function(t){return t==null?void 0:t[e]}}var jne=Mne,Lne=Pv;function Fne(e){return function(t){return Lne(t,e)}}var qne=Fne,Une=jne,Bne=qne,zne=Iv,Zne=ac;function Hne(e){return zne(e)?Une(Zne(e)):Bne(e)}var Wne=Hne,Vne=sne,Kne=Dne,Gne=$v,Yne=Hr,Jne=Wne;function Xne(e){return typeof e=="function"?e:e==null?Gne:typeof e=="object"?Yne(e)?Kne(e[0],e[1]):Vne(e):Jne(e)}var Dv=Xne,Qne=Kd;function ere(e,t){var n=e==null?0:e.length;return!!n&&Qne(e,t,0)>-1}var tre=ere;function nre(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var rre=nre;function ire(){}var ore=ire,Mv=sA,are=ore,sre=Av,ure=1/0,lre=Mv&&1/sre(new Mv([,-0]))[1]==ure?function(e){return new Mv(e)}:are,cre=lre,fre=FA,dre=tre,pre=rre,hre=qA,mre=cre,yre=Av,gre=200;function vre(e,t,n){var r=-1,i=dre,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=pre;else if(o>=gre){var c=t?null:mre(e);if(c)return yre(c);a=!1,i=hre,l=new fre}else l=t?[]:s;e:for(;++r<o;){var d=e[r],p=t?t(d):d;if(d=n||d!==0?d:0,a&&p===p){for(var m=l.length;m--;)if(l[m]===p)continue e;t&&l.push(p),s.push(d)}else i(l,p,n)||(l!==s&&l.push(p),s.push(d))}return s}var bre=vre,_re=Dv,wre=bre;function xre(e,t){return e&&e.length?wre(e,_re(t)):[]}var Sre=xre;function Ere(e,t,n){var r;return n(e,function(i,o,a){if(t(i,o,a))return r=o,!1}),r}var Are=Ere,Cre=nC,Ore=bu;function Tre(e,t){return e&&Cre(e,t,Ore)}var PC=Tre,$re=Are,kre=PC,Ire=Dv;function Pre(e,t){return $re(e,Ire(t),kre)}var Rre=Pre,Nre=fs,Dre=Hr,Mre=io,jre="[object String]";function Lre(e){return typeof e=="string"||!Dre(e)&&Mre(e)&&Nre(e)==jre}var Fre=Lre,qre=Bd;function Ure(e,t){return qre(t,function(n){return e[n]})}var Bre=Ure,zre=Bre,Zre=bu;function Hre(e){return e==null?[]:zre(e,Zre(e))}var Wre=Hre,Vre=Kd,Kre=ga,Gre=Fre,Yre=LA,Jre=Wre,Xre=Math.max;function Qre(e,t,n,r){e=Kre(e)?e:Jre(e),n=n&&!r?Yre(n):0;var i=e.length;return n<0&&(n=Xre(i+n,0)),Gre(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Vre(e,t,n)>-1}var eie=Qre,tie=ga;function nie(e,t){return function(n,r){if(n==null)return n;if(!tie(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++o<i)&&r(a[o],o,a)!==!1;);return n}}var rie=nie,iie=PC,oie=rie,aie=oie(iie),sie=aie,uie=sie,lie=ga;function cie(e,t){var n=-1,r=lie(e)?Array(e.length):[];return uie(e,function(i,o,a){r[++n]=t(i,o,a)}),r}var fie=cie,die=Bd,pie=Dv,hie=fie,mie=Hr;function yie(e,t){var n=mie(e)?die:hie;return n(e,pie(t))}var gie=yie,Gd={exports:{}};/**
|
|
55
55
|
* @license
|
|
56
56
|
* Lodash <https://lodash.com/>
|
|
57
57
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
58
58
|
* Released under MIT license <https://lodash.com/license>
|
|
59
59
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
60
60
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
61
|
-
*/Gd.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,q=256,L=512,M=30,H="...",re=800,Q=16,G=1,V=2,F=3,Y=1/0,ne=9007199254740991,ce=17976931348623157e292,P=0/0,ue=4294967295,Oe=ue-1,D=ue>>>1,De=[["ary",j],["bind",w],["bindKey",_],["curry",S],["curryRight",A],["flip",L],["partial",E],["partialRight",T],["rearg",q]],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]",de="[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]",ye="[object WeakSet]",xe="[object ArrayBuffer]",Be="[object DataView]",ct="[object Float32Array]",pn="[object Float64Array]",rn="[object Int8Array]",Yt="[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,N=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,Jt=/[\\^$.*+?()[\]{}|]/g,bn=RegExp(Jt.source),Rn=/^\s+/,mr=/\s/,ta=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,xl=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,Ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ze=/[()=,{}\[\]\/\s]/,yt=/\\(\\)?/g,Kt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,un=/\w*$/,Ft=/^[-+]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,Zi=/($^)/,dy=/['\n\r\u2028\u2029\\]/g,Qr="\\ud800-\\udfff",uCe="\\u0300-\\u036f",lCe="\\ufe20-\\ufe2f",cCe="\\u20d0-\\u20ff",YM=uCe+lCe+cCe,JM="\\u2700-\\u27bf",XM="a-z\\xdf-\\xf6\\xf8-\\xff",fCe="\\xac\\xb1\\xd7\\xf7",dCe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pCe="\\u2000-\\u206f",hCe=" \\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",QM="A-Z\\xc0-\\xd6\\xd8-\\xde",ej="\\ufe0e\\ufe0f",tj=fCe+dCe+pCe+hCe,xw="['’]",mCe="["+Qr+"]",nj="["+tj+"]",py="["+YM+"]",rj="\\d+",yCe="["+JM+"]",ij="["+XM+"]",oj="[^"+Qr+tj+rj+JM+XM+QM+"]",Sw="\\ud83c[\\udffb-\\udfff]",gCe="(?:"+py+"|"+Sw+")",aj="[^"+Qr+"]",Ew="(?:\\ud83c[\\udde6-\\uddff]){2}",Aw="[\\ud800-\\udbff][\\udc00-\\udfff]",Sl="["+QM+"]",sj="\\u200d",uj="(?:"+ij+"|"+oj+")",vCe="(?:"+Sl+"|"+oj+")",lj="(?:"+xw+"(?:d|ll|m|re|s|t|ve))?",cj="(?:"+xw+"(?:D|LL|M|RE|S|T|VE))?",fj=gCe+"?",dj="["+ej+"]?",bCe="(?:"+sj+"(?:"+[aj,Ew,Aw].join("|")+")"+dj+fj+")*",_Ce="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wCe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",pj=dj+fj+bCe,xCe="(?:"+[yCe,Ew,Aw].join("|")+")"+pj,SCe="(?:"+[aj+py+"?",py,Ew,Aw,mCe].join("|")+")",ECe=RegExp(xw,"g"),ACe=RegExp(py,"g"),Cw=RegExp(Sw+"(?="+Sw+")|"+SCe+pj,"g"),CCe=RegExp([Sl+"?"+ij+"+"+lj+"(?="+[nj,Sl,"$"].join("|")+")",vCe+"+"+cj+"(?="+[nj,Sl+uj,"$"].join("|")+")",Sl+"?"+uj+"+"+lj,Sl+"+"+cj,wCe,_Ce,rj,xCe].join("|"),"g"),OCe=RegExp("["+sj+Qr+YM+ej+"]"),TCe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$Ce=["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"],kCe=-1,$n={};$n[ct]=$n[pn]=$n[rn]=$n[Yt]=$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[de]=$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[Yt]=Sn[cn]=Sn[Ze]=Sn[lt]=Sn[de]=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 ICe={À:"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"},PCe={"&":"&","<":"<",">":">",'"':""","'":"'"},RCe={"&":"&","<":"<",">":">",""":'"',"'":"'"},NCe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},DCe=parseFloat,MCe=parseInt,hj=typeof se=="object"&&se&&se.Object===Object&&se,jCe=typeof self=="object"&&self&&self.Object===Object&&self,yr=hj||jCe||Function("return this")(),Ow=t&&!t.nodeType&&t,zs=Ow&&!0&&e&&!e.nodeType&&e,mj=zs&&zs.exports===Ow,Tw=mj&&hj.process,Ei=function(){try{var J=zs&&zs.require&&zs.require("util").types;return J||Tw&&Tw.binding&&Tw.binding("util")}catch{}}(),yj=Ei&&Ei.isArrayBuffer,gj=Ei&&Ei.isDate,vj=Ei&&Ei.isMap,bj=Ei&&Ei.isRegExp,_j=Ei&&Ei.isSet,wj=Ei&&Ei.isTypedArray;function di(J,ge,le){switch(le.length){case 0:return J.call(ge);case 1:return J.call(ge,le[0]);case 2:return J.call(ge,le[0],le[1]);case 3:return J.call(ge,le[0],le[1],le[2])}return J.apply(ge,le)}function LCe(J,ge,le,nt){for(var kt=-1,ln=J==null?0:J.length;++kt<ln;){var tr=J[kt];ge(nt,tr,le(tr),J)}return nt}function Ai(J,ge){for(var le=-1,nt=J==null?0:J.length;++le<nt&&ge(J[le],le,J)!==!1;);return J}function FCe(J,ge){for(var le=J==null?0:J.length;le--&&ge(J[le],le,J)!==!1;);return J}function xj(J,ge){for(var le=-1,nt=J==null?0:J.length;++le<nt;)if(!ge(J[le],le,J))return!1;return!0}function Wa(J,ge){for(var le=-1,nt=J==null?0:J.length,kt=0,ln=[];++le<nt;){var tr=J[le];ge(tr,le,J)&&(ln[kt++]=tr)}return ln}function hy(J,ge){var le=J==null?0:J.length;return!!le&&El(J,ge,0)>-1}function $w(J,ge,le){for(var nt=-1,kt=J==null?0:J.length;++nt<kt;)if(le(ge,J[nt]))return!0;return!1}function kn(J,ge){for(var le=-1,nt=J==null?0:J.length,kt=Array(nt);++le<nt;)kt[le]=ge(J[le],le,J);return kt}function Va(J,ge){for(var le=-1,nt=ge.length,kt=J.length;++le<nt;)J[kt+le]=ge[le];return J}function kw(J,ge,le,nt){var kt=-1,ln=J==null?0:J.length;for(nt&&ln&&(le=J[++kt]);++kt<ln;)le=ge(le,J[kt],kt,J);return le}function qCe(J,ge,le,nt){var kt=J==null?0:J.length;for(nt&&kt&&(le=J[--kt]);kt--;)le=ge(le,J[kt],kt,J);return le}function Iw(J,ge){for(var le=-1,nt=J==null?0:J.length;++le<nt;)if(ge(J[le],le,J))return!0;return!1}var UCe=Pw("length");function BCe(J){return J.split("")}function zCe(J){return J.match(Ce)||[]}function Sj(J,ge,le){var nt;return le(J,function(kt,ln,tr){if(ge(kt,ln,tr))return nt=ln,!1}),nt}function my(J,ge,le,nt){for(var kt=J.length,ln=le+(nt?1:-1);nt?ln--:++ln<kt;)if(ge(J[ln],ln,J))return ln;return-1}function El(J,ge,le){return ge===ge?tOe(J,ge,le):my(J,Ej,le)}function ZCe(J,ge,le,nt){for(var kt=le-1,ln=J.length;++kt<ln;)if(nt(J[kt],ge))return kt;return-1}function Ej(J){return J!==J}function Aj(J,ge){var le=J==null?0:J.length;return le?Nw(J,ge)/le:P}function Pw(J){return function(ge){return ge==null?n:ge[J]}}function Rw(J){return function(ge){return J==null?n:J[ge]}}function Cj(J,ge,le,nt,kt){return kt(J,function(ln,tr,_n){le=nt?(nt=!1,ln):ge(le,ln,tr,_n)}),le}function HCe(J,ge){var le=J.length;for(J.sort(ge);le--;)J[le]=J[le].value;return J}function Nw(J,ge){for(var le,nt=-1,kt=J.length;++nt<kt;){var ln=ge(J[nt]);ln!==n&&(le=le===n?ln:le+ln)}return le}function Dw(J,ge){for(var le=-1,nt=Array(J);++le<J;)nt[le]=ge(le);return nt}function WCe(J,ge){return kn(ge,function(le){return[le,J[le]]})}function Oj(J){return J&&J.slice(0,Ij(J)+1).replace(Rn,"")}function pi(J){return function(ge){return J(ge)}}function Mw(J,ge){return kn(ge,function(le){return J[le]})}function Df(J,ge){return J.has(ge)}function Tj(J,ge){for(var le=-1,nt=J.length;++le<nt&&El(ge,J[le],0)>-1;);return le}function $j(J,ge){for(var le=J.length;le--&&El(ge,J[le],0)>-1;);return le}function VCe(J,ge){for(var le=J.length,nt=0;le--;)J[le]===ge&&++nt;return nt}var KCe=Rw(ICe),GCe=Rw(PCe);function YCe(J){return"\\"+NCe[J]}function JCe(J,ge){return J==null?n:J[ge]}function Al(J){return OCe.test(J)}function XCe(J){return TCe.test(J)}function QCe(J){for(var ge,le=[];!(ge=J.next()).done;)le.push(ge.value);return le}function jw(J){var ge=-1,le=Array(J.size);return J.forEach(function(nt,kt){le[++ge]=[kt,nt]}),le}function kj(J,ge){return function(le){return J(ge(le))}}function Ka(J,ge){for(var le=-1,nt=J.length,kt=0,ln=[];++le<nt;){var tr=J[le];(tr===ge||tr===d)&&(J[le]=d,ln[kt++]=le)}return ln}function yy(J){var ge=-1,le=Array(J.size);return J.forEach(function(nt){le[++ge]=nt}),le}function eOe(J){var ge=-1,le=Array(J.size);return J.forEach(function(nt){le[++ge]=[nt,nt]}),le}function tOe(J,ge,le){for(var nt=le-1,kt=J.length;++nt<kt;)if(J[nt]===ge)return nt;return-1}function nOe(J,ge,le){for(var nt=le+1;nt--;)if(J[nt]===ge)return nt;return nt}function Cl(J){return Al(J)?iOe(J):UCe(J)}function Hi(J){return Al(J)?oOe(J):BCe(J)}function Ij(J){for(var ge=J.length;ge--&&mr.test(J.charAt(ge)););return ge}var rOe=Rw(RCe);function iOe(J){for(var ge=Cw.lastIndex=0;Cw.test(J);)++ge;return ge}function oOe(J){return J.match(Cw)||[]}function aOe(J){return J.match(CCe)||[]}var sOe=function J(ge){ge=ge==null?yr:Ol.defaults(yr.Object(),ge,Ol.pick(yr,$Ce));var le=ge.Array,nt=ge.Date,kt=ge.Error,ln=ge.Function,tr=ge.Math,_n=ge.Object,Lw=ge.RegExp,uOe=ge.String,Ci=ge.TypeError,gy=le.prototype,lOe=ln.prototype,Tl=_n.prototype,vy=ge["__core-js_shared__"],by=lOe.toString,hn=Tl.hasOwnProperty,cOe=0,Pj=function(){var u=/[^.]+$/.exec(vy&&vy.keys&&vy.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}(),_y=Tl.toString,fOe=by.call(_n),dOe=yr._,pOe=Lw("^"+by.call(hn).replace(Jt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wy=mj?ge.Buffer:n,Ga=ge.Symbol,xy=ge.Uint8Array,Rj=wy?wy.allocUnsafe:n,Sy=kj(_n.getPrototypeOf,_n),Nj=_n.create,Dj=Tl.propertyIsEnumerable,Ey=gy.splice,Mj=Ga?Ga.isConcatSpreadable:n,Mf=Ga?Ga.iterator:n,Zs=Ga?Ga.toStringTag:n,Ay=function(){try{var u=Gs(_n,"defineProperty");return u({},"",{}),u}catch{}}(),hOe=ge.clearTimeout!==yr.clearTimeout&&ge.clearTimeout,mOe=nt&&nt.now!==yr.Date.now&&nt.now,yOe=ge.setTimeout!==yr.setTimeout&&ge.setTimeout,Cy=tr.ceil,Oy=tr.floor,Fw=_n.getOwnPropertySymbols,gOe=wy?wy.isBuffer:n,jj=ge.isFinite,vOe=gy.join,bOe=kj(_n.keys,_n),nr=tr.max,kr=tr.min,_Oe=nt.now,wOe=ge.parseInt,Lj=tr.random,xOe=gy.reverse,qw=Gs(ge,"DataView"),jf=Gs(ge,"Map"),Uw=Gs(ge,"Promise"),$l=Gs(ge,"Set"),Lf=Gs(ge,"WeakMap"),Ff=Gs(_n,"create"),Ty=Lf&&new Lf,kl={},SOe=Ys(qw),EOe=Ys(jf),AOe=Ys(Uw),COe=Ys($l),OOe=Ys(Lf),$y=Ga?Ga.prototype:n,qf=$y?$y.valueOf:n,Fj=$y?$y.toString:n;function $(u){if(Ln(u)&&!Rt(u)&&!(u instanceof Gt)){if(u instanceof Oi)return u;if(hn.call(u,"__wrapped__"))return qL(u)}return new Oi(u)}var Il=function(){function u(){}return function(f){if(!Nn(f))return{};if(Nj)return Nj(f);u.prototype=f;var g=new u;return u.prototype=n,g}}();function ky(){}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=ky.prototype,$.prototype.constructor=$,Oi.prototype=Il(ky.prototype),Oi.prototype.constructor=Oi;function Gt(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ue,this.__views__=[]}function TOe(){var u=new Gt(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 $Oe(){if(this.__filtered__){var u=new Gt(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}function kOe(){var u=this.__wrapped__.value(),f=this.__dir__,g=Rt(u),x=f<0,O=g?u.length:0,I=BTe(0,O,this.__views__),U=I.start,W=I.end,te=W-U,be=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 lL(u,this.__actions__);var wt=[];e:for(;te--&&Ve<at;){be+=f;for(var qt=-1,xt=u[be];++qt<Ee;){var Ht=we[qt],Xt=Ht.iteratee,yi=Ht.type,Ur=Xt(xt);if(yi==V)xt=Ur;else if(!Ur){if(yi==G)continue e;break e}}wt[Ve++]=xt}return wt}Gt.prototype=Il(ky.prototype),Gt.prototype.constructor=Gt;function Hs(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 IOe(){this.__data__=Ff?Ff(null):{},this.size=0}function POe(u){var f=this.has(u)&&delete this.__data__[u];return this.size-=f?1:0,f}function ROe(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 NOe(u){var f=this.__data__;return Ff?f[u]!==n:hn.call(f,u)}function DOe(u,f){var g=this.__data__;return this.size+=this.has(u)?0:1,g[u]=Ff&&f===n?l:f,this}Hs.prototype.clear=IOe,Hs.prototype.delete=POe,Hs.prototype.get=ROe,Hs.prototype.has=NOe,Hs.prototype.set=DOe;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 MOe(){this.__data__=[],this.size=0}function jOe(u){var f=this.__data__,g=Iy(f,u);if(g<0)return!1;var x=f.length-1;return g==x?f.pop():Ey.call(f,g,1),--this.size,!0}function LOe(u){var f=this.__data__,g=Iy(f,u);return g<0?n:f[g][1]}function FOe(u){return Iy(this.__data__,u)>-1}function qOe(u,f){var g=this.__data__,x=Iy(g,u);return x<0?(++this.size,g.push([u,f])):g[x][1]=f,this}na.prototype.clear=MOe,na.prototype.delete=jOe,na.prototype.get=LOe,na.prototype.has=FOe,na.prototype.set=qOe;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 UOe(){this.size=0,this.__data__={hash:new Hs,map:new(jf||na),string:new Hs}}function BOe(u){var f=zy(this,u).delete(u);return this.size-=f?1:0,f}function zOe(u){return zy(this,u).get(u)}function ZOe(u){return zy(this,u).has(u)}function HOe(u,f){var g=zy(this,u),x=g.size;return g.set(u,f),this.size+=g.size==x?0:1,this}ra.prototype.clear=UOe,ra.prototype.delete=BOe,ra.prototype.get=zOe,ra.prototype.has=ZOe,ra.prototype.set=HOe;function Ws(u){var f=-1,g=u==null?0:u.length;for(this.__data__=new ra;++f<g;)this.add(u[f])}function WOe(u){return this.__data__.set(u,l),this}function VOe(u){return this.__data__.has(u)}Ws.prototype.add=Ws.prototype.push=WOe,Ws.prototype.has=VOe;function Wi(u){var f=this.__data__=new na(u);this.size=f.size}function KOe(){this.__data__=new na,this.size=0}function GOe(u){var f=this.__data__,g=f.delete(u);return this.size=f.size,g}function YOe(u){return this.__data__.get(u)}function JOe(u){return this.__data__.has(u)}function XOe(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}Wi.prototype.clear=KOe,Wi.prototype.delete=GOe,Wi.prototype.get=YOe,Wi.prototype.has=JOe,Wi.prototype.set=XOe;function qj(u,f){var g=Rt(u),x=!g&&Js(u),O=!g&&!x&&es(u),I=!g&&!x&&!O&&Dl(u),U=g||x||O||I,W=U?Dw(u.length,uOe):[],te=W.length;for(var be in u)(f||hn.call(u,be))&&!(U&&(be=="length"||O&&(be=="offset"||be=="parent")||I&&(be=="buffer"||be=="byteLength"||be=="byteOffset")||sa(be,te)))&&W.push(be);return W}function Uj(u){var f=u.length;return f?u[Xw(0,f-1)]:n}function QOe(u,f){return Zy(ei(u),Vs(f,0,u.length))}function eTe(u){return Zy(ei(u))}function Bw(u,f,g){(g!==n&&!Vi(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)&&Vi(x,g))||g===n&&!(f in u))&&ia(u,f,g)}function Iy(u,f){for(var g=u.length;g--;)if(Vi(u[g][0],f))return g;return-1}function tTe(u,f,g,x){return Ya(u,function(O,I,U){f(x,O,g(O),U)}),x}function Bj(u,f){return u&&Ao(f,ur(f),u)}function nTe(u,f){return u&&Ao(f,ni(f),u)}function ia(u,f,g){f=="__proto__"&&Ay?Ay(u,f,{configurable:!0,enumerable:!0,value:g,writable:!0}):u[f]=g}function zw(u,f){for(var g=-1,x=f.length,O=le(x),I=u==null;++g<x;)O[g]=I?n:Sx(u,f[g]);return O}function Vs(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,be=f&h;if(g&&(U=O?g(u,x,O,I):g(u)),U!==n)return U;if(!Nn(u))return u;var we=Rt(u);if(we){if(U=ZTe(u),!W)return ei(u,U)}else{var Ee=Ir(u),Ve=Ee==Fe||Ee==$e;if(es(u))return dL(u,W);if(Ee==de||Ee==qe||Ve&&!O){if(U=te||Ve?{}:IL(u),!W)return te?RTe(u,nTe(U,u)):PTe(u,Bj(U,u))}else{if(!Sn[Ee])return O?u:{};U=HTe(u,Ee,W)}}I||(I=new Wi);var at=I.get(u);if(at)return at;I.set(u,U),aF(u)?u.forEach(function(xt){U.add(Ti(xt,f,g,xt,u,I))}):iF(u)&&u.forEach(function(xt,Ht){U.set(Ht,Ti(xt,f,g,Ht,u,I))});var wt=be?te?lx:ux:te?ni:ur,qt=we?n:wt(u);return Ai(qt||u,function(xt,Ht){qt&&(Ht=xt,xt=u[Ht]),Uf(U,Ht,Ti(xt,f,g,Ht,u,I))}),U}function rTe(u){var f=ur(u);return function(g){return zj(g,u,f)}}function zj(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 Zj(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=hy,U=!0,W=u.length,te=[],be=f.length;if(!W)return te;g&&(f=kn(f,pi(g))),x?(I=$w,U=!1):f.length>=i&&(I=Df,U=!1,f=new Ws(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=be;Ve--;)if(f[Ve]===Ee)continue e;te.push(we)}else I(f,Ee,x)||te.push(we)}return te}var Ya=gL(Eo),Hj=gL(Hw,!0);function iTe(u,f){var g=!0;return Ya(u,function(x,O,I){return g=!!f(x,O,I),g}),g}function Py(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 oTe(u,f,g,x){var O=u.length;for(g=Dt(g),g<0&&(g=-g>O?0:O+g),x=x===n||x>O?O:Dt(x),x<0&&(x+=O),x=g>x?0:uF(x);g<x;)u[g++]=f;return u}function Wj(u,f){var g=[];return Ya(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=VTe),O||(O=[]);++I<U;){var W=u[I];f>0&&g(W)?f>1?gr(W,f-1,g,x,O):Va(O,W):x||(O[O.length]=W)}return O}var Zw=vL(),Vj=vL(!0);function Eo(u,f){return u&&Zw(u,f,ur)}function Hw(u,f){return u&&Vj(u,f,ur)}function Ry(u,f){return Wa(f,function(g){return ua(u[g])})}function Ks(u,f){f=Xa(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 Kj(u,f,g){var x=f(u);return Rt(u)?x:Va(x,g(u))}function Fr(u){return u==null?u===n?mt:K:Zs&&Zs in _n(u)?UTe(u):e$e(u)}function Ww(u,f){return u>f}function aTe(u,f){return u!=null&&hn.call(u,f)}function sTe(u,f){return u!=null&&f in _n(u)}function uTe(u,f,g){return u>=kr(f,g)&&u<nr(f,g)}function Vw(u,f,g){for(var x=g?$w:hy,O=u[0].length,I=u.length,U=I,W=le(I),te=1/0,be=[];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 Ws(U&&we):n}we=u[0];var Ee=-1,Ve=W[0];e:for(;++Ee<O&&be.length<te;){var at=we[Ee],wt=f?f(at):at;if(at=g||at!==0?at:0,!(Ve?Df(Ve,wt):x(be,wt,g))){for(U=I;--U;){var qt=W[U];if(!(qt?Df(qt,wt):x(u[U],wt,g)))continue e}Ve&&Ve.push(wt),be.push(at)}}return be}function lTe(u,f,g,x){return Eo(u,function(O,I,U){f(x,g(O),I,U)}),x}function zf(u,f,g){f=Xa(f,u),u=DL(u,f);var x=u==null?u:u[Co(ki(f))];return x==null?n:di(x,u,g)}function Gj(u){return Ln(u)&&Fr(u)==qe}function cTe(u){return Ln(u)&&Fr(u)==xe}function fTe(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:dTe(u,f,g,x,Zf,O)}function dTe(u,f,g,x,O,I){var U=Rt(u),W=Rt(f),te=U?Me:Ir(u),be=W?Me:Ir(f);te=te==qe?de:te,be=be==qe?de:be;var we=te==de,Ee=be==de,Ve=te==be;if(Ve&&es(u)){if(!es(f))return!1;U=!0,we=!1}if(Ve&&!we)return I||(I=new Wi),U||Dl(u)?TL(u,f,g,x,O,I):FTe(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 qt=at?u.value():u,xt=wt?f.value():f;return I||(I=new Wi),O(qt,xt,g,x,I)}}return Ve?(I||(I=new Wi),qTe(u,f,g,x,O,I)):!1}function pTe(u){return Ln(u)&&Ir(u)==Ze}function Kw(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],be=u[te],we=W[1];if(U&&W[2]){if(be===n&&!(te in u))return!1}else{var Ee=new Wi;if(x)var Ve=x(be,we,te,u,f,Ee);if(!(Ve===n?Zf(we,be,y|v,x,Ee):Ve))return!1}}return!0}function Yj(u){if(!Nn(u)||GTe(u))return!1;var f=ua(u)?pOe:jn;return f.test(Ys(u))}function hTe(u){return Ln(u)&&Fr(u)==et}function mTe(u){return Ln(u)&&Ir(u)==Ue}function yTe(u){return Ln(u)&&Yy(u.length)&&!!$n[Fr(u)]}function Jj(u){return typeof u=="function"?u:u==null?ri:typeof u=="object"?Rt(u)?eL(u[0],u[1]):Qj(u):bF(u)}function Gw(u){if(!Vf(u))return bOe(u);var f=[];for(var g in _n(u))hn.call(u,g)&&g!="constructor"&&f.push(g);return f}function gTe(u){if(!Nn(u))return QTe(u);var f=Vf(u),g=[];for(var x in u)x=="constructor"&&(f||!hn.call(u,x))||g.push(x);return g}function Yw(u,f){return u<f}function Xj(u,f){var g=-1,x=ti(u)?le(u.length):[];return Ya(u,function(O,I,U){x[++g]=f(O,I,U)}),x}function Qj(u){var f=fx(u);return f.length==1&&f[0][2]?RL(f[0][0],f[0][1]):function(g){return g===u||Kw(g,u,f)}}function eL(u,f){return px(u)&&PL(f)?RL(Co(u),f):function(g){var x=Sx(g,u);return x===n&&x===f?Ex(g,u):Zf(f,x,y|v)}}function Ny(u,f,g,x,O){u!==f&&Zw(f,function(I,U){if(O||(O=new Wi),Nn(I))vTe(u,f,U,g,Ny,x,O);else{var W=x?x(mx(u,U),I,U+"",u,f,O):n;W===n&&(W=I),Bw(u,U,W)}},ni)}function vTe(u,f,g,x,O,I,U){var W=mx(u,g),te=mx(f,g),be=U.get(te);if(be){Bw(u,g,be);return}var we=I?I(W,te,g+"",u,f,U):n,Ee=we===n;if(Ee){var Ve=Rt(te),at=!Ve&&es(te),wt=!Ve&&!at&&Dl(te);we=te,Ve||at||wt?Rt(W)?we=W:qn(W)?we=ei(W):at?(Ee=!1,we=dL(te,!0)):wt?(Ee=!1,we=pL(te,!0)):we=[]:Gf(te)||Js(te)?(we=W,Js(W)?we=lF(W):(!Nn(W)||ua(W))&&(we=IL(te))):Ee=!1}Ee&&(U.set(te,we),O(we,te,x,I,U),U.delete(te)),Bw(u,g,we)}function tL(u,f){var g=u.length;if(g)return f+=f<0?g:0,sa(f,g)?u[f]:n}function nL(u,f,g){f.length?f=kn(f,function(I){return Rt(I)?function(U){return Ks(U,I.length===1?I[0]:I)}:I}):f=[ri];var x=-1;f=kn(f,pi(vt()));var O=Xj(u,function(I,U,W){var te=kn(f,function(be){return be(I)});return{criteria:te,index:++x,value:I}});return HCe(O,function(I,U){return ITe(I,U,g)})}function bTe(u,f){return rL(u,f,function(g,x){return Ex(u,x)})}function rL(u,f,g){for(var x=-1,O=f.length,I={};++x<O;){var U=f[x],W=Ks(u,U);g(W,U)&&Hf(I,Xa(U,u),W)}return I}function _Te(u){return function(f){return Ks(f,u)}}function Jw(u,f,g,x){var O=x?ZCe:El,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,be=f[I],we=g?g(be):be;(te=O(W,we,te,x))>-1;)W!==u&&Ey.call(W,te,1),Ey.call(u,te,1);return u}function iL(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)?Ey.call(u,O,1):tx(u,O)}}return u}function Xw(u,f){return u+Oy(Lj()*(f-u+1))}function wTe(u,f,g,x){for(var O=-1,I=nr(Cy((f-u)/(g||1)),0),U=le(I);I--;)U[x?I:++O]=u,u+=g;return U}function Qw(u,f){var g="";if(!u||f<1||f>ne)return g;do f%2&&(g+=u),f=Oy(f/2),f&&(u+=u);while(f);return g}function Ut(u,f){return yx(NL(u,f,ri),u+"")}function xTe(u){return Uj(Ml(u))}function STe(u,f){var g=Ml(u);return Zy(g,Vs(f,0,g.length))}function Hf(u,f,g,x){if(!Nn(u))return u;f=Xa(f,u);for(var O=-1,I=f.length,U=I-1,W=u;W!=null&&++O<I;){var te=Co(f[O]),be=g;if(te==="__proto__"||te==="constructor"||te==="prototype")return u;if(O!=U){var we=W[te];be=x?x(we,te,W):n,be===n&&(be=Nn(we)?we:sa(f[O+1])?[]:{})}Uf(W,te,be),W=W[te]}return u}var oL=Ty?function(u,f){return Ty.set(u,f),u}:ri,ETe=Ay?function(u,f){return Ay(u,"toString",{configurable:!0,enumerable:!1,value:Cx(f),writable:!0})}:ri;function ATe(u){return Zy(Ml(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 CTe(u,f){var g;return Ya(u,function(x,O,I){return g=f(x,O,I),!g}),!!g}function Dy(u,f,g){var x=0,O=u==null?x:u.length;if(typeof f=="number"&&f===f&&O<=D){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 ex(u,f,ri,g)}function ex(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),be=f===n;O<I;){var we=Oy((O+I)/2),Ee=g(u[we]),Ve=Ee!==n,at=Ee===null,wt=Ee===Ee,qt=mi(Ee);if(U)var xt=x||wt;else be?xt=wt&&(x||Ve):W?xt=wt&&Ve&&(x||!at):te?xt=wt&&Ve&&!at&&(x||!qt):at||qt?xt=!1:xt=x?Ee<=f:Ee<f;xt?O=we+1:I=we}return kr(I,Oe)}function aL(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||!Vi(W,te)){var te=W;I[O++]=U===0?0:U}}return I}function sL(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 Fj?Fj.call(u):"";var f=u+"";return f=="0"&&1/u==-Y?"-0":f}function Ja(u,f,g){var x=-1,O=hy,I=u.length,U=!0,W=[],te=W;if(g)U=!1,O=$w;else if(I>=i){var be=f?null:jTe(u);if(be)return yy(be);U=!1,O=Df,te=new Ws}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 tx(u,f){return f=Xa(f,u),u=DL(u,f),u==null||delete u[Co(ki(f))]}function uL(u,f,g,x){return Hf(u,f,g(Ks(u,f)),x)}function My(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 lL(u,f){var g=u;return g instanceof Gt&&(g=g.value()),kw(f,function(x,O){return O.func.apply(O.thisArg,Va([x],O.args))},g)}function nx(u,f,g){var x=u.length;if(x<2)return x?Ja(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 Ja(gr(I,1),f,g)}function cL(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 rx(u){return qn(u)?u:[]}function ix(u){return typeof u=="function"?u:ri}function Xa(u,f){return Rt(u)?u:px(u,f)?[u]:FL(fn(u))}var OTe=Ut;function Qa(u,f,g){var x=u.length;return g=g===n?x:g,!f&&g>=x?u:$i(u,f,g)}var fL=hOe||function(u){return yr.clearTimeout(u)};function dL(u,f){if(f)return u.slice();var g=u.length,x=Rj?Rj(g):new u.constructor(g);return u.copy(x),x}function ox(u){var f=new u.constructor(u.byteLength);return new xy(f).set(new xy(u)),f}function TTe(u,f){var g=f?ox(u.buffer):u.buffer;return new u.constructor(g,u.byteOffset,u.byteLength)}function $Te(u){var f=new u.constructor(u.source,un.exec(u));return f.lastIndex=u.lastIndex,f}function kTe(u){return qf?_n(qf.call(u)):{}}function pL(u,f){var g=f?ox(u.buffer):u.buffer;return new u.constructor(g,u.byteOffset,u.length)}function hL(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,be=mi(f);if(!W&&!be&&!I&&u>f||I&&U&&te&&!W&&!be||x&&U&&te||!g&&te||!O)return 1;if(!x&&!I&&!be&&u<f||be&&g&&O&&!x&&!I||W&&g&&O||!U&&O||!te)return-1}return 0}function ITe(u,f,g){for(var x=-1,O=u.criteria,I=f.criteria,U=O.length,W=g.length;++x<U;){var te=hL(O[x],I[x]);if(te){if(x>=W)return te;var be=g[x];return te*(be=="desc"?-1:1)}}return u.index-f.index}function mL(u,f,g,x){for(var O=-1,I=u.length,U=g.length,W=-1,te=f.length,be=nr(I-U,0),we=le(te+be),Ee=!x;++W<te;)we[W]=f[W];for(;++O<U;)(Ee||O<I)&&(we[g[O]]=u[O]);for(;be--;)we[W++]=u[O++];return we}function yL(u,f,g,x){for(var O=-1,I=u.length,U=-1,W=g.length,te=-1,be=f.length,we=nr(I-W,0),Ee=le(we+be),Ve=!x;++O<we;)Ee[O]=u[O];for(var at=O;++te<be;)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 PTe(u,f){return Ao(u,dx(u),f)}function RTe(u,f){return Ao(u,$L(u),f)}function jy(u,f){return function(g,x){var O=Rt(g)?LCe:tTe,I=f?f():{};return O(g,u,vt(x,2),I)}}function Pl(u){return Ut(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 gL(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 vL(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 NTe(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 bL(u){return function(f){f=fn(f);var g=Al(f)?Hi(f):n,x=g?g[0]:f.charAt(0),O=g?Qa(g,1).join(""):f.slice(1);return x[u]()+O}}function Rl(u){return function(f){return kw(gF(yF(f).replace(ECe,"")),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=Il(u.prototype),x=u.apply(g,f);return Nn(x)?x:g}}function DTe(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 be=I<3&&U[0]!==te&&U[I-1]!==te?[]:Ka(U,te);if(I-=be.length,I<g)return EL(u,f,Ly,O.placeholder,n,U,be,n,n,g-I);var we=this&&this!==yr&&this instanceof O?x:u;return di(we,this,U)}return O}function _L(u){return function(f,g,x){var O=_n(f);if(!ti(f)){var I=vt(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 wL(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&&By(I)=="wrapper")var U=new Oi([],!0)}for(x=U?x:g;++x<g;){I=f[x];var W=By(I),te=W=="wrapper"?cx(I):n;te&&hx(te[0])&&te[1]==(j|S|E|q)&&!te[4].length&&te[9]==1?U=U[By(te[0])].apply(U,te[3]):U=I.length==1&&hx(I)?U[W]():U.thru(I)}return function(){var be=arguments,we=be[0];if(U&&be.length==1&&Rt(we))return U.plant(we).value();for(var Ee=0,Ve=g?f[Ee].apply(this,be):we;++Ee<g;)Ve=f[Ee].call(this,Ve);return Ve}})}function Ly(u,f,g,x,O,I,U,W,te,be){var we=f&j,Ee=f&w,Ve=f&_,at=f&(S|A),wt=f&L,qt=Ve?n:Wf(u);function xt(){for(var Ht=arguments.length,Xt=le(Ht),yi=Ht;yi--;)Xt[yi]=arguments[yi];if(at)var Ur=Nl(xt),gi=VCe(Xt,Ur);if(x&&(Xt=mL(Xt,x,O,at)),I&&(Xt=yL(Xt,I,U,at)),Ht-=gi,at&&Ht<be){var Un=Ka(Xt,Ur);return EL(u,f,Ly,xt.placeholder,g,Xt,Un,W,te,be-Ht)}var Ki=Ee?g:this,ca=Ve?Ki[u]:u;return Ht=Xt.length,W?Xt=t$e(Xt,W):wt&&Ht>1&&Xt.reverse(),we&&te<Ht&&(Xt.length=te),this&&this!==yr&&this instanceof xt&&(ca=qt||Wf(ca)),ca.apply(Ki,Xt)}return xt}function xL(u,f){return function(g,x){return lTe(g,u,f(x),{})}}function Fy(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=sL(g),x=sL(x)),O=u(g,x)}return O}}function ax(u){return aa(function(f){return f=kn(f,pi(vt())),Ut(function(g){var x=this;return u(f,function(O){return di(O,x,g)})})})}function qy(u,f){f=f===n?" ":hi(f);var g=f.length;if(g<2)return g?Qw(f,u):f;var x=Qw(f,Cy(u/Cl(f)));return Al(f)?Qa(Hi(x),0,u).join(""):x.slice(0,u)}function MTe(u,f,g,x){var O=f&w,I=Wf(u);function U(){for(var W=-1,te=arguments.length,be=-1,we=x.length,Ee=le(we+te),Ve=this&&this!==yr&&this instanceof U?I:u;++be<we;)Ee[be]=x[be];for(;te--;)Ee[be++]=arguments[++W];return di(Ve,O?g:this,Ee)}return U}function SL(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),wTe(f,g,x,u)}}function Uy(u){return function(f,g){return typeof f=="string"&&typeof g=="string"||(f=Ii(f),g=Ii(g)),u(f,g)}}function EL(u,f,g,x,O,I,U,W,te,be){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 qt=[u,f,O,at,Ee,wt,Ve,W,te,be],xt=g.apply(n,qt);return hx(u)&&ML(xt,qt),xt.placeholder=x,jL(xt,u,f)}function sx(u){var f=tr[u];return function(g,x){if(g=Ii(g),x=x==null?0:kr(Dt(x),292),x&&jj(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 jTe=$l&&1/yy(new $l([,-0]))[1]==Y?function(u){return new $l(u)}:$x;function AL(u){return function(f){var g=Ir(f);return g==Ze?jw(f):g==Ue?eOe(f):WCe(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 be=x?x.length:0;if(be||(f&=~(E|T),x=O=n),U=U===n?U:nr(Dt(U),0),W=W===n?W:Dt(W),be-=O?O.length:0,f&T){var we=x,Ee=O;x=O=n}var Ve=te?n:cx(u),at=[u,f,g,x,O,we,Ee,I,U,W];if(Ve&&XTe(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]-be,0),!W&&f&(S|A)&&(f&=~(S|A)),!f||f==w)var wt=NTe(u,f,g);else f==S||f==A?wt=DTe(u,f,W):(f==E||f==(w|E))&&!O.length?wt=MTe(u,f,g,x):wt=Ly.apply(n,at);var qt=Ve?oL:ML;return jL(qt(wt,at),u,f)}function CL(u,f,g,x){return u===n||Vi(u,Tl[g])&&!hn.call(x,g)?f:u}function OL(u,f,g,x,O,I){return Nn(u)&&Nn(f)&&(I.set(f,u),Ny(u,f,n,OL,I),I.delete(f)),u}function LTe(u){return Gf(u)?n:u}function TL(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 be=I.get(u),we=I.get(f);if(be&&we)return be==f&&we==u;var Ee=-1,Ve=!0,at=g&v?new Ws:n;for(I.set(u,f),I.set(f,u);++Ee<W;){var wt=u[Ee],qt=f[Ee];if(x)var xt=U?x(qt,wt,Ee,f,u,I):x(wt,qt,Ee,u,f,I);if(xt!==n){if(xt)continue;Ve=!1;break}if(at){if(!Iw(f,function(Ht,Xt){if(!Df(at,Xt)&&(wt===Ht||O(wt,Ht,g,x,I)))return at.push(Xt)})){Ve=!1;break}}else if(!(wt===qt||O(wt,qt,g,x,I))){Ve=!1;break}}return I.delete(u),I.delete(f),Ve}function FTe(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 xy(u),new xy(f)));case rt:case Ke:case lt:return Vi(+u,+f);case Ae:return u.name==f.name&&u.message==f.message;case et:case ot:return u==f+"";case Ze:var W=jw;case Ue:var te=x&y;if(W||(W=yy),u.size!=f.size&&!te)return!1;var be=U.get(u);if(be)return be==f;x|=v,U.set(u,f);var we=TL(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 qTe(u,f,g,x,O,I){var U=g&y,W=ux(u),te=W.length,be=ux(f),we=be.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 qt=!0;I.set(u,f),I.set(f,u);for(var xt=U;++Ee<te;){Ve=W[Ee];var Ht=u[Ve],Xt=f[Ve];if(x)var yi=U?x(Xt,Ht,Ve,f,u,I):x(Ht,Xt,Ve,u,f,I);if(!(yi===n?Ht===Xt||O(Ht,Xt,g,x,I):yi)){qt=!1;break}xt||(xt=Ve=="constructor")}if(qt&&!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)&&(qt=!1)}return I.delete(u),I.delete(f),qt}function aa(u){return yx(NL(u,n,zL),u+"")}function ux(u){return Kj(u,ur,dx)}function lx(u){return Kj(u,ni,$L)}var cx=Ty?function(u){return Ty.get(u)}:$x;function By(u){for(var f=u.name+"",g=kl[f],x=hn.call(kl,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 vt(){var u=$.iteratee||Ox;return u=u===Ox?Jj:u,arguments.length?u(arguments[0],arguments[1]):u}function zy(u,f){var g=u.__data__;return KTe(f)?g[typeof f=="string"?"string":"hash"]:g.map}function fx(u){for(var f=ur(u),g=f.length;g--;){var x=f[g],O=u[x];f[g]=[x,O,PL(O)]}return f}function Gs(u,f){var g=JCe(u,f);return Yj(g)?g:n}function UTe(u){var f=hn.call(u,Zs),g=u[Zs];try{u[Zs]=n;var x=!0}catch{}var O=_y.call(u);return x&&(f?u[Zs]=g:delete u[Zs]),O}var dx=Fw?function(u){return u==null?[]:(u=_n(u),Wa(Fw(u),function(f){return Dj.call(u,f)}))}:kx,$L=Fw?function(u){for(var f=[];u;)Va(f,dx(u)),u=Sy(u);return f}:kx,Ir=Fr;(qw&&Ir(new qw(new ArrayBuffer(1)))!=Be||jf&&Ir(new jf)!=Ze||Uw&&Ir(Uw.resolve())!=Te||$l&&Ir(new $l)!=Ue||Lf&&Ir(new Lf)!=ie)&&(Ir=function(u){var f=Fr(u),g=f==de?u.constructor:n,x=g?Ys(g):"";if(x)switch(x){case SOe:return Be;case EOe:return Ze;case AOe:return Te;case COe:return Ue;case OOe:return ie}return f});function BTe(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 zTe(u){var f=u.match(xl);return f?f[1].split(Z):[]}function kL(u,f,g){f=Xa(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&&Yy(O)&&sa(U,O)&&(Rt(u)||Js(u)))}function ZTe(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 IL(u){return typeof u.constructor=="function"&&!Vf(u)?Il(Sy(u)):{}}function HTe(u,f,g){var x=u.constructor;switch(f){case xe:return ox(u);case rt:case Ke:return new x(+u);case Be:return TTe(u,g);case ct:case pn:case rn:case Yt:case cn:case Cn:case ee:case ae:case ft:return pL(u,g);case Ze:return new x;case lt:case ot:return new x(u);case et:return $Te(u);case Ue:return new x;case It:return kTe(u)}}function WTe(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,`{
|
|
61
|
+
*/Gd.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,q=256,L=512,M=30,H="...",re=800,Q=16,G=1,V=2,F=3,Y=1/0,ne=9007199254740991,ce=17976931348623157e292,P=0/0,ue=4294967295,Oe=ue-1,D=ue>>>1,De=[["ary",j],["bind",w],["bindKey",_],["curry",S],["curryRight",A],["flip",L],["partial",E],["partialRight",T],["rearg",q]],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]",de="[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]",ye="[object WeakSet]",xe="[object ArrayBuffer]",Be="[object DataView]",ct="[object Float32Array]",pn="[object Float64Array]",rn="[object Int8Array]",Yt="[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,N=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,Jt=/[\\^$.*+?()[\]{}|]/g,bn=RegExp(Jt.source),Rn=/^\s+/,mr=/\s/,na=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,xl=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,Ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ze=/[()=,{}\[\]\/\s]/,yt=/\\(\\)?/g,Kt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,un=/\w*$/,Ft=/^[-+]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,Zi=/($^)/,dy=/['\n\r\u2028\u2029\\]/g,Qr="\\ud800-\\udfff",uCe="\\u0300-\\u036f",lCe="\\ufe20-\\ufe2f",cCe="\\u20d0-\\u20ff",YM=uCe+lCe+cCe,JM="\\u2700-\\u27bf",XM="a-z\\xdf-\\xf6\\xf8-\\xff",fCe="\\xac\\xb1\\xd7\\xf7",dCe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pCe="\\u2000-\\u206f",hCe=" \\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",QM="A-Z\\xc0-\\xd6\\xd8-\\xde",ej="\\ufe0e\\ufe0f",tj=fCe+dCe+pCe+hCe,xw="['’]",mCe="["+Qr+"]",nj="["+tj+"]",py="["+YM+"]",rj="\\d+",yCe="["+JM+"]",ij="["+XM+"]",oj="[^"+Qr+tj+rj+JM+XM+QM+"]",Sw="\\ud83c[\\udffb-\\udfff]",gCe="(?:"+py+"|"+Sw+")",aj="[^"+Qr+"]",Ew="(?:\\ud83c[\\udde6-\\uddff]){2}",Aw="[\\ud800-\\udbff][\\udc00-\\udfff]",Sl="["+QM+"]",sj="\\u200d",uj="(?:"+ij+"|"+oj+")",vCe="(?:"+Sl+"|"+oj+")",lj="(?:"+xw+"(?:d|ll|m|re|s|t|ve))?",cj="(?:"+xw+"(?:D|LL|M|RE|S|T|VE))?",fj=gCe+"?",dj="["+ej+"]?",bCe="(?:"+sj+"(?:"+[aj,Ew,Aw].join("|")+")"+dj+fj+")*",_Ce="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wCe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",pj=dj+fj+bCe,xCe="(?:"+[yCe,Ew,Aw].join("|")+")"+pj,SCe="(?:"+[aj+py+"?",py,Ew,Aw,mCe].join("|")+")",ECe=RegExp(xw,"g"),ACe=RegExp(py,"g"),Cw=RegExp(Sw+"(?="+Sw+")|"+SCe+pj,"g"),CCe=RegExp([Sl+"?"+ij+"+"+lj+"(?="+[nj,Sl,"$"].join("|")+")",vCe+"+"+cj+"(?="+[nj,Sl+uj,"$"].join("|")+")",Sl+"?"+uj+"+"+lj,Sl+"+"+cj,wCe,_Ce,rj,xCe].join("|"),"g"),OCe=RegExp("["+sj+Qr+YM+ej+"]"),TCe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$Ce=["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"],kCe=-1,$n={};$n[ct]=$n[pn]=$n[rn]=$n[Yt]=$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[de]=$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[Yt]=Sn[cn]=Sn[Ze]=Sn[lt]=Sn[de]=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 ICe={À:"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"},PCe={"&":"&","<":"<",">":">",'"':""","'":"'"},RCe={"&":"&","<":"<",">":">",""":'"',"'":"'"},NCe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},DCe=parseFloat,MCe=parseInt,hj=typeof se=="object"&&se&&se.Object===Object&&se,jCe=typeof self=="object"&&self&&self.Object===Object&&self,yr=hj||jCe||Function("return this")(),Ow=t&&!t.nodeType&&t,zs=Ow&&!0&&e&&!e.nodeType&&e,mj=zs&&zs.exports===Ow,Tw=mj&&hj.process,Ei=function(){try{var J=zs&&zs.require&&zs.require("util").types;return J||Tw&&Tw.binding&&Tw.binding("util")}catch{}}(),yj=Ei&&Ei.isArrayBuffer,gj=Ei&&Ei.isDate,vj=Ei&&Ei.isMap,bj=Ei&&Ei.isRegExp,_j=Ei&&Ei.isSet,wj=Ei&&Ei.isTypedArray;function di(J,ge,le){switch(le.length){case 0:return J.call(ge);case 1:return J.call(ge,le[0]);case 2:return J.call(ge,le[0],le[1]);case 3:return J.call(ge,le[0],le[1],le[2])}return J.apply(ge,le)}function LCe(J,ge,le,nt){for(var kt=-1,ln=J==null?0:J.length;++kt<ln;){var tr=J[kt];ge(nt,tr,le(tr),J)}return nt}function Ai(J,ge){for(var le=-1,nt=J==null?0:J.length;++le<nt&&ge(J[le],le,J)!==!1;);return J}function FCe(J,ge){for(var le=J==null?0:J.length;le--&&ge(J[le],le,J)!==!1;);return J}function xj(J,ge){for(var le=-1,nt=J==null?0:J.length;++le<nt;)if(!ge(J[le],le,J))return!1;return!0}function Wa(J,ge){for(var le=-1,nt=J==null?0:J.length,kt=0,ln=[];++le<nt;){var tr=J[le];ge(tr,le,J)&&(ln[kt++]=tr)}return ln}function hy(J,ge){var le=J==null?0:J.length;return!!le&&El(J,ge,0)>-1}function $w(J,ge,le){for(var nt=-1,kt=J==null?0:J.length;++nt<kt;)if(le(ge,J[nt]))return!0;return!1}function kn(J,ge){for(var le=-1,nt=J==null?0:J.length,kt=Array(nt);++le<nt;)kt[le]=ge(J[le],le,J);return kt}function Va(J,ge){for(var le=-1,nt=ge.length,kt=J.length;++le<nt;)J[kt+le]=ge[le];return J}function kw(J,ge,le,nt){var kt=-1,ln=J==null?0:J.length;for(nt&&ln&&(le=J[++kt]);++kt<ln;)le=ge(le,J[kt],kt,J);return le}function qCe(J,ge,le,nt){var kt=J==null?0:J.length;for(nt&&kt&&(le=J[--kt]);kt--;)le=ge(le,J[kt],kt,J);return le}function Iw(J,ge){for(var le=-1,nt=J==null?0:J.length;++le<nt;)if(ge(J[le],le,J))return!0;return!1}var UCe=Pw("length");function BCe(J){return J.split("")}function zCe(J){return J.match(Ce)||[]}function Sj(J,ge,le){var nt;return le(J,function(kt,ln,tr){if(ge(kt,ln,tr))return nt=ln,!1}),nt}function my(J,ge,le,nt){for(var kt=J.length,ln=le+(nt?1:-1);nt?ln--:++ln<kt;)if(ge(J[ln],ln,J))return ln;return-1}function El(J,ge,le){return ge===ge?tOe(J,ge,le):my(J,Ej,le)}function ZCe(J,ge,le,nt){for(var kt=le-1,ln=J.length;++kt<ln;)if(nt(J[kt],ge))return kt;return-1}function Ej(J){return J!==J}function Aj(J,ge){var le=J==null?0:J.length;return le?Nw(J,ge)/le:P}function Pw(J){return function(ge){return ge==null?n:ge[J]}}function Rw(J){return function(ge){return J==null?n:J[ge]}}function Cj(J,ge,le,nt,kt){return kt(J,function(ln,tr,_n){le=nt?(nt=!1,ln):ge(le,ln,tr,_n)}),le}function HCe(J,ge){var le=J.length;for(J.sort(ge);le--;)J[le]=J[le].value;return J}function Nw(J,ge){for(var le,nt=-1,kt=J.length;++nt<kt;){var ln=ge(J[nt]);ln!==n&&(le=le===n?ln:le+ln)}return le}function Dw(J,ge){for(var le=-1,nt=Array(J);++le<J;)nt[le]=ge(le);return nt}function WCe(J,ge){return kn(ge,function(le){return[le,J[le]]})}function Oj(J){return J&&J.slice(0,Ij(J)+1).replace(Rn,"")}function pi(J){return function(ge){return J(ge)}}function Mw(J,ge){return kn(ge,function(le){return J[le]})}function Df(J,ge){return J.has(ge)}function Tj(J,ge){for(var le=-1,nt=J.length;++le<nt&&El(ge,J[le],0)>-1;);return le}function $j(J,ge){for(var le=J.length;le--&&El(ge,J[le],0)>-1;);return le}function VCe(J,ge){for(var le=J.length,nt=0;le--;)J[le]===ge&&++nt;return nt}var KCe=Rw(ICe),GCe=Rw(PCe);function YCe(J){return"\\"+NCe[J]}function JCe(J,ge){return J==null?n:J[ge]}function Al(J){return OCe.test(J)}function XCe(J){return TCe.test(J)}function QCe(J){for(var ge,le=[];!(ge=J.next()).done;)le.push(ge.value);return le}function jw(J){var ge=-1,le=Array(J.size);return J.forEach(function(nt,kt){le[++ge]=[kt,nt]}),le}function kj(J,ge){return function(le){return J(ge(le))}}function Ka(J,ge){for(var le=-1,nt=J.length,kt=0,ln=[];++le<nt;){var tr=J[le];(tr===ge||tr===d)&&(J[le]=d,ln[kt++]=le)}return ln}function yy(J){var ge=-1,le=Array(J.size);return J.forEach(function(nt){le[++ge]=nt}),le}function eOe(J){var ge=-1,le=Array(J.size);return J.forEach(function(nt){le[++ge]=[nt,nt]}),le}function tOe(J,ge,le){for(var nt=le-1,kt=J.length;++nt<kt;)if(J[nt]===ge)return nt;return-1}function nOe(J,ge,le){for(var nt=le+1;nt--;)if(J[nt]===ge)return nt;return nt}function Cl(J){return Al(J)?iOe(J):UCe(J)}function Hi(J){return Al(J)?oOe(J):BCe(J)}function Ij(J){for(var ge=J.length;ge--&&mr.test(J.charAt(ge)););return ge}var rOe=Rw(RCe);function iOe(J){for(var ge=Cw.lastIndex=0;Cw.test(J);)++ge;return ge}function oOe(J){return J.match(Cw)||[]}function aOe(J){return J.match(CCe)||[]}var sOe=function J(ge){ge=ge==null?yr:Ol.defaults(yr.Object(),ge,Ol.pick(yr,$Ce));var le=ge.Array,nt=ge.Date,kt=ge.Error,ln=ge.Function,tr=ge.Math,_n=ge.Object,Lw=ge.RegExp,uOe=ge.String,Ci=ge.TypeError,gy=le.prototype,lOe=ln.prototype,Tl=_n.prototype,vy=ge["__core-js_shared__"],by=lOe.toString,hn=Tl.hasOwnProperty,cOe=0,Pj=function(){var u=/[^.]+$/.exec(vy&&vy.keys&&vy.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}(),_y=Tl.toString,fOe=by.call(_n),dOe=yr._,pOe=Lw("^"+by.call(hn).replace(Jt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wy=mj?ge.Buffer:n,Ga=ge.Symbol,xy=ge.Uint8Array,Rj=wy?wy.allocUnsafe:n,Sy=kj(_n.getPrototypeOf,_n),Nj=_n.create,Dj=Tl.propertyIsEnumerable,Ey=gy.splice,Mj=Ga?Ga.isConcatSpreadable:n,Mf=Ga?Ga.iterator:n,Zs=Ga?Ga.toStringTag:n,Ay=function(){try{var u=Gs(_n,"defineProperty");return u({},"",{}),u}catch{}}(),hOe=ge.clearTimeout!==yr.clearTimeout&&ge.clearTimeout,mOe=nt&&nt.now!==yr.Date.now&&nt.now,yOe=ge.setTimeout!==yr.setTimeout&&ge.setTimeout,Cy=tr.ceil,Oy=tr.floor,Fw=_n.getOwnPropertySymbols,gOe=wy?wy.isBuffer:n,jj=ge.isFinite,vOe=gy.join,bOe=kj(_n.keys,_n),nr=tr.max,kr=tr.min,_Oe=nt.now,wOe=ge.parseInt,Lj=tr.random,xOe=gy.reverse,qw=Gs(ge,"DataView"),jf=Gs(ge,"Map"),Uw=Gs(ge,"Promise"),$l=Gs(ge,"Set"),Lf=Gs(ge,"WeakMap"),Ff=Gs(_n,"create"),Ty=Lf&&new Lf,kl={},SOe=Ys(qw),EOe=Ys(jf),AOe=Ys(Uw),COe=Ys($l),OOe=Ys(Lf),$y=Ga?Ga.prototype:n,qf=$y?$y.valueOf:n,Fj=$y?$y.toString:n;function $(u){if(Ln(u)&&!Rt(u)&&!(u instanceof Gt)){if(u instanceof Oi)return u;if(hn.call(u,"__wrapped__"))return qL(u)}return new Oi(u)}var Il=function(){function u(){}return function(f){if(!Nn(f))return{};if(Nj)return Nj(f);u.prototype=f;var g=new u;return u.prototype=n,g}}();function ky(){}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=ky.prototype,$.prototype.constructor=$,Oi.prototype=Il(ky.prototype),Oi.prototype.constructor=Oi;function Gt(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ue,this.__views__=[]}function TOe(){var u=new Gt(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 $Oe(){if(this.__filtered__){var u=new Gt(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}function kOe(){var u=this.__wrapped__.value(),f=this.__dir__,g=Rt(u),x=f<0,O=g?u.length:0,I=BTe(0,O,this.__views__),U=I.start,W=I.end,te=W-U,be=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 lL(u,this.__actions__);var wt=[];e:for(;te--&&Ve<at;){be+=f;for(var qt=-1,xt=u[be];++qt<Ee;){var Ht=we[qt],Xt=Ht.iteratee,yi=Ht.type,Ur=Xt(xt);if(yi==V)xt=Ur;else if(!Ur){if(yi==G)continue e;break e}}wt[Ve++]=xt}return wt}Gt.prototype=Il(ky.prototype),Gt.prototype.constructor=Gt;function Hs(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 IOe(){this.__data__=Ff?Ff(null):{},this.size=0}function POe(u){var f=this.has(u)&&delete this.__data__[u];return this.size-=f?1:0,f}function ROe(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 NOe(u){var f=this.__data__;return Ff?f[u]!==n:hn.call(f,u)}function DOe(u,f){var g=this.__data__;return this.size+=this.has(u)?0:1,g[u]=Ff&&f===n?l:f,this}Hs.prototype.clear=IOe,Hs.prototype.delete=POe,Hs.prototype.get=ROe,Hs.prototype.has=NOe,Hs.prototype.set=DOe;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 MOe(){this.__data__=[],this.size=0}function jOe(u){var f=this.__data__,g=Iy(f,u);if(g<0)return!1;var x=f.length-1;return g==x?f.pop():Ey.call(f,g,1),--this.size,!0}function LOe(u){var f=this.__data__,g=Iy(f,u);return g<0?n:f[g][1]}function FOe(u){return Iy(this.__data__,u)>-1}function qOe(u,f){var g=this.__data__,x=Iy(g,u);return x<0?(++this.size,g.push([u,f])):g[x][1]=f,this}ra.prototype.clear=MOe,ra.prototype.delete=jOe,ra.prototype.get=LOe,ra.prototype.has=FOe,ra.prototype.set=qOe;function ia(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 UOe(){this.size=0,this.__data__={hash:new Hs,map:new(jf||ra),string:new Hs}}function BOe(u){var f=zy(this,u).delete(u);return this.size-=f?1:0,f}function zOe(u){return zy(this,u).get(u)}function ZOe(u){return zy(this,u).has(u)}function HOe(u,f){var g=zy(this,u),x=g.size;return g.set(u,f),this.size+=g.size==x?0:1,this}ia.prototype.clear=UOe,ia.prototype.delete=BOe,ia.prototype.get=zOe,ia.prototype.has=ZOe,ia.prototype.set=HOe;function Ws(u){var f=-1,g=u==null?0:u.length;for(this.__data__=new ia;++f<g;)this.add(u[f])}function WOe(u){return this.__data__.set(u,l),this}function VOe(u){return this.__data__.has(u)}Ws.prototype.add=Ws.prototype.push=WOe,Ws.prototype.has=VOe;function Wi(u){var f=this.__data__=new ra(u);this.size=f.size}function KOe(){this.__data__=new ra,this.size=0}function GOe(u){var f=this.__data__,g=f.delete(u);return this.size=f.size,g}function YOe(u){return this.__data__.get(u)}function JOe(u){return this.__data__.has(u)}function XOe(u,f){var g=this.__data__;if(g instanceof ra){var x=g.__data__;if(!jf||x.length<i-1)return x.push([u,f]),this.size=++g.size,this;g=this.__data__=new ia(x)}return g.set(u,f),this.size=g.size,this}Wi.prototype.clear=KOe,Wi.prototype.delete=GOe,Wi.prototype.get=YOe,Wi.prototype.has=JOe,Wi.prototype.set=XOe;function qj(u,f){var g=Rt(u),x=!g&&Js(u),O=!g&&!x&&es(u),I=!g&&!x&&!O&&Dl(u),U=g||x||O||I,W=U?Dw(u.length,uOe):[],te=W.length;for(var be in u)(f||hn.call(u,be))&&!(U&&(be=="length"||O&&(be=="offset"||be=="parent")||I&&(be=="buffer"||be=="byteLength"||be=="byteOffset")||ua(be,te)))&&W.push(be);return W}function Uj(u){var f=u.length;return f?u[Xw(0,f-1)]:n}function QOe(u,f){return Zy(ei(u),Vs(f,0,u.length))}function eTe(u){return Zy(ei(u))}function Bw(u,f,g){(g!==n&&!Vi(u[f],g)||g===n&&!(f in u))&&oa(u,f,g)}function Uf(u,f,g){var x=u[f];(!(hn.call(u,f)&&Vi(x,g))||g===n&&!(f in u))&&oa(u,f,g)}function Iy(u,f){for(var g=u.length;g--;)if(Vi(u[g][0],f))return g;return-1}function tTe(u,f,g,x){return Ya(u,function(O,I,U){f(x,O,g(O),U)}),x}function Bj(u,f){return u&&Ao(f,ur(f),u)}function nTe(u,f){return u&&Ao(f,ni(f),u)}function oa(u,f,g){f=="__proto__"&&Ay?Ay(u,f,{configurable:!0,enumerable:!0,value:g,writable:!0}):u[f]=g}function zw(u,f){for(var g=-1,x=f.length,O=le(x),I=u==null;++g<x;)O[g]=I?n:Sx(u,f[g]);return O}function Vs(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,be=f&h;if(g&&(U=O?g(u,x,O,I):g(u)),U!==n)return U;if(!Nn(u))return u;var we=Rt(u);if(we){if(U=ZTe(u),!W)return ei(u,U)}else{var Ee=Ir(u),Ve=Ee==Fe||Ee==$e;if(es(u))return dL(u,W);if(Ee==de||Ee==qe||Ve&&!O){if(U=te||Ve?{}:IL(u),!W)return te?RTe(u,nTe(U,u)):PTe(u,Bj(U,u))}else{if(!Sn[Ee])return O?u:{};U=HTe(u,Ee,W)}}I||(I=new Wi);var at=I.get(u);if(at)return at;I.set(u,U),aF(u)?u.forEach(function(xt){U.add(Ti(xt,f,g,xt,u,I))}):iF(u)&&u.forEach(function(xt,Ht){U.set(Ht,Ti(xt,f,g,Ht,u,I))});var wt=be?te?lx:ux:te?ni:ur,qt=we?n:wt(u);return Ai(qt||u,function(xt,Ht){qt&&(Ht=xt,xt=u[Ht]),Uf(U,Ht,Ti(xt,f,g,Ht,u,I))}),U}function rTe(u){var f=ur(u);return function(g){return zj(g,u,f)}}function zj(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 Zj(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=hy,U=!0,W=u.length,te=[],be=f.length;if(!W)return te;g&&(f=kn(f,pi(g))),x?(I=$w,U=!1):f.length>=i&&(I=Df,U=!1,f=new Ws(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=be;Ve--;)if(f[Ve]===Ee)continue e;te.push(we)}else I(f,Ee,x)||te.push(we)}return te}var Ya=gL(Eo),Hj=gL(Hw,!0);function iTe(u,f){var g=!0;return Ya(u,function(x,O,I){return g=!!f(x,O,I),g}),g}function Py(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 oTe(u,f,g,x){var O=u.length;for(g=Dt(g),g<0&&(g=-g>O?0:O+g),x=x===n||x>O?O:Dt(x),x<0&&(x+=O),x=g>x?0:uF(x);g<x;)u[g++]=f;return u}function Wj(u,f){var g=[];return Ya(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=VTe),O||(O=[]);++I<U;){var W=u[I];f>0&&g(W)?f>1?gr(W,f-1,g,x,O):Va(O,W):x||(O[O.length]=W)}return O}var Zw=vL(),Vj=vL(!0);function Eo(u,f){return u&&Zw(u,f,ur)}function Hw(u,f){return u&&Vj(u,f,ur)}function Ry(u,f){return Wa(f,function(g){return la(u[g])})}function Ks(u,f){f=Xa(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 Kj(u,f,g){var x=f(u);return Rt(u)?x:Va(x,g(u))}function Fr(u){return u==null?u===n?mt:K:Zs&&Zs in _n(u)?UTe(u):e$e(u)}function Ww(u,f){return u>f}function aTe(u,f){return u!=null&&hn.call(u,f)}function sTe(u,f){return u!=null&&f in _n(u)}function uTe(u,f,g){return u>=kr(f,g)&&u<nr(f,g)}function Vw(u,f,g){for(var x=g?$w:hy,O=u[0].length,I=u.length,U=I,W=le(I),te=1/0,be=[];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 Ws(U&&we):n}we=u[0];var Ee=-1,Ve=W[0];e:for(;++Ee<O&&be.length<te;){var at=we[Ee],wt=f?f(at):at;if(at=g||at!==0?at:0,!(Ve?Df(Ve,wt):x(be,wt,g))){for(U=I;--U;){var qt=W[U];if(!(qt?Df(qt,wt):x(u[U],wt,g)))continue e}Ve&&Ve.push(wt),be.push(at)}}return be}function lTe(u,f,g,x){return Eo(u,function(O,I,U){f(x,g(O),I,U)}),x}function zf(u,f,g){f=Xa(f,u),u=DL(u,f);var x=u==null?u:u[Co(ki(f))];return x==null?n:di(x,u,g)}function Gj(u){return Ln(u)&&Fr(u)==qe}function cTe(u){return Ln(u)&&Fr(u)==xe}function fTe(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:dTe(u,f,g,x,Zf,O)}function dTe(u,f,g,x,O,I){var U=Rt(u),W=Rt(f),te=U?Me:Ir(u),be=W?Me:Ir(f);te=te==qe?de:te,be=be==qe?de:be;var we=te==de,Ee=be==de,Ve=te==be;if(Ve&&es(u)){if(!es(f))return!1;U=!0,we=!1}if(Ve&&!we)return I||(I=new Wi),U||Dl(u)?TL(u,f,g,x,O,I):FTe(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 qt=at?u.value():u,xt=wt?f.value():f;return I||(I=new Wi),O(qt,xt,g,x,I)}}return Ve?(I||(I=new Wi),qTe(u,f,g,x,O,I)):!1}function pTe(u){return Ln(u)&&Ir(u)==Ze}function Kw(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],be=u[te],we=W[1];if(U&&W[2]){if(be===n&&!(te in u))return!1}else{var Ee=new Wi;if(x)var Ve=x(be,we,te,u,f,Ee);if(!(Ve===n?Zf(we,be,y|v,x,Ee):Ve))return!1}}return!0}function Yj(u){if(!Nn(u)||GTe(u))return!1;var f=la(u)?pOe:jn;return f.test(Ys(u))}function hTe(u){return Ln(u)&&Fr(u)==et}function mTe(u){return Ln(u)&&Ir(u)==Ue}function yTe(u){return Ln(u)&&Yy(u.length)&&!!$n[Fr(u)]}function Jj(u){return typeof u=="function"?u:u==null?ri:typeof u=="object"?Rt(u)?eL(u[0],u[1]):Qj(u):bF(u)}function Gw(u){if(!Vf(u))return bOe(u);var f=[];for(var g in _n(u))hn.call(u,g)&&g!="constructor"&&f.push(g);return f}function gTe(u){if(!Nn(u))return QTe(u);var f=Vf(u),g=[];for(var x in u)x=="constructor"&&(f||!hn.call(u,x))||g.push(x);return g}function Yw(u,f){return u<f}function Xj(u,f){var g=-1,x=ti(u)?le(u.length):[];return Ya(u,function(O,I,U){x[++g]=f(O,I,U)}),x}function Qj(u){var f=fx(u);return f.length==1&&f[0][2]?RL(f[0][0],f[0][1]):function(g){return g===u||Kw(g,u,f)}}function eL(u,f){return px(u)&&PL(f)?RL(Co(u),f):function(g){var x=Sx(g,u);return x===n&&x===f?Ex(g,u):Zf(f,x,y|v)}}function Ny(u,f,g,x,O){u!==f&&Zw(f,function(I,U){if(O||(O=new Wi),Nn(I))vTe(u,f,U,g,Ny,x,O);else{var W=x?x(mx(u,U),I,U+"",u,f,O):n;W===n&&(W=I),Bw(u,U,W)}},ni)}function vTe(u,f,g,x,O,I,U){var W=mx(u,g),te=mx(f,g),be=U.get(te);if(be){Bw(u,g,be);return}var we=I?I(W,te,g+"",u,f,U):n,Ee=we===n;if(Ee){var Ve=Rt(te),at=!Ve&&es(te),wt=!Ve&&!at&&Dl(te);we=te,Ve||at||wt?Rt(W)?we=W:qn(W)?we=ei(W):at?(Ee=!1,we=dL(te,!0)):wt?(Ee=!1,we=pL(te,!0)):we=[]:Gf(te)||Js(te)?(we=W,Js(W)?we=lF(W):(!Nn(W)||la(W))&&(we=IL(te))):Ee=!1}Ee&&(U.set(te,we),O(we,te,x,I,U),U.delete(te)),Bw(u,g,we)}function tL(u,f){var g=u.length;if(g)return f+=f<0?g:0,ua(f,g)?u[f]:n}function nL(u,f,g){f.length?f=kn(f,function(I){return Rt(I)?function(U){return Ks(U,I.length===1?I[0]:I)}:I}):f=[ri];var x=-1;f=kn(f,pi(vt()));var O=Xj(u,function(I,U,W){var te=kn(f,function(be){return be(I)});return{criteria:te,index:++x,value:I}});return HCe(O,function(I,U){return ITe(I,U,g)})}function bTe(u,f){return rL(u,f,function(g,x){return Ex(u,x)})}function rL(u,f,g){for(var x=-1,O=f.length,I={};++x<O;){var U=f[x],W=Ks(u,U);g(W,U)&&Hf(I,Xa(U,u),W)}return I}function _Te(u){return function(f){return Ks(f,u)}}function Jw(u,f,g,x){var O=x?ZCe:El,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,be=f[I],we=g?g(be):be;(te=O(W,we,te,x))>-1;)W!==u&&Ey.call(W,te,1),Ey.call(u,te,1);return u}function iL(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;ua(O)?Ey.call(u,O,1):tx(u,O)}}return u}function Xw(u,f){return u+Oy(Lj()*(f-u+1))}function wTe(u,f,g,x){for(var O=-1,I=nr(Cy((f-u)/(g||1)),0),U=le(I);I--;)U[x?I:++O]=u,u+=g;return U}function Qw(u,f){var g="";if(!u||f<1||f>ne)return g;do f%2&&(g+=u),f=Oy(f/2),f&&(u+=u);while(f);return g}function Ut(u,f){return yx(NL(u,f,ri),u+"")}function xTe(u){return Uj(Ml(u))}function STe(u,f){var g=Ml(u);return Zy(g,Vs(f,0,g.length))}function Hf(u,f,g,x){if(!Nn(u))return u;f=Xa(f,u);for(var O=-1,I=f.length,U=I-1,W=u;W!=null&&++O<I;){var te=Co(f[O]),be=g;if(te==="__proto__"||te==="constructor"||te==="prototype")return u;if(O!=U){var we=W[te];be=x?x(we,te,W):n,be===n&&(be=Nn(we)?we:ua(f[O+1])?[]:{})}Uf(W,te,be),W=W[te]}return u}var oL=Ty?function(u,f){return Ty.set(u,f),u}:ri,ETe=Ay?function(u,f){return Ay(u,"toString",{configurable:!0,enumerable:!1,value:Cx(f),writable:!0})}:ri;function ATe(u){return Zy(Ml(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 CTe(u,f){var g;return Ya(u,function(x,O,I){return g=f(x,O,I),!g}),!!g}function Dy(u,f,g){var x=0,O=u==null?x:u.length;if(typeof f=="number"&&f===f&&O<=D){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 ex(u,f,ri,g)}function ex(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),be=f===n;O<I;){var we=Oy((O+I)/2),Ee=g(u[we]),Ve=Ee!==n,at=Ee===null,wt=Ee===Ee,qt=mi(Ee);if(U)var xt=x||wt;else be?xt=wt&&(x||Ve):W?xt=wt&&Ve&&(x||!at):te?xt=wt&&Ve&&!at&&(x||!qt):at||qt?xt=!1:xt=x?Ee<=f:Ee<f;xt?O=we+1:I=we}return kr(I,Oe)}function aL(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||!Vi(W,te)){var te=W;I[O++]=U===0?0:U}}return I}function sL(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 Fj?Fj.call(u):"";var f=u+"";return f=="0"&&1/u==-Y?"-0":f}function Ja(u,f,g){var x=-1,O=hy,I=u.length,U=!0,W=[],te=W;if(g)U=!1,O=$w;else if(I>=i){var be=f?null:jTe(u);if(be)return yy(be);U=!1,O=Df,te=new Ws}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 tx(u,f){return f=Xa(f,u),u=DL(u,f),u==null||delete u[Co(ki(f))]}function uL(u,f,g,x){return Hf(u,f,g(Ks(u,f)),x)}function My(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 lL(u,f){var g=u;return g instanceof Gt&&(g=g.value()),kw(f,function(x,O){return O.func.apply(O.thisArg,Va([x],O.args))},g)}function nx(u,f,g){var x=u.length;if(x<2)return x?Ja(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 Ja(gr(I,1),f,g)}function cL(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 rx(u){return qn(u)?u:[]}function ix(u){return typeof u=="function"?u:ri}function Xa(u,f){return Rt(u)?u:px(u,f)?[u]:FL(fn(u))}var OTe=Ut;function Qa(u,f,g){var x=u.length;return g=g===n?x:g,!f&&g>=x?u:$i(u,f,g)}var fL=hOe||function(u){return yr.clearTimeout(u)};function dL(u,f){if(f)return u.slice();var g=u.length,x=Rj?Rj(g):new u.constructor(g);return u.copy(x),x}function ox(u){var f=new u.constructor(u.byteLength);return new xy(f).set(new xy(u)),f}function TTe(u,f){var g=f?ox(u.buffer):u.buffer;return new u.constructor(g,u.byteOffset,u.byteLength)}function $Te(u){var f=new u.constructor(u.source,un.exec(u));return f.lastIndex=u.lastIndex,f}function kTe(u){return qf?_n(qf.call(u)):{}}function pL(u,f){var g=f?ox(u.buffer):u.buffer;return new u.constructor(g,u.byteOffset,u.length)}function hL(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,be=mi(f);if(!W&&!be&&!I&&u>f||I&&U&&te&&!W&&!be||x&&U&&te||!g&&te||!O)return 1;if(!x&&!I&&!be&&u<f||be&&g&&O&&!x&&!I||W&&g&&O||!U&&O||!te)return-1}return 0}function ITe(u,f,g){for(var x=-1,O=u.criteria,I=f.criteria,U=O.length,W=g.length;++x<U;){var te=hL(O[x],I[x]);if(te){if(x>=W)return te;var be=g[x];return te*(be=="desc"?-1:1)}}return u.index-f.index}function mL(u,f,g,x){for(var O=-1,I=u.length,U=g.length,W=-1,te=f.length,be=nr(I-U,0),we=le(te+be),Ee=!x;++W<te;)we[W]=f[W];for(;++O<U;)(Ee||O<I)&&(we[g[O]]=u[O]);for(;be--;)we[W++]=u[O++];return we}function yL(u,f,g,x){for(var O=-1,I=u.length,U=-1,W=g.length,te=-1,be=f.length,we=nr(I-W,0),Ee=le(we+be),Ve=!x;++O<we;)Ee[O]=u[O];for(var at=O;++te<be;)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?oa(g,W,te):Uf(g,W,te)}return g}function PTe(u,f){return Ao(u,dx(u),f)}function RTe(u,f){return Ao(u,$L(u),f)}function jy(u,f){return function(g,x){var O=Rt(g)?LCe:tTe,I=f?f():{};return O(g,u,vt(x,2),I)}}function Pl(u){return Ut(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 gL(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 vL(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 NTe(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 bL(u){return function(f){f=fn(f);var g=Al(f)?Hi(f):n,x=g?g[0]:f.charAt(0),O=g?Qa(g,1).join(""):f.slice(1);return x[u]()+O}}function Rl(u){return function(f){return kw(gF(yF(f).replace(ECe,"")),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=Il(u.prototype),x=u.apply(g,f);return Nn(x)?x:g}}function DTe(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 be=I<3&&U[0]!==te&&U[I-1]!==te?[]:Ka(U,te);if(I-=be.length,I<g)return EL(u,f,Ly,O.placeholder,n,U,be,n,n,g-I);var we=this&&this!==yr&&this instanceof O?x:u;return di(we,this,U)}return O}function _L(u){return function(f,g,x){var O=_n(f);if(!ti(f)){var I=vt(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 wL(u){return sa(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&&By(I)=="wrapper")var U=new Oi([],!0)}for(x=U?x:g;++x<g;){I=f[x];var W=By(I),te=W=="wrapper"?cx(I):n;te&&hx(te[0])&&te[1]==(j|S|E|q)&&!te[4].length&&te[9]==1?U=U[By(te[0])].apply(U,te[3]):U=I.length==1&&hx(I)?U[W]():U.thru(I)}return function(){var be=arguments,we=be[0];if(U&&be.length==1&&Rt(we))return U.plant(we).value();for(var Ee=0,Ve=g?f[Ee].apply(this,be):we;++Ee<g;)Ve=f[Ee].call(this,Ve);return Ve}})}function Ly(u,f,g,x,O,I,U,W,te,be){var we=f&j,Ee=f&w,Ve=f&_,at=f&(S|A),wt=f&L,qt=Ve?n:Wf(u);function xt(){for(var Ht=arguments.length,Xt=le(Ht),yi=Ht;yi--;)Xt[yi]=arguments[yi];if(at)var Ur=Nl(xt),gi=VCe(Xt,Ur);if(x&&(Xt=mL(Xt,x,O,at)),I&&(Xt=yL(Xt,I,U,at)),Ht-=gi,at&&Ht<be){var Un=Ka(Xt,Ur);return EL(u,f,Ly,xt.placeholder,g,Xt,Un,W,te,be-Ht)}var Ki=Ee?g:this,fa=Ve?Ki[u]:u;return Ht=Xt.length,W?Xt=t$e(Xt,W):wt&&Ht>1&&Xt.reverse(),we&&te<Ht&&(Xt.length=te),this&&this!==yr&&this instanceof xt&&(fa=qt||Wf(fa)),fa.apply(Ki,Xt)}return xt}function xL(u,f){return function(g,x){return lTe(g,u,f(x),{})}}function Fy(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=sL(g),x=sL(x)),O=u(g,x)}return O}}function ax(u){return sa(function(f){return f=kn(f,pi(vt())),Ut(function(g){var x=this;return u(f,function(O){return di(O,x,g)})})})}function qy(u,f){f=f===n?" ":hi(f);var g=f.length;if(g<2)return g?Qw(f,u):f;var x=Qw(f,Cy(u/Cl(f)));return Al(f)?Qa(Hi(x),0,u).join(""):x.slice(0,u)}function MTe(u,f,g,x){var O=f&w,I=Wf(u);function U(){for(var W=-1,te=arguments.length,be=-1,we=x.length,Ee=le(we+te),Ve=this&&this!==yr&&this instanceof U?I:u;++be<we;)Ee[be]=x[be];for(;te--;)Ee[be++]=arguments[++W];return di(Ve,O?g:this,Ee)}return U}function SL(u){return function(f,g,x){return x&&typeof x!="number"&&qr(f,g,x)&&(g=x=n),f=ca(f),g===n?(g=f,f=0):g=ca(g),x=x===n?f<g?1:-1:ca(x),wTe(f,g,x,u)}}function Uy(u){return function(f,g){return typeof f=="string"&&typeof g=="string"||(f=Ii(f),g=Ii(g)),u(f,g)}}function EL(u,f,g,x,O,I,U,W,te,be){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 qt=[u,f,O,at,Ee,wt,Ve,W,te,be],xt=g.apply(n,qt);return hx(u)&&ML(xt,qt),xt.placeholder=x,jL(xt,u,f)}function sx(u){var f=tr[u];return function(g,x){if(g=Ii(g),x=x==null?0:kr(Dt(x),292),x&&jj(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 jTe=$l&&1/yy(new $l([,-0]))[1]==Y?function(u){return new $l(u)}:$x;function AL(u){return function(f){var g=Ir(f);return g==Ze?jw(f):g==Ue?eOe(f):WCe(f,u(f))}}function aa(u,f,g,x,O,I,U,W){var te=f&_;if(!te&&typeof u!="function")throw new Ci(a);var be=x?x.length:0;if(be||(f&=~(E|T),x=O=n),U=U===n?U:nr(Dt(U),0),W=W===n?W:Dt(W),be-=O?O.length:0,f&T){var we=x,Ee=O;x=O=n}var Ve=te?n:cx(u),at=[u,f,g,x,O,we,Ee,I,U,W];if(Ve&&XTe(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]-be,0),!W&&f&(S|A)&&(f&=~(S|A)),!f||f==w)var wt=NTe(u,f,g);else f==S||f==A?wt=DTe(u,f,W):(f==E||f==(w|E))&&!O.length?wt=MTe(u,f,g,x):wt=Ly.apply(n,at);var qt=Ve?oL:ML;return jL(qt(wt,at),u,f)}function CL(u,f,g,x){return u===n||Vi(u,Tl[g])&&!hn.call(x,g)?f:u}function OL(u,f,g,x,O,I){return Nn(u)&&Nn(f)&&(I.set(f,u),Ny(u,f,n,OL,I),I.delete(f)),u}function LTe(u){return Gf(u)?n:u}function TL(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 be=I.get(u),we=I.get(f);if(be&&we)return be==f&&we==u;var Ee=-1,Ve=!0,at=g&v?new Ws:n;for(I.set(u,f),I.set(f,u);++Ee<W;){var wt=u[Ee],qt=f[Ee];if(x)var xt=U?x(qt,wt,Ee,f,u,I):x(wt,qt,Ee,u,f,I);if(xt!==n){if(xt)continue;Ve=!1;break}if(at){if(!Iw(f,function(Ht,Xt){if(!Df(at,Xt)&&(wt===Ht||O(wt,Ht,g,x,I)))return at.push(Xt)})){Ve=!1;break}}else if(!(wt===qt||O(wt,qt,g,x,I))){Ve=!1;break}}return I.delete(u),I.delete(f),Ve}function FTe(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 xy(u),new xy(f)));case rt:case Ke:case lt:return Vi(+u,+f);case Ae:return u.name==f.name&&u.message==f.message;case et:case ot:return u==f+"";case Ze:var W=jw;case Ue:var te=x&y;if(W||(W=yy),u.size!=f.size&&!te)return!1;var be=U.get(u);if(be)return be==f;x|=v,U.set(u,f);var we=TL(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 qTe(u,f,g,x,O,I){var U=g&y,W=ux(u),te=W.length,be=ux(f),we=be.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 qt=!0;I.set(u,f),I.set(f,u);for(var xt=U;++Ee<te;){Ve=W[Ee];var Ht=u[Ve],Xt=f[Ve];if(x)var yi=U?x(Xt,Ht,Ve,f,u,I):x(Ht,Xt,Ve,u,f,I);if(!(yi===n?Ht===Xt||O(Ht,Xt,g,x,I):yi)){qt=!1;break}xt||(xt=Ve=="constructor")}if(qt&&!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)&&(qt=!1)}return I.delete(u),I.delete(f),qt}function sa(u){return yx(NL(u,n,zL),u+"")}function ux(u){return Kj(u,ur,dx)}function lx(u){return Kj(u,ni,$L)}var cx=Ty?function(u){return Ty.get(u)}:$x;function By(u){for(var f=u.name+"",g=kl[f],x=hn.call(kl,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 vt(){var u=$.iteratee||Ox;return u=u===Ox?Jj:u,arguments.length?u(arguments[0],arguments[1]):u}function zy(u,f){var g=u.__data__;return KTe(f)?g[typeof f=="string"?"string":"hash"]:g.map}function fx(u){for(var f=ur(u),g=f.length;g--;){var x=f[g],O=u[x];f[g]=[x,O,PL(O)]}return f}function Gs(u,f){var g=JCe(u,f);return Yj(g)?g:n}function UTe(u){var f=hn.call(u,Zs),g=u[Zs];try{u[Zs]=n;var x=!0}catch{}var O=_y.call(u);return x&&(f?u[Zs]=g:delete u[Zs]),O}var dx=Fw?function(u){return u==null?[]:(u=_n(u),Wa(Fw(u),function(f){return Dj.call(u,f)}))}:kx,$L=Fw?function(u){for(var f=[];u;)Va(f,dx(u)),u=Sy(u);return f}:kx,Ir=Fr;(qw&&Ir(new qw(new ArrayBuffer(1)))!=Be||jf&&Ir(new jf)!=Ze||Uw&&Ir(Uw.resolve())!=Te||$l&&Ir(new $l)!=Ue||Lf&&Ir(new Lf)!=ie)&&(Ir=function(u){var f=Fr(u),g=f==de?u.constructor:n,x=g?Ys(g):"";if(x)switch(x){case SOe:return Be;case EOe:return Ze;case AOe:return Te;case COe:return Ue;case OOe:return ie}return f});function BTe(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 zTe(u){var f=u.match(xl);return f?f[1].split(Z):[]}function kL(u,f,g){f=Xa(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&&Yy(O)&&ua(U,O)&&(Rt(u)||Js(u)))}function ZTe(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 IL(u){return typeof u.constructor=="function"&&!Vf(u)?Il(Sy(u)):{}}function HTe(u,f,g){var x=u.constructor;switch(f){case xe:return ox(u);case rt:case Ke:return new x(+u);case Be:return TTe(u,g);case ct:case pn:case rn:case Yt:case cn:case Cn:case ee:case ae:case ft:return pL(u,g);case Ze:return new x;case lt:case ot:return new x(u);case et:return $Te(u);case Ue:return new x;case It:return kTe(u)}}function WTe(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(na,`{
|
|
62
62
|
/* [wrapped with `+f+`] */
|
|
63
|
-
`)}function VTe(u){return Rt(u)||Js(u)||!!(Mj&&u&&u[Mj])}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(!Nn(g))return!1;var x=typeof f;return(x=="number"?ti(g)&&sa(f,g.length):x=="string"&&f in g)?Vi(g[f],u):!1}function px(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 KTe(u){var f=typeof u;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?u!=="__proto__":u===null}function hx(u){var f=By(u),g=$[f];if(typeof g!="function"||!(f in Gt.prototype))return!1;if(u===g)return!0;var x=cx(g);return!!x&&u===x[0]}function GTe(u){return!!Pj&&Pj in u}var YTe=vy?ua:Ix;function Vf(u){var f=u&&u.constructor,g=typeof f=="function"&&f.prototype||Tl;return u===g}function PL(u){return u===u&&!Nn(u)}function RL(u,f){return function(g){return g==null?!1:g[u]===f&&(f!==n||u in _n(g))}}function JTe(u){var f=Ky(u,function(x){return g.size===c&&g.clear(),x}),g=f.cache;return f}function XTe(u,f){var g=u[1],x=f[1],O=g|x,I=O<(w|_|j),U=x==j&&g==S||x==j&&g==q&&u[7].length<=f[8]||x==(j|q)&&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?mL(te,W,f[4]):W,u[4]=te?Ka(u[3],d):f[4]}return W=f[5],W&&(te=u[5],u[5]=te?yL(te,W,f[6]):W,u[6]=te?Ka(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 QTe(u){var f=[];if(u!=null)for(var g in _n(u))f.push(g);return f}function e$e(u){return _y.call(u)}function NL(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 DL(u,f){return f.length<2?u:Ks(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 mx(u,f){if(!(f==="constructor"&&typeof u[f]=="function")&&f!="__proto__")return u[f]}var ML=LL(oL),Kf=yOe||function(u,f){return yr.setTimeout(u,f)},yx=LL(ETe);function jL(u,f,g){var x=f+"";return yx(u,WTe(x,n$e(zTe(x),g)))}function LL(u){var f=0,g=0;return function(){var x=_Oe(),O=Q-(x-g);if(g=x,O>0){if(++f>=re)return arguments[0]}else f=0;return u.apply(n,arguments)}}function Zy(u,f){var g=-1,x=u.length,O=x-1;for(f=f===n?x:f;++g<f;){var I=Xw(g,O),U=u[I];u[I]=u[g],u[g]=U}return u.length=f,u}var FL=JTe(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 Ys(u){if(u!=null){try{return by.call(u)}catch{}try{return u+""}catch{}}return""}function n$e(u,f){return Ai(De,function(g){var x="_."+g[0];f&g[1]&&!hy(u,x)&&u.push(x)}),u.sort()}function qL(u){if(u instanceof Gt)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 r$e(u,f,g){(g?qr(u,f,g):f===n)?f=1:f=nr(Dt(f),0);var x=u==null?0:u.length;if(!x||f<1)return[];for(var O=0,I=0,U=le(Cy(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 o$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 Va(Rt(g)?ei(g):[g],gr(f,1))}var a$e=Ut(function(u,f){return qn(u)?Bf(u,gr(f,1,qn,!0)):[]}),s$e=Ut(function(u,f){var g=ki(f);return qn(g)&&(g=n),qn(u)?Bf(u,gr(f,1,qn,!0),vt(g,2)):[]}),u$e=Ut(function(u,f){var g=ki(f);return qn(g)&&(g=n),qn(u)?Bf(u,gr(f,1,qn,!0),n,g):[]});function l$e(u,f,g){var x=u==null?0:u.length;return x?(f=g||f===n?1:Dt(f),$i(u,f<0?0:f,x)):[]}function c$e(u,f,g){var x=u==null?0:u.length;return x?(f=g||f===n?1:Dt(f),f=x-f,$i(u,0,f<0?0:f)):[]}function f$e(u,f){return u&&u.length?My(u,vt(f,3),!0,!0):[]}function d$e(u,f){return u&&u.length?My(u,vt(f,3),!0):[]}function p$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),oTe(u,f,g,x)):[]}function UL(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=g==null?0:Dt(g);return O<0&&(O=nr(x+O,0)),my(u,vt(f,3),O)}function BL(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=x-1;return g!==n&&(O=Dt(g),O=g<0?nr(x+O,0):kr(O,x-1)),my(u,vt(f,3),O,!0)}function zL(u){var f=u==null?0:u.length;return f?gr(u,1):[]}function h$e(u){var f=u==null?0:u.length;return f?gr(u,Y):[]}function m$e(u,f){var g=u==null?0:u.length;return g?(f=f===n?1:Dt(f),gr(u,f)):[]}function y$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 ZL(u){return u&&u.length?u[0]:n}function g$e(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=g==null?0:Dt(g);return O<0&&(O=nr(x+O,0)),El(u,f,O)}function v$e(u){var f=u==null?0:u.length;return f?$i(u,0,-1):[]}var b$e=Ut(function(u){var f=kn(u,rx);return f.length&&f[0]===u[0]?Vw(f):[]}),_$e=Ut(function(u){var f=ki(u),g=kn(u,rx);return f===ki(g)?f=n:g.pop(),g.length&&g[0]===u[0]?Vw(g,vt(f,2)):[]}),w$e=Ut(function(u){var f=ki(u),g=kn(u,rx);return f=typeof f=="function"?f:n,f&&g.pop(),g.length&&g[0]===u[0]?Vw(g,n,f):[]});function x$e(u,f){return u==null?"":vOe.call(u,f)}function ki(u){var f=u==null?0:u.length;return f?u[f-1]:n}function S$e(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=x;return g!==n&&(O=Dt(g),O=O<0?nr(x+O,0):kr(O,x-1)),f===f?nOe(u,f,O):my(u,Ej,O,!0)}function E$e(u,f){return u&&u.length?tL(u,Dt(f)):n}var A$e=Ut(HL);function HL(u,f){return u&&u.length&&f&&f.length?Jw(u,f):u}function C$e(u,f,g){return u&&u.length&&f&&f.length?Jw(u,f,vt(g,2)):u}function O$e(u,f,g){return u&&u.length&&f&&f.length?Jw(u,f,n,g):u}var T$e=aa(function(u,f){var g=u==null?0:u.length,x=zw(u,f);return iL(u,kn(f,function(O){return sa(O,g)?+O:O}).sort(hL)),x});function $$e(u,f){var g=[];if(!(u&&u.length))return g;var x=-1,O=[],I=u.length;for(f=vt(f,3);++x<I;){var U=u[x];f(U,x,u)&&(g.push(U),O.push(x))}return iL(u,O),g}function gx(u){return u==null?u:xOe.call(u)}function k$e(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:Dt(f),g=g===n?x:Dt(g)),$i(u,f,g)):[]}function I$e(u,f){return Dy(u,f)}function P$e(u,f,g){return ex(u,f,vt(g,2))}function R$e(u,f){var g=u==null?0:u.length;if(g){var x=Dy(u,f);if(x<g&&Vi(u[x],f))return x}return-1}function N$e(u,f){return Dy(u,f,!0)}function D$e(u,f,g){return ex(u,f,vt(g,2),!0)}function M$e(u,f){var g=u==null?0:u.length;if(g){var x=Dy(u,f,!0)-1;if(Vi(u[x],f))return x}return-1}function j$e(u){return u&&u.length?aL(u):[]}function L$e(u,f){return u&&u.length?aL(u,vt(f,2)):[]}function F$e(u){var f=u==null?0:u.length;return f?$i(u,1,f):[]}function q$e(u,f,g){return u&&u.length?(f=g||f===n?1:Dt(f),$i(u,0,f<0?0:f)):[]}function U$e(u,f,g){var x=u==null?0:u.length;return x?(f=g||f===n?1:Dt(f),f=x-f,$i(u,f<0?0:f,x)):[]}function B$e(u,f){return u&&u.length?My(u,vt(f,3),!1,!0):[]}function z$e(u,f){return u&&u.length?My(u,vt(f,3)):[]}var Z$e=Ut(function(u){return Ja(gr(u,1,qn,!0))}),H$e=Ut(function(u){var f=ki(u);return qn(f)&&(f=n),Ja(gr(u,1,qn,!0),vt(f,2))}),W$e=Ut(function(u){var f=ki(u);return f=typeof f=="function"?f:n,Ja(gr(u,1,qn,!0),n,f)});function V$e(u){return u&&u.length?Ja(u):[]}function K$e(u,f){return u&&u.length?Ja(u,vt(f,2)):[]}function G$e(u,f){return f=typeof f=="function"?f:n,u&&u.length?Ja(u,n,f):[]}function vx(u){if(!(u&&u.length))return[];var f=0;return u=Wa(u,function(g){if(qn(g))return f=nr(g.length,f),!0}),Dw(f,function(g){return kn(u,Pw(g))})}function WL(u,f){if(!(u&&u.length))return[];var g=vx(u);return f==null?g:kn(g,function(x){return di(f,n,x)})}var Y$e=Ut(function(u,f){return qn(u)?Bf(u,f):[]}),J$e=Ut(function(u){return nx(Wa(u,qn))}),X$e=Ut(function(u){var f=ki(u);return qn(f)&&(f=n),nx(Wa(u,qn),vt(f,2))}),Q$e=Ut(function(u){var f=ki(u);return f=typeof f=="function"?f:n,nx(Wa(u,qn),n,f)}),eke=Ut(vx);function tke(u,f){return cL(u||[],f||[],Uf)}function nke(u,f){return cL(u||[],f||[],Hf)}var rke=Ut(function(u){var f=u.length,g=f>1?u[f-1]:n;return g=typeof g=="function"?(u.pop(),g):n,WL(u,g)});function VL(u){var f=$(u);return f.__chain__=!0,f}function ike(u,f){return f(u),u}function Hy(u,f){return f(u)}var oke=aa(function(u){var f=u.length,g=f?u[0]:0,x=this.__wrapped__,O=function(I){return zw(I,u)};return f>1||this.__actions__.length||!(x instanceof Gt)||!sa(g)?this.thru(O):(x=x.slice(g,+g+(f?1:0)),x.__actions__.push({func:Hy,args:[O],thisArg:n}),new Oi(x,this.__chain__).thru(function(I){return f&&!I.length&&I.push(n),I}))});function ake(){return VL(this)}function ske(){return new Oi(this.value(),this.__chain__)}function uke(){this.__values__===n&&(this.__values__=sF(this.value()));var u=this.__index__>=this.__values__.length,f=u?n:this.__values__[this.__index__++];return{done:u,value:f}}function lke(){return this}function cke(u){for(var f,g=this;g instanceof ky;){var x=qL(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 fke(){var u=this.__wrapped__;if(u instanceof Gt){var f=u;return this.__actions__.length&&(f=new Gt(this)),f=f.reverse(),f.__actions__.push({func:Hy,args:[gx],thisArg:n}),new Oi(f,this.__chain__)}return this.thru(gx)}function dke(){return lL(this.__wrapped__,this.__actions__)}var pke=jy(function(u,f,g){hn.call(u,g)?++u[g]:ia(u,g,1)});function hke(u,f,g){var x=Rt(u)?xj:iTe;return g&&qr(u,f,g)&&(f=n),x(u,vt(f,3))}function mke(u,f){var g=Rt(u)?Wa:Wj;return g(u,vt(f,3))}var yke=_L(UL),gke=_L(BL);function vke(u,f){return gr(Wy(u,f),1)}function bke(u,f){return gr(Wy(u,f),Y)}function _ke(u,f,g){return g=g===n?1:Dt(g),gr(Wy(u,f),g)}function KL(u,f){var g=Rt(u)?Ai:Ya;return g(u,vt(f,3))}function GL(u,f){var g=Rt(u)?FCe:Hj;return g(u,vt(f,3))}var wke=jy(function(u,f,g){hn.call(u,g)?u[g].push(f):ia(u,g,[f])});function xke(u,f,g,x){u=ti(u)?u:Ml(u),g=g&&!x?Dt(g):0;var O=u.length;return g<0&&(g=nr(O+g,0)),Jy(u)?g<=O&&u.indexOf(f,g)>-1:!!O&&El(u,f,g)>-1}var Ske=Ut(function(u,f,g){var x=-1,O=typeof f=="function",I=ti(u)?le(u.length):[];return Ya(u,function(U){I[++x]=O?di(f,U,g):zf(U,f,g)}),I}),Eke=jy(function(u,f,g){ia(u,g,f)});function Wy(u,f){var g=Rt(u)?kn:Xj;return g(u,vt(f,3))}function Ake(u,f,g,x){return u==null?[]:(Rt(f)||(f=f==null?[]:[f]),g=x?n:g,Rt(g)||(g=g==null?[]:[g]),nL(u,f,g))}var Cke=jy(function(u,f,g){u[g?0:1].push(f)},function(){return[[],[]]});function Oke(u,f,g){var x=Rt(u)?kw:Cj,O=arguments.length<3;return x(u,vt(f,4),g,O,Ya)}function Tke(u,f,g){var x=Rt(u)?qCe:Cj,O=arguments.length<3;return x(u,vt(f,4),g,O,Hj)}function $ke(u,f){var g=Rt(u)?Wa:Wj;return g(u,Gy(vt(f,3)))}function kke(u){var f=Rt(u)?Uj:xTe;return f(u)}function Ike(u,f,g){(g?qr(u,f,g):f===n)?f=1:f=Dt(f);var x=Rt(u)?QOe:STe;return x(u,f)}function Pke(u){var f=Rt(u)?eTe:ATe;return f(u)}function Rke(u){if(u==null)return 0;if(ti(u))return Jy(u)?Cl(u):u.length;var f=Ir(u);return f==Ze||f==Ue?u.size:Gw(u).length}function Nke(u,f,g){var x=Rt(u)?Iw:CTe;return g&&qr(u,f,g)&&(f=n),x(u,vt(f,3))}var Dke=Ut(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]]),nL(u,gr(f,1),[])}),Vy=mOe||function(){return yr.Date.now()};function Mke(u,f){if(typeof f!="function")throw new Ci(a);return u=Dt(u),function(){if(--u<1)return f.apply(this,arguments)}}function YL(u,f,g){return f=g?n:f,f=u&&f==null?u.length:f,oa(u,j,n,n,n,n,f)}function JL(u,f){var g;if(typeof f!="function")throw new Ci(a);return u=Dt(u),function(){return--u>0&&(g=f.apply(this,arguments)),u<=1&&(f=n),g}}var bx=Ut(function(u,f,g){var x=w;if(g.length){var O=Ka(g,Nl(bx));x|=E}return oa(u,x,f,g,O)}),XL=Ut(function(u,f,g){var x=w|_;if(g.length){var O=Ka(g,Nl(XL));x|=E}return oa(f,x,u,g,O)});function QL(u,f,g){f=g?n:f;var x=oa(u,S,n,n,n,n,n,f);return x.placeholder=QL.placeholder,x}function eF(u,f,g){f=g?n:f;var x=oa(u,A,n,n,n,n,n,f);return x.placeholder=eF.placeholder,x}function tF(u,f,g){var x,O,I,U,W,te,be=0,we=!1,Ee=!1,Ve=!0;if(typeof u!="function")throw new Ci(a);f=Ii(f)||0,Nn(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 Ki=x,ca=O;return x=O=n,be=Un,U=u.apply(ca,Ki),U}function wt(Un){return be=Un,W=Kf(Ht,f),we?at(Un):U}function qt(Un){var Ki=Un-te,ca=Un-be,_F=f-Ki;return Ee?kr(_F,I-ca):_F}function xt(Un){var Ki=Un-te,ca=Un-be;return te===n||Ki>=f||Ki<0||Ee&&ca>=I}function Ht(){var Un=Vy();if(xt(Un))return Xt(Un);W=Kf(Ht,qt(Un))}function Xt(Un){return W=n,Ve&&x?at(Un):(x=O=n,U)}function yi(){W!==n&&fL(W),be=0,x=te=O=W=n}function Ur(){return W===n?U:Xt(Vy())}function gi(){var Un=Vy(),Ki=xt(Un);if(x=arguments,O=this,te=Un,Ki){if(W===n)return wt(te);if(Ee)return fL(W),W=Kf(Ht,f),at(te)}return W===n&&(W=Kf(Ht,f)),U}return gi.cancel=yi,gi.flush=Ur,gi}var jke=Ut(function(u,f){return Zj(u,1,f)}),Lke=Ut(function(u,f,g){return Zj(u,Ii(f)||0,g)});function Fke(u){return oa(u,L)}function Ky(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(Ky.Cache||ra),g}Ky.Cache=ra;function Gy(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 qke(u){return JL(2,u)}var Uke=OTe(function(u,f){f=f.length==1&&Rt(f[0])?kn(f[0],pi(vt())):kn(gr(f,1),pi(vt()));var g=f.length;return Ut(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)})}),_x=Ut(function(u,f){var g=Ka(f,Nl(_x));return oa(u,E,n,f,g)}),nF=Ut(function(u,f){var g=Ka(f,Nl(nF));return oa(u,T,n,f,g)}),Bke=aa(function(u,f){return oa(u,q,n,n,n,f)});function zke(u,f){if(typeof u!="function")throw new Ci(a);return f=f===n?f:Dt(f),Ut(u,f)}function Zke(u,f){if(typeof u!="function")throw new Ci(a);return f=f==null?0:nr(Dt(f),0),Ut(function(g){var x=g[f],O=Qa(g,0,f);return x&&Va(O,x),di(u,this,O)})}function Hke(u,f,g){var x=!0,O=!0;if(typeof u!="function")throw new Ci(a);return Nn(g)&&(x="leading"in g?!!g.leading:x,O="trailing"in g?!!g.trailing:O),tF(u,f,{leading:x,maxWait:f,trailing:O})}function Wke(u){return YL(u,1)}function Vke(u,f){return _x(ix(f),u)}function Kke(){if(!arguments.length)return[];var u=arguments[0];return Rt(u)?u:[u]}function Gke(u){return Ti(u,h)}function Yke(u,f){return f=typeof f=="function"?f:n,Ti(u,h,f)}function Jke(u){return Ti(u,p|h)}function Xke(u,f){return f=typeof f=="function"?f:n,Ti(u,p|h,f)}function Qke(u,f){return f==null||zj(u,f,ur(f))}function Vi(u,f){return u===f||u!==u&&f!==f}var eIe=Uy(Ww),tIe=Uy(function(u,f){return u>=f}),Js=Gj(function(){return arguments}())?Gj:function(u){return Ln(u)&&hn.call(u,"callee")&&!Dj.call(u,"callee")},Rt=le.isArray,nIe=yj?pi(yj):cTe;function ti(u){return u!=null&&Yy(u.length)&&!ua(u)}function qn(u){return Ln(u)&&ti(u)}function rIe(u){return u===!0||u===!1||Ln(u)&&Fr(u)==rt}var es=gOe||Ix,iIe=gj?pi(gj):fTe;function oIe(u){return Ln(u)&&u.nodeType===1&&!Gf(u)}function aIe(u){if(u==null)return!0;if(ti(u)&&(Rt(u)||typeof u=="string"||typeof u.splice=="function"||es(u)||Dl(u)||Js(u)))return!u.length;var f=Ir(u);if(f==Ze||f==Ue)return!u.size;if(Vf(u))return!Gw(u).length;for(var g in u)if(hn.call(u,g))return!1;return!0}function sIe(u,f){return Zf(u,f)}function uIe(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 wx(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 lIe(u){return typeof u=="number"&&jj(u)}function ua(u){if(!Nn(u))return!1;var f=Fr(u);return f==Fe||f==$e||f==Je||f==Se}function rF(u){return typeof u=="number"&&u==Dt(u)}function Yy(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=ne}function Nn(u){var f=typeof u;return u!=null&&(f=="object"||f=="function")}function Ln(u){return u!=null&&typeof u=="object"}var iF=vj?pi(vj):pTe;function cIe(u,f){return u===f||Kw(u,f,fx(f))}function fIe(u,f,g){return g=typeof g=="function"?g:n,Kw(u,f,fx(f),g)}function dIe(u){return oF(u)&&u!=+u}function pIe(u){if(YTe(u))throw new kt(o);return Yj(u)}function hIe(u){return u===null}function mIe(u){return u==null}function oF(u){return typeof u=="number"||Ln(u)&&Fr(u)==lt}function Gf(u){if(!Ln(u)||Fr(u)!=de)return!1;var f=Sy(u);if(f===null)return!0;var g=hn.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&by.call(g)==fOe}var xx=bj?pi(bj):hTe;function yIe(u){return rF(u)&&u>=-ne&&u<=ne}var aF=_j?pi(_j):mTe;function Jy(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 Dl=wj?pi(wj):yTe;function gIe(u){return u===n}function vIe(u){return Ln(u)&&Ir(u)==ie}function bIe(u){return Ln(u)&&Fr(u)==ye}var _Ie=Uy(Yw),wIe=Uy(function(u,f){return u<=f});function sF(u){if(!u)return[];if(ti(u))return Jy(u)?Hi(u):ei(u);if(Mf&&u[Mf])return QCe(u[Mf]());var f=Ir(u),g=f==Ze?jw:f==Ue?yy:Ml;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 Dt(u){var f=la(u),g=f%1;return f===f?g?f-g:f:0}function uF(u){return u?Vs(Dt(u),0,ue):0}function Ii(u){if(typeof u=="number")return u;if(mi(u))return P;if(Nn(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=Nn(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=Oj(u);var g=Tt.test(u);return g||On.test(u)?MCe(u.slice(2),g?2:8):Ft.test(u)?P:+u}function lF(u){return Ao(u,ni(u))}function xIe(u){return u?Vs(Dt(u),-ne,ne):u===0?u:0}function fn(u){return u==null?"":hi(u)}var SIe=Pl(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])}),cF=Pl(function(u,f){Ao(f,ni(f),u)}),Xy=Pl(function(u,f,g,x){Ao(f,ni(f),u,x)}),EIe=Pl(function(u,f,g,x){Ao(f,ur(f),u,x)}),AIe=aa(zw);function CIe(u,f){var g=Il(u);return f==null?g:Bj(g,f)}var OIe=Ut(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 be=U[W],we=u[be];(we===n||Vi(we,Tl[be])&&!hn.call(u,be))&&(u[be]=I[be])}return u}),TIe=Ut(function(u){return u.push(n,OL),di(fF,n,u)});function $Ie(u,f){return Sj(u,vt(f,3),Eo)}function kIe(u,f){return Sj(u,vt(f,3),Hw)}function IIe(u,f){return u==null?u:Zw(u,vt(f,3),ni)}function PIe(u,f){return u==null?u:Vj(u,vt(f,3),ni)}function RIe(u,f){return u&&Eo(u,vt(f,3))}function NIe(u,f){return u&&Hw(u,vt(f,3))}function DIe(u){return u==null?[]:Ry(u,ur(u))}function MIe(u){return u==null?[]:Ry(u,ni(u))}function Sx(u,f,g){var x=u==null?n:Ks(u,f);return x===n?g:x}function jIe(u,f){return u!=null&&kL(u,f,aTe)}function Ex(u,f){return u!=null&&kL(u,f,sTe)}var LIe=xL(function(u,f,g){f!=null&&typeof f.toString!="function"&&(f=_y.call(f)),u[f]=g},Cx(ri)),FIe=xL(function(u,f,g){f!=null&&typeof f.toString!="function"&&(f=_y.call(f)),hn.call(u,f)?u[f].push(g):u[f]=[g]},vt),qIe=Ut(zf);function ur(u){return ti(u)?qj(u):Gw(u)}function ni(u){return ti(u)?qj(u,!0):gTe(u)}function UIe(u,f){var g={};return f=vt(f,3),Eo(u,function(x,O,I){ia(g,f(x,O,I),x)}),g}function BIe(u,f){var g={};return f=vt(f,3),Eo(u,function(x,O,I){ia(g,O,f(x,O,I))}),g}var zIe=Pl(function(u,f,g){Ny(u,f,g)}),fF=Pl(function(u,f,g,x){Ny(u,f,g,x)}),ZIe=aa(function(u,f){var g={};if(u==null)return g;var x=!1;f=kn(f,function(I){return I=Xa(I,u),x||(x=I.length>1),I}),Ao(u,lx(u),g),x&&(g=Ti(g,p|m|h,LTe));for(var O=f.length;O--;)tx(g,f[O]);return g});function HIe(u,f){return dF(u,Gy(vt(f)))}var WIe=aa(function(u,f){return u==null?{}:bTe(u,f)});function dF(u,f){if(u==null)return{};var g=kn(lx(u),function(x){return[x]});return f=vt(f),rL(u,g,function(x,O){return f(x,O[0])})}function VIe(u,f,g){f=Xa(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 KIe(u,f,g){return u==null?u:Hf(u,f,g)}function GIe(u,f,g,x){return x=typeof x=="function"?x:n,u==null?u:Hf(u,f,g,x)}var pF=AL(ur),hF=AL(ni);function YIe(u,f,g){var x=Rt(u),O=x||es(u)||Dl(u);if(f=vt(f,4),g==null){var I=u&&u.constructor;O?g=x?new I:[]:Nn(u)?g=ua(I)?Il(Sy(u)):{}:g={}}return(O?Ai:Eo)(u,function(U,W,te){return f(g,U,W,te)}),g}function JIe(u,f){return u==null?!0:tx(u,f)}function XIe(u,f,g){return u==null?u:uL(u,f,ix(g))}function QIe(u,f,g,x){return x=typeof x=="function"?x:n,u==null?u:uL(u,f,ix(g),x)}function Ml(u){return u==null?[]:Mw(u,ur(u))}function ePe(u){return u==null?[]:Mw(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),Vs(Ii(u),f,g)}function nPe(u,f,g){return f=la(f),g===n?(g=f,f=0):g=la(g),u=Ii(u),uTe(u,f,g)}function rPe(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=Lj();return kr(u+O*(f-u+DCe("1e-"+((O+"").length-1))),f)}return Xw(u,f)}var iPe=Rl(function(u,f,g){return f=f.toLowerCase(),u+(g?mF(f):f)});function mF(u){return Ax(fn(u).toLowerCase())}function yF(u){return u=fn(u),u&&u.replace(Xr,KCe).replace(ACe,"")}function oPe(u,f,g){u=fn(u),f=hi(f);var x=u.length;g=g===n?x:Vs(Dt(g),0,x);var O=g;return g-=f.length,g>=0&&u.slice(g,O)==f}function aPe(u){return u=fn(u),u&&je.test(u)?u.replace(sr,GCe):u}function sPe(u){return u=fn(u),u&&bn.test(u)?u.replace(Jt,"\\$&"):u}var uPe=Rl(function(u,f,g){return u+(g?"-":"")+f.toLowerCase()}),lPe=Rl(function(u,f,g){return u+(g?" ":"")+f.toLowerCase()}),cPe=bL("toLowerCase");function fPe(u,f,g){u=fn(u),f=Dt(f);var x=f?Cl(u):0;if(!f||x>=f)return u;var O=(f-x)/2;return qy(Oy(O),g)+u+qy(Cy(O),g)}function dPe(u,f,g){u=fn(u),f=Dt(f);var x=f?Cl(u):0;return f&&x<f?u+qy(f-x,g):u}function pPe(u,f,g){u=fn(u),f=Dt(f);var x=f?Cl(u):0;return f&&x<f?qy(f-x,g)+u:u}function hPe(u,f,g){return g||f==null?f=0:f&&(f=+f),wOe(fn(u).replace(Rn,""),f||0)}function mPe(u,f,g){return(g?qr(u,f,g):f===n)?f=1:f=Dt(f),Qw(fn(u),f)}function yPe(){var u=arguments,f=fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])}var gPe=Rl(function(u,f,g){return u+(g?"_":"")+f.toLowerCase()});function vPe(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&&!xx(f))&&(f=hi(f),!f&&Al(u))?Qa(Hi(u),0,g):u.split(f,g)):[]}var bPe=Rl(function(u,f,g){return u+(g?" ":"")+Ax(f)});function _Pe(u,f,g){return u=fn(u),g=g==null?0:Vs(Dt(g),0,u.length),f=hi(f),u.slice(g,g+f.length)==f}function wPe(u,f,g){var x=$.templateSettings;g&&qr(u,f,g)&&(f=n),u=fn(u),f=Xy({},f,x,CL);var O=Xy({},f.imports,x.imports,CL),I=ur(O),U=Mw(O,I),W,te,be=0,we=f.interpolate||Zi,Ee="__p += '",Ve=Lw((f.escape||Zi).source+"|"+we.source+"|"+(we===Re?Kt:Zi).source+"|"+(f.evaluate||Zi).source+"|$","g"),at="//# sourceURL="+(hn.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++kCe+"]")+`
|
|
63
|
+
`)}function VTe(u){return Rt(u)||Js(u)||!!(Mj&&u&&u[Mj])}function ua(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(!Nn(g))return!1;var x=typeof f;return(x=="number"?ti(g)&&ua(f,g.length):x=="string"&&f in g)?Vi(g[f],u):!1}function px(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 KTe(u){var f=typeof u;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?u!=="__proto__":u===null}function hx(u){var f=By(u),g=$[f];if(typeof g!="function"||!(f in Gt.prototype))return!1;if(u===g)return!0;var x=cx(g);return!!x&&u===x[0]}function GTe(u){return!!Pj&&Pj in u}var YTe=vy?la:Ix;function Vf(u){var f=u&&u.constructor,g=typeof f=="function"&&f.prototype||Tl;return u===g}function PL(u){return u===u&&!Nn(u)}function RL(u,f){return function(g){return g==null?!1:g[u]===f&&(f!==n||u in _n(g))}}function JTe(u){var f=Ky(u,function(x){return g.size===c&&g.clear(),x}),g=f.cache;return f}function XTe(u,f){var g=u[1],x=f[1],O=g|x,I=O<(w|_|j),U=x==j&&g==S||x==j&&g==q&&u[7].length<=f[8]||x==(j|q)&&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?mL(te,W,f[4]):W,u[4]=te?Ka(u[3],d):f[4]}return W=f[5],W&&(te=u[5],u[5]=te?yL(te,W,f[6]):W,u[6]=te?Ka(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 QTe(u){var f=[];if(u!=null)for(var g in _n(u))f.push(g);return f}function e$e(u){return _y.call(u)}function NL(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 DL(u,f){return f.length<2?u:Ks(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]=ua(I,g)?O[I]:n}return u}function mx(u,f){if(!(f==="constructor"&&typeof u[f]=="function")&&f!="__proto__")return u[f]}var ML=LL(oL),Kf=yOe||function(u,f){return yr.setTimeout(u,f)},yx=LL(ETe);function jL(u,f,g){var x=f+"";return yx(u,WTe(x,n$e(zTe(x),g)))}function LL(u){var f=0,g=0;return function(){var x=_Oe(),O=Q-(x-g);if(g=x,O>0){if(++f>=re)return arguments[0]}else f=0;return u.apply(n,arguments)}}function Zy(u,f){var g=-1,x=u.length,O=x-1;for(f=f===n?x:f;++g<f;){var I=Xw(g,O),U=u[I];u[I]=u[g],u[g]=U}return u.length=f,u}var FL=JTe(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 Ys(u){if(u!=null){try{return by.call(u)}catch{}try{return u+""}catch{}}return""}function n$e(u,f){return Ai(De,function(g){var x="_."+g[0];f&g[1]&&!hy(u,x)&&u.push(x)}),u.sort()}function qL(u){if(u instanceof Gt)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 r$e(u,f,g){(g?qr(u,f,g):f===n)?f=1:f=nr(Dt(f),0);var x=u==null?0:u.length;if(!x||f<1)return[];for(var O=0,I=0,U=le(Cy(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 o$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 Va(Rt(g)?ei(g):[g],gr(f,1))}var a$e=Ut(function(u,f){return qn(u)?Bf(u,gr(f,1,qn,!0)):[]}),s$e=Ut(function(u,f){var g=ki(f);return qn(g)&&(g=n),qn(u)?Bf(u,gr(f,1,qn,!0),vt(g,2)):[]}),u$e=Ut(function(u,f){var g=ki(f);return qn(g)&&(g=n),qn(u)?Bf(u,gr(f,1,qn,!0),n,g):[]});function l$e(u,f,g){var x=u==null?0:u.length;return x?(f=g||f===n?1:Dt(f),$i(u,f<0?0:f,x)):[]}function c$e(u,f,g){var x=u==null?0:u.length;return x?(f=g||f===n?1:Dt(f),f=x-f,$i(u,0,f<0?0:f)):[]}function f$e(u,f){return u&&u.length?My(u,vt(f,3),!0,!0):[]}function d$e(u,f){return u&&u.length?My(u,vt(f,3),!0):[]}function p$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),oTe(u,f,g,x)):[]}function UL(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=g==null?0:Dt(g);return O<0&&(O=nr(x+O,0)),my(u,vt(f,3),O)}function BL(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=x-1;return g!==n&&(O=Dt(g),O=g<0?nr(x+O,0):kr(O,x-1)),my(u,vt(f,3),O,!0)}function zL(u){var f=u==null?0:u.length;return f?gr(u,1):[]}function h$e(u){var f=u==null?0:u.length;return f?gr(u,Y):[]}function m$e(u,f){var g=u==null?0:u.length;return g?(f=f===n?1:Dt(f),gr(u,f)):[]}function y$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 ZL(u){return u&&u.length?u[0]:n}function g$e(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=g==null?0:Dt(g);return O<0&&(O=nr(x+O,0)),El(u,f,O)}function v$e(u){var f=u==null?0:u.length;return f?$i(u,0,-1):[]}var b$e=Ut(function(u){var f=kn(u,rx);return f.length&&f[0]===u[0]?Vw(f):[]}),_$e=Ut(function(u){var f=ki(u),g=kn(u,rx);return f===ki(g)?f=n:g.pop(),g.length&&g[0]===u[0]?Vw(g,vt(f,2)):[]}),w$e=Ut(function(u){var f=ki(u),g=kn(u,rx);return f=typeof f=="function"?f:n,f&&g.pop(),g.length&&g[0]===u[0]?Vw(g,n,f):[]});function x$e(u,f){return u==null?"":vOe.call(u,f)}function ki(u){var f=u==null?0:u.length;return f?u[f-1]:n}function S$e(u,f,g){var x=u==null?0:u.length;if(!x)return-1;var O=x;return g!==n&&(O=Dt(g),O=O<0?nr(x+O,0):kr(O,x-1)),f===f?nOe(u,f,O):my(u,Ej,O,!0)}function E$e(u,f){return u&&u.length?tL(u,Dt(f)):n}var A$e=Ut(HL);function HL(u,f){return u&&u.length&&f&&f.length?Jw(u,f):u}function C$e(u,f,g){return u&&u.length&&f&&f.length?Jw(u,f,vt(g,2)):u}function O$e(u,f,g){return u&&u.length&&f&&f.length?Jw(u,f,n,g):u}var T$e=sa(function(u,f){var g=u==null?0:u.length,x=zw(u,f);return iL(u,kn(f,function(O){return ua(O,g)?+O:O}).sort(hL)),x});function $$e(u,f){var g=[];if(!(u&&u.length))return g;var x=-1,O=[],I=u.length;for(f=vt(f,3);++x<I;){var U=u[x];f(U,x,u)&&(g.push(U),O.push(x))}return iL(u,O),g}function gx(u){return u==null?u:xOe.call(u)}function k$e(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:Dt(f),g=g===n?x:Dt(g)),$i(u,f,g)):[]}function I$e(u,f){return Dy(u,f)}function P$e(u,f,g){return ex(u,f,vt(g,2))}function R$e(u,f){var g=u==null?0:u.length;if(g){var x=Dy(u,f);if(x<g&&Vi(u[x],f))return x}return-1}function N$e(u,f){return Dy(u,f,!0)}function D$e(u,f,g){return ex(u,f,vt(g,2),!0)}function M$e(u,f){var g=u==null?0:u.length;if(g){var x=Dy(u,f,!0)-1;if(Vi(u[x],f))return x}return-1}function j$e(u){return u&&u.length?aL(u):[]}function L$e(u,f){return u&&u.length?aL(u,vt(f,2)):[]}function F$e(u){var f=u==null?0:u.length;return f?$i(u,1,f):[]}function q$e(u,f,g){return u&&u.length?(f=g||f===n?1:Dt(f),$i(u,0,f<0?0:f)):[]}function U$e(u,f,g){var x=u==null?0:u.length;return x?(f=g||f===n?1:Dt(f),f=x-f,$i(u,f<0?0:f,x)):[]}function B$e(u,f){return u&&u.length?My(u,vt(f,3),!1,!0):[]}function z$e(u,f){return u&&u.length?My(u,vt(f,3)):[]}var Z$e=Ut(function(u){return Ja(gr(u,1,qn,!0))}),H$e=Ut(function(u){var f=ki(u);return qn(f)&&(f=n),Ja(gr(u,1,qn,!0),vt(f,2))}),W$e=Ut(function(u){var f=ki(u);return f=typeof f=="function"?f:n,Ja(gr(u,1,qn,!0),n,f)});function V$e(u){return u&&u.length?Ja(u):[]}function K$e(u,f){return u&&u.length?Ja(u,vt(f,2)):[]}function G$e(u,f){return f=typeof f=="function"?f:n,u&&u.length?Ja(u,n,f):[]}function vx(u){if(!(u&&u.length))return[];var f=0;return u=Wa(u,function(g){if(qn(g))return f=nr(g.length,f),!0}),Dw(f,function(g){return kn(u,Pw(g))})}function WL(u,f){if(!(u&&u.length))return[];var g=vx(u);return f==null?g:kn(g,function(x){return di(f,n,x)})}var Y$e=Ut(function(u,f){return qn(u)?Bf(u,f):[]}),J$e=Ut(function(u){return nx(Wa(u,qn))}),X$e=Ut(function(u){var f=ki(u);return qn(f)&&(f=n),nx(Wa(u,qn),vt(f,2))}),Q$e=Ut(function(u){var f=ki(u);return f=typeof f=="function"?f:n,nx(Wa(u,qn),n,f)}),eke=Ut(vx);function tke(u,f){return cL(u||[],f||[],Uf)}function nke(u,f){return cL(u||[],f||[],Hf)}var rke=Ut(function(u){var f=u.length,g=f>1?u[f-1]:n;return g=typeof g=="function"?(u.pop(),g):n,WL(u,g)});function VL(u){var f=$(u);return f.__chain__=!0,f}function ike(u,f){return f(u),u}function Hy(u,f){return f(u)}var oke=sa(function(u){var f=u.length,g=f?u[0]:0,x=this.__wrapped__,O=function(I){return zw(I,u)};return f>1||this.__actions__.length||!(x instanceof Gt)||!ua(g)?this.thru(O):(x=x.slice(g,+g+(f?1:0)),x.__actions__.push({func:Hy,args:[O],thisArg:n}),new Oi(x,this.__chain__).thru(function(I){return f&&!I.length&&I.push(n),I}))});function ake(){return VL(this)}function ske(){return new Oi(this.value(),this.__chain__)}function uke(){this.__values__===n&&(this.__values__=sF(this.value()));var u=this.__index__>=this.__values__.length,f=u?n:this.__values__[this.__index__++];return{done:u,value:f}}function lke(){return this}function cke(u){for(var f,g=this;g instanceof ky;){var x=qL(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 fke(){var u=this.__wrapped__;if(u instanceof Gt){var f=u;return this.__actions__.length&&(f=new Gt(this)),f=f.reverse(),f.__actions__.push({func:Hy,args:[gx],thisArg:n}),new Oi(f,this.__chain__)}return this.thru(gx)}function dke(){return lL(this.__wrapped__,this.__actions__)}var pke=jy(function(u,f,g){hn.call(u,g)?++u[g]:oa(u,g,1)});function hke(u,f,g){var x=Rt(u)?xj:iTe;return g&&qr(u,f,g)&&(f=n),x(u,vt(f,3))}function mke(u,f){var g=Rt(u)?Wa:Wj;return g(u,vt(f,3))}var yke=_L(UL),gke=_L(BL);function vke(u,f){return gr(Wy(u,f),1)}function bke(u,f){return gr(Wy(u,f),Y)}function _ke(u,f,g){return g=g===n?1:Dt(g),gr(Wy(u,f),g)}function KL(u,f){var g=Rt(u)?Ai:Ya;return g(u,vt(f,3))}function GL(u,f){var g=Rt(u)?FCe:Hj;return g(u,vt(f,3))}var wke=jy(function(u,f,g){hn.call(u,g)?u[g].push(f):oa(u,g,[f])});function xke(u,f,g,x){u=ti(u)?u:Ml(u),g=g&&!x?Dt(g):0;var O=u.length;return g<0&&(g=nr(O+g,0)),Jy(u)?g<=O&&u.indexOf(f,g)>-1:!!O&&El(u,f,g)>-1}var Ske=Ut(function(u,f,g){var x=-1,O=typeof f=="function",I=ti(u)?le(u.length):[];return Ya(u,function(U){I[++x]=O?di(f,U,g):zf(U,f,g)}),I}),Eke=jy(function(u,f,g){oa(u,g,f)});function Wy(u,f){var g=Rt(u)?kn:Xj;return g(u,vt(f,3))}function Ake(u,f,g,x){return u==null?[]:(Rt(f)||(f=f==null?[]:[f]),g=x?n:g,Rt(g)||(g=g==null?[]:[g]),nL(u,f,g))}var Cke=jy(function(u,f,g){u[g?0:1].push(f)},function(){return[[],[]]});function Oke(u,f,g){var x=Rt(u)?kw:Cj,O=arguments.length<3;return x(u,vt(f,4),g,O,Ya)}function Tke(u,f,g){var x=Rt(u)?qCe:Cj,O=arguments.length<3;return x(u,vt(f,4),g,O,Hj)}function $ke(u,f){var g=Rt(u)?Wa:Wj;return g(u,Gy(vt(f,3)))}function kke(u){var f=Rt(u)?Uj:xTe;return f(u)}function Ike(u,f,g){(g?qr(u,f,g):f===n)?f=1:f=Dt(f);var x=Rt(u)?QOe:STe;return x(u,f)}function Pke(u){var f=Rt(u)?eTe:ATe;return f(u)}function Rke(u){if(u==null)return 0;if(ti(u))return Jy(u)?Cl(u):u.length;var f=Ir(u);return f==Ze||f==Ue?u.size:Gw(u).length}function Nke(u,f,g){var x=Rt(u)?Iw:CTe;return g&&qr(u,f,g)&&(f=n),x(u,vt(f,3))}var Dke=Ut(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]]),nL(u,gr(f,1),[])}),Vy=mOe||function(){return yr.Date.now()};function Mke(u,f){if(typeof f!="function")throw new Ci(a);return u=Dt(u),function(){if(--u<1)return f.apply(this,arguments)}}function YL(u,f,g){return f=g?n:f,f=u&&f==null?u.length:f,aa(u,j,n,n,n,n,f)}function JL(u,f){var g;if(typeof f!="function")throw new Ci(a);return u=Dt(u),function(){return--u>0&&(g=f.apply(this,arguments)),u<=1&&(f=n),g}}var bx=Ut(function(u,f,g){var x=w;if(g.length){var O=Ka(g,Nl(bx));x|=E}return aa(u,x,f,g,O)}),XL=Ut(function(u,f,g){var x=w|_;if(g.length){var O=Ka(g,Nl(XL));x|=E}return aa(f,x,u,g,O)});function QL(u,f,g){f=g?n:f;var x=aa(u,S,n,n,n,n,n,f);return x.placeholder=QL.placeholder,x}function eF(u,f,g){f=g?n:f;var x=aa(u,A,n,n,n,n,n,f);return x.placeholder=eF.placeholder,x}function tF(u,f,g){var x,O,I,U,W,te,be=0,we=!1,Ee=!1,Ve=!0;if(typeof u!="function")throw new Ci(a);f=Ii(f)||0,Nn(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 Ki=x,fa=O;return x=O=n,be=Un,U=u.apply(fa,Ki),U}function wt(Un){return be=Un,W=Kf(Ht,f),we?at(Un):U}function qt(Un){var Ki=Un-te,fa=Un-be,_F=f-Ki;return Ee?kr(_F,I-fa):_F}function xt(Un){var Ki=Un-te,fa=Un-be;return te===n||Ki>=f||Ki<0||Ee&&fa>=I}function Ht(){var Un=Vy();if(xt(Un))return Xt(Un);W=Kf(Ht,qt(Un))}function Xt(Un){return W=n,Ve&&x?at(Un):(x=O=n,U)}function yi(){W!==n&&fL(W),be=0,x=te=O=W=n}function Ur(){return W===n?U:Xt(Vy())}function gi(){var Un=Vy(),Ki=xt(Un);if(x=arguments,O=this,te=Un,Ki){if(W===n)return wt(te);if(Ee)return fL(W),W=Kf(Ht,f),at(te)}return W===n&&(W=Kf(Ht,f)),U}return gi.cancel=yi,gi.flush=Ur,gi}var jke=Ut(function(u,f){return Zj(u,1,f)}),Lke=Ut(function(u,f,g){return Zj(u,Ii(f)||0,g)});function Fke(u){return aa(u,L)}function Ky(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(Ky.Cache||ia),g}Ky.Cache=ia;function Gy(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 qke(u){return JL(2,u)}var Uke=OTe(function(u,f){f=f.length==1&&Rt(f[0])?kn(f[0],pi(vt())):kn(gr(f,1),pi(vt()));var g=f.length;return Ut(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)})}),_x=Ut(function(u,f){var g=Ka(f,Nl(_x));return aa(u,E,n,f,g)}),nF=Ut(function(u,f){var g=Ka(f,Nl(nF));return aa(u,T,n,f,g)}),Bke=sa(function(u,f){return aa(u,q,n,n,n,f)});function zke(u,f){if(typeof u!="function")throw new Ci(a);return f=f===n?f:Dt(f),Ut(u,f)}function Zke(u,f){if(typeof u!="function")throw new Ci(a);return f=f==null?0:nr(Dt(f),0),Ut(function(g){var x=g[f],O=Qa(g,0,f);return x&&Va(O,x),di(u,this,O)})}function Hke(u,f,g){var x=!0,O=!0;if(typeof u!="function")throw new Ci(a);return Nn(g)&&(x="leading"in g?!!g.leading:x,O="trailing"in g?!!g.trailing:O),tF(u,f,{leading:x,maxWait:f,trailing:O})}function Wke(u){return YL(u,1)}function Vke(u,f){return _x(ix(f),u)}function Kke(){if(!arguments.length)return[];var u=arguments[0];return Rt(u)?u:[u]}function Gke(u){return Ti(u,h)}function Yke(u,f){return f=typeof f=="function"?f:n,Ti(u,h,f)}function Jke(u){return Ti(u,p|h)}function Xke(u,f){return f=typeof f=="function"?f:n,Ti(u,p|h,f)}function Qke(u,f){return f==null||zj(u,f,ur(f))}function Vi(u,f){return u===f||u!==u&&f!==f}var eIe=Uy(Ww),tIe=Uy(function(u,f){return u>=f}),Js=Gj(function(){return arguments}())?Gj:function(u){return Ln(u)&&hn.call(u,"callee")&&!Dj.call(u,"callee")},Rt=le.isArray,nIe=yj?pi(yj):cTe;function ti(u){return u!=null&&Yy(u.length)&&!la(u)}function qn(u){return Ln(u)&&ti(u)}function rIe(u){return u===!0||u===!1||Ln(u)&&Fr(u)==rt}var es=gOe||Ix,iIe=gj?pi(gj):fTe;function oIe(u){return Ln(u)&&u.nodeType===1&&!Gf(u)}function aIe(u){if(u==null)return!0;if(ti(u)&&(Rt(u)||typeof u=="string"||typeof u.splice=="function"||es(u)||Dl(u)||Js(u)))return!u.length;var f=Ir(u);if(f==Ze||f==Ue)return!u.size;if(Vf(u))return!Gw(u).length;for(var g in u)if(hn.call(u,g))return!1;return!0}function sIe(u,f){return Zf(u,f)}function uIe(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 wx(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 lIe(u){return typeof u=="number"&&jj(u)}function la(u){if(!Nn(u))return!1;var f=Fr(u);return f==Fe||f==$e||f==Je||f==Se}function rF(u){return typeof u=="number"&&u==Dt(u)}function Yy(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=ne}function Nn(u){var f=typeof u;return u!=null&&(f=="object"||f=="function")}function Ln(u){return u!=null&&typeof u=="object"}var iF=vj?pi(vj):pTe;function cIe(u,f){return u===f||Kw(u,f,fx(f))}function fIe(u,f,g){return g=typeof g=="function"?g:n,Kw(u,f,fx(f),g)}function dIe(u){return oF(u)&&u!=+u}function pIe(u){if(YTe(u))throw new kt(o);return Yj(u)}function hIe(u){return u===null}function mIe(u){return u==null}function oF(u){return typeof u=="number"||Ln(u)&&Fr(u)==lt}function Gf(u){if(!Ln(u)||Fr(u)!=de)return!1;var f=Sy(u);if(f===null)return!0;var g=hn.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&by.call(g)==fOe}var xx=bj?pi(bj):hTe;function yIe(u){return rF(u)&&u>=-ne&&u<=ne}var aF=_j?pi(_j):mTe;function Jy(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 Dl=wj?pi(wj):yTe;function gIe(u){return u===n}function vIe(u){return Ln(u)&&Ir(u)==ie}function bIe(u){return Ln(u)&&Fr(u)==ye}var _Ie=Uy(Yw),wIe=Uy(function(u,f){return u<=f});function sF(u){if(!u)return[];if(ti(u))return Jy(u)?Hi(u):ei(u);if(Mf&&u[Mf])return QCe(u[Mf]());var f=Ir(u),g=f==Ze?jw:f==Ue?yy:Ml;return g(u)}function ca(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 Dt(u){var f=ca(u),g=f%1;return f===f?g?f-g:f:0}function uF(u){return u?Vs(Dt(u),0,ue):0}function Ii(u){if(typeof u=="number")return u;if(mi(u))return P;if(Nn(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=Nn(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=Oj(u);var g=Tt.test(u);return g||On.test(u)?MCe(u.slice(2),g?2:8):Ft.test(u)?P:+u}function lF(u){return Ao(u,ni(u))}function xIe(u){return u?Vs(Dt(u),-ne,ne):u===0?u:0}function fn(u){return u==null?"":hi(u)}var SIe=Pl(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])}),cF=Pl(function(u,f){Ao(f,ni(f),u)}),Xy=Pl(function(u,f,g,x){Ao(f,ni(f),u,x)}),EIe=Pl(function(u,f,g,x){Ao(f,ur(f),u,x)}),AIe=sa(zw);function CIe(u,f){var g=Il(u);return f==null?g:Bj(g,f)}var OIe=Ut(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 be=U[W],we=u[be];(we===n||Vi(we,Tl[be])&&!hn.call(u,be))&&(u[be]=I[be])}return u}),TIe=Ut(function(u){return u.push(n,OL),di(fF,n,u)});function $Ie(u,f){return Sj(u,vt(f,3),Eo)}function kIe(u,f){return Sj(u,vt(f,3),Hw)}function IIe(u,f){return u==null?u:Zw(u,vt(f,3),ni)}function PIe(u,f){return u==null?u:Vj(u,vt(f,3),ni)}function RIe(u,f){return u&&Eo(u,vt(f,3))}function NIe(u,f){return u&&Hw(u,vt(f,3))}function DIe(u){return u==null?[]:Ry(u,ur(u))}function MIe(u){return u==null?[]:Ry(u,ni(u))}function Sx(u,f,g){var x=u==null?n:Ks(u,f);return x===n?g:x}function jIe(u,f){return u!=null&&kL(u,f,aTe)}function Ex(u,f){return u!=null&&kL(u,f,sTe)}var LIe=xL(function(u,f,g){f!=null&&typeof f.toString!="function"&&(f=_y.call(f)),u[f]=g},Cx(ri)),FIe=xL(function(u,f,g){f!=null&&typeof f.toString!="function"&&(f=_y.call(f)),hn.call(u,f)?u[f].push(g):u[f]=[g]},vt),qIe=Ut(zf);function ur(u){return ti(u)?qj(u):Gw(u)}function ni(u){return ti(u)?qj(u,!0):gTe(u)}function UIe(u,f){var g={};return f=vt(f,3),Eo(u,function(x,O,I){oa(g,f(x,O,I),x)}),g}function BIe(u,f){var g={};return f=vt(f,3),Eo(u,function(x,O,I){oa(g,O,f(x,O,I))}),g}var zIe=Pl(function(u,f,g){Ny(u,f,g)}),fF=Pl(function(u,f,g,x){Ny(u,f,g,x)}),ZIe=sa(function(u,f){var g={};if(u==null)return g;var x=!1;f=kn(f,function(I){return I=Xa(I,u),x||(x=I.length>1),I}),Ao(u,lx(u),g),x&&(g=Ti(g,p|m|h,LTe));for(var O=f.length;O--;)tx(g,f[O]);return g});function HIe(u,f){return dF(u,Gy(vt(f)))}var WIe=sa(function(u,f){return u==null?{}:bTe(u,f)});function dF(u,f){if(u==null)return{};var g=kn(lx(u),function(x){return[x]});return f=vt(f),rL(u,g,function(x,O){return f(x,O[0])})}function VIe(u,f,g){f=Xa(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=la(I)?I.call(u):I}return u}function KIe(u,f,g){return u==null?u:Hf(u,f,g)}function GIe(u,f,g,x){return x=typeof x=="function"?x:n,u==null?u:Hf(u,f,g,x)}var pF=AL(ur),hF=AL(ni);function YIe(u,f,g){var x=Rt(u),O=x||es(u)||Dl(u);if(f=vt(f,4),g==null){var I=u&&u.constructor;O?g=x?new I:[]:Nn(u)?g=la(I)?Il(Sy(u)):{}:g={}}return(O?Ai:Eo)(u,function(U,W,te){return f(g,U,W,te)}),g}function JIe(u,f){return u==null?!0:tx(u,f)}function XIe(u,f,g){return u==null?u:uL(u,f,ix(g))}function QIe(u,f,g,x){return x=typeof x=="function"?x:n,u==null?u:uL(u,f,ix(g),x)}function Ml(u){return u==null?[]:Mw(u,ur(u))}function ePe(u){return u==null?[]:Mw(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),Vs(Ii(u),f,g)}function nPe(u,f,g){return f=ca(f),g===n?(g=f,f=0):g=ca(g),u=Ii(u),uTe(u,f,g)}function rPe(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=ca(u),f===n?(f=u,u=0):f=ca(f)),u>f){var x=u;u=f,f=x}if(g||u%1||f%1){var O=Lj();return kr(u+O*(f-u+DCe("1e-"+((O+"").length-1))),f)}return Xw(u,f)}var iPe=Rl(function(u,f,g){return f=f.toLowerCase(),u+(g?mF(f):f)});function mF(u){return Ax(fn(u).toLowerCase())}function yF(u){return u=fn(u),u&&u.replace(Xr,KCe).replace(ACe,"")}function oPe(u,f,g){u=fn(u),f=hi(f);var x=u.length;g=g===n?x:Vs(Dt(g),0,x);var O=g;return g-=f.length,g>=0&&u.slice(g,O)==f}function aPe(u){return u=fn(u),u&&je.test(u)?u.replace(sr,GCe):u}function sPe(u){return u=fn(u),u&&bn.test(u)?u.replace(Jt,"\\$&"):u}var uPe=Rl(function(u,f,g){return u+(g?"-":"")+f.toLowerCase()}),lPe=Rl(function(u,f,g){return u+(g?" ":"")+f.toLowerCase()}),cPe=bL("toLowerCase");function fPe(u,f,g){u=fn(u),f=Dt(f);var x=f?Cl(u):0;if(!f||x>=f)return u;var O=(f-x)/2;return qy(Oy(O),g)+u+qy(Cy(O),g)}function dPe(u,f,g){u=fn(u),f=Dt(f);var x=f?Cl(u):0;return f&&x<f?u+qy(f-x,g):u}function pPe(u,f,g){u=fn(u),f=Dt(f);var x=f?Cl(u):0;return f&&x<f?qy(f-x,g)+u:u}function hPe(u,f,g){return g||f==null?f=0:f&&(f=+f),wOe(fn(u).replace(Rn,""),f||0)}function mPe(u,f,g){return(g?qr(u,f,g):f===n)?f=1:f=Dt(f),Qw(fn(u),f)}function yPe(){var u=arguments,f=fn(u[0]);return u.length<3?f:f.replace(u[1],u[2])}var gPe=Rl(function(u,f,g){return u+(g?"_":"")+f.toLowerCase()});function vPe(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&&!xx(f))&&(f=hi(f),!f&&Al(u))?Qa(Hi(u),0,g):u.split(f,g)):[]}var bPe=Rl(function(u,f,g){return u+(g?" ":"")+Ax(f)});function _Pe(u,f,g){return u=fn(u),g=g==null?0:Vs(Dt(g),0,u.length),f=hi(f),u.slice(g,g+f.length)==f}function wPe(u,f,g){var x=$.templateSettings;g&&qr(u,f,g)&&(f=n),u=fn(u),f=Xy({},f,x,CL);var O=Xy({},f.imports,x.imports,CL),I=ur(O),U=Mw(O,I),W,te,be=0,we=f.interpolate||Zi,Ee="__p += '",Ve=Lw((f.escape||Zi).source+"|"+we.source+"|"+(we===Re?Kt:Zi).source+"|"+(f.evaluate||Zi).source+"|$","g"),at="//# sourceURL="+(hn.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++kCe+"]")+`
|
|
64
64
|
`;u.replace(Ve,function(xt,Ht,Xt,yi,Ur,gi){return Xt||(Xt=yi),Ee+=u.slice(be,gi).replace(dy,YCe),Ht&&(W=!0,Ee+=`' +
|
|
65
65
|
__e(`+Ht+`) +
|
|
66
66
|
'`),Ur&&(te=!0,Ee+=`';
|
|
@@ -77,7 +77,7 @@ __p += '`),Xt&&(Ee+=`' +
|
|
|
77
77
|
function print() { __p += __j.call(arguments, '') }
|
|
78
78
|
`:`;
|
|
79
79
|
`)+Ee+`return __p
|
|
80
|
-
}`;var qt=vF(function(){return ln(I,at+"return "+Ee).apply(n,U)});if(qt.source=Ee,wx(qt))throw qt;return qt}function xPe(u){return fn(u).toLowerCase()}function SPe(u){return fn(u).toUpperCase()}function EPe(u,f,g){if(u=fn(u),u&&(g||f===n))return Oj(u);if(!u||!(f=hi(f)))return u;var x=Hi(u),O=Hi(f),I=Tj(x,O),U=$j(x,O)+1;return Qa(x,I,U).join("")}function APe(u,f,g){if(u=fn(u),u&&(g||f===n))return u.slice(0,Ij(u)+1);if(!u||!(f=hi(f)))return u;var x=Hi(u),O=$j(x,Hi(f))+1;return Qa(x,0,O).join("")}function CPe(u,f,g){if(u=fn(u),u&&(g||f===n))return u.replace(Rn,"");if(!u||!(f=hi(f)))return u;var x=Hi(u),O=Tj(x,Hi(f));return Qa(x,O).join("")}function OPe(u,f){var g=M,x=H;if(Nn(f)){var O="separator"in f?f.separator:O;g="length"in f?Dt(f.length):g,x="omission"in f?hi(f.omission):x}u=fn(u);var I=u.length;if(Al(u)){var U=Hi(u);I=U.length}if(g>=I)return u;var W=g-Cl(x);if(W<1)return x;var te=U?Qa(U,0,W).join(""):u.slice(0,W);if(O===n)return te+x;if(U&&(W+=te.length-W),xx(O)){if(u.slice(W).search(O)){var be,we=te;for(O.global||(O=Lw(O.source,fn(un.exec(O))+"g")),O.lastIndex=0;be=O.exec(we);)var Ee=be.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 TPe(u){return u=fn(u),u&&N.test(u)?u.replace(Mn,rOe):u}var $Pe=Rl(function(u,f,g){return u+(g?" ":"")+f.toUpperCase()}),Ax=bL("toUpperCase");function gF(u,f,g){return u=fn(u),f=g?n:f,f===n?XCe(u)?aOe(u):zCe(u):u.match(f)||[]}var vF=Ut(function(u,f){try{return di(u,n,f)}catch(g){return wx(g)?g:new kt(g)}}),kPe=aa(function(u,f){return Ai(f,function(g){g=Co(g),ia(u,g,bx(u[g],u))}),u});function IPe(u){var f=u==null?0:u.length,g=vt();return u=f?kn(u,function(x){if(typeof x[1]!="function")throw new Ci(a);return[g(x[0]),x[1]]}):[],Ut(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 PPe(u){return rTe(Ti(u,p))}function Cx(u){return function(){return u}}function RPe(u,f){return u==null||u!==u?f:u}var NPe=wL(),DPe=wL(!0);function ri(u){return u}function Ox(u){return Jj(typeof u=="function"?u:Ti(u,p))}function MPe(u){return Qj(Ti(u,p))}function jPe(u,f){return eL(u,Ti(f,p))}var LPe=Ut(function(u,f){return function(g){return zf(g,u,f)}}),FPe=Ut(function(u,f){return function(g){return zf(u,g,f)}});function Tx(u,f,g){var x=ur(f),O=Ry(f,x);g==null&&!(Nn(f)&&(O.length||!x.length))&&(g=f,f=u,u=this,O=Ry(f,ur(f)));var I=!(Nn(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 be=this.__chain__;if(I||be){var we=u(this.__wrapped__),Ee=we.__actions__=ei(this.__actions__);return Ee.push({func:te,args:arguments,thisArg:u}),we.__chain__=be,we}return te.apply(u,Va([this.value()],arguments))})}),u}function qPe(){return yr._===this&&(yr._=dOe),this}function $x(){}function UPe(u){return u=Dt(u),Ut(function(f){return tL(f,u)})}var BPe=ax(kn),zPe=ax(xj),ZPe=ax(Iw);function bF(u){return px(u)?Pw(Co(u)):_Te(u)}function HPe(u){return function(f){return u==null?n:Ks(u,f)}}var WPe=SL(),VPe=SL(!0);function kx(){return[]}function Ix(){return!1}function KPe(){return{}}function GPe(){return""}function YPe(){return!0}function JPe(u,f){if(u=Dt(u),u<1||u>ne)return[];var g=ue,x=kr(u,ue);f=vt(f),u-=ue;for(var O=Dw(x,f);++g<u;)f(g);return O}function XPe(u){return Rt(u)?kn(u,Co):mi(u)?[u]:ei(FL(fn(u)))}function QPe(u){var f=++cOe;return fn(u)+f}var eRe=Fy(function(u,f){return u+f},0),tRe=sx("ceil"),nRe=Fy(function(u,f){return u/f},1),rRe=sx("floor");function iRe(u){return u&&u.length?Py(u,ri,Ww):n}function oRe(u,f){return u&&u.length?Py(u,vt(f,2),Ww):n}function aRe(u){return Aj(u,ri)}function sRe(u,f){return Aj(u,vt(f,2))}function uRe(u){return u&&u.length?Py(u,ri,Yw):n}function lRe(u,f){return u&&u.length?Py(u,vt(f,2),Yw):n}var cRe=Fy(function(u,f){return u*f},1),fRe=sx("round"),dRe=Fy(function(u,f){return u-f},0);function pRe(u){return u&&u.length?Nw(u,ri):0}function hRe(u,f){return u&&u.length?Nw(u,vt(f,2)):0}return $.after=Mke,$.ary=YL,$.assign=SIe,$.assignIn=cF,$.assignInWith=Xy,$.assignWith=EIe,$.at=AIe,$.before=JL,$.bind=bx,$.bindAll=kPe,$.bindKey=XL,$.castArray=Kke,$.chain=VL,$.chunk=r$e,$.compact=i$e,$.concat=o$e,$.cond=IPe,$.conforms=PPe,$.constant=Cx,$.countBy=pke,$.create=CIe,$.curry=QL,$.curryRight=eF,$.debounce=tF,$.defaults=OIe,$.defaultsDeep=TIe,$.defer=jke,$.delay=Lke,$.difference=a$e,$.differenceBy=s$e,$.differenceWith=u$e,$.drop=l$e,$.dropRight=c$e,$.dropRightWhile=f$e,$.dropWhile=d$e,$.fill=p$e,$.filter=mke,$.flatMap=vke,$.flatMapDeep=bke,$.flatMapDepth=_ke,$.flatten=zL,$.flattenDeep=h$e,$.flattenDepth=m$e,$.flip=Fke,$.flow=NPe,$.flowRight=DPe,$.fromPairs=y$e,$.functions=DIe,$.functionsIn=MIe,$.groupBy=wke,$.initial=v$e,$.intersection=b$e,$.intersectionBy=_$e,$.intersectionWith=w$e,$.invert=LIe,$.invertBy=FIe,$.invokeMap=Ske,$.iteratee=Ox,$.keyBy=Eke,$.keys=ur,$.keysIn=ni,$.map=Wy,$.mapKeys=UIe,$.mapValues=BIe,$.matches=MPe,$.matchesProperty=jPe,$.memoize=Ky,$.merge=zIe,$.mergeWith=fF,$.method=LPe,$.methodOf=FPe,$.mixin=Tx,$.negate=Gy,$.nthArg=UPe,$.omit=ZIe,$.omitBy=HIe,$.once=qke,$.orderBy=Ake,$.over=BPe,$.overArgs=Uke,$.overEvery=zPe,$.overSome=ZPe,$.partial=_x,$.partialRight=nF,$.partition=Cke,$.pick=WIe,$.pickBy=dF,$.property=bF,$.propertyOf=HPe,$.pull=A$e,$.pullAll=HL,$.pullAllBy=C$e,$.pullAllWith=O$e,$.pullAt=T$e,$.range=WPe,$.rangeRight=VPe,$.rearg=Bke,$.reject=$ke,$.remove=$$e,$.rest=zke,$.reverse=gx,$.sampleSize=Ike,$.set=KIe,$.setWith=GIe,$.shuffle=Pke,$.slice=k$e,$.sortBy=Dke,$.sortedUniq=j$e,$.sortedUniqBy=L$e,$.split=vPe,$.spread=Zke,$.tail=F$e,$.take=q$e,$.takeRight=U$e,$.takeRightWhile=B$e,$.takeWhile=z$e,$.tap=ike,$.throttle=Hke,$.thru=Hy,$.toArray=sF,$.toPairs=pF,$.toPairsIn=hF,$.toPath=XPe,$.toPlainObject=lF,$.transform=YIe,$.unary=Wke,$.union=Z$e,$.unionBy=H$e,$.unionWith=W$e,$.uniq=V$e,$.uniqBy=K$e,$.uniqWith=G$e,$.unset=JIe,$.unzip=vx,$.unzipWith=WL,$.update=XIe,$.updateWith=QIe,$.values=Ml,$.valuesIn=ePe,$.without=Y$e,$.words=gF,$.wrap=Vke,$.xor=J$e,$.xorBy=X$e,$.xorWith=Q$e,$.zip=eke,$.zipObject=tke,$.zipObjectDeep=nke,$.zipWith=rke,$.entries=pF,$.entriesIn=hF,$.extend=cF,$.extendWith=Xy,Tx($,$),$.add=eRe,$.attempt=vF,$.camelCase=iPe,$.capitalize=mF,$.ceil=tRe,$.clamp=tPe,$.clone=Gke,$.cloneDeep=Jke,$.cloneDeepWith=Xke,$.cloneWith=Yke,$.conformsTo=Qke,$.deburr=yF,$.defaultTo=RPe,$.divide=nRe,$.endsWith=oPe,$.eq=Vi,$.escape=aPe,$.escapeRegExp=sPe,$.every=hke,$.find=yke,$.findIndex=UL,$.findKey=$Ie,$.findLast=gke,$.findLastIndex=BL,$.findLastKey=kIe,$.floor=rRe,$.forEach=KL,$.forEachRight=GL,$.forIn=IIe,$.forInRight=PIe,$.forOwn=RIe,$.forOwnRight=NIe,$.get=Sx,$.gt=eIe,$.gte=tIe,$.has=jIe,$.hasIn=Ex,$.head=ZL,$.identity=ri,$.includes=xke,$.indexOf=g$e,$.inRange=nPe,$.invoke=qIe,$.isArguments=Js,$.isArray=Rt,$.isArrayBuffer=nIe,$.isArrayLike=ti,$.isArrayLikeObject=qn,$.isBoolean=rIe,$.isBuffer=es,$.isDate=iIe,$.isElement=oIe,$.isEmpty=aIe,$.isEqual=sIe,$.isEqualWith=uIe,$.isError=wx,$.isFinite=lIe,$.isFunction=ua,$.isInteger=rF,$.isLength=Yy,$.isMap=iF,$.isMatch=cIe,$.isMatchWith=fIe,$.isNaN=dIe,$.isNative=pIe,$.isNil=mIe,$.isNull=hIe,$.isNumber=oF,$.isObject=Nn,$.isObjectLike=Ln,$.isPlainObject=Gf,$.isRegExp=xx,$.isSafeInteger=yIe,$.isSet=aF,$.isString=Jy,$.isSymbol=mi,$.isTypedArray=Dl,$.isUndefined=gIe,$.isWeakMap=vIe,$.isWeakSet=bIe,$.join=x$e,$.kebabCase=uPe,$.last=ki,$.lastIndexOf=S$e,$.lowerCase=lPe,$.lowerFirst=cPe,$.lt=_Ie,$.lte=wIe,$.max=iRe,$.maxBy=oRe,$.mean=aRe,$.meanBy=sRe,$.min=uRe,$.minBy=lRe,$.stubArray=kx,$.stubFalse=Ix,$.stubObject=KPe,$.stubString=GPe,$.stubTrue=YPe,$.multiply=cRe,$.nth=E$e,$.noConflict=qPe,$.noop=$x,$.now=Vy,$.pad=fPe,$.padEnd=dPe,$.padStart=pPe,$.parseInt=hPe,$.random=rPe,$.reduce=Oke,$.reduceRight=Tke,$.repeat=mPe,$.replace=yPe,$.result=VIe,$.round=fRe,$.runInContext=J,$.sample=kke,$.size=Rke,$.snakeCase=gPe,$.some=Nke,$.sortedIndex=I$e,$.sortedIndexBy=P$e,$.sortedIndexOf=R$e,$.sortedLastIndex=N$e,$.sortedLastIndexBy=D$e,$.sortedLastIndexOf=M$e,$.startCase=bPe,$.startsWith=_Pe,$.subtract=dRe,$.sum=pRe,$.sumBy=hRe,$.template=wPe,$.times=JPe,$.toFinite=la,$.toInteger=Dt,$.toLength=uF,$.toLower=xPe,$.toNumber=Ii,$.toSafeInteger=xIe,$.toString=fn,$.toUpper=SPe,$.trim=EPe,$.trimEnd=APe,$.trimStart=CPe,$.truncate=OPe,$.unescape=TPe,$.uniqueId=QPe,$.upperCase=$Pe,$.upperFirst=Ax,$.each=KL,$.eachRight=GL,$.first=ZL,Tx($,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){Gt.prototype[u]=function(g){g=g===n?1:nr(Dt(g),0);var x=this.__filtered__&&!f?new Gt(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},Gt.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==F;Gt.prototype[u]=function(O){var I=this.clone();return I.__iteratees__.push({iteratee:vt(O,3),type:g}),I.__filtered__=I.__filtered__||x,I}}),Ai(["head","last"],function(u,f){var g="take"+(f?"Right":"");Gt.prototype[u]=function(){return this[g](1).value()[0]}}),Ai(["initial","tail"],function(u,f){var g="drop"+(f?"":"Right");Gt.prototype[u]=function(){return this.__filtered__?new Gt(this):this[g](1)}}),Gt.prototype.compact=function(){return this.filter(ri)},Gt.prototype.find=function(u){return this.filter(u).head()},Gt.prototype.findLast=function(u){return this.reverse().find(u)},Gt.prototype.invokeMap=Ut(function(u,f){return typeof u=="function"?new Gt(this):this.map(function(g){return zf(g,u,f)})}),Gt.prototype.reject=function(u){return this.filter(Gy(vt(u)))},Gt.prototype.slice=function(u,f){u=Dt(u);var g=this;return g.__filtered__&&(u>0||f<0)?new Gt(g):(u<0?g=g.takeRight(-u):u&&(g=g.drop(u)),f!==n&&(f=Dt(f),g=f<0?g.dropRight(-f):g.take(f-u)),g)},Gt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Gt.prototype.toArray=function(){return this.take(ue)},Eo(Gt.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 Gt,be=W[0],we=te||Rt(U),Ee=function(Ht){var Xt=O.apply($,Va([Ht],W));return x&&Ve?Xt[0]:Xt};we&&g&&typeof be=="function"&&be.length!=1&&(te=we=!1);var Ve=this.__chain__,at=!!this.__actions__.length,wt=I&&!Ve,qt=te&&!at;if(!I&&we){U=qt?U:new Gt(this);var xt=u.apply(U,W);return xt.__actions__.push({func:Hy,args:[Ee],thisArg:n}),new Oi(xt,Ve)}return wt&&qt?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=gy[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(Gt.prototype,function(u,f){var g=$[f];if(g){var x=g.name+"";hn.call(kl,x)||(kl[x]=[]),kl[x].push({name:f,func:g})}}),kl[Ly(n,_).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=TOe,Gt.prototype.reverse=$Oe,Gt.prototype.value=kOe,$.prototype.at=oke,$.prototype.chain=ake,$.prototype.commit=ske,$.prototype.next=uke,$.prototype.plant=cke,$.prototype.reverse=fke,$.prototype.toJSON=$.prototype.valueOf=$.prototype.value=dke,$.prototype.first=$.prototype.head,Mf&&($.prototype[Mf]=lke),$},Ol=sOe();zs?((zs.exports=Ol)._=Ol,Ow._=Ol):yr._=Ol}).call(se)}(Gd,Gd.exports);var vie=Gd.exports,bie=Object.create,wu=Object.defineProperty,_ie=Object.defineProperties,wie=Object.getOwnPropertyDescriptor,xie=Object.getOwnPropertyDescriptors,Sie=Object.getOwnPropertyNames,Yd=Object.getOwnPropertySymbols,Eie=Object.getPrototypeOf,jv=Object.prototype.hasOwnProperty,RC=Object.prototype.propertyIsEnumerable,NC=(e,t,n)=>t in e?wu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||(t={}))jv.call(t,n)&&NC(e,n,t[n]);if(Yd)for(var n of Yd(t))RC.call(t,n)&&NC(e,n,t[n]);return e},fe=(e,t)=>_ie(e,xie(t)),k=(e,t)=>wu(e,"name",{value:t,configurable:!0}),DC=(e,t)=>{var n={};for(var r in e)jv.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Yd)for(var r of Yd(e))t.indexOf(r)<0&&RC.call(e,r)&&(n[r]=e[r]);return n},MC=(e,t)=>{for(var n in t)wu(e,n,{get:t[n],enumerable:!0})},jC=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Sie(t))!jv.call(e,i)&&i!==n&&wu(e,i,{get:()=>t[i],enumerable:!(r=wie(t,i))||r.enumerable});return e},yn=(e,t,n)=>(n=e!=null?bie(Eie(e)):{},jC(t||!e||!e.__esModule?wu(n,"default",{value:e,enumerable:!0}):n,e)),Aie=e=>jC(wu({},"__esModule",{value:!0}),e),LC={};MC(LC,{BRAND:()=>LO,DIRTY:()=>vs,EMPTY_PATH:()=>MO,INVALID:()=>gt,NEVER:()=>g$,OK:()=>_r,ParseInputLazyPath:()=>wi,ParseStatus:()=>Dr,Schema:()=>Ct,UntitledDeclarationError:()=>_O,ZodAny:()=>Iu,ZodArray:()=>Pu,ZodBigInt:()=>hc,ZodBoolean:()=>mc,ZodBranded:()=>yc,ZodCatch:()=>bp,ZodDate:()=>wp,ZodDefault:()=>Sp,ZodDiscriminatedUnion:()=>Yv,ZodEffects:()=>Mo,ZodEnum:()=>No,ZodError:()=>ao,ZodFirstPartyTypeKind:()=>Wv,ZodFunction:()=>Xv,ZodIntersection:()=>Cp,ZodIssueCode:()=>Ie,ZodLazy:()=>Tp,ZodLiteral:()=>vc,ZodMap:()=>Qv,ZodNaN:()=>eb,ZodNativeEnum:()=>bc,ZodNever:()=>ga,ZodNull:()=>_c,ZodNullable:()=>Do,ZodNumber:()=>wc,ZodObject:()=>_s,ZodOptional:()=>Di,ZodParsedType:()=>Ge,ZodPipeline:()=>Lp,ZodPromise:()=>xc,ZodReadonly:()=>Up,ZodRecord:()=>tb,ZodSchema:()=>Ct,ZodSet:()=>nb,ZodString:()=>dr,ZodSymbol:()=>ib,ZodTemplateLiteral:()=>Xp,ZodTemplateLiteralUnsupportedCheckError:()=>fp,ZodTemplateLiteralUnsupportedTypeError:()=>Vv,ZodTransformer:()=>Mo,ZodTuple:()=>ws,ZodType:()=>Ct,ZodUndefined:()=>Ac,ZodUnion:()=>Cc,ZodUnknown:()=>Nu,ZodVoid:()=>ob,ZuiForm:()=>Joe,addIssueToContext:()=>Ye,agent:()=>ET,aimodel:()=>$T,any:()=>qT,array:()=>ZT,bigint:()=>DT,boolean:()=>fb,coerce:()=>y$,conversation:()=>wT,createZodEnum:()=>gc,cuid2Regex:()=>Zp,cuidRegex:()=>zp,custom:()=>Gv,datasource:()=>kT,date:()=>MT,datetimeRegex:()=>Kp,defaultErrorMap:()=>Du,discriminatedUnion:()=>KT,effect:()=>ah,emailRegex:()=>Vp,enum:()=>r$,errorUtil:()=>ut,event:()=>AT,fromJsonSchema:()=>h$,fromObject:()=>m$,function:()=>e$,getErrorMap:()=>$u,getParsedType:()=>Po,instanceof:()=>RT,intent:()=>TT,intersection:()=>GT,ipv4Regex:()=>Sc,ipv6Regex:()=>Ec,isAborted:()=>dp,isAsync:()=>pc,isDirty:()=>pp,isEmojiRegex:()=>WO,isValid:()=>ku,jsonSchemaToZui:()=>Ic,knowledgebase:()=>IT,late:()=>PT,lazy:()=>t$,literal:()=>n$,makeIssue:()=>dc,map:()=>XT,message:()=>ST,nan:()=>NT,nativeEnum:()=>i$,never:()=>BT,null:()=>FT,nullable:()=>s$,number:()=>cb,object:()=>HT,objectToZui:()=>Mu,objectUtil:()=>lp,oboolean:()=>p$,onumber:()=>d$,optional:()=>a$,ostring:()=>f$,pipeline:()=>l$,preprocess:()=>u$,processCreateParams:()=>Ot,promise:()=>o$,quotelessJson:()=>PO,record:()=>JT,set:()=>QT,setErrorMap:()=>Kv,strictObject:()=>WT,string:()=>lb,symbol:()=>jT,table:()=>CT,tablerow:()=>OT,templateLiteral:()=>c$,transformer:()=>ah,transforms:()=>Xoe,tuple:()=>YT,ulidRegex:()=>Hp,undefined:()=>LT,union:()=>VT,unknown:()=>UT,user:()=>xT,util:()=>Wt,uuidRegex:()=>Wp,variable:()=>_T,void:()=>zT,z:()=>zn,zuiToJsonSchema:()=>oh});var Jd=Aie(LC),zn={};MC(zn,{BRAND:()=>LO,DIRTY:()=>vs,EMPTY_PATH:()=>MO,INVALID:()=>gt,NEVER:()=>g$,OK:()=>_r,ParseInputLazyPath:()=>wi,ParseStatus:()=>Dr,Schema:()=>Ct,ZodAny:()=>Iu,ZodArray:()=>Pu,ZodBigInt:()=>hc,ZodBoolean:()=>mc,ZodBranded:()=>yc,ZodCatch:()=>bp,ZodDate:()=>wp,ZodDefault:()=>Sp,ZodDiscriminatedUnion:()=>Yv,ZodEffects:()=>Mo,ZodEnum:()=>No,ZodError:()=>ao,ZodFirstPartyTypeKind:()=>Wv,ZodFunction:()=>Xv,ZodIntersection:()=>Cp,ZodIssueCode:()=>Ie,ZodLazy:()=>Tp,ZodLiteral:()=>vc,ZodMap:()=>Qv,ZodNaN:()=>eb,ZodNativeEnum:()=>bc,ZodNever:()=>ga,ZodNull:()=>_c,ZodNullable:()=>Do,ZodNumber:()=>wc,ZodObject:()=>_s,ZodOptional:()=>Di,ZodParsedType:()=>Ge,ZodPipeline:()=>Lp,ZodPromise:()=>xc,ZodReadonly:()=>Up,ZodRecord:()=>tb,ZodSchema:()=>Ct,ZodSet:()=>nb,ZodString:()=>dr,ZodSymbol:()=>ib,ZodTemplateLiteral:()=>Xp,ZodTemplateLiteralUnsupportedCheckError:()=>fp,ZodTemplateLiteralUnsupportedTypeError:()=>Vv,ZodTransformer:()=>Mo,ZodTuple:()=>ws,ZodType:()=>Ct,ZodUndefined:()=>Ac,ZodUnion:()=>Cc,ZodUnknown:()=>Nu,ZodVoid:()=>ob,addIssueToContext:()=>Ye,agent:()=>ET,aimodel:()=>$T,any:()=>qT,array:()=>ZT,bigint:()=>DT,boolean:()=>fb,coerce:()=>y$,conversation:()=>wT,createZodEnum:()=>gc,cuid2Regex:()=>Zp,cuidRegex:()=>zp,custom:()=>Gv,datasource:()=>kT,date:()=>MT,datetimeRegex:()=>Kp,defaultErrorMap:()=>Du,discriminatedUnion:()=>KT,effect:()=>ah,emailRegex:()=>Vp,enum:()=>r$,errorUtil:()=>ut,event:()=>AT,fromJsonSchema:()=>h$,fromObject:()=>m$,function:()=>e$,getErrorMap:()=>$u,getParsedType:()=>Po,instanceof:()=>RT,intent:()=>TT,intersection:()=>GT,ipv4Regex:()=>Sc,ipv6Regex:()=>Ec,isAborted:()=>dp,isAsync:()=>pc,isDirty:()=>pp,isEmojiRegex:()=>WO,isValid:()=>ku,jsonSchemaToZui:()=>Ic,knowledgebase:()=>IT,late:()=>PT,lazy:()=>t$,literal:()=>n$,makeIssue:()=>dc,map:()=>XT,message:()=>ST,nan:()=>NT,nativeEnum:()=>i$,never:()=>BT,null:()=>FT,nullable:()=>s$,number:()=>cb,object:()=>HT,objectToZui:()=>Mu,objectUtil:()=>lp,oboolean:()=>p$,onumber:()=>d$,optional:()=>a$,ostring:()=>f$,pipeline:()=>l$,preprocess:()=>u$,processCreateParams:()=>Ot,promise:()=>o$,quotelessJson:()=>PO,record:()=>JT,set:()=>QT,setErrorMap:()=>Kv,strictObject:()=>WT,string:()=>lb,symbol:()=>jT,table:()=>CT,tablerow:()=>OT,templateLiteral:()=>c$,transformer:()=>ah,tuple:()=>YT,ulidRegex:()=>Hp,undefined:()=>LT,union:()=>VT,unknown:()=>UT,user:()=>xT,util:()=>Wt,uuidRegex:()=>Wp,variable:()=>_T,void:()=>zT,zuiToJsonSchema:()=>oh});var gn="x-zui",Cie=yn(AG,1),Oie=yn(cY,1),Tie=yn(eC,1),$ie=yn(UX,1),kie=yn(Wd,1),Iie=yn(bC,1);function sc(e){return"comment"in e&&e.comment!=null&&e.comment!==""||"deprecated"in e&&e.deprecated===!0}k(sc,"hasComment");function xu(e){return"standaloneName"in e&&e.standaloneName!=null&&e.standaloneName!==""}k(xu,"hasStandaloneName");var Su={type:"ANY"},Pie={keyName:"[k: string]",type:"ANY"},Eu={type:"UNKNOWN"},Rie={keyName:"[k: string]",type:"UNKNOWN"},Nie=yn(bee,1),FC=yn(hs,1),Die=yn(_te,1),Mie=yn($te,1),jie=yn(Wd,1),Lie=yn(hs,1),uc=Symbol("Parent"),qC=(0,jie.default)(e=>{const t=e[uc];return t?qC(t):e});function UC(e){return e===!0||e===!1}k(UC,"isBoolean");function BC(e){return!(0,Lie.default)(e)}k(BC,"isPrimitive");function Xd(e){return Array.isArray(e.type)||"anyOf"in e||"oneOf"in e}k(Xd,"isCompound");var zC=k((e,t)=>{const n=e.split("/").pop()||"";return t?n.replaceAll(t,""):n},"basename"),Fie=k(e=>{const t=zC(e),n=t.lastIndexOf(".");return n===-1?"":t.slice(n)},"extname"),qie=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 ms(e,t,n){Object.keys(e).forEach(r=>{e[r]&&typeof e[r]=="object"&&!Array.isArray(e[r])&&ko(e[r],t,n,r)})}k(ms,"traverseObjectKeys");function Au(e,t,n){e.forEach((r,i)=>ko(r,t,n,i.toString()))}k(Au,"traverseArray");function ko(e,t,n=new Set,r){if(!n.has(e)){if(n.add(e),t(e,r??null),e.anyOf&&Au(e.anyOf,t,n),e.allOf&&Au(e.allOf,t,n),e.oneOf&&Au(e.oneOf,t,n),e.properties&&ms(e.properties,t,n),e.patternProperties&&ms(e.patternProperties,t,n),e.additionalProperties&&typeof e.additionalProperties=="object"&&ko(e.additionalProperties,t,n),e.items){const{items:i}=e;Array.isArray(i)?Au(i,t,n):ko(i,t,n)}e.additionalItems&&typeof e.additionalItems=="object"&&ko(e.additionalItems,t,n),e.dependencies&&(Array.isArray(e.dependencies)?Au(e.dependencies,t,n):ms(e.dependencies,t,n)),e.definitions&&ms(e.definitions,t,n),e.$defs&&ms(e.$defs,t,n),e.not&&ko(e.not,t,n),Object.keys(e).filter(i=>!qie.has(i)).forEach(i=>{const o=e[i];o&&typeof o=="object"&&ms(o,t,n)})}}k(ko,"traverse");function Lv(e=""){return ZC(zC(e))}k(Lv,"justName");function ZC(e){return e.replace(Fie(e),"")}k(ZC,"stripExtension");function Io(e){return(0,Mie.default)((0,Nie.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,Die.default)(t.toUpperCase())).replace(/\s/g,""))}k(Io,"toSafeString");function HC(e,t){let n=Io(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(HC,"generateName");function WC(...e){if(!process.env.VERBOSE)return console.error(e);console.error(...e)}k(WC,"error");function fr(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(fr,"log");function VC(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(VC,"escapeBlockComment");function KC(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,FC.default)(e.default))return e;break}return delete e.default,e}k(KC,"maybeStripDefault");function GC(e){return"$id"in e&&delete e.$id,"description"in e&&delete e.description,"name"in e&&delete e.name,e}k(GC,"maybeStripNameHints");function YC(e,...t){return e?`${e}
|
|
80
|
+
}`;var qt=vF(function(){return ln(I,at+"return "+Ee).apply(n,U)});if(qt.source=Ee,wx(qt))throw qt;return qt}function xPe(u){return fn(u).toLowerCase()}function SPe(u){return fn(u).toUpperCase()}function EPe(u,f,g){if(u=fn(u),u&&(g||f===n))return Oj(u);if(!u||!(f=hi(f)))return u;var x=Hi(u),O=Hi(f),I=Tj(x,O),U=$j(x,O)+1;return Qa(x,I,U).join("")}function APe(u,f,g){if(u=fn(u),u&&(g||f===n))return u.slice(0,Ij(u)+1);if(!u||!(f=hi(f)))return u;var x=Hi(u),O=$j(x,Hi(f))+1;return Qa(x,0,O).join("")}function CPe(u,f,g){if(u=fn(u),u&&(g||f===n))return u.replace(Rn,"");if(!u||!(f=hi(f)))return u;var x=Hi(u),O=Tj(x,Hi(f));return Qa(x,O).join("")}function OPe(u,f){var g=M,x=H;if(Nn(f)){var O="separator"in f?f.separator:O;g="length"in f?Dt(f.length):g,x="omission"in f?hi(f.omission):x}u=fn(u);var I=u.length;if(Al(u)){var U=Hi(u);I=U.length}if(g>=I)return u;var W=g-Cl(x);if(W<1)return x;var te=U?Qa(U,0,W).join(""):u.slice(0,W);if(O===n)return te+x;if(U&&(W+=te.length-W),xx(O)){if(u.slice(W).search(O)){var be,we=te;for(O.global||(O=Lw(O.source,fn(un.exec(O))+"g")),O.lastIndex=0;be=O.exec(we);)var Ee=be.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 TPe(u){return u=fn(u),u&&N.test(u)?u.replace(Mn,rOe):u}var $Pe=Rl(function(u,f,g){return u+(g?" ":"")+f.toUpperCase()}),Ax=bL("toUpperCase");function gF(u,f,g){return u=fn(u),f=g?n:f,f===n?XCe(u)?aOe(u):zCe(u):u.match(f)||[]}var vF=Ut(function(u,f){try{return di(u,n,f)}catch(g){return wx(g)?g:new kt(g)}}),kPe=sa(function(u,f){return Ai(f,function(g){g=Co(g),oa(u,g,bx(u[g],u))}),u});function IPe(u){var f=u==null?0:u.length,g=vt();return u=f?kn(u,function(x){if(typeof x[1]!="function")throw new Ci(a);return[g(x[0]),x[1]]}):[],Ut(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 PPe(u){return rTe(Ti(u,p))}function Cx(u){return function(){return u}}function RPe(u,f){return u==null||u!==u?f:u}var NPe=wL(),DPe=wL(!0);function ri(u){return u}function Ox(u){return Jj(typeof u=="function"?u:Ti(u,p))}function MPe(u){return Qj(Ti(u,p))}function jPe(u,f){return eL(u,Ti(f,p))}var LPe=Ut(function(u,f){return function(g){return zf(g,u,f)}}),FPe=Ut(function(u,f){return function(g){return zf(u,g,f)}});function Tx(u,f,g){var x=ur(f),O=Ry(f,x);g==null&&!(Nn(f)&&(O.length||!x.length))&&(g=f,f=u,u=this,O=Ry(f,ur(f)));var I=!(Nn(g)&&"chain"in g)||!!g.chain,U=la(u);return Ai(O,function(W){var te=f[W];u[W]=te,U&&(u.prototype[W]=function(){var be=this.__chain__;if(I||be){var we=u(this.__wrapped__),Ee=we.__actions__=ei(this.__actions__);return Ee.push({func:te,args:arguments,thisArg:u}),we.__chain__=be,we}return te.apply(u,Va([this.value()],arguments))})}),u}function qPe(){return yr._===this&&(yr._=dOe),this}function $x(){}function UPe(u){return u=Dt(u),Ut(function(f){return tL(f,u)})}var BPe=ax(kn),zPe=ax(xj),ZPe=ax(Iw);function bF(u){return px(u)?Pw(Co(u)):_Te(u)}function HPe(u){return function(f){return u==null?n:Ks(u,f)}}var WPe=SL(),VPe=SL(!0);function kx(){return[]}function Ix(){return!1}function KPe(){return{}}function GPe(){return""}function YPe(){return!0}function JPe(u,f){if(u=Dt(u),u<1||u>ne)return[];var g=ue,x=kr(u,ue);f=vt(f),u-=ue;for(var O=Dw(x,f);++g<u;)f(g);return O}function XPe(u){return Rt(u)?kn(u,Co):mi(u)?[u]:ei(FL(fn(u)))}function QPe(u){var f=++cOe;return fn(u)+f}var eRe=Fy(function(u,f){return u+f},0),tRe=sx("ceil"),nRe=Fy(function(u,f){return u/f},1),rRe=sx("floor");function iRe(u){return u&&u.length?Py(u,ri,Ww):n}function oRe(u,f){return u&&u.length?Py(u,vt(f,2),Ww):n}function aRe(u){return Aj(u,ri)}function sRe(u,f){return Aj(u,vt(f,2))}function uRe(u){return u&&u.length?Py(u,ri,Yw):n}function lRe(u,f){return u&&u.length?Py(u,vt(f,2),Yw):n}var cRe=Fy(function(u,f){return u*f},1),fRe=sx("round"),dRe=Fy(function(u,f){return u-f},0);function pRe(u){return u&&u.length?Nw(u,ri):0}function hRe(u,f){return u&&u.length?Nw(u,vt(f,2)):0}return $.after=Mke,$.ary=YL,$.assign=SIe,$.assignIn=cF,$.assignInWith=Xy,$.assignWith=EIe,$.at=AIe,$.before=JL,$.bind=bx,$.bindAll=kPe,$.bindKey=XL,$.castArray=Kke,$.chain=VL,$.chunk=r$e,$.compact=i$e,$.concat=o$e,$.cond=IPe,$.conforms=PPe,$.constant=Cx,$.countBy=pke,$.create=CIe,$.curry=QL,$.curryRight=eF,$.debounce=tF,$.defaults=OIe,$.defaultsDeep=TIe,$.defer=jke,$.delay=Lke,$.difference=a$e,$.differenceBy=s$e,$.differenceWith=u$e,$.drop=l$e,$.dropRight=c$e,$.dropRightWhile=f$e,$.dropWhile=d$e,$.fill=p$e,$.filter=mke,$.flatMap=vke,$.flatMapDeep=bke,$.flatMapDepth=_ke,$.flatten=zL,$.flattenDeep=h$e,$.flattenDepth=m$e,$.flip=Fke,$.flow=NPe,$.flowRight=DPe,$.fromPairs=y$e,$.functions=DIe,$.functionsIn=MIe,$.groupBy=wke,$.initial=v$e,$.intersection=b$e,$.intersectionBy=_$e,$.intersectionWith=w$e,$.invert=LIe,$.invertBy=FIe,$.invokeMap=Ske,$.iteratee=Ox,$.keyBy=Eke,$.keys=ur,$.keysIn=ni,$.map=Wy,$.mapKeys=UIe,$.mapValues=BIe,$.matches=MPe,$.matchesProperty=jPe,$.memoize=Ky,$.merge=zIe,$.mergeWith=fF,$.method=LPe,$.methodOf=FPe,$.mixin=Tx,$.negate=Gy,$.nthArg=UPe,$.omit=ZIe,$.omitBy=HIe,$.once=qke,$.orderBy=Ake,$.over=BPe,$.overArgs=Uke,$.overEvery=zPe,$.overSome=ZPe,$.partial=_x,$.partialRight=nF,$.partition=Cke,$.pick=WIe,$.pickBy=dF,$.property=bF,$.propertyOf=HPe,$.pull=A$e,$.pullAll=HL,$.pullAllBy=C$e,$.pullAllWith=O$e,$.pullAt=T$e,$.range=WPe,$.rangeRight=VPe,$.rearg=Bke,$.reject=$ke,$.remove=$$e,$.rest=zke,$.reverse=gx,$.sampleSize=Ike,$.set=KIe,$.setWith=GIe,$.shuffle=Pke,$.slice=k$e,$.sortBy=Dke,$.sortedUniq=j$e,$.sortedUniqBy=L$e,$.split=vPe,$.spread=Zke,$.tail=F$e,$.take=q$e,$.takeRight=U$e,$.takeRightWhile=B$e,$.takeWhile=z$e,$.tap=ike,$.throttle=Hke,$.thru=Hy,$.toArray=sF,$.toPairs=pF,$.toPairsIn=hF,$.toPath=XPe,$.toPlainObject=lF,$.transform=YIe,$.unary=Wke,$.union=Z$e,$.unionBy=H$e,$.unionWith=W$e,$.uniq=V$e,$.uniqBy=K$e,$.uniqWith=G$e,$.unset=JIe,$.unzip=vx,$.unzipWith=WL,$.update=XIe,$.updateWith=QIe,$.values=Ml,$.valuesIn=ePe,$.without=Y$e,$.words=gF,$.wrap=Vke,$.xor=J$e,$.xorBy=X$e,$.xorWith=Q$e,$.zip=eke,$.zipObject=tke,$.zipObjectDeep=nke,$.zipWith=rke,$.entries=pF,$.entriesIn=hF,$.extend=cF,$.extendWith=Xy,Tx($,$),$.add=eRe,$.attempt=vF,$.camelCase=iPe,$.capitalize=mF,$.ceil=tRe,$.clamp=tPe,$.clone=Gke,$.cloneDeep=Jke,$.cloneDeepWith=Xke,$.cloneWith=Yke,$.conformsTo=Qke,$.deburr=yF,$.defaultTo=RPe,$.divide=nRe,$.endsWith=oPe,$.eq=Vi,$.escape=aPe,$.escapeRegExp=sPe,$.every=hke,$.find=yke,$.findIndex=UL,$.findKey=$Ie,$.findLast=gke,$.findLastIndex=BL,$.findLastKey=kIe,$.floor=rRe,$.forEach=KL,$.forEachRight=GL,$.forIn=IIe,$.forInRight=PIe,$.forOwn=RIe,$.forOwnRight=NIe,$.get=Sx,$.gt=eIe,$.gte=tIe,$.has=jIe,$.hasIn=Ex,$.head=ZL,$.identity=ri,$.includes=xke,$.indexOf=g$e,$.inRange=nPe,$.invoke=qIe,$.isArguments=Js,$.isArray=Rt,$.isArrayBuffer=nIe,$.isArrayLike=ti,$.isArrayLikeObject=qn,$.isBoolean=rIe,$.isBuffer=es,$.isDate=iIe,$.isElement=oIe,$.isEmpty=aIe,$.isEqual=sIe,$.isEqualWith=uIe,$.isError=wx,$.isFinite=lIe,$.isFunction=la,$.isInteger=rF,$.isLength=Yy,$.isMap=iF,$.isMatch=cIe,$.isMatchWith=fIe,$.isNaN=dIe,$.isNative=pIe,$.isNil=mIe,$.isNull=hIe,$.isNumber=oF,$.isObject=Nn,$.isObjectLike=Ln,$.isPlainObject=Gf,$.isRegExp=xx,$.isSafeInteger=yIe,$.isSet=aF,$.isString=Jy,$.isSymbol=mi,$.isTypedArray=Dl,$.isUndefined=gIe,$.isWeakMap=vIe,$.isWeakSet=bIe,$.join=x$e,$.kebabCase=uPe,$.last=ki,$.lastIndexOf=S$e,$.lowerCase=lPe,$.lowerFirst=cPe,$.lt=_Ie,$.lte=wIe,$.max=iRe,$.maxBy=oRe,$.mean=aRe,$.meanBy=sRe,$.min=uRe,$.minBy=lRe,$.stubArray=kx,$.stubFalse=Ix,$.stubObject=KPe,$.stubString=GPe,$.stubTrue=YPe,$.multiply=cRe,$.nth=E$e,$.noConflict=qPe,$.noop=$x,$.now=Vy,$.pad=fPe,$.padEnd=dPe,$.padStart=pPe,$.parseInt=hPe,$.random=rPe,$.reduce=Oke,$.reduceRight=Tke,$.repeat=mPe,$.replace=yPe,$.result=VIe,$.round=fRe,$.runInContext=J,$.sample=kke,$.size=Rke,$.snakeCase=gPe,$.some=Nke,$.sortedIndex=I$e,$.sortedIndexBy=P$e,$.sortedIndexOf=R$e,$.sortedLastIndex=N$e,$.sortedLastIndexBy=D$e,$.sortedLastIndexOf=M$e,$.startCase=bPe,$.startsWith=_Pe,$.subtract=dRe,$.sum=pRe,$.sumBy=hRe,$.template=wPe,$.times=JPe,$.toFinite=ca,$.toInteger=Dt,$.toLength=uF,$.toLower=xPe,$.toNumber=Ii,$.toSafeInteger=xIe,$.toString=fn,$.toUpper=SPe,$.trim=EPe,$.trimEnd=APe,$.trimStart=CPe,$.truncate=OPe,$.unescape=TPe,$.uniqueId=QPe,$.upperCase=$Pe,$.upperFirst=Ax,$.each=KL,$.eachRight=GL,$.first=ZL,Tx($,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){Gt.prototype[u]=function(g){g=g===n?1:nr(Dt(g),0);var x=this.__filtered__&&!f?new Gt(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},Gt.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==F;Gt.prototype[u]=function(O){var I=this.clone();return I.__iteratees__.push({iteratee:vt(O,3),type:g}),I.__filtered__=I.__filtered__||x,I}}),Ai(["head","last"],function(u,f){var g="take"+(f?"Right":"");Gt.prototype[u]=function(){return this[g](1).value()[0]}}),Ai(["initial","tail"],function(u,f){var g="drop"+(f?"":"Right");Gt.prototype[u]=function(){return this.__filtered__?new Gt(this):this[g](1)}}),Gt.prototype.compact=function(){return this.filter(ri)},Gt.prototype.find=function(u){return this.filter(u).head()},Gt.prototype.findLast=function(u){return this.reverse().find(u)},Gt.prototype.invokeMap=Ut(function(u,f){return typeof u=="function"?new Gt(this):this.map(function(g){return zf(g,u,f)})}),Gt.prototype.reject=function(u){return this.filter(Gy(vt(u)))},Gt.prototype.slice=function(u,f){u=Dt(u);var g=this;return g.__filtered__&&(u>0||f<0)?new Gt(g):(u<0?g=g.takeRight(-u):u&&(g=g.drop(u)),f!==n&&(f=Dt(f),g=f<0?g.dropRight(-f):g.take(f-u)),g)},Gt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Gt.prototype.toArray=function(){return this.take(ue)},Eo(Gt.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 Gt,be=W[0],we=te||Rt(U),Ee=function(Ht){var Xt=O.apply($,Va([Ht],W));return x&&Ve?Xt[0]:Xt};we&&g&&typeof be=="function"&&be.length!=1&&(te=we=!1);var Ve=this.__chain__,at=!!this.__actions__.length,wt=I&&!Ve,qt=te&&!at;if(!I&&we){U=qt?U:new Gt(this);var xt=u.apply(U,W);return xt.__actions__.push({func:Hy,args:[Ee],thisArg:n}),new Oi(xt,Ve)}return wt&&qt?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=gy[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(Gt.prototype,function(u,f){var g=$[f];if(g){var x=g.name+"";hn.call(kl,x)||(kl[x]=[]),kl[x].push({name:f,func:g})}}),kl[Ly(n,_).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=TOe,Gt.prototype.reverse=$Oe,Gt.prototype.value=kOe,$.prototype.at=oke,$.prototype.chain=ake,$.prototype.commit=ske,$.prototype.next=uke,$.prototype.plant=cke,$.prototype.reverse=fke,$.prototype.toJSON=$.prototype.valueOf=$.prototype.value=dke,$.prototype.first=$.prototype.head,Mf&&($.prototype[Mf]=lke),$},Ol=sOe();zs?((zs.exports=Ol)._=Ol,Ow._=Ol):yr._=Ol}).call(se)}(Gd,Gd.exports);var vie=Gd.exports,bie=Object.create,wu=Object.defineProperty,_ie=Object.defineProperties,wie=Object.getOwnPropertyDescriptor,xie=Object.getOwnPropertyDescriptors,Sie=Object.getOwnPropertyNames,Yd=Object.getOwnPropertySymbols,Eie=Object.getPrototypeOf,jv=Object.prototype.hasOwnProperty,RC=Object.prototype.propertyIsEnumerable,NC=(e,t,n)=>t in e?wu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||(t={}))jv.call(t,n)&&NC(e,n,t[n]);if(Yd)for(var n of Yd(t))RC.call(t,n)&&NC(e,n,t[n]);return e},fe=(e,t)=>_ie(e,xie(t)),k=(e,t)=>wu(e,"name",{value:t,configurable:!0}),DC=(e,t)=>{var n={};for(var r in e)jv.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Yd)for(var r of Yd(e))t.indexOf(r)<0&&RC.call(e,r)&&(n[r]=e[r]);return n},MC=(e,t)=>{for(var n in t)wu(e,n,{get:t[n],enumerable:!0})},jC=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Sie(t))!jv.call(e,i)&&i!==n&&wu(e,i,{get:()=>t[i],enumerable:!(r=wie(t,i))||r.enumerable});return e},yn=(e,t,n)=>(n=e!=null?bie(Eie(e)):{},jC(t||!e||!e.__esModule?wu(n,"default",{value:e,enumerable:!0}):n,e)),Aie=e=>jC(wu({},"__esModule",{value:!0}),e),LC={};MC(LC,{BRAND:()=>LO,DIRTY:()=>vs,EMPTY_PATH:()=>MO,INVALID:()=>gt,NEVER:()=>g$,OK:()=>_r,ParseInputLazyPath:()=>wi,ParseStatus:()=>Dr,Schema:()=>Ct,UntitledDeclarationError:()=>_O,ZodAny:()=>Iu,ZodArray:()=>Pu,ZodBigInt:()=>hc,ZodBoolean:()=>mc,ZodBranded:()=>yc,ZodCatch:()=>bp,ZodDate:()=>wp,ZodDefault:()=>Sp,ZodDiscriminatedUnion:()=>Yv,ZodEffects:()=>Mo,ZodEnum:()=>No,ZodError:()=>ao,ZodFirstPartyTypeKind:()=>Wv,ZodFunction:()=>Xv,ZodIntersection:()=>Cp,ZodIssueCode:()=>Ie,ZodLazy:()=>Tp,ZodLiteral:()=>vc,ZodMap:()=>Qv,ZodNaN:()=>eb,ZodNativeEnum:()=>bc,ZodNever:()=>va,ZodNull:()=>_c,ZodNullable:()=>Do,ZodNumber:()=>wc,ZodObject:()=>_s,ZodOptional:()=>Di,ZodParsedType:()=>Ge,ZodPipeline:()=>Lp,ZodPromise:()=>xc,ZodReadonly:()=>Up,ZodRecord:()=>tb,ZodSchema:()=>Ct,ZodSet:()=>nb,ZodString:()=>dr,ZodSymbol:()=>ib,ZodTemplateLiteral:()=>Xp,ZodTemplateLiteralUnsupportedCheckError:()=>fp,ZodTemplateLiteralUnsupportedTypeError:()=>Vv,ZodTransformer:()=>Mo,ZodTuple:()=>ws,ZodType:()=>Ct,ZodUndefined:()=>Ac,ZodUnion:()=>Cc,ZodUnknown:()=>Nu,ZodVoid:()=>ob,ZuiForm:()=>Joe,addIssueToContext:()=>Ye,agent:()=>ET,aimodel:()=>$T,any:()=>qT,array:()=>ZT,bigint:()=>DT,boolean:()=>fb,coerce:()=>y$,conversation:()=>wT,createZodEnum:()=>gc,cuid2Regex:()=>Zp,cuidRegex:()=>zp,custom:()=>Gv,datasource:()=>kT,date:()=>MT,datetimeRegex:()=>Kp,defaultErrorMap:()=>Du,discriminatedUnion:()=>KT,effect:()=>ah,emailRegex:()=>Vp,enum:()=>r$,errorUtil:()=>ut,event:()=>AT,fromJsonSchema:()=>h$,fromObject:()=>m$,function:()=>e$,getErrorMap:()=>$u,getParsedType:()=>Po,instanceof:()=>RT,intent:()=>TT,intersection:()=>GT,ipv4Regex:()=>Sc,ipv6Regex:()=>Ec,isAborted:()=>dp,isAsync:()=>pc,isDirty:()=>pp,isEmojiRegex:()=>WO,isValid:()=>ku,jsonSchemaToZui:()=>Ic,knowledgebase:()=>IT,late:()=>PT,lazy:()=>t$,literal:()=>n$,makeIssue:()=>dc,map:()=>XT,message:()=>ST,nan:()=>NT,nativeEnum:()=>i$,never:()=>BT,null:()=>FT,nullable:()=>s$,number:()=>cb,object:()=>HT,objectToZui:()=>Mu,objectUtil:()=>lp,oboolean:()=>p$,onumber:()=>d$,optional:()=>a$,ostring:()=>f$,pipeline:()=>l$,preprocess:()=>u$,processCreateParams:()=>Ot,promise:()=>o$,quotelessJson:()=>PO,record:()=>JT,set:()=>QT,setErrorMap:()=>Kv,strictObject:()=>WT,string:()=>lb,symbol:()=>jT,table:()=>CT,tablerow:()=>OT,templateLiteral:()=>c$,transformer:()=>ah,transforms:()=>Xoe,tuple:()=>YT,ulidRegex:()=>Hp,undefined:()=>LT,union:()=>VT,unknown:()=>UT,user:()=>xT,util:()=>Wt,uuidRegex:()=>Wp,variable:()=>_T,void:()=>zT,z:()=>zn,zuiToJsonSchema:()=>oh});var Jd=Aie(LC),zn={};MC(zn,{BRAND:()=>LO,DIRTY:()=>vs,EMPTY_PATH:()=>MO,INVALID:()=>gt,NEVER:()=>g$,OK:()=>_r,ParseInputLazyPath:()=>wi,ParseStatus:()=>Dr,Schema:()=>Ct,ZodAny:()=>Iu,ZodArray:()=>Pu,ZodBigInt:()=>hc,ZodBoolean:()=>mc,ZodBranded:()=>yc,ZodCatch:()=>bp,ZodDate:()=>wp,ZodDefault:()=>Sp,ZodDiscriminatedUnion:()=>Yv,ZodEffects:()=>Mo,ZodEnum:()=>No,ZodError:()=>ao,ZodFirstPartyTypeKind:()=>Wv,ZodFunction:()=>Xv,ZodIntersection:()=>Cp,ZodIssueCode:()=>Ie,ZodLazy:()=>Tp,ZodLiteral:()=>vc,ZodMap:()=>Qv,ZodNaN:()=>eb,ZodNativeEnum:()=>bc,ZodNever:()=>va,ZodNull:()=>_c,ZodNullable:()=>Do,ZodNumber:()=>wc,ZodObject:()=>_s,ZodOptional:()=>Di,ZodParsedType:()=>Ge,ZodPipeline:()=>Lp,ZodPromise:()=>xc,ZodReadonly:()=>Up,ZodRecord:()=>tb,ZodSchema:()=>Ct,ZodSet:()=>nb,ZodString:()=>dr,ZodSymbol:()=>ib,ZodTemplateLiteral:()=>Xp,ZodTemplateLiteralUnsupportedCheckError:()=>fp,ZodTemplateLiteralUnsupportedTypeError:()=>Vv,ZodTransformer:()=>Mo,ZodTuple:()=>ws,ZodType:()=>Ct,ZodUndefined:()=>Ac,ZodUnion:()=>Cc,ZodUnknown:()=>Nu,ZodVoid:()=>ob,addIssueToContext:()=>Ye,agent:()=>ET,aimodel:()=>$T,any:()=>qT,array:()=>ZT,bigint:()=>DT,boolean:()=>fb,coerce:()=>y$,conversation:()=>wT,createZodEnum:()=>gc,cuid2Regex:()=>Zp,cuidRegex:()=>zp,custom:()=>Gv,datasource:()=>kT,date:()=>MT,datetimeRegex:()=>Kp,defaultErrorMap:()=>Du,discriminatedUnion:()=>KT,effect:()=>ah,emailRegex:()=>Vp,enum:()=>r$,errorUtil:()=>ut,event:()=>AT,fromJsonSchema:()=>h$,fromObject:()=>m$,function:()=>e$,getErrorMap:()=>$u,getParsedType:()=>Po,instanceof:()=>RT,intent:()=>TT,intersection:()=>GT,ipv4Regex:()=>Sc,ipv6Regex:()=>Ec,isAborted:()=>dp,isAsync:()=>pc,isDirty:()=>pp,isEmojiRegex:()=>WO,isValid:()=>ku,jsonSchemaToZui:()=>Ic,knowledgebase:()=>IT,late:()=>PT,lazy:()=>t$,literal:()=>n$,makeIssue:()=>dc,map:()=>XT,message:()=>ST,nan:()=>NT,nativeEnum:()=>i$,never:()=>BT,null:()=>FT,nullable:()=>s$,number:()=>cb,object:()=>HT,objectToZui:()=>Mu,objectUtil:()=>lp,oboolean:()=>p$,onumber:()=>d$,optional:()=>a$,ostring:()=>f$,pipeline:()=>l$,preprocess:()=>u$,processCreateParams:()=>Ot,promise:()=>o$,quotelessJson:()=>PO,record:()=>JT,set:()=>QT,setErrorMap:()=>Kv,strictObject:()=>WT,string:()=>lb,symbol:()=>jT,table:()=>CT,tablerow:()=>OT,templateLiteral:()=>c$,transformer:()=>ah,tuple:()=>YT,ulidRegex:()=>Hp,undefined:()=>LT,union:()=>VT,unknown:()=>UT,user:()=>xT,util:()=>Wt,uuidRegex:()=>Wp,variable:()=>_T,void:()=>zT,zuiToJsonSchema:()=>oh});var gn="x-zui",Cie=yn(AG,1),Oie=yn(cY,1),Tie=yn(eC,1),$ie=yn(UX,1),kie=yn(Wd,1),Iie=yn(bC,1);function sc(e){return"comment"in e&&e.comment!=null&&e.comment!==""||"deprecated"in e&&e.deprecated===!0}k(sc,"hasComment");function xu(e){return"standaloneName"in e&&e.standaloneName!=null&&e.standaloneName!==""}k(xu,"hasStandaloneName");var Su={type:"ANY"},Pie={keyName:"[k: string]",type:"ANY"},Eu={type:"UNKNOWN"},Rie={keyName:"[k: string]",type:"UNKNOWN"},Nie=yn(bee,1),FC=yn(hs,1),Die=yn(_te,1),Mie=yn($te,1),jie=yn(Wd,1),Lie=yn(hs,1),uc=Symbol("Parent"),qC=(0,jie.default)(e=>{const t=e[uc];return t?qC(t):e});function UC(e){return e===!0||e===!1}k(UC,"isBoolean");function BC(e){return!(0,Lie.default)(e)}k(BC,"isPrimitive");function Xd(e){return Array.isArray(e.type)||"anyOf"in e||"oneOf"in e}k(Xd,"isCompound");var zC=k((e,t)=>{const n=e.split("/").pop()||"";return t?n.replaceAll(t,""):n},"basename"),Fie=k(e=>{const t=zC(e),n=t.lastIndexOf(".");return n===-1?"":t.slice(n)},"extname"),qie=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 ms(e,t,n){Object.keys(e).forEach(r=>{e[r]&&typeof e[r]=="object"&&!Array.isArray(e[r])&&ko(e[r],t,n,r)})}k(ms,"traverseObjectKeys");function Au(e,t,n){e.forEach((r,i)=>ko(r,t,n,i.toString()))}k(Au,"traverseArray");function ko(e,t,n=new Set,r){if(!n.has(e)){if(n.add(e),t(e,r??null),e.anyOf&&Au(e.anyOf,t,n),e.allOf&&Au(e.allOf,t,n),e.oneOf&&Au(e.oneOf,t,n),e.properties&&ms(e.properties,t,n),e.patternProperties&&ms(e.patternProperties,t,n),e.additionalProperties&&typeof e.additionalProperties=="object"&&ko(e.additionalProperties,t,n),e.items){const{items:i}=e;Array.isArray(i)?Au(i,t,n):ko(i,t,n)}e.additionalItems&&typeof e.additionalItems=="object"&&ko(e.additionalItems,t,n),e.dependencies&&(Array.isArray(e.dependencies)?Au(e.dependencies,t,n):ms(e.dependencies,t,n)),e.definitions&&ms(e.definitions,t,n),e.$defs&&ms(e.$defs,t,n),e.not&&ko(e.not,t,n),Object.keys(e).filter(i=>!qie.has(i)).forEach(i=>{const o=e[i];o&&typeof o=="object"&&ms(o,t,n)})}}k(ko,"traverse");function Lv(e=""){return ZC(zC(e))}k(Lv,"justName");function ZC(e){return e.replace(Fie(e),"")}k(ZC,"stripExtension");function Io(e){return(0,Mie.default)((0,Nie.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,Die.default)(t.toUpperCase())).replace(/\s/g,""))}k(Io,"toSafeString");function HC(e,t){let n=Io(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(HC,"generateName");function WC(...e){if(!process.env.VERBOSE)return console.error(e);console.error(...e)}k(WC,"error");function fr(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(fr,"log");function VC(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(VC,"escapeBlockComment");function KC(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,FC.default)(e.default))return e;break}return delete e.default,e}k(KC,"maybeStripDefault");function GC(e){return"$id"in e&&delete e.$id,"description"in e&&delete e.description,"name"in e&&delete e.name,e}k(GC,"maybeStripNameHints");function YC(e,...t){return e?`${e}
|
|
81
81
|
|
|
82
82
|
${t.join(`
|
|
83
83
|
`)}`:t.join(`
|
|
@@ -122,7 +122,7 @@ ${d.join(" | ")}`;case St.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:const p=e.
|
|
|
122
122
|
${p.join(" | ")}`;case St.ZodFirstPartyTypeKind.ZodIntersection:return`${Zt(s.left,o)} & ${Zt(s.right,o)}`;case St.ZodFirstPartyTypeKind.ZodTuple:return s.items.length===0?"":`[${s.items.map(S=>Zt(S,o)).join(", ")}]`;case St.ZodFirstPartyTypeKind.ZodRecord:const h=Zt(s.keyType,o),y=Zt(s.valueType,o);return`${Jn(s.description)} { [key: ${h}]: ${y} }`;case St.ZodFirstPartyTypeKind.ZodMap:return`Map<${Zt(s.keyType,o)}, ${Zt(s.valueType,o)}>`;case St.ZodFirstPartyTypeKind.ZodSet:return`Set<${Zt(s.valueType,o)}>`;case St.ZodFirstPartyTypeKind.ZodFunction:const v=Zt(new EO(s.args),o),w=Zt(new CO(s.returns),o);return t!=null&&t.declaration?`${Jn(s.description)}
|
|
123
123
|
(${v}): ${w}`:`${Jn(s.description)}
|
|
124
124
|
(${v}) => ${w}`;case St.ZodFirstPartyTypeKind.ZodLazy:return Zt(s.getter(),o);case St.ZodFirstPartyTypeKind.ZodLiteral:return`${Jn(s.description)}
|
|
125
|
-
${ap(e.value)}`.trim();case St.ZodFirstPartyTypeKind.ZodEnum:return s.values.map(ap).join(" | ");case St.ZodFirstPartyTypeKind.ZodEffects:return Zt(s.schema,o);case St.ZodFirstPartyTypeKind.ZodNativeEnum:return Zt(s.values,o);case St.ZodFirstPartyTypeKind.ZodOptional:return t!=null&&t.declaration||(t==null?void 0:t.parent)instanceof St.ZodRecord||(t==null?void 0:t.parent)instanceof St.ZodObject?`${Zt(s.innerType,o)} | undefined`:(t==null?void 0:t.parent)instanceof St.ZodDefault||(t==null?void 0:t.parent)instanceof St.ZodNullable||(t==null?void 0:t.parent)instanceof St.ZodOptional?`${Zt(s.innerType,o)} | undefined`:`${Zt(s.innerType,o)}?`;case St.ZodFirstPartyTypeKind.ZodNullable:return`${Zt(e.unwrap(),o)} | null`;case St.ZodFirstPartyTypeKind.ZodDefault:return Zt(s.innerType,o);case St.ZodFirstPartyTypeKind.ZodCatch:return Zt(e.removeCatch(),o);case St.ZodFirstPartyTypeKind.ZodPromise:return`Promise<${Zt(e.unwrap(),o)}>`;case St.ZodFirstPartyTypeKind.ZodBranded:return Zt(s.type,o);case St.ZodFirstPartyTypeKind.ZodPipeline:return Zt(s.in,o);case St.ZodFirstPartyTypeKind.ZodSymbol:return`${Jn(s.description)} symbol`.trim();case St.ZodFirstPartyTypeKind.ZodReadonly:return`readonly ${Zt(s.innerType,o)}`;case St.ZodFirstPartyTypeKind.ZodTemplateLiteral:return`\`${s.parts.map(S=>typeof S>"u"||S===null?"":typeof S=="string"?S:typeof S=="boolean"||typeof S=="number"?`${S}`:"${"+Zt(S,fe(B({},o),{declaration:!1}))+"}").join("")}\``;default:Wt.assertNever(s)}}k(Zt,"sUnwrapZod");var $O=class{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}};k($O,"ParseInputLazyPath");var wi=$O,kO=k((e,t)=>{if(ku(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 ao(e.common.issues);return this._error=n,this._error}}},"handleResult"),IO=class{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 Po(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Po(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Dr,ctx:{common:t.parent.common,data:t.data,parsedType:Po(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(pc(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:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Po(t)},o=this._parseSync({data:t,path:i.path,parent:i});return kO(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:Po(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(pc(i)?i:Promise.resolve(i));return kO(r,o)}refine(t,n){const r=k(i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n,"getIssueProperties");return this._refinement((i,o)=>{const a=t(i),s=k(()=>o.addIssue(B({code:Ie.custom},r(i))),"setError");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 Mo({schema:this,typeName:"ZodEffects",effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Di.create(this,this._def)}nullable(){return Do.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Pu.create(this,this._def)}promise(){return xc.create(this,this._def)}or(t){return Cc.create([this,t],this._def)}and(t){return Cp.create(this,t,this._def)}transform(t){return new Mo(fe(B({},Ot(this._def)),{schema:this,typeName:"ZodEffects",effect:{type:"transform",transform:t}}))}default(t){const n=typeof t=="function"?t:()=>t;return new Sp(fe(B({},Ot(this._def)),{innerType:this,defaultValue:n,typeName:"ZodDefault"}))}brand(){return new yc(B({typeName:"ZodBranded",type:this},Ot(this._def)))}catch(t){const n=typeof t=="function"?t:()=>t;return new bp(fe(B({},Ot(this._def)),{innerType:this,catchValue:n,typeName:"ZodCatch"}))}describe(t){const n=this.constructor;return new n(fe(B({},this._def),{description:t}))}pipe(t){return Lp.create(this,t)}readonly(){return Up.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}_setZuiMeta(t,n){const r=this._def,i=typeof n=="function"?n.toString():n;switch(r.typeName){case"ZodNullable":case"ZodDefault":case"ZodOptional":case"ZodReadonly":r.innerType._def[gn]=fe(B({},r.innerType._def[gn]),{[t]:i});break;case"ZodEffects":r.schema._def[gn]=fe(B({},r.schema._def[gn]),{[t]:i});break;default:r[gn]=fe(B({},r[gn]),{[t]:i})}}get ui(){const t=this._def;switch(t.typeName){case"ZodNullable":case"ZodDefault":case"ZodOptional":case"ZodReadonly":return t.innerType.ui;case"ZodEffects":return t.schema.ui;default:return t[gn]||{}}}displayAs(t){var n,r,i;return(i=(n=this._def)[r=gn])!=null||(n[r]={}),this._def[gn].displayAs=[t.id,t.params],this}title(t){return this._setZuiMeta("title",t),this}hidden(t){return this._setZuiMeta("hidden",typeof t>"u"?!0:t),this}disabled(t){return this._setZuiMeta("disabled",typeof t>"u"?!0:t),this}placeholder(t){return this._setZuiMeta("placeholder",t),this}toJsonSchema(t){return oh(this,t)}async toTypescriptTypings(t){return yO(this.toJsonSchema(),t)}toTypescript(t){return up(this,t)}async toTypescriptAsync(t){let n=up(this,fe(B({},t),{formatters:[]}));for(const r of(t==null?void 0:t.formatters)||[])n=await r(n);return n}static fromObject(t,n){return Mu(t,n)}static fromJsonSchema(t){return Ic(t)}};k(IO,"ZodType");var Ct=IO,Wv=(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.ZodTemplateLiteral="ZodTemplateLiteral",e.ZodReadonly="ZodReadonly",e))(Wv||{}),Wt;(e=>{e.assertEqual=k(i=>i,"assertEqual");function t(i){}e.assertIs=t,k(t,"assertIs");function n(i){throw new Error("assertNever called")}e.assertNever=n,k(n,"assertNever"),e.arrayToEnum=k(i=>{const o={};for(const a of i)o[a]=a;return o},"arrayToEnum"),e.getValidEnumValues=k(i=>{const o=(0,e.objectKeys)(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return(0,e.objectValues)(a)},"getValidEnumValues"),e.objectValues=k(i=>(0,e.objectKeys)(i).map(function(o){return i[o]}),"objectValues"),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=k((i,o)=>{for(const a of i)if(o(a))return a},"find"),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,k(r,"joinValues"),e.jsonStringifyReplacer=k((i,o)=>typeof o=="bigint"?o.toString():o,"jsonStringifyReplacer")})(Wt||(Wt={}));var lp;(e=>{e.mergeShapes=k((t,n)=>B(B({},t),n),"mergeShapes")})(lp||(lp={}));var Ge=Wt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Po=k(e=>{switch(typeof e){case"undefined":return Ge.undefined;case"string":return Ge.string;case"number":return isNaN(e)?Ge.nan:Ge.number;case"boolean":return Ge.boolean;case"function":return Ge.function;case"bigint":return Ge.bigint;case"symbol":return Ge.symbol;case"object":return Array.isArray(e)?Ge.array:e===null?Ge.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ge.promise:typeof Map<"u"&&e instanceof Map?Ge.map:typeof Set<"u"&&e instanceof Set?Ge.set:typeof Date<"u"&&e instanceof Date?Ge.date:Ge.object;default:return Ge.unknown}},"getParsedType");function Ot(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,[gn]:e==null?void 0:e[gn]}:{errorMap:k((a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},"customMap"),description:i,[gn]:e==null?void 0:e[gn]}}k(Ot,"processCreateParams");var Ie=Wt.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"]),PO=k(e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),cp=class wF extends Error{constructor(t){super(),this.issues=[],this.addIssue=k(r=>{this.issues=[...this.issues,r]},"addIssue"),this.addIssues=k((r=[])=>{this.issues=[...this.issues,...r]},"addIssues");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=k(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++}}},"processError");return i(this),r}static assert(t){if(!(t instanceof wF))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Wt.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()}};k(cp,"ZodError"),cp.create=k(e=>new cp(e),"create");var ao=cp,RO=class extends Error{constructor(){super("Unsupported zod type!");const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodTemplateLiteralUnsupportedTypeError"}};k(RO,"ZodTemplateLiteralUnsupportedTypeError");var Vv=RO,NO=class extends Error{constructor(t,n){super(`${t}'s "${n}" check is not supported in template literals!`);const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodTemplateLiteralUnsupportedCheckError"}};k(NO,"ZodTemplateLiteralUnsupportedCheckError");var fp=NO,DO=Du;function Kv(e){DO=e}k(Kv,"setErrorMap");function $u(){return DO}k($u,"getErrorMap");var dc=k(e=>{var t;const{data:n,path:r,errorMaps:i,issueData:o}=e,a=[...r,...o.path||[]],s=fe(B({},o),{path:a});let l="";const c=i.filter(d=>!!d).slice().reverse();for(const d of c)l=d(s,{data:n,defaultError:l}).message;return fe(B({},o),{path:a,message:(t=o.message)!=null?t:l})},"makeIssue"),MO=[];function Ye(e,t){const n=dc({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,$u(),Du].filter(r=>!!r)});e.common.issues.push(n)}k(Ye,"addIssueToContext");var jO=class xF{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 gt;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 xF.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 gt;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}}};k(jO,"ParseStatus");var Dr=jO,gt=Object.freeze({status:"aborted"}),vs=k(e=>({status:"dirty",value:e}),"DIRTY"),_r=k(e=>({status:"valid",value:e}),"OK"),dp=k(e=>e.status==="aborted","isAborted"),pp=k(e=>e.status==="dirty","isDirty"),ku=k(e=>e.status==="valid","isValid"),pc=k(e=>typeof Promise<"u"&&e instanceof Promise,"isAsync"),ut;(e=>{e.errToObj=k(t=>typeof t=="string"?{message:t}:t||{},"errToObj"),e.toString=k(t=>typeof t=="string"?t:t==null?void 0:t.message,"toString")})(ut||(ut={}));var hp=class extends Ct{constructor(){super(...arguments),this._any=!0}_parse(t){return _r(t.data)}};k(hp,"ZodAny"),hp.create=k(e=>new hp(B({typeName:"ZodAny"},Ot(e))),"create");var Iu=hp,mp=class Qy extends Ct{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Ge.array)return Ye(n,{code:Ie.invalid_type,expected:Ge.array,received:n.parsedType}),gt;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(a||s)&&(Ye(n,{code:a?Ie.too_big:Ie.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&&(Ye(n,{code:Ie.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&&(Ye(n,{code:Ie.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 wi(n,a,n.path,s)))).then(a=>Dr.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new wi(n,a,n.path,s)));return Dr.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Qy(fe(B({},this._def),{minLength:{value:t,message:ut.toString(n)}}))}max(t,n){return new Qy(fe(B({},this._def),{maxLength:{value:t,message:ut.toString(n)}}))}length(t,n){return new Qy(fe(B({},this._def),{exactLength:{value:t,message:ut.toString(n)}}))}nonempty(t){return this.min(1,t)}};k(mp,"ZodArray"),mp.create=k((e,t)=>new mp(B({type:e,minLength:null,maxLength:null,exactLength:null,typeName:"ZodArray"},Ot(t))),"create");var Pu=mp,yp=class Px extends Ct{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)!==Ge.bigint){const o=this._getOrReturnCtx(t);return Ye(o,{code:Ie.invalid_type,expected:Ge.bigint,received:o.parsedType}),gt}let r;const i=new Dr;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),Ye(r,{code:Ie.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),Ye(r,{code:Ie.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),Ye(r,{code:Ie.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Wt.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ut.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ut.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ut.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ut.toString(n))}setLimit(t,n,r,i){return new Px(fe(B({},this._def),{checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ut.toString(i)}]}))}_addCheck(t){return new Px(fe(B({},this._def),{checks:[...this._def.checks,t]}))}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ut.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ut.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ut.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ut.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ut.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}};k(yp,"ZodBigInt"),yp.create=k(e=>{var t;return new yp(B({checks:[],typeName:"ZodBigInt",coerce:(t=e==null?void 0:e.coerce)!=null?t:!1},Ot(e)))},"create");var hc=yp,gp=class extends Ct{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ge.boolean){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.boolean,received:r.parsedType}),gt}return _r(t.data)}};k(gp,"ZodBoolean"),gp.create=k(e=>new gp(B({typeName:"ZodBoolean",coerce:(e==null?void 0:e.coerce)||!1},Ot(e))),"create");var mc=gp,LO=Symbol("zod_brand"),FO=class extends Ct{_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}};k(FO,"ZodBranded");var yc=FO,vp=class extends Ct{_parse(t){const{ctx:n}=this._processInputParams(t),r=fe(B({},n),{common:fe(B({},n.common),{issues:[]})}),i=this._def.innerType._parse({data:r.data,path:r.path,parent:B({},r)});return pc(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ao(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ao(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};k(vp,"ZodCatch"),vp.create=k((e,t)=>new vp(B({innerType:e,typeName:"ZodCatch",catchValue:typeof t.catch=="function"?t.catch:()=>t.catch},Ot(t))),"create");var bp=vp,Gv=k((e,t={},n)=>e?Iu.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:n)!=null?a:!0,c=typeof s=="string"?{message:s}:s;i.addIssue(fe(B({code:"custom"},c),{fatal:l}))}}):Iu.create(),"custom"),_p=class SF extends Ct{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ge.date){const o=this._getOrReturnCtx(t);return Ye(o,{code:Ie.invalid_type,expected:Ge.date,received:o.parsedType}),gt}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Ye(o,{code:Ie.invalid_date}),gt}const r=new Dr;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),Ye(i,{code:Ie.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),Ye(i,{code:Ie.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Wt.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new SF(fe(B({},this._def),{checks:[...this._def.checks,t]}))}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ut.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ut.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}};k(_p,"ZodDate"),_p.create=k(e=>new _p(B({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:"ZodDate"},Ot(e))),"create");var wp=_p,xp=class extends Ct{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ge.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};k(xp,"ZodDefault"),xp.create=k((e,t)=>new xp(B({innerType:e,typeName:"ZodDefault",defaultValue:typeof t.default=="function"?t.default:()=>t.default},Ot(t))),"create");var Sp=xp,Ro=k(e=>e instanceof Tp?Ro(e.schema):e instanceof Mo?Ro(e.innerType()):e instanceof vc?[e.value]:e instanceof No?e.options:e instanceof bc?Wt.objectValues(e.enum):e instanceof Sp?Ro(e._def.innerType):e instanceof Ac?[void 0]:e instanceof _c?[null]:e instanceof Di?[void 0,...Ro(e.unwrap())]:e instanceof Do?[null,...Ro(e.unwrap())]:e instanceof yc||e instanceof Up?Ro(e.unwrap()):e instanceof bp?Ro(e._def.innerType):[],"getDiscriminator"),qO=class EF extends Ct{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ge.object)return Ye(n,{code:Ie.invalid_type,expected:Ge.object,received:n.parsedType}),gt;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}):(Ye(n,{code:Ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),gt)}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=Ro(o.shape[t]);if(!a.length)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 EF(B({typeName:"ZodDiscriminatedUnion",discriminator:t,options:n,optionsMap:i},Ot(r)))}};k(qO,"ZodDiscriminatedUnion");var Yv=qO;function gc(e,t){return new No(B({values:e,typeName:"ZodEnum"},Ot(t)))}k(gc,"createZodEnum");var Jv=class Rx extends Ct{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Ye(n,{expected:Wt.joinValues(r),received:n.parsedType,code:Ie.invalid_type}),gt}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return Ye(n,{received:n.data,code:Ie.invalid_enum_value,options:r}),gt}return _r(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,n=this._def){return Rx.create(t,B(B({},this._def),n))}exclude(t,n=this._def){return Rx.create(this.options.filter(r=>!t.includes(r)),B(B({},this._def),n))}};k(Jv,"ZodEnum"),Jv.create=gc;var No=Jv,UO=class eg extends Ct{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ge.function)return Ye(n,{code:Ie.invalid_type,expected:Ge.function,received:n.parsedType}),gt;function r(s,l){return dc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,$u(),Du].filter(c=>!!c),issueData:{code:Ie.invalid_arguments,argumentsError:l}})}k(r,"makeArgsIssue");function i(s,l){return dc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,$u(),Du].filter(c=>!!c),issueData:{code:Ie.invalid_return_type,returnTypeError:l}})}k(i,"makeReturnsIssue");const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof xc){const s=this;return _r(async function(...l){const c=new ao([]),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 _r(function(...l){const c=s._def.args.safeParse(l,o);if(!c.success)throw new ao([r(l,c.error)]);const d=Reflect.apply(a,this,c.data),p=s._def.returns.safeParse(d,o);if(!p.success)throw new ao([i(d,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new eg(fe(B({},this._def),{args:ws.create(t).rest(Nu.create())}))}returns(t){return new eg(fe(B({},this._def),{returns:t}))}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new eg(B({args:t||ws.create([]).rest(Nu.create()),returns:n||Nu.create(),typeName:"ZodFunction"},Ot(r)))}};k(UO,"ZodFunction");var Xv=UO;function Ep(e,t){const n=Po(e),r=Po(t);if(e===t)return{valid:!0,data:e};if(n===Ge.object&&r===Ge.object){const i=Wt.objectKeys(t),o=Wt.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a=B(B({},e),t);for(const s of o){const l=Ep(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Ge.array&&r===Ge.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=Ep(a,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Ge.date&&r===Ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}k(Ep,"mergeValues");var Ap=class extends Ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=k((o,a)=>{if(dp(o)||dp(a))return gt;const s=Ep(o.value,a.value);return s.valid?((pp(o)||pp(a))&&n.dirty(),{status:n.value,value:s.data}):(Ye(r,{code:Ie.invalid_intersection_types}),gt)},"handleParsed");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}))}};k(Ap,"ZodIntersection"),Ap.create=k((e,t,n)=>new Ap(B({left:e,right:t,typeName:"ZodIntersection"},Ot(n))),"create");var Cp=Ap,Op=class extends Ct{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})}};k(Op,"ZodLazy"),Op.create=k((e,t)=>new Op(B({getter:e,typeName:"ZodLazy"},Ot(t))),"create");var Tp=Op,$p=class extends Ct{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Ye(n,{received:n.data,code:Ie.invalid_literal,expected:this._def.value}),gt}return{status:"valid",value:t.data}}get value(){return this._def.value}};k($p,"ZodLiteral"),$p.create=k((e,t)=>new $p(B({value:e,typeName:"ZodLiteral"},Ot(t))),"create");var vc=$p,kp=class extends Ct{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!==Ge.map)return Ye(r,{code:Ie.invalid_type,expected:Ge.map,received:r.parsedType}),gt;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:i._parse(new wi(r,s,r.path,[c,"key"])),value:o._parse(new wi(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 gt;(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 gt;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(c.value,d.value)}return{status:n.value,value:s}}}};k(kp,"ZodMap"),kp.create=k((e,t,n)=>new kp(B({valueType:t,keyType:e,typeName:"ZodMap"},Ot(n))),"create");var Qv=kp,Ip=class extends Ct{_parse(t){if(this._getType(t)!==Ge.nan){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.nan,received:r.parsedType}),gt}return{status:"valid",value:t.data}}};k(Ip,"ZodNaN"),Ip.create=k(e=>new Ip(B({typeName:"ZodNaN"},Ot(e))),"create");var eb=Ip,Pp=class extends Ct{_parse(t){const n=Wt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ge.string&&r.parsedType!==Ge.number){const i=Wt.objectValues(n);return Ye(r,{expected:Wt.joinValues(i),received:r.parsedType,code:Ie.invalid_type}),gt}if(n.indexOf(t.data)===-1){const i=Wt.objectValues(n);return Ye(r,{received:r.data,code:Ie.invalid_enum_value,options:i}),gt}return _r(t.data)}get enum(){return this._def.values}};k(Pp,"ZodNativeEnum"),Pp.create=k((e,t)=>new Pp(B({values:e,typeName:"ZodNativeEnum"},Ot(t))),"create");var bc=Pp,Rp=class extends Ct{_parse(t){const n=this._getOrReturnCtx(t);return Ye(n,{code:Ie.invalid_type,expected:Ge.never,received:n.parsedType}),gt}};k(Rp,"ZodNever"),Rp.create=k(e=>new Rp(B({typeName:"ZodNever"},Ot(e))),"create");var ga=Rp,Np=class extends Ct{_parse(t){if(this._getType(t)!==Ge.null){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.null,received:r.parsedType}),gt}return _r(t.data)}};k(Np,"ZodNull"),Np.create=k(e=>new Np(B({typeName:"ZodNull"},Ot(e))),"create");var _c=Np,Dp=class extends Ct{_parse(t){return this._getType(t)===Ge.null?_r(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};k(Dp,"ZodNullable"),Dp.create=k((e,t)=>new Dp(B({innerType:e,typeName:"ZodNullable"},Ot(t))),"create");var Do=Dp;function BO(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)}k(BO,"floatSafeRemainder");var Mp=class Nx extends Ct{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)!==Ge.number){const o=this._getOrReturnCtx(t);return Ye(o,{code:Ie.invalid_type,expected:Ge.number,received:o.parsedType}),gt}let r;const i=new Dr;for(const o of this._def.checks)o.kind==="int"?Wt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Ye(r,{code:Ie.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),Ye(r,{code:Ie.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),Ye(r,{code:Ie.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?BO(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Ye(r,{code:Ie.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Ye(r,{code:Ie.not_finite,message:o.message}),i.dirty()):Wt.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ut.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ut.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ut.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ut.toString(n))}setLimit(t,n,r,i){return new Nx(fe(B({},this._def),{checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ut.toString(i)}]}))}_addCheck(t){return new Nx(fe(B({},this._def),{checks:[...this._def.checks,t]}))}int(t){return this._addCheck({kind:"int",message:ut.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ut.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ut.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ut.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ut.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ut.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ut.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ut.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ut.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"&&Wt.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)}};k(Mp,"ZodNumber"),Mp.create=k(e=>new Mp(B({checks:[],typeName:"ZodNumber",coerce:(e==null?void 0:e.coerce)||!1},Ot(e))),"create");var wc=Mp;function bs(e){if(e instanceof _s){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Di.create(bs(r))}return new _s(fe(B({},e._def),{shape:()=>t}))}else return e instanceof Pu?new Pu(fe(B({},e._def),{type:bs(e.element)})):e instanceof Di?Di.create(bs(e.unwrap())):e instanceof Do?Do.create(bs(e.unwrap())):e instanceof ws?ws.create(e.items.map(t=>bs(t))):e}k(bs,"deepPartialify");var va=class Gi extends Ct{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=Wt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Ge.object){const c=this._getOrReturnCtx(t);return Ye(c,{code:Ie.invalid_type,expected:Ge.object,received:c.parsedType}),gt}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof ga&&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 wi(i,p,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof ga){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&&(Ye(i,{code:Ie.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 wi(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=>Dr.mergeObjectSync(r,c)):Dr.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ut.errToObj,new Gi(B(fe(B({},this._def),{unknownKeys:"strict"}),t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const l=(a=(o=(i=this._def).errorMap)==null?void 0:o.call(i,n,r).message)!=null?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ut.errToObj(t).message)!=null?s:l}:{message:l}}}:{}))}strip(){return new Gi(fe(B({},this._def),{unknownKeys:"strip"}))}passthrough(){return new Gi(fe(B({},this._def),{unknownKeys:"passthrough"}))}extend(t){return new Gi(fe(B({},this._def),{shape:()=>B(B({},this._def.shape()),t)}))}merge(t){return new Gi({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>B(B({},this._def.shape()),t._def.shape()),typeName:"ZodObject"})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Gi(fe(B({},this._def),{catchall:t}))}pick(t){const n={};return Wt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Gi(fe(B({},this._def),{shape:()=>n}))}omit(t){const n={};return Wt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Gi(fe(B({},this._def),{shape:()=>n}))}deepPartial(){return bs(this)}partial(t){const n={};return Wt.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i==null?void 0:i.optional()}),new Gi(fe(B({},this._def),{shape:()=>n}))}required(t){const n={};return Wt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Di;)o=o._def.innerType;n[r]=o}}),new Gi(fe(B({},this._def),{shape:()=>n}))}keyof(){return gc(Wt.objectKeys(this.shape))}};k(va,"ZodObject"),va.create=k((e,t)=>new va(B({shape:()=>e,unknownKeys:"strip",catchall:ga.create(),typeName:"ZodObject"},Ot(t))),"create"),va.strictCreate=k((e,t)=>new va(B({shape:()=>e,unknownKeys:"strict",catchall:ga.create(),typeName:"ZodObject"},Ot(t))),"strictCreate"),va.lazycreate=k((e,t)=>new va(B({shape:e,unknownKeys:"strip",catchall:ga.create(),typeName:"ZodObject"},Ot(t))),"lazycreate");var _s=va,jp=class extends Ct{_parse(t){return this._getType(t)===Ge.undefined?_r(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};k(jp,"ZodOptional"),jp.create=k((e,t)=>new jp(B({innerType:e,typeName:"ZodOptional"},Ot(t))),"create");var Di=jp,zO=class AF extends Ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return k(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?gt:o.status==="dirty"?(n.dirty(),vs(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})},"handleAsync")();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?gt: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:"ZodPipeline"})}};k(zO,"ZodPipeline");var Lp=zO,Fp=class extends Ct{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ge.promise&&n.common.async===!1)return Ye(n,{code:Ie.invalid_type,expected:Ge.promise,received:n.parsedType}),gt;const r=n.parsedType===Ge.promise?n.data:Promise.resolve(n.data);return _r(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};k(Fp,"ZodPromise"),Fp.create=k((e,t)=>new Fp(B({type:e,typeName:"ZodPromise"},Ot(t))),"create");var xc=Fp,qp=class extends Ct{_parse(t){const n=this._def.innerType._parse(t);return ku(n)&&(n.value=Object.freeze(n.value)),n}unwrap(){return this._def.innerType}};k(qp,"ZodReadonly"),qp.create=k((e,t)=>new qp(B({innerType:e,typeName:"ZodReadonly"},Ot(t))),"create");var Up=qp,ZO=class Dx extends Ct{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!==Ge.object)return Ye(r,{code:Ie.invalid_type,expected:Ge.object,received:r.parsedType}),gt;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new wi(r,s,r.path,s)),value:a._parse(new wi(r,r.data[s],r.path,s))});return r.common.async?Dr.mergeObjectAsync(n,i):Dr.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ct?new Dx(B({keyType:t,valueType:n,typeName:"ZodRecord"},Ot(r))):new Dx(B({keyType:dr.create(),valueType:t,typeName:"ZodRecord"},Ot(n)))}};k(ZO,"ZodRecord");var tb=ZO,Bp=class Mx extends Ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ge.set)return Ye(r,{code:Ie.invalid_type,expected:Ge.set,received:r.parsedType}),gt;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Ye(r,{code:Ie.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&&(Ye(r,{code:Ie.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 gt;d.status==="dirty"&&n.dirty(),c.add(d.value)}return{status:n.value,value:c}}k(a,"finalizeSet");const s=[...r.data.values()].map((l,c)=>o._parse(new wi(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Mx(fe(B({},this._def),{minSize:{value:t,message:ut.toString(n)}}))}max(t,n){return new Mx(fe(B({},this._def),{maxSize:{value:t,message:ut.toString(n)}}))}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};k(Bp,"ZodSet"),Bp.create=k((e,t)=>new Bp(B({valueType:e,minSize:null,maxSize:null,typeName:"ZodSet"},Ot(t))),"create");var nb=Bp,zp=/^c[^\s-]{8,}$/i,Zp=/^[a-z][a-z0-9]*$/,Hp=/^[0-9A-HJKMNP-TV-Z]{26}$/,Wp=/^[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,Vp=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,HO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",WO=k(e=>e===HO,"isEmojiRegex"),rb,Sc=/^(((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}))$/,Ec=/^(([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})))$/,Kp=k(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$"),"datetimeRegex");function VO(e,t){return!!((t==="v4"||!t)&&Sc.test(e)||(t==="v6"||!t)&&Ec.test(e))}k(VO,"isValidIP");var Gp=class Yf extends Ct{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ge.string){const o=this._getOrReturnCtx(t);return Ye(o,{code:Ie.invalid_type,expected:Ge.string,received:o.parsedType}),gt}const r=new Dr;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),Ye(i,{code:Ie.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),Ye(i,{code:Ie.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?Ye(i,{code:Ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&Ye(i,{code:Ie.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Vp.test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"email",code:Ie.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")rb||(rb=new RegExp(HO,"u")),rb.test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"emoji",code:Ie.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")Wp.test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"uuid",code:Ie.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")zp.test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"cuid",code:Ie.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")Zp.test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"cuid2",code:Ie.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")Hp.test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"ulid",code:Ie.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Ye(i,{validation:"url",code:Ie.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),Ye(i,{validation:"regex",code:Ie.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),Ye(i,{code:Ie.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),Ye(i,{code:Ie.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),Ye(i,{code:Ie.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Kp(o).test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{code:Ie.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?VO(t.data,o.version)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"ip",code:Ie.invalid_string,message:o.message}),r.dirty()):Wt.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),B({validation:n,code:Ie.invalid_string},ut.errToObj(r)))}_addCheck(t){return new Yf(fe(B({},this._def),{checks:[...this._def.checks,t]}))}email(t){return this._addCheck(B({kind:"email"},ut.errToObj(t)))}url(t){return this._addCheck(B({kind:"url"},ut.errToObj(t)))}emoji(t){return this._addCheck(B({kind:"emoji"},ut.errToObj(t)))}uuid(t){return this._addCheck(B({kind:"uuid"},ut.errToObj(t)))}cuid(t){return this._addCheck(B({kind:"cuid"},ut.errToObj(t)))}cuid2(t){return this._addCheck(B({kind:"cuid2"},ut.errToObj(t)))}ulid(t){return this._addCheck(B({kind:"ulid"},ut.errToObj(t)))}ip(t){return this._addCheck(B({kind:"ip"},ut.errToObj(t)))}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck(B({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:!1},ut.errToObj(t==null?void 0:t.message)))}regex(t,n){return this._addCheck(B({kind:"regex",regex:t},ut.errToObj(n)))}includes(t,n){return this._addCheck(B({kind:"includes",value:t,position:n==null?void 0:n.position},ut.errToObj(n==null?void 0:n.message)))}startsWith(t,n){return this._addCheck(B({kind:"startsWith",value:t},ut.errToObj(n)))}endsWith(t,n){return this._addCheck(B({kind:"endsWith",value:t},ut.errToObj(n)))}min(t,n){return this._addCheck(B({kind:"min",value:t},ut.errToObj(n)))}max(t,n){return this._addCheck(B({kind:"max",value:t},ut.errToObj(n)))}length(t,n){return this._addCheck(B({kind:"length",value:t},ut.errToObj(n)))}nonempty(t){return this.min(1,ut.errToObj(t))}trim(){return new Yf(fe(B({},this._def),{checks:[...this._def.checks,{kind:"trim"}]}))}secret(){return this._def[gn]=fe(B({},this._def[gn]),{secret:!0}),this}toLowerCase(){return new Yf(fe(B({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]}))}toUpperCase(){return new Yf(fe(B({},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}};k(Gp,"ZodString"),Gp.create=k(e=>{var t;return new Gp(B({checks:[],typeName:"ZodString",coerce:(t=e==null?void 0:e.coerce)!=null?t:!1},Ot(e)))},"create");var dr=Gp,Yp=class extends Ct{_parse(t){if(this._getType(t)!==Ge.symbol){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.symbol,received:r.parsedType}),gt}return _r(t.data)}};k(Yp,"ZodSymbol"),Yp.create=k(e=>new Yp(B({typeName:"ZodSymbol"},Ot(e))),"create");var ib=Yp,Jp=class jx extends Ct{interpolated(t){return this._addPart(t)}literal(t){return this._addPart(t)}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ge.string){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.string,received:r.parsedType}),gt}if(!new RegExp(this._def.regexString).test(t.data)){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_string,message:`does not match template literal with pattern /${this._def.regexString}/`,path:r.path,validation:"regex"}),gt}return{status:"valid",value:t.data}}_addPart(t){const n=[...this._def.parts,t];return new jx(fe(B({},this._def),{parts:n,regexString:this._appendToRegexString(this._def.regexString,t)}))}_appendToRegexString(t,n){return`^${this._unwrapRegExp(t)}${this._transformPartToRegexString(n)}$`}_transformPartToRegexString(t){if(!(t instanceof Ct))return this._escapeRegExp(t);if(t instanceof vc)return this._escapeRegExp(t._def.value);if(t instanceof dr)return this._transformZodStringPartToRegexString(t);if(t instanceof No||t instanceof bc)return`(${(t instanceof No?t._def.values:Wt.getValidEnumValues(t._def.values)).map(this._escapeRegExp).join("|")})`;if(t instanceof Cc)return`(${t._def.options.map(n=>this._transformPartToRegexString(n)).join("|")})`;if(t instanceof wc)return this._transformZodNumberPartToRegexString(t);if(t instanceof Di)return`(${this._transformPartToRegexString(t.unwrap())})?`;if(t instanceof jx)return this._unwrapRegExp(t._def.regexString);if(t instanceof hc)return"\\-?\\d+";if(t instanceof mc)return"(true|false)";if(t instanceof Do){do t=t.unwrap();while(t instanceof Do);return`(${this._transformPartToRegexString(t)}|null)${t instanceof Di?"?":""}`}if(t instanceof yc)return this._transformPartToRegexString(t.unwrap());if(t instanceof Iu)return".*";if(t instanceof _c)return"null";if(t instanceof Ac)return"undefined";throw new Vv}_transformZodStringPartToRegexString(t){let n=1/0,r=0,i="",o="";for(const l of t._def.checks){const c=this._resolveRegexForStringCheck(l);if(c)return this._unwrapRegExp(c);if(l.kind==="endsWith")i=l.value;else if(l.kind==="length")r=n=l.value;else if(l.kind==="max")n=Math.max(0,Math.min(n,l.value));else if(l.kind==="min")r=Math.max(r,l.value);else if(l.kind==="startsWith")o=l.value;else throw new fp("ZodString",l.kind)}const a=Math.max(0,r-o.length-i.length),s=Number.isFinite(n)?Math.max(0,n-o.length-i.length):1/0;return s===0||a>s?`${o}${i}`:`${o}.${this._resolveRegexWildcardLength(a,s)}${i}`}_resolveRegexForStringCheck(t){var n;return(n={[t.kind]:null,cuid:zp,cuid2:Zp,datetime:t.kind==="datetime"?Kp(t):null,email:Vp,ip:t.kind==="ip"?{any:new RegExp(`^(${this._unwrapRegExp(Sc.source)})|(${this._unwrapRegExp(Ec.source)})$`),v4:Sc,v6:Ec}[t.version||"any"]:null,regex:t.kind==="regex"?t.regex:null,ulid:Hp,uuid:Wp}[t.kind])!=null?n:null}_resolveRegexWildcardLength(t,n){return t===n?t===1?"":`{${t}}`:n!==1/0?`{${t},${n}}`:t===0?"*":t===1?"+":`{${t},}`}_transformZodNumberPartToRegexString(t){let n=!0,r=!0,i=-1/0,o=1/0,a=!0,s=!1,l=!1,c="";for(const d of t._def.checks)if(d.kind==="finite")s=!0;else if(d.kind==="int")l=!0;else if(d.kind==="max")o=Math.min(o,d.value),d.value<=0&&(r=!1,d.value===0&&!d.inclusive&&(a=!1));else if(d.kind==="min")i=Math.max(i,d.value),d.value>=0&&(n=!1,d.value===0&&!d.inclusive&&(a=!1));else throw new fp("ZodNumber",d.kind);if(Number.isFinite(i)&&Number.isFinite(o)&&(s=!0),n)c=`${c}\\-`,r&&(c=`${c}?`);else if(!r)return"0+";return s||(c=`${c}(Infinity|(`),a?l?c=`${c}\\d+`:c=`${c}\\d+(\\.\\d+)?`:l?c=`${c}\\d*[1-9]\\d*`:c=`${c}((\\d*[1-9]\\d*(\\.\\d+)?)|(\\d+\\.\\d*[1-9]\\d*))`,s||(c=`${c}))`),c}_unwrapRegExp(t){const n=typeof t=="string"?"":t.flags,r=typeof t=="string"?t:t.source;return n.includes("i")?this._unwrapRegExp(this._makeRegexStringCaseInsensitive(r)):r.replace(/(^\^)|(\$$)/g,"")}_makeRegexStringCaseInsensitive(t){const n=k(o=>o.match(/[a-z]/i)!=null,"isAlphabetic");let r="",i=!1;for(let o=0;o<t.length;o++){const a=t.charAt(o),s=t.charAt(o+1);if(a==="\\"){r+=`${a}${s}`,o++;continue}if(a==="["?i=!0:i&&a==="]"&&(i=!1),!n(a)){r+=a;continue}if(!i){r+=`[${a.toLowerCase()}${a.toUpperCase()}]`;continue}const l=t.charAt(o+2);if(s!=="-"||!n(l)){r+=`${a.toLowerCase()}${a.toUpperCase()}`;continue}r+=`${a.toLowerCase()}-${l.toLowerCase()}${a.toUpperCase()}-${l.toUpperCase()}`,o+=2}return r}_escapeRegExp(t){return typeof t!="string"&&(t=`${t}`),t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}};k(Jp,"ZodTemplateLiteral"),Jp.create=k(e=>{var t;return new Jp(fe(B({},Ot(e)),{coerce:(t=e==null?void 0:e.coerce)!=null?t:!1,parts:[],regexString:"^$",typeName:"ZodTemplateLiteral"}))},"create");var Xp=Jp,Ru=class extends Ct{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName==="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=>{Ye(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);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return gt;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?gt:l.status==="dirty"||n.value==="dirty"?vs(l.value):l});{if(n.value==="aborted")return gt;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?gt:s.status==="dirty"||n.value==="dirty"?vs(s.value):s}}if(i.type==="refinement"){const a=k(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},"executeRefinement");if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?gt:(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"?gt:(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(!ku(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=>ku(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);Wt.assertNever(i)}};k(Ru,"ZodEffects"),Ru.create=k((e,t,n)=>new Ru(B({schema:e,typeName:"ZodEffects",effect:t},Ot(n))),"create"),Ru.createWithPreprocess=k((e,t,n)=>new Ru(B({schema:t,effect:{type:"preprocess",transform:e},typeName:"ZodEffects"},Ot(n))),"createWithPreprocess");var Mo=Ru,Qp=class CF extends Ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ge.array)return Ye(r,{code:Ie.invalid_type,expected:Ge.array,received:r.parsedType}),gt;if(r.data.length<this._def.items.length)return Ye(r,{code:Ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),gt;!this._def.rest&&r.data.length>this._def.items.length&&(Ye(r,{code:Ie.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 wi(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>Dr.mergeArray(n,a)):Dr.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new CF(fe(B({},this._def),{rest:t}))}};k(Qp,"ZodTuple"),Qp.create=k((e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qp(B({items:e,typeName:"ZodTuple",rest:null},Ot(t)))},"create");var ws=Qp,eh=class extends Ct{_parse(t){if(this._getType(t)!==Ge.undefined){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.undefined,received:r.parsedType}),gt}return _r(t.data)}};k(eh,"ZodUndefined"),eh.create=k(e=>new eh(B({typeName:"ZodUndefined"},Ot(e))),"create");var Ac=eh,th=class extends Ct{_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 ao(s.ctx.common.issues));return Ye(n,{code:Ie.invalid_union,unionErrors:a}),gt}if(k(i,"handleResults"),n.common.async)return Promise.all(r.map(async o=>{const a=fe(B({},n),{common:fe(B({},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=fe(B({},n),{common:fe(B({},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 ao(l));return Ye(n,{code:Ie.invalid_union,unionErrors:s}),gt}}get options(){return this._def.options}};k(th,"ZodUnion"),th.create=k((e,t)=>new th(B({options:e,typeName:"ZodUnion"},Ot(t))),"create");var Cc=th,nh=class extends Ct{constructor(){super(...arguments),this._unknown=!0}_parse(t){return _r(t.data)}};k(nh,"ZodUnknown"),nh.create=k(e=>new nh(B({typeName:"ZodUnknown"},Ot(e))),"create");var Nu=nh,rh=class extends Ct{_parse(t){if(this._getType(t)!==Ge.undefined){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.void,received:r.parsedType}),gt}return _r(t.data)}};k(rh,"ZodVoid"),rh.create=k(e=>new rh(B({typeName:"ZodVoid"},Ot(e))),"create");var ob=rh,toe=k((e,t)=>{let n;switch(e.code){case Ie.invalid_type:e.received===Ge.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Wt.jsonStringifyReplacer)}`;break;case Ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${Wt.joinValues(e.keys,", ")}`;break;case Ie.invalid_union:n="Invalid input";break;case Ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Wt.joinValues(e.options)}`;break;case Ie.invalid_enum_value:n=`Invalid enum value. Expected ${Wt.joinValues(e.options)}, received '${e.received}'`;break;case Ie.invalid_arguments:n="Invalid function arguments";break;case Ie.invalid_return_type:n="Invalid function return type";break;case Ie.invalid_date:n="Invalid date";break;case Ie.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}"`:Wt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ie.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 Ie.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 Ie.custom:n="Invalid input";break;case Ie.invalid_intersection_types:n="Intersection results could not be merged";break;case Ie.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ie.not_finite:n="Number must be finite";break;default:n=t.defaultError,Wt.assertNever(e)}return{message:n}},"errorMap"),Du=toe,noe=/^\d{4}-\d{2}-\d{2}(T|\s)?((\d{2}:\d{2}:\d{2}(\.\d{1,3})?)|(\d{2}:\d{2}))?(\s?([+-]\d{2}:\d{2}|Z))?$/,Mu=k((e,t,n=!0)=>{if(typeof e!="object")throw new Error("Input must be an object");const r=k(a=>{let s=a;return t!=null&&t.nullable&&(s=s.nullable()),t!=null&&t.optional&&(s=s.optional()),t!=null&&t.passtrough&&typeof s.passthrough=="function"&&(s=s.passthrough()),s},"applyOptions"),i=Object.entries(e).reduce((a,[s,l])=>{if(l===null)a[s]=r(zn.null());else switch(typeof l){case"string":a[s]=noe.test(l)?r(zn.string().datetime()):r(zn.string());break;case"number":a[s]=r(zn.number());break;case"boolean":a[s]=r(zn.boolean());break;case"object":Array.isArray(l)?l.length===0?a[s]=r(zn.array(zn.unknown())):typeof l[0]=="object"?a[s]=r(zn.array(Mu(l[0],t,!1))):["string","number","boolean"].includes(typeof l[0])&&(a[s]=r(zn.array(zn[typeof l[0]]()))):a[s]=r(Mu(l,t,!1));break;default:throw new Error(`Unsupported type for key ${s}`)}return a},{}),o=Object.keys(i).length>0;return t!=null&&t.passtrough||!n&&!o?zn.object(i).passthrough():zn.object(i)},"objectToZui");function KO(){return{}}k(KO,"parseAnyDef");function ab(e,t,n,r){r!=null&&r.errorMessages&&n&&(e.errorMessage=fe(B({},e.errorMessage),{[t]:n}))}k(ab,"addErrorMessage");function dn(e,t,n,r,i){e[t]=n,ab(e,t,r,i)}k(dn,"setResponseValueAndErrors");function GO(e,t){var n,r;const i={type:"array"};return((r=(n=e.type)==null?void 0:n._def)==null?void 0:r.typeName)!=="ZodAny"&&(i.items=an(e.type._def,fe(B({},t),{currentPath:[...t.currentPath,"items"]}))),e.minLength&&dn(i,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&dn(i,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(dn(i,"minItems",e.exactLength.value,e.exactLength.message,t),dn(i,"maxItems",e.exactLength.value,e.exactLength.message,t)),i}k(GO,"parseArrayDef");function YO(e,t){const n={type:"integer",format:"int64"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"min":t.target==="jsonSchema7"?r.inclusive?dn(n,"minimum",r.value,r.message,t):dn(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),dn(n,"minimum",r.value,r.message,t));break;case"max":t.target==="jsonSchema7"?r.inclusive?dn(n,"maximum",r.value,r.message,t):dn(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),dn(n,"maximum",r.value,r.message,t));break;case"multipleOf":dn(n,"multipleOf",r.value,r.message,t);break}return n}k(YO,"parseBigintDef");function JO(){return{type:"boolean"}}k(JO,"parseBooleanDef");function XO(e,t){return an(e.type._def,t)}k(XO,"parseBrandedDef");var roe=k((e,t)=>an(e.innerType._def,t),"parseCatchDef");function QO(e,t){return t.dateStrategy=="integer"?ioe(e,t):{type:"string",format:"date-time"}}k(QO,"parseDateDef");var ioe=k((e,t)=>{const n={type:"integer",format:"unix-time"};for(const r of e.checks)switch(r.kind){case"min":t.target==="jsonSchema7"&&dn(n,"minimum",r.value,r.message,t);break;case"max":t.target==="jsonSchema7"&&dn(n,"maximum",r.value,r.message,t);break}return n},"integerDateParser");function eT(e,t){return fe(B({},an(e.innerType._def,t)),{default:e.defaultValue()})}k(eT,"parseDefaultDef");function tT(e,t){return t.effectStrategy==="input"?an(e.schema._def,t):{}}k(tT,"parseEffectsDef");function nT(e){return{type:"string",enum:e.values}}k(nT,"parseEnumDef");var ooe=k(e=>"type"in e&&e.type==="string"?!1:"allOf"in e,"isJsonSchema7AllOfType");function rT(e,t){const n=[an(e.left._def,fe(B({},t),{currentPath:[...t.currentPath,"allOf","0"]})),an(e.right._def,fe(B({},t),{currentPath:[...t.currentPath,"allOf","1"]}))].filter(o=>!!o);let r=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const i=[];return n.forEach(o=>{if(ooe(o))i.push(...o.allOf),o.unevaluatedProperties===void 0&&(r=void 0);else{let a=o;"additionalProperties"in o&&o.additionalProperties===!1?a=DC(o,["additionalProperties"]):r=void 0,i.push(a)}}),i.length?B({allOf:i},r):void 0}k(rT,"parseIntersectionDef");function iT(e,t){const n=typeof e.value;return n!=="bigint"&&n!=="number"&&n!=="boolean"&&n!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:n==="bigint"?"integer":n,enum:[e.value]}:{type:n==="bigint"?"integer":n,const:e.value}}k(iT,"parseLiteralDef");var Oc={cuid:"^[cC][^\\s-]{8,}$",cuid2:"^[a-z][a-z0-9]*$",ulid:"^[0-9A-HJKMNP-TV-Z]{26}$",email:"^(?!\\.)(?!.*\\.\\.)([a-zA-Z0-9_+-\\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\\-]*\\.)+[a-zA-Z]{2,}$",emoji:"^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",uuid:"^[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}$",ipv4:"^(((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}))$",ipv6:"^(([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})))$"};function sb(e,t){const n={type:"string"};function r(i){return t.patternStrategy==="escape"?aoe(i):i}if(k(r,"processPattern"),e.checks)for(const i of e.checks)switch(i.kind){case"min":dn(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,i.value):i.value,i.message,t);break;case"max":dn(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,i.value):i.value,i.message,t);break;case"email":switch(t.emailStrategy){case"format:email":xs(n,"email",i.message,t);break;case"format:idn-email":xs(n,"idn-email",i.message,t);break;case"pattern:zod":jo(n,Oc.email,i.message,t);break}break;case"url":xs(n,"uri",i.message,t);break;case"uuid":xs(n,"uuid",i.message,t);break;case"regex":jo(n,i.regex.source,i.message,t);break;case"cuid":jo(n,Oc.cuid,i.message,t);break;case"cuid2":jo(n,Oc.cuid2,i.message,t);break;case"startsWith":jo(n,"^"+r(i.value),i.message,t);break;case"endsWith":jo(n,r(i.value)+"$",i.message,t);break;case"datetime":xs(n,"date-time",i.message,t);break;case"length":dn(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,i.value):i.value,i.message,t),dn(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,i.value):i.value,i.message,t);break;case"includes":{jo(n,r(i.value),i.message,t);break}case"ip":{i.version!=="v6"&&xs(n,"ipv4",i.message,t),i.version!=="v4"&&xs(n,"ipv6",i.message,t);break}case"emoji":jo(n,Oc.emoji,i.message,t);break;case"ulid":{jo(n,Oc.ulid,i.message,t);break}}return n}k(sb,"parseStringDef");var aoe=k(e=>Array.from(e).map(t=>/[a-zA-Z0-9]/.test(t)?t:`\\${t}`).join(""),"escapeNonAlphaNumeric"),xs=k((e,t,n,r)=>{var i;e.format||(i=e.anyOf)!=null&&i.some(o=>o.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push(B({format:e.format},e.errorMessage&&r.errorMessages&&{errorMessage:{format:e.errorMessage.format}})),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push(B({format:t},n&&r.errorMessages&&{errorMessage:{format:n}}))):dn(e,"format",t,n,r)},"addFormat"),jo=k((e,t,n,r)=>{var i;e.pattern||(i=e.allOf)!=null&&i.some(o=>o.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push(B({pattern:e.pattern},e.errorMessage&&r.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}})),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push(B({pattern:t},n&&r.errorMessages&&{errorMessage:{pattern:n}}))):dn(e,"pattern",t,n,r)},"addPattern");function ub(e,t){var n,r,i,o,a;if(t.target==="openApi3"&&((n=e.keyType)==null?void 0:n._def.typeName)==="ZodEnum")return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((l,c)=>{var d;return fe(B({},l),{[c]:(d=an(e.valueType._def,fe(B({},t),{currentPath:[...t.currentPath,"properties",c]})))!=null?d:{}})},{}),additionalProperties:!1};const s={type:"object",additionalProperties:(r=an(e.valueType._def,fe(B({},t),{currentPath:[...t.currentPath,"additionalProperties"]})))!=null?r:{}};if(t.target==="openApi3")return s;if(((i=e.keyType)==null?void 0:i._def.typeName)==="ZodString"&&((o=e.keyType._def.checks)!=null&&o.length)){const l=Object.entries(sb(e.keyType._def,t)).reduce((c,[d,p])=>d==="type"?c:fe(B({},c),{[d]:p}),{});return fe(B({},s),{propertyNames:l})}else if(((a=e.keyType)==null?void 0:a._def.typeName)==="ZodEnum")return fe(B({},s),{propertyNames:{enum:e.keyType._def.values}});return s}k(ub,"parseRecordDef");function oT(e,t){if(t.mapStrategy==="record")return ub(e,t);const n=an(e.keyType._def,fe(B({},t),{currentPath:[...t.currentPath,"items","items","0"]}))||{},r=an(e.valueType._def,fe(B({},t),{currentPath:[...t.currentPath,"items","items","1"]}))||{};return{type:"array",maxItems:125,items:{type:"array",items:[n,r],minItems:2,maxItems:2}}}k(oT,"parseMapDef");function aT(e){const t=e.values,r=Object.keys(e.values).filter(o=>typeof t[t[o]]!="number").map(o=>t[o]),i=Array.from(new Set(r.map(o=>typeof o)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:r.filter(o=>typeof o=="string"||typeof o=="number")}}k(aT,"parseNativeEnumDef");function sT(){return{not:{}}}k(sT,"parseNeverDef");function uT(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}k(uT,"parseNullDef");var ih={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function lT(e,t){if(t.target==="openApi3")return cT(e,t);const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(r=>r._def.typeName in ih&&(!r._def.checks||!r._def.checks.length))){const r=n.reduce((i,o)=>{const a=ih[o._def.typeName];return a&&!i.includes(a)?[...i,a]:i},[]);return{type:r.length>1?r:r[0]}}else if(n.every(r=>r._def.typeName==="ZodLiteral"&&!r.description)){const r=n.reduce((i,o)=>{const a=typeof o._def.value;switch(a){case"string":case"number":case"boolean":return[...i,a];case"bigint":return[...i,"integer"];case"object":if(o._def.value===null)return[...i,"null"];case"symbol":case"undefined":case"function":default:return i}},[]);if(r.length===n.length){const i=r.filter((o,a,s)=>s.indexOf(o)===a);return{type:i.length>1?i:i[0],enum:n.reduce((o,a)=>o.includes(a._def.value)?o:[...o,a._def.value],[])}}}else if(n.every(r=>r._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((r,i)=>[...r,...i._def.values.filter(o=>!r.includes(o))],[])};return cT(e,t)}k(lT,"parseUnionDef");var cT=k((e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((i,o)=>an(i._def,fe(B({},t),{currentPath:[...t.currentPath,t.unionStrategy,`${o}`]}))).filter(i=>!!i&&(!t.strictUnions||typeof i=="object"&&Object.keys(i).length>0)),r=t.discriminator&&e.typeName==="ZodDiscriminatedUnion"&&typeof e.discriminator=="string"?{discriminator:{propertyName:e.discriminator}}:{};if(n.length)return t.unionStrategy==="anyOf"?B({anyOf:n},r):B({oneOf:n},r)},"asUnionOf");function fT(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:ih[e.innerType._def.typeName],nullable:!0}:{type:[ih[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){const r=an(e.innerType._def,fe(B({},t),{currentPath:[...t.currentPath]}));return r&&fe(B({},r),{nullable:!0})}const n=an(e.innerType._def,fe(B({},t),{currentPath:[...t.currentPath,"anyOf","0"]}));return n&&{anyOf:[n,{type:"null"}]}}k(fT,"parseNullableDef");function dT(e,t){const n={type:"number"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"int":n.type="integer",ab(n,"type",r.message,t);break;case"min":t.target==="jsonSchema7"?r.inclusive?dn(n,"minimum",r.value,r.message,t):dn(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),dn(n,"minimum",r.value,r.message,t));break;case"max":t.target==="jsonSchema7"?r.inclusive?dn(n,"maximum",r.value,r.message,t):dn(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),dn(n,"maximum",r.value,r.message,t));break;case"multipleOf":dn(n,"multipleOf",r.value,r.message,t);break}return n}k(dT,"parseNumberDef");function pT(e,t){var n;const r=fe(B({type:"object"},Object.entries(e.shape()).reduce((i,[o,a])=>{if(a===void 0||a._def===void 0)return i;const s=an(a._def,fe(B({},t),{currentPath:[...t.currentPath,"properties",o],propertyPath:[...t.currentPath,"properties",o]}));return s===void 0?i:{properties:fe(B({},i.properties),{[o]:s}),required:a.isOptional()?i.required:[...i.required,o]}},{properties:{},required:[]})),{additionalProperties:e.catchall._def.typeName==="ZodNever"?e.unknownKeys==="passthrough":(n=an(e.catchall._def,fe(B({},t),{currentPath:[...t.currentPath,"additionalProperties"]})))!=null?n:!0});return r.required.length||delete r.required,r}k(pT,"parseObjectDef");var soe=k((e,t)=>{var n;if(t.currentPath.toString()===((n=t.propertyPath)==null?void 0:n.toString()))return an(e.innerType._def,t);const r=an(e.innerType._def,fe(B({},t),{currentPath:[...t.currentPath,"anyOf","1"]}));return r?{anyOf:[{not:{}},r]}:{}},"parseOptionalDef"),uoe=k((e,t)=>{if(t.pipeStrategy==="input")return an(e.in._def,t);if(t.pipeStrategy==="output")return an(e.out._def,t);const n=an(e.in._def,fe(B({},t),{currentPath:[...t.currentPath,"allOf","0"]})),r=an(e.out._def,fe(B({},t),{currentPath:[...t.currentPath,"allOf",n?"1":"0"]}));return{allOf:[n,r].filter(i=>i!==void 0)}},"parsePipelineDef");function hT(e,t){return an(e.type._def,t)}k(hT,"parsePromiseDef");function mT(e,t){const r={type:"array",uniqueItems:!0,items:an(e.valueType._def,fe(B({},t),{currentPath:[...t.currentPath,"items"]}))};return e.minSize&&dn(r,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&dn(r,"maxItems",e.maxSize.value,e.maxSize.message,t),r}k(mT,"parseSetDef");function yT(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((n,r)=>an(n._def,fe(B({},t),{currentPath:[...t.currentPath,"items",`${r}`]}))).reduce((n,r)=>r===void 0?n:[...n,r],[]),additionalItems:an(e.rest._def,fe(B({},t),{currentPath:[...t.currentPath,"additionalItems"]}))}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((n,r)=>an(n._def,fe(B({},t),{currentPath:[...t.currentPath,"items",`${r}`]}))).reduce((n,r)=>r===void 0?n:[...n,r],[])}}k(yT,"parseTupleDef");function gT(){return{not:{}}}k(gT,"parseUndefinedDef");function vT(){return{}}k(vT,"parseUnknownDef");var loe=k((e,t)=>an(e.innerType._def,t),"parseReadonlyDef");function an(e,t,n=!1){const r=t.seen.get(e);if(r&&!n){const a=coe(r,t);if(a!==void 0)return a}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const o=doe(e,e.typeName,t);return o&&poe(e,t,o),i.jsonSchema=o,o}k(an,"parseDef");var coe=k((e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:foe(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((n,r)=>t.currentPath[r]===n)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):t.$refStrategy==="seen"?{}:void 0}},"get$ref"),foe=k((e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")},"getRelativePath"),doe=k((e,t,n)=>{switch(t){case"ZodString":return sb(e,n);case"ZodNumber":return dT(e,n);case"ZodObject":return pT(e,n);case"ZodBigInt":return YO(e,n);case"ZodBoolean":return JO();case"ZodDate":return QO(e,n);case"ZodUndefined":return gT();case"ZodNull":return uT(n);case"ZodArray":return GO(e,n);case"ZodUnion":case"ZodDiscriminatedUnion":return lT(e,n);case"ZodIntersection":return rT(e,n);case"ZodTuple":return yT(e,n);case"ZodRecord":return ub(e,n);case"ZodLiteral":return iT(e,n);case"ZodEnum":return nT(e);case"ZodNativeEnum":return aT(e);case"ZodNullable":return fT(e,n);case"ZodOptional":return soe(e,n);case"ZodMap":return oT(e,n);case"ZodSet":return mT(e,n);case"ZodLazy":return an(e.getter()._def,n);case"ZodPromise":return hT(e,n);case"ZodNaN":case"ZodNever":return sT();case"ZodEffects":return tT(e,n);case"ZodAny":return KO();case"ZodUnknown":return vT();case"ZodDefault":return eT(e,n);case"ZodBranded":return XO(e,n);case"ZodReadonly":return loe(e,n);case"ZodCatch":return roe(e,n);case"ZodPipeline":return uoe(e,n);case"ZodTemplateLiteral":throw new Error("Template literals are not supported yet");case"ZodFunction":case"ZodVoid":case"ZodSymbol":return;default:return(r=>{})()}},"selectParser"),poe=k((e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),e[gn]&&(n[gn]=e[gn]),n),"addMeta"),bT={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"string",mapStrategy:"entries",definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",emailStrategy:"format:email",discriminator:!1,unionStrategy:"anyOf"},hoe=k(e=>typeof e=="string"?fe(B({},bT),{name:e}):B(B({},bT),e),"getDefaultOptions"),moe=k(e=>{const t=hoe(e),n=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return fe(B({},t),{currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([r,i])=>[i._def,{def:i._def,path:[...t.basePath,t.definitionPath,r],jsonSchema:void 0}]))})},"getRefs"),yoe=k((e,t)=>{var n;const r=moe(t),i=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((l,[c,d])=>{var p;return fe(B({},l),{[c]:(p=an(d._def,fe(B({},r),{currentPath:[...r.basePath,r.definitionPath,c]}),!0))!=null?p:{}})},{}):void 0,o=typeof t=="string"?t:t==null?void 0:t.name,a=(n=an(e._def,o===void 0?r:fe(B({},r),{currentPath:[...r.basePath,r.definitionPath,o]}),!1))!=null?n:{},s=o===void 0?i?fe(B({},a),{[r.definitionPath]:i}):a:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,o].join("/"),[r.definitionPath]:fe(B({},i),{[o]:a})};return r.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":r.target==="jsonSchema2019-09"&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),s},"zodToJsonSchema"),oh=k((e,t={target:"openApi3"})=>{const n=yoe(e,t);return t.$schemaUrl===!1?delete n.$schema:typeof t.$schemaUrl=="string"&&(n.$schema=t.$schemaUrl),ju(n,e,t)},"zuiToJsonSchema"),goe=k(e=>{var t,n,r,i;if(e!=null&&e._def)return e._def.getter&&typeof e._def.getter=="function"?(n=(t=e._def.getter()._def)==null?void 0:t.shape)==null?void 0:n.call(t):(i=(r=e._def).shape)==null?void 0:i.call(r)},"getShape"),ju=k((e,t,n)=>{const r=k((i,o)=>{n.stripZuiProps||Object.assign(i,{[gn]:o})},"assignZuiProps");if(e.type==="object"&&e.properties)for(const[i,o]of Object.entries(e.properties)){const a=goe(t);if(a!=null&&a[i]){const s=a[i].ui;r(o,s),ju(o,a[i],n)}}if(e.type=="array"){const i=t._def;Array.isArray(e.items)?(i.typeName===zn.ZodFirstPartyTypeKind.ZodTuple&&e.items.forEach((o,a)=>{const s=i.items[a];s&&ju(o,s,n)}),i.typeName===zn.ZodFirstPartyTypeKind.ZodMap&&e.items.map(o=>ju(o,i.valueType,n))):e.items&&(i.typeName===zn.ZodFirstPartyTypeKind.ZodMap?ju(e.items,i.valueType,n):ju(e.items,t._def.type,n))}return t&&"ui"in t&&(t!=null&&t.ui)&&r(e,t.ui),e},"mergeZuiIntoJsonSchema"),voe=["gpt-3.5-turbo","gpt-3.5-turbo-16k","gpt-4","gpt-4-1106-preview","gpt-4-vision-preview","gpt-4-0125-preview","gpt-4-turbo-preview","gpt-4-turbo","gpt-4o","gpt-3.5-turbo-0125","gpt-3.5-turbo-1106"];No.create(["any","string","number","boolean","object","pattern","date","array","target","time","enum"]);var _T=k(e=>dr.create().displayAs({id:"variable",params:B({type:(e==null?void 0:e.type)||"any"},e==null?void 0:e.params)}),"variable"),wT=k(e=>dr.create().displayAs({id:"conversation",params:B({},e==null?void 0:e.params)}),"conversation"),xT=k(e=>dr.create().displayAs({id:"user",params:B({},e==null?void 0:e.params)}),"user"),ST=k(e=>dr.create().displayAs({id:"message",params:B({},e==null?void 0:e.params)}),"message"),ET=k(e=>dr.create().displayAs({id:"agent",params:B({},e==null?void 0:e.params)}),"agent"),AT=k(e=>dr.create().displayAs({id:"event",params:B({},e==null?void 0:e.params)}),"event"),CT=k(e=>dr.create().displayAs({id:"table",params:B({},e==null?void 0:e.params)}),"table"),OT=k(e=>dr.create().displayAs({id:"tablerow",params:B({},e==null?void 0:e.params)}),"tablerow"),TT=k(e=>dr.create().displayAs({id:"intent",params:B({},e==null?void 0:e.params)}),"intent"),$T=k(()=>No.create(voe).displayAs({id:"dropdown",params:{}}),"aimodel"),kT=k(e=>dr.create().displayAs({id:"datasource",params:B({},e)}),"datasource"),IT=k(e=>dr.create().displayAs({id:"knowledgebase",params:B({},e)}),"knowledgebase"),PT={object:_s.lazycreate},RT=k((e,t={message:`Input not instance of ${e.name}`})=>Gv(n=>n instanceof e,t),"instanceOfType"),lb=dr.create,cb=wc.create,NT=eb.create,DT=hc.create,fb=mc.create,MT=wp.create,jT=ib.create,LT=Ac.create,FT=_c.create,qT=Iu.create,UT=Nu.create,BT=ga.create,zT=ob.create,ZT=Pu.create,HT=_s.create,WT=_s.strictCreate,VT=Cc.create,KT=Yv.create,GT=Cp.create,YT=ws.create,JT=tb.create,XT=Qv.create,QT=nb.create,e$=Xv.create,t$=Tp.create,n$=vc.create,r$=No.create,i$=bc.create,o$=xc.create,ah=Mo.create,a$=Di.create,s$=Do.create,u$=Mo.createWithPreprocess,l$=Lp.create,c$=Xp.create,f$=k(()=>lb().optional(),"ostring"),d$=k(()=>cb().optional(),"onumber"),p$=k(()=>fb().optional(),"oboolean"),h$=Ct.fromJsonSchema,m$=Ct.fromObject,y$={string:e=>dr.create(fe(B({},e),{coerce:!0})),number:e=>wc.create(fe(B({},e),{coerce:!0})),boolean:e=>mc.create(fe(B({},e),{coerce:!0})),bigint:e=>hc.create(fe(B({},e),{coerce:!0})),date:e=>wp.create(fe(B({},e),{coerce:!0})),templateLiteral:e=>Xp.create(fe(B({},e),{coerce:!0}))},g$=gt,St=zn,v$=k((e,t)=>e.anyOf.length?e.anyOf.length===1?ir(e.anyOf[0],fe(B({},t),{path:[...t.path,"anyOf",0]})):`z.union([${e.anyOf.map((n,r)=>ir(n,fe(B({},t),{path:[...t.path,"anyOf",r]}))).join(", ")}])`:"z.any()","parseAnyOf"),boe=k(e=>"z.boolean()","parseBoolean"),_oe=k(e=>"z.any()","parseDefault"),woe=k((e,t)=>`z.union([${e.type.map(n=>ir(fe(B({},e),{type:n}),t)).join(", ")}])`,"parseMultipleType"),xoe=k((e,t)=>`z.any().refine((value) => !${ir(e.not,fe(B({},t),{path:[...t.path,"not"]}))}.safeParse(value).success, "Invalid input: Should NOT be valid against schema")`,"parseNot"),Soe=k(e=>"z.null()","parseNull"),Eoe=k(e=>[e.slice(0,e.length/2),e.slice(e.length/2)],"half"),Aoe=k((e,...t)=>Object.keys(e).reduce((n,r)=>(t.includes(r)||(n[r]=e[r]),n),{}),"omit");function wr(e,t,n){var r;const i=e[t];let o="";if(i!==void 0){const a=n({value:i,json:JSON.stringify(i)});if(a){const s=a[0],l=a.length===3?a[1]:"",c=a.length===3?a[2]:a[1];o+=s,((r=e.errorMessage)==null?void 0:r[t])!==void 0&&(o+=l+JSON.stringify(e.errorMessage[t])),o+=c}}return o}k(wr,"withMessage");var Tc=Symbol("Original index"),Coe=k(e=>{let t=[];for(let n=0;n<e.length;n++){const r=e[n];if(typeof r=="boolean")t.push(r?{[Tc]:n}:{[Tc]:n,not:{}});else{if(Tc in r)return e;t.push(fe(B({},r),{[Tc]:n}))}}return t},"ensureOriginalIndex");function $c(e,t){if(e.allOf.length===0)return"z.never()";if(e.allOf.length===1){const n=e.allOf[0];return ir(n,fe(B({},t),{path:[...t.path,"allOf",n[Tc]]}))}else{const[n,r]=Eoe(Coe(e.allOf));return`z.intersection(${$c({allOf:n},t)}, ${$c({allOf:r},t)})`}}k($c,"parseAllOf");var Ooe=k((e,t)=>{if(Array.isArray(e.items))return`z.tuple([${e.items.map((r,i)=>ir(r,fe(B({},t),{path:[...t.path,"items",i]})))}])`;let n=e.items?`z.array(${ir(e.items,fe(B({},t),{path:[...t.path,"items"]}))})`:"z.array(z.any())";return n+=wr(e,"minItems",({json:r})=>[`.min(${r}`,", ",")"]),n+=wr(e,"maxItems",({json:r})=>[`.max(${r}`,", ",")"]),n},"parseArray"),Toe=k(e=>`z.literal(${JSON.stringify(e.const)})`,"parseConst"),$oe=k(e=>e.enum.length===0?"z.never()":e.enum.length===1?`z.literal(${JSON.stringify(e.enum[0])})`:e.enum.every(t=>typeof t=="string")?`z.enum([${e.enum.map(t=>JSON.stringify(t))}])`:`z.union([${e.enum.map(t=>`z.literal(${JSON.stringify(t)})`).join(", ")}])`,"parseEnum"),koe=k((e,t)=>{const n=ir(e.if,fe(B({},t),{path:[...t.path,"if"]})),r=ir(e.then,fe(B({},t),{path:[...t.path,"then"]})),i=ir(e.else,fe(B({},t),{path:[...t.path,"else"]}));return`z.union([${r}, ${i}]).superRefine((value,ctx) => {
|
|
125
|
+
${ap(e.value)}`.trim();case St.ZodFirstPartyTypeKind.ZodEnum:return s.values.map(ap).join(" | ");case St.ZodFirstPartyTypeKind.ZodEffects:return Zt(s.schema,o);case St.ZodFirstPartyTypeKind.ZodNativeEnum:return Zt(s.values,o);case St.ZodFirstPartyTypeKind.ZodOptional:return t!=null&&t.declaration||(t==null?void 0:t.parent)instanceof St.ZodRecord||(t==null?void 0:t.parent)instanceof St.ZodObject?`${Zt(s.innerType,o)} | undefined`:(t==null?void 0:t.parent)instanceof St.ZodDefault||(t==null?void 0:t.parent)instanceof St.ZodNullable||(t==null?void 0:t.parent)instanceof St.ZodOptional?`${Zt(s.innerType,o)} | undefined`:`${Zt(s.innerType,o)}?`;case St.ZodFirstPartyTypeKind.ZodNullable:return`${Zt(e.unwrap(),o)} | null`;case St.ZodFirstPartyTypeKind.ZodDefault:return Zt(s.innerType,o);case St.ZodFirstPartyTypeKind.ZodCatch:return Zt(e.removeCatch(),o);case St.ZodFirstPartyTypeKind.ZodPromise:return`Promise<${Zt(e.unwrap(),o)}>`;case St.ZodFirstPartyTypeKind.ZodBranded:return Zt(s.type,o);case St.ZodFirstPartyTypeKind.ZodPipeline:return Zt(s.in,o);case St.ZodFirstPartyTypeKind.ZodSymbol:return`${Jn(s.description)} symbol`.trim();case St.ZodFirstPartyTypeKind.ZodReadonly:return`readonly ${Zt(s.innerType,o)}`;case St.ZodFirstPartyTypeKind.ZodTemplateLiteral:return`\`${s.parts.map(S=>typeof S>"u"||S===null?"":typeof S=="string"?S:typeof S=="boolean"||typeof S=="number"?`${S}`:"${"+Zt(S,fe(B({},o),{declaration:!1}))+"}").join("")}\``;default:Wt.assertNever(s)}}k(Zt,"sUnwrapZod");var $O=class{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}};k($O,"ParseInputLazyPath");var wi=$O,kO=k((e,t)=>{if(ku(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 ao(e.common.issues);return this._error=n,this._error}}},"handleResult"),IO=class{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 Po(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Po(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Dr,ctx:{common:t.parent.common,data:t.data,parsedType:Po(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(pc(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:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Po(t)},o=this._parseSync({data:t,path:i.path,parent:i});return kO(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:Po(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(pc(i)?i:Promise.resolve(i));return kO(r,o)}refine(t,n){const r=k(i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n,"getIssueProperties");return this._refinement((i,o)=>{const a=t(i),s=k(()=>o.addIssue(B({code:Ie.custom},r(i))),"setError");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 Mo({schema:this,typeName:"ZodEffects",effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Di.create(this,this._def)}nullable(){return Do.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Pu.create(this,this._def)}promise(){return xc.create(this,this._def)}or(t){return Cc.create([this,t],this._def)}and(t){return Cp.create(this,t,this._def)}transform(t){return new Mo(fe(B({},Ot(this._def)),{schema:this,typeName:"ZodEffects",effect:{type:"transform",transform:t}}))}default(t){const n=typeof t=="function"?t:()=>t;return new Sp(fe(B({},Ot(this._def)),{innerType:this,defaultValue:n,typeName:"ZodDefault"}))}brand(){return new yc(B({typeName:"ZodBranded",type:this},Ot(this._def)))}catch(t){const n=typeof t=="function"?t:()=>t;return new bp(fe(B({},Ot(this._def)),{innerType:this,catchValue:n,typeName:"ZodCatch"}))}describe(t){const n=this.constructor;return new n(fe(B({},this._def),{description:t}))}pipe(t){return Lp.create(this,t)}readonly(){return Up.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}_setZuiMeta(t,n){const r=this._def,i=typeof n=="function"?n.toString():n;switch(r.typeName){case"ZodNullable":case"ZodDefault":case"ZodOptional":case"ZodReadonly":r.innerType._def[gn]=fe(B({},r.innerType._def[gn]),{[t]:i});break;case"ZodEffects":r.schema._def[gn]=fe(B({},r.schema._def[gn]),{[t]:i});break;default:r[gn]=fe(B({},r[gn]),{[t]:i})}}get ui(){const t=this._def;switch(t.typeName){case"ZodNullable":case"ZodDefault":case"ZodOptional":case"ZodReadonly":return t.innerType.ui;case"ZodEffects":return t.schema.ui;default:return t[gn]||{}}}displayAs(t){var n,r,i;return(i=(n=this._def)[r=gn])!=null||(n[r]={}),this._def[gn].displayAs=[t.id,t.params],this}title(t){return this._setZuiMeta("title",t),this}hidden(t){return this._setZuiMeta("hidden",typeof t>"u"?!0:t),this}disabled(t){return this._setZuiMeta("disabled",typeof t>"u"?!0:t),this}placeholder(t){return this._setZuiMeta("placeholder",t),this}toJsonSchema(t){return oh(this,t)}async toTypescriptTypings(t){return yO(this.toJsonSchema(),t)}toTypescript(t){return up(this,t)}async toTypescriptAsync(t){let n=up(this,fe(B({},t),{formatters:[]}));for(const r of(t==null?void 0:t.formatters)||[])n=await r(n);return n}static fromObject(t,n){return Mu(t,n)}static fromJsonSchema(t){return Ic(t)}};k(IO,"ZodType");var Ct=IO,Wv=(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.ZodTemplateLiteral="ZodTemplateLiteral",e.ZodReadonly="ZodReadonly",e))(Wv||{}),Wt;(e=>{e.assertEqual=k(i=>i,"assertEqual");function t(i){}e.assertIs=t,k(t,"assertIs");function n(i){throw new Error("assertNever called")}e.assertNever=n,k(n,"assertNever"),e.arrayToEnum=k(i=>{const o={};for(const a of i)o[a]=a;return o},"arrayToEnum"),e.getValidEnumValues=k(i=>{const o=(0,e.objectKeys)(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return(0,e.objectValues)(a)},"getValidEnumValues"),e.objectValues=k(i=>(0,e.objectKeys)(i).map(function(o){return i[o]}),"objectValues"),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=k((i,o)=>{for(const a of i)if(o(a))return a},"find"),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,k(r,"joinValues"),e.jsonStringifyReplacer=k((i,o)=>typeof o=="bigint"?o.toString():o,"jsonStringifyReplacer")})(Wt||(Wt={}));var lp;(e=>{e.mergeShapes=k((t,n)=>B(B({},t),n),"mergeShapes")})(lp||(lp={}));var Ge=Wt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Po=k(e=>{switch(typeof e){case"undefined":return Ge.undefined;case"string":return Ge.string;case"number":return isNaN(e)?Ge.nan:Ge.number;case"boolean":return Ge.boolean;case"function":return Ge.function;case"bigint":return Ge.bigint;case"symbol":return Ge.symbol;case"object":return Array.isArray(e)?Ge.array:e===null?Ge.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ge.promise:typeof Map<"u"&&e instanceof Map?Ge.map:typeof Set<"u"&&e instanceof Set?Ge.set:typeof Date<"u"&&e instanceof Date?Ge.date:Ge.object;default:return Ge.unknown}},"getParsedType");function Ot(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,[gn]:e==null?void 0:e[gn]}:{errorMap:k((a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},"customMap"),description:i,[gn]:e==null?void 0:e[gn]}}k(Ot,"processCreateParams");var Ie=Wt.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"]),PO=k(e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),cp=class wF extends Error{constructor(t){super(),this.issues=[],this.addIssue=k(r=>{this.issues=[...this.issues,r]},"addIssue"),this.addIssues=k((r=[])=>{this.issues=[...this.issues,...r]},"addIssues");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=k(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++}}},"processError");return i(this),r}static assert(t){if(!(t instanceof wF))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Wt.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()}};k(cp,"ZodError"),cp.create=k(e=>new cp(e),"create");var ao=cp,RO=class extends Error{constructor(){super("Unsupported zod type!");const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodTemplateLiteralUnsupportedTypeError"}};k(RO,"ZodTemplateLiteralUnsupportedTypeError");var Vv=RO,NO=class extends Error{constructor(t,n){super(`${t}'s "${n}" check is not supported in template literals!`);const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodTemplateLiteralUnsupportedCheckError"}};k(NO,"ZodTemplateLiteralUnsupportedCheckError");var fp=NO,DO=Du;function Kv(e){DO=e}k(Kv,"setErrorMap");function $u(){return DO}k($u,"getErrorMap");var dc=k(e=>{var t;const{data:n,path:r,errorMaps:i,issueData:o}=e,a=[...r,...o.path||[]],s=fe(B({},o),{path:a});let l="";const c=i.filter(d=>!!d).slice().reverse();for(const d of c)l=d(s,{data:n,defaultError:l}).message;return fe(B({},o),{path:a,message:(t=o.message)!=null?t:l})},"makeIssue"),MO=[];function Ye(e,t){const n=dc({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,$u(),Du].filter(r=>!!r)});e.common.issues.push(n)}k(Ye,"addIssueToContext");var jO=class xF{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 gt;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 xF.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 gt;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}}};k(jO,"ParseStatus");var Dr=jO,gt=Object.freeze({status:"aborted"}),vs=k(e=>({status:"dirty",value:e}),"DIRTY"),_r=k(e=>({status:"valid",value:e}),"OK"),dp=k(e=>e.status==="aborted","isAborted"),pp=k(e=>e.status==="dirty","isDirty"),ku=k(e=>e.status==="valid","isValid"),pc=k(e=>typeof Promise<"u"&&e instanceof Promise,"isAsync"),ut;(e=>{e.errToObj=k(t=>typeof t=="string"?{message:t}:t||{},"errToObj"),e.toString=k(t=>typeof t=="string"?t:t==null?void 0:t.message,"toString")})(ut||(ut={}));var hp=class extends Ct{constructor(){super(...arguments),this._any=!0}_parse(t){return _r(t.data)}};k(hp,"ZodAny"),hp.create=k(e=>new hp(B({typeName:"ZodAny"},Ot(e))),"create");var Iu=hp,mp=class Qy extends Ct{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Ge.array)return Ye(n,{code:Ie.invalid_type,expected:Ge.array,received:n.parsedType}),gt;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(a||s)&&(Ye(n,{code:a?Ie.too_big:Ie.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&&(Ye(n,{code:Ie.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&&(Ye(n,{code:Ie.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 wi(n,a,n.path,s)))).then(a=>Dr.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new wi(n,a,n.path,s)));return Dr.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Qy(fe(B({},this._def),{minLength:{value:t,message:ut.toString(n)}}))}max(t,n){return new Qy(fe(B({},this._def),{maxLength:{value:t,message:ut.toString(n)}}))}length(t,n){return new Qy(fe(B({},this._def),{exactLength:{value:t,message:ut.toString(n)}}))}nonempty(t){return this.min(1,t)}};k(mp,"ZodArray"),mp.create=k((e,t)=>new mp(B({type:e,minLength:null,maxLength:null,exactLength:null,typeName:"ZodArray"},Ot(t))),"create");var Pu=mp,yp=class Px extends Ct{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)!==Ge.bigint){const o=this._getOrReturnCtx(t);return Ye(o,{code:Ie.invalid_type,expected:Ge.bigint,received:o.parsedType}),gt}let r;const i=new Dr;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),Ye(r,{code:Ie.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),Ye(r,{code:Ie.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),Ye(r,{code:Ie.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Wt.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ut.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ut.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ut.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ut.toString(n))}setLimit(t,n,r,i){return new Px(fe(B({},this._def),{checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ut.toString(i)}]}))}_addCheck(t){return new Px(fe(B({},this._def),{checks:[...this._def.checks,t]}))}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ut.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ut.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ut.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ut.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ut.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}};k(yp,"ZodBigInt"),yp.create=k(e=>{var t;return new yp(B({checks:[],typeName:"ZodBigInt",coerce:(t=e==null?void 0:e.coerce)!=null?t:!1},Ot(e)))},"create");var hc=yp,gp=class extends Ct{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ge.boolean){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.boolean,received:r.parsedType}),gt}return _r(t.data)}};k(gp,"ZodBoolean"),gp.create=k(e=>new gp(B({typeName:"ZodBoolean",coerce:(e==null?void 0:e.coerce)||!1},Ot(e))),"create");var mc=gp,LO=Symbol("zod_brand"),FO=class extends Ct{_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}};k(FO,"ZodBranded");var yc=FO,vp=class extends Ct{_parse(t){const{ctx:n}=this._processInputParams(t),r=fe(B({},n),{common:fe(B({},n.common),{issues:[]})}),i=this._def.innerType._parse({data:r.data,path:r.path,parent:B({},r)});return pc(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ao(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ao(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};k(vp,"ZodCatch"),vp.create=k((e,t)=>new vp(B({innerType:e,typeName:"ZodCatch",catchValue:typeof t.catch=="function"?t.catch:()=>t.catch},Ot(t))),"create");var bp=vp,Gv=k((e,t={},n)=>e?Iu.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:n)!=null?a:!0,c=typeof s=="string"?{message:s}:s;i.addIssue(fe(B({code:"custom"},c),{fatal:l}))}}):Iu.create(),"custom"),_p=class SF extends Ct{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ge.date){const o=this._getOrReturnCtx(t);return Ye(o,{code:Ie.invalid_type,expected:Ge.date,received:o.parsedType}),gt}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Ye(o,{code:Ie.invalid_date}),gt}const r=new Dr;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),Ye(i,{code:Ie.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),Ye(i,{code:Ie.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Wt.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new SF(fe(B({},this._def),{checks:[...this._def.checks,t]}))}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ut.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ut.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}};k(_p,"ZodDate"),_p.create=k(e=>new _p(B({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:"ZodDate"},Ot(e))),"create");var wp=_p,xp=class extends Ct{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ge.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};k(xp,"ZodDefault"),xp.create=k((e,t)=>new xp(B({innerType:e,typeName:"ZodDefault",defaultValue:typeof t.default=="function"?t.default:()=>t.default},Ot(t))),"create");var Sp=xp,Ro=k(e=>e instanceof Tp?Ro(e.schema):e instanceof Mo?Ro(e.innerType()):e instanceof vc?[e.value]:e instanceof No?e.options:e instanceof bc?Wt.objectValues(e.enum):e instanceof Sp?Ro(e._def.innerType):e instanceof Ac?[void 0]:e instanceof _c?[null]:e instanceof Di?[void 0,...Ro(e.unwrap())]:e instanceof Do?[null,...Ro(e.unwrap())]:e instanceof yc||e instanceof Up?Ro(e.unwrap()):e instanceof bp?Ro(e._def.innerType):[],"getDiscriminator"),qO=class EF extends Ct{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ge.object)return Ye(n,{code:Ie.invalid_type,expected:Ge.object,received:n.parsedType}),gt;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}):(Ye(n,{code:Ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),gt)}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=Ro(o.shape[t]);if(!a.length)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 EF(B({typeName:"ZodDiscriminatedUnion",discriminator:t,options:n,optionsMap:i},Ot(r)))}};k(qO,"ZodDiscriminatedUnion");var Yv=qO;function gc(e,t){return new No(B({values:e,typeName:"ZodEnum"},Ot(t)))}k(gc,"createZodEnum");var Jv=class Rx extends Ct{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Ye(n,{expected:Wt.joinValues(r),received:n.parsedType,code:Ie.invalid_type}),gt}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return Ye(n,{received:n.data,code:Ie.invalid_enum_value,options:r}),gt}return _r(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,n=this._def){return Rx.create(t,B(B({},this._def),n))}exclude(t,n=this._def){return Rx.create(this.options.filter(r=>!t.includes(r)),B(B({},this._def),n))}};k(Jv,"ZodEnum"),Jv.create=gc;var No=Jv,UO=class eg extends Ct{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ge.function)return Ye(n,{code:Ie.invalid_type,expected:Ge.function,received:n.parsedType}),gt;function r(s,l){return dc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,$u(),Du].filter(c=>!!c),issueData:{code:Ie.invalid_arguments,argumentsError:l}})}k(r,"makeArgsIssue");function i(s,l){return dc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,$u(),Du].filter(c=>!!c),issueData:{code:Ie.invalid_return_type,returnTypeError:l}})}k(i,"makeReturnsIssue");const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof xc){const s=this;return _r(async function(...l){const c=new ao([]),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 _r(function(...l){const c=s._def.args.safeParse(l,o);if(!c.success)throw new ao([r(l,c.error)]);const d=Reflect.apply(a,this,c.data),p=s._def.returns.safeParse(d,o);if(!p.success)throw new ao([i(d,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new eg(fe(B({},this._def),{args:ws.create(t).rest(Nu.create())}))}returns(t){return new eg(fe(B({},this._def),{returns:t}))}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new eg(B({args:t||ws.create([]).rest(Nu.create()),returns:n||Nu.create(),typeName:"ZodFunction"},Ot(r)))}};k(UO,"ZodFunction");var Xv=UO;function Ep(e,t){const n=Po(e),r=Po(t);if(e===t)return{valid:!0,data:e};if(n===Ge.object&&r===Ge.object){const i=Wt.objectKeys(t),o=Wt.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a=B(B({},e),t);for(const s of o){const l=Ep(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Ge.array&&r===Ge.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=Ep(a,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Ge.date&&r===Ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}k(Ep,"mergeValues");var Ap=class extends Ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=k((o,a)=>{if(dp(o)||dp(a))return gt;const s=Ep(o.value,a.value);return s.valid?((pp(o)||pp(a))&&n.dirty(),{status:n.value,value:s.data}):(Ye(r,{code:Ie.invalid_intersection_types}),gt)},"handleParsed");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}))}};k(Ap,"ZodIntersection"),Ap.create=k((e,t,n)=>new Ap(B({left:e,right:t,typeName:"ZodIntersection"},Ot(n))),"create");var Cp=Ap,Op=class extends Ct{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})}};k(Op,"ZodLazy"),Op.create=k((e,t)=>new Op(B({getter:e,typeName:"ZodLazy"},Ot(t))),"create");var Tp=Op,$p=class extends Ct{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Ye(n,{received:n.data,code:Ie.invalid_literal,expected:this._def.value}),gt}return{status:"valid",value:t.data}}get value(){return this._def.value}};k($p,"ZodLiteral"),$p.create=k((e,t)=>new $p(B({value:e,typeName:"ZodLiteral"},Ot(t))),"create");var vc=$p,kp=class extends Ct{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!==Ge.map)return Ye(r,{code:Ie.invalid_type,expected:Ge.map,received:r.parsedType}),gt;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:i._parse(new wi(r,s,r.path,[c,"key"])),value:o._parse(new wi(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 gt;(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 gt;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(c.value,d.value)}return{status:n.value,value:s}}}};k(kp,"ZodMap"),kp.create=k((e,t,n)=>new kp(B({valueType:t,keyType:e,typeName:"ZodMap"},Ot(n))),"create");var Qv=kp,Ip=class extends Ct{_parse(t){if(this._getType(t)!==Ge.nan){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.nan,received:r.parsedType}),gt}return{status:"valid",value:t.data}}};k(Ip,"ZodNaN"),Ip.create=k(e=>new Ip(B({typeName:"ZodNaN"},Ot(e))),"create");var eb=Ip,Pp=class extends Ct{_parse(t){const n=Wt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ge.string&&r.parsedType!==Ge.number){const i=Wt.objectValues(n);return Ye(r,{expected:Wt.joinValues(i),received:r.parsedType,code:Ie.invalid_type}),gt}if(n.indexOf(t.data)===-1){const i=Wt.objectValues(n);return Ye(r,{received:r.data,code:Ie.invalid_enum_value,options:i}),gt}return _r(t.data)}get enum(){return this._def.values}};k(Pp,"ZodNativeEnum"),Pp.create=k((e,t)=>new Pp(B({values:e,typeName:"ZodNativeEnum"},Ot(t))),"create");var bc=Pp,Rp=class extends Ct{_parse(t){const n=this._getOrReturnCtx(t);return Ye(n,{code:Ie.invalid_type,expected:Ge.never,received:n.parsedType}),gt}};k(Rp,"ZodNever"),Rp.create=k(e=>new Rp(B({typeName:"ZodNever"},Ot(e))),"create");var va=Rp,Np=class extends Ct{_parse(t){if(this._getType(t)!==Ge.null){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.null,received:r.parsedType}),gt}return _r(t.data)}};k(Np,"ZodNull"),Np.create=k(e=>new Np(B({typeName:"ZodNull"},Ot(e))),"create");var _c=Np,Dp=class extends Ct{_parse(t){return this._getType(t)===Ge.null?_r(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};k(Dp,"ZodNullable"),Dp.create=k((e,t)=>new Dp(B({innerType:e,typeName:"ZodNullable"},Ot(t))),"create");var Do=Dp;function BO(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)}k(BO,"floatSafeRemainder");var Mp=class Nx extends Ct{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)!==Ge.number){const o=this._getOrReturnCtx(t);return Ye(o,{code:Ie.invalid_type,expected:Ge.number,received:o.parsedType}),gt}let r;const i=new Dr;for(const o of this._def.checks)o.kind==="int"?Wt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Ye(r,{code:Ie.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),Ye(r,{code:Ie.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),Ye(r,{code:Ie.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?BO(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Ye(r,{code:Ie.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Ye(r,{code:Ie.not_finite,message:o.message}),i.dirty()):Wt.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ut.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ut.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ut.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ut.toString(n))}setLimit(t,n,r,i){return new Nx(fe(B({},this._def),{checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ut.toString(i)}]}))}_addCheck(t){return new Nx(fe(B({},this._def),{checks:[...this._def.checks,t]}))}int(t){return this._addCheck({kind:"int",message:ut.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ut.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ut.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ut.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ut.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ut.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ut.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ut.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ut.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"&&Wt.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)}};k(Mp,"ZodNumber"),Mp.create=k(e=>new Mp(B({checks:[],typeName:"ZodNumber",coerce:(e==null?void 0:e.coerce)||!1},Ot(e))),"create");var wc=Mp;function bs(e){if(e instanceof _s){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Di.create(bs(r))}return new _s(fe(B({},e._def),{shape:()=>t}))}else return e instanceof Pu?new Pu(fe(B({},e._def),{type:bs(e.element)})):e instanceof Di?Di.create(bs(e.unwrap())):e instanceof Do?Do.create(bs(e.unwrap())):e instanceof ws?ws.create(e.items.map(t=>bs(t))):e}k(bs,"deepPartialify");var ba=class Gi extends Ct{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=Wt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Ge.object){const c=this._getOrReturnCtx(t);return Ye(c,{code:Ie.invalid_type,expected:Ge.object,received:c.parsedType}),gt}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof va&&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 wi(i,p,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof va){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&&(Ye(i,{code:Ie.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 wi(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=>Dr.mergeObjectSync(r,c)):Dr.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ut.errToObj,new Gi(B(fe(B({},this._def),{unknownKeys:"strict"}),t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const l=(a=(o=(i=this._def).errorMap)==null?void 0:o.call(i,n,r).message)!=null?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ut.errToObj(t).message)!=null?s:l}:{message:l}}}:{}))}strip(){return new Gi(fe(B({},this._def),{unknownKeys:"strip"}))}passthrough(){return new Gi(fe(B({},this._def),{unknownKeys:"passthrough"}))}extend(t){return new Gi(fe(B({},this._def),{shape:()=>B(B({},this._def.shape()),t)}))}merge(t){return new Gi({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>B(B({},this._def.shape()),t._def.shape()),typeName:"ZodObject"})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Gi(fe(B({},this._def),{catchall:t}))}pick(t){const n={};return Wt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Gi(fe(B({},this._def),{shape:()=>n}))}omit(t){const n={};return Wt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Gi(fe(B({},this._def),{shape:()=>n}))}deepPartial(){return bs(this)}partial(t){const n={};return Wt.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i==null?void 0:i.optional()}),new Gi(fe(B({},this._def),{shape:()=>n}))}required(t){const n={};return Wt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Di;)o=o._def.innerType;n[r]=o}}),new Gi(fe(B({},this._def),{shape:()=>n}))}keyof(){return gc(Wt.objectKeys(this.shape))}};k(ba,"ZodObject"),ba.create=k((e,t)=>new ba(B({shape:()=>e,unknownKeys:"strip",catchall:va.create(),typeName:"ZodObject"},Ot(t))),"create"),ba.strictCreate=k((e,t)=>new ba(B({shape:()=>e,unknownKeys:"strict",catchall:va.create(),typeName:"ZodObject"},Ot(t))),"strictCreate"),ba.lazycreate=k((e,t)=>new ba(B({shape:e,unknownKeys:"strip",catchall:va.create(),typeName:"ZodObject"},Ot(t))),"lazycreate");var _s=ba,jp=class extends Ct{_parse(t){return this._getType(t)===Ge.undefined?_r(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};k(jp,"ZodOptional"),jp.create=k((e,t)=>new jp(B({innerType:e,typeName:"ZodOptional"},Ot(t))),"create");var Di=jp,zO=class AF extends Ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return k(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?gt:o.status==="dirty"?(n.dirty(),vs(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})},"handleAsync")();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?gt: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:"ZodPipeline"})}};k(zO,"ZodPipeline");var Lp=zO,Fp=class extends Ct{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ge.promise&&n.common.async===!1)return Ye(n,{code:Ie.invalid_type,expected:Ge.promise,received:n.parsedType}),gt;const r=n.parsedType===Ge.promise?n.data:Promise.resolve(n.data);return _r(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};k(Fp,"ZodPromise"),Fp.create=k((e,t)=>new Fp(B({type:e,typeName:"ZodPromise"},Ot(t))),"create");var xc=Fp,qp=class extends Ct{_parse(t){const n=this._def.innerType._parse(t);return ku(n)&&(n.value=Object.freeze(n.value)),n}unwrap(){return this._def.innerType}};k(qp,"ZodReadonly"),qp.create=k((e,t)=>new qp(B({innerType:e,typeName:"ZodReadonly"},Ot(t))),"create");var Up=qp,ZO=class Dx extends Ct{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!==Ge.object)return Ye(r,{code:Ie.invalid_type,expected:Ge.object,received:r.parsedType}),gt;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new wi(r,s,r.path,s)),value:a._parse(new wi(r,r.data[s],r.path,s))});return r.common.async?Dr.mergeObjectAsync(n,i):Dr.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ct?new Dx(B({keyType:t,valueType:n,typeName:"ZodRecord"},Ot(r))):new Dx(B({keyType:dr.create(),valueType:t,typeName:"ZodRecord"},Ot(n)))}};k(ZO,"ZodRecord");var tb=ZO,Bp=class Mx extends Ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ge.set)return Ye(r,{code:Ie.invalid_type,expected:Ge.set,received:r.parsedType}),gt;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Ye(r,{code:Ie.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&&(Ye(r,{code:Ie.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 gt;d.status==="dirty"&&n.dirty(),c.add(d.value)}return{status:n.value,value:c}}k(a,"finalizeSet");const s=[...r.data.values()].map((l,c)=>o._parse(new wi(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Mx(fe(B({},this._def),{minSize:{value:t,message:ut.toString(n)}}))}max(t,n){return new Mx(fe(B({},this._def),{maxSize:{value:t,message:ut.toString(n)}}))}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};k(Bp,"ZodSet"),Bp.create=k((e,t)=>new Bp(B({valueType:e,minSize:null,maxSize:null,typeName:"ZodSet"},Ot(t))),"create");var nb=Bp,zp=/^c[^\s-]{8,}$/i,Zp=/^[a-z][a-z0-9]*$/,Hp=/^[0-9A-HJKMNP-TV-Z]{26}$/,Wp=/^[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,Vp=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,HO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",WO=k(e=>e===HO,"isEmojiRegex"),rb,Sc=/^(((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}))$/,Ec=/^(([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})))$/,Kp=k(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$"),"datetimeRegex");function VO(e,t){return!!((t==="v4"||!t)&&Sc.test(e)||(t==="v6"||!t)&&Ec.test(e))}k(VO,"isValidIP");var Gp=class Yf extends Ct{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ge.string){const o=this._getOrReturnCtx(t);return Ye(o,{code:Ie.invalid_type,expected:Ge.string,received:o.parsedType}),gt}const r=new Dr;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),Ye(i,{code:Ie.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),Ye(i,{code:Ie.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?Ye(i,{code:Ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&Ye(i,{code:Ie.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Vp.test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"email",code:Ie.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")rb||(rb=new RegExp(HO,"u")),rb.test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"emoji",code:Ie.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")Wp.test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"uuid",code:Ie.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")zp.test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"cuid",code:Ie.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")Zp.test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"cuid2",code:Ie.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")Hp.test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"ulid",code:Ie.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Ye(i,{validation:"url",code:Ie.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),Ye(i,{validation:"regex",code:Ie.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),Ye(i,{code:Ie.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),Ye(i,{code:Ie.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),Ye(i,{code:Ie.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Kp(o).test(t.data)||(i=this._getOrReturnCtx(t,i),Ye(i,{code:Ie.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?VO(t.data,o.version)||(i=this._getOrReturnCtx(t,i),Ye(i,{validation:"ip",code:Ie.invalid_string,message:o.message}),r.dirty()):Wt.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),B({validation:n,code:Ie.invalid_string},ut.errToObj(r)))}_addCheck(t){return new Yf(fe(B({},this._def),{checks:[...this._def.checks,t]}))}email(t){return this._addCheck(B({kind:"email"},ut.errToObj(t)))}url(t){return this._addCheck(B({kind:"url"},ut.errToObj(t)))}emoji(t){return this._addCheck(B({kind:"emoji"},ut.errToObj(t)))}uuid(t){return this._addCheck(B({kind:"uuid"},ut.errToObj(t)))}cuid(t){return this._addCheck(B({kind:"cuid"},ut.errToObj(t)))}cuid2(t){return this._addCheck(B({kind:"cuid2"},ut.errToObj(t)))}ulid(t){return this._addCheck(B({kind:"ulid"},ut.errToObj(t)))}ip(t){return this._addCheck(B({kind:"ip"},ut.errToObj(t)))}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck(B({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:!1},ut.errToObj(t==null?void 0:t.message)))}regex(t,n){return this._addCheck(B({kind:"regex",regex:t},ut.errToObj(n)))}includes(t,n){return this._addCheck(B({kind:"includes",value:t,position:n==null?void 0:n.position},ut.errToObj(n==null?void 0:n.message)))}startsWith(t,n){return this._addCheck(B({kind:"startsWith",value:t},ut.errToObj(n)))}endsWith(t,n){return this._addCheck(B({kind:"endsWith",value:t},ut.errToObj(n)))}min(t,n){return this._addCheck(B({kind:"min",value:t},ut.errToObj(n)))}max(t,n){return this._addCheck(B({kind:"max",value:t},ut.errToObj(n)))}length(t,n){return this._addCheck(B({kind:"length",value:t},ut.errToObj(n)))}nonempty(t){return this.min(1,ut.errToObj(t))}trim(){return new Yf(fe(B({},this._def),{checks:[...this._def.checks,{kind:"trim"}]}))}secret(){return this._def[gn]=fe(B({},this._def[gn]),{secret:!0}),this}toLowerCase(){return new Yf(fe(B({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]}))}toUpperCase(){return new Yf(fe(B({},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}};k(Gp,"ZodString"),Gp.create=k(e=>{var t;return new Gp(B({checks:[],typeName:"ZodString",coerce:(t=e==null?void 0:e.coerce)!=null?t:!1},Ot(e)))},"create");var dr=Gp,Yp=class extends Ct{_parse(t){if(this._getType(t)!==Ge.symbol){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.symbol,received:r.parsedType}),gt}return _r(t.data)}};k(Yp,"ZodSymbol"),Yp.create=k(e=>new Yp(B({typeName:"ZodSymbol"},Ot(e))),"create");var ib=Yp,Jp=class jx extends Ct{interpolated(t){return this._addPart(t)}literal(t){return this._addPart(t)}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ge.string){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.string,received:r.parsedType}),gt}if(!new RegExp(this._def.regexString).test(t.data)){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_string,message:`does not match template literal with pattern /${this._def.regexString}/`,path:r.path,validation:"regex"}),gt}return{status:"valid",value:t.data}}_addPart(t){const n=[...this._def.parts,t];return new jx(fe(B({},this._def),{parts:n,regexString:this._appendToRegexString(this._def.regexString,t)}))}_appendToRegexString(t,n){return`^${this._unwrapRegExp(t)}${this._transformPartToRegexString(n)}$`}_transformPartToRegexString(t){if(!(t instanceof Ct))return this._escapeRegExp(t);if(t instanceof vc)return this._escapeRegExp(t._def.value);if(t instanceof dr)return this._transformZodStringPartToRegexString(t);if(t instanceof No||t instanceof bc)return`(${(t instanceof No?t._def.values:Wt.getValidEnumValues(t._def.values)).map(this._escapeRegExp).join("|")})`;if(t instanceof Cc)return`(${t._def.options.map(n=>this._transformPartToRegexString(n)).join("|")})`;if(t instanceof wc)return this._transformZodNumberPartToRegexString(t);if(t instanceof Di)return`(${this._transformPartToRegexString(t.unwrap())})?`;if(t instanceof jx)return this._unwrapRegExp(t._def.regexString);if(t instanceof hc)return"\\-?\\d+";if(t instanceof mc)return"(true|false)";if(t instanceof Do){do t=t.unwrap();while(t instanceof Do);return`(${this._transformPartToRegexString(t)}|null)${t instanceof Di?"?":""}`}if(t instanceof yc)return this._transformPartToRegexString(t.unwrap());if(t instanceof Iu)return".*";if(t instanceof _c)return"null";if(t instanceof Ac)return"undefined";throw new Vv}_transformZodStringPartToRegexString(t){let n=1/0,r=0,i="",o="";for(const l of t._def.checks){const c=this._resolveRegexForStringCheck(l);if(c)return this._unwrapRegExp(c);if(l.kind==="endsWith")i=l.value;else if(l.kind==="length")r=n=l.value;else if(l.kind==="max")n=Math.max(0,Math.min(n,l.value));else if(l.kind==="min")r=Math.max(r,l.value);else if(l.kind==="startsWith")o=l.value;else throw new fp("ZodString",l.kind)}const a=Math.max(0,r-o.length-i.length),s=Number.isFinite(n)?Math.max(0,n-o.length-i.length):1/0;return s===0||a>s?`${o}${i}`:`${o}.${this._resolveRegexWildcardLength(a,s)}${i}`}_resolveRegexForStringCheck(t){var n;return(n={[t.kind]:null,cuid:zp,cuid2:Zp,datetime:t.kind==="datetime"?Kp(t):null,email:Vp,ip:t.kind==="ip"?{any:new RegExp(`^(${this._unwrapRegExp(Sc.source)})|(${this._unwrapRegExp(Ec.source)})$`),v4:Sc,v6:Ec}[t.version||"any"]:null,regex:t.kind==="regex"?t.regex:null,ulid:Hp,uuid:Wp}[t.kind])!=null?n:null}_resolveRegexWildcardLength(t,n){return t===n?t===1?"":`{${t}}`:n!==1/0?`{${t},${n}}`:t===0?"*":t===1?"+":`{${t},}`}_transformZodNumberPartToRegexString(t){let n=!0,r=!0,i=-1/0,o=1/0,a=!0,s=!1,l=!1,c="";for(const d of t._def.checks)if(d.kind==="finite")s=!0;else if(d.kind==="int")l=!0;else if(d.kind==="max")o=Math.min(o,d.value),d.value<=0&&(r=!1,d.value===0&&!d.inclusive&&(a=!1));else if(d.kind==="min")i=Math.max(i,d.value),d.value>=0&&(n=!1,d.value===0&&!d.inclusive&&(a=!1));else throw new fp("ZodNumber",d.kind);if(Number.isFinite(i)&&Number.isFinite(o)&&(s=!0),n)c=`${c}\\-`,r&&(c=`${c}?`);else if(!r)return"0+";return s||(c=`${c}(Infinity|(`),a?l?c=`${c}\\d+`:c=`${c}\\d+(\\.\\d+)?`:l?c=`${c}\\d*[1-9]\\d*`:c=`${c}((\\d*[1-9]\\d*(\\.\\d+)?)|(\\d+\\.\\d*[1-9]\\d*))`,s||(c=`${c}))`),c}_unwrapRegExp(t){const n=typeof t=="string"?"":t.flags,r=typeof t=="string"?t:t.source;return n.includes("i")?this._unwrapRegExp(this._makeRegexStringCaseInsensitive(r)):r.replace(/(^\^)|(\$$)/g,"")}_makeRegexStringCaseInsensitive(t){const n=k(o=>o.match(/[a-z]/i)!=null,"isAlphabetic");let r="",i=!1;for(let o=0;o<t.length;o++){const a=t.charAt(o),s=t.charAt(o+1);if(a==="\\"){r+=`${a}${s}`,o++;continue}if(a==="["?i=!0:i&&a==="]"&&(i=!1),!n(a)){r+=a;continue}if(!i){r+=`[${a.toLowerCase()}${a.toUpperCase()}]`;continue}const l=t.charAt(o+2);if(s!=="-"||!n(l)){r+=`${a.toLowerCase()}${a.toUpperCase()}`;continue}r+=`${a.toLowerCase()}-${l.toLowerCase()}${a.toUpperCase()}-${l.toUpperCase()}`,o+=2}return r}_escapeRegExp(t){return typeof t!="string"&&(t=`${t}`),t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}};k(Jp,"ZodTemplateLiteral"),Jp.create=k(e=>{var t;return new Jp(fe(B({},Ot(e)),{coerce:(t=e==null?void 0:e.coerce)!=null?t:!1,parts:[],regexString:"^$",typeName:"ZodTemplateLiteral"}))},"create");var Xp=Jp,Ru=class extends Ct{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName==="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=>{Ye(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);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return gt;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?gt:l.status==="dirty"||n.value==="dirty"?vs(l.value):l});{if(n.value==="aborted")return gt;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?gt:s.status==="dirty"||n.value==="dirty"?vs(s.value):s}}if(i.type==="refinement"){const a=k(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},"executeRefinement");if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?gt:(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"?gt:(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(!ku(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=>ku(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);Wt.assertNever(i)}};k(Ru,"ZodEffects"),Ru.create=k((e,t,n)=>new Ru(B({schema:e,typeName:"ZodEffects",effect:t},Ot(n))),"create"),Ru.createWithPreprocess=k((e,t,n)=>new Ru(B({schema:t,effect:{type:"preprocess",transform:e},typeName:"ZodEffects"},Ot(n))),"createWithPreprocess");var Mo=Ru,Qp=class CF extends Ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ge.array)return Ye(r,{code:Ie.invalid_type,expected:Ge.array,received:r.parsedType}),gt;if(r.data.length<this._def.items.length)return Ye(r,{code:Ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),gt;!this._def.rest&&r.data.length>this._def.items.length&&(Ye(r,{code:Ie.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 wi(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>Dr.mergeArray(n,a)):Dr.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new CF(fe(B({},this._def),{rest:t}))}};k(Qp,"ZodTuple"),Qp.create=k((e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qp(B({items:e,typeName:"ZodTuple",rest:null},Ot(t)))},"create");var ws=Qp,eh=class extends Ct{_parse(t){if(this._getType(t)!==Ge.undefined){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.undefined,received:r.parsedType}),gt}return _r(t.data)}};k(eh,"ZodUndefined"),eh.create=k(e=>new eh(B({typeName:"ZodUndefined"},Ot(e))),"create");var Ac=eh,th=class extends Ct{_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 ao(s.ctx.common.issues));return Ye(n,{code:Ie.invalid_union,unionErrors:a}),gt}if(k(i,"handleResults"),n.common.async)return Promise.all(r.map(async o=>{const a=fe(B({},n),{common:fe(B({},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=fe(B({},n),{common:fe(B({},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 ao(l));return Ye(n,{code:Ie.invalid_union,unionErrors:s}),gt}}get options(){return this._def.options}};k(th,"ZodUnion"),th.create=k((e,t)=>new th(B({options:e,typeName:"ZodUnion"},Ot(t))),"create");var Cc=th,nh=class extends Ct{constructor(){super(...arguments),this._unknown=!0}_parse(t){return _r(t.data)}};k(nh,"ZodUnknown"),nh.create=k(e=>new nh(B({typeName:"ZodUnknown"},Ot(e))),"create");var Nu=nh,rh=class extends Ct{_parse(t){if(this._getType(t)!==Ge.undefined){const r=this._getOrReturnCtx(t);return Ye(r,{code:Ie.invalid_type,expected:Ge.void,received:r.parsedType}),gt}return _r(t.data)}};k(rh,"ZodVoid"),rh.create=k(e=>new rh(B({typeName:"ZodVoid"},Ot(e))),"create");var ob=rh,toe=k((e,t)=>{let n;switch(e.code){case Ie.invalid_type:e.received===Ge.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Wt.jsonStringifyReplacer)}`;break;case Ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${Wt.joinValues(e.keys,", ")}`;break;case Ie.invalid_union:n="Invalid input";break;case Ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Wt.joinValues(e.options)}`;break;case Ie.invalid_enum_value:n=`Invalid enum value. Expected ${Wt.joinValues(e.options)}, received '${e.received}'`;break;case Ie.invalid_arguments:n="Invalid function arguments";break;case Ie.invalid_return_type:n="Invalid function return type";break;case Ie.invalid_date:n="Invalid date";break;case Ie.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}"`:Wt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ie.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 Ie.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 Ie.custom:n="Invalid input";break;case Ie.invalid_intersection_types:n="Intersection results could not be merged";break;case Ie.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ie.not_finite:n="Number must be finite";break;default:n=t.defaultError,Wt.assertNever(e)}return{message:n}},"errorMap"),Du=toe,noe=/^\d{4}-\d{2}-\d{2}(T|\s)?((\d{2}:\d{2}:\d{2}(\.\d{1,3})?)|(\d{2}:\d{2}))?(\s?([+-]\d{2}:\d{2}|Z))?$/,Mu=k((e,t,n=!0)=>{if(typeof e!="object")throw new Error("Input must be an object");const r=k(a=>{let s=a;return t!=null&&t.nullable&&(s=s.nullable()),t!=null&&t.optional&&(s=s.optional()),t!=null&&t.passtrough&&typeof s.passthrough=="function"&&(s=s.passthrough()),s},"applyOptions"),i=Object.entries(e).reduce((a,[s,l])=>{if(l===null)a[s]=r(zn.null());else switch(typeof l){case"string":a[s]=noe.test(l)?r(zn.string().datetime()):r(zn.string());break;case"number":a[s]=r(zn.number());break;case"boolean":a[s]=r(zn.boolean());break;case"object":Array.isArray(l)?l.length===0?a[s]=r(zn.array(zn.unknown())):typeof l[0]=="object"?a[s]=r(zn.array(Mu(l[0],t,!1))):["string","number","boolean"].includes(typeof l[0])&&(a[s]=r(zn.array(zn[typeof l[0]]()))):a[s]=r(Mu(l,t,!1));break;default:throw new Error(`Unsupported type for key ${s}`)}return a},{}),o=Object.keys(i).length>0;return t!=null&&t.passtrough||!n&&!o?zn.object(i).passthrough():zn.object(i)},"objectToZui");function KO(){return{}}k(KO,"parseAnyDef");function ab(e,t,n,r){r!=null&&r.errorMessages&&n&&(e.errorMessage=fe(B({},e.errorMessage),{[t]:n}))}k(ab,"addErrorMessage");function dn(e,t,n,r,i){e[t]=n,ab(e,t,r,i)}k(dn,"setResponseValueAndErrors");function GO(e,t){var n,r;const i={type:"array"};return((r=(n=e.type)==null?void 0:n._def)==null?void 0:r.typeName)!=="ZodAny"&&(i.items=an(e.type._def,fe(B({},t),{currentPath:[...t.currentPath,"items"]}))),e.minLength&&dn(i,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&dn(i,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(dn(i,"minItems",e.exactLength.value,e.exactLength.message,t),dn(i,"maxItems",e.exactLength.value,e.exactLength.message,t)),i}k(GO,"parseArrayDef");function YO(e,t){const n={type:"integer",format:"int64"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"min":t.target==="jsonSchema7"?r.inclusive?dn(n,"minimum",r.value,r.message,t):dn(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),dn(n,"minimum",r.value,r.message,t));break;case"max":t.target==="jsonSchema7"?r.inclusive?dn(n,"maximum",r.value,r.message,t):dn(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),dn(n,"maximum",r.value,r.message,t));break;case"multipleOf":dn(n,"multipleOf",r.value,r.message,t);break}return n}k(YO,"parseBigintDef");function JO(){return{type:"boolean"}}k(JO,"parseBooleanDef");function XO(e,t){return an(e.type._def,t)}k(XO,"parseBrandedDef");var roe=k((e,t)=>an(e.innerType._def,t),"parseCatchDef");function QO(e,t){return t.dateStrategy=="integer"?ioe(e,t):{type:"string",format:"date-time"}}k(QO,"parseDateDef");var ioe=k((e,t)=>{const n={type:"integer",format:"unix-time"};for(const r of e.checks)switch(r.kind){case"min":t.target==="jsonSchema7"&&dn(n,"minimum",r.value,r.message,t);break;case"max":t.target==="jsonSchema7"&&dn(n,"maximum",r.value,r.message,t);break}return n},"integerDateParser");function eT(e,t){return fe(B({},an(e.innerType._def,t)),{default:e.defaultValue()})}k(eT,"parseDefaultDef");function tT(e,t){return t.effectStrategy==="input"?an(e.schema._def,t):{}}k(tT,"parseEffectsDef");function nT(e){return{type:"string",enum:e.values}}k(nT,"parseEnumDef");var ooe=k(e=>"type"in e&&e.type==="string"?!1:"allOf"in e,"isJsonSchema7AllOfType");function rT(e,t){const n=[an(e.left._def,fe(B({},t),{currentPath:[...t.currentPath,"allOf","0"]})),an(e.right._def,fe(B({},t),{currentPath:[...t.currentPath,"allOf","1"]}))].filter(o=>!!o);let r=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const i=[];return n.forEach(o=>{if(ooe(o))i.push(...o.allOf),o.unevaluatedProperties===void 0&&(r=void 0);else{let a=o;"additionalProperties"in o&&o.additionalProperties===!1?a=DC(o,["additionalProperties"]):r=void 0,i.push(a)}}),i.length?B({allOf:i},r):void 0}k(rT,"parseIntersectionDef");function iT(e,t){const n=typeof e.value;return n!=="bigint"&&n!=="number"&&n!=="boolean"&&n!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:n==="bigint"?"integer":n,enum:[e.value]}:{type:n==="bigint"?"integer":n,const:e.value}}k(iT,"parseLiteralDef");var Oc={cuid:"^[cC][^\\s-]{8,}$",cuid2:"^[a-z][a-z0-9]*$",ulid:"^[0-9A-HJKMNP-TV-Z]{26}$",email:"^(?!\\.)(?!.*\\.\\.)([a-zA-Z0-9_+-\\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\\-]*\\.)+[a-zA-Z]{2,}$",emoji:"^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",uuid:"^[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}$",ipv4:"^(((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}))$",ipv6:"^(([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})))$"};function sb(e,t){const n={type:"string"};function r(i){return t.patternStrategy==="escape"?aoe(i):i}if(k(r,"processPattern"),e.checks)for(const i of e.checks)switch(i.kind){case"min":dn(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,i.value):i.value,i.message,t);break;case"max":dn(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,i.value):i.value,i.message,t);break;case"email":switch(t.emailStrategy){case"format:email":xs(n,"email",i.message,t);break;case"format:idn-email":xs(n,"idn-email",i.message,t);break;case"pattern:zod":jo(n,Oc.email,i.message,t);break}break;case"url":xs(n,"uri",i.message,t);break;case"uuid":xs(n,"uuid",i.message,t);break;case"regex":jo(n,i.regex.source,i.message,t);break;case"cuid":jo(n,Oc.cuid,i.message,t);break;case"cuid2":jo(n,Oc.cuid2,i.message,t);break;case"startsWith":jo(n,"^"+r(i.value),i.message,t);break;case"endsWith":jo(n,r(i.value)+"$",i.message,t);break;case"datetime":xs(n,"date-time",i.message,t);break;case"length":dn(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,i.value):i.value,i.message,t),dn(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,i.value):i.value,i.message,t);break;case"includes":{jo(n,r(i.value),i.message,t);break}case"ip":{i.version!=="v6"&&xs(n,"ipv4",i.message,t),i.version!=="v4"&&xs(n,"ipv6",i.message,t);break}case"emoji":jo(n,Oc.emoji,i.message,t);break;case"ulid":{jo(n,Oc.ulid,i.message,t);break}}return n}k(sb,"parseStringDef");var aoe=k(e=>Array.from(e).map(t=>/[a-zA-Z0-9]/.test(t)?t:`\\${t}`).join(""),"escapeNonAlphaNumeric"),xs=k((e,t,n,r)=>{var i;e.format||(i=e.anyOf)!=null&&i.some(o=>o.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push(B({format:e.format},e.errorMessage&&r.errorMessages&&{errorMessage:{format:e.errorMessage.format}})),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push(B({format:t},n&&r.errorMessages&&{errorMessage:{format:n}}))):dn(e,"format",t,n,r)},"addFormat"),jo=k((e,t,n,r)=>{var i;e.pattern||(i=e.allOf)!=null&&i.some(o=>o.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push(B({pattern:e.pattern},e.errorMessage&&r.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}})),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push(B({pattern:t},n&&r.errorMessages&&{errorMessage:{pattern:n}}))):dn(e,"pattern",t,n,r)},"addPattern");function ub(e,t){var n,r,i,o,a;if(t.target==="openApi3"&&((n=e.keyType)==null?void 0:n._def.typeName)==="ZodEnum")return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((l,c)=>{var d;return fe(B({},l),{[c]:(d=an(e.valueType._def,fe(B({},t),{currentPath:[...t.currentPath,"properties",c]})))!=null?d:{}})},{}),additionalProperties:!1};const s={type:"object",additionalProperties:(r=an(e.valueType._def,fe(B({},t),{currentPath:[...t.currentPath,"additionalProperties"]})))!=null?r:{}};if(t.target==="openApi3")return s;if(((i=e.keyType)==null?void 0:i._def.typeName)==="ZodString"&&((o=e.keyType._def.checks)!=null&&o.length)){const l=Object.entries(sb(e.keyType._def,t)).reduce((c,[d,p])=>d==="type"?c:fe(B({},c),{[d]:p}),{});return fe(B({},s),{propertyNames:l})}else if(((a=e.keyType)==null?void 0:a._def.typeName)==="ZodEnum")return fe(B({},s),{propertyNames:{enum:e.keyType._def.values}});return s}k(ub,"parseRecordDef");function oT(e,t){if(t.mapStrategy==="record")return ub(e,t);const n=an(e.keyType._def,fe(B({},t),{currentPath:[...t.currentPath,"items","items","0"]}))||{},r=an(e.valueType._def,fe(B({},t),{currentPath:[...t.currentPath,"items","items","1"]}))||{};return{type:"array",maxItems:125,items:{type:"array",items:[n,r],minItems:2,maxItems:2}}}k(oT,"parseMapDef");function aT(e){const t=e.values,r=Object.keys(e.values).filter(o=>typeof t[t[o]]!="number").map(o=>t[o]),i=Array.from(new Set(r.map(o=>typeof o)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:r.filter(o=>typeof o=="string"||typeof o=="number")}}k(aT,"parseNativeEnumDef");function sT(){return{not:{}}}k(sT,"parseNeverDef");function uT(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}k(uT,"parseNullDef");var ih={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function lT(e,t){if(t.target==="openApi3")return cT(e,t);const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(r=>r._def.typeName in ih&&(!r._def.checks||!r._def.checks.length))){const r=n.reduce((i,o)=>{const a=ih[o._def.typeName];return a&&!i.includes(a)?[...i,a]:i},[]);return{type:r.length>1?r:r[0]}}else if(n.every(r=>r._def.typeName==="ZodLiteral"&&!r.description)){const r=n.reduce((i,o)=>{const a=typeof o._def.value;switch(a){case"string":case"number":case"boolean":return[...i,a];case"bigint":return[...i,"integer"];case"object":if(o._def.value===null)return[...i,"null"];case"symbol":case"undefined":case"function":default:return i}},[]);if(r.length===n.length){const i=r.filter((o,a,s)=>s.indexOf(o)===a);return{type:i.length>1?i:i[0],enum:n.reduce((o,a)=>o.includes(a._def.value)?o:[...o,a._def.value],[])}}}else if(n.every(r=>r._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((r,i)=>[...r,...i._def.values.filter(o=>!r.includes(o))],[])};return cT(e,t)}k(lT,"parseUnionDef");var cT=k((e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((i,o)=>an(i._def,fe(B({},t),{currentPath:[...t.currentPath,t.unionStrategy,`${o}`]}))).filter(i=>!!i&&(!t.strictUnions||typeof i=="object"&&Object.keys(i).length>0)),r=t.discriminator&&e.typeName==="ZodDiscriminatedUnion"&&typeof e.discriminator=="string"?{discriminator:{propertyName:e.discriminator}}:{};if(n.length)return t.unionStrategy==="anyOf"?B({anyOf:n},r):B({oneOf:n},r)},"asUnionOf");function fT(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:ih[e.innerType._def.typeName],nullable:!0}:{type:[ih[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){const r=an(e.innerType._def,fe(B({},t),{currentPath:[...t.currentPath]}));return r&&fe(B({},r),{nullable:!0})}const n=an(e.innerType._def,fe(B({},t),{currentPath:[...t.currentPath,"anyOf","0"]}));return n&&{anyOf:[n,{type:"null"}]}}k(fT,"parseNullableDef");function dT(e,t){const n={type:"number"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"int":n.type="integer",ab(n,"type",r.message,t);break;case"min":t.target==="jsonSchema7"?r.inclusive?dn(n,"minimum",r.value,r.message,t):dn(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),dn(n,"minimum",r.value,r.message,t));break;case"max":t.target==="jsonSchema7"?r.inclusive?dn(n,"maximum",r.value,r.message,t):dn(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),dn(n,"maximum",r.value,r.message,t));break;case"multipleOf":dn(n,"multipleOf",r.value,r.message,t);break}return n}k(dT,"parseNumberDef");function pT(e,t){var n;const r=fe(B({type:"object"},Object.entries(e.shape()).reduce((i,[o,a])=>{if(a===void 0||a._def===void 0)return i;const s=an(a._def,fe(B({},t),{currentPath:[...t.currentPath,"properties",o],propertyPath:[...t.currentPath,"properties",o]}));return s===void 0?i:{properties:fe(B({},i.properties),{[o]:s}),required:a.isOptional()?i.required:[...i.required,o]}},{properties:{},required:[]})),{additionalProperties:e.catchall._def.typeName==="ZodNever"?e.unknownKeys==="passthrough":(n=an(e.catchall._def,fe(B({},t),{currentPath:[...t.currentPath,"additionalProperties"]})))!=null?n:!0});return r.required.length||delete r.required,r}k(pT,"parseObjectDef");var soe=k((e,t)=>{var n;if(t.currentPath.toString()===((n=t.propertyPath)==null?void 0:n.toString()))return an(e.innerType._def,t);const r=an(e.innerType._def,fe(B({},t),{currentPath:[...t.currentPath,"anyOf","1"]}));return r?{anyOf:[{not:{}},r]}:{}},"parseOptionalDef"),uoe=k((e,t)=>{if(t.pipeStrategy==="input")return an(e.in._def,t);if(t.pipeStrategy==="output")return an(e.out._def,t);const n=an(e.in._def,fe(B({},t),{currentPath:[...t.currentPath,"allOf","0"]})),r=an(e.out._def,fe(B({},t),{currentPath:[...t.currentPath,"allOf",n?"1":"0"]}));return{allOf:[n,r].filter(i=>i!==void 0)}},"parsePipelineDef");function hT(e,t){return an(e.type._def,t)}k(hT,"parsePromiseDef");function mT(e,t){const r={type:"array",uniqueItems:!0,items:an(e.valueType._def,fe(B({},t),{currentPath:[...t.currentPath,"items"]}))};return e.minSize&&dn(r,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&dn(r,"maxItems",e.maxSize.value,e.maxSize.message,t),r}k(mT,"parseSetDef");function yT(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((n,r)=>an(n._def,fe(B({},t),{currentPath:[...t.currentPath,"items",`${r}`]}))).reduce((n,r)=>r===void 0?n:[...n,r],[]),additionalItems:an(e.rest._def,fe(B({},t),{currentPath:[...t.currentPath,"additionalItems"]}))}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((n,r)=>an(n._def,fe(B({},t),{currentPath:[...t.currentPath,"items",`${r}`]}))).reduce((n,r)=>r===void 0?n:[...n,r],[])}}k(yT,"parseTupleDef");function gT(){return{not:{}}}k(gT,"parseUndefinedDef");function vT(){return{}}k(vT,"parseUnknownDef");var loe=k((e,t)=>an(e.innerType._def,t),"parseReadonlyDef");function an(e,t,n=!1){const r=t.seen.get(e);if(r&&!n){const a=coe(r,t);if(a!==void 0)return a}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const o=doe(e,e.typeName,t);return o&&poe(e,t,o),i.jsonSchema=o,o}k(an,"parseDef");var coe=k((e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:foe(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((n,r)=>t.currentPath[r]===n)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):t.$refStrategy==="seen"?{}:void 0}},"get$ref"),foe=k((e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")},"getRelativePath"),doe=k((e,t,n)=>{switch(t){case"ZodString":return sb(e,n);case"ZodNumber":return dT(e,n);case"ZodObject":return pT(e,n);case"ZodBigInt":return YO(e,n);case"ZodBoolean":return JO();case"ZodDate":return QO(e,n);case"ZodUndefined":return gT();case"ZodNull":return uT(n);case"ZodArray":return GO(e,n);case"ZodUnion":case"ZodDiscriminatedUnion":return lT(e,n);case"ZodIntersection":return rT(e,n);case"ZodTuple":return yT(e,n);case"ZodRecord":return ub(e,n);case"ZodLiteral":return iT(e,n);case"ZodEnum":return nT(e);case"ZodNativeEnum":return aT(e);case"ZodNullable":return fT(e,n);case"ZodOptional":return soe(e,n);case"ZodMap":return oT(e,n);case"ZodSet":return mT(e,n);case"ZodLazy":return an(e.getter()._def,n);case"ZodPromise":return hT(e,n);case"ZodNaN":case"ZodNever":return sT();case"ZodEffects":return tT(e,n);case"ZodAny":return KO();case"ZodUnknown":return vT();case"ZodDefault":return eT(e,n);case"ZodBranded":return XO(e,n);case"ZodReadonly":return loe(e,n);case"ZodCatch":return roe(e,n);case"ZodPipeline":return uoe(e,n);case"ZodTemplateLiteral":throw new Error("Template literals are not supported yet");case"ZodFunction":case"ZodVoid":case"ZodSymbol":return;default:return(r=>{})()}},"selectParser"),poe=k((e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),e[gn]&&(n[gn]=e[gn]),n),"addMeta"),bT={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"string",mapStrategy:"entries",definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",emailStrategy:"format:email",discriminator:!1,unionStrategy:"anyOf"},hoe=k(e=>typeof e=="string"?fe(B({},bT),{name:e}):B(B({},bT),e),"getDefaultOptions"),moe=k(e=>{const t=hoe(e),n=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return fe(B({},t),{currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([r,i])=>[i._def,{def:i._def,path:[...t.basePath,t.definitionPath,r],jsonSchema:void 0}]))})},"getRefs"),yoe=k((e,t)=>{var n;const r=moe(t),i=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((l,[c,d])=>{var p;return fe(B({},l),{[c]:(p=an(d._def,fe(B({},r),{currentPath:[...r.basePath,r.definitionPath,c]}),!0))!=null?p:{}})},{}):void 0,o=typeof t=="string"?t:t==null?void 0:t.name,a=(n=an(e._def,o===void 0?r:fe(B({},r),{currentPath:[...r.basePath,r.definitionPath,o]}),!1))!=null?n:{},s=o===void 0?i?fe(B({},a),{[r.definitionPath]:i}):a:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,o].join("/"),[r.definitionPath]:fe(B({},i),{[o]:a})};return r.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":r.target==="jsonSchema2019-09"&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),s},"zodToJsonSchema"),oh=k((e,t={target:"openApi3"})=>{const n=yoe(e,t);return t.$schemaUrl===!1?delete n.$schema:typeof t.$schemaUrl=="string"&&(n.$schema=t.$schemaUrl),ju(n,e,t)},"zuiToJsonSchema"),goe=k(e=>{var t,n,r,i;if(e!=null&&e._def)return e._def.getter&&typeof e._def.getter=="function"?(n=(t=e._def.getter()._def)==null?void 0:t.shape)==null?void 0:n.call(t):(i=(r=e._def).shape)==null?void 0:i.call(r)},"getShape"),ju=k((e,t,n)=>{const r=k((i,o)=>{n.stripZuiProps||Object.assign(i,{[gn]:o})},"assignZuiProps");if(e.type==="object"&&e.properties)for(const[i,o]of Object.entries(e.properties)){const a=goe(t);if(a!=null&&a[i]){const s=a[i].ui;r(o,s),ju(o,a[i],n)}}if(e.type=="array"){const i=t._def;Array.isArray(e.items)?(i.typeName===zn.ZodFirstPartyTypeKind.ZodTuple&&e.items.forEach((o,a)=>{const s=i.items[a];s&&ju(o,s,n)}),i.typeName===zn.ZodFirstPartyTypeKind.ZodMap&&e.items.map(o=>ju(o,i.valueType,n))):e.items&&(i.typeName===zn.ZodFirstPartyTypeKind.ZodMap?ju(e.items,i.valueType,n):ju(e.items,t._def.type,n))}return t&&"ui"in t&&(t!=null&&t.ui)&&r(e,t.ui),e},"mergeZuiIntoJsonSchema"),voe=["gpt-3.5-turbo","gpt-3.5-turbo-16k","gpt-4","gpt-4-1106-preview","gpt-4-vision-preview","gpt-4-0125-preview","gpt-4-turbo-preview","gpt-4-turbo","gpt-4o","gpt-3.5-turbo-0125","gpt-3.5-turbo-1106"];No.create(["any","string","number","boolean","object","pattern","date","array","target","time","enum"]);var _T=k(e=>dr.create().displayAs({id:"variable",params:B({type:(e==null?void 0:e.type)||"any"},e==null?void 0:e.params)}),"variable"),wT=k(e=>dr.create().displayAs({id:"conversation",params:B({},e==null?void 0:e.params)}),"conversation"),xT=k(e=>dr.create().displayAs({id:"user",params:B({},e==null?void 0:e.params)}),"user"),ST=k(e=>dr.create().displayAs({id:"message",params:B({},e==null?void 0:e.params)}),"message"),ET=k(e=>dr.create().displayAs({id:"agent",params:B({},e==null?void 0:e.params)}),"agent"),AT=k(e=>dr.create().displayAs({id:"event",params:B({},e==null?void 0:e.params)}),"event"),CT=k(e=>dr.create().displayAs({id:"table",params:B({},e==null?void 0:e.params)}),"table"),OT=k(e=>dr.create().displayAs({id:"tablerow",params:B({},e==null?void 0:e.params)}),"tablerow"),TT=k(e=>dr.create().displayAs({id:"intent",params:B({},e==null?void 0:e.params)}),"intent"),$T=k(()=>No.create(voe).displayAs({id:"dropdown",params:{}}),"aimodel"),kT=k(e=>dr.create().displayAs({id:"datasource",params:B({},e)}),"datasource"),IT=k(e=>dr.create().displayAs({id:"knowledgebase",params:B({},e)}),"knowledgebase"),PT={object:_s.lazycreate},RT=k((e,t={message:`Input not instance of ${e.name}`})=>Gv(n=>n instanceof e,t),"instanceOfType"),lb=dr.create,cb=wc.create,NT=eb.create,DT=hc.create,fb=mc.create,MT=wp.create,jT=ib.create,LT=Ac.create,FT=_c.create,qT=Iu.create,UT=Nu.create,BT=va.create,zT=ob.create,ZT=Pu.create,HT=_s.create,WT=_s.strictCreate,VT=Cc.create,KT=Yv.create,GT=Cp.create,YT=ws.create,JT=tb.create,XT=Qv.create,QT=nb.create,e$=Xv.create,t$=Tp.create,n$=vc.create,r$=No.create,i$=bc.create,o$=xc.create,ah=Mo.create,a$=Di.create,s$=Do.create,u$=Mo.createWithPreprocess,l$=Lp.create,c$=Xp.create,f$=k(()=>lb().optional(),"ostring"),d$=k(()=>cb().optional(),"onumber"),p$=k(()=>fb().optional(),"oboolean"),h$=Ct.fromJsonSchema,m$=Ct.fromObject,y$={string:e=>dr.create(fe(B({},e),{coerce:!0})),number:e=>wc.create(fe(B({},e),{coerce:!0})),boolean:e=>mc.create(fe(B({},e),{coerce:!0})),bigint:e=>hc.create(fe(B({},e),{coerce:!0})),date:e=>wp.create(fe(B({},e),{coerce:!0})),templateLiteral:e=>Xp.create(fe(B({},e),{coerce:!0}))},g$=gt,St=zn,v$=k((e,t)=>e.anyOf.length?e.anyOf.length===1?ir(e.anyOf[0],fe(B({},t),{path:[...t.path,"anyOf",0]})):`z.union([${e.anyOf.map((n,r)=>ir(n,fe(B({},t),{path:[...t.path,"anyOf",r]}))).join(", ")}])`:"z.any()","parseAnyOf"),boe=k(e=>"z.boolean()","parseBoolean"),_oe=k(e=>"z.any()","parseDefault"),woe=k((e,t)=>`z.union([${e.type.map(n=>ir(fe(B({},e),{type:n}),t)).join(", ")}])`,"parseMultipleType"),xoe=k((e,t)=>`z.any().refine((value) => !${ir(e.not,fe(B({},t),{path:[...t.path,"not"]}))}.safeParse(value).success, "Invalid input: Should NOT be valid against schema")`,"parseNot"),Soe=k(e=>"z.null()","parseNull"),Eoe=k(e=>[e.slice(0,e.length/2),e.slice(e.length/2)],"half"),Aoe=k((e,...t)=>Object.keys(e).reduce((n,r)=>(t.includes(r)||(n[r]=e[r]),n),{}),"omit");function wr(e,t,n){var r;const i=e[t];let o="";if(i!==void 0){const a=n({value:i,json:JSON.stringify(i)});if(a){const s=a[0],l=a.length===3?a[1]:"",c=a.length===3?a[2]:a[1];o+=s,((r=e.errorMessage)==null?void 0:r[t])!==void 0&&(o+=l+JSON.stringify(e.errorMessage[t])),o+=c}}return o}k(wr,"withMessage");var Tc=Symbol("Original index"),Coe=k(e=>{let t=[];for(let n=0;n<e.length;n++){const r=e[n];if(typeof r=="boolean")t.push(r?{[Tc]:n}:{[Tc]:n,not:{}});else{if(Tc in r)return e;t.push(fe(B({},r),{[Tc]:n}))}}return t},"ensureOriginalIndex");function $c(e,t){if(e.allOf.length===0)return"z.never()";if(e.allOf.length===1){const n=e.allOf[0];return ir(n,fe(B({},t),{path:[...t.path,"allOf",n[Tc]]}))}else{const[n,r]=Eoe(Coe(e.allOf));return`z.intersection(${$c({allOf:n},t)}, ${$c({allOf:r},t)})`}}k($c,"parseAllOf");var Ooe=k((e,t)=>{if(Array.isArray(e.items))return`z.tuple([${e.items.map((r,i)=>ir(r,fe(B({},t),{path:[...t.path,"items",i]})))}])`;let n=e.items?`z.array(${ir(e.items,fe(B({},t),{path:[...t.path,"items"]}))})`:"z.array(z.any())";return n+=wr(e,"minItems",({json:r})=>[`.min(${r}`,", ",")"]),n+=wr(e,"maxItems",({json:r})=>[`.max(${r}`,", ",")"]),n},"parseArray"),Toe=k(e=>`z.literal(${JSON.stringify(e.const)})`,"parseConst"),$oe=k(e=>e.enum.length===0?"z.never()":e.enum.length===1?`z.literal(${JSON.stringify(e.enum[0])})`:e.enum.every(t=>typeof t=="string")?`z.enum([${e.enum.map(t=>JSON.stringify(t))}])`:`z.union([${e.enum.map(t=>`z.literal(${JSON.stringify(t)})`).join(", ")}])`,"parseEnum"),koe=k((e,t)=>{const n=ir(e.if,fe(B({},t),{path:[...t.path,"if"]})),r=ir(e.then,fe(B({},t),{path:[...t.path,"then"]})),i=ir(e.else,fe(B({},t),{path:[...t.path,"else"]}));return`z.union([${r}, ${i}]).superRefine((value,ctx) => {
|
|
126
126
|
const result = ${n}.safeParse(value).success
|
|
127
127
|
? ${r}.safeParse(value)
|
|
128
128
|
: ${i}.safeParse(value);
|
|
@@ -182,16 +182,16 @@ ${ap(e.value)}`.trim();case St.ZodFirstPartyTypeKind.ZodEnum:return s.values.map
|
|
|
182
182
|
`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&zae[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},X$=Symbol("internals");function Nc(e){return e&&String(e).trim().toLowerCase()}function hh(e){return e===!1||e==null?e:_e.isArray(e)?e.map(hh):String(e)}function Hae(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 Wae=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Sb(e,t,n,r,i){if(_e.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!_e.isString(t)){if(_e.isString(r))return t.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(t)}}function Vae(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Kae(e,t){const n=_e.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 mh=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,l,c){const d=Nc(l);if(!d)throw new Error("header name must be a non-empty string");const p=_e.findKey(i,d);(!p||i[p]===void 0||c===!0||c===void 0&&i[p]!==!1)&&(i[p||l]=hh(s))}const a=(s,l)=>_e.forEach(s,(c,d)=>o(c,d,l));return _e.isPlainObject(t)||t instanceof this.constructor?a(t,n):_e.isString(t)&&(t=t.trim())&&!Wae(t)?a(Zae(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=Nc(t),t){const r=_e.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Hae(i);if(_e.isFunction(n))return n.call(this,i,r);if(_e.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Nc(t),t){const r=_e.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Sb(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Nc(a),a){const s=_e.findKey(r,a);s&&(!n||Sb(r,r[s],s,n))&&(delete r[s],i=!0)}}return _e.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||Sb(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return _e.forEach(this,(i,o)=>{const a=_e.findKey(r,o);if(a){n[a]=hh(i),delete n[o];return}const s=t?Vae(o):String(o).trim();s!==o&&delete n[o],n[s]=hh(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _e.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&_e.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(`
|
|
183
183
|
`)}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[X$]=this[X$]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Nc(a);r[s]||(Kae(i,a),r[s]=!0)}return _e.isArray(t)?t.forEach(o):o(t),this}};mh.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(mh.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),_e.freezeMethods(mh);const Lo=mh;function Eb(e,t){const n=this||xb,r=t||n,i=Lo.from(r.headers);let o=r.data;return _e.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Q$(e){return!!(e&&e.__CANCEL__)}function Dc(e,t,n){en.call(this,e??"canceled",en.ERR_CANCELED,t,n),this.name="CanceledError"}_e.inherits(Dc,en,{__CANCEL__:!0});function Gae(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new en("Request failed with status code "+n.status,[en.ERR_BAD_REQUEST,en.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Yae=uo.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];_e.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&a.push("path="+r),_e.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 Jae(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Xae(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ek(e,t){return e&&!Jae(t)?Xae(e,t):t}const Qae=uo.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=_e.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function ese(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function tse(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 tk(e,t){let n=0;const r=tse(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 Ab={http:Pae,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const o=Lo.from(e.headers).normalize();let{responseType:a,withXSRFToken:s}=e,l;function c(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}let d;if(_e.isFormData(i)){if(uo.hasStandardBrowserEnv||uo.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((d=o.getContentType())!==!1){const[v,...w]=d?d.split(";").map(_=>_.trim()).filter(Boolean):[];o.setContentType([v||"multipart/form-data",...w].join("; "))}}let p=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(v+":"+w))}const m=ek(e.baseURL,e.url);p.open(e.method.toUpperCase(),V$(m,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function h(){if(!p)return;const v=Lo.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),_={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:v,config:e,request:p};Gae(function(S){n(S),c()},function(S){r(S),c()},_),p=null}if("onloadend"in p?p.onloadend=h:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(h)},p.onabort=function(){p&&(r(new en("Request aborted",en.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new en("Network Error",en.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let w=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const _=e.transitional||G$;e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),r(new en(w,_.clarifyTimeoutError?en.ETIMEDOUT:en.ECONNABORTED,e,p)),p=null},uo.hasStandardBrowserEnv&&(s&&_e.isFunction(s)&&(s=s(e)),s||s!==!1&&Qae(m))){const v=e.xsrfHeaderName&&e.xsrfCookieName&&Yae.read(e.xsrfCookieName);v&&o.set(e.xsrfHeaderName,v)}i===void 0&&o.setContentType(null),"setRequestHeader"in p&&_e.forEach(o.toJSON(),function(w,_){p.setRequestHeader(_,w)}),_e.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),a&&a!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",tk(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",tk(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=v=>{p&&(r(!v||v.type?new Dc(null,e,p):v),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const y=ese(m);if(y&&uo.protocols.indexOf(y)===-1){r(new en("Unsupported protocol "+y+":",en.ERR_BAD_REQUEST,e));return}p.send(i||null)})}};_e.forEach(Ab,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const nk=e=>`- ${e}`,nse=e=>_e.isFunction(e)||e===null||e===!1,rk={getAdapter:e=>{e=_e.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,!nse(n)&&(r=Ab[(a=String(n)).toLowerCase()],r===void 0))throw new en(`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 :
|
|
184
184
|
`+o.map(nk).join(`
|
|
185
|
-
`):" "+nk(o[0]):"as no adapter specified";throw new en("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Ab};function Cb(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Dc(null,e)}function ik(e){return Cb(e),e.headers=Lo.from(e.headers),e.data=Eb.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rk.getAdapter(e.adapter||xb.adapter)(e).then(function(r){return Cb(e),r.data=Eb.call(e,e.transformResponse,r),r.headers=Lo.from(r.headers),r},function(r){return Q$(r)||(Cb(e),r&&r.response&&(r.response.data=Eb.call(e,e.transformResponse,r.response),r.response.headers=Lo.from(r.response.headers))),Promise.reject(r)})}const ok=e=>e instanceof Lo?{...e}:e;function Fu(e,t){t=t||{};const n={};function r(c,d,p){return _e.isPlainObject(c)&&_e.isPlainObject(d)?_e.merge.call({caseless:p},c,d):_e.isPlainObject(d)?_e.merge({},d):_e.isArray(d)?d.slice():d}function i(c,d,p){if(_e.isUndefined(d)){if(!_e.isUndefined(c))return r(void 0,c,p)}else return r(c,d,p)}function o(c,d){if(!_e.isUndefined(d))return r(void 0,d)}function a(c,d){if(_e.isUndefined(d)){if(!_e.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(ok(c),ok(d),!0)};return _e.forEach(Object.keys(Object.assign({},e,t)),function(d){const p=l[d]||i,m=p(e[d],t[d],d);_e.isUndefined(m)&&p!==s||(n[d]=m)}),n}const ak="1.6.8",Ob={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ob[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const sk={};Ob.transitional=function(t,n,r){function i(o,a){return"[Axios v"+ak+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new en(i(a," has been removed"+(n?" in "+n:"")),en.ERR_DEPRECATED);return n&&!sk[a]&&(sk[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 rse(e,t,n){if(typeof e!="object")throw new en("options must be an object",en.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 en("option "+o+" must be "+l,en.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new en("Unknown option "+o,en.ERR_BAD_OPTION)}}const Tb={assertOptions:rse,validators:Ob},
|
|
186
|
-
`+o):r.stack=o}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Fu(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Tb.assertOptions(r,{silentJSONParsing:ba.transitional(ba.boolean),forcedJSONParsing:ba.transitional(ba.boolean),clarifyTimeoutError:ba.transitional(ba.boolean)},!1),i!=null&&(_e.isFunction(i)?n.paramsSerializer={serialize:i}:Tb.assertOptions(i,{encode:ba.function,serialize:ba.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&_e.merge(o.common,o[n.method]);o&&_e.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Lo.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=[ik.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=ik.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=Fu(this.defaults,t);const n=ek(t.baseURL,t.url);return V$(n,t.params,t.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(t){yh.prototype[t]=function(n,r){return this.request(Fu(r||{},{method:t,url:n,data:(r||{}).data}))}}),_e.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(Fu(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}yh.prototype[t]=n(),yh.prototype[t+"Form"]=n(!0)});const gh=yh,ise=class OF{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 Dc(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 OF(function(i){t=i}),cancel:t}}};function ose(e){return function(n){return e.apply(null,n)}}function ase(e){return _e.isObject(e)&&e.isAxiosError===!0}const $b={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($b).forEach(([e,t])=>{$b[t]=e});const sse=$b;function uk(e){const t=new gh(e),n=I$(gh.prototype.request,t);return _e.extend(n,gh.prototype,t,{allOwnKeys:!0}),_e.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return uk(Fu(e,i))},n}const Wn=uk(xb);Wn.Axios=gh,Wn.CanceledError=Dc,Wn.CancelToken=ise,Wn.isCancel=Q$,Wn.VERSION=ak,Wn.toFormData=ph,Wn.AxiosError=en,Wn.Cancel=Wn.CanceledError,Wn.all=function(t){return Promise.all(t)},Wn.spread=ose,Wn.isAxiosError=ase,Wn.mergeConfig=Fu,Wn.AxiosHeaders=Lo,Wn.formToJSON=e=>J$(_e.isHTMLForm(e)?new FormData(e):e),Wn.getAdapter=rk.getAdapter,Wn.HttpStatusCode=sse,Wn.default=Wn;const qu=Wn,{Axios:use,AxiosError:lse,CanceledError:cse,isCancel:fse,CancelToken:dse,VERSION:pse,all:hse,Cancel:mse,isAxiosError:yse,spread:gse,toFormData:vse,AxiosHeaders:bse,HttpStatusCode:_se,formToJSON:wse,getAdapter:xse,mergeConfig:Sse}=qu,Ese=Object.freeze(Object.defineProperty({__proto__:null,Axios:use,AxiosError:lse,AxiosHeaders:bse,Cancel:mse,CancelToken:dse,CanceledError:cse,HttpStatusCode:_se,VERSION:pse,all:hse,default:qu,formToJSON:wse,getAdapter:xse,isAxiosError:yse,isCancel:fse,mergeConfig:Sse,spread:gse,toFormData:vse},Symbol.toStringTag,{value:"Module"}));var Uu={};Object.defineProperty(Uu,"__esModule",{value:!0});var Ase=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},Cse=typeof window<"u"&&typeof window.document<"u",Ose=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Tse=(typeof self>"u"?"undefined":Ase(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",$se=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),kse=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",lk=Uu.isBrowser=Cse;Uu.isWebWorker=Tse;var kb=Uu.isNode=Ose;Uu.isJsDom=$se,Uu.isDeno=kse;var Ise=Object.create,ck=Object.defineProperty,Pse=Object.getOwnPropertyDescriptor,Rse=Object.getOwnPropertyNames,Nse=Object.getPrototypeOf,Dse=Object.prototype.hasOwnProperty,Xn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mse=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Rse(t))!Dse.call(e,i)&&i!==n&&ck(e,i,{get:()=>t[i],enumerable:!(r=Pse(t,i))||r.enumerable});return e},Ib=(e,t,n)=>(n=e!=null?Ise(Nse(e)):{},Mse(t||!e||!e.__esModule?ck(n,"default",{value:e,enumerable:!0}):n,e)),jse=Xn(()=>{}),Lse=Xn(()=>{}),Fse=Xn((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}}),qse=Xn((e,t)=>{var n=typeof Symbol<"u"&&Symbol,r=Fse();t.exports=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:r()}}),Use=Xn((e,t)=>{var n={foo:{}},r=Object;t.exports=function(){return{__proto__:n}.foo===n.foo&&!({__proto__:null}instanceof r)}}),Bse=Xn((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}}),Pb=Xn((e,t)=>{var n=Bse();t.exports=Function.prototype.bind||n}),zse=Xn((e,t)=>{var n=Pb();t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)}),Rb=Xn((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=qse()(),p=Use()(),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 F;if(V==="%AsyncFunction%")F=a("async function () {}");else if(V==="%GeneratorFunction%")F=a("function* () {}");else if(V==="%AsyncGeneratorFunction%")F=a("async function* () {}");else if(V==="%AsyncGenerator%"){var Y=G("%AsyncGeneratorFunction%");Y&&(F=Y.prototype)}else if(V==="%AsyncIteratorPrototype%"){var ne=G("%AsyncGenerator%");ne&&m&&(F=m(ne.prototype))}return v[V]=F,F},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=Pb(),A=zse(),E=S.call(Function.call,Array.prototype.concat),T=S.call(Function.apply,Array.prototype.splice),j=S.call(Function.call,String.prototype.replace),q=S.call(Function.call,String.prototype.slice),L=S.call(Function.call,RegExp.prototype.exec),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,re=function(G){var V=q(G,0,1),F=q(G,-1);if(V==="%"&&F!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(F==="%"&&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 F=G,Y;if(A(b,F)&&(Y=b[F],F="%"+Y[0]+"%"),A(v,F)){var ne=v[F];if(ne===h&&(ne=_(F)),typeof ne>"u"&&!V)throw new o("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:Y,name:F,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(L(/^%?[^%]*%?$/,G)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var F=re(G),Y=F.length>0?F[0]:"",ne=Q("%"+Y+"%",V),ce=ne.name,P=ne.value,ue=!1,Oe=ne.alias;Oe&&(Y=Oe[0],T(F,E([0,1],Oe)));for(var D=1,De=!0;D<F.length;D+=1){var qe=F[D],Me=q(qe,0,1),Je=q(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"||!De)&&(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&&D+1>=F.length){var rt=s(P,qe);De=!!rt,De&&"get"in rt&&!("originalValue"in rt.get)?P=rt.get:P=P[qe]}else De=A(P,qe),P=P[qe];De&&!ue&&(v[ce]=P)}}return P}}),Zse=Xn((e,t)=>{var n=Pb(),r=Rb(),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}),Hse=Xn((e,t)=>{var n=Rb(),r=Zse(),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}}),Wse=Xn(()=>{}),Vse=Xn((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,q=RegExp.prototype.test,L=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,F=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Y=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===F||"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||q.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=Wse(),Oe=ue.custom,D=$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 ye(ae,pt);if(typeof ae=="number"){if(ae===0)return 1/0/ae>0?"0":"-0";var N=String(ae);return sr?P(ae,N):N}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=Yt(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=F?E.call(String(ae),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(ae);return typeof ae=="object"&&!F?Be(Pt):Pt}if(ie(ae)){for(var Jt="<"+j.call(String(ae.nodeName)),bn=ae.attributes||[],Rn=0;Rn<bn.length;Rn++)Jt+=" "+bn[Rn].name+"="+De(qe(bn[Rn].value),"double",pt);return Jt+=">",ae.childNodes&&ae.childNodes.length&&(Jt+="..."),Jt+="</"+j.call(String(ae.nodeName))+">",Jt}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(L.call("[cause]: "+Re(ae.cause),ta),", ")+" }":ta.length===0?"["+String(ae)+"]":"{ ["+String(ae)+"] "+M.call(ta,", ")+" }"}if(typeof ae=="object"&&Mn){if(D&&typeof ae[D]=="function"&&ue)return ue(ae,{depth:He-At});if(Mn!=="symbol"&&typeof ae.inspect=="function")return ae.inspect()}if(et(ae)){var xl=[];return o&&o.call(ae,function(Tt,jn){xl.push(Re(jn,ae,!0)+" => "+Re(Tt,ae))}),pn("Map",i.call(ae),xl,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",Kt=!ze&&Y&&Object(ae)===ae&&Y in ae?A.call(de(ae),8,-1):yt?"Object":"",un=ze||typeof ae.constructor!="function"?"":ae.constructor.name?ae.constructor.name+" ":"",Ft=un+(Kt||yt?"["+M.call(L.call([],Kt||[],yt||[]),": ")+"] ":"");return Ce.length===0?Ft+"{}":Xe?Ft+"{"+cn(Ce,Xe)+"}":Ft+"{ "+M.call(Ce,", ")+" }"}return String(ae)};function De(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 de(ee)==="[object Array]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Je(ee){return de(ee)==="[object Date]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function rt(ee){return de(ee)==="[object RegExp]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Ke(ee){return de(ee)==="[object Error]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Pe(ee){return de(ee)==="[object String]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Ae(ee){return de(ee)==="[object Number]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Fe(ee){return de(ee)==="[object Boolean]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function $e(ee){if(F)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 de(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 ye(ee,ae){if(ee.length>ae.maxStringLength){var ft=ee.length-ae.maxStringLength,At="... "+ft+" more character"+(ft>1?"s":"");return ye(A.call(ee,0,ae.maxStringLength),ae)+At}var on=E.call(E.call(ee,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,xe);return De(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],`
|
|
185
|
+
`):" "+nk(o[0]):"as no adapter specified";throw new en("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Ab};function Cb(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Dc(null,e)}function ik(e){return Cb(e),e.headers=Lo.from(e.headers),e.data=Eb.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rk.getAdapter(e.adapter||xb.adapter)(e).then(function(r){return Cb(e),r.data=Eb.call(e,e.transformResponse,r),r.headers=Lo.from(r.headers),r},function(r){return Q$(r)||(Cb(e),r&&r.response&&(r.response.data=Eb.call(e,e.transformResponse,r.response),r.response.headers=Lo.from(r.response.headers))),Promise.reject(r)})}const ok=e=>e instanceof Lo?{...e}:e;function Fu(e,t){t=t||{};const n={};function r(c,d,p){return _e.isPlainObject(c)&&_e.isPlainObject(d)?_e.merge.call({caseless:p},c,d):_e.isPlainObject(d)?_e.merge({},d):_e.isArray(d)?d.slice():d}function i(c,d,p){if(_e.isUndefined(d)){if(!_e.isUndefined(c))return r(void 0,c,p)}else return r(c,d,p)}function o(c,d){if(!_e.isUndefined(d))return r(void 0,d)}function a(c,d){if(_e.isUndefined(d)){if(!_e.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(ok(c),ok(d),!0)};return _e.forEach(Object.keys(Object.assign({},e,t)),function(d){const p=l[d]||i,m=p(e[d],t[d],d);_e.isUndefined(m)&&p!==s||(n[d]=m)}),n}const ak="1.6.8",Ob={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ob[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const sk={};Ob.transitional=function(t,n,r){function i(o,a){return"[Axios v"+ak+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new en(i(a," has been removed"+(n?" in "+n:"")),en.ERR_DEPRECATED);return n&&!sk[a]&&(sk[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 rse(e,t,n){if(typeof e!="object")throw new en("options must be an object",en.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 en("option "+o+" must be "+l,en.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new en("Unknown option "+o,en.ERR_BAD_OPTION)}}const Tb={assertOptions:rse,validators:Ob},_a=Tb.validators;let yh=class{constructor(t){this.defaults=t,this.interceptors={request:new K$,response:new K$}}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/,""):"";r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
186
|
+
`+o):r.stack=o}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Fu(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Tb.assertOptions(r,{silentJSONParsing:_a.transitional(_a.boolean),forcedJSONParsing:_a.transitional(_a.boolean),clarifyTimeoutError:_a.transitional(_a.boolean)},!1),i!=null&&(_e.isFunction(i)?n.paramsSerializer={serialize:i}:Tb.assertOptions(i,{encode:_a.function,serialize:_a.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&_e.merge(o.common,o[n.method]);o&&_e.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Lo.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=[ik.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=ik.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=Fu(this.defaults,t);const n=ek(t.baseURL,t.url);return V$(n,t.params,t.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(t){yh.prototype[t]=function(n,r){return this.request(Fu(r||{},{method:t,url:n,data:(r||{}).data}))}}),_e.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(Fu(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}yh.prototype[t]=n(),yh.prototype[t+"Form"]=n(!0)});const gh=yh,ise=class OF{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 Dc(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 OF(function(i){t=i}),cancel:t}}};function ose(e){return function(n){return e.apply(null,n)}}function ase(e){return _e.isObject(e)&&e.isAxiosError===!0}const $b={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($b).forEach(([e,t])=>{$b[t]=e});const sse=$b;function uk(e){const t=new gh(e),n=I$(gh.prototype.request,t);return _e.extend(n,gh.prototype,t,{allOwnKeys:!0}),_e.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return uk(Fu(e,i))},n}const Wn=uk(xb);Wn.Axios=gh,Wn.CanceledError=Dc,Wn.CancelToken=ise,Wn.isCancel=Q$,Wn.VERSION=ak,Wn.toFormData=ph,Wn.AxiosError=en,Wn.Cancel=Wn.CanceledError,Wn.all=function(t){return Promise.all(t)},Wn.spread=ose,Wn.isAxiosError=ase,Wn.mergeConfig=Fu,Wn.AxiosHeaders=Lo,Wn.formToJSON=e=>J$(_e.isHTMLForm(e)?new FormData(e):e),Wn.getAdapter=rk.getAdapter,Wn.HttpStatusCode=sse,Wn.default=Wn;const qu=Wn,{Axios:use,AxiosError:lse,CanceledError:cse,isCancel:fse,CancelToken:dse,VERSION:pse,all:hse,Cancel:mse,isAxiosError:yse,spread:gse,toFormData:vse,AxiosHeaders:bse,HttpStatusCode:_se,formToJSON:wse,getAdapter:xse,mergeConfig:Sse}=qu,Ese=Object.freeze(Object.defineProperty({__proto__:null,Axios:use,AxiosError:lse,AxiosHeaders:bse,Cancel:mse,CancelToken:dse,CanceledError:cse,HttpStatusCode:_se,VERSION:pse,all:hse,default:qu,formToJSON:wse,getAdapter:xse,isAxiosError:yse,isCancel:fse,mergeConfig:Sse,spread:gse,toFormData:vse},Symbol.toStringTag,{value:"Module"}));var Uu={};Object.defineProperty(Uu,"__esModule",{value:!0});var Ase=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},Cse=typeof window<"u"&&typeof window.document<"u",Ose=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Tse=(typeof self>"u"?"undefined":Ase(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",$se=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),kse=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",lk=Uu.isBrowser=Cse;Uu.isWebWorker=Tse;var kb=Uu.isNode=Ose;Uu.isJsDom=$se,Uu.isDeno=kse;var Ise=Object.create,ck=Object.defineProperty,Pse=Object.getOwnPropertyDescriptor,Rse=Object.getOwnPropertyNames,Nse=Object.getPrototypeOf,Dse=Object.prototype.hasOwnProperty,Xn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mse=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Rse(t))!Dse.call(e,i)&&i!==n&&ck(e,i,{get:()=>t[i],enumerable:!(r=Pse(t,i))||r.enumerable});return e},Ib=(e,t,n)=>(n=e!=null?Ise(Nse(e)):{},Mse(t||!e||!e.__esModule?ck(n,"default",{value:e,enumerable:!0}):n,e)),jse=Xn(()=>{}),Lse=Xn(()=>{}),Fse=Xn((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}}),qse=Xn((e,t)=>{var n=typeof Symbol<"u"&&Symbol,r=Fse();t.exports=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:r()}}),Use=Xn((e,t)=>{var n={foo:{}},r=Object;t.exports=function(){return{__proto__:n}.foo===n.foo&&!({__proto__:null}instanceof r)}}),Bse=Xn((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}}),Pb=Xn((e,t)=>{var n=Bse();t.exports=Function.prototype.bind||n}),zse=Xn((e,t)=>{var n=Pb();t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)}),Rb=Xn((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=qse()(),p=Use()(),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 F;if(V==="%AsyncFunction%")F=a("async function () {}");else if(V==="%GeneratorFunction%")F=a("function* () {}");else if(V==="%AsyncGeneratorFunction%")F=a("async function* () {}");else if(V==="%AsyncGenerator%"){var Y=G("%AsyncGeneratorFunction%");Y&&(F=Y.prototype)}else if(V==="%AsyncIteratorPrototype%"){var ne=G("%AsyncGenerator%");ne&&m&&(F=m(ne.prototype))}return v[V]=F,F},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=Pb(),A=zse(),E=S.call(Function.call,Array.prototype.concat),T=S.call(Function.apply,Array.prototype.splice),j=S.call(Function.call,String.prototype.replace),q=S.call(Function.call,String.prototype.slice),L=S.call(Function.call,RegExp.prototype.exec),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,re=function(G){var V=q(G,0,1),F=q(G,-1);if(V==="%"&&F!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(F==="%"&&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 F=G,Y;if(A(b,F)&&(Y=b[F],F="%"+Y[0]+"%"),A(v,F)){var ne=v[F];if(ne===h&&(ne=_(F)),typeof ne>"u"&&!V)throw new o("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:Y,name:F,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(L(/^%?[^%]*%?$/,G)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var F=re(G),Y=F.length>0?F[0]:"",ne=Q("%"+Y+"%",V),ce=ne.name,P=ne.value,ue=!1,Oe=ne.alias;Oe&&(Y=Oe[0],T(F,E([0,1],Oe)));for(var D=1,De=!0;D<F.length;D+=1){var qe=F[D],Me=q(qe,0,1),Je=q(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"||!De)&&(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&&D+1>=F.length){var rt=s(P,qe);De=!!rt,De&&"get"in rt&&!("originalValue"in rt.get)?P=rt.get:P=P[qe]}else De=A(P,qe),P=P[qe];De&&!ue&&(v[ce]=P)}}return P}}),Zse=Xn((e,t)=>{var n=Pb(),r=Rb(),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}),Hse=Xn((e,t)=>{var n=Rb(),r=Zse(),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}}),Wse=Xn(()=>{}),Vse=Xn((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,q=RegExp.prototype.test,L=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,F=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Y=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===F||"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||q.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=Wse(),Oe=ue.custom,D=$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 ye(ae,pt);if(typeof ae=="number"){if(ae===0)return 1/0/ae>0?"0":"-0";var N=String(ae);return sr?P(ae,N):N}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=Yt(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=F?E.call(String(ae),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(ae);return typeof ae=="object"&&!F?Be(Pt):Pt}if(ie(ae)){for(var Jt="<"+j.call(String(ae.nodeName)),bn=ae.attributes||[],Rn=0;Rn<bn.length;Rn++)Jt+=" "+bn[Rn].name+"="+De(qe(bn[Rn].value),"double",pt);return Jt+=">",ae.childNodes&&ae.childNodes.length&&(Jt+="..."),Jt+="</"+j.call(String(ae.nodeName))+">",Jt}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 na=Cn(ae,Re);return!("cause"in Error.prototype)&&"cause"in ae&&!ne.call(ae,"cause")?"{ ["+String(ae)+"] "+M.call(L.call("[cause]: "+Re(ae.cause),na),", ")+" }":na.length===0?"["+String(ae)+"]":"{ ["+String(ae)+"] "+M.call(na,", ")+" }"}if(typeof ae=="object"&&Mn){if(D&&typeof ae[D]=="function"&&ue)return ue(ae,{depth:He-At});if(Mn!=="symbol"&&typeof ae.inspect=="function")return ae.inspect()}if(et(ae)){var xl=[];return o&&o.call(ae,function(Tt,jn){xl.push(Re(jn,ae,!0)+" => "+Re(Tt,ae))}),pn("Map",i.call(ae),xl,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",Kt=!ze&&Y&&Object(ae)===ae&&Y in ae?A.call(de(ae),8,-1):yt?"Object":"",un=ze||typeof ae.constructor!="function"?"":ae.constructor.name?ae.constructor.name+" ":"",Ft=un+(Kt||yt?"["+M.call(L.call([],Kt||[],yt||[]),": ")+"] ":"");return Ce.length===0?Ft+"{}":Xe?Ft+"{"+cn(Ce,Xe)+"}":Ft+"{ "+M.call(Ce,", ")+" }"}return String(ae)};function De(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 de(ee)==="[object Array]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Je(ee){return de(ee)==="[object Date]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function rt(ee){return de(ee)==="[object RegExp]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Ke(ee){return de(ee)==="[object Error]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Pe(ee){return de(ee)==="[object String]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Ae(ee){return de(ee)==="[object Number]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function Fe(ee){return de(ee)==="[object Boolean]"&&(!Y||!(typeof ee=="object"&&Y in ee))}function $e(ee){if(F)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 de(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 ye(ee,ae){if(ee.length>ae.maxStringLength){var ft=ee.length-ae.maxStringLength,At="... "+ft+" more character"+(ft>1?"s":"");return ye(A.call(ee,0,ae.maxStringLength),ae)+At}var on=E.call(E.call(ee,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,xe);return De(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],`
|
|
187
187
|
`)>=0)return!1;return!0}function Yt(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=`
|
|
188
188
|
`+ae.prev+ae.base;return ft+M.call(ee,","+ft)+`
|
|
189
|
-
`+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(F){Mn={};for(var sr=0;sr<pt.length;sr++)Mn["$"+pt[sr]]=pt[sr]}for(var N in ee)K(ee,N)&&(ft&&String(Number(N))===N&&N<ee.length||F&&Mn["$"+N]instanceof Symbol||(q.call(/[^\w$]/,N)?At.push(ae(N,ee)+": "+ae(ee[N],ee)):At.push(N+": "+ae(ee[N],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}}),Kse=Xn((e,t)=>{var n=Rb(),r=Hse(),i=Vse(),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}}),Nb=Xn((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}}),fk=Xn((e,t)=>{var n=Nb(),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 q=b[j];q&&typeof q=="object"&&T&&typeof T=="object"?b[j]=_(q,T,A):b.push(T)}else b[j]=T}),b):Object.keys(S).reduce(function(T,j){var q=S[j];return r.call(T,j)?T[j]=_(T[j],q,A):T[j]=q,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="",q=0;q<T.length;++q){var L=T.charCodeAt(q);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||E===n.RFC1738&&(L===40||L===41)){j+=T.charAt(q);continue}if(L<128){j=j+o[L];continue}if(L<2048){j=j+(o[192|L>>6]+o[128|L&63]);continue}if(L<55296||L>=57344){j=j+(o[224|L>>12]+o[128|L>>6&63]+o[128|L&63]);continue}q+=1,L=65536+((L&1023)<<10|T.charCodeAt(q)&1023),j+=o[240|L>>18]+o[128|L>>12&63]+o[128|L>>6&63]+o[128|L&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),q=0;q<j.length;++q){var L=j[q],M=T[L];typeof M=="object"&&M!==null&&S.indexOf(M)===-1&&(b.push({obj:T,prop:L}),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}}),Gse=Xn((e,t)=>{var n=Kse(),r=fk(),i=Nb(),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,q,L,M,H,re,Q,G,V,F,Y,ne){for(var ce=S,P=ne,ue=0,Oe=!1;(P=P.get(v))!==void 0&&!Oe;){var D=P.get(S);if(ue+=1,typeof D<"u"){if(D===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(de){return de instanceof Date?Q(de):de})),ce===null){if(j)return L&&!F?L(A,h.encoder,Y,"key",G):A;ce=""}if(y(ce)||r.isBuffer(ce)){if(L){var De=F?A:L(A,h.encoder,Y,"key",G);if(E==="comma"&&F){for(var qe=l.call(String(ce),","),Me="",Je=0;Je<qe.length;++Je)Me+=(Je===0?"":",")+V(L(qe[Je],h.encoder,Y,"value",G));return[V(De)+(T&&s(ce)&&qe.length===1?"[]":"")+"="+Me]}return[V(De)+"="+V(L(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(!(q&&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,q,L,M,H,re,Q,G,V,F,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 q=[];if(typeof A!="object"||A===null)return"";var L;S&&S.arrayFormat in a?L=S.arrayFormat:S&&"indices"in S?L=S.indices?"indices":"repeat":L="indices";var M=a[L];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(q,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=q.join(E.delimiter),F=E.addQueryPrefix===!0?"?":"";return E.charsetSentinel&&(E.charset==="iso-8859-1"?F+="utf8=%26%2310003%3B&":F+="utf8=%E2%9C%93&"),V.length>0?F+V:""}}),Yse=Xn((e,t)=>{var n=fk(),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],q=j.indexOf("]="),L=q===-1?j.indexOf("="):q+1,M,H;L===-1?(M=v.decoder(j,o.decoder,T,"key"),H=v.strictNullHandling?null:""):(M=v.decoder(j.slice(0,L),o.decoder,T,"key"),H=n.maybeMap(s(j.slice(L+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 q=0;w.depth>0&&(E=A.exec(b))!==null&&q<w.depth;){if(q+=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)}}),Jse=Xn((e,t)=>{var n=Gse(),r=Yse(),i=Nb();t.exports={formats:i,parse:r,stringify:n}}),Xse={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Db=typeof window<"u"&&typeof window.document<"u"?window.crypto:mb;Db.getRandomValues||(Db=Xse);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(Db.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"}},Qse=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,dk=e=>e instanceof xn||Qse(e)&&e.isApiError===!0,Bu=class extends xn{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}},pk=class extends xn{constructor(e,t,n){super(500,"An internal error occurred","Internal",e,t,n)}},hk=class extends xn{constructor(e,t,n){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n)}},mk=class extends xn{constructor(e,t,n){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n)}},yk=class extends xn{constructor(e,t,n){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n)}},gk=class extends xn{constructor(e,t,n){super(400,"The request payload is invalid.","InvalidPayload",e,t,n)}},vk=class extends xn{constructor(e,t,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n)}},bk=class extends xn{constructor(e,t,n){super(405,"The requested method does not exist.","MethodNotFound",e,t,n)}},_k=class extends xn{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}},wk=class extends xn{constructor(e,t,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n)}},xk=class extends xn{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}},Sk=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)}},Ek=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)}},Ak=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)}},Ck=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)}},Ok=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)}},Tk=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)}},$k=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)}},kk=class extends xn{constructor(e,t,n){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,n)}},Ik=class extends xn{constructor(e,t,n){super(429,"The request has been rate limited.","RateLimited",e,t,n)}},Pk=class extends xn{constructor(e,t,n){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n)}},Rk=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)}},Nk=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)}},Dk=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)}},eue={Unknown:Bu,Internal:pk,Unauthorized:hk,Forbidden:mk,PayloadTooLarge:yk,InvalidPayload:gk,UnsupportedMediaType:vk,MethodNotFound:bk,ResourceNotFound:_k,InvalidJsonSchema:wk,InvalidDataFormat:xk,InvalidIdentifier:Sk,RelationConflict:Ek,ReferenceConstraint:Ak,ResourceLockedConflict:Ck,ReferenceNotFound:Ok,InvalidQuery:Tk,Runtime:$k,AlreadyExists:kk,RateLimited:Ik,PaymentRequired:Pk,QuotaExceeded:Rk,LimitExceeded:Nk,BreakingChanges:Dk},Mb=e=>dk(e)?e:e instanceof Error?new Bu(e.message,e):typeof e=="string"?new Bu(e):tue(e);function tue(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=eue[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Bu(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Bu("An invalid error occurred: "+JSON.stringify(e))}var Mc=class extends Error{constructor(t,n,r){super(t),this.innerError=n,this.file=r,this.name="FileUploadError"}},nue=Ib(jse()),rue=Ib(Lse()),iue="https://api.botpress.cloud",oue=6e4,aue="BP_API_URL",sue="BP_BOT_ID",uue="BP_INTEGRATION_ID",lue="BP_WORKSPACE_ID",cue="BP_TOKEN";function fue(e){let t=due(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??iue,i=t.timeout??oue;return{apiUrl:r,timeout:i,withCredentials:lk,headers:n}}function due(e){return lk?e:kb?pue(e):e}function pue(e){let t={...e,apiUrl:e.apiUrl??process.env[aue],botId:e.botId??process.env[sue],integrationId:e.integrationId??process.env[uue],workspaceId:e.workspaceId??process.env[lue]},n=t.token??process.env[cue];return n&&(t.token=n),t}var hue=Ib(Jse()),mue=e=>e[1]!==void 0,pe=e=>{let{method:t,path:n,query:r,headers:i,body:o}=e,a=Object.entries(i).filter(mue),s=Object.fromEntries(a),l=hue.default.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),c=l?[n,l].join("?"):n;return{method:t,url:c,headers:s,data:o}},yue=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),gue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),vue=e=>({path:"/v1/chat/conversations",headers:{},query:{nextToken:e.nextToken,tags:e.tags,participantIds:e.participantIds,integrationName:e.integrationName},params:{},body:{}}),bue=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),_ue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}}),wue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),xue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Sue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}}),Eue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),Aue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),Cue=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}}),Oue=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Tue=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:{}}),$ue=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}}),kue=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}}),Iue=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Pue=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}}),Rue=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),Nue=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Due=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),Mue=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),jue=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),Lue=e=>({path:"/v1/chat/users/get-or-create",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),Fue=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,name:e.name,pictureUrl:e.pictureUrl}}),que=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Uue=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:{}}),Bue=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}}),zue=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}}),Zue=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}}),Hue=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}}),Wue=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}}),Vue=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Kue=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}}),Gue=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}}),Yue=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Jue=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:{}}),Xue=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}}),Que=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}}),ele=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}}),tle=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}}),nle=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}}),rle=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}}),ile=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),ole=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}}),ale=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}}),sle=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}}),ule=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),lle=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),cle=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}}),fle=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}}),dle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}}),ple=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}}),hle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),mle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),yle=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:{}}),gle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),vle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}}),ble=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),_le=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),wle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),xle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Sle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}}),Ele=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}}),Ale=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}}),Cle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}}),Ole=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}}),Tle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}}),$le=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),kle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Ile=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages/by-bot`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Ple=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}}),Rle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Nle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}}),Dle=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}}),Mle=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}}),jle=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),Lle=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}}),Fle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),qle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Ule=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),Ble=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}}),zle=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Zle=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}}),Hle=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}}),Wle=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}}),Vle=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}}),Kle=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Gle=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}}),Yle=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}}),Jle=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}}),Xle=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Qle=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:{}}),ece=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),tce=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),nce=e=>({path:"/v1/admin/interfaces",headers:{},query:{},params:{},body:{name:e.name,version:e.version,events:e.events,actions:e.actions,entities:e.entities}}),rce=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),ice=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),oce=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{events:e.events,actions:e.actions,entities:e.entities}}),ace=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),sce=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),uce=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),lce=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}}),cce=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),fce=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}}),dce=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}}),pce=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}}),hce=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}}),mce=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),yce=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}}),gce=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),vce=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies}}),bce=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit},params:{},body:{}}),_ce=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}}),wce=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),xce=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}}),Sce=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}}),Ece=e=>({path:`/v1/tables/${encodeURIComponent(e.sourceTableId)}/duplicate`,headers:{},query:{},params:{sourceTableId:e.sourceTableId},body:{tableName:e.tableName,schemaOnly:e.schemaOnly,factor:e.factor}}),Ace=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}}),Cce=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}}),Oce=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),Tce=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}}),$ce=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}}),kce=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),Ice=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}}),Pce=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),Rce=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}}),Nce=class{constructor(t,n={}){R(this,"createConversation",async t=>{let{path:n,headers:r,query:i,body:o}=yue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getConversation",async t=>{let{path:n,headers:r,query:i,body:o}=gue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listConversations",async t=>{let{path:n,headers:r,query:i,body:o}=vue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getOrCreateConversation",async t=>{let{path:n,headers:r,query:i,body:o}=bue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateConversation",async t=>{let{path:n,headers:r,query:i,body:o}=_ue(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteConversation",async t=>{let{path:n,headers:r,query:i,body:o}=wue(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listParticipants",async t=>{let{path:n,headers:r,query:i,body:o}=xue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"addParticipant",async t=>{let{path:n,headers:r,query:i,body:o}=Sue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getParticipant",async t=>{let{path:n,headers:r,query:i,body:o}=Eue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"removeParticipant",async t=>{let{path:n,headers:r,query:i,body:o}=Aue(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createEvent",async t=>{let{path:n,headers:r,query:i,body:o}=Cue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getEvent",async t=>{let{path:n,headers:r,query:i,body:o}=Oue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listEvents",async t=>{let{path:n,headers:r,query:i,body:o}=Tue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createMessage",async t=>{let{path:n,headers:r,query:i,body:o}=$ue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getOrCreateMessage",async t=>{let{path:n,headers:r,query:i,body:o}=kue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Iue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Pue(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listMessages",async t=>{let{path:n,headers:r,query:i,body:o}=Rue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Nue(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createUser",async t=>{let{path:n,headers:r,query:i,body:o}=Due(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getUser",async t=>{let{path:n,headers:r,query:i,body:o}=Mue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listUsers",async t=>{let{path:n,headers:r,query:i,body:o}=jue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getOrCreateUser",async t=>{let{path:n,headers:r,query:i,body:o}=Lue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateUser",async t=>{let{path:n,headers:r,query:i,body:o}=Fue(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteUser",async t=>{let{path:n,headers:r,query:i,body:o}=que(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getState",async t=>{let{path:n,headers:r,query:i,body:o}=Uue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"setState",async t=>{let{path:n,headers:r,query:i,body:o}=Bue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getOrSetState",async t=>{let{path:n,headers:r,query:i,body:o}=zue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"patchState",async t=>{let{path:n,headers:r,query:i,body:o}=Zue(t),a=(this.props.toAxiosRequest??pe)({method:"patch",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"callAction",async t=>{let{path:n,headers:r,query:i,body:o}=Hue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"configureIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=Wue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getTask",async t=>{let{path:n,headers:r,query:i,body:o}=Vue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createTask",async t=>{let{path:n,headers:r,query:i,body:o}=Kue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateTask",async t=>{let{path:n,headers:r,query:i,body:o}=Gue(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteTask",async t=>{let{path:n,headers:r,query:i,body:o}=Yue(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listTasks",async t=>{let{path:n,headers:r,query:i,body:o}=Jue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"trackAnalytics",async t=>{let{path:n,headers:r,query:i,body:o}=Xue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"runVrl",async t=>{let{path:n,headers:r,query:i,body:o}=Que(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getAccount",async t=>{let{path:n,headers:r,query:i,body:o}=ele(),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateAccount",async t=>{let{path:n,headers:r,query:i,body:o}=tle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listPersonalAccessTokens",async t=>{let{path:n,headers:r,query:i,body:o}=nle(),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createPersonalAccessToken",async t=>{let{path:n,headers:r,query:i,body:o}=rle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deletePersonalAccessToken",async t=>{let{path:n,headers:r,query:i,body:o}=ile(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"setAccountPreference",async t=>{let{path:n,headers:r,query:i,body:o}=ole(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getAccountPreference",async t=>{let{path:n,headers:r,query:i,body:o}=ale(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listPublicIntegrations",async t=>{let{path:n,headers:r,query:i,body:o}=sle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getPublicIntegrationById",async t=>{let{path:n,headers:r,query:i,body:o}=ule(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getPublicIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=lle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createBot",async t=>{let{path:n,headers:r,query:i,body:o}=cle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateBot",async t=>{let{path:n,headers:r,query:i,body:o}=fle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"transferBot",async t=>{let{path:n,headers:r,query:i,body:o}=dle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listBots",async t=>{let{path:n,headers:r,query:i,body:o}=ple(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getBot",async t=>{let{path:n,headers:r,query:i,body:o}=hle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteBot",async t=>{let{path:n,headers:r,query:i,body:o}=mle(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getBotLogs",async t=>{let{path:n,headers:r,query:i,body:o}=yle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getBotWebchat",async t=>{let{path:n,headers:r,query:i,body:o}=gle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getBotAnalytics",async t=>{let{path:n,headers:r,query:i,body:o}=vle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getBotIssue",async t=>{let{path:n,headers:r,query:i,body:o}=ble(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listBotIssues",async t=>{let{path:n,headers:r,query:i,body:o}=_le(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteBotIssue",async t=>{let{path:n,headers:r,query:i,body:o}=wle(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listBotIssueEvents",async t=>{let{path:n,headers:r,query:i,body:o}=xle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"setWorkspacePaymentMethod",async t=>{let{path:n,headers:r,query:i,body:o}=Sle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listWorkspaceInvoices",async t=>{let{path:n,headers:r,query:i,body:o}=Ele(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getUpcomingInvoice",async t=>{let{path:n,headers:r,query:i,body:o}=Ale(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"chargeWorkspaceUnpaidInvoices",async t=>{let{path:n,headers:r,query:i,body:o}=Cle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Ole(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getPublicWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Tle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=$le(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listWorkspaceUsages",async t=>{let{path:n,headers:r,query:i,body:o}=kle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"breakDownWorkspaceUsageByBot",async t=>{let{path:n,headers:r,query:i,body:o}=Ile(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getAllWorkspaceQuotaCompletion",async t=>{let{path:n,headers:r,query:i,body:o}=Ple(),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getWorkspaceQuota",async t=>{let{path:n,headers:r,query:i,body:o}=Rle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listWorkspaceQuotas",async t=>{let{path:n,headers:r,query:i,body:o}=Nle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Dle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"checkHandleAvailability",async t=>{let{path:n,headers:r,query:i,body:o}=Mle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listWorkspaces",async t=>{let{path:n,headers:r,query:i,body:o}=jle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listPublicWorkspaces",async t=>{let{path:n,headers:r,query:i,body:o}=Lle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Fle(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getAuditRecords",async t=>{let{path:n,headers:r,query:i,body:o}=qle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listWorkspaceMembers",async t=>{let{path:n,headers:r,query:i,body:o}=Ule(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Ble(),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=zle(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Zle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Hle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listIntegrationApiKeys",async t=>{let{path:n,headers:r,query:i,body:o}=Wle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createIntegrationApiKey",async t=>{let{path:n,headers:r,query:i,body:o}=Vle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteIntegrationApiKey",async t=>{let{path:n,headers:r,query:i,body:o}=Kle(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=Gle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=Yle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listIntegrations",async t=>{let{path:n,headers:r,query:i,body:o}=Jle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=Xle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getIntegrationLogs",async t=>{let{path:n,headers:r,query:i,body:o}=Qle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getIntegrationByName",async t=>{let{path:n,headers:r,query:i,body:o}=ece(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=tce(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createInterface",async t=>{let{path:n,headers:r,query:i,body:o}=nce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getInterface",async t=>{let{path:n,headers:r,query:i,body:o}=rce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getInterfaceByName",async t=>{let{path:n,headers:r,query:i,body:o}=ice(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateInterface",async t=>{let{path:n,headers:r,query:i,body:o}=oce(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteInterface",async t=>{let{path:n,headers:r,query:i,body:o}=ace(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listInterfaces",async t=>{let{path:n,headers:r,query:i,body:o}=sce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getUsage",async t=>{let{path:n,headers:r,query:i,body:o}=uce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getMultipleUsages",async t=>{let{path:n,headers:r,query:i,body:o}=lce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listUsageHistory",async t=>{let{path:n,headers:r,query:i,body:o}=cce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"changeAISpendQuota",async t=>{let{path:n,headers:r,query:i,body:o}=fce(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listActivities",async t=>{let{path:n,headers:r,query:i,body:o}=dce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"introspect",async t=>{let{path:n,headers:r,query:i,body:o}=pce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"upsertFile",async t=>{let{path:n,headers:r,query:i,body:o}=hce(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteFile",async t=>{let{path:n,headers:r,query:i,body:o}=mce(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listFiles",async t=>{let{path:n,headers:r,query:i,body:o}=yce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getFile",async t=>{let{path:n,headers:r,query:i,body:o}=gce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateFileMetadata",async t=>{let{path:n,headers:r,query:i,body:o}=vce(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"searchFiles",async t=>{let{path:n,headers:r,query:i,body:o}=bce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listTables",async t=>{let{path:n,headers:r,query:i,body:o}=_ce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getTable",async t=>{let{path:n,headers:r,query:i,body:o}=wce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getOrCreateTable",async t=>{let{path:n,headers:r,query:i,body:o}=xce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createTable",async t=>{let{path:n,headers:r,query:i,body:o}=Sce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"duplicateTable",async t=>{let{path:n,headers:r,query:i,body:o}=Ece(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateTable",async t=>{let{path:n,headers:r,query:i,body:o}=Ace(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"renameTableColumn",async t=>{let{path:n,headers:r,query:i,body:o}=Cce(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteTable",async t=>{let{path:n,headers:r,query:i,body:o}=Oce(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getTableRow",async t=>{let{path:n,headers:r,query:i,body:o}=Tce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"findTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=$ce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=kce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Ice(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Pce(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"upsertTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Rce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});this.axiosInstance=t,this.props=n}};function he(e){var t;return qu.isAxiosError(e)&&((t=e.response)!=null&&t.data)?Mb(e.response.data):Mb(e)}var Mk=100*1024*1024,Dce=Mk,Mce=Mk,jce=class extends Nce{constructor(t={}){let n=fue(t),{apiUrl:r,headers:i,withCredentials:o,timeout:a}=n,s=qu.create({baseURL:r,headers:i,withCredentials:o,timeout:a,maxBodyLength:Dce,maxContentLength:Mce,httpAgent:kb?new nue.default.Agent({keepAlive:!0}):void 0,httpsAgent:kb?new rue.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 Mc("Cannot provide both content and URL, please provide only one of them");if(s&&(a=await qu.get(s,{responseType:"arraybuffer"}).then(d=>d.data).catch(d=>{throw new Mc(`Failed to download file from provided URL: ${d.message}`,d)})),!a)throw new Mc("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 qu.put(c.uploadUrl,l,{maxBodyLength:1/0})}catch(d){throw new Mc(`Failed to upload file: ${d.message}`,d,c)}return{file:c}});this.config=n}};const jb=Jf(Object.freeze(Object.defineProperty({__proto__:null,AlreadyExistsError:kk,BreakingChangesError:Dk,Client:jce,ForbiddenError:mk,InternalError:pk,InvalidDataFormatError:xk,InvalidIdentifierError:Sk,InvalidJsonSchemaError:wk,InvalidPayloadError:gk,InvalidQueryError:Tk,LimitExceededError:Nk,MethodNotFoundError:bk,PayloadTooLargeError:yk,PaymentRequiredError:Pk,QuotaExceededError:Rk,RateLimitedError:Ik,ReferenceConstraintError:Ak,ReferenceNotFoundError:Ok,RelationConflictError:Ek,ResourceLockedConflictError:Ck,ResourceNotFoundError:_k,RuntimeError:$k,UnauthorizedError:hk,UnknownError:Bu,UnsupportedMediaTypeError:vk,UploadFileError:Mc,axios:Ese,errorFrom:Mb,isApiError:dk},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=(N,je)=>{for(var He in je)n(N,He,{get:je[He],enumerable:!0})},l=(N,je,He,Xe)=>{if(je&&typeof je=="object"||typeof je=="function")for(let Re of i(je))!a.call(N,Re)&&Re!==He&&n(N,Re,{get:()=>je[Re],enumerable:!(Xe=r(je,Re))||Xe.enumerable});return N},c=(N,je,He)=>(l(N,je,"default"),He&&l(He,je,"default")),d=(N,je,He)=>(He=N!=null?t(o(N)):{},l(je||!N||!N.__esModule?n(He,"default",{value:N,enumerable:!0}):He,N)),p=N=>l(n({},"__esModule",{value:!0}),N),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:()=>D,webhookIdHeader:()=>P}),e.exports=p(m);var h={};s(h,{defaults:()=>F});var y={};s(y,{default:()=>b,studioComponentDefinitions:()=>_});var v=Jd;c(y,Jd);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}),q=y.z.object({videoUrl:S}),L=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:q}),y.z.object({type:y.z.literal("file"),payload:L}),y.z.object({type:y.z.literal("location"),payload:M})]),V=y.z.object({items:y.z.array(G)}),F={text:{schema:A},markdown:{schema:E},image:{schema:T},audio:{schema:j},video:{schema:q},file:{schema:L},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",D="x-bp-type",De=As,qe=console;function Me(N){if(!N.body)throw new Error("Missing body");return JSON.parse(N.body)}async function Je(N,je=8072,He=Ae){let Xe=(0,De.createServer)(async(Re,We)=>{try{let _t=await rt(Re);if(_t.path==="/health"){We.writeHead(200).end("ok");return}let Pt=await N(_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(N){var Re;let je=await Pe(N),He={};for(let We=0;We<N.rawHeaders.length;We+=2){let _t=N.rawHeaders[We].toLowerCase(),Pt=N.rawHeaders[We+1];He[_t]=Pt}let Xe=new URL(N.url??"",N.headers.host?`http://${N.headers.host}`:"http://botpress.cloud");return{body:je,path:Xe.pathname,query:Ke(Xe.search,"?"),headers:He,method:((Re=N.method)==null?void 0:Re.toUpperCase())??"GET"}}function Ke(N,je){return N.indexOf(je)===0?N.slice(je.length):N}async function Pe(N){return new Promise((je,He)=>{if(N.method!=="POST"&&N.method!=="PUT"&&N.method!=="PATCH")return je(void 0);let Xe="";N.on("data",Re=>Xe+=Re.toString()),N.on("error",Re=>He(Re)),N.on("end",()=>je(Xe))})}function Ae(N){qe.info(`Listening on port ${N}`)}c(m,y,e.exports);var Fe=jb,$e=Jd,Ze=$e.z.enum(["webhook_received","message_created","action_triggered","register","unregister","ping","create_user","create_conversation"]),lt=N=>{let je=N[Y],He=N[ne],Xe=N[ce],Re=N[P],We=N[ue],_t=Ze.parse(N[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(N){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=N,this.name=N.name,this.version=N.version,this.icon=N.icon,this.readme=N.readme,this.title=N.title,this.identifier=N.identifier,this.description=N.description,this.configuration=N.configuration,this.events=N.events,this.actions=N.actions,this.channels=N.channels,this.states=N.states,this.user=N.user,this.secrets=N.secrets,this.entities=N.entities}clone(N){return new K({...this,...N})}},de=jb,Te=class{constructor(N){R(this,"createConversation",N=>this.client.createConversation(N));R(this,"getConversation",N=>this.client.getConversation(N));R(this,"listConversations",N=>this.client.listConversations(N));R(this,"getOrCreateConversation",N=>this.client.getOrCreateConversation(N));R(this,"updateConversation",N=>this.client.updateConversation(N));R(this,"deleteConversation",N=>this.client.deleteConversation(N));R(this,"listParticipants",N=>this.client.listParticipants(N));R(this,"addParticipant",N=>this.client.addParticipant(N));R(this,"getParticipant",N=>this.client.getParticipant(N));R(this,"removeParticipant",N=>this.client.removeParticipant(N));R(this,"createEvent",N=>this.client.createEvent(N));R(this,"getEvent",N=>this.client.getEvent(N));R(this,"listEvents",N=>this.client.listEvents(N));R(this,"createMessage",N=>this.client.createMessage(N));R(this,"getOrCreateMessage",N=>this.client.getOrCreateMessage(N));R(this,"getMessage",N=>this.client.getMessage(N));R(this,"updateMessage",N=>this.client.updateMessage(N));R(this,"listMessages",N=>this.client.listMessages(N));R(this,"deleteMessage",N=>this.client.deleteMessage(N));R(this,"createUser",N=>this.client.createUser(N));R(this,"getUser",N=>this.client.getUser(N));R(this,"listUsers",N=>this.client.listUsers(N));R(this,"getOrCreateUser",N=>this.client.getOrCreateUser(N));R(this,"updateUser",N=>this.client.updateUser(N));R(this,"deleteUser",N=>this.client.deleteUser(N));R(this,"getState",N=>this.client.getState(N));R(this,"setState",N=>this.client.setState(N));R(this,"getOrSetState",N=>this.client.getOrSetState(N));R(this,"patchState",N=>this.client.patchState(N));R(this,"configureIntegration",N=>this.client.configureIntegration(N));R(this,"uploadFile",N=>this.client.uploadFile(N));R(this,"upsertFile",N=>this.client.upsertFile(N));R(this,"deleteFile",N=>this.client.deleteFile(N));R(this,"listFiles",N=>this.client.listFiles(N));R(this,"getFile",N=>this.client.getFile(N));R(this,"updateFileMetadata",N=>this.client.updateFileMetadata(N));this.client=N}},Se=d(As),et=N=>{if(process.env.BP_LOG_FORMAT==="json")return JSON.stringify({msg:Se.default.format(...N),visible_to_bot_owner:!0});{let[je,...He]=N;return Se.default.format(`[For Bot Owner] ${je}`,...He)}},Ue={forBot:()=>({info:(...N)=>{console.info(et(N))},warn:(...N)=>{console.warn(et(N))},error:(...N)=>{console.error(et(N))},debug:(...N)=>{console.debug(et(N))}})},ot=N=>async je=>{let He=lt(je.headers),Xe=new Te(new de.Client({botId:He.botId,integrationId:He.integrationId})),Re={ctx:He,req:je,client:Xe,logger:Ue,instance:N};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 ye(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,de.isApiError)(We)){let _t=new de.RuntimeError(We.message,We);return{status:_t.code,body:JSON.stringify(_t.toJSON())}}throw We}},It=async N=>{},mt=async({client:N,ctx:je,req:He,logger:Xe,instance:Re})=>{let{req:We}=Me(He);return Re.webhook({client:N,ctx:je,req:We,logger:Xe})},ie=async({client:N,ctx:je,req:He,logger:Xe,instance:Re})=>{if(!Re.register)return;let{webhookUrl:We}=Me(He);await Re.register({client:N,ctx:je,webhookUrl:We,logger:Xe})},ye=async({client:N,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:N,logger:Xe})},xe=async({client:N,ctx:je,req:He,logger:Xe,instance:Re})=>{if(!Re.createUser)return;let{tags:We}=Me(He);return await Re.createUser({ctx:je,client:N,tags:We,logger:Xe})},Be=async({client:N,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:N,channel:We,tags:_t,logger:Xe})},ct=async({ctx:N,req:je,client:He,logger:Xe,instance:Re})=>{let{conversation:We,user:_t,type:Pt,payload:Jt,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:N,conversation:We,message:bn,user:_t,type:Pt,client:He,payload:Jt,ack:async({tags:ta})=>{await He.updateMessage({id:bn.id,tags:ta})},logger:Xe})},pn=async({req:N,ctx:je,client:He,logger:Xe,instance:Re})=>{let{input:We,type:_t}=Me(N);if(!_t)throw new Error("Missing action type");let Pt=Re.actions[_t];if(!Pt)throw new Error(`Action ${_t} not found`);let Jt=await Pt({ctx:je,input:We,client:He,type:_t,logger:Xe});return{body:JSON.stringify({output:Jt})}},rn=class{constructor(N){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",N=>Je(this.handler,N));this.props=N,this.actions=N.actions,this.channels=N.channels,this.register=N.register,this.unregister=N.unregister,this.createUser=N.createUser,this.createConversation=N.createConversation,this.webhook=N.handler}},Yt=d(jb),cn=class{constructor(N){R(this,"getConversation",N=>this.client.getConversation(N));R(this,"listConversations",N=>this.client.listConversations(N));R(this,"updateConversation",N=>this.client.updateConversation(N));R(this,"deleteConversation",N=>this.client.deleteConversation(N));R(this,"listParticipants",N=>this.client.listParticipants(N));R(this,"addParticipant",N=>this.client.addParticipant(N));R(this,"getParticipant",N=>this.client.getParticipant(N));R(this,"removeParticipant",N=>this.client.removeParticipant(N));R(this,"getEvent",N=>this.client.getEvent(N));R(this,"listEvents",N=>this.client.listEvents(N));R(this,"createMessage",N=>this.client.createMessage(N));R(this,"getOrCreateMessage",N=>this.client.getOrCreateMessage(N));R(this,"getMessage",N=>this.client.getMessage(N));R(this,"updateMessage",N=>this.client.updateMessage(N));R(this,"listMessages",N=>this.client.listMessages(N));R(this,"deleteMessage",N=>this.client.deleteMessage(N));R(this,"getUser",N=>this.client.getUser(N));R(this,"listUsers",N=>this.client.listUsers(N));R(this,"updateUser",N=>this.client.updateUser(N));R(this,"deleteUser",N=>this.client.deleteUser(N));R(this,"getState",N=>this.client.getState(N).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"setState",N=>this.client.setState(N).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"getOrSetState",N=>this.client.getOrSetState(N).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"patchState",N=>this.client.patchState(N).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"callAction",N=>this.client.callAction(N));R(this,"uploadFile",N=>this.client.uploadFile(N));R(this,"upsertFile",N=>this.client.upsertFile(N));R(this,"deleteFile",N=>this.client.deleteFile(N));R(this,"listFiles",N=>this.client.listFiles(N));R(this,"getFile",N=>this.client.getFile(N));R(this,"updateFileMetadata",N=>this.client.updateFileMetadata(N));R(this,"searchFiles",N=>this.client.searchFiles(N));R(this,"createConversation",N=>this.client.createConversation(N));R(this,"getOrCreateConversation",N=>this.client.getOrCreateConversation(N));R(this,"createUser",N=>this.client.createUser(N));R(this,"getOrCreateUser",N=>this.client.getOrCreateUser(N));this.client=N}},Cn=Jd,ee=Cn.z.enum(["event_received","register","unregister","ping","action_triggered"]),ae=N=>{let je=N[Y],He=N[ue],Xe=N[D],Re=ee.parse(N[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=N=>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 Yt.Client({botId:He.botId})),Re={req:je,ctx:He,client:Xe,instance:N};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 N=>{},on=async N=>{},pt=async N=>{},Mn=async({ctx:N,req:je,client:He,instance:Xe})=>{qe.debug(`Received event ${N.type}`);let Re=Me(je),We=Re.event;switch(N.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:N,..._t})));break;case"state_expired":let Pt={state:We.payload.state};await Promise.all(Xe.stateExpiredHandlers.map(bn=>bn({client:He,ctx:N,...Pt})));break;default:let Jt={event:Re.event};await Promise.all(Xe.eventHandlers.map(bn=>bn({client:He,ctx:N,...Jt})))}},sr=class{constructor(N){R(this,"_state",{messageHandlers:[],eventHandlers:[],stateExpiredHandlers:[]});R(this,"props");R(this,"message",N=>{this._state.messageHandlers.push(N)});R(this,"event",N=>{this._state.eventHandlers.push(N)});R(this,"stateExpired",N=>{this._state.stateExpiredHandlers.push(N)});R(this,"handler",ft(this._state));R(this,"start",N=>Je(this.handler,N));this.props=N}}})(RE);var me=RE.exports;const{defaults:lo}=me.messages,Mi={className:me.z.string().describe("CSS className to apply to the message").optional()},jk=lo.audio.schema.extend({...Mi,type:me.z.literal("audio")}),Lb=lo.card.schema.extend({type:me.z.literal("card"),subtitle:me.z.string().optional(),imageUrl:me.z.string().optional(),...Mi}),Lce=Lb.omit({type:!0}),Lk=me.z.object({items:me.z.array(Lce),...Mi,type:me.z.literal("carousel")}),Fk=lo.choice.schema.extend({text:me.z.string(),...Mi,type:me.z.literal("choice"),disableFreeText:me.z.boolean().optional()}),qk=lo.dropdown.schema.extend({text:me.z.string(),...Mi,type:me.z.literal("dropdown")}),Uk=lo.file.schema.extend({...Mi,type:me.z.literal("file")}),Bk=lo.image.schema.extend({...Mi,type:me.z.literal("image")}),zk=lo.location.schema.extend({...Mi,type:me.z.literal("location")}),Zk=lo.markdown.schema.extend({...Mi,type:me.z.literal("markdown")}),Hk=lo.text.schema.extend({...Mi,type:me.z.literal("text")}),Wk=lo.video.schema.extend({...Mi,type:me.z.literal("video")}),Vk=me.z.union([jk,Lb,Lk,Fk,qk,Uk,Bk,zk,Zk,Hk,Wk]),Kk=me.z.object({type:me.z.literal("webchat_visibility"),data:me.z.object({visibility:me.z.union([me.z.literal("show"),me.z.literal("hide"),me.z.literal("toggle")])})}),Gk=me.z.object({type:me.z.literal("webchat_config"),data:me.z.object({config:me.z.record(me.z.any())})}),Yk=me.z.object({type:me.z.literal("custom"),data:me.z.object({event:me.z.record(me.z.any())})}),Jk=me.z.union([Kk,Gk,Yk]),Fce=Jk,qce=me.z.object({type:me.z.literal("message_created"),data:Vk}),Uce=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:jk,cardSchema:Lb,carouselSchema:Lk,choiceSchema:Fk,customSchema:Yk,dropdownSchema:qk,fileSchema:Uk,imageSchema:Bk,locationSchema:zk,markdownSchema:Zk,messageCreatedSchema:qce,messageSchema:Vk,textSchema:Hk,triggerSchema:Jk,triggerSignalSchema:Fce,videoSchema:Wk,webchatConfigSchema:Gk,webchatVisibilitySchema:Kk},Symbol.toStringTag,{value:"Module"})),co=me.z.object({className:me.z.string().optional(),avatarUrl:me.z.string().url().optional()}),Xk=co.extend({type:me.z.literal("audio"),audio:me.z.string(),title:me.z.string().optional()}),Bce=me.z.union([me.z.object({title:me.z.string(),action:me.z.literal("Say something"),text:me.z.string()}),me.z.object({title:me.z.string(),action:me.z.literal("Open URL"),url:me.z.string()}),me.z.object({title:me.z.string(),action:me.z.literal("Postback"),payload:me.z.string()})]),Fb=co.extend({type:me.z.literal("card"),title:me.z.string(),subtitle:me.z.string().optional(),image:me.z.string().optional(),actions:me.z.array(Bce)}),Qk=co.extend({type:me.z.literal("carousel"),items:me.z.array(Fb)}),eI=co.extend({type:me.z.literal("dropdown"),message:me.z.string().optional(),options:me.z.array(me.z.object({label:me.z.string(),value:me.z.string()})),allowCreation:me.z.boolean().optional(),placeholderText:me.z.string().optional(),allowMultiple:me.z.boolean().optional(),buttonText:me.z.string().optional(),width:me.z.number().optional(),displayInKeyboard:me.z.boolean().optional(),markdown:me.z.boolean().optional(),text:me.z.string().optional()}),tI=co.extend({type:me.z.literal("file"),file:me.z.string(),title:me.z.string().optional()}),nI=co.extend({type:me.z.literal("image"),image:me.z.string()}),rI=co.extend({type:me.z.literal("location"),latitude:me.z.number(),longitude:me.z.number(),address:me.z.string().optional(),title:me.z.string().optional()}),iI=co.extend({type:me.z.literal("single-choice"),text:me.z.string(),disableFreeText:me.z.boolean().optional(),choices:me.z.array(me.z.object({title:me.z.string(),value:me.z.string()}))}),oI=co.extend({type:me.z.literal("text"),text:me.z.string(),markdown:me.z.boolean().optional()}),aI=co.extend({type:me.z.literal("video"),video:me.z.string(),title:me.z.string().optional()}),sI=me.z.object({type:me.z.literal("quick_reply"),text:me.z.string(),payload:me.z.string().optional()}),vh=me.z.union([Xk,Fb,Qk,eI,tI,nI,rI,iI,oI,aI,sI]),uI=me.z.object({type:me.z.literal("webchat-visibility"),visibility:me.z.union([me.z.literal("show"),me.z.literal("hide"),me.z.literal("toggle")])}),lI=me.z.object({type:me.z.literal("webchat-config"),config:me.z.record(me.z.any())}),cI=me.z.object({type:me.z.literal("custom-event"),event:me.z.record(me.z.any())}),fI=me.z.union([uI,lI,cI]),zce=me.z.object({type:me.z.literal("trigger"),trigger:fI}),Zce=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:Xk,cardSchema:Fb,carouselSchame:Qk,customEventSchema:cI,dropdownSchema:eI,fileSchema:tI,imageSchema:nI,locationSchema:rI,messageSchema:vh,messageSignalSchema:vh,quickReplySchema:sI,singleChoiceSchema:iI,textSchema:oI,triggerSchema:fI,triggerSignalSchema:zce,videoSchema:aI,webchatConfigSchema:lI,webchatVisibilitySchema:uI},Symbol.toStringTag,{value:"Module"})),dI=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(Hce)}),Hce=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}`)}},pI=e=>({...e,type:"audio",audio:e.audioUrl}),hI=e=>dI(e),mI=e=>({...e,type:"carousel",items:e.items.map(dI)}),yI=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),gI=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),vI=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),bI=e=>({...e,type:"image",image:e.imageUrl}),_I=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),wI=e=>({...e,type:"text",text:e.markdown,markdown:!0}),xI=e=>({...e,type:"text",text:e.text,markdown:!0}),SI=e=>({...e,type:"video",video:e.videoUrl}),Wce=e=>{switch(e.type){case"audio":return pI(e);case"card":return hI(e);case"carousel":return mI(e);case"choice":return yI(e);case"dropdown":return gI(e);case"file":return vI(e);case"image":return bI(e);case"location":return _I(e);case"markdown":return wI(e);case"text":return xI(e);case"video":return SI(e);default:throw new Error("Unsuported message type")}},EI=e=>({type:"webchat-visibility",visibility:e.data.visibility}),AI=e=>({type:"webchat-config",config:e.data.config}),CI=e=>({type:"custom-event",event:e.data.event}),Vce=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:pI,cardAdapter:hI,carouselAdapter:mI,choiceAdapter:yI,customAdapter:CI,dropdownAdapter:gI,fileAdapter:vI,imageAdapter:bI,locationAdapter:_I,markdownAdapter:wI,messageAdapter:Wce,textAdapter:xI,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return EI(e);case"webchat_config":return AI(e);case"custom":return CI(e);default:throw new Error("unknown trigger type")}},videoAdapter:SI,webchatConfigAdapter:AI,webchatVisibilityAdapter:EI},Symbol.toStringTag,{value:"Module"})),OI=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map(Kce)}),Kce=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")}},Gce=e=>({...e,type:"audio",audioUrl:e.audio}),Yce=e=>OI(e),Jce=e=>({...e,type:"carousel",items:e.items.map(OI)}),Xce=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),Qce=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),efe=e=>({...e,type:"image",imageUrl:e.image}),tfe=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),nfe=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),rfe=e=>({...e,type:"text",text:e.text}),ife=e=>({...e,type:"video",videoUrl:e.video}),ofe=e=>({...e,type:"text",text:e.text??e.payload}),afe=Object.freeze(Object.defineProperty({__proto__:null,messaging:Zce,messagingToWebChat:Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return Gce(e);case"card":return Yce(e);case"carousel":return Jce(e);case"dropdown":return Xce(e);case"file":return Qce(e);case"image":return efe(e);case"location":return tfe(e);case"single-choice":return nfe(e);case"text":return rfe(e);case"video":return ife(e);case"quick_reply":return ofe(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),webchat:Uce,webchatToMessaging:Vce},Symbol.toStringTag,{value:"Module"}));let bh;const sfe=new Uint8Array(16);function ufe(){if(!bh&&(bh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bh(sfe)}const pr=[];for(let e=0;e<256;++e)pr.push((e+256).toString(16).slice(1));function lfe(e,t=0){return pr[e[t+0]]+pr[e[t+1]]+pr[e[t+2]]+pr[e[t+3]]+"-"+pr[e[t+4]]+pr[e[t+5]]+"-"+pr[e[t+6]]+pr[e[t+7]]+"-"+pr[e[t+8]]+pr[e[t+9]]+"-"+pr[e[t+10]]+pr[e[t+11]]+pr[e[t+12]]+pr[e[t+13]]+pr[e[t+14]]+pr[e[t+15]]}const TI={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function cfe(e,t,n){if(TI.randomUUID&&!t&&!e)return TI.randomUUID();e=e||{};const r=e.random||(e.rng||ufe)();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 lfe(r)}const _h=e=>({block:e,type:"bubble"}),ffe=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},$I=({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(ffe)}),{type:"column",horizontalAlignment:"center",blocks:[...i]}},dfe=({choices:e,text:t})=>{const n=cfe(),r=_h({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}))}]}},pfe=({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}},kI=({type:e,audio:t})=>({payload:{type:e,url:t}}),II=e=>({payload:_h($I(e))}),PI=({items:e})=>({payload:{type:"carousel",blocks:e.map($I)}}),RI=e=>({disableInput:e.disableFreeText,payload:dfe(e)}),NI=e=>({disableInput:!0,payload:_h(pfe(e))}),DI=({file:e,...t})=>({payload:{url:e,...t}}),MI=({type:e,image:t})=>({payload:{type:e,url:t}}),jI=({type:e,latitude:t,longitude:n,title:r,address:i})=>({payload:{type:e,latitude:t,longitude:n,title:r??i??"View on map"}}),hfe=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),qb=({type:e,text:t})=>({payload:_h({type:e,text:t})}),LI=({type:e,video:t})=>({payload:{type:e,url:t}}),FI=e=>{switch(e.type){case"audio":return kI(e);case"card":return II(e);case"carousel":return PI(e);case"single-choice":return RI(e);case"dropdown":return NI(e);case"file":return DI(e);case"image":return MI(e);case"location":return jI(e);case"quick_reply":return hfe(e);case"text":return qb(e);case"video":return LI(e);default:throw new Error("Unsuported message type")}},{webchatToMessaging:ji}=afe,mfe=e=>{const t=ji.audioAdapter(e);return kI(t)},yfe=e=>{const t=ji.cardAdapter(e);return II(t)},gfe=e=>{const t=ji.carouselAdapter(e);return PI(t)},vfe=e=>{const t=ji.choiceAdapter(e);return RI(t)},bfe=e=>{const t=ji.dropdownAdapter(e);return NI(t)},_fe=e=>{const t=ji.fileAdapter(e);return DI(t)},wfe=e=>{const t=ji.imageAdapter(e);return MI(t)},xfe=e=>{const t=ji.locationAdapter(e);return jI(t)},Sfe=e=>{const t=ji.markdownAdapter(e);return qb(t)},Efe=e=>{const t=ji.textAdapter(e);return qb(t)},Afe=e=>{const t=ji.videoAdapter(e);return LI(t)},Cfe=e=>{switch(e.type){case"audio":return mfe(e);case"card":return yfe(e);case"carousel":return gfe(e);case"choice":return vfe(e);case"dropdown":return bfe(e);case"file":return _fe(e);case"image":return wfe(e);case"location":return xfe(e);case"markdown":return Sfe(e);case"text":return Efe(e);case"video":return Afe(e);default:throw new Error("Unsuported message type")}};class Ofe{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 YS.MessagingSocket(t),this.emitter=new ig,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=vh.parse(r),{payload:o,disableInput:a}=FI(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=vh.parse(r.payload),{payload:o,disableInput:a}=FI(i);return{...r,payload:o,disableInput:a}})}}function qI(e,t){return function(){return e.apply(t,arguments)}}const{toString:UI}=Object.prototype,{getPrototypeOf:Ub}=Object,Bb=(e=>t=>{const n=UI.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Fo=e=>(e=e.toLowerCase(),t=>Bb(t)===e),wh=e=>t=>typeof t===e,{isArray:zu}=Array,jc=wh("undefined");function Tfe(e){return e!==null&&!jc(e)&&e.constructor!==null&&!jc(e.constructor)&&Cs(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const BI=Fo("ArrayBuffer");function $fe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&BI(e.buffer),t}const kfe=wh("string"),Cs=wh("function"),zI=wh("number"),zb=e=>e!==null&&typeof e=="object",Ife=e=>e===!0||e===!1,xh=e=>{if(Bb(e)!=="object")return!1;const t=Ub(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Pfe=Fo("Date"),Rfe=Fo("File"),Nfe=Fo("Blob"),Dfe=Fo("FileList"),Mfe=e=>zb(e)&&Cs(e.pipe),jfe=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||UI.call(e)===t||Cs(e.toString)&&e.toString()===t)},Lfe=Fo("URLSearchParams"),Ffe=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 ZI(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 HI=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),WI=e=>!jc(e)&&e!==HI;function Zb(){const{caseless:e}=WI(this)&&this||{},t={},n=(r,i)=>{const o=e&&ZI(t,i)||i;xh(t[o])&&xh(r)?t[o]=Zb(t[o],r):xh(r)?t[o]=Zb({},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 qfe=(e,t,n,{allOwnKeys:r}={})=>(Lc(t,(i,o)=>{n&&Cs(i)?e[o]=qI(i,n):e[o]=i},{allOwnKeys:r}),e),Ufe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Bfe=(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)},zfe=(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&&Ub(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Zfe=(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},Hfe=e=>{if(!e)return null;if(zu(e))return e;let t=e.length;if(!zI(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Wfe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ub(Uint8Array)),Vfe=(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])}},Kfe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Gfe=Fo("HTMLFormElement"),Yfe=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),VI=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Jfe=Fo("RegExp"),KI=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Lc(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},ve={isArray:zu,isArrayBuffer:BI,isBuffer:Tfe,isFormData:jfe,isArrayBufferView:$fe,isString:kfe,isNumber:zI,isBoolean:Ife,isObject:zb,isPlainObject:xh,isUndefined:jc,isDate:Pfe,isFile:Rfe,isBlob:Nfe,isRegExp:Jfe,isFunction:Cs,isStream:Mfe,isURLSearchParams:Lfe,isTypedArray:Wfe,isFileList:Dfe,forEach:Lc,merge:Zb,extend:qfe,trim:Ffe,stripBOM:Ufe,inherits:Bfe,toFlatObject:zfe,kindOf:Bb,kindOfTest:Fo,endsWith:Zfe,toArray:Hfe,forEachEntry:Vfe,matchAll:Kfe,isHTMLForm:Gfe,hasOwnProperty:VI,hasOwnProp:VI,reduceDescriptors:KI,freezeMethods:e=>{KI(e,(t,n)=>{if(Cs(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Cs(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:Yfe,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:ZI,global:HI,isContextDefined:WI,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(zb(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)}ve.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:ve.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const GI=nn.prototype,YI={};["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=>{YI[e]={value:e}}),Object.defineProperties(nn,YI),Object.defineProperty(GI,"isAxiosError",{value:!0}),nn.from=(e,t,n,r,i,o)=>{const a=Object.create(GI);return ve.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 Xfe=typeof self=="object"?self.FormData:window.FormData;const Qfe=Oo(Xfe);function Hb(e){return ve.isPlainObject(e)||ve.isArray(e)}function JI(e){return ve.endsWith(e,"[]")?e.slice(0,-2):e}function XI(e,t,n){return e?e.concat(t).map(function(i,o){return i=JI(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function ede(e){return ve.isArray(e)&&!e.some(Hb)}const tde=ve.toFlatObject(ve,{},null,function(t){return/^is[A-Z]/.test(t)});function nde(e){return e&&ve.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Sh(e,t,n){if(!ve.isObject(e))throw new TypeError("target must be an object");t=t||new(Qfe||FormData),n=ve.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!ve.isUndefined(w[v])});const r=n.metaTokens,i=n.visitor||d,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&nde(t);if(!ve.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(ve.isDate(y))return y.toISOString();if(!l&&ve.isBlob(y))throw new nn("Blob is not supported. Use a Buffer instead.");return ve.isArrayBuffer(y)||ve.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(ve.endsWith(v,"{}"))v=r?v:v.slice(0,-2),y=JSON.stringify(y);else if(ve.isArray(y)&&ede(y)||ve.isFileList(y)||ve.endsWith(v,"[]")&&(_=ve.toArray(y)))return v=JI(v),_.forEach(function(S,A){!(ve.isUndefined(S)||S===null)&&t.append(a===!0?XI([v],A,o):a===null?v:v+"[]",c(S))}),!1}return Hb(y)?!0:(t.append(XI(w,v,o),c(y)),!1)}const p=[],m=Object.assign(tde,{defaultVisitor:d,convertValue:c,isVisitable:Hb});function h(y,v){if(!ve.isUndefined(y)){if(p.indexOf(y)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(y),ve.forEach(y,function(_,b){(!(ve.isUndefined(_)||_===null)&&i.call(t,_,ve.isString(b)?b.trim():b,v,m))===!0&&h(_,v?v.concat(b):[b])}),p.pop()}}if(!ve.isObject(e))throw new TypeError("data must be an object");return h(e),t}function QI(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Wb(e,t){this._pairs=[],e&&Sh(e,this,t)}const eP=Wb.prototype;eP.append=function(t,n){this._pairs.push([t,n])},eP.toString=function(t){const n=t?function(r){return t.call(this,r,QI)}:QI;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function rde(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tP(e,t,n){if(!t)return e;const r=n&&n.encode||rde,i=n&&n.serialize;let o;if(i?o=i(t,n):o=ve.isURLSearchParams(t)?t.toString():new Wb(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){ve.forEach(this.handlers,function(r){r!==null&&t(r)})}}const nP=ide,rP={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ode=typeof URLSearchParams<"u"?URLSearchParams:Wb,ade=FormData,sde=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),ude=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),fo={isBrowser:!0,classes:{URLSearchParams:ode,FormData:ade,Blob},isStandardBrowserEnv:sde,isStandardBrowserWebWorkerEnv:ude,protocols:["http","https","file","blob","url","data"]};function lde(e,t){return Sh(e,new fo.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return fo.isNode&&ve.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function cde(e){return ve.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function fde(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 iP(e){function t(n,r,i,o){let a=n[o++];const s=Number.isFinite(+a),l=o>=n.length;return a=!a&&ve.isArray(i)?i.length:a,l?(ve.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!ve.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&ve.isArray(i[a])&&(i[a]=fde(i[a])),!s)}if(ve.isFormData(e)&&ve.isFunction(e.entries)){const n={};return ve.forEachEntry(e,(r,i)=>{t(cde(r),i,n,0)}),n}return null}const dde={"Content-Type":void 0};function pde(e,t,n){if(ve.isString(e))try{return(t||JSON.parse)(e),ve.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Eh={transitional:rP,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=ve.isObject(t);if(o&&ve.isHTMLForm(t)&&(t=new FormData(t)),ve.isFormData(t))return i&&i?JSON.stringify(iP(t)):t;if(ve.isArrayBuffer(t)||ve.isBuffer(t)||ve.isStream(t)||ve.isFile(t)||ve.isBlob(t))return t;if(ve.isArrayBufferView(t))return t.buffer;if(ve.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 lde(t,this.formSerializer).toString();if((s=ve.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Sh(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),pde(t)):t}],transformResponse:[function(t){const n=this.transitional||Eh.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&ve.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, */*"}}};ve.forEach(["delete","get","head"],function(t){Eh.headers[t]={}}),ve.forEach(["post","put","patch"],function(t){Eh.headers[t]=ve.merge(dde)});const Vb=Eh,hde=ve.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"]),mde=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
189
|
+
`+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(F){Mn={};for(var sr=0;sr<pt.length;sr++)Mn["$"+pt[sr]]=pt[sr]}for(var N in ee)K(ee,N)&&(ft&&String(Number(N))===N&&N<ee.length||F&&Mn["$"+N]instanceof Symbol||(q.call(/[^\w$]/,N)?At.push(ae(N,ee)+": "+ae(ee[N],ee)):At.push(N+": "+ae(ee[N],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}}),Kse=Xn((e,t)=>{var n=Rb(),r=Hse(),i=Vse(),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}}),Nb=Xn((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}}),fk=Xn((e,t)=>{var n=Nb(),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 q=b[j];q&&typeof q=="object"&&T&&typeof T=="object"?b[j]=_(q,T,A):b.push(T)}else b[j]=T}),b):Object.keys(S).reduce(function(T,j){var q=S[j];return r.call(T,j)?T[j]=_(T[j],q,A):T[j]=q,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="",q=0;q<T.length;++q){var L=T.charCodeAt(q);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||E===n.RFC1738&&(L===40||L===41)){j+=T.charAt(q);continue}if(L<128){j=j+o[L];continue}if(L<2048){j=j+(o[192|L>>6]+o[128|L&63]);continue}if(L<55296||L>=57344){j=j+(o[224|L>>12]+o[128|L>>6&63]+o[128|L&63]);continue}q+=1,L=65536+((L&1023)<<10|T.charCodeAt(q)&1023),j+=o[240|L>>18]+o[128|L>>12&63]+o[128|L>>6&63]+o[128|L&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),q=0;q<j.length;++q){var L=j[q],M=T[L];typeof M=="object"&&M!==null&&S.indexOf(M)===-1&&(b.push({obj:T,prop:L}),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}}),Gse=Xn((e,t)=>{var n=Kse(),r=fk(),i=Nb(),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,q,L,M,H,re,Q,G,V,F,Y,ne){for(var ce=S,P=ne,ue=0,Oe=!1;(P=P.get(v))!==void 0&&!Oe;){var D=P.get(S);if(ue+=1,typeof D<"u"){if(D===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(de){return de instanceof Date?Q(de):de})),ce===null){if(j)return L&&!F?L(A,h.encoder,Y,"key",G):A;ce=""}if(y(ce)||r.isBuffer(ce)){if(L){var De=F?A:L(A,h.encoder,Y,"key",G);if(E==="comma"&&F){for(var qe=l.call(String(ce),","),Me="",Je=0;Je<qe.length;++Je)Me+=(Je===0?"":",")+V(L(qe[Je],h.encoder,Y,"value",G));return[V(De)+(T&&s(ce)&&qe.length===1?"[]":"")+"="+Me]}return[V(De)+"="+V(L(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(!(q&&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,q,L,M,H,re,Q,G,V,F,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 q=[];if(typeof A!="object"||A===null)return"";var L;S&&S.arrayFormat in a?L=S.arrayFormat:S&&"indices"in S?L=S.indices?"indices":"repeat":L="indices";var M=a[L];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(q,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=q.join(E.delimiter),F=E.addQueryPrefix===!0?"?":"";return E.charsetSentinel&&(E.charset==="iso-8859-1"?F+="utf8=%26%2310003%3B&":F+="utf8=%E2%9C%93&"),V.length>0?F+V:""}}),Yse=Xn((e,t)=>{var n=fk(),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],q=j.indexOf("]="),L=q===-1?j.indexOf("="):q+1,M,H;L===-1?(M=v.decoder(j,o.decoder,T,"key"),H=v.strictNullHandling?null:""):(M=v.decoder(j.slice(0,L),o.decoder,T,"key"),H=n.maybeMap(s(j.slice(L+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 q=0;w.depth>0&&(E=A.exec(b))!==null&&q<w.depth;){if(q+=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)}}),Jse=Xn((e,t)=>{var n=Gse(),r=Yse(),i=Nb();t.exports={formats:i,parse:r,stringify:n}}),Xse={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Db=typeof window<"u"&&typeof window.document<"u"?window.crypto:mb;Db.getRandomValues||(Db=Xse);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(Db.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"}},Qse=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,dk=e=>e instanceof xn||Qse(e)&&e.isApiError===!0,Bu=class extends xn{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}},pk=class extends xn{constructor(e,t,n){super(500,"An internal error occurred","Internal",e,t,n)}},hk=class extends xn{constructor(e,t,n){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n)}},mk=class extends xn{constructor(e,t,n){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n)}},yk=class extends xn{constructor(e,t,n){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n)}},gk=class extends xn{constructor(e,t,n){super(400,"The request payload is invalid.","InvalidPayload",e,t,n)}},vk=class extends xn{constructor(e,t,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n)}},bk=class extends xn{constructor(e,t,n){super(405,"The requested method does not exist.","MethodNotFound",e,t,n)}},_k=class extends xn{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}},wk=class extends xn{constructor(e,t,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n)}},xk=class extends xn{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}},Sk=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)}},Ek=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)}},Ak=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)}},Ck=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)}},Ok=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)}},Tk=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)}},$k=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)}},kk=class extends xn{constructor(e,t,n){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,n)}},Ik=class extends xn{constructor(e,t,n){super(429,"The request has been rate limited.","RateLimited",e,t,n)}},Pk=class extends xn{constructor(e,t,n){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n)}},Rk=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)}},Nk=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)}},Dk=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)}},eue={Unknown:Bu,Internal:pk,Unauthorized:hk,Forbidden:mk,PayloadTooLarge:yk,InvalidPayload:gk,UnsupportedMediaType:vk,MethodNotFound:bk,ResourceNotFound:_k,InvalidJsonSchema:wk,InvalidDataFormat:xk,InvalidIdentifier:Sk,RelationConflict:Ek,ReferenceConstraint:Ak,ResourceLockedConflict:Ck,ReferenceNotFound:Ok,InvalidQuery:Tk,Runtime:$k,AlreadyExists:kk,RateLimited:Ik,PaymentRequired:Pk,QuotaExceeded:Rk,LimitExceeded:Nk,BreakingChanges:Dk},Mb=e=>dk(e)?e:e instanceof Error?new Bu(e.message,e):typeof e=="string"?new Bu(e):tue(e);function tue(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=eue[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Bu(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Bu("An invalid error occurred: "+JSON.stringify(e))}var Mc=class extends Error{constructor(t,n,r){super(t),this.innerError=n,this.file=r,this.name="FileUploadError"}},nue=Ib(jse()),rue=Ib(Lse()),iue="https://api.botpress.cloud",oue=6e4,aue="BP_API_URL",sue="BP_BOT_ID",uue="BP_INTEGRATION_ID",lue="BP_WORKSPACE_ID",cue="BP_TOKEN";function fue(e){let t=due(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??iue,i=t.timeout??oue;return{apiUrl:r,timeout:i,withCredentials:lk,headers:n}}function due(e){return lk?e:kb?pue(e):e}function pue(e){let t={...e,apiUrl:e.apiUrl??process.env[aue],botId:e.botId??process.env[sue],integrationId:e.integrationId??process.env[uue],workspaceId:e.workspaceId??process.env[lue]},n=t.token??process.env[cue];return n&&(t.token=n),t}var hue=Ib(Jse()),mue=e=>e[1]!==void 0,pe=e=>{let{method:t,path:n,query:r,headers:i,body:o}=e,a=Object.entries(i).filter(mue),s=Object.fromEntries(a),l=hue.default.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),c=l?[n,l].join("?"):n;return{method:t,url:c,headers:s,data:o}},yue=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),gue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),vue=e=>({path:"/v1/chat/conversations",headers:{},query:{nextToken:e.nextToken,tags:e.tags,participantIds:e.participantIds,integrationName:e.integrationName},params:{},body:{}}),bue=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),_ue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}}),wue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),xue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Sue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}}),Eue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),Aue=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),Cue=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}}),Oue=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Tue=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:{}}),$ue=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}}),kue=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}}),Iue=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Pue=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}}),Rue=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),Nue=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Due=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),Mue=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),jue=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),Lue=e=>({path:"/v1/chat/users/get-or-create",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),Fue=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,name:e.name,pictureUrl:e.pictureUrl}}),que=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Uue=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:{}}),Bue=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}}),zue=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}}),Zue=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}}),Hue=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}}),Wue=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}}),Vue=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Kue=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}}),Gue=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}}),Yue=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Jue=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:{}}),Xue=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}}),Que=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}}),ele=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}}),tle=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}}),nle=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}}),rle=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}}),ile=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),ole=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}}),ale=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}}),sle=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}}),ule=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),lle=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),cle=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}}),fle=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}}),dle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}}),ple=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}}),hle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),mle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),yle=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:{}}),gle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),vle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}}),ble=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),_le=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),wle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),xle=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Sle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}}),Ele=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}}),Ale=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}}),Cle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}}),Ole=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}}),Tle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}}),$le=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),kle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Ile=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages/by-bot`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Ple=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}}),Rle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Nle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}}),Dle=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}}),Mle=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}}),jle=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),Lle=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}}),Fle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),qle=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Ule=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),Ble=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}}),zle=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Zle=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}}),Hle=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}}),Wle=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}}),Vle=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}}),Kle=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Gle=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}}),Yle=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}}),Jle=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}}),Xle=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Qle=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:{}}),ece=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),tce=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),nce=e=>({path:"/v1/admin/interfaces",headers:{},query:{},params:{},body:{name:e.name,version:e.version,events:e.events,actions:e.actions,entities:e.entities}}),rce=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),ice=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),oce=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{events:e.events,actions:e.actions,entities:e.entities}}),ace=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),sce=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),uce=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),lce=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}}),cce=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),fce=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}}),dce=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}}),pce=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}}),hce=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}}),mce=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),yce=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}}),gce=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),vce=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies}}),bce=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit},params:{},body:{}}),_ce=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}}),wce=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),xce=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}}),Sce=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}}),Ece=e=>({path:`/v1/tables/${encodeURIComponent(e.sourceTableId)}/duplicate`,headers:{},query:{},params:{sourceTableId:e.sourceTableId},body:{tableName:e.tableName,schemaOnly:e.schemaOnly,factor:e.factor}}),Ace=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}}),Cce=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}}),Oce=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),Tce=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}}),$ce=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}}),kce=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),Ice=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}}),Pce=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),Rce=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}}),Nce=class{constructor(t,n={}){R(this,"createConversation",async t=>{let{path:n,headers:r,query:i,body:o}=yue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getConversation",async t=>{let{path:n,headers:r,query:i,body:o}=gue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listConversations",async t=>{let{path:n,headers:r,query:i,body:o}=vue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getOrCreateConversation",async t=>{let{path:n,headers:r,query:i,body:o}=bue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateConversation",async t=>{let{path:n,headers:r,query:i,body:o}=_ue(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteConversation",async t=>{let{path:n,headers:r,query:i,body:o}=wue(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listParticipants",async t=>{let{path:n,headers:r,query:i,body:o}=xue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"addParticipant",async t=>{let{path:n,headers:r,query:i,body:o}=Sue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getParticipant",async t=>{let{path:n,headers:r,query:i,body:o}=Eue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"removeParticipant",async t=>{let{path:n,headers:r,query:i,body:o}=Aue(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createEvent",async t=>{let{path:n,headers:r,query:i,body:o}=Cue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getEvent",async t=>{let{path:n,headers:r,query:i,body:o}=Oue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listEvents",async t=>{let{path:n,headers:r,query:i,body:o}=Tue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createMessage",async t=>{let{path:n,headers:r,query:i,body:o}=$ue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getOrCreateMessage",async t=>{let{path:n,headers:r,query:i,body:o}=kue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Iue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Pue(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listMessages",async t=>{let{path:n,headers:r,query:i,body:o}=Rue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteMessage",async t=>{let{path:n,headers:r,query:i,body:o}=Nue(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createUser",async t=>{let{path:n,headers:r,query:i,body:o}=Due(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getUser",async t=>{let{path:n,headers:r,query:i,body:o}=Mue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listUsers",async t=>{let{path:n,headers:r,query:i,body:o}=jue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getOrCreateUser",async t=>{let{path:n,headers:r,query:i,body:o}=Lue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateUser",async t=>{let{path:n,headers:r,query:i,body:o}=Fue(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteUser",async t=>{let{path:n,headers:r,query:i,body:o}=que(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getState",async t=>{let{path:n,headers:r,query:i,body:o}=Uue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"setState",async t=>{let{path:n,headers:r,query:i,body:o}=Bue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getOrSetState",async t=>{let{path:n,headers:r,query:i,body:o}=zue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"patchState",async t=>{let{path:n,headers:r,query:i,body:o}=Zue(t),a=(this.props.toAxiosRequest??pe)({method:"patch",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"callAction",async t=>{let{path:n,headers:r,query:i,body:o}=Hue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"configureIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=Wue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getTask",async t=>{let{path:n,headers:r,query:i,body:o}=Vue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createTask",async t=>{let{path:n,headers:r,query:i,body:o}=Kue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateTask",async t=>{let{path:n,headers:r,query:i,body:o}=Gue(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteTask",async t=>{let{path:n,headers:r,query:i,body:o}=Yue(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listTasks",async t=>{let{path:n,headers:r,query:i,body:o}=Jue(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"trackAnalytics",async t=>{let{path:n,headers:r,query:i,body:o}=Xue(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"runVrl",async t=>{let{path:n,headers:r,query:i,body:o}=Que(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getAccount",async t=>{let{path:n,headers:r,query:i,body:o}=ele(),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateAccount",async t=>{let{path:n,headers:r,query:i,body:o}=tle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listPersonalAccessTokens",async t=>{let{path:n,headers:r,query:i,body:o}=nle(),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createPersonalAccessToken",async t=>{let{path:n,headers:r,query:i,body:o}=rle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deletePersonalAccessToken",async t=>{let{path:n,headers:r,query:i,body:o}=ile(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"setAccountPreference",async t=>{let{path:n,headers:r,query:i,body:o}=ole(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getAccountPreference",async t=>{let{path:n,headers:r,query:i,body:o}=ale(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listPublicIntegrations",async t=>{let{path:n,headers:r,query:i,body:o}=sle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getPublicIntegrationById",async t=>{let{path:n,headers:r,query:i,body:o}=ule(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getPublicIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=lle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createBot",async t=>{let{path:n,headers:r,query:i,body:o}=cle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateBot",async t=>{let{path:n,headers:r,query:i,body:o}=fle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"transferBot",async t=>{let{path:n,headers:r,query:i,body:o}=dle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listBots",async t=>{let{path:n,headers:r,query:i,body:o}=ple(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getBot",async t=>{let{path:n,headers:r,query:i,body:o}=hle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteBot",async t=>{let{path:n,headers:r,query:i,body:o}=mle(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getBotLogs",async t=>{let{path:n,headers:r,query:i,body:o}=yle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getBotWebchat",async t=>{let{path:n,headers:r,query:i,body:o}=gle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getBotAnalytics",async t=>{let{path:n,headers:r,query:i,body:o}=vle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getBotIssue",async t=>{let{path:n,headers:r,query:i,body:o}=ble(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listBotIssues",async t=>{let{path:n,headers:r,query:i,body:o}=_le(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteBotIssue",async t=>{let{path:n,headers:r,query:i,body:o}=wle(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listBotIssueEvents",async t=>{let{path:n,headers:r,query:i,body:o}=xle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"setWorkspacePaymentMethod",async t=>{let{path:n,headers:r,query:i,body:o}=Sle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listWorkspaceInvoices",async t=>{let{path:n,headers:r,query:i,body:o}=Ele(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getUpcomingInvoice",async t=>{let{path:n,headers:r,query:i,body:o}=Ale(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"chargeWorkspaceUnpaidInvoices",async t=>{let{path:n,headers:r,query:i,body:o}=Cle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Ole(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getPublicWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Tle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=$le(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listWorkspaceUsages",async t=>{let{path:n,headers:r,query:i,body:o}=kle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"breakDownWorkspaceUsageByBot",async t=>{let{path:n,headers:r,query:i,body:o}=Ile(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getAllWorkspaceQuotaCompletion",async t=>{let{path:n,headers:r,query:i,body:o}=Ple(),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getWorkspaceQuota",async t=>{let{path:n,headers:r,query:i,body:o}=Rle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listWorkspaceQuotas",async t=>{let{path:n,headers:r,query:i,body:o}=Nle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Dle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"checkHandleAvailability",async t=>{let{path:n,headers:r,query:i,body:o}=Mle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listWorkspaces",async t=>{let{path:n,headers:r,query:i,body:o}=jle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listPublicWorkspaces",async t=>{let{path:n,headers:r,query:i,body:o}=Lle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteWorkspace",async t=>{let{path:n,headers:r,query:i,body:o}=Fle(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getAuditRecords",async t=>{let{path:n,headers:r,query:i,body:o}=qle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listWorkspaceMembers",async t=>{let{path:n,headers:r,query:i,body:o}=Ule(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Ble(),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=zle(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Zle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateWorkspaceMember",async t=>{let{path:n,headers:r,query:i,body:o}=Hle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listIntegrationApiKeys",async t=>{let{path:n,headers:r,query:i,body:o}=Wle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createIntegrationApiKey",async t=>{let{path:n,headers:r,query:i,body:o}=Vle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteIntegrationApiKey",async t=>{let{path:n,headers:r,query:i,body:o}=Kle(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=Gle(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=Yle(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listIntegrations",async t=>{let{path:n,headers:r,query:i,body:o}=Jle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=Xle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getIntegrationLogs",async t=>{let{path:n,headers:r,query:i,body:o}=Qle(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getIntegrationByName",async t=>{let{path:n,headers:r,query:i,body:o}=ece(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteIntegration",async t=>{let{path:n,headers:r,query:i,body:o}=tce(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createInterface",async t=>{let{path:n,headers:r,query:i,body:o}=nce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getInterface",async t=>{let{path:n,headers:r,query:i,body:o}=rce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getInterfaceByName",async t=>{let{path:n,headers:r,query:i,body:o}=ice(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateInterface",async t=>{let{path:n,headers:r,query:i,body:o}=oce(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteInterface",async t=>{let{path:n,headers:r,query:i,body:o}=ace(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listInterfaces",async t=>{let{path:n,headers:r,query:i,body:o}=sce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getUsage",async t=>{let{path:n,headers:r,query:i,body:o}=uce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getMultipleUsages",async t=>{let{path:n,headers:r,query:i,body:o}=lce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listUsageHistory",async t=>{let{path:n,headers:r,query:i,body:o}=cce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"changeAISpendQuota",async t=>{let{path:n,headers:r,query:i,body:o}=fce(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listActivities",async t=>{let{path:n,headers:r,query:i,body:o}=dce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"introspect",async t=>{let{path:n,headers:r,query:i,body:o}=pce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"upsertFile",async t=>{let{path:n,headers:r,query:i,body:o}=hce(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteFile",async t=>{let{path:n,headers:r,query:i,body:o}=mce(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listFiles",async t=>{let{path:n,headers:r,query:i,body:o}=yce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getFile",async t=>{let{path:n,headers:r,query:i,body:o}=gce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateFileMetadata",async t=>{let{path:n,headers:r,query:i,body:o}=vce(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"searchFiles",async t=>{let{path:n,headers:r,query:i,body:o}=bce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"listTables",async t=>{let{path:n,headers:r,query:i,body:o}=_ce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getTable",async t=>{let{path:n,headers:r,query:i,body:o}=wce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getOrCreateTable",async t=>{let{path:n,headers:r,query:i,body:o}=xce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createTable",async t=>{let{path:n,headers:r,query:i,body:o}=Sce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"duplicateTable",async t=>{let{path:n,headers:r,query:i,body:o}=Ece(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateTable",async t=>{let{path:n,headers:r,query:i,body:o}=Ace(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"renameTableColumn",async t=>{let{path:n,headers:r,query:i,body:o}=Cce(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteTable",async t=>{let{path:n,headers:r,query:i,body:o}=Oce(t),a=(this.props.toAxiosRequest??pe)({method:"delete",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"getTableRow",async t=>{let{path:n,headers:r,query:i,body:o}=Tce(t),a=(this.props.toAxiosRequest??pe)({method:"get",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"findTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=$ce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"createTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=kce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"deleteTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Ice(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"updateTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Pce(t),a=(this.props.toAxiosRequest??pe)({method:"put",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});R(this,"upsertTableRows",async t=>{let{path:n,headers:r,query:i,body:o}=Rce(t),a=(this.props.toAxiosRequest??pe)({method:"post",path:n,headers:{...r},query:{...i},body:o});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw he(s)})});this.axiosInstance=t,this.props=n}};function he(e){var t;return qu.isAxiosError(e)&&((t=e.response)!=null&&t.data)?Mb(e.response.data):Mb(e)}var Mk=100*1024*1024,Dce=Mk,Mce=Mk,jce=class extends Nce{constructor(t={}){let n=fue(t),{apiUrl:r,headers:i,withCredentials:o,timeout:a}=n,s=qu.create({baseURL:r,headers:i,withCredentials:o,timeout:a,maxBodyLength:Dce,maxContentLength:Mce,httpAgent:kb?new nue.default.Agent({keepAlive:!0}):void 0,httpsAgent:kb?new rue.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 Mc("Cannot provide both content and URL, please provide only one of them");if(s&&(a=await qu.get(s,{responseType:"arraybuffer"}).then(d=>d.data).catch(d=>{throw new Mc(`Failed to download file from provided URL: ${d.message}`,d)})),!a)throw new Mc("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 qu.put(c.uploadUrl,l,{maxBodyLength:1/0})}catch(d){throw new Mc(`Failed to upload file: ${d.message}`,d,c)}return{file:c}});this.config=n}};const jb=Jf(Object.freeze(Object.defineProperty({__proto__:null,AlreadyExistsError:kk,BreakingChangesError:Dk,Client:jce,ForbiddenError:mk,InternalError:pk,InvalidDataFormatError:xk,InvalidIdentifierError:Sk,InvalidJsonSchemaError:wk,InvalidPayloadError:gk,InvalidQueryError:Tk,LimitExceededError:Nk,MethodNotFoundError:bk,PayloadTooLargeError:yk,PaymentRequiredError:Pk,QuotaExceededError:Rk,RateLimitedError:Ik,ReferenceConstraintError:Ak,ReferenceNotFoundError:Ok,RelationConflictError:Ek,ResourceLockedConflictError:Ck,ResourceNotFoundError:_k,RuntimeError:$k,UnauthorizedError:hk,UnknownError:Bu,UnsupportedMediaTypeError:vk,UploadFileError:Mc,axios:Ese,errorFrom:Mb,isApiError:dk},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=(N,je)=>{for(var He in je)n(N,He,{get:je[He],enumerable:!0})},l=(N,je,He,Xe)=>{if(je&&typeof je=="object"||typeof je=="function")for(let Re of i(je))!a.call(N,Re)&&Re!==He&&n(N,Re,{get:()=>je[Re],enumerable:!(Xe=r(je,Re))||Xe.enumerable});return N},c=(N,je,He)=>(l(N,je,"default"),He&&l(He,je,"default")),d=(N,je,He)=>(He=N!=null?t(o(N)):{},l(je||!N||!N.__esModule?n(He,"default",{value:N,enumerable:!0}):He,N)),p=N=>l(n({},"__esModule",{value:!0}),N),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:()=>D,webhookIdHeader:()=>P}),e.exports=p(m);var h={};s(h,{defaults:()=>F});var y={};s(y,{default:()=>b,studioComponentDefinitions:()=>_});var v=Jd;c(y,Jd);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}),q=y.z.object({videoUrl:S}),L=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:q}),y.z.object({type:y.z.literal("file"),payload:L}),y.z.object({type:y.z.literal("location"),payload:M})]),V=y.z.object({items:y.z.array(G)}),F={text:{schema:A},markdown:{schema:E},image:{schema:T},audio:{schema:j},video:{schema:q},file:{schema:L},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",D="x-bp-type",De=As,qe=console;function Me(N){if(!N.body)throw new Error("Missing body");return JSON.parse(N.body)}async function Je(N,je=8072,He=Ae){let Xe=(0,De.createServer)(async(Re,We)=>{try{let _t=await rt(Re);if(_t.path==="/health"){We.writeHead(200).end("ok");return}let Pt=await N(_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(N){var Re;let je=await Pe(N),He={};for(let We=0;We<N.rawHeaders.length;We+=2){let _t=N.rawHeaders[We].toLowerCase(),Pt=N.rawHeaders[We+1];He[_t]=Pt}let Xe=new URL(N.url??"",N.headers.host?`http://${N.headers.host}`:"http://botpress.cloud");return{body:je,path:Xe.pathname,query:Ke(Xe.search,"?"),headers:He,method:((Re=N.method)==null?void 0:Re.toUpperCase())??"GET"}}function Ke(N,je){return N.indexOf(je)===0?N.slice(je.length):N}async function Pe(N){return new Promise((je,He)=>{if(N.method!=="POST"&&N.method!=="PUT"&&N.method!=="PATCH")return je(void 0);let Xe="";N.on("data",Re=>Xe+=Re.toString()),N.on("error",Re=>He(Re)),N.on("end",()=>je(Xe))})}function Ae(N){qe.info(`Listening on port ${N}`)}c(m,y,e.exports);var Fe=jb,$e=Jd,Ze=$e.z.enum(["webhook_received","message_created","action_triggered","register","unregister","ping","create_user","create_conversation"]),lt=N=>{let je=N[Y],He=N[ne],Xe=N[ce],Re=N[P],We=N[ue],_t=Ze.parse(N[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(N){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=N,this.name=N.name,this.version=N.version,this.icon=N.icon,this.readme=N.readme,this.title=N.title,this.identifier=N.identifier,this.description=N.description,this.configuration=N.configuration,this.events=N.events,this.actions=N.actions,this.channels=N.channels,this.states=N.states,this.user=N.user,this.secrets=N.secrets,this.entities=N.entities}clone(N){return new K({...this,...N})}},de=jb,Te=class{constructor(N){R(this,"createConversation",N=>this.client.createConversation(N));R(this,"getConversation",N=>this.client.getConversation(N));R(this,"listConversations",N=>this.client.listConversations(N));R(this,"getOrCreateConversation",N=>this.client.getOrCreateConversation(N));R(this,"updateConversation",N=>this.client.updateConversation(N));R(this,"deleteConversation",N=>this.client.deleteConversation(N));R(this,"listParticipants",N=>this.client.listParticipants(N));R(this,"addParticipant",N=>this.client.addParticipant(N));R(this,"getParticipant",N=>this.client.getParticipant(N));R(this,"removeParticipant",N=>this.client.removeParticipant(N));R(this,"createEvent",N=>this.client.createEvent(N));R(this,"getEvent",N=>this.client.getEvent(N));R(this,"listEvents",N=>this.client.listEvents(N));R(this,"createMessage",N=>this.client.createMessage(N));R(this,"getOrCreateMessage",N=>this.client.getOrCreateMessage(N));R(this,"getMessage",N=>this.client.getMessage(N));R(this,"updateMessage",N=>this.client.updateMessage(N));R(this,"listMessages",N=>this.client.listMessages(N));R(this,"deleteMessage",N=>this.client.deleteMessage(N));R(this,"createUser",N=>this.client.createUser(N));R(this,"getUser",N=>this.client.getUser(N));R(this,"listUsers",N=>this.client.listUsers(N));R(this,"getOrCreateUser",N=>this.client.getOrCreateUser(N));R(this,"updateUser",N=>this.client.updateUser(N));R(this,"deleteUser",N=>this.client.deleteUser(N));R(this,"getState",N=>this.client.getState(N));R(this,"setState",N=>this.client.setState(N));R(this,"getOrSetState",N=>this.client.getOrSetState(N));R(this,"patchState",N=>this.client.patchState(N));R(this,"configureIntegration",N=>this.client.configureIntegration(N));R(this,"uploadFile",N=>this.client.uploadFile(N));R(this,"upsertFile",N=>this.client.upsertFile(N));R(this,"deleteFile",N=>this.client.deleteFile(N));R(this,"listFiles",N=>this.client.listFiles(N));R(this,"getFile",N=>this.client.getFile(N));R(this,"updateFileMetadata",N=>this.client.updateFileMetadata(N));this.client=N}},Se=d(As),et=N=>{if(process.env.BP_LOG_FORMAT==="json")return JSON.stringify({msg:Se.default.format(...N),visible_to_bot_owner:!0});{let[je,...He]=N;return Se.default.format(`[For Bot Owner] ${je}`,...He)}},Ue={forBot:()=>({info:(...N)=>{console.info(et(N))},warn:(...N)=>{console.warn(et(N))},error:(...N)=>{console.error(et(N))},debug:(...N)=>{console.debug(et(N))}})},ot=N=>async je=>{let He=lt(je.headers),Xe=new Te(new de.Client({botId:He.botId,integrationId:He.integrationId})),Re={ctx:He,req:je,client:Xe,logger:Ue,instance:N};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 ye(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,de.isApiError)(We)){let _t=new de.RuntimeError(We.message,We);return{status:_t.code,body:JSON.stringify(_t.toJSON())}}throw We}},It=async N=>{},mt=async({client:N,ctx:je,req:He,logger:Xe,instance:Re})=>{let{req:We}=Me(He);return Re.webhook({client:N,ctx:je,req:We,logger:Xe})},ie=async({client:N,ctx:je,req:He,logger:Xe,instance:Re})=>{if(!Re.register)return;let{webhookUrl:We}=Me(He);await Re.register({client:N,ctx:je,webhookUrl:We,logger:Xe})},ye=async({client:N,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:N,logger:Xe})},xe=async({client:N,ctx:je,req:He,logger:Xe,instance:Re})=>{if(!Re.createUser)return;let{tags:We}=Me(He);return await Re.createUser({ctx:je,client:N,tags:We,logger:Xe})},Be=async({client:N,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:N,channel:We,tags:_t,logger:Xe})},ct=async({ctx:N,req:je,client:He,logger:Xe,instance:Re})=>{let{conversation:We,user:_t,type:Pt,payload:Jt,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:N,conversation:We,message:bn,user:_t,type:Pt,client:He,payload:Jt,ack:async({tags:na})=>{await He.updateMessage({id:bn.id,tags:na})},logger:Xe})},pn=async({req:N,ctx:je,client:He,logger:Xe,instance:Re})=>{let{input:We,type:_t}=Me(N);if(!_t)throw new Error("Missing action type");let Pt=Re.actions[_t];if(!Pt)throw new Error(`Action ${_t} not found`);let Jt=await Pt({ctx:je,input:We,client:He,type:_t,logger:Xe});return{body:JSON.stringify({output:Jt})}},rn=class{constructor(N){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",N=>Je(this.handler,N));this.props=N,this.actions=N.actions,this.channels=N.channels,this.register=N.register,this.unregister=N.unregister,this.createUser=N.createUser,this.createConversation=N.createConversation,this.webhook=N.handler}},Yt=d(jb),cn=class{constructor(N){R(this,"getConversation",N=>this.client.getConversation(N));R(this,"listConversations",N=>this.client.listConversations(N));R(this,"updateConversation",N=>this.client.updateConversation(N));R(this,"deleteConversation",N=>this.client.deleteConversation(N));R(this,"listParticipants",N=>this.client.listParticipants(N));R(this,"addParticipant",N=>this.client.addParticipant(N));R(this,"getParticipant",N=>this.client.getParticipant(N));R(this,"removeParticipant",N=>this.client.removeParticipant(N));R(this,"getEvent",N=>this.client.getEvent(N));R(this,"listEvents",N=>this.client.listEvents(N));R(this,"createMessage",N=>this.client.createMessage(N));R(this,"getOrCreateMessage",N=>this.client.getOrCreateMessage(N));R(this,"getMessage",N=>this.client.getMessage(N));R(this,"updateMessage",N=>this.client.updateMessage(N));R(this,"listMessages",N=>this.client.listMessages(N));R(this,"deleteMessage",N=>this.client.deleteMessage(N));R(this,"getUser",N=>this.client.getUser(N));R(this,"listUsers",N=>this.client.listUsers(N));R(this,"updateUser",N=>this.client.updateUser(N));R(this,"deleteUser",N=>this.client.deleteUser(N));R(this,"getState",N=>this.client.getState(N).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"setState",N=>this.client.setState(N).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"getOrSetState",N=>this.client.getOrSetState(N).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"patchState",N=>this.client.patchState(N).then(je=>({state:{...je.state,payload:je.state.payload}})));R(this,"callAction",N=>this.client.callAction(N));R(this,"uploadFile",N=>this.client.uploadFile(N));R(this,"upsertFile",N=>this.client.upsertFile(N));R(this,"deleteFile",N=>this.client.deleteFile(N));R(this,"listFiles",N=>this.client.listFiles(N));R(this,"getFile",N=>this.client.getFile(N));R(this,"updateFileMetadata",N=>this.client.updateFileMetadata(N));R(this,"searchFiles",N=>this.client.searchFiles(N));R(this,"createConversation",N=>this.client.createConversation(N));R(this,"getOrCreateConversation",N=>this.client.getOrCreateConversation(N));R(this,"createUser",N=>this.client.createUser(N));R(this,"getOrCreateUser",N=>this.client.getOrCreateUser(N));this.client=N}},Cn=Jd,ee=Cn.z.enum(["event_received","register","unregister","ping","action_triggered"]),ae=N=>{let je=N[Y],He=N[ue],Xe=N[D],Re=ee.parse(N[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=N=>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 Yt.Client({botId:He.botId})),Re={req:je,ctx:He,client:Xe,instance:N};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 N=>{},on=async N=>{},pt=async N=>{},Mn=async({ctx:N,req:je,client:He,instance:Xe})=>{qe.debug(`Received event ${N.type}`);let Re=Me(je),We=Re.event;switch(N.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:N,..._t})));break;case"state_expired":let Pt={state:We.payload.state};await Promise.all(Xe.stateExpiredHandlers.map(bn=>bn({client:He,ctx:N,...Pt})));break;default:let Jt={event:Re.event};await Promise.all(Xe.eventHandlers.map(bn=>bn({client:He,ctx:N,...Jt})))}},sr=class{constructor(N){R(this,"_state",{messageHandlers:[],eventHandlers:[],stateExpiredHandlers:[]});R(this,"props");R(this,"message",N=>{this._state.messageHandlers.push(N)});R(this,"event",N=>{this._state.eventHandlers.push(N)});R(this,"stateExpired",N=>{this._state.stateExpiredHandlers.push(N)});R(this,"handler",ft(this._state));R(this,"start",N=>Je(this.handler,N));this.props=N}}})(RE);var me=RE.exports;const{defaults:lo}=me.messages,Mi={className:me.z.string().describe("CSS className to apply to the message").optional()},jk=lo.audio.schema.extend({...Mi,type:me.z.literal("audio")}),Lb=lo.card.schema.extend({type:me.z.literal("card"),subtitle:me.z.string().optional(),imageUrl:me.z.string().optional(),...Mi}),Lce=Lb.omit({type:!0}),Lk=me.z.object({items:me.z.array(Lce),...Mi,type:me.z.literal("carousel")}),Fk=lo.choice.schema.extend({text:me.z.string(),...Mi,type:me.z.literal("choice"),disableFreeText:me.z.boolean().optional()}),qk=lo.dropdown.schema.extend({text:me.z.string(),...Mi,type:me.z.literal("dropdown")}),Uk=lo.file.schema.extend({...Mi,type:me.z.literal("file")}),Bk=lo.image.schema.extend({...Mi,type:me.z.literal("image")}),zk=lo.location.schema.extend({...Mi,type:me.z.literal("location")}),Zk=lo.markdown.schema.extend({...Mi,type:me.z.literal("markdown")}),Hk=lo.text.schema.extend({...Mi,type:me.z.literal("text")}),Wk=lo.video.schema.extend({...Mi,type:me.z.literal("video")}),Vk=me.z.union([jk,Lb,Lk,Fk,qk,Uk,Bk,zk,Zk,Hk,Wk]),Kk=me.z.object({type:me.z.literal("webchat_visibility"),data:me.z.object({visibility:me.z.union([me.z.literal("show"),me.z.literal("hide"),me.z.literal("toggle")])})}),Gk=me.z.object({type:me.z.literal("webchat_config"),data:me.z.object({config:me.z.record(me.z.any())})}),Yk=me.z.object({type:me.z.literal("custom"),data:me.z.object({event:me.z.record(me.z.any())})}),Jk=me.z.union([Kk,Gk,Yk]),Fce=Jk,qce=me.z.object({type:me.z.literal("message_created"),data:Vk}),Uce=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:jk,cardSchema:Lb,carouselSchema:Lk,choiceSchema:Fk,customSchema:Yk,dropdownSchema:qk,fileSchema:Uk,imageSchema:Bk,locationSchema:zk,markdownSchema:Zk,messageCreatedSchema:qce,messageSchema:Vk,textSchema:Hk,triggerSchema:Jk,triggerSignalSchema:Fce,videoSchema:Wk,webchatConfigSchema:Gk,webchatVisibilitySchema:Kk},Symbol.toStringTag,{value:"Module"})),co=me.z.object({className:me.z.string().optional(),avatarUrl:me.z.string().url().optional()}),Xk=co.extend({type:me.z.literal("audio"),audio:me.z.string(),title:me.z.string().optional()}),Bce=me.z.union([me.z.object({title:me.z.string(),action:me.z.literal("Say something"),text:me.z.string()}),me.z.object({title:me.z.string(),action:me.z.literal("Open URL"),url:me.z.string()}),me.z.object({title:me.z.string(),action:me.z.literal("Postback"),payload:me.z.string()})]),Fb=co.extend({type:me.z.literal("card"),title:me.z.string(),subtitle:me.z.string().optional(),image:me.z.string().optional(),actions:me.z.array(Bce)}),Qk=co.extend({type:me.z.literal("carousel"),items:me.z.array(Fb)}),eI=co.extend({type:me.z.literal("dropdown"),message:me.z.string().optional(),options:me.z.array(me.z.object({label:me.z.string(),value:me.z.string()})),allowCreation:me.z.boolean().optional(),placeholderText:me.z.string().optional(),allowMultiple:me.z.boolean().optional(),buttonText:me.z.string().optional(),width:me.z.number().optional(),displayInKeyboard:me.z.boolean().optional(),markdown:me.z.boolean().optional(),text:me.z.string().optional()}),tI=co.extend({type:me.z.literal("file"),file:me.z.string(),title:me.z.string().optional()}),nI=co.extend({type:me.z.literal("image"),image:me.z.string()}),rI=co.extend({type:me.z.literal("location"),latitude:me.z.number(),longitude:me.z.number(),address:me.z.string().optional(),title:me.z.string().optional()}),iI=co.extend({type:me.z.literal("single-choice"),text:me.z.string(),disableFreeText:me.z.boolean().optional(),choices:me.z.array(me.z.object({title:me.z.string(),value:me.z.string()}))}),oI=co.extend({type:me.z.literal("text"),text:me.z.string(),markdown:me.z.boolean().optional()}),aI=co.extend({type:me.z.literal("video"),video:me.z.string(),title:me.z.string().optional()}),sI=me.z.object({type:me.z.literal("quick_reply"),text:me.z.string(),payload:me.z.string().optional()}),vh=me.z.union([Xk,Fb,Qk,eI,tI,nI,rI,iI,oI,aI,sI]),uI=me.z.object({type:me.z.literal("webchat-visibility"),visibility:me.z.union([me.z.literal("show"),me.z.literal("hide"),me.z.literal("toggle")])}),lI=me.z.object({type:me.z.literal("webchat-config"),config:me.z.record(me.z.any())}),cI=me.z.object({type:me.z.literal("custom-event"),event:me.z.record(me.z.any())}),fI=me.z.union([uI,lI,cI]),zce=me.z.object({type:me.z.literal("trigger"),trigger:fI}),Zce=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:Xk,cardSchema:Fb,carouselSchame:Qk,customEventSchema:cI,dropdownSchema:eI,fileSchema:tI,imageSchema:nI,locationSchema:rI,messageSchema:vh,messageSignalSchema:vh,quickReplySchema:sI,singleChoiceSchema:iI,textSchema:oI,triggerSchema:fI,triggerSignalSchema:zce,videoSchema:aI,webchatConfigSchema:lI,webchatVisibilitySchema:uI},Symbol.toStringTag,{value:"Module"})),dI=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(Hce)}),Hce=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}`)}},pI=e=>({...e,type:"audio",audio:e.audioUrl}),hI=e=>dI(e),mI=e=>({...e,type:"carousel",items:e.items.map(dI)}),yI=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),gI=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),vI=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),bI=e=>({...e,type:"image",image:e.imageUrl}),_I=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),wI=e=>({...e,type:"text",text:e.markdown,markdown:!0}),xI=e=>({...e,type:"text",text:e.text,markdown:!0}),SI=e=>({...e,type:"video",video:e.videoUrl}),Wce=e=>{switch(e.type){case"audio":return pI(e);case"card":return hI(e);case"carousel":return mI(e);case"choice":return yI(e);case"dropdown":return gI(e);case"file":return vI(e);case"image":return bI(e);case"location":return _I(e);case"markdown":return wI(e);case"text":return xI(e);case"video":return SI(e);default:throw new Error("Unsuported message type")}},EI=e=>({type:"webchat-visibility",visibility:e.data.visibility}),AI=e=>({type:"webchat-config",config:e.data.config}),CI=e=>({type:"custom-event",event:e.data.event}),Vce=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:pI,cardAdapter:hI,carouselAdapter:mI,choiceAdapter:yI,customAdapter:CI,dropdownAdapter:gI,fileAdapter:vI,imageAdapter:bI,locationAdapter:_I,markdownAdapter:wI,messageAdapter:Wce,textAdapter:xI,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return EI(e);case"webchat_config":return AI(e);case"custom":return CI(e);default:throw new Error("unknown trigger type")}},videoAdapter:SI,webchatConfigAdapter:AI,webchatVisibilityAdapter:EI},Symbol.toStringTag,{value:"Module"})),OI=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map(Kce)}),Kce=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")}},Gce=e=>({...e,type:"audio",audioUrl:e.audio}),Yce=e=>OI(e),Jce=e=>({...e,type:"carousel",items:e.items.map(OI)}),Xce=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),Qce=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),efe=e=>({...e,type:"image",imageUrl:e.image}),tfe=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),nfe=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),rfe=e=>({...e,type:"text",text:e.text}),ife=e=>({...e,type:"video",videoUrl:e.video}),ofe=e=>({...e,type:"text",text:e.text??e.payload}),afe=Object.freeze(Object.defineProperty({__proto__:null,messaging:Zce,messagingToWebChat:Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return Gce(e);case"card":return Yce(e);case"carousel":return Jce(e);case"dropdown":return Xce(e);case"file":return Qce(e);case"image":return efe(e);case"location":return tfe(e);case"single-choice":return nfe(e);case"text":return rfe(e);case"video":return ife(e);case"quick_reply":return ofe(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),webchat:Uce,webchatToMessaging:Vce},Symbol.toStringTag,{value:"Module"}));let bh;const sfe=new Uint8Array(16);function ufe(){if(!bh&&(bh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bh(sfe)}const pr=[];for(let e=0;e<256;++e)pr.push((e+256).toString(16).slice(1));function lfe(e,t=0){return pr[e[t+0]]+pr[e[t+1]]+pr[e[t+2]]+pr[e[t+3]]+"-"+pr[e[t+4]]+pr[e[t+5]]+"-"+pr[e[t+6]]+pr[e[t+7]]+"-"+pr[e[t+8]]+pr[e[t+9]]+"-"+pr[e[t+10]]+pr[e[t+11]]+pr[e[t+12]]+pr[e[t+13]]+pr[e[t+14]]+pr[e[t+15]]}const TI={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function cfe(e,t,n){if(TI.randomUUID&&!t&&!e)return TI.randomUUID();e=e||{};const r=e.random||(e.rng||ufe)();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 lfe(r)}const _h=e=>({block:e,type:"bubble"}),ffe=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},$I=({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(ffe)}),{type:"column",horizontalAlignment:"center",blocks:[...i]}},dfe=({choices:e,text:t})=>{const n=cfe(),r=_h({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}))}]}},pfe=({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}},kI=({type:e,audio:t})=>({payload:{type:e,url:t}}),II=e=>({payload:_h($I(e))}),PI=({items:e})=>({payload:{type:"carousel",blocks:e.map($I)}}),RI=e=>({disableInput:e.disableFreeText,payload:dfe(e)}),NI=e=>({disableInput:!0,payload:_h(pfe(e))}),DI=({file:e,...t})=>({payload:{url:e,...t}}),MI=({type:e,image:t})=>({payload:{type:e,url:t}}),jI=({type:e,latitude:t,longitude:n,title:r,address:i})=>({payload:{type:e,latitude:t,longitude:n,title:r??i??"View on map"}}),hfe=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),qb=({type:e,text:t})=>({payload:_h({type:e,text:t})}),LI=({type:e,video:t})=>({payload:{type:e,url:t}}),FI=e=>{switch(e.type){case"audio":return kI(e);case"card":return II(e);case"carousel":return PI(e);case"single-choice":return RI(e);case"dropdown":return NI(e);case"file":return DI(e);case"image":return MI(e);case"location":return jI(e);case"quick_reply":return hfe(e);case"text":return qb(e);case"video":return LI(e);default:throw new Error("Unsuported message type")}},{webchatToMessaging:ji}=afe,mfe=e=>{const t=ji.audioAdapter(e);return kI(t)},yfe=e=>{const t=ji.cardAdapter(e);return II(t)},gfe=e=>{const t=ji.carouselAdapter(e);return PI(t)},vfe=e=>{const t=ji.choiceAdapter(e);return RI(t)},bfe=e=>{const t=ji.dropdownAdapter(e);return NI(t)},_fe=e=>{const t=ji.fileAdapter(e);return DI(t)},wfe=e=>{const t=ji.imageAdapter(e);return MI(t)},xfe=e=>{const t=ji.locationAdapter(e);return jI(t)},Sfe=e=>{const t=ji.markdownAdapter(e);return qb(t)},Efe=e=>{const t=ji.textAdapter(e);return qb(t)},Afe=e=>{const t=ji.videoAdapter(e);return LI(t)},Cfe=e=>{switch(e.type){case"audio":return mfe(e);case"card":return yfe(e);case"carousel":return gfe(e);case"choice":return vfe(e);case"dropdown":return bfe(e);case"file":return _fe(e);case"image":return wfe(e);case"location":return xfe(e);case"markdown":return Sfe(e);case"text":return Efe(e);case"video":return Afe(e);default:throw new Error("Unsuported message type")}};class Ofe{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 YS.MessagingSocket(t),this.emitter=new ig,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=vh.parse(r),{payload:o,disableInput:a}=FI(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=vh.parse(r.payload),{payload:o,disableInput:a}=FI(i);return{...r,payload:o,disableInput:a}})}}function qI(e,t){return function(){return e.apply(t,arguments)}}const{toString:UI}=Object.prototype,{getPrototypeOf:Ub}=Object,Bb=(e=>t=>{const n=UI.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Fo=e=>(e=e.toLowerCase(),t=>Bb(t)===e),wh=e=>t=>typeof t===e,{isArray:zu}=Array,jc=wh("undefined");function Tfe(e){return e!==null&&!jc(e)&&e.constructor!==null&&!jc(e.constructor)&&Cs(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const BI=Fo("ArrayBuffer");function $fe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&BI(e.buffer),t}const kfe=wh("string"),Cs=wh("function"),zI=wh("number"),zb=e=>e!==null&&typeof e=="object",Ife=e=>e===!0||e===!1,xh=e=>{if(Bb(e)!=="object")return!1;const t=Ub(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Pfe=Fo("Date"),Rfe=Fo("File"),Nfe=Fo("Blob"),Dfe=Fo("FileList"),Mfe=e=>zb(e)&&Cs(e.pipe),jfe=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||UI.call(e)===t||Cs(e.toString)&&e.toString()===t)},Lfe=Fo("URLSearchParams"),Ffe=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 ZI(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 HI=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),WI=e=>!jc(e)&&e!==HI;function Zb(){const{caseless:e}=WI(this)&&this||{},t={},n=(r,i)=>{const o=e&&ZI(t,i)||i;xh(t[o])&&xh(r)?t[o]=Zb(t[o],r):xh(r)?t[o]=Zb({},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 qfe=(e,t,n,{allOwnKeys:r}={})=>(Lc(t,(i,o)=>{n&&Cs(i)?e[o]=qI(i,n):e[o]=i},{allOwnKeys:r}),e),Ufe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Bfe=(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)},zfe=(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&&Ub(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Zfe=(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},Hfe=e=>{if(!e)return null;if(zu(e))return e;let t=e.length;if(!zI(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Wfe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ub(Uint8Array)),Vfe=(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])}},Kfe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Gfe=Fo("HTMLFormElement"),Yfe=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),VI=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Jfe=Fo("RegExp"),KI=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Lc(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},ve={isArray:zu,isArrayBuffer:BI,isBuffer:Tfe,isFormData:jfe,isArrayBufferView:$fe,isString:kfe,isNumber:zI,isBoolean:Ife,isObject:zb,isPlainObject:xh,isUndefined:jc,isDate:Pfe,isFile:Rfe,isBlob:Nfe,isRegExp:Jfe,isFunction:Cs,isStream:Mfe,isURLSearchParams:Lfe,isTypedArray:Wfe,isFileList:Dfe,forEach:Lc,merge:Zb,extend:qfe,trim:Ffe,stripBOM:Ufe,inherits:Bfe,toFlatObject:zfe,kindOf:Bb,kindOfTest:Fo,endsWith:Zfe,toArray:Hfe,forEachEntry:Vfe,matchAll:Kfe,isHTMLForm:Gfe,hasOwnProperty:VI,hasOwnProp:VI,reduceDescriptors:KI,freezeMethods:e=>{KI(e,(t,n)=>{if(Cs(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Cs(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:Yfe,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:ZI,global:HI,isContextDefined:WI,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(zb(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)}ve.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:ve.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const GI=nn.prototype,YI={};["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=>{YI[e]={value:e}}),Object.defineProperties(nn,YI),Object.defineProperty(GI,"isAxiosError",{value:!0}),nn.from=(e,t,n,r,i,o)=>{const a=Object.create(GI);return ve.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 Xfe=typeof self=="object"?self.FormData:window.FormData;const Qfe=Oo(Xfe);function Hb(e){return ve.isPlainObject(e)||ve.isArray(e)}function JI(e){return ve.endsWith(e,"[]")?e.slice(0,-2):e}function XI(e,t,n){return e?e.concat(t).map(function(i,o){return i=JI(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function ede(e){return ve.isArray(e)&&!e.some(Hb)}const tde=ve.toFlatObject(ve,{},null,function(t){return/^is[A-Z]/.test(t)});function nde(e){return e&&ve.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Sh(e,t,n){if(!ve.isObject(e))throw new TypeError("target must be an object");t=t||new(Qfe||FormData),n=ve.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!ve.isUndefined(w[v])});const r=n.metaTokens,i=n.visitor||d,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&nde(t);if(!ve.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(ve.isDate(y))return y.toISOString();if(!l&&ve.isBlob(y))throw new nn("Blob is not supported. Use a Buffer instead.");return ve.isArrayBuffer(y)||ve.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(ve.endsWith(v,"{}"))v=r?v:v.slice(0,-2),y=JSON.stringify(y);else if(ve.isArray(y)&&ede(y)||ve.isFileList(y)||ve.endsWith(v,"[]")&&(_=ve.toArray(y)))return v=JI(v),_.forEach(function(S,A){!(ve.isUndefined(S)||S===null)&&t.append(a===!0?XI([v],A,o):a===null?v:v+"[]",c(S))}),!1}return Hb(y)?!0:(t.append(XI(w,v,o),c(y)),!1)}const p=[],m=Object.assign(tde,{defaultVisitor:d,convertValue:c,isVisitable:Hb});function h(y,v){if(!ve.isUndefined(y)){if(p.indexOf(y)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(y),ve.forEach(y,function(_,b){(!(ve.isUndefined(_)||_===null)&&i.call(t,_,ve.isString(b)?b.trim():b,v,m))===!0&&h(_,v?v.concat(b):[b])}),p.pop()}}if(!ve.isObject(e))throw new TypeError("data must be an object");return h(e),t}function QI(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Wb(e,t){this._pairs=[],e&&Sh(e,this,t)}const eP=Wb.prototype;eP.append=function(t,n){this._pairs.push([t,n])},eP.toString=function(t){const n=t?function(r){return t.call(this,r,QI)}:QI;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function rde(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tP(e,t,n){if(!t)return e;const r=n&&n.encode||rde,i=n&&n.serialize;let o;if(i?o=i(t,n):o=ve.isURLSearchParams(t)?t.toString():new Wb(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){ve.forEach(this.handlers,function(r){r!==null&&t(r)})}}const nP=ide,rP={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ode=typeof URLSearchParams<"u"?URLSearchParams:Wb,ade=FormData,sde=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),ude=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),fo={isBrowser:!0,classes:{URLSearchParams:ode,FormData:ade,Blob},isStandardBrowserEnv:sde,isStandardBrowserWebWorkerEnv:ude,protocols:["http","https","file","blob","url","data"]};function lde(e,t){return Sh(e,new fo.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return fo.isNode&&ve.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function cde(e){return ve.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function fde(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 iP(e){function t(n,r,i,o){let a=n[o++];const s=Number.isFinite(+a),l=o>=n.length;return a=!a&&ve.isArray(i)?i.length:a,l?(ve.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!ve.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&ve.isArray(i[a])&&(i[a]=fde(i[a])),!s)}if(ve.isFormData(e)&&ve.isFunction(e.entries)){const n={};return ve.forEachEntry(e,(r,i)=>{t(cde(r),i,n,0)}),n}return null}const dde={"Content-Type":void 0};function pde(e,t,n){if(ve.isString(e))try{return(t||JSON.parse)(e),ve.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Eh={transitional:rP,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=ve.isObject(t);if(o&&ve.isHTMLForm(t)&&(t=new FormData(t)),ve.isFormData(t))return i&&i?JSON.stringify(iP(t)):t;if(ve.isArrayBuffer(t)||ve.isBuffer(t)||ve.isStream(t)||ve.isFile(t)||ve.isBlob(t))return t;if(ve.isArrayBufferView(t))return t.buffer;if(ve.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 lde(t,this.formSerializer).toString();if((s=ve.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Sh(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),pde(t)):t}],transformResponse:[function(t){const n=this.transitional||Eh.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&ve.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, */*"}}};ve.forEach(["delete","get","head"],function(t){Eh.headers[t]={}}),ve.forEach(["post","put","patch"],function(t){Eh.headers[t]=ve.merge(dde)});const Vb=Eh,hde=ve.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"]),mde=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]&&hde[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},oP=Symbol("internals");function Fc(e){return e&&String(e).trim().toLowerCase()}function Ah(e){return e===!1||e==null?e:ve.isArray(e)?e.map(Ah):String(e)}function yde(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 gde(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function aP(e,t,n,r){if(ve.isFunction(r))return r.call(this,t,n);if(ve.isString(t)){if(ve.isString(r))return t.indexOf(r)!==-1;if(ve.isRegExp(r))return r.test(t)}}function vde(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function bde(e,t){const n=ve.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 Ch{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=ve.findKey(i,d);(!p||i[p]===void 0||c===!0||c===void 0&&i[p]!==!1)&&(i[p||l]=Ah(s))}const a=(s,l)=>ve.forEach(s,(c,d)=>o(c,d,l));return ve.isPlainObject(t)||t instanceof this.constructor?a(t,n):ve.isString(t)&&(t=t.trim())&&!gde(t)?a(mde(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=Fc(t),t){const r=ve.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return yde(i);if(ve.isFunction(n))return n.call(this,i,r);if(ve.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=ve.findKey(this,t);return!!(r&&(!n||aP(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=ve.findKey(r,a);s&&(!n||aP(r,r[s],s,n))&&(delete r[s],i=!0)}}return ve.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 ve.forEach(this,(i,o)=>{const a=ve.findKey(r,o);if(a){n[a]=Ah(i),delete n[o];return}const s=t?vde(o):String(o).trim();s!==o&&delete n[o],n[s]=Ah(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ve.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&ve.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[oP]=this[oP]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Fc(a);r[s]||(bde(i,a),r[s]=!0)}return ve.isArray(t)?t.forEach(o):o(t),this}}Ch.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),ve.freezeMethods(Ch.prototype),ve.freezeMethods(Ch);const qo=Ch;function Kb(e,t){const n=this||Vb,r=t||n,i=qo.from(r.headers);let o=r.data;return ve.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function sP(e){return!!(e&&e.__CANCEL__)}function qc(e,t,n){nn.call(this,e??"canceled",nn.ERR_CANCELED,t,n),this.name="CanceledError"}ve.inherits(qc,nn,{__CANCEL__:!0});const _de=null;function wde(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 xde=fo.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,a,s){const l=[];l.push(n+"="+encodeURIComponent(r)),ve.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),ve.isString(o)&&l.push("path="+o),ve.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 Sde(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ede(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function uP(e,t){return e&&!Sde(t)?Ede(e,t):t}const Ade=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=ve.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Cde(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ode(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 lP(e,t){let n=0;const r=Ode(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 Oh={http:_de,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const o=qo.from(e.headers).normalize(),a=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}ve.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=uP(e.baseURL,e.url);c.open(e.method.toUpperCase(),tP(d,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function p(){if(!c)return;const h=qo.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};wde(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||rP;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||Ade(d))&&e.xsrfCookieName&&xde.read(e.xsrfCookieName);h&&o.set(e.xsrfHeaderName,h)}i===void 0&&o.setContentType(null),"setRequestHeader"in c&&ve.forEach(o.toJSON(),function(y,v){c.setRequestHeader(v,y)}),ve.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&a!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",lP(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",lP(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=Cde(d);if(m&&fo.protocols.indexOf(m)===-1){r(new nn("Unsupported protocol "+m+":",nn.ERR_BAD_REQUEST,e));return}c.send(i||null)})}};ve.forEach(Oh,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Tde={getAdapter:e=>{e=ve.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=ve.isString(n)?Oh[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new nn(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(ve.hasOwnProp(Oh,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!ve.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Oh};function Gb(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qc(null,e)}function cP(e){return Gb(e),e.headers=qo.from(e.headers),e.data=Kb.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Tde.getAdapter(e.adapter||Vb.adapter)(e).then(function(r){return Gb(e),r.data=Kb.call(e,e.transformResponse,r),r.headers=qo.from(r.headers),r},function(r){return sP(r)||(Gb(e),r&&r.response&&(r.response.data=Kb.call(e,e.transformResponse,r.response),r.response.headers=qo.from(r.response.headers))),Promise.reject(r)})}const fP=e=>e instanceof qo?e.toJSON():e;function Zu(e,t){t=t||{};const n={};function r(c,d,p){return ve.isPlainObject(c)&&ve.isPlainObject(d)?ve.merge.call({caseless:p},c,d):ve.isPlainObject(d)?ve.merge({},d):ve.isArray(d)?d.slice():d}function i(c,d,p){if(ve.isUndefined(d)){if(!ve.isUndefined(c))return r(void 0,c,p)}else return r(c,d,p)}function o(c,d){if(!ve.isUndefined(d))return r(void 0,d)}function a(c,d){if(ve.isUndefined(d)){if(!ve.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 ve.forEach(Object.keys(e).concat(Object.keys(t)),function(d){const p=l[d]||i,m=p(e[d],t[d],d);ve.isUndefined(m)&&p!==s||(n[d]=m)}),n}const dP="1.2.5",Yb={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Yb[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pP={};Yb.transitional=function(t,n,r){function i(o,a){return"[Axios v"+dP+"] 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&&!pP[a]&&(pP[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 $de(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 Jb={assertOptions:$de,validators:Yb},_a=Jb.validators;class Th{constructor(t){this.defaults=t,this.interceptors={request:new nP,response:new nP}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zu(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Jb.assertOptions(r,{silentJSONParsing:_a.transitional(_a.boolean),forcedJSONParsing:_a.transitional(_a.boolean),clarifyTimeoutError:_a.transitional(_a.boolean)},!1),i!==void 0&&Jb.assertOptions(i,{encode:_a.function,serialize:_a.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a;a=o&&ve.merge(o.common,o[n.method]),a&&ve.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=qo.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=[cP.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=cP.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=Zu(this.defaults,t);const n=uP(t.baseURL,t.url);return tP(n,t.params,t.paramsSerializer)}}ve.forEach(["delete","get","head","options"],function(t){Th.prototype[t]=function(n,r){return this.request(Zu(r||{},{method:t,url:n,data:(r||{}).data}))}}),ve.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(Zu(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Th.prototype[t]=n(),Th.prototype[t+"Form"]=n(!0)});const $h=Th;class Xb{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 Xb(function(i){t=i}),cancel:t}}}const kde=Xb;function Ide(e){return function(n){return e.apply(null,n)}}function Pde(e){return ve.isObject(e)&&e.isAxiosError===!0}const Qb={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(Qb).forEach(([e,t])=>{Qb[t]=e});const Rde=Qb;function hP(e){const t=new $h(e),n=qI($h.prototype.request,t);return ve.extend(n,$h.prototype,t,{allOwnKeys:!0}),ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return hP(Zu(e,i))},n}const Qn=hP(Vb);Qn.Axios=$h,Qn.CanceledError=qc,Qn.CancelToken=kde,Qn.isCancel=sP,Qn.VERSION=dP,Qn.toFormData=Sh,Qn.AxiosError=nn,Qn.Cancel=Qn.CanceledError,Qn.all=function(t){return Promise.all(t)},Qn.spread=Ide,Qn.isAxiosError=Pde,Qn.mergeConfig=Zu,Qn.AxiosHeaders=qo,Qn.formToJSON=e=>iP(ve.isHTMLForm(e)?new FormData(e):e),Qn.HttpStatusCode=Rde,Qn.default=Qn;const mP=Qn,Nde={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let e0=typeof window<"u"&&typeof window.document<"u"?window.crypto:mb;e0.getRandomValues||(e0=Nde);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(e0.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 Dde=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,t0=e=>e instanceof vn||Dde(e)&&e.isApiError===!0;class Uc extends vn{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}}class Mde extends vn{constructor(t,n,r){super(500,"An internal error occurred","Internal",t,n,r)}}class jde extends vn{constructor(t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",t,n,r)}}class Lde extends vn{constructor(t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",t,n,r)}}class Fde extends vn{constructor(t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",t,n,r)}}class qde extends vn{constructor(t,n,r){super(400,"The request payload is invalid.","InvalidPayload",t,n,r)}}class Ude extends vn{constructor(t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,n,r)}}class Bde extends vn{constructor(t,n,r){super(405,"The requested method does not exist.","MethodNotFound",t,n,r)}}class zde extends vn{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}}class Zde extends vn{constructor(t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,n,r)}}class Hde extends vn{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}}class Wde 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 Vde 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 Kde 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 Gde 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 Yde 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 Jde 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 Xde 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 Qde extends vn{constructor(t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,n,r)}}class epe 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 npe 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 rpe 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 ope={Unknown:Uc,Internal:Mde,Unauthorized:jde,Forbidden:Lde,PayloadTooLarge:Fde,InvalidPayload:qde,UnsupportedMediaType:Ude,MethodNotFound:Bde,ResourceNotFound:zde,InvalidJsonSchema:Zde,InvalidDataFormat:Hde,InvalidIdentifier:Wde,RelationConflict:Vde,ReferenceConstraint:Kde,ResourceLockedConflict:Gde,ReferenceNotFound:Yde,InvalidQuery:Jde,Runtime:Xde,AlreadyExists:Qde,RateLimited:epe,PaymentRequired:tpe,QuotaExceeded:npe,LimitExceeded:rpe,BreakingChanges:ipe},yP=e=>t0(e)?e:e instanceof Error?new Uc(e.message,e):typeof e=="string"?new Uc(e):ape(e);function ape(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=ope[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 spe=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},gP=typeof Symbol<"u"&&Symbol,upe=spe,lpe=function(){return typeof gP!="function"||typeof Symbol!="function"||typeof gP("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:upe()},vP={foo:{}},cpe=Object,fpe=function(){return{__proto__:vP}.foo===vP.foo&&!({__proto__:null}instanceof cpe)},dpe="Function.prototype.bind called on incompatible ",ppe=Object.prototype.toString,hpe=Math.max,mpe="[object Function]",bP=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},ype=function(t,n){for(var r=[],i=n||0,o=0;i<t.length;i+=1,o+=1)r[o]=t[i];return r},gpe=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},vpe=function(t){var n=this;if(typeof n!="function"||ppe.apply(n)!==mpe)throw new TypeError(dpe+n);for(var r=ype(arguments,1),i,o=function(){if(this instanceof i){var d=n.apply(this,bP(r,arguments));return Object(d)===d?d:this}return n.apply(t,bP(r,arguments))},a=hpe(0,n.length-r.length),s=[],l=0;l<a;l++)s[l]="$"+l;if(i=Function("binder","return function ("+gpe(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},bpe=vpe,n0=Function.prototype.bind||bpe,_pe=n0,wpe=_pe.call(Function.call,Object.prototype.hasOwnProperty),Vt,Hu=SyntaxError,_P=Function,Wu=TypeError,r0=function(e){try{return _P('"use strict"; return ('+e+").constructor;")()}catch{}},Os=Object.getOwnPropertyDescriptor;if(Os)try{Os({},"")}catch{Os=null}var i0=function(){throw new Wu},xpe=Os?function(){try{return arguments.callee,i0}catch{try{return Os(arguments,"callee").get}catch{return i0}}}():i0,Vu=lpe(),Spe=fpe(),or=Object.getPrototypeOf||(Spe?function(e){return e.__proto__}:null),Ku={},Epe=typeof Uint8Array>"u"||!or?Vt:or(Uint8Array),Ts={"%AggregateError%":typeof AggregateError>"u"?Vt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Vt:ArrayBuffer,"%ArrayIteratorPrototype%":Vu&&or?or([][Symbol.iterator]()):Vt,"%AsyncFromSyncIteratorPrototype%":Vt,"%AsyncFunction%":Ku,"%AsyncGenerator%":Ku,"%AsyncGeneratorFunction%":Ku,"%AsyncIteratorPrototype%":Ku,"%Atomics%":typeof Atomics>"u"?Vt:Atomics,"%BigInt%":typeof BigInt>"u"?Vt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Vt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Vt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Vt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Vt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Vt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Vt:FinalizationRegistry,"%Function%":_P,"%GeneratorFunction%":Ku,"%Int8Array%":typeof Int8Array>"u"?Vt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Vt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Vt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Vu&&or?or(or([][Symbol.iterator]())):Vt,"%JSON%":typeof JSON=="object"?JSON:Vt,"%Map%":typeof Map>"u"?Vt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Vu||!or?Vt:or(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Vt:Promise,"%Proxy%":typeof Proxy>"u"?Vt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Vt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Vt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Vu||!or?Vt:or(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Vt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Vu&&or?or(""[Symbol.iterator]()):Vt,"%Symbol%":Vu?Symbol:Vt,"%SyntaxError%":Hu,"%ThrowTypeError%":xpe,"%TypedArray%":Epe,"%TypeError%":Wu,"%Uint8Array%":typeof Uint8Array>"u"?Vt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Vt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Vt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Vt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Vt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Vt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Vt:WeakSet};if(or)try{null.error}catch(e){var Ape=or(or(e));Ts["%Error.prototype%"]=Ape}var Cpe=function e(t){var n;if(t==="%AsyncFunction%")n=r0("async function () {}");else if(t==="%GeneratorFunction%")n=r0("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=r0("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 Ts[t]=n,n},wP={"%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=n0,kh=wpe,Ope=Bc.call(Function.call,Array.prototype.concat),Tpe=Bc.call(Function.apply,Array.prototype.splice),xP=Bc.call(Function.call,String.prototype.replace),Ih=Bc.call(Function.call,String.prototype.slice),$pe=Bc.call(Function.call,RegExp.prototype.exec),kpe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ipe=/\\(\\)?/g,Ppe=function(t){var n=Ih(t,0,1),r=Ih(t,-1);if(n==="%"&&r!=="%")throw new Hu("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Hu("invalid intrinsic syntax, expected opening `%`");var i=[];return xP(t,kpe,function(o,a,s,l){i[i.length]=s?xP(l,Ipe,"$1"):a||o}),i},Rpe=function(t,n){var r=t,i;if(kh(wP,r)&&(i=wP[r],r="%"+i[0]+"%"),kh(Ts,r)){var o=Ts[r];if(o===Ku&&(o=Cpe(r)),typeof o>"u"&&!n)throw new Wu("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Hu("intrinsic "+t+" does not exist!")},o0=function(t,n){if(typeof t!="string"||t.length===0)throw new Wu("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Wu('"allowMissing" argument must be a boolean');if($pe(/^%?[^%]*%?$/,t)===null)throw new Hu("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Ppe(t),i=r.length>0?r[0]:"",o=Rpe("%"+i+"%",n),a=o.name,s=o.value,l=!1,c=o.alias;c&&(i=c[0],Tpe(r,Ope([0,1],c)));for(var d=1,p=!0;d<r.length;d+=1){var m=r[d],h=Ih(m,0,1),y=Ih(m,-1);if((h==='"'||h==="'"||h==="`"||y==='"'||y==="'"||y==="`")&&h!==y)throw new Hu("property names with quotes must have matching quotes");if((m==="constructor"||!p)&&(l=!0),i+="."+m,a="%"+i+"%",kh(Ts,a))s=Ts[a];else if(s!=null){if(!(m in s)){if(!n)throw new Wu("base intrinsic for "+t+" exists, but the property is not available.");return}if(Os&&d+1>=r.length){var v=Os(s,m);p=!!v,p&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[m]}else p=kh(s,m),s=s[m];p&&!l&&(Ts[a]=s)}}return s},SP={exports:{}};(function(e){var t=n0,n=o0,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})(SP);var Npe=SP.exports,EP=o0,AP=Npe,Dpe=AP(EP("String.prototype.indexOf")),Mpe=function(t,n){var r=EP(t,!!n);return typeof r=="function"&&Dpe(t,".prototype.")>-1?AP(r):r},a0=typeof Map=="function"&&Map.prototype,s0=Object.getOwnPropertyDescriptor&&a0?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ph=a0&&s0&&typeof s0.get=="function"?s0.get:null,CP=a0&&Map.prototype.forEach,u0=typeof Set=="function"&&Set.prototype,l0=Object.getOwnPropertyDescriptor&&u0?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Rh=u0&&l0&&typeof l0.get=="function"?l0.get:null,OP=u0&&Set.prototype.forEach,jpe=typeof WeakMap=="function"&&WeakMap.prototype,zc=jpe?WeakMap.prototype.has:null,Lpe=typeof WeakSet=="function"&&WeakSet.prototype,Zc=Lpe?WeakSet.prototype.has:null,Fpe=typeof WeakRef=="function"&&WeakRef.prototype,TP=Fpe?WeakRef.prototype.deref:null,qpe=Boolean.prototype.valueOf,Upe=Object.prototype.toString,Bpe=Function.prototype.toString,zpe=String.prototype.match,c0=String.prototype.slice,wa=String.prototype.replace,Zpe=String.prototype.toUpperCase,$P=String.prototype.toLowerCase,kP=RegExp.prototype.test,IP=Array.prototype.concat,po=Array.prototype.join,Hpe=Array.prototype.slice,PP=Math.floor,f0=typeof BigInt=="function"?BigInt.prototype.valueOf:null,d0=Object.getOwnPropertySymbols,p0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Gu=typeof Symbol=="function"&&typeof Symbol.iterator=="object",xr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Gu||"symbol")?Symbol.toStringTag:null,RP=Object.prototype.propertyIsEnumerable,NP=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function DP(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||kP.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-PP(-e):PP(e);if(r!==e){var i=String(r),o=c0.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 h0=As,MP=h0.custom,jP=qP(MP)?MP:null,Wpe=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 BP(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?DP(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?DP(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 m0(t)?"[Array]":"[Object]";var p=che(o,r);if(typeof i>"u")i=[];else if(UP(i,t)>=0)return"[Circular]";function m(Q,G,V){if(G&&(i=Hpe.call(i),i.push(G)),V){var F={depth:o.depth};return xa(o,"quoteStyle")&&(F.quoteStyle=o.quoteStyle),e(Q,F,r+1,i)}return e(Q,o,r+1,i)}if(typeof t=="function"&&!FP(t)){var h=the(t),y=Nh(t,m);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(y.length>0?" { "+po.call(y,", ")+" }":"")}if(qP(t)){var v=Gu?wa.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):p0.call(t);return typeof t=="object"&&!Gu?Hc(v):v}if(she(t)){for(var w="<"+$P.call(String(t.nodeName)),_=t.attributes||[],b=0;b<_.length;b++)w+=" "+_[b].name+"="+LP(Vpe(_[b].value),"double",o);return w+=">",t.childNodes&&t.childNodes.length&&(w+="..."),w+="</"+$P.call(String(t.nodeName))+">",w}if(m0(t)){if(t.length===0)return"[]";var S=Nh(t,m);return p&&!lhe(S)?"["+g0(S,p)+"]":"[ "+po.call(S,", ")+" ]"}if(Gpe(t)){var A=Nh(t,m);return!("cause"in Error.prototype)&&"cause"in t&&!RP.call(t,"cause")?"{ ["+String(t)+"] "+po.call(IP.call("[cause]: "+m(t.cause),A),", ")+" }":A.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+po.call(A,", ")+" }"}if(typeof t=="object"&&a){if(jP&&typeof t[jP]=="function"&&h0)return h0(t,{depth:d-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(nhe(t)){var E=[];return CP&&CP.call(t,function(Q,G){E.push(m(G,t,!0)+" => "+m(Q,t))}),zP("Map",Ph.call(t),E,p)}if(ohe(t)){var T=[];return OP&&OP.call(t,function(Q){T.push(m(Q,t))}),zP("Set",Rh.call(t),T,p)}if(rhe(t))return y0("WeakMap");if(ahe(t))return y0("WeakSet");if(ihe(t))return y0("WeakRef");if(Jpe(t))return Hc(m(Number(t)));if(Qpe(t))return Hc(m(f0.call(t)));if(Xpe(t))return Hc(qpe.call(t));if(Ype(t))return Hc(m(String(t)));if(!Kpe(t)&&!FP(t)){var j=Nh(t,m),q=NP?NP(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",M=!q&&xr&&Object(t)===t&&xr in t?c0.call(Sa(t),8,-1):L?"Object":"",H=q||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",re=H+(M||L?"["+po.call(IP.call([],M||[],L||[]),": ")+"] ":"");return j.length===0?re+"{}":p?re+"{"+g0(j,p)+"}":re+"{ "+po.call(j,", ")+" }"}return String(t)};function LP(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Vpe(e){return wa.call(String(e),/"/g,""")}function m0(e){return Sa(e)==="[object Array]"&&(!xr||!(typeof e=="object"&&xr in e))}function Kpe(e){return Sa(e)==="[object Date]"&&(!xr||!(typeof e=="object"&&xr in e))}function FP(e){return Sa(e)==="[object RegExp]"&&(!xr||!(typeof e=="object"&&xr in e))}function Gpe(e){return Sa(e)==="[object Error]"&&(!xr||!(typeof e=="object"&&xr in e))}function Ype(e){return Sa(e)==="[object String]"&&(!xr||!(typeof e=="object"&&xr in e))}function Jpe(e){return Sa(e)==="[object Number]"&&(!xr||!(typeof e=="object"&&xr in e))}function Xpe(e){return Sa(e)==="[object Boolean]"&&(!xr||!(typeof e=="object"&&xr in e))}function qP(e){if(Gu)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!p0)return!1;try{return p0.call(e),!0}catch{}return!1}function Qpe(e){if(!e||typeof e!="object"||!f0)return!1;try{return f0.call(e),!0}catch{}return!1}var ehe=Object.prototype.hasOwnProperty||function(e){return e in this};function xa(e,t){return ehe.call(e,t)}function Sa(e){return Upe.call(e)}function the(e){if(e.name)return e.name;var t=zpe.call(Bpe.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function UP(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 nhe(e){if(!Ph||!e||typeof e!="object")return!1;try{Ph.call(e);try{Rh.call(e)}catch{return!0}return e instanceof Map}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 WeakMap}catch{}return!1}function ihe(e){if(!TP||!e||typeof e!="object")return!1;try{return TP.call(e),!0}catch{}return!1}function ohe(e){if(!Rh||!e||typeof e!="object")return!1;try{Rh.call(e);try{Ph.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ahe(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 she(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function BP(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return BP(c0.call(e,0,t.maxStringLength),t)+r}var i=wa.call(wa.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,uhe);return LP(i,"single",t)}function uhe(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":"")+Zpe.call(t.toString(16))}function Hc(e){return"Object("+e+")"}function y0(e){return e+" { ? }"}function zP(e,t,n,r){var i=r?g0(n,r):po.call(n,", ");return e+" ("+t+") {"+i+"}"}function lhe(e){for(var t=0;t<e.length;t++)if(UP(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[oP]=this[oP]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Fc(a);r[s]||(bde(i,a),r[s]=!0)}return ve.isArray(t)?t.forEach(o):o(t),this}}Ch.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),ve.freezeMethods(Ch.prototype),ve.freezeMethods(Ch);const qo=Ch;function Kb(e,t){const n=this||Vb,r=t||n,i=qo.from(r.headers);let o=r.data;return ve.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function sP(e){return!!(e&&e.__CANCEL__)}function qc(e,t,n){nn.call(this,e??"canceled",nn.ERR_CANCELED,t,n),this.name="CanceledError"}ve.inherits(qc,nn,{__CANCEL__:!0});const _de=null;function wde(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 xde=fo.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,a,s){const l=[];l.push(n+"="+encodeURIComponent(r)),ve.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),ve.isString(o)&&l.push("path="+o),ve.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 Sde(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ede(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function uP(e,t){return e&&!Sde(t)?Ede(e,t):t}const Ade=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=ve.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Cde(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ode(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 lP(e,t){let n=0;const r=Ode(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 Oh={http:_de,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const o=qo.from(e.headers).normalize(),a=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}ve.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=uP(e.baseURL,e.url);c.open(e.method.toUpperCase(),tP(d,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function p(){if(!c)return;const h=qo.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};wde(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||rP;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||Ade(d))&&e.xsrfCookieName&&xde.read(e.xsrfCookieName);h&&o.set(e.xsrfHeaderName,h)}i===void 0&&o.setContentType(null),"setRequestHeader"in c&&ve.forEach(o.toJSON(),function(y,v){c.setRequestHeader(v,y)}),ve.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&a!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",lP(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",lP(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=Cde(d);if(m&&fo.protocols.indexOf(m)===-1){r(new nn("Unsupported protocol "+m+":",nn.ERR_BAD_REQUEST,e));return}c.send(i||null)})}};ve.forEach(Oh,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Tde={getAdapter:e=>{e=ve.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=ve.isString(n)?Oh[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new nn(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(ve.hasOwnProp(Oh,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!ve.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Oh};function Gb(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qc(null,e)}function cP(e){return Gb(e),e.headers=qo.from(e.headers),e.data=Kb.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Tde.getAdapter(e.adapter||Vb.adapter)(e).then(function(r){return Gb(e),r.data=Kb.call(e,e.transformResponse,r),r.headers=qo.from(r.headers),r},function(r){return sP(r)||(Gb(e),r&&r.response&&(r.response.data=Kb.call(e,e.transformResponse,r.response),r.response.headers=qo.from(r.response.headers))),Promise.reject(r)})}const fP=e=>e instanceof qo?e.toJSON():e;function Zu(e,t){t=t||{};const n={};function r(c,d,p){return ve.isPlainObject(c)&&ve.isPlainObject(d)?ve.merge.call({caseless:p},c,d):ve.isPlainObject(d)?ve.merge({},d):ve.isArray(d)?d.slice():d}function i(c,d,p){if(ve.isUndefined(d)){if(!ve.isUndefined(c))return r(void 0,c,p)}else return r(c,d,p)}function o(c,d){if(!ve.isUndefined(d))return r(void 0,d)}function a(c,d){if(ve.isUndefined(d)){if(!ve.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 ve.forEach(Object.keys(e).concat(Object.keys(t)),function(d){const p=l[d]||i,m=p(e[d],t[d],d);ve.isUndefined(m)&&p!==s||(n[d]=m)}),n}const dP="1.2.5",Yb={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Yb[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pP={};Yb.transitional=function(t,n,r){function i(o,a){return"[Axios v"+dP+"] 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&&!pP[a]&&(pP[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 $de(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 Jb={assertOptions:$de,validators:Yb},wa=Jb.validators;class Th{constructor(t){this.defaults=t,this.interceptors={request:new nP,response:new nP}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zu(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Jb.assertOptions(r,{silentJSONParsing:wa.transitional(wa.boolean),forcedJSONParsing:wa.transitional(wa.boolean),clarifyTimeoutError:wa.transitional(wa.boolean)},!1),i!==void 0&&Jb.assertOptions(i,{encode:wa.function,serialize:wa.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a;a=o&&ve.merge(o.common,o[n.method]),a&&ve.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=qo.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=[cP.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=cP.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=Zu(this.defaults,t);const n=uP(t.baseURL,t.url);return tP(n,t.params,t.paramsSerializer)}}ve.forEach(["delete","get","head","options"],function(t){Th.prototype[t]=function(n,r){return this.request(Zu(r||{},{method:t,url:n,data:(r||{}).data}))}}),ve.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(Zu(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Th.prototype[t]=n(),Th.prototype[t+"Form"]=n(!0)});const $h=Th;class Xb{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 Xb(function(i){t=i}),cancel:t}}}const kde=Xb;function Ide(e){return function(n){return e.apply(null,n)}}function Pde(e){return ve.isObject(e)&&e.isAxiosError===!0}const Qb={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(Qb).forEach(([e,t])=>{Qb[t]=e});const Rde=Qb;function hP(e){const t=new $h(e),n=qI($h.prototype.request,t);return ve.extend(n,$h.prototype,t,{allOwnKeys:!0}),ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return hP(Zu(e,i))},n}const Qn=hP(Vb);Qn.Axios=$h,Qn.CanceledError=qc,Qn.CancelToken=kde,Qn.isCancel=sP,Qn.VERSION=dP,Qn.toFormData=Sh,Qn.AxiosError=nn,Qn.Cancel=Qn.CanceledError,Qn.all=function(t){return Promise.all(t)},Qn.spread=Ide,Qn.isAxiosError=Pde,Qn.mergeConfig=Zu,Qn.AxiosHeaders=qo,Qn.formToJSON=e=>iP(ve.isHTMLForm(e)?new FormData(e):e),Qn.HttpStatusCode=Rde,Qn.default=Qn;const mP=Qn,Nde={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let e0=typeof window<"u"&&typeof window.document<"u"?window.crypto:mb;e0.getRandomValues||(e0=Nde);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(e0.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 Dde=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,t0=e=>e instanceof vn||Dde(e)&&e.isApiError===!0;class Uc extends vn{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}}class Mde extends vn{constructor(t,n,r){super(500,"An internal error occurred","Internal",t,n,r)}}class jde extends vn{constructor(t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",t,n,r)}}class Lde extends vn{constructor(t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",t,n,r)}}class Fde extends vn{constructor(t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",t,n,r)}}class qde extends vn{constructor(t,n,r){super(400,"The request payload is invalid.","InvalidPayload",t,n,r)}}class Ude extends vn{constructor(t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,n,r)}}class Bde extends vn{constructor(t,n,r){super(405,"The requested method does not exist.","MethodNotFound",t,n,r)}}class zde extends vn{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}}class Zde extends vn{constructor(t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,n,r)}}class Hde extends vn{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}}class Wde 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 Vde 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 Kde 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 Gde 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 Yde 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 Jde 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 Xde 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 Qde extends vn{constructor(t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,n,r)}}class epe 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 npe 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 rpe 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 ope={Unknown:Uc,Internal:Mde,Unauthorized:jde,Forbidden:Lde,PayloadTooLarge:Fde,InvalidPayload:qde,UnsupportedMediaType:Ude,MethodNotFound:Bde,ResourceNotFound:zde,InvalidJsonSchema:Zde,InvalidDataFormat:Hde,InvalidIdentifier:Wde,RelationConflict:Vde,ReferenceConstraint:Kde,ResourceLockedConflict:Gde,ReferenceNotFound:Yde,InvalidQuery:Jde,Runtime:Xde,AlreadyExists:Qde,RateLimited:epe,PaymentRequired:tpe,QuotaExceeded:npe,LimitExceeded:rpe,BreakingChanges:ipe},yP=e=>t0(e)?e:e instanceof Error?new Uc(e.message,e):typeof e=="string"?new Uc(e):ape(e);function ape(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=ope[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 spe=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},gP=typeof Symbol<"u"&&Symbol,upe=spe,lpe=function(){return typeof gP!="function"||typeof Symbol!="function"||typeof gP("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:upe()},vP={foo:{}},cpe=Object,fpe=function(){return{__proto__:vP}.foo===vP.foo&&!({__proto__:null}instanceof cpe)},dpe="Function.prototype.bind called on incompatible ",ppe=Object.prototype.toString,hpe=Math.max,mpe="[object Function]",bP=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},ype=function(t,n){for(var r=[],i=n||0,o=0;i<t.length;i+=1,o+=1)r[o]=t[i];return r},gpe=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},vpe=function(t){var n=this;if(typeof n!="function"||ppe.apply(n)!==mpe)throw new TypeError(dpe+n);for(var r=ype(arguments,1),i,o=function(){if(this instanceof i){var d=n.apply(this,bP(r,arguments));return Object(d)===d?d:this}return n.apply(t,bP(r,arguments))},a=hpe(0,n.length-r.length),s=[],l=0;l<a;l++)s[l]="$"+l;if(i=Function("binder","return function ("+gpe(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},bpe=vpe,n0=Function.prototype.bind||bpe,_pe=n0,wpe=_pe.call(Function.call,Object.prototype.hasOwnProperty),Vt,Hu=SyntaxError,_P=Function,Wu=TypeError,r0=function(e){try{return _P('"use strict"; return ('+e+").constructor;")()}catch{}},Os=Object.getOwnPropertyDescriptor;if(Os)try{Os({},"")}catch{Os=null}var i0=function(){throw new Wu},xpe=Os?function(){try{return arguments.callee,i0}catch{try{return Os(arguments,"callee").get}catch{return i0}}}():i0,Vu=lpe(),Spe=fpe(),or=Object.getPrototypeOf||(Spe?function(e){return e.__proto__}:null),Ku={},Epe=typeof Uint8Array>"u"||!or?Vt:or(Uint8Array),Ts={"%AggregateError%":typeof AggregateError>"u"?Vt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Vt:ArrayBuffer,"%ArrayIteratorPrototype%":Vu&&or?or([][Symbol.iterator]()):Vt,"%AsyncFromSyncIteratorPrototype%":Vt,"%AsyncFunction%":Ku,"%AsyncGenerator%":Ku,"%AsyncGeneratorFunction%":Ku,"%AsyncIteratorPrototype%":Ku,"%Atomics%":typeof Atomics>"u"?Vt:Atomics,"%BigInt%":typeof BigInt>"u"?Vt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Vt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Vt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Vt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Vt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Vt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Vt:FinalizationRegistry,"%Function%":_P,"%GeneratorFunction%":Ku,"%Int8Array%":typeof Int8Array>"u"?Vt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Vt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Vt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Vu&&or?or(or([][Symbol.iterator]())):Vt,"%JSON%":typeof JSON=="object"?JSON:Vt,"%Map%":typeof Map>"u"?Vt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Vu||!or?Vt:or(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Vt:Promise,"%Proxy%":typeof Proxy>"u"?Vt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Vt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Vt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Vu||!or?Vt:or(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Vt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Vu&&or?or(""[Symbol.iterator]()):Vt,"%Symbol%":Vu?Symbol:Vt,"%SyntaxError%":Hu,"%ThrowTypeError%":xpe,"%TypedArray%":Epe,"%TypeError%":Wu,"%Uint8Array%":typeof Uint8Array>"u"?Vt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Vt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Vt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Vt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Vt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Vt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Vt:WeakSet};if(or)try{null.error}catch(e){var Ape=or(or(e));Ts["%Error.prototype%"]=Ape}var Cpe=function e(t){var n;if(t==="%AsyncFunction%")n=r0("async function () {}");else if(t==="%GeneratorFunction%")n=r0("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=r0("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 Ts[t]=n,n},wP={"%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=n0,kh=wpe,Ope=Bc.call(Function.call,Array.prototype.concat),Tpe=Bc.call(Function.apply,Array.prototype.splice),xP=Bc.call(Function.call,String.prototype.replace),Ih=Bc.call(Function.call,String.prototype.slice),$pe=Bc.call(Function.call,RegExp.prototype.exec),kpe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ipe=/\\(\\)?/g,Ppe=function(t){var n=Ih(t,0,1),r=Ih(t,-1);if(n==="%"&&r!=="%")throw new Hu("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Hu("invalid intrinsic syntax, expected opening `%`");var i=[];return xP(t,kpe,function(o,a,s,l){i[i.length]=s?xP(l,Ipe,"$1"):a||o}),i},Rpe=function(t,n){var r=t,i;if(kh(wP,r)&&(i=wP[r],r="%"+i[0]+"%"),kh(Ts,r)){var o=Ts[r];if(o===Ku&&(o=Cpe(r)),typeof o>"u"&&!n)throw new Wu("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Hu("intrinsic "+t+" does not exist!")},o0=function(t,n){if(typeof t!="string"||t.length===0)throw new Wu("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Wu('"allowMissing" argument must be a boolean');if($pe(/^%?[^%]*%?$/,t)===null)throw new Hu("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Ppe(t),i=r.length>0?r[0]:"",o=Rpe("%"+i+"%",n),a=o.name,s=o.value,l=!1,c=o.alias;c&&(i=c[0],Tpe(r,Ope([0,1],c)));for(var d=1,p=!0;d<r.length;d+=1){var m=r[d],h=Ih(m,0,1),y=Ih(m,-1);if((h==='"'||h==="'"||h==="`"||y==='"'||y==="'"||y==="`")&&h!==y)throw new Hu("property names with quotes must have matching quotes");if((m==="constructor"||!p)&&(l=!0),i+="."+m,a="%"+i+"%",kh(Ts,a))s=Ts[a];else if(s!=null){if(!(m in s)){if(!n)throw new Wu("base intrinsic for "+t+" exists, but the property is not available.");return}if(Os&&d+1>=r.length){var v=Os(s,m);p=!!v,p&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[m]}else p=kh(s,m),s=s[m];p&&!l&&(Ts[a]=s)}}return s},SP={exports:{}};(function(e){var t=n0,n=o0,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})(SP);var Npe=SP.exports,EP=o0,AP=Npe,Dpe=AP(EP("String.prototype.indexOf")),Mpe=function(t,n){var r=EP(t,!!n);return typeof r=="function"&&Dpe(t,".prototype.")>-1?AP(r):r},a0=typeof Map=="function"&&Map.prototype,s0=Object.getOwnPropertyDescriptor&&a0?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ph=a0&&s0&&typeof s0.get=="function"?s0.get:null,CP=a0&&Map.prototype.forEach,u0=typeof Set=="function"&&Set.prototype,l0=Object.getOwnPropertyDescriptor&&u0?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Rh=u0&&l0&&typeof l0.get=="function"?l0.get:null,OP=u0&&Set.prototype.forEach,jpe=typeof WeakMap=="function"&&WeakMap.prototype,zc=jpe?WeakMap.prototype.has:null,Lpe=typeof WeakSet=="function"&&WeakSet.prototype,Zc=Lpe?WeakSet.prototype.has:null,Fpe=typeof WeakRef=="function"&&WeakRef.prototype,TP=Fpe?WeakRef.prototype.deref:null,qpe=Boolean.prototype.valueOf,Upe=Object.prototype.toString,Bpe=Function.prototype.toString,zpe=String.prototype.match,c0=String.prototype.slice,xa=String.prototype.replace,Zpe=String.prototype.toUpperCase,$P=String.prototype.toLowerCase,kP=RegExp.prototype.test,IP=Array.prototype.concat,po=Array.prototype.join,Hpe=Array.prototype.slice,PP=Math.floor,f0=typeof BigInt=="function"?BigInt.prototype.valueOf:null,d0=Object.getOwnPropertySymbols,p0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Gu=typeof Symbol=="function"&&typeof Symbol.iterator=="object",xr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Gu||"symbol")?Symbol.toStringTag:null,RP=Object.prototype.propertyIsEnumerable,NP=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function DP(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||kP.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-PP(-e):PP(e);if(r!==e){var i=String(r),o=c0.call(t,i.length+1);return xa.call(i,n,"$&_")+"."+xa.call(xa.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return xa.call(t,n,"$&_")}var h0=As,MP=h0.custom,jP=qP(MP)?MP:null,Wpe=function e(t,n,r,i){var o=n||{};if(Sa(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Sa(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=Sa(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(Sa(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(Sa(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 BP(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?DP(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?DP(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 m0(t)?"[Array]":"[Object]";var p=che(o,r);if(typeof i>"u")i=[];else if(UP(i,t)>=0)return"[Circular]";function m(Q,G,V){if(G&&(i=Hpe.call(i),i.push(G)),V){var F={depth:o.depth};return Sa(o,"quoteStyle")&&(F.quoteStyle=o.quoteStyle),e(Q,F,r+1,i)}return e(Q,o,r+1,i)}if(typeof t=="function"&&!FP(t)){var h=the(t),y=Nh(t,m);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(y.length>0?" { "+po.call(y,", ")+" }":"")}if(qP(t)){var v=Gu?xa.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):p0.call(t);return typeof t=="object"&&!Gu?Hc(v):v}if(she(t)){for(var w="<"+$P.call(String(t.nodeName)),_=t.attributes||[],b=0;b<_.length;b++)w+=" "+_[b].name+"="+LP(Vpe(_[b].value),"double",o);return w+=">",t.childNodes&&t.childNodes.length&&(w+="..."),w+="</"+$P.call(String(t.nodeName))+">",w}if(m0(t)){if(t.length===0)return"[]";var S=Nh(t,m);return p&&!lhe(S)?"["+g0(S,p)+"]":"[ "+po.call(S,", ")+" ]"}if(Gpe(t)){var A=Nh(t,m);return!("cause"in Error.prototype)&&"cause"in t&&!RP.call(t,"cause")?"{ ["+String(t)+"] "+po.call(IP.call("[cause]: "+m(t.cause),A),", ")+" }":A.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+po.call(A,", ")+" }"}if(typeof t=="object"&&a){if(jP&&typeof t[jP]=="function"&&h0)return h0(t,{depth:d-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(nhe(t)){var E=[];return CP&&CP.call(t,function(Q,G){E.push(m(G,t,!0)+" => "+m(Q,t))}),zP("Map",Ph.call(t),E,p)}if(ohe(t)){var T=[];return OP&&OP.call(t,function(Q){T.push(m(Q,t))}),zP("Set",Rh.call(t),T,p)}if(rhe(t))return y0("WeakMap");if(ahe(t))return y0("WeakSet");if(ihe(t))return y0("WeakRef");if(Jpe(t))return Hc(m(Number(t)));if(Qpe(t))return Hc(m(f0.call(t)));if(Xpe(t))return Hc(qpe.call(t));if(Ype(t))return Hc(m(String(t)));if(!Kpe(t)&&!FP(t)){var j=Nh(t,m),q=NP?NP(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",M=!q&&xr&&Object(t)===t&&xr in t?c0.call(Ea(t),8,-1):L?"Object":"",H=q||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",re=H+(M||L?"["+po.call(IP.call([],M||[],L||[]),": ")+"] ":"");return j.length===0?re+"{}":p?re+"{"+g0(j,p)+"}":re+"{ "+po.call(j,", ")+" }"}return String(t)};function LP(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Vpe(e){return xa.call(String(e),/"/g,""")}function m0(e){return Ea(e)==="[object Array]"&&(!xr||!(typeof e=="object"&&xr in e))}function Kpe(e){return Ea(e)==="[object Date]"&&(!xr||!(typeof e=="object"&&xr in e))}function FP(e){return Ea(e)==="[object RegExp]"&&(!xr||!(typeof e=="object"&&xr in e))}function Gpe(e){return Ea(e)==="[object Error]"&&(!xr||!(typeof e=="object"&&xr in e))}function Ype(e){return Ea(e)==="[object String]"&&(!xr||!(typeof e=="object"&&xr in e))}function Jpe(e){return Ea(e)==="[object Number]"&&(!xr||!(typeof e=="object"&&xr in e))}function Xpe(e){return Ea(e)==="[object Boolean]"&&(!xr||!(typeof e=="object"&&xr in e))}function qP(e){if(Gu)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!p0)return!1;try{return p0.call(e),!0}catch{}return!1}function Qpe(e){if(!e||typeof e!="object"||!f0)return!1;try{return f0.call(e),!0}catch{}return!1}var ehe=Object.prototype.hasOwnProperty||function(e){return e in this};function Sa(e,t){return ehe.call(e,t)}function Ea(e){return Upe.call(e)}function the(e){if(e.name)return e.name;var t=zpe.call(Bpe.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function UP(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 nhe(e){if(!Ph||!e||typeof e!="object")return!1;try{Ph.call(e);try{Rh.call(e)}catch{return!0}return e instanceof Map}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 WeakMap}catch{}return!1}function ihe(e){if(!TP||!e||typeof e!="object")return!1;try{return TP.call(e),!0}catch{}return!1}function ohe(e){if(!Rh||!e||typeof e!="object")return!1;try{Rh.call(e);try{Ph.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ahe(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 she(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function BP(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return BP(c0.call(e,0,t.maxStringLength),t)+r}var i=xa.call(xa.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,uhe);return LP(i,"single",t)}function uhe(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":"")+Zpe.call(t.toString(16))}function Hc(e){return"Object("+e+")"}function y0(e){return e+" { ? }"}function zP(e,t,n,r){var i=r?g0(n,r):po.call(n,", ");return e+" ("+t+") {"+i+"}"}function lhe(e){for(var t=0;t<e.length;t++)if(UP(e[t],`
|
|
192
192
|
`)>=0)return!1;return!0}function che(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 g0(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 Nh(e,t){var n=m0(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 d0=="function"?d0(e):[],a;if(Gu){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||Gu&&a["$"+l]instanceof Symbol||(kP.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof d0=="function")for(var c=0;c<o.length;c++)RP.call(e,o[c])&&r.push("["+t(o[c])+"]: "+t(e[o[c]],e));return r}var v0=o0,Yu=Mpe,fhe=Wpe,dhe=v0("%TypeError%"),Dh=v0("%WeakMap%",!0),Mh=v0("%Map%",!0),phe=Yu("WeakMap.prototype.get",!0),hhe=Yu("WeakMap.prototype.set",!0),mhe=Yu("WeakMap.prototype.has",!0),yhe=Yu("Map.prototype.get",!0),ghe=Yu("Map.prototype.set",!0),vhe=Yu("Map.prototype.has",!0),b0=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},bhe=function(e,t){var n=b0(e,t);return n&&n.value},_he=function(e,t,n){var r=b0(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},whe=function(e,t){return!!b0(e,t)},xhe=function(){var t,n,r,i={assert:function(o){if(!i.has(o))throw new dhe("Side channel does not contain "+fhe(o))},get:function(o){if(Dh&&o&&(typeof o=="object"||typeof o=="function")){if(t)return phe(t,o)}else if(Mh){if(n)return yhe(n,o)}else if(r)return bhe(r,o)},has:function(o){if(Dh&&o&&(typeof o=="object"||typeof o=="function")){if(t)return mhe(t,o)}else if(Mh){if(n)return vhe(n,o)}else if(r)return whe(r,o);return!1},set:function(o,a){Dh&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new Dh),hhe(t,o,a)):Mh?(n||(n=new Mh),ghe(n,o,a)):(r||(r={key:{},next:null}),_he(r,o,a))}};return i},She=String.prototype.replace,Ehe=/%20/g,_0={RFC1738:"RFC1738",RFC3986:"RFC3986"},w0={default:_0.RFC3986,formatters:{RFC1738:function(e){return She.call(e,Ehe,"+")},RFC3986:function(e){return String(e)}},RFC1738:_0.RFC1738,RFC3986:_0.RFC3986},Ahe=w0,x0=Object.prototype.hasOwnProperty,$s=Array.isArray,ho=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Che=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if($s(r)){for(var i=[],o=0;o<r.length;++o)typeof r[o]<"u"&&i.push(r[o]);n.obj[n.prop]=i}}},ZP=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},Ohe=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if($s(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!x0.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 $s(t)&&!$s(n)&&(i=ZP(t,r)),$s(t)&&$s(n)?(n.forEach(function(o,a){if(x0.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 x0.call(o,a)?o[a]=e(o[a],s,r):o[a]=s,o},i)},The=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},$he=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}},khe=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===Ahe.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},Ihe=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 Che(n),t},Phe=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Rhe=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Nhe=function(t,n){return[].concat(t,n)},Dhe=function(t,n){if($s(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},HP={arrayToObject:ZP,assign:The,combine:Nhe,compact:Ihe,decode:$he,encode:khe,isBuffer:Rhe,isRegExp:Phe,maybeMap:Dhe,merge:Ohe},WP=xhe,jh=HP,Wc=w0,Mhe=Object.prototype.hasOwnProperty,VP={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Uo=Array.isArray,jhe=Array.prototype.push,KP=function(e,t){jhe.apply(e,Uo(t)?t:[t])},Lhe=Date.prototype.toISOString,GP=Wc.default,Sr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:jh.encode,encodeValuesOnly:!1,format:GP,formatter:Wc.formatters[GP],indices:!1,serializeDate:function(t){return Lhe.call(t)},skipNulls:!1,strictNullHandling:!1},Fhe=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},S0={},qhe=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(S0))!==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(S0)>"u"&&(S=0)}if(typeof l=="function"?_=l(n,_):_ instanceof Date?_=p(_):r==="comma"&&Uo(_)&&(_=jh.maybeMap(_,function(F){return F instanceof Date?p(F):F})),_===null){if(o)return s&&!y?s(n,Sr.encoder,v,"key",m):n;_=""}if(Fhe(_)||jh.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 q;if(r==="comma"&&Uo(_))y&&s&&(_=jh.maybeMap(_,s)),q=[{value:_.length>0?_.join(",")||null:void 0}];else if(Uo(l))q=l;else{var L=Object.keys(_);q=c?L.sort(c):L}for(var M=i&&Uo(_)&&_.length===1?n+"[]":n,H=0;H<q.length;++H){var re=q[H],Q=typeof re=="object"&&typeof re.value<"u"?re.value:_[re];if(!(a&&Q===null)){var G=Uo(_)?typeof r=="function"?r(M,re):M:M+(d?"."+re:"["+re+"]");w.set(t,S);var V=WP();V.set(S0,w),KP(j,e(Q,G,r,i,o,a,r==="comma"&&y&&Uo(_)?null:s,l,c,d,p,m,h,y,v,V))}}return j},Uhe=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(!Mhe.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"||Uo(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}},Bhe=function(e,t){var n=e,r=Uhe(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):Uo(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in VP?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var l=VP[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=WP(),p=0;p<i.length;++p){var m=i[p];r.skipNulls&&n[m]===null||KP(a,qhe(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:""},Ju=HP,E0=Object.prototype.hasOwnProperty,zhe=Array.isArray,ar={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ju.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Zhe=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},YP=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Hhe="utf8=%26%2310003%3B",Whe="utf8=%E2%9C%93",Vhe=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]===Whe?c="utf-8":a[l]===Hhe&&(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=Ju.maybeMap(YP(d.slice(m+1),n),function(v){return n.decoder(v,ar.decoder,c,"value")})),y&&n.interpretNumericEntities&&c==="iso-8859-1"&&(y=Zhe(y)),d.indexOf("[]=")>-1&&(y=zhe(y)?[y]:y),E0.call(r,h)?r[h]=Ju.combine(r[h],y):r[h]=y}return r},Khe=function(e,t,n,r){for(var i=r?t:YP(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},Ghe=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&&E0.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&&E0.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;d.push(l[1])}return l&&d.push("["+o.slice(l.index)+"]"),Khe(d,n,r,i)}},Yhe=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"||Ju.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}},Jhe=function(e,t){var n=Yhe(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Vhe(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;a<o.length;++a){var s=o[a],l=Ghe(s,r[s],n,typeof e=="string");i=Ju.merge(i,l,n)}return n.allowSparse===!0?i:Ju.compact(i)},Xhe=Bhe,Qhe=Jhe,eme=w0,tme={formats:eme,parse:Qhe,stringify:Xhe};const nme=Oo(tme),rme=e=>e[1]!==void 0,Vn=e=>{const{method:t,path:n,query:r,headers:i,body:o}=e,a=Object.entries(i).filter(rme),s=Object.fromEntries(a),l=nme.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}}),ome=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),ame=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),sme=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),ume=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:{}}),lme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),cme=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),fme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),dme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),pme=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:{}}),hme=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),mme=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),yme=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),gme=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),vme=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),bme=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),_me=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),wme=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),xme=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Sme=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 Eme=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}=ome(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}=ame(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}=sme(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}=ume(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}=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,"listConversations",async t=>{const{path:n,headers:r,query:i,body:o}=cme(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}=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,"listenConversation",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,"removeParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=pme(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}=hme(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}=mme(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}=yme(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}=gme(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}=vme(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}=bme(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}=_me(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}=wme(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}=xme(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}=Sme(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 mP.isAxiosError(e)&&((t=e.response)!=null&&t.data)?yP(e.response.data):yP(e)}class JP{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 A0={exports:{}};/** @license
|
|
194
|
+
`+t.prev}function Nh(e,t){var n=m0(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=Sa(e,i)?t(e[i],e):""}var o=typeof d0=="function"?d0(e):[],a;if(Gu){a={};for(var s=0;s<o.length;s++)a["$"+o[s]]=o[s]}for(var l in e)Sa(e,l)&&(n&&String(Number(l))===l&&l<e.length||Gu&&a["$"+l]instanceof Symbol||(kP.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof d0=="function")for(var c=0;c<o.length;c++)RP.call(e,o[c])&&r.push("["+t(o[c])+"]: "+t(e[o[c]],e));return r}var v0=o0,Yu=Mpe,fhe=Wpe,dhe=v0("%TypeError%"),Dh=v0("%WeakMap%",!0),Mh=v0("%Map%",!0),phe=Yu("WeakMap.prototype.get",!0),hhe=Yu("WeakMap.prototype.set",!0),mhe=Yu("WeakMap.prototype.has",!0),yhe=Yu("Map.prototype.get",!0),ghe=Yu("Map.prototype.set",!0),vhe=Yu("Map.prototype.has",!0),b0=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},bhe=function(e,t){var n=b0(e,t);return n&&n.value},_he=function(e,t,n){var r=b0(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},whe=function(e,t){return!!b0(e,t)},xhe=function(){var t,n,r,i={assert:function(o){if(!i.has(o))throw new dhe("Side channel does not contain "+fhe(o))},get:function(o){if(Dh&&o&&(typeof o=="object"||typeof o=="function")){if(t)return phe(t,o)}else if(Mh){if(n)return yhe(n,o)}else if(r)return bhe(r,o)},has:function(o){if(Dh&&o&&(typeof o=="object"||typeof o=="function")){if(t)return mhe(t,o)}else if(Mh){if(n)return vhe(n,o)}else if(r)return whe(r,o);return!1},set:function(o,a){Dh&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new Dh),hhe(t,o,a)):Mh?(n||(n=new Mh),ghe(n,o,a)):(r||(r={key:{},next:null}),_he(r,o,a))}};return i},She=String.prototype.replace,Ehe=/%20/g,_0={RFC1738:"RFC1738",RFC3986:"RFC3986"},w0={default:_0.RFC3986,formatters:{RFC1738:function(e){return She.call(e,Ehe,"+")},RFC3986:function(e){return String(e)}},RFC1738:_0.RFC1738,RFC3986:_0.RFC3986},Ahe=w0,x0=Object.prototype.hasOwnProperty,$s=Array.isArray,ho=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Che=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if($s(r)){for(var i=[],o=0;o<r.length;++o)typeof r[o]<"u"&&i.push(r[o]);n.obj[n.prop]=i}}},ZP=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},Ohe=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if($s(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!x0.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 $s(t)&&!$s(n)&&(i=ZP(t,r)),$s(t)&&$s(n)?(n.forEach(function(o,a){if(x0.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 x0.call(o,a)?o[a]=e(o[a],s,r):o[a]=s,o},i)},The=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},$he=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}},khe=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===Ahe.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},Ihe=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 Che(n),t},Phe=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Rhe=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Nhe=function(t,n){return[].concat(t,n)},Dhe=function(t,n){if($s(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},HP={arrayToObject:ZP,assign:The,combine:Nhe,compact:Ihe,decode:$he,encode:khe,isBuffer:Rhe,isRegExp:Phe,maybeMap:Dhe,merge:Ohe},WP=xhe,jh=HP,Wc=w0,Mhe=Object.prototype.hasOwnProperty,VP={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Uo=Array.isArray,jhe=Array.prototype.push,KP=function(e,t){jhe.apply(e,Uo(t)?t:[t])},Lhe=Date.prototype.toISOString,GP=Wc.default,Sr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:jh.encode,encodeValuesOnly:!1,format:GP,formatter:Wc.formatters[GP],indices:!1,serializeDate:function(t){return Lhe.call(t)},skipNulls:!1,strictNullHandling:!1},Fhe=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},S0={},qhe=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(S0))!==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(S0)>"u"&&(S=0)}if(typeof l=="function"?_=l(n,_):_ instanceof Date?_=p(_):r==="comma"&&Uo(_)&&(_=jh.maybeMap(_,function(F){return F instanceof Date?p(F):F})),_===null){if(o)return s&&!y?s(n,Sr.encoder,v,"key",m):n;_=""}if(Fhe(_)||jh.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 q;if(r==="comma"&&Uo(_))y&&s&&(_=jh.maybeMap(_,s)),q=[{value:_.length>0?_.join(",")||null:void 0}];else if(Uo(l))q=l;else{var L=Object.keys(_);q=c?L.sort(c):L}for(var M=i&&Uo(_)&&_.length===1?n+"[]":n,H=0;H<q.length;++H){var re=q[H],Q=typeof re=="object"&&typeof re.value<"u"?re.value:_[re];if(!(a&&Q===null)){var G=Uo(_)?typeof r=="function"?r(M,re):M:M+(d?"."+re:"["+re+"]");w.set(t,S);var V=WP();V.set(S0,w),KP(j,e(Q,G,r,i,o,a,r==="comma"&&y&&Uo(_)?null:s,l,c,d,p,m,h,y,v,V))}}return j},Uhe=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(!Mhe.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"||Uo(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}},Bhe=function(e,t){var n=e,r=Uhe(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):Uo(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in VP?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var l=VP[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=WP(),p=0;p<i.length;++p){var m=i[p];r.skipNulls&&n[m]===null||KP(a,qhe(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:""},Ju=HP,E0=Object.prototype.hasOwnProperty,zhe=Array.isArray,ar={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ju.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Zhe=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},YP=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Hhe="utf8=%26%2310003%3B",Whe="utf8=%E2%9C%93",Vhe=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]===Whe?c="utf-8":a[l]===Hhe&&(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=Ju.maybeMap(YP(d.slice(m+1),n),function(v){return n.decoder(v,ar.decoder,c,"value")})),y&&n.interpretNumericEntities&&c==="iso-8859-1"&&(y=Zhe(y)),d.indexOf("[]=")>-1&&(y=zhe(y)?[y]:y),E0.call(r,h)?r[h]=Ju.combine(r[h],y):r[h]=y}return r},Khe=function(e,t,n,r){for(var i=r?t:YP(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},Ghe=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&&E0.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&&E0.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;d.push(l[1])}return l&&d.push("["+o.slice(l.index)+"]"),Khe(d,n,r,i)}},Yhe=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"||Ju.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}},Jhe=function(e,t){var n=Yhe(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Vhe(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;a<o.length;++a){var s=o[a],l=Ghe(s,r[s],n,typeof e=="string");i=Ju.merge(i,l,n)}return n.allowSparse===!0?i:Ju.compact(i)},Xhe=Bhe,Qhe=Jhe,eme=w0,tme={formats:eme,parse:Qhe,stringify:Xhe};const nme=Oo(tme),rme=e=>e[1]!==void 0,Vn=e=>{const{method:t,path:n,query:r,headers:i,body:o}=e,a=Object.entries(i).filter(rme),s=Object.fromEntries(a),l=nme.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}}),ome=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),ame=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),sme=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),ume=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:{}}),lme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),cme=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),fme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),dme=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),pme=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:{}}),hme=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),mme=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),yme=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),gme=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),vme=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),bme=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),_me=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),wme=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),xme=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Sme=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 Eme=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}=ome(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}=ame(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}=sme(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}=ume(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}=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,"listConversations",async t=>{const{path:n,headers:r,query:i,body:o}=cme(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}=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,"listenConversation",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,"removeParticipant",async t=>{const{path:n,headers:r,query:i,body:o}=pme(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}=hme(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}=mme(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}=yme(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}=gme(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}=vme(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}=bme(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}=_me(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}=wme(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}=xme(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}=Sme(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 mP.isAxiosError(e)&&((t=e.response)!=null&&t.data)?yP(e.response.data):yP(e)}class JP{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 A0={exports:{}};/** @license
|
|
195
195
|
* eventsource.js
|
|
196
196
|
* Available under MIT License (MIT)
|
|
197
197
|
* https://github.com/Yaffle/EventSource/
|
|
@@ -200,7 +200,7 @@ ${ap(e.value)}`.trim();case St.ZodFirstPartyTypeKind.ZodEnum:return s.values.map
|
|
|
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(),ye+=Xe.length);for(var Jt=0;Jt<Pt.length;Jt+=1){var _t=Pt.charCodeAt(Jt);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=Jt+1);var bn=Pt.slice(on,pt-1),Rn=Pt.slice(pt+(pt<Jt&&Pt.charCodeAt(pt)===" ".charCodeAt(0)?1:0),Jt);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),Yt!==0&&(i(Yt),Yt=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=Jt,At=Oe),At===Oe?_t===":".charCodeAt(0)&&(pt=Jt+1,At=D):At===D&&(At=De)}}},N=function(Xe){if(cn===ne||cn===Y){cn=F,Yt!==0&&(i(Yt),Yt=0),Yt=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),Yt!==0&&(i(Yt),Yt=0),K.readyState=ce},He=function(){if(Yt=0,cn!==F){if(!ie&&rn!=null)N(new Error("No activity within "+ot+" milliseconds. "+(cn===Y?"No response received.":ye+" chars received.")+" Reconnecting.")),rn!=null&&(rn.abort(),rn=void 0);else{var Xe=Math.max((ie||Date.now())+ot-Date.now(),1);ie=!1,Yt=r(function(){He()},Xe)}return}ie=!1,ye=0,Yt=r(function(){He()},ot),cn=Y,Cn="",ae="",ee=It,ft="",on=0,pt=0,At=ue;var Re=de;if(de.slice(0,5)!=="data:"&&de.slice(0,5)!=="blob:"&&It!==""){var We=de.indexOf("?");Re=We===-1?de:de.slice(0,We+1)+de.slice(We+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Rn,mr){return mr===et?"":Rn}),Re+=(de.indexOf("?")===-1?"?":"&")+et+"="+encodeURIComponent(It)}var _t=K.withCredentials,Pt={};Pt.Accept="text/event-stream";var Jt=K.headers;if(Jt!=null)for(var bn in Jt)Object.prototype.hasOwnProperty.call(Jt,bn)&&(Pt[bn]=Jt[bn]);try{rn=pn.open(ct,Mn,sr,N,Re,_t,Pt)}catch(Rn){throw je(),Rn}};K.url=de,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 de=K(t);de!==void 0&&(e.exports=de)}}(function(K){K.EventSourcePolyfill=Ae,K.NativeEventSource=l,K.EventSource=lt})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:se:globalThis)})(A0,A0.exports);var Ame=A0.exports;const Cme=Oo(Ame),Ome=(e,t={})=>{const n=new Cme.EventSourcePolyfill(e,{headers:t.headers}),r=new JP;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}},Tme=async(e,t={})=>{const{emitter:n,source:r}=Ome(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 C0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(C0||(C0={}));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}},Ne=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"]),$me=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Li 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()}}Li.create=e=>new Li(e);const Vc=(e,t)=>{let n;switch(e.code){case Ne.invalid_type:e.received===Qe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ne.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,sn.jsonStringifyReplacer)}`;break;case Ne.unrecognized_keys:n=`Unrecognized key(s) in object: ${sn.joinValues(e.keys,", ")}`;break;case Ne.invalid_union:n="Invalid input";break;case Ne.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${sn.joinValues(e.options)}`;break;case Ne.invalid_enum_value:n=`Invalid enum value. Expected ${sn.joinValues(e.options)}, received '${e.received}'`;break;case Ne.invalid_arguments:n="Invalid function arguments";break;case Ne.invalid_return_type:n="Invalid function return type";break;case Ne.invalid_date:n="Invalid date";break;case Ne.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 Ne.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 Ne.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 Ne.custom:n="Invalid input";break;case Ne.invalid_intersection_types:n="Intersection results could not be merged";break;case Ne.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ne.not_finite:n="Number must be finite";break;default:n=t.defaultError,sn.assertNever(e)}return{message:n}};let XP=Vc;function kme(e){XP=e}function Lh(){return XP}const Fh=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}},Ime=[];function tt(e,t){const n=Fh({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Lh(),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"}),QP=e=>({status:"dirty",value:e}),jr=e=>({status:"valid",value:e}),O0=e=>e.status==="aborted",T0=e=>e.status==="dirty",Kc=e=>e.status==="valid",qh=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 eR=(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 Li(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 jt{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(qh(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 eR(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(qh(i)?i:Promise.resolve(i));return eR(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:Ne.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 Ui({schema:this,typeName:Et.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return zo.create(this,this._def)}nullable(){return Rs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qi.create(this,this._def)}promise(){return tl.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 Ui({...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 nR({typeName:Et.ZodBranded,type:this,...Nt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Wh({...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 Kh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Pme=/^c[^\s-]{8,}$/i,Rme=/^[a-z][a-z0-9]*$/,Nme=/^[0-9A-HJKMNP-TV-Z]{26}$/,Dme=/^[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,Mme=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,jme="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let $0;const Lme=/^(((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}))$/,Fme=/^(([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})))$/,qme=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 Ume(e,t){return!!((t==="v4"||!t)&&Lme.test(e)||(t==="v6"||!t)&&Fme.test(e))}class Fi extends jt{_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:Ne.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:Ne.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:Ne.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:Ne.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&tt(i,{code:Ne.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Mme.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"email",code:Ne.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")$0||($0=new RegExp(jme,"u")),$0.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"emoji",code:Ne.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")Dme.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"uuid",code:Ne.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")Pme.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"cuid",code:Ne.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")Rme.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"cuid2",code:Ne.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")Nme.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"ulid",code:Ne.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:Ne.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:Ne.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:Ne.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:Ne.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:Ne.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?qme(o).test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{code:Ne.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?Ume(t.data,o.version)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"ip",code:Ne.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:Ne.invalid_string,...dt.errToObj(r)})}_addCheck(t){return new Fi({...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 Fi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Fi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Fi({...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}}Fi.create=e=>{var t;return new Fi({checks:[],typeName:Et.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Nt(e)})};function Bme(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 jt{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:Ne.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:Ne.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:Ne.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:Ne.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Bme(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ne.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:Ne.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 jt{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:Ne.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:Ne.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:Ne.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:Ne.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 jt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Qe.boolean){const r=this._getOrReturnCtx(t);return tt(r,{code:Ne.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 ks extends jt{_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:Ne.invalid_type,expected:Qe.date,received:o.parsedType}),$t}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return tt(o,{code:Ne.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:Ne.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:Ne.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 ks({...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}}ks.create=e=>new ks({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Et.ZodDate,...Nt(e)});class Uh extends jt{_parse(t){if(this._getType(t)!==Qe.symbol){const r=this._getOrReturnCtx(t);return tt(r,{code:Ne.invalid_type,expected:Qe.symbol,received:r.parsedType}),$t}return jr(t.data)}}Uh.create=e=>new Uh({typeName:Et.ZodSymbol,...Nt(e)});class Yc extends jt{_parse(t){if(this._getType(t)!==Qe.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:Ne.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 jt{_parse(t){if(this._getType(t)!==Qe.null){const r=this._getOrReturnCtx(t);return tt(r,{code:Ne.invalid_type,expected:Qe.null,received:r.parsedType}),$t}return jr(t.data)}}Jc.create=e=>new Jc({typeName:Et.ZodNull,...Nt(e)});class Xu extends jt{constructor(){super(...arguments),this._any=!0}_parse(t){return jr(t.data)}}Xu.create=e=>new Xu({typeName:Et.ZodAny,...Nt(e)});class Is extends jt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return jr(t.data)}}Is.create=e=>new Is({typeName:Et.ZodUnknown,...Nt(e)});class Bo extends jt{_parse(t){const n=this._getOrReturnCtx(t);return tt(n,{code:Ne.invalid_type,expected:Qe.never,received:n.parsedType}),$t}}Bo.create=e=>new Bo({typeName:Et.ZodNever,...Nt(e)});class Bh extends jt{_parse(t){if(this._getType(t)!==Qe.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:Ne.invalid_type,expected:Qe.void,received:r.parsedType}),$t}return jr(t.data)}}Bh.create=e=>new Bh({typeName:Et.ZodVoid,...Nt(e)});class qi extends jt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Qe.array)return tt(n,{code:Ne.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?Ne.too_big:Ne.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:Ne.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:Ne.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 qi({...this._def,minLength:{value:t,message:dt.toString(n)}})}max(t,n){return new qi({...this._def,maxLength:{value:t,message:dt.toString(n)}})}length(t,n){return new qi({...this._def,exactLength:{value:t,message:dt.toString(n)}})}nonempty(t){return this.min(1,t)}}qi.create=(e,t)=>new qi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Et.ZodArray,...Nt(t)});function Qu(e){if(e instanceof Pn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=zo.create(Qu(r))}return new Pn({...e._def,shape:()=>t})}else return e instanceof qi?new qi({...e._def,type:Qu(e.element)}):e instanceof zo?zo.create(Qu(e.unwrap())):e instanceof Rs?Rs.create(Qu(e.unwrap())):e instanceof yo?yo.create(e.items.map(t=>Qu(t))):e}class Pn extends jt{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:Ne.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 Bo&&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 Bo){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:Ne.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 Qu(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 zo;)o=o._def.innerType;n[r]=o}}),new Pn({...this._def,shape:()=>n})}keyof(){return tR(sn.objectKeys(this.shape))}}Pn.create=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strip",catchall:Bo.create(),typeName:Et.ZodObject,...Nt(t)}),Pn.strictCreate=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strict",catchall:Bo.create(),typeName:Et.ZodObject,...Nt(t)}),Pn.lazycreate=(e,t)=>new Pn({shape:e,unknownKeys:"strip",catchall:Bo.create(),typeName:Et.ZodObject,...Nt(t)});class Xc extends jt{_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 Li(s.ctx.common.issues));return tt(n,{code:Ne.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 Li(l));return tt(n,{code:Ne.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 zh=e=>e instanceof tf?zh(e.schema):e instanceof Ui?zh(e.innerType()):e instanceof nf?[e.value]:e instanceof Oa?e.options:e instanceof rf?Object.keys(e.enum):e instanceof of?zh(e._def.innerType):e instanceof Yc?[void 0]:e instanceof Jc?[null]:null;class Zh extends jt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Qe.object)return tt(n,{code:Ne.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:Ne.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=zh(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 Zh({typeName:Et.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Nt(r)})}}function k0(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=k0(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=k0(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 jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(O0(o)||O0(a))return $t;const s=k0(o.value,a.value);return s.valid?((T0(o)||T0(a))&&n.dirty(),{status:n.value,value:s.data}):(tt(r,{code:Ne.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 jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Qe.array)return tt(r,{code:Ne.invalid_type,expected:Qe.array,received:r.parsedType}),$t;if(r.data.length<this._def.items.length)return tt(r,{code:Ne.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:Ne.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 jt{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:Ne.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 jt?new ef({keyType:t,valueType:n,typeName:Et.ZodRecord,...Nt(r)}):new ef({keyType:Fi.create(),valueType:t,typeName:Et.ZodRecord,...Nt(n)})}}class Hh extends jt{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:Ne.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}}}}Hh.create=(e,t,n)=>new Hh({valueType:t,keyType:e,typeName:Et.ZodMap,...Nt(n)});class Ps extends jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Qe.set)return tt(r,{code:Ne.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:Ne.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:Ne.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 Ps({...this._def,minSize:{value:t,message:dt.toString(n)}})}max(t,n){return new Ps({...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)}}Ps.create=(e,t)=>new Ps({valueType:e,minSize:null,maxSize:null,typeName:Et.ZodSet,...Nt(t)});class el extends jt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Qe.function)return tt(n,{code:Ne.invalid_type,expected:Qe.function,received:n.parsedType}),$t;function r(s,l){return Fh({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Lh(),Vc].filter(c=>!!c),issueData:{code:Ne.invalid_arguments,argumentsError:l}})}function i(s,l){return Fh({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Lh(),Vc].filter(c=>!!c),issueData:{code:Ne.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof tl){const s=this;return jr(async function(...l){const c=new Li([]),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 Li([r(l,c.error)]);const d=Reflect.apply(a,this,c.data),p=s._def.returns.safeParse(d,o);if(!p.success)throw new Li([i(d,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new el({...this._def,args:yo.create(t).rest(Is.create())})}returns(t){return new el({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new el({args:t||yo.create([]).rest(Is.create()),returns:n||Is.create(),typeName:Et.ZodFunction,...Nt(r)})}}class tf extends jt{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 jt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return tt(n,{received:n.data,code:Ne.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 tR(e,t){return new Oa({values:e,typeName:Et.ZodEnum,...Nt(t)})}class Oa extends jt{_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:Ne.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:Ne.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=tR;class rf extends jt{_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:Ne.invalid_type}),$t}if(n.indexOf(t.data)===-1){const i=sn.objectValues(n);return tt(r,{received:r.data,code:Ne.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 tl extends jt{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:Ne.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})))}}tl.create=(e,t)=>new tl({type:e,typeName:Et.ZodPromise,...Nt(t)});class Ui extends jt{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)}}Ui.create=(e,t,n)=>new Ui({schema:e,typeName:Et.ZodEffects,effect:t,...Nt(n)}),Ui.createWithPreprocess=(e,t,n)=>new Ui({schema:t,effect:{type:"preprocess",transform:e},typeName:Et.ZodEffects,...Nt(n)});class zo extends jt{_parse(t){return this._getType(t)===Qe.undefined?jr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}zo.create=(e,t)=>new zo({innerType:e,typeName:Et.ZodOptional,...Nt(t)});class Rs extends jt{_parse(t){return this._getType(t)===Qe.null?jr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rs.create=(e,t)=>new Rs({innerType:e,typeName:Et.ZodNullable,...Nt(t)});class of extends jt{_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 Wh extends jt{_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 qh(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Li(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Li(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Wh.create=(e,t)=>new Wh({innerType:e,typeName:Et.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Nt(t)});class Vh extends jt{_parse(t){if(this._getType(t)!==Qe.nan){const r=this._getOrReturnCtx(t);return tt(r,{code:Ne.invalid_type,expected:Qe.nan,received:r.parsedType}),$t}return{status:"valid",value:t.data}}}Vh.create=e=>new Vh({typeName:Et.ZodNaN,...Nt(e)});const zme=Symbol("zod_brand");class nR extends jt{_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 jt{_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(),QP(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 Kh extends jt{_parse(t){const n=this._def.innerType._parse(t);return Kc(n)&&(n.value=Object.freeze(n.value)),n}}Kh.create=(e,t)=>new Kh({innerType:e,typeName:Et.ZodReadonly,...Nt(t)});const rR=(e,t={},n)=>e?Xu.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})}}):Xu.create(),Zme={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 Hme=(e,t={message:`Input not instance of ${e.name}`})=>rR(n=>n instanceof e,t),iR=Fi.create,oR=Aa.create,Wme=Vh.create,Vme=Ca.create,aR=Gc.create,Kme=ks.create,Gme=Uh.create,Yme=Yc.create,Jme=Jc.create,Xme=Xu.create,Qme=Is.create,eye=Bo.create,tye=Bh.create,nye=qi.create,rye=Pn.create,iye=Pn.strictCreate,oye=Xc.create,aye=Zh.create,sye=Qc.create,uye=yo.create,lye=ef.create,cye=Hh.create,fye=Ps.create,dye=el.create,pye=tf.create,hye=nf.create,mye=Oa.create,yye=rf.create,gye=tl.create,sR=Ui.create,vye=zo.create,bye=Rs.create,_ye=Ui.createWithPreprocess,wye=af.create;var oe=Object.freeze({__proto__:null,defaultErrorMap:Vc,setErrorMap:kme,getErrorMap:Lh,makeIssue:Fh,EMPTY_PATH:Ime,addIssueToContext:tt,ParseStatus:Er,INVALID:$t,DIRTY:QP,OK:jr,isAborted:O0,isDirty:T0,isValid:Kc,isAsync:qh,get util(){return sn},get objectUtil(){return C0},ZodParsedType:Qe,getParsedType:Ea,ZodType:jt,ZodString:Fi,ZodNumber:Aa,ZodBigInt:Ca,ZodBoolean:Gc,ZodDate:ks,ZodSymbol:Uh,ZodUndefined:Yc,ZodNull:Jc,ZodAny:Xu,ZodUnknown:Is,ZodNever:Bo,ZodVoid:Bh,ZodArray:qi,ZodObject:Pn,ZodUnion:Xc,ZodDiscriminatedUnion:Zh,ZodIntersection:Qc,ZodTuple:yo,ZodRecord:ef,ZodMap:Hh,ZodSet:Ps,ZodFunction:el,ZodLazy:tf,ZodLiteral:nf,ZodEnum:Oa,ZodNativeEnum:rf,ZodPromise:tl,ZodEffects:Ui,ZodTransformer:Ui,ZodOptional:zo,ZodNullable:Rs,ZodDefault:of,ZodCatch:Wh,ZodNaN:Vh,BRAND:zme,ZodBranded:nR,ZodPipeline:af,ZodReadonly:Kh,custom:rR,Schema:jt,ZodSchema:jt,late:Zme,get ZodFirstPartyTypeKind(){return Et},coerce:{string:e=>Fi.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=>ks.create({...e,coerce:!0})},any:Xme,array:nye,bigint:Vme,boolean:aR,date:Kme,discriminatedUnion:aye,effect:sR,enum:mye,function:dye,instanceof:Hme,intersection:sye,lazy:pye,literal:hye,map:cye,nan:Wme,nativeEnum:yye,never:eye,null:Jme,nullable:bye,number:oR,object:rye,oboolean:()=>aR().optional(),onumber:()=>oR().optional(),optional:vye,ostring:()=>iR().optional(),pipeline:wye,preprocess:_ye,promise:gye,record:lye,set:fye,strictObject:iye,string:iR,symbol:Gme,transformer:sR,tuple:uye,undefined:Yme,union:oye,unknown:Qme,void:tye,NEVER:$t,ZodIssueCode:Ne,quotelessJson:$me,ZodError:Li});const xye=oe.object({type:oe.literal("message_created"),data:oe.object({id:oe.string(),createdAt:oe.string().datetime(),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")})]),userId:oe.string(),conversationId:oe.string()})}),Sye=oe.object({type:oe.literal("webchat_visibility"),data:oe.object({visibility:oe.enum(["show","hide","toggle"])})}),Eye=oe.object({type:oe.literal("webchat_config"),data:oe.object({config:oe.record(oe.any())})}),Aye=oe.object({type:oe.literal("custom"),data:oe.object({event:oe.record(oe.any())})}),Cye={messageCreated:xye,webchatVisibility:Sye,webchatConfig:Eye,custom:Aye},uR="unknown error",fy=class fy extends JP{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 Tme(`${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(Cye)){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(uR);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(uR)}});this._props=n}get status(){return this._state.status}};R(fy,"listen",async n=>{const r=new fy(n);return await r.connect(),r});let I0=fy;const lR=100*1024*1024,Oye=lR,Tye=lR,$ye=6e4;class kye{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 I0.listen({url:this.props.apiUrl,conversationId:t,userKey:n}));this.props=t;const{apiUrl:n}=t,r={...t.headers},i=t.timeout??$ye,o=mP.create({baseURL:n,headers:r,withCredentials:!0,timeout:i,maxBodyLength:Oye,maxContentLength:Tye});this._auto=new Eme(o)}}const Gh={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},Kr=(e,t)=>e.status===t,go=(e,t)=>Gh[e.status]<Gh[t],cR=(e,t)=>Gh[e.status]>=Gh[t];class vo extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const fR=["audio","file","image","video"],dR=e=>fR.includes(e);class Iye extends ig{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(cR(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(cR(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}=Cfe(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 kye({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=dR(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(t0(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(t0(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 pR=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>n==="messaging"?new Ofe({url:t,clientId:e}):new Iye({apiUrl:t,clientId:e}),Pye=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>{const[r]=C.useState(pR({clientId:e,apiUrl:t,mode:n}));return r};function Rye(e,t){const n=t?`The ${t} has been copied to your clipboard.`:"Copied to clipboard.";return navigator.clipboard.writeText(e).then(()=>Gge({title:n,type:"success"}))}const Nye=(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 Dye={data:""},Mye=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Dye,jye=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Lye=/\/\*[^]*?\*\/| +/g,hR=/\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={},mR=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+mR(e[n]);return t}return e},Fye=(e,t,n,r,i)=>{let o=mR(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=jye.exec(c.replace(Lye,""));)d[4]?m.shift():d[3]?(p=d[3].replace(hR," ").trim(),m.unshift(m[0][p]=m[0][p]||{})):m[0][d[1]]=d[2].replace(hR," ").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},qye=(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 Yh(e){let t=this||{},n=e.call?e(t.p):e;return Fye(n.unshift?n.raw?qye(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,Mye(t.target),t.g,t.o,t.k)}let yR,P0,R0;Yh.bind({g:1});let Ho=Yh.bind({k:1});function Uye(e,t,n,r){Ta.p=t,yR=e,P0=n,R0=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:P0&&P0()},s),n.o=/ *go\d+/.test(l),s.className=Yh.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),R0&&c[0]&&R0(s),yR(c,s)}return t?t(i):i}}var Bye=e=>typeof e=="function",Jh=(e,t)=>Bye(e)?e(t):e,zye=(()=>{let e=0;return()=>(++e).toString()})(),gR=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Zye=20,Xh=new Map,Hye=1e3,vR=e=>{if(Xh.has(e))return;let t=setTimeout(()=>{Xh.delete(e),Ns({type:4,toastId:e})},Hye);Xh.set(e,t)},Wye=e=>{let t=Xh.get(e);t&&clearTimeout(t)},N0=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Zye)};case 1:return t.toast.id&&Wye(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)?N0(e,{type:1,toast:n}):N0(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?vR(r):e.toasts.forEach(o=>{vR(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}))}}},Qh=[],em={toasts:[],pausedAt:void 0},Ns=e=>{em=N0(em,e),Qh.forEach(t=>{t(em)})},Vye={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Kye=(e={})=>{let[t,n]=C.useState(em);C.useEffect(()=>(Qh.push(n),()=>{let i=Qh.indexOf(n);i>-1&&Qh.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)||Vye[i.type],style:{...e.style,...(a=e[i.type])==null?void 0:a.style,...i.style}}});return{...t,toasts:r}},Gye=(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)||zye()}),sf=e=>(t,n)=>{let r=Gye(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(Jh(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Gr.error(Jh(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var Yye=(e,t)=>{Ns({type:1,toast:{id:e,height:t}})},Jye=()=>{Ns({type:5,time:Date.now()})},Xye=e=>{let{toasts:t,pausedAt:n}=Kye(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:Yye,startPause:Jye,endPause:r,calculateOffset:i}}},Qye=Ho`
|
|
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),Yt!==0&&(i(Yt),Yt=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=Jt,At=Oe),At===Oe?_t===":".charCodeAt(0)&&(pt=Jt+1,At=D):At===D&&(At=De)}}},N=function(Xe){if(cn===ne||cn===Y){cn=F,Yt!==0&&(i(Yt),Yt=0),Yt=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),Yt!==0&&(i(Yt),Yt=0),K.readyState=ce},He=function(){if(Yt=0,cn!==F){if(!ie&&rn!=null)N(new Error("No activity within "+ot+" milliseconds. "+(cn===Y?"No response received.":ye+" chars received.")+" Reconnecting.")),rn!=null&&(rn.abort(),rn=void 0);else{var Xe=Math.max((ie||Date.now())+ot-Date.now(),1);ie=!1,Yt=r(function(){He()},Xe)}return}ie=!1,ye=0,Yt=r(function(){He()},ot),cn=Y,Cn="",ae="",ee=It,ft="",on=0,pt=0,At=ue;var Re=de;if(de.slice(0,5)!=="data:"&&de.slice(0,5)!=="blob:"&&It!==""){var We=de.indexOf("?");Re=We===-1?de:de.slice(0,We+1)+de.slice(We+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Rn,mr){return mr===et?"":Rn}),Re+=(de.indexOf("?")===-1?"?":"&")+et+"="+encodeURIComponent(It)}var _t=K.withCredentials,Pt={};Pt.Accept="text/event-stream";var Jt=K.headers;if(Jt!=null)for(var bn in Jt)Object.prototype.hasOwnProperty.call(Jt,bn)&&(Pt[bn]=Jt[bn]);try{rn=pn.open(ct,Mn,sr,N,Re,_t,Pt)}catch(Rn){throw je(),Rn}};K.url=de,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 de=K(t);de!==void 0&&(e.exports=de)}}(function(K){K.EventSourcePolyfill=Ae,K.NativeEventSource=l,K.EventSource=lt})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:se:globalThis)})(A0,A0.exports);var Ame=A0.exports;const Cme=Oo(Ame),Ome=(e,t={})=>{const n=new Cme.EventSourcePolyfill(e,{headers:t.headers}),r=new JP;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}},Tme=async(e,t={})=>{const{emitter:n,source:r}=Ome(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 C0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(C0||(C0={}));const Qe=sn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Aa=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}},Ne=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"]),$me=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Li 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()}}Li.create=e=>new Li(e);const Vc=(e,t)=>{let n;switch(e.code){case Ne.invalid_type:e.received===Qe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ne.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,sn.jsonStringifyReplacer)}`;break;case Ne.unrecognized_keys:n=`Unrecognized key(s) in object: ${sn.joinValues(e.keys,", ")}`;break;case Ne.invalid_union:n="Invalid input";break;case Ne.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${sn.joinValues(e.options)}`;break;case Ne.invalid_enum_value:n=`Invalid enum value. Expected ${sn.joinValues(e.options)}, received '${e.received}'`;break;case Ne.invalid_arguments:n="Invalid function arguments";break;case Ne.invalid_return_type:n="Invalid function return type";break;case Ne.invalid_date:n="Invalid date";break;case Ne.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 Ne.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 Ne.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 Ne.custom:n="Invalid input";break;case Ne.invalid_intersection_types:n="Intersection results could not be merged";break;case Ne.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ne.not_finite:n="Number must be finite";break;default:n=t.defaultError,sn.assertNever(e)}return{message:n}};let XP=Vc;function kme(e){XP=e}function Lh(){return XP}const Fh=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}},Ime=[];function tt(e,t){const n=Fh({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Lh(),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"}),QP=e=>({status:"dirty",value:e}),jr=e=>({status:"valid",value:e}),O0=e=>e.status==="aborted",T0=e=>e.status==="dirty",Kc=e=>e.status==="valid",qh=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 eR=(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 Li(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 jt{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 Aa(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Aa(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:Aa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(qh(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:Aa(t)},o=this._parseSync({data:t,path:i.path,parent:i});return eR(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:Aa(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(qh(i)?i:Promise.resolve(i));return eR(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:Ne.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 Ui({schema:this,typeName:Et.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return zo.create(this,this._def)}nullable(){return Rs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qi.create(this,this._def)}promise(){return tl.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 Ui({...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 nR({typeName:Et.ZodBranded,type:this,...Nt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Wh({...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 Kh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Pme=/^c[^\s-]{8,}$/i,Rme=/^[a-z][a-z0-9]*$/,Nme=/^[0-9A-HJKMNP-TV-Z]{26}$/,Dme=/^[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,Mme=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,jme="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let $0;const Lme=/^(((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}))$/,Fme=/^(([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})))$/,qme=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 Ume(e,t){return!!((t==="v4"||!t)&&Lme.test(e)||(t==="v6"||!t)&&Fme.test(e))}class Fi extends jt{_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:Ne.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:Ne.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:Ne.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:Ne.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&tt(i,{code:Ne.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Mme.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"email",code:Ne.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")$0||($0=new RegExp(jme,"u")),$0.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"emoji",code:Ne.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")Dme.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"uuid",code:Ne.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")Pme.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"cuid",code:Ne.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")Rme.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"cuid2",code:Ne.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")Nme.test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"ulid",code:Ne.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:Ne.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:Ne.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:Ne.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:Ne.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:Ne.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?qme(o).test(t.data)||(i=this._getOrReturnCtx(t,i),tt(i,{code:Ne.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?Ume(t.data,o.version)||(i=this._getOrReturnCtx(t,i),tt(i,{validation:"ip",code:Ne.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:Ne.invalid_string,...dt.errToObj(r)})}_addCheck(t){return new Fi({...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 Fi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Fi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Fi({...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}}Fi.create=e=>{var t;return new Fi({checks:[],typeName:Et.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Nt(e)})};function Bme(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 Ca extends jt{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:Ne.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:Ne.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:Ne.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:Ne.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Bme(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ne.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:Ne.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 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]})}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)}}Ca.create=e=>new Ca({checks:[],typeName:Et.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Nt(e)});class Oa extends jt{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:Ne.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:Ne.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:Ne.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:Ne.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 Oa({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Oa({...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}}Oa.create=e=>{var t;return new Oa({checks:[],typeName:Et.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Nt(e)})};class Gc extends jt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Qe.boolean){const r=this._getOrReturnCtx(t);return tt(r,{code:Ne.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 ks extends jt{_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:Ne.invalid_type,expected:Qe.date,received:o.parsedType}),$t}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return tt(o,{code:Ne.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:Ne.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:Ne.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 ks({...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}}ks.create=e=>new ks({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Et.ZodDate,...Nt(e)});class Uh extends jt{_parse(t){if(this._getType(t)!==Qe.symbol){const r=this._getOrReturnCtx(t);return tt(r,{code:Ne.invalid_type,expected:Qe.symbol,received:r.parsedType}),$t}return jr(t.data)}}Uh.create=e=>new Uh({typeName:Et.ZodSymbol,...Nt(e)});class Yc extends jt{_parse(t){if(this._getType(t)!==Qe.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:Ne.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 jt{_parse(t){if(this._getType(t)!==Qe.null){const r=this._getOrReturnCtx(t);return tt(r,{code:Ne.invalid_type,expected:Qe.null,received:r.parsedType}),$t}return jr(t.data)}}Jc.create=e=>new Jc({typeName:Et.ZodNull,...Nt(e)});class Xu extends jt{constructor(){super(...arguments),this._any=!0}_parse(t){return jr(t.data)}}Xu.create=e=>new Xu({typeName:Et.ZodAny,...Nt(e)});class Is extends jt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return jr(t.data)}}Is.create=e=>new Is({typeName:Et.ZodUnknown,...Nt(e)});class Bo extends jt{_parse(t){const n=this._getOrReturnCtx(t);return tt(n,{code:Ne.invalid_type,expected:Qe.never,received:n.parsedType}),$t}}Bo.create=e=>new Bo({typeName:Et.ZodNever,...Nt(e)});class Bh extends jt{_parse(t){if(this._getType(t)!==Qe.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:Ne.invalid_type,expected:Qe.void,received:r.parsedType}),$t}return jr(t.data)}}Bh.create=e=>new Bh({typeName:Et.ZodVoid,...Nt(e)});class qi extends jt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Qe.array)return tt(n,{code:Ne.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?Ne.too_big:Ne.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:Ne.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:Ne.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 qi({...this._def,minLength:{value:t,message:dt.toString(n)}})}max(t,n){return new qi({...this._def,maxLength:{value:t,message:dt.toString(n)}})}length(t,n){return new qi({...this._def,exactLength:{value:t,message:dt.toString(n)}})}nonempty(t){return this.min(1,t)}}qi.create=(e,t)=>new qi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Et.ZodArray,...Nt(t)});function Qu(e){if(e instanceof Pn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=zo.create(Qu(r))}return new Pn({...e._def,shape:()=>t})}else return e instanceof qi?new qi({...e._def,type:Qu(e.element)}):e instanceof zo?zo.create(Qu(e.unwrap())):e instanceof Rs?Rs.create(Qu(e.unwrap())):e instanceof yo?yo.create(e.items.map(t=>Qu(t))):e}class Pn extends jt{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:Ne.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 Bo&&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 Bo){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:Ne.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 Qu(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 zo;)o=o._def.innerType;n[r]=o}}),new Pn({...this._def,shape:()=>n})}keyof(){return tR(sn.objectKeys(this.shape))}}Pn.create=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strip",catchall:Bo.create(),typeName:Et.ZodObject,...Nt(t)}),Pn.strictCreate=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strict",catchall:Bo.create(),typeName:Et.ZodObject,...Nt(t)}),Pn.lazycreate=(e,t)=>new Pn({shape:e,unknownKeys:"strip",catchall:Bo.create(),typeName:Et.ZodObject,...Nt(t)});class Xc extends jt{_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 Li(s.ctx.common.issues));return tt(n,{code:Ne.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 Li(l));return tt(n,{code:Ne.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 zh=e=>e instanceof tf?zh(e.schema):e instanceof Ui?zh(e.innerType()):e instanceof nf?[e.value]:e instanceof Ta?e.options:e instanceof rf?Object.keys(e.enum):e instanceof of?zh(e._def.innerType):e instanceof Yc?[void 0]:e instanceof Jc?[null]:null;class Zh extends jt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Qe.object)return tt(n,{code:Ne.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:Ne.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=zh(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 Zh({typeName:Et.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Nt(r)})}}function k0(e,t){const n=Aa(e),r=Aa(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=k0(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=k0(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 jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(O0(o)||O0(a))return $t;const s=k0(o.value,a.value);return s.valid?((T0(o)||T0(a))&&n.dirty(),{status:n.value,value:s.data}):(tt(r,{code:Ne.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 jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Qe.array)return tt(r,{code:Ne.invalid_type,expected:Qe.array,received:r.parsedType}),$t;if(r.data.length<this._def.items.length)return tt(r,{code:Ne.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:Ne.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 jt{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:Ne.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 jt?new ef({keyType:t,valueType:n,typeName:Et.ZodRecord,...Nt(r)}):new ef({keyType:Fi.create(),valueType:t,typeName:Et.ZodRecord,...Nt(n)})}}class Hh extends jt{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:Ne.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}}}}Hh.create=(e,t,n)=>new Hh({valueType:t,keyType:e,typeName:Et.ZodMap,...Nt(n)});class Ps extends jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Qe.set)return tt(r,{code:Ne.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:Ne.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:Ne.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 Ps({...this._def,minSize:{value:t,message:dt.toString(n)}})}max(t,n){return new Ps({...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)}}Ps.create=(e,t)=>new Ps({valueType:e,minSize:null,maxSize:null,typeName:Et.ZodSet,...Nt(t)});class el extends jt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Qe.function)return tt(n,{code:Ne.invalid_type,expected:Qe.function,received:n.parsedType}),$t;function r(s,l){return Fh({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Lh(),Vc].filter(c=>!!c),issueData:{code:Ne.invalid_arguments,argumentsError:l}})}function i(s,l){return Fh({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Lh(),Vc].filter(c=>!!c),issueData:{code:Ne.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof tl){const s=this;return jr(async function(...l){const c=new Li([]),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 Li([r(l,c.error)]);const d=Reflect.apply(a,this,c.data),p=s._def.returns.safeParse(d,o);if(!p.success)throw new Li([i(d,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new el({...this._def,args:yo.create(t).rest(Is.create())})}returns(t){return new el({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new el({args:t||yo.create([]).rest(Is.create()),returns:n||Is.create(),typeName:Et.ZodFunction,...Nt(r)})}}class tf extends jt{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 jt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return tt(n,{received:n.data,code:Ne.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 tR(e,t){return new Ta({values:e,typeName:Et.ZodEnum,...Nt(t)})}class Ta extends jt{_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:Ne.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:Ne.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 Ta.create(t)}exclude(t){return Ta.create(this.options.filter(n=>!t.includes(n)))}}Ta.create=tR;class rf extends jt{_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:Ne.invalid_type}),$t}if(n.indexOf(t.data)===-1){const i=sn.objectValues(n);return tt(r,{received:r.data,code:Ne.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 tl extends jt{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:Ne.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})))}}tl.create=(e,t)=>new tl({type:e,typeName:Et.ZodPromise,...Nt(t)});class Ui extends jt{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)}}Ui.create=(e,t,n)=>new Ui({schema:e,typeName:Et.ZodEffects,effect:t,...Nt(n)}),Ui.createWithPreprocess=(e,t,n)=>new Ui({schema:t,effect:{type:"preprocess",transform:e},typeName:Et.ZodEffects,...Nt(n)});class zo extends jt{_parse(t){return this._getType(t)===Qe.undefined?jr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}zo.create=(e,t)=>new zo({innerType:e,typeName:Et.ZodOptional,...Nt(t)});class Rs extends jt{_parse(t){return this._getType(t)===Qe.null?jr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rs.create=(e,t)=>new Rs({innerType:e,typeName:Et.ZodNullable,...Nt(t)});class of extends jt{_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 Wh extends jt{_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 qh(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Li(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Li(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Wh.create=(e,t)=>new Wh({innerType:e,typeName:Et.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Nt(t)});class Vh extends jt{_parse(t){if(this._getType(t)!==Qe.nan){const r=this._getOrReturnCtx(t);return tt(r,{code:Ne.invalid_type,expected:Qe.nan,received:r.parsedType}),$t}return{status:"valid",value:t.data}}}Vh.create=e=>new Vh({typeName:Et.ZodNaN,...Nt(e)});const zme=Symbol("zod_brand");class nR extends jt{_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 jt{_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(),QP(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 Kh extends jt{_parse(t){const n=this._def.innerType._parse(t);return Kc(n)&&(n.value=Object.freeze(n.value)),n}}Kh.create=(e,t)=>new Kh({innerType:e,typeName:Et.ZodReadonly,...Nt(t)});const rR=(e,t={},n)=>e?Xu.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})}}):Xu.create(),Zme={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 Hme=(e,t={message:`Input not instance of ${e.name}`})=>rR(n=>n instanceof e,t),iR=Fi.create,oR=Ca.create,Wme=Vh.create,Vme=Oa.create,aR=Gc.create,Kme=ks.create,Gme=Uh.create,Yme=Yc.create,Jme=Jc.create,Xme=Xu.create,Qme=Is.create,eye=Bo.create,tye=Bh.create,nye=qi.create,rye=Pn.create,iye=Pn.strictCreate,oye=Xc.create,aye=Zh.create,sye=Qc.create,uye=yo.create,lye=ef.create,cye=Hh.create,fye=Ps.create,dye=el.create,pye=tf.create,hye=nf.create,mye=Ta.create,yye=rf.create,gye=tl.create,sR=Ui.create,vye=zo.create,bye=Rs.create,_ye=Ui.createWithPreprocess,wye=af.create;var oe=Object.freeze({__proto__:null,defaultErrorMap:Vc,setErrorMap:kme,getErrorMap:Lh,makeIssue:Fh,EMPTY_PATH:Ime,addIssueToContext:tt,ParseStatus:Er,INVALID:$t,DIRTY:QP,OK:jr,isAborted:O0,isDirty:T0,isValid:Kc,isAsync:qh,get util(){return sn},get objectUtil(){return C0},ZodParsedType:Qe,getParsedType:Aa,ZodType:jt,ZodString:Fi,ZodNumber:Ca,ZodBigInt:Oa,ZodBoolean:Gc,ZodDate:ks,ZodSymbol:Uh,ZodUndefined:Yc,ZodNull:Jc,ZodAny:Xu,ZodUnknown:Is,ZodNever:Bo,ZodVoid:Bh,ZodArray:qi,ZodObject:Pn,ZodUnion:Xc,ZodDiscriminatedUnion:Zh,ZodIntersection:Qc,ZodTuple:yo,ZodRecord:ef,ZodMap:Hh,ZodSet:Ps,ZodFunction:el,ZodLazy:tf,ZodLiteral:nf,ZodEnum:Ta,ZodNativeEnum:rf,ZodPromise:tl,ZodEffects:Ui,ZodTransformer:Ui,ZodOptional:zo,ZodNullable:Rs,ZodDefault:of,ZodCatch:Wh,ZodNaN:Vh,BRAND:zme,ZodBranded:nR,ZodPipeline:af,ZodReadonly:Kh,custom:rR,Schema:jt,ZodSchema:jt,late:Zme,get ZodFirstPartyTypeKind(){return Et},coerce:{string:e=>Fi.create({...e,coerce:!0}),number:e=>Ca.create({...e,coerce:!0}),boolean:e=>Gc.create({...e,coerce:!0}),bigint:e=>Oa.create({...e,coerce:!0}),date:e=>ks.create({...e,coerce:!0})},any:Xme,array:nye,bigint:Vme,boolean:aR,date:Kme,discriminatedUnion:aye,effect:sR,enum:mye,function:dye,instanceof:Hme,intersection:sye,lazy:pye,literal:hye,map:cye,nan:Wme,nativeEnum:yye,never:eye,null:Jme,nullable:bye,number:oR,object:rye,oboolean:()=>aR().optional(),onumber:()=>oR().optional(),optional:vye,ostring:()=>iR().optional(),pipeline:wye,preprocess:_ye,promise:gye,record:lye,set:fye,strictObject:iye,string:iR,symbol:Gme,transformer:sR,tuple:uye,undefined:Yme,union:oye,unknown:Qme,void:tye,NEVER:$t,ZodIssueCode:Ne,quotelessJson:$me,ZodError:Li});const xye=oe.object({type:oe.literal("message_created"),data:oe.object({id:oe.string(),createdAt:oe.string().datetime(),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")})]),userId:oe.string(),conversationId:oe.string()})}),Sye=oe.object({type:oe.literal("webchat_visibility"),data:oe.object({visibility:oe.enum(["show","hide","toggle"])})}),Eye=oe.object({type:oe.literal("webchat_config"),data:oe.object({config:oe.record(oe.any())})}),Aye=oe.object({type:oe.literal("custom"),data:oe.object({event:oe.record(oe.any())})}),Cye={messageCreated:xye,webchatVisibility:Sye,webchatConfig:Eye,custom:Aye},uR="unknown error",fy=class fy extends JP{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 Tme(`${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(Cye)){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(uR);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(uR)}});this._props=n}get status(){return this._state.status}};R(fy,"listen",async n=>{const r=new fy(n);return await r.connect(),r});let I0=fy;const lR=100*1024*1024,Oye=lR,Tye=lR,$ye=6e4;class kye{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 I0.listen({url:this.props.apiUrl,conversationId:t,userKey:n}));this.props=t;const{apiUrl:n}=t,r={...t.headers},i=t.timeout??$ye,o=mP.create({baseURL:n,headers:r,withCredentials:!0,timeout:i,maxBodyLength:Oye,maxContentLength:Tye});this._auto=new Eme(o)}}const Gh={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},Kr=(e,t)=>e.status===t,go=(e,t)=>Gh[e.status]<Gh[t],cR=(e,t)=>Gh[e.status]>=Gh[t];class vo extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const fR=["audio","file","image","video"],dR=e=>fR.includes(e);class Iye extends ig{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(cR(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(cR(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}=Cfe(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 kye({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=dR(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(t0(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(t0(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 pR=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>n==="messaging"?new Ofe({url:t,clientId:e}):new Iye({apiUrl:t,clientId:e}),Pye=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>{const[r]=C.useState(pR({clientId:e,apiUrl:t,mode:n}));return r};function Rye(e,t){const n=t?`The ${t} has been copied to your clipboard.`:"Copied to clipboard.";return navigator.clipboard.writeText(e).then(()=>Gge({title:n,type:"success"}))}const Nye=(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 Dye={data:""},Mye=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Dye,jye=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Lye=/\/\*[^]*?\*\/| +/g,hR=/\n+/g,$a=(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"?$a(a,o):o+"{"+$a(a,o[1]=="k"?"":t)+"}":typeof a=="object"?r+=$a(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+=$a.p?$a.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Zo={},mR=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+mR(e[n]);return t}return e},Fye=(e,t,n,r,i)=>{let o=mR(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=jye.exec(c.replace(Lye,""));)d[4]?m.shift():d[3]?(p=d[3].replace(hR," ").trim(),m.unshift(m[0][p]=m[0][p]||{})):m[0][d[1]]=d[2].replace(hR," ").trim();return m[0]})(e);Zo[a]=$a(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},qye=(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?"":$a(s,""):s===!1?"":s}return r+i+(a??"")},"");function Yh(e){let t=this||{},n=e.call?e(t.p):e;return Fye(n.unshift?n.raw?qye(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,Mye(t.target),t.g,t.o,t.k)}let yR,P0,R0;Yh.bind({g:1});let Ho=Yh.bind({k:1});function Uye(e,t,n,r){$a.p=t,yR=e,P0=n,R0=r}function ka(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:P0&&P0()},s),n.o=/ *go\d+/.test(l),s.className=Yh.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),R0&&c[0]&&R0(s),yR(c,s)}return t?t(i):i}}var Bye=e=>typeof e=="function",Jh=(e,t)=>Bye(e)?e(t):e,zye=(()=>{let e=0;return()=>(++e).toString()})(),gR=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Zye=20,Xh=new Map,Hye=1e3,vR=e=>{if(Xh.has(e))return;let t=setTimeout(()=>{Xh.delete(e),Ns({type:4,toastId:e})},Hye);Xh.set(e,t)},Wye=e=>{let t=Xh.get(e);t&&clearTimeout(t)},N0=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Zye)};case 1:return t.toast.id&&Wye(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)?N0(e,{type:1,toast:n}):N0(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?vR(r):e.toasts.forEach(o=>{vR(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}))}}},Qh=[],em={toasts:[],pausedAt:void 0},Ns=e=>{em=N0(em,e),Qh.forEach(t=>{t(em)})},Vye={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Kye=(e={})=>{let[t,n]=C.useState(em);C.useEffect(()=>(Qh.push(n),()=>{let i=Qh.indexOf(n);i>-1&&Qh.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)||Vye[i.type],style:{...e.style,...(a=e[i.type])==null?void 0:a.style,...i.style}}});return{...t,toasts:r}},Gye=(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)||zye()}),sf=e=>(t,n)=>{let r=Gye(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(Jh(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Gr.error(Jh(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var Yye=(e,t)=>{Ns({type:1,toast:{id:e,height:t}})},Jye=()=>{Ns({type:5,time:Date.now()})},Xye=e=>{let{toasts:t,pausedAt:n}=Kye(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:Yye,startPause:Jye,endPause:r,calculateOffset:i}}},Qye=Ho`
|
|
204
204
|
from {
|
|
205
205
|
transform: scale(0) rotate(45deg);
|
|
206
206
|
opacity: 0;
|
|
@@ -224,7 +224,7 @@ from {
|
|
|
224
224
|
to {
|
|
225
225
|
transform: scale(1) rotate(90deg);
|
|
226
226
|
opacity: 1;
|
|
227
|
-
}`,nge
|
|
227
|
+
}`,nge=ka("div")`
|
|
228
228
|
width: 20px;
|
|
229
229
|
opacity: 0;
|
|
230
230
|
height: 20px;
|
|
@@ -264,7 +264,7 @@ to {
|
|
|
264
264
|
to {
|
|
265
265
|
transform: rotate(360deg);
|
|
266
266
|
}
|
|
267
|
-
`,ige
|
|
267
|
+
`,ige=ka("div")`
|
|
268
268
|
width: 12px;
|
|
269
269
|
height: 12px;
|
|
270
270
|
box-sizing: border-box;
|
|
@@ -295,7 +295,7 @@ to {
|
|
|
295
295
|
100% {
|
|
296
296
|
opacity: 1;
|
|
297
297
|
height: 10px;
|
|
298
|
-
}`,sge
|
|
298
|
+
}`,sge=ka("div")`
|
|
299
299
|
width: 20px;
|
|
300
300
|
opacity: 0;
|
|
301
301
|
height: 20px;
|
|
@@ -322,9 +322,9 @@ to {
|
|
|
322
322
|
height: 10px;
|
|
323
323
|
width: 6px;
|
|
324
324
|
}
|
|
325
|
-
`,uge
|
|
325
|
+
`,uge=ka("div")`
|
|
326
326
|
position: absolute;
|
|
327
|
-
`,lge
|
|
327
|
+
`,lge=ka("div")`
|
|
328
328
|
position: relative;
|
|
329
329
|
display: flex;
|
|
330
330
|
justify-content: center;
|
|
@@ -339,7 +339,7 @@ from {
|
|
|
339
339
|
to {
|
|
340
340
|
transform: scale(1);
|
|
341
341
|
opacity: 1;
|
|
342
|
-
}`,fge
|
|
342
|
+
}`,fge=ka("div")`
|
|
343
343
|
position: relative;
|
|
344
344
|
transform: scale(0.6);
|
|
345
345
|
opacity: 0.4;
|
|
@@ -352,7 +352,7 @@ to {
|
|
|
352
352
|
`,hge=e=>`
|
|
353
353
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
354
354
|
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
355
|
-
`,mge="0%{opacity:0;} 100%{opacity:1;}",yge="0%{opacity:1;} 100%{opacity:0;}",gge
|
|
355
|
+
`,mge="0%{opacity:0;} 100%{opacity:1;}",yge="0%{opacity:1;} 100%{opacity:0;}",gge=ka("div")`
|
|
356
356
|
display: flex;
|
|
357
357
|
align-items: center;
|
|
358
358
|
background: #fff;
|
|
@@ -364,7 +364,7 @@ to {
|
|
|
364
364
|
pointer-events: auto;
|
|
365
365
|
padding: 8px 10px;
|
|
366
366
|
border-radius: 8px;
|
|
367
|
-
`,vge
|
|
367
|
+
`,vge=ka("div")`
|
|
368
368
|
display: flex;
|
|
369
369
|
justify-content: center;
|
|
370
370
|
margin: 4px 10px;
|
|
@@ -415,11 +415,11 @@ to {
|
|
|
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(cm(l.name));case"COMMIT":if(s===void 0){d==null||d.init(i.getState());return}return d==null?void 0:d.init(cm(l.name));case"ROLLBACK":return G0(v.state,_=>{if(s===void 0){h(_),d==null||d.init(i.getState());return}h(_[s]),d==null||d.init(cm(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return G0(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},G0=(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 Sve(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)}}}},Eve=(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},Ave=(e,t)=>(n,r,i)=>{let o={storage:Sve(()=>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},Cve=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?Eve(e,t):Ave(e,t),ka=wve()(ZR(Cve((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"}))),HR=C.createContext(null),Ove=e=>{const t={theme:{},configuration:{},messages:[],connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},closeWindow:()=>{},messageContainerRef:{current:null},isTyping:!1,allowFileUpload:!1},n=e==null?void 0:e.client,r=ka.getState().setClientMode;return n&&r(n.mode),DR()(ZR((i,o)=>{const a=c=>i(d=>({...d,messages:[...d.messages??[],c]})),s=c=>i(d=>({...d,messages:c})),l=ka(c=>c.addMessageToHistory);return{...t,...e,eventEmitter:zF,client:n,sendFile:c=>o().client.sendFile(c),sendTextMessage:async c=>{const d=o().client;d&&await d.sendMessage(c),a({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:c}}}),d!=null&&d.userId&&l({message:c,userId:d.userId})},on:(c,d)=>{const p=o().client;return p?p.on(c,d):()=>{}},getClientId:()=>{var c;return(c=o().client)==null?void 0:c.clientId},setState:c=>i(d=>({...d,...c})),setTheme:c=>i(d=>({...d,theme:c})),setMessages:s,setConfiguration:c=>i(d=>({...d,configuration:c})),setIsTyping:c=>i(d=>({...d,isTyping:c})),addMessage:a,setConnected:c=>i(d=>({...d,connected:c})),restartConversation:async()=>{const c=o().client,d=o().setMessages;c&&(await c.newConversation(),d([]))}}},{name:"webchatStore"}))};function it(e){const t=C.useContext(HR);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return BR(t,e)}const Tve=({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($ve,{...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})},$ve=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})},kve=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(cl,{styles:t,block:e})})),WR=C.createContext(null);function VR(){const e=C.useContext(WR);if(!e)throw new Error("useComposerContext must be used within a Message");return e}const KR=C.createContext(null);function Ive(){const e=C.useContext(KR);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const GR=C.createContext(null);function YR(){const e=C.useContext(GR);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}C.createContext(null);const Pve=C.forwardRef(({url:e,type:t,styles:n,orientation:r="auto",...i},o)=>{var m,h;const a=C.useId(),{setIsLoading:s}=Ive(),[l,c]=C.useState(r),[d,p]=C.useState(!1);return C.useLayoutEffect(()=>{s(y=>[...y,a])},[]),C.useEffect(()=>{e&&l==="auto"&&Nye(e).then(({width:y,height:v})=>{c(Rve(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 Rve(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 Nve=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})})),Dve=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 Mve({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 jve=z.forwardRef(Mve);function Lve({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 Fve=z.forwardRef(Lve);function qve({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 Uve=z.forwardRef(qve);function Bve({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 zve=z.forwardRef(Bve);function Zve({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 Hve=z.forwardRef(Zve);function Wve({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 Vve=z.forwardRef(Wve);function Kve({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 Gve=z.forwardRef(Kve),Yve=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(Vve,{...(d=i==null?void 0:i[e])==null?void 0:d.icon})]})}),Jve=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(cl,{styles:t,block:s},l))})),Xve=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(cl,{styles:t,block:s},l))}));function Qve(e){return Object.prototype.toString.call(e)==="[object Object]"}function JR(e){return Qve(e)||Array.isArray(e)}function ebe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Y0(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}`:!JR(s)||!JR(l)?s===l:Y0(s,l)})}function XR(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=XR(e),r=XR(t);return n.every((i,o)=>{const a=r[o];return Y0(i,a)})}function J0(e){return typeof e=="number"}function QR(e){return typeof e=="string"}function X0(e){return typeof e=="boolean"}function e2(e){return Object.prototype.toString.call(e)==="[object Object]"}function Dn(e){return Math.abs(e)}function Q0(e){return Math.sign(e)}function fm(e,t){return Dn(e-t)}function nbe(e,t){if(e===0||t===0||Dn(e)<=Dn(t))return 0;const n=fm(Dn(e),Dn(t));return Dn(n/e)}function cf(e){return pm(e).map(Number)}function Ko(e){return e[dm(e)]}function dm(e){return Math.max(0,e.length-1)}function pm(e){return Object.keys(e)}function t2(e,t){return[e,t].reduce((n,r)=>(pm(r).forEach(i=>{const o=n[i],a=r[i],s=e2(o)&&e2(a);n[i]=s?t2(o,a):a}),n),{})}function n2(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function rbe(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 J0(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 Ia(e,t){const n=Dn(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 r2(e,t,n){const{constrain:r}=Ia(0,e),i=e+1;let o=a(t);function a(m){return n?Dn((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 r2(e,s(),n)}const p={get:s,set:l,add:c,clone:d};return p}function obe(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 abe(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(),q=Ia(50,225).constrain(y.measure(20)),L={mouse:300,touch:400},M={mouse:500,touch:600},H=v?43:25;let re=!1,Q=0,G=0,V=!1,F=!1,Y=!1,ne=!1;function ce(Ae,Fe){if(!Fe)return;function $e(lt){(X0(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 D(){return(v?M:L)[ne?"mouse":"touch"]}function De(Ae,Fe){const $e=m.add(Q0(Ae)*-1),Ze=p.byDistance(Ae,!v).distance;return v||Dn(Ae)<q?Ze:_&&Fe?Ze*.5:p.byIndex($e.get(),0).distance}function qe(Ae){const Fe=n2(Ae,i);ne=Fe,!(Fe&&Ae.button!==0)&&(Oe(Ae.target)||(Y=v&&Fe&&!Ae.buttons&&re,re=fm(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=fm(Fe,Q),lt=fm($e,G);if(!F&&!ne&&(!Ae.cancelable||(F=Ze>lt,!F)))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)*D(),lt=De(t.apply(Ze),$e),K=nbe(Ze,lt),de=H-10*K,Te=b+K/50;F=!1,V=!1,j.clear(),d.useDuration(de).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 sbe(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(n2(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&&Dn(v)>.1?v:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:a}}function ube(e){function t(r){return e*(r/100)}return{measure:t}}function lbe(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||(X0(y)||y(h,_))&&v(_)}),[e].concat(r).forEach(_=>o.observe(_))}function p(){o&&o.disconnect(),l=!0}return{init:d,destroy:p}}function cbe(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=Q0(j),d=c,i=Dn(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 fbe(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=Ia(.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=Dn(e[y]-t.get()),w=n.get()-t.get(),_=s.constrain(v/a);n.subtract(w*_),!h&&Dn(w)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function p(h){l=!h}return{constrain:d,toggleActive:p}}function dbe(e,t,n,r){const i=Ia(-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 Ia(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 pbe(e,t,n){const r=t[0],i=n?r-e:Ko(t);return{limit:Ia(i,r)}}function hbe(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=Ia(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 mbe(e){const{max:t,length:n}=e;function r(o){return(o-t)/-n}return{get:r}}function ybe(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(Dn)}function y(){return r.map(_=>n[s]-_[s]).map(_=>-Dn(_))}function v(){const b=Ko(p)-Ko(i);return c(p).map(S=>S[0]).map((S,A,E)=>{const T=!A,j=A===dm(E);return a&&T?0:a&&j?b:S+d[A]})}return{snaps:p,snapsAligned:m}}function gbe(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(y){return y.concat().sort((v,w)=>Dn(v)-Dn(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)=>Dn(b.diff)-Dn(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=>Q0(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 vbe(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 hm(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 J0(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function i2(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 bbe(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,q)=>j-i[q],T)}function h(E,T){return E.reduce((j,q)=>m(j,T)>0?j.concat([q]):j,[])}function y(E,T){const j=T==="start",q=j?-r:r,L=a.findSlideBounds([q]);return E.map(M=>{const H=j?0:-r,re=j?r:0,G=L.filter(V=>V.index===M)[0][j?"end":"start"];return{index:M,slideLocation:hm(-1),translate:i2(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:q}=E,L=T();L!==q.get()&&(j.to(L),q.set(L))})}function S(){p.forEach(E=>E.translate.clear())}return{canLoop:_,clear:S,loop:b,loopPoints:p}}function _be(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||(X0(l)||l(s,d))&&c(d)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:i,destroy:o}}function wbe(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=>Ia(c,b-c).constrain(b*_))}function h(w,_){const b=w||d,S=m(_);return b.reduce((A,E)=>{const T=r.map((j,q)=>({start:j-n[q]+S[q]+E,end:j+e-S[q]+E,index:q}));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:q}=E,L=A.includes(T),M=j<b&&q>b;return!L&&M?A.concat([T]):A},[])}return{check:y,findSlideBounds:h}}function xbe(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 Dn(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===dm(A);return E?m[S]+d:T?m[S]+p:A[S+1][s]-b[s]}).map(Dn)}return{slideSizes:m,slideSizesWithGaps:h}}function Sbe(e,t,n){const r=J0(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 Ebe(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=obe(d),j=ibe(c,d),q=j.measureSize(A),L=ube(q),M=rbe(l,q),H=!h&&!!S,re=h||!!S,{slideSizes:Q,slideSizesWithGaps:G}=xbe(j,A,E,n,re,i),V=Sbe(q,G,_),{snaps:F,snapsAligned:Y}=ybe(j,M,A,E,G,V,H),ne=-Ko(F)+Ko(G),{snapsContained:ce}=dbe(q,ne,Y,S),P=H?ce:Y,{limit:ue}=pbe(ne,P,h),Oe=r2(dm(P),p,h),D=Oe.clone(),De=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 ye=Te.velocity();Ue.set(et.get()-ye+ye*ie),mt&&(ot.loop(Te.direction()),It.loop()),Se.to(Ue.get())},Je={start:()=>s.start(de),stop:()=>s.stop(de),update:()=>qe(de),render:Te=>Me(de,Te)},rt=.68,Ke=P[Oe.get()],Pe=hm(Ke),Ae=hm(Ke),Fe=hm(Ke),$e=cbe(Pe,Fe,y,rt),Ze=gbe(h,P,ne,ue,Fe),lt=vbe(Je,Oe,D,Ze,$e,Fe,a),K=wbe(q,ne,Q,F,ue,h,m),de={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:A,slideRects:E,animation:Je,axis:j,direction:T,dragHandler:abe(j,T,e,r,i,Fe,sbe(j,i),Pe,Je,lt,$e,Ze,Oe,a,L,v,w,b,rt),eventStore:ff(),percentOfView:L,index:Oe,indexPrevious:D,limit:ue,location:Pe,offsetLocation:Ae,options:o,resizeHandler:lbe(t,a,i,n,j),scrollBody:$e,scrollBounds:fbe(ue,Pe,Fe,$e,L),scrollLooper:hbe(ne,ue,Ae,[Pe,Ae,Fe]),scrollProgress:mbe(ue),scrollSnaps:P,scrollTarget:Ze,scrollTo:lt,slideLooper:bbe(j,T,q,ne,G,P,K,Ae,n),slidesHandler:_be(t,a),slidesInView:K,slideIndexes:De,slidesToScroll:V,target:Fe,translate:i2(j,T,t)};return de}function Abe(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=Dn(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 Cbe(){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 Obe={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 Tbe(e){function t(o,a){return t2(o,a||{})}function n(o){const a=o.breakpoints||{},s=pm(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=>pm(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function $be(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 rl(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=Tbe(i),a=$be(o),s=ff(),l=ff(),c=Cbe(),{animationRealms:d}=rl,{mergeOptions:p,optionsAtMedia:m,optionsMediaQueries:h}=o,{on:y,off:v,emit:w}=c,_=Q;let b=!1,S,A=p(Obe,rl.globalOptions),E=p(A),T=[],j,q,L;function M(){const{container:$e,slides:Ze}=E;q=(QR($e)?e.querySelector($e):$e)||e.children[0];const K=QR(Ze)?q.querySelectorAll(Ze):Ze;L=[].slice.call(K||q.children)}function H($e,Ze){const lt=Ebe(e,q,L,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(de=>de.window===i),K=lt||Abe(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:de})=>de)]).forEach(de=>s.add(de,"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(),q.offsetParent&&L.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 F($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=F($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 D(){return S.scrollSnaps.map(S.scrollProgress.get)}function De(){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 q}function Ae(){return L}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:De,scrollSnapList:D,scrollTo:ne,selectedScrollSnap:qe,slideNodes:Ae,slidesInView:F,slidesNotInView:Y};return re(t,n),setTimeout(()=>c.emit("init"),0),Fe}rl.animationRealms=[],rl.globalOptions=void 0;function e_(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(ebe()&&a){rl.globalOptions=e_.globalOptions;const c=rl(a,n.current,r.current);return o(c),()=>c.destroy()}else o(void 0)},[a,o]),C.useEffect(()=>{Y0(n.current,e)||(n.current=e,l())},[e,l]),C.useEffect(()=>{tbe(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}e_.globalOptions=void 0;function kbe({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 Ibe=z.forwardRef(kbe);function Pbe({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 Rbe=z.forwardRef(Pbe);function Nbe({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 Dbe=z.forwardRef(Nbe);function Mbe({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 jbe=z.forwardRef(Mbe);function Lbe({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 Fbe=z.forwardRef(Lbe);function qbe({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 Ube=z.forwardRef(qbe);function Bbe({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 zbe=z.forwardRef(Bbe),Zbe=C.forwardRef(({type:e,styles:t,blocks:n},r)=>{const[i,o]=e_({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(cl,{styles:t,block:y},v))}),X.jsx(Ibe,{...m==null?void 0:m.backButton,"data-disabled":a?"":void 0,onClick:d}),X.jsx(Rbe,{...m==null?void 0:m.nextButton,"data-disabled":l?"":void 0,onClick:p})]})}),il=Math.min,ui=Math.max,mm=Math.round,ol=Math.floor,Pa=e=>({x:e,y:e});function o2(e,t,n){return ui(e,il(t,n))}function ym(e,t){return typeof e=="function"?e(t):e}function df(e){return e.split("-")[0]}function t_(e){return e.split("-")[1]}function a2(e){return e==="x"?"y":"x"}function Hbe(e){return e==="y"?"height":"width"}function pf(e){return["top","bottom"].includes(df(e))?"y":"x"}function Wbe(e){return a2(pf(e))}function Vbe(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kbe(e){return typeof e!="number"?Vbe(e):{top:e,right:e,bottom:e,left:e}}function gm(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ra(e){return s2(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=(s2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function s2(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 n_(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 Gbe(e){return["table","td","th"].includes(Ra(e))}function r_(e){const t=i_(),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 Ybe(e){let t=js(e);for(;Ar(t)&&!mf(t);){if(r_(t))return t;t=js(t)}return null}function i_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mf(e){return["html","body","#document"].includes(Ra(e))}function ci(e){return li(e).getComputedStyle(e)}function vm(e){return Fn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function js(e){if(Ra(e)==="html")return e;const t=e.assignedSlot||e.parentNode||n_(e)&&e.host||Go(e);return n_(t)?t.host:t}function u2(e){const t=js(e);return mf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ar(t)&&hf(t)?t:u2(t)}function Na(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=u2(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?Na(a.frameElement):[]):t.concat(i,Na(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&&n_(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function l2(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Jbe(){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 c2(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(l2())||t.test(Jbe()))&&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 d2(){return/apple/i.test(navigator.vendor)}function Xbe(){return l2().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function p2(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Qbe(e){return"nativeEvent"in e}function e0e(e){return e.matches("html,body")}function Bi(e){return(e==null?void 0:e.ownerDocument)||document}function o_(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 h2(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 m2(e){return Ar(e)&&e.matches(t0e)}function hr(e){e.preventDefault(),e.stopPropagation()}function y2(e,t,n){let{reference:r,floating:i}=e;const o=pf(t),a=Wbe(t),s=Hbe(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(t_(t)){case"start":h[a]-=m*(n&&c?-1:1);break;case"end":h[a]+=m*(n&&c?-1:1);break}return h}const n0e=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}=y2(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}=y2(c,m,l)),v=-1;continue}}return{x:d,y:p,placement:m,strategy:i,middlewareData:h}};async function g2(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}=ym(t,e),y=Kbe(h),w=s[m?p==="floating"?"reference":"floating":p],_=gm(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=gm(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 r0e(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=t_(n),l=pf(n)==="y",c=["left","top"].includes(a)?-1:1,d=o&&l?-1:1,p=ym(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 r0e(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},o0e=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}=ym(e,t),c={x:n,y:r},d=await g2(t,l),p=pf(df(i)),m=a2(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=o2(b,h,S)}if(a){const w=p==="y"?"top":"left",_=p==="y"?"bottom":"right",b=y+d[w],S=y-d[_];y=o2(b,y,S)}const v=s.fn({...t,[m]:h,[p]:y});return{...v,data:{x:v.x-n,y:v.y-r}}}}},a0e=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}=ym(e,t),l=await g2(t,s),c=df(n),d=t_(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?il(_,T):T}else{const T=h-l.top-l.bottom;S=d||b?il(w,T):T}if(b&&!d){const T=ui(l.left,0),j=ui(l.right,0),q=ui(l.top,0),L=ui(l.bottom,0);p?A=m-2*(T!==0||j!==0?T+j:ui(l.left,l.right)):S=h-2*(q!==0||L!==0?q+L: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 v2(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=mm(n)!==o||mm(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function a_(e){return Fn(e)?e:e.contextElement}function al(e){const t=a_(e);if(!Ar(t))return Pa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=v2(t);let a=(o?mm(n.width):n.width)/r,s=(o?mm(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const s0e=Pa(0);function b2(e){const t=li(e);return!i_()||!t.visualViewport?s0e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function u0e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==li(e)?!1:t}function Ls(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=a_(e);let a=Pa(1);t&&(r?Fn(r)&&(a=al(r)):a=al(e));const s=u0e(o,n,r)?b2(o):Pa(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=al(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 gm({width:d,height:p,x:l,y:c})}function l0e(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=Pa(1);const l=Pa(0);if((i||!i&&r!=="fixed")&&((Ra(n)!=="body"||hf(o))&&(a=vm(n)),Ar(n))){const c=Ls(n);s=al(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 c0e(e){return Array.from(e.getClientRects())}function _2(e){return Ls(Go(e)).left+vm(e).scrollLeft}function f0e(e){const t=Go(e),n=vm(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+_2(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 d0e(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=i_();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function p0e(e,t){const n=Ls(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ar(e)?al(e):Pa(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 w2(e,t,n){let r;if(t==="viewport")r=d0e(e,n);else if(t==="document")r=f0e(Go(e));else if(Fn(t))r=p0e(t,n);else{const i=b2(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return gm(r)}function x2(e,t){const n=js(e);return n===t||!Fn(n)||mf(n)?!1:ci(n).position==="fixed"||x2(n,t)}function h0e(e,t){const n=t.get(e);if(n)return n;let r=Na(e,[],!1).filter(s=>Fn(s)&&Ra(s)!=="body"),i=null;const o=ci(e).position==="fixed";let a=o?js(e):e;for(;Fn(a)&&!mf(a);){const s=ci(a),l=r_(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||hf(a)&&!l&&x2(e,a))?r=r.filter(d=>d!==a):i=s,a=js(a)}return t.set(e,r),r}function m0e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?h0e(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,d)=>{const p=w2(t,d,i);return c.top=ui(p.top,c.top),c.right=il(p.right,c.right),c.bottom=il(p.bottom,c.bottom),c.left=ui(p.left,c.left),c},w2(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function y0e(e){return v2(e)}function g0e(e,t,n){const r=Ar(t),i=Go(t),o=n==="fixed",a=Ls(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Pa(0);if(r||!r&&!o)if((Ra(t)!=="body"||hf(i))&&(s=vm(t)),r){const c=Ls(t,!0,o,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else i&&(l.x=_2(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function S2(e,t){return!Ar(e)||ci(e).position==="fixed"?null:t?t(e):e.offsetParent}function E2(e,t){const n=li(e);if(!Ar(e))return n;let r=S2(e,t);for(;r&&Gbe(r)&&ci(r).position==="static";)r=S2(r,t);return r&&(Ra(r)==="html"||Ra(r)==="body"&&ci(r).position==="static"&&!r_(r))?n:r||Ybe(e)||n}const v0e=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||E2,o=this.getDimensions;return{reference:g0e(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function b0e(e){return ci(e).direction==="rtl"}const _0e={convertOffsetParentRelativeRectToViewportRelativeRect:l0e,getDocumentElement:Go,getClippingRect:m0e,getOffsetParent:E2,getElementRects:v0e,getClientRects:c0e,getDimensions:y0e,getScale:al,isElement:Fn,isRTL:b0e};function w0e(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=ol(d),y=ol(i.clientWidth-(c+p)),v=ol(i.clientHeight-(d+m)),w=ol(c),b={rootMargin:-h+"px "+-y+"px "+-v+"px "+-w+"px",threshold:ui(0,il(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 x0e(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=a_(e),d=i||o?[...c?Na(c):[],...Na(t)]:[];d.forEach(_=>{i&&_.addEventListener("scroll",n,{passive:!0}),o&&_.addEventListener("resize",n)});const p=c&&s?w0e(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?Ls(e):null;l&&w();function w(){const _=Ls(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 S0e=(e,t,n)=>{const r=new Map,i={platform:_0e,...n},o={...i.platform,_c:r};return n0e(e,t,{...i,platform:o})};var bm=typeof document<"u"?C.useLayoutEffect:C.useEffect;function _m(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(!_m(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)&&!_m(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function A2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function C2(e,t){const n=A2(e);return Math.round(t*n)/n}function O2(e){const t=z.useRef(e);return bm(()=>{t.current=e}),t}function E0e(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);_m(m,r)||h(r);const[y,v]=z.useState(null),[w,_]=z.useState(null),b=z.useCallback(F=>{F!=T.current&&(T.current=F,v(F))},[v]),S=z.useCallback(F=>{F!==j.current&&(j.current=F,_(F))},[_]),A=o||y,E=a||w,T=z.useRef(null),j=z.useRef(null),q=z.useRef(d),L=O2(l),M=O2(i),H=z.useCallback(()=>{if(!T.current||!j.current)return;const F={placement:t,strategy:n,middleware:m};M.current&&(F.platform=M.current),S0e(T.current,j.current,F).then(Y=>{const ne={...Y,isPositioned:!0};re.current&&!_m(q.current,ne)&&(q.current=ne,$F.flushSync(()=>{p(ne)}))})},[m,t,n,M]);bm(()=>{c===!1&&q.current.isPositioned&&(q.current.isPositioned=!1,p(F=>({...F,isPositioned:!1})))},[c]);const re=z.useRef(!1);bm(()=>(re.current=!0,()=>{re.current=!1}),[]),bm(()=>{if(A&&(T.current=A),E&&(j.current=E),A&&E){if(L.current)return L.current(A,E,H);H()}},[A,E,H,L]);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 F={position:n,left:0,top:0};if(!G.floating)return F;const Y=C2(G.floating,d.x),ne=C2(G.floating,d.y);return s?{...F,transform:"translate("+Y+"px, "+ne+"px)",...A2(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(cm(l.name));case"COMMIT":if(s===void 0){d==null||d.init(i.getState());return}return d==null?void 0:d.init(cm(l.name));case"ROLLBACK":return G0(v.state,_=>{if(s===void 0){h(_),d==null||d.init(i.getState());return}h(_[s]),d==null||d.init(cm(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return G0(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},G0=(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 Sve(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)}}}},Eve=(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},Ave=(e,t)=>(n,r,i)=>{let o={storage:Sve(()=>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},Cve=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?Eve(e,t):Ave(e,t),Ko=wve()(ZR(Cve((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"}))),HR=C.createContext(null),Ove=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=Ko.getState().setClientMode,o=Ko.getState().setConversationId;return n&&i(n.mode),C.useEffect(()=>{r&&o(r)},[r]),DR()(ZR((a,s)=>{const l=p=>a(m=>({...m,messages:[...m.messages??[],p]})),c=p=>a(m=>({...m,messages:p})),d=Ko.getState().addMessageToHistory;return{...t,...e,eventEmitter:zF,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(HR);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return BR(t,e)}const Tve=({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($ve,{...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})},$ve=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})},kve=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(cl,{styles:t,block:e})})),WR=C.createContext(null);function VR(){const e=C.useContext(WR);if(!e)throw new Error("useComposerContext must be used within a Message");return e}const KR=C.createContext(null);function Ive(){const e=C.useContext(KR);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const GR=C.createContext(null);function YR(){const e=C.useContext(GR);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}C.createContext(null);const Pve=C.forwardRef(({url:e,type:t,styles:n,orientation:r="auto",...i},o)=>{var m,h;const a=C.useId(),{setIsLoading:s}=Ive(),[l,c]=C.useState(r),[d,p]=C.useState(!1);return C.useLayoutEffect(()=>{s(y=>[...y,a])},[]),C.useEffect(()=>{e&&l==="auto"&&Nye(e).then(({width:y,height:v})=>{c(Rve(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 Rve(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 Nve=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})})),Dve=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 Mve({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 jve=z.forwardRef(Mve);function Lve({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 Fve=z.forwardRef(Lve);function qve({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 Uve=z.forwardRef(qve);function Bve({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 zve=z.forwardRef(Bve);function Zve({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 Hve=z.forwardRef(Zve);function Wve({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 Vve=z.forwardRef(Wve);function Kve({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 Gve=z.forwardRef(Kve),Yve=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(Vve,{...(d=i==null?void 0:i[e])==null?void 0:d.icon})]})}),Jve=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(cl,{styles:t,block:s},l))})),Xve=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(cl,{styles:t,block:s},l))}));function Qve(e){return Object.prototype.toString.call(e)==="[object Object]"}function JR(e){return Qve(e)||Array.isArray(e)}function ebe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Y0(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}`:!JR(s)||!JR(l)?s===l:Y0(s,l)})}function XR(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=XR(e),r=XR(t);return n.every((i,o)=>{const a=r[o];return Y0(i,a)})}function J0(e){return typeof e=="number"}function QR(e){return typeof e=="string"}function X0(e){return typeof e=="boolean"}function e2(e){return Object.prototype.toString.call(e)==="[object Object]"}function Dn(e){return Math.abs(e)}function Q0(e){return Math.sign(e)}function fm(e,t){return Dn(e-t)}function nbe(e,t){if(e===0||t===0||Dn(e)<=Dn(t))return 0;const n=fm(Dn(e),Dn(t));return Dn(n/e)}function cf(e){return pm(e).map(Number)}function Go(e){return e[dm(e)]}function dm(e){return Math.max(0,e.length-1)}function pm(e){return Object.keys(e)}function t2(e,t){return[e,t].reduce((n,r)=>(pm(r).forEach(i=>{const o=n[i],a=r[i],s=e2(o)&&e2(a);n[i]=s?t2(o,a):a}),n),{})}function n2(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function rbe(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 J0(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 Ia(e,t){const n=Dn(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 r2(e,t,n){const{constrain:r}=Ia(0,e),i=e+1;let o=a(t);function a(m){return n?Dn((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 r2(e,s(),n)}const p={get:s,set:l,add:c,clone:d};return p}function obe(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 abe(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(),q=Ia(50,225).constrain(y.measure(20)),L={mouse:300,touch:400},M={mouse:500,touch:600},H=v?43:25;let re=!1,Q=0,G=0,V=!1,F=!1,Y=!1,ne=!1;function ce(Ae,Fe){if(!Fe)return;function $e(lt){(X0(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 D(){return(v?M:L)[ne?"mouse":"touch"]}function De(Ae,Fe){const $e=m.add(Q0(Ae)*-1),Ze=p.byDistance(Ae,!v).distance;return v||Dn(Ae)<q?Ze:_&&Fe?Ze*.5:p.byIndex($e.get(),0).distance}function qe(Ae){const Fe=n2(Ae,i);ne=Fe,!(Fe&&Ae.button!==0)&&(Oe(Ae.target)||(Y=v&&Fe&&!Ae.buttons&&re,re=fm(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=fm(Fe,Q),lt=fm($e,G);if(!F&&!ne&&(!Ae.cancelable||(F=Ze>lt,!F)))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)*D(),lt=De(t.apply(Ze),$e),K=nbe(Ze,lt),de=H-10*K,Te=b+K/50;F=!1,V=!1,j.clear(),d.useDuration(de).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 sbe(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(n2(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&&Dn(v)>.1?v:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:a}}function ube(e){function t(r){return e*(r/100)}return{measure:t}}function lbe(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||(X0(y)||y(h,_))&&v(_)}),[e].concat(r).forEach(_=>o.observe(_))}function p(){o&&o.disconnect(),l=!0}return{init:d,destroy:p}}function cbe(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=Q0(j),d=c,i=Dn(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 fbe(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=Ia(.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=Dn(e[y]-t.get()),w=n.get()-t.get(),_=s.constrain(v/a);n.subtract(w*_),!h&&Dn(w)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function p(h){l=!h}return{constrain:d,toggleActive:p}}function dbe(e,t,n,r){const i=Ia(-t+e,n[0]),o=l(),a=c();function s(){const p=o[0],m=Go(o),h=o.lastIndexOf(p),y=o.indexOf(m)+1;return Ia(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 pbe(e,t,n){const r=t[0],i=n?r-e:Go(t);return{limit:Ia(i,r)}}function hbe(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=Ia(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 mbe(e){const{max:t,length:n}=e;function r(o){return(o-t)/-n}return{get:r}}function ybe(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(_=>Go(_)[l]-_[0][s]).map(Dn)}function y(){return r.map(_=>n[s]-_[s]).map(_=>-Dn(_))}function v(){const b=Go(p)-Go(i);return c(p).map(S=>S[0]).map((S,A,E)=>{const T=!A,j=A===dm(E);return a&&T?0:a&&j?b:S+d[A]})}return{snaps:p,snapsAligned:m}}function gbe(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(y){return y.concat().sort((v,w)=>Dn(v)-Dn(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)=>Dn(b.diff)-Dn(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=>Q0(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 vbe(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 hm(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 J0(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function i2(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 bbe(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,q)=>j-i[q],T)}function h(E,T){return E.reduce((j,q)=>m(j,T)>0?j.concat([q]):j,[])}function y(E,T){const j=T==="start",q=j?-r:r,L=a.findSlideBounds([q]);return E.map(M=>{const H=j?0:-r,re=j?r:0,G=L.filter(V=>V.index===M)[0][j?"end":"start"];return{index:M,slideLocation:hm(-1),translate:i2(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:q}=E,L=T();L!==q.get()&&(j.to(L),q.set(L))})}function S(){p.forEach(E=>E.translate.clear())}return{canLoop:_,clear:S,loop:b,loopPoints:p}}function _be(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||(X0(l)||l(s,d))&&c(d)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:i,destroy:o}}function wbe(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=>Ia(c,b-c).constrain(b*_))}function h(w,_){const b=w||d,S=m(_);return b.reduce((A,E)=>{const T=r.map((j,q)=>({start:j-n[q]+S[q]+E,end:j+e-S[q]+E,index:q}));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:q}=E,L=A.includes(T),M=j<b&&q>b;return!L&&M?A.concat([T]):A},[])}return{check:y,findSlideBounds:h}}function xbe(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 Dn(t[s]-b[s])}function v(){if(!c)return 0;const b=o.getComputedStyle(Go(r));return parseFloat(b.getPropertyValue(`margin-${l}`))}function w(){return n.map((b,S,A)=>{const E=!S,T=S===dm(A);return E?m[S]+d:T?m[S]+p:A[S+1][s]-b[s]}).map(Dn)}return{slideSizes:m,slideSizesWithGaps:h}}function Sbe(e,t,n){const r=J0(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(Go(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 Ebe(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=obe(d),j=ibe(c,d),q=j.measureSize(A),L=ube(q),M=rbe(l,q),H=!h&&!!S,re=h||!!S,{slideSizes:Q,slideSizesWithGaps:G}=xbe(j,A,E,n,re,i),V=Sbe(q,G,_),{snaps:F,snapsAligned:Y}=ybe(j,M,A,E,G,V,H),ne=-Go(F)+Go(G),{snapsContained:ce}=dbe(q,ne,Y,S),P=H?ce:Y,{limit:ue}=pbe(ne,P,h),Oe=r2(dm(P),p,h),D=Oe.clone(),De=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 ye=Te.velocity();Ue.set(et.get()-ye+ye*ie),mt&&(ot.loop(Te.direction()),It.loop()),Se.to(Ue.get())},Je={start:()=>s.start(de),stop:()=>s.stop(de),update:()=>qe(de),render:Te=>Me(de,Te)},rt=.68,Ke=P[Oe.get()],Pe=hm(Ke),Ae=hm(Ke),Fe=hm(Ke),$e=cbe(Pe,Fe,y,rt),Ze=gbe(h,P,ne,ue,Fe),lt=vbe(Je,Oe,D,Ze,$e,Fe,a),K=wbe(q,ne,Q,F,ue,h,m),de={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:A,slideRects:E,animation:Je,axis:j,direction:T,dragHandler:abe(j,T,e,r,i,Fe,sbe(j,i),Pe,Je,lt,$e,Ze,Oe,a,L,v,w,b,rt),eventStore:ff(),percentOfView:L,index:Oe,indexPrevious:D,limit:ue,location:Pe,offsetLocation:Ae,options:o,resizeHandler:lbe(t,a,i,n,j),scrollBody:$e,scrollBounds:fbe(ue,Pe,Fe,$e,L),scrollLooper:hbe(ne,ue,Ae,[Pe,Ae,Fe]),scrollProgress:mbe(ue),scrollSnaps:P,scrollTarget:Ze,scrollTo:lt,slideLooper:bbe(j,T,q,ne,G,P,K,Ae,n),slidesHandler:_be(t,a),slidesInView:K,slideIndexes:De,slidesToScroll:V,target:Fe,translate:i2(j,T,t)};return de}function Abe(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=Dn(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 Cbe(){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 Obe={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 Tbe(e){function t(o,a){return t2(o,a||{})}function n(o){const a=o.breakpoints||{},s=pm(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=>pm(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function $be(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 rl(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=Tbe(i),a=$be(o),s=ff(),l=ff(),c=Cbe(),{animationRealms:d}=rl,{mergeOptions:p,optionsAtMedia:m,optionsMediaQueries:h}=o,{on:y,off:v,emit:w}=c,_=Q;let b=!1,S,A=p(Obe,rl.globalOptions),E=p(A),T=[],j,q,L;function M(){const{container:$e,slides:Ze}=E;q=(QR($e)?e.querySelector($e):$e)||e.children[0];const K=QR(Ze)?q.querySelectorAll(Ze):Ze;L=[].slice.call(K||q.children)}function H($e,Ze){const lt=Ebe(e,q,L,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(de=>de.window===i),K=lt||Abe(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:de})=>de)]).forEach(de=>s.add(de,"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(),q.offsetParent&&L.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 F($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=F($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 D(){return S.scrollSnaps.map(S.scrollProgress.get)}function De(){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 q}function Ae(){return L}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:De,scrollSnapList:D,scrollTo:ne,selectedScrollSnap:qe,slideNodes:Ae,slidesInView:F,slidesNotInView:Y};return re(t,n),setTimeout(()=>c.emit("init"),0),Fe}rl.animationRealms=[],rl.globalOptions=void 0;function e_(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(ebe()&&a){rl.globalOptions=e_.globalOptions;const c=rl(a,n.current,r.current);return o(c),()=>c.destroy()}else o(void 0)},[a,o]),C.useEffect(()=>{Y0(n.current,e)||(n.current=e,l())},[e,l]),C.useEffect(()=>{tbe(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}e_.globalOptions=void 0;function kbe({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 Ibe=z.forwardRef(kbe);function Pbe({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 Rbe=z.forwardRef(Pbe);function Nbe({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 Dbe=z.forwardRef(Nbe);function Mbe({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 jbe=z.forwardRef(Mbe);function Lbe({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 Fbe=z.forwardRef(Lbe);function qbe({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 Ube=z.forwardRef(qbe);function Bbe({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 zbe=z.forwardRef(Bbe),Zbe=C.forwardRef(({type:e,styles:t,blocks:n},r)=>{const[i,o]=e_({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(cl,{styles:t,block:y},v))}),X.jsx(Ibe,{...m==null?void 0:m.backButton,"data-disabled":a?"":void 0,onClick:d}),X.jsx(Rbe,{...m==null?void 0:m.nextButton,"data-disabled":l?"":void 0,onClick:p})]})}),il=Math.min,ui=Math.max,mm=Math.round,ol=Math.floor,Pa=e=>({x:e,y:e});function o2(e,t,n){return ui(e,il(t,n))}function ym(e,t){return typeof e=="function"?e(t):e}function df(e){return e.split("-")[0]}function t_(e){return e.split("-")[1]}function a2(e){return e==="x"?"y":"x"}function Hbe(e){return e==="y"?"height":"width"}function pf(e){return["top","bottom"].includes(df(e))?"y":"x"}function Wbe(e){return a2(pf(e))}function Vbe(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kbe(e){return typeof e!="number"?Vbe(e):{top:e,right:e,bottom:e,left:e}}function gm(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ra(e){return s2(e)?(e.nodeName||"").toLowerCase():"#document"}function li(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yo(e){var t;return(t=(s2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function s2(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 n_(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 Gbe(e){return["table","td","th"].includes(Ra(e))}function r_(e){const t=i_(),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 Ybe(e){let t=js(e);for(;Ar(t)&&!mf(t);){if(r_(t))return t;t=js(t)}return null}function i_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mf(e){return["html","body","#document"].includes(Ra(e))}function ci(e){return li(e).getComputedStyle(e)}function vm(e){return Fn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function js(e){if(Ra(e)==="html")return e;const t=e.assignedSlot||e.parentNode||n_(e)&&e.host||Yo(e);return n_(t)?t.host:t}function u2(e){const t=js(e);return mf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ar(t)&&hf(t)?t:u2(t)}function Na(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=u2(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?Na(a.frameElement):[]):t.concat(i,Na(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&&n_(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function l2(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Jbe(){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 c2(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(l2())||t.test(Jbe()))&&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 d2(){return/apple/i.test(navigator.vendor)}function Xbe(){return l2().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function p2(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Qbe(e){return"nativeEvent"in e}function e0e(e){return e.matches("html,body")}function Bi(e){return(e==null?void 0:e.ownerDocument)||document}function o_(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 h2(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 m2(e){return Ar(e)&&e.matches(t0e)}function hr(e){e.preventDefault(),e.stopPropagation()}function y2(e,t,n){let{reference:r,floating:i}=e;const o=pf(t),a=Wbe(t),s=Hbe(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(t_(t)){case"start":h[a]-=m*(n&&c?-1:1);break;case"end":h[a]+=m*(n&&c?-1:1);break}return h}const n0e=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}=y2(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}=y2(c,m,l)),v=-1;continue}}return{x:d,y:p,placement:m,strategy:i,middlewareData:h}};async function g2(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}=ym(t,e),y=Kbe(h),w=s[m?p==="floating"?"reference":"floating":p],_=gm(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=gm(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 r0e(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=t_(n),l=pf(n)==="y",c=["left","top"].includes(a)?-1:1,d=o&&l?-1:1,p=ym(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 r0e(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},o0e=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}=ym(e,t),c={x:n,y:r},d=await g2(t,l),p=pf(df(i)),m=a2(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=o2(b,h,S)}if(a){const w=p==="y"?"top":"left",_=p==="y"?"bottom":"right",b=y+d[w],S=y-d[_];y=o2(b,y,S)}const v=s.fn({...t,[m]:h,[p]:y});return{...v,data:{x:v.x-n,y:v.y-r}}}}},a0e=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}=ym(e,t),l=await g2(t,s),c=df(n),d=t_(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?il(_,T):T}else{const T=h-l.top-l.bottom;S=d||b?il(w,T):T}if(b&&!d){const T=ui(l.left,0),j=ui(l.right,0),q=ui(l.top,0),L=ui(l.bottom,0);p?A=m-2*(T!==0||j!==0?T+j:ui(l.left,l.right)):S=h-2*(q!==0||L!==0?q+L: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 v2(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=mm(n)!==o||mm(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function a_(e){return Fn(e)?e:e.contextElement}function al(e){const t=a_(e);if(!Ar(t))return Pa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=v2(t);let a=(o?mm(n.width):n.width)/r,s=(o?mm(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const s0e=Pa(0);function b2(e){const t=li(e);return!i_()||!t.visualViewport?s0e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function u0e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==li(e)?!1:t}function Ls(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=a_(e);let a=Pa(1);t&&(r?Fn(r)&&(a=al(r)):a=al(e));const s=u0e(o,n,r)?b2(o):Pa(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=al(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 gm({width:d,height:p,x:l,y:c})}function l0e(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ar(n),o=Yo(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s=Pa(1);const l=Pa(0);if((i||!i&&r!=="fixed")&&((Ra(n)!=="body"||hf(o))&&(a=vm(n)),Ar(n))){const c=Ls(n);s=al(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 c0e(e){return Array.from(e.getClientRects())}function _2(e){return Ls(Yo(e)).left+vm(e).scrollLeft}function f0e(e){const t=Yo(e),n=vm(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+_2(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 d0e(e,t){const n=li(e),r=Yo(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=i_();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function p0e(e,t){const n=Ls(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ar(e)?al(e):Pa(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 w2(e,t,n){let r;if(t==="viewport")r=d0e(e,n);else if(t==="document")r=f0e(Yo(e));else if(Fn(t))r=p0e(t,n);else{const i=b2(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return gm(r)}function x2(e,t){const n=js(e);return n===t||!Fn(n)||mf(n)?!1:ci(n).position==="fixed"||x2(n,t)}function h0e(e,t){const n=t.get(e);if(n)return n;let r=Na(e,[],!1).filter(s=>Fn(s)&&Ra(s)!=="body"),i=null;const o=ci(e).position==="fixed";let a=o?js(e):e;for(;Fn(a)&&!mf(a);){const s=ci(a),l=r_(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||hf(a)&&!l&&x2(e,a))?r=r.filter(d=>d!==a):i=s,a=js(a)}return t.set(e,r),r}function m0e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?h0e(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,d)=>{const p=w2(t,d,i);return c.top=ui(p.top,c.top),c.right=il(p.right,c.right),c.bottom=il(p.bottom,c.bottom),c.left=ui(p.left,c.left),c},w2(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function y0e(e){return v2(e)}function g0e(e,t,n){const r=Ar(t),i=Yo(t),o=n==="fixed",a=Ls(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Pa(0);if(r||!r&&!o)if((Ra(t)!=="body"||hf(i))&&(s=vm(t)),r){const c=Ls(t,!0,o,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else i&&(l.x=_2(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function S2(e,t){return!Ar(e)||ci(e).position==="fixed"?null:t?t(e):e.offsetParent}function E2(e,t){const n=li(e);if(!Ar(e))return n;let r=S2(e,t);for(;r&&Gbe(r)&&ci(r).position==="static";)r=S2(r,t);return r&&(Ra(r)==="html"||Ra(r)==="body"&&ci(r).position==="static"&&!r_(r))?n:r||Ybe(e)||n}const v0e=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||E2,o=this.getDimensions;return{reference:g0e(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function b0e(e){return ci(e).direction==="rtl"}const _0e={convertOffsetParentRelativeRectToViewportRelativeRect:l0e,getDocumentElement:Yo,getClippingRect:m0e,getOffsetParent:E2,getElementRects:v0e,getClientRects:c0e,getDimensions:y0e,getScale:al,isElement:Fn,isRTL:b0e};function w0e(e,t){let n=null,r;const i=Yo(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=ol(d),y=ol(i.clientWidth-(c+p)),v=ol(i.clientHeight-(d+m)),w=ol(c),b={rootMargin:-h+"px "+-y+"px "+-v+"px "+-w+"px",threshold:ui(0,il(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 x0e(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=a_(e),d=i||o?[...c?Na(c):[],...Na(t)]:[];d.forEach(_=>{i&&_.addEventListener("scroll",n,{passive:!0}),o&&_.addEventListener("resize",n)});const p=c&&s?w0e(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?Ls(e):null;l&&w();function w(){const _=Ls(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 S0e=(e,t,n)=>{const r=new Map,i={platform:_0e,...n},o={...i.platform,_c:r};return n0e(e,t,{...i,platform:o})};var bm=typeof document<"u"?C.useLayoutEffect:C.useEffect;function _m(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(!_m(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)&&!_m(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function A2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function C2(e,t){const n=A2(e);return Math.round(t*n)/n}function O2(e){const t=z.useRef(e);return bm(()=>{t.current=e}),t}function E0e(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);_m(m,r)||h(r);const[y,v]=z.useState(null),[w,_]=z.useState(null),b=z.useCallback(F=>{F!=T.current&&(T.current=F,v(F))},[v]),S=z.useCallback(F=>{F!==j.current&&(j.current=F,_(F))},[_]),A=o||y,E=a||w,T=z.useRef(null),j=z.useRef(null),q=z.useRef(d),L=O2(l),M=O2(i),H=z.useCallback(()=>{if(!T.current||!j.current)return;const F={placement:t,strategy:n,middleware:m};M.current&&(F.platform=M.current),S0e(T.current,j.current,F).then(Y=>{const ne={...Y,isPositioned:!0};re.current&&!_m(q.current,ne)&&(q.current=ne,$F.flushSync(()=>{p(ne)}))})},[m,t,n,M]);bm(()=>{c===!1&&q.current.isPositioned&&(q.current.isPositioned=!1,p(F=>({...F,isPositioned:!1})))},[c]);const re=z.useRef(!1);bm(()=>(re.current=!0,()=>{re.current=!1}),[]),bm(()=>{if(A&&(T.current=A),E&&(j.current=E),A&&E){if(L.current)return L.current(A,E,H);H()}},[A,E,H,L]);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 F={position:n,left:0,top:0};if(!G.floating)return F;const Y=C2(G.floating,d.x),ne=C2(G.floating,d.y);return s?{...F,transform:"translate("+Y+"px, "+ne+"px)",...A2(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 A0e=["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])"],s_=A0e.join(","),T2=typeof Element>"u",yf=T2?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,wm=!T2&&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},xm=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},C0e=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},O0e=function(t,n,r){if(xm(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(s_));return n&&yf.call(t,s_)&&i.unshift(t),i=i.filter(r),i},T0e=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!xm(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,s_);d&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!xm(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},$2=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},k2=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||C0e(t))&&!$2(t)?0:t.tabIndex},$0e=function(t,n){var r=k2(t);return r<0&&n&&!$2(t)?0:r},k0e=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},I2=function(t){return t.tagName==="INPUT"},I0e=function(t){return I2(t)&&t.type==="hidden"},P0e=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},R0e=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},N0e=function(t){if(!t.name)return!0;var n=t.form||wm(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=R0e(i,t.form);return!o||o===t},D0e=function(t){return I2(t)&&t.type==="radio"},M0e=function(t){return D0e(t)&&!N0e(t)},j0e=function(t){var n,r=t&&wm(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=wm(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},P2=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},L0e=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=wm(t);if(l&&!l.shadowRoot&&i(l)===!0)return P2(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(j0e(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return P2(t);return!1},F0e=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},q0e=function(t,n){return!(n.disabled||xm(n)||I0e(n)||L0e(n,t)||P0e(n)||F0e(n))},R2=function(t,n){return!(M0e(n)||k2(n)<0||!q0e(t,n))},U0e=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},B0e=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=$0e(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(k0e).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},u_=function(t,n){n=n||{};var r;return n.getShadowRoot?r=T0e([t],n.includeContainer,{filter:R2.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:U0e}):r=O0e(t,n.includeContainer,R2.bind(null,n)),B0e(r)};const l_="ArrowUp",Sm="ArrowDown",sl="ArrowLeft",gf="ArrowRight";function Em(e,t,n){return Math.floor(e/t)!==n}function vf(e,t){return t<0||t>=e.current.length}function c_(e,t){return Cr(e,{disabledIndices:t})}function N2(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 z0e(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===l_){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===Sm&&(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=ol(c/o);n.key===gf&&(d&&hr(n),c%o!==o-1?(p=Cr(e,{startingIndex:c,disabledIndices:a}),i&&Em(p,o,m)&&(p=Cr(e,{startingIndex:c-c%o-1,disabledIndices:a}))):i&&(p=Cr(e,{startingIndex:c-c%o-1,disabledIndices:a})),Em(p,o,m)&&(p=c)),n.key===sl&&(d&&hr(n),c%o!==0?(p=Cr(e,{startingIndex:c,disabledIndices:a,decrement:!0}),i&&Em(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})),Em(p,o,m)&&(p=c));const h=ol(l/o)===m;vf(e,p)&&(i&&h?p=n.key===sl?l:Cr(e,{startingIndex:c-c%o-1,disabledIndices:a}):p=c)}return p}let D2=0;function Yo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(D2);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():D2=requestAnimationFrame(o)}var er=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Am(){return Am=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},Am.apply(this,arguments)}let f_=!1,Z0e=0;const M2=()=>"floating-ui-"+Z0e++;function H0e(){const[e,t]=z.useState(()=>f_?M2():void 0);return er(()=>{e==null&&t(M2())},[]),z.useEffect(()=>{f_||(f_=!0)},[]),e}const d_=z["useId".toString()]||H0e;function W0e(){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 V0e=z.createContext(null),K0e=z.createContext(null),j2=()=>{var e;return((e=z.useContext(V0e))==null?void 0:e.id)||null},Cm=()=>z.useContext(K0e);function bf(e){return"data-floating-ui-"+e}function Ma(e){const t=C.useRef(e);return er(()=>{t.current=e}),t}function G0e(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 ul(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 Y0e(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),ul(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let ll=new WeakMap,Om=new WeakSet,Tm={},p_=0;const J0e=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,L2=e=>e&&(e.host||L2(e.parentNode)),X0e=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=L2(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Q0e(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=X0e(t,e),s=new Set,l=new Set(a),c=[];Tm[i]||(Tm[i]=new WeakMap);const d=Tm[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",_=(ll.get(y)||0)+1,b=(d.get(y)||0)+1;ll.set(y,_),d.set(y,b),c.push(y),_===1&&w&&Om.add(y),b===1&&y.setAttribute(i,""),!w&&o&&y.setAttribute(o,"true")}})}return p_++,()=>{c.forEach(h=>{const y=(ll.get(h)||0)-1,v=(d.get(h)||0)-1;ll.set(h,y),d.set(h,v),y||(!Om.has(h)&&o&&h.removeAttribute(o),Om.delete(h)),v||h.removeAttribute(i)}),p_--,p_||(ll=new WeakMap,ll=new WeakMap,Om=new WeakSet,Tm={})}}function F2(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Bi(e[0]).body;return Q0e(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const h_=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function q2(e,t){const n=u_(e,h_());t==="prev"&&n.reverse();const r=n.indexOf(Da(Bi(e)));return n.slice(r+1)[0]}function U2(){return q2(document.body,"next")}function B2(){return q2(document.body,"prev")}function _f(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Yr(n,r)}function e_e(e){u_(e,h_()).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 m_={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 n_e;function z2(e){e.key==="Tab"&&(e.target,clearTimeout(n_e))}const $m=z.forwardRef(function(t,n){const[r,i]=z.useState();er(()=>(d2()&&i("button"),document.addEventListener("keydown",z2),()=>{document.removeEventListener("keydown",z2)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[bf("focus-guard")]:"",style:m_};return z.createElement("span",Am({},t,o))}),Z2=z.createContext(null);function r_e(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=z.useState(null),o=d_(),a=H2(),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=r_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:e_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(Z2.Provider,{value:z.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:p,portalNode:o,setFocusManagerState:s}),[i,o])},m&&o&&z.createElement($m,{"data-type":"outside",ref:l,onFocus:h=>{if(_f(h,o)){var y;(y=d.current)==null||y.focus()}else{const v=B2()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus()}}}),m&&o&&z.createElement("span",{"aria-owns":o.id,style:m_}),o&&Yi.createPortal(t,o),m&&o&&z.createElement($m,{"data-type":"outside",ref:c,onFocus:h=>{if(_f(h,o)){var y;(y=p.current)==null||y.focus()}else{const v=U2()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,h.nativeEvent))}}}))}const H2=()=>z.useContext(Z2),o_e=z.forwardRef(function(t,n){return z.createElement("button",Am({},t,{type:"button",ref:n,tabIndex:-1,style:m_}))});function a_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=J0e()?o:!0,A=Ma(i),E=Ma(a),T=Ma(s),j=Cm(),q=H2(),L=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=q!=null,F=_&&_.getAttribute("role")==="combobox"&&m2(_)&&L,Y=z.useCallback(function(ue){return ue===void 0&&(ue=b),ue?u_(ue,h_()):[]},[b]),ne=z.useCallback(ue=>{const Oe=Y(ue);return A.current.map(D=>_&&D==="reference"?_:b&&D==="floating"?b:Oe).filter(Boolean).flat()},[_,b,A,Y]);z.useEffect(()=>{if(r||!l)return;function ue(D){if(D.key==="Tab"){Yr(b,Da(Bi(b)))&&Y().length===0&&!F&&hr(D);const De=ne(),qe=h2(D);A.current[0]==="reference"&&qe===_&&(hr(D),D.shiftKey?Yo(De[De.length-1]):Yo(De[1])),A.current[1]==="floating"&&qe===b&&D.shiftKey&&(hr(D),Yo(De[0]))}}const Oe=Bi(b);return Oe.addEventListener("keydown",ue),()=>{Oe.removeEventListener("keydown",ue)}},[r,_,b,l,A,m,F,Y,ne]),z.useEffect(()=>{if(r||!d)return;function ue(){G.current=!0,setTimeout(()=>{G.current=!1})}function Oe(D){const De=D.relatedTarget;queueMicrotask(()=>{const qe=!(Yr(_,De)||Yr(b,De)||Yr(De,b)||Yr(q==null?void 0:q.portalNode,De)||De!=null&&De.hasAttribute(bf("focus-guard"))||j&&(ul(j.nodesRef.current,h).find(Me=>{var Je,rt;return Yr((Je=Me.context)==null?void 0:Je.elements.floating,De)||Yr((rt=Me.context)==null?void 0:rt.elements.domReference,De)})||G0e(j.nodesRef.current,h).find(Me=>{var Je,rt;return((Je=Me.context)==null?void 0:Je.elements.floating)===De||((rt=Me.context)==null?void 0:rt.elements.domReference)===De})));De&&qe&&!G.current&&De!==Q.current&&(re.current=!0,y(!1,D))})}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,q,y,d]),z.useEffect(()=>{var ue;if(r)return;const Oe=Array.from((q==null||(ue=q.portalNode)==null?void 0:ue.querySelectorAll("["+bf("portal")+"]"))||[]);if(b){const D=[b,...Oe,M.current,H.current,A.current.includes("reference")||F?_:null].filter(qe=>qe!=null),De=l?F2(D,S,!S):F2(D);return()=>{De()}}},[r,_,b,l,A,q,F,S]),er(()=>{if(r||!b)return;const ue=Bi(b),Oe=Da(ue);queueMicrotask(()=>{const D=ne(b),De=E.current,qe=(typeof De=="number"?D[De]:De.current)||b,Me=Yr(b,Oe);!L&&!Me&&p&&Yo(qe,{preventScroll:qe===b})})},[r,p,b,L,ne,E]),er(()=>{if(r||!b)return;let ue=!1;const Oe=Bi(b),D=Da(Oe),De=w.current;Q.current=D;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&&ul(j.nodesRef.current,h).some(rt=>{var Ke;return Yr((Ke=rt.context)==null?void 0:Ke.elements.floating,Me)})||De.openEvent&&["click","mousedown"].includes(De.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||!q))return q.setFocusManagerState({modal:l,closeOnFocusOut:d,open:p,onOpenChange:y,refs:m}),()=>{q.setFocusManagerState(null)}},[r,q,l,p,y,m,d]),er(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!L){const ue=()=>{const D=b.getAttribute("tabindex");A.current.includes("floating")||Da(Bi(b))!==m.domReference.current&&Y().length===0?D!=="0"&&b.setAttribute("tabindex","0"):D!=="-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,L]);function ce(ue){return r||!c||!l?null:z.createElement(o_e,{ref:ue==="start"?M:H,onClick:Oe=>y(!1,Oe.nativeEvent)},typeof c=="string"?c:"Dismiss")}const P=!r&&S&&!F&&(V||l);return z.createElement(z.Fragment,null,P&&z.createElement($m,{"data-type":"inside",ref:q==null?void 0:q.beforeInsideRef,onFocus:ue=>{if(l){const D=ne();Yo(i[0]==="reference"?D[0]:D[D.length-1])}else if(q!=null&&q.preserveTabOrder&&q.portalNode)if(re.current=!1,_f(ue,q.portalNode)){const D=U2()||_;D==null||D.focus()}else{var Oe;(Oe=q.beforeOutsideRef.current)==null||Oe.focus()}}}),!F&&ce("start"),n,ce("end"),P&&z.createElement($m,{"data-type":"inside",ref:q==null?void 0:q.afterInsideRef,onFocus:ue=>{if(l)Yo(ne()[0]);else if(q!=null&&q.preserveTabOrder&&q.portalNode)if(d&&(re.current=!0),_f(ue,q.portalNode)){const D=B2()||_;D==null||D.focus()}else{var Oe;(Oe=q.afterOutsideRef.current)==null||Oe.focus()}}}))}function W2(e){return Ar(e.target)&&e.target.tagName==="BUTTON"}function V2(e){return m2(e)}function s_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&&(p2(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}p2(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||W2(h))&&(h.key===" "&&!V2(o)&&(h.preventDefault(),m.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent))},onKeyUp(h){h.defaultPrevented||!d||W2(h)||V2(o)||h.key===" "&&m.current&&(m.current=!1,r(!(n&&l),h.nativeEvent))}}}:{},[a,i,s,c,d,o,l,n,r])}const u_e=z["useInsertionEffect".toString()]||(e=>e());function ja(e){const t=z.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return u_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 l_e={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},c_e={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},f_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 d_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=Cm(),S=j2()!=null,A=ja(typeof m=="function"?m:()=>!1),E=typeof m=="function"?A:m,T=z.useRef(!1),{escapeKeyBubbles:j,outsidePressBubbles:q}=f_e(_),L=ja(H=>{if(!n||!d||!p||H.key!=="Escape")return;const re=b?ul(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,Qbe(H)?H.nativeEvent:H)}),M=ja(H=>{const re=T.current;if(T.current=!1,re||typeof E=="function"&&!E(H))return;const Q=h2(H),G="["+bf("inert")+"]",V=Bi(l).querySelectorAll(G);let F=Fn(Q)?Q:null;for(;F&&!mf(F);){const ce=js(F);if(ce===Bi(l).body||!Fn(ce))break;F=ce}if(V.length&&Fn(Q)&&!e0e(Q)&&!Yr(Q,l)&&Array.from(V).every(ce=>!Yr(F,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&&ul(b.nodesRef.current,o).some(ce=>{var P;return o_(H,(P=ce.context)==null?void 0:P.elements.floating)});if(o_(H,l)||o_(H,s)||Y)return;const ne=b?ul(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}:c2(H)||f2(H)}}),r(!1,H)});return z.useEffect(()=>{if(!n||!d)return;c.current.__escapeKeyBubbles=j,c.current.__outsidePressBubbles=q;function H(G){r(!1,G)}const re=Bi(l);p&&re.addEventListener("keydown",L),E&&re.addEventListener(h,M);let Q=[];return w&&(Fn(s)&&(Q=Na(s)),Fn(l)&&(Q=Q.concat(Na(l))),!Fn(a)&&a&&a.contextElement&&(Q=Q.concat(Na(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",L),E&&re.removeEventListener(h,M),Q.forEach(G=>{G.removeEventListener("scroll",H)})}},[c,l,s,a,p,E,h,n,r,w,d,j,q,L,M]),z.useEffect(()=>{T.current=!1},[E,h]),z.useMemo(()=>d?{reference:{onKeyDown:L,[l_e[v]]:H=>{y&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,H.nativeEvent))}},floating:{onKeyDown:L,[c_e[h]]:()=>{T.current=!0}}}:{},[d,i,y,h,v,r,L])}let y_;process.env.NODE_ENV!=="production"&&(y_=new Set);function p_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=y_)!=null&&a.has(j))){var s;(s=y_)==null||s.add(j),console.error(j)}}}const[l,c]=z.useState(null),d=((t=e.elements)==null?void 0:t.reference)||l,p=E0e(e),m=Cm(),h=ja((j,q)=>{j&&(v.current.openEvent=q),r==null||r(j,q)}),y=z.useRef(null),v=z.useRef({}),w=z.useState(()=>W0e())[0],_=d_(),b=z.useCallback(j=>{const q=Fn(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),contextElement:j}:j;p.refs.setReference(q)},[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(q=>q.id===i);j&&(j.context=T)}),z.useMemo(()=>({...p,context:T,refs:A,elements:E}),[p,A,E,T])}function g_(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 h_e(e){e===void 0&&(e=[]);const t=e,n=z.useCallback(o=>g_(o,e,"reference"),t),r=z.useCallback(o=>g_(o,e,"floating"),t),i=z.useCallback(o=>g_(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 K2=!1;function km(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function G2(e,t){return km(t,e===l_||e===Sm,e===sl||e===gf)}function v_(e,t,n){return km(t,e===Sm,n?e===sl:e===gf)||e==="Enter"||e==" "||e===""}function m_e(e,t,n){return km(t,n?e===sl:e===gf,e===Sm)}function Y2(e,t,n){return km(t,n?e===gf:e===sl,e===l_)}function y_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:q}=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 L=j2(),M=Cm(),H=ja(c),re=z.useRef(_),Q=z.useRef(p??-1),G=z.useRef(null),V=z.useRef(!0),F=z.useRef(H),Y=z.useRef(!!a),ne=z.useRef(!1),ce=z.useRef(!1),P=Ma(A),ue=Ma(n),Oe=Ma(j),[D,De]=z.useState(),[qe,Me]=z.useState(),Je=ja(function(Pe,Ae,Fe){Fe===void 0&&(Fe=!1);const $e=Pe.current[Ae.current];$e&&(w?(De($e.id),M==null||M.events.emit("virtualfocus",$e),q&&(q.current=$e)):Yo($e,{preventScroll:!0,sync:Xbe()&&d2()?K2||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 K2=!0,!1}})},[]),er(()=>{d&&(n&&a?re.current&&p!=null&&(ce.current=!0,H(p)):Y.current&&(Q.current=-1,F.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||v_(G.current,E,v)||y?c_(s,P.current):N2(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===L))==null||(Ae=Pe.context)==null?void 0:Ae.elements.floating,Ze=Da(Bi(a)),lt=Fe.some(K=>K.context&&Yr(K.context.elements.floating,Ze));$e&&!lt&&V.current&&$e.focus({preventScroll:!0})},[d,a,M,L,w]),er(()=>{if(!d||!M||!w||L)return;function Pe(Ae){Me(Ae.id),q&&(q.current=Ae)}return M.events.on("virtualfocus",Pe),()=>{M.events.off("virtualfocus",Pe)}},[d,M,w,L,q]),er(()=>{F.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&&Y2(K.key,E,v)){hr(K),r(!1,K.nativeEvent),Ar(o)&&!w&&o.focus();return}const de=Q.current,Te=c_(s,Pe),Se=N2(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=z0e(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"))&&G2(K.key,E)){if(hr(K),n&&!w&&Da(K.currentTarget.ownerDocument)===K.currentTarget){Q.current=v_(K.key,E,v)?Te:Se,H(Q.current);return}v_(K.key,E,v)?h?Q.current=de>=Se?m&&de!==s.current.length?-1:Te:Cr(s,{startingIndex:de,disabledIndices:Pe}):Q.current=Math.min(Se,Cr(s,{startingIndex:de,disabledIndices:Pe})):h?Q.current=de<=Te?m&&de!==-1?s.current.length:Se:Cr(s,{startingIndex:de,decrement:!0,disabledIndices:Pe}):Q.current=Math.max(Te,Cr(s,{startingIndex:de,decrement:!0,disabledIndices:Pe})),vf(s,Q.current)?H(null):H(Q.current)}}function Fe(K){_==="auto"&&c2(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||D},lt=s.current.find(K=>(K==null?void 0:K.id)===D);return{reference:{...Ze,onKeyDown(K){V.current=!1;const de=K.key.indexOf("Arrow")===0,Te=m_e(K.key,E,v),Se=Y2(K.key,E,v),et=G2(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),ye=M&&ie?Y0e(M.nodesRef.current,ie.id):null;if(de&&ye&&q){const xe=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Te||Se){var ot,It;const Be=((ot=ye.context)==null?void 0:ot.elements.domReference)===K.currentTarget,ct=Se&&!Be?(It=ye.context)==null?void 0:It.elements.domReference:Te?lt:null;ct&&(hr(K),ct.dispatchEvent(xe),Me(void 0))}if(et&&ye.context&&ye.context.open&&ye.parentId&&K.currentTarget!==ye.context.elements.domReference){var mt;hr(K),(mt=ye.context.elements.domReference)==null||mt.dispatchEvent(xe);return}}return Ae(K)}if(!(!n&&!S&&de)){if(Ue&&(G.current=y&&et?null:K.key),y){Te&&(hr(K),n?(Q.current=c_(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,D,qe,P,ue,s,d,E,v,w,n,rt,y,p,S,m,T,h,_,H,r,Ke,M,q])}function g_e(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=d_();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 v_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=ja(s),S=ja(l),A=Ma(d),E=Ma(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(L){L?i.current.typing||(i.current.typing=L,S(L)):i.current.typing&&(i.current.typing=L,S(L))}function j(L,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?L.indexOf(re):-1}function q(L){const M=o.current;if(v.current.length>0&&v.current[0]!==" "&&(j(M,M,v.current)===-1?T(!1):L.key===" "&&hr(L)),M==null||E.current.includes(L.key)||L.key.length!==1||L.ctrlKey||L.metaKey||L.altKey)return;r&&L.key!==" "&&(hr(L),T(!0)),M.every(G=>{var V,F;return G?((V=G[0])==null?void 0:V.toLocaleLowerCase())!==((F=G[1])==null?void 0:F.toLocaleLowerCase()):!0})&&v.current===L.key&&(v.current="",w.current=_.current),v.current+=L.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):L.key!==" "&&(v.current="",T(!1))}return{reference:{onKeyDown:q},floating:{onKeyDown:q,onKeyUp(L){L.key===" "&&T(!1)}}}},[c,r,i,o,p,E,A,b,S])}const b_e=({styles:e,type:t,options:n,label:r,reusable:i})=>{var Y,ne,ce,P,ue,Oe,D,De,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}=p_e({placement:"bottom-start",open:l,onOpenChange:w,whileElementsMounted:x0e,middleware:[i0e(5),o0e({padding:10,boundary:(a==null?void 0:a.current)??void 0,crossAxis:!0}),a0e({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=s_e(S,{event:"mousedown"}),q=d_e(S),L=g_e(S,{role:"listbox"}),M=y_e(S,{listRef:A,activeIndex:d,selectedIndex:m,onNavigate:p,loop:!0}),H=v_e(S,{listRef:E,activeIndex:d,selectedIndex:m,onMatch:l?p:h,onTypingChange(Ke){T.current=Ke}}),{getReferenceProps:re,getFloatingProps:Q,getItemProps:G}=h_e([q,L,M,H,j]),V=Ke=>{h(Ke),o(y[v[Ke]]),c(!1)},F=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:F||r||"Select..."}),X.jsx(zve,{...(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(a_e,{context:S,modal:!1,children:X.jsx("div",{ref:_.setFloating,className:(qe=(De=(D=e==null?void 0:e[t])==null?void 0:D.content)==null?void 0:De.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)})})})})]})},__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(Hve,{...(l=n==null?void 0:n[e])==null?void 0:l.icon})]})}),J2={audio:Dve,bubble:kve,button:Tve,carousel:Zbe,column:Jve,dropdown:b_e,file:__e,image:Pve,location:Yve,row:Xve,text:m4,video:Nve},cl=({block:e,styles:t,...n})=>{const i=it(a=>a.renderers)[e.type]??J2[e.type],o={...n,styles:t,...e};return X.jsx(i,{...o})},X2=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(WR.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})})})),Q2=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}=VR(),c=C.useRef(null),d=ka(w=>w.user),p=ka(w=>w.messageHistory),[m,h]=C.useState(!1);y4(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})}),eN=C.memo(C.forwardRef(({icon:e=Gve,...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})]})})),tN=C.memo(C.forwardRef(({icon:e=Uve,...t},n)=>{var a,s;const{value:r,sendMessage:i}=VR(),{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})})})),nN=({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(GR.Provider,{value:{hideModal:l,showModal:s,title:r,content:o,open:t},children:[X.jsx(qa,{open:t,onOpenChange:n,children:X.jsx(qa.Content,{title:r,children:o})}),e]})},w_e=({children:e,...t})=>{const n=C.useRef(),r=C.useRef(null);return n.current||(n.current=Ove({...t,messageContainerRef:r})),X.jsx(HR.Provider,{value:n.current,children:X.jsx(x_e,{children:e})})},x_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=ka(h=>h.setConversationId),l=ka(h=>h.user),c=ka(h=>h.conversationId),d=ka(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)})},[]),B0(async()=>{if(t)return t.on("error",()=>{m(h=>h+1)})}),B0(async()=>{if(!t)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]),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 S_e=z["useId".toString()]||(()=>{});let E_e=0;function Im(e){const[t,n]=z.useState(S_e());return Xs(()=>{e||n(r=>r??String(E_e++))},[e]),e||(t?`radix-${t}`:"")}function rN({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=A_e({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pr(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 A_e({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,i=C.useRef(r),o=Pr(t);return C.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function C_e(e,t=globalThis==null?void 0:globalThis.document){const n=Pr(e);C.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const b_="dismissableLayer.update",O_e="dismissableLayer.pointerDownOutside",T_e="dismissableLayer.focusOutside";let iN;const $_e=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),k_e=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($_e),[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,q=>m(q)),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=I_e(q=>{const L=q.target,M=[...d.branches].some(H=>H.contains(L));!E||M||(o==null||o(q),s==null||s(q),q.defaultPrevented||l==null||l())},h),j=P_e(q=>{const L=q.target;[...d.branches].some(H=>H.contains(L))||(a==null||a(q),s==null||s(q),q.defaultPrevented||l==null||l())},h);return C_e(q=>{S===d.layers.size-1&&(i==null||i(q),!q.defaultPrevented&&l&&(q.preventDefault(),l()))},h),C.useEffect(()=>{if(p)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(iN=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),oN(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=iN)}},[p,h,r,d]),C.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),oN())},[p,d]),C.useEffect(()=>{const q=()=>y({});return document.addEventListener(b_,q),()=>document.removeEventListener(b_,q)},[]),C.createElement(lr.div,ts({},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 I_e(e,t=globalThis==null?void 0:globalThis.document){const n=Pr(e),r=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let c=function(){aN(O_e,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 P_e(e,t=globalThis==null?void 0:globalThis.document){const n=Pr(e),r=C.useRef(!1);return C.useEffect(()=>{const i=o=>{o.target&&!r.current&&aN(T_e,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 oN(){const e=new CustomEvent(b_);document.dispatchEvent(e)}function aN(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?jF(i,o):i.dispatchEvent(o)}const __="focusScope.autoFocusOnMount",w_="focusScope.autoFocusOnUnmount",sN={bubbles:!1,cancelable:!0},R_e=C.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.useState(null),c=Pr(i),d=Pr(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:La(p.current,{select:!0})},w=function(S){if(h.paused||!s)return;const A=S.relatedTarget;A!==null&&(s.contains(A)||La(p.current,{select:!0}))},_=function(S){const A=document.activeElement;for(const E of S)E.removedNodes.length>0&&(s!=null&&s.contains(A)||La(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){cN.add(h);const v=document.activeElement;if(!s.contains(v)){const _=new CustomEvent(__,sN);s.addEventListener(__,c),s.dispatchEvent(_),_.defaultPrevented||(N_e(F_e(uN(s)),{select:!0}),document.activeElement===v&&La(s))}return()=>{s.removeEventListener(__,c),setTimeout(()=>{const _=new CustomEvent(w_,sN);s.addEventListener(w_,d),s.dispatchEvent(_),_.defaultPrevented||La(v??document.body,{select:!0}),s.removeEventListener(w_,d),cN.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]=D_e(b);S&&A?!v.shiftKey&&_===A?(v.preventDefault(),n&&La(S,{select:!0})):v.shiftKey&&_===S&&(v.preventDefault(),n&&La(A,{select:!0})):_===b&&v.preventDefault()}},[n,r,h.paused]);return C.createElement(lr.div,ts({tabIndex:-1},a,{ref:m,onKeyDown:y}))});function N_e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(La(r,{select:t}),document.activeElement!==n)return}function D_e(e){const t=uN(e),n=lN(t,e),r=lN(t.reverse(),e);return[n,r]}function uN(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 lN(e,t){for(const n of e)if(!M_e(n,{upTo:t}))return n}function M_e(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 j_e(e){return e instanceof HTMLInputElement&&"select"in e}function La(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&j_e(e)&&t&&e.select()}}const cN=L_e();function L_e(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fN(e,t),e.unshift(t)},remove(t){var n;e=fN(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function fN(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function F_e(e){return e.filter(t=>t.tagName!=="A")}function q_e(e,t){return C.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const Fa=e=>{const{present:t,children:n}=e,r=U_e(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};Fa.displayName="Presence";function U_e(e){const[t,n]=C.useState(),r=C.useRef({}),i=C.useRef(e),o=C.useRef("none"),a=e?"mounted":"unmounted",[s,l]=q_e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=Pm(r.current);o.current=s==="mounted"?c:"none"},[s]),Xs(()=>{const c=r.current,d=i.current;if(d!==e){const m=o.current,h=Pm(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]),Xs(()=>{if(t){const c=p=>{const h=Pm(r.current).includes(p.animationName);p.target===t&&h&&Yi.flushSync(()=>l("ANIMATION_END"))},d=p=>{p.target===t&&(o.current=Pm(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 Pm(e){return(e==null?void 0:e.animationName)||"none"}let x_=0;function B_e(){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:dN()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:dN()),x_++,()=>{x_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),x_--}},[])}function dN(){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 pN(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 z_e(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 Rm="right-scroll-bar-position",Nm="width-before-scroll-bar",Z_e="with-scroll-bars-hidden",H_e="--removed-body-scroll-bar-size";function W_e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function V_e(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 K_e(e,t){return V_e(t||null,function(n){return e.forEach(function(r){return W_e(r,n)})})}function G_e(e){return e}function Y_e(e,t){t===void 0&&(t=G_e);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 J_e(e){e===void 0&&(e={});var t=Y_e(null);return t.options=_o({async:!0,ssr:!1},e),t}var hN=function(e){var t=e.sideCar,n=pN(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))};hN.isSideCarExport=!0;function X_e(e,t){return e.useMedium(t),hN}var mN=J_e(),S_=function(){},Dm=z.forwardRef(function(e,t){var n=z.useRef(null),r=z.useState({onScrollCapture:S_,onWheelCapture:S_,onTouchMoveCapture:S_}),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=pN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=m,A=K_e([n,t]),E=_o(_o({},b),i);return z.createElement(z.Fragment,null,d&&z.createElement(S,{sideCar:mN,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))});Dm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Dm.classNames={fullWidth:Nm,zeroRight:Rm};var yN,Q_e=function(){if(yN)return yN;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ewe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Q_e();return t&&e.setAttribute("nonce",t),e}function twe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nwe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rwe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ewe())&&(twe(t,n),nwe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iwe=function(){var e=rwe();return function(t,n){z.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gN=function(){var e=iwe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},owe={left:0,top:0,right:0,gap:0},E_=function(e){return parseInt(e||"",10)||0},awe=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[E_(n),E_(r),E_(i)]},swe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return owe;var t=awe(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])}},uwe=gN(),lwe=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 A0e=["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])"],s_=A0e.join(","),T2=typeof Element>"u",yf=T2?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,wm=!T2&&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},xm=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},C0e=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},O0e=function(t,n,r){if(xm(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(s_));return n&&yf.call(t,s_)&&i.unshift(t),i=i.filter(r),i},T0e=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!xm(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,s_);d&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!xm(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},$2=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},k2=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||C0e(t))&&!$2(t)?0:t.tabIndex},$0e=function(t,n){var r=k2(t);return r<0&&n&&!$2(t)?0:r},k0e=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},I2=function(t){return t.tagName==="INPUT"},I0e=function(t){return I2(t)&&t.type==="hidden"},P0e=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},R0e=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},N0e=function(t){if(!t.name)return!0;var n=t.form||wm(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=R0e(i,t.form);return!o||o===t},D0e=function(t){return I2(t)&&t.type==="radio"},M0e=function(t){return D0e(t)&&!N0e(t)},j0e=function(t){var n,r=t&&wm(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=wm(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},P2=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},L0e=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=wm(t);if(l&&!l.shadowRoot&&i(l)===!0)return P2(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(j0e(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return P2(t);return!1},F0e=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},q0e=function(t,n){return!(n.disabled||xm(n)||I0e(n)||L0e(n,t)||P0e(n)||F0e(n))},R2=function(t,n){return!(M0e(n)||k2(n)<0||!q0e(t,n))},U0e=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},B0e=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=$0e(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(k0e).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},u_=function(t,n){n=n||{};var r;return n.getShadowRoot?r=T0e([t],n.includeContainer,{filter:R2.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:U0e}):r=O0e(t,n.includeContainer,R2.bind(null,n)),B0e(r)};const l_="ArrowUp",Sm="ArrowDown",sl="ArrowLeft",gf="ArrowRight";function Em(e,t,n){return Math.floor(e/t)!==n}function vf(e,t){return t<0||t>=e.current.length}function c_(e,t){return Cr(e,{disabledIndices:t})}function N2(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 z0e(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===l_){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===Sm&&(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=ol(c/o);n.key===gf&&(d&&hr(n),c%o!==o-1?(p=Cr(e,{startingIndex:c,disabledIndices:a}),i&&Em(p,o,m)&&(p=Cr(e,{startingIndex:c-c%o-1,disabledIndices:a}))):i&&(p=Cr(e,{startingIndex:c-c%o-1,disabledIndices:a})),Em(p,o,m)&&(p=c)),n.key===sl&&(d&&hr(n),c%o!==0?(p=Cr(e,{startingIndex:c,disabledIndices:a,decrement:!0}),i&&Em(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})),Em(p,o,m)&&(p=c));const h=ol(l/o)===m;vf(e,p)&&(i&&h?p=n.key===sl?l:Cr(e,{startingIndex:c-c%o-1,disabledIndices:a}):p=c)}return p}let D2=0;function Jo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(D2);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():D2=requestAnimationFrame(o)}var er=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Am(){return Am=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},Am.apply(this,arguments)}let f_=!1,Z0e=0;const M2=()=>"floating-ui-"+Z0e++;function H0e(){const[e,t]=z.useState(()=>f_?M2():void 0);return er(()=>{e==null&&t(M2())},[]),z.useEffect(()=>{f_||(f_=!0)},[]),e}const d_=z["useId".toString()]||H0e;function W0e(){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 V0e=z.createContext(null),K0e=z.createContext(null),j2=()=>{var e;return((e=z.useContext(V0e))==null?void 0:e.id)||null},Cm=()=>z.useContext(K0e);function bf(e){return"data-floating-ui-"+e}function Ma(e){const t=C.useRef(e);return er(()=>{t.current=e}),t}function G0e(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 ul(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 Y0e(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),ul(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let ll=new WeakMap,Om=new WeakSet,Tm={},p_=0;const J0e=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,L2=e=>e&&(e.host||L2(e.parentNode)),X0e=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=L2(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Q0e(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=X0e(t,e),s=new Set,l=new Set(a),c=[];Tm[i]||(Tm[i]=new WeakMap);const d=Tm[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",_=(ll.get(y)||0)+1,b=(d.get(y)||0)+1;ll.set(y,_),d.set(y,b),c.push(y),_===1&&w&&Om.add(y),b===1&&y.setAttribute(i,""),!w&&o&&y.setAttribute(o,"true")}})}return p_++,()=>{c.forEach(h=>{const y=(ll.get(h)||0)-1,v=(d.get(h)||0)-1;ll.set(h,y),d.set(h,v),y||(!Om.has(h)&&o&&h.removeAttribute(o),Om.delete(h)),v||h.removeAttribute(i)}),p_--,p_||(ll=new WeakMap,ll=new WeakMap,Om=new WeakSet,Tm={})}}function F2(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Bi(e[0]).body;return Q0e(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const h_=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function q2(e,t){const n=u_(e,h_());t==="prev"&&n.reverse();const r=n.indexOf(Da(Bi(e)));return n.slice(r+1)[0]}function U2(){return q2(document.body,"next")}function B2(){return q2(document.body,"prev")}function _f(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Yr(n,r)}function e_e(e){u_(e,h_()).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 m_={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 n_e;function z2(e){e.key==="Tab"&&(e.target,clearTimeout(n_e))}const $m=z.forwardRef(function(t,n){const[r,i]=z.useState();er(()=>(d2()&&i("button"),document.addEventListener("keydown",z2),()=>{document.removeEventListener("keydown",z2)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[bf("focus-guard")]:"",style:m_};return z.createElement("span",Am({},t,o))}),Z2=z.createContext(null);function r_e(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=z.useState(null),o=d_(),a=H2(),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=r_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:e_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(Z2.Provider,{value:z.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:p,portalNode:o,setFocusManagerState:s}),[i,o])},m&&o&&z.createElement($m,{"data-type":"outside",ref:l,onFocus:h=>{if(_f(h,o)){var y;(y=d.current)==null||y.focus()}else{const v=B2()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus()}}}),m&&o&&z.createElement("span",{"aria-owns":o.id,style:m_}),o&&Yi.createPortal(t,o),m&&o&&z.createElement($m,{"data-type":"outside",ref:c,onFocus:h=>{if(_f(h,o)){var y;(y=p.current)==null||y.focus()}else{const v=U2()||(a==null?void 0:a.refs.domReference.current);v==null||v.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,h.nativeEvent))}}}))}const H2=()=>z.useContext(Z2),o_e=z.forwardRef(function(t,n){return z.createElement("button",Am({},t,{type:"button",ref:n,tabIndex:-1,style:m_}))});function a_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=J0e()?o:!0,A=Ma(i),E=Ma(a),T=Ma(s),j=Cm(),q=H2(),L=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=q!=null,F=_&&_.getAttribute("role")==="combobox"&&m2(_)&&L,Y=z.useCallback(function(ue){return ue===void 0&&(ue=b),ue?u_(ue,h_()):[]},[b]),ne=z.useCallback(ue=>{const Oe=Y(ue);return A.current.map(D=>_&&D==="reference"?_:b&&D==="floating"?b:Oe).filter(Boolean).flat()},[_,b,A,Y]);z.useEffect(()=>{if(r||!l)return;function ue(D){if(D.key==="Tab"){Yr(b,Da(Bi(b)))&&Y().length===0&&!F&&hr(D);const De=ne(),qe=h2(D);A.current[0]==="reference"&&qe===_&&(hr(D),D.shiftKey?Jo(De[De.length-1]):Jo(De[1])),A.current[1]==="floating"&&qe===b&&D.shiftKey&&(hr(D),Jo(De[0]))}}const Oe=Bi(b);return Oe.addEventListener("keydown",ue),()=>{Oe.removeEventListener("keydown",ue)}},[r,_,b,l,A,m,F,Y,ne]),z.useEffect(()=>{if(r||!d)return;function ue(){G.current=!0,setTimeout(()=>{G.current=!1})}function Oe(D){const De=D.relatedTarget;queueMicrotask(()=>{const qe=!(Yr(_,De)||Yr(b,De)||Yr(De,b)||Yr(q==null?void 0:q.portalNode,De)||De!=null&&De.hasAttribute(bf("focus-guard"))||j&&(ul(j.nodesRef.current,h).find(Me=>{var Je,rt;return Yr((Je=Me.context)==null?void 0:Je.elements.floating,De)||Yr((rt=Me.context)==null?void 0:rt.elements.domReference,De)})||G0e(j.nodesRef.current,h).find(Me=>{var Je,rt;return((Je=Me.context)==null?void 0:Je.elements.floating)===De||((rt=Me.context)==null?void 0:rt.elements.domReference)===De})));De&&qe&&!G.current&&De!==Q.current&&(re.current=!0,y(!1,D))})}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,q,y,d]),z.useEffect(()=>{var ue;if(r)return;const Oe=Array.from((q==null||(ue=q.portalNode)==null?void 0:ue.querySelectorAll("["+bf("portal")+"]"))||[]);if(b){const D=[b,...Oe,M.current,H.current,A.current.includes("reference")||F?_:null].filter(qe=>qe!=null),De=l?F2(D,S,!S):F2(D);return()=>{De()}}},[r,_,b,l,A,q,F,S]),er(()=>{if(r||!b)return;const ue=Bi(b),Oe=Da(ue);queueMicrotask(()=>{const D=ne(b),De=E.current,qe=(typeof De=="number"?D[De]:De.current)||b,Me=Yr(b,Oe);!L&&!Me&&p&&Jo(qe,{preventScroll:qe===b})})},[r,p,b,L,ne,E]),er(()=>{if(r||!b)return;let ue=!1;const Oe=Bi(b),D=Da(Oe),De=w.current;Q.current=D;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&&ul(j.nodesRef.current,h).some(rt=>{var Ke;return Yr((Ke=rt.context)==null?void 0:Ke.elements.floating,Me)})||De.openEvent&&["click","mousedown"].includes(De.openEvent.type))&&m.domReference.current&&(Q.current=m.domReference.current),T.current&&Ar(Q.current)&&!re.current&&Jo(Q.current,{cancelPrevious:!1,preventScroll:ue})}},[r,b,T,w,m,v,j,h]),er(()=>{if(!(r||!q))return q.setFocusManagerState({modal:l,closeOnFocusOut:d,open:p,onOpenChange:y,refs:m}),()=>{q.setFocusManagerState(null)}},[r,q,l,p,y,m,d]),er(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!L){const ue=()=>{const D=b.getAttribute("tabindex");A.current.includes("floating")||Da(Bi(b))!==m.domReference.current&&Y().length===0?D!=="0"&&b.setAttribute("tabindex","0"):D!=="-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,L]);function ce(ue){return r||!c||!l?null:z.createElement(o_e,{ref:ue==="start"?M:H,onClick:Oe=>y(!1,Oe.nativeEvent)},typeof c=="string"?c:"Dismiss")}const P=!r&&S&&!F&&(V||l);return z.createElement(z.Fragment,null,P&&z.createElement($m,{"data-type":"inside",ref:q==null?void 0:q.beforeInsideRef,onFocus:ue=>{if(l){const D=ne();Jo(i[0]==="reference"?D[0]:D[D.length-1])}else if(q!=null&&q.preserveTabOrder&&q.portalNode)if(re.current=!1,_f(ue,q.portalNode)){const D=U2()||_;D==null||D.focus()}else{var Oe;(Oe=q.beforeOutsideRef.current)==null||Oe.focus()}}}),!F&&ce("start"),n,ce("end"),P&&z.createElement($m,{"data-type":"inside",ref:q==null?void 0:q.afterInsideRef,onFocus:ue=>{if(l)Jo(ne()[0]);else if(q!=null&&q.preserveTabOrder&&q.portalNode)if(d&&(re.current=!0),_f(ue,q.portalNode)){const D=B2()||_;D==null||D.focus()}else{var Oe;(Oe=q.afterOutsideRef.current)==null||Oe.focus()}}}))}function W2(e){return Ar(e.target)&&e.target.tagName==="BUTTON"}function V2(e){return m2(e)}function s_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&&(p2(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}p2(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||W2(h))&&(h.key===" "&&!V2(o)&&(h.preventDefault(),m.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent))},onKeyUp(h){h.defaultPrevented||!d||W2(h)||V2(o)||h.key===" "&&m.current&&(m.current=!1,r(!(n&&l),h.nativeEvent))}}}:{},[a,i,s,c,d,o,l,n,r])}const u_e=z["useInsertionEffect".toString()]||(e=>e());function ja(e){const t=z.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return u_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 l_e={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},c_e={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},f_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 d_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=Cm(),S=j2()!=null,A=ja(typeof m=="function"?m:()=>!1),E=typeof m=="function"?A:m,T=z.useRef(!1),{escapeKeyBubbles:j,outsidePressBubbles:q}=f_e(_),L=ja(H=>{if(!n||!d||!p||H.key!=="Escape")return;const re=b?ul(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,Qbe(H)?H.nativeEvent:H)}),M=ja(H=>{const re=T.current;if(T.current=!1,re||typeof E=="function"&&!E(H))return;const Q=h2(H),G="["+bf("inert")+"]",V=Bi(l).querySelectorAll(G);let F=Fn(Q)?Q:null;for(;F&&!mf(F);){const ce=js(F);if(ce===Bi(l).body||!Fn(ce))break;F=ce}if(V.length&&Fn(Q)&&!e0e(Q)&&!Yr(Q,l)&&Array.from(V).every(ce=>!Yr(F,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&&ul(b.nodesRef.current,o).some(ce=>{var P;return o_(H,(P=ce.context)==null?void 0:P.elements.floating)});if(o_(H,l)||o_(H,s)||Y)return;const ne=b?ul(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}:c2(H)||f2(H)}}),r(!1,H)});return z.useEffect(()=>{if(!n||!d)return;c.current.__escapeKeyBubbles=j,c.current.__outsidePressBubbles=q;function H(G){r(!1,G)}const re=Bi(l);p&&re.addEventListener("keydown",L),E&&re.addEventListener(h,M);let Q=[];return w&&(Fn(s)&&(Q=Na(s)),Fn(l)&&(Q=Q.concat(Na(l))),!Fn(a)&&a&&a.contextElement&&(Q=Q.concat(Na(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",L),E&&re.removeEventListener(h,M),Q.forEach(G=>{G.removeEventListener("scroll",H)})}},[c,l,s,a,p,E,h,n,r,w,d,j,q,L,M]),z.useEffect(()=>{T.current=!1},[E,h]),z.useMemo(()=>d?{reference:{onKeyDown:L,[l_e[v]]:H=>{y&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,H.nativeEvent))}},floating:{onKeyDown:L,[c_e[h]]:()=>{T.current=!0}}}:{},[d,i,y,h,v,r,L])}let y_;process.env.NODE_ENV!=="production"&&(y_=new Set);function p_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=y_)!=null&&a.has(j))){var s;(s=y_)==null||s.add(j),console.error(j)}}}const[l,c]=z.useState(null),d=((t=e.elements)==null?void 0:t.reference)||l,p=E0e(e),m=Cm(),h=ja((j,q)=>{j&&(v.current.openEvent=q),r==null||r(j,q)}),y=z.useRef(null),v=z.useRef({}),w=z.useState(()=>W0e())[0],_=d_(),b=z.useCallback(j=>{const q=Fn(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),contextElement:j}:j;p.refs.setReference(q)},[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(q=>q.id===i);j&&(j.context=T)}),z.useMemo(()=>({...p,context:T,refs:A,elements:E}),[p,A,E,T])}function g_(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 h_e(e){e===void 0&&(e=[]);const t=e,n=z.useCallback(o=>g_(o,e,"reference"),t),r=z.useCallback(o=>g_(o,e,"floating"),t),i=z.useCallback(o=>g_(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 K2=!1;function km(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function G2(e,t){return km(t,e===l_||e===Sm,e===sl||e===gf)}function v_(e,t,n){return km(t,e===Sm,n?e===sl:e===gf)||e==="Enter"||e==" "||e===""}function m_e(e,t,n){return km(t,n?e===sl:e===gf,e===Sm)}function Y2(e,t,n){return km(t,n?e===gf:e===sl,e===l_)}function y_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:q}=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 L=j2(),M=Cm(),H=ja(c),re=z.useRef(_),Q=z.useRef(p??-1),G=z.useRef(null),V=z.useRef(!0),F=z.useRef(H),Y=z.useRef(!!a),ne=z.useRef(!1),ce=z.useRef(!1),P=Ma(A),ue=Ma(n),Oe=Ma(j),[D,De]=z.useState(),[qe,Me]=z.useState(),Je=ja(function(Pe,Ae,Fe){Fe===void 0&&(Fe=!1);const $e=Pe.current[Ae.current];$e&&(w?(De($e.id),M==null||M.events.emit("virtualfocus",$e),q&&(q.current=$e)):Jo($e,{preventScroll:!0,sync:Xbe()&&d2()?K2||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 K2=!0,!1}})},[]),er(()=>{d&&(n&&a?re.current&&p!=null&&(ce.current=!0,H(p)):Y.current&&(Q.current=-1,F.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||v_(G.current,E,v)||y?c_(s,P.current):N2(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===L))==null||(Ae=Pe.context)==null?void 0:Ae.elements.floating,Ze=Da(Bi(a)),lt=Fe.some(K=>K.context&&Yr(K.context.elements.floating,Ze));$e&&!lt&&V.current&&$e.focus({preventScroll:!0})},[d,a,M,L,w]),er(()=>{if(!d||!M||!w||L)return;function Pe(Ae){Me(Ae.id),q&&(q.current=Ae)}return M.events.on("virtualfocus",Pe),()=>{M.events.off("virtualfocus",Pe)}},[d,M,w,L,q]),er(()=>{F.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||Jo(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&&Y2(K.key,E,v)){hr(K),r(!1,K.nativeEvent),Ar(o)&&!w&&o.focus();return}const de=Q.current,Te=c_(s,Pe),Se=N2(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=z0e(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"))&&G2(K.key,E)){if(hr(K),n&&!w&&Da(K.currentTarget.ownerDocument)===K.currentTarget){Q.current=v_(K.key,E,v)?Te:Se,H(Q.current);return}v_(K.key,E,v)?h?Q.current=de>=Se?m&&de!==s.current.length?-1:Te:Cr(s,{startingIndex:de,disabledIndices:Pe}):Q.current=Math.min(Se,Cr(s,{startingIndex:de,disabledIndices:Pe})):h?Q.current=de<=Te?m&&de!==-1?s.current.length:Se:Cr(s,{startingIndex:de,decrement:!0,disabledIndices:Pe}):Q.current=Math.max(Te,Cr(s,{startingIndex:de,decrement:!0,disabledIndices:Pe})),vf(s,Q.current)?H(null):H(Q.current)}}function Fe(K){_==="auto"&&c2(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||D},lt=s.current.find(K=>(K==null?void 0:K.id)===D);return{reference:{...Ze,onKeyDown(K){V.current=!1;const de=K.key.indexOf("Arrow")===0,Te=m_e(K.key,E,v),Se=Y2(K.key,E,v),et=G2(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),ye=M&&ie?Y0e(M.nodesRef.current,ie.id):null;if(de&&ye&&q){const xe=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(Te||Se){var ot,It;const Be=((ot=ye.context)==null?void 0:ot.elements.domReference)===K.currentTarget,ct=Se&&!Be?(It=ye.context)==null?void 0:It.elements.domReference:Te?lt:null;ct&&(hr(K),ct.dispatchEvent(xe),Me(void 0))}if(et&&ye.context&&ye.context.open&&ye.parentId&&K.currentTarget!==ye.context.elements.domReference){var mt;hr(K),(mt=ye.context.elements.domReference)==null||mt.dispatchEvent(xe);return}}return Ae(K)}if(!(!n&&!S&&de)){if(Ue&&(G.current=y&&et?null:K.key),y){Te&&(hr(K),n?(Q.current=c_(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,D,qe,P,ue,s,d,E,v,w,n,rt,y,p,S,m,T,h,_,H,r,Ke,M,q])}function g_e(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=d_();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 v_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=ja(s),S=ja(l),A=Ma(d),E=Ma(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(L){L?i.current.typing||(i.current.typing=L,S(L)):i.current.typing&&(i.current.typing=L,S(L))}function j(L,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?L.indexOf(re):-1}function q(L){const M=o.current;if(v.current.length>0&&v.current[0]!==" "&&(j(M,M,v.current)===-1?T(!1):L.key===" "&&hr(L)),M==null||E.current.includes(L.key)||L.key.length!==1||L.ctrlKey||L.metaKey||L.altKey)return;r&&L.key!==" "&&(hr(L),T(!0)),M.every(G=>{var V,F;return G?((V=G[0])==null?void 0:V.toLocaleLowerCase())!==((F=G[1])==null?void 0:F.toLocaleLowerCase()):!0})&&v.current===L.key&&(v.current="",w.current=_.current),v.current+=L.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):L.key!==" "&&(v.current="",T(!1))}return{reference:{onKeyDown:q},floating:{onKeyDown:q,onKeyUp(L){L.key===" "&&T(!1)}}}},[c,r,i,o,p,E,A,b,S])}const b_e=({styles:e,type:t,options:n,label:r,reusable:i})=>{var Y,ne,ce,P,ue,Oe,D,De,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}=p_e({placement:"bottom-start",open:l,onOpenChange:w,whileElementsMounted:x0e,middleware:[i0e(5),o0e({padding:10,boundary:(a==null?void 0:a.current)??void 0,crossAxis:!0}),a0e({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=s_e(S,{event:"mousedown"}),q=d_e(S),L=g_e(S,{role:"listbox"}),M=y_e(S,{listRef:A,activeIndex:d,selectedIndex:m,onNavigate:p,loop:!0}),H=v_e(S,{listRef:E,activeIndex:d,selectedIndex:m,onMatch:l?p:h,onTypingChange(Ke){T.current=Ke}}),{getReferenceProps:re,getFloatingProps:Q,getItemProps:G}=h_e([q,L,M,H,j]),V=Ke=>{h(Ke),o(y[v[Ke]]),c(!1)},F=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:F||r||"Select..."}),X.jsx(zve,{...(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(a_e,{context:S,modal:!1,children:X.jsx("div",{ref:_.setFloating,className:(qe=(De=(D=e==null?void 0:e[t])==null?void 0:D.content)==null?void 0:De.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)})})})})]})},__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(Hve,{...(l=n==null?void 0:n[e])==null?void 0:l.icon})]})}),J2={audio:Dve,bubble:kve,button:Tve,carousel:Zbe,column:Jve,dropdown:b_e,file:__e,image:Pve,location:Yve,row:Xve,text:m4,video:Nve},cl=({block:e,styles:t,...n})=>{const i=it(a=>a.renderers)[e.type]??J2[e.type],o={...n,styles:t,...e};return X.jsx(i,{...o})},X2=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(WR.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})})})),Q2=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}=VR(),c=C.useRef(null),d=Ko(w=>w.user),p=Ko(w=>w.messageHistory),[m,h]=C.useState(!1);y4(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})}),eN=C.memo(C.forwardRef(({icon:e=Gve,...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})]})})),tN=C.memo(C.forwardRef(({icon:e=Uve,...t},n)=>{var a,s;const{value:r,sendMessage:i}=VR(),{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})})})),nN=({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(GR.Provider,{value:{hideModal:l,showModal:s,title:r,content:o,open:t},children:[X.jsx(qa,{open:t,onOpenChange:n,children:X.jsx(qa.Content,{title:r,children:o})}),e]})},w_e=({children:e,...t})=>{const n=C.useRef(),r=C.useRef(null),i=Ove({...t,messageContainerRef:r});return n.current||(n.current=i),X.jsx(HR.Provider,{value:n.current,children:X.jsx(x_e,{children:e})})},x_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=Ko(h=>h.setConversationId),l=Ko(h=>h.user),c=Ko(h=>h.conversationId),d=Ko(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)})},[]),B0(async()=>{if(t)return t.on("error",()=>{m(h=>h+1)})}),B0(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 S_e=z["useId".toString()]||(()=>{});let E_e=0;function Im(e){const[t,n]=z.useState(S_e());return Xs(()=>{e||n(r=>r??String(E_e++))},[e]),e||(t?`radix-${t}`:"")}function rN({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=A_e({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Pr(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 A_e({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,i=C.useRef(r),o=Pr(t);return C.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function C_e(e,t=globalThis==null?void 0:globalThis.document){const n=Pr(e);C.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const b_="dismissableLayer.update",O_e="dismissableLayer.pointerDownOutside",T_e="dismissableLayer.focusOutside";let iN;const $_e=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),k_e=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($_e),[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,q=>m(q)),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=I_e(q=>{const L=q.target,M=[...d.branches].some(H=>H.contains(L));!E||M||(o==null||o(q),s==null||s(q),q.defaultPrevented||l==null||l())},h),j=P_e(q=>{const L=q.target;[...d.branches].some(H=>H.contains(L))||(a==null||a(q),s==null||s(q),q.defaultPrevented||l==null||l())},h);return C_e(q=>{S===d.layers.size-1&&(i==null||i(q),!q.defaultPrevented&&l&&(q.preventDefault(),l()))},h),C.useEffect(()=>{if(p)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(iN=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),oN(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=iN)}},[p,h,r,d]),C.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),oN())},[p,d]),C.useEffect(()=>{const q=()=>y({});return document.addEventListener(b_,q),()=>document.removeEventListener(b_,q)},[]),C.createElement(lr.div,ts({},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 I_e(e,t=globalThis==null?void 0:globalThis.document){const n=Pr(e),r=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let c=function(){aN(O_e,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 P_e(e,t=globalThis==null?void 0:globalThis.document){const n=Pr(e),r=C.useRef(!1);return C.useEffect(()=>{const i=o=>{o.target&&!r.current&&aN(T_e,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 oN(){const e=new CustomEvent(b_);document.dispatchEvent(e)}function aN(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?jF(i,o):i.dispatchEvent(o)}const __="focusScope.autoFocusOnMount",w_="focusScope.autoFocusOnUnmount",sN={bubbles:!1,cancelable:!0},R_e=C.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.useState(null),c=Pr(i),d=Pr(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:La(p.current,{select:!0})},w=function(S){if(h.paused||!s)return;const A=S.relatedTarget;A!==null&&(s.contains(A)||La(p.current,{select:!0}))},_=function(S){const A=document.activeElement;for(const E of S)E.removedNodes.length>0&&(s!=null&&s.contains(A)||La(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){cN.add(h);const v=document.activeElement;if(!s.contains(v)){const _=new CustomEvent(__,sN);s.addEventListener(__,c),s.dispatchEvent(_),_.defaultPrevented||(N_e(F_e(uN(s)),{select:!0}),document.activeElement===v&&La(s))}return()=>{s.removeEventListener(__,c),setTimeout(()=>{const _=new CustomEvent(w_,sN);s.addEventListener(w_,d),s.dispatchEvent(_),_.defaultPrevented||La(v??document.body,{select:!0}),s.removeEventListener(w_,d),cN.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]=D_e(b);S&&A?!v.shiftKey&&_===A?(v.preventDefault(),n&&La(S,{select:!0})):v.shiftKey&&_===S&&(v.preventDefault(),n&&La(A,{select:!0})):_===b&&v.preventDefault()}},[n,r,h.paused]);return C.createElement(lr.div,ts({tabIndex:-1},a,{ref:m,onKeyDown:y}))});function N_e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(La(r,{select:t}),document.activeElement!==n)return}function D_e(e){const t=uN(e),n=lN(t,e),r=lN(t.reverse(),e);return[n,r]}function uN(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 lN(e,t){for(const n of e)if(!M_e(n,{upTo:t}))return n}function M_e(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 j_e(e){return e instanceof HTMLInputElement&&"select"in e}function La(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&j_e(e)&&t&&e.select()}}const cN=L_e();function L_e(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fN(e,t),e.unshift(t)},remove(t){var n;e=fN(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function fN(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function F_e(e){return e.filter(t=>t.tagName!=="A")}function q_e(e,t){return C.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const Fa=e=>{const{present:t,children:n}=e,r=U_e(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};Fa.displayName="Presence";function U_e(e){const[t,n]=C.useState(),r=C.useRef({}),i=C.useRef(e),o=C.useRef("none"),a=e?"mounted":"unmounted",[s,l]=q_e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=Pm(r.current);o.current=s==="mounted"?c:"none"},[s]),Xs(()=>{const c=r.current,d=i.current;if(d!==e){const m=o.current,h=Pm(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]),Xs(()=>{if(t){const c=p=>{const h=Pm(r.current).includes(p.animationName);p.target===t&&h&&Yi.flushSync(()=>l("ANIMATION_END"))},d=p=>{p.target===t&&(o.current=Pm(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 Pm(e){return(e==null?void 0:e.animationName)||"none"}let x_=0;function B_e(){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:dN()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:dN()),x_++,()=>{x_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),x_--}},[])}function dN(){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 pN(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 z_e(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 Rm="right-scroll-bar-position",Nm="width-before-scroll-bar",Z_e="with-scroll-bars-hidden",H_e="--removed-body-scroll-bar-size";function W_e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function V_e(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 K_e(e,t){return V_e(t||null,function(n){return e.forEach(function(r){return W_e(r,n)})})}function G_e(e){return e}function Y_e(e,t){t===void 0&&(t=G_e);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 J_e(e){e===void 0&&(e={});var t=Y_e(null);return t.options=_o({async:!0,ssr:!1},e),t}var hN=function(e){var t=e.sideCar,n=pN(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))};hN.isSideCarExport=!0;function X_e(e,t){return e.useMedium(t),hN}var mN=J_e(),S_=function(){},Dm=z.forwardRef(function(e,t){var n=z.useRef(null),r=z.useState({onScrollCapture:S_,onWheelCapture:S_,onTouchMoveCapture:S_}),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=pN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=m,A=K_e([n,t]),E=_o(_o({},b),i);return z.createElement(z.Fragment,null,d&&z.createElement(S,{sideCar:mN,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))});Dm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Dm.classNames={fullWidth:Nm,zeroRight:Rm};var yN,Q_e=function(){if(yN)return yN;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ewe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Q_e();return t&&e.setAttribute("nonce",t),e}function twe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nwe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rwe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ewe())&&(twe(t,n),nwe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iwe=function(){var e=rwe();return function(t,n){z.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gN=function(){var e=iwe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},owe={left:0,top:0,right:0,gap:0},E_=function(e){return parseInt(e||"",10)||0},awe=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[E_(n),E_(r),E_(i)]},swe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return owe;var t=awe(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])}},uwe=gN(),lwe=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(Z_e,` {
|
|
424
424
|
overflow: hidden `).concat(r,`;
|
|
425
425
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
@@ -459,11 +459,11 @@ to {
|
|
|
459
459
|
`)},cwe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=z.useMemo(function(){return swe(i)},[i]);return z.createElement(uwe,{styles:lwe(o,!t,i,n?"":"!important")})},A_=!1;if(typeof window<"u")try{var Mm=Object.defineProperty({},"passive",{get:function(){return A_=!0,!0}});window.addEventListener("test",Mm,Mm),window.removeEventListener("test",Mm,Mm)}catch{A_=!1}var fl=A_?{passive:!1}:!1,fwe=function(e){return e.tagName==="TEXTAREA"},vN=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!fwe(e)&&n[t]==="visible")},dwe=function(e){return vN(e,"overflowY")},pwe=function(e){return vN(e,"overflowX")},bN=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=_N(e,n);if(r){var i=wN(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},hwe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},mwe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},_N=function(e,t){return e==="v"?dwe(t):pwe(t)},wN=function(e,t){return e==="v"?hwe(t):mwe(t)},ywe=function(e,t){return e==="h"&&t==="rtl"?-1:1},gwe=function(e,t,n,r,i){var o=ywe(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=wN(e,s),y=h[0],v=h[1],w=h[2],_=v-w-o*y;(y||_)&&_N(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},jm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xN=function(e){return[e.deltaX,e.deltaY]},SN=function(e){return e&&"current"in e?e.current:e},vwe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},bwe=function(e){return`
|
|
460
460
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
461
461
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
462
|
-
`)},_we=0,dl=[];function wwe(e){var t=z.useRef([]),n=z.useRef([0,0]),r=z.useRef(),i=z.useState(_we++)[0],o=z.useState(function(){return gN()})[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=z_e([e.lockRef.current],(e.shards||[]).map(SN),!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 _=jm(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 q=bN(j,T);if(!q)return!0;if(q?E=j:(E=j==="v"?"h":"v",q=bN(j,T)),!q)return!1;if(!r.current&&"changedTouches"in v&&(S||A)&&(r.current=E),!E)return!0;var L=r.current||E;return gwe(L,w,v,L==="h"?S:A,!0)},[]),l=z.useCallback(function(v){var w=v;if(!(!dl.length||dl[dl.length-1]!==o)){var _="deltaY"in w?xN(w):jm(w),b=t.current.filter(function(E){return E.name===w.type&&E.target===w.target&&vwe(E.delta,_)})[0];if(b&&b.should){w.cancelable&&w.preventDefault();return}if(!b){var S=(a.current.shards||[]).map(SN).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=jm(v),r.current=void 0},[]),p=z.useCallback(function(v){c(v.type,xN(v),v.target,s(v,e.lockRef.current))},[]),m=z.useCallback(function(v){c(v.type,jm(v),v.target,s(v,e.lockRef.current))},[]);z.useEffect(function(){return dl.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,fl),document.addEventListener("touchmove",l,fl),document.addEventListener("touchstart",d,fl),function(){dl=dl.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,fl),document.removeEventListener("touchmove",l,fl),document.removeEventListener("touchstart",d,fl)}},[]);var h=e.removeScrollBar,y=e.inert;return z.createElement(z.Fragment,null,y?z.createElement(o,{styles:bwe(i)}):null,h?z.createElement(cwe,{gapMode:"margin"}):null)}const xwe=X_e(mN,wwe);var EN=z.forwardRef(function(e,t){return z.createElement(Dm,_o({},e,{ref:t,sideCar:xwe}))});EN.classNames=Dm.classNames;const Swe=EN;var Ewe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},pl=new WeakMap,Lm=new WeakMap,Fm={},C_=0,AN=function(e){return e&&(e.host||AN(e.parentNode))},Awe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=AN(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})},Cwe=function(e,t,n,r){var i=Awe(t,Array.isArray(e)?e:[e]);Fm[n]||(Fm[n]=new WeakMap);var o=Fm[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=(pl.get(m)||0)+1,w=(o.get(m)||0)+1;pl.set(m,v),o.set(m,w),a.push(m),v===1&&y&&Lm.set(m,!0),w===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}})};return d(t),s.clear(),C_++,function(){a.forEach(function(p){var m=pl.get(p)-1,h=o.get(p)-1;pl.set(p,m),o.set(p,h),m||(Lm.has(p)||p.removeAttribute(r),Lm.delete(p)),h||p.removeAttribute(n)}),C_--,C_||(pl=new WeakMap,pl=new WeakMap,Lm=new WeakMap,Fm={})}},Owe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ewe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Cwe(r,i,n,"aria-hidden")):function(){return null}};const CN="Dialog",[ON,$2e]=Xf(CN),[Twe,Jo]=ON(CN),$we=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]=rN({prop:r,defaultProp:i,onChange:o});return C.createElement(Twe,{scope:t,triggerRef:s,contentRef:l,contentId:Im(),titleId:Im(),descriptionId:Im(),open:c,onOpenChange:d,onOpenToggle:C.useCallback(()=>d(p=>!p),[d]),modal:a},n)},kwe="DialogTrigger",Iwe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jo(kwe,n),o=ii(t,i.triggerRef);return C.createElement(lr.button,Bt({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":T_(i.open)},r,{ref:o,onClick:Or(e.onClick,i.onOpenToggle)}))}),Pwe="DialogPortal",[k2e,TN]=ON(Pwe,{forceMount:void 0}),O_="DialogOverlay",Rwe=C.forwardRef((e,t)=>{const n=TN(O_,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Jo(O_,e.__scopeDialog);return o.modal?C.createElement(Fa,{present:r||o.open},C.createElement(Nwe,Bt({},i,{ref:t}))):null}),Nwe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jo(O_,n);return C.createElement(Swe,{as:ng,allowPinchZoom:!0,shards:[i.contentRef]},C.createElement(lr.div,Bt({"data-state":T_(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),wf="DialogContent",Dwe=C.forwardRef((e,t)=>{const n=TN(wf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Jo(wf,e.__scopeDialog);return C.createElement(Fa,{present:r||o.open},o.modal?C.createElement(Mwe,Bt({},i,{ref:t})):C.createElement(jwe,Bt({},i,{ref:t})))}),Mwe=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 Owe(o)},[]),C.createElement($N,Bt({},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())}))}),jwe=C.forwardRef((e,t)=>{const n=Jo(wf,e.__scopeDialog),r=C.useRef(!1),i=C.useRef(!1);return C.createElement($N,Bt({},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()}}))}),$N=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 B_e(),C.createElement(C.Fragment,null,C.createElement(R_e,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},C.createElement(k_e,Bt({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":T_(s.open)},a,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Lwe="DialogTitle",Fwe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jo(Lwe,n);return C.createElement(lr.h2,Bt({id:i.titleId},r,{ref:t}))}),qwe="DialogClose",Uwe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Jo(qwe,n);return C.createElement(lr.button,Bt({type:"button"},r,{ref:t,onClick:Or(e.onClick,()=>i.onOpenChange(!1))}))});function T_(e){return e?"open":"closed"}const Bwe=$we,zwe=Iwe,Zwe=Rwe,Hwe=Dwe,Wwe=Fwe,kN=Uwe;function Vwe({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 IN=z.forwardRef(Vwe);function qa({open:e,onOpenChange:t,children:n}){return X.jsx(Bwe,{open:e,onOpenChange:t,children:n})}function Kwe({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(Zwe,{...n==null?void 0:n.overlay}),X.jsx("div",{...n==null?void 0:n.container,children:X.jsxs(Hwe,{...(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(Wwe,{...(s=(a=n==null?void 0:n.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),X.jsx(kN,{children:X.jsx(IN,{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})]})})]})}qa.Button=zwe,qa.Close=kN,qa.Content=Kwe;const PN=C.forwardRef(({children:e,...t},n)=>{const{container:r}=it(i=>i.theme);return X.jsxs("div",{...t,...r,ref:n,children:[X.jsx(Ege,{}),X.jsxs(nN,{children:[X.jsx(Gwe,{}),e]})]})}),Gwe=()=>{const{modal:e}=it(r=>r.theme),t=it(r=>r.connected),{showModal:n}=YR();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(qa.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,{})},Ywe=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})})}),RN="Collapsible",[Jwe,P2e]=Xf(RN),[Xwe,$_]=Jwe(RN),Qwe=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,c]=rN({prop:r,defaultProp:i,onChange:a});return C.createElement(Xwe,{scope:n,disabled:o,contentId:Im(),open:l,onOpenToggle:C.useCallback(()=>c(d=>!d),[c])},C.createElement(lr.div,Bt({"data-state":k_(l),"data-disabled":o?"":void 0},s,{ref:t})))}),exe="CollapsibleTrigger",txe=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=$_(exe,n);return C.createElement(lr.button,Bt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":k_(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:t,onClick:Or(e.onClick,i.onOpenToggle)}))}),NN="CollapsibleContent",nxe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=$_(NN,e.__scopeCollapsible);return C.createElement(Fa,{present:n||i.open},({present:o})=>C.createElement(rxe,Bt({},r,{ref:t,present:o})))}),rxe=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=$_(NN,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)},[]),Xs(()=>{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(lr.div,Bt({"data-state":k_(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 k_(e){return e?"open":"closed"}const ixe=Qwe,oxe=txe,axe=nxe,sxe=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"})),DN=({...e})=>{var a,s;const{header:t,modal:n}=it(l=>l.theme),r=it(l=>l.restartConversation),{showModal:i}=YR(),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(qa.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(Fve,{...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)}})},uxe=({...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(IN,{...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)}})},lxe=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})})),cxe=C.forwardRef((e,t)=>{var r;const{header:n}=it(i=>i.theme);return X.jsx(oxe,{...e,...(r=n==null?void 0:n.content)==null?void 0:r.container,ref:t})}),fxe=C.forwardRef((e,t)=>{var r;const{header:n}=it(i=>i.theme);return X.jsx(axe,{...e,...(r=n==null?void 0:n.expandedContent)==null?void 0:r.container,ref:t})}),dxe=C.forwardRef(({src:e,...t},n)=>{var o;const{header:r}=it(a=>a.theme),i=it(a=>a.getClientId)();return X.jsx(og,{...t,ref:n,userId:i,src:e,...(o=r==null?void 0:r.content)==null?void 0:o.avatar})}),pxe=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})}),hxe=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})}),mxe=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(lxe,{Content:cxe,ExpandedContent:fxe,Avatar:dxe,Description:hxe,Title:pxe,Actions:mxe,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??sxe,a=S=>{S&&Rye(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})]})}}),MN=()=>{var i,o,a,s,l,c,d,p,m,h,y,v,w,_,b,S,A,E,T;const{header:e}=it(j=>j.theme),t=it(j=>j.configuration),n=it(j=>j.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(DN,{}),n&&X.jsx(uxe,{})]})]}),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:jbe,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:zbe,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:Fbe,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:Dbe,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:Ube,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"})]})]})},yxe=fi,jN=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})})}),I_=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)();ove(()=>{n()}),C.useEffect(()=>{l.length===0&&n()},[l.length]);const y=Vx(h??"",15);return X.jsx(KR.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(Zx,{"data-color":y,...(v=d==null?void 0:d.avatar)==null?void 0:v.container,children:[X.jsx(Hx,{...(w=d==null?void 0:d.avatar)==null?void 0:w.image,src:(o==null?void 0:o.avatar)??p}),X.jsx(Wx,{...(_=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(cl,{block:t,styles:d==null?void 0:d.blocks}),i]})})}),gxe=C.createContext(void 0);function vxe(e){const t=C.useContext(gxe);return e||t||"ltr"}function bxe(e,[t,n]){return Math.min(n,Math.max(t,e))}function _xe(e,t){return C.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const LN="ScrollArea",[FN,N2e]=Xf(LN),[wxe,Si]=FN(LN),xxe=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,q]=C.useState(!1),L=ii(t,H=>l(H)),M=vxe(i);return C.createElement(wxe,{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:q,onCornerWidthChange:b,onCornerHeightChange:A},C.createElement(lr.div,Bt({dir:M},a,{ref:L,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})))}),Sxe="ScrollAreaViewport",Exe=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...i}=e,o=Si(Sxe,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(lr.div,Bt({"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",Axe=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(Cxe,Bt({},r,{ref:t,forceMount:n})):i.type==="scroll"?C.createElement(Oxe,Bt({},r,{ref:t,forceMount:n})):i.type==="auto"?C.createElement(qN,Bt({},r,{ref:t,forceMount:n})):i.type==="always"?C.createElement(P_,Bt({},r,{ref:t})):null}),Cxe=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(Fa,{present:n||o},C.createElement(qN,Bt({"data-state":o?"visible":"hidden"},r,{ref:t})))}),Oxe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Si(Xo,e.__scopeScrollArea),o=e.orientation==="horizontal",a=Bm(()=>l("SCROLL_END"),100),[s,l]=_xe("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(Fa,{present:n||s!=="hidden"},C.createElement(P_,Bt({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:Or(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Or(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),qN=C.forwardRef((e,t)=>{const n=Si(Xo,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=C.useState(!1),s=e.orientation==="horizontal",l=Bm(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(s?c:d)}},10);return hl(n.viewport,l),hl(n.content,l),C.createElement(Fa,{present:r||o},C.createElement(P_,Bt({"data-state":o?"visible":"hidden"},i,{ref:t})))}),P_=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=ZN(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 Dxe(m,a.current,s,h)}return n==="horizontal"?C.createElement(Txe,Bt({},d,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollLeft,h=HN(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($xe,Bt({},d,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollTop,h=HN(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}),Txe=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(BN,Bt({"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":Um(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),VN(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:qm(a.paddingLeft),paddingEnd:qm(a.paddingRight)}})}}))}),$xe=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(BN,Bt({"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":Um(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),VN(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:qm(a.paddingTop),paddingEnd:qm(a.paddingBottom)}})}}))}),[kxe,UN]=FN(Xo),BN=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,L=>v(L)),_=C.useRef(null),b=C.useRef(""),S=h.viewport,A=r.content-r.viewport,E=Pr(d),T=Pr(l),j=Bm(p,10);function q(L){if(_.current){const M=L.clientX-_.current.left,H=L.clientY-_.current.top;c({x:M,y:H})}}return C.useEffect(()=>{const L=M=>{const H=M.target;(y==null?void 0:y.contains(H))&&E(M,A)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[S,y,A,E]),C.useEffect(T,[r,T]),hl(y,j),hl(h.content,j),C.createElement(kxe,{scope:n,scrollbar:y,hasThumb:i,onThumbChange:Pr(o),onThumbPointerUp:Pr(a),onThumbPositionChange:T,onThumbPointerDown:Pr(s)},C.createElement(lr.div,Bt({},m,{ref:w,style:{position:"absolute",...m.style},onPointerDown:Or(e.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),_.current=y.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),q(L))}),onPointerMove:Or(e.onPointerMove,q),onPointerUp:Or(e.onPointerUp,L=>{const M=L.target;M.hasPointerCapture(L.pointerId)&&M.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=b.current,h.viewport&&(h.viewport.style.scrollBehavior=""),_.current=null})})))}),R_="ScrollAreaThumb",Ixe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=UN(R_,e.__scopeScrollArea);return C.createElement(Fa,{present:n||i.hasThumb},C.createElement(Pxe,Bt({ref:t},r)))}),Pxe=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=Si(R_,n),a=UN(R_,n),{onThumbPositionChange:s}=a,l=ii(t,p=>a.onThumbChange(p)),c=C.useRef(),d=Bm(()=>{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=Mxe(p,s);c.current=h,s()}};return s(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[o.viewport,d,s]),C.createElement(lr.div,Bt({"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)}))}),zN="ScrollAreaCorner",Rxe=C.forwardRef((e,t)=>{const n=Si(zN,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?C.createElement(Nxe,Bt({},e,{ref:t})):null}),Nxe=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=Si(zN,n),[o,a]=C.useState(0),[s,l]=C.useState(0),c=!!(o&&s);return hl(i.scrollbarX,()=>{var d;const p=((d=i.scrollbarX)===null||d===void 0?void 0:d.offsetHeight)||0;i.onCornerHeightChange(p),l(p)}),hl(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(lr.div,Bt({},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 qm(e){return e?parseInt(e,10):0}function ZN(e,t){const n=e/t;return isNaN(n)?0:n}function Um(e){const t=ZN(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Dxe(e,t,n,r="ltr"){const i=Um(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 WN([l,c],p)(e)}function HN(e,t,n="ltr"){const r=Um(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=bxe(e,l);return WN([0,a],[0,s])(c)}function WN(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 VN(e,t){return e>0&&e<t}const Mxe=(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 Bm(e,t){const n=Pr(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 hl(e,t){const n=Pr(t);Xs(()=>{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 jxe=xxe,Lxe=Exe,Fxe=Axe,qxe=Ixe,Uxe=Rxe;var KN={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"],F=G%100;return"["+G+(V[(F-20)%10]||V[F]||V[0])+"]"}},S=function(G,V,F){var Y=String(G);return!Y||Y.length>=V?G:""+Array(V+1-Y.length).join(F)+G},A={s:S,z:function(G){var V=-G.utcOffset(),F=Math.abs(V),Y=Math.floor(F/60),ne=F%60;return(V<=0?"+":"-")+S(Y,2,"0")+":"+S(ne,2,"0")},m:function G(V,F){if(V.date()<F.date())return-G(F,V);var Y=12*(F.year()-V.year())+(F.month()-V.month()),ne=V.clone().add(Y,p),ce=F-ne<0,P=V.clone().add(Y+(ce?-1:1),p);return+(-(Y+(F-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",q=function(G){return G instanceof re||!(!G||!G[j])},L=function G(V,F,Y){var ne;if(!V)return E;if(typeof V=="string"){var ce=V.toLowerCase();T[ce]&&(ne=ce),F&&(T[ce]=F,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(q(G))return G.clone();var F=typeof V=="object"?V:{};return F.date=G,F.args=arguments,new re(F)},H=A;H.l=L,H.i=q,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(F){this.$L=L(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[j]=!0}var V=G.prototype;return V.parse=function(F){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)}(F),this.init()},V.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},V.$utils=function(){return H},V.isValid=function(){return this.$d.toString()!==v},V.isSame=function(F,Y){var ne=M(F);return this.startOf(Y)<=ne&&ne<=this.endOf(Y)},V.isAfter=function(F,Y){return M(F)<this.startOf(Y)},V.isBefore=function(F,Y){return this.endOf(Y)<M(F)},V.$g=function(F,Y,ne){return H.u(F)?this[Y]:this.set(ne,F)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(F,Y){var ne=this,ce=!!H.u(Y)||Y,P=H.p(F),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)},D=this.$W,De=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,De):ue(0,De+1);case d:var Je=this.$locale().weekStart||0,rt=(D<Je?D+7:D)-Je;return ue(ce?qe-rt:qe+(6-rt),De);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(F){return this.startOf(F,!1)},V.$set=function(F,Y){var ne,ce=H.p(F),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 D=this.clone().set(y,1);D.$d[ue](Oe),D.init(),this.$d=D.set(y,Math.min(this.$D,D.daysInMonth())).$d}else ue&&this.$d[ue](Oe);return this.init(),this},V.set=function(F,Y){return this.clone().$set(F,Y)},V.get=function(F){return this[H.p(F)]()},V.add=function(F,Y){var ne,ce=this;F=Number(F);var P=H.p(Y),ue=function(De){var qe=M(ce);return H.w(qe.date(qe.date()+Math.round(De*F)),ce)};if(P===p)return this.set(p,this.$M+F);if(P===h)return this.set(h,this.$y+F);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,D=this.$d.getTime()+F*Oe;return H.w(D,this)},V.subtract=function(F,Y){return this.add(-1*F,Y)},V.format=function(F){var Y=this,ne=this.$locale();if(!this.isValid())return ne.invalidDate||v;var ce=F||"YYYY-MM-DDTHH:mm:ssZ",P=H.z(this),ue=this.$H,Oe=this.$m,D=this.$M,De=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 D+1;case"MM":return H.s(D+1,2,"0");case"MMM":return Je(ne.monthsShort,D,qe,3);case"MMMM":return Je(qe,D);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,De,2);case"ddd":return Je(ne.weekdaysShort,Y.$W,De,3);case"dddd":return De[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(F,Y,ne){var ce,P=this,ue=H.p(Y),Oe=M(F),D=(Oe.utcOffset()-this.utcOffset())*r,De=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=(De-D)/6048e5;break;case c:ce=(De-D)/864e5;break;case l:ce=De/i;break;case s:ce=De/r;break;case a:ce=De/n;break;default:ce=De}return ne?ce:H.a(ce)},V.daysInMonth=function(){return this.endOf(p).$D},V.$locale=function(){return T[this.$L]},V.locale=function(F,Y){if(!F)return this.$L;var ne=this.clone(),ce=L(F,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=L,M.isDayjs=q,M.unix=function(G){return M(1e3*G)},M.en=T[E],M.Ls=T,M.p={},M})})(KN);var Bxe=KN.exports;const zm=Oo(Bxe);var GN={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)}}})})(GN);var zxe=GN.exports;const Zxe=Oo(zxe);var YN={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)}}})})(YN);var Hxe=YN.exports;const Wxe=Oo(Hxe);zm.extend(Zxe),zm.extend(Wxe);function Vxe(e,t="day"){if(!e||e.length===0)return[];const n=[];n.push(JN(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;zm(i).isSame(o,t)||n.push(JN(o))}return n}function JN(e){return{direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:Kxe(e)}}}function Kxe(e,t=!1){const n=zm(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 XN=10*1e3,QN=C.memo(({scrollDownButton:e,...t})=>{var S,A,E,T,j,q,L,M,H,re,Q,G,V;const{messageList:n}=it(F=>F.theme),r=it(F=>F.messages),i=it(F=>F.setState),o=it(F=>F.on),a=it(F=>F.getClientId)(),s=it(F=>F.configuration),l=it(F=>F.messageContainerRef),c=it(F=>F.isTyping),d=it(F=>F.setIsTyping),p=C.useMemo(()=>Vxe(r),[r]),[m,h]=C.useState(!0),{y}=fve(l),[v,w]=pve(),_=()=>{if(!l.current)return;const{scrollHeight:F}=l.current;m&&l.current.scrollTo({top:F})};C.useEffect(()=>{const F=new Date(Date.now()-XN+2e3);r.length>0&&r[r.length-1].timestamp<F&&d(!1)},[v]),C.useEffect(()=>o("messageSent",()=>{d(!0),w(new Date(Date.now()+XN))}),[]),C.useEffect(()=>o("message",()=>{d(!1)}),[]),C.useEffect(()=>{const F=r[r.length-1];i({disableComposer:!!(F!=null&&F.disableInput)})},[r.length]),C.useEffect(()=>{if(!l.current)return;const{offsetHeight:F,scrollHeight:Y,scrollTop:ne}=l.current;h(Y<=ne+F+100)},[y]);const b=e!=null&&e.icon?e==null?void 0:e.icon:jve;return X.jsxs(jxe,{...(S=n==null?void 0:n.scrollbar)==null?void 0:S.container,scrollHideDelay:300,type:"hover",children:[X.jsx(Lxe,{...(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(og,{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",{...(q=n==null?void 0:n.marquee)==null?void 0:q.title,children:s.botName||"Bot"}),X.jsx("p",{...(L=n==null?void 0:n.marquee)==null?void 0:L.description,children:s.botDescription})]})]}),p.map((F,Y)=>X.jsx(I_,{scroll:_,...F},Y)),c&&X.jsx(I_,{scroll:_,direction:"incoming",children:X.jsx(jN,{})}),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 F,Y;return(Y=l.current)==null?void 0:Y.scrollBy({top:(F=l.current)==null?void 0:F.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(Fxe,{orientation:"vertical",...(Q=n==null?void 0:n.scrollbar)==null?void 0:Q.background,children:X.jsx(qxe,{...(G=n==null?void 0:n.scrollbar)==null?void 0:G.thumb})}),X.jsx(Uxe,{...(V=n==null?void 0:n.scrollbar)==null?void 0:V.corner})]})}),Gxe=()=>X.jsxs(PN,{children:[X.jsx(MN,{}),X.jsx(QN,{}),X.jsxs(X2,{children:[X.jsx(eN,{}),X.jsx(Q2,{}),X.jsx(tN,{})]})]}),ml=oe.object({title:oe.string(),link:oe.string().optional()}),eD=oe.object({composerPlaceholder:oe.string().optional(),botName:oe.string().optional(),botAvatar:oe.string().optional(),botDescription:oe.string().optional(),website:ml.optional(),email:ml.optional(),phone:ml.optional(),privacyPolicy:ml.optional(),termsOfService:ml.optional()}),tD=oe.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),nD=oe.object({}).passthrough().transform(e=>e),Le=oe.object({className:oe.string().optional(),style:nD.optional()}),Zm=oe.object({container:Le.optional(),image:Le.optional(),fallback:Le.optional()}),rD=oe.object({button:Le.optional(),text:oe.record(tD,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()}),iD=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:Zm.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:Zm.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:Zm.optional(),blocks:rD.optional()}).optional(),loadingIndicator:oe.object({container:Le.optional(),loader:Le.optional()}).optional()}),oD=oe.enum(["opened","closed","initial"]),aD=oe.object({data:oe.record(oe.unknown()).optional()}),sD=oe.enum(["messaging","pushpin"]),uD=oe.object({configuration:eD.optional().catch(void 0),theme:iD.optional().catch(void 0),style:oe.string().optional().catch(void 0),user:aD.optional().catch(void 0)}),Yxe=uD.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:sD.optional().catch(void 0),defaultState:oD.optional().catch(void 0)});var N_={},D_={};const Jxe=!1,Xxe=/\r?\n/,Qxe=/\bono[ @]/;function e1e(e){return!!(e&&e.configurable&&typeof e.get=="function")}function t1e(e){return!!(!e||e.writable||typeof e.set=="function")}function lD(e,t){let n=cD(e.stack),r=t?t.stack:void 0;return n&&r?n+`
|
|
462
|
+
`)},_we=0,dl=[];function wwe(e){var t=z.useRef([]),n=z.useRef([0,0]),r=z.useRef(),i=z.useState(_we++)[0],o=z.useState(function(){return gN()})[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=z_e([e.lockRef.current],(e.shards||[]).map(SN),!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 _=jm(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 q=bN(j,T);if(!q)return!0;if(q?E=j:(E=j==="v"?"h":"v",q=bN(j,T)),!q)return!1;if(!r.current&&"changedTouches"in v&&(S||A)&&(r.current=E),!E)return!0;var L=r.current||E;return gwe(L,w,v,L==="h"?S:A,!0)},[]),l=z.useCallback(function(v){var w=v;if(!(!dl.length||dl[dl.length-1]!==o)){var _="deltaY"in w?xN(w):jm(w),b=t.current.filter(function(E){return E.name===w.type&&E.target===w.target&&vwe(E.delta,_)})[0];if(b&&b.should){w.cancelable&&w.preventDefault();return}if(!b){var S=(a.current.shards||[]).map(SN).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=jm(v),r.current=void 0},[]),p=z.useCallback(function(v){c(v.type,xN(v),v.target,s(v,e.lockRef.current))},[]),m=z.useCallback(function(v){c(v.type,jm(v),v.target,s(v,e.lockRef.current))},[]);z.useEffect(function(){return dl.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,fl),document.addEventListener("touchmove",l,fl),document.addEventListener("touchstart",d,fl),function(){dl=dl.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,fl),document.removeEventListener("touchmove",l,fl),document.removeEventListener("touchstart",d,fl)}},[]);var h=e.removeScrollBar,y=e.inert;return z.createElement(z.Fragment,null,y?z.createElement(o,{styles:bwe(i)}):null,h?z.createElement(cwe,{gapMode:"margin"}):null)}const xwe=X_e(mN,wwe);var EN=z.forwardRef(function(e,t){return z.createElement(Dm,_o({},e,{ref:t,sideCar:xwe}))});EN.classNames=Dm.classNames;const Swe=EN;var Ewe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},pl=new WeakMap,Lm=new WeakMap,Fm={},C_=0,AN=function(e){return e&&(e.host||AN(e.parentNode))},Awe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=AN(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})},Cwe=function(e,t,n,r){var i=Awe(t,Array.isArray(e)?e:[e]);Fm[n]||(Fm[n]=new WeakMap);var o=Fm[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=(pl.get(m)||0)+1,w=(o.get(m)||0)+1;pl.set(m,v),o.set(m,w),a.push(m),v===1&&y&&Lm.set(m,!0),w===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}})};return d(t),s.clear(),C_++,function(){a.forEach(function(p){var m=pl.get(p)-1,h=o.get(p)-1;pl.set(p,m),o.set(p,h),m||(Lm.has(p)||p.removeAttribute(r),Lm.delete(p)),h||p.removeAttribute(n)}),C_--,C_||(pl=new WeakMap,pl=new WeakMap,Lm=new WeakMap,Fm={})}},Owe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ewe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Cwe(r,i,n,"aria-hidden")):function(){return null}};const CN="Dialog",[ON,$2e]=Xf(CN),[Twe,Xo]=ON(CN),$we=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]=rN({prop:r,defaultProp:i,onChange:o});return C.createElement(Twe,{scope:t,triggerRef:s,contentRef:l,contentId:Im(),titleId:Im(),descriptionId:Im(),open:c,onOpenChange:d,onOpenToggle:C.useCallback(()=>d(p=>!p),[d]),modal:a},n)},kwe="DialogTrigger",Iwe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Xo(kwe,n),o=ii(t,i.triggerRef);return C.createElement(lr.button,Bt({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":T_(i.open)},r,{ref:o,onClick:Or(e.onClick,i.onOpenToggle)}))}),Pwe="DialogPortal",[k2e,TN]=ON(Pwe,{forceMount:void 0}),O_="DialogOverlay",Rwe=C.forwardRef((e,t)=>{const n=TN(O_,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Xo(O_,e.__scopeDialog);return o.modal?C.createElement(Fa,{present:r||o.open},C.createElement(Nwe,Bt({},i,{ref:t}))):null}),Nwe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Xo(O_,n);return C.createElement(Swe,{as:ng,allowPinchZoom:!0,shards:[i.contentRef]},C.createElement(lr.div,Bt({"data-state":T_(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),wf="DialogContent",Dwe=C.forwardRef((e,t)=>{const n=TN(wf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Xo(wf,e.__scopeDialog);return C.createElement(Fa,{present:r||o.open},o.modal?C.createElement(Mwe,Bt({},i,{ref:t})):C.createElement(jwe,Bt({},i,{ref:t})))}),Mwe=C.forwardRef((e,t)=>{const n=Xo(wf,e.__scopeDialog),r=C.useRef(null),i=ii(t,n.contentRef,r);return C.useEffect(()=>{const o=r.current;if(o)return Owe(o)},[]),C.createElement($N,Bt({},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())}))}),jwe=C.forwardRef((e,t)=>{const n=Xo(wf,e.__scopeDialog),r=C.useRef(!1),i=C.useRef(!1);return C.createElement($N,Bt({},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()}}))}),$N=C.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=Xo(wf,n),l=C.useRef(null),c=ii(t,l);return B_e(),C.createElement(C.Fragment,null,C.createElement(R_e,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},C.createElement(k_e,Bt({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":T_(s.open)},a,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Lwe="DialogTitle",Fwe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Xo(Lwe,n);return C.createElement(lr.h2,Bt({id:i.titleId},r,{ref:t}))}),qwe="DialogClose",Uwe=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Xo(qwe,n);return C.createElement(lr.button,Bt({type:"button"},r,{ref:t,onClick:Or(e.onClick,()=>i.onOpenChange(!1))}))});function T_(e){return e?"open":"closed"}const Bwe=$we,zwe=Iwe,Zwe=Rwe,Hwe=Dwe,Wwe=Fwe,kN=Uwe;function Vwe({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 IN=z.forwardRef(Vwe);function qa({open:e,onOpenChange:t,children:n}){return X.jsx(Bwe,{open:e,onOpenChange:t,children:n})}function Kwe({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(Zwe,{...n==null?void 0:n.overlay}),X.jsx("div",{...n==null?void 0:n.container,children:X.jsxs(Hwe,{...(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(Wwe,{...(s=(a=n==null?void 0:n.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),X.jsx(kN,{children:X.jsx(IN,{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})]})})]})}qa.Button=zwe,qa.Close=kN,qa.Content=Kwe;const PN=C.forwardRef(({children:e,...t},n)=>{const{container:r}=it(i=>i.theme);return X.jsxs("div",{...t,...r,ref:n,children:[X.jsx(Ege,{}),X.jsxs(nN,{children:[X.jsx(Gwe,{}),e]})]})}),Gwe=()=>{const{modal:e}=it(r=>r.theme),t=it(r=>r.connected),{showModal:n}=YR();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(qa.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,{})},Ywe=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})})}),RN="Collapsible",[Jwe,P2e]=Xf(RN),[Xwe,$_]=Jwe(RN),Qwe=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,c]=rN({prop:r,defaultProp:i,onChange:a});return C.createElement(Xwe,{scope:n,disabled:o,contentId:Im(),open:l,onOpenToggle:C.useCallback(()=>c(d=>!d),[c])},C.createElement(lr.div,Bt({"data-state":k_(l),"data-disabled":o?"":void 0},s,{ref:t})))}),exe="CollapsibleTrigger",txe=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=$_(exe,n);return C.createElement(lr.button,Bt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":k_(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:t,onClick:Or(e.onClick,i.onOpenToggle)}))}),NN="CollapsibleContent",nxe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=$_(NN,e.__scopeCollapsible);return C.createElement(Fa,{present:n||i.open},({present:o})=>C.createElement(rxe,Bt({},r,{ref:t,present:o})))}),rxe=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=$_(NN,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)},[]),Xs(()=>{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(lr.div,Bt({"data-state":k_(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 k_(e){return e?"open":"closed"}const ixe=Qwe,oxe=txe,axe=nxe,sxe=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"})),DN=({...e})=>{var a,s;const{header:t,modal:n}=it(l=>l.theme),r=it(l=>l.restartConversation),{showModal:i}=YR(),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(qa.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(Fve,{...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)}})},uxe=({...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(IN,{...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)}})},lxe=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})})),cxe=C.forwardRef((e,t)=>{var r;const{header:n}=it(i=>i.theme);return X.jsx(oxe,{...e,...(r=n==null?void 0:n.content)==null?void 0:r.container,ref:t})}),fxe=C.forwardRef((e,t)=>{var r;const{header:n}=it(i=>i.theme);return X.jsx(axe,{...e,...(r=n==null?void 0:n.expandedContent)==null?void 0:r.container,ref:t})}),dxe=C.forwardRef(({src:e,...t},n)=>{var o;const{header:r}=it(a=>a.theme),i=it(a=>a.getClientId)();return X.jsx(og,{...t,ref:n,userId:i,src:e,...(o=r==null?void 0:r.content)==null?void 0:o.avatar})}),pxe=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})}),hxe=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})}),mxe=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(lxe,{Content:cxe,ExpandedContent:fxe,Avatar:dxe,Description:hxe,Title:pxe,Actions:mxe,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??sxe,a=S=>{S&&Rye(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})]})}}),MN=()=>{var i,o,a,s,l,c,d,p,m,h,y,v,w,_,b,S,A,E,T;const{header:e}=it(j=>j.theme),t=it(j=>j.configuration),n=it(j=>j.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(DN,{}),n&&X.jsx(uxe,{})]})]}),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:jbe,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:zbe,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:Fbe,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:Dbe,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:Ube,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"})]})]})},yxe=fi,jN=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})})}),I_=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)();ove(()=>{n()}),C.useEffect(()=>{l.length===0&&n()},[l.length]);const y=Vx(h??"",15);return X.jsx(KR.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(Zx,{"data-color":y,...(v=d==null?void 0:d.avatar)==null?void 0:v.container,children:[X.jsx(Hx,{...(w=d==null?void 0:d.avatar)==null?void 0:w.image,src:(o==null?void 0:o.avatar)??p}),X.jsx(Wx,{...(_=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(cl,{block:t,styles:d==null?void 0:d.blocks}),i]})})}),gxe=C.createContext(void 0);function vxe(e){const t=C.useContext(gxe);return e||t||"ltr"}function bxe(e,[t,n]){return Math.min(n,Math.max(t,e))}function _xe(e,t){return C.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const LN="ScrollArea",[FN,N2e]=Xf(LN),[wxe,Si]=FN(LN),xxe=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,q]=C.useState(!1),L=ii(t,H=>l(H)),M=vxe(i);return C.createElement(wxe,{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:q,onCornerWidthChange:b,onCornerHeightChange:A},C.createElement(lr.div,Bt({dir:M},a,{ref:L,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})))}),Sxe="ScrollAreaViewport",Exe=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...i}=e,o=Si(Sxe,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(lr.div,Bt({"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)))}),Qo="ScrollAreaScrollbar",Axe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Si(Qo,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(Cxe,Bt({},r,{ref:t,forceMount:n})):i.type==="scroll"?C.createElement(Oxe,Bt({},r,{ref:t,forceMount:n})):i.type==="auto"?C.createElement(qN,Bt({},r,{ref:t,forceMount:n})):i.type==="always"?C.createElement(P_,Bt({},r,{ref:t})):null}),Cxe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Si(Qo,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(Fa,{present:n||o},C.createElement(qN,Bt({"data-state":o?"visible":"hidden"},r,{ref:t})))}),Oxe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Si(Qo,e.__scopeScrollArea),o=e.orientation==="horizontal",a=Bm(()=>l("SCROLL_END"),100),[s,l]=_xe("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(Fa,{present:n||s!=="hidden"},C.createElement(P_,Bt({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:Or(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Or(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),qN=C.forwardRef((e,t)=>{const n=Si(Qo,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=C.useState(!1),s=e.orientation==="horizontal",l=Bm(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(s?c:d)}},10);return hl(n.viewport,l),hl(n.content,l),C.createElement(Fa,{present:r||o},C.createElement(P_,Bt({"data-state":o?"visible":"hidden"},i,{ref:t})))}),P_=C.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=Si(Qo,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=ZN(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 Dxe(m,a.current,s,h)}return n==="horizontal"?C.createElement(Txe,Bt({},d,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollLeft,h=HN(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($xe,Bt({},d,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollTop,h=HN(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}),Txe=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=Si(Qo,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(BN,Bt({"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":Um(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),VN(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:qm(a.paddingLeft),paddingEnd:qm(a.paddingRight)}})}}))}),$xe=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=Si(Qo,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(BN,Bt({"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":Um(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),VN(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:qm(a.paddingTop),paddingEnd:qm(a.paddingBottom)}})}}))}),[kxe,UN]=FN(Qo),BN=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(Qo,n),[y,v]=C.useState(null),w=ii(t,L=>v(L)),_=C.useRef(null),b=C.useRef(""),S=h.viewport,A=r.content-r.viewport,E=Pr(d),T=Pr(l),j=Bm(p,10);function q(L){if(_.current){const M=L.clientX-_.current.left,H=L.clientY-_.current.top;c({x:M,y:H})}}return C.useEffect(()=>{const L=M=>{const H=M.target;(y==null?void 0:y.contains(H))&&E(M,A)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[S,y,A,E]),C.useEffect(T,[r,T]),hl(y,j),hl(h.content,j),C.createElement(kxe,{scope:n,scrollbar:y,hasThumb:i,onThumbChange:Pr(o),onThumbPointerUp:Pr(a),onThumbPositionChange:T,onThumbPointerDown:Pr(s)},C.createElement(lr.div,Bt({},m,{ref:w,style:{position:"absolute",...m.style},onPointerDown:Or(e.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),_.current=y.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),q(L))}),onPointerMove:Or(e.onPointerMove,q),onPointerUp:Or(e.onPointerUp,L=>{const M=L.target;M.hasPointerCapture(L.pointerId)&&M.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=b.current,h.viewport&&(h.viewport.style.scrollBehavior=""),_.current=null})})))}),R_="ScrollAreaThumb",Ixe=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=UN(R_,e.__scopeScrollArea);return C.createElement(Fa,{present:n||i.hasThumb},C.createElement(Pxe,Bt({ref:t},r)))}),Pxe=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=Si(R_,n),a=UN(R_,n),{onThumbPositionChange:s}=a,l=ii(t,p=>a.onThumbChange(p)),c=C.useRef(),d=Bm(()=>{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=Mxe(p,s);c.current=h,s()}};return s(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[o.viewport,d,s]),C.createElement(lr.div,Bt({"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)}))}),zN="ScrollAreaCorner",Rxe=C.forwardRef((e,t)=>{const n=Si(zN,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?C.createElement(Nxe,Bt({},e,{ref:t})):null}),Nxe=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=Si(zN,n),[o,a]=C.useState(0),[s,l]=C.useState(0),c=!!(o&&s);return hl(i.scrollbarX,()=>{var d;const p=((d=i.scrollbarX)===null||d===void 0?void 0:d.offsetHeight)||0;i.onCornerHeightChange(p),l(p)}),hl(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(lr.div,Bt({},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 qm(e){return e?parseInt(e,10):0}function ZN(e,t){const n=e/t;return isNaN(n)?0:n}function Um(e){const t=ZN(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Dxe(e,t,n,r="ltr"){const i=Um(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 WN([l,c],p)(e)}function HN(e,t,n="ltr"){const r=Um(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=bxe(e,l);return WN([0,a],[0,s])(c)}function WN(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 VN(e,t){return e>0&&e<t}const Mxe=(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 Bm(e,t){const n=Pr(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 hl(e,t){const n=Pr(t);Xs(()=>{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 jxe=xxe,Lxe=Exe,Fxe=Axe,qxe=Ixe,Uxe=Rxe;var KN={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"],F=G%100;return"["+G+(V[(F-20)%10]||V[F]||V[0])+"]"}},S=function(G,V,F){var Y=String(G);return!Y||Y.length>=V?G:""+Array(V+1-Y.length).join(F)+G},A={s:S,z:function(G){var V=-G.utcOffset(),F=Math.abs(V),Y=Math.floor(F/60),ne=F%60;return(V<=0?"+":"-")+S(Y,2,"0")+":"+S(ne,2,"0")},m:function G(V,F){if(V.date()<F.date())return-G(F,V);var Y=12*(F.year()-V.year())+(F.month()-V.month()),ne=V.clone().add(Y,p),ce=F-ne<0,P=V.clone().add(Y+(ce?-1:1),p);return+(-(Y+(F-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",q=function(G){return G instanceof re||!(!G||!G[j])},L=function G(V,F,Y){var ne;if(!V)return E;if(typeof V=="string"){var ce=V.toLowerCase();T[ce]&&(ne=ce),F&&(T[ce]=F,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(q(G))return G.clone();var F=typeof V=="object"?V:{};return F.date=G,F.args=arguments,new re(F)},H=A;H.l=L,H.i=q,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(F){this.$L=L(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[j]=!0}var V=G.prototype;return V.parse=function(F){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)}(F),this.init()},V.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},V.$utils=function(){return H},V.isValid=function(){return this.$d.toString()!==v},V.isSame=function(F,Y){var ne=M(F);return this.startOf(Y)<=ne&&ne<=this.endOf(Y)},V.isAfter=function(F,Y){return M(F)<this.startOf(Y)},V.isBefore=function(F,Y){return this.endOf(Y)<M(F)},V.$g=function(F,Y,ne){return H.u(F)?this[Y]:this.set(ne,F)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(F,Y){var ne=this,ce=!!H.u(Y)||Y,P=H.p(F),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)},D=this.$W,De=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,De):ue(0,De+1);case d:var Je=this.$locale().weekStart||0,rt=(D<Je?D+7:D)-Je;return ue(ce?qe-rt:qe+(6-rt),De);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(F){return this.startOf(F,!1)},V.$set=function(F,Y){var ne,ce=H.p(F),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 D=this.clone().set(y,1);D.$d[ue](Oe),D.init(),this.$d=D.set(y,Math.min(this.$D,D.daysInMonth())).$d}else ue&&this.$d[ue](Oe);return this.init(),this},V.set=function(F,Y){return this.clone().$set(F,Y)},V.get=function(F){return this[H.p(F)]()},V.add=function(F,Y){var ne,ce=this;F=Number(F);var P=H.p(Y),ue=function(De){var qe=M(ce);return H.w(qe.date(qe.date()+Math.round(De*F)),ce)};if(P===p)return this.set(p,this.$M+F);if(P===h)return this.set(h,this.$y+F);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,D=this.$d.getTime()+F*Oe;return H.w(D,this)},V.subtract=function(F,Y){return this.add(-1*F,Y)},V.format=function(F){var Y=this,ne=this.$locale();if(!this.isValid())return ne.invalidDate||v;var ce=F||"YYYY-MM-DDTHH:mm:ssZ",P=H.z(this),ue=this.$H,Oe=this.$m,D=this.$M,De=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 D+1;case"MM":return H.s(D+1,2,"0");case"MMM":return Je(ne.monthsShort,D,qe,3);case"MMMM":return Je(qe,D);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,De,2);case"ddd":return Je(ne.weekdaysShort,Y.$W,De,3);case"dddd":return De[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(F,Y,ne){var ce,P=this,ue=H.p(Y),Oe=M(F),D=(Oe.utcOffset()-this.utcOffset())*r,De=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=(De-D)/6048e5;break;case c:ce=(De-D)/864e5;break;case l:ce=De/i;break;case s:ce=De/r;break;case a:ce=De/n;break;default:ce=De}return ne?ce:H.a(ce)},V.daysInMonth=function(){return this.endOf(p).$D},V.$locale=function(){return T[this.$L]},V.locale=function(F,Y){if(!F)return this.$L;var ne=this.clone(),ce=L(F,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=L,M.isDayjs=q,M.unix=function(G){return M(1e3*G)},M.en=T[E],M.Ls=T,M.p={},M})})(KN);var Bxe=KN.exports;const zm=Oo(Bxe);var GN={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)}}})})(GN);var zxe=GN.exports;const Zxe=Oo(zxe);var YN={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)}}})})(YN);var Hxe=YN.exports;const Wxe=Oo(Hxe);zm.extend(Zxe),zm.extend(Wxe);function Vxe(e,t="day"){if(!e||e.length===0)return[];const n=[];n.push(JN(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;zm(i).isSame(o,t)||n.push(JN(o))}return n}function JN(e){return{direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:Kxe(e)}}}function Kxe(e,t=!1){const n=zm(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 XN=10*1e3,QN=C.memo(({scrollDownButton:e,...t})=>{var S,A,E,T,j,q,L,M,H,re,Q,G,V;const{messageList:n}=it(F=>F.theme),r=it(F=>F.messages),i=it(F=>F.setState),o=it(F=>F.on),a=it(F=>F.getClientId)(),s=it(F=>F.configuration),l=it(F=>F.messageContainerRef),c=it(F=>F.isTyping),d=it(F=>F.setIsTyping),p=C.useMemo(()=>Vxe(r),[r]),[m,h]=C.useState(!0),{y}=fve(l),[v,w]=pve(),_=()=>{if(!l.current)return;const{scrollHeight:F}=l.current;m&&l.current.scrollTo({top:F})};C.useEffect(()=>{const F=new Date(Date.now()-XN+2e3);r.length>0&&r[r.length-1].timestamp<F&&d(!1)},[v]),C.useEffect(()=>o("messageSent",()=>{d(!0),w(new Date(Date.now()+XN))}),[]),C.useEffect(()=>o("message",()=>{d(!1)}),[]),C.useEffect(()=>{const F=r[r.length-1];i({disableComposer:!!(F!=null&&F.disableInput)})},[r.length]),C.useEffect(()=>{if(!l.current)return;const{offsetHeight:F,scrollHeight:Y,scrollTop:ne}=l.current;h(Y<=ne+F+100)},[y]);const b=e!=null&&e.icon?e==null?void 0:e.icon:jve;return X.jsxs(jxe,{...(S=n==null?void 0:n.scrollbar)==null?void 0:S.container,scrollHideDelay:300,type:"hover",children:[X.jsx(Lxe,{...(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(og,{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",{...(q=n==null?void 0:n.marquee)==null?void 0:q.title,children:s.botName||"Bot"}),X.jsx("p",{...(L=n==null?void 0:n.marquee)==null?void 0:L.description,children:s.botDescription})]})]}),p.map((F,Y)=>X.jsx(I_,{scroll:_,...F},Y)),c&&X.jsx(I_,{scroll:_,direction:"incoming",children:X.jsx(jN,{})}),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 F,Y;return(Y=l.current)==null?void 0:Y.scrollBy({top:(F=l.current)==null?void 0:F.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(Fxe,{orientation:"vertical",...(Q=n==null?void 0:n.scrollbar)==null?void 0:Q.background,children:X.jsx(qxe,{...(G=n==null?void 0:n.scrollbar)==null?void 0:G.thumb})}),X.jsx(Uxe,{...(V=n==null?void 0:n.scrollbar)==null?void 0:V.corner})]})}),Gxe=()=>X.jsxs(PN,{children:[X.jsx(MN,{}),X.jsx(QN,{}),X.jsxs(X2,{children:[X.jsx(eN,{}),X.jsx(Q2,{}),X.jsx(tN,{})]})]}),ml=oe.object({title:oe.string(),link:oe.string().optional()}),eD=oe.object({composerPlaceholder:oe.string().optional(),botName:oe.string().optional(),botAvatar:oe.string().optional(),botDescription:oe.string().optional(),website:ml.optional(),email:ml.optional(),phone:ml.optional(),privacyPolicy:ml.optional(),termsOfService:ml.optional()}),tD=oe.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),nD=oe.object({}).passthrough().transform(e=>e),Le=oe.object({className:oe.string().optional(),style:nD.optional()}),Zm=oe.object({container:Le.optional(),image:Le.optional(),fallback:Le.optional()}),rD=oe.object({button:Le.optional(),text:oe.record(tD,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()}),iD=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:Zm.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:Zm.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:Zm.optional(),blocks:rD.optional()}).optional(),loadingIndicator:oe.object({container:Le.optional(),loader:Le.optional()}).optional()}),oD=oe.enum(["opened","closed","initial"]),aD=oe.object({data:oe.record(oe.unknown()).optional()}),sD=oe.enum(["messaging","pushpin"]),uD=oe.object({configuration:eD.optional().catch(void 0),theme:iD.optional().catch(void 0),style:oe.string().optional().catch(void 0),user:aD.optional().catch(void 0)}),Yxe=uD.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:sD.optional().catch(void 0),defaultState:oD.optional().catch(void 0)});var N_={},D_={};const Jxe=!1,Xxe=/\r?\n/,Qxe=/\bono[ @]/;function e1e(e){return!!(e&&e.configurable&&typeof e.get=="function")}function t1e(e){return!!(!e||e.writable||typeof e.set=="function")}function lD(e,t){let n=cD(e.stack),r=t?t.stack:void 0;return n&&r?n+`
|
|
463
463
|
|
|
464
464
|
`+r:n||r}function n1e(e,t,n){n?Object.defineProperty(t,"stack",{get:()=>{let r=e.get.apply(t);return lD({stack:r},n)},enumerable:!1,configurable:!0}):r1e(t,e)}function cD(e){if(e){let t=e.split(Xxe),n;for(let r=0;r<t.length;r++){let i=t[r];if(Qxe.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 r1e(e,t){Object.defineProperty(e,"stack",{get:()=>cD(t.get.apply(e)),enumerable:!1,configurable:!0})}const i1e=["function","symbol","undefined"],o1e=["constructor","prototype","__proto__"],a1e=Object.getPrototypeOf({});function fD(){let e={},t=this;for(let n of dD(t))if(typeof n=="string"){let r=t[n],i=typeof r;i1e.includes(i)||(e[n]=r)}return e}function dD(e,t=[]){let n=[];for(;e&&e!==a1e;)n=n.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let r=new Set(n);for(let i of t.concat(o1e))r.delete(i);return r}const s1e=["name","message","stack"];function Hm(e,t,n){let r=e;return u1e(r,t),t&&typeof t=="object"&&l1e(r,t),r.toJSON=fD,n&&typeof n=="object"&&Object.assign(r,n),r}function u1e(e,t){let n=Object.getOwnPropertyDescriptor(e,"stack");e1e(n)?n1e(n,e,t):t1e(n)&&(e.stack=lD(e,t))}function l1e(e,t){let n=dD(t,s1e),r=e,i=t;for(let o of n)if(r[o]===void 0)try{r[o]=i[o]}catch{}}function c1e(e){return e=e||{},{concatMessages:e.concatMessages===void 0?!0:!!e.concatMessages,format:e.format===void 0?Jxe:typeof e.format=="function"?e.format:!1}}function f1e(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 Ua=M_;function M_(e,t){t=c1e(t);function n(...r){let{originalError:i,props:o,message:a}=f1e(r,t),s=new e(a);return Hm(s,i,o)}return n[Symbol.species]=e,n}M_.toJSON=function(t){return fD.call(t)},M_.extend=function(t,n,r){return r||n instanceof Error?Hm(t,n,r):n?Hm(t,void 0,n):Hm(t)};const pD=wo;wo.error=new Ua(Error),wo.eval=new Ua(EvalError),wo.range=new Ua(RangeError),wo.reference=new Ua(ReferenceError),wo.syntax=new Ua(SyntaxError),wo.type=new Ua(TypeError),wo.uri=new Ua(URIError);const d1e=wo;function wo(...e){let t=e[0];if(typeof t=="object"&&typeof t.name=="string"){for(let n of Object.values(d1e))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 Fs=Jf(Object.freeze(Object.defineProperty({__proto__:null,Ono:Ua,default:pD,ono:pD},Symbol.toStringTag,{value:"Module"})));var Wm={},Vm={},Lt={},Km={},p1e=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Km,"__esModule",{value:!0});const hD=p1e(As);function h1e(e){var n,r,i,o;return e.startsWith("\\\\?\\")?e:e.split((r=(n=hD.default)==null?void 0:n.win32)==null?void 0:r.sep).join(((o=(i=hD.default)==null?void 0:i.posix)==null?void 0:o.sep)??"/")}Km.default=h1e;var Gm={};Object.defineProperty(Gm,"__esModule",{value:!0}),Gm.isWindows=void 0;const m1e=/^win/.test(globalThis.process?globalThis.process.platform:""),y1e=()=>m1e;Gm.isWindows=y1e;var g1e=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]}),v1e=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),b1e=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)&&g1e(t,e,n);return v1e(t,e),t},_1e=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.relative=Lt.safePointerToPath=Lt.toFileSystemPath=Lt.fromFileSystemPath=Lt.isFileSystemPath=Lt.isHttp=Lt.stripHash=Lt.getHash=Lt.stripQuery=Lt.getExtension=Lt.getProtocol=Lt.cwd=Lt.resolve=Lt.parse=void 0;const Ym=_1e(Km),j_=b1e(As),w1e=/\//g,x1e=/^(\w{2,}):\/\//i,S1e=/~1/g,E1e=/~0/g,A1e=As,Jm=Gm,C1e=[[/\?/g,"%3F"],[/#/g,"%23"]],L_=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],O1e=e=>new URL(e);Lt.parse=O1e;function mD(e,t){var o;const n=new URL((0,Ym.default)(e),"resolve://"),r=new URL((0,Ym.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}Lt.resolve=mD;function yD(){if(typeof window<"u")return location.href;const e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}Lt.cwd=yD;function F_(e){const t=x1e.exec(e||"");if(t)return t[1].toLowerCase()}Lt.getProtocol=F_;function T1e(e){const t=e.lastIndexOf(".");return t>=0?gD(e.substr(t).toLowerCase()):""}Lt.getExtension=T1e;function gD(e){const t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}Lt.stripQuery=gD;function vD(e){if(!e)return"#";const t=e.indexOf("#");return t>=0?e.substring(t):"#"}Lt.getHash=vD;function q_(e){if(!e)return"";const t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}Lt.stripHash=q_;function $1e(e){const t=F_(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}Lt.isHttp=$1e;function U_(e){if(typeof window<"u"||process.browser)return!1;const t=F_(e);return t===void 0||t==="file"}Lt.isFileSystemPath=U_;function k1e(e){var t;if((0,Jm.isWindows)()){const n=yD(),r=e.toUpperCase(),o=(0,Ym.default)(n).toUpperCase(),a=r.includes(o),s=r.includes(o),l=((t=j_.win32)==null?void 0:t.isAbsolute(e))||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(a||s||l)&&!n.startsWith("http")&&(e=(0,A1e.join)(n,e)),e=(0,Ym.default)(e)}e=encodeURI(e);for(const n of C1e)e=e.replace(n[0],n[1]);return e}Lt.fromFileSystemPath=k1e;function I1e(e,t){e=decodeURI(e);for(let r=0;r<L_.length;r+=2)e=e.replace(L_[r],L_[r+1]);let n=e.substr(0,7).toLowerCase()==="file://";return n&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,Jm.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(n=!1,e=(0,Jm.isWindows)()?e:"/"+e)),(0,Jm.isWindows)()&&!n&&(e=e.replace(w1e,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}Lt.toFileSystemPath=I1e;function P1e(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(S1e,"/").replace(E1e,"~"))}Lt.safePointerToPath=P1e;function R1e(e,t){if(!U_(e)||!U_(t))return mD(e,t);const n=j_.default.dirname(q_(e)),r=q_(t);return j_.default.relative(n,r)+vD(t)}Lt.relative=R1e;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 bD=Fs,B_=Lt;class Qo extends Error{constructor(t,n){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=n,this.path=null,bD.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}}tn.JSONParserError=Qo;class Xm 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,B_.toFileSystemPath)(t.$refs._root$Ref.path)}'`,bD.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 Xm.getParserErrors(this.files)}}tn.JSONParserErrorGroup=Xm;class N1e extends Qo{constructor(t,n){super(`Error parsing ${n}: ${t}`,n),this.code="EPARSER",this.name="ParserError"}}tn.ParserError=N1e;class D1e extends Qo{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}}tn.UnmatchedParserError=D1e;class M1e 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=M1e;class j1e extends Qo{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}}tn.UnmatchedResolverError=j1e;class L1e extends Qo{constructor(t,n){super(`Token "${t}" does not exist.`,(0,B_.stripHash)(n)),this.code="EUNMATCHEDRESOLVER",this.name="MissingPointerError"}}tn.MissingPointerError=L1e;class F1e extends Qo{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}}tn.TimeoutError=F1e;class q1e extends Qo{constructor(t,n){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,B_.stripHash)(n)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}}tn.InvalidPointerError=q1e;function U1e(e){return e instanceof Qo||e instanceof Xm}tn.isHandledError=U1e;function B1e(e){return e.path===null&&(e.path=[]),e}tn.normalizeError=B1e;var _D;function Qm(){if(_D)return Vm;_D=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(Vm,"__esModule",{value:!0});const i=r(xf()),o=n(Lt),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 q=!1;for(let L=E.length-1;L>T;L--){const M=E.slice(T,L+1).join("/");if(this.value[M]!==void 0){this.value=this.value[M],T=L,q=!0;break}}if(q)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))}}}Vm.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 Ua=M_;function M_(e,t){t=c1e(t);function n(...r){let{originalError:i,props:o,message:a}=f1e(r,t),s=new e(a);return Hm(s,i,o)}return n[Symbol.species]=e,n}M_.toJSON=function(t){return fD.call(t)},M_.extend=function(t,n,r){return r||n instanceof Error?Hm(t,n,r):n?Hm(t,void 0,n):Hm(t)};const pD=wo;wo.error=new Ua(Error),wo.eval=new Ua(EvalError),wo.range=new Ua(RangeError),wo.reference=new Ua(ReferenceError),wo.syntax=new Ua(SyntaxError),wo.type=new Ua(TypeError),wo.uri=new Ua(URIError);const d1e=wo;function wo(...e){let t=e[0];if(typeof t=="object"&&typeof t.name=="string"){for(let n of Object.values(d1e))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 Fs=Jf(Object.freeze(Object.defineProperty({__proto__:null,Ono:Ua,default:pD,ono:pD},Symbol.toStringTag,{value:"Module"})));var Wm={},Vm={},Lt={},Km={},p1e=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Km,"__esModule",{value:!0});const hD=p1e(As);function h1e(e){var n,r,i,o;return e.startsWith("\\\\?\\")?e:e.split((r=(n=hD.default)==null?void 0:n.win32)==null?void 0:r.sep).join(((o=(i=hD.default)==null?void 0:i.posix)==null?void 0:o.sep)??"/")}Km.default=h1e;var Gm={};Object.defineProperty(Gm,"__esModule",{value:!0}),Gm.isWindows=void 0;const m1e=/^win/.test(globalThis.process?globalThis.process.platform:""),y1e=()=>m1e;Gm.isWindows=y1e;var g1e=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]}),v1e=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),b1e=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)&&g1e(t,e,n);return v1e(t,e),t},_1e=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.relative=Lt.safePointerToPath=Lt.toFileSystemPath=Lt.fromFileSystemPath=Lt.isFileSystemPath=Lt.isHttp=Lt.stripHash=Lt.getHash=Lt.stripQuery=Lt.getExtension=Lt.getProtocol=Lt.cwd=Lt.resolve=Lt.parse=void 0;const Ym=_1e(Km),j_=b1e(As),w1e=/\//g,x1e=/^(\w{2,}):\/\//i,S1e=/~1/g,E1e=/~0/g,A1e=As,Jm=Gm,C1e=[[/\?/g,"%3F"],[/#/g,"%23"]],L_=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],O1e=e=>new URL(e);Lt.parse=O1e;function mD(e,t){var o;const n=new URL((0,Ym.default)(e),"resolve://"),r=new URL((0,Ym.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}Lt.resolve=mD;function yD(){if(typeof window<"u")return location.href;const e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}Lt.cwd=yD;function F_(e){const t=x1e.exec(e||"");if(t)return t[1].toLowerCase()}Lt.getProtocol=F_;function T1e(e){const t=e.lastIndexOf(".");return t>=0?gD(e.substr(t).toLowerCase()):""}Lt.getExtension=T1e;function gD(e){const t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}Lt.stripQuery=gD;function vD(e){if(!e)return"#";const t=e.indexOf("#");return t>=0?e.substring(t):"#"}Lt.getHash=vD;function q_(e){if(!e)return"";const t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}Lt.stripHash=q_;function $1e(e){const t=F_(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}Lt.isHttp=$1e;function U_(e){if(typeof window<"u"||process.browser)return!1;const t=F_(e);return t===void 0||t==="file"}Lt.isFileSystemPath=U_;function k1e(e){var t;if((0,Jm.isWindows)()){const n=yD(),r=e.toUpperCase(),o=(0,Ym.default)(n).toUpperCase(),a=r.includes(o),s=r.includes(o),l=((t=j_.win32)==null?void 0:t.isAbsolute(e))||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(a||s||l)&&!n.startsWith("http")&&(e=(0,A1e.join)(n,e)),e=(0,Ym.default)(e)}e=encodeURI(e);for(const n of C1e)e=e.replace(n[0],n[1]);return e}Lt.fromFileSystemPath=k1e;function I1e(e,t){e=decodeURI(e);for(let r=0;r<L_.length;r+=2)e=e.replace(L_[r],L_[r+1]);let n=e.substr(0,7).toLowerCase()==="file://";return n&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,Jm.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(n=!1,e=(0,Jm.isWindows)()?e:"/"+e)),(0,Jm.isWindows)()&&!n&&(e=e.replace(w1e,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}Lt.toFileSystemPath=I1e;function P1e(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(S1e,"/").replace(E1e,"~"))}Lt.safePointerToPath=P1e;function R1e(e,t){if(!U_(e)||!U_(t))return mD(e,t);const n=j_.default.dirname(q_(e)),r=q_(t);return j_.default.relative(n,r)+vD(t)}Lt.relative=R1e;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 bD=Fs,B_=Lt;class ea extends Error{constructor(t,n){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=n,this.path=null,bD.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}}tn.JSONParserError=ea;class Xm 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,B_.toFileSystemPath)(t.$refs._root$Ref.path)}'`,bD.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 Xm.getParserErrors(this.files)}}tn.JSONParserErrorGroup=Xm;class N1e extends ea{constructor(t,n){super(`Error parsing ${n}: ${t}`,n),this.code="EPARSER",this.name="ParserError"}}tn.ParserError=N1e;class D1e extends ea{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}}tn.UnmatchedParserError=D1e;class M1e extends ea{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=M1e;class j1e extends ea{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}}tn.UnmatchedResolverError=j1e;class L1e extends ea{constructor(t,n){super(`Token "${t}" does not exist.`,(0,B_.stripHash)(n)),this.code="EUNMATCHEDRESOLVER",this.name="MissingPointerError"}}tn.MissingPointerError=L1e;class F1e extends ea{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}}tn.TimeoutError=F1e;class q1e extends ea{constructor(t,n){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,B_.stripHash)(n)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}}tn.InvalidPointerError=q1e;function U1e(e){return e instanceof ea||e instanceof Xm}tn.isHandledError=U1e;function B1e(e){return e.path===null&&(e.path=[]),e}tn.normalizeError=B1e;var _D;function Qm(){if(_D)return Vm;_D=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(Vm,"__esModule",{value:!0});const i=r(xf()),o=n(Lt),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 q=!1;for(let L=E.length-1;L>T;L--){const M=E.slice(T,L+1).join("/");if(this.value[M]!==void 0){this.value=this.value[M],T=L,q=!0;break}}if(q)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))}}}Vm.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 Vm}var wD;function xf(){if(wD)return Wm;wD=1;var e=se&&se.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Wm,"__esModule",{value:!0});const t=e(Qm()),n=tn,r=Lt;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 Wm.default=i,Wm}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]}),Z1e=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),H1e=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 Z1e(t,e),t},xD=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(D_,"__esModule",{value:!0});const SD=Fs,W1e=xD(xf()),Ba=H1e(Lt),ED=xD(Km);class V1e{paths(...t){return AD(this._$refs,t.flat()).map(r=>(0,ED.default)(r.decoded))}values(...t){const n=this._$refs;return AD(n,t.flat()).reduce((i,o)=>(i[(0,ED.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=Ba.resolve(this._root$Ref.path,t),i=Ba.stripHash(r),o=this._$refs[i];if(!o)throw(0,SD.ono)(`Error resolving $ref pointer "${t}".
|
|
468
468
|
"${i}" not found.`);o.set(r,n)}_get$Ref(t){t=Ba.resolve(this._root$Ref.path,t);const n=Ba.stripHash(t);return this._$refs[n]}_add(t){const n=Ba.stripHash(t),r=new W1e.default(this);return r.path=n,this._$refs[n]=r,this._root$Ref=this._root$Ref||r,r}_resolve(t,n,r){const i=Ba.resolve(this._root$Ref.path,t),o=Ba.stripHash(i),a=this._$refs[o];if(!a)throw(0,SD.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}}D_.default=V1e;function AD(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"?Ba.toFileSystemPath(r,!0):r}))}var ey={},xo={};Object.defineProperty(xo,"__esModule",{value:!0}),xo.run=xo.sort=xo.filter=xo.all=void 0;function K1e(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}xo.all=K1e;function G1e(e,t,n){return e.filter(r=>!!CD(r,t,n))}xo.filter=G1e;function Y1e(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=Y1e;async function J1e(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=CD(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=J1e;function CD(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 X1e=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]}),Q1e=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),OD=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)&&X1e(t,e,n);return Q1e(t,e),t};Object.defineProperty(ey,"__esModule",{value:!0});const z_=Fs,eSe=OD(Lt),za=OD(xo),qs=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:eSe.getExtension(e)};try{const s=await nSe(a,n,t);o.pathType=s.plugin.name,a.data=s.result;const l=await rSe(a,n,t);return o.value=l.result,l.result}catch(s){throw(0,qs.isHandledError)(s)&&(o.value=s),s}}async function nSe(e,t,n){let r=za.all(t.resolve);r=za.filter(r,"canRead",e),za.sort(r);try{return await za.run(r,"read",e,n)}catch(i){throw!i&&t.continueOnError?new qs.UnmatchedResolverError(e.url):!i||!("error"in i)?z_.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`):i.error instanceof qs.ResolverError?i.error:new qs.ResolverError(i,e.url)}}async function rSe(e,t,n){const r=za.all(t.parse),i=za.filter(r,"canParse",e),o=i.length>0?i:r;za.sort(o);try{const a=await za.run(o,"parse",e,n);if(!a.plugin.allowEmpty&&iSe(a.result))throw z_.ono.syntax(`Error parsing "${e.url}" as ${a.plugin.name}.
|
|
@@ -497,7 +497,7 @@ Parsed value is empty`);return a}catch(a){throw!a&&t.continueOnError?new qs.Unma
|
|
|
497
497
|
`:"")+PM(l,t),i=o}return r}function PM(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,o,a=0,s=0,l="";r=n.exec(e);)s=r.index,s-i>t&&(o=a>i?a:s,l+=`
|
|
498
498
|
`+e.slice(i,o),i=o+1),a=s;return l+=`
|
|
499
499
|
`,e.length-i>t&&a>i?l+=e.slice(i,a)+`
|
|
500
|
-
`+e.slice(a+1):l+=e.slice(i),l.slice(1)}function dAe(e){for(var t="",n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=Pf(e,i),r=$r[n],!r&&If(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||rAe(n);return t}function pAe(e,t,n){var r="",i=e.tag,o,a,s;for(o=0,a=n.length;o<a;o+=1)s=n[o],e.replacer&&(s=e.replacer.call(n,String(o),s)),(
|
|
500
|
+
`+e.slice(a+1):l+=e.slice(i),l.slice(1)}function dAe(e){for(var t="",n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=Pf(e,i),r=$r[n],!r&&If(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||rAe(n);return t}function pAe(e,t,n){var r="",i=e.tag,o,a,s;for(o=0,a=n.length;o<a;o+=1)s=n[o],e.replacer&&(s=e.replacer.call(n,String(o),s)),(ta(e,t,s,!1,!1)||typeof s>"u"&&ta(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function RM(e,t,n,r){var i="",o=e.tag,a,s,l;for(a=0,s=n.length;a<s;a+=1)l=n[a],e.replacer&&(l=e.replacer.call(n,String(a),l)),(ta(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&ta(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=iw(e,t)),e.dump&&$f===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function hAe(e,t,n){var r="",i=e.tag,o=Object.keys(n),a,s,l,c,d;for(a=0,s=o.length;a<s;a+=1)d="",r!==""&&(d+=", "),e.condenseFlow&&(d+='"'),l=o[a],c=n[l],e.replacer&&(c=e.replacer.call(n,l,c)),ta(e,t,l,!1,!1)&&(e.dump.length>1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ta(e,t,c,!1,!1)&&(d+=e.dump,r+=d));e.tag=i,e.dump="{"+r+"}"}function mAe(e,t,n,r){var i="",o=e.tag,a=Object.keys(n),s,l,c,d,p,m;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Tf("sortKeys must be a boolean or a function");for(s=0,l=a.length;s<l;s+=1)m="",(!r||i!=="")&&(m+=iw(e,t)),c=a[s],d=n[c],e.replacer&&(d=e.replacer.call(n,c,d)),ta(e,t+1,c,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&$f===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,p&&(m+=iw(e,t)),ta(e,t+1,d,!0,p)&&(e.dump&&$f===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,i+=m));e.tag=o,e.dump=i||"{}"}function NM(e,t,n){var r,i,o,a,s,l;for(i=n?e.explicitTypes:e.implicitTypes,o=0,a=i.length;o<a;o+=1)if(s=i[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(n?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(l=e.styleMap[s.tag]||s.defaultStyle,yM.call(s.represent)==="[object Function]")r=s.represent(t,l);else if(gM.call(s.represent,l))r=s.represent[l](t,l);else throw new Tf("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function ta(e,t,n,r,i,o,a){e.tag=null,e.dump=n,NM(e,n,!1)||NM(e,n,!0);var s=yM.call(e.dump),l=r,c;r&&(r=e.flowLevel<0||e.flowLevel>t);var d=s==="[object Object]"||s==="[object Array]",p,m;if(d&&(p=e.duplicates.indexOf(n),m=p!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(i=!1),m&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&m&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),s==="[object Object]")r&&Object.keys(e.dump).length!==0?(mAe(e,t,e.dump,i),m&&(e.dump="&ref_"+p+e.dump)):(hAe(e,t,e.dump),m&&(e.dump="&ref_"+p+" "+e.dump));else if(s==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?RM(e,t-1,e.dump,i):RM(e,t,e.dump,i),m&&(e.dump="&ref_"+p+e.dump)):(pAe(e,t,e.dump),m&&(e.dump="&ref_"+p+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&cAe(e,e.dump,t,o,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Tf("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}function yAe(e,t){var n=[],r=[],i,o;for(aw(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function aw(e,t,n){var r,i,o;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)aw(e[i],t,n);else for(r=Object.keys(e),i=0,o=r.length;i<o;i+=1)aw(e[r[i]],t,n)}function gAe(e,t){t=t||{};var n=new oAe(t);n.noRefs||yAe(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),ta(n,0,r,!0,!0)?n.dump+`
|
|
501
501
|
`:""}mM.dump=gAe;var DM=W_,vAe=mM;function sw(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}Tr.Type=Lr,Tr.Schema=ND,Tr.FAILSAFE_SCHEMA=LD,Tr.JSON_SCHEMA=ZD,Tr.CORE_SCHEMA=HD,Tr.DEFAULT_SCHEMA=X_,Tr.load=DM.load,Tr.loadAll=DM.loadAll,Tr.dump=vAe.dump,Tr.YAMLException=Af,Tr.types={binary:YD,float:zD,map:jD,null:FD,pairs:XD,set:QD,timestamp:KD,bool:qD,int:UD,merge:GD,omap:JD,seq:MD,str:DD},Tr.safeLoad=sw("safeLoad","load"),Tr.safeLoadAll=sw("safeLoadAll","loadAll"),Tr.safeDump=sw("safeDump","dump");var bAe=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(H_,"__esModule",{value:!0});const _Ae=tn,wAe=bAe(Tr),xAe=Tr;H_.default={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],async parse(e){let t=e.data;if(Buffer.isBuffer(t)&&(t=t.toString()),typeof t=="string")try{return wAe.default.load(t,{schema:xAe.JSON_SCHEMA})}catch(n){throw new _Ae.ParserError((n==null?void 0:n.message)||"Parser Error",e.url)}else return t}};var uw={};Object.defineProperty(uw,"__esModule",{value:!0});const SAe=tn,EAe=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;uw.default={order:300,allowEmpty:!0,encoding:"utf8",canParse(e){return(typeof e.data=="string"||Buffer.isBuffer(e.data))&&EAe.test(e.url)},parse(e){if(typeof e.data=="string")return e.data;if(Buffer.isBuffer(e.data))return e.data.toString(this.encoding);throw new SAe.ParserError("data is not text",e.url)}};var lw={};Object.defineProperty(lw,"__esModule",{value:!0});const AAe=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;lw.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&AAe.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}};var cw={},CAe=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]}),OAe=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),TAe=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)&&CAe(t,e,n);return OAe(t,e),t},$Ae=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cw,"__esModule",{value:!0});const kAe=$Ae(As),MM=Fs,jM=TAe(Lt),LM=tn;cw.default={order:100,canRead(e){return jM.isFileSystemPath(e.url)},async read(e){let t;try{t=jM.toFileSystemPath(e.url)}catch(n){throw new LM.ResolverError(MM.ono.uri(n,`Malformed URI: ${e.url}`),e.url)}try{return await kAe.default.promises.readFile(t)}catch(n){throw new LM.ResolverError((0,MM.ono)(n,`Error opening file "${t}"`),t)}}};var fw={},IAe=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]}),PAe=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),RAe=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)&&IAe(t,e,n);return PAe(t,e),t};Object.defineProperty(fw,"__esModule",{value:!0});const uy=Fs,Rf=RAe(Lt),FM=tn;fw.default={order:200,headers:null,timeout:5e3,redirects:5,withCredentials:!1,canRead(e){return Rf.isHttp(e.url)},read(e){const t=Rf.parse(e.url);return typeof window<"u"&&!t.protocol&&(t.protocol=Rf.parse(location.href).protocol),qM(t,this)}};async function qM(e,t,n){e=Rf.parse(e);const r=n||[];r.push(e.href);try{const i=await NAe(e,t);if(i.status>=400)throw(0,uy.ono)({status:i.status},`HTTP ERROR ${i.status}`);if(i.status>=300){if(!Number.isNaN(t.redirects)&&r.length>t.redirects)throw new FM.ResolverError((0,uy.ono)({status:i.status},`Error downloading ${r[0]}.
|
|
502
502
|
Too many redirects:
|
|
503
503
|
${r.join(`
|